fix lb/ln and "left shift of negative value" warning

fixes #511
This commit is contained in:
yenatch 2018-05-06 21:35:55 -04:00
parent a63d9dfd4f
commit 47379235f8

View File

@ -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