Hardware Reference
In-Depth Information
Label
Operations
Comments
nop1
goto (MBR)
Branch to next instruction
iadd1
MAR = SP = SP 1; rd
Read in next-to-top word on stack
iadd2
H = TOS
H = top of stack
iadd3
MDR = TOS = MDR+H; wr; goto (MBR1)
Add top two words; write to new top of stack
isub1
MAR = SP = SP 1; rd
Read in next-to-top word on stack
isub2
H = TOS
H = top of stack
isub3
MDR = TOS = MDR H; wr; goto (MBR1)
Subtract TOS from Fetched TOS-1
iand1
MAR = SP = SP
1; rd
Read in next-to-top word on stack
iand2
H = TOS
H = top of stack
iand3
MDR= TOS=MDR AND H; wr; goto (MBR1) AND Fetched TOS-1 with TOS
ior1
MAR = SP = SP
1; rd
Read in next-to-top word on stack
ior2
H = TOS
H = top of stack
ior3
MDR= TOS=MDR OR H; wr; goto (MBR1) OR Fetched TOS-1 with TOS
dup1
MAR = SP = SP + 1
Increment SP; copy to MAR
dup2
MDR = TOS; wr; goto (MBR1)
Write new stack word
pop1
MAR = SP = SP
1; rd
Read in next-to-top word on stack
pop2
Wait for read
pop3
TOS = MDR; goto (MBR1)
Copy new word to TOS
swap1
MAR = SP 1; rd
Read 2nd word from stack; set MAR to SP
swap2
MAR = SP
Prepare to write new 2nd word
swap3
H = MDR; wr
Save new TOS; write 2nd word to stack
swap4
MDR = TOS
Copy old TOS to MDR
swap5
MAR = SP
1; wr
Write old TOS to 2nd place on stack
swap6
TOS = H; goto (MBR1)
Update TOS
bipush1
SP = MAR = SP + 1
Set up MAR for writing to new top of stack
bipush2
MDR = TOS = MBR1; wr; goto (MBR1)
Update stack in TOS and memory
iload1
MAR = LV + MBR1U; rd
Move LV + index to MAR; read operand
iload2
MAR = SP = SP + 1
Increment SP; Move new SP to MAR
iload3
TOS = MDR; wr; goto (MBR1)
Update stack in TOS and memory
istore1
MAR = LV + MBR1U
Set MAR to LV + index
istore2
MDR = TOS; wr
Copy TOS for storing
istore3
MAR = SP = SP 1; rd
Decrement SP; read new TOS
istore4
Wait for read
istore5
TOS = MDR; goto (MBR1)
Update TOS
wide1
goto (MBR1 OR 0x100)
Next address is 0x100 ored with opcode
wide iload1 MAR = LV + MBR2U; rd; goto iload2
Identical to iload1 but using 2-byte index
wide istore1 MAR = LV + MBR2U; goto istore2
Identical to istore1 but using 2-byte index
ldc w1
MAR = CPP + MBR2U; rd; goto iload2
Same as wide iload1 but indexing off CPP
iinc1
MAR = LV + MBR1U; rd
Set MAR to LV + index for read
iinc2
H = MBR1
Set H to constant
iinc3
MDR = MDR + H; wr; goto (MBR1)
Increment by constant and update
goto1
H = PC 1
CopyPCtoH
goto2
PC=H+MBR2
Add offset and update PC
goto3
Have to wait for IFU to fetch new opcode
goto4
goto (MBR1)
Dispatch to next instruction
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
Figure 4-30. The microprogram for the Mic-2 (part 1 of 2).
Search WWH ::




Custom Search