Assignment 4 - console

PHOTO EMBED

Sat May 13 2023 19:23:51 GMT+0000 (Coordinated Universal Time)

Saved by @ahmed_salam21

# MIPS Lab Assignment 4
# A program to calculate sum of square numbers 

.data
x: .asciiz "Enter limit for the sum of squares numbers = "
y: .asciiz " \n sum of squares numbers are = "
.text
 li $v0, 4
 la $a0, x
 syscall
 li $v0, 5
 syscall
 move $s5, $v0
 li $v0, 1
 move $a0, $s5
 syscall
 
 addi $t5, $t5, 0
loop:
 ble $t5, $s5, increment 
 j end
increment: 
 mul $t4,$t5,$t5
 add $s2, $s2, $t4
 addi $t5, $t5, 1
j loop
end: 
 li $v0, 4
 la $a0, y
 syscall 
 
 li $v0, 1
 move $a0, $s2
 syscall
content_copyCOPY