diff --git a/src/test/java/dk/camelot64/kickc/test/TestPrograms.java b/src/test/java/dk/camelot64/kickc/test/TestPrograms.java index a5fc6a61c..d0d1f2962 100644 --- a/src/test/java/dk/camelot64/kickc/test/TestPrograms.java +++ b/src/test/java/dk/camelot64/kickc/test/TestPrograms.java @@ -202,6 +202,12 @@ public class TestPrograms { compileAndCompare("examples/mega65/hello-mega65.c"); } + + @Test + public void testMega65Vic4() throws IOException, URISyntaxException { + compileAndCompare("examples/mega65/test-vic4.c"); + } + @Test public void testAtariXlRasterbars() throws IOException, URISyntaxException { compileAndCompare("examples/atarixl/rasterbars.c"); diff --git a/src/test/kc/examples/mega65/test-vic4.c b/src/test/kc/examples/mega65/test-vic4.c new file mode 100644 index 000000000..6a60e44b0 --- /dev/null +++ b/src/test/kc/examples/mega65/test-vic4.c @@ -0,0 +1,57 @@ +// Hello World for MEGA 65 - putting chars directly to the screen +#pragma target(mega65) +#pragma emulator("/Users/jespergravgaard/c64/mega65/xemu-hmw/build/bin/xmega65.native -prg") +#include + +char * const SCREEN = 0x0800; +char * const COLORS = 0xd800; + +char * const TBDRPOS = 0xd048; +char * const TBDRPOS_HI = 0xd049; + +void main() { + + // Map memory to BANK 0 : 0x00XXXX - giving access to I/O + asm { + sei + lda #0 + tax + tay + taz + map + eom + } + + // Enable the VIC 4 + *IO_KEY = 0x47; + *IO_KEY = 0x53; + + // Enable 2K Color RAM + *IO_BANK |= CRAM2K; + + // Fill the screen with '*' + for( char *sc = SCREEN; scBORDER_COLOR = 0xff; + VICII->BG_COLOR = 0x0b; + for(;;) { + while(VICII->RASTER!=0xfe) ; + while(VICII->RASTER!=0xff) ; + (*TBDRPOS)++; + } + */ + + // Loop forever + //for(;;) { + // VICII->BORDER_COLOR = VICII->RASTER; + //} + +} \ No newline at end of file diff --git a/src/test/ref/examples/mega65/test-vic4.asm b/src/test/ref/examples/mega65/test-vic4.asm new file mode 100644 index 000000000..114345657 --- /dev/null +++ b/src/test/ref/examples/mega65/test-vic4.asm @@ -0,0 +1,95 @@ +// Hello World for MEGA 65 - putting chars directly to the screen +.cpu _45gs02 + .file [name="test-vic4.prg", type="prg", segments="Program"] +.segmentdef Program [segments="Basic, Code, Data"] +.segmentdef Basic [start=$2001] +.segmentdef Code [start=$2017] +.segmentdef Data [startAfter="Code"] +.segment Basic +.byte $0a, $20, $0a, $00, $fe, $02, $20, $30, $00 // 10 BANK 0 +.byte $15, $20, $14, $00, $9e, $20 // 20 SYS +.text toIntString(main) // NNNN +.byte $00, $00, $00 // + // Map 2nd KB of colour RAM $DC00-$DFFF (hiding CIA's) + .const CRAM2K = 1 + // I/O Personality selection + .label IO_KEY = $d02f + // C65 Banking Register + .label IO_BANK = $d030 + .label SCREEN = $800 + .label COLORS = $d800 +.segment Code +main: { + .label sc = 2 + .label col = 4 + // asm + // Map memory to BANK 0 : 0x00XXXX - giving access to I/O + sei + lda #0 + tax + tay + taz + map + eom + // *IO_KEY = 0x47 + // Enable the VIC 4 + lda #$47 + sta IO_KEY + // *IO_KEY = 0x53 + lda #$53 + sta IO_KEY + // *IO_BANK |= CRAM2K + // Enable 2K Color RAM + lda #CRAM2K + ora IO_BANK + sta IO_BANK + lda #SCREEN + sta.z sc+1 + // Fill the screen with '*' + __b1: + // for( char *sc = SCREEN; scSCREEN+$7d0 + bcc __b2 + bne !+ + lda.z sc + cmp #COLORS + sta.z col+1 + // Fill the color memory + __b3: + // for( char *col = COLORS; colCOLORS+$7d0 + bcc __b4 + bne !+ + lda.z col + cmp #main::@1] + __b1_from_main: + // [4] phi (byte*) main::sc#2 = (const nomodify byte*) SCREEN [phi:main->main::@1#0] -- pbuz1=pbuc1 + lda #SCREEN + sta.z sc+1 + jmp __b1 + // Fill the screen with '*' + // main::@1 + __b1: + // [5] if((byte*) main::sc#2<(const nomodify byte*) SCREEN+(word) $7d0) goto main::@2 -- pbuz1_lt_pbuc1_then_la1 + lda.z sc+1 + cmp #>SCREEN+$7d0 + bcc __b2 + bne !+ + lda.z sc + cmp #main::@3] + __b3_from___b1: + // [6] phi (byte*) main::col#2 = (const nomodify byte*) COLORS [phi:main::@1->main::@3#0] -- pbuz1=pbuc1 + lda #COLORS + sta.z col+1 + jmp __b3 + // Fill the color memory + // main::@3 + __b3: + // [7] if((byte*) main::col#2<(const nomodify byte*) COLORS+(word) $7d0) goto main::@4 -- pbuz1_lt_pbuc1_then_la1 + lda.z col+1 + cmp #>COLORS+$7d0 + bcc __b4 + bne !+ + lda.z col + cmp #main::@3] + __b3_from___b4: + // [6] phi (byte*) main::col#2 = (byte*) main::col#1 [phi:main::@4->main::@3#0] -- register_copy + jmp __b3 + // main::@2 + __b2: + // [12] *((byte*) main::sc#2) ← (byte) '*' -- _deref_pbuz1=vbuc1 + lda #'*' + ldy #0 + sta (sc),y + // [13] (byte*) main::sc#1 ← ++ (byte*) main::sc#2 -- pbuz1=_inc_pbuz1 + inw.z sc + // [4] phi from main::@2 to main::@1 [phi:main::@2->main::@1] + __b1_from___b2: + // [4] phi (byte*) main::sc#2 = (byte*) main::sc#1 [phi:main::@2->main::@1#0] -- register_copy + jmp __b1 +} + // File Data + +REGISTER UPLIFT POTENTIAL REGISTERS +Statement asm { sei lda#0 tax tay taz map eom } always clobbers reg byte a reg byte x reg byte y reg byte z +Statement [1] *((const nomodify to_volatile byte*) IO_KEY) ← (byte) $47 [ ] ( [ ] { } ) always clobbers reg byte a +Statement [2] *((const nomodify to_volatile byte*) IO_KEY) ← (byte) $53 [ ] ( [ ] { } ) always clobbers reg byte a +Statement [3] *((const nomodify to_volatile byte*) IO_BANK) ← *((const nomodify to_volatile byte*) IO_BANK) | (const nomodify byte) CRAM2K [ ] ( [ ] { } ) always clobbers reg byte a +Statement [5] if((byte*) main::sc#2<(const nomodify byte*) SCREEN+(word) $7d0) goto main::@2 [ main::sc#2 ] ( [ main::sc#2 ] { } ) always clobbers reg byte a +Statement [7] if((byte*) main::col#2<(const nomodify byte*) COLORS+(word) $7d0) goto main::@4 [ main::col#2 ] ( [ main::col#2 ] { } ) always clobbers reg byte a +Statement [10] *((byte*) main::col#2) ← (byte~) main::$2 [ main::col#2 ] ( [ main::col#2 ] { } ) always clobbers reg byte y +Statement [12] *((byte*) main::sc#2) ← (byte) '*' [ main::sc#2 ] ( [ main::sc#2 ] { } ) always clobbers reg byte a reg byte y +Potential registers zp[2]:2 [ main::sc#2 main::sc#1 ] : zp[2]:2 , +Potential registers zp[2]:4 [ main::col#2 main::col#1 ] : zp[2]:4 , +Potential registers zp[1]:6 [ main::$2 ] : zp[1]:6 , reg byte a , reg byte x , reg byte y , reg byte z , + +REGISTER UPLIFT SCOPES +Uplift Scope [main] 36.67: zp[2]:2 [ main::sc#2 main::sc#1 ] 35.75: zp[2]:4 [ main::col#2 main::col#1 ] 22: zp[1]:6 [ main::$2 ] +Uplift Scope [MOS6526_CIA] +Uplift Scope [MOS6569_VICII] +Uplift Scope [MOS6581_SID] +Uplift Scope [] + +Uplifting [main] best 1050 combination zp[2]:2 [ main::sc#2 main::sc#1 ] zp[2]:4 [ main::col#2 main::col#1 ] reg byte a [ main::$2 ] +Uplifting [MOS6526_CIA] best 1050 combination +Uplifting [MOS6569_VICII] best 1050 combination +Uplifting [MOS6581_SID] best 1050 combination +Uplifting [] best 1050 combination + +ASSEMBLER BEFORE OPTIMIZATION + // File Comments +// Hello World for MEGA 65 - putting chars directly to the screen + // Upstart +.cpu _45gs02 + .file [name="test-vic4.prg", type="prg", segments="Program"] +.segmentdef Program [segments="Basic, Code, Data"] +.segmentdef Basic [start=$2001] +.segmentdef Code [start=$2017] +.segmentdef Data [startAfter="Code"] +.segment Basic +.byte $0a, $20, $0a, $00, $fe, $02, $20, $30, $00 // 10 BANK 0 +.byte $15, $20, $14, $00, $9e, $20 // 20 SYS +.text toIntString(main) // NNNN +.byte $00, $00, $00 // + // Global Constants & labels + // Map 2nd KB of colour RAM $DC00-$DFFF (hiding CIA's) + .const CRAM2K = 1 + // I/O Personality selection + .label IO_KEY = $d02f + // C65 Banking Register + .label IO_BANK = $d030 + .label SCREEN = $800 + .label COLORS = $d800 +.segment Code + // main +main: { + .label sc = 2 + .label col = 4 + // asm { sei lda#0 tax tay taz map eom } + // Map memory to BANK 0 : 0x00XXXX - giving access to I/O + sei + lda #0 + tax + tay + taz + map + eom + // [1] *((const nomodify to_volatile byte*) IO_KEY) ← (byte) $47 -- _deref_pbuc1=vbuc2 + // Enable the VIC 4 + lda #$47 + sta IO_KEY + // [2] *((const nomodify to_volatile byte*) IO_KEY) ← (byte) $53 -- _deref_pbuc1=vbuc2 + lda #$53 + sta IO_KEY + // [3] *((const nomodify to_volatile byte*) IO_BANK) ← *((const nomodify to_volatile byte*) IO_BANK) | (const nomodify byte) CRAM2K -- _deref_pbuc1=_deref_pbuc1_bor_vbuc2 + // Enable 2K Color RAM + lda #CRAM2K + ora IO_BANK + sta IO_BANK + // [4] phi from main to main::@1 [phi:main->main::@1] + __b1_from_main: + // [4] phi (byte*) main::sc#2 = (const nomodify byte*) SCREEN [phi:main->main::@1#0] -- pbuz1=pbuc1 + lda #SCREEN + sta.z sc+1 + jmp __b1 + // Fill the screen with '*' + // main::@1 + __b1: + // [5] if((byte*) main::sc#2<(const nomodify byte*) SCREEN+(word) $7d0) goto main::@2 -- pbuz1_lt_pbuc1_then_la1 + lda.z sc+1 + cmp #>SCREEN+$7d0 + bcc __b2 + bne !+ + lda.z sc + cmp #main::@3] + __b3_from___b1: + // [6] phi (byte*) main::col#2 = (const nomodify byte*) COLORS [phi:main::@1->main::@3#0] -- pbuz1=pbuc1 + lda #COLORS + sta.z col+1 + jmp __b3 + // Fill the color memory + // main::@3 + __b3: + // [7] if((byte*) main::col#2<(const nomodify byte*) COLORS+(word) $7d0) goto main::@4 -- pbuz1_lt_pbuc1_then_la1 + lda.z col+1 + cmp #>COLORS+$7d0 + bcc __b4 + bne !+ + lda.z col + cmp #main::@3] + __b3_from___b4: + // [6] phi (byte*) main::col#2 = (byte*) main::col#1 [phi:main::@4->main::@3#0] -- register_copy + jmp __b3 + // main::@2 + __b2: + // [12] *((byte*) main::sc#2) ← (byte) '*' -- _deref_pbuz1=vbuc1 + lda #'*' + ldy #0 + sta (sc),y + // [13] (byte*) main::sc#1 ← ++ (byte*) main::sc#2 -- pbuz1=_inc_pbuz1 + inw.z sc + // [4] phi from main::@2 to main::@1 [phi:main::@2->main::@1] + __b1_from___b2: + // [4] phi (byte*) main::sc#2 = (byte*) main::sc#1 [phi:main::@2->main::@1#0] -- register_copy + jmp __b1 +} + // File Data + +ASSEMBLER OPTIMIZATIONS +Removing instruction jmp __b1 +Removing instruction jmp __b3 +Removing instruction jmp __breturn +Succesful ASM optimization Pass5NextJumpElimination +Removing instruction __b1_from_main: +Removing instruction __b3_from___b1: +Removing instruction __breturn: +Removing instruction __b3_from___b4: +Removing instruction __b1_from___b2: +Succesful ASM optimization Pass5UnusedLabelElimination + +FINAL SYMBOL TABLE +(const nomodify byte*) COLORS = (byte*) 55296 +(const nomodify byte) CRAM2K = (byte) 1 +(const nomodify to_volatile byte*) IO_BANK = (byte*) 53296 +(const nomodify to_volatile byte*) IO_KEY = (byte*) 53295 +(byte) MOS6526_CIA::INTERRUPT +(byte) MOS6526_CIA::PORT_A +(byte) MOS6526_CIA::PORT_A_DDR +(byte) MOS6526_CIA::PORT_B +(byte) MOS6526_CIA::PORT_B_DDR +(byte) MOS6526_CIA::SERIAL_DATA +(word) MOS6526_CIA::TIMER_A +(byte) MOS6526_CIA::TIMER_A_CONTROL +(word) MOS6526_CIA::TIMER_B +(byte) MOS6526_CIA::TIMER_B_CONTROL +(byte) MOS6526_CIA::TOD_10THS +(byte) MOS6526_CIA::TOD_HOURS +(byte) MOS6526_CIA::TOD_MIN +(byte) MOS6526_CIA::TOD_SEC +(byte) MOS6569_VICII::BG_COLOR +(byte) MOS6569_VICII::BG_COLOR1 +(byte) MOS6569_VICII::BG_COLOR2 +(byte) MOS6569_VICII::BG_COLOR3 +(byte) MOS6569_VICII::BORDER_COLOR +(byte) MOS6569_VICII::CONTROL1 +(byte) MOS6569_VICII::CONTROL2 +(byte) MOS6569_VICII::IRQ_ENABLE +(byte) MOS6569_VICII::IRQ_STATUS +(byte) MOS6569_VICII::LIGHTPEN_X +(byte) MOS6569_VICII::LIGHTPEN_Y +(byte) MOS6569_VICII::MEMORY +(byte) MOS6569_VICII::RASTER +(byte) MOS6569_VICII::SPRITE0_COLOR +(byte) MOS6569_VICII::SPRITE0_X +(byte) MOS6569_VICII::SPRITE0_Y +(byte) MOS6569_VICII::SPRITE1_COLOR +(byte) MOS6569_VICII::SPRITE1_X +(byte) MOS6569_VICII::SPRITE1_Y +(byte) MOS6569_VICII::SPRITE2_COLOR +(byte) MOS6569_VICII::SPRITE2_X +(byte) MOS6569_VICII::SPRITE2_Y +(byte) MOS6569_VICII::SPRITE3_COLOR +(byte) MOS6569_VICII::SPRITE3_X +(byte) MOS6569_VICII::SPRITE3_Y +(byte) MOS6569_VICII::SPRITE4_COLOR +(byte) MOS6569_VICII::SPRITE4_X +(byte) MOS6569_VICII::SPRITE4_Y +(byte) MOS6569_VICII::SPRITE5_COLOR +(byte) MOS6569_VICII::SPRITE5_X +(byte) MOS6569_VICII::SPRITE5_Y +(byte) MOS6569_VICII::SPRITE6_COLOR +(byte) MOS6569_VICII::SPRITE6_X +(byte) MOS6569_VICII::SPRITE6_Y +(byte) MOS6569_VICII::SPRITE7_COLOR +(byte) MOS6569_VICII::SPRITE7_X +(byte) MOS6569_VICII::SPRITE7_Y +(byte) MOS6569_VICII::SPRITES_BG_COLLISION +(byte) MOS6569_VICII::SPRITES_COLLISION +(byte) MOS6569_VICII::SPRITES_ENABLE +(byte) MOS6569_VICII::SPRITES_EXPAND_X +(byte) MOS6569_VICII::SPRITES_EXPAND_Y +(byte) MOS6569_VICII::SPRITES_MC +(byte) MOS6569_VICII::SPRITES_MCOLOR1 +(byte) MOS6569_VICII::SPRITES_MCOLOR2 +(byte) MOS6569_VICII::SPRITES_PRIORITY +(byte) MOS6569_VICII::SPRITES_XMSB +(byte) MOS6581_SID::CH1_ATTACK_DECAY +(byte) MOS6581_SID::CH1_CONTROL +(word) MOS6581_SID::CH1_FREQ +(word) MOS6581_SID::CH1_PULSE_WIDTH +(byte) MOS6581_SID::CH1_SUSTAIN_RELEASE +(byte) MOS6581_SID::CH2_ATTACK_DECAY +(byte) MOS6581_SID::CH2_CONTROL +(word) MOS6581_SID::CH2_FREQ +(word) MOS6581_SID::CH2_PULSE_WIDTH +(byte) MOS6581_SID::CH2_SUSTAIN_RELEASE +(byte) MOS6581_SID::CH3_ATTACK_DECAY +(byte) MOS6581_SID::CH3_CONTROL +(byte) MOS6581_SID::CH3_ENV +(word) MOS6581_SID::CH3_FREQ +(byte) MOS6581_SID::CH3_OSC +(word) MOS6581_SID::CH3_PULSE_WIDTH +(byte) MOS6581_SID::CH3_SUSTAIN_RELEASE +(byte) MOS6581_SID::FILTER_CUTOFF_HIGH +(byte) MOS6581_SID::FILTER_CUTOFF_LOW +(byte) MOS6581_SID::FILTER_SETUP +(byte) MOS6581_SID::POT_X +(byte) MOS6581_SID::POT_Y +(byte) MOS6581_SID::VOLUME_FILTER_MODE +(const nomodify byte*) SCREEN = (byte*) 2048 +(void()) main() +(byte~) main::$2 reg byte a 22.0 +(label) main::@1 +(label) main::@2 +(label) main::@3 +(label) main::@4 +(label) main::@return +(byte*) main::col +(byte*) main::col#1 col zp[2]:4 22.0 +(byte*) main::col#2 col zp[2]:4 13.75 +(byte*) main::sc +(byte*) main::sc#1 sc zp[2]:2 22.0 +(byte*) main::sc#2 sc zp[2]:2 14.666666666666666 + +zp[2]:2 [ main::sc#2 main::sc#1 ] +zp[2]:4 [ main::col#2 main::col#1 ] +reg byte a [ main::$2 ] + + +FINAL ASSEMBLER +Score: 960 + + // File Comments +// Hello World for MEGA 65 - putting chars directly to the screen + // Upstart +.cpu _45gs02 + .file [name="test-vic4.prg", type="prg", segments="Program"] +.segmentdef Program [segments="Basic, Code, Data"] +.segmentdef Basic [start=$2001] +.segmentdef Code [start=$2017] +.segmentdef Data [startAfter="Code"] +.segment Basic +.byte $0a, $20, $0a, $00, $fe, $02, $20, $30, $00 // 10 BANK 0 +.byte $15, $20, $14, $00, $9e, $20 // 20 SYS +.text toIntString(main) // NNNN +.byte $00, $00, $00 // + // Global Constants & labels + // Map 2nd KB of colour RAM $DC00-$DFFF (hiding CIA's) + .const CRAM2K = 1 + // I/O Personality selection + .label IO_KEY = $d02f + // C65 Banking Register + .label IO_BANK = $d030 + .label SCREEN = $800 + .label COLORS = $d800 +.segment Code + // main +main: { + .label sc = 2 + .label col = 4 + // asm + // asm { sei lda#0 tax tay taz map eom } + // Map memory to BANK 0 : 0x00XXXX - giving access to I/O + sei + lda #0 + tax + tay + taz + map + eom + // *IO_KEY = 0x47 + // [1] *((const nomodify to_volatile byte*) IO_KEY) ← (byte) $47 -- _deref_pbuc1=vbuc2 + // Enable the VIC 4 + lda #$47 + sta IO_KEY + // *IO_KEY = 0x53 + // [2] *((const nomodify to_volatile byte*) IO_KEY) ← (byte) $53 -- _deref_pbuc1=vbuc2 + lda #$53 + sta IO_KEY + // *IO_BANK |= CRAM2K + // [3] *((const nomodify to_volatile byte*) IO_BANK) ← *((const nomodify to_volatile byte*) IO_BANK) | (const nomodify byte) CRAM2K -- _deref_pbuc1=_deref_pbuc1_bor_vbuc2 + // Enable 2K Color RAM + lda #CRAM2K + ora IO_BANK + sta IO_BANK + // [4] phi from main to main::@1 [phi:main->main::@1] + // [4] phi (byte*) main::sc#2 = (const nomodify byte*) SCREEN [phi:main->main::@1#0] -- pbuz1=pbuc1 + lda #SCREEN + sta.z sc+1 + // Fill the screen with '*' + // main::@1 + __b1: + // for( char *sc = SCREEN; scSCREEN+$7d0 + bcc __b2 + bne !+ + lda.z sc + cmp #main::@3] + // [6] phi (byte*) main::col#2 = (const nomodify byte*) COLORS [phi:main::@1->main::@3#0] -- pbuz1=pbuc1 + lda #COLORS + sta.z col+1 + // Fill the color memory + // main::@3 + __b3: + // for( char *col = COLORS; colCOLORS+$7d0 + bcc __b4 + bne !+ + lda.z col + cmp #main::@3] + // [6] phi (byte*) main::col#2 = (byte*) main::col#1 [phi:main::@4->main::@3#0] -- register_copy + jmp __b3 + // main::@2 + __b2: + // *sc = '*' + // [12] *((byte*) main::sc#2) ← (byte) '*' -- _deref_pbuz1=vbuc1 + lda #'*' + ldy #0 + sta (sc),y + // for( char *sc = SCREEN; scmain::@1] + // [4] phi (byte*) main::sc#2 = (byte*) main::sc#1 [phi:main::@2->main::@1#0] -- register_copy + jmp __b1 +} + // File Data + diff --git a/src/test/ref/examples/mega65/test-vic4.sym b/src/test/ref/examples/mega65/test-vic4.sym new file mode 100644 index 000000000..251705d1b --- /dev/null +++ b/src/test/ref/examples/mega65/test-vic4.sym @@ -0,0 +1,106 @@ +(const nomodify byte*) COLORS = (byte*) 55296 +(const nomodify byte) CRAM2K = (byte) 1 +(const nomodify to_volatile byte*) IO_BANK = (byte*) 53296 +(const nomodify to_volatile byte*) IO_KEY = (byte*) 53295 +(byte) MOS6526_CIA::INTERRUPT +(byte) MOS6526_CIA::PORT_A +(byte) MOS6526_CIA::PORT_A_DDR +(byte) MOS6526_CIA::PORT_B +(byte) MOS6526_CIA::PORT_B_DDR +(byte) MOS6526_CIA::SERIAL_DATA +(word) MOS6526_CIA::TIMER_A +(byte) MOS6526_CIA::TIMER_A_CONTROL +(word) MOS6526_CIA::TIMER_B +(byte) MOS6526_CIA::TIMER_B_CONTROL +(byte) MOS6526_CIA::TOD_10THS +(byte) MOS6526_CIA::TOD_HOURS +(byte) MOS6526_CIA::TOD_MIN +(byte) MOS6526_CIA::TOD_SEC +(byte) MOS6569_VICII::BG_COLOR +(byte) MOS6569_VICII::BG_COLOR1 +(byte) MOS6569_VICII::BG_COLOR2 +(byte) MOS6569_VICII::BG_COLOR3 +(byte) MOS6569_VICII::BORDER_COLOR +(byte) MOS6569_VICII::CONTROL1 +(byte) MOS6569_VICII::CONTROL2 +(byte) MOS6569_VICII::IRQ_ENABLE +(byte) MOS6569_VICII::IRQ_STATUS +(byte) MOS6569_VICII::LIGHTPEN_X +(byte) MOS6569_VICII::LIGHTPEN_Y +(byte) MOS6569_VICII::MEMORY +(byte) MOS6569_VICII::RASTER +(byte) MOS6569_VICII::SPRITE0_COLOR +(byte) MOS6569_VICII::SPRITE0_X +(byte) MOS6569_VICII::SPRITE0_Y +(byte) MOS6569_VICII::SPRITE1_COLOR +(byte) MOS6569_VICII::SPRITE1_X +(byte) MOS6569_VICII::SPRITE1_Y +(byte) MOS6569_VICII::SPRITE2_COLOR +(byte) MOS6569_VICII::SPRITE2_X +(byte) MOS6569_VICII::SPRITE2_Y +(byte) MOS6569_VICII::SPRITE3_COLOR +(byte) MOS6569_VICII::SPRITE3_X +(byte) MOS6569_VICII::SPRITE3_Y +(byte) MOS6569_VICII::SPRITE4_COLOR +(byte) MOS6569_VICII::SPRITE4_X +(byte) MOS6569_VICII::SPRITE4_Y +(byte) MOS6569_VICII::SPRITE5_COLOR +(byte) MOS6569_VICII::SPRITE5_X +(byte) MOS6569_VICII::SPRITE5_Y +(byte) MOS6569_VICII::SPRITE6_COLOR +(byte) MOS6569_VICII::SPRITE6_X +(byte) MOS6569_VICII::SPRITE6_Y +(byte) MOS6569_VICII::SPRITE7_COLOR +(byte) MOS6569_VICII::SPRITE7_X +(byte) MOS6569_VICII::SPRITE7_Y +(byte) MOS6569_VICII::SPRITES_BG_COLLISION +(byte) MOS6569_VICII::SPRITES_COLLISION +(byte) MOS6569_VICII::SPRITES_ENABLE +(byte) MOS6569_VICII::SPRITES_EXPAND_X +(byte) MOS6569_VICII::SPRITES_EXPAND_Y +(byte) MOS6569_VICII::SPRITES_MC +(byte) MOS6569_VICII::SPRITES_MCOLOR1 +(byte) MOS6569_VICII::SPRITES_MCOLOR2 +(byte) MOS6569_VICII::SPRITES_PRIORITY +(byte) MOS6569_VICII::SPRITES_XMSB +(byte) MOS6581_SID::CH1_ATTACK_DECAY +(byte) MOS6581_SID::CH1_CONTROL +(word) MOS6581_SID::CH1_FREQ +(word) MOS6581_SID::CH1_PULSE_WIDTH +(byte) MOS6581_SID::CH1_SUSTAIN_RELEASE +(byte) MOS6581_SID::CH2_ATTACK_DECAY +(byte) MOS6581_SID::CH2_CONTROL +(word) MOS6581_SID::CH2_FREQ +(word) MOS6581_SID::CH2_PULSE_WIDTH +(byte) MOS6581_SID::CH2_SUSTAIN_RELEASE +(byte) MOS6581_SID::CH3_ATTACK_DECAY +(byte) MOS6581_SID::CH3_CONTROL +(byte) MOS6581_SID::CH3_ENV +(word) MOS6581_SID::CH3_FREQ +(byte) MOS6581_SID::CH3_OSC +(word) MOS6581_SID::CH3_PULSE_WIDTH +(byte) MOS6581_SID::CH3_SUSTAIN_RELEASE +(byte) MOS6581_SID::FILTER_CUTOFF_HIGH +(byte) MOS6581_SID::FILTER_CUTOFF_LOW +(byte) MOS6581_SID::FILTER_SETUP +(byte) MOS6581_SID::POT_X +(byte) MOS6581_SID::POT_Y +(byte) MOS6581_SID::VOLUME_FILTER_MODE +(const nomodify byte*) SCREEN = (byte*) 2048 +(void()) main() +(byte~) main::$2 reg byte a 22.0 +(label) main::@1 +(label) main::@2 +(label) main::@3 +(label) main::@4 +(label) main::@return +(byte*) main::col +(byte*) main::col#1 col zp[2]:4 22.0 +(byte*) main::col#2 col zp[2]:4 13.75 +(byte*) main::sc +(byte*) main::sc#1 sc zp[2]:2 22.0 +(byte*) main::sc#2 sc zp[2]:2 14.666666666666666 + +zp[2]:2 [ main::sc#2 main::sc#1 ] +zp[2]:4 [ main::col#2 main::col#1 ] +reg byte a [ main::$2 ]