mirror of
https://gitlab.com/camelot/kickc.git
synced 2024-11-16 21:07:56 +00:00
87 lines
2.1 KiB
INI
87 lines
2.1 KiB
INI
@begin: scope:[] from
|
|
[0] phi()
|
|
to:@1
|
|
@1: scope:[] from @begin
|
|
[1] phi()
|
|
[2] call main
|
|
to:@end
|
|
@end: scope:[] from @1
|
|
[3] phi()
|
|
|
|
(void()) main()
|
|
main: scope:[main] from @1
|
|
asm { sei }
|
|
[5] *((const nomodify byte*) SPRITES_ENABLE) ← (byte) 1
|
|
[6] *((const nomodify byte*) SPRITES_YPOS) ← (byte) $64
|
|
[7] *((const nomodify byte*) SPRITES_XPOS) ← (byte) $64
|
|
[8] *((const nomodify byte*) SCREEN+(const nomodify word) SPRITE_PTRS) ← (byte)(const to_nomodify byte*) SPRITE/(byte) $40
|
|
[9] call saveZeropage
|
|
to:main::@1
|
|
main::@1: scope:[main] from main
|
|
[10] phi()
|
|
[11] call sinZeropage
|
|
to:main::@2
|
|
main::@2: scope:[main] from main::@1
|
|
[12] phi()
|
|
[13] call animSprite
|
|
to:main::@3
|
|
main::@3: scope:[main] from main::@2
|
|
[14] phi()
|
|
[15] call restoreZeropage
|
|
to:main::@return
|
|
main::@return: scope:[main] from main::@3
|
|
[16] return
|
|
to:@return
|
|
|
|
(void()) restoreZeropage()
|
|
restoreZeropage: scope:[restoreZeropage] from main::@3
|
|
asm { ldx#0 !: ldaZP_STORAGE,x sta$00,x inx bne!- }
|
|
to:restoreZeropage::@return
|
|
restoreZeropage::@return: scope:[restoreZeropage] from restoreZeropage
|
|
[18] return
|
|
to:@return
|
|
|
|
(void()) animSprite()
|
|
animSprite: scope:[animSprite] from main::@2
|
|
kickasm() {{ ldx #$00
|
|
repeat:
|
|
lda #$fe
|
|
!:
|
|
cmp $d012
|
|
bne !-
|
|
lda #$ff
|
|
!:
|
|
cmp $d012
|
|
bne !-
|
|
.break
|
|
lda $00,x
|
|
clc
|
|
adc #$38
|
|
sta $d000
|
|
lda #0
|
|
adc #0
|
|
sta $d010
|
|
inx
|
|
jmp repeat
|
|
}}
|
|
to:animSprite::@return
|
|
animSprite::@return: scope:[animSprite] from animSprite
|
|
[20] return
|
|
to:@return
|
|
|
|
(void()) sinZeropage()
|
|
sinZeropage: scope:[sinZeropage] from main::@1
|
|
asm { ldx#0 !: ldaSINTABLE,x sta$00,x inx bne!- }
|
|
to:sinZeropage::@return
|
|
sinZeropage::@return: scope:[sinZeropage] from sinZeropage
|
|
[22] return
|
|
to:@return
|
|
|
|
(void()) saveZeropage()
|
|
saveZeropage: scope:[saveZeropage] from main
|
|
asm { ldx#0 !: lda$00,x staZP_STORAGE,x inx bne!- }
|
|
to:saveZeropage::@return
|
|
saveZeropage::@return: scope:[saveZeropage] from saveZeropage
|
|
[24] return
|
|
to:@return
|