Changeset 178 for branches/virtualcpu4
- Timestamp:
- Apr 12, 2019, 2:19:02 PM (6 years ago)
- Location:
- branches/virtualcpu4
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/virtualcpu4/UCpu.pas
r177 r178 391 391 end; 392 392 bw16: begin 393 Registers[Read8]. B:= PWord(Memory + SP)^;393 Registers[Read8].W := PWord(Memory + SP)^; 394 394 Inc(SP, SizeOf(Word)); 395 395 end; 396 396 bw32: begin 397 Registers[Read8]. B:= PDWord(Memory + SP)^;397 Registers[Read8].D := PDWord(Memory + SP)^; 398 398 Inc(SP, SizeOf(DWord)); 399 399 end; 400 400 bw64: begin 401 Registers[Read8]. B:= PQWord(Memory + SP)^;401 Registers[Read8].Q := PQWord(Memory + SP)^; 402 402 Inc(SP, SizeOf(QWord)); 403 403 end; -
branches/virtualcpu4/UFormMain.pas
r177 r178 222 222 223 223 // Update screen area 224 Push(R1); 224 225 Loadi(R1, 0); 225 226 Output(4, R1); 226 227 Loadi(R1, $10000); 227 228 Output(5, R1); 229 Pop(R1); 228 230 229 231 // Read keyboard and print to console -
branches/virtualcpu4/UInstructionWriter.pas
r177 r178 45 45 procedure JumpRelNotZero(Addr: QWord); 46 46 procedure JumpRelZero(Addr: QWord); 47 procedure Push(Reg: TRegIndex); 48 procedure Pop(Reg: TRegIndex); 47 49 procedure DataPrefix8; 48 50 procedure DataPrefix16; … … 187 189 end; 188 190 191 procedure TInstructionWriter.Push(Reg: TRegIndex); 192 begin 193 PrefixBegin; 194 Write8(Byte(opPush)); 195 Write8(Reg); 196 PrefixEnd; 197 end; 198 199 procedure TInstructionWriter.Pop(Reg: TRegIndex); 200 begin 201 PrefixBegin; 202 Write8(Byte(opPop)); 203 Write8(Reg); 204 PrefixEnd; 205 end; 206 189 207 procedure TInstructionWriter.DataPrefix8; 190 208 begin
Note:
See TracChangeset
for help on using the changeset viewer.