Changeset 126 for trunk/Target/UTargetJavascript.pas
- Timestamp:
- Jan 14, 2022, 7:13:36 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Target/UTargetJavascript.pas
r125 r126 61 61 AddLine(''); 62 62 FProgramIndex := 0; 63 while (FProgramIndex < Length(FProgram))do begin63 while FProgramIndex < FProgram.Count do begin 64 64 case FProgram[FProgramIndex].Command of 65 65 cmPointerInc: AddLine('Pos = Pos + ' + IntToStr(FProgram[FProgramIndex].Parameter) + ';'); … … 70 70 cmInput: ; //AddLine(GetMemoryCell + ' = getchar();'); 71 71 cmSet: AddLine(GetMemoryCell + ' = ' + IntToStr(FProgram[FProgramIndex].Parameter) + ';'); 72 cmMultip y: AddLine(GetMemoryCell + ' = ' + GetMemoryCell + ' + Memory[Pos] * ' + IntToStr(FProgram[FProgramIndex].Parameter) + ';');72 cmMultiply: AddLine(GetMemoryCell + ' = ' + GetMemoryCell + ' + Memory[Pos] * ' + IntToStr(FProgram[FProgramIndex].Parameter) + ';'); 73 73 cmLoopStart: begin 74 74 AddLine('while(' + GetMemoryCell + ' != 0)');
Note:
See TracChangeset
for help on using the changeset viewer.