Here is a list of common operations in Mic-1
- Fetch a byte from the code cache
PC=PC+1;fetch
- Read a word from the data cache
MAR=address;rd
wait a cycle for data to appear in MDR
- Write a word to the data cache
MAR=address
MDR=data;wr
- Pop a value from the stack
SP=SP-1
- Update TOS
TOS=new value
- Pop a value and update TOS
MAR=SP=SP-1;rd
wait a cycle
TOS=MDR
- Fetch a 16-bit signed offset from the code cache
PC=PC+1;fetch
PC=PC+1;fetch
H=MBR<<8
H=H OR MBRU
- Fetch a 16-bit unsigned offset from the code cache
PC=PC+1;fetch
PC=PC+1;fetch
H=MBRU<<8
H=H OR MBRU
- Push a word onto the stack
MAR=SP=SP+1
MDR=value;wr
- Push a word onto the stack and update TOS
MAR=SP=SP+1
TOS=MDR=value;wr