risc-v-tlm/tests/asm/trace.asm

36 lines
465 B
NASM
Raw Normal View History

2018-10-07 04:19:29 +08:00
.equ TRACE_BASE, 0x40000000
#msg:
# .string "Hello World\n"
.section .text
.globl _start
_start:
li a2, TRACE_BASE
li t0, 'H'
sb t0, 0(a2)
li t0, 'e'
sb t0, 0(a2)
li t0, 'l'
sb t0, 0(a2)
li t0, 'l'
sb t0, 0(a2)
li t0, 'o'
sb t0, 0(a2)
li t0, ' '
sb t0, 0(a2)
li t0, 'w'
sb t0, 0(a2)
li t0, 'o'
sb t0, 0(a2)
li t0, 'r'
sb t0, 0(a2)
li t0, 'l'
sb t0, 0(a2)
li t0, 'd'
sb t0, 0(a2)
li t0, '\n'
sb t0, 0(a2)
ecall