gbdk-2020 | GameBoy Development Kit |
| download: https://git.y1.nz/archives/gbdk.tar.gz | |
| README | Files | Log | Refs | LICENSE |
gbdk-lib/libc/targets/z80/msxdos/msx_set_tile_map.s
1 .include "global.s"
2
3 .title "VRAM utilities"
4 .module VRAMUtils
5
6 .globl .set_tile_map_xy
7
8 .area _HOME
9
10 ; void set_tile_map(uint8_t x, uint8_t y, uint8_t w, uint8_t h, const uint8_t *tiles) __z88dk_callee __preserves_regs(iyh, iyl);
11 _set_tile_map::
12 pop hl ; HL = ret
13 pop bc ; BC = YX
14 pop de ; DE = WH
15 ex (sp), hl ; HL = data
16 ex de, hl ; HL = WH, DE = data
17
18 xor a
19 FAST_MOD8 b #.VDP_MAP_HEIGHT
20
21 ld b, d
22 ld d, a
23
24 ld a, c
25 ld c, e
26 ld e, a ; BC = data, DE = YX
27
28 jp .set_tile_map_xy
29
This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.