diff options
| author | Rangi <35663410+Rangi42@users.noreply.github.com> | 2025-11-23 22:19:21 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-11-23 21:19:21 -0600 |
| commit | 308189b638d3dbed2283e041221b8db7d6063094 (patch) | |
| tree | a588912a560ed276dd39654e90d4b2d5cd5c3534 /macros/code.asm | |
| parent | Use more hardware and graphics constants (#532) (diff) | |
| download | pokeyellow-308189b638d3dbed2283e041221b8db7d6063094.tar.gz pokeyellow-308189b638d3dbed2283e041221b8db7d6063094.tar.xz pokeyellow-308189b638d3dbed2283e041221b8db7d6063094.zip | |
Use `ld_hli_a_string` macro to make byte-by-byte strings more obvious (#540)
Diffstat (limited to 'macros/code.asm')
| -rw-r--r-- | macros/code.asm | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/macros/code.asm b/macros/code.asm index c972f97e..70ff4249 100644 --- a/macros/code.asm +++ b/macros/code.asm @@ -10,6 +10,14 @@ ENDM ; Design patterns +MACRO ld_hli_a_string + FOR n, CHARLEN(\1) - 1 + ld a, CHARVAL(STRCHAR(\1, n)) + ld [hli], a + ENDR + ld [hl], CHARVAL(STRCHAR(\1, CHARLEN(\1) - 1)) +ENDM + MACRO dict IF \1 == 0 and a |
