Identified constant variable (byte*) dtvSetCpuBankSegment1::cpuBank
Identified constant variable (byte*) DTV_BLITTER_ALU
Inlined call (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) @4
Culled Empty Block (label) @5
Culled Empty Block (label) main::@2

CONTROL FLOW GRAPH SSA
@begin: scope:[]  from
  to:@6

(void()) main()
main: scope:[main]  from @6
  *((const byte*) DTV_FEATURE) ← (const byte) DTV_FEATURE_ENABLE
  *((const byte*) DTV_BLITTER_CONTROL2) ← (const byte) DTV_BLIT_CLEAR_IRQ
  *((const byte*) DTV_BLITTER_SRCA_LO) ← <(const byte*) SRCA
  *((const byte*) DTV_BLITTER_SRCA_MI) ← >(const byte*) SRCA
  *((const byte*) DTV_BLITTER_SRCA_HI) ← (number) 0
  *((const byte*) DTV_BLITTER_SRCA_MOD_LO) ← (number) 0
  *((const byte*) DTV_BLITTER_SRCA_MOD_HI) ← (number) 0
  *((const byte*) DTV_BLITTER_SRCA_LIN_LO) ← <(word) $100
  *((const byte*) DTV_BLITTER_SRCA_LIN_HI) ← >(word) $100
  *((const byte*) DTV_BLITTER_SRCA_STEP) ← (number) 1
  *((const byte*) DTV_BLITTER_SRCB_LO) ← <(const byte*) SRCB
  *((const byte*) DTV_BLITTER_SRCB_MI) ← >(const byte*) SRCB
  *((const byte*) DTV_BLITTER_SRCB_HI) ← (number) 0
  *((const byte*) DTV_BLITTER_SRCB_MOD_LO) ← (number) 0
  *((const byte*) DTV_BLITTER_SRCB_MOD_HI) ← (number) 0
  *((const byte*) DTV_BLITTER_SRCB_LIN_LO) ← <(word) $100
  *((const byte*) DTV_BLITTER_SRCB_LIN_HI) ← >(word) $100
  *((const byte*) DTV_BLITTER_SRCB_STEP) ← (number) 0
  *((const byte*) DTV_BLITTER_DEST_LO) ← <(const byte*) SCREEN+(number) $28+(number) 5
  *((const byte*) DTV_BLITTER_DEST_MI) ← >(const byte*) SCREEN+(number) $28+(number) 5
  *((const byte*) DTV_BLITTER_DEST_HI) ← (number) 0
  *((const byte*) DTV_BLITTER_DEST_MOD_LO) ← <(word) $15
  *((const byte*) DTV_BLITTER_DEST_MOD_HI) ← >(word) $15
  *((const byte*) DTV_BLITTER_DEST_LIN_LO) ← <(word) $13
  *((const byte*) DTV_BLITTER_DEST_LIN_HI) ← >(word) $13
  *((const byte*) DTV_BLITTER_DEST_STEP) ← (number) $10
  *((const byte*) DTV_BLITTER_LEN_LO) ← <(number) $14*(word) $a
  *((const byte*) DTV_BLITTER_LEN_HI) ← >(number) $14*(word) $a
  *((const byte*) DTV_BLITTER_ALU) ← (const byte) DTV_BLIT_ADD
  *((const byte*) DTV_BLITTER_TRANSPARANCY) ← (const byte) DTV_BLIT_TRANSPARANCY_NONE
  *((const byte*) DTV_BLITTER_CONTROL) ← (const byte) DTV_BLIT_FORCE_START|(const byte) DTV_BLIT_SRCA_FWD|(const byte) DTV_BLIT_SRCB_FWD|(const byte) DTV_BLIT_DEST_FWD
  *((const byte*) DTV_BLITTER_CONTROL2) ← (const byte) DTV_BLIT_DEST_CONT
  to:main::@1
main::@1: scope:[main]  from main main::@1
  (byte~) main::$0 ← *((const byte*) DTV_BLITTER_CONTROL2) & (const byte) DTV_BLIT_STATUS_BUSY
  (bool~) main::$1 ← (byte~) main::$0 != (number) 0
  if((bool~) main::$1) goto main::@1
  to:main::@return
main::@return: scope:[main]  from main::@1
  return 
  to:@return
@6: scope:[]  from @begin
  call main 
  to:@7
@7: scope:[]  from @6
  to:@end
@end: scope:[]  from @7

SYMBOL TABLE SSA
(label) @6
(label) @7
(label) @begin
(label) @end
(const byte*) DTV_BLITTER_ALU = (byte*)(number) $d33e
(const byte*) DTV_BLITTER_CONTROL = (byte*)(number) $d33a
(const byte*) DTV_BLITTER_CONTROL2 = (byte*)(number) $d33f
(const byte*) DTV_BLITTER_DEST_HI = (byte*)(number) $d332
(const byte*) DTV_BLITTER_DEST_LIN_HI = (byte*)(number) $d336
(const byte*) DTV_BLITTER_DEST_LIN_LO = (byte*)(number) $d335
(const byte*) DTV_BLITTER_DEST_LO = (byte*)(number) $d330
(const byte*) DTV_BLITTER_DEST_MI = (byte*)(number) $d331
(const byte*) DTV_BLITTER_DEST_MOD_HI = (byte*)(number) $d334
(const byte*) DTV_BLITTER_DEST_MOD_LO = (byte*)(number) $d333
(const byte*) DTV_BLITTER_DEST_STEP = (byte*)(number) $d337
(const byte*) DTV_BLITTER_LEN_HI = (byte*)(number) $d339
(const byte*) DTV_BLITTER_LEN_LO = (byte*)(number) $d338
(const byte*) DTV_BLITTER_SRCA_HI = (byte*)(number) $d322
(const byte*) DTV_BLITTER_SRCA_LIN_HI = (byte*)(number) $d326
(const byte*) DTV_BLITTER_SRCA_LIN_LO = (byte*)(number) $d325
(const byte*) DTV_BLITTER_SRCA_LO = (byte*)(number) $d320
(const byte*) DTV_BLITTER_SRCA_MI = (byte*)(number) $d321
(const byte*) DTV_BLITTER_SRCA_MOD_HI = (byte*)(number) $d324
(const byte*) DTV_BLITTER_SRCA_MOD_LO = (byte*)(number) $d323
(const byte*) DTV_BLITTER_SRCA_STEP = (byte*)(number) $d327
(const byte*) DTV_BLITTER_SRCB_HI = (byte*)(number) $d32a
(const byte*) DTV_BLITTER_SRCB_LIN_HI = (byte*)(number) $d32e
(const byte*) DTV_BLITTER_SRCB_LIN_LO = (byte*)(number) $d32d
(const byte*) DTV_BLITTER_SRCB_LO = (byte*)(number) $d328
(const byte*) DTV_BLITTER_SRCB_MI = (byte*)(number) $d329
(const byte*) DTV_BLITTER_SRCB_MOD_HI = (byte*)(number) $d32c
(const byte*) DTV_BLITTER_SRCB_MOD_LO = (byte*)(number) $d32b
(const byte*) DTV_BLITTER_SRCB_STEP = (byte*)(number) $d32f
(const byte*) DTV_BLITTER_TRANSPARANCY = (byte*)(number) $d33b
(const byte) DTV_BLIT_ADD = (byte) $30
(const byte) DTV_BLIT_CLEAR_IRQ = (byte) 1
(const byte) DTV_BLIT_DEST_CONT = (byte) 8
(const byte) DTV_BLIT_DEST_FWD = (byte) 8
(const byte) DTV_BLIT_FORCE_START = (byte) 1
(const byte) DTV_BLIT_SRCA_FWD = (byte) 2
(const byte) DTV_BLIT_SRCB_FWD = (byte) 4
(const byte) DTV_BLIT_STATUS_BUSY = (byte) 1
(const byte) DTV_BLIT_TRANSPARANCY_NONE = (byte) 0
(const byte*) DTV_FEATURE = (byte*)(number) $d03f
(const byte) DTV_FEATURE_ENABLE = (byte) 1
(const byte*) SCREEN = (byte*)(number) $400
(const byte*) SRCA[]  = (byte*) "camelot rules!"
(const byte*) SRCB[]  = { (byte) $80 }
(void()) main()
(byte~) main::$0
(bool~) main::$1
(label) main::@1
(label) main::@return

