1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
.globl _ubox_get_tile RDVRM = 0x004a BG_TILE_MAP = 0x1800 _ubox_get_tile:: ld b, l ld c, a ld h, #0 add hl, hl add hl, hl add hl, hl add hl, hl add hl, hl add hl, bc ld bc, #BG_TILE_MAP add hl, bc jp RDVRM