Changeset 126 for trunk/Target/UTargetDelphi.pas
- Timestamp:
- Jan 14, 2022, 7:13:36 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Target/UTargetDelphi.pas
r125 r126 67 67 AddLine('Pos := 0;'); 68 68 FProgramIndex := 0; 69 while (FProgramIndex < Length(FProgram))do begin69 while FProgramIndex < FProgram.Count do begin 70 70 case FProgram[FProgramIndex].Command of 71 71 cmPointerInc: AddLine('Inc(Pos, ' + IntToStr(FProgram[FProgramIndex].Parameter) + ');'); … … 74 74 cmDec: AddLine(GetMemoryCell + ' := ' + GetMemoryCell + ' - ' + IntToStr(FProgram[FProgramIndex].Parameter) + ';'); 75 75 cmSet: AddLine(GetMemoryCell + ' := ' + IntToStr(FProgram[FProgramIndex].Parameter) + ';'); 76 cmMultip y: AddLine(GetMemoryCell + ' := ' + GetMemoryCell + ' + Memory[Pos] * ' + IntToStr(FProgram[FProgramIndex].Parameter) + ';');76 cmMultiply: AddLine(GetMemoryCell + ' := ' + GetMemoryCell + ' + Memory[Pos] * ' + IntToStr(FProgram[FProgramIndex].Parameter) + ';'); 77 77 cmOutput: AddLine('Write(Chr(' + GetMemoryCell + '));'); 78 78 cmInput: AddLine('Read(ReadChar); ' + GetMemoryCell + ' := Ord(ReadChar);');
Note:
See TracChangeset
for help on using the changeset viewer.