Adding number conversion cast (unumber) 0 in *((const byte*) DTV_BLITTER_SRCA_HI) ← (number) 0
Adding number conversion cast (unumber) 0 in *((const byte*) DTV_BLITTER_SRCA_MOD_LO) ← (number) 0
Adding number conversion cast (unumber) 0 in *((const byte*) DTV_BLITTER_SRCA_MOD_HI) ← (number) 0
Adding number conversion cast (unumber) 1 in *((const byte*) DTV_BLITTER_SRCA_STEP) ← (number) 1
Adding number conversion cast (unumber) 0 in *((const byte*) DTV_BLITTER_SRCB_HI) ← (number) 0
Adding number conversion cast (unumber) 0 in *((const byte*) DTV_BLITTER_SRCB_MOD_LO) ← (number) 0
Adding number conversion cast (unumber) 0 in *((const byte*) DTV_BLITTER_SRCB_MOD_HI) ← (number) 0
Adding number conversion cast (unumber) 0 in *((const byte*) DTV_BLITTER_SRCB_STEP) ← (number) 0
Adding number conversion cast (unumber) 5 in *((const byte*) DTV_BLITTER_DEST_LO) ← <(const byte*) SCREEN+(number) $28+(number) 5
Adding number conversion cast (unumber) $28 in *((const byte*) DTV_BLITTER_DEST_LO) ← <(const byte*) SCREEN+(number) $28+(unumber)(number) 5
Adding number conversion cast (unumber) 5 in *((const byte*) DTV_BLITTER_DEST_MI) ← >(const byte*) SCREEN+(number) $28+(number) 5
Adding number conversion cast (unumber) $28 in *((const byte*) DTV_BLITTER_DEST_MI) ← >(const byte*) SCREEN+(number) $28+(unumber)(number) 5
Adding number conversion cast (unumber) 0 in *((const byte*) DTV_BLITTER_DEST_HI) ← (number) 0
Adding number conversion cast (unumber) $10 in *((const byte*) DTV_BLITTER_DEST_STEP) ← (number) $10
Adding number conversion cast (unumber) <$14*$a in *((const byte*) DTV_BLITTER_LEN_LO) ← <(number) $14*(word) $a
Adding number conversion cast (unumber) $14 in *((const byte*) DTV_BLITTER_LEN_LO) ← ((unumber)) <(number) $14*(word) $a
Adding number conversion cast (unumber) >$14*$a in *((const byte*) DTV_BLITTER_LEN_HI) ← >(number) $14*(word) $a
Adding number conversion cast (unumber) $14 in *((const byte*) DTV_BLITTER_LEN_HI) ← ((unumber)) >(number) $14*(word) $a
Adding number conversion cast (unumber) 0 in (bool~) main::$1 ← (byte~) main::$0 != (number) 0
Successful SSA optimization PassNAddNumberTypeConversions
Inlining cast *((const byte*) DTV_BLITTER_SRCA_HI) ← (unumber)(number) 0
Inlining cast *((const byte*) DTV_BLITTER_SRCA_MOD_LO) ← (unumber)(number) 0
Inlining cast *((const byte*) DTV_BLITTER_SRCA_MOD_HI) ← (unumber)(number) 0
Inlining cast *((const byte*) DTV_BLITTER_SRCA_STEP) ← (unumber)(number) 1
Inlining cast *((const byte*) DTV_BLITTER_SRCB_HI) ← (unumber)(number) 0
Inlining cast *((const byte*) DTV_BLITTER_SRCB_MOD_LO) ← (unumber)(number) 0
Inlining cast *((const byte*) DTV_BLITTER_SRCB_MOD_HI) ← (unumber)(number) 0
Inlining cast *((const byte*) DTV_BLITTER_SRCB_STEP) ← (unumber)(number) 0
Inlining cast *((const byte*) DTV_BLITTER_DEST_HI) ← (unumber)(number) 0
Inlining cast *((const byte*) DTV_BLITTER_DEST_STEP) ← (unumber)(number) $10
Inlining cast *((const byte*) DTV_BLITTER_LEN_LO) ← (unumber)<(unumber)(number) $14*(word) $a
Inlining cast *((const byte*) DTV_BLITTER_LEN_HI) ← (unumber)>(unumber)(number) $14*(word) $a
Successful SSA optimization Pass2InlineCast
Simplifying constant pointer cast (byte*) 53311
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 pointer cast (byte*) 54075
Simplifying constant pointer cast (byte*) 54079
Simplifying constant pointer cast (byte*) 1024
Simplifying constant pointer cast (byte*) 54078
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 <(unumber)(number) $14*(word) $a
Simplifying constant integer cast $14
Simplifying constant integer cast >(unumber)(number) $14*(word) $a
Simplifying constant integer cast $14
Simplifying constant integer cast 0
Successful SSA optimization PassNCastSimplification
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
Simple Condition (bool~) main::$1 [34] if((byte~) main::$0!=(byte) 0) goto main::@1
Successful SSA optimization Pass2ConditionalJumpSimplification
Simplifying constant evaluating to zero <(word) $100 in [7] *((const byte*) DTV_BLITTER_SRCA_LIN_LO) ← <(word) $100
Simplifying constant evaluating to zero <(word) $100 in [15] *((const byte*) DTV_BLITTER_SRCB_LIN_LO) ← <(word) $100
Simplifying constant evaluating to zero >(word) $15 in [22] *((const byte*) DTV_BLITTER_DEST_MOD_HI) ← >(word) $15
Simplifying constant evaluating to zero >(word) $13 in [24] *((const byte*) DTV_BLITTER_DEST_LIN_HI) ← >(word) $13
Simplifying constant evaluating to zero >(byte) $14*(word) $a in [27] *((const byte*) DTV_BLITTER_LEN_HI) ← >(byte) $14*(word) $a
Successful SSA optimization PassNSimplifyConstantZero
Adding NOP phi() at start of @begin
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:2 

