summaryrefslogtreecommitdiff
path: root/tests/test5.asm
diff options
context:
space:
mode:
authorJacob McDonnell <jacob@jacobmcdonnell.com>2024-05-13 14:52:19 -0400
committerJacob McDonnell <jacob@jacobmcdonnell.com>2024-05-13 14:52:19 -0400
commit9eab2215c7bb8dbe017987078497fa6c7d8943c3 (patch)
treef7dd90797d5566f148562ed9ce4fc7e1be56f7d5 /tests/test5.asm
parentc41d9302ae9d62a2a18afc26758085d9633ab314 (diff)
Handle Labels on Seperate Lines
Diffstat (limited to 'tests/test5.asm')
-rwxr-xr-xtests/test5.asm21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/test5.asm b/tests/test5.asm
new file mode 100755
index 0000000..65c20bb
--- /dev/null
+++ b/tests/test5.asm
@@ -0,0 +1,21 @@
+# This is a test program to test the capabilities of the assembler
+
+addi $t0, $zero, 10 # load 10 into $t0
+addi $t1, $zero, 12 # load 12 into $t1
+add $t2, $t1, $t0
+jal PrintInt
+nop
+j Exit # Exit the program
+nop
+
+PrintInt:
+ add $a0, $t2, $zero
+ addi $v0, $zero, 1
+ syscall
+ jr $ra
+ nop
+
+Exit:
+
+ addi $v0, $zero, 10
+ syscall