mirror of
https://github.com/erkyrath/infocom-zcode-terps.git
synced 2026-03-06 11:03:31 +00:00
23 lines
504 B
NASM
23 lines
504 B
NASM
DLINE: MACRO STRING,SLEN
|
|
ldx \#LOW #STRING# ; get part of STRING
|
|
lda \#HIGH #STRING# ; get other part of string
|
|
IF (#SLEN#+"L") == "L" ; is there a length defined?
|
|
ldy \##STRING#L ; get length of string
|
|
printx "IF"
|
|
ELSE
|
|
ldy #SLEN# ; then just fetch it
|
|
printx "ELSE"
|
|
ENDIF
|
|
jsr DISPLAY_LINE ; print the string
|
|
ENDM
|
|
|
|
DLINE TEST,TEX
|
|
rts
|
|
DISPLAY_LINE:
|
|
rts
|
|
TEST: db "This is a test"
|
|
TEX EQU $-TEST
|
|
|
|
|
|
END
|