msx_set_tile_map.s (675B)
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