summaryrefslogtreecommitdiff
path: root/tests/test4.asm
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test4.asm')
-rwxr-xr-xtests/test4.asm16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/test4.asm b/tests/test4.asm
new file mode 100755
index 0000000..af5dcc4
--- /dev/null
+++ b/tests/test4.asm
@@ -0,0 +1,16 @@
+addi $t0, $zero, 10
+addi $t1, $zero, 12
+add $t2, $t1, $t0
+beq $zero, $zero, PrintInt
+nop
+caller: beq $zero, $zero, Exit
+nop
+
+PrintInt: add $a0, $t2, $zero
+addi $v0, $zero, 1
+syscall
+beq $zero, $zero, caller
+nop
+
+Exit: addi $v0, $zero, 10
+syscall