mips/test/masm/hello.asm

28 lines
317 B
NASM
Raw Permalink Normal View History

2024-09-30 22:50:22 +00:00
# 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
nop