msxbuild/test/ahello-sdcc/ahello.asm
Willem Cazander 0caad97612
Some checks failed
Run test asserts / Test-Asserts (push) Failing after 5s
Run test asserts / Test-Asserts (pull_request) Failing after 5s
Test failaire on content.
2024-06-23 19:01:03 +02:00

43 lines
500 B
NASM

DOS .equ 0x5
_CONOUT .equ 0x02
.area _CODE
JP START
.db 0x0D ; type hello.com
.db 0x0D,0x0A
.str "Example hello world executable."
.db 0x0D,0x0A
.db 0x1A ; end txt
START:
LD HL,#TXT_HELLO
CALL PUT_TXT
LD HL,#TXT_HELLO_SRC
CALL PUT_TXT
RET
PUT_TXT:
LD A,(HL)
CP #0x1D
RET Z
LD E,A
LD C,#2
PUSH HL
CALL DOS
POP HL
INC HL
JR PUT_TXT
TXT_HELLO:
.str "SDCC: Hello2world..."
.db 0x1D
TXT_HELLO_SRC:
.str "from asm."
.db 0x0D,0x0A
.db 0x1D
.area _DATA