mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
Add test for HIGH() and LOW()
It compares the results of the operators with the expected result if doing the same thing manually. Signed-off-by: Antonio Niño Díaz <antonio_nd@outlook.com>
This commit is contained in:
22
test/link/high-low-a.asm
Normal file
22
test/link/high-low-a.asm
Normal file
@@ -0,0 +1,22 @@
|
||||
ldhilo : MACRO
|
||||
ld HIGH(\1),LOW(\2)
|
||||
ENDM
|
||||
|
||||
SECTION "r0", ROM0[$0]
|
||||
ld HIGH(af),a
|
||||
ld HIGH(bc),LOW(bc)
|
||||
ld LOW(bc),HIGH(bc)
|
||||
ld HIGH(de),LOW(de)
|
||||
ld LOW(de),HIGH(de)
|
||||
ldhilo hl, hl
|
||||
ld LOW(hl),HIGH(hl)
|
||||
|
||||
db HIGH(label+$AB)
|
||||
db LOW(label+$AB)
|
||||
|
||||
db HIGH($1234)
|
||||
db LOW($1234)
|
||||
|
||||
SECTION "o",OAM
|
||||
DS $10
|
||||
label:
|
||||
Reference in New Issue
Block a user