cscg22-gearboy

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

set_wi_t.s (654B)


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