Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
嗨必须编写这个循环:
for($6=10;$6!=0;$6--){ $7=$6; }
但有一些条件。我只能使用BEQ并且必须假设每个寄存器的初始值是寄存器的编号。
BEQ
如何仅使用 评估这种差异BEQ?
我做了这个
main: add $6,$5,$5 for: add $7,$6,$0 sub $6,$6,$1 beq $6,for
但我坚持验证。
编码:
li $6, 10 for: move $7, $6 subi $6, $6, 1 beq $6, $0, end j for end: