# MIPS
## Intro
- 精簡化
- 要被拋棄的東西
- 後繼者: RISC-V
## info
- 32 `register` with 32bits (0 ~ 31)
- [detail](http://www.cs.uwm.edu/classes/cs315/Bacon/Lecture/HTML/ch05s03.html)
- arithmetic operations
1. load from `memory` to `register`
2. save result from `register` to `memory`
- 1 word := 4 bytes
- Big Endian
## instructions
- [instruction detail](https://opencores.org/projects/plasma/opcodes)
- https://www.assemblylanguagetuts.com/mips-instruction-set-opcodes-reference-sheet/
- `systemcall`
- [details](https://courses.missouristate.edu/KenVollmar/mars/Help/SyscallHelp.html)
- `lw`
- load word from memory to register
- `lw reg, offset(mem)`
- offset is counting with bit
- `lw %t0, 32($s3)`
- `sw`
- save word from register to memory
- `sw reg, offset(mem)`
### Jumps
- `jal`
- `jal label`
- jump and link
- save the next instrucment address to $ra
- `jr`
- `jal reg`
- jump register
- jump to the address contained in register