2023-11-20 13:30:19 +00:00
|
|
|
# t0 = 0
|
|
|
|
li t0, 0
|
2023-11-21 09:36:10 +00:00
|
|
|
li t2, 10 # R[2]=10, MEM[1]=6
|
2023-11-20 13:30:19 +00:00
|
|
|
loop_head:
|
|
|
|
bge t0, t2, loop_end
|
|
|
|
# Repeated code goes here
|
2023-11-21 09:36:10 +00:00
|
|
|
addi t0, t0, 1 # PC=16
|
2023-11-20 13:30:19 +00:00
|
|
|
j loop_head
|
2023-11-21 09:36:10 +00:00
|
|
|
loop_end:
|
|
|
|
|
|
|
|
# R[0]=0
|