Changeset 126 for trunk/Target/UTargetPHP.pas
- Timestamp:
- Jan 14, 2022, 7:13:36 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Target/UTargetPHP.pas
r125 r126 66 66 AddLine('$Position = 0;'); 67 67 FProgramIndex := 0; 68 while (FProgramIndex < Length(FProgram))do begin68 while FProgramIndex < FProgram.Count do begin 69 69 case FProgram[FProgramIndex].Command of 70 70 cmPointerInc: AddLine('$Position = $Position + ' + IntToStr(FProgram[FProgramIndex].Parameter) + ';'); … … 77 77 cmInput: AddLine(GetMemoryCell + ' = fgetc(STDIN);'); 78 78 cmSet: AddLine(GetMemoryCell + ' = chr(' + IntToStr(FProgram[FProgramIndex].Parameter) + ');'); 79 cmMultip y: AddLine(GetMemoryCell + ' = chr(ord(' + GetMemoryCell + ') + ord($Memory[$Position]) * ' + IntToStr(FProgram[FProgramIndex].Parameter) + ');');79 cmMultiply: AddLine(GetMemoryCell + ' = chr(ord(' + GetMemoryCell + ') + ord($Memory[$Position]) * ' + IntToStr(FProgram[FProgramIndex].Parameter) + ');'); 80 80 cmLoopStart: begin 81 81 AddLine('while(' + GetMemoryCell + ' != "\0") {');
Note:
See TracChangeset
for help on using the changeset viewer.