cscg22-gearboy

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

set_bk_t.s (611B)


      1        .include        "global.s"
      2
      3        .globl  .set_xy_btt
      4
      5        .area   _HOME
      6
      7_set_bkg_tiles::
      8        PUSH    BC
      9
     10        LDA     HL,4(SP)        ; Skip return address and registers
     11        LD      A,(HL+)         ; D = x
     12        LD      D, A
     13        LD      E,(HL)          ; E = y
     14        LDA     HL,9(SP)
     15        LD      A,(HL-)         ; BC = tiles
     16        LD      B, A
     17        LD      A,(HL-)
     18        LD      C, A
     19        LD      A,(HL-)         ; A = h
     20        LD      H,(HL)          ; H = w
     21        LD      L,A             ; L = h
     22
     23        CALL    .set_xy_btt
     24
     25        POP     BC
     26        RET