Ignore:
Timestamp:
Apr 12, 2019, 12:06:05 AM (6 years ago)
Author:
chronos
Message:
  • Added: Unit UMachine which will cover virtual hardware for virtual CPU.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/virtualcpu4/UInstructionWriter.pas

    r173 r174  
    150150procedure TInstructionWriter.Write8(Value: Byte);
    151151begin
    152   PByte(@Cpu.Memory[IP])^ := Value;
     152  PByte(Cpu.Memory + IP)^ := Value;
    153153  Inc(IP, SizeOf(Byte));
    154154end;
     
    156156procedure TInstructionWriter.Write16(Value: Word);
    157157begin
    158   PWord(@Cpu.Memory[IP])^ := Value;
     158  PWord(Cpu.Memory + IP)^ := Value;
    159159  Inc(IP, SizeOf(Word));
    160160end;
     
    162162procedure TInstructionWriter.Write32(Value: DWord);
    163163begin
    164   PDWord(@Cpu.Memory[IP])^ := Value;
     164  PDWord(Cpu.Memory + IP)^ := Value;
    165165  Inc(IP, SizeOf(DWord));
    166166end;
     
    168168procedure TInstructionWriter.Write64(Value: QWord);
    169169begin
    170   PQWord(@Cpu.Memory[IP])^ := Value;
     170  PQWord(Cpu.Memory + IP)^ := Value;
    171171  Inc(IP, SizeOf(QWord));
    172172end;
Note: See TracChangeset for help on using the changeset viewer.