Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .data
- prompt0: .asciiz "Did "
- prompt2: .asciiz " iterations"
- .text
- .globl main
- main:
- li $s1, 0
- li $t0, 5
- li $t2, 2
- li $t3, 1
- li $t4, 10
- loop:
- bge $s1, $t4, end
- add $s1, $s1, $t2
- sub $t0, $t0, $t3
- j loop
- end:
- li $v0, 4
- la $a0, prompt0
- syscall
- li $v0, 1
- move $a0, $t0
- syscall
- li $v0, 4
- la $a0, prompt2
- syscall
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement