Changeset 126 for trunk/Target/UTargetInterpretter.pas
- Timestamp:
- Jan 14, 2022, 7:13:36 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Target/UTargetInterpretter.pas
r125 r126 83 83 SProgramUpperLimit = 'Program run over upper limit'; 84 84 SJumpTableInsistent = 'Jump table is inconsistent'; 85 SJumpTableCol ision = 'Jump table colision';85 SJumpTableCollision = 'Jump table collision'; 86 86 SProgramNotRunning = 'Program not running'; 87 87 SUnsupportedCommand = 'Unsupported command'; … … 95 95 with Parent do 96 96 repeat 97 while (FProgramIndex < Length(FProgram)) and (State <> rsStopped) do begin97 while (FProgramIndex < FProgram.Count) and (State <> rsStopped) do begin 98 98 if State = rsRunning then begin 99 99 if FProgramBreakpoints[FProgramIndex] then begin … … 154 154 I: Integer; 155 155 begin 156 for I := 0 to Length(FProgram)- 1 do begin156 for I := 0 to FProgram.Count - 1 do begin 157 157 case FProgram[I].Command of 158 cmLoopStart: FProgram [I].Parameter := 0;159 cmLoopEnd: FProgram [I].Parameter := 0;158 cmLoopStart: FProgram.Operations[I].Parameter := 0; 159 cmLoopEnd: FProgram.Operations[I].Parameter := 0; 160 160 end; 161 161 end; 162 162 163 163 SetLength(Loop, 0); 164 for I := 0 to Length(FProgram)- 1 do begin164 for I := 0 to FProgram.Count - 1 do begin 165 165 case FProgram[I].Command of 166 166 cmLoopStart: begin … … 170 170 cmLoopEnd: begin 171 171 if FProgram[I].Parameter > 0 then 172 raise Exception.Create(SJumpTableCol ision);173 FProgram [I].Parameter := Loop[High(Loop)];172 raise Exception.Create(SJumpTableCollision); 173 FProgram.Operations[I].Parameter := Loop[High(Loop)]; 174 174 if FProgram[Loop[High(Loop)]].Parameter > 0 then 175 raise Exception.Create(SJumpTableCol ision);176 FProgram [Loop[High(Loop)]].Parameter := I;175 raise Exception.Create(SJumpTableCollision); 176 FProgram.Operations[Loop[High(Loop)]].Parameter := I; 177 177 SetLength(Loop, Length(Loop) - 1); 178 178 end; … … 303 303 I: Integer; 304 304 begin 305 SetLength(FProgramBreakpoints, Length(FProgram));305 SetLength(FProgramBreakpoints, FProgram.Count); 306 306 for I := 0 to High(FProgramBreakpoints) do 307 307 FProgramBreakpoints[I] := False; 308 308 for I := 0 to BreakPoints.Count - 1 do 309 if TBreakPoint(BreakPoints[I]).TargetAddress < Length(FProgramBreakpoints) then310 FProgramBreakpoints[ TBreakPoint(BreakPoints[I]).TargetAddress] := True;309 if BreakPoints[I].TargetAddress < Length(FProgramBreakpoints) then 310 FProgramBreakpoints[BreakPoints[I].TargetAddress] := True; 311 311 end; 312 312 … … 316 316 begin 317 317 Result := ''; 318 for I := 0 to Length(FProgram)- 1 do begin318 for I := 0 to FProgram.Count - 1 do begin 319 319 Result := Result + GetOperationText(FProgram[I]); 320 320 end; … … 438 438 // Extended commands 439 439 FCommandTable[cmSet] := CommandSet; 440 FCommandTable[cmMultip y] := CommandMultiply;440 FCommandTable[cmMultiply] := CommandMultiply; 441 441 end; 442 442
Note:
See TracChangeset
for help on using the changeset viewer.