1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2024-10-21 17:24:39 +00:00
kickc/src/test/ref/c64dtv-blitter-box.log
2019-06-09 10:47:33 +02:00

1602 lines
78 KiB
Plaintext

Adding pointer type conversion cast (byte*) PROCPORT_DDR in (byte*) PROCPORT_DDR ← (number) 0
Adding pointer type conversion cast (byte*) PROCPORT in (byte*) PROCPORT ← (number) 1
Adding pointer type conversion cast (byte*) CHARGEN in (byte*) CHARGEN ← (number) $d000
Adding pointer type conversion cast (byte*) SPRITES_XPOS in (byte*) SPRITES_XPOS ← (number) $d000
Adding pointer type conversion cast (byte*) SPRITES_YPOS in (byte*) SPRITES_YPOS ← (number) $d001
Adding pointer type conversion cast (byte*) SPRITES_XMSB in (byte*) SPRITES_XMSB ← (number) $d010
Adding pointer type conversion cast (byte*) RASTER in (byte*) RASTER ← (number) $d012
Adding pointer type conversion cast (byte*) SPRITES_ENABLE in (byte*) SPRITES_ENABLE ← (number) $d015
Adding pointer type conversion cast (byte*) SPRITES_EXPAND_Y in (byte*) SPRITES_EXPAND_Y ← (number) $d017
Adding pointer type conversion cast (byte*) SPRITES_PRIORITY in (byte*) SPRITES_PRIORITY ← (number) $d01b
Adding pointer type conversion cast (byte*) SPRITES_MC in (byte*) SPRITES_MC ← (number) $d01c
Adding pointer type conversion cast (byte*) SPRITES_EXPAND_X in (byte*) SPRITES_EXPAND_X ← (number) $d01d
Adding pointer type conversion cast (byte*) BORDERCOL in (byte*) BORDERCOL ← (number) $d020
Adding pointer type conversion cast (byte*) BGCOL in (byte*) BGCOL ← (number) $d021
Adding pointer type conversion cast (byte*) BGCOL1 in (byte*) BGCOL1 ← (number) $d021
Adding pointer type conversion cast (byte*) BGCOL2 in (byte*) BGCOL2 ← (number) $d022
Adding pointer type conversion cast (byte*) BGCOL3 in (byte*) BGCOL3 ← (number) $d023
Adding pointer type conversion cast (byte*) BGCOL4 in (byte*) BGCOL4 ← (number) $d024
Adding pointer type conversion cast (byte*) SPRITES_MC1 in (byte*) SPRITES_MC1 ← (number) $d025
Adding pointer type conversion cast (byte*) SPRITES_MC2 in (byte*) SPRITES_MC2 ← (number) $d026
Adding pointer type conversion cast (byte*) SPRITES_COLS in (byte*) SPRITES_COLS ← (number) $d027
Adding pointer type conversion cast (byte*) VIC_CONTROL in (byte*) VIC_CONTROL ← (number) $d011
Adding pointer type conversion cast (byte*) D011 in (byte*) D011 ← (number) $d011
Adding pointer type conversion cast (byte*) VIC_CONTROL2 in (byte*) VIC_CONTROL2 ← (number) $d016
Adding pointer type conversion cast (byte*) D016 in (byte*) D016 ← (number) $d016
Adding pointer type conversion cast (byte*) D018 in (byte*) D018 ← (number) $d018
Adding pointer type conversion cast (byte*) VIC_MEMORY in (byte*) VIC_MEMORY ← (number) $d018
Adding pointer type conversion cast (byte*) LIGHTPEN_X in (byte*) LIGHTPEN_X ← (number) $d013
Adding pointer type conversion cast (byte*) LIGHTPEN_Y in (byte*) LIGHTPEN_Y ← (number) $d014
Adding pointer type conversion cast (byte*) IRQ_STATUS in (byte*) IRQ_STATUS ← (number) $d019
Adding pointer type conversion cast (byte*) IRQ_ENABLE in (byte*) IRQ_ENABLE ← (number) $d01a
Adding pointer type conversion cast (byte*) COLS in (byte*) COLS ← (number) $d800
Adding pointer type conversion cast (byte*) CIA1_PORT_A in (byte*) CIA1_PORT_A ← (number) $dc00
Adding pointer type conversion cast (byte*) CIA1_PORT_B in (byte*) CIA1_PORT_B ← (number) $dc01
Adding pointer type conversion cast (byte*) CIA1_PORT_A_DDR in (byte*) CIA1_PORT_A_DDR ← (number) $dc02
Adding pointer type conversion cast (byte*) CIA1_PORT_B_DDR in (byte*) CIA1_PORT_B_DDR ← (number) $dc03
Adding pointer type conversion cast (byte*) CIA1_INTERRUPT in (byte*) CIA1_INTERRUPT ← (number) $dc0d
Adding pointer type conversion cast (byte*) CIA2_PORT_A in (byte*) CIA2_PORT_A ← (number) $dd00
Adding pointer type conversion cast (byte*) CIA2_PORT_B in (byte*) CIA2_PORT_B ← (number) $dd01
Adding pointer type conversion cast (byte*) CIA2_PORT_A_DDR in (byte*) CIA2_PORT_A_DDR ← (number) $dd02
Adding pointer type conversion cast (byte*) CIA2_PORT_B_DDR in (byte*) CIA2_PORT_B_DDR ← (number) $dd03
Adding pointer type conversion cast (byte*) CIA2_INTERRUPT in (byte*) CIA2_INTERRUPT ← (number) $dd0d
Adding pointer type conversion cast (void()**) KERNEL_IRQ in (void()**) KERNEL_IRQ ← (number) $314
Adding pointer type conversion cast (void()**) HARDWARE_IRQ in (void()**) HARDWARE_IRQ ← (number) $fffe
Adding pointer type conversion cast (byte*) DTV_FEATURE in (byte*) DTV_FEATURE ← (number) $d03f
Adding pointer type conversion cast (byte*) DTV_CONTROL in (byte*) DTV_CONTROL ← (number) $d03c
Adding pointer type conversion cast (byte*) DTV_PALETTE in (byte*) DTV_PALETTE ← (number) $d200
Adding pointer type conversion cast (byte*) DTV_PLANEA_START_LO in (byte*) DTV_PLANEA_START_LO ← (number) $d03a
Adding pointer type conversion cast (byte*) DTV_PLANEA_START_MI in (byte*) DTV_PLANEA_START_MI ← (number) $d03b
Adding pointer type conversion cast (byte*) DTV_PLANEA_START_HI in (byte*) DTV_PLANEA_START_HI ← (number) $d045
Adding pointer type conversion cast (byte*) DTV_PLANEA_STEP in (byte*) DTV_PLANEA_STEP ← (number) $d046
Adding pointer type conversion cast (byte*) DTV_PLANEA_MODULO_LO in (byte*) DTV_PLANEA_MODULO_LO ← (number) $d038
Adding pointer type conversion cast (byte*) DTV_PLANEA_MODULO_HI in (byte*) DTV_PLANEA_MODULO_HI ← (number) $d039
Adding pointer type conversion cast (byte*) DTV_PLANEB_START_LO in (byte*) DTV_PLANEB_START_LO ← (number) $d049
Adding pointer type conversion cast (byte*) DTV_PLANEB_START_MI in (byte*) DTV_PLANEB_START_MI ← (number) $d04a
Adding pointer type conversion cast (byte*) DTV_PLANEB_START_HI in (byte*) DTV_PLANEB_START_HI ← (number) $d04b
Adding pointer type conversion cast (byte*) DTV_PLANEB_STEP in (byte*) DTV_PLANEB_STEP ← (number) $d04c
Adding pointer type conversion cast (byte*) DTV_PLANEB_MODULO_LO in (byte*) DTV_PLANEB_MODULO_LO ← (number) $d047
Adding pointer type conversion cast (byte*) DTV_PLANEB_MODULO_HI in (byte*) DTV_PLANEB_MODULO_HI ← (number) $d048
Adding pointer type conversion cast (byte*) DTV_SPRITE_BANK in (byte*) DTV_SPRITE_BANK ← (number) $d04d
Adding pointer type conversion cast (byte*) DTV_COLOR_BANK_LO in (byte*) DTV_COLOR_BANK_LO ← (number) $d036
Adding pointer type conversion cast (byte*) DTV_COLOR_BANK_HI in (byte*) DTV_COLOR_BANK_HI ← (number) $d037
Adding pointer type conversion cast (byte*) DTV_GRAPHICS_VIC_BANK in (byte*) DTV_GRAPHICS_VIC_BANK ← (number) $d03d
Adding pointer type conversion cast (byte*) DTV_GRAPHICS_HICOL_BANK in (byte*) DTV_GRAPHICS_HICOL_BANK ← (number) $d03e
Adding pointer type conversion cast (byte*) dtvSetCpuBankSegment1::cpuBank in (byte*) dtvSetCpuBankSegment1::cpuBank ← (number) $ff
Adding pointer type conversion cast (byte*) DTV_BLITTER_SRCA_LO in (byte*) DTV_BLITTER_SRCA_LO ← (number) $d320
Adding pointer type conversion cast (byte*) DTV_BLITTER_SRCA_MI in (byte*) DTV_BLITTER_SRCA_MI ← (number) $d321
Adding pointer type conversion cast (byte*) DTV_BLITTER_SRCA_HI in (byte*) DTV_BLITTER_SRCA_HI ← (number) $d322
Adding pointer type conversion cast (byte*) DTV_BLITTER_SRCA_MOD_LO in (byte*) DTV_BLITTER_SRCA_MOD_LO ← (number) $d323
Adding pointer type conversion cast (byte*) DTV_BLITTER_SRCA_MOD_HI in (byte*) DTV_BLITTER_SRCA_MOD_HI ← (number) $d324
Adding pointer type conversion cast (byte*) DTV_BLITTER_SRCA_LIN_LO in (byte*) DTV_BLITTER_SRCA_LIN_LO ← (number) $d325
Adding pointer type conversion cast (byte*) DTV_BLITTER_SRCA_LIN_HI in (byte*) DTV_BLITTER_SRCA_LIN_HI ← (number) $d326
Adding pointer type conversion cast (byte*) DTV_BLITTER_SRCA_STEP in (byte*) DTV_BLITTER_SRCA_STEP ← (number) $d327
Adding pointer type conversion cast (byte*) DTV_BLITTER_SRCB_LO in (byte*) DTV_BLITTER_SRCB_LO ← (number) $d328
Adding pointer type conversion cast (byte*) DTV_BLITTER_SRCB_MI in (byte*) DTV_BLITTER_SRCB_MI ← (number) $d329
Adding pointer type conversion cast (byte*) DTV_BLITTER_SRCB_HI in (byte*) DTV_BLITTER_SRCB_HI ← (number) $d32a
Adding pointer type conversion cast (byte*) DTV_BLITTER_SRCB_MOD_LO in (byte*) DTV_BLITTER_SRCB_MOD_LO ← (number) $d32b
Adding pointer type conversion cast (byte*) DTV_BLITTER_SRCB_MOD_HI in (byte*) DTV_BLITTER_SRCB_MOD_HI ← (number) $d32c
Adding pointer type conversion cast (byte*) DTV_BLITTER_SRCB_LIN_LO in (byte*) DTV_BLITTER_SRCB_LIN_LO ← (number) $d32d
Adding pointer type conversion cast (byte*) DTV_BLITTER_SRCB_LIN_HI in (byte*) DTV_BLITTER_SRCB_LIN_HI ← (number) $d32e
Adding pointer type conversion cast (byte*) DTV_BLITTER_SRCB_STEP in (byte*) DTV_BLITTER_SRCB_STEP ← (number) $d32f
Adding pointer type conversion cast (byte*) DTV_BLITTER_DEST_LO in (byte*) DTV_BLITTER_DEST_LO ← (number) $d330
Adding pointer type conversion cast (byte*) DTV_BLITTER_DEST_MI in (byte*) DTV_BLITTER_DEST_MI ← (number) $d331
Adding pointer type conversion cast (byte*) DTV_BLITTER_DEST_HI in (byte*) DTV_BLITTER_DEST_HI ← (number) $d332
Adding pointer type conversion cast (byte*) DTV_BLITTER_DEST_MOD_LO in (byte*) DTV_BLITTER_DEST_MOD_LO ← (number) $d333
Adding pointer type conversion cast (byte*) DTV_BLITTER_DEST_MOD_HI in (byte*) DTV_BLITTER_DEST_MOD_HI ← (number) $d334
Adding pointer type conversion cast (byte*) DTV_BLITTER_DEST_LIN_LO in (byte*) DTV_BLITTER_DEST_LIN_LO ← (number) $d335
Adding pointer type conversion cast (byte*) DTV_BLITTER_DEST_LIN_HI in (byte*) DTV_BLITTER_DEST_LIN_HI ← (number) $d336
Adding pointer type conversion cast (byte*) DTV_BLITTER_DEST_STEP in (byte*) DTV_BLITTER_DEST_STEP ← (number) $d337
Adding pointer type conversion cast (byte*) DTV_BLITTER_LEN_LO in (byte*) DTV_BLITTER_LEN_LO ← (number) $d338
Adding pointer type conversion cast (byte*) DTV_BLITTER_LEN_HI in (byte*) DTV_BLITTER_LEN_HI ← (number) $d339
Adding pointer type conversion cast (byte*) DTV_BLITTER_CONTROL in (byte*) DTV_BLITTER_CONTROL ← (number) $d33a
Adding pointer type conversion cast (byte*) DTV_BLITTER_TRANSPARANCY in (byte*) DTV_BLITTER_TRANSPARANCY ← (number) $d33b
Adding pointer type conversion cast (byte*) DTV_BLITTER_ALU in (byte*) DTV_BLITTER_ALU ← (number) $d33e
Adding pointer type conversion cast (byte*) DTV_BLITTER_CONTROL2 in (byte*) DTV_BLITTER_CONTROL2 ← (number) $d33f
Adding pointer type conversion cast (byte*) SCREEN in (byte*) SCREEN ← (number) $400
Identified constant variable (byte*) dtvSetCpuBankSegment1::cpuBank
Identified constant variable (byte*) DTV_BLITTER_ALU
Inlined call [105] (byte~) vicSelectGfxBank::$0 ← call toDd00 (byte*) vicSelectGfxBank::gfx
Culled Empty Block (label) @1
Culled Empty Block (label) @2
Culled Empty Block (label) @3
Culled Empty Block (label) main::@2
CONTROL FLOW GRAPH SSA
@begin: scope:[] from
to:@4
@4: scope:[] from @begin
(byte*) DTV_FEATURE#0 ← ((byte*)) (number) $d03f
(byte) DTV_FEATURE_ENABLE#0 ← (number) 1
to:@5
@5: scope:[] from @4
(byte*) DTV_BLITTER_SRCA_LO#0 ← ((byte*)) (number) $d320
(byte*) DTV_BLITTER_SRCA_MI#0 ← ((byte*)) (number) $d321
(byte*) DTV_BLITTER_SRCA_HI#0 ← ((byte*)) (number) $d322
(byte*) DTV_BLITTER_SRCA_MOD_LO#0 ← ((byte*)) (number) $d323
(byte*) DTV_BLITTER_SRCA_MOD_HI#0 ← ((byte*)) (number) $d324
(byte*) DTV_BLITTER_SRCA_LIN_LO#0 ← ((byte*)) (number) $d325
(byte*) DTV_BLITTER_SRCA_LIN_HI#0 ← ((byte*)) (number) $d326
(byte*) DTV_BLITTER_SRCA_STEP#0 ← ((byte*)) (number) $d327
(byte*) DTV_BLITTER_SRCB_LO#0 ← ((byte*)) (number) $d328
(byte*) DTV_BLITTER_SRCB_MI#0 ← ((byte*)) (number) $d329
(byte*) DTV_BLITTER_SRCB_HI#0 ← ((byte*)) (number) $d32a
(byte*) DTV_BLITTER_SRCB_MOD_LO#0 ← ((byte*)) (number) $d32b
(byte*) DTV_BLITTER_SRCB_MOD_HI#0 ← ((byte*)) (number) $d32c
(byte*) DTV_BLITTER_SRCB_LIN_LO#0 ← ((byte*)) (number) $d32d
(byte*) DTV_BLITTER_SRCB_LIN_HI#0 ← ((byte*)) (number) $d32e
(byte*) DTV_BLITTER_SRCB_STEP#0 ← ((byte*)) (number) $d32f
(byte*) DTV_BLITTER_DEST_LO#0 ← ((byte*)) (number) $d330
(byte*) DTV_BLITTER_DEST_MI#0 ← ((byte*)) (number) $d331
(byte*) DTV_BLITTER_DEST_HI#0 ← ((byte*)) (number) $d332
(byte*) DTV_BLITTER_DEST_MOD_LO#0 ← ((byte*)) (number) $d333
(byte*) DTV_BLITTER_DEST_MOD_HI#0 ← ((byte*)) (number) $d334
(byte*) DTV_BLITTER_DEST_LIN_LO#0 ← ((byte*)) (number) $d335
(byte*) DTV_BLITTER_DEST_LIN_HI#0 ← ((byte*)) (number) $d336
(byte*) DTV_BLITTER_DEST_STEP#0 ← ((byte*)) (number) $d337
(byte*) DTV_BLITTER_LEN_LO#0 ← ((byte*)) (number) $d338
(byte*) DTV_BLITTER_LEN_HI#0 ← ((byte*)) (number) $d339
(byte*) DTV_BLITTER_CONTROL#0 ← ((byte*)) (number) $d33a
(byte) DTV_BLIT_FORCE_START#0 ← (number) 1
(byte) DTV_BLIT_SRCA_FWD#0 ← (number) 2
(byte) DTV_BLIT_SRCB_FWD#0 ← (number) 4
(byte) DTV_BLIT_DEST_FWD#0 ← (number) 8
(byte*) DTV_BLITTER_TRANSPARANCY#0 ← ((byte*)) (number) $d33b
(byte) DTV_BLIT_TRANSPARANCY_NONE#0 ← (number) 0
(byte*) DTV_BLITTER_ALU#0 ← ((byte*)) (number) $d33e
(byte) DTV_BLIT_ADD#0 ← (number) $30
(byte*) DTV_BLITTER_CONTROL2#0 ← ((byte*)) (number) $d33f
(byte) DTV_BLIT_CLEAR_IRQ#0 ← (number) 1
(byte) DTV_BLIT_DEST_CONT#0 ← (number) 8
(byte) DTV_BLIT_STATUS_BUSY#0 ← (number) 1
(byte*) SCREEN#0 ← ((byte*)) (number) $400
(byte[]) SRCA#0 ← (const string) $0
(byte[]) SRCB#0 ← { (number) $80 }
to:@6
main: scope:[main] from @6
*((byte*) DTV_FEATURE#0) ← (byte) DTV_FEATURE_ENABLE#0
*((byte*) DTV_BLITTER_CONTROL2#0) ← (byte) DTV_BLIT_CLEAR_IRQ#0
(byte~) main::$0 ← < (byte[]) SRCA#0
*((byte*) DTV_BLITTER_SRCA_LO#0) ← (byte~) main::$0
(byte~) main::$1 ← > (byte[]) SRCA#0
*((byte*) DTV_BLITTER_SRCA_MI#0) ← (byte~) main::$1
*((byte*) DTV_BLITTER_SRCA_HI#0) ← (number) 0
*((byte*) DTV_BLITTER_SRCA_MOD_LO#0) ← (number) 0
*((byte*) DTV_BLITTER_SRCA_MOD_HI#0) ← (number) 0
(byte~) main::$2 ← < (word) $100
*((byte*) DTV_BLITTER_SRCA_LIN_LO#0) ← (byte~) main::$2
(byte~) main::$3 ← > (word) $100
*((byte*) DTV_BLITTER_SRCA_LIN_HI#0) ← (byte~) main::$3
*((byte*) DTV_BLITTER_SRCA_STEP#0) ← (number) 1
(byte~) main::$4 ← < (byte[]) SRCB#0
*((byte*) DTV_BLITTER_SRCB_LO#0) ← (byte~) main::$4
(byte~) main::$5 ← > (byte[]) SRCB#0
*((byte*) DTV_BLITTER_SRCB_MI#0) ← (byte~) main::$5
*((byte*) DTV_BLITTER_SRCB_HI#0) ← (number) 0
*((byte*) DTV_BLITTER_SRCB_MOD_LO#0) ← (number) 0
*((byte*) DTV_BLITTER_SRCB_MOD_HI#0) ← (number) 0
(byte~) main::$6 ← < (word) $100
*((byte*) DTV_BLITTER_SRCB_LIN_LO#0) ← (byte~) main::$6
(byte~) main::$7 ← > (word) $100
*((byte*) DTV_BLITTER_SRCB_LIN_HI#0) ← (byte~) main::$7
*((byte*) DTV_BLITTER_SRCB_STEP#0) ← (number) 0
(byte*~) main::$8 ← (byte*) SCREEN#0 + (number) $28
(byte*~) main::$9 ← (byte*~) main::$8 + (number) 5
(byte~) main::$10 ← < (byte*~) main::$9
*((byte*) DTV_BLITTER_DEST_LO#0) ← (byte~) main::$10
(byte*~) main::$11 ← (byte*) SCREEN#0 + (number) $28
(byte*~) main::$12 ← (byte*~) main::$11 + (number) 5
(byte~) main::$13 ← > (byte*~) main::$12
*((byte*) DTV_BLITTER_DEST_MI#0) ← (byte~) main::$13
*((byte*) DTV_BLITTER_DEST_HI#0) ← (number) 0
(byte~) main::$14 ← < (word) $15
*((byte*) DTV_BLITTER_DEST_MOD_LO#0) ← (byte~) main::$14
(byte~) main::$15 ← > (word) $15
*((byte*) DTV_BLITTER_DEST_MOD_HI#0) ← (byte~) main::$15
(byte~) main::$16 ← < (word) $13
*((byte*) DTV_BLITTER_DEST_LIN_LO#0) ← (byte~) main::$16
(byte~) main::$17 ← > (word) $13
*((byte*) DTV_BLITTER_DEST_LIN_HI#0) ← (byte~) main::$17
*((byte*) DTV_BLITTER_DEST_STEP#0) ← (number) $10
(number~) main::$18 ← (number) $14 * (word) $a
(number~) main::$19 ← < (number~) main::$18
*((byte*) DTV_BLITTER_LEN_LO#0) ← (number~) main::$19
(number~) main::$20 ← (number) $14 * (word) $a
(number~) main::$21 ← > (number~) main::$20
*((byte*) DTV_BLITTER_LEN_HI#0) ← (number~) main::$21
*((byte*) DTV_BLITTER_ALU#0) ← (byte) DTV_BLIT_ADD#0
*((byte*) DTV_BLITTER_TRANSPARANCY#0) ← (byte) DTV_BLIT_TRANSPARANCY_NONE#0
(byte~) main::$22 ← (byte) DTV_BLIT_FORCE_START#0 | (byte) DTV_BLIT_SRCA_FWD#0
(byte~) main::$23 ← (byte~) main::$22 | (byte) DTV_BLIT_SRCB_FWD#0
(byte~) main::$24 ← (byte~) main::$23 | (byte) DTV_BLIT_DEST_FWD#0
*((byte*) DTV_BLITTER_CONTROL#0) ← (byte~) main::$24
*((byte*) DTV_BLITTER_CONTROL2#0) ← (byte) DTV_BLIT_DEST_CONT#0
to:main::@1
main::@1: scope:[main] from main main::@1
(byte~) main::$25 ← *((byte*) DTV_BLITTER_CONTROL2#0) & (byte) DTV_BLIT_STATUS_BUSY#0
(bool~) main::$26 ← (byte~) main::$25 != (number) 0
if((bool~) main::$26) goto main::@1
to:main::@return
main::@return: scope:[main] from main::@1
return
to:@return
@6: scope:[] from @5
call main
to:@7
@7: scope:[] from @6
to:@end
@end: scope:[] from @7
SYMBOL TABLE SSA
(const string) $0 = (string) "camelot rules!@"
(label) @4
(label) @5
(label) @6
(label) @7
(label) @begin
(label) @end
(byte*) DTV_BLITTER_ALU
(byte*) DTV_BLITTER_ALU#0
(byte*) DTV_BLITTER_CONTROL
(byte*) DTV_BLITTER_CONTROL#0
(byte*) DTV_BLITTER_CONTROL2
(byte*) DTV_BLITTER_CONTROL2#0
(byte*) DTV_BLITTER_DEST_HI
(byte*) DTV_BLITTER_DEST_HI#0
(byte*) DTV_BLITTER_DEST_LIN_HI
(byte*) DTV_BLITTER_DEST_LIN_HI#0
(byte*) DTV_BLITTER_DEST_LIN_LO
(byte*) DTV_BLITTER_DEST_LIN_LO#0
(byte*) DTV_BLITTER_DEST_LO
(byte*) DTV_BLITTER_DEST_LO#0
(byte*) DTV_BLITTER_DEST_MI
(byte*) DTV_BLITTER_DEST_MI#0
(byte*) DTV_BLITTER_DEST_MOD_HI
(byte*) DTV_BLITTER_DEST_MOD_HI#0
(byte*) DTV_BLITTER_DEST_MOD_LO
(byte*) DTV_BLITTER_DEST_MOD_LO#0
(byte*) DTV_BLITTER_DEST_STEP
(byte*) DTV_BLITTER_DEST_STEP#0
(byte*) DTV_BLITTER_LEN_HI
(byte*) DTV_BLITTER_LEN_HI#0
(byte*) DTV_BLITTER_LEN_LO
(byte*) DTV_BLITTER_LEN_LO#0
(byte*) DTV_BLITTER_SRCA_HI
(byte*) DTV_BLITTER_SRCA_HI#0
(byte*) DTV_BLITTER_SRCA_LIN_HI
(byte*) DTV_BLITTER_SRCA_LIN_HI#0
(byte*) DTV_BLITTER_SRCA_LIN_LO
(byte*) DTV_BLITTER_SRCA_LIN_LO#0
(byte*) DTV_BLITTER_SRCA_LO
(byte*) DTV_BLITTER_SRCA_LO#0
(byte*) DTV_BLITTER_SRCA_MI
(byte*) DTV_BLITTER_SRCA_MI#0
(byte*) DTV_BLITTER_SRCA_MOD_HI
(byte*) DTV_BLITTER_SRCA_MOD_HI#0
(byte*) DTV_BLITTER_SRCA_MOD_LO
(byte*) DTV_BLITTER_SRCA_MOD_LO#0
(byte*) DTV_BLITTER_SRCA_STEP
(byte*) DTV_BLITTER_SRCA_STEP#0
(byte*) DTV_BLITTER_SRCB_HI
(byte*) DTV_BLITTER_SRCB_HI#0
(byte*) DTV_BLITTER_SRCB_LIN_HI
(byte*) DTV_BLITTER_SRCB_LIN_HI#0
(byte*) DTV_BLITTER_SRCB_LIN_LO
(byte*) DTV_BLITTER_SRCB_LIN_LO#0
(byte*) DTV_BLITTER_SRCB_LO
(byte*) DTV_BLITTER_SRCB_LO#0
(byte*) DTV_BLITTER_SRCB_MI
(byte*) DTV_BLITTER_SRCB_MI#0
(byte*) DTV_BLITTER_SRCB_MOD_HI
(byte*) DTV_BLITTER_SRCB_MOD_HI#0
(byte*) DTV_BLITTER_SRCB_MOD_LO
(byte*) DTV_BLITTER_SRCB_MOD_LO#0
(byte*) DTV_BLITTER_SRCB_STEP
(byte*) DTV_BLITTER_SRCB_STEP#0
(byte*) DTV_BLITTER_TRANSPARANCY
(byte*) DTV_BLITTER_TRANSPARANCY#0
(byte) DTV_BLIT_ADD
(byte) DTV_BLIT_ADD#0
(byte) DTV_BLIT_CLEAR_IRQ
(byte) DTV_BLIT_CLEAR_IRQ#0
(byte) DTV_BLIT_DEST_CONT
(byte) DTV_BLIT_DEST_CONT#0
(byte) DTV_BLIT_DEST_FWD
(byte) DTV_BLIT_DEST_FWD#0
(byte) DTV_BLIT_FORCE_START
(byte) DTV_BLIT_FORCE_START#0
(byte) DTV_BLIT_SRCA_FWD
(byte) DTV_BLIT_SRCA_FWD#0
(byte) DTV_BLIT_SRCB_FWD
(byte) DTV_BLIT_SRCB_FWD#0
(byte) DTV_BLIT_STATUS_BUSY
(byte) DTV_BLIT_STATUS_BUSY#0
(byte) DTV_BLIT_TRANSPARANCY_NONE
(byte) DTV_BLIT_TRANSPARANCY_NONE#0
(byte*) DTV_FEATURE
(byte*) DTV_FEATURE#0
(byte) DTV_FEATURE_ENABLE
(byte) DTV_FEATURE_ENABLE#0
(byte*) SCREEN
(byte*) SCREEN#0
(byte[]) SRCA
(byte[]) SRCA#0
(byte[]) SRCB
(byte[]) SRCB#0
(void()) main()
(byte~) main::$0
(byte~) main::$1
(byte~) main::$10
(byte*~) main::$11
(byte*~) main::$12
(byte~) main::$13
(byte~) main::$14
(byte~) main::$15
(byte~) main::$16
(byte~) main::$17
(number~) main::$18
(number~) main::$19
(byte~) main::$2
(number~) main::$20
(number~) main::$21
(byte~) main::$22
(byte~) main::$23
(byte~) main::$24
(byte~) main::$25
(bool~) main::$26
(byte~) main::$3
(byte~) main::$4
(byte~) main::$5
(byte~) main::$6
(byte~) main::$7
(byte*~) main::$8
(byte*~) main::$9
(label) main::@1
(label) main::@return
Adding number conversion cast (unumber) 1 in (byte) DTV_FEATURE_ENABLE#0 ← (number) 1
Adding number conversion cast (unumber) 1 in (byte) DTV_BLIT_FORCE_START#0 ← (number) 1
Adding number conversion cast (unumber) 2 in (byte) DTV_BLIT_SRCA_FWD#0 ← (number) 2
Adding number conversion cast (unumber) 4 in (byte) DTV_BLIT_SRCB_FWD#0 ← (number) 4
Adding number conversion cast (unumber) 8 in (byte) DTV_BLIT_DEST_FWD#0 ← (number) 8
Adding number conversion cast (unumber) 0 in (byte) DTV_BLIT_TRANSPARANCY_NONE#0 ← (number) 0
Adding number conversion cast (unumber) $30 in (byte) DTV_BLIT_ADD#0 ← (number) $30
Adding number conversion cast (unumber) 1 in (byte) DTV_BLIT_CLEAR_IRQ#0 ← (number) 1
Adding number conversion cast (unumber) 8 in (byte) DTV_BLIT_DEST_CONT#0 ← (number) 8
Adding number conversion cast (unumber) 1 in (byte) DTV_BLIT_STATUS_BUSY#0 ← (number) 1
Adding number conversion cast (unumber) 0 in *((byte*) DTV_BLITTER_SRCA_HI#0) ← (number) 0
Adding number conversion cast (unumber) 0 in *((byte*) DTV_BLITTER_SRCA_MOD_LO#0) ← (number) 0
Adding number conversion cast (unumber) 0 in *((byte*) DTV_BLITTER_SRCA_MOD_HI#0) ← (number) 0
Adding number conversion cast (unumber) 1 in *((byte*) DTV_BLITTER_SRCA_STEP#0) ← (number) 1
Adding number conversion cast (unumber) 0 in *((byte*) DTV_BLITTER_SRCB_HI#0) ← (number) 0
Adding number conversion cast (unumber) 0 in *((byte*) DTV_BLITTER_SRCB_MOD_LO#0) ← (number) 0
Adding number conversion cast (unumber) 0 in *((byte*) DTV_BLITTER_SRCB_MOD_HI#0) ← (number) 0
Adding number conversion cast (unumber) 0 in *((byte*) DTV_BLITTER_SRCB_STEP#0) ← (number) 0
Adding number conversion cast (unumber) $28 in (byte*~) main::$8 ← (byte*) SCREEN#0 + (number) $28
Adding number conversion cast (unumber) 5 in (byte*~) main::$9 ← (byte*~) main::$8 + (number) 5
Adding number conversion cast (unumber) $28 in (byte*~) main::$11 ← (byte*) SCREEN#0 + (number) $28
Adding number conversion cast (unumber) 5 in (byte*~) main::$12 ← (byte*~) main::$11 + (number) 5
Adding number conversion cast (unumber) 0 in *((byte*) DTV_BLITTER_DEST_HI#0) ← (number) 0
Adding number conversion cast (unumber) $10 in *((byte*) DTV_BLITTER_DEST_STEP#0) ← (number) $10
Adding number conversion cast (unumber) $14 in (number~) main::$18 ← (number) $14 * (word) $a
Adding number conversion cast (unumber) main::$18 in (number~) main::$18 ← (unumber)(number) $14 * (word) $a
Adding number conversion cast (unumber) main::$19 in (number~) main::$19 ← < (unumber~) main::$18
Adding number conversion cast (unumber) $14 in (number~) main::$20 ← (number) $14 * (word) $a
Adding number conversion cast (unumber) main::$20 in (number~) main::$20 ← (unumber)(number) $14 * (word) $a
Adding number conversion cast (unumber) main::$21 in (number~) main::$21 ← > (unumber~) main::$20
Adding number conversion cast (unumber) 0 in (bool~) main::$26 ← (byte~) main::$25 != (number) 0
Successful SSA optimization PassNAddNumberTypeConversions
Adding number conversion cast (byte) to elements in (byte[]) SRCB#0 ← { (byte)(number) $80 }
Successful SSA optimization PassNAddArrayNumberTypeConversions
Inlining cast (byte*) DTV_FEATURE#0 ← (byte*)(number) $d03f
Inlining cast (byte) DTV_FEATURE_ENABLE#0 ← (unumber)(number) 1
Inlining cast (byte*) DTV_BLITTER_SRCA_LO#0 ← (byte*)(number) $d320
Inlining cast (byte*) DTV_BLITTER_SRCA_MI#0 ← (byte*)(number) $d321
Inlining cast (byte*) DTV_BLITTER_SRCA_HI#0 ← (byte*)(number) $d322
Inlining cast (byte*) DTV_BLITTER_SRCA_MOD_LO#0 ← (byte*)(number) $d323
Inlining cast (byte*) DTV_BLITTER_SRCA_MOD_HI#0 ← (byte*)(number) $d324
Inlining cast (byte*) DTV_BLITTER_SRCA_LIN_LO#0 ← (byte*)(number) $d325
Inlining cast (byte*) DTV_BLITTER_SRCA_LIN_HI#0 ← (byte*)(number) $d326
Inlining cast (byte*) DTV_BLITTER_SRCA_STEP#0 ← (byte*)(number) $d327
Inlining cast (byte*) DTV_BLITTER_SRCB_LO#0 ← (byte*)(number) $d328
Inlining cast (byte*) DTV_BLITTER_SRCB_MI#0 ← (byte*)(number) $d329
Inlining cast (byte*) DTV_BLITTER_SRCB_HI#0 ← (byte*)(number) $d32a
Inlining cast (byte*) DTV_BLITTER_SRCB_MOD_LO#0 ← (byte*)(number) $d32b
Inlining cast (byte*) DTV_BLITTER_SRCB_MOD_HI#0 ← (byte*)(number) $d32c
Inlining cast (byte*) DTV_BLITTER_SRCB_LIN_LO#0 ← (byte*)(number) $d32d
Inlining cast (byte*) DTV_BLITTER_SRCB_LIN_HI#0 ← (byte*)(number) $d32e
Inlining cast (byte*) DTV_BLITTER_SRCB_STEP#0 ← (byte*)(number) $d32f
Inlining cast (byte*) DTV_BLITTER_DEST_LO#0 ← (byte*)(number) $d330
Inlining cast (byte*) DTV_BLITTER_DEST_MI#0 ← (byte*)(number) $d331
Inlining cast (byte*) DTV_BLITTER_DEST_HI#0 ← (byte*)(number) $d332
Inlining cast (byte*) DTV_BLITTER_DEST_MOD_LO#0 ← (byte*)(number) $d333
Inlining cast (byte*) DTV_BLITTER_DEST_MOD_HI#0 ← (byte*)(number) $d334
Inlining cast (byte*) DTV_BLITTER_DEST_LIN_LO#0 ← (byte*)(number) $d335
Inlining cast (byte*) DTV_BLITTER_DEST_LIN_HI#0 ← (byte*)(number) $d336
Inlining cast (byte*) DTV_BLITTER_DEST_STEP#0 ← (byte*)(number) $d337
Inlining cast (byte*) DTV_BLITTER_LEN_LO#0 ← (byte*)(number) $d338
Inlining cast (byte*) DTV_BLITTER_LEN_HI#0 ← (byte*)(number) $d339
Inlining cast (byte*) DTV_BLITTER_CONTROL#0 ← (byte*)(number) $d33a
Inlining cast (byte) DTV_BLIT_FORCE_START#0 ← (unumber)(number) 1
Inlining cast (byte) DTV_BLIT_SRCA_FWD#0 ← (unumber)(number) 2
Inlining cast (byte) DTV_BLIT_SRCB_FWD#0 ← (unumber)(number) 4
Inlining cast (byte) DTV_BLIT_DEST_FWD#0 ← (unumber)(number) 8
Inlining cast (byte*) DTV_BLITTER_TRANSPARANCY#0 ← (byte*)(number) $d33b
Inlining cast (byte) DTV_BLIT_TRANSPARANCY_NONE#0 ← (unumber)(number) 0
Inlining cast (byte*) DTV_BLITTER_ALU#0 ← (byte*)(number) $d33e
Inlining cast (byte) DTV_BLIT_ADD#0 ← (unumber)(number) $30
Inlining cast (byte*) DTV_BLITTER_CONTROL2#0 ← (byte*)(number) $d33f
Inlining cast (byte) DTV_BLIT_CLEAR_IRQ#0 ← (unumber)(number) 1
Inlining cast (byte) DTV_BLIT_DEST_CONT#0 ← (unumber)(number) 8
Inlining cast (byte) DTV_BLIT_STATUS_BUSY#0 ← (unumber)(number) 1
Inlining cast (byte*) SCREEN#0 ← (byte*)(number) $400
Inlining cast *((byte*) DTV_BLITTER_SRCA_HI#0) ← (unumber)(number) 0
Inlining cast *((byte*) DTV_BLITTER_SRCA_MOD_LO#0) ← (unumber)(number) 0
Inlining cast *((byte*) DTV_BLITTER_SRCA_MOD_HI#0) ← (unumber)(number) 0
Inlining cast *((byte*) DTV_BLITTER_SRCA_STEP#0) ← (unumber)(number) 1
Inlining cast *((byte*) DTV_BLITTER_SRCB_HI#0) ← (unumber)(number) 0
Inlining cast *((byte*) DTV_BLITTER_SRCB_MOD_LO#0) ← (unumber)(number) 0
Inlining cast *((byte*) DTV_BLITTER_SRCB_MOD_HI#0) ← (unumber)(number) 0
Inlining cast *((byte*) DTV_BLITTER_SRCB_STEP#0) ← (unumber)(number) 0
Inlining cast *((byte*) DTV_BLITTER_DEST_HI#0) ← (unumber)(number) 0
Inlining cast *((byte*) DTV_BLITTER_DEST_STEP#0) ← (unumber)(number) $10
Successful SSA optimization Pass2InlineCast
Simplifying constant pointer cast (byte*) 53311
Simplifying constant integer cast 1
Simplifying constant pointer cast (byte*) 54048
Simplifying constant pointer cast (byte*) 54049
Simplifying constant pointer cast (byte*) 54050
Simplifying constant pointer cast (byte*) 54051
Simplifying constant pointer cast (byte*) 54052
Simplifying constant pointer cast (byte*) 54053
Simplifying constant pointer cast (byte*) 54054
Simplifying constant pointer cast (byte*) 54055
Simplifying constant pointer cast (byte*) 54056
Simplifying constant pointer cast (byte*) 54057
Simplifying constant pointer cast (byte*) 54058
Simplifying constant pointer cast (byte*) 54059
Simplifying constant pointer cast (byte*) 54060
Simplifying constant pointer cast (byte*) 54061
Simplifying constant pointer cast (byte*) 54062
Simplifying constant pointer cast (byte*) 54063
Simplifying constant pointer cast (byte*) 54064
Simplifying constant pointer cast (byte*) 54065
Simplifying constant pointer cast (byte*) 54066
Simplifying constant pointer cast (byte*) 54067
Simplifying constant pointer cast (byte*) 54068
Simplifying constant pointer cast (byte*) 54069
Simplifying constant pointer cast (byte*) 54070
Simplifying constant pointer cast (byte*) 54071
Simplifying constant pointer cast (byte*) 54072
Simplifying constant pointer cast (byte*) 54073
Simplifying constant pointer cast (byte*) 54074
Simplifying constant integer cast 1
Simplifying constant integer cast 2
Simplifying constant integer cast 4
Simplifying constant integer cast 8
Simplifying constant pointer cast (byte*) 54075
Simplifying constant integer cast 0
Simplifying constant pointer cast (byte*) 54078
Simplifying constant integer cast $30
Simplifying constant pointer cast (byte*) 54079
Simplifying constant integer cast 1
Simplifying constant integer cast 8
Simplifying constant integer cast 1
Simplifying constant pointer cast (byte*) 1024
Simplifying constant integer cast $80
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 1
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast $28
Simplifying constant integer cast 5
Simplifying constant integer cast $28
Simplifying constant integer cast 5
Simplifying constant integer cast 0
Simplifying constant integer cast $10
Simplifying constant integer cast $14
Simplifying constant integer cast $14
Simplifying constant integer cast 0
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 2
Finalized unsigned number type (byte) 4
Finalized unsigned number type (byte) 8
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) $30
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 8
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) $28
Finalized unsigned number type (byte) 5
Finalized unsigned number type (byte) $28
Finalized unsigned number type (byte) 5
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) $10
Finalized unsigned number type (byte) $14
Finalized unsigned number type (byte) $14
Finalized unsigned number type (byte) 0
Successful SSA optimization PassNFinalizeNumberTypeConversions
Inferred type updated to word in (unumber~) main::$18 ← (byte) $14 * (word) $a
Inferred type updated to byte in (unumber~) main::$19 ← < (word~) main::$18
Inferred type updated to word in (unumber~) main::$20 ← (byte) $14 * (word) $a
Inferred type updated to byte in (unumber~) main::$21 ← > (word~) main::$20
Simple Condition (bool~) main::$26 [103] if((byte~) main::$25!=(byte) 0) goto main::@1
Successful SSA optimization Pass2ConditionalJumpSimplification
Constant right-side identified [43] (byte[]) SRCB#0 ← { (byte) $80 }
Constant right-side identified [53] (byte~) main::$2 ← < (word) $100
Constant right-side identified [55] (byte~) main::$3 ← > (word) $100
Constant right-side identified [65] (byte~) main::$6 ← < (word) $100
Constant right-side identified [67] (byte~) main::$7 ← > (word) $100
Constant right-side identified [79] (byte~) main::$14 ← < (word) $15
Constant right-side identified [81] (byte~) main::$15 ← > (word) $15
Constant right-side identified [83] (byte~) main::$16 ← < (word) $13
Constant right-side identified [85] (byte~) main::$17 ← > (word) $13
Constant right-side identified [88] (word~) main::$18 ← (byte) $14 * (word) $a
Constant right-side identified [91] (word~) main::$20 ← (byte) $14 * (word) $a
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte*) DTV_FEATURE#0 = (byte*) 53311
Constant (const byte) DTV_FEATURE_ENABLE#0 = 1
Constant (const byte*) DTV_BLITTER_SRCA_LO#0 = (byte*) 54048
Constant (const byte*) DTV_BLITTER_SRCA_MI#0 = (byte*) 54049
Constant (const byte*) DTV_BLITTER_SRCA_HI#0 = (byte*) 54050
Constant (const byte*) DTV_BLITTER_SRCA_MOD_LO#0 = (byte*) 54051
Constant (const byte*) DTV_BLITTER_SRCA_MOD_HI#0 = (byte*) 54052
Constant (const byte*) DTV_BLITTER_SRCA_LIN_LO#0 = (byte*) 54053
Constant (const byte*) DTV_BLITTER_SRCA_LIN_HI#0 = (byte*) 54054
Constant (const byte*) DTV_BLITTER_SRCA_STEP#0 = (byte*) 54055
Constant (const byte*) DTV_BLITTER_SRCB_LO#0 = (byte*) 54056
Constant (const byte*) DTV_BLITTER_SRCB_MI#0 = (byte*) 54057
Constant (const byte*) DTV_BLITTER_SRCB_HI#0 = (byte*) 54058
Constant (const byte*) DTV_BLITTER_SRCB_MOD_LO#0 = (byte*) 54059
Constant (const byte*) DTV_BLITTER_SRCB_MOD_HI#0 = (byte*) 54060
Constant (const byte*) DTV_BLITTER_SRCB_LIN_LO#0 = (byte*) 54061
Constant (const byte*) DTV_BLITTER_SRCB_LIN_HI#0 = (byte*) 54062
Constant (const byte*) DTV_BLITTER_SRCB_STEP#0 = (byte*) 54063
Constant (const byte*) DTV_BLITTER_DEST_LO#0 = (byte*) 54064
Constant (const byte*) DTV_BLITTER_DEST_MI#0 = (byte*) 54065
Constant (const byte*) DTV_BLITTER_DEST_HI#0 = (byte*) 54066
Constant (const byte*) DTV_BLITTER_DEST_MOD_LO#0 = (byte*) 54067
Constant (const byte*) DTV_BLITTER_DEST_MOD_HI#0 = (byte*) 54068
Constant (const byte*) DTV_BLITTER_DEST_LIN_LO#0 = (byte*) 54069
Constant (const byte*) DTV_BLITTER_DEST_LIN_HI#0 = (byte*) 54070
Constant (const byte*) DTV_BLITTER_DEST_STEP#0 = (byte*) 54071
Constant (const byte*) DTV_BLITTER_LEN_LO#0 = (byte*) 54072
Constant (const byte*) DTV_BLITTER_LEN_HI#0 = (byte*) 54073
Constant (const byte*) DTV_BLITTER_CONTROL#0 = (byte*) 54074
Constant (const byte) DTV_BLIT_FORCE_START#0 = 1
Constant (const byte) DTV_BLIT_SRCA_FWD#0 = 2
Constant (const byte) DTV_BLIT_SRCB_FWD#0 = 4
Constant (const byte) DTV_BLIT_DEST_FWD#0 = 8
Constant (const byte*) DTV_BLITTER_TRANSPARANCY#0 = (byte*) 54075
Constant (const byte) DTV_BLIT_TRANSPARANCY_NONE#0 = 0
Constant (const byte*) DTV_BLITTER_ALU#0 = (byte*) 54078
Constant (const byte) DTV_BLIT_ADD#0 = $30
Constant (const byte*) DTV_BLITTER_CONTROL2#0 = (byte*) 54079
Constant (const byte) DTV_BLIT_CLEAR_IRQ#0 = 1
Constant (const byte) DTV_BLIT_DEST_CONT#0 = 8
Constant (const byte) DTV_BLIT_STATUS_BUSY#0 = 1
Constant (const byte*) SCREEN#0 = (byte*) 1024
Constant (const byte[]) SRCA#0 = $0
Constant (const byte[]) SRCB#0 = { $80 }
Constant (const byte) main::$2 = <$100
Constant (const byte) main::$3 = >$100
Constant (const byte) main::$6 = <$100
Constant (const byte) main::$7 = >$100
Constant (const byte) main::$14 = <$15
Constant (const byte) main::$15 = >$15
Constant (const byte) main::$16 = <$13
Constant (const byte) main::$17 = >$13
Constant (const word) main::$18 = $14*$a
Constant (const word) main::$20 = $14*$a
Successful SSA optimization Pass2ConstantIdentification
Simplifying constant evaluating to zero <(word) $100 in
Simplifying constant evaluating to zero <(word) $100 in
Simplifying constant evaluating to zero >(word) $15 in
Simplifying constant evaluating to zero >(word) $13 in
Successful SSA optimization PassNSimplifyConstantZero
Constant right-side identified [2] (byte~) main::$0 ← < (const byte[]) SRCA#0
Constant right-side identified [4] (byte~) main::$1 ← > (const byte[]) SRCA#0
Constant right-side identified [12] (byte~) main::$4 ← < (const byte[]) SRCB#0
Constant right-side identified [14] (byte~) main::$5 ← > (const byte[]) SRCB#0
Constant right-side identified [22] (byte*~) main::$8 ← (const byte*) SCREEN#0 + (byte) $28
Constant right-side identified [26] (byte*~) main::$11 ← (const byte*) SCREEN#0 + (byte) $28
Constant right-side identified [36] (byte~) main::$19 ← < (const word) main::$18
Constant right-side identified [38] (byte~) main::$21 ← > (const word) main::$20
Constant right-side identified [42] (byte~) main::$22 ← (const byte) DTV_BLIT_FORCE_START#0 | (const byte) DTV_BLIT_SRCA_FWD#0
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte) main::$0 = <SRCA#0
Constant (const byte) main::$1 = >SRCA#0
Constant (const byte) main::$4 = <SRCB#0
Constant (const byte) main::$5 = >SRCB#0
Constant (const byte*) main::$8 = SCREEN#0+$28
Constant (const byte*) main::$11 = SCREEN#0+$28
Constant (const byte) main::$19 = <main::$18
Constant (const byte) main::$21 = >main::$20
Constant (const byte) main::$22 = DTV_BLIT_FORCE_START#0|DTV_BLIT_SRCA_FWD#0
Successful SSA optimization Pass2ConstantIdentification
Simplifying constant evaluating to zero >(const word) main::$20 in
Successful SSA optimization PassNSimplifyConstantZero
Eliminating unused constant (const word) main::$20
Successful SSA optimization PassNEliminateUnusedVars
Constant right-side identified [18] (byte*~) main::$9 ← (const byte*) main::$8 + (byte) 5
Constant right-side identified [21] (byte*~) main::$12 ← (const byte*) main::$11 + (byte) 5
Constant right-side identified [34] (byte~) main::$23 ← (const byte) main::$22 | (const byte) DTV_BLIT_SRCB_FWD#0
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte*) main::$9 = main::$8+5
Constant (const byte*) main::$12 = main::$11+5
Constant (const byte) main::$23 = main::$22|DTV_BLIT_SRCB_FWD#0
Successful SSA optimization Pass2ConstantIdentification
Constant right-side identified [18] (byte~) main::$10 ← < (const byte*) main::$9
Constant right-side identified [20] (byte~) main::$13 ← > (const byte*) main::$12
Constant right-side identified [32] (byte~) main::$24 ← (const byte) main::$23 | (const byte) DTV_BLIT_DEST_FWD#0
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte) main::$10 = <main::$9
Constant (const byte) main::$13 = >main::$12
Constant (const byte) main::$24 = main::$23|DTV_BLIT_DEST_FWD#0
Successful SSA optimization Pass2ConstantIdentification
Constant inlined main::$12 = (const byte*) SCREEN#0+(byte) $28+(byte) 5
Constant inlined main::$13 = >(const byte*) SCREEN#0+(byte) $28+(byte) 5
Constant inlined main::$14 = <(word) $15
Constant inlined main::$15 = (byte) 0
Constant inlined $0 = (const byte[]) SRCA#0
Constant inlined main::$10 = <(const byte*) SCREEN#0+(byte) $28+(byte) 5
Constant inlined main::$11 = (const byte*) SCREEN#0+(byte) $28
Constant inlined main::$16 = <(word) $13
Constant inlined main::$17 = (byte) 0
Constant inlined main::$18 = (byte) $14*(word) $a
Constant inlined main::$19 = <(byte) $14*(word) $a
Constant inlined main::$23 = (const byte) DTV_BLIT_FORCE_START#0|(const byte) DTV_BLIT_SRCA_FWD#0|(const byte) DTV_BLIT_SRCB_FWD#0
Constant inlined main::$24 = (const byte) DTV_BLIT_FORCE_START#0|(const byte) DTV_BLIT_SRCA_FWD#0|(const byte) DTV_BLIT_SRCB_FWD#0|(const byte) DTV_BLIT_DEST_FWD#0
Constant inlined main::$21 = (byte) 0
Constant inlined main::$22 = (const byte) DTV_BLIT_FORCE_START#0|(const byte) DTV_BLIT_SRCA_FWD#0
Constant inlined main::$1 = >(const byte[]) SRCA#0
Constant inlined main::$2 = (byte) 0
Constant inlined main::$0 = <(const byte[]) SRCA#0
Constant inlined main::$5 = >(const byte[]) SRCB#0
Constant inlined main::$6 = (byte) 0
Constant inlined main::$3 = >(word) $100
Constant inlined main::$4 = <(const byte[]) SRCB#0
Constant inlined main::$9 = (const byte*) SCREEN#0+(byte) $28+(byte) 5
Constant inlined main::$7 = >(word) $100
Constant inlined main::$8 = (const byte*) SCREEN#0+(byte) $28
Successful SSA optimization Pass2ConstantInlining
Adding NOP phi() at start of @begin
Adding NOP phi() at start of @4
Adding NOP phi() at start of @5
Adding NOP phi() at start of @6
Adding NOP phi() at start of @7
Adding NOP phi() at start of @end
CALL GRAPH
Calls in [] to main:4
Created 0 initial phi equivalence classes
Coalesced down to 0 phi equivalence classes
Culled Empty Block (label) @4
Culled Empty Block (label) @5
Culled Empty Block (label) @7
Renumbering block @6 to @1
Adding NOP phi() at start of @begin
Adding NOP phi() at start of @1
Adding NOP phi() at start of @end
FINAL CONTROL FLOW GRAPH
@begin: scope:[] from
[0] phi()
to:@1
@1: scope:[] from @begin
[1] phi()
[2] call main
to:@end
@end: scope:[] from @1
[3] phi()
main: scope:[main] from @1
[4] *((const byte*) DTV_FEATURE#0) ← (const byte) DTV_FEATURE_ENABLE#0
[5] *((const byte*) DTV_BLITTER_CONTROL2#0) ← (const byte) DTV_BLIT_CLEAR_IRQ#0
[6] *((const byte*) DTV_BLITTER_SRCA_LO#0) ← <(const byte[]) SRCA#0
[7] *((const byte*) DTV_BLITTER_SRCA_MI#0) ← >(const byte[]) SRCA#0
[8] *((const byte*) DTV_BLITTER_SRCA_HI#0) ← (byte) 0
[9] *((const byte*) DTV_BLITTER_SRCA_MOD_LO#0) ← (byte) 0
[10] *((const byte*) DTV_BLITTER_SRCA_MOD_HI#0) ← (byte) 0
[11] *((const byte*) DTV_BLITTER_SRCA_LIN_LO#0) ← (byte) 0
[12] *((const byte*) DTV_BLITTER_SRCA_LIN_HI#0) ← >(word) $100
[13] *((const byte*) DTV_BLITTER_SRCA_STEP#0) ← (byte) 1
[14] *((const byte*) DTV_BLITTER_SRCB_LO#0) ← <(const byte[]) SRCB#0
[15] *((const byte*) DTV_BLITTER_SRCB_MI#0) ← >(const byte[]) SRCB#0
[16] *((const byte*) DTV_BLITTER_SRCB_HI#0) ← (byte) 0
[17] *((const byte*) DTV_BLITTER_SRCB_MOD_LO#0) ← (byte) 0
[18] *((const byte*) DTV_BLITTER_SRCB_MOD_HI#0) ← (byte) 0
[19] *((const byte*) DTV_BLITTER_SRCB_LIN_LO#0) ← (byte) 0
[20] *((const byte*) DTV_BLITTER_SRCB_LIN_HI#0) ← >(word) $100
[21] *((const byte*) DTV_BLITTER_SRCB_STEP#0) ← (byte) 0
[22] *((const byte*) DTV_BLITTER_DEST_LO#0) ← <(const byte*) SCREEN#0+(byte) $28+(byte) 5
[23] *((const byte*) DTV_BLITTER_DEST_MI#0) ← >(const byte*) SCREEN#0+(byte) $28+(byte) 5
[24] *((const byte*) DTV_BLITTER_DEST_HI#0) ← (byte) 0
[25] *((const byte*) DTV_BLITTER_DEST_MOD_LO#0) ← <(word) $15
[26] *((const byte*) DTV_BLITTER_DEST_MOD_HI#0) ← (byte) 0
[27] *((const byte*) DTV_BLITTER_DEST_LIN_LO#0) ← <(word) $13
[28] *((const byte*) DTV_BLITTER_DEST_LIN_HI#0) ← (byte) 0
[29] *((const byte*) DTV_BLITTER_DEST_STEP#0) ← (byte) $10
[30] *((const byte*) DTV_BLITTER_LEN_LO#0) ← <(byte) $14*(word) $a
[31] *((const byte*) DTV_BLITTER_LEN_HI#0) ← (byte) 0
[32] *((const byte*) DTV_BLITTER_ALU#0) ← (const byte) DTV_BLIT_ADD#0
[33] *((const byte*) DTV_BLITTER_TRANSPARANCY#0) ← (const byte) DTV_BLIT_TRANSPARANCY_NONE#0
[34] *((const byte*) DTV_BLITTER_CONTROL#0) ← (const byte) DTV_BLIT_FORCE_START#0|(const byte) DTV_BLIT_SRCA_FWD#0|(const byte) DTV_BLIT_SRCB_FWD#0|(const byte) DTV_BLIT_DEST_FWD#0
[35] *((const byte*) DTV_BLITTER_CONTROL2#0) ← (const byte) DTV_BLIT_DEST_CONT#0
to:main::@1
main::@1: scope:[main] from main main::@1
[36] (byte~) main::$25 ← *((const byte*) DTV_BLITTER_CONTROL2#0) & (const byte) DTV_BLIT_STATUS_BUSY#0
[37] if((byte~) main::$25!=(byte) 0) goto main::@1
to:main::@return
main::@return: scope:[main] from main::@1
[38] return
to:@return
VARIABLE REGISTER WEIGHTS
(byte*) DTV_BLITTER_ALU
(byte*) DTV_BLITTER_CONTROL
(byte*) DTV_BLITTER_CONTROL2
(byte*) DTV_BLITTER_DEST_HI
(byte*) DTV_BLITTER_DEST_LIN_HI
(byte*) DTV_BLITTER_DEST_LIN_LO
(byte*) DTV_BLITTER_DEST_LO
(byte*) DTV_BLITTER_DEST_MI
(byte*) DTV_BLITTER_DEST_MOD_HI
(byte*) DTV_BLITTER_DEST_MOD_LO
(byte*) DTV_BLITTER_DEST_STEP
(byte*) DTV_BLITTER_LEN_HI
(byte*) DTV_BLITTER_LEN_LO
(byte*) DTV_BLITTER_SRCA_HI
(byte*) DTV_BLITTER_SRCA_LIN_HI
(byte*) DTV_BLITTER_SRCA_LIN_LO
(byte*) DTV_BLITTER_SRCA_LO
(byte*) DTV_BLITTER_SRCA_MI
(byte*) DTV_BLITTER_SRCA_MOD_HI
(byte*) DTV_BLITTER_SRCA_MOD_LO
(byte*) DTV_BLITTER_SRCA_STEP
(byte*) DTV_BLITTER_SRCB_HI
(byte*) DTV_BLITTER_SRCB_LIN_HI
(byte*) DTV_BLITTER_SRCB_LIN_LO
(byte*) DTV_BLITTER_SRCB_LO
(byte*) DTV_BLITTER_SRCB_MI
(byte*) DTV_BLITTER_SRCB_MOD_HI
(byte*) DTV_BLITTER_SRCB_MOD_LO
(byte*) DTV_BLITTER_SRCB_STEP
(byte*) DTV_BLITTER_TRANSPARANCY
(byte) DTV_BLIT_ADD
(byte) DTV_BLIT_CLEAR_IRQ
(byte) DTV_BLIT_DEST_CONT
(byte) DTV_BLIT_DEST_FWD
(byte) DTV_BLIT_FORCE_START
(byte) DTV_BLIT_SRCA_FWD
(byte) DTV_BLIT_SRCB_FWD
(byte) DTV_BLIT_STATUS_BUSY
(byte) DTV_BLIT_TRANSPARANCY_NONE
(byte*) DTV_FEATURE
(byte) DTV_FEATURE_ENABLE
(byte*) SCREEN
(byte[]) SRCA
(byte[]) SRCB
(void()) main()
(byte~) main::$25 22.0
Initial phi equivalence classes
Added variable main::$25 to zero page equivalence class [ main::$25 ]
Complete equivalence classes
[ main::$25 ]
Allocated zp ZP_BYTE:2 [ main::$25 ]
INITIAL ASM
//SEG0 File Comments
// Fill a box on the screen using the blitter
//SEG1 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG2 Global Constants & labels
// Feature enables or disables the extra C64 DTV features
.label DTV_FEATURE = $d03f
.const DTV_FEATURE_ENABLE = 1
// Blitter Source A Start
.label DTV_BLITTER_SRCA_LO = $d320
.label DTV_BLITTER_SRCA_MI = $d321
.label DTV_BLITTER_SRCA_HI = $d322
// Blitter Source A Modulo
.label DTV_BLITTER_SRCA_MOD_LO = $d323
.label DTV_BLITTER_SRCA_MOD_HI = $d324
// Blitter Source A Line Length
.label DTV_BLITTER_SRCA_LIN_LO = $d325
.label DTV_BLITTER_SRCA_LIN_HI = $d326
// Blitter Source A Step ([7:4] integral part, [3:0] fractional part)
.label DTV_BLITTER_SRCA_STEP = $d327
// Blitter Source B Start
.label DTV_BLITTER_SRCB_LO = $d328
.label DTV_BLITTER_SRCB_MI = $d329
.label DTV_BLITTER_SRCB_HI = $d32a
// Blitter Source B Modulo
.label DTV_BLITTER_SRCB_MOD_LO = $d32b
.label DTV_BLITTER_SRCB_MOD_HI = $d32c
// Blitter Source B Line Length
.label DTV_BLITTER_SRCB_LIN_LO = $d32d
.label DTV_BLITTER_SRCB_LIN_HI = $d32e
// Blitter Source B Step ([7:4] integral part, [3:0] fractional part)
.label DTV_BLITTER_SRCB_STEP = $d32f
// Blitter Destination Start
.label DTV_BLITTER_DEST_LO = $d330
.label DTV_BLITTER_DEST_MI = $d331
.label DTV_BLITTER_DEST_HI = $d332
// Blitter Source B Modulo
.label DTV_BLITTER_DEST_MOD_LO = $d333
.label DTV_BLITTER_DEST_MOD_HI = $d334
// Blitter Source B Line Length
.label DTV_BLITTER_DEST_LIN_LO = $d335
.label DTV_BLITTER_DEST_LIN_HI = $d336
// Blitter Source B Step ([7:4] integral part, [3:0] fractional part)
.label DTV_BLITTER_DEST_STEP = $d337
// Blitter Blit Length
.label DTV_BLITTER_LEN_LO = $d338
.label DTV_BLITTER_LEN_HI = $d339
// Blitter Control
.label DTV_BLITTER_CONTROL = $d33a
// Bit[0] Force Start Strobe when set
.const DTV_BLIT_FORCE_START = 1
// Bit[1] Source A Direction Positive when set
.const DTV_BLIT_SRCA_FWD = 2
// Bit[2] Source B Direction Positive when set
.const DTV_BLIT_SRCB_FWD = 4
// Bit[3] Destination Direction Positive when set
.const DTV_BLIT_DEST_FWD = 8
// Blitter Transparency
.label DTV_BLITTER_TRANSPARANCY = $d33b
// No transparancy
// Bit[2]==Bit[1]==0: write in any case
.const DTV_BLIT_TRANSPARANCY_NONE = 0
// Controls the ALU operation
.label DTV_BLITTER_ALU = $d33e
.const DTV_BLIT_ADD = $30
// Blitter Control 2
.label DTV_BLITTER_CONTROL2 = $d33f
// Bit[0] Clear Blitter IRQ
.const DTV_BLIT_CLEAR_IRQ = 1
// Bit[3] Destination Continue
.const DTV_BLIT_DEST_CONT = 8
// Bit[0] Busy when set (When reading)
.const DTV_BLIT_STATUS_BUSY = 1
.label SCREEN = $400
//SEG3 @begin
bbegin:
//SEG4 [1] phi from @begin to @1 [phi:@begin->@1]
b1_from_bbegin:
jmp b1
//SEG5 @1
b1:
//SEG6 [2] call main
jsr main
//SEG7 [3] phi from @1 to @end [phi:@1->@end]
bend_from_b1:
jmp bend
//SEG8 @end
bend:
//SEG9 main
main: {
.label _25 = 2
//SEG10 [4] *((const byte*) DTV_FEATURE#0) ← (const byte) DTV_FEATURE_ENABLE#0 -- _deref_pbuc1=vbuc2
lda #DTV_FEATURE_ENABLE
sta DTV_FEATURE
//SEG11 [5] *((const byte*) DTV_BLITTER_CONTROL2#0) ← (const byte) DTV_BLIT_CLEAR_IRQ#0 -- _deref_pbuc1=vbuc2
// Instruct blitter not to continue previous blit
lda #DTV_BLIT_CLEAR_IRQ
sta DTV_BLITTER_CONTROL2
//SEG12 [6] *((const byte*) DTV_BLITTER_SRCA_LO#0) ← <(const byte[]) SRCA#0 -- _deref_pbuc1=vbuc2
lda #<SRCA
sta DTV_BLITTER_SRCA_LO
//SEG13 [7] *((const byte*) DTV_BLITTER_SRCA_MI#0) ← >(const byte[]) SRCA#0 -- _deref_pbuc1=vbuc2
lda #>SRCA
sta DTV_BLITTER_SRCA_MI
//SEG14 [8] *((const byte*) DTV_BLITTER_SRCA_HI#0) ← (byte) 0 -- _deref_pbuc1=vbuc2
lda #0
sta DTV_BLITTER_SRCA_HI
//SEG15 [9] *((const byte*) DTV_BLITTER_SRCA_MOD_LO#0) ← (byte) 0 -- _deref_pbuc1=vbuc2
lda #0
sta DTV_BLITTER_SRCA_MOD_LO
//SEG16 [10] *((const byte*) DTV_BLITTER_SRCA_MOD_HI#0) ← (byte) 0 -- _deref_pbuc1=vbuc2
lda #0
sta DTV_BLITTER_SRCA_MOD_HI
//SEG17 [11] *((const byte*) DTV_BLITTER_SRCA_LIN_LO#0) ← (byte) 0 -- _deref_pbuc1=vbuc2
lda #0
sta DTV_BLITTER_SRCA_LIN_LO
//SEG18 [12] *((const byte*) DTV_BLITTER_SRCA_LIN_HI#0) ← >(word) $100 -- _deref_pbuc1=vbuc2
lda #>$100
sta DTV_BLITTER_SRCA_LIN_HI
//SEG19 [13] *((const byte*) DTV_BLITTER_SRCA_STEP#0) ← (byte) 1 -- _deref_pbuc1=vbuc2
lda #1
sta DTV_BLITTER_SRCA_STEP
//SEG20 [14] *((const byte*) DTV_BLITTER_SRCB_LO#0) ← <(const byte[]) SRCB#0 -- _deref_pbuc1=vbuc2
// Step 0.0
lda #<SRCB
sta DTV_BLITTER_SRCB_LO
//SEG21 [15] *((const byte*) DTV_BLITTER_SRCB_MI#0) ← >(const byte[]) SRCB#0 -- _deref_pbuc1=vbuc2
lda #>SRCB
sta DTV_BLITTER_SRCB_MI
//SEG22 [16] *((const byte*) DTV_BLITTER_SRCB_HI#0) ← (byte) 0 -- _deref_pbuc1=vbuc2
lda #0
sta DTV_BLITTER_SRCB_HI
//SEG23 [17] *((const byte*) DTV_BLITTER_SRCB_MOD_LO#0) ← (byte) 0 -- _deref_pbuc1=vbuc2
lda #0
sta DTV_BLITTER_SRCB_MOD_LO
//SEG24 [18] *((const byte*) DTV_BLITTER_SRCB_MOD_HI#0) ← (byte) 0 -- _deref_pbuc1=vbuc2
lda #0
sta DTV_BLITTER_SRCB_MOD_HI
//SEG25 [19] *((const byte*) DTV_BLITTER_SRCB_LIN_LO#0) ← (byte) 0 -- _deref_pbuc1=vbuc2
lda #0
sta DTV_BLITTER_SRCB_LIN_LO
//SEG26 [20] *((const byte*) DTV_BLITTER_SRCB_LIN_HI#0) ← >(word) $100 -- _deref_pbuc1=vbuc2
lda #>$100
sta DTV_BLITTER_SRCB_LIN_HI
//SEG27 [21] *((const byte*) DTV_BLITTER_SRCB_STEP#0) ← (byte) 0 -- _deref_pbuc1=vbuc2
lda #0
sta DTV_BLITTER_SRCB_STEP
//SEG28 [22] *((const byte*) DTV_BLITTER_DEST_LO#0) ← <(const byte*) SCREEN#0+(byte) $28+(byte) 5 -- _deref_pbuc1=vbuc2
// Step 0.0
lda #<SCREEN+$28+5
sta DTV_BLITTER_DEST_LO
//SEG29 [23] *((const byte*) DTV_BLITTER_DEST_MI#0) ← >(const byte*) SCREEN#0+(byte) $28+(byte) 5 -- _deref_pbuc1=vbuc2
lda #>SCREEN+$28+5
sta DTV_BLITTER_DEST_MI
//SEG30 [24] *((const byte*) DTV_BLITTER_DEST_HI#0) ← (byte) 0 -- _deref_pbuc1=vbuc2
lda #0
sta DTV_BLITTER_DEST_HI
//SEG31 [25] *((const byte*) DTV_BLITTER_DEST_MOD_LO#0) ← <(word) $15 -- _deref_pbuc1=vbuc2
lda #<$15
sta DTV_BLITTER_DEST_MOD_LO
//SEG32 [26] *((const byte*) DTV_BLITTER_DEST_MOD_HI#0) ← (byte) 0 -- _deref_pbuc1=vbuc2
lda #0
sta DTV_BLITTER_DEST_MOD_HI
//SEG33 [27] *((const byte*) DTV_BLITTER_DEST_LIN_LO#0) ← <(word) $13 -- _deref_pbuc1=vbuc2
lda #<$13
sta DTV_BLITTER_DEST_LIN_LO
//SEG34 [28] *((const byte*) DTV_BLITTER_DEST_LIN_HI#0) ← (byte) 0 -- _deref_pbuc1=vbuc2
lda #0
sta DTV_BLITTER_DEST_LIN_HI
//SEG35 [29] *((const byte*) DTV_BLITTER_DEST_STEP#0) ← (byte) $10 -- _deref_pbuc1=vbuc2
lda #$10
sta DTV_BLITTER_DEST_STEP
//SEG36 [30] *((const byte*) DTV_BLITTER_LEN_LO#0) ← <(byte) $14*(word) $a -- _deref_pbuc1=vbuc2
// Step 1.0
lda #<$14*$a
sta DTV_BLITTER_LEN_LO
//SEG37 [31] *((const byte*) DTV_BLITTER_LEN_HI#0) ← (byte) 0 -- _deref_pbuc1=vbuc2
lda #0
sta DTV_BLITTER_LEN_HI
//SEG38 [32] *((const byte*) DTV_BLITTER_ALU#0) ← (const byte) DTV_BLIT_ADD#0 -- _deref_pbuc1=vbuc2
lda #DTV_BLIT_ADD
sta DTV_BLITTER_ALU
//SEG39 [33] *((const byte*) DTV_BLITTER_TRANSPARANCY#0) ← (const byte) DTV_BLIT_TRANSPARANCY_NONE#0 -- _deref_pbuc1=vbuc2
lda #DTV_BLIT_TRANSPARANCY_NONE
sta DTV_BLITTER_TRANSPARANCY
//SEG40 [34] *((const byte*) DTV_BLITTER_CONTROL#0) ← (const byte) DTV_BLIT_FORCE_START#0|(const byte) DTV_BLIT_SRCA_FWD#0|(const byte) DTV_BLIT_SRCB_FWD#0|(const byte) DTV_BLIT_DEST_FWD#0 -- _deref_pbuc1=vbuc2
// Start blitter
lda #DTV_BLIT_FORCE_START|DTV_BLIT_SRCA_FWD|DTV_BLIT_SRCB_FWD|DTV_BLIT_DEST_FWD
sta DTV_BLITTER_CONTROL
//SEG41 [35] *((const byte*) DTV_BLITTER_CONTROL2#0) ← (const byte) DTV_BLIT_DEST_CONT#0 -- _deref_pbuc1=vbuc2
// Instruct blitter to continue at DEST and restart SRC A/B
lda #DTV_BLIT_DEST_CONT
sta DTV_BLITTER_CONTROL2
jmp b1
// wait til blitter is ready
//SEG42 main::@1
b1:
//SEG43 [36] (byte~) main::$25 ← *((const byte*) DTV_BLITTER_CONTROL2#0) & (const byte) DTV_BLIT_STATUS_BUSY#0 -- vbuz1=_deref_pbuc1_band_vbuc2
lda #DTV_BLIT_STATUS_BUSY
and DTV_BLITTER_CONTROL2
sta _25
//SEG44 [37] if((byte~) main::$25!=(byte) 0) goto main::@1 -- vbuz1_neq_0_then_la1
lda _25
cmp #0
bne b1
jmp breturn
//SEG45 main::@return
breturn:
//SEG46 [38] return
rts
}
SRCA: .text "camelot rules!@"
SRCB: .byte $80
REGISTER UPLIFT POTENTIAL REGISTERS
Statement [4] *((const byte*) DTV_FEATURE#0) ← (const byte) DTV_FEATURE_ENABLE#0 [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [5] *((const byte*) DTV_BLITTER_CONTROL2#0) ← (const byte) DTV_BLIT_CLEAR_IRQ#0 [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [6] *((const byte*) DTV_BLITTER_SRCA_LO#0) ← <(const byte[]) SRCA#0 [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [7] *((const byte*) DTV_BLITTER_SRCA_MI#0) ← >(const byte[]) SRCA#0 [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [8] *((const byte*) DTV_BLITTER_SRCA_HI#0) ← (byte) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [9] *((const byte*) DTV_BLITTER_SRCA_MOD_LO#0) ← (byte) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [10] *((const byte*) DTV_BLITTER_SRCA_MOD_HI#0) ← (byte) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [11] *((const byte*) DTV_BLITTER_SRCA_LIN_LO#0) ← (byte) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [12] *((const byte*) DTV_BLITTER_SRCA_LIN_HI#0) ← >(word) $100 [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [13] *((const byte*) DTV_BLITTER_SRCA_STEP#0) ← (byte) 1 [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [14] *((const byte*) DTV_BLITTER_SRCB_LO#0) ← <(const byte[]) SRCB#0 [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [15] *((const byte*) DTV_BLITTER_SRCB_MI#0) ← >(const byte[]) SRCB#0 [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [16] *((const byte*) DTV_BLITTER_SRCB_HI#0) ← (byte) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [17] *((const byte*) DTV_BLITTER_SRCB_MOD_LO#0) ← (byte) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [18] *((const byte*) DTV_BLITTER_SRCB_MOD_HI#0) ← (byte) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [19] *((const byte*) DTV_BLITTER_SRCB_LIN_LO#0) ← (byte) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [20] *((const byte*) DTV_BLITTER_SRCB_LIN_HI#0) ← >(word) $100 [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [21] *((const byte*) DTV_BLITTER_SRCB_STEP#0) ← (byte) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [22] *((const byte*) DTV_BLITTER_DEST_LO#0) ← <(const byte*) SCREEN#0+(byte) $28+(byte) 5 [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [23] *((const byte*) DTV_BLITTER_DEST_MI#0) ← >(const byte*) SCREEN#0+(byte) $28+(byte) 5 [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [24] *((const byte*) DTV_BLITTER_DEST_HI#0) ← (byte) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [25] *((const byte*) DTV_BLITTER_DEST_MOD_LO#0) ← <(word) $15 [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [26] *((const byte*) DTV_BLITTER_DEST_MOD_HI#0) ← (byte) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [27] *((const byte*) DTV_BLITTER_DEST_LIN_LO#0) ← <(word) $13 [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [28] *((const byte*) DTV_BLITTER_DEST_LIN_HI#0) ← (byte) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [29] *((const byte*) DTV_BLITTER_DEST_STEP#0) ← (byte) $10 [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [30] *((const byte*) DTV_BLITTER_LEN_LO#0) ← <(byte) $14*(word) $a [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [31] *((const byte*) DTV_BLITTER_LEN_HI#0) ← (byte) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [32] *((const byte*) DTV_BLITTER_ALU#0) ← (const byte) DTV_BLIT_ADD#0 [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [33] *((const byte*) DTV_BLITTER_TRANSPARANCY#0) ← (const byte) DTV_BLIT_TRANSPARANCY_NONE#0 [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [34] *((const byte*) DTV_BLITTER_CONTROL#0) ← (const byte) DTV_BLIT_FORCE_START#0|(const byte) DTV_BLIT_SRCA_FWD#0|(const byte) DTV_BLIT_SRCB_FWD#0|(const byte) DTV_BLIT_DEST_FWD#0 [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [35] *((const byte*) DTV_BLITTER_CONTROL2#0) ← (const byte) DTV_BLIT_DEST_CONT#0 [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [36] (byte~) main::$25 ← *((const byte*) DTV_BLITTER_CONTROL2#0) & (const byte) DTV_BLIT_STATUS_BUSY#0 [ main::$25 ] ( main:2 [ main::$25 ] ) always clobbers reg byte a
Potential registers zp ZP_BYTE:2 [ main::$25 ] : zp ZP_BYTE:2 , reg byte a , reg byte x , reg byte y ,
REGISTER UPLIFT SCOPES
Uplift Scope [main] 22: zp ZP_BYTE:2 [ main::$25 ]
Uplift Scope []
Uplifting [main] best 348 combination reg byte a [ main::$25 ]
Uplifting [] best 348 combination
ASSEMBLER BEFORE OPTIMIZATION
//SEG0 File Comments
// Fill a box on the screen using the blitter
//SEG1 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG2 Global Constants & labels
// Feature enables or disables the extra C64 DTV features
.label DTV_FEATURE = $d03f
.const DTV_FEATURE_ENABLE = 1
// Blitter Source A Start
.label DTV_BLITTER_SRCA_LO = $d320
.label DTV_BLITTER_SRCA_MI = $d321
.label DTV_BLITTER_SRCA_HI = $d322
// Blitter Source A Modulo
.label DTV_BLITTER_SRCA_MOD_LO = $d323
.label DTV_BLITTER_SRCA_MOD_HI = $d324
// Blitter Source A Line Length
.label DTV_BLITTER_SRCA_LIN_LO = $d325
.label DTV_BLITTER_SRCA_LIN_HI = $d326
// Blitter Source A Step ([7:4] integral part, [3:0] fractional part)
.label DTV_BLITTER_SRCA_STEP = $d327
// Blitter Source B Start
.label DTV_BLITTER_SRCB_LO = $d328
.label DTV_BLITTER_SRCB_MI = $d329
.label DTV_BLITTER_SRCB_HI = $d32a
// Blitter Source B Modulo
.label DTV_BLITTER_SRCB_MOD_LO = $d32b
.label DTV_BLITTER_SRCB_MOD_HI = $d32c
// Blitter Source B Line Length
.label DTV_BLITTER_SRCB_LIN_LO = $d32d
.label DTV_BLITTER_SRCB_LIN_HI = $d32e
// Blitter Source B Step ([7:4] integral part, [3:0] fractional part)
.label DTV_BLITTER_SRCB_STEP = $d32f
// Blitter Destination Start
.label DTV_BLITTER_DEST_LO = $d330
.label DTV_BLITTER_DEST_MI = $d331
.label DTV_BLITTER_DEST_HI = $d332
// Blitter Source B Modulo
.label DTV_BLITTER_DEST_MOD_LO = $d333
.label DTV_BLITTER_DEST_MOD_HI = $d334
// Blitter Source B Line Length
.label DTV_BLITTER_DEST_LIN_LO = $d335
.label DTV_BLITTER_DEST_LIN_HI = $d336
// Blitter Source B Step ([7:4] integral part, [3:0] fractional part)
.label DTV_BLITTER_DEST_STEP = $d337
// Blitter Blit Length
.label DTV_BLITTER_LEN_LO = $d338
.label DTV_BLITTER_LEN_HI = $d339
// Blitter Control
.label DTV_BLITTER_CONTROL = $d33a
// Bit[0] Force Start Strobe when set
.const DTV_BLIT_FORCE_START = 1
// Bit[1] Source A Direction Positive when set
.const DTV_BLIT_SRCA_FWD = 2
// Bit[2] Source B Direction Positive when set
.const DTV_BLIT_SRCB_FWD = 4
// Bit[3] Destination Direction Positive when set
.const DTV_BLIT_DEST_FWD = 8
// Blitter Transparency
.label DTV_BLITTER_TRANSPARANCY = $d33b
// No transparancy
// Bit[2]==Bit[1]==0: write in any case
.const DTV_BLIT_TRANSPARANCY_NONE = 0
// Controls the ALU operation
.label DTV_BLITTER_ALU = $d33e
.const DTV_BLIT_ADD = $30
// Blitter Control 2
.label DTV_BLITTER_CONTROL2 = $d33f
// Bit[0] Clear Blitter IRQ
.const DTV_BLIT_CLEAR_IRQ = 1
// Bit[3] Destination Continue
.const DTV_BLIT_DEST_CONT = 8
// Bit[0] Busy when set (When reading)
.const DTV_BLIT_STATUS_BUSY = 1
.label SCREEN = $400
//SEG3 @begin
bbegin:
//SEG4 [1] phi from @begin to @1 [phi:@begin->@1]
b1_from_bbegin:
jmp b1
//SEG5 @1
b1:
//SEG6 [2] call main
jsr main
//SEG7 [3] phi from @1 to @end [phi:@1->@end]
bend_from_b1:
jmp bend
//SEG8 @end
bend:
//SEG9 main
main: {
//SEG10 [4] *((const byte*) DTV_FEATURE#0) ← (const byte) DTV_FEATURE_ENABLE#0 -- _deref_pbuc1=vbuc2
lda #DTV_FEATURE_ENABLE
sta DTV_FEATURE
//SEG11 [5] *((const byte*) DTV_BLITTER_CONTROL2#0) ← (const byte) DTV_BLIT_CLEAR_IRQ#0 -- _deref_pbuc1=vbuc2
// Instruct blitter not to continue previous blit
lda #DTV_BLIT_CLEAR_IRQ
sta DTV_BLITTER_CONTROL2
//SEG12 [6] *((const byte*) DTV_BLITTER_SRCA_LO#0) ← <(const byte[]) SRCA#0 -- _deref_pbuc1=vbuc2
lda #<SRCA
sta DTV_BLITTER_SRCA_LO
//SEG13 [7] *((const byte*) DTV_BLITTER_SRCA_MI#0) ← >(const byte[]) SRCA#0 -- _deref_pbuc1=vbuc2
lda #>SRCA
sta DTV_BLITTER_SRCA_MI
//SEG14 [8] *((const byte*) DTV_BLITTER_SRCA_HI#0) ← (byte) 0 -- _deref_pbuc1=vbuc2
lda #0
sta DTV_BLITTER_SRCA_HI
//SEG15 [9] *((const byte*) DTV_BLITTER_SRCA_MOD_LO#0) ← (byte) 0 -- _deref_pbuc1=vbuc2
lda #0
sta DTV_BLITTER_SRCA_MOD_LO
//SEG16 [10] *((const byte*) DTV_BLITTER_SRCA_MOD_HI#0) ← (byte) 0 -- _deref_pbuc1=vbuc2
lda #0
sta DTV_BLITTER_SRCA_MOD_HI
//SEG17 [11] *((const byte*) DTV_BLITTER_SRCA_LIN_LO#0) ← (byte) 0 -- _deref_pbuc1=vbuc2
lda #0
sta DTV_BLITTER_SRCA_LIN_LO
//SEG18 [12] *((const byte*) DTV_BLITTER_SRCA_LIN_HI#0) ← >(word) $100 -- _deref_pbuc1=vbuc2
lda #>$100
sta DTV_BLITTER_SRCA_LIN_HI
//SEG19 [13] *((const byte*) DTV_BLITTER_SRCA_STEP#0) ← (byte) 1 -- _deref_pbuc1=vbuc2
lda #1
sta DTV_BLITTER_SRCA_STEP
//SEG20 [14] *((const byte*) DTV_BLITTER_SRCB_LO#0) ← <(const byte[]) SRCB#0 -- _deref_pbuc1=vbuc2
// Step 0.0
lda #<SRCB
sta DTV_BLITTER_SRCB_LO
//SEG21 [15] *((const byte*) DTV_BLITTER_SRCB_MI#0) ← >(const byte[]) SRCB#0 -- _deref_pbuc1=vbuc2
lda #>SRCB
sta DTV_BLITTER_SRCB_MI
//SEG22 [16] *((const byte*) DTV_BLITTER_SRCB_HI#0) ← (byte) 0 -- _deref_pbuc1=vbuc2
lda #0
sta DTV_BLITTER_SRCB_HI
//SEG23 [17] *((const byte*) DTV_BLITTER_SRCB_MOD_LO#0) ← (byte) 0 -- _deref_pbuc1=vbuc2
lda #0
sta DTV_BLITTER_SRCB_MOD_LO
//SEG24 [18] *((const byte*) DTV_BLITTER_SRCB_MOD_HI#0) ← (byte) 0 -- _deref_pbuc1=vbuc2
lda #0
sta DTV_BLITTER_SRCB_MOD_HI
//SEG25 [19] *((const byte*) DTV_BLITTER_SRCB_LIN_LO#0) ← (byte) 0 -- _deref_pbuc1=vbuc2
lda #0
sta DTV_BLITTER_SRCB_LIN_LO
//SEG26 [20] *((const byte*) DTV_BLITTER_SRCB_LIN_HI#0) ← >(word) $100 -- _deref_pbuc1=vbuc2
lda #>$100
sta DTV_BLITTER_SRCB_LIN_HI
//SEG27 [21] *((const byte*) DTV_BLITTER_SRCB_STEP#0) ← (byte) 0 -- _deref_pbuc1=vbuc2
lda #0
sta DTV_BLITTER_SRCB_STEP
//SEG28 [22] *((const byte*) DTV_BLITTER_DEST_LO#0) ← <(const byte*) SCREEN#0+(byte) $28+(byte) 5 -- _deref_pbuc1=vbuc2
// Step 0.0
lda #<SCREEN+$28+5
sta DTV_BLITTER_DEST_LO
//SEG29 [23] *((const byte*) DTV_BLITTER_DEST_MI#0) ← >(const byte*) SCREEN#0+(byte) $28+(byte) 5 -- _deref_pbuc1=vbuc2
lda #>SCREEN+$28+5
sta DTV_BLITTER_DEST_MI
//SEG30 [24] *((const byte*) DTV_BLITTER_DEST_HI#0) ← (byte) 0 -- _deref_pbuc1=vbuc2
lda #0
sta DTV_BLITTER_DEST_HI
//SEG31 [25] *((const byte*) DTV_BLITTER_DEST_MOD_LO#0) ← <(word) $15 -- _deref_pbuc1=vbuc2
lda #<$15
sta DTV_BLITTER_DEST_MOD_LO
//SEG32 [26] *((const byte*) DTV_BLITTER_DEST_MOD_HI#0) ← (byte) 0 -- _deref_pbuc1=vbuc2
lda #0
sta DTV_BLITTER_DEST_MOD_HI
//SEG33 [27] *((const byte*) DTV_BLITTER_DEST_LIN_LO#0) ← <(word) $13 -- _deref_pbuc1=vbuc2
lda #<$13
sta DTV_BLITTER_DEST_LIN_LO
//SEG34 [28] *((const byte*) DTV_BLITTER_DEST_LIN_HI#0) ← (byte) 0 -- _deref_pbuc1=vbuc2
lda #0
sta DTV_BLITTER_DEST_LIN_HI
//SEG35 [29] *((const byte*) DTV_BLITTER_DEST_STEP#0) ← (byte) $10 -- _deref_pbuc1=vbuc2
lda #$10
sta DTV_BLITTER_DEST_STEP
//SEG36 [30] *((const byte*) DTV_BLITTER_LEN_LO#0) ← <(byte) $14*(word) $a -- _deref_pbuc1=vbuc2
// Step 1.0
lda #<$14*$a
sta DTV_BLITTER_LEN_LO
//SEG37 [31] *((const byte*) DTV_BLITTER_LEN_HI#0) ← (byte) 0 -- _deref_pbuc1=vbuc2
lda #0
sta DTV_BLITTER_LEN_HI
//SEG38 [32] *((const byte*) DTV_BLITTER_ALU#0) ← (const byte) DTV_BLIT_ADD#0 -- _deref_pbuc1=vbuc2
lda #DTV_BLIT_ADD
sta DTV_BLITTER_ALU
//SEG39 [33] *((const byte*) DTV_BLITTER_TRANSPARANCY#0) ← (const byte) DTV_BLIT_TRANSPARANCY_NONE#0 -- _deref_pbuc1=vbuc2
lda #DTV_BLIT_TRANSPARANCY_NONE
sta DTV_BLITTER_TRANSPARANCY
//SEG40 [34] *((const byte*) DTV_BLITTER_CONTROL#0) ← (const byte) DTV_BLIT_FORCE_START#0|(const byte) DTV_BLIT_SRCA_FWD#0|(const byte) DTV_BLIT_SRCB_FWD#0|(const byte) DTV_BLIT_DEST_FWD#0 -- _deref_pbuc1=vbuc2
// Start blitter
lda #DTV_BLIT_FORCE_START|DTV_BLIT_SRCA_FWD|DTV_BLIT_SRCB_FWD|DTV_BLIT_DEST_FWD
sta DTV_BLITTER_CONTROL
//SEG41 [35] *((const byte*) DTV_BLITTER_CONTROL2#0) ← (const byte) DTV_BLIT_DEST_CONT#0 -- _deref_pbuc1=vbuc2
// Instruct blitter to continue at DEST and restart SRC A/B
lda #DTV_BLIT_DEST_CONT
sta DTV_BLITTER_CONTROL2
jmp b1
// wait til blitter is ready
//SEG42 main::@1
b1:
//SEG43 [36] (byte~) main::$25 ← *((const byte*) DTV_BLITTER_CONTROL2#0) & (const byte) DTV_BLIT_STATUS_BUSY#0 -- vbuaa=_deref_pbuc1_band_vbuc2
lda #DTV_BLIT_STATUS_BUSY
and DTV_BLITTER_CONTROL2
//SEG44 [37] if((byte~) main::$25!=(byte) 0) goto main::@1 -- vbuaa_neq_0_then_la1
cmp #0
bne b1
jmp breturn
//SEG45 main::@return
breturn:
//SEG46 [38] return
rts
}
SRCA: .text "camelot rules!@"
SRCB: .byte $80
ASSEMBLER OPTIMIZATIONS
Removing instruction jmp b1
Removing instruction jmp bend
Removing instruction jmp b1
Removing instruction jmp breturn
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction lda #0
Removing instruction lda #0
Removing instruction lda #0
Removing instruction lda #0
Removing instruction lda #0
Removing instruction lda #0
Succesful ASM optimization Pass5UnnecesaryLoadElimination
Removing instruction b1_from_bbegin:
Removing instruction b1:
Removing instruction bend_from_b1:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction bend:
Removing instruction breturn:
Succesful ASM optimization Pass5UnusedLabelElimination
Updating BasicUpstart to call main directly
Removing instruction jsr main
Succesful ASM optimization Pass5SkipBegin
Removing instruction bbegin:
Succesful ASM optimization Pass5UnusedLabelElimination
FINAL SYMBOL TABLE
(label) @1
(label) @begin
(label) @end
(byte*) DTV_BLITTER_ALU
(const byte*) DTV_BLITTER_ALU#0 DTV_BLITTER_ALU = (byte*) 54078
(byte*) DTV_BLITTER_CONTROL
(const byte*) DTV_BLITTER_CONTROL#0 DTV_BLITTER_CONTROL = (byte*) 54074
(byte*) DTV_BLITTER_CONTROL2
(const byte*) DTV_BLITTER_CONTROL2#0 DTV_BLITTER_CONTROL2 = (byte*) 54079
(byte*) DTV_BLITTER_DEST_HI
(const byte*) DTV_BLITTER_DEST_HI#0 DTV_BLITTER_DEST_HI = (byte*) 54066
(byte*) DTV_BLITTER_DEST_LIN_HI
(const byte*) DTV_BLITTER_DEST_LIN_HI#0 DTV_BLITTER_DEST_LIN_HI = (byte*) 54070
(byte*) DTV_BLITTER_DEST_LIN_LO
(const byte*) DTV_BLITTER_DEST_LIN_LO#0 DTV_BLITTER_DEST_LIN_LO = (byte*) 54069
(byte*) DTV_BLITTER_DEST_LO
(const byte*) DTV_BLITTER_DEST_LO#0 DTV_BLITTER_DEST_LO = (byte*) 54064
(byte*) DTV_BLITTER_DEST_MI
(const byte*) DTV_BLITTER_DEST_MI#0 DTV_BLITTER_DEST_MI = (byte*) 54065
(byte*) DTV_BLITTER_DEST_MOD_HI
(const byte*) DTV_BLITTER_DEST_MOD_HI#0 DTV_BLITTER_DEST_MOD_HI = (byte*) 54068
(byte*) DTV_BLITTER_DEST_MOD_LO
(const byte*) DTV_BLITTER_DEST_MOD_LO#0 DTV_BLITTER_DEST_MOD_LO = (byte*) 54067
(byte*) DTV_BLITTER_DEST_STEP
(const byte*) DTV_BLITTER_DEST_STEP#0 DTV_BLITTER_DEST_STEP = (byte*) 54071
(byte*) DTV_BLITTER_LEN_HI
(const byte*) DTV_BLITTER_LEN_HI#0 DTV_BLITTER_LEN_HI = (byte*) 54073
(byte*) DTV_BLITTER_LEN_LO
(const byte*) DTV_BLITTER_LEN_LO#0 DTV_BLITTER_LEN_LO = (byte*) 54072
(byte*) DTV_BLITTER_SRCA_HI
(const byte*) DTV_BLITTER_SRCA_HI#0 DTV_BLITTER_SRCA_HI = (byte*) 54050
(byte*) DTV_BLITTER_SRCA_LIN_HI
(const byte*) DTV_BLITTER_SRCA_LIN_HI#0 DTV_BLITTER_SRCA_LIN_HI = (byte*) 54054
(byte*) DTV_BLITTER_SRCA_LIN_LO
(const byte*) DTV_BLITTER_SRCA_LIN_LO#0 DTV_BLITTER_SRCA_LIN_LO = (byte*) 54053
(byte*) DTV_BLITTER_SRCA_LO
(const byte*) DTV_BLITTER_SRCA_LO#0 DTV_BLITTER_SRCA_LO = (byte*) 54048
(byte*) DTV_BLITTER_SRCA_MI
(const byte*) DTV_BLITTER_SRCA_MI#0 DTV_BLITTER_SRCA_MI = (byte*) 54049
(byte*) DTV_BLITTER_SRCA_MOD_HI
(const byte*) DTV_BLITTER_SRCA_MOD_HI#0 DTV_BLITTER_SRCA_MOD_HI = (byte*) 54052
(byte*) DTV_BLITTER_SRCA_MOD_LO
(const byte*) DTV_BLITTER_SRCA_MOD_LO#0 DTV_BLITTER_SRCA_MOD_LO = (byte*) 54051
(byte*) DTV_BLITTER_SRCA_STEP
(const byte*) DTV_BLITTER_SRCA_STEP#0 DTV_BLITTER_SRCA_STEP = (byte*) 54055
(byte*) DTV_BLITTER_SRCB_HI
(const byte*) DTV_BLITTER_SRCB_HI#0 DTV_BLITTER_SRCB_HI = (byte*) 54058
(byte*) DTV_BLITTER_SRCB_LIN_HI
(const byte*) DTV_BLITTER_SRCB_LIN_HI#0 DTV_BLITTER_SRCB_LIN_HI = (byte*) 54062
(byte*) DTV_BLITTER_SRCB_LIN_LO
(const byte*) DTV_BLITTER_SRCB_LIN_LO#0 DTV_BLITTER_SRCB_LIN_LO = (byte*) 54061
(byte*) DTV_BLITTER_SRCB_LO
(const byte*) DTV_BLITTER_SRCB_LO#0 DTV_BLITTER_SRCB_LO = (byte*) 54056
(byte*) DTV_BLITTER_SRCB_MI
(const byte*) DTV_BLITTER_SRCB_MI#0 DTV_BLITTER_SRCB_MI = (byte*) 54057
(byte*) DTV_BLITTER_SRCB_MOD_HI
(const byte*) DTV_BLITTER_SRCB_MOD_HI#0 DTV_BLITTER_SRCB_MOD_HI = (byte*) 54060
(byte*) DTV_BLITTER_SRCB_MOD_LO
(const byte*) DTV_BLITTER_SRCB_MOD_LO#0 DTV_BLITTER_SRCB_MOD_LO = (byte*) 54059
(byte*) DTV_BLITTER_SRCB_STEP
(const byte*) DTV_BLITTER_SRCB_STEP#0 DTV_BLITTER_SRCB_STEP = (byte*) 54063
(byte*) DTV_BLITTER_TRANSPARANCY
(const byte*) DTV_BLITTER_TRANSPARANCY#0 DTV_BLITTER_TRANSPARANCY = (byte*) 54075
(byte) DTV_BLIT_ADD
(const byte) DTV_BLIT_ADD#0 DTV_BLIT_ADD = (byte) $30
(byte) DTV_BLIT_CLEAR_IRQ
(const byte) DTV_BLIT_CLEAR_IRQ#0 DTV_BLIT_CLEAR_IRQ = (byte) 1
(byte) DTV_BLIT_DEST_CONT
(const byte) DTV_BLIT_DEST_CONT#0 DTV_BLIT_DEST_CONT = (byte) 8
(byte) DTV_BLIT_DEST_FWD
(const byte) DTV_BLIT_DEST_FWD#0 DTV_BLIT_DEST_FWD = (byte) 8
(byte) DTV_BLIT_FORCE_START
(const byte) DTV_BLIT_FORCE_START#0 DTV_BLIT_FORCE_START = (byte) 1
(byte) DTV_BLIT_SRCA_FWD
(const byte) DTV_BLIT_SRCA_FWD#0 DTV_BLIT_SRCA_FWD = (byte) 2
(byte) DTV_BLIT_SRCB_FWD
(const byte) DTV_BLIT_SRCB_FWD#0 DTV_BLIT_SRCB_FWD = (byte) 4
(byte) DTV_BLIT_STATUS_BUSY
(const byte) DTV_BLIT_STATUS_BUSY#0 DTV_BLIT_STATUS_BUSY = (byte) 1
(byte) DTV_BLIT_TRANSPARANCY_NONE
(const byte) DTV_BLIT_TRANSPARANCY_NONE#0 DTV_BLIT_TRANSPARANCY_NONE = (byte) 0
(byte*) DTV_FEATURE
(const byte*) DTV_FEATURE#0 DTV_FEATURE = (byte*) 53311
(byte) DTV_FEATURE_ENABLE
(const byte) DTV_FEATURE_ENABLE#0 DTV_FEATURE_ENABLE = (byte) 1
(byte*) SCREEN
(const byte*) SCREEN#0 SCREEN = (byte*) 1024
(byte[]) SRCA
(const byte[]) SRCA#0 SRCA = (string) "camelot rules!@"
(byte[]) SRCB
(const byte[]) SRCB#0 SRCB = { (byte) $80 }
(void()) main()
(byte~) main::$25 reg byte a 22.0
(label) main::@1
(label) main::@return
reg byte a [ main::$25 ]
FINAL ASSEMBLER
Score: 291
//SEG0 File Comments
// Fill a box on the screen using the blitter
//SEG1 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
.pc = $80d "Program"
//SEG2 Global Constants & labels
// Feature enables or disables the extra C64 DTV features
.label DTV_FEATURE = $d03f
.const DTV_FEATURE_ENABLE = 1
// Blitter Source A Start
.label DTV_BLITTER_SRCA_LO = $d320
.label DTV_BLITTER_SRCA_MI = $d321
.label DTV_BLITTER_SRCA_HI = $d322
// Blitter Source A Modulo
.label DTV_BLITTER_SRCA_MOD_LO = $d323
.label DTV_BLITTER_SRCA_MOD_HI = $d324
// Blitter Source A Line Length
.label DTV_BLITTER_SRCA_LIN_LO = $d325
.label DTV_BLITTER_SRCA_LIN_HI = $d326
// Blitter Source A Step ([7:4] integral part, [3:0] fractional part)
.label DTV_BLITTER_SRCA_STEP = $d327
// Blitter Source B Start
.label DTV_BLITTER_SRCB_LO = $d328
.label DTV_BLITTER_SRCB_MI = $d329
.label DTV_BLITTER_SRCB_HI = $d32a
// Blitter Source B Modulo
.label DTV_BLITTER_SRCB_MOD_LO = $d32b
.label DTV_BLITTER_SRCB_MOD_HI = $d32c
// Blitter Source B Line Length
.label DTV_BLITTER_SRCB_LIN_LO = $d32d
.label DTV_BLITTER_SRCB_LIN_HI = $d32e
// Blitter Source B Step ([7:4] integral part, [3:0] fractional part)
.label DTV_BLITTER_SRCB_STEP = $d32f
// Blitter Destination Start
.label DTV_BLITTER_DEST_LO = $d330
.label DTV_BLITTER_DEST_MI = $d331
.label DTV_BLITTER_DEST_HI = $d332
// Blitter Source B Modulo
.label DTV_BLITTER_DEST_MOD_LO = $d333
.label DTV_BLITTER_DEST_MOD_HI = $d334
// Blitter Source B Line Length
.label DTV_BLITTER_DEST_LIN_LO = $d335
.label DTV_BLITTER_DEST_LIN_HI = $d336
// Blitter Source B Step ([7:4] integral part, [3:0] fractional part)
.label DTV_BLITTER_DEST_STEP = $d337
// Blitter Blit Length
.label DTV_BLITTER_LEN_LO = $d338
.label DTV_BLITTER_LEN_HI = $d339
// Blitter Control
.label DTV_BLITTER_CONTROL = $d33a
// Bit[0] Force Start Strobe when set
.const DTV_BLIT_FORCE_START = 1
// Bit[1] Source A Direction Positive when set
.const DTV_BLIT_SRCA_FWD = 2
// Bit[2] Source B Direction Positive when set
.const DTV_BLIT_SRCB_FWD = 4
// Bit[3] Destination Direction Positive when set
.const DTV_BLIT_DEST_FWD = 8
// Blitter Transparency
.label DTV_BLITTER_TRANSPARANCY = $d33b
// No transparancy
// Bit[2]==Bit[1]==0: write in any case
.const DTV_BLIT_TRANSPARANCY_NONE = 0
// Controls the ALU operation
.label DTV_BLITTER_ALU = $d33e
.const DTV_BLIT_ADD = $30
// Blitter Control 2
.label DTV_BLITTER_CONTROL2 = $d33f
// Bit[0] Clear Blitter IRQ
.const DTV_BLIT_CLEAR_IRQ = 1
// Bit[3] Destination Continue
.const DTV_BLIT_DEST_CONT = 8
// Bit[0] Busy when set (When reading)
.const DTV_BLIT_STATUS_BUSY = 1
.label SCREEN = $400
//SEG3 @begin
//SEG4 [1] phi from @begin to @1 [phi:@begin->@1]
//SEG5 @1
//SEG6 [2] call main
//SEG7 [3] phi from @1 to @end [phi:@1->@end]
//SEG8 @end
//SEG9 main
main: {
//SEG10 [4] *((const byte*) DTV_FEATURE#0) ← (const byte) DTV_FEATURE_ENABLE#0 -- _deref_pbuc1=vbuc2
lda #DTV_FEATURE_ENABLE
sta DTV_FEATURE
//SEG11 [5] *((const byte*) DTV_BLITTER_CONTROL2#0) ← (const byte) DTV_BLIT_CLEAR_IRQ#0 -- _deref_pbuc1=vbuc2
// Instruct blitter not to continue previous blit
lda #DTV_BLIT_CLEAR_IRQ
sta DTV_BLITTER_CONTROL2
//SEG12 [6] *((const byte*) DTV_BLITTER_SRCA_LO#0) ← <(const byte[]) SRCA#0 -- _deref_pbuc1=vbuc2
lda #<SRCA
sta DTV_BLITTER_SRCA_LO
//SEG13 [7] *((const byte*) DTV_BLITTER_SRCA_MI#0) ← >(const byte[]) SRCA#0 -- _deref_pbuc1=vbuc2
lda #>SRCA
sta DTV_BLITTER_SRCA_MI
//SEG14 [8] *((const byte*) DTV_BLITTER_SRCA_HI#0) ← (byte) 0 -- _deref_pbuc1=vbuc2
lda #0
sta DTV_BLITTER_SRCA_HI
//SEG15 [9] *((const byte*) DTV_BLITTER_SRCA_MOD_LO#0) ← (byte) 0 -- _deref_pbuc1=vbuc2
sta DTV_BLITTER_SRCA_MOD_LO
//SEG16 [10] *((const byte*) DTV_BLITTER_SRCA_MOD_HI#0) ← (byte) 0 -- _deref_pbuc1=vbuc2
sta DTV_BLITTER_SRCA_MOD_HI
//SEG17 [11] *((const byte*) DTV_BLITTER_SRCA_LIN_LO#0) ← (byte) 0 -- _deref_pbuc1=vbuc2
sta DTV_BLITTER_SRCA_LIN_LO
//SEG18 [12] *((const byte*) DTV_BLITTER_SRCA_LIN_HI#0) ← >(word) $100 -- _deref_pbuc1=vbuc2
lda #>$100
sta DTV_BLITTER_SRCA_LIN_HI
//SEG19 [13] *((const byte*) DTV_BLITTER_SRCA_STEP#0) ← (byte) 1 -- _deref_pbuc1=vbuc2
lda #1
sta DTV_BLITTER_SRCA_STEP
//SEG20 [14] *((const byte*) DTV_BLITTER_SRCB_LO#0) ← <(const byte[]) SRCB#0 -- _deref_pbuc1=vbuc2
// Step 0.0
lda #<SRCB
sta DTV_BLITTER_SRCB_LO
//SEG21 [15] *((const byte*) DTV_BLITTER_SRCB_MI#0) ← >(const byte[]) SRCB#0 -- _deref_pbuc1=vbuc2
lda #>SRCB
sta DTV_BLITTER_SRCB_MI
//SEG22 [16] *((const byte*) DTV_BLITTER_SRCB_HI#0) ← (byte) 0 -- _deref_pbuc1=vbuc2
lda #0
sta DTV_BLITTER_SRCB_HI
//SEG23 [17] *((const byte*) DTV_BLITTER_SRCB_MOD_LO#0) ← (byte) 0 -- _deref_pbuc1=vbuc2
sta DTV_BLITTER_SRCB_MOD_LO
//SEG24 [18] *((const byte*) DTV_BLITTER_SRCB_MOD_HI#0) ← (byte) 0 -- _deref_pbuc1=vbuc2
sta DTV_BLITTER_SRCB_MOD_HI
//SEG25 [19] *((const byte*) DTV_BLITTER_SRCB_LIN_LO#0) ← (byte) 0 -- _deref_pbuc1=vbuc2
sta DTV_BLITTER_SRCB_LIN_LO
//SEG26 [20] *((const byte*) DTV_BLITTER_SRCB_LIN_HI#0) ← >(word) $100 -- _deref_pbuc1=vbuc2
lda #>$100
sta DTV_BLITTER_SRCB_LIN_HI
//SEG27 [21] *((const byte*) DTV_BLITTER_SRCB_STEP#0) ← (byte) 0 -- _deref_pbuc1=vbuc2
lda #0
sta DTV_BLITTER_SRCB_STEP
//SEG28 [22] *((const byte*) DTV_BLITTER_DEST_LO#0) ← <(const byte*) SCREEN#0+(byte) $28+(byte) 5 -- _deref_pbuc1=vbuc2
// Step 0.0
lda #<SCREEN+$28+5
sta DTV_BLITTER_DEST_LO
//SEG29 [23] *((const byte*) DTV_BLITTER_DEST_MI#0) ← >(const byte*) SCREEN#0+(byte) $28+(byte) 5 -- _deref_pbuc1=vbuc2
lda #>SCREEN+$28+5
sta DTV_BLITTER_DEST_MI
//SEG30 [24] *((const byte*) DTV_BLITTER_DEST_HI#0) ← (byte) 0 -- _deref_pbuc1=vbuc2
lda #0
sta DTV_BLITTER_DEST_HI
//SEG31 [25] *((const byte*) DTV_BLITTER_DEST_MOD_LO#0) ← <(word) $15 -- _deref_pbuc1=vbuc2
lda #<$15
sta DTV_BLITTER_DEST_MOD_LO
//SEG32 [26] *((const byte*) DTV_BLITTER_DEST_MOD_HI#0) ← (byte) 0 -- _deref_pbuc1=vbuc2
lda #0
sta DTV_BLITTER_DEST_MOD_HI
//SEG33 [27] *((const byte*) DTV_BLITTER_DEST_LIN_LO#0) ← <(word) $13 -- _deref_pbuc1=vbuc2
lda #<$13
sta DTV_BLITTER_DEST_LIN_LO
//SEG34 [28] *((const byte*) DTV_BLITTER_DEST_LIN_HI#0) ← (byte) 0 -- _deref_pbuc1=vbuc2
lda #0
sta DTV_BLITTER_DEST_LIN_HI
//SEG35 [29] *((const byte*) DTV_BLITTER_DEST_STEP#0) ← (byte) $10 -- _deref_pbuc1=vbuc2
lda #$10
sta DTV_BLITTER_DEST_STEP
//SEG36 [30] *((const byte*) DTV_BLITTER_LEN_LO#0) ← <(byte) $14*(word) $a -- _deref_pbuc1=vbuc2
// Step 1.0
lda #<$14*$a
sta DTV_BLITTER_LEN_LO
//SEG37 [31] *((const byte*) DTV_BLITTER_LEN_HI#0) ← (byte) 0 -- _deref_pbuc1=vbuc2
lda #0
sta DTV_BLITTER_LEN_HI
//SEG38 [32] *((const byte*) DTV_BLITTER_ALU#0) ← (const byte) DTV_BLIT_ADD#0 -- _deref_pbuc1=vbuc2
lda #DTV_BLIT_ADD
sta DTV_BLITTER_ALU
//SEG39 [33] *((const byte*) DTV_BLITTER_TRANSPARANCY#0) ← (const byte) DTV_BLIT_TRANSPARANCY_NONE#0 -- _deref_pbuc1=vbuc2
lda #DTV_BLIT_TRANSPARANCY_NONE
sta DTV_BLITTER_TRANSPARANCY
//SEG40 [34] *((const byte*) DTV_BLITTER_CONTROL#0) ← (const byte) DTV_BLIT_FORCE_START#0|(const byte) DTV_BLIT_SRCA_FWD#0|(const byte) DTV_BLIT_SRCB_FWD#0|(const byte) DTV_BLIT_DEST_FWD#0 -- _deref_pbuc1=vbuc2
// Start blitter
lda #DTV_BLIT_FORCE_START|DTV_BLIT_SRCA_FWD|DTV_BLIT_SRCB_FWD|DTV_BLIT_DEST_FWD
sta DTV_BLITTER_CONTROL
//SEG41 [35] *((const byte*) DTV_BLITTER_CONTROL2#0) ← (const byte) DTV_BLIT_DEST_CONT#0 -- _deref_pbuc1=vbuc2
// Instruct blitter to continue at DEST and restart SRC A/B
lda #DTV_BLIT_DEST_CONT
sta DTV_BLITTER_CONTROL2
// wait til blitter is ready
//SEG42 main::@1
b1:
//SEG43 [36] (byte~) main::$25 ← *((const byte*) DTV_BLITTER_CONTROL2#0) & (const byte) DTV_BLIT_STATUS_BUSY#0 -- vbuaa=_deref_pbuc1_band_vbuc2
lda #DTV_BLIT_STATUS_BUSY
and DTV_BLITTER_CONTROL2
//SEG44 [37] if((byte~) main::$25!=(byte) 0) goto main::@1 -- vbuaa_neq_0_then_la1
cmp #0
bne b1
//SEG45 main::@return
//SEG46 [38] return
rts
}
SRCA: .text "camelot rules!@"
SRCB: .byte $80