diff options
| author | Jacob McDonnell <jacob@jacobmcdonnell.com> | 2024-05-13 13:14:11 -0400 |
|---|---|---|
| committer | Jacob McDonnell <jacob@jacobmcdonnell.com> | 2024-05-13 13:14:11 -0400 |
| commit | c41d9302ae9d62a2a18afc26758085d9633ab314 (patch) | |
| tree | 94f6448b7daed5f5a80a1b29e855fa9a1d97525c /tests/test4.asm | |
| parent | f7b17ef5b489d7bdeeda7e7f4b073727b0de29f9 (diff) | |
Ignoring Comments and Encoding Jumps
Diffstat (limited to 'tests/test4.asm')
| -rwxr-xr-x | tests/test4.asm | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/tests/test4.asm b/tests/test4.asm index af5dcc4..e116ac7 100755 --- a/tests/test4.asm +++ b/tests/test4.asm @@ -1,15 +1,17 @@ -addi $t0, $zero, 10 -addi $t1, $zero, 12 +# 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 -beq $zero, $zero, PrintInt +jal PrintInt nop -caller: beq $zero, $zero, Exit +j Exit # Exit the program nop PrintInt: add $a0, $t2, $zero addi $v0, $zero, 1 syscall -beq $zero, $zero, caller +jr $ra nop Exit: addi $v0, $zero, 10 |