Created 0 initial phi equivalence classes
Coalesced down to 0 phi equivalence classes
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()

(void()) main()
main: scope:[main]  from @1
  [4] *((const byte*) DTV_FEATURE) ← (const byte) DTV_FEATURE_ENABLE
  [5] *((const byte*) DTV_BLITTER_CONTROL2) ← (const byte) DTV_BLIT_CLEAR_IRQ
  [6] *((const byte*) DTV_BLITTER_SRCA_LO) ← <(const byte*) SRCA
  [7] *((const byte*) DTV_BLITTER_SRCA_MI) ← >(const byte*) SRCA
  [8] *((const byte*) DTV_BLITTER_SRCA_HI) ← (byte) 0
  [9] *((const byte*) DTV_BLITTER_SRCA_MOD_LO) ← (byte) 0
  [10] *((const byte*) DTV_BLITTER_SRCA_MOD_HI) ← (byte) 0
  [11] *((const byte*) DTV_BLITTER_SRCA_LIN_LO) ← (byte) 0
  [12] *((const byte*) DTV_BLITTER_SRCA_LIN_HI) ← >(word) $100
  [13] *((const byte*) DTV_BLITTER_SRCA_STEP) ← (byte) 1
  [14] *((const byte*) DTV_BLITTER_SRCB_LO) ← <(const byte*) SRCB
  [15] *((const byte*) DTV_BLITTER_SRCB_MI) ← >(const byte*) SRCB
  [16] *((const byte*) DTV_BLITTER_SRCB_HI) ← (byte) 0
  [17] *((const byte*) DTV_BLITTER_SRCB_MOD_LO) ← (byte) 0
  [18] *((const byte*) DTV_BLITTER_SRCB_MOD_HI) ← (byte) 0
  [19] *((const byte*) DTV_BLITTER_SRCB_LIN_LO) ← (byte) 0
  [20] *((const byte*) DTV_BLITTER_SRCB_LIN_HI) ← >(word) $100
  [21] *((const byte*) DTV_BLITTER_SRCB_STEP) ← (byte) 0
  [22] *((const byte*) DTV_BLITTER_DEST_LO) ← <(const byte*) SCREEN+(byte) $28+(byte) 5
  [23] *((const byte*) DTV_BLITTER_DEST_MI) ← >(const byte*) SCREEN+(byte) $28+(byte) 5
  [24] *((const byte*) DTV_BLITTER_DEST_HI) ← (byte) 0
  [25] *((const byte*) DTV_BLITTER_DEST_MOD_LO) ← <(word) $15
  [26] *((const byte*) DTV_BLITTER_DEST_MOD_HI) ← (byte) 0
  [27] *((const byte*) DTV_BLITTER_DEST_LIN_LO) ← <(word) $13
  [28] *((const byte*) DTV_BLITTER_DEST_LIN_HI) ← (byte) 0
  [29] *((const byte*) DTV_BLITTER_DEST_STEP) ← (byte) $10
  [30] *((const byte*) DTV_BLITTER_LEN_LO) ← <(byte) $14*(word) $a
  [31] *((const byte*) DTV_BLITTER_LEN_HI) ← (byte) 0
  [32] *((const byte*) DTV_BLITTER_ALU) ← (const byte) DTV_BLIT_ADD
  [33] *((const byte*) DTV_BLITTER_TRANSPARANCY) ← (const byte) DTV_BLIT_TRANSPARANCY_NONE
  [34] *((const byte*) DTV_BLITTER_CONTROL) ← (const byte) DTV_BLIT_FORCE_START|(const byte) DTV_BLIT_SRCA_FWD|(const byte) DTV_BLIT_SRCB_FWD|(const byte) DTV_BLIT_DEST_FWD
  [35] *((const byte*) DTV_BLITTER_CONTROL2) ← (const byte) DTV_BLIT_DEST_CONT
  to:main::@1
main::@1: scope:[main]  from main main::@1
  [36] (byte~) main::$0 ← *((const byte*) DTV_BLITTER_CONTROL2) & (const byte) DTV_BLIT_STATUS_BUSY
  [37] if((byte~) main::$0!=(byte) 0) goto main::@1
  to:main::@return
main::@return: scope:[main]  from main::@1
  [38] return 
  to:@return


VARIABLE REGISTER WEIGHTS
(void()) main()
(byte~) main::$0 22.0

Initial phi equivalence classes
Added variable main::$0 to live range equivalence class [ main::$0 ]
Complete equivalence classes
[ main::$0 ]
Allocated zp[1]:2 [ main::$0 ]

INITIAL ASM
Target platform is c64basic / MOS6502X
  // File Comments
// Fill a box on the screen using the blitter
  // Upstart
.pc = $801 "Basic"
:BasicUpstart(__bbegin)
.pc = $80d "Program"
  // 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
  .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
  // Controls the ALU operation
  .label DTV_BLITTER_ALU = $d33e
  // @begin
__bbegin:
  // [1] phi from @begin to @1 [phi:@begin->@1]
__b1_from___bbegin:
  jmp __b1
  // @1
__b1:
  // [2] call main 
  jsr main
  // [3] phi from @1 to @end [phi:@1->@end]
__bend_from___b1:
  jmp __bend
  // @end
__bend:
  // main
