summaryrefslogtreecommitdiff
path: root/main.asm
blob: 2d41e48da16c9f4a128fe611399b0ef25042b8fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
.section .text
.global _main

print:
    li      t1, 0x80000000
l0:
    lb      t0, 0(a0)
    beqz    t0, l1
    sb      t0, 0(t1)
    addi    a0, a0, 1
    j       l0
l1:
    ret

_main:
    la      a0, my_str
    call    print

halt: j halt

.section .rodata
my_str: .string "Hello, world!\n"