cscg22-gearboy

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

tim_common.s (526B)


      1        .include        "global.s"
      2
      3        .globl  .int, .add_int, .remove_int
      4
      5        .area   _HOME
      6
      7.add_TIM::
      8        LD      HL,#.int_0x50
      9        JP      .add_int
     10
     11_remove_TIM::
     12        PUSH    BC
     13        LDA     HL,4(SP)        ; Skip return address and registers
     14        LD      C,(HL)
     15        INC     HL
     16        LD      B,(HL)
     17        CALL    .remove_TIM
     18        POP     BC
     19        RET
     20
     21.remove_TIM::
     22        LD      HL,#.int_0x50
     23        JP      .remove_int
     24
     25        .area   _DATA
     26
     27.int_0x50::
     28        .blkw   0x08