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