cscg22-gearboy

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

tim_nested.s (595B)


      1        .include        "global.s"
      2
      3        .globl  .int, .int_0x50
      4        .globl  .add_TIM
      5
      6        .area   _HEADER_NESTED_TIM (ABS)
      7
      8        .org    0x50            ; TIM
      9.int_TIM_nested:
     10        EI
     11        PUSH    AF
     12        PUSH    HL
     13        JP      .tim_isr_jump
     14
     15        .area   _HOME
     16
     17.tim_isr_jump:
     18        LD      HL, #.int_0x50
     19        JP      .int
     20
     21_add_low_priority_TIM::
     22        PUSH    BC
     23        LDA     HL, 4(SP)       ; Skip return address and registers
     24        LD      C, (HL)
     25        INC     HL
     26        LD      B,(HL)
     27        CALL    .add_TIM
     28        POP     BC
     29        RET