Use dname macro to automatically pad names with "@" characters (#1198)

This commit is contained in:
Rangi
2025-08-17 09:48:05 -04:00
committed by GitHub
parent b1f8d423a2
commit 86acbe5b55
13 changed files with 594 additions and 574 deletions

View File

@@ -108,6 +108,18 @@ MACRO dba_pics ; front, back
endc
ENDM
MACRO dname
if _NARG == 2
def n = \2
else
def n = NAME_LENGTH - 1
endc
assert STRFIND(\1, "@") == -1, "String terminator \"@\" in name: \1"
assert CHARLEN(\1) <= n, "Name longer than {d:n} characters: \1"
db \1
ds n - CHARLEN(\1), "@"
ENDM
MACRO bcd
rept _NARG
dn ((\1) % 100) / 10, (\1) % 10