cscg22-gearboy

CSCG 2022 Challenge 'Gearboy'
git clone https://git.sinitax.com/sinitax/cscg22-gearboy
Log | Files | Refs | sfeed.txt

set_t.s (710B)


      1        .include "global.s"
      2
      3        .globl  .set_xy_tt
      4
      5        .area   _HOME
      6
      7; void set_tiles(uint8_t x, uint8_t y, uint8_t w, uint8_t h, uint8_t *vram_addr, const uint8_t *tiles);
      8
      9_set_tiles::
     10        LDHL    SP, #5
     11        LD      A, (HL-)
     12        LD      E, A
     13        LD      A, (HL-)
     14        LD      D, A
     15        PUSH    DE
     16        LD      A, (HL-)
     17        LD      E, A
     18        LD      D, (HL)
     19        LDHL    SP, #11
     20        LD      A, (HL-)
     21        LD      B, A
     22        LD      A, (HL-)
     23        LD      C, A
     24        LD      A, (HL-)
     25        LD      L, (HL)
     26        LD      H, A
     27
     28        JP      .set_xy_tt      ;; Set background tile from (BC) at XY = DE, size WH on stack, to vram from address (HL)