diff options
| author | dannye <33dannye@gmail.com> | 2020-11-04 00:06:44 -0600 |
|---|---|---|
| committer | dannye <33dannye@gmail.com> | 2020-11-04 00:06:44 -0600 |
| commit | 5647ca687b92954dcf37a6ea6bfbc9a341c32de4 (patch) | |
| tree | dde1937a1bfdb3a835f4155e1c2eb8f1aaf86f63 /macros/code.asm | |
| parent | Merge pull request #55 from Deokishisu/patch-1 (diff) | |
| download | pokeyellow-5647ca687b92954dcf37a6ea6bfbc9a341c32de4.tar.gz pokeyellow-5647ca687b92954dcf37a6ea6bfbc9a341c32de4.tar.xz pokeyellow-5647ca687b92954dcf37a6ea6bfbc9a341c32de4.zip | |
Sync with pokered
Diffstat (limited to 'macros/code.asm')
| -rwxr-xr-x | macros/code.asm | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/macros/code.asm b/macros/code.asm new file mode 100755 index 00000000..8507b1ad --- /dev/null +++ b/macros/code.asm @@ -0,0 +1,20 @@ +; Syntactic sugar macros + +lb: MACRO ; r, hi, lo + ld \1, ((\2) & $ff) << 8 + ((\3) & $ff) +ENDM + +ldPal: MACRO + ld \1, \2 << 6 | \3 << 4 | \4 << 2 | \5 +ENDM + +; Design patterns + +dict: MACRO +IF \1 == 0 + and a +ELSE + cp \1 +ENDC + jp z, \2 +ENDM |
