summaryrefslogtreecommitdiff
path: root/include/text.inc
blob: 9de853aaede2a44c7313665403ae94cc04e19895 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
INCLUDE "charmap.inc"

; Outputs each character of each argument as a 16-bit word
; (dw "string" does not do this: https://github.com/gbdev/rgbds/issues/568)
text: macro
_arg = 1
    rept _NARG
_WS EQUS \1
_len = STRLEN("{_WS}")
_i = 1
        rept _len
            dw STRSUB("{_WS}", _i, 1)
_i = _i + 1
        endr
        PURGE _WS
        shift
_arg = _arg + 1
    endr
endm
line EQUS "dw TX_LF\n    text"
done EQUS "dw TX_END"