diff options
author | Freya Murphy <freya@freyacat.org> | 2024-09-30 18:50:22 -0400 |
---|---|---|
committer | Freya Murphy <freya@freyacat.org> | 2024-09-30 18:50:22 -0400 |
commit | c250afa7a0a9fe003196aded1a0749ed440481a3 (patch) | |
tree | 25fde1682fbc50055d70869802a2822c404749a7 /test/masm/hello.asm | |
parent | update tests (diff) | |
download | mips-c250afa7a0a9fe003196aded1a0749ed440481a3.tar.gz mips-c250afa7a0a9fe003196aded1a0749ed440481a3.tar.bz2 mips-c250afa7a0a9fe003196aded1a0749ed440481a3.zip |
update testing
Diffstat (limited to 'test/masm/hello.asm')
-rw-r--r-- | test/masm/hello.asm | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/test/masm/hello.asm b/test/masm/hello.asm new file mode 100644 index 0000000..2d64ae5 --- /dev/null +++ b/test/masm/hello.asm @@ -0,0 +1,26 @@ +# Copyright (c) 2024 Freya Murphy + +# file: div.asm +# test: should print hello world + +.data +.align 1 + +hw: + .asciiz "Hello, world!\n" + +.text +.align 2 +.globl main + +main: + # print hello world + li $v0, 1 + li $a0, 1 # stdout + la $a1, hw # load string + li $a2, 14 # load length + syscall + + # return 1 + li $v0, 0 + jr $ra |