Changeset 126 for trunk/Target/UTargetPython.pas
- Timestamp:
- Jan 14, 2022, 7:13:36 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Target/UTargetPython.pas
r125 r126 104 104 AddLine('position = 0'); 105 105 FProgramIndex := 0; 106 while (FProgramIndex < Length(FProgram))do begin106 while FProgramIndex < FProgram.Count do begin 107 107 case FProgram[FProgramIndex].Command of 108 108 cmPointerInc: AddLine('position += ' + IntToStr(FProgram[FProgramIndex].Parameter)); … … 116 116 cmInput: AddLine(GetMemoryCell + ' = ord(getchar())'); 117 117 cmSet: AddLine(GetMemoryCell + ' = ' + IntToStr(FProgram[FProgramIndex].Parameter)); 118 cmMultip y: AddLine(GetMemoryCell + ' = ' + GetMemoryCell + ' + memory[position] * ' + IntToStr(FProgram[FProgramIndex].Parameter) + ';');118 cmMultiply: AddLine(GetMemoryCell + ' = ' + GetMemoryCell + ' + memory[position] * ' + IntToStr(FProgram[FProgramIndex].Parameter) + ';'); 119 119 cmLoopStart: begin 120 120 AddLine('while(' + GetMemoryCell + ' != 0):');
Note:
See TracChangeset
for help on using the changeset viewer.