Hardware Reference
In-Depth Information
Label
Operations
Comments
iinc1
H = LV
MBR contains index; copy LV to H
iinc2
MAR = MBRU + H; rd
Copy LV + index to MAR; read variable
iinc3
PC = PC + 1; fetch
Fetch constant
iinc4
H = MDR
Copy variable to H
iinc5
PC = PC + 1; fetch
Fetch next opcode
iinc6
MDR = MBR + H; wr; goto Main1
Put sum in MDR; update variable
goto1
OPC = PC 1
Save address of opcode.
goto2
PC = PC + 1; fetch
MBR = 1st byte of offset; fetch 2nd byte
goto3
H = MBR << 8
Shift and save signed first byte in H
goto4
H = MBRU OR H
H = 16-bit branch offset
goto5
PC = OPC + H; fetch
Add offset to OPC
goto6
goto Main1
Wait for fetch of next opcode
iflt1
MAR = SP = SP
1; rd
Read in next-to-top word on stack
iflt2
OPC = TOS
Save TOS in OPC temporarily
iflt3
TOS = MDR
Put new top of stack in TOS
iflt4
N = OPC; if (N) goto T; else goto F
Branch on N bit
ifeq1
MAR = SP = SP 1; rd
Read in next-to-top word of stack
ifeq2
OPC = TOS
Save TOS in OPC temporarily
ifeq3
TOS = MDR
Put new top of stack in TOS
ifeq4
Z = OPC; if (Z) goto T; else goto F
Branch on Z bit
if icmpeq1
MAR = SP = SP
1; rd
Read in next-to-top word of stack
if icmpeq2
MAR = SP = SP 1
Set MAR to read in new top-of-stack
if icmpeq3
H = MDR; rd
Copy second stack word to H
if icmpeq4
OPC = TOS
Save TOS in OPC temporarily
if icmpeq5
TOS = MDR
Put new top of stack in TOS
if icmpeq6
Z = OPC
H; if (Z) goto T; else goto F If top 2 words are equal, goto T, else goto F
T
OPC=PC 1; goto goto2
Same as goto1; needed for target address
F
PC = PC + 1
Skip first offset byte
F2
PC = PC + 1; fetch
PC now points to next opcode
F3
goto Main1
Wait for fetch of opcode
invokevirtual1
PC = PC + 1; fetch
MBR = index byte 1; inc. PC, get 2nd byte
invokevirtual2
H = MBRU << 8
Shift and save first byte in H
invokevirtual3
H = MBRU OR H
H = offset of method pointer from CPP
invokevirtual4
MAR = CPP + H; rd
Get pointer to method from CPP area
invokevirtual5
OPC = PC + 1
Save return PC in OPC temporarily
invokevirtual6
PC = MDR; fetch
PC points to new method; get param count
invokevirtual7
PC = PC + 1; fetch
Fetch 2nd byte of parameter count
invokevirtual8
H = MBRU << 8
Shift and save first byte in H
invokevirtual9
H = MBRU OR H
H = number of parameters
invokevirtual10 PC = PC + 1; fetch
Fetch first byte of # locals
1
invokevirtual12 TOS = MAR = TOS + 1 TOS = address of OBJREF (new LV)
invokevirtual13 PC = PC + 1; fetch Fetch second byte of # locals
invokevirtual14 H = MBRU << 8 Shift and save first byte in H
invokevirtual15 H = MBRU OR H H = # locals
invokevirtual16 MDR = SP+H+1;wr Overwrite OBJREF with link pointer
invokevirtual17 MAR = SP = MDR; Set SP, MAR to location to hold old PC
invokevirtual18 MDR = OPC; wr Save old PC above the local variables
invokevirtual19 MAR = SP = SP + 1 SP points to location to hold old LV
invokevirtual20 MDR = LV; wr Save old LV above saved PC
invokevirtual21 PC = PC + 1; fetch Fetch first opcode of new method.
invokevirtual22 LV = TOS; goto Main1 Set LV to point to LV Frame
Figure 4-17. The microprogram for the Mic-1 (part 1 on facing page, part 2 above, part 3 on next page).
invokevirtual11 TOS = SP
H
TOS = address of OBJREF
 
Search WWH ::




Custom Search