kvisc/as/testfile.asm

36 lines
378 B
NASM
Raw Normal View History

2019-05-22 18:39:46 +02:00
# Test assembly file
# Wololo!
2019-05-29 16:57:22 +02:00
hw = 'Hello World'
main:
; This comment is successfully ignored
mov rbp, 0x200000
mov rsp, rbp
mov ax0, hw
mov ax1, hw_len
call print
2019-05-22 18:39:46 +02:00
stop
2019-05-29 16:57:22 +02:00
print:
enter
mov rcx, ax1
rep call .pch1
leave
ret
.pch1:
test b[ax0], b[ax0]
jnz .pch2
ret
.pch2:
prn b[ax0]
inc ax0
2019-05-22 18:39:46 +02:00
ret