4
我想我知道如何處理這種情況,但我只是想確保我是對的。假設你有下面的C代碼:MIPS彙編指針指針?
int myInt = 3;
int* myPointer = &myInt;
int** mySecondPointer = &myPointer;
P包含指向內存中的一個地方有另一個地址的地址。我想修改第二個地址。所以MIPS代碼:
la $t0, my_new_address
lw $t1, ($a0) # address that points to the address we want to modify
sw $t0, ($t1) # load address into memory pointed to by $t1
這樣做你會這樣做嗎?