SO用户,
如果我有一个值,比如 1010 保存在内存中,我如何一次加载从 MSB 到 LSB 的每个位?我的意思是,
while loop
load $t1 with 1
shift some number by the amount indicated by the value in $t1 (1)
load $t1 with 0
shift some number by the amount indicated by the value in $t1 (0)
do the same until you load the LSB which is 0
start again at MSB (rotate right?)
end loop
我需要一些关于如何在.data
段中首先在内存中声明这个值的提示。我是否将其声明为:
value: .byte 00001010
以及如何将各个位加载到寄存器中?
亲切的问候