git.y1.nz

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_fill_rect.s

      1         .include        "global.s"
      2 
      3         .globl  .fill_rect_xy
      4 
      5         .area   _HOME
      6 
      7 ; void fill_rect(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::
      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         xor a
     16         FAST_MOD8 b #.VDP_MAP_HEIGHT
     17 
     18         ld b, d
     19         ld d, a
     20 
     21         ld a, c
     22         ld c, e
     23         ld e, a         ; BC = data, DE = YX
     24 
     25         jp .fill_rect_xy

This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.