ifdef __ORG
org __ORG
else
org 32768
endif
; === b e g i n ===
ld [Stop+1], SP ; 4:20 init storing the original SP value when the "bye" word is used
ld L, 0x1A ; 2:7 init Upper screen
call 0x1605 ; 3:17 init Open channel
ld HL, 0xEA60 ; 3:10 init Return address stack = 60000
exx ; 1:4 init
push DE ; 1:11 print "Hello World!"
ld BC, size101 ; 3:10 print Length of string101
ld DE, string101 ; 3:10 print Address of string101
call 0x203C ; 3:17 print Print our string with ZX 48K ROM
pop DE ; 1:10 print
Stop: ; stop
ld SP, 0x0000 ; 3:10 stop restoring the original SP value when the "bye" word is used
ld HL, 0x2758 ; 3:10 stop
exx ; 1:4 stop
ret ; 1:10 stop
; ===== e n d =====
STRING_SECTION:
string101:
db "Hello World!"
size101 EQU $ - string101
A hello.tap containing both the binary program and the basic loader (with the program duration calculated for testing) will also be created automatically. The tap file is immediately launched in fuse after compilation.