main: {
    .label __0 = 2
    // [4] *((const byte*) DTV_FEATURE) ← (const byte) DTV_FEATURE_ENABLE -- _deref_pbuc1=vbuc2 
    lda #DTV_FEATURE_ENABLE
    sta DTV_FEATURE
    // [5] *((const byte*) DTV_BLITTER_CONTROL2) ← (const byte) DTV_BLIT_CLEAR_IRQ -- _deref_pbuc1=vbuc2 
    // Instruct blitter not to continue previous blit
    lda #DTV_BLIT_CLEAR_IRQ
    sta DTV_BLITTER_CONTROL2
    // [6] *((const byte*) DTV_BLITTER_SRCA_LO) ← <(const byte*) SRCA -- _deref_pbuc1=vbuc2 
    lda #<SRCA
    sta DTV_BLITTER_SRCA_LO
    // [7] *((const byte*) DTV_BLITTER_SRCA_MI) ← >(const byte*) SRCA -- _deref_pbuc1=vbuc2 
    lda #>SRCA
    sta DTV_BLITTER_SRCA_MI
    // [8] *((const byte*) DTV_BLITTER_SRCA_HI) ← (byte) 0 -- _deref_pbuc1=vbuc2 
    lda #0
    sta DTV_BLITTER_SRCA_HI
    // [9] *((const byte*) DTV_BLITTER_SRCA_MOD_LO) ← (byte) 0 -- _deref_pbuc1=vbuc2 
    lda #0
    sta DTV_BLITTER_SRCA_MOD_LO
    // [10] *((const byte*) DTV_BLITTER_SRCA_MOD_HI) ← (byte) 0 -- _deref_pbuc1=vbuc2 
    lda #0
    sta DTV_BLITTER_SRCA_MOD_HI
    // [11] *((const byte*) DTV_BLITTER_SRCA_LIN_LO) ← (byte) 0 -- _deref_pbuc1=vbuc2 
    lda #0
    sta DTV_BLITTER_SRCA_LIN_LO
    // [12] *((const byte*) DTV_BLITTER_SRCA_LIN_HI) ← >(word) $100 -- _deref_pbuc1=vbuc2 
    lda #>$100
    sta DTV_BLITTER_SRCA_LIN_HI
    // [13] *((const byte*) DTV_BLITTER_SRCA_STEP) ← (byte) 1 -- _deref_pbuc1=vbuc2 
    lda #1
    sta DTV_BLITTER_SRCA_STEP
    // [14] *((const byte*) DTV_BLITTER_SRCB_LO) ← <(const byte*) SRCB -- _deref_pbuc1=vbuc2 
    // Step 0.0
    lda #<SRCB
    sta DTV_BLITTER_SRCB_LO
    // [15] *((const byte*) DTV_BLITTER_SRCB_MI) ← >(const byte*) SRCB -- _deref_pbuc1=vbuc2 
    lda #>SRCB
    sta DTV_BLITTER_SRCB_MI
    // [16] *((const byte*) DTV_BLITTER_SRCB_HI) ← (byte) 0 -- _deref_pbuc1=vbuc2 
    lda #0
    sta DTV_BLITTER_SRCB_HI
    // [17] *((const byte*) DTV_BLITTER_SRCB_MOD_LO) ← (byte) 0 -- _deref_pbuc1=vbuc2 
    lda #0
    sta DTV_BLITTER_SRCB_MOD_LO
    // [18] *((const byte*) DTV_BLITTER_SRCB_MOD_HI) ← (byte) 0 -- _deref_pbuc1=vbuc2 
    lda #0
    sta DTV_BLITTER_SRCB_MOD_HI
    // [19] *((const byte*) DTV_BLITTER_SRCB_LIN_LO) ← (byte) 0 -- _deref_pbuc1=vbuc2 
    lda #0
    sta DTV_BLITTER_SRCB_LIN_LO
    // [20] *((const byte*) DTV_BLITTER_SRCB_LIN_HI) ← >(word) $100 -- _deref_pbuc1=vbuc2 
    lda #>$100
    sta DTV_BLITTER_SRCB_LIN_HI
    // [21] *((const byte*) DTV_BLITTER_SRCB_STEP) ← (byte) 0 -- _deref_pbuc1=vbuc2 
    lda #0
    sta DTV_BLITTER_SRCB_STEP
    // [22] *((const byte*) DTV_BLITTER_DEST_LO) ← <(const byte*) SCREEN+(byte) $28+(byte) 5 -- _deref_pbuc1=vbuc2 
    // Step 0.0
    lda #<SCREEN+$28+5
    sta DTV_BLITTER_DEST_LO
    // [23] *((const byte*) DTV_BLITTER_DEST_MI) ← >(const byte*) SCREEN+(byte) $28+(byte) 5 -- _deref_pbuc1=vbuc2 
    lda #>SCREEN+$28+5
    sta DTV_BLITTER_DEST_MI
    // [24] *((const byte*) DTV_BLITTER_DEST_HI) ← (byte) 0 -- _deref_pbuc1=vbuc2 
    lda #0
    sta DTV_BLITTER_DEST_HI
    // [25] *((const byte*) DTV_BLITTER_DEST_MOD_LO) ← <(word) $15 -- _deref_pbuc1=vbuc2 
    lda #<$15
    sta DTV_BLITTER_DEST_MOD_LO
    // [26] *((const byte*) DTV_BLITTER_DEST_MOD_HI) ← (byte) 0 -- _deref_pbuc1=vbuc2 
    lda #0
    sta DTV_BLITTER_DEST_MOD_HI
    // [27] *((const byte*) DTV_BLITTER_DEST_LIN_LO) ← <(word) $13 -- _deref_pbuc1=vbuc2 
    lda #<$13
    sta DTV_BLITTER_DEST_LIN_LO
    // [28] *((const byte*) DTV_BLITTER_DEST_LIN_HI) ← (byte) 0 -- _deref_pbuc1=vbuc2 
    lda #0
    sta DTV_BLITTER_DEST_LIN_HI
    // [29] *((const byte*) DTV_BLITTER_DEST_STEP) ← (byte) $10 -- _deref_pbuc1=vbuc2 
    lda #$10
    sta DTV_BLITTER_DEST_STEP
    // [30] *((const byte*) DTV_BLITTER_LEN_LO) ← <(byte) $14*(word) $a -- _deref_pbuc1=vbuc2 
    // Step 1.0
    lda #<$14*$a
    sta DTV_BLITTER_LEN_LO
    // [31] *((const byte*) DTV_BLITTER_LEN_HI) ← (byte) 0 -- _deref_pbuc1=vbuc2 
    lda #0
    sta DTV_BLITTER_LEN_HI
    // [32] *((const byte*) DTV_BLITTER_ALU) ← (const byte) DTV_BLIT_ADD -- _deref_pbuc1=vbuc2 
    lda #DTV_BLIT_ADD
    sta DTV_BLITTER_ALU
    // [33] *((const byte*) DTV_BLITTER_TRANSPARANCY) ← (const byte) DTV_BLIT_TRANSPARANCY_NONE -- _deref_pbuc1=vbuc2 
    lda #DTV_BLIT_TRANSPARANCY_NONE
    sta DTV_BLITTER_TRANSPARANCY
    // [34] *((const byte*) DTV_BLITTER_CONTROL) ← (const byte) DTV_BLIT_FORCE_START|(const byte) DTV_BLIT_SRCA_FWD|(const byte) DTV_BLIT_SRCB_FWD|(const byte) DTV_BLIT_DEST_FWD -- _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
    // [35] *((const byte*) DTV_BLITTER_CONTROL2) ← (const byte) DTV_BLIT_DEST_CONT -- _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
    // main::@1
  __b1:
    // [36] (byte~) main::$0 ← *((const byte*) DTV_BLITTER_CONTROL2) & (const byte) DTV_BLIT_STATUS_BUSY -- vbuz1=_deref_pbuc1_band_vbuc2 
    lda #DTV_BLIT_STATUS_BUSY
    and DTV_BLITTER_CONTROL2
    sta.z __0
    // [37] if((byte~) main::$0!=(byte) 0) goto main::@1 -- vbuz1_neq_0_then_la1 
    lda.z __0
    cmp #0
    bne __b1
    jmp __breturn
    // main::@return
  __breturn:
    // [38] return 
    rts
}
  // File Data
  SRCA: .text "camelot rules!"
  .byte 0
  SRCB: .byte $80

