Data Types
LC-3 supports 2 complement integers
MIPS supports: complement Unsigned Floating
TradeOffs:
是否支持高级的数据结构?编译器的难度 VS 微处理器的难度
Addressing Mode
LC-3:
- Immediate
- Reg
- Memory addressing modes
- PC-relative
- Indirect
- Base-offset
MIPS:
Op Instruction
很有意思的是MIPS没有not,他用nor实现(两个操作数都是x)
immediate should be sign-extended
sub in LC-3:
间接寻址
间接寻址相对于PC-realtive使得寻址地址可以在内存的任何位置(9 bits的PC- relative范围是【PC+255,PC-256】)
Immediate Addressing Mode
LEA:DR <- PC + Imme
计算内存地址
Control instruction
NOP:将nzp均设置为0
unconditional jump:将nzp均设为1