配列を作成し、必要に応じて特定のセルの値を更新しようとしています。私の知る限り、Stack Frame を使用するのが最善の方法ですが、うまくいきません。誰でも私を正しい方向に向けることができますか?
ありがとう!
You should already have a good understanding of how array manipulation works in a language like C.
If you want to put an array in the current stack frame, and manipulate it there (and understand the benefits and issues of doing so), then you should do the following:
$sp
). You will use this as the pointer to the start of the array. Store it in another register.$sp
) by however many bytes the array is. This will give you enough space to work.sw
instruction to store a word in the array at that address, and use lw
to load a word.