Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- cmp $0, const # 0 < 20
- beq stop
- bge stop
- bgt stop
- blt lt1
- b stop
- lt1:
- bne lt2
- b stop
- lt2:
- ble lt3
- b stop
- lt3:
- lw $1, const
- cmp $1, const # 20 = 20
- bne stop
- bgt stop
- blt stop
- beq eq1
- b stop
- eq1:
- ble eq2
- b stop
- eq2:
- bge eq3
- b stop
- eq3:
- addi $1, $1, 1
- cmp $1, const # 21 > 20
- blt stop
- ble stop
- beq stop
- bgt gt1
- b stop
- gt1:
- bge gt2
- b stop
- gt2:
- bne gt3
- b stop
- gt3:
- lw $2, const
- stop:
- halt
- const: word 20
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement