Directors声明变量值存储

容易将数据段地址和地址上的内容搞混

.data
fibs: .space 48	# allocate 12 * 4 = 48 Byte memory, store first address in label "fibs"
size: .word 12	# allocate 1 Byte(a word) for 12, store address in label "size"

.text	# want to load the value of "size" (12) to $t5
la $t5, size	# 1. load the address of "size" to $t5, for we could only use the label
lw $t5, 0($t5)	# 2. load the value of "size" to $t5

需厘清:寄存器编号(地址);寄存器值;内存地址;内存段值
程序操纵寄存器,寄存器操纵内存地址
表示地址:1.立即数(+标签) 2.寄存器取值

循环

1.自增-n为界

2.自减-0为界

常见Pseudo Instruction分解

Pseudo Instruction
含义
Basic Instruction
li
往寄存器中写入一个 32 位的立即数
addu