Changeset 173 for branches/virtualcpu4/UInstructionWriter.pas
- Timestamp:
- Apr 11, 2019, 11:43:06 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/virtualcpu4/UInstructionWriter.pas
r171 r173 24 24 procedure Nop; 25 25 procedure Halt; 26 procedure Load Const(Reg: Byte; Value: QWord);27 procedure Increment(Reg: Byte);28 procedure Decrement(Reg: Byte);26 procedure Loadi(Reg: TRegIndex; Value: QWord); 27 procedure Increment(Reg: TRegIndex); 28 procedure Decrement(Reg: TRegIndex); 29 29 procedure Jump(Value: QWord); 30 30 procedure JumpNotZero(Value: QWord); 31 31 procedure DataPrefix8; 32 procedure StoreMem(RegAddr, RegSrc: Byte); 33 procedure LoadMem(RegDst, RegAddr: Byte); 34 procedure Output(Port: TAddress; Reg: Byte); 35 procedure Input(Reg: Byte; Port: TAddress); 36 procedure Test(Reg: Byte); 32 procedure DataPrefix16; 33 procedure DataPrefix32; 34 procedure DataPrefix64; 35 procedure StoreMem(RegAddr, RegSrc: TRegIndex); 36 procedure LoadMem(RegDst, RegAddr: TRegIndex); 37 procedure Output(Port: TAddress; Reg: TRegIndex); 38 procedure Input(Reg: TRegIndex; Port: TAddress); 39 procedure Test(Reg: TRegIndex); 37 40 end; 38 41 … … 52 55 end; 53 56 54 procedure TInstructionWriter.Load Const(Reg: Byte; Value: QWord);57 procedure TInstructionWriter.Loadi(Reg: TRegIndex; Value: QWord); 55 58 begin 56 Write8(Byte(opLoad Const));59 Write8(Byte(opLoadi)); 57 60 Write8(Reg); 58 61 WriteData(Value); 59 62 end; 60 63 61 procedure TInstructionWriter.Increment(Reg: Byte);64 procedure TInstructionWriter.Increment(Reg: TRegIndex); 62 65 begin 63 66 Write8(Byte(opInc)); … … 65 68 end; 66 69 67 procedure TInstructionWriter.Decrement(Reg: Byte);70 procedure TInstructionWriter.Decrement(Reg: TRegIndex); 68 71 begin 69 72 Write8(Byte(opDec)); … … 88 91 end; 89 92 90 procedure TInstructionWriter.StoreMem(RegAddr, RegSrc: Byte); 93 procedure TInstructionWriter.DataPrefix16; 94 begin 95 Write8(Byte(opDataPrefix16)); 96 end; 97 98 procedure TInstructionWriter.DataPrefix32; 99 begin 100 Write8(Byte(opDataPrefix32)); 101 end; 102 103 procedure TInstructionWriter.DataPrefix64; 104 begin 105 Write8(Byte(opDataPrefix64)); 106 end; 107 108 procedure TInstructionWriter.StoreMem(RegAddr, RegSrc: TRegIndex); 91 109 begin 92 110 Write8(Byte(opStoreMem)); … … 95 113 end; 96 114 97 procedure TInstructionWriter.LoadMem(RegDst, RegAddr: Byte);115 procedure TInstructionWriter.LoadMem(RegDst, RegAddr: TRegIndex); 98 116 begin 99 117 Write8(Byte(opLoadMem)); … … 102 120 end; 103 121 104 procedure TInstructionWriter.Output(Port: TAddress; Reg: Byte);122 procedure TInstructionWriter.Output(Port: TAddress; Reg: TRegIndex); 105 123 begin 106 124 Write8(Byte(opOut)); … … 109 127 end; 110 128 111 procedure TInstructionWriter.Input(Reg: Byte; Port: TAddress);129 procedure TInstructionWriter.Input(Reg: TRegIndex; Port: TAddress); 112 130 begin 113 131 Write8(Byte(opIn)); … … 116 134 end; 117 135 118 procedure TInstructionWriter.Test(Reg: Byte);136 procedure TInstructionWriter.Test(Reg: TRegIndex); 119 137 begin 120 138 Write8(Byte(opTest));
Note:
See TracChangeset
for help on using the changeset viewer.