Assignment 4 - GUI
Tue May 16 2023 17:13:00 GMT+0000 (Coordinated Universal Time)
Saved by
@ahmed_salam21
.data
msg1: .asciiz "Enter limit for the sum of squares numbers = "
msg2: .asciiz " \n sum of squares numbers are = "
.text
li $v0, 51
la $a0, msg1
syscall
move $s5, $a0
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, 56
move $a1, $s2
la $a0, msg2
syscall
content_copyCOPY
Comments