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