Unsigned
对应 overflow
>>
operations,f = &foo
(*f)("cat", 3)
int* a[10];
=> a is an array of pointersint *a, b;
=> a is pointer, b is integera = malloc(sizeof((char))* strlen(b)+1)
strcpy(a,b)
不安全, 因为不知道结尾(\0)strncpy(a,b, strlen(b)+1)
安全。 if its too short it will not copy the null terminator!jr ra
: when some functions is called somewhere, in order to continue running programme, use jr ra to move to ra, and continue programme. 用于返回。 和 jal
配合使用jal
: jumo and link, 给 ra
赋值, 这样函数就知道回到哪里了j
: jal x0 offset 不记录返回值I type
只能处理12 bit 立即数0xEFF
会扩展成0xFFFFFEFF
。对于前20bit来说, 加上 0xFFFFF000
无疑等于对第12位取反。0x7FF
的时候,对第12位+1, 或者是对x10
+1。 因为第12位是对于16进制的剩余类,在这个剩余类中,0+F=F, F+1=0
, 取反加1为自身。t0
of wrong valuePC + offset
然后走PC + 4
lw t0 0(t1)
, find t1 -> 0x12F0
so find Memory[0x12F0] = 99
, return to t0
Memory[0x12F0] = 99
这步会快Memery[Tag] = Data