REGISTER UPLIFT POTENTIAL REGISTERS
Statement [4] *((const byte*) DTV_FEATURE) ← (const byte) DTV_FEATURE_ENABLE [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [5] *((const byte*) DTV_BLITTER_CONTROL2) ← (const byte) DTV_BLIT_CLEAR_IRQ [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [6] *((const byte*) DTV_BLITTER_SRCA_LO) ← <(const byte*) SRCA [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [7] *((const byte*) DTV_BLITTER_SRCA_MI) ← >(const byte*) SRCA [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [8] *((const byte*) DTV_BLITTER_SRCA_HI) ← (byte) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [9] *((const byte*) DTV_BLITTER_SRCA_MOD_LO) ← (byte) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [10] *((const byte*) DTV_BLITTER_SRCA_MOD_HI) ← (byte) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [11] *((const byte*) DTV_BLITTER_SRCA_LIN_LO) ← (byte) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [12] *((const byte*) DTV_BLITTER_SRCA_LIN_HI) ← >(word) $100 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [13] *((const byte*) DTV_BLITTER_SRCA_STEP) ← (byte) 1 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [14] *((const byte*) DTV_BLITTER_SRCB_LO) ← <(const byte*) SRCB [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [15] *((const byte*) DTV_BLITTER_SRCB_MI) ← >(const byte*) SRCB [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [16] *((const byte*) DTV_BLITTER_SRCB_HI) ← (byte) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [17] *((const byte*) DTV_BLITTER_SRCB_MOD_LO) ← (byte) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [18] *((const byte*) DTV_BLITTER_SRCB_MOD_HI) ← (byte) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [19] *((const byte*) DTV_BLITTER_SRCB_LIN_LO) ← (byte) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [20] *((const byte*) DTV_BLITTER_SRCB_LIN_HI) ← >(word) $100 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [21] *((const byte*) DTV_BLITTER_SRCB_STEP) ← (byte) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [22] *((const byte*) DTV_BLITTER_DEST_LO) ← <(const byte*) SCREEN+(byte) $28+(byte) 5 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [23] *((const byte*) DTV_BLITTER_DEST_MI) ← >(const byte*) SCREEN+(byte) $28+(byte) 5 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [24] *((const byte*) DTV_BLITTER_DEST_HI) ← (byte) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [25] *((const byte*) DTV_BLITTER_DEST_MOD_LO) ← <(word) $15 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [26] *((const byte*) DTV_BLITTER_DEST_MOD_HI) ← (byte) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [27] *((const byte*) DTV_BLITTER_DEST_LIN_LO) ← <(word) $13 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [28] *((const byte*) DTV_BLITTER_DEST_LIN_HI) ← (byte) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [29] *((const byte*) DTV_BLITTER_DEST_STEP) ← (byte) $10 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [30] *((const byte*) DTV_BLITTER_LEN_LO) ← <(byte) $14*(word) $a [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [31] *((const byte*) DTV_BLITTER_LEN_HI) ← (byte) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [32] *((const byte*) DTV_BLITTER_ALU) ← (const byte) DTV_BLIT_ADD [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [33] *((const byte*) DTV_BLITTER_TRANSPARANCY) ← (const byte) DTV_BLIT_TRANSPARANCY_NONE [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [34] *((const byte*) DTV_BLITTER_CONTROL) ← (const byte) DTV_BLIT_FORCE_START|(const byte) DTV_BLIT_SRCA_FWD|(const byte) DTV_BLIT_SRCB_FWD|(const byte) DTV_BLIT_DEST_FWD [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [35] *((const byte*) DTV_BLITTER_CONTROL2) ← (const byte) DTV_BLIT_DEST_CONT [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [36] (byte~) main::$0 ← *((const byte*) DTV_BLITTER_CONTROL2) & (const byte) DTV_BLIT_STATUS_BUSY [ main::$0 ] ( main:2 [ main::$0 ] ) always clobbers reg byte a 
Potential registers zp[1]:2 [ main::$0 ] : zp[1]:2 , reg byte a , reg byte x , reg byte y , 

REGISTER UPLIFT SCOPES
Uplift Scope [main] 22: zp[1]:2 [ main::$0 ] 
Uplift Scope [] 

Uplifting [main] best 348 combination reg byte a [ main::$0 ] 
Uplifting [] best 348 combination 

ASSEMBLER BEFORE OPTIMIZATION
  // File Comments
// Fill a box on the screen using the blitter
  // Upstart
.pc = $801 "Basic"
:BasicUpstart(__bbegin)
.pc = $80d "Program"
  // 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
  .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
  // Controls the ALU operation
  .label DTV_BLITTER_ALU = $d33e
  // @begin
__bbegin:
  // [1] phi from @begin to @1 [phi:@begin->@1]
__b1_from___bbegin:
  jmp __b1
  // @1
__b1:
  // [2] call main 
  jsr main
  // [3] phi from @1 to @end [phi:@1->@end]
__bend_from___b1:
  jmp __bend
  // @end
__bend:
  // main
main: {
    // [4] *((const byte*) DTV_FEATURE) ← (const byte) DTV_FEATURE_ENABLE -- _deref_pbuc1=vbuc2 
    lda #DTV_FEATURE_ENABLE
    sta DTV_FEATURE
    // [5] *((const byte*) DTV_BLITTER_CONTROL2) ← (const byte) DTV_BLIT_CLEAR_IRQ -- _deref_pbuc1=vbuc2 
    // Instruct blitter not to continue previous blit
    lda #DTV_BLIT_CLEAR_IRQ
    sta DTV_BLITTER_CONTROL2
    // [6] *((const byte*) DTV_BLITTER_SRCA_LO) ← <(const byte*) SRCA -- _deref_pbuc1=vbuc2 
    lda #<SRCA
    sta DTV_BLITTER_SRCA_LO
    // [7] *((const byte*) DTV_BLITTER_SRCA_MI) ← >(const byte*) SRCA -- _deref_pbuc1=vbuc2 
    lda #>SRCA
    sta DTV_BLITTER_SRCA_MI
    // [8] *((const byte*) DTV_BLITTER_SRCA_HI) ← (byte) 0 -- _deref_pbuc1=vbuc2 
    lda #0
    sta DTV_BLITTER_SRCA_HI
    // [9] *((const byte*) DTV_BLITTER_SRCA_MOD_LO) ← (byte) 0 -- _deref_pbuc1=vbuc2 
    lda #0
    sta DTV_BLITTER_SRCA_MOD_LO
    // [10] *((const byte*) DTV_BLITTER_SRCA_MOD_HI) ← (byte) 0 -- _deref_pbuc1=vbuc2 
    lda #0
    sta DTV_BLITTER_SRCA_MOD_HI
    // [11] *((const byte*) DTV_BLITTER_SRCA_LIN_LO) ← (byte) 0 -- _deref_pbuc1=vbuc2 
    lda #0
    sta DTV_BLITTER_SRCA_LIN_LO
    // [12] *((const byte*) DTV_BLITTER_SRCA_LIN_HI) ← >(word) $100 -- _deref_pbuc1=vbuc2 
    lda #>$100
    sta DTV_BLITTER_SRCA_LIN_HI
    // [13] *((const byte*) DTV_BLITTER_SRCA_STEP) ← (byte) 1 -- _deref_pbuc1=vbuc2 
    lda #1
    sta DTV_BLITTER_SRCA_STEP
    // [14] *((const byte*) DTV_BLITTER_SRCB_LO) ← <(const byte*) SRCB -- _deref_pbuc1=vbuc2 
    // Step 0.0
    lda #<SRCB
    sta DTV_BLITTER_SRCB_LO
    // [15] *((const byte*) DTV_BLITTER_SRCB_MI) ← >(const byte*) SRCB -- _deref_pbuc1=vbuc2 
    lda #>SRCB
    sta DTV_BLITTER_SRCB_MI
    // [16] *((const byte*) DTV_BLITTER_SRCB_HI) ← (byte) 0 -- _deref_pbuc1=vbuc2 
    lda #0
    sta DTV_BLITTER_SRCB_HI
    // [17] *((const byte*) DTV_BLITTER_SRCB_MOD_LO) ← (byte) 0 -- _deref_pbuc1=vbuc2 
    lda #0
    sta DTV_BLITTER_SRCB_MOD_LO
    // [18] *((const byte*) DTV_BLITTER_SRCB_MOD_HI) ← (byte) 0 -- _deref_pbuc1=vbuc2 
    lda #0
    sta DTV_BLITTER_SRCB_MOD_HI
    // [19] *((const byte*) DTV_BLITTER_SRCB_LIN_LO) ← (byte) 0 -- _deref_pbuc1=vbuc2 
    lda #0
    sta DTV_BLITTER_SRCB_LIN_LO
    // [20] *((const byte*) DTV_BLITTER_SRCB_LIN_HI) ← >(word) $100 -- _deref_pbuc1=vbuc2 
    lda #>$100
    sta DTV_BLITTER_SRCB_LIN_HI
    // [21] *((const byte*) DTV_BLITTER_SRCB_STEP) ← (byte) 0 -- _deref_pbuc1=vbuc2 
    lda #0
    sta DTV_BLITTER_SRCB_STEP
    // [22] *((const byte*) DTV_BLITTER_DEST_LO) ← <(const byte*) SCREEN+(byte) $28+(byte) 5 -- _deref_pbuc1=vbuc2 
    // Step 0.0
    lda #<SCREEN+$28+5
    sta DTV_BLITTER_DEST_LO
    // [23] *((const byte*) DTV_BLITTER_DEST_MI) ← >(const byte*) SCREEN+(byte) $28+(byte) 5 -- _deref_pbuc1=vbuc2 
    lda #>SCREEN+$28+5
    sta DTV_BLITTER_DEST_MI
    // [24] *((const byte*) DTV_BLITTER_DEST_HI) ← (byte) 0 -- _deref_pbuc1=vbuc2 
    lda #0
    sta DTV_BLITTER_DEST_HI
    // [25] *((const byte*) DTV_BLITTER_DEST_MOD_LO) ← <(word) $15 -- _deref_pbuc1=vbuc2 
    lda #<$15
    sta DTV_BLITTER_DEST_MOD_LO
    // [26] *((const byte*) DTV_BLITTER_DEST_MOD_HI) ← (byte) 0 -- _deref_pbuc1=vbuc2 
    lda #0
    sta DTV_BLITTER_DEST_MOD_HI
    // [27] *((const byte*) DTV_BLITTER_DEST_LIN_LO) ← <(word) $13 -- _deref_pbuc1=vbuc2 
    lda #<$13
    sta DTV_BLITTER_DEST_LIN_LO
    // [28] *((const byte*) DTV_BLITTER_DEST_LIN_HI) ← (byte) 0 -- _deref_pbuc1=vbuc2 
    lda #0
    sta DTV_BLITTER_DEST_LIN_HI
    // [29] *((const byte*) DTV_BLITTER_DEST_STEP) ← (byte) $10 -- _deref_pbuc1=vbuc2 
    lda #$10
    sta DTV_BLITTER_DEST_STEP
    // [30] *((const byte*) DTV_BLITTER_LEN_LO) ← <(byte) $14*(word) $a -- _deref_pbuc1=vbuc2 
    // Step 1.0
    lda #<$14*$a
    sta DTV_BLITTER_LEN_LO
    // [31] *((const byte*) DTV_BLITTER_LEN_HI) ← (byte) 0 -- _deref_pbuc1=vbuc2 
    lda #0
    sta DTV_BLITTER_LEN_HI
    // [32] *((const byte*) DTV_BLITTER_ALU) ← (const byte) DTV_BLIT_ADD -- _deref_pbuc1=vbuc2 
    lda #DTV_BLIT_ADD
    sta DTV_BLITTER_ALU
    // [33] *((const byte*) DTV_BLITTER_TRANSPARANCY) ← (const byte) DTV_BLIT_TRANSPARANCY_NONE -- _deref_pbuc1=vbuc2 
    lda #DTV_BLIT_TRANSPARANCY_NONE
    sta DTV_BLITTER_TRANSPARANCY
    // [34] *((const byte*) DTV_BLITTER_CONTROL) ← (const byte) DTV_BLIT_FORCE_START|(const byte) DTV_BLIT_SRCA_FWD|(const byte) DTV_BLIT_SRCB_FWD|(const byte) DTV_BLIT_DEST_FWD -- _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
    // [35] *((const byte*) DTV_BLITTER_CONTROL2) ← (const byte) DTV_BLIT_DEST_CONT -- _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
    // main::@1
  __b1:
    // [36] (byte~) main::$0 ← *((const byte*) DTV_BLITTER_CONTROL2) & (const byte) DTV_BLIT_STATUS_BUSY -- vbuaa=_deref_pbuc1_band_vbuc2 
    lda #DTV_BLIT_STATUS_BUSY
    and DTV_BLITTER_CONTROL2
    // [37] if((byte~) main::$0!=(byte) 0) goto main::@1 -- vbuaa_neq_0_then_la1 
    cmp #0
    bne __b1
    jmp __breturn
    // main::@return
  __breturn:
    // [38] return 
    rts
}
  // File Data
  SRCA: .text "camelot rules!"
  .byte 0
  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
Replacing label __bbegin with __b1
Removing instruction __bbegin:
Removing instruction __b1_from___bbegin:
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 __b1:
Succesful ASM optimization Pass5UnusedLabelElimination

FINAL SYMBOL TABLE
(label) @1
(label) @begin
(label) @end
(const byte*) DTV_BLITTER_ALU = (byte*) 54078
(const byte*) DTV_BLITTER_CONTROL = (byte*) 54074
(const byte*) DTV_BLITTER_CONTROL2 = (byte*) 54079
(const byte*) DTV_BLITTER_DEST_HI = (byte*) 54066
(const byte*) DTV_BLITTER_DEST_LIN_HI = (byte*) 54070
(const byte*) DTV_BLITTER_DEST_LIN_LO = (byte*) 54069
(const byte*) DTV_BLITTER_DEST_LO = (byte*) 54064
(const byte*) DTV_BLITTER_DEST_MI = (byte*) 54065
(const byte*) DTV_BLITTER_DEST_MOD_HI = (byte*) 54068
(const byte*) DTV_BLITTER_DEST_MOD_LO = (byte*) 54067
(const byte*) DTV_BLITTER_DEST_STEP = (byte*) 54071
(const byte*) DTV_BLITTER_LEN_HI = (byte*) 54073
(const byte*) DTV_BLITTER_LEN_LO = (byte*) 54072
(const byte*) DTV_BLITTER_SRCA_HI = (byte*) 54050
(const byte*) DTV_BLITTER_SRCA_LIN_HI = (byte*) 54054
(const byte*) DTV_BLITTER_SRCA_LIN_LO = (byte*) 54053
(const byte*) DTV_BLITTER_SRCA_LO = (byte*) 54048
(const byte*) DTV_BLITTER_SRCA_MI = (byte*) 54049
(const byte*) DTV_BLITTER_SRCA_MOD_HI = (byte*) 54052
(const byte*) DTV_BLITTER_SRCA_MOD_LO = (byte*) 54051
(const byte*) DTV_BLITTER_SRCA_STEP = (byte*) 54055
(const byte*) DTV_BLITTER_SRCB_HI = (byte*) 54058
(const byte*) DTV_BLITTER_SRCB_LIN_HI = (byte*) 54062
(const byte*) DTV_BLITTER_SRCB_LIN_LO = (byte*) 54061
(const byte*) DTV_BLITTER_SRCB_LO = (byte*) 54056
(const byte*) DTV_BLITTER_SRCB_MI = (byte*) 54057
(const byte*) DTV_BLITTER_SRCB_MOD_HI = (byte*) 54060
(const byte*) DTV_BLITTER_SRCB_MOD_LO = (byte*) 54059
(const byte*) DTV_BLITTER_SRCB_STEP = (byte*) 54063
(const byte*) DTV_BLITTER_TRANSPARANCY = (byte*) 54075
(const byte) DTV_BLIT_ADD = (byte) $30
(const byte) DTV_BLIT_CLEAR_IRQ = (byte) 1
(const byte) DTV_BLIT_DEST_CONT = (byte) 8
(const byte) DTV_BLIT_DEST_FWD = (byte) 8
(const byte) DTV_BLIT_FORCE_START = (byte) 1
(const byte) DTV_BLIT_SRCA_FWD = (byte) 2
(const byte) DTV_BLIT_SRCB_FWD = (byte) 4
(const byte) DTV_BLIT_STATUS_BUSY = (byte) 1
(const byte) DTV_BLIT_TRANSPARANCY_NONE = (byte) 0
(const byte*) DTV_FEATURE = (byte*) 53311
(const byte) DTV_FEATURE_ENABLE = (byte) 1
(const byte*) SCREEN = (byte*) 1024
(const byte*) SRCA[]  = (byte*) "camelot rules!"
(const byte*) SRCB[]  = { (byte) $80 }
(void()) main()
(byte~) main::$0 reg byte a 22.0
(label) main::@1
(label) main::@return

reg byte a [ main::$0 ]


FINAL ASSEMBLER
Score: 291

  // File Comments
// Fill a box on the screen using the blitter
  // Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
.pc = $80d "Program"
  // 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
  .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
  // Controls the ALU operation
  .label DTV_BLITTER_ALU = $d33e
  // @begin
  // [1] phi from @begin to @1 [phi:@begin->@1]
  // @1
  // [2] call main 
  // [3] phi from @1 to @end [phi:@1->@end]
  // @end
  // main
main: {
    // *DTV_FEATURE = DTV_FEATURE_ENABLE
    // [4] *((const byte*) DTV_FEATURE) ← (const byte) DTV_FEATURE_ENABLE -- _deref_pbuc1=vbuc2 
    lda #DTV_FEATURE_ENABLE
    sta DTV_FEATURE
    // *DTV_BLITTER_CONTROL2 = DTV_BLIT_CLEAR_IRQ
    // [5] *((const byte*) DTV_BLITTER_CONTROL2) ← (const byte) DTV_BLIT_CLEAR_IRQ -- _deref_pbuc1=vbuc2 
    // Instruct blitter not to continue previous blit
    lda #DTV_BLIT_CLEAR_IRQ
    sta DTV_BLITTER_CONTROL2
    // *DTV_BLITTER_SRCA_LO = <SRCA
    // [6] *((const byte*) DTV_BLITTER_SRCA_LO) ← <(const byte*) SRCA -- _deref_pbuc1=vbuc2 
    lda #<SRCA
    sta DTV_BLITTER_SRCA_LO
    // *DTV_BLITTER_SRCA_MI = >SRCA
    // [7] *((const byte*) DTV_BLITTER_SRCA_MI) ← >(const byte*) SRCA -- _deref_pbuc1=vbuc2 
    lda #>SRCA
    sta DTV_BLITTER_SRCA_MI
    // *DTV_BLITTER_SRCA_HI = 0
    // [8] *((const byte*) DTV_BLITTER_SRCA_HI) ← (byte) 0 -- _deref_pbuc1=vbuc2 
    lda #0
    sta DTV_BLITTER_SRCA_HI
    // *DTV_BLITTER_SRCA_MOD_LO = 0
    // [9] *((const byte*) DTV_BLITTER_SRCA_MOD_LO) ← (byte) 0 -- _deref_pbuc1=vbuc2 
    sta DTV_BLITTER_SRCA_MOD_LO
    // *DTV_BLITTER_SRCA_MOD_HI = 0
    // [10] *((const byte*) DTV_BLITTER_SRCA_MOD_HI) ← (byte) 0 -- _deref_pbuc1=vbuc2 
    sta DTV_BLITTER_SRCA_MOD_HI
    // *DTV_BLITTER_SRCA_LIN_LO = <$100uw
    // [11] *((const byte*) DTV_BLITTER_SRCA_LIN_LO) ← (byte) 0 -- _deref_pbuc1=vbuc2 
    sta DTV_BLITTER_SRCA_LIN_LO
    // *DTV_BLITTER_SRCA_LIN_HI = >$100uw
    // [12] *((const byte*) DTV_BLITTER_SRCA_LIN_HI) ← >(word) $100 -- _deref_pbuc1=vbuc2 
    lda #>$100
    sta DTV_BLITTER_SRCA_LIN_HI
    // *DTV_BLITTER_SRCA_STEP = 01
    // [13] *((const byte*) DTV_BLITTER_SRCA_STEP) ← (byte) 1 -- _deref_pbuc1=vbuc2 
    lda #1
    sta DTV_BLITTER_SRCA_STEP
    // *DTV_BLITTER_SRCB_LO = <SRCB
    // [14] *((const byte*) DTV_BLITTER_SRCB_LO) ← <(const byte*) SRCB -- _deref_pbuc1=vbuc2 
    // Step 0.0
    lda #<SRCB
    sta DTV_BLITTER_SRCB_LO
    // *DTV_BLITTER_SRCB_MI = >SRCB
    // [15] *((const byte*) DTV_BLITTER_SRCB_MI) ← >(const byte*) SRCB -- _deref_pbuc1=vbuc2 
    lda #>SRCB
    sta DTV_BLITTER_SRCB_MI
    // *DTV_BLITTER_SRCB_HI = 0
    // [16] *((const byte*) DTV_BLITTER_SRCB_HI) ← (byte) 0 -- _deref_pbuc1=vbuc2 
    lda #0
    sta DTV_BLITTER_SRCB_HI
    // *DTV_BLITTER_SRCB_MOD_LO = 0
    // [17] *((const byte*) DTV_BLITTER_SRCB_MOD_LO) ← (byte) 0 -- _deref_pbuc1=vbuc2 
    sta DTV_BLITTER_SRCB_MOD_LO
    // *DTV_BLITTER_SRCB_MOD_HI = 0
    // [18] *((const byte*) DTV_BLITTER_SRCB_MOD_HI) ← (byte) 0 -- _deref_pbuc1=vbuc2 
    sta DTV_BLITTER_SRCB_MOD_HI
    // *DTV_BLITTER_SRCB_LIN_LO = <$100uw
    // [19] *((const byte*) DTV_BLITTER_SRCB_LIN_LO) ← (byte) 0 -- _deref_pbuc1=vbuc2 
    sta DTV_BLITTER_SRCB_LIN_LO
    // *DTV_BLITTER_SRCB_LIN_HI = >$100uw
    // [20] *((const byte*) DTV_BLITTER_SRCB_LIN_HI) ← >(word) $100 -- _deref_pbuc1=vbuc2 
    lda #>$100
    sta DTV_BLITTER_SRCB_LIN_HI
    // *DTV_BLITTER_SRCB_STEP = $00
    // [21] *((const byte*) DTV_BLITTER_SRCB_STEP) ← (byte) 0 -- _deref_pbuc1=vbuc2 
    lda #0
    sta DTV_BLITTER_SRCB_STEP
    // *DTV_BLITTER_DEST_LO = <SCREEN+40+5
    // [22] *((const byte*) DTV_BLITTER_DEST_LO) ← <(const byte*) SCREEN+(byte) $28+(byte) 5 -- _deref_pbuc1=vbuc2 
    // Step 0.0
    lda #<SCREEN+$28+5
    sta DTV_BLITTER_DEST_LO
    // *DTV_BLITTER_DEST_MI = >SCREEN+40+5
    // [23] *((const byte*) DTV_BLITTER_DEST_MI) ← >(const byte*) SCREEN+(byte) $28+(byte) 5 -- _deref_pbuc1=vbuc2 
    lda #>SCREEN+$28+5
    sta DTV_BLITTER_DEST_MI
    // *DTV_BLITTER_DEST_HI = 0
    // [24] *((const byte*) DTV_BLITTER_DEST_HI) ← (byte) 0 -- _deref_pbuc1=vbuc2 
    lda #0
    sta DTV_BLITTER_DEST_HI
    // *DTV_BLITTER_DEST_MOD_LO = <21uw
    // [25] *((const byte*) DTV_BLITTER_DEST_MOD_LO) ← <(word) $15 -- _deref_pbuc1=vbuc2 
    lda #<$15
    sta DTV_BLITTER_DEST_MOD_LO
    // *DTV_BLITTER_DEST_MOD_HI = >21uw
    // [26] *((const byte*) DTV_BLITTER_DEST_MOD_HI) ← (byte) 0 -- _deref_pbuc1=vbuc2 
    lda #0
    sta DTV_BLITTER_DEST_MOD_HI
    // *DTV_BLITTER_DEST_LIN_LO = <19uw
    // [27] *((const byte*) DTV_BLITTER_DEST_LIN_LO) ← <(word) $13 -- _deref_pbuc1=vbuc2 
    lda #<$13
    sta DTV_BLITTER_DEST_LIN_LO
    // *DTV_BLITTER_DEST_LIN_HI = >19uw
    // [28] *((const byte*) DTV_BLITTER_DEST_LIN_HI) ← (byte) 0 -- _deref_pbuc1=vbuc2 
    lda #0
    sta DTV_BLITTER_DEST_LIN_HI
    // *DTV_BLITTER_DEST_STEP = $10
    // [29] *((const byte*) DTV_BLITTER_DEST_STEP) ← (byte) $10 -- _deref_pbuc1=vbuc2 
    lda #$10
    sta DTV_BLITTER_DEST_STEP
    // *DTV_BLITTER_LEN_LO = <20*10uw
    // [30] *((const byte*) DTV_BLITTER_LEN_LO) ← <(byte) $14*(word) $a -- _deref_pbuc1=vbuc2 
    // Step 1.0
    lda #<$14*$a
    sta DTV_BLITTER_LEN_LO
    // *DTV_BLITTER_LEN_HI = >20*10uw
    // [31] *((const byte*) DTV_BLITTER_LEN_HI) ← (byte) 0 -- _deref_pbuc1=vbuc2 
    lda #0
    sta DTV_BLITTER_LEN_HI
    // *DTV_BLITTER_ALU = DTV_BLIT_ADD
    // [32] *((const byte*) DTV_BLITTER_ALU) ← (const byte) DTV_BLIT_ADD -- _deref_pbuc1=vbuc2 
    lda #DTV_BLIT_ADD
    sta DTV_BLITTER_ALU
    // *DTV_BLITTER_TRANSPARANCY = DTV_BLIT_TRANSPARANCY_NONE
    // [33] *((const byte*) DTV_BLITTER_TRANSPARANCY) ← (const byte) DTV_BLIT_TRANSPARANCY_NONE -- _deref_pbuc1=vbuc2 
    lda #DTV_BLIT_TRANSPARANCY_NONE
    sta DTV_BLITTER_TRANSPARANCY
    // *DTV_BLITTER_CONTROL = DTV_BLIT_FORCE_START | DTV_BLIT_SRCA_FWD | DTV_BLIT_SRCB_FWD| DTV_BLIT_DEST_FWD
    // [34] *((const byte*) DTV_BLITTER_CONTROL) ← (const byte) DTV_BLIT_FORCE_START|(const byte) DTV_BLIT_SRCA_FWD|(const byte) DTV_BLIT_SRCB_FWD|(const byte) DTV_BLIT_DEST_FWD -- _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
    // *DTV_BLITTER_CONTROL2 = DTV_BLIT_DEST_CONT
    // [35] *((const byte*) DTV_BLITTER_CONTROL2) ← (const byte) DTV_BLIT_DEST_CONT -- _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
    // main::@1
  __b1:
    // *DTV_BLITTER_CONTROL2 & DTV_BLIT_STATUS_BUSY
    // [36] (byte~) main::$0 ← *((const byte*) DTV_BLITTER_CONTROL2) & (const byte) DTV_BLIT_STATUS_BUSY -- vbuaa=_deref_pbuc1_band_vbuc2 
    lda #DTV_BLIT_STATUS_BUSY
    and DTV_BLITTER_CONTROL2
    // while((*DTV_BLITTER_CONTROL2 & DTV_BLIT_STATUS_BUSY)!=0)
    // [37] if((byte~) main::$0!=(byte) 0) goto main::@1 -- vbuaa_neq_0_then_la1 
    cmp #0
    bne __b1
    // main::@return
    // }
    // [38] return 
    rts
}
  // File Data
  SRCA: .text "camelot rules!"
  .byte 0
  SRCB: .byte $80

