Changeset 126 for trunk/Target/UTargetC.pas
- Timestamp:
- Jan 14, 2022, 7:13:36 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Target/UTargetC.pas
r125 r126 74 74 AddLine('Pos = 0;'); 75 75 FProgramIndex := 0; 76 while (FProgramIndex < Length(FProgram))do begin76 while FProgramIndex < FProgram.Count do begin 77 77 case FProgram[FProgramIndex].Command of 78 78 cmPointerInc: AddLine('Pos = Pos + ' + IntToStr(FProgram[FProgramIndex].Parameter) + ';'); … … 83 83 cmInput: AddLine(GetMemoryCell + ' = getchar();'); 84 84 cmSet: AddLine(GetMemoryCell + ' = ' + IntToStr(FProgram[FProgramIndex].Parameter) + ';'); 85 cmMultip y: AddLine(GetMemoryCell + ' = ' + GetMemoryCell + ' + Memory[Pos] * ' + IntToStr(FProgram[FProgramIndex].Parameter) + ';');85 cmMultiply: AddLine(GetMemoryCell + ' = ' + GetMemoryCell + ' + Memory[Pos] * ' + IntToStr(FProgram[FProgramIndex].Parameter) + ';'); 86 86 cmLoopStart: begin 87 87 AddLine('while(' + GetMemoryCell + ' != 0)');
Note:
See TracChangeset
for help on using the changeset viewer.