summaryrefslogtreecommitdiff
path: root/macros/code.asm
diff options
context:
space:
mode:
authoryenatch <yenatch@gmail.com>2018-05-06 21:35:55 -0400
committeryenatch <yenatch@gmail.com>2018-05-06 21:35:55 -0400
commit47379235f875a3bd07b969ea554b82052191daf9 (patch)
tree04a495589ddbf1caf4d091a14c3d51c09f77ff6d /macros/code.asm
parenta63d9dfd4f4b214034c9a88a14b53635c10914d9 (diff)
fix lb/ln and "left shift of negative value" warning
fixes #511
Diffstat (limited to 'macros/code.asm')
-rw-r--r--macros/code.asm4
1 files changed, 2 insertions, 2 deletions
diff --git a/macros/code.asm b/macros/code.asm
index a02a33380..1fb651f30 100644
--- a/macros/code.asm
+++ b/macros/code.asm
@@ -1,11 +1,11 @@
; Syntactic sugar macros
lb: MACRO ; r, hi, lo
- ld \1, (\2 & $ff) << 8 + (\3 & $ff)
+ ld \1, (((\2) & $ff) << 8) | (((\3) & $ff))
ENDM
ln: MACRO ; r, hi, lo
- ld \1, (\2 & $f) << 4 + (\3 & $f)
+ ld \1, (((\2) & $f) << 4) | (((\3) & $f))
ENDM
ldpixel: MACRO