Changeset 80
- Timestamp:
- Jan 1, 2017, 11:34:52 AM (8 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Target/UTargetInterpretter.pas
r79 r80 228 228 if MemoryPosition < MemorySize then Inc(MemoryPosition, FProgram[FProgramIndex].Parameter) 229 229 else raise Exception.Create(SProgramUpperLimit); 230 if MemoryPosition> MemoryMaxUsed then231 MemoryMaxUsed := MemoryPosition ;230 if (MemoryPosition + 1) > MemoryMaxUsed then 231 MemoryMaxUsed := MemoryPosition + 1; 232 232 end; 233 233 … … 255 255 OutputPosition := 1; 256 256 MemoryPosition := 0; 257 MemoryMaxUsed := 0;257 MemoryMaxUsed := 1; 258 258 //FillChar(Pointer(Memory)^, Length(Memory), 0); 259 259 for I := 0 to Length(Memory) - 1 do -
trunk/UBFTarget.pas
r78 r80 110 110 // Replace old program by new program 111 111 SetLength(FProgram, Length(NewProgram)); 112 Move( NewProgram[0], FProgram[0], SizeOf(TMachineOperation) * Length(NewProgram));112 Move(Pointer(NewProgram)^, Pointer(FProgram)^, SizeOf(TMachineOperation) * Length(NewProgram)); 113 113 end; 114 114 … … 251 251 // Replace old program by new program 252 252 SetLength(FProgram, Length(NewProgram)); 253 Move( NewProgram[0], FProgram[0], SizeOf(TMachineOperation) * Length(NewProgram));253 Move(Pointer(NewProgram)^, Pointer(FProgram)^, SizeOf(TMachineOperation) * Length(NewProgram)); 254 254 end; 255 255
Note:
See TracChangeset
for help on using the changeset viewer.