Skip to content

01

.data
msg: .asciiz "Hello World"

.text
main:

li $v0, 4
la $a0, msg
syscall

li $v0, 10
syscall

Add 2 Numbers

I used add to assign values, as li is a pseudo-instruction, which will take 2 cycles

.text

main:
add $v0, $zero, 1

add $11, 10, $zero
add $12, 10, $zero
add $a0, $11, $12
syscall

add $v0, $zero, 10
syscall
Last Updated: 2023-01-25 ; Contributors: AhmedThahir

Comments