mirror of
https://gitlab.com/camelot/kickc.git
synced 2024-06-03 07:29:37 +00:00
34 lines
800 B
INI
34 lines
800 B
INI
|
|
__interrupt(rom_min_c64) void irq()
|
|
irq: scope:[irq] from
|
|
[0] *BG_COLOR = ++ *BG_COLOR
|
|
[1] *IRQ_STATUS = IRQ_RASTER
|
|
[2] if(*RASTER<$32+1) goto irq::@1
|
|
to:irq::@2
|
|
irq::@2: scope:[irq] from irq
|
|
[3] phi()
|
|
to:irq::@1
|
|
irq::@1: scope:[irq] from irq irq::@2
|
|
[4] *BG_COLOR = -- *BG_COLOR
|
|
to:irq::@return
|
|
irq::@return: scope:[irq] from irq::@1
|
|
[5] return
|
|
to:@return
|
|
|
|
void main()
|
|
main: scope:[main] from
|
|
asm { sei }
|
|
[7] *CIA1_INTERRUPT = CIA_INTERRUPT_CLEAR
|
|
[8] *VICII_CONTROL = *VICII_CONTROL & $7f
|
|
[9] *RASTER = $fd
|
|
[10] *IRQ_ENABLE = IRQ_RASTER
|
|
[11] *KERNEL_IRQ = &irq
|
|
asm { cli }
|
|
to:main::@1
|
|
main::@1: scope:[main] from main main::@1 main::@2
|
|
[13] if(*RASTER>=$14) goto main::@1
|
|
to:main::@2
|
|
main::@2: scope:[main] from main::@1
|
|
[14] phi()
|
|
to:main::@1
|