mirror of
https://gitlab.com/camelot/kickc.git
synced 2025-08-09 20:25:17 +00:00
8446 lines
490 KiB
Plaintext
8446 lines
490 KiB
Plaintext
Resolved forward reference irqTop to interrupt(HARDWARE_ALL)(void()) irqTop()
|
|
Resolved forward reference RASTER_IRQ_TOP to (byte) RASTER_IRQ_TOP
|
|
Resolved forward reference RASTER_IRQ_MIDDLE to (byte) RASTER_IRQ_MIDDLE
|
|
Resolved forward reference irqBottom to interrupt(HARDWARE_ALL)(void()) irqBottom()
|
|
Fixing pointer addition (struct ProcessingSprite*~) processChars::$1 ← (struct ProcessingSprite[NUM_PROCESSING]) PROCESSING + (byte) processChars::i
|
|
Fixing pointer array-indexing *((struct ProcessingSprite[NUM_PROCESSING]) PROCESSING + (byte) main::i)
|
|
Fixing pointer array-indexing *((struct ProcessingSprite[NUM_PROCESSING]) PROCESSING + (byte) startProcessing::i)
|
|
Fixing pointer array-indexing *((struct ProcessingSprite[NUM_PROCESSING]) PROCESSING + (byte) startProcessing::spriteIdx)
|
|
Fixing pointer array-indexing *((word[$28]) SQUARES_X + (byte) initSquareTables::x)
|
|
Fixing pointer array-indexing *((word[$19]) SQUARES_Y + (byte) initSquareTables::y)
|
|
Fixing pointer array-indexing *((word[$28]) SQUARES_X + (byte) getCharToProcess::x)
|
|
Fixing pointer array-indexing *((word[$19]) SQUARES_Y + (byte) getCharToProcess::y)
|
|
Resolving sizeof() (byte~) main::$5 ← sizeof (byte*) SPRITE_DATA
|
|
Created struct value member variable (byte) main::center_x
|
|
Created struct value member variable (byte) main::center_y
|
|
Created struct value member variable (word) main::center_dist
|
|
Converted struct value to member variables (struct ProcessingChar) main::center
|
|
Created struct value member variable (byte) main::$10_x
|
|
Created struct value member variable (byte) main::$10_y
|
|
Created struct value member variable (word) main::$10_dist
|
|
Converted struct value to member variables (struct ProcessingChar~) main::$10
|
|
Created struct value member variable (byte) startProcessing::center_x
|
|
Created struct value member variable (byte) startProcessing::center_y
|
|
Created struct value member variable (word) startProcessing::center_dist
|
|
Converted struct value to member variables (struct ProcessingChar) startProcessing::center
|
|
Created struct value member variable (byte) getCharToProcess::return_x
|
|
Created struct value member variable (byte) getCharToProcess::return_y
|
|
Created struct value member variable (word) getCharToProcess::return_dist
|
|
Converted struct value to member variables (struct ProcessingChar) getCharToProcess::return
|
|
Created struct value member variable (byte) getCharToProcess::closest_x
|
|
Created struct value member variable (byte) getCharToProcess::closest_y
|
|
Created struct value member variable (word) getCharToProcess::closest_dist
|
|
Converted struct value to member variables (struct ProcessingChar) getCharToProcess::closest
|
|
Converted procedure struct value parameter to member variables (void()) startProcessing((byte) startProcessing::center_x , (byte) startProcessing::center_y , (word) startProcessing::center_dist)
|
|
Adding struct value list initializer *((word*) main::$18 + (byte~) main::$17) ← (number) 0
|
|
Adding struct value list initializer *((byte*) main::$19 + (byte~) main::$17) ← (number) 0
|
|
Adding struct value list initializer *((byte*) main::$20 + (byte~) main::$17) ← (number) 0
|
|
Adding struct value list initializer *((byte*) main::$21 + (byte~) main::$17) ← (number) 0
|
|
Adding struct value list initializer *((byte*) main::$22 + (byte~) main::$17) ← (byte) STATUS_FREE
|
|
Adding struct value list initializer *((byte**) main::$23 + (byte~) main::$17) ← (number) 0
|
|
Converted procedure call LValue to member variables { (byte) main::$10_x, (byte) main::$10_y, (word) main::$10_dist } ← call getCharToProcess
|
|
Adding struct value member variable copy (byte) main::center_x ← (byte) main::$10_x
|
|
Adding struct value member variable copy (byte) main::center_y ← (byte) main::$10_y
|
|
Adding struct value member variable copy (word) main::center_dist ← (word) main::$10_dist
|
|
Converted procedure struct value parameter to member variables in call (void~) main::$13 ← call startProcessing (byte) main::center_x (byte) main::center_y (word) main::center_dist
|
|
Adding struct value list initializer *((word*) startProcessing::$23 + (byte~) startProcessing::$22) ← (word) startProcessing::spriteX
|
|
Adding struct value list initializer *((byte*) startProcessing::$24 + (byte~) startProcessing::$22) ← (byte) startProcessing::spriteY
|
|
Adding struct value list initializer *((byte*) startProcessing::$25 + (byte~) startProcessing::$22) ← (byte) startProcessing::spriteIdx
|
|
Adding struct value list initializer *((byte*) startProcessing::$26 + (byte~) startProcessing::$22) ← (byte) startProcessing::spritePtr
|
|
Adding struct value list initializer *((byte*) startProcessing::$27 + (byte~) startProcessing::$22) ← (byte) STATUS_NEW
|
|
Adding struct value list initializer *((byte**) startProcessing::$28 + (byte~) startProcessing::$22) ← (byte*) startProcessing::screenPtr
|
|
Adding struct value list initializer (byte) getCharToProcess::closest_x ← (number) 0
|
|
Adding struct value list initializer (byte) getCharToProcess::closest_y ← (number) 0
|
|
Adding struct value list initializer (word) getCharToProcess::closest_dist ← (word) NOT_FOUND
|
|
Adding struct value list initializer (byte) getCharToProcess::closest_x ← (byte) getCharToProcess::x
|
|
Adding struct value list initializer (byte) getCharToProcess::closest_y ← (byte) getCharToProcess::y
|
|
Adding struct value list initializer (word) getCharToProcess::closest_dist ← (word) getCharToProcess::dist
|
|
Adding struct value member variable copy (byte) getCharToProcess::return_x ← (byte) getCharToProcess::closest_x
|
|
Adding struct value member variable copy (byte) getCharToProcess::return_y ← (byte) getCharToProcess::closest_y
|
|
Adding struct value member variable copy (word) getCharToProcess::return_dist ← (word) getCharToProcess::closest_dist
|
|
Adding struct value member variable copy (byte) getCharToProcess::return_x ← (byte) getCharToProcess::return_x
|
|
Adding struct value member variable copy (byte) getCharToProcess::return_y ← (byte) getCharToProcess::return_y
|
|
Adding struct value member variable copy (word) getCharToProcess::return_dist ← (word) getCharToProcess::return_dist
|
|
Converted procedure struct return value to member variables return { (byte) getCharToProcess::return_x, (byte) getCharToProcess::return_y, (word) getCharToProcess::return_dist }
|
|
Replacing struct member reference (struct ProcessingChar) main::center.dist with member variable reference (word) main::center_dist
|
|
Replacing struct member reference (struct ProcessingChar) startProcessing::center.x with member variable reference (byte) startProcessing::center_x
|
|
Replacing struct member reference (struct ProcessingChar) startProcessing::center.y with member variable reference (byte) startProcessing::center_y
|
|
Replacing struct member reference (struct ProcessingChar) startProcessing::center.y with member variable reference (byte) startProcessing::center_y
|
|
Replacing struct member reference (struct ProcessingChar) startProcessing::center.x with member variable reference (byte) startProcessing::center_x
|
|
Replacing struct member reference (struct ProcessingChar) getCharToProcess::closest.dist with member variable reference (word) getCharToProcess::closest_dist
|
|
Replacing struct member reference (struct ProcessingChar) getCharToProcess::closest.dist with member variable reference (word) getCharToProcess::closest_dist
|
|
Replacing struct member reference (struct ProcessingChar) getCharToProcess::closest.y with member variable reference (byte) getCharToProcess::closest_y
|
|
Replacing struct member reference (struct ProcessingChar) getCharToProcess::closest.x with member variable reference (byte) getCharToProcess::closest_x
|
|
Rewriting struct pointer member access *((struct ProcessingSprite[NUM_PROCESSING]) PROCESSING + (byte~) startProcessing::$21).status
|
|
Rewriting struct pointer member access *((struct ProcessingSprite*) processChars::processing).id
|
|
Rewriting struct pointer member access *((struct ProcessingSprite*) processChars::processing).status
|
|
Rewriting struct pointer member access *((struct ProcessingSprite*) processChars::processing).status
|
|
Rewriting struct pointer member access *((struct ProcessingSprite*) processChars::processing).x
|
|
Rewriting struct pointer member access *((struct ProcessingSprite*) processChars::processing).screenPtr
|
|
Rewriting struct pointer member access *((struct ProcessingSprite*) processChars::processing).id
|
|
Rewriting struct pointer member access *((struct ProcessingSprite*) processChars::processing).ptr
|
|
Rewriting struct pointer member access *((struct ProcessingSprite*) processChars::processing).status
|
|
Rewriting struct pointer member access *((struct ProcessingSprite*) processChars::processing).x
|
|
Rewriting struct pointer member access *((struct ProcessingSprite*) processChars::processing).y
|
|
Rewriting struct pointer member access *((struct ProcessingSprite*) processChars::processing).x
|
|
Rewriting struct pointer member access *((struct ProcessingSprite*) processChars::processing).x
|
|
Rewriting struct pointer member access *((struct ProcessingSprite*) processChars::processing).x
|
|
Rewriting struct pointer member access *((struct ProcessingSprite*) processChars::processing).status
|
|
Warning! Adding boolean cast to non-boolean condition (byte~) processChars::$9
|
|
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*) SCREEN in (byte*) SCREEN ← (number) $400
|
|
Adding pointer type conversion cast (byte*) SPRITE_DATA in (byte*) SPRITE_DATA ← (number) $2000
|
|
Adding pointer type conversion cast (byte*) *(main::$23 + main::$17) in *((byte**) main::$23 + (byte~) main::$17) ← (number) 0
|
|
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) @4
|
|
Culled Empty Block (label) mul8u::@5
|
|
Culled Empty Block (label) mul8u::@6
|
|
Culled Empty Block (label) mul8u::@8
|
|
Culled Empty Block (label) mul8u::@9
|
|
Culled Empty Block (label) @5
|
|
Culled Empty Block (label) @6
|
|
Culled Empty Block (label) @7
|
|
Culled Empty Block (label) @8
|
|
Culled Empty Block (label) main::@10
|
|
Culled Empty Block (label) main::@9
|
|
Culled Empty Block (label) main::@11
|
|
Culled Empty Block (label) main::@12
|
|
Culled Empty Block (label) main::@14
|
|
Culled Empty Block (label) @10
|
|
Culled Empty Block (label) startProcessing::@6
|
|
Culled Empty Block (label) startProcessing::@7
|
|
Culled Empty Block (label) @11
|
|
Culled Empty Block (label) processChars::@8
|
|
Culled Empty Block (label) processChars::@6
|
|
Culled Empty Block (label) processChars::@12
|
|
Culled Empty Block (label) initSquareTables::@5
|
|
Culled Empty Block (label) initSquareTables::@6
|
|
Culled Empty Block (label) initSquareTables::@12
|
|
Culled Empty Block (label) initSquareTables::@13
|
|
Culled Empty Block (label) initSquareTables::@14
|
|
Culled Empty Block (label) @13
|
|
Culled Empty Block (label) getCharToProcess::@6
|
|
Culled Empty Block (label) getCharToProcess::@2
|
|
Culled Empty Block (label) @14
|
|
Culled Empty Block (label) setupRasterIrq::@4
|
|
Unwinding list assignment { (byte) main::$10_x, (byte) main::$10_y, (word) main::$10_dist } ← { (byte) getCharToProcess::return_x, (byte) getCharToProcess::return_y, (word) getCharToProcess::return_dist }
|
|
Unwinding list assignment { (byte) getCharToProcess::return_x#0, (byte) getCharToProcess::return_y#0, (word) getCharToProcess::return_dist#0 } ← { (byte) getCharToProcess::return_x#2, (byte) getCharToProcess::return_y#2, (word) getCharToProcess::return_dist#2 }
|
|
|
|
CONTROL FLOW GRAPH SSA
|
|
@begin: scope:[] from
|
|
(byte*) PROCPORT_DDR#0 ← ((byte*)) (number) 0
|
|
(byte) PROCPORT_DDR_MEMORY_MASK#0 ← (number) 7
|
|
(byte*) PROCPORT#0 ← ((byte*)) (number) 1
|
|
(byte) PROCPORT_RAM_IO#0 ← (number) $35
|
|
(word) SPRITE_PTRS#0 ← (number) $3f8
|
|
(byte*) SPRITES_XPOS#0 ← ((byte*)) (number) $d000
|
|
(byte*) SPRITES_YPOS#0 ← ((byte*)) (number) $d001
|
|
(byte*) SPRITES_XMSB#0 ← ((byte*)) (number) $d010
|
|
(byte*) RASTER#0 ← ((byte*)) (number) $d012
|
|
(byte*) SPRITES_ENABLE#0 ← ((byte*)) (number) $d015
|
|
(byte*) BORDERCOL#0 ← ((byte*)) (number) $d020
|
|
(byte*) BGCOL#0 ← ((byte*)) (number) $d021
|
|
(byte*) VIC_CONTROL#0 ← ((byte*)) (number) $d011
|
|
(byte*) IRQ_STATUS#0 ← ((byte*)) (number) $d019
|
|
(byte*) IRQ_ENABLE#0 ← ((byte*)) (number) $d01a
|
|
(byte) IRQ_RASTER#0 ← (number) 1
|
|
(byte*) CIA1_INTERRUPT#0 ← ((byte*)) (number) $dc0d
|
|
(byte) CIA_INTERRUPT_CLEAR#0 ← (number) $7f
|
|
(void()**) HARDWARE_IRQ#0 ← ((void()**)) (number) $fffe
|
|
(byte) WHITE#0 ← (number) 1
|
|
(byte) BLUE#0 ← (number) 6
|
|
(byte) LIGHT_BLUE#0 ← (number) $e
|
|
to:@9
|
|
mul8u: scope:[mul8u] from initSquareTables::@11 initSquareTables::@4
|
|
(byte) mul8u::a#6 ← phi( initSquareTables::@11/(byte) mul8u::a#2 initSquareTables::@4/(byte) mul8u::a#1 )
|
|
(byte) mul8u::b#2 ← phi( initSquareTables::@11/(byte) mul8u::b#1 initSquareTables::@4/(byte) mul8u::b#0 )
|
|
(word) mul8u::res#0 ← (number) 0
|
|
(word) mul8u::mb#0 ← (byte) mul8u::b#2
|
|
to:mul8u::@1
|
|
mul8u::@1: scope:[mul8u] from mul8u mul8u::@4
|
|
(word) mul8u::mb#5 ← phi( mul8u/(word) mul8u::mb#0 mul8u::@4/(word) mul8u::mb#1 )
|
|
(word) mul8u::res#4 ← phi( mul8u/(word) mul8u::res#0 mul8u::@4/(word) mul8u::res#6 )
|
|
(byte) mul8u::a#3 ← phi( mul8u/(byte) mul8u::a#6 mul8u::@4/(byte) mul8u::a#0 )
|
|
(bool~) mul8u::$0 ← (byte) mul8u::a#3 != (number) 0
|
|
if((bool~) mul8u::$0) goto mul8u::@2
|
|
to:mul8u::@3
|
|
mul8u::@2: scope:[mul8u] from mul8u::@1
|
|
(word) mul8u::res#5 ← phi( mul8u::@1/(word) mul8u::res#4 )
|
|
(word) mul8u::mb#4 ← phi( mul8u::@1/(word) mul8u::mb#5 )
|
|
(byte) mul8u::a#4 ← phi( mul8u::@1/(byte) mul8u::a#3 )
|
|
(number~) mul8u::$1 ← (byte) mul8u::a#4 & (number) 1
|
|
(bool~) mul8u::$2 ← (number~) mul8u::$1 != (number) 0
|
|
(bool~) mul8u::$3 ← ! (bool~) mul8u::$2
|
|
if((bool~) mul8u::$3) goto mul8u::@4
|
|
to:mul8u::@7
|
|
mul8u::@3: scope:[mul8u] from mul8u::@1
|
|
(word) mul8u::res#2 ← phi( mul8u::@1/(word) mul8u::res#4 )
|
|
(word) mul8u::return#0 ← (word) mul8u::res#2
|
|
to:mul8u::@return
|
|
mul8u::@4: scope:[mul8u] from mul8u::@2 mul8u::@7
|
|
(word) mul8u::res#6 ← phi( mul8u::@2/(word) mul8u::res#5 mul8u::@7/(word) mul8u::res#1 )
|
|
(word) mul8u::mb#2 ← phi( mul8u::@2/(word) mul8u::mb#4 mul8u::@7/(word) mul8u::mb#3 )
|
|
(byte) mul8u::a#5 ← phi( mul8u::@2/(byte) mul8u::a#4 mul8u::@7/(byte) mul8u::a#7 )
|
|
(byte~) mul8u::$5 ← (byte) mul8u::a#5 >> (number) 1
|
|
(byte) mul8u::a#0 ← (byte~) mul8u::$5
|
|
(word~) mul8u::$6 ← (word) mul8u::mb#2 << (number) 1
|
|
(word) mul8u::mb#1 ← (word~) mul8u::$6
|
|
to:mul8u::@1
|
|
mul8u::@7: scope:[mul8u] from mul8u::@2
|
|
(byte) mul8u::a#7 ← phi( mul8u::@2/(byte) mul8u::a#4 )
|
|
(word) mul8u::mb#3 ← phi( mul8u::@2/(word) mul8u::mb#4 )
|
|
(word) mul8u::res#3 ← phi( mul8u::@2/(word) mul8u::res#5 )
|
|
(word~) mul8u::$4 ← (word) mul8u::res#3 + (word) mul8u::mb#3
|
|
(word) mul8u::res#1 ← (word~) mul8u::$4
|
|
to:mul8u::@4
|
|
mul8u::@return: scope:[mul8u] from mul8u::@3
|
|
(word) mul8u::return#4 ← phi( mul8u::@3/(word) mul8u::return#0 )
|
|
(word) mul8u::return#1 ← (word) mul8u::return#4
|
|
return
|
|
to:@return
|
|
@9: scope:[] from @begin
|
|
(byte*) SCREEN#0 ← ((byte*)) (number) $400
|
|
(byte*) SPRITE_DATA#0 ← ((byte*)) (number) $2000
|
|
(byte[$3e8]) SCREEN_COPY#0 ← { fill( $3e8, 0) }
|
|
(byte) NUM_PROCESSING#0 ← (number) 1
|
|
(word) NOT_FOUND#0 ← (number) $ffff
|
|
(byte) STATUS_FREE#0 ← (number) 0
|
|
(byte) STATUS_NEW#0 ← (number) 1
|
|
(byte) STATUS_PROCESSING#0 ← (number) 2
|
|
(struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 ← { fill( NUM_PROCESSING#0, 0) }
|
|
to:@12
|
|
main: scope:[main] from @17
|
|
(number~) main::$3 ← (byte) NUM_PROCESSING#0 - (number) 1
|
|
(byte) main::i#0 ← (byte) 0
|
|
to:main::@1
|
|
main::@1: scope:[main] from main main::@1
|
|
(byte) main::i#2 ← phi( main/(byte) main::i#0 main::@1/(byte) main::i#1 )
|
|
(byte~) main::$17 ← (byte) main::i#2 * (const byte) SIZEOF_STRUCT_PROCESSINGSPRITE
|
|
(word*) main::$18 ← (word*)(struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X
|
|
*((word*) main::$18 + (byte~) main::$17) ← (number) 0
|
|
(byte*) main::$19 ← (byte*)(struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y
|
|
*((byte*) main::$19 + (byte~) main::$17) ← (number) 0
|
|
(byte*) main::$20 ← (byte*)(struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID
|
|
*((byte*) main::$20 + (byte~) main::$17) ← (number) 0
|
|
(byte*) main::$21 ← (byte*)(struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR
|
|
*((byte*) main::$21 + (byte~) main::$17) ← (number) 0
|
|
(byte*) main::$22 ← (byte*)(struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS
|
|
*((byte*) main::$22 + (byte~) main::$17) ← (byte) STATUS_FREE#0
|
|
(byte**) main::$23 ← (byte**)(struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR
|
|
*((byte**) main::$23 + (byte~) main::$17) ← ((byte*)) (number) 0
|
|
(byte) main::i#1 ← (byte) main::i#2 + rangenext(0,main::$3)
|
|
(bool~) main::$4 ← (byte) main::i#1 != rangelast(0,main::$3)
|
|
if((bool~) main::$4) goto main::@1
|
|
to:main::@2
|
|
main::@2: scope:[main] from main::@1
|
|
(byte*) main::sp#0 ← (byte*) SPRITE_DATA#0
|
|
to:main::@3
|
|
main::@3: scope:[main] from main::@2 main::@3
|
|
(byte*) main::sp#2 ← phi( main::@2/(byte*) main::sp#0 main::@3/(byte*) main::sp#1 )
|
|
*((byte*) main::sp#2) ← (number) 0
|
|
(byte*) main::sp#1 ← ++ (byte*) main::sp#2
|
|
(byte~) main::$5 ← (const byte) SIZEOF_POINTER
|
|
(byte*~) main::$6 ← (byte*) SPRITE_DATA#0 + (byte~) main::$5
|
|
(bool~) main::$7 ← (byte*) main::sp#1 < (byte*~) main::$6
|
|
if((bool~) main::$7) goto main::@3
|
|
to:main::@4
|
|
main::@4: scope:[main] from main::@3
|
|
(void()*~) main::$0 ← & interrupt(HARDWARE_ALL)(void()) irqTop()
|
|
(word) setupRasterIrq::raster#0 ← (byte) RASTER_IRQ_TOP#0
|
|
(void()*) setupRasterIrq::irqRoutine#0 ← (void()*~) main::$0
|
|
call setupRasterIrq
|
|
to:main::@15
|
|
main::@15: scope:[main] from main::@4
|
|
(byte*) main::src#0 ← (byte*) SCREEN#0
|
|
(byte*) main::dst#0 ← (byte[$3e8]) SCREEN_COPY#0
|
|
to:main::@5
|
|
main::@5: scope:[main] from main::@15 main::@5
|
|
(byte*) main::dst#2 ← phi( main::@15/(byte*) main::dst#0 main::@5/(byte*) main::dst#1 )
|
|
(byte*) main::src#2 ← phi( main::@15/(byte*) main::src#0 main::@5/(byte*) main::src#1 )
|
|
*((byte*) main::dst#2) ← *((byte*) main::src#2)
|
|
(byte*) main::src#1 ← ++ (byte*) main::src#2
|
|
(byte*) main::dst#1 ← ++ (byte*) main::dst#2
|
|
(byte*~) main::$8 ← (byte*) SCREEN#0 + (number) $3e8
|
|
(bool~) main::$9 ← (byte*) main::src#1 != (byte*~) main::$8
|
|
if((bool~) main::$9) goto main::@5
|
|
to:main::@6
|
|
main::@6: scope:[main] from main::@5
|
|
call initSquareTables
|
|
to:main::@16
|
|
main::@16: scope:[main] from main::@6
|
|
to:main::@7
|
|
main::@7: scope:[main] from main::@16 main::@18
|
|
call getCharToProcess
|
|
(byte) getCharToProcess::return_x#0 ← (byte) getCharToProcess::return_x#2
|
|
(byte) getCharToProcess::return_y#0 ← (byte) getCharToProcess::return_y#2
|
|
(word) getCharToProcess::return_dist#0 ← (word) getCharToProcess::return_dist#2
|
|
to:main::@17
|
|
main::@17: scope:[main] from main::@7
|
|
(word) getCharToProcess::return_dist#3 ← phi( main::@7/(word) getCharToProcess::return_dist#0 )
|
|
(byte) getCharToProcess::return_y#3 ← phi( main::@7/(byte) getCharToProcess::return_y#0 )
|
|
(byte) getCharToProcess::return_x#3 ← phi( main::@7/(byte) getCharToProcess::return_x#0 )
|
|
(byte) main::$10_x ← (byte) getCharToProcess::return_x#3
|
|
(byte) main::$10_y ← (byte) getCharToProcess::return_y#3
|
|
(word) main::$10_dist ← (word) getCharToProcess::return_dist#3
|
|
(byte) main::center_x#0 ← (byte) main::$10_x
|
|
(byte) main::center_y#0 ← (byte) main::$10_y
|
|
(word) main::center_dist#0 ← (word) main::$10_dist
|
|
(bool~) main::$11 ← (word) main::center_dist#0 == (word) NOT_FOUND#0
|
|
(bool~) main::$12 ← ! (bool~) main::$11
|
|
if((bool~) main::$12) goto main::@8
|
|
to:main::@13
|
|
main::@8: scope:[main] from main::@17
|
|
(word) main::center_dist#1 ← phi( main::@17/(word) main::center_dist#0 )
|
|
(byte) main::center_y#1 ← phi( main::@17/(byte) main::center_y#0 )
|
|
(byte) main::center_x#1 ← phi( main::@17/(byte) main::center_x#0 )
|
|
(byte) startProcessing::center_x#0 ← (byte) main::center_x#1
|
|
(byte) startProcessing::center_y#0 ← (byte) main::center_y#1
|
|
(word) startProcessing::center_dist#0 ← (word) main::center_dist#1
|
|
call startProcessing
|
|
to:main::@18
|
|
main::@18: scope:[main] from main::@8
|
|
if(true) goto main::@7
|
|
to:main::@13
|
|
main::@13: scope:[main] from main::@13 main::@17 main::@18
|
|
(byte*~) main::$16 ← (byte*) SCREEN#0 + (number) $3e7
|
|
*((byte*~) main::$16) ← ++ *((byte*~) main::$16)
|
|
if(true) goto main::@13
|
|
to:main::@return
|
|
main::@return: scope:[main] from main::@13
|
|
return
|
|
to:@return
|
|
startProcessing: scope:[startProcessing] from main::@8
|
|
(byte) startProcessing::center_y#9 ← phi( main::@8/(byte) startProcessing::center_y#0 )
|
|
(byte) startProcessing::center_x#9 ← phi( main::@8/(byte) startProcessing::center_x#0 )
|
|
(byte) startProcessing::freeIdx#0 ← (number) $ff
|
|
to:startProcessing::@1
|
|
startProcessing::@1: scope:[startProcessing] from startProcessing startProcessing::@4
|
|
(byte) startProcessing::center_y#8 ← phi( startProcessing/(byte) startProcessing::center_y#9 startProcessing::@4/(byte) startProcessing::center_y#4 )
|
|
(byte) startProcessing::center_x#8 ← phi( startProcessing/(byte) startProcessing::center_x#9 startProcessing::@4/(byte) startProcessing::center_x#4 )
|
|
(byte) startProcessing::freeIdx#6 ← phi( startProcessing/(byte) startProcessing::freeIdx#0 startProcessing::@4/(byte) startProcessing::freeIdx#2 )
|
|
(number~) startProcessing::$15 ← (byte) NUM_PROCESSING#0 - (number) 1
|
|
(byte) startProcessing::i#0 ← (byte) 0
|
|
to:startProcessing::@2
|
|
startProcessing::@2: scope:[startProcessing] from startProcessing::@1 startProcessing::@3
|
|
(byte) startProcessing::center_y#7 ← phi( startProcessing::@1/(byte) startProcessing::center_y#8 startProcessing::@3/(byte) startProcessing::center_y#5 )
|
|
(byte) startProcessing::center_x#7 ← phi( startProcessing::@1/(byte) startProcessing::center_x#8 startProcessing::@3/(byte) startProcessing::center_x#5 )
|
|
(byte) startProcessing::freeIdx#5 ← phi( startProcessing::@1/(byte) startProcessing::freeIdx#6 startProcessing::@3/(byte) startProcessing::freeIdx#4 )
|
|
(byte) startProcessing::i#2 ← phi( startProcessing::@1/(byte) startProcessing::i#0 startProcessing::@3/(byte) startProcessing::i#1 )
|
|
(byte~) startProcessing::$21 ← (byte) startProcessing::i#2 * (const byte) SIZEOF_STRUCT_PROCESSINGSPRITE
|
|
(byte*) startProcessing::$29 ← (byte*)(struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS
|
|
(bool~) startProcessing::$16 ← *((byte*) startProcessing::$29 + (byte~) startProcessing::$21) == (byte) STATUS_FREE#0
|
|
(bool~) startProcessing::$17 ← ! (bool~) startProcessing::$16
|
|
if((bool~) startProcessing::$17) goto startProcessing::@3
|
|
to:startProcessing::@5
|
|
startProcessing::@3: scope:[startProcessing] from startProcessing::@2
|
|
(byte) startProcessing::center_y#5 ← phi( startProcessing::@2/(byte) startProcessing::center_y#7 )
|
|
(byte) startProcessing::center_x#5 ← phi( startProcessing::@2/(byte) startProcessing::center_x#7 )
|
|
(byte) startProcessing::freeIdx#4 ← phi( startProcessing::@2/(byte) startProcessing::freeIdx#5 )
|
|
(byte) startProcessing::i#3 ← phi( startProcessing::@2/(byte) startProcessing::i#2 )
|
|
(byte) startProcessing::i#1 ← (byte) startProcessing::i#3 + rangenext(0,startProcessing::$15)
|
|
(bool~) startProcessing::$18 ← (byte) startProcessing::i#1 != rangelast(0,startProcessing::$15)
|
|
if((bool~) startProcessing::$18) goto startProcessing::@2
|
|
to:startProcessing::@4
|
|
startProcessing::@5: scope:[startProcessing] from startProcessing::@2
|
|
(byte) startProcessing::center_y#6 ← phi( startProcessing::@2/(byte) startProcessing::center_y#7 )
|
|
(byte) startProcessing::center_x#6 ← phi( startProcessing::@2/(byte) startProcessing::center_x#7 )
|
|
(byte) startProcessing::i#4 ← phi( startProcessing::@2/(byte) startProcessing::i#2 )
|
|
(byte) startProcessing::freeIdx#1 ← (byte) startProcessing::i#4
|
|
to:startProcessing::@4
|
|
startProcessing::@4: scope:[startProcessing] from startProcessing::@3 startProcessing::@5
|
|
(byte) startProcessing::center_y#4 ← phi( startProcessing::@3/(byte) startProcessing::center_y#5 startProcessing::@5/(byte) startProcessing::center_y#6 )
|
|
(byte) startProcessing::center_x#4 ← phi( startProcessing::@3/(byte) startProcessing::center_x#5 startProcessing::@5/(byte) startProcessing::center_x#6 )
|
|
(byte) startProcessing::freeIdx#2 ← phi( startProcessing::@3/(byte) startProcessing::freeIdx#4 startProcessing::@5/(byte) startProcessing::freeIdx#1 )
|
|
(bool~) startProcessing::$19 ← (byte) startProcessing::freeIdx#2 == (number) $ff
|
|
if((bool~) startProcessing::$19) goto startProcessing::@1
|
|
to:startProcessing::@8
|
|
startProcessing::@8: scope:[startProcessing] from startProcessing::@4
|
|
(byte) startProcessing::center_y#3 ← phi( startProcessing::@4/(byte) startProcessing::center_y#4 )
|
|
(byte) startProcessing::center_x#3 ← phi( startProcessing::@4/(byte) startProcessing::center_x#4 )
|
|
(byte) startProcessing::freeIdx#3 ← phi( startProcessing::@4/(byte) startProcessing::freeIdx#2 )
|
|
(byte) startProcessing::spriteIdx#0 ← (byte) startProcessing::freeIdx#3
|
|
(word~) startProcessing::$0 ← ((word)) (byte) startProcessing::spriteIdx#0
|
|
(number~) startProcessing::$1 ← (word~) startProcessing::$0 * (number) $40
|
|
(byte*~) startProcessing::$2 ← (byte*) SPRITE_DATA#0 + (number~) startProcessing::$1
|
|
(byte*) startProcessing::spriteData#0 ← (byte*~) startProcessing::$2
|
|
(byte) startProcessing::i1#0 ← (byte) 0
|
|
to:startProcessing::@9
|
|
startProcessing::@9: scope:[startProcessing] from startProcessing::@8 startProcessing::@9
|
|
(byte) startProcessing::spriteIdx#2 ← phi( startProcessing::@8/(byte) startProcessing::spriteIdx#0 startProcessing::@9/(byte) startProcessing::spriteIdx#2 )
|
|
(byte) startProcessing::center_y#2 ← phi( startProcessing::@8/(byte) startProcessing::center_y#3 startProcessing::@9/(byte) startProcessing::center_y#2 )
|
|
(byte) startProcessing::center_x#2 ← phi( startProcessing::@8/(byte) startProcessing::center_x#3 startProcessing::@9/(byte) startProcessing::center_x#2 )
|
|
(byte) startProcessing::i1#2 ← phi( startProcessing::@8/(byte) startProcessing::i1#0 startProcessing::@9/(byte) startProcessing::i1#1 )
|
|
(byte*) startProcessing::spriteData#2 ← phi( startProcessing::@8/(byte*) startProcessing::spriteData#0 startProcessing::@9/(byte*) startProcessing::spriteData#1 )
|
|
*((byte*) startProcessing::spriteData#2) ← (number) $ff
|
|
(byte*) startProcessing::spriteData#1 ← (byte*) startProcessing::spriteData#2 + (number) 3
|
|
(byte) startProcessing::i1#1 ← (byte) startProcessing::i1#2 + rangenext(0,7)
|
|
(bool~) startProcessing::$20 ← (byte) startProcessing::i1#1 != rangelast(0,7)
|
|
if((bool~) startProcessing::$20) goto startProcessing::@9
|
|
to:startProcessing::@10
|
|
startProcessing::@10: scope:[startProcessing] from startProcessing::@9
|
|
(byte) startProcessing::spriteIdx#1 ← phi( startProcessing::@9/(byte) startProcessing::spriteIdx#2 )
|
|
(byte) startProcessing::center_y#1 ← phi( startProcessing::@9/(byte) startProcessing::center_y#2 )
|
|
(byte) startProcessing::center_x#1 ← phi( startProcessing::@9/(byte) startProcessing::center_x#2 )
|
|
(word~) startProcessing::$3 ← ((word)) (byte) startProcessing::center_x#1
|
|
(number~) startProcessing::$4 ← (word~) startProcessing::$3 * (number) 8
|
|
(number~) startProcessing::$5 ← (number) $18 + (number~) startProcessing::$4
|
|
(word) startProcessing::spriteX#0 ← (number~) startProcessing::$5
|
|
(number~) startProcessing::$6 ← (byte) startProcessing::center_y#1 * (number) 8
|
|
(number~) startProcessing::$7 ← (number) $32 + (number~) startProcessing::$6
|
|
(byte) startProcessing::spriteY#0 ← (number~) startProcessing::$7
|
|
(byte*~) startProcessing::$8 ← (byte*) SPRITE_DATA#0 / (number) $40
|
|
(byte~) startProcessing::$9 ← ((byte)) (byte*~) startProcessing::$8
|
|
(byte~) startProcessing::$10 ← (byte~) startProcessing::$9 + (byte) startProcessing::spriteIdx#1
|
|
(byte) startProcessing::spritePtr#0 ← (byte~) startProcessing::$10
|
|
(word~) startProcessing::$11 ← ((word)) (byte) startProcessing::center_y#1
|
|
(number~) startProcessing::$12 ← (word~) startProcessing::$11 * (number) $28
|
|
(byte*~) startProcessing::$13 ← (byte*) SCREEN#0 + (number~) startProcessing::$12
|
|
(byte*~) startProcessing::$14 ← (byte*~) startProcessing::$13 + (byte) startProcessing::center_x#1
|
|
(byte*) startProcessing::screenPtr#0 ← (byte*~) startProcessing::$14
|
|
(byte~) startProcessing::$22 ← (byte) startProcessing::spriteIdx#1 * (const byte) SIZEOF_STRUCT_PROCESSINGSPRITE
|
|
(word*) startProcessing::$23 ← (word*)(struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X
|
|
*((word*) startProcessing::$23 + (byte~) startProcessing::$22) ← (word) startProcessing::spriteX#0
|
|
(byte*) startProcessing::$24 ← (byte*)(struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y
|
|
*((byte*) startProcessing::$24 + (byte~) startProcessing::$22) ← (byte) startProcessing::spriteY#0
|
|
(byte*) startProcessing::$25 ← (byte*)(struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID
|
|
*((byte*) startProcessing::$25 + (byte~) startProcessing::$22) ← (byte) startProcessing::spriteIdx#1
|
|
(byte*) startProcessing::$26 ← (byte*)(struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR
|
|
*((byte*) startProcessing::$26 + (byte~) startProcessing::$22) ← (byte) startProcessing::spritePtr#0
|
|
(byte*) startProcessing::$27 ← (byte*)(struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS
|
|
*((byte*) startProcessing::$27 + (byte~) startProcessing::$22) ← (byte) STATUS_NEW#0
|
|
(byte**) startProcessing::$28 ← (byte**)(struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR
|
|
*((byte**) startProcessing::$28 + (byte~) startProcessing::$22) ← (byte*) startProcessing::screenPtr#0
|
|
to:startProcessing::@return
|
|
startProcessing::@return: scope:[startProcessing] from startProcessing::@10
|
|
return
|
|
to:@return
|
|
processChars: scope:[processChars] from irqBottom::@2
|
|
(number~) processChars::$0 ← (byte) NUM_PROCESSING#0 - (number) 1
|
|
(byte) processChars::i#0 ← (byte) 0
|
|
to:processChars::@1
|
|
processChars::@1: scope:[processChars] from processChars processChars::@2
|
|
(byte) processChars::i#2 ← phi( processChars/(byte) processChars::i#0 processChars::@2/(byte) processChars::i#1 )
|
|
(byte~) processChars::$18 ← (byte) processChars::i#2 * (const byte) SIZEOF_STRUCT_PROCESSINGSPRITE
|
|
(struct ProcessingSprite*~) processChars::$1 ← (struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (byte~) processChars::$18
|
|
(struct ProcessingSprite*) processChars::processing#0 ← (struct ProcessingSprite*~) processChars::$1
|
|
(byte*) processChars::$19 ← (byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID
|
|
(number~) processChars::$2 ← (number) 1 << *((byte*) processChars::$19)
|
|
(byte) processChars::bitmask#0 ← (number~) processChars::$2
|
|
(byte*) processChars::$20 ← (byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS
|
|
(bool~) processChars::$3 ← *((byte*) processChars::$20) != (byte) STATUS_FREE#0
|
|
(bool~) processChars::$4 ← ! (bool~) processChars::$3
|
|
if((bool~) processChars::$4) goto processChars::@2
|
|
to:processChars::@10
|
|
processChars::@2: scope:[processChars] from processChars::@1 processChars::@5 processChars::@9
|
|
(byte) processChars::i#3 ← phi( processChars::@1/(byte) processChars::i#2 processChars::@5/(byte) processChars::i#4 processChars::@9/(byte) processChars::i#5 )
|
|
(byte) processChars::i#1 ← (byte) processChars::i#3 + rangenext(0,processChars::$0)
|
|
(bool~) processChars::$17 ← (byte) processChars::i#1 != rangelast(0,processChars::$0)
|
|
if((bool~) processChars::$17) goto processChars::@1
|
|
to:processChars::@return
|
|
processChars::@10: scope:[processChars] from processChars::@1
|
|
(byte) processChars::i#9 ← phi( processChars::@1/(byte) processChars::i#2 )
|
|
(byte) processChars::bitmask#5 ← phi( processChars::@1/(byte) processChars::bitmask#0 )
|
|
(struct ProcessingSprite*) processChars::processing#1 ← phi( processChars::@1/(struct ProcessingSprite*) processChars::processing#0 )
|
|
(byte*) processChars::$21 ← (byte*)(struct ProcessingSprite*) processChars::processing#1 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS
|
|
(bool~) processChars::$5 ← *((byte*) processChars::$21) == (byte) STATUS_NEW#0
|
|
(bool~) processChars::$6 ← ! (bool~) processChars::$5
|
|
if((bool~) processChars::$6) goto processChars::@3
|
|
to:processChars::@11
|
|
processChars::@3: scope:[processChars] from processChars::@10 processChars::@11
|
|
(byte) processChars::i#8 ← phi( processChars::@10/(byte) processChars::i#9 processChars::@11/(byte) processChars::i#10 )
|
|
(byte) processChars::bitmask#6 ← phi( processChars::@10/(byte) processChars::bitmask#5 processChars::@11/(byte) processChars::bitmask#1 )
|
|
(struct ProcessingSprite*) processChars::processing#2 ← phi( processChars::@10/(struct ProcessingSprite*) processChars::processing#1 processChars::@11/(struct ProcessingSprite*) processChars::processing#3 )
|
|
(word*) processChars::$22 ← (word*)(struct ProcessingSprite*) processChars::processing#2 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X
|
|
(byte~) processChars::$9 ← > *((word*) processChars::$22)
|
|
(bool~) processChars::$33 ← (number) 0 != (byte~) processChars::$9
|
|
if((bool~) processChars::$33) goto processChars::@4
|
|
to:processChars::@7
|
|
processChars::@11: scope:[processChars] from processChars::@10
|
|
(byte) processChars::i#10 ← phi( processChars::@10/(byte) processChars::i#9 )
|
|
(byte) processChars::bitmask#1 ← phi( processChars::@10/(byte) processChars::bitmask#5 )
|
|
(struct ProcessingSprite*) processChars::processing#3 ← phi( processChars::@10/(struct ProcessingSprite*) processChars::processing#1 )
|
|
(byte**) processChars::$23 ← (byte**)(struct ProcessingSprite*) processChars::processing#3 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR
|
|
*(*((byte**) processChars::$23)) ← (byte) ' '
|
|
*((byte*) SPRITES_ENABLE#0) ← *((byte*) SPRITES_ENABLE#0) | (byte) processChars::bitmask#1
|
|
(byte*~) processChars::$7 ← (byte*) SCREEN#0 + (word) SPRITE_PTRS#0
|
|
(byte*) processChars::$24 ← (byte*)(struct ProcessingSprite*) processChars::processing#3 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID
|
|
(byte*~) processChars::$8 ← (byte*~) processChars::$7 + *((byte*) processChars::$24)
|
|
(byte*) processChars::$25 ← (byte*)(struct ProcessingSprite*) processChars::processing#3 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR
|
|
*((byte*~) processChars::$8) ← *((byte*) processChars::$25)
|
|
(byte*) processChars::$26 ← (byte*)(struct ProcessingSprite*) processChars::processing#3 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS
|
|
*((byte*) processChars::$26) ← (byte) STATUS_PROCESSING#0
|
|
to:processChars::@3
|
|
processChars::@4: scope:[processChars] from processChars::@3
|
|
(struct ProcessingSprite*) processChars::processing#6 ← phi( processChars::@3/(struct ProcessingSprite*) processChars::processing#2 )
|
|
(byte) processChars::i#6 ← phi( processChars::@3/(byte) processChars::i#8 )
|
|
(byte) processChars::bitmask#2 ← phi( processChars::@3/(byte) processChars::bitmask#6 )
|
|
*((byte*) SPRITES_XMSB#0) ← *((byte*) SPRITES_XMSB#0) | (byte) processChars::bitmask#2
|
|
to:processChars::@5
|
|
processChars::@7: scope:[processChars] from processChars::@3
|
|
(struct ProcessingSprite*) processChars::processing#7 ← phi( processChars::@3/(struct ProcessingSprite*) processChars::processing#2 )
|
|
(byte) processChars::i#7 ← phi( processChars::@3/(byte) processChars::i#8 )
|
|
(byte) processChars::bitmask#3 ← phi( processChars::@3/(byte) processChars::bitmask#6 )
|
|
(number~) processChars::$10 ← (number) $ff ^ (byte) processChars::bitmask#3
|
|
*((byte*) SPRITES_XMSB#0) ← *((byte*) SPRITES_XMSB#0) & (number~) processChars::$10
|
|
to:processChars::@5
|
|
processChars::@5: scope:[processChars] from processChars::@4 processChars::@7
|
|
(byte) processChars::bitmask#7 ← phi( processChars::@4/(byte) processChars::bitmask#2 processChars::@7/(byte) processChars::bitmask#3 )
|
|
(struct ProcessingSprite*) processChars::processing#4 ← phi( processChars::@4/(struct ProcessingSprite*) processChars::processing#6 processChars::@7/(struct ProcessingSprite*) processChars::processing#7 )
|
|
(byte) processChars::i#4 ← phi( processChars::@4/(byte) processChars::i#6 processChars::@7/(byte) processChars::i#7 )
|
|
(number~) processChars::$11 ← (byte) processChars::i#4 * (number) 2
|
|
(word*) processChars::$27 ← (word*)(struct ProcessingSprite*) processChars::processing#4 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X
|
|
(byte~) processChars::$12 ← ((byte)) *((word*) processChars::$27)
|
|
*((byte*) SPRITES_XPOS#0 + (number~) processChars::$11) ← (byte~) processChars::$12
|
|
(number~) processChars::$13 ← (byte) processChars::i#4 * (number) 2
|
|
(byte*) processChars::$28 ← (byte*)(struct ProcessingSprite*) processChars::processing#4 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y
|
|
*((byte*) SPRITES_YPOS#0 + (number~) processChars::$13) ← *((byte*) processChars::$28)
|
|
(word*) processChars::$29 ← (word*)(struct ProcessingSprite*) processChars::processing#4 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X
|
|
(word*) processChars::$30 ← (word*)(struct ProcessingSprite*) processChars::processing#4 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X
|
|
*((word*) processChars::$30) ← -- *((word*) processChars::$29)
|
|
(word*) processChars::$31 ← (word*)(struct ProcessingSprite*) processChars::processing#4 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X
|
|
(bool~) processChars::$14 ← *((word*) processChars::$31) == (number) 0
|
|
(bool~) processChars::$15 ← ! (bool~) processChars::$14
|
|
if((bool~) processChars::$15) goto processChars::@2
|
|
to:processChars::@9
|
|
processChars::@9: scope:[processChars] from processChars::@5
|
|
(byte) processChars::i#5 ← phi( processChars::@5/(byte) processChars::i#4 )
|
|
(byte) processChars::bitmask#4 ← phi( processChars::@5/(byte) processChars::bitmask#7 )
|
|
(struct ProcessingSprite*) processChars::processing#5 ← phi( processChars::@5/(struct ProcessingSprite*) processChars::processing#4 )
|
|
(byte*) processChars::$32 ← (byte*)(struct ProcessingSprite*) processChars::processing#5 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS
|
|
*((byte*) processChars::$32) ← (byte) STATUS_FREE#0
|
|
(number~) processChars::$16 ← (number) $ff ^ (byte) processChars::bitmask#4
|
|
*((byte*) SPRITES_ENABLE#0) ← *((byte*) SPRITES_ENABLE#0) & (number~) processChars::$16
|
|
to:processChars::@2
|
|
processChars::@return: scope:[processChars] from processChars::@2
|
|
return
|
|
to:@return
|
|
@12: scope:[] from @9
|
|
(word[$28]) SQUARES_X#0 ← { fill( $28, 0) }
|
|
(word[$19]) SQUARES_Y#0 ← { fill( $19, 0) }
|
|
to:@15
|
|
initSquareTables: scope:[initSquareTables] from main::@6
|
|
(byte) initSquareTables::x#0 ← (byte) 0
|
|
to:initSquareTables::@1
|
|
initSquareTables::@1: scope:[initSquareTables] from initSquareTables initSquareTables::@15
|
|
(byte) initSquareTables::x#2 ← phi( initSquareTables/(byte) initSquareTables::x#0 initSquareTables::@15/(byte) initSquareTables::x#1 )
|
|
(bool~) initSquareTables::$0 ← (byte) initSquareTables::x#2 < (number) $14
|
|
if((bool~) initSquareTables::$0) goto initSquareTables::@2
|
|
to:initSquareTables::@3
|
|
initSquareTables::@2: scope:[initSquareTables] from initSquareTables::@1
|
|
(byte) initSquareTables::x#3 ← phi( initSquareTables::@1/(byte) initSquareTables::x#2 )
|
|
(number~) initSquareTables::$3 ← (number) $14 - (byte) initSquareTables::x#3
|
|
(number~) initSquareTables::$4 ← (number~) initSquareTables::$3
|
|
to:initSquareTables::@4
|
|
initSquareTables::@3: scope:[initSquareTables] from initSquareTables::@1
|
|
(byte) initSquareTables::x#4 ← phi( initSquareTables::@1/(byte) initSquareTables::x#2 )
|
|
(number~) initSquareTables::$1 ← (byte) initSquareTables::x#4 - (number) $14
|
|
(number~) initSquareTables::$2 ← (number~) initSquareTables::$1
|
|
to:initSquareTables::@4
|
|
initSquareTables::@4: scope:[initSquareTables] from initSquareTables::@2 initSquareTables::@3
|
|
(byte) initSquareTables::x#6 ← phi( initSquareTables::@2/(byte) initSquareTables::x#3 initSquareTables::@3/(byte) initSquareTables::x#4 )
|
|
(number~) initSquareTables::$5 ← phi( initSquareTables::@2/(number~) initSquareTables::$4 initSquareTables::@3/(number~) initSquareTables::$2 )
|
|
(byte) initSquareTables::x_dist#0 ← (number~) initSquareTables::$5
|
|
(byte) mul8u::a#1 ← (byte) initSquareTables::x_dist#0
|
|
(byte) mul8u::b#0 ← (byte) initSquareTables::x_dist#0
|
|
call mul8u
|
|
(word) mul8u::return#2 ← (word) mul8u::return#1
|
|
to:initSquareTables::@15
|
|
initSquareTables::@15: scope:[initSquareTables] from initSquareTables::@4
|
|
(byte) initSquareTables::x#5 ← phi( initSquareTables::@4/(byte) initSquareTables::x#6 )
|
|
(word) mul8u::return#5 ← phi( initSquareTables::@4/(word) mul8u::return#2 )
|
|
(word~) initSquareTables::$6 ← (word) mul8u::return#5
|
|
(byte~) initSquareTables::$16 ← (byte) initSquareTables::x#5 * (const byte) SIZEOF_WORD
|
|
*((word[$28]) SQUARES_X#0 + (byte~) initSquareTables::$16) ← (word~) initSquareTables::$6
|
|
(byte) initSquareTables::x#1 ← (byte) initSquareTables::x#5 + rangenext(0,$27)
|
|
(bool~) initSquareTables::$7 ← (byte) initSquareTables::x#1 != rangelast(0,$27)
|
|
if((bool~) initSquareTables::$7) goto initSquareTables::@1
|
|
to:initSquareTables::@7
|
|
initSquareTables::@7: scope:[initSquareTables] from initSquareTables::@15
|
|
(byte) initSquareTables::y#0 ← (byte) 0
|
|
to:initSquareTables::@8
|
|
initSquareTables::@8: scope:[initSquareTables] from initSquareTables::@16 initSquareTables::@7
|
|
(byte) initSquareTables::y#2 ← phi( initSquareTables::@16/(byte) initSquareTables::y#1 initSquareTables::@7/(byte) initSquareTables::y#0 )
|
|
(bool~) initSquareTables::$8 ← (byte) initSquareTables::y#2 < (number) $c
|
|
if((bool~) initSquareTables::$8) goto initSquareTables::@9
|
|
to:initSquareTables::@10
|
|
initSquareTables::@9: scope:[initSquareTables] from initSquareTables::@8
|
|
(byte) initSquareTables::y#3 ← phi( initSquareTables::@8/(byte) initSquareTables::y#2 )
|
|
(number~) initSquareTables::$11 ← (number) $c - (byte) initSquareTables::y#3
|
|
(number~) initSquareTables::$12 ← (number~) initSquareTables::$11
|
|
to:initSquareTables::@11
|
|
initSquareTables::@10: scope:[initSquareTables] from initSquareTables::@8
|
|
(byte) initSquareTables::y#4 ← phi( initSquareTables::@8/(byte) initSquareTables::y#2 )
|
|
(number~) initSquareTables::$9 ← (byte) initSquareTables::y#4 - (number) $c
|
|
(number~) initSquareTables::$10 ← (number~) initSquareTables::$9
|
|
to:initSquareTables::@11
|
|
initSquareTables::@11: scope:[initSquareTables] from initSquareTables::@10 initSquareTables::@9
|
|
(byte) initSquareTables::y#6 ← phi( initSquareTables::@10/(byte) initSquareTables::y#4 initSquareTables::@9/(byte) initSquareTables::y#3 )
|
|
(number~) initSquareTables::$13 ← phi( initSquareTables::@9/(number~) initSquareTables::$12 initSquareTables::@10/(number~) initSquareTables::$10 )
|
|
(byte) initSquareTables::y_dist#0 ← (number~) initSquareTables::$13
|
|
(byte) mul8u::a#2 ← (byte) initSquareTables::y_dist#0
|
|
(byte) mul8u::b#1 ← (byte) initSquareTables::y_dist#0
|
|
call mul8u
|
|
(word) mul8u::return#3 ← (word) mul8u::return#1
|
|
to:initSquareTables::@16
|
|
initSquareTables::@16: scope:[initSquareTables] from initSquareTables::@11
|
|
(byte) initSquareTables::y#5 ← phi( initSquareTables::@11/(byte) initSquareTables::y#6 )
|
|
(word) mul8u::return#6 ← phi( initSquareTables::@11/(word) mul8u::return#3 )
|
|
(word~) initSquareTables::$14 ← (word) mul8u::return#6
|
|
(byte~) initSquareTables::$17 ← (byte) initSquareTables::y#5 * (const byte) SIZEOF_WORD
|
|
*((word[$19]) SQUARES_Y#0 + (byte~) initSquareTables::$17) ← (word~) initSquareTables::$14
|
|
(byte) initSquareTables::y#1 ← (byte) initSquareTables::y#5 + rangenext(0,$18)
|
|
(bool~) initSquareTables::$15 ← (byte) initSquareTables::y#1 != rangelast(0,$18)
|
|
if((bool~) initSquareTables::$15) goto initSquareTables::@8
|
|
to:initSquareTables::@return
|
|
initSquareTables::@return: scope:[initSquareTables] from initSquareTables::@16
|
|
return
|
|
to:@return
|
|
getCharToProcess: scope:[getCharToProcess] from main::@7
|
|
(byte) getCharToProcess::closest_x#0 ← (number) 0
|
|
(byte) getCharToProcess::closest_y#0 ← (number) 0
|
|
(word) getCharToProcess::closest_dist#0 ← (word) NOT_FOUND#0
|
|
(byte*) getCharToProcess::screen_line#0 ← (byte[$3e8]) SCREEN_COPY#0
|
|
(byte) getCharToProcess::y#0 ← (byte) 0
|
|
to:getCharToProcess::@3
|
|
getCharToProcess::@3: scope:[getCharToProcess] from getCharToProcess getCharToProcess::@9
|
|
(byte) getCharToProcess::closest_y#9 ← phi( getCharToProcess/(byte) getCharToProcess::closest_y#0 getCharToProcess::@9/(byte) getCharToProcess::closest_y#5 )
|
|
(byte) getCharToProcess::closest_x#9 ← phi( getCharToProcess/(byte) getCharToProcess::closest_x#0 getCharToProcess::@9/(byte) getCharToProcess::closest_x#5 )
|
|
(word) getCharToProcess::closest_dist#8 ← phi( getCharToProcess/(word) getCharToProcess::closest_dist#0 getCharToProcess::@9/(word) getCharToProcess::closest_dist#6 )
|
|
(byte) getCharToProcess::y#7 ← phi( getCharToProcess/(byte) getCharToProcess::y#0 getCharToProcess::@9/(byte) getCharToProcess::y#1 )
|
|
(byte*) getCharToProcess::screen_line#4 ← phi( getCharToProcess/(byte*) getCharToProcess::screen_line#0 getCharToProcess::@9/(byte*) getCharToProcess::screen_line#1 )
|
|
(byte) getCharToProcess::x#0 ← (byte) 0
|
|
to:getCharToProcess::@4
|
|
getCharToProcess::@4: scope:[getCharToProcess] from getCharToProcess::@3 getCharToProcess::@5
|
|
(byte) getCharToProcess::closest_y#7 ← phi( getCharToProcess::@3/(byte) getCharToProcess::closest_y#9 getCharToProcess::@5/(byte) getCharToProcess::closest_y#6 )
|
|
(byte) getCharToProcess::closest_x#7 ← phi( getCharToProcess::@3/(byte) getCharToProcess::closest_x#9 getCharToProcess::@5/(byte) getCharToProcess::closest_x#6 )
|
|
(word) getCharToProcess::closest_dist#5 ← phi( getCharToProcess::@3/(word) getCharToProcess::closest_dist#8 getCharToProcess::@5/(word) getCharToProcess::closest_dist#9 )
|
|
(byte) getCharToProcess::y#5 ← phi( getCharToProcess::@3/(byte) getCharToProcess::y#7 getCharToProcess::@5/(byte) getCharToProcess::y#6 )
|
|
(byte) getCharToProcess::x#2 ← phi( getCharToProcess::@3/(byte) getCharToProcess::x#0 getCharToProcess::@5/(byte) getCharToProcess::x#1 )
|
|
(byte*) getCharToProcess::screen_line#2 ← phi( getCharToProcess::@3/(byte*) getCharToProcess::screen_line#4 getCharToProcess::@5/(byte*) getCharToProcess::screen_line#5 )
|
|
(bool~) getCharToProcess::$2 ← *((byte*) getCharToProcess::screen_line#2 + (byte) getCharToProcess::x#2) != (byte) ' '
|
|
(bool~) getCharToProcess::$3 ← ! (bool~) getCharToProcess::$2
|
|
if((bool~) getCharToProcess::$3) goto getCharToProcess::@5
|
|
to:getCharToProcess::@7
|
|
getCharToProcess::@5: scope:[getCharToProcess] from getCharToProcess::@4 getCharToProcess::@7 getCharToProcess::@8
|
|
(byte) getCharToProcess::closest_y#6 ← phi( getCharToProcess::@4/(byte) getCharToProcess::closest_y#7 getCharToProcess::@7/(byte) getCharToProcess::closest_y#8 getCharToProcess::@8/(byte) getCharToProcess::closest_y#1 )
|
|
(byte) getCharToProcess::closest_x#6 ← phi( getCharToProcess::@4/(byte) getCharToProcess::closest_x#7 getCharToProcess::@7/(byte) getCharToProcess::closest_x#8 getCharToProcess::@8/(byte) getCharToProcess::closest_x#1 )
|
|
(word) getCharToProcess::closest_dist#9 ← phi( getCharToProcess::@4/(word) getCharToProcess::closest_dist#5 getCharToProcess::@7/(word) getCharToProcess::closest_dist#2 getCharToProcess::@8/(word) getCharToProcess::closest_dist#1 )
|
|
(byte) getCharToProcess::y#6 ← phi( getCharToProcess::@4/(byte) getCharToProcess::y#5 getCharToProcess::@7/(byte) getCharToProcess::y#2 getCharToProcess::@8/(byte) getCharToProcess::y#3 )
|
|
(byte*) getCharToProcess::screen_line#5 ← phi( getCharToProcess::@4/(byte*) getCharToProcess::screen_line#2 getCharToProcess::@7/(byte*) getCharToProcess::screen_line#6 getCharToProcess::@8/(byte*) getCharToProcess::screen_line#7 )
|
|
(byte) getCharToProcess::x#3 ← phi( getCharToProcess::@4/(byte) getCharToProcess::x#2 getCharToProcess::@7/(byte) getCharToProcess::x#4 getCharToProcess::@8/(byte) getCharToProcess::x#5 )
|
|
(byte) getCharToProcess::x#1 ← (byte) getCharToProcess::x#3 + rangenext(0,$27)
|
|
(bool~) getCharToProcess::$7 ← (byte) getCharToProcess::x#1 != rangelast(0,$27)
|
|
if((bool~) getCharToProcess::$7) goto getCharToProcess::@4
|
|
to:getCharToProcess::@9
|
|
getCharToProcess::@7: scope:[getCharToProcess] from getCharToProcess::@4
|
|
(byte) getCharToProcess::closest_y#8 ← phi( getCharToProcess::@4/(byte) getCharToProcess::closest_y#7 )
|
|
(byte) getCharToProcess::closest_x#8 ← phi( getCharToProcess::@4/(byte) getCharToProcess::closest_x#7 )
|
|
(byte*) getCharToProcess::screen_line#6 ← phi( getCharToProcess::@4/(byte*) getCharToProcess::screen_line#2 )
|
|
(word) getCharToProcess::closest_dist#2 ← phi( getCharToProcess::@4/(word) getCharToProcess::closest_dist#5 )
|
|
(byte) getCharToProcess::y#2 ← phi( getCharToProcess::@4/(byte) getCharToProcess::y#5 )
|
|
(byte) getCharToProcess::x#4 ← phi( getCharToProcess::@4/(byte) getCharToProcess::x#2 )
|
|
(byte~) getCharToProcess::$13 ← (byte) getCharToProcess::x#4 * (const byte) SIZEOF_WORD
|
|
(byte~) getCharToProcess::$14 ← (byte) getCharToProcess::y#2 * (const byte) SIZEOF_WORD
|
|
(word~) getCharToProcess::$4 ← *((word[$28]) SQUARES_X#0 + (byte~) getCharToProcess::$13) + *((word[$19]) SQUARES_Y#0 + (byte~) getCharToProcess::$14)
|
|
(word) getCharToProcess::dist#0 ← (word~) getCharToProcess::$4
|
|
(bool~) getCharToProcess::$5 ← (word) getCharToProcess::dist#0 < (word) getCharToProcess::closest_dist#2
|
|
(bool~) getCharToProcess::$6 ← ! (bool~) getCharToProcess::$5
|
|
if((bool~) getCharToProcess::$6) goto getCharToProcess::@5
|
|
to:getCharToProcess::@8
|
|
getCharToProcess::@8: scope:[getCharToProcess] from getCharToProcess::@7
|
|
(byte*) getCharToProcess::screen_line#7 ← phi( getCharToProcess::@7/(byte*) getCharToProcess::screen_line#6 )
|
|
(word) getCharToProcess::dist#1 ← phi( getCharToProcess::@7/(word) getCharToProcess::dist#0 )
|
|
(byte) getCharToProcess::y#3 ← phi( getCharToProcess::@7/(byte) getCharToProcess::y#2 )
|
|
(byte) getCharToProcess::x#5 ← phi( getCharToProcess::@7/(byte) getCharToProcess::x#4 )
|
|
(byte) getCharToProcess::closest_x#1 ← (byte) getCharToProcess::x#5
|
|
(byte) getCharToProcess::closest_y#1 ← (byte) getCharToProcess::y#3
|
|
(word) getCharToProcess::closest_dist#1 ← (word) getCharToProcess::dist#1
|
|
to:getCharToProcess::@5
|
|
getCharToProcess::@9: scope:[getCharToProcess] from getCharToProcess::@5
|
|
(byte) getCharToProcess::closest_y#5 ← phi( getCharToProcess::@5/(byte) getCharToProcess::closest_y#6 )
|
|
(byte) getCharToProcess::closest_x#5 ← phi( getCharToProcess::@5/(byte) getCharToProcess::closest_x#6 )
|
|
(word) getCharToProcess::closest_dist#6 ← phi( getCharToProcess::@5/(word) getCharToProcess::closest_dist#9 )
|
|
(byte) getCharToProcess::y#4 ← phi( getCharToProcess::@5/(byte) getCharToProcess::y#6 )
|
|
(byte*) getCharToProcess::screen_line#3 ← phi( getCharToProcess::@5/(byte*) getCharToProcess::screen_line#5 )
|
|
(byte*) getCharToProcess::screen_line#1 ← (byte*) getCharToProcess::screen_line#3 + (number) $28
|
|
(byte) getCharToProcess::y#1 ← (byte) getCharToProcess::y#4 + rangenext(0,$18)
|
|
(bool~) getCharToProcess::$8 ← (byte) getCharToProcess::y#1 != rangelast(0,$18)
|
|
if((bool~) getCharToProcess::$8) goto getCharToProcess::@3
|
|
to:getCharToProcess::@10
|
|
getCharToProcess::@10: scope:[getCharToProcess] from getCharToProcess::@9
|
|
(byte) getCharToProcess::closest_y#4 ← phi( getCharToProcess::@9/(byte) getCharToProcess::closest_y#5 )
|
|
(byte) getCharToProcess::closest_x#4 ← phi( getCharToProcess::@9/(byte) getCharToProcess::closest_x#5 )
|
|
(word) getCharToProcess::closest_dist#3 ← phi( getCharToProcess::@9/(word) getCharToProcess::closest_dist#6 )
|
|
(bool~) getCharToProcess::$0 ← (word) getCharToProcess::closest_dist#3 != (word) NOT_FOUND#0
|
|
(bool~) getCharToProcess::$1 ← ! (bool~) getCharToProcess::$0
|
|
if((bool~) getCharToProcess::$1) goto getCharToProcess::@1
|
|
to:getCharToProcess::@11
|
|
getCharToProcess::@1: scope:[getCharToProcess] from getCharToProcess::@10 getCharToProcess::@11
|
|
(word) getCharToProcess::closest_dist#4 ← phi( getCharToProcess::@10/(word) getCharToProcess::closest_dist#3 getCharToProcess::@11/(word) getCharToProcess::closest_dist#7 )
|
|
(byte) getCharToProcess::closest_y#2 ← phi( getCharToProcess::@10/(byte) getCharToProcess::closest_y#4 getCharToProcess::@11/(byte) getCharToProcess::closest_y#3 )
|
|
(byte) getCharToProcess::closest_x#2 ← phi( getCharToProcess::@10/(byte) getCharToProcess::closest_x#4 getCharToProcess::@11/(byte) getCharToProcess::closest_x#3 )
|
|
(byte) getCharToProcess::return_x#1 ← (byte) getCharToProcess::closest_x#2
|
|
(byte) getCharToProcess::return_y#1 ← (byte) getCharToProcess::closest_y#2
|
|
(word) getCharToProcess::return_dist#1 ← (word) getCharToProcess::closest_dist#4
|
|
to:getCharToProcess::@return
|
|
getCharToProcess::@11: scope:[getCharToProcess] from getCharToProcess::@10
|
|
(word) getCharToProcess::closest_dist#7 ← phi( getCharToProcess::@10/(word) getCharToProcess::closest_dist#3 )
|
|
(byte) getCharToProcess::closest_x#3 ← phi( getCharToProcess::@10/(byte) getCharToProcess::closest_x#4 )
|
|
(byte) getCharToProcess::closest_y#3 ← phi( getCharToProcess::@10/(byte) getCharToProcess::closest_y#4 )
|
|
(word~) getCharToProcess::$9 ← ((word)) (byte) getCharToProcess::closest_y#3
|
|
(number~) getCharToProcess::$10 ← (word~) getCharToProcess::$9 * (number) $28
|
|
(byte*~) getCharToProcess::$11 ← (byte[$3e8]) SCREEN_COPY#0 + (number~) getCharToProcess::$10
|
|
(byte*~) getCharToProcess::$12 ← (byte*~) getCharToProcess::$11 + (byte) getCharToProcess::closest_x#3
|
|
*((byte*~) getCharToProcess::$12) ← (byte) ' '
|
|
to:getCharToProcess::@1
|
|
getCharToProcess::@return: scope:[getCharToProcess] from getCharToProcess::@1
|
|
(word) getCharToProcess::return_dist#4 ← phi( getCharToProcess::@1/(word) getCharToProcess::return_dist#1 )
|
|
(byte) getCharToProcess::return_y#4 ← phi( getCharToProcess::@1/(byte) getCharToProcess::return_y#1 )
|
|
(byte) getCharToProcess::return_x#4 ← phi( getCharToProcess::@1/(byte) getCharToProcess::return_x#1 )
|
|
(byte) getCharToProcess::return_x#2 ← (byte) getCharToProcess::return_x#4
|
|
(byte) getCharToProcess::return_y#2 ← (byte) getCharToProcess::return_y#4
|
|
(word) getCharToProcess::return_dist#2 ← (word) getCharToProcess::return_dist#4
|
|
return
|
|
to:@return
|
|
setupRasterIrq: scope:[setupRasterIrq] from main::@4
|
|
(void()*) setupRasterIrq::irqRoutine#4 ← phi( main::@4/(void()*) setupRasterIrq::irqRoutine#0 )
|
|
(word) setupRasterIrq::raster#1 ← phi( main::@4/(word) setupRasterIrq::raster#0 )
|
|
asm { sei }
|
|
*((byte*) PROCPORT_DDR#0) ← (byte) PROCPORT_DDR_MEMORY_MASK#0
|
|
*((byte*) PROCPORT#0) ← (byte) PROCPORT_RAM_IO#0
|
|
*((byte*) CIA1_INTERRUPT#0) ← (byte) CIA_INTERRUPT_CLEAR#0
|
|
(bool~) setupRasterIrq::$0 ← (word) setupRasterIrq::raster#1 < (number) $100
|
|
if((bool~) setupRasterIrq::$0) goto setupRasterIrq::@1
|
|
to:setupRasterIrq::@3
|
|
setupRasterIrq::@1: scope:[setupRasterIrq] from setupRasterIrq
|
|
(void()*) setupRasterIrq::irqRoutine#2 ← phi( setupRasterIrq/(void()*) setupRasterIrq::irqRoutine#4 )
|
|
(word) setupRasterIrq::raster#3 ← phi( setupRasterIrq/(word) setupRasterIrq::raster#1 )
|
|
*((byte*) VIC_CONTROL#0) ← *((byte*) VIC_CONTROL#0) & (number) $7f
|
|
to:setupRasterIrq::@2
|
|
setupRasterIrq::@3: scope:[setupRasterIrq] from setupRasterIrq
|
|
(void()*) setupRasterIrq::irqRoutine#3 ← phi( setupRasterIrq/(void()*) setupRasterIrq::irqRoutine#4 )
|
|
(word) setupRasterIrq::raster#4 ← phi( setupRasterIrq/(word) setupRasterIrq::raster#1 )
|
|
*((byte*) VIC_CONTROL#0) ← *((byte*) VIC_CONTROL#0) | (number) $80
|
|
to:setupRasterIrq::@2
|
|
setupRasterIrq::@2: scope:[setupRasterIrq] from setupRasterIrq::@1 setupRasterIrq::@3
|
|
(void()*) setupRasterIrq::irqRoutine#1 ← phi( setupRasterIrq::@1/(void()*) setupRasterIrq::irqRoutine#2 setupRasterIrq::@3/(void()*) setupRasterIrq::irqRoutine#3 )
|
|
(word) setupRasterIrq::raster#2 ← phi( setupRasterIrq::@1/(word) setupRasterIrq::raster#3 setupRasterIrq::@3/(word) setupRasterIrq::raster#4 )
|
|
(byte~) setupRasterIrq::$1 ← < (word) setupRasterIrq::raster#2
|
|
*((byte*) RASTER#0) ← (byte~) setupRasterIrq::$1
|
|
*((byte*) IRQ_ENABLE#0) ← (byte) IRQ_RASTER#0
|
|
*((void()**) HARDWARE_IRQ#0) ← (void()*) setupRasterIrq::irqRoutine#1
|
|
asm { cli }
|
|
to:setupRasterIrq::@return
|
|
setupRasterIrq::@return: scope:[setupRasterIrq] from setupRasterIrq::@2
|
|
return
|
|
to:@return
|
|
@15: scope:[] from @12
|
|
(byte) RASTER_IRQ_TOP#0 ← (number) $30
|
|
to:@16
|
|
irqTop: scope:[irqTop] from
|
|
(byte) irqTop::i#0 ← (byte) 0
|
|
to:irqTop::@1
|
|
irqTop::@1: scope:[irqTop] from irqTop irqTop::@1
|
|
(byte) irqTop::i#2 ← phi( irqTop/(byte) irqTop::i#0 irqTop::@1/(byte) irqTop::i#1 )
|
|
(byte) irqTop::i#1 ← (byte) irqTop::i#2 + rangenext(0,4)
|
|
(bool~) irqTop::$1 ← (byte) irqTop::i#1 != rangelast(0,4)
|
|
if((bool~) irqTop::$1) goto irqTop::@1
|
|
to:irqTop::@2
|
|
irqTop::@2: scope:[irqTop] from irqTop::@1
|
|
*((byte*) BORDERCOL#0) ← (byte) WHITE#0
|
|
*((byte*) BGCOL#0) ← (byte) WHITE#0
|
|
(byte) irqTop::i1#0 ← (byte) 0
|
|
to:irqTop::@3
|
|
irqTop::@3: scope:[irqTop] from irqTop::@2 irqTop::@3
|
|
(byte) irqTop::i1#2 ← phi( irqTop::@2/(byte) irqTop::i1#0 irqTop::@3/(byte) irqTop::i1#1 )
|
|
(byte) irqTop::i1#1 ← (byte) irqTop::i1#2 + rangenext(0,7)
|
|
(bool~) irqTop::$2 ← (byte) irqTop::i1#1 != rangelast(0,7)
|
|
if((bool~) irqTop::$2) goto irqTop::@3
|
|
to:irqTop::@4
|
|
irqTop::@4: scope:[irqTop] from irqTop::@3
|
|
*((byte*) BORDERCOL#0) ← (byte) LIGHT_BLUE#0
|
|
*((byte*) BGCOL#0) ← (byte) BLUE#0
|
|
*((byte*) RASTER#0) ← (byte) RASTER_IRQ_MIDDLE#0
|
|
(void()*~) irqTop::$0 ← & interrupt(HARDWARE_ALL)(void()) irqBottom()
|
|
*((void()**) HARDWARE_IRQ#0) ← (void()*~) irqTop::$0
|
|
*((byte*) IRQ_STATUS#0) ← (byte) IRQ_RASTER#0
|
|
to:irqTop::@return
|
|
irqTop::@return: scope:[irqTop] from irqTop::@4
|
|
return
|
|
to:@return
|
|
@16: scope:[] from @15
|
|
(byte) RASTER_IRQ_MIDDLE#0 ← (number) $ff
|
|
to:@17
|
|
irqBottom: scope:[irqBottom] from
|
|
(byte) irqBottom::i#0 ← (byte) 0
|
|
to:irqBottom::@1
|
|
irqBottom::@1: scope:[irqBottom] from irqBottom irqBottom::@1
|
|
(byte) irqBottom::i#2 ← phi( irqBottom/(byte) irqBottom::i#0 irqBottom::@1/(byte) irqBottom::i#1 )
|
|
(byte) irqBottom::i#1 ← (byte) irqBottom::i#2 + rangenext(0,4)
|
|
(bool~) irqBottom::$2 ← (byte) irqBottom::i#1 != rangelast(0,4)
|
|
if((bool~) irqBottom::$2) goto irqBottom::@1
|
|
to:irqBottom::@2
|
|
irqBottom::@2: scope:[irqBottom] from irqBottom::@1
|
|
*((byte*) BORDERCOL#0) ← (byte) WHITE#0
|
|
*((byte*) BGCOL#0) ← (byte) WHITE#0
|
|
call processChars
|
|
to:irqBottom::@3
|
|
irqBottom::@3: scope:[irqBottom] from irqBottom::@2
|
|
*((byte*) BORDERCOL#0) ← (byte) LIGHT_BLUE#0
|
|
*((byte*) BGCOL#0) ← (byte) BLUE#0
|
|
*((byte*) RASTER#0) ← (byte) RASTER_IRQ_TOP#0
|
|
(void()*~) irqBottom::$1 ← & interrupt(HARDWARE_ALL)(void()) irqTop()
|
|
*((void()**) HARDWARE_IRQ#0) ← (void()*~) irqBottom::$1
|
|
*((byte*) IRQ_STATUS#0) ← (byte) IRQ_RASTER#0
|
|
to:irqBottom::@return
|
|
irqBottom::@return: scope:[irqBottom] from irqBottom::@3
|
|
return
|
|
to:@return
|
|
@17: scope:[] from @16
|
|
call main
|
|
to:@18
|
|
@18: scope:[] from @17
|
|
to:@end
|
|
@end: scope:[] from @18
|
|
|
|
SYMBOL TABLE SSA
|
|
(label) @12
|
|
(label) @15
|
|
(label) @16
|
|
(label) @17
|
|
(label) @18
|
|
(label) @9
|
|
(label) @begin
|
|
(label) @end
|
|
(byte*) BGCOL
|
|
(byte*) BGCOL#0
|
|
(byte) BLUE
|
|
(byte) BLUE#0
|
|
(byte*) BORDERCOL
|
|
(byte*) BORDERCOL#0
|
|
(byte*) CIA1_INTERRUPT
|
|
(byte*) CIA1_INTERRUPT#0
|
|
(byte) CIA_INTERRUPT_CLEAR
|
|
(byte) CIA_INTERRUPT_CLEAR#0
|
|
(void()**) HARDWARE_IRQ
|
|
(void()**) HARDWARE_IRQ#0
|
|
(byte*) IRQ_ENABLE
|
|
(byte*) IRQ_ENABLE#0
|
|
(byte) IRQ_RASTER
|
|
(byte) IRQ_RASTER#0
|
|
(byte*) IRQ_STATUS
|
|
(byte*) IRQ_STATUS#0
|
|
(byte) LIGHT_BLUE
|
|
(byte) LIGHT_BLUE#0
|
|
(word) NOT_FOUND
|
|
(word) NOT_FOUND#0
|
|
(byte) NUM_PROCESSING
|
|
(byte) NUM_PROCESSING#0
|
|
(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID = (byte) 3
|
|
(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR = (byte) 4
|
|
(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR = (byte) 6
|
|
(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS = (byte) 5
|
|
(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X = (byte) 0
|
|
(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y = (byte) 2
|
|
(struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING
|
|
(struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0
|
|
(byte*) PROCPORT
|
|
(byte*) PROCPORT#0
|
|
(byte*) PROCPORT_DDR
|
|
(byte*) PROCPORT_DDR#0
|
|
(byte) PROCPORT_DDR_MEMORY_MASK
|
|
(byte) PROCPORT_DDR_MEMORY_MASK#0
|
|
(byte) PROCPORT_RAM_IO
|
|
(byte) PROCPORT_RAM_IO#0
|
|
(word) ProcessingChar::dist
|
|
(byte) ProcessingChar::x
|
|
(byte) ProcessingChar::y
|
|
(byte) ProcessingSprite::id
|
|
(byte) ProcessingSprite::ptr
|
|
(byte*) ProcessingSprite::screenPtr
|
|
(byte) ProcessingSprite::status
|
|
(word) ProcessingSprite::x
|
|
(byte) ProcessingSprite::y
|
|
(byte*) RASTER
|
|
(byte*) RASTER#0
|
|
(byte) RASTER_IRQ_MIDDLE
|
|
(byte) RASTER_IRQ_MIDDLE#0
|
|
(byte) RASTER_IRQ_TOP
|
|
(byte) RASTER_IRQ_TOP#0
|
|
(byte*) SCREEN
|
|
(byte*) SCREEN#0
|
|
(byte[$3e8]) SCREEN_COPY
|
|
(byte[$3e8]) SCREEN_COPY#0
|
|
(const byte) SIZEOF_POINTER = (byte) 2
|
|
(const byte) SIZEOF_STRUCT_PROCESSINGSPRITE = (byte) 8
|
|
(const byte) SIZEOF_WORD = (byte) 2
|
|
(byte*) SPRITES_ENABLE
|
|
(byte*) SPRITES_ENABLE#0
|
|
(byte*) SPRITES_XMSB
|
|
(byte*) SPRITES_XMSB#0
|
|
(byte*) SPRITES_XPOS
|
|
(byte*) SPRITES_XPOS#0
|
|
(byte*) SPRITES_YPOS
|
|
(byte*) SPRITES_YPOS#0
|
|
(byte*) SPRITE_DATA
|
|
(byte*) SPRITE_DATA#0
|
|
(word) SPRITE_PTRS
|
|
(word) SPRITE_PTRS#0
|
|
(word[$28]) SQUARES_X
|
|
(word[$28]) SQUARES_X#0
|
|
(word[$19]) SQUARES_Y
|
|
(word[$19]) SQUARES_Y#0
|
|
(byte) STATUS_FREE
|
|
(byte) STATUS_FREE#0
|
|
(byte) STATUS_NEW
|
|
(byte) STATUS_NEW#0
|
|
(byte) STATUS_PROCESSING
|
|
(byte) STATUS_PROCESSING#0
|
|
(byte*) VIC_CONTROL
|
|
(byte*) VIC_CONTROL#0
|
|
(byte) WHITE
|
|
(byte) WHITE#0
|
|
(struct ProcessingChar()) getCharToProcess()
|
|
(bool~) getCharToProcess::$0
|
|
(bool~) getCharToProcess::$1
|
|
(number~) getCharToProcess::$10
|
|
(byte*~) getCharToProcess::$11
|
|
(byte*~) getCharToProcess::$12
|
|
(byte~) getCharToProcess::$13
|
|
(byte~) getCharToProcess::$14
|
|
(bool~) getCharToProcess::$2
|
|
(bool~) getCharToProcess::$3
|
|
(word~) getCharToProcess::$4
|
|
(bool~) getCharToProcess::$5
|
|
(bool~) getCharToProcess::$6
|
|
(bool~) getCharToProcess::$7
|
|
(bool~) getCharToProcess::$8
|
|
(word~) getCharToProcess::$9
|
|
(label) getCharToProcess::@1
|
|
(label) getCharToProcess::@10
|
|
(label) getCharToProcess::@11
|
|
(label) getCharToProcess::@3
|
|
(label) getCharToProcess::@4
|
|
(label) getCharToProcess::@5
|
|
(label) getCharToProcess::@7
|
|
(label) getCharToProcess::@8
|
|
(label) getCharToProcess::@9
|
|
(label) getCharToProcess::@return
|
|
(struct ProcessingChar) getCharToProcess::closest
|
|
(word) getCharToProcess::closest_dist
|
|
(word) getCharToProcess::closest_dist#0
|
|
(word) getCharToProcess::closest_dist#1
|
|
(word) getCharToProcess::closest_dist#2
|
|
(word) getCharToProcess::closest_dist#3
|
|
(word) getCharToProcess::closest_dist#4
|
|
(word) getCharToProcess::closest_dist#5
|
|
(word) getCharToProcess::closest_dist#6
|
|
(word) getCharToProcess::closest_dist#7
|
|
(word) getCharToProcess::closest_dist#8
|
|
(word) getCharToProcess::closest_dist#9
|
|
(byte) getCharToProcess::closest_x
|
|
(byte) getCharToProcess::closest_x#0
|
|
(byte) getCharToProcess::closest_x#1
|
|
(byte) getCharToProcess::closest_x#2
|
|
(byte) getCharToProcess::closest_x#3
|
|
(byte) getCharToProcess::closest_x#4
|
|
(byte) getCharToProcess::closest_x#5
|
|
(byte) getCharToProcess::closest_x#6
|
|
(byte) getCharToProcess::closest_x#7
|
|
(byte) getCharToProcess::closest_x#8
|
|
(byte) getCharToProcess::closest_x#9
|
|
(byte) getCharToProcess::closest_y
|
|
(byte) getCharToProcess::closest_y#0
|
|
(byte) getCharToProcess::closest_y#1
|
|
(byte) getCharToProcess::closest_y#2
|
|
(byte) getCharToProcess::closest_y#3
|
|
(byte) getCharToProcess::closest_y#4
|
|
(byte) getCharToProcess::closest_y#5
|
|
(byte) getCharToProcess::closest_y#6
|
|
(byte) getCharToProcess::closest_y#7
|
|
(byte) getCharToProcess::closest_y#8
|
|
(byte) getCharToProcess::closest_y#9
|
|
(word) getCharToProcess::dist
|
|
(word) getCharToProcess::dist#0
|
|
(word) getCharToProcess::dist#1
|
|
(struct ProcessingChar) getCharToProcess::return
|
|
(word) getCharToProcess::return_dist
|
|
(word) getCharToProcess::return_dist#0
|
|
(word) getCharToProcess::return_dist#1
|
|
(word) getCharToProcess::return_dist#2
|
|
(word) getCharToProcess::return_dist#3
|
|
(word) getCharToProcess::return_dist#4
|
|
(byte) getCharToProcess::return_x
|
|
(byte) getCharToProcess::return_x#0
|
|
(byte) getCharToProcess::return_x#1
|
|
(byte) getCharToProcess::return_x#2
|
|
(byte) getCharToProcess::return_x#3
|
|
(byte) getCharToProcess::return_x#4
|
|
(byte) getCharToProcess::return_y
|
|
(byte) getCharToProcess::return_y#0
|
|
(byte) getCharToProcess::return_y#1
|
|
(byte) getCharToProcess::return_y#2
|
|
(byte) getCharToProcess::return_y#3
|
|
(byte) getCharToProcess::return_y#4
|
|
(byte*) getCharToProcess::screen_line
|
|
(byte*) getCharToProcess::screen_line#0
|
|
(byte*) getCharToProcess::screen_line#1
|
|
(byte*) getCharToProcess::screen_line#2
|
|
(byte*) getCharToProcess::screen_line#3
|
|
(byte*) getCharToProcess::screen_line#4
|
|
(byte*) getCharToProcess::screen_line#5
|
|
(byte*) getCharToProcess::screen_line#6
|
|
(byte*) getCharToProcess::screen_line#7
|
|
(byte) getCharToProcess::x
|
|
(byte) getCharToProcess::x#0
|
|
(byte) getCharToProcess::x#1
|
|
(byte) getCharToProcess::x#2
|
|
(byte) getCharToProcess::x#3
|
|
(byte) getCharToProcess::x#4
|
|
(byte) getCharToProcess::x#5
|
|
(byte) getCharToProcess::y
|
|
(byte) getCharToProcess::y#0
|
|
(byte) getCharToProcess::y#1
|
|
(byte) getCharToProcess::y#2
|
|
(byte) getCharToProcess::y#3
|
|
(byte) getCharToProcess::y#4
|
|
(byte) getCharToProcess::y#5
|
|
(byte) getCharToProcess::y#6
|
|
(byte) getCharToProcess::y#7
|
|
(void()) initSquareTables()
|
|
(bool~) initSquareTables::$0
|
|
(number~) initSquareTables::$1
|
|
(number~) initSquareTables::$10
|
|
(number~) initSquareTables::$11
|
|
(number~) initSquareTables::$12
|
|
(number~) initSquareTables::$13
|
|
(word~) initSquareTables::$14
|
|
(bool~) initSquareTables::$15
|
|
(byte~) initSquareTables::$16
|
|
(byte~) initSquareTables::$17
|
|
(number~) initSquareTables::$2
|
|
(number~) initSquareTables::$3
|
|
(number~) initSquareTables::$4
|
|
(number~) initSquareTables::$5
|
|
(word~) initSquareTables::$6
|
|
(bool~) initSquareTables::$7
|
|
(bool~) initSquareTables::$8
|
|
(number~) initSquareTables::$9
|
|
(label) initSquareTables::@1
|
|
(label) initSquareTables::@10
|
|
(label) initSquareTables::@11
|
|
(label) initSquareTables::@15
|
|
(label) initSquareTables::@16
|
|
(label) initSquareTables::@2
|
|
(label) initSquareTables::@3
|
|
(label) initSquareTables::@4
|
|
(label) initSquareTables::@7
|
|
(label) initSquareTables::@8
|
|
(label) initSquareTables::@9
|
|
(label) initSquareTables::@return
|
|
(byte) initSquareTables::x
|
|
(byte) initSquareTables::x#0
|
|
(byte) initSquareTables::x#1
|
|
(byte) initSquareTables::x#2
|
|
(byte) initSquareTables::x#3
|
|
(byte) initSquareTables::x#4
|
|
(byte) initSquareTables::x#5
|
|
(byte) initSquareTables::x#6
|
|
(byte) initSquareTables::x_dist
|
|
(byte) initSquareTables::x_dist#0
|
|
(byte) initSquareTables::y
|
|
(byte) initSquareTables::y#0
|
|
(byte) initSquareTables::y#1
|
|
(byte) initSquareTables::y#2
|
|
(byte) initSquareTables::y#3
|
|
(byte) initSquareTables::y#4
|
|
(byte) initSquareTables::y#5
|
|
(byte) initSquareTables::y#6
|
|
(byte) initSquareTables::y_dist
|
|
(byte) initSquareTables::y_dist#0
|
|
interrupt(HARDWARE_ALL)(void()) irqBottom()
|
|
(void()*~) irqBottom::$1
|
|
(bool~) irqBottom::$2
|
|
(label) irqBottom::@1
|
|
(label) irqBottom::@2
|
|
(label) irqBottom::@3
|
|
(label) irqBottom::@return
|
|
(byte) irqBottom::i
|
|
(byte) irqBottom::i#0
|
|
(byte) irqBottom::i#1
|
|
(byte) irqBottom::i#2
|
|
interrupt(HARDWARE_ALL)(void()) irqTop()
|
|
(void()*~) irqTop::$0
|
|
(bool~) irqTop::$1
|
|
(bool~) irqTop::$2
|
|
(label) irqTop::@1
|
|
(label) irqTop::@2
|
|
(label) irqTop::@3
|
|
(label) irqTop::@4
|
|
(label) irqTop::@return
|
|
(byte) irqTop::i
|
|
(byte) irqTop::i#0
|
|
(byte) irqTop::i#1
|
|
(byte) irqTop::i#2
|
|
(byte) irqTop::i1
|
|
(byte) irqTop::i1#0
|
|
(byte) irqTop::i1#1
|
|
(byte) irqTop::i1#2
|
|
(void()) main()
|
|
(void()*~) main::$0
|
|
(struct ProcessingChar~) main::$10
|
|
(word) main::$10_dist
|
|
(byte) main::$10_x
|
|
(byte) main::$10_y
|
|
(bool~) main::$11
|
|
(bool~) main::$12
|
|
(byte*~) main::$16
|
|
(byte~) main::$17
|
|
(word*) main::$18
|
|
(byte*) main::$19
|
|
(byte*) main::$20
|
|
(byte*) main::$21
|
|
(byte*) main::$22
|
|
(byte**) main::$23
|
|
(number~) main::$3
|
|
(bool~) main::$4
|
|
(byte~) main::$5
|
|
(byte*~) main::$6
|
|
(bool~) main::$7
|
|
(byte*~) main::$8
|
|
(bool~) main::$9
|
|
(label) main::@1
|
|
(label) main::@13
|
|
(label) main::@15
|
|
(label) main::@16
|
|
(label) main::@17
|
|
(label) main::@18
|
|
(label) main::@2
|
|
(label) main::@3
|
|
(label) main::@4
|
|
(label) main::@5
|
|
(label) main::@6
|
|
(label) main::@7
|
|
(label) main::@8
|
|
(label) main::@return
|
|
(struct ProcessingChar) main::center
|
|
(word) main::center_dist
|
|
(word) main::center_dist#0
|
|
(word) main::center_dist#1
|
|
(byte) main::center_x
|
|
(byte) main::center_x#0
|
|
(byte) main::center_x#1
|
|
(byte) main::center_y
|
|
(byte) main::center_y#0
|
|
(byte) main::center_y#1
|
|
(byte*) main::dst
|
|
(byte*) main::dst#0
|
|
(byte*) main::dst#1
|
|
(byte*) main::dst#2
|
|
(byte) main::i
|
|
(byte) main::i#0
|
|
(byte) main::i#1
|
|
(byte) main::i#2
|
|
(byte*) main::sp
|
|
(byte*) main::sp#0
|
|
(byte*) main::sp#1
|
|
(byte*) main::sp#2
|
|
(byte*) main::src
|
|
(byte*) main::src#0
|
|
(byte*) main::src#1
|
|
(byte*) main::src#2
|
|
(word()) mul8u((byte) mul8u::a , (byte) mul8u::b)
|
|
(bool~) mul8u::$0
|
|
(number~) mul8u::$1
|
|
(bool~) mul8u::$2
|
|
(bool~) mul8u::$3
|
|
(word~) mul8u::$4
|
|
(byte~) mul8u::$5
|
|
(word~) mul8u::$6
|
|
(label) mul8u::@1
|
|
(label) mul8u::@2
|
|
(label) mul8u::@3
|
|
(label) mul8u::@4
|
|
(label) mul8u::@7
|
|
(label) mul8u::@return
|
|
(byte) mul8u::a
|
|
(byte) mul8u::a#0
|
|
(byte) mul8u::a#1
|
|
(byte) mul8u::a#2
|
|
(byte) mul8u::a#3
|
|
(byte) mul8u::a#4
|
|
(byte) mul8u::a#5
|
|
(byte) mul8u::a#6
|
|
(byte) mul8u::a#7
|
|
(byte) mul8u::b
|
|
(byte) mul8u::b#0
|
|
(byte) mul8u::b#1
|
|
(byte) mul8u::b#2
|
|
(word) mul8u::mb
|
|
(word) mul8u::mb#0
|
|
(word) mul8u::mb#1
|
|
(word) mul8u::mb#2
|
|
(word) mul8u::mb#3
|
|
(word) mul8u::mb#4
|
|
(word) mul8u::mb#5
|
|
(word) mul8u::res
|
|
(word) mul8u::res#0
|
|
(word) mul8u::res#1
|
|
(word) mul8u::res#2
|
|
(word) mul8u::res#3
|
|
(word) mul8u::res#4
|
|
(word) mul8u::res#5
|
|
(word) mul8u::res#6
|
|
(word) mul8u::return
|
|
(word) mul8u::return#0
|
|
(word) mul8u::return#1
|
|
(word) mul8u::return#2
|
|
(word) mul8u::return#3
|
|
(word) mul8u::return#4
|
|
(word) mul8u::return#5
|
|
(word) mul8u::return#6
|
|
(void()) processChars()
|
|
(number~) processChars::$0
|
|
(struct ProcessingSprite*~) processChars::$1
|
|
(number~) processChars::$10
|
|
(number~) processChars::$11
|
|
(byte~) processChars::$12
|
|
(number~) processChars::$13
|
|
(bool~) processChars::$14
|
|
(bool~) processChars::$15
|
|
(number~) processChars::$16
|
|
(bool~) processChars::$17
|
|
(byte~) processChars::$18
|
|
(byte*) processChars::$19
|
|
(number~) processChars::$2
|
|
(byte*) processChars::$20
|
|
(byte*) processChars::$21
|
|
(word*) processChars::$22
|
|
(byte**) processChars::$23
|
|
(byte*) processChars::$24
|
|
(byte*) processChars::$25
|
|
(byte*) processChars::$26
|
|
(word*) processChars::$27
|
|
(byte*) processChars::$28
|
|
(word*) processChars::$29
|
|
(bool~) processChars::$3
|
|
(word*) processChars::$30
|
|
(word*) processChars::$31
|
|
(byte*) processChars::$32
|
|
(bool~) processChars::$33
|
|
(bool~) processChars::$4
|
|
(bool~) processChars::$5
|
|
(bool~) processChars::$6
|
|
(byte*~) processChars::$7
|
|
(byte*~) processChars::$8
|
|
(byte~) processChars::$9
|
|
(label) processChars::@1
|
|
(label) processChars::@10
|
|
(label) processChars::@11
|
|
(label) processChars::@2
|
|
(label) processChars::@3
|
|
(label) processChars::@4
|
|
(label) processChars::@5
|
|
(label) processChars::@7
|
|
(label) processChars::@9
|
|
(label) processChars::@return
|
|
(byte) processChars::bitmask
|
|
(byte) processChars::bitmask#0
|
|
(byte) processChars::bitmask#1
|
|
(byte) processChars::bitmask#2
|
|
(byte) processChars::bitmask#3
|
|
(byte) processChars::bitmask#4
|
|
(byte) processChars::bitmask#5
|
|
(byte) processChars::bitmask#6
|
|
(byte) processChars::bitmask#7
|
|
(byte) processChars::i
|
|
(byte) processChars::i#0
|
|
(byte) processChars::i#1
|
|
(byte) processChars::i#10
|
|
(byte) processChars::i#2
|
|
(byte) processChars::i#3
|
|
(byte) processChars::i#4
|
|
(byte) processChars::i#5
|
|
(byte) processChars::i#6
|
|
(byte) processChars::i#7
|
|
(byte) processChars::i#8
|
|
(byte) processChars::i#9
|
|
(struct ProcessingSprite*) processChars::processing
|
|
(struct ProcessingSprite*) processChars::processing#0
|
|
(struct ProcessingSprite*) processChars::processing#1
|
|
(struct ProcessingSprite*) processChars::processing#2
|
|
(struct ProcessingSprite*) processChars::processing#3
|
|
(struct ProcessingSprite*) processChars::processing#4
|
|
(struct ProcessingSprite*) processChars::processing#5
|
|
(struct ProcessingSprite*) processChars::processing#6
|
|
(struct ProcessingSprite*) processChars::processing#7
|
|
(void()) setupRasterIrq((word) setupRasterIrq::raster , (void()*) setupRasterIrq::irqRoutine)
|
|
(bool~) setupRasterIrq::$0
|
|
(byte~) setupRasterIrq::$1
|
|
(label) setupRasterIrq::@1
|
|
(label) setupRasterIrq::@2
|
|
(label) setupRasterIrq::@3
|
|
(label) setupRasterIrq::@return
|
|
(void()*) setupRasterIrq::irqRoutine
|
|
(void()*) setupRasterIrq::irqRoutine#0
|
|
(void()*) setupRasterIrq::irqRoutine#1
|
|
(void()*) setupRasterIrq::irqRoutine#2
|
|
(void()*) setupRasterIrq::irqRoutine#3
|
|
(void()*) setupRasterIrq::irqRoutine#4
|
|
(word) setupRasterIrq::raster
|
|
(word) setupRasterIrq::raster#0
|
|
(word) setupRasterIrq::raster#1
|
|
(word) setupRasterIrq::raster#2
|
|
(word) setupRasterIrq::raster#3
|
|
(word) setupRasterIrq::raster#4
|
|
(void()) startProcessing((byte) startProcessing::center_x , (byte) startProcessing::center_y , (word) startProcessing::center_dist)
|
|
(word~) startProcessing::$0
|
|
(number~) startProcessing::$1
|
|
(byte~) startProcessing::$10
|
|
(word~) startProcessing::$11
|
|
(number~) startProcessing::$12
|
|
(byte*~) startProcessing::$13
|
|
(byte*~) startProcessing::$14
|
|
(number~) startProcessing::$15
|
|
(bool~) startProcessing::$16
|
|
(bool~) startProcessing::$17
|
|
(bool~) startProcessing::$18
|
|
(bool~) startProcessing::$19
|
|
(byte*~) startProcessing::$2
|
|
(bool~) startProcessing::$20
|
|
(byte~) startProcessing::$21
|
|
(byte~) startProcessing::$22
|
|
(word*) startProcessing::$23
|
|
(byte*) startProcessing::$24
|
|
(byte*) startProcessing::$25
|
|
(byte*) startProcessing::$26
|
|
(byte*) startProcessing::$27
|
|
(byte**) startProcessing::$28
|
|
(byte*) startProcessing::$29
|
|
(word~) startProcessing::$3
|
|
(number~) startProcessing::$4
|
|
(number~) startProcessing::$5
|
|
(number~) startProcessing::$6
|
|
(number~) startProcessing::$7
|
|
(byte*~) startProcessing::$8
|
|
(byte~) startProcessing::$9
|
|
(label) startProcessing::@1
|
|
(label) startProcessing::@10
|
|
(label) startProcessing::@2
|
|
(label) startProcessing::@3
|
|
(label) startProcessing::@4
|
|
(label) startProcessing::@5
|
|
(label) startProcessing::@8
|
|
(label) startProcessing::@9
|
|
(label) startProcessing::@return
|
|
(struct ProcessingChar) startProcessing::center
|
|
(word) startProcessing::center_dist
|
|
(word) startProcessing::center_dist#0
|
|
(byte) startProcessing::center_x
|
|
(byte) startProcessing::center_x#0
|
|
(byte) startProcessing::center_x#1
|
|
(byte) startProcessing::center_x#2
|
|
(byte) startProcessing::center_x#3
|
|
(byte) startProcessing::center_x#4
|
|
(byte) startProcessing::center_x#5
|
|
(byte) startProcessing::center_x#6
|
|
(byte) startProcessing::center_x#7
|
|
(byte) startProcessing::center_x#8
|
|
(byte) startProcessing::center_x#9
|
|
(byte) startProcessing::center_y
|
|
(byte) startProcessing::center_y#0
|
|
(byte) startProcessing::center_y#1
|
|
(byte) startProcessing::center_y#2
|
|
(byte) startProcessing::center_y#3
|
|
(byte) startProcessing::center_y#4
|
|
(byte) startProcessing::center_y#5
|
|
(byte) startProcessing::center_y#6
|
|
(byte) startProcessing::center_y#7
|
|
(byte) startProcessing::center_y#8
|
|
(byte) startProcessing::center_y#9
|
|
(byte) startProcessing::freeIdx
|
|
(byte) startProcessing::freeIdx#0
|
|
(byte) startProcessing::freeIdx#1
|
|
(byte) startProcessing::freeIdx#2
|
|
(byte) startProcessing::freeIdx#3
|
|
(byte) startProcessing::freeIdx#4
|
|
(byte) startProcessing::freeIdx#5
|
|
(byte) startProcessing::freeIdx#6
|
|
(byte) startProcessing::i
|
|
(byte) startProcessing::i#0
|
|
(byte) startProcessing::i#1
|
|
(byte) startProcessing::i#2
|
|
(byte) startProcessing::i#3
|
|
(byte) startProcessing::i#4
|
|
(byte) startProcessing::i1
|
|
(byte) startProcessing::i1#0
|
|
(byte) startProcessing::i1#1
|
|
(byte) startProcessing::i1#2
|
|
(byte*) startProcessing::screenPtr
|
|
(byte*) startProcessing::screenPtr#0
|
|
(byte*) startProcessing::spriteData
|
|
(byte*) startProcessing::spriteData#0
|
|
(byte*) startProcessing::spriteData#1
|
|
(byte*) startProcessing::spriteData#2
|
|
(byte) startProcessing::spriteIdx
|
|
(byte) startProcessing::spriteIdx#0
|
|
(byte) startProcessing::spriteIdx#1
|
|
(byte) startProcessing::spriteIdx#2
|
|
(byte) startProcessing::spritePtr
|
|
(byte) startProcessing::spritePtr#0
|
|
(word) startProcessing::spriteX
|
|
(word) startProcessing::spriteX#0
|
|
(byte) startProcessing::spriteY
|
|
(byte) startProcessing::spriteY#0
|
|
|
|
Adding number conversion cast (unumber) 7 in (byte) PROCPORT_DDR_MEMORY_MASK#0 ← (number) 7
|
|
Adding number conversion cast (unumber) $35 in (byte) PROCPORT_RAM_IO#0 ← (number) $35
|
|
Adding number conversion cast (unumber) $3f8 in (word) SPRITE_PTRS#0 ← (number) $3f8
|
|
Adding number conversion cast (unumber) 1 in (byte) IRQ_RASTER#0 ← (number) 1
|
|
Adding number conversion cast (unumber) $7f in (byte) CIA_INTERRUPT_CLEAR#0 ← (number) $7f
|
|
Adding number conversion cast (unumber) 1 in (byte) WHITE#0 ← (number) 1
|
|
Adding number conversion cast (unumber) 6 in (byte) BLUE#0 ← (number) 6
|
|
Adding number conversion cast (unumber) $e in (byte) LIGHT_BLUE#0 ← (number) $e
|
|
Adding number conversion cast (unumber) 0 in (word) mul8u::res#0 ← (number) 0
|
|
Adding number conversion cast (unumber) 0 in (bool~) mul8u::$0 ← (byte) mul8u::a#3 != (number) 0
|
|
Adding number conversion cast (unumber) 1 in (number~) mul8u::$1 ← (byte) mul8u::a#4 & (number) 1
|
|
Adding number conversion cast (unumber) mul8u::$1 in (number~) mul8u::$1 ← (byte) mul8u::a#4 & (unumber)(number) 1
|
|
Adding number conversion cast (unumber) 0 in (bool~) mul8u::$2 ← (unumber~) mul8u::$1 != (number) 0
|
|
Adding number conversion cast (unumber) 1 in (byte~) mul8u::$5 ← (byte) mul8u::a#5 >> (number) 1
|
|
Adding number conversion cast (unumber) 1 in (word~) mul8u::$6 ← (word) mul8u::mb#2 << (number) 1
|
|
Adding number conversion cast (unumber) 1 in (byte) NUM_PROCESSING#0 ← (number) 1
|
|
Adding number conversion cast (unumber) $ffff in (word) NOT_FOUND#0 ← (number) $ffff
|
|
Adding number conversion cast (unumber) 0 in (byte) STATUS_FREE#0 ← (number) 0
|
|
Adding number conversion cast (unumber) 1 in (byte) STATUS_NEW#0 ← (number) 1
|
|
Adding number conversion cast (unumber) 2 in (byte) STATUS_PROCESSING#0 ← (number) 2
|
|
Adding number conversion cast (unumber) 1 in (number~) main::$3 ← (byte) NUM_PROCESSING#0 - (number) 1
|
|
Adding number conversion cast (unumber) main::$3 in (number~) main::$3 ← (byte) NUM_PROCESSING#0 - (unumber)(number) 1
|
|
Adding number conversion cast (unumber) 0 in *((word*) main::$18 + (byte~) main::$17) ← (number) 0
|
|
Adding number conversion cast (unumber) 0 in *((byte*) main::$19 + (byte~) main::$17) ← (number) 0
|
|
Adding number conversion cast (unumber) 0 in *((byte*) main::$20 + (byte~) main::$17) ← (number) 0
|
|
Adding number conversion cast (unumber) 0 in *((byte*) main::$21 + (byte~) main::$17) ← (number) 0
|
|
Adding number conversion cast (unumber) 0 in *((byte*) main::sp#2) ← (number) 0
|
|
Adding number conversion cast (unumber) $3e8 in (byte*~) main::$8 ← (byte*) SCREEN#0 + (number) $3e8
|
|
Adding number conversion cast (unumber) $3e7 in (byte*~) main::$16 ← (byte*) SCREEN#0 + (number) $3e7
|
|
Adding number conversion cast (unumber) $ff in (byte) startProcessing::freeIdx#0 ← (number) $ff
|
|
Adding number conversion cast (unumber) 1 in (number~) startProcessing::$15 ← (byte) NUM_PROCESSING#0 - (number) 1
|
|
Adding number conversion cast (unumber) startProcessing::$15 in (number~) startProcessing::$15 ← (byte) NUM_PROCESSING#0 - (unumber)(number) 1
|
|
Adding number conversion cast (unumber) $ff in (bool~) startProcessing::$19 ← (byte) startProcessing::freeIdx#2 == (number) $ff
|
|
Adding number conversion cast (unumber) $40 in (number~) startProcessing::$1 ← (word~) startProcessing::$0 * (number) $40
|
|
Adding number conversion cast (unumber) startProcessing::$1 in (number~) startProcessing::$1 ← (word~) startProcessing::$0 * (unumber)(number) $40
|
|
Adding number conversion cast (unumber) $ff in *((byte*) startProcessing::spriteData#2) ← (number) $ff
|
|
Adding number conversion cast (unumber) 3 in (byte*) startProcessing::spriteData#1 ← (byte*) startProcessing::spriteData#2 + (number) 3
|
|
Adding number conversion cast (unumber) 8 in (number~) startProcessing::$4 ← (word~) startProcessing::$3 * (number) 8
|
|
Adding number conversion cast (unumber) startProcessing::$4 in (number~) startProcessing::$4 ← (word~) startProcessing::$3 * (unumber)(number) 8
|
|
Adding number conversion cast (unumber) $18 in (number~) startProcessing::$5 ← (number) $18 + (unumber~) startProcessing::$4
|
|
Adding number conversion cast (unumber) startProcessing::$5 in (number~) startProcessing::$5 ← (unumber)(number) $18 + (unumber~) startProcessing::$4
|
|
Adding number conversion cast (unumber) 8 in (number~) startProcessing::$6 ← (byte) startProcessing::center_y#1 * (number) 8
|
|
Adding number conversion cast (unumber) startProcessing::$6 in (number~) startProcessing::$6 ← (byte) startProcessing::center_y#1 * (unumber)(number) 8
|
|
Adding number conversion cast (unumber) $32 in (number~) startProcessing::$7 ← (number) $32 + (unumber~) startProcessing::$6
|
|
Adding number conversion cast (unumber) startProcessing::$7 in (number~) startProcessing::$7 ← (unumber)(number) $32 + (unumber~) startProcessing::$6
|
|
Adding number conversion cast (unumber) $40 in (byte*~) startProcessing::$8 ← (byte*) SPRITE_DATA#0 / (number) $40
|
|
Adding number conversion cast (unumber) $28 in (number~) startProcessing::$12 ← (word~) startProcessing::$11 * (number) $28
|
|
Adding number conversion cast (unumber) startProcessing::$12 in (number~) startProcessing::$12 ← (word~) startProcessing::$11 * (unumber)(number) $28
|
|
Adding number conversion cast (unumber) 1 in (number~) processChars::$0 ← (byte) NUM_PROCESSING#0 - (number) 1
|
|
Adding number conversion cast (unumber) processChars::$0 in (number~) processChars::$0 ← (byte) NUM_PROCESSING#0 - (unumber)(number) 1
|
|
Adding number conversion cast (unumber) 1 in (number~) processChars::$2 ← (number) 1 << *((byte*) processChars::$19)
|
|
Adding number conversion cast (unumber) processChars::$2 in (number~) processChars::$2 ← (unumber)(number) 1 << *((byte*) processChars::$19)
|
|
Adding number conversion cast (unumber) 0 in (bool~) processChars::$33 ← (number) 0 != (byte~) processChars::$9
|
|
Adding number conversion cast (unumber) $ff in (number~) processChars::$10 ← (number) $ff ^ (byte) processChars::bitmask#3
|
|
Adding number conversion cast (unumber) processChars::$10 in (number~) processChars::$10 ← (unumber)(number) $ff ^ (byte) processChars::bitmask#3
|
|
Adding number conversion cast (unumber) 2 in (number~) processChars::$11 ← (byte) processChars::i#4 * (number) 2
|
|
Adding number conversion cast (unumber) processChars::$11 in (number~) processChars::$11 ← (byte) processChars::i#4 * (unumber)(number) 2
|
|
Adding number conversion cast (unumber) 2 in (number~) processChars::$13 ← (byte) processChars::i#4 * (number) 2
|
|
Adding number conversion cast (unumber) processChars::$13 in (number~) processChars::$13 ← (byte) processChars::i#4 * (unumber)(number) 2
|
|
Adding number conversion cast (unumber) 0 in (bool~) processChars::$14 ← *((word*) processChars::$31) == (number) 0
|
|
Adding number conversion cast (unumber) $ff in (number~) processChars::$16 ← (number) $ff ^ (byte) processChars::bitmask#4
|
|
Adding number conversion cast (unumber) processChars::$16 in (number~) processChars::$16 ← (unumber)(number) $ff ^ (byte) processChars::bitmask#4
|
|
Adding number conversion cast (unumber) $14 in (bool~) initSquareTables::$0 ← (byte) initSquareTables::x#2 < (number) $14
|
|
Adding number conversion cast (unumber) $14 in (number~) initSquareTables::$3 ← (number) $14 - (byte) initSquareTables::x#3
|
|
Adding number conversion cast (unumber) initSquareTables::$3 in (number~) initSquareTables::$3 ← (unumber)(number) $14 - (byte) initSquareTables::x#3
|
|
Adding number conversion cast (unumber) initSquareTables::$4 in (number~) initSquareTables::$4 ← (unumber~) initSquareTables::$3
|
|
Adding number conversion cast (unumber) $14 in (number~) initSquareTables::$1 ← (byte) initSquareTables::x#4 - (number) $14
|
|
Adding number conversion cast (unumber) initSquareTables::$1 in (number~) initSquareTables::$1 ← (byte) initSquareTables::x#4 - (unumber)(number) $14
|
|
Adding number conversion cast (unumber) initSquareTables::$2 in (number~) initSquareTables::$2 ← (unumber~) initSquareTables::$1
|
|
Adding number conversion cast (unumber) initSquareTables::$5 in (byte) initSquareTables::x#6 ← phi( initSquareTables::@2/(byte) initSquareTables::x#3 initSquareTables::@3/(byte) initSquareTables::x#4 )
|
|
(number~) initSquareTables::$5 ← phi( initSquareTables::@2/(unumber~) initSquareTables::$4 initSquareTables::@3/(unumber~) initSquareTables::$2 )
|
|
Adding number conversion cast (unumber) $c in (bool~) initSquareTables::$8 ← (byte) initSquareTables::y#2 < (number) $c
|
|
Adding number conversion cast (unumber) $c in (number~) initSquareTables::$11 ← (number) $c - (byte) initSquareTables::y#3
|
|
Adding number conversion cast (unumber) initSquareTables::$11 in (number~) initSquareTables::$11 ← (unumber)(number) $c - (byte) initSquareTables::y#3
|
|
Adding number conversion cast (unumber) initSquareTables::$12 in (number~) initSquareTables::$12 ← (unumber~) initSquareTables::$11
|
|
Adding number conversion cast (unumber) $c in (number~) initSquareTables::$9 ← (byte) initSquareTables::y#4 - (number) $c
|
|
Adding number conversion cast (unumber) initSquareTables::$9 in (number~) initSquareTables::$9 ← (byte) initSquareTables::y#4 - (unumber)(number) $c
|
|
Adding number conversion cast (unumber) initSquareTables::$10 in (number~) initSquareTables::$10 ← (unumber~) initSquareTables::$9
|
|
Adding number conversion cast (unumber) initSquareTables::$13 in (byte) initSquareTables::y#6 ← phi( initSquareTables::@10/(byte) initSquareTables::y#4 initSquareTables::@9/(byte) initSquareTables::y#3 )
|
|
(number~) initSquareTables::$13 ← phi( initSquareTables::@9/(unumber~) initSquareTables::$12 initSquareTables::@10/(unumber~) initSquareTables::$10 )
|
|
Adding number conversion cast (unumber) 0 in (byte) getCharToProcess::closest_x#0 ← (number) 0
|
|
Adding number conversion cast (unumber) 0 in (byte) getCharToProcess::closest_y#0 ← (number) 0
|
|
Adding number conversion cast (unumber) $28 in (byte*) getCharToProcess::screen_line#1 ← (byte*) getCharToProcess::screen_line#3 + (number) $28
|
|
Adding number conversion cast (unumber) $28 in (number~) getCharToProcess::$10 ← (word~) getCharToProcess::$9 * (number) $28
|
|
Adding number conversion cast (unumber) getCharToProcess::$10 in (number~) getCharToProcess::$10 ← (word~) getCharToProcess::$9 * (unumber)(number) $28
|
|
Adding number conversion cast (unumber) $100 in (bool~) setupRasterIrq::$0 ← (word) setupRasterIrq::raster#1 < (number) $100
|
|
Adding number conversion cast (unumber) $7f in *((byte*) VIC_CONTROL#0) ← *((byte*) VIC_CONTROL#0) & (number) $7f
|
|
Adding number conversion cast (unumber) $80 in *((byte*) VIC_CONTROL#0) ← *((byte*) VIC_CONTROL#0) | (number) $80
|
|
Adding number conversion cast (unumber) $30 in (byte) RASTER_IRQ_TOP#0 ← (number) $30
|
|
Adding number conversion cast (unumber) $ff in (byte) RASTER_IRQ_MIDDLE#0 ← (number) $ff
|
|
Successful SSA optimization PassNAddNumberTypeConversions
|
|
Inlining cast (byte*) PROCPORT_DDR#0 ← (byte*)(number) 0
|
|
Inlining cast (byte) PROCPORT_DDR_MEMORY_MASK#0 ← (unumber)(number) 7
|
|
Inlining cast (byte*) PROCPORT#0 ← (byte*)(number) 1
|
|
Inlining cast (byte) PROCPORT_RAM_IO#0 ← (unumber)(number) $35
|
|
Inlining cast (word) SPRITE_PTRS#0 ← (unumber)(number) $3f8
|
|
Inlining cast (byte*) SPRITES_XPOS#0 ← (byte*)(number) $d000
|
|
Inlining cast (byte*) SPRITES_YPOS#0 ← (byte*)(number) $d001
|
|
Inlining cast (byte*) SPRITES_XMSB#0 ← (byte*)(number) $d010
|
|
Inlining cast (byte*) RASTER#0 ← (byte*)(number) $d012
|
|
Inlining cast (byte*) SPRITES_ENABLE#0 ← (byte*)(number) $d015
|
|
Inlining cast (byte*) BORDERCOL#0 ← (byte*)(number) $d020
|
|
Inlining cast (byte*) BGCOL#0 ← (byte*)(number) $d021
|
|
Inlining cast (byte*) VIC_CONTROL#0 ← (byte*)(number) $d011
|
|
Inlining cast (byte*) IRQ_STATUS#0 ← (byte*)(number) $d019
|
|
Inlining cast (byte*) IRQ_ENABLE#0 ← (byte*)(number) $d01a
|
|
Inlining cast (byte) IRQ_RASTER#0 ← (unumber)(number) 1
|
|
Inlining cast (byte*) CIA1_INTERRUPT#0 ← (byte*)(number) $dc0d
|
|
Inlining cast (byte) CIA_INTERRUPT_CLEAR#0 ← (unumber)(number) $7f
|
|
Inlining cast (void()**) HARDWARE_IRQ#0 ← (void()**)(number) $fffe
|
|
Inlining cast (byte) WHITE#0 ← (unumber)(number) 1
|
|
Inlining cast (byte) BLUE#0 ← (unumber)(number) 6
|
|
Inlining cast (byte) LIGHT_BLUE#0 ← (unumber)(number) $e
|
|
Inlining cast (word) mul8u::res#0 ← (unumber)(number) 0
|
|
Inlining cast (byte*) SCREEN#0 ← (byte*)(number) $400
|
|
Inlining cast (byte*) SPRITE_DATA#0 ← (byte*)(number) $2000
|
|
Inlining cast (byte) NUM_PROCESSING#0 ← (unumber)(number) 1
|
|
Inlining cast (word) NOT_FOUND#0 ← (unumber)(number) $ffff
|
|
Inlining cast (byte) STATUS_FREE#0 ← (unumber)(number) 0
|
|
Inlining cast (byte) STATUS_NEW#0 ← (unumber)(number) 1
|
|
Inlining cast (byte) STATUS_PROCESSING#0 ← (unumber)(number) 2
|
|
Inlining cast *((word*) main::$18 + (byte~) main::$17) ← (unumber)(number) 0
|
|
Inlining cast *((byte*) main::$19 + (byte~) main::$17) ← (unumber)(number) 0
|
|
Inlining cast *((byte*) main::$20 + (byte~) main::$17) ← (unumber)(number) 0
|
|
Inlining cast *((byte*) main::$21 + (byte~) main::$17) ← (unumber)(number) 0
|
|
Inlining cast *((byte**) main::$23 + (byte~) main::$17) ← (byte*)(number) 0
|
|
Inlining cast *((byte*) main::sp#2) ← (unumber)(number) 0
|
|
Inlining cast (byte) startProcessing::freeIdx#0 ← (unumber)(number) $ff
|
|
Inlining cast (word~) startProcessing::$0 ← (word)(byte) startProcessing::spriteIdx#0
|
|
Inlining cast *((byte*) startProcessing::spriteData#2) ← (unumber)(number) $ff
|
|
Inlining cast (word~) startProcessing::$3 ← (word)(byte) startProcessing::center_x#1
|
|
Inlining cast (byte~) startProcessing::$9 ← (byte)(byte*~) startProcessing::$8
|
|
Inlining cast (word~) startProcessing::$11 ← (word)(byte) startProcessing::center_y#1
|
|
Inlining cast (byte~) processChars::$12 ← (byte)*((word*) processChars::$27)
|
|
Inlining cast (byte) getCharToProcess::closest_x#0 ← (unumber)(number) 0
|
|
Inlining cast (byte) getCharToProcess::closest_y#0 ← (unumber)(number) 0
|
|
Inlining cast (word~) getCharToProcess::$9 ← (word)(byte) getCharToProcess::closest_y#3
|
|
Inlining cast (byte) RASTER_IRQ_TOP#0 ← (unumber)(number) $30
|
|
Inlining cast (byte) RASTER_IRQ_MIDDLE#0 ← (unumber)(number) $ff
|
|
Successful SSA optimization Pass2InlineCast
|
|
Simplifying constant pointer cast (byte*) 0
|
|
Simplifying constant integer cast 7
|
|
Simplifying constant pointer cast (byte*) 1
|
|
Simplifying constant integer cast $35
|
|
Simplifying constant integer cast $3f8
|
|
Simplifying constant pointer cast (byte*) 53248
|
|
Simplifying constant pointer cast (byte*) 53249
|
|
Simplifying constant pointer cast (byte*) 53264
|
|
Simplifying constant pointer cast (byte*) 53266
|
|
Simplifying constant pointer cast (byte*) 53269
|
|
Simplifying constant pointer cast (byte*) 53280
|
|
Simplifying constant pointer cast (byte*) 53281
|
|
Simplifying constant pointer cast (byte*) 53265
|
|
Simplifying constant pointer cast (byte*) 53273
|
|
Simplifying constant pointer cast (byte*) 53274
|
|
Simplifying constant integer cast 1
|
|
Simplifying constant pointer cast (byte*) 56333
|
|
Simplifying constant integer cast $7f
|
|
Simplifying constant pointer cast (void()**) 65534
|
|
Simplifying constant integer cast 1
|
|
Simplifying constant integer cast 6
|
|
Simplifying constant integer cast $e
|
|
Simplifying constant integer cast 0
|
|
Simplifying constant integer cast 0
|
|
Simplifying constant integer cast 1
|
|
Simplifying constant integer cast 0
|
|
Simplifying constant integer cast 1
|
|
Simplifying constant integer cast 1
|
|
Simplifying constant pointer cast (byte*) 1024
|
|
Simplifying constant pointer cast (byte*) 8192
|
|
Simplifying constant integer cast 1
|
|
Simplifying constant integer cast $ffff
|
|
Simplifying constant integer cast 0
|
|
Simplifying constant integer cast 1
|
|
Simplifying constant integer cast 2
|
|
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 pointer cast (byte*) 0
|
|
Simplifying constant integer cast 0
|
|
Simplifying constant integer cast $3e8
|
|
Simplifying constant integer cast $3e7
|
|
Simplifying constant integer cast $ff
|
|
Simplifying constant integer cast 1
|
|
Simplifying constant integer cast $ff
|
|
Simplifying constant integer cast $40
|
|
Simplifying constant integer cast $ff
|
|
Simplifying constant integer cast 3
|
|
Simplifying constant integer cast 8
|
|
Simplifying constant integer cast $18
|
|
Simplifying constant integer cast 8
|
|
Simplifying constant integer cast $32
|
|
Simplifying constant integer cast $40
|
|
Simplifying constant integer cast $28
|
|
Simplifying constant integer cast 1
|
|
Simplifying constant integer cast 1
|
|
Simplifying constant integer cast 0
|
|
Simplifying constant integer cast $ff
|
|
Simplifying constant integer cast 2
|
|
Simplifying constant integer cast 2
|
|
Simplifying constant integer cast 0
|
|
Simplifying constant integer cast $ff
|
|
Simplifying constant integer cast $14
|
|
Simplifying constant integer cast $14
|
|
Simplifying constant integer cast $14
|
|
Simplifying constant integer cast $c
|
|
Simplifying constant integer cast $c
|
|
Simplifying constant integer cast $c
|
|
Simplifying constant integer cast 0
|
|
Simplifying constant integer cast 0
|
|
Simplifying constant integer cast $28
|
|
Simplifying constant integer cast $28
|
|
Simplifying constant integer cast $100
|
|
Simplifying constant integer cast $7f
|
|
Simplifying constant integer cast $80
|
|
Simplifying constant integer cast $30
|
|
Simplifying constant integer cast $ff
|
|
Successful SSA optimization PassNCastSimplification
|
|
Finalized unsigned number type (byte) 7
|
|
Finalized unsigned number type (byte) $35
|
|
Finalized unsigned number type (word) $3f8
|
|
Finalized unsigned number type (byte) 1
|
|
Finalized unsigned number type (byte) $7f
|
|
Finalized unsigned number type (byte) 1
|
|
Finalized unsigned number type (byte) 6
|
|
Finalized unsigned number type (byte) $e
|
|
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) 1
|
|
Finalized unsigned number type (byte) 1
|
|
Finalized unsigned number type (byte) 1
|
|
Finalized unsigned number type (word) $ffff
|
|
Finalized unsigned number type (byte) 0
|
|
Finalized unsigned number type (byte) 1
|
|
Finalized unsigned number type (byte) 2
|
|
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) 0
|
|
Finalized unsigned number type (word) $3e8
|
|
Finalized unsigned number type (word) $3e7
|
|
Finalized unsigned number type (byte) $ff
|
|
Finalized unsigned number type (byte) 1
|
|
Finalized unsigned number type (byte) $ff
|
|
Finalized unsigned number type (byte) $40
|
|
Finalized unsigned number type (byte) $ff
|
|
Finalized unsigned number type (byte) 3
|
|
Finalized unsigned number type (byte) 8
|
|
Finalized unsigned number type (byte) $18
|
|
Finalized unsigned number type (byte) 8
|
|
Finalized unsigned number type (byte) $32
|
|
Finalized unsigned number type (byte) $40
|
|
Finalized unsigned number type (byte) $28
|
|
Finalized unsigned number type (byte) 1
|
|
Finalized unsigned number type (byte) 1
|
|
Finalized unsigned number type (byte) 0
|
|
Finalized unsigned number type (byte) $ff
|
|
Finalized unsigned number type (byte) 2
|
|
Finalized unsigned number type (byte) 2
|
|
Finalized unsigned number type (byte) 0
|
|
Finalized unsigned number type (byte) $ff
|
|
Finalized unsigned number type (byte) $14
|
|
Finalized unsigned number type (byte) $14
|
|
Finalized unsigned number type (byte) $14
|
|
Finalized unsigned number type (byte) $c
|
|
Finalized unsigned number type (byte) $c
|
|
Finalized unsigned number type (byte) $c
|
|
Finalized unsigned number type (byte) 0
|
|
Finalized unsigned number type (byte) 0
|
|
Finalized unsigned number type (byte) $28
|
|
Finalized unsigned number type (byte) $28
|
|
Finalized unsigned number type (word) $100
|
|
Finalized unsigned number type (byte) $7f
|
|
Finalized unsigned number type (byte) $80
|
|
Finalized unsigned number type (byte) $30
|
|
Finalized unsigned number type (byte) $ff
|
|
Successful SSA optimization PassNFinalizeNumberTypeConversions
|
|
Inferred type updated to byte in (unumber~) mul8u::$1 ← (byte) mul8u::a#4 & (byte) 1
|
|
Inferred type updated to byte in (unumber~) main::$3 ← (byte) NUM_PROCESSING#0 - (byte) 1
|
|
Inferred type updated to byte in (unumber~) startProcessing::$15 ← (byte) NUM_PROCESSING#0 - (byte) 1
|
|
Inferred type updated to word in (unumber~) startProcessing::$1 ← (word~) startProcessing::$0 * (byte) $40
|
|
Inferred type updated to word in (unumber~) startProcessing::$4 ← (word~) startProcessing::$3 * (byte) 8
|
|
Inferred type updated to word in (unumber~) startProcessing::$5 ← (byte) $18 + (word~) startProcessing::$4
|
|
Inferred type updated to byte in (unumber~) startProcessing::$6 ← (byte) startProcessing::center_y#1 * (byte) 8
|
|
Inferred type updated to byte in (unumber~) startProcessing::$7 ← (byte) $32 + (byte~) startProcessing::$6
|
|
Inferred type updated to word in (unumber~) startProcessing::$12 ← (word~) startProcessing::$11 * (byte) $28
|
|
Inferred type updated to byte in (unumber~) processChars::$0 ← (byte) NUM_PROCESSING#0 - (byte) 1
|
|
Inferred type updated to byte in (unumber~) processChars::$2 ← (byte) 1 << *((byte*) processChars::$19)
|
|
Inferred type updated to byte in (unumber~) processChars::$10 ← (byte) $ff ^ (byte) processChars::bitmask#3
|
|
Inferred type updated to byte in (unumber~) processChars::$11 ← (byte) processChars::i#4 * (byte) 2
|
|
Inferred type updated to byte in (unumber~) processChars::$13 ← (byte) processChars::i#4 * (byte) 2
|
|
Inferred type updated to byte in (unumber~) processChars::$16 ← (byte) $ff ^ (byte) processChars::bitmask#4
|
|
Inferred type updated to byte in (unumber~) initSquareTables::$3 ← (byte) $14 - (byte) initSquareTables::x#3
|
|
Inferred type updated to byte in (unumber~) initSquareTables::$4 ← (byte~) initSquareTables::$3
|
|
Inferred type updated to byte in (unumber~) initSquareTables::$1 ← (byte) initSquareTables::x#4 - (byte) $14
|
|
Inferred type updated to byte in (unumber~) initSquareTables::$2 ← (byte~) initSquareTables::$1
|
|
Inferred type updated to byte for (unumber~) initSquareTables::$5
|
|
Inferred type updated to byte in (unumber~) initSquareTables::$11 ← (byte) $c - (byte) initSquareTables::y#3
|
|
Inferred type updated to byte in (unumber~) initSquareTables::$12 ← (byte~) initSquareTables::$11
|
|
Inferred type updated to byte in (unumber~) initSquareTables::$9 ← (byte) initSquareTables::y#4 - (byte) $c
|
|
Inferred type updated to byte in (unumber~) initSquareTables::$10 ← (byte~) initSquareTables::$9
|
|
Inferred type updated to byte for (unumber~) initSquareTables::$13
|
|
Inferred type updated to word in (unumber~) getCharToProcess::$10 ← (word~) getCharToProcess::$9 * (byte) $28
|
|
Inversing boolean not [31] (bool~) mul8u::$3 ← (byte~) mul8u::$1 == (byte) 0 from [30] (bool~) mul8u::$2 ← (byte~) mul8u::$1 != (byte) 0
|
|
Inversing boolean not [108] (bool~) main::$12 ← (word) main::center_dist#0 != (word) NOT_FOUND#0 from [107] (bool~) main::$11 ← (word) main::center_dist#0 == (word) NOT_FOUND#0
|
|
Inversing boolean not [129] (bool~) startProcessing::$17 ← *((byte*) startProcessing::$29 + (byte~) startProcessing::$21) != (byte) STATUS_FREE#0 from [128] (bool~) startProcessing::$16 ← *((byte*) startProcessing::$29 + (byte~) startProcessing::$21) == (byte) STATUS_FREE#0
|
|
Inversing boolean not [195] (bool~) processChars::$4 ← *((byte*) processChars::$20) == (byte) STATUS_FREE#0 from [194] (bool~) processChars::$3 ← *((byte*) processChars::$20) != (byte) STATUS_FREE#0
|
|
Inversing boolean not [204] (bool~) processChars::$6 ← *((byte*) processChars::$21) != (byte) STATUS_NEW#0 from [203] (bool~) processChars::$5 ← *((byte*) processChars::$21) == (byte) STATUS_NEW#0
|
|
Inversing boolean not [240] (bool~) processChars::$15 ← *((word*) processChars::$31) != (byte) 0 from [239] (bool~) processChars::$14 ← *((word*) processChars::$31) == (byte) 0
|
|
Inversing boolean not [306] (bool~) getCharToProcess::$3 ← *((byte*) getCharToProcess::screen_line#2 + (byte) getCharToProcess::x#2) == (byte) ' ' from [305] (bool~) getCharToProcess::$2 ← *((byte*) getCharToProcess::screen_line#2 + (byte) getCharToProcess::x#2) != (byte) ' '
|
|
Inversing boolean not [318] (bool~) getCharToProcess::$6 ← (word) getCharToProcess::dist#0 >= (word) getCharToProcess::closest_dist#2 from [317] (bool~) getCharToProcess::$5 ← (word) getCharToProcess::dist#0 < (word) getCharToProcess::closest_dist#2
|
|
Inversing boolean not [331] (bool~) getCharToProcess::$1 ← (word) getCharToProcess::closest_dist#3 == (word) NOT_FOUND#0 from [330] (bool~) getCharToProcess::$0 ← (word) getCharToProcess::closest_dist#3 != (word) NOT_FOUND#0
|
|
Successful SSA optimization Pass2UnaryNotSimplification
|
|
Alias (word) mul8u::mb#0 = (byte) mul8u::b#2
|
|
Alias (byte) mul8u::a#3 = (byte) mul8u::a#4 (byte) mul8u::a#7
|
|
Alias (word) mul8u::mb#3 = (word) mul8u::mb#4 (word) mul8u::mb#5
|
|
Alias (word) mul8u::res#2 = (word) mul8u::res#5 (word) mul8u::res#4 (word) mul8u::return#0 (word) mul8u::res#3 (word) mul8u::return#4 (word) mul8u::return#1
|
|
Alias (byte) mul8u::a#0 = (byte~) mul8u::$5
|
|
Alias (word) mul8u::mb#1 = (word~) mul8u::$6
|
|
Alias (word) mul8u::res#1 = (word~) mul8u::$4
|
|
Alias (void()*) setupRasterIrq::irqRoutine#0 = (void()*~) main::$0
|
|
Alias (byte) getCharToProcess::return_x#0 = (byte) getCharToProcess::return_x#3
|
|
Alias (byte) getCharToProcess::return_y#0 = (byte) getCharToProcess::return_y#3
|
|
Alias (word) getCharToProcess::return_dist#0 = (word) getCharToProcess::return_dist#3
|
|
Alias (byte) main::center_x#0 = (byte) main::$10_x (byte) main::center_x#1
|
|
Alias (byte) main::center_y#0 = (byte) main::$10_y (byte) main::center_y#1
|
|
Alias (word) main::center_dist#0 = (word) main::$10_dist (word) main::center_dist#1
|
|
Alias (byte) startProcessing::i#2 = (byte) startProcessing::i#3 (byte) startProcessing::i#4 (byte) startProcessing::freeIdx#1
|
|
Alias (byte) startProcessing::freeIdx#4 = (byte) startProcessing::freeIdx#5
|
|
Alias (byte) startProcessing::center_x#5 = (byte) startProcessing::center_x#7 (byte) startProcessing::center_x#6
|
|
Alias (byte) startProcessing::center_y#5 = (byte) startProcessing::center_y#7 (byte) startProcessing::center_y#6
|
|
Alias (byte) startProcessing::freeIdx#2 = (byte) startProcessing::freeIdx#3 (byte) startProcessing::spriteIdx#0
|
|
Alias (byte) startProcessing::center_x#3 = (byte) startProcessing::center_x#4
|
|
Alias (byte) startProcessing::center_y#3 = (byte) startProcessing::center_y#4
|
|
Alias (byte*) startProcessing::spriteData#0 = (byte*~) startProcessing::$2
|
|
Alias (byte) startProcessing::center_x#1 = (byte) startProcessing::center_x#2
|
|
Alias (byte) startProcessing::center_y#1 = (byte) startProcessing::center_y#2
|
|
Alias (byte) startProcessing::spriteIdx#1 = (byte) startProcessing::spriteIdx#2
|
|
Alias (word) startProcessing::spriteX#0 = (word~) startProcessing::$5
|
|
Alias (byte) startProcessing::spriteY#0 = (byte~) startProcessing::$7
|
|
Alias (byte) startProcessing::spritePtr#0 = (byte~) startProcessing::$10
|
|
Alias (byte*) startProcessing::screenPtr#0 = (byte*~) startProcessing::$14
|
|
Alias (struct ProcessingSprite*) processChars::processing#0 = (struct ProcessingSprite*~) processChars::$1 (struct ProcessingSprite*) processChars::processing#1 (struct ProcessingSprite*) processChars::processing#3
|
|
Alias (byte) processChars::bitmask#0 = (byte~) processChars::$2 (byte) processChars::bitmask#5 (byte) processChars::bitmask#1
|
|
Alias (byte) processChars::i#10 = (byte) processChars::i#9 (byte) processChars::i#2
|
|
Alias (byte) processChars::bitmask#2 = (byte) processChars::bitmask#6 (byte) processChars::bitmask#3
|
|
Alias (byte) processChars::i#6 = (byte) processChars::i#8 (byte) processChars::i#7
|
|
Alias (struct ProcessingSprite*) processChars::processing#2 = (struct ProcessingSprite*) processChars::processing#6 (struct ProcessingSprite*) processChars::processing#7
|
|
Alias (struct ProcessingSprite*) processChars::processing#4 = (struct ProcessingSprite*) processChars::processing#5
|
|
Alias (byte) processChars::bitmask#4 = (byte) processChars::bitmask#7
|
|
Alias (byte) processChars::i#4 = (byte) processChars::i#5
|
|
Alias (byte) initSquareTables::x#2 = (byte) initSquareTables::x#3 (byte) initSquareTables::x#4
|
|
Alias (byte~) initSquareTables::$4 = (byte~) initSquareTables::$3
|
|
Alias (byte~) initSquareTables::$2 = (byte~) initSquareTables::$1
|
|
Alias (byte) initSquareTables::x_dist#0 = (byte~) initSquareTables::$5
|
|
Alias (word) mul8u::return#2 = (word) mul8u::return#5
|
|
Alias (byte) initSquareTables::x#5 = (byte) initSquareTables::x#6
|
|
Alias (byte) initSquareTables::y#2 = (byte) initSquareTables::y#3 (byte) initSquareTables::y#4
|
|
Alias (byte~) initSquareTables::$12 = (byte~) initSquareTables::$11
|
|
Alias (byte~) initSquareTables::$10 = (byte~) initSquareTables::$9
|
|
Alias (byte) initSquareTables::y_dist#0 = (byte~) initSquareTables::$13
|
|
Alias (word) mul8u::return#3 = (word) mul8u::return#6
|
|
Alias (byte) initSquareTables::y#5 = (byte) initSquareTables::y#6
|
|
Alias (byte) getCharToProcess::x#2 = (byte) getCharToProcess::x#4 (byte) getCharToProcess::x#5 (byte) getCharToProcess::closest_x#1
|
|
Alias (byte) getCharToProcess::y#2 = (byte) getCharToProcess::y#5 (byte) getCharToProcess::y#3 (byte) getCharToProcess::closest_y#1
|
|
Alias (word) getCharToProcess::closest_dist#2 = (word) getCharToProcess::closest_dist#5
|
|
Alias (byte*) getCharToProcess::screen_line#2 = (byte*) getCharToProcess::screen_line#6 (byte*) getCharToProcess::screen_line#7
|
|
Alias (byte) getCharToProcess::closest_x#7 = (byte) getCharToProcess::closest_x#8
|
|
Alias (byte) getCharToProcess::closest_y#7 = (byte) getCharToProcess::closest_y#8
|
|
Alias (word) getCharToProcess::dist#0 = (word~) getCharToProcess::$4 (word) getCharToProcess::dist#1 (word) getCharToProcess::closest_dist#1
|
|
Alias (byte*) getCharToProcess::screen_line#3 = (byte*) getCharToProcess::screen_line#5
|
|
Alias (byte) getCharToProcess::y#4 = (byte) getCharToProcess::y#6
|
|
Alias (word) getCharToProcess::closest_dist#3 = (word) getCharToProcess::closest_dist#6 (word) getCharToProcess::closest_dist#9 (word) getCharToProcess::closest_dist#7
|
|
Alias (byte) getCharToProcess::closest_x#3 = (byte) getCharToProcess::closest_x#5 (byte) getCharToProcess::closest_x#6 (byte) getCharToProcess::closest_x#4
|
|
Alias (byte) getCharToProcess::closest_y#3 = (byte) getCharToProcess::closest_y#5 (byte) getCharToProcess::closest_y#6 (byte) getCharToProcess::closest_y#4
|
|
Alias (byte) getCharToProcess::return_x#1 = (byte) getCharToProcess::closest_x#2 (byte) getCharToProcess::return_x#4 (byte) getCharToProcess::return_x#2
|
|
Alias (byte) getCharToProcess::return_y#1 = (byte) getCharToProcess::closest_y#2 (byte) getCharToProcess::return_y#4 (byte) getCharToProcess::return_y#2
|
|
Alias (word) getCharToProcess::return_dist#1 = (word) getCharToProcess::closest_dist#4 (word) getCharToProcess::return_dist#4 (word) getCharToProcess::return_dist#2
|
|
Alias (word) setupRasterIrq::raster#1 = (word) setupRasterIrq::raster#3 (word) setupRasterIrq::raster#4
|
|
Alias (void()*) setupRasterIrq::irqRoutine#2 = (void()*) setupRasterIrq::irqRoutine#4 (void()*) setupRasterIrq::irqRoutine#3
|
|
Successful SSA optimization Pass2AliasElimination
|
|
Alias candidate removed (phi-usage) (byte) getCharToProcess::x#2
|
|
Alias candidate removed (phi-usage) (byte) getCharToProcess::y#2
|
|
Alias candidate removed (solo) (byte) getCharToProcess::x#3 =
|
|
Alias candidate removed (solo) (byte) getCharToProcess::y#4 =
|
|
Alias (byte) mul8u::a#3 = (byte) mul8u::a#5
|
|
Alias (word) mul8u::mb#2 = (word) mul8u::mb#3
|
|
Alias (byte) startProcessing::center_x#3 = (byte) startProcessing::center_x#5
|
|
Alias (byte) startProcessing::center_y#3 = (byte) startProcessing::center_y#5
|
|
Alias (struct ProcessingSprite*) processChars::processing#0 = (struct ProcessingSprite*) processChars::processing#2 (struct ProcessingSprite*) processChars::processing#4
|
|
Alias (byte) processChars::bitmask#0 = (byte) processChars::bitmask#2 (byte) processChars::bitmask#4
|
|
Alias (byte) processChars::i#10 = (byte) processChars::i#6 (byte) processChars::i#4
|
|
Alias (byte) initSquareTables::x#2 = (byte) initSquareTables::x#5
|
|
Alias (byte) initSquareTables::y#2 = (byte) initSquareTables::y#5
|
|
Alias (byte*) getCharToProcess::screen_line#2 = (byte*) getCharToProcess::screen_line#3
|
|
Alias (byte) getCharToProcess::return_x#1 = (byte) getCharToProcess::closest_x#3
|
|
Alias (byte) getCharToProcess::return_y#1 = (byte) getCharToProcess::closest_y#3
|
|
Alias (word) getCharToProcess::return_dist#1 = (word) getCharToProcess::closest_dist#3
|
|
Alias (word) setupRasterIrq::raster#1 = (word) setupRasterIrq::raster#2
|
|
Alias (void()*) setupRasterIrq::irqRoutine#1 = (void()*) setupRasterIrq::irqRoutine#2
|
|
Successful SSA optimization Pass2AliasElimination
|
|
Alias candidate removed (phi-usage) (byte) getCharToProcess::x#2
|
|
Alias candidate removed (phi-usage) (byte) getCharToProcess::y#2
|
|
Alias candidate removed (solo) (byte) getCharToProcess::x#3 =
|
|
Alias candidate removed (solo) (byte) getCharToProcess::y#4 =
|
|
Alias (byte) processChars::i#10 = (byte) processChars::i#3
|
|
Successful SSA optimization Pass2AliasElimination
|
|
Alias candidate removed (phi-usage) (byte) getCharToProcess::x#2
|
|
Alias candidate removed (phi-usage) (byte) getCharToProcess::y#2
|
|
Alias candidate removed (solo) (byte) getCharToProcess::x#3 =
|
|
Alias candidate removed (solo) (byte) getCharToProcess::y#4 =
|
|
Self Phi Eliminated (byte) startProcessing::freeIdx#4
|
|
Self Phi Eliminated (byte) startProcessing::center_x#3
|
|
Self Phi Eliminated (byte) startProcessing::center_y#3
|
|
Self Phi Eliminated (byte) startProcessing::center_x#1
|
|
Self Phi Eliminated (byte) startProcessing::center_y#1
|
|
Self Phi Eliminated (byte) startProcessing::spriteIdx#1
|
|
Self Phi Eliminated (byte*) getCharToProcess::screen_line#2
|
|
Successful SSA optimization Pass2SelfPhiElimination
|
|
Identical Phi Values (byte) startProcessing::center_x#9 (byte) startProcessing::center_x#0
|
|
Identical Phi Values (byte) startProcessing::center_y#9 (byte) startProcessing::center_y#0
|
|
Identical Phi Values (byte) startProcessing::freeIdx#4 (byte) startProcessing::freeIdx#6
|
|
Identical Phi Values (byte) startProcessing::center_x#3 (byte) startProcessing::center_x#8
|
|
Identical Phi Values (byte) startProcessing::center_y#3 (byte) startProcessing::center_y#8
|
|
Identical Phi Values (byte) startProcessing::center_x#1 (byte) startProcessing::center_x#3
|
|
Identical Phi Values (byte) startProcessing::center_y#1 (byte) startProcessing::center_y#3
|
|
Identical Phi Values (byte) startProcessing::spriteIdx#1 (byte) startProcessing::freeIdx#2
|
|
Identical Phi Values (byte*) getCharToProcess::screen_line#2 (byte*) getCharToProcess::screen_line#4
|
|
Identical Phi Values (byte) getCharToProcess::x#3 (byte) getCharToProcess::x#2
|
|
Identical Phi Values (byte) getCharToProcess::y#4 (byte) getCharToProcess::y#2
|
|
Identical Phi Values (word) setupRasterIrq::raster#1 (word) setupRasterIrq::raster#0
|
|
Identical Phi Values (void()*) setupRasterIrq::irqRoutine#1 (void()*) setupRasterIrq::irqRoutine#0
|
|
Successful SSA optimization Pass2IdenticalPhiElimination
|
|
Identified duplicate assignment right side [232] (byte~) processChars::$13 ← (byte) processChars::i#10 * (byte) 2
|
|
Successful SSA optimization Pass2DuplicateRValueIdentification
|
|
Simple Condition (bool~) mul8u::$0 [27] if((byte) mul8u::a#3!=(byte) 0) goto mul8u::@2
|
|
Simple Condition (bool~) mul8u::$3 [32] if((byte~) mul8u::$1==(byte) 0) goto mul8u::@4
|
|
Simple Condition (bool~) main::$4 [73] if((byte) main::i#1!=rangelast(0,main::$3)) goto main::@1
|
|
Simple Condition (bool~) main::$7 [81] if((byte*) main::sp#1<(byte*~) main::$6) goto main::@3
|
|
Simple Condition (bool~) main::$9 [94] if((byte*) main::src#1!=(byte*~) main::$8) goto main::@5
|
|
Simple Condition (bool~) main::$12 [109] if((word) main::center_dist#0!=(word) NOT_FOUND#0) goto main::@8
|
|
Simple Condition (bool~) startProcessing::$17 [130] if(*((byte*) startProcessing::$29 + (byte~) startProcessing::$21)!=(byte) STATUS_FREE#0) goto startProcessing::@3
|
|
Simple Condition (bool~) startProcessing::$18 [134] if((byte) startProcessing::i#1!=rangelast(0,startProcessing::$15)) goto startProcessing::@2
|
|
Simple Condition (bool~) startProcessing::$19 [139] if((byte) startProcessing::freeIdx#2==(byte) $ff) goto startProcessing::@1
|
|
Simple Condition (bool~) startProcessing::$20 [152] if((byte) startProcessing::i1#1!=rangelast(0,7)) goto startProcessing::@9
|
|
Simple Condition (bool~) processChars::$4 [196] if(*((byte*) processChars::$20)==(byte) STATUS_FREE#0) goto processChars::@2
|
|
Simple Condition (bool~) processChars::$17 [200] if((byte) processChars::i#1!=rangelast(0,processChars::$0)) goto processChars::@1
|
|
Simple Condition (bool~) processChars::$6 [205] if(*((byte*) processChars::$21)!=(byte) STATUS_NEW#0) goto processChars::@3
|
|
Simple Condition (bool~) processChars::$33 [210] if((byte) 0!=(byte~) processChars::$9) goto processChars::@4
|
|
Simple Condition (bool~) processChars::$15 [241] if(*((word*) processChars::$31)!=(byte) 0) goto processChars::@2
|
|
Simple Condition (bool~) initSquareTables::$0 [253] if((byte) initSquareTables::x#2<(byte) $14) goto initSquareTables::@2
|
|
Simple Condition (bool~) initSquareTables::$7 [272] if((byte) initSquareTables::x#1!=rangelast(0,$27)) goto initSquareTables::@1
|
|
Simple Condition (bool~) initSquareTables::$8 [276] if((byte) initSquareTables::y#2<(byte) $c) goto initSquareTables::@9
|
|
Simple Condition (bool~) initSquareTables::$15 [295] if((byte) initSquareTables::y#1!=rangelast(0,$18)) goto initSquareTables::@8
|
|
Simple Condition (bool~) getCharToProcess::$3 [307] if(*((byte*) getCharToProcess::screen_line#4 + (byte) getCharToProcess::x#2)==(byte) ' ') goto getCharToProcess::@5
|
|
Simple Condition (bool~) getCharToProcess::$7 [311] if((byte) getCharToProcess::x#1!=rangelast(0,$27)) goto getCharToProcess::@4
|
|
Simple Condition (bool~) getCharToProcess::$6 [319] if((word) getCharToProcess::dist#0>=(word) getCharToProcess::closest_dist#2) goto getCharToProcess::@5
|
|
Simple Condition (bool~) getCharToProcess::$8 [328] if((byte) getCharToProcess::y#1!=rangelast(0,$18)) goto getCharToProcess::@3
|
|
Simple Condition (bool~) getCharToProcess::$1 [332] if((word) getCharToProcess::return_dist#1==(word) NOT_FOUND#0) goto getCharToProcess::@1
|
|
Simple Condition (bool~) setupRasterIrq::$0 [354] if((word) setupRasterIrq::raster#0<(word) $100) goto setupRasterIrq::@1
|
|
Simple Condition (bool~) irqTop::$1 [371] if((byte) irqTop::i#1!=rangelast(0,4)) goto irqTop::@1
|
|
Simple Condition (bool~) irqTop::$2 [378] if((byte) irqTop::i1#1!=rangelast(0,7)) goto irqTop::@3
|
|
Simple Condition (bool~) irqBottom::$2 [391] if((byte) irqBottom::i#1!=rangelast(0,4)) goto irqBottom::@1
|
|
Successful SSA optimization Pass2ConditionalJumpSimplification
|
|
Constant right-side identified [48] (byte[$3e8]) SCREEN_COPY#0 ← { fill( $3e8, 0) }
|
|
Constant right-side identified [82] (void()*) setupRasterIrq::irqRoutine#0 ← & interrupt(HARDWARE_ALL)(void()) irqTop()
|
|
Constant right-side identified [248] (word[$28]) SQUARES_X#0 ← { fill( $28, 0) }
|
|
Constant right-side identified [249] (word[$19]) SQUARES_Y#0 ← { fill( $19, 0) }
|
|
Constant right-side identified [382] (void()*~) irqTop::$0 ← & interrupt(HARDWARE_ALL)(void()) irqBottom()
|
|
Constant right-side identified [398] (void()*~) irqBottom::$1 ← & interrupt(HARDWARE_ALL)(void()) irqTop()
|
|
Successful SSA optimization Pass2ConstantRValueConsolidation
|
|
Constant (const byte*) PROCPORT_DDR#0 = (byte*) 0
|
|
Constant (const byte) PROCPORT_DDR_MEMORY_MASK#0 = 7
|
|
Constant (const byte*) PROCPORT#0 = (byte*) 1
|
|
Constant (const byte) PROCPORT_RAM_IO#0 = $35
|
|
Constant (const word) SPRITE_PTRS#0 = $3f8
|
|
Constant (const byte*) SPRITES_XPOS#0 = (byte*) 53248
|
|
Constant (const byte*) SPRITES_YPOS#0 = (byte*) 53249
|
|
Constant (const byte*) SPRITES_XMSB#0 = (byte*) 53264
|
|
Constant (const byte*) RASTER#0 = (byte*) 53266
|
|
Constant (const byte*) SPRITES_ENABLE#0 = (byte*) 53269
|
|
Constant (const byte*) BORDERCOL#0 = (byte*) 53280
|
|
Constant (const byte*) BGCOL#0 = (byte*) 53281
|
|
Constant (const byte*) VIC_CONTROL#0 = (byte*) 53265
|
|
Constant (const byte*) IRQ_STATUS#0 = (byte*) 53273
|
|
Constant (const byte*) IRQ_ENABLE#0 = (byte*) 53274
|
|
Constant (const byte) IRQ_RASTER#0 = 1
|
|
Constant (const byte*) CIA1_INTERRUPT#0 = (byte*) 56333
|
|
Constant (const byte) CIA_INTERRUPT_CLEAR#0 = $7f
|
|
Constant (const void()**) HARDWARE_IRQ#0 = (void()**) 65534
|
|
Constant (const byte) WHITE#0 = 1
|
|
Constant (const byte) BLUE#0 = 6
|
|
Constant (const byte) LIGHT_BLUE#0 = $e
|
|
Constant (const word) mul8u::res#0 = 0
|
|
Constant (const byte*) SCREEN#0 = (byte*) 1024
|
|
Constant (const byte*) SPRITE_DATA#0 = (byte*) 8192
|
|
Constant (const byte[$3e8]) SCREEN_COPY#0 = { fill( $3e8, 0) }
|
|
Constant (const byte) NUM_PROCESSING#0 = 1
|
|
Constant (const word) NOT_FOUND#0 = $ffff
|
|
Constant (const byte) STATUS_FREE#0 = 0
|
|
Constant (const byte) STATUS_NEW#0 = 1
|
|
Constant (const byte) STATUS_PROCESSING#0 = 2
|
|
Constant (const byte) main::i#0 = 0
|
|
Constant (const byte) main::$5 = SIZEOF_POINTER
|
|
Constant (const void()*) setupRasterIrq::irqRoutine#0 = &irqTop
|
|
Constant (const byte) startProcessing::freeIdx#0 = $ff
|
|
Constant (const byte) startProcessing::i#0 = 0
|
|
Constant (const byte) startProcessing::i1#0 = 0
|
|
Constant (const byte) processChars::i#0 = 0
|
|
Constant (const word[$28]) SQUARES_X#0 = { fill( $28, 0) }
|
|
Constant (const word[$19]) SQUARES_Y#0 = { fill( $19, 0) }
|
|
Constant (const byte) initSquareTables::x#0 = 0
|
|
Constant (const byte) initSquareTables::y#0 = 0
|
|
Constant (const byte) getCharToProcess::closest_x#0 = 0
|
|
Constant (const byte) getCharToProcess::closest_y#0 = 0
|
|
Constant (const byte) getCharToProcess::y#0 = 0
|
|
Constant (const byte) getCharToProcess::x#0 = 0
|
|
Constant (const byte) RASTER_IRQ_TOP#0 = $30
|
|
Constant (const byte) irqTop::i#0 = 0
|
|
Constant (const byte) irqTop::i1#0 = 0
|
|
Constant (const void()*) irqTop::$0 = &irqBottom
|
|
Constant (const byte) RASTER_IRQ_MIDDLE#0 = $ff
|
|
Constant (const byte) irqBottom::i#0 = 0
|
|
Constant (const void()*) irqBottom::$1 = &irqTop
|
|
Successful SSA optimization Pass2ConstantIdentification
|
|
Constant (const byte*) main::sp#0 = SPRITE_DATA#0
|
|
Constant (const word) setupRasterIrq::raster#0 = RASTER_IRQ_TOP#0
|
|
Constant (const byte*) main::src#0 = SCREEN#0
|
|
Constant (const byte*) main::dst#0 = SCREEN_COPY#0
|
|
Constant (const word) getCharToProcess::closest_dist#0 = NOT_FOUND#0
|
|
Constant (const byte*) getCharToProcess::screen_line#0 = SCREEN_COPY#0
|
|
Successful SSA optimization Pass2ConstantIdentification
|
|
Constant value identified { fill( NUM_PROCESSING#0, 0) } in [54] (struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 ← { fill( NUM_PROCESSING#0, 0) }
|
|
Successful SSA optimization Pass2ConstantValues
|
|
if() condition always true - replacing block destination [115] if(true) goto main::@7
|
|
if() condition always true - replacing block destination [118] if(true) goto main::@13
|
|
if() condition always true - replacing block destination [354] if((const word) setupRasterIrq::raster#0<(word) $100) goto setupRasterIrq::@1
|
|
Successful SSA optimization Pass2ConstantIfs
|
|
Resolved ranged next value [150] startProcessing::i1#1 ← ++ startProcessing::i1#2 to ++
|
|
Resolved ranged comparison value [152] if(startProcessing::i1#1!=rangelast(0,7)) goto startProcessing::@9 to (number) 8
|
|
Resolved ranged next value [270] initSquareTables::x#1 ← ++ initSquareTables::x#2 to ++
|
|
Resolved ranged comparison value [272] if(initSquareTables::x#1!=rangelast(0,$27)) goto initSquareTables::@1 to (number) $28
|
|
Resolved ranged next value [293] initSquareTables::y#1 ← ++ initSquareTables::y#2 to ++
|
|
Resolved ranged comparison value [295] if(initSquareTables::y#1!=rangelast(0,$18)) goto initSquareTables::@8 to (number) $19
|
|
Resolved ranged next value [309] getCharToProcess::x#1 ← ++ getCharToProcess::x#2 to ++
|
|
Resolved ranged comparison value [311] if(getCharToProcess::x#1!=rangelast(0,$27)) goto getCharToProcess::@4 to (number) $28
|
|
Resolved ranged next value [326] getCharToProcess::y#1 ← ++ getCharToProcess::y#2 to ++
|
|
Resolved ranged comparison value [328] if(getCharToProcess::y#1!=rangelast(0,$18)) goto getCharToProcess::@3 to (number) $19
|
|
Resolved ranged next value [369] irqTop::i#1 ← ++ irqTop::i#2 to ++
|
|
Resolved ranged comparison value [371] if(irqTop::i#1!=rangelast(0,4)) goto irqTop::@1 to (number) 5
|
|
Resolved ranged next value [376] irqTop::i1#1 ← ++ irqTop::i1#2 to ++
|
|
Resolved ranged comparison value [378] if(irqTop::i1#1!=rangelast(0,7)) goto irqTop::@3 to (number) 8
|
|
Resolved ranged next value [389] irqBottom::i#1 ← ++ irqBottom::i#2 to ++
|
|
Resolved ranged comparison value [391] if(irqBottom::i#1!=rangelast(0,4)) goto irqBottom::@1 to (number) 5
|
|
Converting *(pointer+n) to pointer[n] [191] (byte) processChars::bitmask#0 ← (byte) 1 << *((byte*) processChars::$19) -- *((byte*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_ID)
|
|
Converting *(pointer+n) to pointer[n] [196] if(*((byte*) processChars::$20)==(const byte) STATUS_FREE#0) goto processChars::@2 -- *((byte*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_STATUS)
|
|
Converting *(pointer+n) to pointer[n] [205] if(*((byte*) processChars::$21)!=(const byte) STATUS_NEW#0) goto processChars::@3 -- *((byte*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_STATUS)
|
|
Converting *(pointer+n) to pointer[n] [208] (byte~) processChars::$9 ← > *((word*) processChars::$22) -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_X)
|
|
Converting *(pointer+n) to pointer[n] [213] *(*((byte**) processChars::$23)) ← (byte) ' ' -- *((byte**)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR)
|
|
Converting *(pointer+n) to pointer[n] [217] (byte*~) processChars::$8 ← (byte*~) processChars::$7 + *((byte*) processChars::$24) -- *((byte*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_ID)
|
|
Converting *(pointer+n) to pointer[n] [219] *((byte*~) processChars::$8) ← *((byte*) processChars::$25) -- *((byte*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_PTR)
|
|
Converting *(pointer+n) to pointer[n] [219] *((byte*~) processChars::$8) ← *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR) -- *(processChars::$7 + *((byte*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_ID))
|
|
Converting *(pointer+n) to pointer[n] [221] *((byte*) processChars::$26) ← (const byte) STATUS_PROCESSING#0 -- *((byte*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_STATUS)
|
|
Converting *(pointer+n) to pointer[n] [230] (byte~) processChars::$12 ← (byte)*((word*) processChars::$27) -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_X)
|
|
Converting *(pointer+n) to pointer[n] [234] *((const byte*) SPRITES_YPOS#0 + (byte~) processChars::$13) ← *((byte*) processChars::$28) -- *((byte*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_Y)
|
|
Converting *(pointer+n) to pointer[n] [237] *((word*) processChars::$30) ← -- *((word*) processChars::$29) -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_X)
|
|
Converting *(pointer+n) to pointer[n] [237] *((word*) processChars::$30) ← -- *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X) -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_X)
|
|
Converting *(pointer+n) to pointer[n] [241] if(*((word*) processChars::$31)!=(byte) 0) goto processChars::@2 -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_X)
|
|
Converting *(pointer+n) to pointer[n] [244] *((byte*) processChars::$32) ← (const byte) STATUS_FREE#0 -- *((byte*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_STATUS)
|
|
Converting *(pointer+n) to pointer[n] [342] *((byte*~) getCharToProcess::$12) ← (byte) ' ' -- *(getCharToProcess::$11 + getCharToProcess::return_x#1)
|
|
Successful SSA optimization Pass2InlineDerefIdx
|
|
Simplifying expression containing zero (word*)PROCESSING#0 in [59] (word*) main::$18 ← (word*)(struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X
|
|
Simplifying expression containing zero (word*)PROCESSING#0 in [171] (word*) startProcessing::$23 ← (word*)(struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X
|
|
Simplifying expression containing zero (word*)processChars::processing#0 in [207] (word*) processChars::$22 ← (word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X
|
|
Simplifying expression containing zero (word*)processChars::processing#0 in [208] (byte~) processChars::$9 ← > *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X)
|
|
Simplifying expression containing zero (word*)processChars::processing#0 in [229] (word*) processChars::$27 ← (word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X
|
|
Simplifying expression containing zero (word*)processChars::processing#0 in [230] (byte~) processChars::$12 ← (byte)*((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X)
|
|
Simplifying expression containing zero (word*)processChars::processing#0 in [235] (word*) processChars::$29 ← (word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X
|
|
Simplifying expression containing zero (word*)processChars::processing#0 in [236] (word*) processChars::$30 ← (word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X
|
|
Simplifying expression containing zero (word*)processChars::processing#0 in [237] *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X) ← -- *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X)
|
|
Simplifying expression containing zero (word*)processChars::processing#0 in [237] *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X) ← -- *((word*)(struct ProcessingSprite*) processChars::processing#0)
|
|
Simplifying expression containing zero (word*)processChars::processing#0 in [238] (word*) processChars::$31 ← (word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X
|
|
Simplifying expression containing zero (word*)processChars::processing#0 in [241] if(*((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X)!=(byte) 0) goto processChars::@2
|
|
Successful SSA optimization PassNSimplifyExpressionWithZero
|
|
Eliminating unused variable (word) startProcessing::center_dist#0 and assignment [51] (word) startProcessing::center_dist#0 ← (word) main::center_dist#0
|
|
Eliminating unused variable (byte*) processChars::$19 and assignment [104] (byte*) processChars::$19 ← (byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID
|
|
Eliminating unused variable (byte*) processChars::$20 and assignment [106] (byte*) processChars::$20 ← (byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS
|
|
Eliminating unused variable (byte*) processChars::$21 and assignment [110] (byte*) processChars::$21 ← (byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS
|
|
Eliminating unused variable (word*) processChars::$22 and assignment [112] (word*) processChars::$22 ← (word*)(struct ProcessingSprite*) processChars::processing#0
|
|
Eliminating unused variable (byte**) processChars::$23 and assignment [115] (byte**) processChars::$23 ← (byte**)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR
|
|
Eliminating unused variable (byte*) processChars::$24 and assignment [119] (byte*) processChars::$24 ← (byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID
|
|
Eliminating unused variable (byte*~) processChars::$8 and assignment [120] (byte*~) processChars::$8 ← (byte*~) processChars::$7 + *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID)
|
|
Eliminating unused variable (byte*) processChars::$25 and assignment [121] (byte*) processChars::$25 ← (byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR
|
|
Eliminating unused variable (byte*) processChars::$26 and assignment [123] (byte*) processChars::$26 ← (byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS
|
|
Eliminating unused variable (word*) processChars::$27 and assignment [129] (word*) processChars::$27 ← (word*)(struct ProcessingSprite*) processChars::processing#0
|
|
Eliminating unused variable (byte*) processChars::$28 and assignment [133] (byte*) processChars::$28 ← (byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y
|
|
Eliminating unused variable (word*) processChars::$29 and assignment [135] (word*) processChars::$29 ← (word*)(struct ProcessingSprite*) processChars::processing#0
|
|
Eliminating unused variable (word*) processChars::$30 and assignment [136] (word*) processChars::$30 ← (word*)(struct ProcessingSprite*) processChars::processing#0
|
|
Eliminating unused variable (word*) processChars::$31 and assignment [138] (word*) processChars::$31 ← (word*)(struct ProcessingSprite*) processChars::processing#0
|
|
Eliminating unused variable (byte*) processChars::$32 and assignment [140] (byte*) processChars::$32 ← (byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS
|
|
Eliminating unused variable (byte*~) getCharToProcess::$12 and assignment [191] (byte*~) getCharToProcess::$12 ← (byte*~) getCharToProcess::$11 + (byte) getCharToProcess::return_x#1
|
|
Eliminating unused constant (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X
|
|
Successful SSA optimization PassNEliminateUnusedVars
|
|
Removing unused block main::@return
|
|
Removing unused block setupRasterIrq::@3
|
|
Successful SSA optimization Pass2EliminateUnusedBlocks
|
|
Adding number conversion cast (unumber) 8 in if((byte) startProcessing::i1#1!=(number) 8) goto startProcessing::@9
|
|
Adding number conversion cast (unumber) $28 in if((byte) initSquareTables::x#1!=(number) $28) goto initSquareTables::@1
|
|
Adding number conversion cast (unumber) $19 in if((byte) initSquareTables::y#1!=(number) $19) goto initSquareTables::@8
|
|
Adding number conversion cast (unumber) $28 in if((byte) getCharToProcess::x#1!=(number) $28) goto getCharToProcess::@4
|
|
Adding number conversion cast (unumber) $19 in if((byte) getCharToProcess::y#1!=(number) $19) goto getCharToProcess::@3
|
|
Adding number conversion cast (unumber) 5 in if((byte) irqTop::i#1!=(number) 5) goto irqTop::@1
|
|
Adding number conversion cast (unumber) 8 in if((byte) irqTop::i1#1!=(number) 8) goto irqTop::@3
|
|
Adding number conversion cast (unumber) 5 in if((byte) irqBottom::i#1!=(number) 5) goto irqBottom::@1
|
|
Successful SSA optimization PassNAddNumberTypeConversions
|
|
Simplifying constant integer cast 8
|
|
Simplifying constant integer cast $28
|
|
Simplifying constant integer cast $19
|
|
Simplifying constant integer cast $28
|
|
Simplifying constant integer cast $19
|
|
Simplifying constant integer cast 5
|
|
Simplifying constant integer cast 8
|
|
Simplifying constant integer cast 5
|
|
Successful SSA optimization PassNCastSimplification
|
|
Finalized unsigned number type (byte) 8
|
|
Finalized unsigned number type (byte) $28
|
|
Finalized unsigned number type (byte) $19
|
|
Finalized unsigned number type (byte) $28
|
|
Finalized unsigned number type (byte) $19
|
|
Finalized unsigned number type (byte) 5
|
|
Finalized unsigned number type (byte) 8
|
|
Finalized unsigned number type (byte) 5
|
|
Successful SSA optimization PassNFinalizeNumberTypeConversions
|
|
Alias (byte~) processChars::$13 = (byte~) processChars::$11
|
|
Successful SSA optimization Pass2AliasElimination
|
|
Self Phi Eliminated (byte) startProcessing::center_x#8
|
|
Self Phi Eliminated (byte) startProcessing::center_y#8
|
|
Self Phi Eliminated (byte) getCharToProcess::y#2
|
|
Successful SSA optimization Pass2SelfPhiElimination
|
|
Identical Phi Values (byte) startProcessing::center_x#8 (byte) startProcessing::center_x#0
|
|
Identical Phi Values (byte) startProcessing::center_y#8 (byte) startProcessing::center_y#0
|
|
Identical Phi Values (byte) getCharToProcess::y#2 (byte) getCharToProcess::y#7
|
|
Successful SSA optimization Pass2IdenticalPhiElimination
|
|
Constant right-side identified [11] (byte~) main::$3 ← (const byte) NUM_PROCESSING#0 - (byte) 1
|
|
Constant right-side identified [31] (byte*~) main::$6 ← (const byte*) SPRITE_DATA#0 + (const byte) main::$5
|
|
Constant right-side identified [38] (byte*~) main::$8 ← (const byte*) SCREEN#0 + (word) $3e8
|
|
Constant right-side identified [52] (byte*~) main::$16 ← (const byte*) SCREEN#0 + (word) $3e7
|
|
Constant right-side identified [55] (byte~) startProcessing::$15 ← (const byte) NUM_PROCESSING#0 - (byte) 1
|
|
Constant right-side identified [77] (byte*~) startProcessing::$8 ← (const byte*) SPRITE_DATA#0 / (byte) $40
|
|
Constant right-side identified [98] (byte~) processChars::$0 ← (const byte) NUM_PROCESSING#0 - (byte) 1
|
|
Constant right-side identified [111] (byte*~) processChars::$7 ← (const byte*) SCREEN#0 + (const word) SPRITE_PTRS#0
|
|
Constant right-side identified [181] (byte~) setupRasterIrq::$1 ← < (const word) setupRasterIrq::raster#0
|
|
Successful SSA optimization Pass2ConstantRValueConsolidation
|
|
Constant (const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 = { fill( NUM_PROCESSING#0, 0) }
|
|
Constant (const byte) main::$3 = NUM_PROCESSING#0-1
|
|
Constant (const byte*) main::$6 = SPRITE_DATA#0+main::$5
|
|
Constant (const byte*) main::$8 = SCREEN#0+$3e8
|
|
Constant (const byte*) main::$16 = SCREEN#0+$3e7
|
|
Constant (const byte) startProcessing::$15 = NUM_PROCESSING#0-1
|
|
Constant (const byte*) startProcessing::$8 = SPRITE_DATA#0/$40
|
|
Constant (const byte) processChars::$0 = NUM_PROCESSING#0-1
|
|
Constant (const byte*) processChars::$7 = SCREEN#0+SPRITE_PTRS#0
|
|
Constant (const byte) setupRasterIrq::$1 = <setupRasterIrq::raster#0
|
|
Successful SSA optimization Pass2ConstantIdentification
|
|
Constant value identified (word*)PROCESSING#0 in [14] (word*) main::$18 ← (word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0
|
|
Constant value identified (byte*)PROCESSING#0 in [16] (byte*) main::$19 ← (byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y
|
|
Constant value identified (byte*)PROCESSING#0 in [18] (byte*) main::$20 ← (byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID
|
|
Constant value identified (byte*)PROCESSING#0 in [20] (byte*) main::$21 ← (byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR
|
|
Constant value identified (byte*)PROCESSING#0 in [22] (byte*) main::$22 ← (byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS
|
|
Constant value identified (byte**)PROCESSING#0 in [24] (byte**) main::$23 ← (byte**)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR
|
|
Constant value identified (byte*)PROCESSING#0 in [58] (byte*) startProcessing::$29 ← (byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS
|
|
Constant value identified (byte)startProcessing::$8 in [78] (byte~) startProcessing::$9 ← (byte)(const byte*) startProcessing::$8
|
|
Constant value identified (word*)PROCESSING#0 in [85] (word*) startProcessing::$23 ← (word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0
|
|
Constant value identified (byte*)PROCESSING#0 in [87] (byte*) startProcessing::$24 ← (byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y
|
|
Constant value identified (byte*)PROCESSING#0 in [89] (byte*) startProcessing::$25 ← (byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID
|
|
Constant value identified (byte*)PROCESSING#0 in [91] (byte*) startProcessing::$26 ← (byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR
|
|
Constant value identified (byte*)PROCESSING#0 in [93] (byte*) startProcessing::$27 ← (byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS
|
|
Constant value identified (byte**)PROCESSING#0 in [95] (byte**) startProcessing::$28 ← (byte**)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR
|
|
Successful SSA optimization Pass2ConstantValues
|
|
Resolved ranged next value [26] main::i#1 ← ++ main::i#2 to ++
|
|
Resolved ranged comparison value [27] if(main::i#1!=rangelast(0,main::$3)) goto main::@1 to (const byte) main::$3+(number) 1
|
|
Resolved ranged next value [60] startProcessing::i#1 ← ++ startProcessing::i#2 to ++
|
|
Resolved ranged comparison value [61] if(startProcessing::i#1!=rangelast(0,startProcessing::$15)) goto startProcessing::@2 to (const byte) startProcessing::$15+(number) 1
|
|
Resolved ranged next value [104] processChars::i#1 ← ++ processChars::i#10 to ++
|
|
Resolved ranged comparison value [105] if(processChars::i#1!=rangelast(0,processChars::$0)) goto processChars::@1 to (const byte) processChars::$0+(number) 1
|
|
Simplifying constant evaluating to zero (const byte) NUM_PROCESSING#0-(byte) 1 in
|
|
Simplifying constant evaluating to zero (const byte) NUM_PROCESSING#0-(byte) 1 in
|
|
Simplifying constant evaluating to zero (const byte) NUM_PROCESSING#0-(byte) 1 in
|
|
Successful SSA optimization PassNSimplifyConstantZero
|
|
Simplifying expression containing zero 1 in [27] if((byte) main::i#1!=(const byte) main::$3+(number) 1) goto main::@1
|
|
Simplifying expression containing zero 1 in [61] if((byte) startProcessing::i#1!=(const byte) startProcessing::$15+(number) 1) goto startProcessing::@2
|
|
Simplifying expression containing zero 1 in [105] if((byte) processChars::i#1!=(const byte) processChars::$0+(number) 1) goto processChars::@1
|
|
Successful SSA optimization PassNSimplifyExpressionWithZero
|
|
Eliminating unused constant (const byte) main::$3
|
|
Eliminating unused constant (const byte) startProcessing::$15
|
|
Eliminating unused constant (const byte) processChars::$0
|
|
Successful SSA optimization PassNEliminateUnusedVars
|
|
Adding number conversion cast (unumber) 1 in if((byte) main::i#1!=(number) 1) goto main::@1
|
|
Adding number conversion cast (unumber) 1 in if((byte) startProcessing::i#1!=(number) 1) goto startProcessing::@2
|
|
Adding number conversion cast (unumber) 1 in if((byte) processChars::i#1!=(number) 1) goto processChars::@1
|
|
Successful SSA optimization PassNAddNumberTypeConversions
|
|
Simplifying constant integer cast 1
|
|
Simplifying constant integer cast 1
|
|
Simplifying constant integer cast 1
|
|
Successful SSA optimization PassNCastSimplification
|
|
Finalized unsigned number type (byte) 1
|
|
Finalized unsigned number type (byte) 1
|
|
Finalized unsigned number type (byte) 1
|
|
Successful SSA optimization PassNFinalizeNumberTypeConversions
|
|
Constant right-side identified [14] (byte*) main::$19 ← (byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y
|
|
Constant right-side identified [16] (byte*) main::$20 ← (byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID
|
|
Constant right-side identified [18] (byte*) main::$21 ← (byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR
|
|
Constant right-side identified [20] (byte*) main::$22 ← (byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS
|
|
Constant right-side identified [22] (byte**) main::$23 ← (byte**)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR
|
|
Constant right-side identified [52] (byte*) startProcessing::$29 ← (byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS
|
|
Constant right-side identified [80] (byte*) startProcessing::$24 ← (byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y
|
|
Constant right-side identified [82] (byte*) startProcessing::$25 ← (byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID
|
|
Constant right-side identified [84] (byte*) startProcessing::$26 ← (byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR
|
|
Constant right-side identified [86] (byte*) startProcessing::$27 ← (byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS
|
|
Constant right-side identified [88] (byte**) startProcessing::$28 ← (byte**)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR
|
|
Successful SSA optimization Pass2ConstantRValueConsolidation
|
|
Constant (const word*) main::$18 = (word*)PROCESSING#0
|
|
Constant (const byte*) main::$19 = (byte*)PROCESSING#0+OFFSET_STRUCT_PROCESSINGSPRITE_Y
|
|
Constant (const byte*) main::$20 = (byte*)PROCESSING#0+OFFSET_STRUCT_PROCESSINGSPRITE_ID
|
|
Constant (const byte*) main::$21 = (byte*)PROCESSING#0+OFFSET_STRUCT_PROCESSINGSPRITE_PTR
|
|
Constant (const byte*) main::$22 = (byte*)PROCESSING#0+OFFSET_STRUCT_PROCESSINGSPRITE_STATUS
|
|
Constant (const byte**) main::$23 = (byte**)PROCESSING#0+OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR
|
|
Constant (const byte*) startProcessing::$29 = (byte*)PROCESSING#0+OFFSET_STRUCT_PROCESSINGSPRITE_STATUS
|
|
Constant (const byte) startProcessing::$9 = (byte)startProcessing::$8
|
|
Constant (const word*) startProcessing::$23 = (word*)PROCESSING#0
|
|
Constant (const byte*) startProcessing::$24 = (byte*)PROCESSING#0+OFFSET_STRUCT_PROCESSINGSPRITE_Y
|
|
Constant (const byte*) startProcessing::$25 = (byte*)PROCESSING#0+OFFSET_STRUCT_PROCESSINGSPRITE_ID
|
|
Constant (const byte*) startProcessing::$26 = (byte*)PROCESSING#0+OFFSET_STRUCT_PROCESSINGSPRITE_PTR
|
|
Constant (const byte*) startProcessing::$27 = (byte*)PROCESSING#0+OFFSET_STRUCT_PROCESSINGSPRITE_STATUS
|
|
Constant (const byte**) startProcessing::$28 = (byte**)PROCESSING#0+OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR
|
|
Successful SSA optimization Pass2ConstantIdentification
|
|
Rewriting multiplication to use shift [11] (byte~) main::$17 ← (byte) main::i#2 * (const byte) SIZEOF_STRUCT_PROCESSINGSPRITE
|
|
Rewriting multiplication to use shift [45] (byte~) startProcessing::$21 ← (byte) startProcessing::i#2 * (const byte) SIZEOF_STRUCT_PROCESSINGSPRITE
|
|
Rewriting multiplication to use shift [52] (word~) startProcessing::$1 ← (word~) startProcessing::$0 * (byte) $40
|
|
Rewriting multiplication to use shift [60] (word~) startProcessing::$4 ← (word~) startProcessing::$3 * (byte) 8
|
|
Rewriting multiplication to use shift [62] (byte~) startProcessing::$6 ← (byte) startProcessing::center_y#0 * (byte) 8
|
|
Rewriting multiplication to use shift and addition[66] (word~) startProcessing::$12 ← (word~) startProcessing::$11 * (byte) $28
|
|
Rewriting multiplication to use shift [69] (byte~) startProcessing::$22 ← (byte) startProcessing::freeIdx#2 * (const byte) SIZEOF_STRUCT_PROCESSINGSPRITE
|
|
Rewriting multiplication to use shift [78] (byte~) processChars::$18 ← (byte) processChars::i#10 * (const byte) SIZEOF_STRUCT_PROCESSINGSPRITE
|
|
Rewriting multiplication to use shift [94] (byte~) processChars::$13 ← (byte) processChars::i#10 * (byte) 2
|
|
Rewriting multiplication to use shift [114] (byte~) initSquareTables::$16 ← (byte) initSquareTables::x#2 * (const byte) SIZEOF_WORD
|
|
Rewriting multiplication to use shift [128] (byte~) initSquareTables::$17 ← (byte) initSquareTables::y#2 * (const byte) SIZEOF_WORD
|
|
Rewriting multiplication to use shift [139] (byte~) getCharToProcess::$13 ← (byte) getCharToProcess::x#2 * (const byte) SIZEOF_WORD
|
|
Rewriting multiplication to use shift [140] (byte~) getCharToProcess::$14 ← (byte) getCharToProcess::y#7 * (const byte) SIZEOF_WORD
|
|
Rewriting multiplication to use shift and addition[148] (word~) getCharToProcess::$10 ← (word~) getCharToProcess::$9 * (byte) $28
|
|
Successful SSA optimization Pass2MultiplyToShiftRewriting
|
|
Inlining constant with var siblings (const word) mul8u::res#0
|
|
Inlining constant with var siblings (const byte) main::i#0
|
|
Inlining constant with var siblings (const byte*) main::sp#0
|
|
Inlining constant with var siblings (const byte*) main::src#0
|
|
Inlining constant with var siblings (const byte*) main::dst#0
|
|
Inlining constant with var siblings (const byte) startProcessing::freeIdx#0
|
|
Inlining constant with var siblings (const byte) startProcessing::i#0
|
|
Inlining constant with var siblings (const byte) startProcessing::i1#0
|
|
Inlining constant with var siblings (const byte) processChars::i#0
|
|
Inlining constant with var siblings (const byte) initSquareTables::x#0
|
|
Inlining constant with var siblings (const byte) initSquareTables::y#0
|
|
Inlining constant with var siblings (const byte) getCharToProcess::closest_x#0
|
|
Inlining constant with var siblings (const byte) getCharToProcess::closest_y#0
|
|
Inlining constant with var siblings (const byte) getCharToProcess::y#0
|
|
Inlining constant with var siblings (const byte) getCharToProcess::x#0
|
|
Inlining constant with var siblings (const word) getCharToProcess::closest_dist#0
|
|
Inlining constant with var siblings (const byte*) getCharToProcess::screen_line#0
|
|
Inlining constant with var siblings (const byte) irqTop::i#0
|
|
Inlining constant with var siblings (const byte) irqTop::i1#0
|
|
Inlining constant with var siblings (const byte) irqBottom::i#0
|
|
Constant inlined startProcessing::freeIdx#0 = (byte) $ff
|
|
Constant inlined processChars::$7 = (const byte*) SCREEN#0+(const word) SPRITE_PTRS#0
|
|
Constant inlined irqBottom::$1 = &interrupt(HARDWARE_ALL)(void()) irqTop()
|
|
Constant inlined main::src#0 = (const byte*) SCREEN#0
|
|
Constant inlined getCharToProcess::x#0 = (byte) 0
|
|
Constant inlined getCharToProcess::y#0 = (byte) 0
|
|
Constant inlined setupRasterIrq::raster#0 = (const byte) RASTER_IRQ_TOP#0
|
|
Constant inlined main::$16 = (const byte*) SCREEN#0+(word) $3e7
|
|
Constant inlined main::$18 = (word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0
|
|
Constant inlined getCharToProcess::closest_y#0 = (byte) 0
|
|
Constant inlined main::$19 = (byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y
|
|
Constant inlined main::i#0 = (byte) 0
|
|
Constant inlined getCharToProcess::closest_x#0 = (byte) 0
|
|
Constant inlined main::sp#0 = (const byte*) SPRITE_DATA#0
|
|
Constant inlined startProcessing::$9 = (byte)(const byte*) SPRITE_DATA#0/(byte) $40
|
|
Constant inlined startProcessing::$24 = (byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y
|
|
Constant inlined startProcessing::i1#0 = (byte) 0
|
|
Constant inlined startProcessing::$23 = (word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0
|
|
Constant inlined irqTop::$0 = &interrupt(HARDWARE_ALL)(void()) irqBottom()
|
|
Constant inlined startProcessing::$26 = (byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR
|
|
Constant inlined startProcessing::$8 = (const byte*) SPRITE_DATA#0/(byte) $40
|
|
Constant inlined startProcessing::$25 = (byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID
|
|
Constant inlined startProcessing::$28 = (byte**)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR
|
|
Constant inlined startProcessing::$27 = (byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS
|
|
Constant inlined startProcessing::$29 = (byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS
|
|
Constant inlined main::$23 = (byte**)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR
|
|
Constant inlined irqTop::i1#0 = (byte) 0
|
|
Constant inlined getCharToProcess::screen_line#0 = (const byte[$3e8]) SCREEN_COPY#0
|
|
Constant inlined main::$20 = (byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID
|
|
Constant inlined main::$21 = (byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR
|
|
Constant inlined main::$22 = (byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS
|
|
Constant inlined irqTop::i#0 = (byte) 0
|
|
Constant inlined setupRasterIrq::$1 = <(const byte) RASTER_IRQ_TOP#0
|
|
Constant inlined mul8u::res#0 = (byte) 0
|
|
Constant inlined startProcessing::i#0 = (byte) 0
|
|
Constant inlined irqBottom::i#0 = (byte) 0
|
|
Constant inlined main::$5 = (const byte) SIZEOF_POINTER
|
|
Constant inlined main::dst#0 = (const byte[$3e8]) SCREEN_COPY#0
|
|
Constant inlined main::$6 = (const byte*) SPRITE_DATA#0+(const byte) SIZEOF_POINTER
|
|
Constant inlined processChars::i#0 = (byte) 0
|
|
Constant inlined initSquareTables::x#0 = (byte) 0
|
|
Constant inlined initSquareTables::y#0 = (byte) 0
|
|
Constant inlined getCharToProcess::closest_dist#0 = (const word) NOT_FOUND#0
|
|
Constant inlined main::$8 = (const byte*) SCREEN#0+(word) $3e8
|
|
Successful SSA optimization Pass2ConstantInlining
|
|
Alias (word~) startProcessing::$12 = (word) startProcessing::$32
|
|
Alias (word~) getCharToProcess::$10 = (word) getCharToProcess::$17
|
|
Successful SSA optimization Pass2AliasElimination
|
|
Eliminating unused constant (const byte) SIZEOF_STRUCT_PROCESSINGSPRITE
|
|
Eliminating unused constant (const byte) SIZEOF_WORD
|
|
Successful SSA optimization PassNEliminateUnusedVars
|
|
Added new block during phi lifting mul8u::@10(between mul8u::@2 and mul8u::@4)
|
|
Added new block during phi lifting main::@19(between main::@1 and main::@1)
|
|
Added new block during phi lifting main::@20(between main::@3 and main::@3)
|
|
Added new block during phi lifting main::@21(between main::@5 and main::@5)
|
|
Added new block during phi lifting startProcessing::@11(between startProcessing::@4 and startProcessing::@1)
|
|
Added new block during phi lifting startProcessing::@12(between startProcessing::@3 and startProcessing::@2)
|
|
Added new block during phi lifting startProcessing::@13(between startProcessing::@3 and startProcessing::@4)
|
|
Added new block during phi lifting startProcessing::@14(between startProcessing::@9 and startProcessing::@9)
|
|
Added new block during phi lifting processChars::@13(between processChars::@2 and processChars::@1)
|
|
Added new block during phi lifting initSquareTables::@17(between initSquareTables::@15 and initSquareTables::@1)
|
|
Added new block during phi lifting initSquareTables::@18(between initSquareTables::@16 and initSquareTables::@8)
|
|
Added new block during phi lifting getCharToProcess::@12(between getCharToProcess::@9 and getCharToProcess::@3)
|
|
Added new block during phi lifting getCharToProcess::@13(between getCharToProcess::@5 and getCharToProcess::@4)
|
|
Added new block during phi lifting getCharToProcess::@14(between getCharToProcess::@4 and getCharToProcess::@5)
|
|
Added new block during phi lifting getCharToProcess::@15(between getCharToProcess::@7 and getCharToProcess::@5)
|
|
Added new block during phi lifting irqTop::@5(between irqTop::@1 and irqTop::@1)
|
|
Added new block during phi lifting irqTop::@6(between irqTop::@3 and irqTop::@3)
|
|
Added new block during phi lifting irqBottom::@4(between irqBottom::@1 and irqBottom::@1)
|
|
Adding NOP phi() at start of @begin
|
|
Adding NOP phi() at start of @9
|
|
Adding NOP phi() at start of @12
|
|
Adding NOP phi() at start of @15
|
|
Adding NOP phi() at start of @16
|
|
Adding NOP phi() at start of @17
|
|
Adding NOP phi() at start of @18
|
|
Adding NOP phi() at start of @end
|
|
Adding NOP phi() at start of main
|
|
Adding NOP phi() at start of main::@2
|
|
Adding NOP phi() at start of main::@4
|
|
Adding NOP phi() at start of main::@15
|
|
Adding NOP phi() at start of main::@6
|
|
Adding NOP phi() at start of main::@16
|
|
Adding NOP phi() at start of main::@7
|
|
Adding NOP phi() at start of main::@18
|
|
Adding NOP phi() at start of startProcessing
|
|
Adding NOP phi() at start of getCharToProcess
|
|
Adding NOP phi() at start of getCharToProcess::@1
|
|
Adding NOP phi() at start of initSquareTables
|
|
Adding NOP phi() at start of initSquareTables::@7
|
|
Adding NOP phi() at start of mul8u::@3
|
|
Adding NOP phi() at start of irqBottom
|
|
Adding NOP phi() at start of processChars
|
|
Adding NOP phi() at start of irqTop
|
|
CALL GRAPH
|
|
Calls in [] to main:6
|
|
Calls in [main] to setupRasterIrq:26 initSquareTables:34 getCharToProcess:37 startProcessing:48
|
|
Calls in [initSquareTables] to mul8u:152 mul8u:169
|
|
Calls in [irqBottom] to processChars:217
|
|
|
|
Created 35 initial phi equivalence classes
|
|
Coalesced [50] main::src#3 ← main::src#1
|
|
Coalesced [51] main::dst#3 ← main::dst#1
|
|
Coalesced [52] main::sp#3 ← main::sp#1
|
|
Coalesced [53] main::i#3 ← main::i#1
|
|
Coalesced [59] startProcessing::freeIdx#9 ← startProcessing::i#2
|
|
Coalesced [65] startProcessing::spriteData#3 ← startProcessing::spriteData#0
|
|
Coalesced [91] startProcessing::spriteData#4 ← startProcessing::spriteData#1
|
|
Coalesced [92] startProcessing::i1#3 ← startProcessing::i1#1
|
|
Not coalescing [93] startProcessing::freeIdx#7 ← startProcessing::freeIdx#2
|
|
Not coalescing [96] startProcessing::freeIdx#8 ← startProcessing::freeIdx#6
|
|
Coalesced [97] startProcessing::i#5 ← startProcessing::i#1
|
|
Coalesced [100] getCharToProcess::closest_dist#11 ← getCharToProcess::closest_dist#8
|
|
Coalesced [101] getCharToProcess::closest_x#11 ← getCharToProcess::closest_x#9
|
|
Coalesced [102] getCharToProcess::closest_y#11 ← getCharToProcess::closest_y#9
|
|
Coalesced [109] getCharToProcess::return_dist#7 ← getCharToProcess::dist#0
|
|
Not coalescing [110] getCharToProcess::return_x#7 ← getCharToProcess::x#2
|
|
Not coalescing [111] getCharToProcess::return_y#7 ← getCharToProcess::y#7
|
|
Coalesced [127] getCharToProcess::screen_line#8 ← getCharToProcess::screen_line#1
|
|
Coalesced [128] getCharToProcess::y#8 ← getCharToProcess::y#1
|
|
Not coalescing [129] getCharToProcess::closest_dist#10 ← getCharToProcess::return_dist#1
|
|
Coalesced [130] getCharToProcess::closest_x#10 ← getCharToProcess::return_x#1
|
|
Coalesced [131] getCharToProcess::closest_y#10 ← getCharToProcess::return_y#1
|
|
Coalesced [132] getCharToProcess::x#6 ← getCharToProcess::x#1
|
|
Not coalescing [133] getCharToProcess::closest_dist#12 ← getCharToProcess::return_dist#1
|
|
Coalesced (already) [134] getCharToProcess::closest_x#12 ← getCharToProcess::return_x#1
|
|
Coalesced (already) [135] getCharToProcess::closest_y#12 ← getCharToProcess::return_y#1
|
|
Not coalescing [136] getCharToProcess::return_dist#6 ← getCharToProcess::closest_dist#2
|
|
Coalesced (already) [137] getCharToProcess::return_x#6 ← getCharToProcess::closest_x#7
|
|
Coalesced (already) [138] getCharToProcess::return_y#6 ← getCharToProcess::closest_y#7
|
|
Not coalescing [139] getCharToProcess::return_dist#5 ← getCharToProcess::closest_dist#2
|
|
Coalesced (already) [140] getCharToProcess::return_x#5 ← getCharToProcess::closest_x#7
|
|
Coalesced (already) [141] getCharToProcess::return_y#5 ← getCharToProcess::closest_y#7
|
|
Coalesced [146] initSquareTables::x_dist#2 ← initSquareTables::$2
|
|
Coalesced [150] mul8u::mb#7 ← mul8u::b#0
|
|
Coalesced [151] mul8u::a#9 ← mul8u::a#1
|
|
Coalesced [163] initSquareTables::y_dist#2 ← initSquareTables::$10
|
|
Coalesced [167] mul8u::mb#6 ← mul8u::b#1
|
|
Coalesced [168] mul8u::a#8 ← mul8u::a#2
|
|
Coalesced [177] initSquareTables::y#7 ← initSquareTables::y#1
|
|
Coalesced [179] initSquareTables::y_dist#1 ← initSquareTables::$12
|
|
Coalesced [180] initSquareTables::x#7 ← initSquareTables::x#1
|
|
Coalesced [182] initSquareTables::x_dist#1 ← initSquareTables::$4
|
|
Coalesced [184] mul8u::a#10 ← mul8u::a#6
|
|
Coalesced [185] mul8u::mb#8 ← mul8u::mb#0
|
|
Coalesced [193] mul8u::res#9 ← mul8u::res#1
|
|
Coalesced [197] mul8u::a#11 ← mul8u::a#0
|
|
Coalesced [198] mul8u::res#7 ← mul8u::res#6
|
|
Coalesced [199] mul8u::mb#9 ← mul8u::mb#1
|
|
Coalesced (already) [200] mul8u::res#8 ← mul8u::res#2
|
|
Coalesced [224] irqBottom::i#3 ← irqBottom::i#1
|
|
Coalesced [252] processChars::i#11 ← processChars::i#1
|
|
Coalesced [269] irqTop::i1#3 ← irqTop::i1#1
|
|
Coalesced [270] irqTop::i#3 ← irqTop::i#1
|
|
Coalesced down to 26 phi equivalence classes
|
|
Culled Empty Block (label) @9
|
|
Culled Empty Block (label) @12
|
|
Culled Empty Block (label) @15
|
|
Culled Empty Block (label) @16
|
|
Culled Empty Block (label) @18
|
|
Culled Empty Block (label) main::@2
|
|
Culled Empty Block (label) main::@15
|
|
Culled Empty Block (label) main::@16
|
|
Culled Empty Block (label) main::@18
|
|
Culled Empty Block (label) main::@21
|
|
Culled Empty Block (label) main::@20
|
|
Culled Empty Block (label) main::@19
|
|
Culled Empty Block (label) startProcessing::@5
|
|
Culled Empty Block (label) startProcessing::@14
|
|
Culled Empty Block (label) startProcessing::@12
|
|
Culled Empty Block (label) getCharToProcess::@1
|
|
Culled Empty Block (label) initSquareTables::@7
|
|
Culled Empty Block (label) initSquareTables::@18
|
|
Culled Empty Block (label) initSquareTables::@17
|
|
Culled Empty Block (label) mul8u::@3
|
|
Culled Empty Block (label) mul8u::@10
|
|
Culled Empty Block (label) irqBottom::@4
|
|
Culled Empty Block (label) processChars::@13
|
|
Culled Empty Block (label) irqTop::@6
|
|
Culled Empty Block (label) irqTop::@5
|
|
Renumbering block @17 to @1
|
|
Renumbering block mul8u::@4 to mul8u::@3
|
|
Renumbering block mul8u::@7 to mul8u::@4
|
|
Renumbering block main::@3 to main::@2
|
|
Renumbering block main::@4 to main::@3
|
|
Renumbering block main::@5 to main::@4
|
|
Renumbering block main::@6 to main::@5
|
|
Renumbering block main::@7 to main::@6
|
|
Renumbering block main::@8 to main::@7
|
|
Renumbering block main::@13 to main::@8
|
|
Renumbering block main::@17 to main::@9
|
|
Renumbering block startProcessing::@8 to startProcessing::@5
|
|
Renumbering block startProcessing::@9 to startProcessing::@6
|
|
Renumbering block startProcessing::@10 to startProcessing::@7
|
|
Renumbering block startProcessing::@11 to startProcessing::@8
|
|
Renumbering block startProcessing::@13 to startProcessing::@9
|
|
Renumbering block processChars::@7 to processChars::@6
|
|
Renumbering block processChars::@9 to processChars::@7
|
|
Renumbering block processChars::@10 to processChars::@8
|
|
Renumbering block processChars::@11 to processChars::@9
|
|
Renumbering block initSquareTables::@8 to initSquareTables::@5
|
|
Renumbering block initSquareTables::@9 to initSquareTables::@6
|
|
Renumbering block initSquareTables::@10 to initSquareTables::@7
|
|
Renumbering block initSquareTables::@11 to initSquareTables::@8
|
|
Renumbering block initSquareTables::@15 to initSquareTables::@9
|
|
Renumbering block initSquareTables::@16 to initSquareTables::@10
|
|
Renumbering block getCharToProcess::@3 to getCharToProcess::@1
|
|
Renumbering block getCharToProcess::@4 to getCharToProcess::@2
|
|
Renumbering block getCharToProcess::@5 to getCharToProcess::@3
|
|
Renumbering block getCharToProcess::@7 to getCharToProcess::@4
|
|
Renumbering block getCharToProcess::@8 to getCharToProcess::@5
|
|
Renumbering block getCharToProcess::@9 to getCharToProcess::@6
|
|
Renumbering block getCharToProcess::@10 to getCharToProcess::@7
|
|
Renumbering block getCharToProcess::@11 to getCharToProcess::@8
|
|
Renumbering block getCharToProcess::@12 to getCharToProcess::@9
|
|
Renumbering block getCharToProcess::@13 to getCharToProcess::@10
|
|
Renumbering block getCharToProcess::@14 to getCharToProcess::@11
|
|
Renumbering block getCharToProcess::@15 to getCharToProcess::@12
|
|
Adding NOP phi() at start of @begin
|
|
Adding NOP phi() at start of @1
|
|
Adding NOP phi() at start of @end
|
|
Adding NOP phi() at start of main
|
|
Adding NOP phi() at start of main::@3
|
|
Adding NOP phi() at start of main::@5
|
|
Adding NOP phi() at start of main::@6
|
|
Adding NOP phi() at start of startProcessing
|
|
Adding NOP phi() at start of getCharToProcess
|
|
Adding NOP phi() at start of initSquareTables
|
|
Adding NOP phi() at start of irqBottom
|
|
Adding NOP phi() at start of processChars
|
|
Adding NOP phi() at start of irqTop
|
|
|
|
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] phi()
|
|
to:main::@1
|
|
main::@1: scope:[main] from main main::@1
|
|
[5] (byte) main::i#2 ← phi( main/(byte) 0 main::@1/(byte) main::i#1 )
|
|
[6] (byte~) main::$17 ← (byte) main::i#2 << (byte) 3
|
|
[7] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (byte~) main::$17) ← (byte) 0
|
|
[8] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y + (byte~) main::$17) ← (byte) 0
|
|
[9] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID + (byte~) main::$17) ← (byte) 0
|
|
[10] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR + (byte~) main::$17) ← (byte) 0
|
|
[11] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS + (byte~) main::$17) ← (const byte) STATUS_FREE#0
|
|
[12] *((byte**)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR + (byte~) main::$17) ← (byte*) 0
|
|
[13] (byte) main::i#1 ← ++ (byte) main::i#2
|
|
[14] if((byte) main::i#1!=(byte) 1) goto main::@1
|
|
to:main::@2
|
|
main::@2: scope:[main] from main::@1 main::@2
|
|
[15] (byte*) main::sp#2 ← phi( main::@1/(const byte*) SPRITE_DATA#0 main::@2/(byte*) main::sp#1 )
|
|
[16] *((byte*) main::sp#2) ← (byte) 0
|
|
[17] (byte*) main::sp#1 ← ++ (byte*) main::sp#2
|
|
[18] if((byte*) main::sp#1<(const byte*) SPRITE_DATA#0+(const byte) SIZEOF_POINTER) goto main::@2
|
|
to:main::@3
|
|
main::@3: scope:[main] from main::@2
|
|
[19] phi()
|
|
[20] call setupRasterIrq
|
|
to:main::@4
|
|
main::@4: scope:[main] from main::@3 main::@4
|
|
[21] (byte*) main::dst#2 ← phi( main::@3/(const byte[$3e8]) SCREEN_COPY#0 main::@4/(byte*) main::dst#1 )
|
|
[21] (byte*) main::src#2 ← phi( main::@3/(const byte*) SCREEN#0 main::@4/(byte*) main::src#1 )
|
|
[22] *((byte*) main::dst#2) ← *((byte*) main::src#2)
|
|
[23] (byte*) main::src#1 ← ++ (byte*) main::src#2
|
|
[24] (byte*) main::dst#1 ← ++ (byte*) main::dst#2
|
|
[25] if((byte*) main::src#1!=(const byte*) SCREEN#0+(word) $3e8) goto main::@4
|
|
to:main::@5
|
|
main::@5: scope:[main] from main::@4
|
|
[26] phi()
|
|
[27] call initSquareTables
|
|
to:main::@6
|
|
main::@6: scope:[main] from main::@5 main::@7
|
|
[28] phi()
|
|
[29] call getCharToProcess
|
|
[30] (byte) getCharToProcess::return_x#0 ← (byte) getCharToProcess::return_x#1
|
|
[31] (byte) getCharToProcess::return_y#0 ← (byte) getCharToProcess::return_y#1
|
|
[32] (word) getCharToProcess::return_dist#0 ← (word) getCharToProcess::return_dist#1
|
|
to:main::@9
|
|
main::@9: scope:[main] from main::@6
|
|
[33] (byte) main::center_x#0 ← (byte) getCharToProcess::return_x#0
|
|
[34] (byte) main::center_y#0 ← (byte) getCharToProcess::return_y#0
|
|
[35] (word) main::center_dist#0 ← (word) getCharToProcess::return_dist#0
|
|
[36] if((word) main::center_dist#0!=(const word) NOT_FOUND#0) goto main::@7
|
|
to:main::@8
|
|
main::@8: scope:[main] from main::@8 main::@9
|
|
[37] *((const byte*) SCREEN#0+(word) $3e7) ← ++ *((const byte*) SCREEN#0+(word) $3e7)
|
|
to:main::@8
|
|
main::@7: scope:[main] from main::@9
|
|
[38] (byte) startProcessing::center_x#0 ← (byte) main::center_x#0
|
|
[39] (byte) startProcessing::center_y#0 ← (byte) main::center_y#0
|
|
[40] call startProcessing
|
|
to:main::@6
|
|
startProcessing: scope:[startProcessing] from main::@7
|
|
[41] phi()
|
|
to:startProcessing::@1
|
|
startProcessing::@1: scope:[startProcessing] from startProcessing startProcessing::@8
|
|
[42] (byte) startProcessing::freeIdx#6 ← phi( startProcessing/(byte) $ff startProcessing::@8/(byte~) startProcessing::freeIdx#7 )
|
|
to:startProcessing::@2
|
|
startProcessing::@2: scope:[startProcessing] from startProcessing::@1 startProcessing::@3
|
|
[43] (byte) startProcessing::i#2 ← phi( startProcessing::@1/(byte) 0 startProcessing::@3/(byte) startProcessing::i#1 )
|
|
[44] (byte~) startProcessing::$21 ← (byte) startProcessing::i#2 << (byte) 3
|
|
[45] if(*((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS + (byte~) startProcessing::$21)!=(const byte) STATUS_FREE#0) goto startProcessing::@3
|
|
to:startProcessing::@4
|
|
startProcessing::@4: scope:[startProcessing] from startProcessing::@2 startProcessing::@9
|
|
[46] (byte) startProcessing::freeIdx#2 ← phi( startProcessing::@9/(byte~) startProcessing::freeIdx#8 startProcessing::@2/(byte) startProcessing::i#2 )
|
|
[47] if((byte) startProcessing::freeIdx#2==(byte) $ff) goto startProcessing::@8
|
|
to:startProcessing::@5
|
|
startProcessing::@5: scope:[startProcessing] from startProcessing::@4
|
|
[48] (word~) startProcessing::$0 ← (word)(byte) startProcessing::freeIdx#2
|
|
[49] (word~) startProcessing::$1 ← (word~) startProcessing::$0 << (byte) 6
|
|
[50] (byte*) startProcessing::spriteData#0 ← (const byte*) SPRITE_DATA#0 + (word~) startProcessing::$1
|
|
to:startProcessing::@6
|
|
startProcessing::@6: scope:[startProcessing] from startProcessing::@5 startProcessing::@6
|
|
[51] (byte) startProcessing::i1#2 ← phi( startProcessing::@5/(byte) 0 startProcessing::@6/(byte) startProcessing::i1#1 )
|
|
[51] (byte*) startProcessing::spriteData#2 ← phi( startProcessing::@5/(byte*) startProcessing::spriteData#0 startProcessing::@6/(byte*) startProcessing::spriteData#1 )
|
|
[52] *((byte*) startProcessing::spriteData#2) ← (byte) $ff
|
|
[53] (byte*) startProcessing::spriteData#1 ← (byte*) startProcessing::spriteData#2 + (byte) 3
|
|
[54] (byte) startProcessing::i1#1 ← ++ (byte) startProcessing::i1#2
|
|
[55] if((byte) startProcessing::i1#1!=(byte) 8) goto startProcessing::@6
|
|
to:startProcessing::@7
|
|
startProcessing::@7: scope:[startProcessing] from startProcessing::@6
|
|
[56] (word~) startProcessing::$3 ← (word)(byte) startProcessing::center_x#0
|
|
[57] (word~) startProcessing::$4 ← (word~) startProcessing::$3 << (byte) 3
|
|
[58] (word) startProcessing::spriteX#0 ← (byte) $18 + (word~) startProcessing::$4
|
|
[59] (byte~) startProcessing::$6 ← (byte) startProcessing::center_y#0 << (byte) 3
|
|
[60] (byte) startProcessing::spriteY#0 ← (byte) $32 + (byte~) startProcessing::$6
|
|
[61] (byte) startProcessing::spritePtr#0 ← (byte)(const byte*) SPRITE_DATA#0/(byte) $40 + (byte) startProcessing::freeIdx#2
|
|
[62] (word~) startProcessing::$11 ← (word)(byte) startProcessing::center_y#0
|
|
[63] (word) startProcessing::$30 ← (word~) startProcessing::$11 << (byte) 2
|
|
[64] (word) startProcessing::$31 ← (word) startProcessing::$30 + (word~) startProcessing::$11
|
|
[65] (word~) startProcessing::$12 ← (word) startProcessing::$31 << (byte) 3
|
|
[66] (byte*~) startProcessing::$13 ← (const byte*) SCREEN#0 + (word~) startProcessing::$12
|
|
[67] (byte*) startProcessing::screenPtr#0 ← (byte*~) startProcessing::$13 + (byte) startProcessing::center_x#0
|
|
[68] (byte~) startProcessing::$22 ← (byte) startProcessing::freeIdx#2 << (byte) 3
|
|
[69] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (byte~) startProcessing::$22) ← (word) startProcessing::spriteX#0
|
|
[70] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y + (byte~) startProcessing::$22) ← (byte) startProcessing::spriteY#0
|
|
[71] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID + (byte~) startProcessing::$22) ← (byte) startProcessing::freeIdx#2
|
|
[72] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR + (byte~) startProcessing::$22) ← (byte) startProcessing::spritePtr#0
|
|
[73] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS + (byte~) startProcessing::$22) ← (const byte) STATUS_NEW#0
|
|
[74] *((byte**)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR + (byte~) startProcessing::$22) ← (byte*) startProcessing::screenPtr#0
|
|
to:startProcessing::@return
|
|
startProcessing::@return: scope:[startProcessing] from startProcessing::@7
|
|
[75] return
|
|
to:@return
|
|
startProcessing::@8: scope:[startProcessing] from startProcessing::@4
|
|
[76] (byte~) startProcessing::freeIdx#7 ← (byte) startProcessing::freeIdx#2
|
|
to:startProcessing::@1
|
|
startProcessing::@3: scope:[startProcessing] from startProcessing::@2
|
|
[77] (byte) startProcessing::i#1 ← ++ (byte) startProcessing::i#2
|
|
[78] if((byte) startProcessing::i#1!=(byte) 1) goto startProcessing::@2
|
|
to:startProcessing::@9
|
|
startProcessing::@9: scope:[startProcessing] from startProcessing::@3
|
|
[79] (byte~) startProcessing::freeIdx#8 ← (byte) startProcessing::freeIdx#6
|
|
to:startProcessing::@4
|
|
getCharToProcess: scope:[getCharToProcess] from main::@6
|
|
[80] phi()
|
|
to:getCharToProcess::@1
|
|
getCharToProcess::@1: scope:[getCharToProcess] from getCharToProcess getCharToProcess::@9
|
|
[81] (byte) getCharToProcess::closest_y#9 ← phi( getCharToProcess/(byte) 0 getCharToProcess::@9/(byte) getCharToProcess::return_y#1 )
|
|
[81] (byte) getCharToProcess::closest_x#9 ← phi( getCharToProcess/(byte) 0 getCharToProcess::@9/(byte) getCharToProcess::return_x#1 )
|
|
[81] (word) getCharToProcess::closest_dist#8 ← phi( getCharToProcess/(const word) NOT_FOUND#0 getCharToProcess::@9/(word~) getCharToProcess::closest_dist#10 )
|
|
[81] (byte) getCharToProcess::y#7 ← phi( getCharToProcess/(byte) 0 getCharToProcess::@9/(byte) getCharToProcess::y#1 )
|
|
[81] (byte*) getCharToProcess::screen_line#4 ← phi( getCharToProcess/(const byte[$3e8]) SCREEN_COPY#0 getCharToProcess::@9/(byte*) getCharToProcess::screen_line#1 )
|
|
to:getCharToProcess::@2
|
|
getCharToProcess::@2: scope:[getCharToProcess] from getCharToProcess::@1 getCharToProcess::@10
|
|
[82] (byte) getCharToProcess::closest_y#7 ← phi( getCharToProcess::@1/(byte) getCharToProcess::closest_y#9 getCharToProcess::@10/(byte) getCharToProcess::return_y#1 )
|
|
[82] (byte) getCharToProcess::closest_x#7 ← phi( getCharToProcess::@1/(byte) getCharToProcess::closest_x#9 getCharToProcess::@10/(byte) getCharToProcess::return_x#1 )
|
|
[82] (word) getCharToProcess::closest_dist#2 ← phi( getCharToProcess::@1/(word) getCharToProcess::closest_dist#8 getCharToProcess::@10/(word~) getCharToProcess::closest_dist#12 )
|
|
[82] (byte) getCharToProcess::x#2 ← phi( getCharToProcess::@1/(byte) 0 getCharToProcess::@10/(byte) getCharToProcess::x#1 )
|
|
[83] if(*((byte*) getCharToProcess::screen_line#4 + (byte) getCharToProcess::x#2)==(byte) ' ') goto getCharToProcess::@11
|
|
to:getCharToProcess::@4
|
|
getCharToProcess::@4: scope:[getCharToProcess] from getCharToProcess::@2
|
|
[84] (byte~) getCharToProcess::$13 ← (byte) getCharToProcess::x#2 << (byte) 1
|
|
[85] (byte~) getCharToProcess::$14 ← (byte) getCharToProcess::y#7 << (byte) 1
|
|
[86] (word) getCharToProcess::dist#0 ← *((const word[$28]) SQUARES_X#0 + (byte~) getCharToProcess::$13) + *((const word[$19]) SQUARES_Y#0 + (byte~) getCharToProcess::$14)
|
|
[87] if((word) getCharToProcess::dist#0>=(word) getCharToProcess::closest_dist#2) goto getCharToProcess::@12
|
|
to:getCharToProcess::@5
|
|
getCharToProcess::@5: scope:[getCharToProcess] from getCharToProcess::@4
|
|
[88] (byte~) getCharToProcess::return_x#7 ← (byte) getCharToProcess::x#2
|
|
[89] (byte~) getCharToProcess::return_y#7 ← (byte) getCharToProcess::y#7
|
|
to:getCharToProcess::@3
|
|
getCharToProcess::@3: scope:[getCharToProcess] from getCharToProcess::@11 getCharToProcess::@12 getCharToProcess::@5
|
|
[90] (byte) getCharToProcess::return_y#1 ← phi( getCharToProcess::@11/(byte) getCharToProcess::closest_y#7 getCharToProcess::@12/(byte) getCharToProcess::closest_y#7 getCharToProcess::@5/(byte~) getCharToProcess::return_y#7 )
|
|
[90] (byte) getCharToProcess::return_x#1 ← phi( getCharToProcess::@11/(byte) getCharToProcess::closest_x#7 getCharToProcess::@12/(byte) getCharToProcess::closest_x#7 getCharToProcess::@5/(byte~) getCharToProcess::return_x#7 )
|
|
[90] (word) getCharToProcess::return_dist#1 ← phi( getCharToProcess::@11/(word~) getCharToProcess::return_dist#5 getCharToProcess::@12/(word~) getCharToProcess::return_dist#6 getCharToProcess::@5/(word) getCharToProcess::dist#0 )
|
|
[91] (byte) getCharToProcess::x#1 ← ++ (byte) getCharToProcess::x#2
|
|
[92] if((byte) getCharToProcess::x#1!=(byte) $28) goto getCharToProcess::@10
|
|
to:getCharToProcess::@6
|
|
getCharToProcess::@6: scope:[getCharToProcess] from getCharToProcess::@3
|
|
[93] (byte*) getCharToProcess::screen_line#1 ← (byte*) getCharToProcess::screen_line#4 + (byte) $28
|
|
[94] (byte) getCharToProcess::y#1 ← ++ (byte) getCharToProcess::y#7
|
|
[95] if((byte) getCharToProcess::y#1!=(byte) $19) goto getCharToProcess::@9
|
|
to:getCharToProcess::@7
|
|
getCharToProcess::@7: scope:[getCharToProcess] from getCharToProcess::@6
|
|
[96] if((word) getCharToProcess::return_dist#1==(const word) NOT_FOUND#0) goto getCharToProcess::@return
|
|
to:getCharToProcess::@8
|
|
getCharToProcess::@8: scope:[getCharToProcess] from getCharToProcess::@7
|
|
[97] (word~) getCharToProcess::$9 ← (word)(byte) getCharToProcess::return_y#1
|
|
[98] (word) getCharToProcess::$15 ← (word~) getCharToProcess::$9 << (byte) 2
|
|
[99] (word) getCharToProcess::$16 ← (word) getCharToProcess::$15 + (word~) getCharToProcess::$9
|
|
[100] (word~) getCharToProcess::$10 ← (word) getCharToProcess::$16 << (byte) 3
|
|
[101] (byte*~) getCharToProcess::$11 ← (const byte[$3e8]) SCREEN_COPY#0 + (word~) getCharToProcess::$10
|
|
[102] *((byte*~) getCharToProcess::$11 + (byte) getCharToProcess::return_x#1) ← (byte) ' '
|
|
to:getCharToProcess::@return
|
|
getCharToProcess::@return: scope:[getCharToProcess] from getCharToProcess::@7 getCharToProcess::@8
|
|
[103] return
|
|
to:@return
|
|
getCharToProcess::@9: scope:[getCharToProcess] from getCharToProcess::@6
|
|
[104] (word~) getCharToProcess::closest_dist#10 ← (word) getCharToProcess::return_dist#1
|
|
to:getCharToProcess::@1
|
|
getCharToProcess::@10: scope:[getCharToProcess] from getCharToProcess::@3
|
|
[105] (word~) getCharToProcess::closest_dist#12 ← (word) getCharToProcess::return_dist#1
|
|
to:getCharToProcess::@2
|
|
getCharToProcess::@12: scope:[getCharToProcess] from getCharToProcess::@4
|
|
[106] (word~) getCharToProcess::return_dist#6 ← (word) getCharToProcess::closest_dist#2
|
|
to:getCharToProcess::@3
|
|
getCharToProcess::@11: scope:[getCharToProcess] from getCharToProcess::@2
|
|
[107] (word~) getCharToProcess::return_dist#5 ← (word) getCharToProcess::closest_dist#2
|
|
to:getCharToProcess::@3
|
|
initSquareTables: scope:[initSquareTables] from main::@5
|
|
[108] phi()
|
|
to:initSquareTables::@1
|
|
initSquareTables::@1: scope:[initSquareTables] from initSquareTables initSquareTables::@9
|
|
[109] (byte) initSquareTables::x#2 ← phi( initSquareTables/(byte) 0 initSquareTables::@9/(byte) initSquareTables::x#1 )
|
|
[110] if((byte) initSquareTables::x#2<(byte) $14) goto initSquareTables::@2
|
|
to:initSquareTables::@3
|
|
initSquareTables::@3: scope:[initSquareTables] from initSquareTables::@1
|
|
[111] (byte~) initSquareTables::$2 ← (byte) initSquareTables::x#2 - (byte) $14
|
|
to:initSquareTables::@4
|
|
initSquareTables::@4: scope:[initSquareTables] from initSquareTables::@2 initSquareTables::@3
|
|
[112] (byte) initSquareTables::x_dist#0 ← phi( initSquareTables::@2/(byte~) initSquareTables::$4 initSquareTables::@3/(byte~) initSquareTables::$2 )
|
|
[113] (byte) mul8u::a#1 ← (byte) initSquareTables::x_dist#0
|
|
[114] (byte) mul8u::b#0 ← (byte) initSquareTables::x_dist#0
|
|
[115] call mul8u
|
|
[116] (word) mul8u::return#2 ← (word) mul8u::res#2
|
|
to:initSquareTables::@9
|
|
initSquareTables::@9: scope:[initSquareTables] from initSquareTables::@4
|
|
[117] (word~) initSquareTables::$6 ← (word) mul8u::return#2
|
|
[118] (byte~) initSquareTables::$16 ← (byte) initSquareTables::x#2 << (byte) 1
|
|
[119] *((const word[$28]) SQUARES_X#0 + (byte~) initSquareTables::$16) ← (word~) initSquareTables::$6
|
|
[120] (byte) initSquareTables::x#1 ← ++ (byte) initSquareTables::x#2
|
|
[121] if((byte) initSquareTables::x#1!=(byte) $28) goto initSquareTables::@1
|
|
to:initSquareTables::@5
|
|
initSquareTables::@5: scope:[initSquareTables] from initSquareTables::@10 initSquareTables::@9
|
|
[122] (byte) initSquareTables::y#2 ← phi( initSquareTables::@10/(byte) initSquareTables::y#1 initSquareTables::@9/(byte) 0 )
|
|
[123] if((byte) initSquareTables::y#2<(byte) $c) goto initSquareTables::@6
|
|
to:initSquareTables::@7
|
|
initSquareTables::@7: scope:[initSquareTables] from initSquareTables::@5
|
|
[124] (byte~) initSquareTables::$10 ← (byte) initSquareTables::y#2 - (byte) $c
|
|
to:initSquareTables::@8
|
|
initSquareTables::@8: scope:[initSquareTables] from initSquareTables::@6 initSquareTables::@7
|
|
[125] (byte) initSquareTables::y_dist#0 ← phi( initSquareTables::@6/(byte~) initSquareTables::$12 initSquareTables::@7/(byte~) initSquareTables::$10 )
|
|
[126] (byte) mul8u::a#2 ← (byte) initSquareTables::y_dist#0
|
|
[127] (byte) mul8u::b#1 ← (byte) initSquareTables::y_dist#0
|
|
[128] call mul8u
|
|
[129] (word) mul8u::return#3 ← (word) mul8u::res#2
|
|
to:initSquareTables::@10
|
|
initSquareTables::@10: scope:[initSquareTables] from initSquareTables::@8
|
|
[130] (word~) initSquareTables::$14 ← (word) mul8u::return#3
|
|
[131] (byte~) initSquareTables::$17 ← (byte) initSquareTables::y#2 << (byte) 1
|
|
[132] *((const word[$19]) SQUARES_Y#0 + (byte~) initSquareTables::$17) ← (word~) initSquareTables::$14
|
|
[133] (byte) initSquareTables::y#1 ← ++ (byte) initSquareTables::y#2
|
|
[134] if((byte) initSquareTables::y#1!=(byte) $19) goto initSquareTables::@5
|
|
to:initSquareTables::@return
|
|
initSquareTables::@return: scope:[initSquareTables] from initSquareTables::@10
|
|
[135] return
|
|
to:@return
|
|
initSquareTables::@6: scope:[initSquareTables] from initSquareTables::@5
|
|
[136] (byte~) initSquareTables::$12 ← (byte) $c - (byte) initSquareTables::y#2
|
|
to:initSquareTables::@8
|
|
initSquareTables::@2: scope:[initSquareTables] from initSquareTables::@1
|
|
[137] (byte~) initSquareTables::$4 ← (byte) $14 - (byte) initSquareTables::x#2
|
|
to:initSquareTables::@4
|
|
mul8u: scope:[mul8u] from initSquareTables::@4 initSquareTables::@8
|
|
[138] (byte) mul8u::a#6 ← phi( initSquareTables::@8/(byte) mul8u::a#2 initSquareTables::@4/(byte) mul8u::a#1 )
|
|
[138] (word) mul8u::mb#0 ← phi( initSquareTables::@8/(byte) mul8u::b#1 initSquareTables::@4/(byte) mul8u::b#0 )
|
|
to:mul8u::@1
|
|
mul8u::@1: scope:[mul8u] from mul8u mul8u::@3
|
|
[139] (word) mul8u::mb#2 ← phi( mul8u/(word) mul8u::mb#0 mul8u::@3/(word) mul8u::mb#1 )
|
|
[139] (word) mul8u::res#2 ← phi( mul8u/(byte) 0 mul8u::@3/(word) mul8u::res#6 )
|
|
[139] (byte) mul8u::a#3 ← phi( mul8u/(byte) mul8u::a#6 mul8u::@3/(byte) mul8u::a#0 )
|
|
[140] if((byte) mul8u::a#3!=(byte) 0) goto mul8u::@2
|
|
to:mul8u::@return
|
|
mul8u::@return: scope:[mul8u] from mul8u::@1
|
|
[141] return
|
|
to:@return
|
|
mul8u::@2: scope:[mul8u] from mul8u::@1
|
|
[142] (byte~) mul8u::$1 ← (byte) mul8u::a#3 & (byte) 1
|
|
[143] if((byte~) mul8u::$1==(byte) 0) goto mul8u::@3
|
|
to:mul8u::@4
|
|
mul8u::@4: scope:[mul8u] from mul8u::@2
|
|
[144] (word) mul8u::res#1 ← (word) mul8u::res#2 + (word) mul8u::mb#2
|
|
to:mul8u::@3
|
|
mul8u::@3: scope:[mul8u] from mul8u::@2 mul8u::@4
|
|
[145] (word) mul8u::res#6 ← phi( mul8u::@2/(word) mul8u::res#2 mul8u::@4/(word) mul8u::res#1 )
|
|
[146] (byte) mul8u::a#0 ← (byte) mul8u::a#3 >> (byte) 1
|
|
[147] (word) mul8u::mb#1 ← (word) mul8u::mb#2 << (byte) 1
|
|
to:mul8u::@1
|
|
setupRasterIrq: scope:[setupRasterIrq] from main::@3
|
|
asm { sei }
|
|
[149] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0
|
|
[150] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0
|
|
[151] *((const byte*) CIA1_INTERRUPT#0) ← (const byte) CIA_INTERRUPT_CLEAR#0
|
|
to:setupRasterIrq::@1
|
|
setupRasterIrq::@1: scope:[setupRasterIrq] from setupRasterIrq
|
|
[152] *((const byte*) VIC_CONTROL#0) ← *((const byte*) VIC_CONTROL#0) & (byte) $7f
|
|
to:setupRasterIrq::@2
|
|
setupRasterIrq::@2: scope:[setupRasterIrq] from setupRasterIrq::@1
|
|
[153] *((const byte*) RASTER#0) ← <(const byte) RASTER_IRQ_TOP#0
|
|
[154] *((const byte*) IRQ_ENABLE#0) ← (const byte) IRQ_RASTER#0
|
|
[155] *((const void()**) HARDWARE_IRQ#0) ← (const void()*) setupRasterIrq::irqRoutine#0
|
|
asm { cli }
|
|
to:setupRasterIrq::@return
|
|
setupRasterIrq::@return: scope:[setupRasterIrq] from setupRasterIrq::@2
|
|
[157] return
|
|
to:@return
|
|
irqBottom: scope:[irqBottom] from
|
|
[158] phi()
|
|
to:irqBottom::@1
|
|
irqBottom::@1: scope:[irqBottom] from irqBottom irqBottom::@1
|
|
[159] (byte) irqBottom::i#2 ← phi( irqBottom/(byte) 0 irqBottom::@1/(byte) irqBottom::i#1 )
|
|
[160] (byte) irqBottom::i#1 ← ++ (byte) irqBottom::i#2
|
|
[161] if((byte) irqBottom::i#1!=(byte) 5) goto irqBottom::@1
|
|
to:irqBottom::@2
|
|
irqBottom::@2: scope:[irqBottom] from irqBottom::@1
|
|
[162] *((const byte*) BORDERCOL#0) ← (const byte) WHITE#0
|
|
[163] *((const byte*) BGCOL#0) ← (const byte) WHITE#0
|
|
[164] call processChars
|
|
to:irqBottom::@3
|
|
irqBottom::@3: scope:[irqBottom] from irqBottom::@2
|
|
[165] *((const byte*) BORDERCOL#0) ← (const byte) LIGHT_BLUE#0
|
|
[166] *((const byte*) BGCOL#0) ← (const byte) BLUE#0
|
|
[167] *((const byte*) RASTER#0) ← (const byte) RASTER_IRQ_TOP#0
|
|
[168] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_ALL)(void()) irqTop()
|
|
[169] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0
|
|
to:irqBottom::@return
|
|
irqBottom::@return: scope:[irqBottom] from irqBottom::@3
|
|
[170] return
|
|
to:@return
|
|
processChars: scope:[processChars] from irqBottom::@2
|
|
[171] phi()
|
|
to:processChars::@1
|
|
processChars::@1: scope:[processChars] from processChars processChars::@2
|
|
[172] (byte) processChars::i#10 ← phi( processChars/(byte) 0 processChars::@2/(byte) processChars::i#1 )
|
|
[173] (byte~) processChars::$18 ← (byte) processChars::i#10 << (byte) 3
|
|
[174] (struct ProcessingSprite*) processChars::processing#0 ← (const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (byte~) processChars::$18
|
|
[175] (byte) processChars::bitmask#0 ← (byte) 1 << *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID)
|
|
[176] if(*((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS)==(const byte) STATUS_FREE#0) goto processChars::@2
|
|
to:processChars::@8
|
|
processChars::@8: scope:[processChars] from processChars::@1
|
|
[177] if(*((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS)!=(const byte) STATUS_NEW#0) goto processChars::@3
|
|
to:processChars::@9
|
|
processChars::@9: scope:[processChars] from processChars::@8
|
|
[178] *(*((byte**)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR)) ← (byte) ' '
|
|
[179] *((const byte*) SPRITES_ENABLE#0) ← *((const byte*) SPRITES_ENABLE#0) | (byte) processChars::bitmask#0
|
|
[180] *((const byte*) SCREEN#0+(const word) SPRITE_PTRS#0 + *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID)) ← *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR)
|
|
[181] *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) ← (const byte) STATUS_PROCESSING#0
|
|
to:processChars::@3
|
|
processChars::@3: scope:[processChars] from processChars::@8 processChars::@9
|
|
[182] (byte~) processChars::$9 ← > *((word*)(struct ProcessingSprite*) processChars::processing#0)
|
|
[183] if((byte) 0!=(byte~) processChars::$9) goto processChars::@4
|
|
to:processChars::@6
|
|
processChars::@6: scope:[processChars] from processChars::@3
|
|
[184] (byte~) processChars::$10 ← (byte) $ff ^ (byte) processChars::bitmask#0
|
|
[185] *((const byte*) SPRITES_XMSB#0) ← *((const byte*) SPRITES_XMSB#0) & (byte~) processChars::$10
|
|
to:processChars::@5
|
|
processChars::@5: scope:[processChars] from processChars::@4 processChars::@6
|
|
[186] (byte~) processChars::$13 ← (byte) processChars::i#10 << (byte) 1
|
|
[187] (byte~) processChars::$12 ← (byte)*((word*)(struct ProcessingSprite*) processChars::processing#0)
|
|
[188] *((const byte*) SPRITES_XPOS#0 + (byte~) processChars::$13) ← (byte~) processChars::$12
|
|
[189] *((const byte*) SPRITES_YPOS#0 + (byte~) processChars::$13) ← *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y)
|
|
[190] *((word*)(struct ProcessingSprite*) processChars::processing#0) ← -- *((word*)(struct ProcessingSprite*) processChars::processing#0)
|
|
[191] if(*((word*)(struct ProcessingSprite*) processChars::processing#0)!=(byte) 0) goto processChars::@2
|
|
to:processChars::@7
|
|
processChars::@7: scope:[processChars] from processChars::@5
|
|
[192] *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) ← (const byte) STATUS_FREE#0
|
|
[193] (byte~) processChars::$16 ← (byte) $ff ^ (byte) processChars::bitmask#0
|
|
[194] *((const byte*) SPRITES_ENABLE#0) ← *((const byte*) SPRITES_ENABLE#0) & (byte~) processChars::$16
|
|
to:processChars::@2
|
|
processChars::@2: scope:[processChars] from processChars::@1 processChars::@5 processChars::@7
|
|
[195] (byte) processChars::i#1 ← ++ (byte) processChars::i#10
|
|
[196] if((byte) processChars::i#1!=(byte) 1) goto processChars::@1
|
|
to:processChars::@return
|
|
processChars::@return: scope:[processChars] from processChars::@2
|
|
[197] return
|
|
to:@return
|
|
processChars::@4: scope:[processChars] from processChars::@3
|
|
[198] *((const byte*) SPRITES_XMSB#0) ← *((const byte*) SPRITES_XMSB#0) | (byte) processChars::bitmask#0
|
|
to:processChars::@5
|
|
irqTop: scope:[irqTop] from
|
|
[199] phi()
|
|
to:irqTop::@1
|
|
irqTop::@1: scope:[irqTop] from irqTop irqTop::@1
|
|
[200] (byte) irqTop::i#2 ← phi( irqTop/(byte) 0 irqTop::@1/(byte) irqTop::i#1 )
|
|
[201] (byte) irqTop::i#1 ← ++ (byte) irqTop::i#2
|
|
[202] if((byte) irqTop::i#1!=(byte) 5) goto irqTop::@1
|
|
to:irqTop::@2
|
|
irqTop::@2: scope:[irqTop] from irqTop::@1
|
|
[203] *((const byte*) BORDERCOL#0) ← (const byte) WHITE#0
|
|
[204] *((const byte*) BGCOL#0) ← (const byte) WHITE#0
|
|
to:irqTop::@3
|
|
irqTop::@3: scope:[irqTop] from irqTop::@2 irqTop::@3
|
|
[205] (byte) irqTop::i1#2 ← phi( irqTop::@2/(byte) 0 irqTop::@3/(byte) irqTop::i1#1 )
|
|
[206] (byte) irqTop::i1#1 ← ++ (byte) irqTop::i1#2
|
|
[207] if((byte) irqTop::i1#1!=(byte) 8) goto irqTop::@3
|
|
to:irqTop::@4
|
|
irqTop::@4: scope:[irqTop] from irqTop::@3
|
|
[208] *((const byte*) BORDERCOL#0) ← (const byte) LIGHT_BLUE#0
|
|
[209] *((const byte*) BGCOL#0) ← (const byte) BLUE#0
|
|
[210] *((const byte*) RASTER#0) ← (const byte) RASTER_IRQ_MIDDLE#0
|
|
[211] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_ALL)(void()) irqBottom()
|
|
[212] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0
|
|
to:irqTop::@return
|
|
irqTop::@return: scope:[irqTop] from irqTop::@4
|
|
[213] return
|
|
to:@return
|
|
|
|
|
|
VARIABLE REGISTER WEIGHTS
|
|
(byte*) BGCOL
|
|
(byte) BLUE
|
|
(byte*) BORDERCOL
|
|
(byte*) CIA1_INTERRUPT
|
|
(byte) CIA_INTERRUPT_CLEAR
|
|
(void()**) HARDWARE_IRQ
|
|
(byte*) IRQ_ENABLE
|
|
(byte) IRQ_RASTER
|
|
(byte*) IRQ_STATUS
|
|
(byte) LIGHT_BLUE
|
|
(word) NOT_FOUND
|
|
(byte) NUM_PROCESSING
|
|
(struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING
|
|
(byte*) PROCPORT
|
|
(byte*) PROCPORT_DDR
|
|
(byte) PROCPORT_DDR_MEMORY_MASK
|
|
(byte) PROCPORT_RAM_IO
|
|
(word) ProcessingChar::dist
|
|
(byte) ProcessingChar::x
|
|
(byte) ProcessingChar::y
|
|
(byte) ProcessingSprite::id
|
|
(byte) ProcessingSprite::ptr
|
|
(byte*) ProcessingSprite::screenPtr
|
|
(byte) ProcessingSprite::status
|
|
(word) ProcessingSprite::x
|
|
(byte) ProcessingSprite::y
|
|
(byte*) RASTER
|
|
(byte) RASTER_IRQ_MIDDLE
|
|
(byte) RASTER_IRQ_TOP
|
|
(byte*) SCREEN
|
|
(byte[$3e8]) SCREEN_COPY
|
|
(byte*) SPRITES_ENABLE
|
|
(byte*) SPRITES_XMSB
|
|
(byte*) SPRITES_XPOS
|
|
(byte*) SPRITES_YPOS
|
|
(byte*) SPRITE_DATA
|
|
(word) SPRITE_PTRS
|
|
(word[$28]) SQUARES_X
|
|
(word[$19]) SQUARES_Y
|
|
(byte) STATUS_FREE
|
|
(byte) STATUS_NEW
|
|
(byte) STATUS_PROCESSING
|
|
(byte*) VIC_CONTROL
|
|
(byte) WHITE
|
|
(struct ProcessingChar()) getCharToProcess()
|
|
(word~) getCharToProcess::$10 4.0
|
|
(byte*~) getCharToProcess::$11 4.0
|
|
(byte~) getCharToProcess::$13 1001.0
|
|
(byte~) getCharToProcess::$14 2002.0
|
|
(word) getCharToProcess::$15 4.0
|
|
(word) getCharToProcess::$16 4.0
|
|
(word~) getCharToProcess::$9 3.0
|
|
(struct ProcessingChar) getCharToProcess::closest
|
|
(word) getCharToProcess::closest_dist
|
|
(word~) getCharToProcess::closest_dist#10 202.0
|
|
(word~) getCharToProcess::closest_dist#12 2002.0
|
|
(word) getCharToProcess::closest_dist#2 684.1666666666667
|
|
(word) getCharToProcess::closest_dist#8 202.0
|
|
(byte) getCharToProcess::closest_x
|
|
(byte) getCharToProcess::closest_x#7 388.0
|
|
(byte) getCharToProcess::closest_x#9 202.0
|
|
(byte) getCharToProcess::closest_y
|
|
(byte) getCharToProcess::closest_y#7 388.0
|
|
(byte) getCharToProcess::closest_y#9 202.0
|
|
(word) getCharToProcess::dist
|
|
(word) getCharToProcess::dist#0 750.75
|
|
(struct ProcessingChar) getCharToProcess::return
|
|
(word) getCharToProcess::return_dist
|
|
(word) getCharToProcess::return_dist#0 7.333333333333333
|
|
(word) getCharToProcess::return_dist#1 242.23529411764704
|
|
(word~) getCharToProcess::return_dist#5 2002.0
|
|
(word~) getCharToProcess::return_dist#6 2002.0
|
|
(byte) getCharToProcess::return_x
|
|
(byte) getCharToProcess::return_x#0 7.333333333333333
|
|
(byte) getCharToProcess::return_x#1 242.23529411764704
|
|
(byte~) getCharToProcess::return_x#7 1001.0
|
|
(byte) getCharToProcess::return_y
|
|
(byte) getCharToProcess::return_y#0 7.333333333333333
|
|
(byte) getCharToProcess::return_y#1 228.66666666666669
|
|
(byte~) getCharToProcess::return_y#7 2002.0
|
|
(byte*) getCharToProcess::screen_line
|
|
(byte*) getCharToProcess::screen_line#1 50.5
|
|
(byte*) getCharToProcess::screen_line#4 80.2
|
|
(byte) getCharToProcess::x
|
|
(byte) getCharToProcess::x#1 1001.0
|
|
(byte) getCharToProcess::x#2 455.0
|
|
(byte) getCharToProcess::y
|
|
(byte) getCharToProcess::y#1 101.0
|
|
(byte) getCharToProcess::y#7 137.75
|
|
(void()) initSquareTables()
|
|
(byte~) initSquareTables::$10 22.0
|
|
(byte~) initSquareTables::$12 22.0
|
|
(word~) initSquareTables::$14 11.0
|
|
(byte~) initSquareTables::$16 22.0
|
|
(byte~) initSquareTables::$17 22.0
|
|
(byte~) initSquareTables::$2 22.0
|
|
(byte~) initSquareTables::$4 22.0
|
|
(word~) initSquareTables::$6 11.0
|
|
(byte) initSquareTables::x
|
|
(byte) initSquareTables::x#1 16.5
|
|
(byte) initSquareTables::x#2 5.5
|
|
(byte) initSquareTables::x_dist
|
|
(byte) initSquareTables::x_dist#0 22.0
|
|
(byte) initSquareTables::y
|
|
(byte) initSquareTables::y#1 16.5
|
|
(byte) initSquareTables::y#2 5.5
|
|
(byte) initSquareTables::y_dist
|
|
(byte) initSquareTables::y_dist#0 22.0
|
|
interrupt(HARDWARE_ALL)(void()) irqBottom()
|
|
(byte) irqBottom::i
|
|
(byte) irqBottom::i#1 16.5
|
|
(byte) irqBottom::i#2 22.0
|
|
interrupt(HARDWARE_ALL)(void()) irqTop()
|
|
(byte) irqTop::i
|
|
(byte) irqTop::i#1 16.5
|
|
(byte) irqTop::i#2 22.0
|
|
(byte) irqTop::i1
|
|
(byte) irqTop::i1#1 16.5
|
|
(byte) irqTop::i1#2 22.0
|
|
(void()) main()
|
|
(struct ProcessingChar~) main::$10
|
|
(byte~) main::$17 12.833333333333334
|
|
(struct ProcessingChar) main::center
|
|
(word) main::center_dist
|
|
(word) main::center_dist#0 22.0
|
|
(byte) main::center_x
|
|
(byte) main::center_x#0 5.5
|
|
(byte) main::center_y
|
|
(byte) main::center_y#0 5.5
|
|
(byte*) main::dst
|
|
(byte*) main::dst#1 11.0
|
|
(byte*) main::dst#2 11.0
|
|
(byte) main::i
|
|
(byte) main::i#1 16.5
|
|
(byte) main::i#2 4.125
|
|
(byte*) main::sp
|
|
(byte*) main::sp#1 16.5
|
|
(byte*) main::sp#2 16.5
|
|
(byte*) main::src
|
|
(byte*) main::src#1 11.0
|
|
(byte*) main::src#2 16.5
|
|
(word()) mul8u((byte) mul8u::a , (byte) mul8u::b)
|
|
(byte~) mul8u::$1 202.0
|
|
(byte) mul8u::a
|
|
(byte) mul8u::a#0 101.0
|
|
(byte) mul8u::a#1 11.0
|
|
(byte) mul8u::a#2 11.0
|
|
(byte) mul8u::a#3 67.66666666666666
|
|
(byte) mul8u::a#6 24.0
|
|
(byte) mul8u::b
|
|
(byte) mul8u::b#0 22.0
|
|
(byte) mul8u::b#1 22.0
|
|
(word) mul8u::mb
|
|
(word) mul8u::mb#0 24.0
|
|
(word) mul8u::mb#1 202.0
|
|
(word) mul8u::mb#2 43.57142857142858
|
|
(word) mul8u::res
|
|
(word) mul8u::res#1 202.0
|
|
(word) mul8u::res#2 46.42857142857143
|
|
(word) mul8u::res#6 101.0
|
|
(word) mul8u::return
|
|
(word) mul8u::return#2 22.0
|
|
(word) mul8u::return#3 22.0
|
|
(void()) processChars()
|
|
(byte~) processChars::$10 22.0
|
|
(byte~) processChars::$12 22.0
|
|
(byte~) processChars::$13 11.0
|
|
(byte~) processChars::$16 22.0
|
|
(byte~) processChars::$18 22.0
|
|
(byte~) processChars::$9 22.0
|
|
(byte) processChars::bitmask
|
|
(byte) processChars::bitmask#0 2.8947368421052633
|
|
(byte) processChars::i
|
|
(byte) processChars::i#1 16.5
|
|
(byte) processChars::i#10 1.8333333333333333
|
|
(struct ProcessingSprite*) processChars::processing
|
|
(struct ProcessingSprite*) processChars::processing#0 0.5789473684210527
|
|
(void()) setupRasterIrq((word) setupRasterIrq::raster , (void()*) setupRasterIrq::irqRoutine)
|
|
(void()*) setupRasterIrq::irqRoutine
|
|
(word) setupRasterIrq::raster
|
|
(void()) startProcessing((byte) startProcessing::center_x , (byte) startProcessing::center_y , (word) startProcessing::center_dist)
|
|
(word~) startProcessing::$0 4.0
|
|
(word~) startProcessing::$1 4.0
|
|
(word~) startProcessing::$11 3.0
|
|
(word~) startProcessing::$12 4.0
|
|
(byte*~) startProcessing::$13 4.0
|
|
(byte~) startProcessing::$21 2002.0
|
|
(byte~) startProcessing::$22 2.333333333333333
|
|
(word~) startProcessing::$3 4.0
|
|
(word) startProcessing::$30 4.0
|
|
(word) startProcessing::$31 4.0
|
|
(word~) startProcessing::$4 4.0
|
|
(byte~) startProcessing::$6 4.0
|
|
(struct ProcessingChar) startProcessing::center
|
|
(word) startProcessing::center_dist
|
|
(byte) startProcessing::center_x
|
|
(byte) startProcessing::center_x#0 0.40625
|
|
(byte) startProcessing::center_y
|
|
(byte) startProcessing::center_y#0 0.5
|
|
(byte) startProcessing::freeIdx
|
|
(byte) startProcessing::freeIdx#2 52.39999999999999
|
|
(byte) startProcessing::freeIdx#6 33.666666666666664
|
|
(byte~) startProcessing::freeIdx#7 202.0
|
|
(byte~) startProcessing::freeIdx#8 202.0
|
|
(byte) startProcessing::i
|
|
(byte) startProcessing::i#1 1501.5
|
|
(byte) startProcessing::i#2 1334.6666666666667
|
|
(byte) startProcessing::i1
|
|
(byte) startProcessing::i1#1 151.5
|
|
(byte) startProcessing::i1#2 67.33333333333333
|
|
(byte*) startProcessing::screenPtr
|
|
(byte*) startProcessing::screenPtr#0 0.5714285714285714
|
|
(byte*) startProcessing::spriteData
|
|
(byte*) startProcessing::spriteData#0 4.0
|
|
(byte*) startProcessing::spriteData#1 67.33333333333333
|
|
(byte*) startProcessing::spriteData#2 152.5
|
|
(byte) startProcessing::spriteIdx
|
|
(byte) startProcessing::spritePtr
|
|
(byte) startProcessing::spritePtr#0 0.36363636363636365
|
|
(word) startProcessing::spriteX
|
|
(word) startProcessing::spriteX#0 0.36363636363636365
|
|
(byte) startProcessing::spriteY
|
|
(byte) startProcessing::spriteY#0 0.4
|
|
|
|
Not consolidating phi with different size mul8u::mb#0 mul8u::b#1
|
|
Not consolidating phi with different size mul8u::mb#0 mul8u::b#0
|
|
Initial phi equivalence classes
|
|
[ main::i#2 main::i#1 ]
|
|
[ main::sp#2 main::sp#1 ]
|
|
[ main::src#2 main::src#1 ]
|
|
[ main::dst#2 main::dst#1 ]
|
|
[ startProcessing::freeIdx#6 startProcessing::freeIdx#7 ]
|
|
[ startProcessing::freeIdx#2 startProcessing::freeIdx#8 startProcessing::i#2 startProcessing::i#1 ]
|
|
[ startProcessing::spriteData#2 startProcessing::spriteData#0 startProcessing::spriteData#1 ]
|
|
[ startProcessing::i1#2 startProcessing::i1#1 ]
|
|
[ getCharToProcess::screen_line#4 getCharToProcess::screen_line#1 ]
|
|
[ getCharToProcess::y#7 getCharToProcess::y#1 ]
|
|
[ getCharToProcess::x#2 getCharToProcess::x#1 ]
|
|
[ getCharToProcess::closest_dist#2 getCharToProcess::closest_dist#8 getCharToProcess::closest_dist#10 getCharToProcess::closest_dist#12 ]
|
|
[ getCharToProcess::closest_x#7 getCharToProcess::closest_x#9 getCharToProcess::return_x#1 getCharToProcess::return_x#7 ]
|
|
[ getCharToProcess::closest_y#7 getCharToProcess::closest_y#9 getCharToProcess::return_y#1 getCharToProcess::return_y#7 ]
|
|
[ getCharToProcess::return_dist#1 getCharToProcess::return_dist#5 getCharToProcess::return_dist#6 getCharToProcess::dist#0 ]
|
|
[ initSquareTables::x#2 initSquareTables::x#1 ]
|
|
[ initSquareTables::x_dist#0 initSquareTables::$4 initSquareTables::$2 ]
|
|
[ initSquareTables::y#2 initSquareTables::y#1 ]
|
|
[ initSquareTables::y_dist#0 initSquareTables::$12 initSquareTables::$10 ]
|
|
[ mul8u::b#1 ]
|
|
[ mul8u::b#0 ]
|
|
[ mul8u::a#3 mul8u::a#6 mul8u::a#2 mul8u::a#1 mul8u::a#0 ]
|
|
[ mul8u::res#2 mul8u::res#6 mul8u::res#1 ]
|
|
[ mul8u::mb#2 mul8u::mb#0 mul8u::mb#1 ]
|
|
[ irqBottom::i#2 irqBottom::i#1 ]
|
|
[ processChars::i#10 processChars::i#1 ]
|
|
[ irqTop::i#2 irqTop::i#1 ]
|
|
[ irqTop::i1#2 irqTop::i1#1 ]
|
|
Added variable main::$17 to zero page equivalence class [ main::$17 ]
|
|
Added variable getCharToProcess::return_x#0 to zero page equivalence class [ getCharToProcess::return_x#0 ]
|
|
Added variable getCharToProcess::return_y#0 to zero page equivalence class [ getCharToProcess::return_y#0 ]
|
|
Added variable getCharToProcess::return_dist#0 to zero page equivalence class [ getCharToProcess::return_dist#0 ]
|
|
Added variable main::center_x#0 to zero page equivalence class [ main::center_x#0 ]
|
|
Added variable main::center_y#0 to zero page equivalence class [ main::center_y#0 ]
|
|
Added variable main::center_dist#0 to zero page equivalence class [ main::center_dist#0 ]
|
|
Added variable startProcessing::center_x#0 to zero page equivalence class [ startProcessing::center_x#0 ]
|
|
Added variable startProcessing::center_y#0 to zero page equivalence class [ startProcessing::center_y#0 ]
|
|
Added variable startProcessing::$21 to zero page equivalence class [ startProcessing::$21 ]
|
|
Added variable startProcessing::$0 to zero page equivalence class [ startProcessing::$0 ]
|
|
Added variable startProcessing::$1 to zero page equivalence class [ startProcessing::$1 ]
|
|
Added variable startProcessing::$3 to zero page equivalence class [ startProcessing::$3 ]
|
|
Added variable startProcessing::$4 to zero page equivalence class [ startProcessing::$4 ]
|
|
Added variable startProcessing::spriteX#0 to zero page equivalence class [ startProcessing::spriteX#0 ]
|
|
Added variable startProcessing::$6 to zero page equivalence class [ startProcessing::$6 ]
|
|
Added variable startProcessing::spriteY#0 to zero page equivalence class [ startProcessing::spriteY#0 ]
|
|
Added variable startProcessing::spritePtr#0 to zero page equivalence class [ startProcessing::spritePtr#0 ]
|
|
Added variable startProcessing::$11 to zero page equivalence class [ startProcessing::$11 ]
|
|
Added variable startProcessing::$30 to zero page equivalence class [ startProcessing::$30 ]
|
|
Added variable startProcessing::$31 to zero page equivalence class [ startProcessing::$31 ]
|
|
Added variable startProcessing::$12 to zero page equivalence class [ startProcessing::$12 ]
|
|
Added variable startProcessing::$13 to zero page equivalence class [ startProcessing::$13 ]
|
|
Added variable startProcessing::screenPtr#0 to zero page equivalence class [ startProcessing::screenPtr#0 ]
|
|
Added variable startProcessing::$22 to zero page equivalence class [ startProcessing::$22 ]
|
|
Added variable getCharToProcess::$13 to zero page equivalence class [ getCharToProcess::$13 ]
|
|
Added variable getCharToProcess::$14 to zero page equivalence class [ getCharToProcess::$14 ]
|
|
Added variable getCharToProcess::$9 to zero page equivalence class [ getCharToProcess::$9 ]
|
|
Added variable getCharToProcess::$15 to zero page equivalence class [ getCharToProcess::$15 ]
|
|
Added variable getCharToProcess::$16 to zero page equivalence class [ getCharToProcess::$16 ]
|
|
Added variable getCharToProcess::$10 to zero page equivalence class [ getCharToProcess::$10 ]
|
|
Added variable getCharToProcess::$11 to zero page equivalence class [ getCharToProcess::$11 ]
|
|
Added variable mul8u::return#2 to zero page equivalence class [ mul8u::return#2 ]
|
|
Added variable initSquareTables::$6 to zero page equivalence class [ initSquareTables::$6 ]
|
|
Added variable initSquareTables::$16 to zero page equivalence class [ initSquareTables::$16 ]
|
|
Added variable mul8u::return#3 to zero page equivalence class [ mul8u::return#3 ]
|
|
Added variable initSquareTables::$14 to zero page equivalence class [ initSquareTables::$14 ]
|
|
Added variable initSquareTables::$17 to zero page equivalence class [ initSquareTables::$17 ]
|
|
Added variable mul8u::$1 to zero page equivalence class [ mul8u::$1 ]
|
|
Added variable processChars::$18 to zero page equivalence class [ processChars::$18 ]
|
|
Added variable processChars::processing#0 to zero page equivalence class [ processChars::processing#0 ]
|
|
Added variable processChars::bitmask#0 to zero page equivalence class [ processChars::bitmask#0 ]
|
|
Added variable processChars::$9 to zero page equivalence class [ processChars::$9 ]
|
|
Added variable processChars::$10 to zero page equivalence class [ processChars::$10 ]
|
|
Added variable processChars::$13 to zero page equivalence class [ processChars::$13 ]
|
|
Added variable processChars::$12 to zero page equivalence class [ processChars::$12 ]
|
|
Added variable processChars::$16 to zero page equivalence class [ processChars::$16 ]
|
|
Complete equivalence classes
|
|
[ main::i#2 main::i#1 ]
|
|
[ main::sp#2 main::sp#1 ]
|
|
[ main::src#2 main::src#1 ]
|
|
[ main::dst#2 main::dst#1 ]
|
|
[ startProcessing::freeIdx#6 startProcessing::freeIdx#7 ]
|
|
[ startProcessing::freeIdx#2 startProcessing::freeIdx#8 startProcessing::i#2 startProcessing::i#1 ]
|
|
[ startProcessing::spriteData#2 startProcessing::spriteData#0 startProcessing::spriteData#1 ]
|
|
[ startProcessing::i1#2 startProcessing::i1#1 ]
|
|
[ getCharToProcess::screen_line#4 getCharToProcess::screen_line#1 ]
|
|
[ getCharToProcess::y#7 getCharToProcess::y#1 ]
|
|
[ getCharToProcess::x#2 getCharToProcess::x#1 ]
|
|
[ getCharToProcess::closest_dist#2 getCharToProcess::closest_dist#8 getCharToProcess::closest_dist#10 getCharToProcess::closest_dist#12 ]
|
|
[ getCharToProcess::closest_x#7 getCharToProcess::closest_x#9 getCharToProcess::return_x#1 getCharToProcess::return_x#7 ]
|
|
[ getCharToProcess::closest_y#7 getCharToProcess::closest_y#9 getCharToProcess::return_y#1 getCharToProcess::return_y#7 ]
|
|
[ getCharToProcess::return_dist#1 getCharToProcess::return_dist#5 getCharToProcess::return_dist#6 getCharToProcess::dist#0 ]
|
|
[ initSquareTables::x#2 initSquareTables::x#1 ]
|
|
[ initSquareTables::x_dist#0 initSquareTables::$4 initSquareTables::$2 ]
|
|
[ initSquareTables::y#2 initSquareTables::y#1 ]
|
|
[ initSquareTables::y_dist#0 initSquareTables::$12 initSquareTables::$10 ]
|
|
[ mul8u::b#1 ]
|
|
[ mul8u::b#0 ]
|
|
[ mul8u::a#3 mul8u::a#6 mul8u::a#2 mul8u::a#1 mul8u::a#0 ]
|
|
[ mul8u::res#2 mul8u::res#6 mul8u::res#1 ]
|
|
[ mul8u::mb#2 mul8u::mb#0 mul8u::mb#1 ]
|
|
[ irqBottom::i#2 irqBottom::i#1 ]
|
|
[ processChars::i#10 processChars::i#1 ]
|
|
[ irqTop::i#2 irqTop::i#1 ]
|
|
[ irqTop::i1#2 irqTop::i1#1 ]
|
|
[ main::$17 ]
|
|
[ getCharToProcess::return_x#0 ]
|
|
[ getCharToProcess::return_y#0 ]
|
|
[ getCharToProcess::return_dist#0 ]
|
|
[ main::center_x#0 ]
|
|
[ main::center_y#0 ]
|
|
[ main::center_dist#0 ]
|
|
[ startProcessing::center_x#0 ]
|
|
[ startProcessing::center_y#0 ]
|
|
[ startProcessing::$21 ]
|
|
[ startProcessing::$0 ]
|
|
[ startProcessing::$1 ]
|
|
[ startProcessing::$3 ]
|
|
[ startProcessing::$4 ]
|
|
[ startProcessing::spriteX#0 ]
|
|
[ startProcessing::$6 ]
|
|
[ startProcessing::spriteY#0 ]
|
|
[ startProcessing::spritePtr#0 ]
|
|
[ startProcessing::$11 ]
|
|
[ startProcessing::$30 ]
|
|
[ startProcessing::$31 ]
|
|
[ startProcessing::$12 ]
|
|
[ startProcessing::$13 ]
|
|
[ startProcessing::screenPtr#0 ]
|
|
[ startProcessing::$22 ]
|
|
[ getCharToProcess::$13 ]
|
|
[ getCharToProcess::$14 ]
|
|
[ getCharToProcess::$9 ]
|
|
[ getCharToProcess::$15 ]
|
|
[ getCharToProcess::$16 ]
|
|
[ getCharToProcess::$10 ]
|
|
[ getCharToProcess::$11 ]
|
|
[ mul8u::return#2 ]
|
|
[ initSquareTables::$6 ]
|
|
[ initSquareTables::$16 ]
|
|
[ mul8u::return#3 ]
|
|
[ initSquareTables::$14 ]
|
|
[ initSquareTables::$17 ]
|
|
[ mul8u::$1 ]
|
|
[ processChars::$18 ]
|
|
[ processChars::processing#0 ]
|
|
[ processChars::bitmask#0 ]
|
|
[ processChars::$9 ]
|
|
[ processChars::$10 ]
|
|
[ processChars::$13 ]
|
|
[ processChars::$12 ]
|
|
[ processChars::$16 ]
|
|
Allocated zp ZP_BYTE:2 [ main::i#2 main::i#1 ]
|
|
Allocated zp ZP_WORD:3 [ main::sp#2 main::sp#1 ]
|
|
Allocated zp ZP_WORD:5 [ main::src#2 main::src#1 ]
|
|
Allocated zp ZP_WORD:7 [ main::dst#2 main::dst#1 ]
|
|
Allocated zp ZP_BYTE:9 [ startProcessing::freeIdx#6 startProcessing::freeIdx#7 ]
|
|
Allocated zp ZP_BYTE:10 [ startProcessing::freeIdx#2 startProcessing::freeIdx#8 startProcessing::i#2 startProcessing::i#1 ]
|
|
Allocated zp ZP_WORD:11 [ startProcessing::spriteData#2 startProcessing::spriteData#0 startProcessing::spriteData#1 ]
|
|
Allocated zp ZP_BYTE:13 [ startProcessing::i1#2 startProcessing::i1#1 ]
|
|
Allocated zp ZP_WORD:14 [ getCharToProcess::screen_line#4 getCharToProcess::screen_line#1 ]
|
|
Allocated zp ZP_BYTE:16 [ getCharToProcess::y#7 getCharToProcess::y#1 ]
|
|
Allocated zp ZP_BYTE:17 [ getCharToProcess::x#2 getCharToProcess::x#1 ]
|
|
Allocated zp ZP_WORD:18 [ getCharToProcess::closest_dist#2 getCharToProcess::closest_dist#8 getCharToProcess::closest_dist#10 getCharToProcess::closest_dist#12 ]
|
|
Allocated zp ZP_BYTE:20 [ getCharToProcess::closest_x#7 getCharToProcess::closest_x#9 getCharToProcess::return_x#1 getCharToProcess::return_x#7 ]
|
|
Allocated zp ZP_BYTE:21 [ getCharToProcess::closest_y#7 getCharToProcess::closest_y#9 getCharToProcess::return_y#1 getCharToProcess::return_y#7 ]
|
|
Allocated zp ZP_WORD:22 [ getCharToProcess::return_dist#1 getCharToProcess::return_dist#5 getCharToProcess::return_dist#6 getCharToProcess::dist#0 ]
|
|
Allocated zp ZP_BYTE:24 [ initSquareTables::x#2 initSquareTables::x#1 ]
|
|
Allocated zp ZP_BYTE:25 [ initSquareTables::x_dist#0 initSquareTables::$4 initSquareTables::$2 ]
|
|
Allocated zp ZP_BYTE:26 [ initSquareTables::y#2 initSquareTables::y#1 ]
|
|
Allocated zp ZP_BYTE:27 [ initSquareTables::y_dist#0 initSquareTables::$12 initSquareTables::$10 ]
|
|
Allocated zp ZP_BYTE:28 [ mul8u::b#1 ]
|
|
Allocated zp ZP_BYTE:29 [ mul8u::b#0 ]
|
|
Allocated zp ZP_BYTE:30 [ mul8u::a#3 mul8u::a#6 mul8u::a#2 mul8u::a#1 mul8u::a#0 ]
|
|
Allocated zp ZP_WORD:31 [ mul8u::res#2 mul8u::res#6 mul8u::res#1 ]
|
|
Allocated zp ZP_WORD:33 [ mul8u::mb#2 mul8u::mb#0 mul8u::mb#1 ]
|
|
Allocated zp ZP_BYTE:35 [ irqBottom::i#2 irqBottom::i#1 ]
|
|
Allocated zp ZP_BYTE:36 [ processChars::i#10 processChars::i#1 ]
|
|
Allocated zp ZP_BYTE:37 [ irqTop::i#2 irqTop::i#1 ]
|
|
Allocated zp ZP_BYTE:38 [ irqTop::i1#2 irqTop::i1#1 ]
|
|
Allocated zp ZP_BYTE:39 [ main::$17 ]
|
|
Allocated zp ZP_BYTE:40 [ getCharToProcess::return_x#0 ]
|
|
Allocated zp ZP_BYTE:41 [ getCharToProcess::return_y#0 ]
|
|
Allocated zp ZP_WORD:42 [ getCharToProcess::return_dist#0 ]
|
|
Allocated zp ZP_BYTE:44 [ main::center_x#0 ]
|
|
Allocated zp ZP_BYTE:45 [ main::center_y#0 ]
|
|
Allocated zp ZP_WORD:46 [ main::center_dist#0 ]
|
|
Allocated zp ZP_BYTE:48 [ startProcessing::center_x#0 ]
|
|
Allocated zp ZP_BYTE:49 [ startProcessing::center_y#0 ]
|
|
Allocated zp ZP_BYTE:50 [ startProcessing::$21 ]
|
|
Allocated zp ZP_WORD:51 [ startProcessing::$0 ]
|
|
Allocated zp ZP_WORD:53 [ startProcessing::$1 ]
|
|
Allocated zp ZP_WORD:55 [ startProcessing::$3 ]
|
|
Allocated zp ZP_WORD:57 [ startProcessing::$4 ]
|
|
Allocated zp ZP_WORD:59 [ startProcessing::spriteX#0 ]
|
|
Allocated zp ZP_BYTE:61 [ startProcessing::$6 ]
|
|
Allocated zp ZP_BYTE:62 [ startProcessing::spriteY#0 ]
|
|
Allocated zp ZP_BYTE:63 [ startProcessing::spritePtr#0 ]
|
|
Allocated zp ZP_WORD:64 [ startProcessing::$11 ]
|
|
Allocated zp ZP_WORD:66 [ startProcessing::$30 ]
|
|
Allocated zp ZP_WORD:68 [ startProcessing::$31 ]
|
|
Allocated zp ZP_WORD:70 [ startProcessing::$12 ]
|
|
Allocated zp ZP_WORD:72 [ startProcessing::$13 ]
|
|
Allocated zp ZP_WORD:74 [ startProcessing::screenPtr#0 ]
|
|
Allocated zp ZP_BYTE:76 [ startProcessing::$22 ]
|
|
Allocated zp ZP_BYTE:77 [ getCharToProcess::$13 ]
|
|
Allocated zp ZP_BYTE:78 [ getCharToProcess::$14 ]
|
|
Allocated zp ZP_WORD:79 [ getCharToProcess::$9 ]
|
|
Allocated zp ZP_WORD:81 [ getCharToProcess::$15 ]
|
|
Allocated zp ZP_WORD:83 [ getCharToProcess::$16 ]
|
|
Allocated zp ZP_WORD:85 [ getCharToProcess::$10 ]
|
|
Allocated zp ZP_WORD:87 [ getCharToProcess::$11 ]
|
|
Allocated zp ZP_WORD:89 [ mul8u::return#2 ]
|
|
Allocated zp ZP_WORD:91 [ initSquareTables::$6 ]
|
|
Allocated zp ZP_BYTE:93 [ initSquareTables::$16 ]
|
|
Allocated zp ZP_WORD:94 [ mul8u::return#3 ]
|
|
Allocated zp ZP_WORD:96 [ initSquareTables::$14 ]
|
|
Allocated zp ZP_BYTE:98 [ initSquareTables::$17 ]
|
|
Allocated zp ZP_BYTE:99 [ mul8u::$1 ]
|
|
Allocated zp ZP_BYTE:100 [ processChars::$18 ]
|
|
Allocated zp ZP_WORD:101 [ processChars::processing#0 ]
|
|
Allocated zp ZP_BYTE:103 [ processChars::bitmask#0 ]
|
|
Allocated zp ZP_BYTE:104 [ processChars::$9 ]
|
|
Allocated zp ZP_BYTE:105 [ processChars::$10 ]
|
|
Allocated zp ZP_BYTE:106 [ processChars::$13 ]
|
|
Allocated zp ZP_BYTE:107 [ processChars::$12 ]
|
|
Allocated zp ZP_BYTE:108 [ processChars::$16 ]
|
|
|
|
INITIAL ASM
|
|
//SEG0 File Comments
|
|
// Black Hole at the center of the BASIC screen sucking in letters
|
|
//SEG1 Basic Upstart
|
|
.pc = $801 "Basic"
|
|
:BasicUpstart(bbegin)
|
|
.pc = $80d "Program"
|
|
//SEG2 Global Constants & labels
|
|
.const SIZEOF_POINTER = 2
|
|
.const OFFSET_STRUCT_PROCESSINGSPRITE_Y = 2
|
|
.const OFFSET_STRUCT_PROCESSINGSPRITE_ID = 3
|
|
.const OFFSET_STRUCT_PROCESSINGSPRITE_PTR = 4
|
|
.const OFFSET_STRUCT_PROCESSINGSPRITE_STATUS = 5
|
|
.const OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR = 6
|
|
// Processor port data direction register
|
|
.label PROCPORT_DDR = 0
|
|
// Mask for PROCESSOR_PORT_DDR which allows only memory configuration to be written
|
|
.const PROCPORT_DDR_MEMORY_MASK = 7
|
|
// Processor Port Register controlling RAM/ROM configuration and the datasette
|
|
.label PROCPORT = 1
|
|
// RAM in $A000, $E000 I/O in $D000
|
|
.const PROCPORT_RAM_IO = $35
|
|
// The offset of the sprite pointers from the screen start address
|
|
.const SPRITE_PTRS = $3f8
|
|
.label SPRITES_XPOS = $d000
|
|
.label SPRITES_YPOS = $d001
|
|
.label SPRITES_XMSB = $d010
|
|
.label RASTER = $d012
|
|
.label SPRITES_ENABLE = $d015
|
|
.label BORDERCOL = $d020
|
|
.label BGCOL = $d021
|
|
.label VIC_CONTROL = $d011
|
|
// VIC II IRQ Status Register
|
|
.label IRQ_STATUS = $d019
|
|
// VIC II IRQ Enable Register
|
|
.label IRQ_ENABLE = $d01a
|
|
// Bits for the IRQ Status/Enable Registers
|
|
.const IRQ_RASTER = 1
|
|
// CIA#1 Interrupt Status & Control Register
|
|
.label CIA1_INTERRUPT = $dc0d
|
|
// Value that disables all CIA interrupts when stored to the CIA Interrupt registers
|
|
.const CIA_INTERRUPT_CLEAR = $7f
|
|
// The vector used when the HARDWARE serves IRQ interrupts
|
|
.label HARDWARE_IRQ = $fffe
|
|
.const WHITE = 1
|
|
.const BLUE = 6
|
|
.const LIGHT_BLUE = $e
|
|
// Address of the screen
|
|
.label SCREEN = $400
|
|
// Sprite data for the animating sprites
|
|
.label SPRITE_DATA = $2000
|
|
// Max number of chars processed at once
|
|
.const NUM_PROCESSING = 1
|
|
// Distance value meaning not found
|
|
.const NOT_FOUND = $ffff
|
|
// Values for ProcessingSprite.status
|
|
.const STATUS_FREE = 0
|
|
.const STATUS_NEW = 1
|
|
.const STATUS_PROCESSING = 2
|
|
.const RASTER_IRQ_TOP = $30
|
|
.const RASTER_IRQ_MIDDLE = $ff
|
|
//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
|
|
//SEG7 [4] phi from @1 to main [phi:@1->main]
|
|
main_from_b1:
|
|
jsr main
|
|
//SEG8 [3] phi from @1 to @end [phi:@1->@end]
|
|
bend_from_b1:
|
|
jmp bend
|
|
//SEG9 @end
|
|
bend:
|
|
//SEG10 main
|
|
main: {
|
|
.label _17 = $27
|
|
.label i = 2
|
|
.label sp = 3
|
|
.label src = 5
|
|
.label dst = 7
|
|
.label center_x = $2c
|
|
.label center_y = $2d
|
|
.label center_dist = $2e
|
|
//SEG11 [5] phi from main to main::@1 [phi:main->main::@1]
|
|
b1_from_main:
|
|
//SEG12 [5] phi (byte) main::i#2 = (byte) 0 [phi:main->main::@1#0] -- vbuz1=vbuc1
|
|
lda #0
|
|
sta i
|
|
jmp b1
|
|
// Init processing array
|
|
//SEG13 [5] phi from main::@1 to main::@1 [phi:main::@1->main::@1]
|
|
b1_from_b1:
|
|
//SEG14 [5] phi (byte) main::i#2 = (byte) main::i#1 [phi:main::@1->main::@1#0] -- register_copy
|
|
jmp b1
|
|
//SEG15 main::@1
|
|
b1:
|
|
//SEG16 [6] (byte~) main::$17 ← (byte) main::i#2 << (byte) 3 -- vbuz1=vbuz2_rol_3
|
|
lda i
|
|
asl
|
|
asl
|
|
asl
|
|
sta _17
|
|
//SEG17 [7] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (byte~) main::$17) ← (byte) 0 -- pwuc1_derefidx_vbuz1=vbuc2
|
|
lda _17
|
|
ldx #0
|
|
tay
|
|
txa
|
|
sta PROCESSING,y
|
|
//SEG18 [8] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y + (byte~) main::$17) ← (byte) 0 -- pbuc1_derefidx_vbuz1=vbuc2
|
|
lda #0
|
|
ldy _17
|
|
sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_Y,y
|
|
//SEG19 [9] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID + (byte~) main::$17) ← (byte) 0 -- pbuc1_derefidx_vbuz1=vbuc2
|
|
lda #0
|
|
ldy _17
|
|
sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_ID,y
|
|
//SEG20 [10] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR + (byte~) main::$17) ← (byte) 0 -- pbuc1_derefidx_vbuz1=vbuc2
|
|
lda #0
|
|
ldy _17
|
|
sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_PTR,y
|
|
//SEG21 [11] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS + (byte~) main::$17) ← (const byte) STATUS_FREE#0 -- pbuc1_derefidx_vbuz1=vbuc2
|
|
lda #STATUS_FREE
|
|
ldy _17
|
|
sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_STATUS,y
|
|
//SEG22 [12] *((byte**)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR + (byte~) main::$17) ← (byte*) 0 -- pptc1_derefidx_vbuz1=pbuc2
|
|
ldy _17
|
|
lda #<0
|
|
sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR,y
|
|
lda #>0
|
|
sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR+1,y
|
|
//SEG23 [13] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuz1=_inc_vbuz1
|
|
inc i
|
|
//SEG24 [14] if((byte) main::i#1!=(byte) 1) goto main::@1 -- vbuz1_neq_vbuc1_then_la1
|
|
lda #1
|
|
cmp i
|
|
bne b1_from_b1
|
|
//SEG25 [15] phi from main::@1 to main::@2 [phi:main::@1->main::@2]
|
|
b2_from_b1:
|
|
//SEG26 [15] phi (byte*) main::sp#2 = (const byte*) SPRITE_DATA#0 [phi:main::@1->main::@2#0] -- pbuz1=pbuc1
|
|
lda #<SPRITE_DATA
|
|
sta sp
|
|
lda #>SPRITE_DATA
|
|
sta sp+1
|
|
jmp b2
|
|
// Clear sprites
|
|
//SEG27 [15] phi from main::@2 to main::@2 [phi:main::@2->main::@2]
|
|
b2_from_b2:
|
|
//SEG28 [15] phi (byte*) main::sp#2 = (byte*) main::sp#1 [phi:main::@2->main::@2#0] -- register_copy
|
|
jmp b2
|
|
//SEG29 main::@2
|
|
b2:
|
|
//SEG30 [16] *((byte*) main::sp#2) ← (byte) 0 -- _deref_pbuz1=vbuc1
|
|
lda #0
|
|
ldy #0
|
|
sta (sp),y
|
|
//SEG31 [17] (byte*) main::sp#1 ← ++ (byte*) main::sp#2 -- pbuz1=_inc_pbuz1
|
|
inc sp
|
|
bne !+
|
|
inc sp+1
|
|
!:
|
|
//SEG32 [18] if((byte*) main::sp#1<(const byte*) SPRITE_DATA#0+(const byte) SIZEOF_POINTER) goto main::@2 -- pbuz1_lt_pbuc1_then_la1
|
|
lda sp+1
|
|
cmp #>SPRITE_DATA+SIZEOF_POINTER
|
|
bcc b2_from_b2
|
|
bne !+
|
|
lda sp
|
|
cmp #<SPRITE_DATA+SIZEOF_POINTER
|
|
bcc b2_from_b2
|
|
!:
|
|
//SEG33 [19] phi from main::@2 to main::@3 [phi:main::@2->main::@3]
|
|
b3_from_b2:
|
|
jmp b3
|
|
//SEG34 main::@3
|
|
b3:
|
|
//SEG35 [20] call setupRasterIrq
|
|
jsr setupRasterIrq
|
|
//SEG36 [21] phi from main::@3 to main::@4 [phi:main::@3->main::@4]
|
|
b4_from_b3:
|
|
//SEG37 [21] phi (byte*) main::dst#2 = (const byte[$3e8]) SCREEN_COPY#0 [phi:main::@3->main::@4#0] -- pbuz1=pbuc1
|
|
lda #<SCREEN_COPY
|
|
sta dst
|
|
lda #>SCREEN_COPY
|
|
sta dst+1
|
|
//SEG38 [21] phi (byte*) main::src#2 = (const byte*) SCREEN#0 [phi:main::@3->main::@4#1] -- pbuz1=pbuc1
|
|
lda #<SCREEN
|
|
sta src
|
|
lda #>SCREEN
|
|
sta src+1
|
|
jmp b4
|
|
// Fill screen with some chars
|
|
//for( byte* sc: SCREEN..SCREEN+999) *sc = 'a'+(<sc&0x1f);
|
|
// Copy screen to screen copy
|
|
//SEG39 [21] phi from main::@4 to main::@4 [phi:main::@4->main::@4]
|
|
b4_from_b4:
|
|
//SEG40 [21] phi (byte*) main::dst#2 = (byte*) main::dst#1 [phi:main::@4->main::@4#0] -- register_copy
|
|
//SEG41 [21] phi (byte*) main::src#2 = (byte*) main::src#1 [phi:main::@4->main::@4#1] -- register_copy
|
|
jmp b4
|
|
//SEG42 main::@4
|
|
b4:
|
|
//SEG43 [22] *((byte*) main::dst#2) ← *((byte*) main::src#2) -- _deref_pbuz1=_deref_pbuz2
|
|
ldy #0
|
|
lda (src),y
|
|
ldy #0
|
|
sta (dst),y
|
|
//SEG44 [23] (byte*) main::src#1 ← ++ (byte*) main::src#2 -- pbuz1=_inc_pbuz1
|
|
inc src
|
|
bne !+
|
|
inc src+1
|
|
!:
|
|
//SEG45 [24] (byte*) main::dst#1 ← ++ (byte*) main::dst#2 -- pbuz1=_inc_pbuz1
|
|
inc dst
|
|
bne !+
|
|
inc dst+1
|
|
!:
|
|
//SEG46 [25] if((byte*) main::src#1!=(const byte*) SCREEN#0+(word) $3e8) goto main::@4 -- pbuz1_neq_pbuc1_then_la1
|
|
lda src+1
|
|
cmp #>SCREEN+$3e8
|
|
bne b4_from_b4
|
|
lda src
|
|
cmp #<SCREEN+$3e8
|
|
bne b4_from_b4
|
|
//SEG47 [26] phi from main::@4 to main::@5 [phi:main::@4->main::@5]
|
|
b5_from_b4:
|
|
jmp b5
|
|
//SEG48 main::@5
|
|
b5:
|
|
//SEG49 [27] call initSquareTables
|
|
//SEG50 [108] phi from main::@5 to initSquareTables [phi:main::@5->initSquareTables]
|
|
initSquareTables_from_b5:
|
|
jsr initSquareTables
|
|
//SEG51 [28] phi from main::@5 main::@7 to main::@6 [phi:main::@5/main::@7->main::@6]
|
|
b6_from_b5:
|
|
b6_from_b7:
|
|
jmp b6
|
|
// Main loop
|
|
//SEG52 main::@6
|
|
b6:
|
|
//SEG53 [29] call getCharToProcess
|
|
//SEG54 [80] phi from main::@6 to getCharToProcess [phi:main::@6->getCharToProcess]
|
|
getCharToProcess_from_b6:
|
|
jsr getCharToProcess
|
|
//SEG55 [30] (byte) getCharToProcess::return_x#0 ← (byte) getCharToProcess::return_x#1 -- vbuz1=vbuz2
|
|
lda getCharToProcess.return_x_1
|
|
sta getCharToProcess.return_x
|
|
//SEG56 [31] (byte) getCharToProcess::return_y#0 ← (byte) getCharToProcess::return_y#1 -- vbuz1=vbuz2
|
|
lda getCharToProcess.return_y_1
|
|
sta getCharToProcess.return_y
|
|
//SEG57 [32] (word) getCharToProcess::return_dist#0 ← (word) getCharToProcess::return_dist#1 -- vwuz1=vwuz2
|
|
lda getCharToProcess.return_dist_1
|
|
sta getCharToProcess.return_dist
|
|
lda getCharToProcess.return_dist_1+1
|
|
sta getCharToProcess.return_dist+1
|
|
jmp b9
|
|
//SEG58 main::@9
|
|
b9:
|
|
//SEG59 [33] (byte) main::center_x#0 ← (byte) getCharToProcess::return_x#0 -- vbuz1=vbuz2
|
|
lda getCharToProcess.return_x
|
|
sta center_x
|
|
//SEG60 [34] (byte) main::center_y#0 ← (byte) getCharToProcess::return_y#0 -- vbuz1=vbuz2
|
|
lda getCharToProcess.return_y
|
|
sta center_y
|
|
//SEG61 [35] (word) main::center_dist#0 ← (word) getCharToProcess::return_dist#0 -- vwuz1=vwuz2
|
|
lda getCharToProcess.return_dist
|
|
sta center_dist
|
|
lda getCharToProcess.return_dist+1
|
|
sta center_dist+1
|
|
//SEG62 [36] if((word) main::center_dist#0!=(const word) NOT_FOUND#0) goto main::@7 -- vwuz1_neq_vwuc1_then_la1
|
|
lda center_dist+1
|
|
cmp #>NOT_FOUND
|
|
bne b7
|
|
lda center_dist
|
|
cmp #<NOT_FOUND
|
|
bne b7
|
|
jmp b8
|
|
//SEG63 main::@8
|
|
b8:
|
|
//SEG64 [37] *((const byte*) SCREEN#0+(word) $3e7) ← ++ *((const byte*) SCREEN#0+(word) $3e7) -- _deref_pbuc1=_inc__deref_pbuc1
|
|
inc SCREEN+$3e7
|
|
jmp b8
|
|
//SEG65 main::@7
|
|
b7:
|
|
//SEG66 [38] (byte) startProcessing::center_x#0 ← (byte) main::center_x#0 -- vbuz1=vbuz2
|
|
lda center_x
|
|
sta startProcessing.center_x
|
|
//SEG67 [39] (byte) startProcessing::center_y#0 ← (byte) main::center_y#0 -- vbuz1=vbuz2
|
|
lda center_y
|
|
sta startProcessing.center_y
|
|
//SEG68 [40] call startProcessing
|
|
//SEG69 [41] phi from main::@7 to startProcessing [phi:main::@7->startProcessing]
|
|
startProcessing_from_b7:
|
|
jsr startProcessing
|
|
jmp b6_from_b7
|
|
}
|
|
//SEG70 startProcessing
|
|
// Start processing a char - by inserting it into the PROCESSING array
|
|
// startProcessing(byte zeropage($30) center_x, byte zeropage($31) center_y)
|
|
startProcessing: {
|
|
.label _0 = $33
|
|
.label _1 = $35
|
|
.label _3 = $37
|
|
.label _4 = $39
|
|
.label _6 = $3d
|
|
.label _11 = $40
|
|
.label _12 = $46
|
|
.label _13 = $48
|
|
.label _21 = $32
|
|
.label _22 = $4c
|
|
.label center_x = $30
|
|
.label center_y = $31
|
|
.label i = $a
|
|
.label spriteData = $b
|
|
.label i1 = $d
|
|
.label spriteX = $3b
|
|
.label spriteY = $3e
|
|
.label spritePtr = $3f
|
|
.label screenPtr = $4a
|
|
.label freeIdx = $a
|
|
.label freeIdx_6 = 9
|
|
.label _30 = $42
|
|
.label _31 = $44
|
|
.label freeIdx_7 = 9
|
|
//SEG71 [42] phi from startProcessing to startProcessing::@1 [phi:startProcessing->startProcessing::@1]
|
|
b1_from_startProcessing:
|
|
//SEG72 [42] phi (byte) startProcessing::freeIdx#6 = (byte) $ff [phi:startProcessing->startProcessing::@1#0] -- vbuz1=vbuc1
|
|
lda #$ff
|
|
sta freeIdx_6
|
|
jmp b1
|
|
//SEG73 startProcessing::@1
|
|
b1:
|
|
//SEG74 [43] phi from startProcessing::@1 to startProcessing::@2 [phi:startProcessing::@1->startProcessing::@2]
|
|
b2_from_b1:
|
|
//SEG75 [43] phi (byte) startProcessing::i#2 = (byte) 0 [phi:startProcessing::@1->startProcessing::@2#0] -- vbuz1=vbuc1
|
|
lda #0
|
|
sta i
|
|
jmp b2
|
|
//SEG76 [43] phi from startProcessing::@3 to startProcessing::@2 [phi:startProcessing::@3->startProcessing::@2]
|
|
b2_from_b3:
|
|
//SEG77 [43] phi (byte) startProcessing::i#2 = (byte) startProcessing::i#1 [phi:startProcessing::@3->startProcessing::@2#0] -- register_copy
|
|
jmp b2
|
|
//SEG78 startProcessing::@2
|
|
b2:
|
|
//SEG79 [44] (byte~) startProcessing::$21 ← (byte) startProcessing::i#2 << (byte) 3 -- vbuz1=vbuz2_rol_3
|
|
lda i
|
|
asl
|
|
asl
|
|
asl
|
|
sta _21
|
|
//SEG80 [45] if(*((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS + (byte~) startProcessing::$21)!=(const byte) STATUS_FREE#0) goto startProcessing::@3 -- pbuc1_derefidx_vbuz1_neq_vbuc2_then_la1
|
|
lda #STATUS_FREE
|
|
ldy _21
|
|
cmp PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_STATUS,y
|
|
bne b3
|
|
//SEG81 [46] phi from startProcessing::@2 startProcessing::@9 to startProcessing::@4 [phi:startProcessing::@2/startProcessing::@9->startProcessing::@4]
|
|
b4_from_b2:
|
|
b4_from_b9:
|
|
//SEG82 [46] phi (byte) startProcessing::freeIdx#2 = (byte) startProcessing::i#2 [phi:startProcessing::@2/startProcessing::@9->startProcessing::@4#0] -- register_copy
|
|
jmp b4
|
|
//SEG83 startProcessing::@4
|
|
b4:
|
|
//SEG84 [47] if((byte) startProcessing::freeIdx#2==(byte) $ff) goto startProcessing::@8 -- vbuz1_eq_vbuc1_then_la1
|
|
lda #$ff
|
|
cmp freeIdx
|
|
beq b8
|
|
jmp b5
|
|
//SEG85 startProcessing::@5
|
|
b5:
|
|
//SEG86 [48] (word~) startProcessing::$0 ← (word)(byte) startProcessing::freeIdx#2 -- vwuz1=_word_vbuz2
|
|
lda freeIdx
|
|
sta _0
|
|
lda #0
|
|
sta _0+1
|
|
//SEG87 [49] (word~) startProcessing::$1 ← (word~) startProcessing::$0 << (byte) 6 -- vwuz1=vwuz2_rol_6
|
|
lda _0
|
|
asl
|
|
sta _1
|
|
lda _0+1
|
|
rol
|
|
sta _1+1
|
|
asl _1
|
|
rol _1+1
|
|
asl _1
|
|
rol _1+1
|
|
asl _1
|
|
rol _1+1
|
|
asl _1
|
|
rol _1+1
|
|
asl _1
|
|
rol _1+1
|
|
//SEG88 [50] (byte*) startProcessing::spriteData#0 ← (const byte*) SPRITE_DATA#0 + (word~) startProcessing::$1 -- pbuz1=pbuc1_plus_vwuz2
|
|
lda _1
|
|
clc
|
|
adc #<SPRITE_DATA
|
|
sta spriteData
|
|
lda _1+1
|
|
adc #>SPRITE_DATA
|
|
sta spriteData+1
|
|
//SEG89 [51] phi from startProcessing::@5 to startProcessing::@6 [phi:startProcessing::@5->startProcessing::@6]
|
|
b6_from_b5:
|
|
//SEG90 [51] phi (byte) startProcessing::i1#2 = (byte) 0 [phi:startProcessing::@5->startProcessing::@6#0] -- vbuz1=vbuc1
|
|
lda #0
|
|
sta i1
|
|
//SEG91 [51] phi (byte*) startProcessing::spriteData#2 = (byte*) startProcessing::spriteData#0 [phi:startProcessing::@5->startProcessing::@6#1] -- register_copy
|
|
jmp b6
|
|
//SEG92 [51] phi from startProcessing::@6 to startProcessing::@6 [phi:startProcessing::@6->startProcessing::@6]
|
|
b6_from_b6:
|
|
//SEG93 [51] phi (byte) startProcessing::i1#2 = (byte) startProcessing::i1#1 [phi:startProcessing::@6->startProcessing::@6#0] -- register_copy
|
|
//SEG94 [51] phi (byte*) startProcessing::spriteData#2 = (byte*) startProcessing::spriteData#1 [phi:startProcessing::@6->startProcessing::@6#1] -- register_copy
|
|
jmp b6
|
|
//SEG95 startProcessing::@6
|
|
b6:
|
|
//SEG96 [52] *((byte*) startProcessing::spriteData#2) ← (byte) $ff -- _deref_pbuz1=vbuc1
|
|
lda #$ff
|
|
ldy #0
|
|
sta (spriteData),y
|
|
//SEG97 [53] (byte*) startProcessing::spriteData#1 ← (byte*) startProcessing::spriteData#2 + (byte) 3 -- pbuz1=pbuz1_plus_vbuc1
|
|
lda #3
|
|
clc
|
|
adc spriteData
|
|
sta spriteData
|
|
bcc !+
|
|
inc spriteData+1
|
|
!:
|
|
//SEG98 [54] (byte) startProcessing::i1#1 ← ++ (byte) startProcessing::i1#2 -- vbuz1=_inc_vbuz1
|
|
inc i1
|
|
//SEG99 [55] if((byte) startProcessing::i1#1!=(byte) 8) goto startProcessing::@6 -- vbuz1_neq_vbuc1_then_la1
|
|
lda #8
|
|
cmp i1
|
|
bne b6_from_b6
|
|
jmp b7
|
|
//SEG100 startProcessing::@7
|
|
b7:
|
|
//SEG101 [56] (word~) startProcessing::$3 ← (word)(byte) startProcessing::center_x#0 -- vwuz1=_word_vbuz2
|
|
lda center_x
|
|
sta _3
|
|
lda #0
|
|
sta _3+1
|
|
//SEG102 [57] (word~) startProcessing::$4 ← (word~) startProcessing::$3 << (byte) 3 -- vwuz1=vwuz2_rol_3
|
|
lda _3
|
|
asl
|
|
sta _4
|
|
lda _3+1
|
|
rol
|
|
sta _4+1
|
|
asl _4
|
|
rol _4+1
|
|
asl _4
|
|
rol _4+1
|
|
//SEG103 [58] (word) startProcessing::spriteX#0 ← (byte) $18 + (word~) startProcessing::$4 -- vwuz1=vbuc1_plus_vwuz2
|
|
lda #$18
|
|
clc
|
|
adc _4
|
|
sta spriteX
|
|
lda #0
|
|
adc _4+1
|
|
sta spriteX+1
|
|
//SEG104 [59] (byte~) startProcessing::$6 ← (byte) startProcessing::center_y#0 << (byte) 3 -- vbuz1=vbuz2_rol_3
|
|
lda center_y
|
|
asl
|
|
asl
|
|
asl
|
|
sta _6
|
|
//SEG105 [60] (byte) startProcessing::spriteY#0 ← (byte) $32 + (byte~) startProcessing::$6 -- vbuz1=vbuc1_plus_vbuz2
|
|
lax _6
|
|
axs #-[$32]
|
|
stx spriteY
|
|
//SEG106 [61] (byte) startProcessing::spritePtr#0 ← (byte)(const byte*) SPRITE_DATA#0/(byte) $40 + (byte) startProcessing::freeIdx#2 -- vbuz1=vbuc1_plus_vbuz2
|
|
lax freeIdx
|
|
axs #-[SPRITE_DATA/$40]
|
|
stx spritePtr
|
|
//SEG107 [62] (word~) startProcessing::$11 ← (word)(byte) startProcessing::center_y#0 -- vwuz1=_word_vbuz2
|
|
lda center_y
|
|
sta _11
|
|
lda #0
|
|
sta _11+1
|
|
//SEG108 [63] (word) startProcessing::$30 ← (word~) startProcessing::$11 << (byte) 2 -- vwuz1=vwuz2_rol_2
|
|
lda _11
|
|
asl
|
|
sta _30
|
|
lda _11+1
|
|
rol
|
|
sta _30+1
|
|
asl _30
|
|
rol _30+1
|
|
//SEG109 [64] (word) startProcessing::$31 ← (word) startProcessing::$30 + (word~) startProcessing::$11 -- vwuz1=vwuz2_plus_vwuz3
|
|
lda _30
|
|
clc
|
|
adc _11
|
|
sta _31
|
|
lda _30+1
|
|
adc _11+1
|
|
sta _31+1
|
|
//SEG110 [65] (word~) startProcessing::$12 ← (word) startProcessing::$31 << (byte) 3 -- vwuz1=vwuz2_rol_3
|
|
lda _31
|
|
asl
|
|
sta _12
|
|
lda _31+1
|
|
rol
|
|
sta _12+1
|
|
asl _12
|
|
rol _12+1
|
|
asl _12
|
|
rol _12+1
|
|
//SEG111 [66] (byte*~) startProcessing::$13 ← (const byte*) SCREEN#0 + (word~) startProcessing::$12 -- pbuz1=pbuc1_plus_vwuz2
|
|
lda _12
|
|
clc
|
|
adc #<SCREEN
|
|
sta _13
|
|
lda _12+1
|
|
adc #>SCREEN
|
|
sta _13+1
|
|
//SEG112 [67] (byte*) startProcessing::screenPtr#0 ← (byte*~) startProcessing::$13 + (byte) startProcessing::center_x#0 -- pbuz1=pbuz2_plus_vbuz3
|
|
lda center_x
|
|
clc
|
|
adc _13
|
|
sta screenPtr
|
|
lda #0
|
|
adc _13+1
|
|
sta screenPtr+1
|
|
//SEG113 [68] (byte~) startProcessing::$22 ← (byte) startProcessing::freeIdx#2 << (byte) 3 -- vbuz1=vbuz2_rol_3
|
|
lda freeIdx
|
|
asl
|
|
asl
|
|
asl
|
|
sta _22
|
|
//SEG114 [69] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (byte~) startProcessing::$22) ← (word) startProcessing::spriteX#0 -- pwuc1_derefidx_vbuz1=vwuz2
|
|
ldy _22
|
|
lda spriteX
|
|
sta PROCESSING,y
|
|
lda spriteX+1
|
|
sta PROCESSING+1,y
|
|
//SEG115 [70] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y + (byte~) startProcessing::$22) ← (byte) startProcessing::spriteY#0 -- pbuc1_derefidx_vbuz1=vbuz2
|
|
lda spriteY
|
|
ldy _22
|
|
sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_Y,y
|
|
//SEG116 [71] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID + (byte~) startProcessing::$22) ← (byte) startProcessing::freeIdx#2 -- pbuc1_derefidx_vbuz1=vbuz2
|
|
lda freeIdx
|
|
ldy _22
|
|
sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_ID,y
|
|
//SEG117 [72] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR + (byte~) startProcessing::$22) ← (byte) startProcessing::spritePtr#0 -- pbuc1_derefidx_vbuz1=vbuz2
|
|
lda spritePtr
|
|
ldy _22
|
|
sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_PTR,y
|
|
//SEG118 [73] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS + (byte~) startProcessing::$22) ← (const byte) STATUS_NEW#0 -- pbuc1_derefidx_vbuz1=vbuc2
|
|
lda #STATUS_NEW
|
|
ldy _22
|
|
sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_STATUS,y
|
|
//SEG119 [74] *((byte**)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR + (byte~) startProcessing::$22) ← (byte*) startProcessing::screenPtr#0 -- pptc1_derefidx_vbuz1=pbuz2
|
|
ldy _22
|
|
lda screenPtr
|
|
sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR,y
|
|
lda screenPtr+1
|
|
sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR+1,y
|
|
jmp breturn
|
|
//SEG120 startProcessing::@return
|
|
breturn:
|
|
//SEG121 [75] return
|
|
rts
|
|
//SEG122 startProcessing::@8
|
|
b8:
|
|
//SEG123 [76] (byte~) startProcessing::freeIdx#7 ← (byte) startProcessing::freeIdx#2 -- vbuz1=vbuz2
|
|
lda freeIdx
|
|
sta freeIdx_7
|
|
//SEG124 [42] phi from startProcessing::@8 to startProcessing::@1 [phi:startProcessing::@8->startProcessing::@1]
|
|
b1_from_b8:
|
|
//SEG125 [42] phi (byte) startProcessing::freeIdx#6 = (byte~) startProcessing::freeIdx#7 [phi:startProcessing::@8->startProcessing::@1#0] -- register_copy
|
|
jmp b1
|
|
//SEG126 startProcessing::@3
|
|
b3:
|
|
//SEG127 [77] (byte) startProcessing::i#1 ← ++ (byte) startProcessing::i#2 -- vbuz1=_inc_vbuz1
|
|
inc i
|
|
//SEG128 [78] if((byte) startProcessing::i#1!=(byte) 1) goto startProcessing::@2 -- vbuz1_neq_vbuc1_then_la1
|
|
lda #1
|
|
cmp i
|
|
bne b2_from_b3
|
|
jmp b9
|
|
//SEG129 startProcessing::@9
|
|
b9:
|
|
//SEG130 [79] (byte~) startProcessing::freeIdx#8 ← (byte) startProcessing::freeIdx#6 -- vbuz1=vbuz2
|
|
lda freeIdx_6
|
|
sta freeIdx
|
|
jmp b4_from_b9
|
|
}
|
|
//SEG131 getCharToProcess
|
|
// Find the non-space char closest to the center of the screen
|
|
// If no non-space char is found the distance will be 0xffff
|
|
getCharToProcess: {
|
|
.label _9 = $4f
|
|
.label _10 = $55
|
|
.label _11 = $57
|
|
.label _13 = $4d
|
|
.label _14 = $4e
|
|
.label return_x = $28
|
|
.label return_y = $29
|
|
.label return_dist = $2a
|
|
.label x = $11
|
|
.label dist = $16
|
|
.label screen_line = $e
|
|
.label y = $10
|
|
.label return_x_1 = $14
|
|
.label return_y_1 = $15
|
|
.label return_dist_1 = $16
|
|
.label closest_dist = $12
|
|
.label closest_x = $14
|
|
.label closest_y = $15
|
|
.label _15 = $51
|
|
.label _16 = $53
|
|
.label return_dist_5 = $16
|
|
.label return_dist_6 = $16
|
|
.label return_x_7 = $14
|
|
.label return_y_7 = $15
|
|
//SEG132 [81] phi from getCharToProcess to getCharToProcess::@1 [phi:getCharToProcess->getCharToProcess::@1]
|
|
b1_from_getCharToProcess:
|
|
//SEG133 [81] phi (byte) getCharToProcess::closest_y#9 = (byte) 0 [phi:getCharToProcess->getCharToProcess::@1#0] -- vbuz1=vbuc1
|
|
lda #0
|
|
sta closest_y
|
|
//SEG134 [81] phi (byte) getCharToProcess::closest_x#9 = (byte) 0 [phi:getCharToProcess->getCharToProcess::@1#1] -- vbuz1=vbuc1
|
|
lda #0
|
|
sta closest_x
|
|
//SEG135 [81] phi (word) getCharToProcess::closest_dist#8 = (const word) NOT_FOUND#0 [phi:getCharToProcess->getCharToProcess::@1#2] -- vwuz1=vwuc1
|
|
lda #<NOT_FOUND
|
|
sta closest_dist
|
|
lda #>NOT_FOUND
|
|
sta closest_dist+1
|
|
//SEG136 [81] phi (byte) getCharToProcess::y#7 = (byte) 0 [phi:getCharToProcess->getCharToProcess::@1#3] -- vbuz1=vbuc1
|
|
lda #0
|
|
sta y
|
|
//SEG137 [81] phi (byte*) getCharToProcess::screen_line#4 = (const byte[$3e8]) SCREEN_COPY#0 [phi:getCharToProcess->getCharToProcess::@1#4] -- pbuz1=pbuc1
|
|
lda #<SCREEN_COPY
|
|
sta screen_line
|
|
lda #>SCREEN_COPY
|
|
sta screen_line+1
|
|
jmp b1
|
|
//SEG138 getCharToProcess::@1
|
|
b1:
|
|
//SEG139 [82] phi from getCharToProcess::@1 to getCharToProcess::@2 [phi:getCharToProcess::@1->getCharToProcess::@2]
|
|
b2_from_b1:
|
|
//SEG140 [82] phi (byte) getCharToProcess::closest_y#7 = (byte) getCharToProcess::closest_y#9 [phi:getCharToProcess::@1->getCharToProcess::@2#0] -- register_copy
|
|
//SEG141 [82] phi (byte) getCharToProcess::closest_x#7 = (byte) getCharToProcess::closest_x#9 [phi:getCharToProcess::@1->getCharToProcess::@2#1] -- register_copy
|
|
//SEG142 [82] phi (word) getCharToProcess::closest_dist#2 = (word) getCharToProcess::closest_dist#8 [phi:getCharToProcess::@1->getCharToProcess::@2#2] -- register_copy
|
|
//SEG143 [82] phi (byte) getCharToProcess::x#2 = (byte) 0 [phi:getCharToProcess::@1->getCharToProcess::@2#3] -- vbuz1=vbuc1
|
|
lda #0
|
|
sta x
|
|
jmp b2
|
|
//SEG144 getCharToProcess::@2
|
|
b2:
|
|
//SEG145 [83] if(*((byte*) getCharToProcess::screen_line#4 + (byte) getCharToProcess::x#2)==(byte) ' ') goto getCharToProcess::@11 -- pbuz1_derefidx_vbuz2_eq_vbuc1_then_la1
|
|
ldy x
|
|
lda (screen_line),y
|
|
cmp #' '
|
|
beq b11
|
|
jmp b4
|
|
//SEG146 getCharToProcess::@4
|
|
b4:
|
|
//SEG147 [84] (byte~) getCharToProcess::$13 ← (byte) getCharToProcess::x#2 << (byte) 1 -- vbuz1=vbuz2_rol_1
|
|
lda x
|
|
asl
|
|
sta _13
|
|
//SEG148 [85] (byte~) getCharToProcess::$14 ← (byte) getCharToProcess::y#7 << (byte) 1 -- vbuz1=vbuz2_rol_1
|
|
lda y
|
|
asl
|
|
sta _14
|
|
//SEG149 [86] (word) getCharToProcess::dist#0 ← *((const word[$28]) SQUARES_X#0 + (byte~) getCharToProcess::$13) + *((const word[$19]) SQUARES_Y#0 + (byte~) getCharToProcess::$14) -- vwuz1=pwuc1_derefidx_vbuz2_plus_pwuc2_derefidx_vbuz3
|
|
ldx _13
|
|
ldy _14
|
|
lda SQUARES_X,x
|
|
clc
|
|
adc SQUARES_Y,y
|
|
sta dist
|
|
lda SQUARES_X+1,x
|
|
adc SQUARES_Y+1,y
|
|
sta dist+1
|
|
//SEG150 [87] if((word) getCharToProcess::dist#0>=(word) getCharToProcess::closest_dist#2) goto getCharToProcess::@12 -- vwuz1_ge_vwuz2_then_la1
|
|
lda closest_dist+1
|
|
cmp dist+1
|
|
bne !+
|
|
lda closest_dist
|
|
cmp dist
|
|
beq b12
|
|
!:
|
|
bcc b12
|
|
jmp b5
|
|
//SEG151 getCharToProcess::@5
|
|
b5:
|
|
//SEG152 [88] (byte~) getCharToProcess::return_x#7 ← (byte) getCharToProcess::x#2 -- vbuz1=vbuz2
|
|
lda x
|
|
sta return_x_7
|
|
//SEG153 [89] (byte~) getCharToProcess::return_y#7 ← (byte) getCharToProcess::y#7 -- vbuz1=vbuz2
|
|
lda y
|
|
sta return_y_7
|
|
//SEG154 [90] phi from getCharToProcess::@11 getCharToProcess::@12 getCharToProcess::@5 to getCharToProcess::@3 [phi:getCharToProcess::@11/getCharToProcess::@12/getCharToProcess::@5->getCharToProcess::@3]
|
|
b3_from_b11:
|
|
b3_from_b12:
|
|
b3_from_b5:
|
|
//SEG155 [90] phi (byte) getCharToProcess::return_y#1 = (byte) getCharToProcess::closest_y#7 [phi:getCharToProcess::@11/getCharToProcess::@12/getCharToProcess::@5->getCharToProcess::@3#0] -- register_copy
|
|
//SEG156 [90] phi (byte) getCharToProcess::return_x#1 = (byte) getCharToProcess::closest_x#7 [phi:getCharToProcess::@11/getCharToProcess::@12/getCharToProcess::@5->getCharToProcess::@3#1] -- register_copy
|
|
//SEG157 [90] phi (word) getCharToProcess::return_dist#1 = (word~) getCharToProcess::return_dist#5 [phi:getCharToProcess::@11/getCharToProcess::@12/getCharToProcess::@5->getCharToProcess::@3#2] -- register_copy
|
|
jmp b3
|
|
//SEG158 getCharToProcess::@3
|
|
b3:
|
|
//SEG159 [91] (byte) getCharToProcess::x#1 ← ++ (byte) getCharToProcess::x#2 -- vbuz1=_inc_vbuz1
|
|
inc x
|
|
//SEG160 [92] if((byte) getCharToProcess::x#1!=(byte) $28) goto getCharToProcess::@10 -- vbuz1_neq_vbuc1_then_la1
|
|
lda #$28
|
|
cmp x
|
|
bne b10
|
|
jmp b6
|
|
//SEG161 getCharToProcess::@6
|
|
b6:
|
|
//SEG162 [93] (byte*) getCharToProcess::screen_line#1 ← (byte*) getCharToProcess::screen_line#4 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1
|
|
lda #$28
|
|
clc
|
|
adc screen_line
|
|
sta screen_line
|
|
bcc !+
|
|
inc screen_line+1
|
|
!:
|
|
//SEG163 [94] (byte) getCharToProcess::y#1 ← ++ (byte) getCharToProcess::y#7 -- vbuz1=_inc_vbuz1
|
|
inc y
|
|
//SEG164 [95] if((byte) getCharToProcess::y#1!=(byte) $19) goto getCharToProcess::@9 -- vbuz1_neq_vbuc1_then_la1
|
|
lda #$19
|
|
cmp y
|
|
bne b9
|
|
jmp b7
|
|
//SEG165 getCharToProcess::@7
|
|
b7:
|
|
//SEG166 [96] if((word) getCharToProcess::return_dist#1==(const word) NOT_FOUND#0) goto getCharToProcess::@return -- vwuz1_eq_vwuc1_then_la1
|
|
lda return_dist_1
|
|
cmp #<NOT_FOUND
|
|
bne !+
|
|
lda return_dist_1+1
|
|
cmp #>NOT_FOUND
|
|
beq breturn
|
|
!:
|
|
jmp b8
|
|
//SEG167 getCharToProcess::@8
|
|
b8:
|
|
//SEG168 [97] (word~) getCharToProcess::$9 ← (word)(byte) getCharToProcess::return_y#1 -- vwuz1=_word_vbuz2
|
|
lda return_y_1
|
|
sta _9
|
|
lda #0
|
|
sta _9+1
|
|
//SEG169 [98] (word) getCharToProcess::$15 ← (word~) getCharToProcess::$9 << (byte) 2 -- vwuz1=vwuz2_rol_2
|
|
lda _9
|
|
asl
|
|
sta _15
|
|
lda _9+1
|
|
rol
|
|
sta _15+1
|
|
asl _15
|
|
rol _15+1
|
|
//SEG170 [99] (word) getCharToProcess::$16 ← (word) getCharToProcess::$15 + (word~) getCharToProcess::$9 -- vwuz1=vwuz2_plus_vwuz3
|
|
lda _15
|
|
clc
|
|
adc _9
|
|
sta _16
|
|
lda _15+1
|
|
adc _9+1
|
|
sta _16+1
|
|
//SEG171 [100] (word~) getCharToProcess::$10 ← (word) getCharToProcess::$16 << (byte) 3 -- vwuz1=vwuz2_rol_3
|
|
lda _16
|
|
asl
|
|
sta _10
|
|
lda _16+1
|
|
rol
|
|
sta _10+1
|
|
asl _10
|
|
rol _10+1
|
|
asl _10
|
|
rol _10+1
|
|
//SEG172 [101] (byte*~) getCharToProcess::$11 ← (const byte[$3e8]) SCREEN_COPY#0 + (word~) getCharToProcess::$10 -- pbuz1=pbuc1_plus_vwuz2
|
|
lda _10
|
|
clc
|
|
adc #<SCREEN_COPY
|
|
sta _11
|
|
lda _10+1
|
|
adc #>SCREEN_COPY
|
|
sta _11+1
|
|
//SEG173 [102] *((byte*~) getCharToProcess::$11 + (byte) getCharToProcess::return_x#1) ← (byte) ' ' -- pbuz1_derefidx_vbuz2=vbuc1
|
|
// clear the found char on the screen copy
|
|
lda #' '
|
|
ldy return_x_1
|
|
sta (_11),y
|
|
jmp breturn
|
|
//SEG174 getCharToProcess::@return
|
|
breturn:
|
|
//SEG175 [103] return
|
|
rts
|
|
//SEG176 getCharToProcess::@9
|
|
b9:
|
|
//SEG177 [104] (word~) getCharToProcess::closest_dist#10 ← (word) getCharToProcess::return_dist#1 -- vwuz1=vwuz2
|
|
lda return_dist_1
|
|
sta closest_dist
|
|
lda return_dist_1+1
|
|
sta closest_dist+1
|
|
//SEG178 [81] phi from getCharToProcess::@9 to getCharToProcess::@1 [phi:getCharToProcess::@9->getCharToProcess::@1]
|
|
b1_from_b9:
|
|
//SEG179 [81] phi (byte) getCharToProcess::closest_y#9 = (byte) getCharToProcess::return_y#1 [phi:getCharToProcess::@9->getCharToProcess::@1#0] -- register_copy
|
|
//SEG180 [81] phi (byte) getCharToProcess::closest_x#9 = (byte) getCharToProcess::return_x#1 [phi:getCharToProcess::@9->getCharToProcess::@1#1] -- register_copy
|
|
//SEG181 [81] phi (word) getCharToProcess::closest_dist#8 = (word~) getCharToProcess::closest_dist#10 [phi:getCharToProcess::@9->getCharToProcess::@1#2] -- register_copy
|
|
//SEG182 [81] phi (byte) getCharToProcess::y#7 = (byte) getCharToProcess::y#1 [phi:getCharToProcess::@9->getCharToProcess::@1#3] -- register_copy
|
|
//SEG183 [81] phi (byte*) getCharToProcess::screen_line#4 = (byte*) getCharToProcess::screen_line#1 [phi:getCharToProcess::@9->getCharToProcess::@1#4] -- register_copy
|
|
jmp b1
|
|
//SEG184 getCharToProcess::@10
|
|
b10:
|
|
//SEG185 [105] (word~) getCharToProcess::closest_dist#12 ← (word) getCharToProcess::return_dist#1 -- vwuz1=vwuz2
|
|
lda return_dist_1
|
|
sta closest_dist
|
|
lda return_dist_1+1
|
|
sta closest_dist+1
|
|
//SEG186 [82] phi from getCharToProcess::@10 to getCharToProcess::@2 [phi:getCharToProcess::@10->getCharToProcess::@2]
|
|
b2_from_b10:
|
|
//SEG187 [82] phi (byte) getCharToProcess::closest_y#7 = (byte) getCharToProcess::return_y#1 [phi:getCharToProcess::@10->getCharToProcess::@2#0] -- register_copy
|
|
//SEG188 [82] phi (byte) getCharToProcess::closest_x#7 = (byte) getCharToProcess::return_x#1 [phi:getCharToProcess::@10->getCharToProcess::@2#1] -- register_copy
|
|
//SEG189 [82] phi (word) getCharToProcess::closest_dist#2 = (word~) getCharToProcess::closest_dist#12 [phi:getCharToProcess::@10->getCharToProcess::@2#2] -- register_copy
|
|
//SEG190 [82] phi (byte) getCharToProcess::x#2 = (byte) getCharToProcess::x#1 [phi:getCharToProcess::@10->getCharToProcess::@2#3] -- register_copy
|
|
jmp b2
|
|
//SEG191 getCharToProcess::@12
|
|
b12:
|
|
//SEG192 [106] (word~) getCharToProcess::return_dist#6 ← (word) getCharToProcess::closest_dist#2 -- vwuz1=vwuz2
|
|
lda closest_dist
|
|
sta return_dist_6
|
|
lda closest_dist+1
|
|
sta return_dist_6+1
|
|
jmp b3_from_b12
|
|
//SEG193 getCharToProcess::@11
|
|
b11:
|
|
//SEG194 [107] (word~) getCharToProcess::return_dist#5 ← (word) getCharToProcess::closest_dist#2 -- vwuz1=vwuz2
|
|
lda closest_dist
|
|
sta return_dist_5
|
|
lda closest_dist+1
|
|
sta return_dist_5+1
|
|
jmp b3_from_b11
|
|
}
|
|
//SEG195 initSquareTables
|
|
// initialize SQUARES table
|
|
initSquareTables: {
|
|
.label _2 = $19
|
|
.label _4 = $19
|
|
.label _6 = $5b
|
|
.label _10 = $1b
|
|
.label _12 = $1b
|
|
.label _14 = $60
|
|
.label _16 = $5d
|
|
.label _17 = $62
|
|
.label x_dist = $19
|
|
.label x = $18
|
|
.label y_dist = $1b
|
|
.label y = $1a
|
|
//SEG196 [109] phi from initSquareTables to initSquareTables::@1 [phi:initSquareTables->initSquareTables::@1]
|
|
b1_from_initSquareTables:
|
|
//SEG197 [109] phi (byte) initSquareTables::x#2 = (byte) 0 [phi:initSquareTables->initSquareTables::@1#0] -- vbuz1=vbuc1
|
|
lda #0
|
|
sta x
|
|
jmp b1
|
|
//SEG198 [109] phi from initSquareTables::@9 to initSquareTables::@1 [phi:initSquareTables::@9->initSquareTables::@1]
|
|
b1_from_b9:
|
|
//SEG199 [109] phi (byte) initSquareTables::x#2 = (byte) initSquareTables::x#1 [phi:initSquareTables::@9->initSquareTables::@1#0] -- register_copy
|
|
jmp b1
|
|
//SEG200 initSquareTables::@1
|
|
b1:
|
|
//SEG201 [110] if((byte) initSquareTables::x#2<(byte) $14) goto initSquareTables::@2 -- vbuz1_lt_vbuc1_then_la1
|
|
lda x
|
|
cmp #$14
|
|
bcc b2
|
|
jmp b3
|
|
//SEG202 initSquareTables::@3
|
|
b3:
|
|
//SEG203 [111] (byte~) initSquareTables::$2 ← (byte) initSquareTables::x#2 - (byte) $14 -- vbuz1=vbuz2_minus_vbuc1
|
|
lax x
|
|
axs #$14
|
|
stx _2
|
|
//SEG204 [112] phi from initSquareTables::@2 initSquareTables::@3 to initSquareTables::@4 [phi:initSquareTables::@2/initSquareTables::@3->initSquareTables::@4]
|
|
b4_from_b2:
|
|
b4_from_b3:
|
|
//SEG205 [112] phi (byte) initSquareTables::x_dist#0 = (byte~) initSquareTables::$4 [phi:initSquareTables::@2/initSquareTables::@3->initSquareTables::@4#0] -- register_copy
|
|
jmp b4
|
|
//SEG206 initSquareTables::@4
|
|
b4:
|
|
//SEG207 [113] (byte) mul8u::a#1 ← (byte) initSquareTables::x_dist#0 -- vbuz1=vbuz2
|
|
lda x_dist
|
|
sta mul8u.a
|
|
//SEG208 [114] (byte) mul8u::b#0 ← (byte) initSquareTables::x_dist#0 -- vbuz1=vbuz2
|
|
lda x_dist
|
|
sta mul8u.b
|
|
//SEG209 [115] call mul8u
|
|
//SEG210 [138] phi from initSquareTables::@4 to mul8u [phi:initSquareTables::@4->mul8u]
|
|
mul8u_from_b4:
|
|
//SEG211 [138] phi (byte) mul8u::a#6 = (byte) mul8u::a#1 [phi:initSquareTables::@4->mul8u#0] -- register_copy
|
|
//SEG212 [138] phi (word) mul8u::mb#0 = (byte) mul8u::b#0 [phi:initSquareTables::@4->mul8u#1] -- vwuz1=vbuz2
|
|
lda mul8u.b
|
|
sta mul8u.mb
|
|
lda #0
|
|
sta mul8u.mb+1
|
|
jsr mul8u
|
|
//SEG213 [116] (word) mul8u::return#2 ← (word) mul8u::res#2 -- vwuz1=vwuz2
|
|
lda mul8u.res
|
|
sta mul8u.return
|
|
lda mul8u.res+1
|
|
sta mul8u.return+1
|
|
jmp b9
|
|
//SEG214 initSquareTables::@9
|
|
b9:
|
|
//SEG215 [117] (word~) initSquareTables::$6 ← (word) mul8u::return#2 -- vwuz1=vwuz2
|
|
lda mul8u.return
|
|
sta _6
|
|
lda mul8u.return+1
|
|
sta _6+1
|
|
//SEG216 [118] (byte~) initSquareTables::$16 ← (byte) initSquareTables::x#2 << (byte) 1 -- vbuz1=vbuz2_rol_1
|
|
lda x
|
|
asl
|
|
sta _16
|
|
//SEG217 [119] *((const word[$28]) SQUARES_X#0 + (byte~) initSquareTables::$16) ← (word~) initSquareTables::$6 -- pwuc1_derefidx_vbuz1=vwuz2
|
|
ldy _16
|
|
lda _6
|
|
sta SQUARES_X,y
|
|
lda _6+1
|
|
sta SQUARES_X+1,y
|
|
//SEG218 [120] (byte) initSquareTables::x#1 ← ++ (byte) initSquareTables::x#2 -- vbuz1=_inc_vbuz1
|
|
inc x
|
|
//SEG219 [121] if((byte) initSquareTables::x#1!=(byte) $28) goto initSquareTables::@1 -- vbuz1_neq_vbuc1_then_la1
|
|
lda #$28
|
|
cmp x
|
|
bne b1_from_b9
|
|
//SEG220 [122] phi from initSquareTables::@9 to initSquareTables::@5 [phi:initSquareTables::@9->initSquareTables::@5]
|
|
b5_from_b9:
|
|
//SEG221 [122] phi (byte) initSquareTables::y#2 = (byte) 0 [phi:initSquareTables::@9->initSquareTables::@5#0] -- vbuz1=vbuc1
|
|
lda #0
|
|
sta y
|
|
jmp b5
|
|
//SEG222 [122] phi from initSquareTables::@10 to initSquareTables::@5 [phi:initSquareTables::@10->initSquareTables::@5]
|
|
b5_from_b10:
|
|
//SEG223 [122] phi (byte) initSquareTables::y#2 = (byte) initSquareTables::y#1 [phi:initSquareTables::@10->initSquareTables::@5#0] -- register_copy
|
|
jmp b5
|
|
//SEG224 initSquareTables::@5
|
|
b5:
|
|
//SEG225 [123] if((byte) initSquareTables::y#2<(byte) $c) goto initSquareTables::@6 -- vbuz1_lt_vbuc1_then_la1
|
|
lda y
|
|
cmp #$c
|
|
bcc b6
|
|
jmp b7
|
|
//SEG226 initSquareTables::@7
|
|
b7:
|
|
//SEG227 [124] (byte~) initSquareTables::$10 ← (byte) initSquareTables::y#2 - (byte) $c -- vbuz1=vbuz2_minus_vbuc1
|
|
lax y
|
|
axs #$c
|
|
stx _10
|
|
//SEG228 [125] phi from initSquareTables::@6 initSquareTables::@7 to initSquareTables::@8 [phi:initSquareTables::@6/initSquareTables::@7->initSquareTables::@8]
|
|
b8_from_b6:
|
|
b8_from_b7:
|
|
//SEG229 [125] phi (byte) initSquareTables::y_dist#0 = (byte~) initSquareTables::$12 [phi:initSquareTables::@6/initSquareTables::@7->initSquareTables::@8#0] -- register_copy
|
|
jmp b8
|
|
//SEG230 initSquareTables::@8
|
|
b8:
|
|
//SEG231 [126] (byte) mul8u::a#2 ← (byte) initSquareTables::y_dist#0 -- vbuz1=vbuz2
|
|
lda y_dist
|
|
sta mul8u.a
|
|
//SEG232 [127] (byte) mul8u::b#1 ← (byte) initSquareTables::y_dist#0 -- vbuz1=vbuz2
|
|
lda y_dist
|
|
sta mul8u.b_1
|
|
//SEG233 [128] call mul8u
|
|
//SEG234 [138] phi from initSquareTables::@8 to mul8u [phi:initSquareTables::@8->mul8u]
|
|
mul8u_from_b8:
|
|
//SEG235 [138] phi (byte) mul8u::a#6 = (byte) mul8u::a#2 [phi:initSquareTables::@8->mul8u#0] -- register_copy
|
|
//SEG236 [138] phi (word) mul8u::mb#0 = (byte) mul8u::b#1 [phi:initSquareTables::@8->mul8u#1] -- vwuz1=vbuz2
|
|
lda mul8u.b_1
|
|
sta mul8u.mb
|
|
lda #0
|
|
sta mul8u.mb+1
|
|
jsr mul8u
|
|
//SEG237 [129] (word) mul8u::return#3 ← (word) mul8u::res#2 -- vwuz1=vwuz2
|
|
lda mul8u.res
|
|
sta mul8u.return_3
|
|
lda mul8u.res+1
|
|
sta mul8u.return_3+1
|
|
jmp b10
|
|
//SEG238 initSquareTables::@10
|
|
b10:
|
|
//SEG239 [130] (word~) initSquareTables::$14 ← (word) mul8u::return#3 -- vwuz1=vwuz2
|
|
lda mul8u.return_3
|
|
sta _14
|
|
lda mul8u.return_3+1
|
|
sta _14+1
|
|
//SEG240 [131] (byte~) initSquareTables::$17 ← (byte) initSquareTables::y#2 << (byte) 1 -- vbuz1=vbuz2_rol_1
|
|
lda y
|
|
asl
|
|
sta _17
|
|
//SEG241 [132] *((const word[$19]) SQUARES_Y#0 + (byte~) initSquareTables::$17) ← (word~) initSquareTables::$14 -- pwuc1_derefidx_vbuz1=vwuz2
|
|
ldy _17
|
|
lda _14
|
|
sta SQUARES_Y,y
|
|
lda _14+1
|
|
sta SQUARES_Y+1,y
|
|
//SEG242 [133] (byte) initSquareTables::y#1 ← ++ (byte) initSquareTables::y#2 -- vbuz1=_inc_vbuz1
|
|
inc y
|
|
//SEG243 [134] if((byte) initSquareTables::y#1!=(byte) $19) goto initSquareTables::@5 -- vbuz1_neq_vbuc1_then_la1
|
|
lda #$19
|
|
cmp y
|
|
bne b5_from_b10
|
|
jmp breturn
|
|
//SEG244 initSquareTables::@return
|
|
breturn:
|
|
//SEG245 [135] return
|
|
rts
|
|
//SEG246 initSquareTables::@6
|
|
b6:
|
|
//SEG247 [136] (byte~) initSquareTables::$12 ← (byte) $c - (byte) initSquareTables::y#2 -- vbuz1=vbuc1_minus_vbuz2
|
|
lda #$c
|
|
sec
|
|
sbc y
|
|
sta _12
|
|
jmp b8_from_b6
|
|
//SEG248 initSquareTables::@2
|
|
b2:
|
|
//SEG249 [137] (byte~) initSquareTables::$4 ← (byte) $14 - (byte) initSquareTables::x#2 -- vbuz1=vbuc1_minus_vbuz2
|
|
lda #$14
|
|
sec
|
|
sbc x
|
|
sta _4
|
|
jmp b4_from_b2
|
|
}
|
|
//SEG250 mul8u
|
|
// Perform binary multiplication of two unsigned 8-bit bytes into a 16-bit unsigned word
|
|
// mul8u(byte zeropage($1e) a, byte zeropage($1d) b)
|
|
mul8u: {
|
|
.label _1 = $63
|
|
.label mb = $21
|
|
.label a = $1e
|
|
.label res = $1f
|
|
.label b = $1d
|
|
.label return = $59
|
|
.label b_1 = $1c
|
|
.label return_3 = $5e
|
|
//SEG251 [139] phi from mul8u to mul8u::@1 [phi:mul8u->mul8u::@1]
|
|
b1_from_mul8u:
|
|
//SEG252 [139] phi (word) mul8u::mb#2 = (word) mul8u::mb#0 [phi:mul8u->mul8u::@1#0] -- register_copy
|
|
//SEG253 [139] phi (word) mul8u::res#2 = (byte) 0 [phi:mul8u->mul8u::@1#1] -- vwuz1=vbuc1
|
|
lda #0
|
|
sta res
|
|
lda #0
|
|
sta res+1
|
|
//SEG254 [139] phi (byte) mul8u::a#3 = (byte) mul8u::a#6 [phi:mul8u->mul8u::@1#2] -- register_copy
|
|
jmp b1
|
|
//SEG255 mul8u::@1
|
|
b1:
|
|
//SEG256 [140] if((byte) mul8u::a#3!=(byte) 0) goto mul8u::@2 -- vbuz1_neq_0_then_la1
|
|
lda a
|
|
cmp #0
|
|
bne b2
|
|
jmp breturn
|
|
//SEG257 mul8u::@return
|
|
breturn:
|
|
//SEG258 [141] return
|
|
rts
|
|
//SEG259 mul8u::@2
|
|
b2:
|
|
//SEG260 [142] (byte~) mul8u::$1 ← (byte) mul8u::a#3 & (byte) 1 -- vbuz1=vbuz2_band_vbuc1
|
|
lda #1
|
|
and a
|
|
sta _1
|
|
//SEG261 [143] if((byte~) mul8u::$1==(byte) 0) goto mul8u::@3 -- vbuz1_eq_0_then_la1
|
|
lda _1
|
|
cmp #0
|
|
beq b3_from_b2
|
|
jmp b4
|
|
//SEG262 mul8u::@4
|
|
b4:
|
|
//SEG263 [144] (word) mul8u::res#1 ← (word) mul8u::res#2 + (word) mul8u::mb#2 -- vwuz1=vwuz1_plus_vwuz2
|
|
lda res
|
|
clc
|
|
adc mb
|
|
sta res
|
|
lda res+1
|
|
adc mb+1
|
|
sta res+1
|
|
//SEG264 [145] phi from mul8u::@2 mul8u::@4 to mul8u::@3 [phi:mul8u::@2/mul8u::@4->mul8u::@3]
|
|
b3_from_b2:
|
|
b3_from_b4:
|
|
//SEG265 [145] phi (word) mul8u::res#6 = (word) mul8u::res#2 [phi:mul8u::@2/mul8u::@4->mul8u::@3#0] -- register_copy
|
|
jmp b3
|
|
//SEG266 mul8u::@3
|
|
b3:
|
|
//SEG267 [146] (byte) mul8u::a#0 ← (byte) mul8u::a#3 >> (byte) 1 -- vbuz1=vbuz1_ror_1
|
|
lsr a
|
|
//SEG268 [147] (word) mul8u::mb#1 ← (word) mul8u::mb#2 << (byte) 1 -- vwuz1=vwuz1_rol_1
|
|
asl mb
|
|
rol mb+1
|
|
//SEG269 [139] phi from mul8u::@3 to mul8u::@1 [phi:mul8u::@3->mul8u::@1]
|
|
b1_from_b3:
|
|
//SEG270 [139] phi (word) mul8u::mb#2 = (word) mul8u::mb#1 [phi:mul8u::@3->mul8u::@1#0] -- register_copy
|
|
//SEG271 [139] phi (word) mul8u::res#2 = (word) mul8u::res#6 [phi:mul8u::@3->mul8u::@1#1] -- register_copy
|
|
//SEG272 [139] phi (byte) mul8u::a#3 = (byte) mul8u::a#0 [phi:mul8u::@3->mul8u::@1#2] -- register_copy
|
|
jmp b1
|
|
}
|
|
//SEG273 setupRasterIrq
|
|
// Setup Raster IRQ
|
|
setupRasterIrq: {
|
|
.label irqRoutine = irqTop
|
|
//SEG274 asm { sei }
|
|
sei
|
|
//SEG275 [149] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 -- _deref_pbuc1=vbuc2
|
|
// Disable kernal & basic
|
|
lda #PROCPORT_DDR_MEMORY_MASK
|
|
sta PROCPORT_DDR
|
|
//SEG276 [150] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 -- _deref_pbuc1=vbuc2
|
|
lda #PROCPORT_RAM_IO
|
|
sta PROCPORT
|
|
//SEG277 [151] *((const byte*) CIA1_INTERRUPT#0) ← (const byte) CIA_INTERRUPT_CLEAR#0 -- _deref_pbuc1=vbuc2
|
|
// Disable CIA 1 Timer IRQ
|
|
lda #CIA_INTERRUPT_CLEAR
|
|
sta CIA1_INTERRUPT
|
|
jmp b1
|
|
//SEG278 setupRasterIrq::@1
|
|
b1:
|
|
//SEG279 [152] *((const byte*) VIC_CONTROL#0) ← *((const byte*) VIC_CONTROL#0) & (byte) $7f -- _deref_pbuc1=_deref_pbuc1_band_vbuc2
|
|
lda #$7f
|
|
and VIC_CONTROL
|
|
sta VIC_CONTROL
|
|
jmp b2
|
|
//SEG280 setupRasterIrq::@2
|
|
b2:
|
|
//SEG281 [153] *((const byte*) RASTER#0) ← <(const byte) RASTER_IRQ_TOP#0 -- _deref_pbuc1=vbuc2
|
|
lda #RASTER_IRQ_TOP
|
|
sta RASTER
|
|
//SEG282 [154] *((const byte*) IRQ_ENABLE#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2
|
|
// Enable Raster Interrupt
|
|
lda #IRQ_RASTER
|
|
sta IRQ_ENABLE
|
|
//SEG283 [155] *((const void()**) HARDWARE_IRQ#0) ← (const void()*) setupRasterIrq::irqRoutine#0 -- _deref_pptc1=pprc2
|
|
// Set the IRQ routine
|
|
lda #<irqRoutine
|
|
sta HARDWARE_IRQ
|
|
lda #>irqRoutine
|
|
sta HARDWARE_IRQ+1
|
|
//SEG284 asm { cli }
|
|
cli
|
|
jmp breturn
|
|
//SEG285 setupRasterIrq::@return
|
|
breturn:
|
|
//SEG286 [157] return
|
|
rts
|
|
}
|
|
//SEG287 irqBottom
|
|
// Raster Interrupt at the middle of the screen
|
|
irqBottom: {
|
|
.label i = $23
|
|
//SEG288 entry interrupt(HARDWARE_ALL)
|
|
sta rega+1
|
|
stx regx+1
|
|
sty regy+1
|
|
//SEG289 [159] phi from irqBottom to irqBottom::@1 [phi:irqBottom->irqBottom::@1]
|
|
b1_from_irqBottom:
|
|
//SEG290 [159] phi (byte) irqBottom::i#2 = (byte) 0 [phi:irqBottom->irqBottom::@1#0] -- vbuz1=vbuc1
|
|
lda #0
|
|
sta i
|
|
jmp b1
|
|
//SEG291 [159] phi from irqBottom::@1 to irqBottom::@1 [phi:irqBottom::@1->irqBottom::@1]
|
|
b1_from_b1:
|
|
//SEG292 [159] phi (byte) irqBottom::i#2 = (byte) irqBottom::i#1 [phi:irqBottom::@1->irqBottom::@1#0] -- register_copy
|
|
jmp b1
|
|
//SEG293 irqBottom::@1
|
|
b1:
|
|
//SEG294 [160] (byte) irqBottom::i#1 ← ++ (byte) irqBottom::i#2 -- vbuz1=_inc_vbuz1
|
|
inc i
|
|
//SEG295 [161] if((byte) irqBottom::i#1!=(byte) 5) goto irqBottom::@1 -- vbuz1_neq_vbuc1_then_la1
|
|
lda #5
|
|
cmp i
|
|
bne b1_from_b1
|
|
jmp b2
|
|
//SEG296 irqBottom::@2
|
|
b2:
|
|
//SEG297 [162] *((const byte*) BORDERCOL#0) ← (const byte) WHITE#0 -- _deref_pbuc1=vbuc2
|
|
lda #WHITE
|
|
sta BORDERCOL
|
|
//SEG298 [163] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 -- _deref_pbuc1=vbuc2
|
|
lda #WHITE
|
|
sta BGCOL
|
|
//SEG299 [164] call processChars
|
|
//SEG300 [171] phi from irqBottom::@2 to processChars [phi:irqBottom::@2->processChars]
|
|
processChars_from_b2:
|
|
jsr processChars
|
|
jmp b3
|
|
//SEG301 irqBottom::@3
|
|
b3:
|
|
//SEG302 [165] *((const byte*) BORDERCOL#0) ← (const byte) LIGHT_BLUE#0 -- _deref_pbuc1=vbuc2
|
|
lda #LIGHT_BLUE
|
|
sta BORDERCOL
|
|
//SEG303 [166] *((const byte*) BGCOL#0) ← (const byte) BLUE#0 -- _deref_pbuc1=vbuc2
|
|
lda #BLUE
|
|
sta BGCOL
|
|
//SEG304 [167] *((const byte*) RASTER#0) ← (const byte) RASTER_IRQ_TOP#0 -- _deref_pbuc1=vbuc2
|
|
// Trigger IRQ at the top of the screen
|
|
lda #RASTER_IRQ_TOP
|
|
sta RASTER
|
|
//SEG305 [168] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_ALL)(void()) irqTop() -- _deref_pptc1=pprc2
|
|
lda #<irqTop
|
|
sta HARDWARE_IRQ
|
|
lda #>irqTop
|
|
sta HARDWARE_IRQ+1
|
|
//SEG306 [169] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2
|
|
// Acknowledge the IRQ
|
|
lda #IRQ_RASTER
|
|
sta IRQ_STATUS
|
|
jmp breturn
|
|
//SEG307 irqBottom::@return
|
|
breturn:
|
|
//SEG308 [170] return - exit interrupt(HARDWARE_ALL)
|
|
rega:
|
|
lda #00
|
|
regx:
|
|
ldx #00
|
|
regy:
|
|
ldy #00
|
|
rti
|
|
}
|
|
//SEG309 processChars
|
|
// Process any chars in the PROCESSING array
|
|
processChars: {
|
|
.label _9 = $68
|
|
.label _10 = $69
|
|
.label _12 = $6b
|
|
.label _13 = $6a
|
|
.label _16 = $6c
|
|
.label _18 = $64
|
|
.label processing = $65
|
|
.label bitmask = $67
|
|
.label i = $24
|
|
//SEG310 [172] phi from processChars to processChars::@1 [phi:processChars->processChars::@1]
|
|
b1_from_processChars:
|
|
//SEG311 [172] phi (byte) processChars::i#10 = (byte) 0 [phi:processChars->processChars::@1#0] -- vbuz1=vbuc1
|
|
lda #0
|
|
sta i
|
|
jmp b1
|
|
//SEG312 [172] phi from processChars::@2 to processChars::@1 [phi:processChars::@2->processChars::@1]
|
|
b1_from_b2:
|
|
//SEG313 [172] phi (byte) processChars::i#10 = (byte) processChars::i#1 [phi:processChars::@2->processChars::@1#0] -- register_copy
|
|
jmp b1
|
|
//SEG314 processChars::@1
|
|
b1:
|
|
//SEG315 [173] (byte~) processChars::$18 ← (byte) processChars::i#10 << (byte) 3 -- vbuz1=vbuz2_rol_3
|
|
lda i
|
|
asl
|
|
asl
|
|
asl
|
|
sta _18
|
|
//SEG316 [174] (struct ProcessingSprite*) processChars::processing#0 ← (const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (byte~) processChars::$18 -- pssz1=pssc1_plus_vbuz2
|
|
lda _18
|
|
clc
|
|
adc #<PROCESSING
|
|
sta processing
|
|
lda #>PROCESSING
|
|
adc #0
|
|
sta processing+1
|
|
//SEG317 [175] (byte) processChars::bitmask#0 ← (byte) 1 << *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID) -- vbuz1=vbuc1_rol_pbuz2_derefidx_vbuc2
|
|
ldy #OFFSET_STRUCT_PROCESSINGSPRITE_ID
|
|
lda (processing),y
|
|
tax
|
|
lda #1
|
|
cpx #0
|
|
beq !e+
|
|
!:
|
|
asl
|
|
dex
|
|
bne !-
|
|
!e:
|
|
sta bitmask
|
|
//SEG318 [176] if(*((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS)==(const byte) STATUS_FREE#0) goto processChars::@2 -- pbuz1_derefidx_vbuc1_eq_vbuc2_then_la1
|
|
ldy #OFFSET_STRUCT_PROCESSINGSPRITE_STATUS
|
|
lda (processing),y
|
|
cmp #STATUS_FREE
|
|
beq b2
|
|
jmp b8
|
|
//SEG319 processChars::@8
|
|
b8:
|
|
//SEG320 [177] if(*((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS)!=(const byte) STATUS_NEW#0) goto processChars::@3 -- pbuz1_derefidx_vbuc1_neq_vbuc2_then_la1
|
|
ldy #OFFSET_STRUCT_PROCESSINGSPRITE_STATUS
|
|
lda (processing),y
|
|
cmp #STATUS_NEW
|
|
bne b3
|
|
jmp b9
|
|
//SEG321 processChars::@9
|
|
b9:
|
|
//SEG322 [178] *(*((byte**)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR)) ← (byte) ' ' -- _deref_pptz1_derefidx_vbuc1=vbuc2
|
|
// Clear the char on the screen
|
|
ldx #' '
|
|
ldy #OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR
|
|
lda (processing),y
|
|
sta !++1
|
|
iny
|
|
lda (processing),y
|
|
sta !++2
|
|
txa
|
|
!:
|
|
sta $ffff
|
|
//SEG323 [179] *((const byte*) SPRITES_ENABLE#0) ← *((const byte*) SPRITES_ENABLE#0) | (byte) processChars::bitmask#0 -- _deref_pbuc1=_deref_pbuc1_bor_vbuz1
|
|
// Enable the sprite
|
|
lda SPRITES_ENABLE
|
|
ora bitmask
|
|
sta SPRITES_ENABLE
|
|
//SEG324 [180] *((const byte*) SCREEN#0+(const word) SPRITE_PTRS#0 + *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID)) ← *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR) -- pbuc1_derefidx_pbuz1_derefidx_vbuc2=pbuz1_derefidx_vbuc3
|
|
// Set sprite pointer
|
|
ldy #OFFSET_STRUCT_PROCESSINGSPRITE_PTR
|
|
lda (processing),y
|
|
ldy #OFFSET_STRUCT_PROCESSINGSPRITE_ID
|
|
lda (processing),y
|
|
tay
|
|
lda SCREEN+SPRITE_PTRS,y
|
|
//SEG325 [181] *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) ← (const byte) STATUS_PROCESSING#0 -- pbuz1_derefidx_vbuc1=vbuc2
|
|
// Set status
|
|
lda #STATUS_PROCESSING
|
|
ldy #OFFSET_STRUCT_PROCESSINGSPRITE_STATUS
|
|
sta (processing),y
|
|
jmp b3
|
|
//SEG326 processChars::@3
|
|
b3:
|
|
//SEG327 [182] (byte~) processChars::$9 ← > *((word*)(struct ProcessingSprite*) processChars::processing#0) -- vbuz1=_hi__deref_pwuz2
|
|
ldy #1
|
|
lda (processing),y
|
|
sta _9
|
|
//SEG328 [183] if((byte) 0!=(byte~) processChars::$9) goto processChars::@4 -- vbuc1_neq_vbuz1_then_la1
|
|
// Set sprite position
|
|
lda #0
|
|
cmp _9
|
|
bne b4
|
|
jmp b6
|
|
//SEG329 processChars::@6
|
|
b6:
|
|
//SEG330 [184] (byte~) processChars::$10 ← (byte) $ff ^ (byte) processChars::bitmask#0 -- vbuz1=vbuc1_bxor_vbuz2
|
|
lda #$ff
|
|
eor bitmask
|
|
sta _10
|
|
//SEG331 [185] *((const byte*) SPRITES_XMSB#0) ← *((const byte*) SPRITES_XMSB#0) & (byte~) processChars::$10 -- _deref_pbuc1=_deref_pbuc1_band_vbuz1
|
|
lda SPRITES_XMSB
|
|
and _10
|
|
sta SPRITES_XMSB
|
|
jmp b5
|
|
//SEG332 processChars::@5
|
|
b5:
|
|
//SEG333 [186] (byte~) processChars::$13 ← (byte) processChars::i#10 << (byte) 1 -- vbuz1=vbuz2_rol_1
|
|
lda i
|
|
asl
|
|
sta _13
|
|
//SEG334 [187] (byte~) processChars::$12 ← (byte)*((word*)(struct ProcessingSprite*) processChars::processing#0) -- vbuz1=_byte__deref_pwuz2
|
|
ldy #0
|
|
lda (processing),y
|
|
sta _12
|
|
//SEG335 [188] *((const byte*) SPRITES_XPOS#0 + (byte~) processChars::$13) ← (byte~) processChars::$12 -- pbuc1_derefidx_vbuz1=vbuz2
|
|
lda _12
|
|
ldy _13
|
|
sta SPRITES_XPOS,y
|
|
//SEG336 [189] *((const byte*) SPRITES_YPOS#0 + (byte~) processChars::$13) ← *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y) -- pbuc1_derefidx_vbuz1=pbuz2_derefidx_vbuc2
|
|
ldx _13
|
|
ldy #OFFSET_STRUCT_PROCESSINGSPRITE_Y
|
|
lda (processing),y
|
|
sta SPRITES_YPOS,x
|
|
//SEG337 [190] *((word*)(struct ProcessingSprite*) processChars::processing#0) ← -- *((word*)(struct ProcessingSprite*) processChars::processing#0) -- _deref_pwuz1=_dec__deref_pwuz1
|
|
ldy #0
|
|
lda (processing),y
|
|
sec
|
|
sbc #1
|
|
sta (processing),y
|
|
//SEG338 [191] if(*((word*)(struct ProcessingSprite*) processChars::processing#0)!=(byte) 0) goto processChars::@2 -- _deref_pwuz1_neq_0_then_la1
|
|
ldy #0
|
|
lda (processing),y
|
|
bne b2
|
|
iny
|
|
lda (processing),y
|
|
bne b2
|
|
jmp b7
|
|
//SEG339 processChars::@7
|
|
b7:
|
|
//SEG340 [192] *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) ← (const byte) STATUS_FREE#0 -- pbuz1_derefidx_vbuc1=vbuc2
|
|
// Set status
|
|
lda #STATUS_FREE
|
|
ldy #OFFSET_STRUCT_PROCESSINGSPRITE_STATUS
|
|
sta (processing),y
|
|
//SEG341 [193] (byte~) processChars::$16 ← (byte) $ff ^ (byte) processChars::bitmask#0 -- vbuz1=vbuc1_bxor_vbuz2
|
|
lda #$ff
|
|
eor bitmask
|
|
sta _16
|
|
//SEG342 [194] *((const byte*) SPRITES_ENABLE#0) ← *((const byte*) SPRITES_ENABLE#0) & (byte~) processChars::$16 -- _deref_pbuc1=_deref_pbuc1_band_vbuz1
|
|
// Disable the sprite
|
|
lda SPRITES_ENABLE
|
|
and _16
|
|
sta SPRITES_ENABLE
|
|
jmp b2
|
|
//SEG343 processChars::@2
|
|
b2:
|
|
//SEG344 [195] (byte) processChars::i#1 ← ++ (byte) processChars::i#10 -- vbuz1=_inc_vbuz1
|
|
inc i
|
|
//SEG345 [196] if((byte) processChars::i#1!=(byte) 1) goto processChars::@1 -- vbuz1_neq_vbuc1_then_la1
|
|
lda #1
|
|
cmp i
|
|
bne b1_from_b2
|
|
jmp breturn
|
|
//SEG346 processChars::@return
|
|
breturn:
|
|
//SEG347 [197] return
|
|
rts
|
|
//SEG348 processChars::@4
|
|
b4:
|
|
//SEG349 [198] *((const byte*) SPRITES_XMSB#0) ← *((const byte*) SPRITES_XMSB#0) | (byte) processChars::bitmask#0 -- _deref_pbuc1=_deref_pbuc1_bor_vbuz1
|
|
lda SPRITES_XMSB
|
|
ora bitmask
|
|
sta SPRITES_XMSB
|
|
jmp b5
|
|
}
|
|
//SEG350 irqTop
|
|
// Raster Interrupt at the top of the screen
|
|
irqTop: {
|
|
.label i = $25
|
|
.label i1 = $26
|
|
//SEG351 entry interrupt(HARDWARE_ALL)
|
|
sta rega+1
|
|
stx regx+1
|
|
sty regy+1
|
|
//SEG352 [200] phi from irqTop to irqTop::@1 [phi:irqTop->irqTop::@1]
|
|
b1_from_irqTop:
|
|
//SEG353 [200] phi (byte) irqTop::i#2 = (byte) 0 [phi:irqTop->irqTop::@1#0] -- vbuz1=vbuc1
|
|
lda #0
|
|
sta i
|
|
jmp b1
|
|
//SEG354 [200] phi from irqTop::@1 to irqTop::@1 [phi:irqTop::@1->irqTop::@1]
|
|
b1_from_b1:
|
|
//SEG355 [200] phi (byte) irqTop::i#2 = (byte) irqTop::i#1 [phi:irqTop::@1->irqTop::@1#0] -- register_copy
|
|
jmp b1
|
|
//SEG356 irqTop::@1
|
|
b1:
|
|
//SEG357 [201] (byte) irqTop::i#1 ← ++ (byte) irqTop::i#2 -- vbuz1=_inc_vbuz1
|
|
inc i
|
|
//SEG358 [202] if((byte) irqTop::i#1!=(byte) 5) goto irqTop::@1 -- vbuz1_neq_vbuc1_then_la1
|
|
lda #5
|
|
cmp i
|
|
bne b1_from_b1
|
|
jmp b2
|
|
//SEG359 irqTop::@2
|
|
b2:
|
|
//SEG360 [203] *((const byte*) BORDERCOL#0) ← (const byte) WHITE#0 -- _deref_pbuc1=vbuc2
|
|
lda #WHITE
|
|
sta BORDERCOL
|
|
//SEG361 [204] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 -- _deref_pbuc1=vbuc2
|
|
lda #WHITE
|
|
sta BGCOL
|
|
//SEG362 [205] phi from irqTop::@2 to irqTop::@3 [phi:irqTop::@2->irqTop::@3]
|
|
b3_from_b2:
|
|
//SEG363 [205] phi (byte) irqTop::i1#2 = (byte) 0 [phi:irqTop::@2->irqTop::@3#0] -- vbuz1=vbuc1
|
|
lda #0
|
|
sta i1
|
|
jmp b3
|
|
//SEG364 [205] phi from irqTop::@3 to irqTop::@3 [phi:irqTop::@3->irqTop::@3]
|
|
b3_from_b3:
|
|
//SEG365 [205] phi (byte) irqTop::i1#2 = (byte) irqTop::i1#1 [phi:irqTop::@3->irqTop::@3#0] -- register_copy
|
|
jmp b3
|
|
//SEG366 irqTop::@3
|
|
b3:
|
|
//SEG367 [206] (byte) irqTop::i1#1 ← ++ (byte) irqTop::i1#2 -- vbuz1=_inc_vbuz1
|
|
inc i1
|
|
//SEG368 [207] if((byte) irqTop::i1#1!=(byte) 8) goto irqTop::@3 -- vbuz1_neq_vbuc1_then_la1
|
|
lda #8
|
|
cmp i1
|
|
bne b3_from_b3
|
|
jmp b4
|
|
//SEG369 irqTop::@4
|
|
b4:
|
|
//SEG370 [208] *((const byte*) BORDERCOL#0) ← (const byte) LIGHT_BLUE#0 -- _deref_pbuc1=vbuc2
|
|
lda #LIGHT_BLUE
|
|
sta BORDERCOL
|
|
//SEG371 [209] *((const byte*) BGCOL#0) ← (const byte) BLUE#0 -- _deref_pbuc1=vbuc2
|
|
lda #BLUE
|
|
sta BGCOL
|
|
//SEG372 [210] *((const byte*) RASTER#0) ← (const byte) RASTER_IRQ_MIDDLE#0 -- _deref_pbuc1=vbuc2
|
|
// Trigger IRQ at the middle of the screen
|
|
lda #RASTER_IRQ_MIDDLE
|
|
sta RASTER
|
|
//SEG373 [211] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_ALL)(void()) irqBottom() -- _deref_pptc1=pprc2
|
|
lda #<irqBottom
|
|
sta HARDWARE_IRQ
|
|
lda #>irqBottom
|
|
sta HARDWARE_IRQ+1
|
|
//SEG374 [212] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2
|
|
// Acknowledge the IRQ
|
|
lda #IRQ_RASTER
|
|
sta IRQ_STATUS
|
|
jmp breturn
|
|
//SEG375 irqTop::@return
|
|
breturn:
|
|
//SEG376 [213] return - exit interrupt(HARDWARE_ALL)
|
|
rega:
|
|
lda #00
|
|
regx:
|
|
ldx #00
|
|
regy:
|
|
ldy #00
|
|
rti
|
|
}
|
|
// Copy of the screen used for finding chars to process
|
|
SCREEN_COPY: .fill $3e8, 0
|
|
// SQUARES_X[i] = (i-20)*(i-20)
|
|
SQUARES_X: .fill 2*$28, 0
|
|
// SQUARES_Y[i] = (i-12)*(i-12)
|
|
SQUARES_Y: .fill 2*$19, 0
|
|
// Sprites currently being processed in the interrupt
|
|
PROCESSING: .fill 8*NUM_PROCESSING, 0
|
|
|
|
REGISTER UPLIFT POTENTIAL REGISTERS
|
|
Statement [6] (byte~) main::$17 ← (byte) main::i#2 << (byte) 3 [ main::i#2 main::$17 ] ( main:2 [ main::i#2 main::$17 ] ) always clobbers reg byte a
|
|
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:2 [ main::i#2 main::i#1 ]
|
|
Statement [7] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (byte~) main::$17) ← (byte) 0 [ main::i#2 main::$17 ] ( main:2 [ main::i#2 main::$17 ] ) always clobbers reg byte a
|
|
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:39 [ main::$17 ]
|
|
Statement [8] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y + (byte~) main::$17) ← (byte) 0 [ main::i#2 main::$17 ] ( main:2 [ main::i#2 main::$17 ] ) always clobbers reg byte a
|
|
Statement [9] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID + (byte~) main::$17) ← (byte) 0 [ main::i#2 main::$17 ] ( main:2 [ main::i#2 main::$17 ] ) always clobbers reg byte a
|
|
Statement [10] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR + (byte~) main::$17) ← (byte) 0 [ main::i#2 main::$17 ] ( main:2 [ main::i#2 main::$17 ] ) always clobbers reg byte a
|
|
Statement [11] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS + (byte~) main::$17) ← (const byte) STATUS_FREE#0 [ main::i#2 main::$17 ] ( main:2 [ main::i#2 main::$17 ] ) always clobbers reg byte a
|
|
Statement [12] *((byte**)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR + (byte~) main::$17) ← (byte*) 0 [ main::i#2 ] ( main:2 [ main::i#2 ] ) always clobbers reg byte a
|
|
Statement [16] *((byte*) main::sp#2) ← (byte) 0 [ main::sp#2 ] ( main:2 [ main::sp#2 ] ) always clobbers reg byte a reg byte y
|
|
Statement [18] if((byte*) main::sp#1<(const byte*) SPRITE_DATA#0+(const byte) SIZEOF_POINTER) goto main::@2 [ main::sp#1 ] ( main:2 [ main::sp#1 ] ) always clobbers reg byte a
|
|
Statement [22] *((byte*) main::dst#2) ← *((byte*) main::src#2) [ main::src#2 main::dst#2 ] ( main:2 [ main::src#2 main::dst#2 ] ) always clobbers reg byte a reg byte y
|
|
Statement [25] if((byte*) main::src#1!=(const byte*) SCREEN#0+(word) $3e8) goto main::@4 [ main::src#1 main::dst#1 ] ( main:2 [ main::src#1 main::dst#1 ] ) always clobbers reg byte a
|
|
Statement [32] (word) getCharToProcess::return_dist#0 ← (word) getCharToProcess::return_dist#1 [ getCharToProcess::return_x#0 getCharToProcess::return_y#0 getCharToProcess::return_dist#0 ] ( main:2 [ getCharToProcess::return_x#0 getCharToProcess::return_y#0 getCharToProcess::return_dist#0 ] ) always clobbers reg byte a
|
|
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:40 [ getCharToProcess::return_x#0 ]
|
|
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:41 [ getCharToProcess::return_y#0 ]
|
|
Statement [35] (word) main::center_dist#0 ← (word) getCharToProcess::return_dist#0 [ main::center_x#0 main::center_y#0 main::center_dist#0 ] ( main:2 [ main::center_x#0 main::center_y#0 main::center_dist#0 ] ) always clobbers reg byte a
|
|
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:44 [ main::center_x#0 ]
|
|
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:45 [ main::center_y#0 ]
|
|
Statement [36] if((word) main::center_dist#0!=(const word) NOT_FOUND#0) goto main::@7 [ main::center_x#0 main::center_y#0 ] ( main:2 [ main::center_x#0 main::center_y#0 ] ) always clobbers reg byte a
|
|
Statement [44] (byte~) startProcessing::$21 ← (byte) startProcessing::i#2 << (byte) 3 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#6 startProcessing::i#2 startProcessing::$21 ] ( main:2::startProcessing:40 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#6 startProcessing::i#2 startProcessing::$21 ] ) always clobbers reg byte a
|
|
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:48 [ startProcessing::center_x#0 ]
|
|
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:49 [ startProcessing::center_y#0 ]
|
|
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:9 [ startProcessing::freeIdx#6 startProcessing::freeIdx#7 ]
|
|
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:10 [ startProcessing::freeIdx#2 startProcessing::freeIdx#8 startProcessing::i#2 startProcessing::i#1 ]
|
|
Statement [45] if(*((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS + (byte~) startProcessing::$21)!=(const byte) STATUS_FREE#0) goto startProcessing::@3 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#6 startProcessing::i#2 ] ( main:2::startProcessing:40 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#6 startProcessing::i#2 ] ) always clobbers reg byte a
|
|
Statement [48] (word~) startProcessing::$0 ← (word)(byte) startProcessing::freeIdx#2 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::$0 ] ( main:2::startProcessing:40 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::$0 ] ) always clobbers reg byte a
|
|
Statement [49] (word~) startProcessing::$1 ← (word~) startProcessing::$0 << (byte) 6 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::$1 ] ( main:2::startProcessing:40 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::$1 ] ) always clobbers reg byte a
|
|
Statement [50] (byte*) startProcessing::spriteData#0 ← (const byte*) SPRITE_DATA#0 + (word~) startProcessing::$1 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::spriteData#0 ] ( main:2::startProcessing:40 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::spriteData#0 ] ) always clobbers reg byte a
|
|
Statement [52] *((byte*) startProcessing::spriteData#2) ← (byte) $ff [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::spriteData#2 startProcessing::i1#2 ] ( main:2::startProcessing:40 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::spriteData#2 startProcessing::i1#2 ] ) always clobbers reg byte a reg byte y
|
|
Removing always clobbered register reg byte y as potential for zp ZP_BYTE:48 [ startProcessing::center_x#0 ]
|
|
Removing always clobbered register reg byte y as potential for zp ZP_BYTE:49 [ startProcessing::center_y#0 ]
|
|
Removing always clobbered register reg byte y as potential for zp ZP_BYTE:10 [ startProcessing::freeIdx#2 startProcessing::freeIdx#8 startProcessing::i#2 startProcessing::i#1 ]
|
|
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:13 [ startProcessing::i1#2 startProcessing::i1#1 ]
|
|
Removing always clobbered register reg byte y as potential for zp ZP_BYTE:13 [ startProcessing::i1#2 startProcessing::i1#1 ]
|
|
Statement [53] (byte*) startProcessing::spriteData#1 ← (byte*) startProcessing::spriteData#2 + (byte) 3 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::i1#2 startProcessing::spriteData#1 ] ( main:2::startProcessing:40 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::i1#2 startProcessing::spriteData#1 ] ) always clobbers reg byte a
|
|
Statement [56] (word~) startProcessing::$3 ← (word)(byte) startProcessing::center_x#0 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::$3 ] ( main:2::startProcessing:40 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::$3 ] ) always clobbers reg byte a
|
|
Statement [57] (word~) startProcessing::$4 ← (word~) startProcessing::$3 << (byte) 3 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::$4 ] ( main:2::startProcessing:40 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::$4 ] ) always clobbers reg byte a
|
|
Statement [58] (word) startProcessing::spriteX#0 ← (byte) $18 + (word~) startProcessing::$4 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::spriteX#0 ] ( main:2::startProcessing:40 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::spriteX#0 ] ) always clobbers reg byte a
|
|
Statement [59] (byte~) startProcessing::$6 ← (byte) startProcessing::center_y#0 << (byte) 3 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::spriteX#0 startProcessing::$6 ] ( main:2::startProcessing:40 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::spriteX#0 startProcessing::$6 ] ) always clobbers reg byte a
|
|
Statement [61] (byte) startProcessing::spritePtr#0 ← (byte)(const byte*) SPRITE_DATA#0/(byte) $40 + (byte) startProcessing::freeIdx#2 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 ] ( main:2::startProcessing:40 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 ] ) always clobbers reg byte a
|
|
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:62 [ startProcessing::spriteY#0 ]
|
|
Statement [62] (word~) startProcessing::$11 ← (word)(byte) startProcessing::center_y#0 [ startProcessing::center_x#0 startProcessing::freeIdx#2 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$11 ] ( main:2::startProcessing:40 [ startProcessing::center_x#0 startProcessing::freeIdx#2 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$11 ] ) always clobbers reg byte a
|
|
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:63 [ startProcessing::spritePtr#0 ]
|
|
Statement [63] (word) startProcessing::$30 ← (word~) startProcessing::$11 << (byte) 2 [ startProcessing::center_x#0 startProcessing::freeIdx#2 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$11 startProcessing::$30 ] ( main:2::startProcessing:40 [ startProcessing::center_x#0 startProcessing::freeIdx#2 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$11 startProcessing::$30 ] ) always clobbers reg byte a
|
|
Statement [64] (word) startProcessing::$31 ← (word) startProcessing::$30 + (word~) startProcessing::$11 [ startProcessing::center_x#0 startProcessing::freeIdx#2 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$31 ] ( main:2::startProcessing:40 [ startProcessing::center_x#0 startProcessing::freeIdx#2 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$31 ] ) always clobbers reg byte a
|
|
Statement [65] (word~) startProcessing::$12 ← (word) startProcessing::$31 << (byte) 3 [ startProcessing::center_x#0 startProcessing::freeIdx#2 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$12 ] ( main:2::startProcessing:40 [ startProcessing::center_x#0 startProcessing::freeIdx#2 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$12 ] ) always clobbers reg byte a
|
|
Statement [66] (byte*~) startProcessing::$13 ← (const byte*) SCREEN#0 + (word~) startProcessing::$12 [ startProcessing::center_x#0 startProcessing::freeIdx#2 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$13 ] ( main:2::startProcessing:40 [ startProcessing::center_x#0 startProcessing::freeIdx#2 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$13 ] ) always clobbers reg byte a
|
|
Statement [67] (byte*) startProcessing::screenPtr#0 ← (byte*~) startProcessing::$13 + (byte) startProcessing::center_x#0 [ startProcessing::freeIdx#2 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::screenPtr#0 ] ( main:2::startProcessing:40 [ startProcessing::freeIdx#2 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::screenPtr#0 ] ) always clobbers reg byte a
|
|
Statement [68] (byte~) startProcessing::$22 ← (byte) startProcessing::freeIdx#2 << (byte) 3 [ startProcessing::freeIdx#2 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::screenPtr#0 startProcessing::$22 ] ( main:2::startProcessing:40 [ startProcessing::freeIdx#2 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::screenPtr#0 startProcessing::$22 ] ) always clobbers reg byte a
|
|
Statement [69] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (byte~) startProcessing::$22) ← (word) startProcessing::spriteX#0 [ startProcessing::freeIdx#2 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::screenPtr#0 startProcessing::$22 ] ( main:2::startProcessing:40 [ startProcessing::freeIdx#2 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::screenPtr#0 startProcessing::$22 ] ) always clobbers reg byte a
|
|
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:76 [ startProcessing::$22 ]
|
|
Statement [70] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y + (byte~) startProcessing::$22) ← (byte) startProcessing::spriteY#0 [ startProcessing::freeIdx#2 startProcessing::spritePtr#0 startProcessing::screenPtr#0 startProcessing::$22 ] ( main:2::startProcessing:40 [ startProcessing::freeIdx#2 startProcessing::spritePtr#0 startProcessing::screenPtr#0 startProcessing::$22 ] ) always clobbers reg byte a
|
|
Statement [71] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID + (byte~) startProcessing::$22) ← (byte) startProcessing::freeIdx#2 [ startProcessing::spritePtr#0 startProcessing::screenPtr#0 startProcessing::$22 ] ( main:2::startProcessing:40 [ startProcessing::spritePtr#0 startProcessing::screenPtr#0 startProcessing::$22 ] ) always clobbers reg byte a
|
|
Statement [72] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR + (byte~) startProcessing::$22) ← (byte) startProcessing::spritePtr#0 [ startProcessing::screenPtr#0 startProcessing::$22 ] ( main:2::startProcessing:40 [ startProcessing::screenPtr#0 startProcessing::$22 ] ) always clobbers reg byte a
|
|
Statement [73] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS + (byte~) startProcessing::$22) ← (const byte) STATUS_NEW#0 [ startProcessing::screenPtr#0 startProcessing::$22 ] ( main:2::startProcessing:40 [ startProcessing::screenPtr#0 startProcessing::$22 ] ) always clobbers reg byte a
|
|
Statement [74] *((byte**)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR + (byte~) startProcessing::$22) ← (byte*) startProcessing::screenPtr#0 [ ] ( main:2::startProcessing:40 [ ] ) always clobbers reg byte a
|
|
Statement [83] if(*((byte*) getCharToProcess::screen_line#4 + (byte) getCharToProcess::x#2)==(byte) ' ') goto getCharToProcess::@11 [ getCharToProcess::screen_line#4 getCharToProcess::y#7 getCharToProcess::x#2 getCharToProcess::closest_dist#2 getCharToProcess::closest_x#7 getCharToProcess::closest_y#7 ] ( main:2::getCharToProcess:29 [ getCharToProcess::screen_line#4 getCharToProcess::y#7 getCharToProcess::x#2 getCharToProcess::closest_dist#2 getCharToProcess::closest_x#7 getCharToProcess::closest_y#7 ] ) always clobbers reg byte a
|
|
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:16 [ getCharToProcess::y#7 getCharToProcess::y#1 ]
|
|
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:17 [ getCharToProcess::x#2 getCharToProcess::x#1 ]
|
|
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:20 [ getCharToProcess::closest_x#7 getCharToProcess::closest_x#9 getCharToProcess::return_x#1 getCharToProcess::return_x#7 ]
|
|
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:21 [ getCharToProcess::closest_y#7 getCharToProcess::closest_y#9 getCharToProcess::return_y#1 getCharToProcess::return_y#7 ]
|
|
Statement [84] (byte~) getCharToProcess::$13 ← (byte) getCharToProcess::x#2 << (byte) 1 [ getCharToProcess::screen_line#4 getCharToProcess::y#7 getCharToProcess::x#2 getCharToProcess::closest_dist#2 getCharToProcess::closest_x#7 getCharToProcess::closest_y#7 getCharToProcess::$13 ] ( main:2::getCharToProcess:29 [ getCharToProcess::screen_line#4 getCharToProcess::y#7 getCharToProcess::x#2 getCharToProcess::closest_dist#2 getCharToProcess::closest_x#7 getCharToProcess::closest_y#7 getCharToProcess::$13 ] ) always clobbers reg byte a
|
|
Statement [85] (byte~) getCharToProcess::$14 ← (byte) getCharToProcess::y#7 << (byte) 1 [ getCharToProcess::screen_line#4 getCharToProcess::y#7 getCharToProcess::x#2 getCharToProcess::closest_dist#2 getCharToProcess::closest_x#7 getCharToProcess::closest_y#7 getCharToProcess::$13 getCharToProcess::$14 ] ( main:2::getCharToProcess:29 [ getCharToProcess::screen_line#4 getCharToProcess::y#7 getCharToProcess::x#2 getCharToProcess::closest_dist#2 getCharToProcess::closest_x#7 getCharToProcess::closest_y#7 getCharToProcess::$13 getCharToProcess::$14 ] ) always clobbers reg byte a
|
|
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:77 [ getCharToProcess::$13 ]
|
|
Statement [86] (word) getCharToProcess::dist#0 ← *((const word[$28]) SQUARES_X#0 + (byte~) getCharToProcess::$13) + *((const word[$19]) SQUARES_Y#0 + (byte~) getCharToProcess::$14) [ getCharToProcess::screen_line#4 getCharToProcess::y#7 getCharToProcess::x#2 getCharToProcess::closest_dist#2 getCharToProcess::closest_x#7 getCharToProcess::closest_y#7 getCharToProcess::dist#0 ] ( main:2::getCharToProcess:29 [ getCharToProcess::screen_line#4 getCharToProcess::y#7 getCharToProcess::x#2 getCharToProcess::closest_dist#2 getCharToProcess::closest_x#7 getCharToProcess::closest_y#7 getCharToProcess::dist#0 ] ) always clobbers reg byte a
|
|
Statement [87] if((word) getCharToProcess::dist#0>=(word) getCharToProcess::closest_dist#2) goto getCharToProcess::@12 [ getCharToProcess::screen_line#4 getCharToProcess::y#7 getCharToProcess::x#2 getCharToProcess::closest_dist#2 getCharToProcess::closest_x#7 getCharToProcess::closest_y#7 getCharToProcess::dist#0 ] ( main:2::getCharToProcess:29 [ getCharToProcess::screen_line#4 getCharToProcess::y#7 getCharToProcess::x#2 getCharToProcess::closest_dist#2 getCharToProcess::closest_x#7 getCharToProcess::closest_y#7 getCharToProcess::dist#0 ] ) always clobbers reg byte a
|
|
Statement [93] (byte*) getCharToProcess::screen_line#1 ← (byte*) getCharToProcess::screen_line#4 + (byte) $28 [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 getCharToProcess::y#7 getCharToProcess::screen_line#1 ] ( main:2::getCharToProcess:29 [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 getCharToProcess::y#7 getCharToProcess::screen_line#1 ] ) always clobbers reg byte a
|
|
Statement [96] if((word) getCharToProcess::return_dist#1==(const word) NOT_FOUND#0) goto getCharToProcess::@return [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 ] ( main:2::getCharToProcess:29 [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 ] ) always clobbers reg byte a
|
|
Statement [97] (word~) getCharToProcess::$9 ← (word)(byte) getCharToProcess::return_y#1 [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 getCharToProcess::$9 ] ( main:2::getCharToProcess:29 [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 getCharToProcess::$9 ] ) always clobbers reg byte a
|
|
Statement [98] (word) getCharToProcess::$15 ← (word~) getCharToProcess::$9 << (byte) 2 [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 getCharToProcess::$9 getCharToProcess::$15 ] ( main:2::getCharToProcess:29 [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 getCharToProcess::$9 getCharToProcess::$15 ] ) always clobbers reg byte a
|
|
Statement [99] (word) getCharToProcess::$16 ← (word) getCharToProcess::$15 + (word~) getCharToProcess::$9 [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 getCharToProcess::$16 ] ( main:2::getCharToProcess:29 [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 getCharToProcess::$16 ] ) always clobbers reg byte a
|
|
Statement [100] (word~) getCharToProcess::$10 ← (word) getCharToProcess::$16 << (byte) 3 [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 getCharToProcess::$10 ] ( main:2::getCharToProcess:29 [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 getCharToProcess::$10 ] ) always clobbers reg byte a
|
|
Statement [101] (byte*~) getCharToProcess::$11 ← (const byte[$3e8]) SCREEN_COPY#0 + (word~) getCharToProcess::$10 [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 getCharToProcess::$11 ] ( main:2::getCharToProcess:29 [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 getCharToProcess::$11 ] ) always clobbers reg byte a
|
|
Statement [102] *((byte*~) getCharToProcess::$11 + (byte) getCharToProcess::return_x#1) ← (byte) ' ' [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 ] ( main:2::getCharToProcess:29 [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 ] ) always clobbers reg byte a
|
|
Statement [104] (word~) getCharToProcess::closest_dist#10 ← (word) getCharToProcess::return_dist#1 [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::screen_line#1 getCharToProcess::y#1 getCharToProcess::closest_dist#10 ] ( main:2::getCharToProcess:29 [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::screen_line#1 getCharToProcess::y#1 getCharToProcess::closest_dist#10 ] ) always clobbers reg byte a
|
|
Statement [105] (word~) getCharToProcess::closest_dist#12 ← (word) getCharToProcess::return_dist#1 [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::screen_line#4 getCharToProcess::y#7 getCharToProcess::x#1 getCharToProcess::closest_dist#12 ] ( main:2::getCharToProcess:29 [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::screen_line#4 getCharToProcess::y#7 getCharToProcess::x#1 getCharToProcess::closest_dist#12 ] ) always clobbers reg byte a
|
|
Statement [106] (word~) getCharToProcess::return_dist#6 ← (word) getCharToProcess::closest_dist#2 [ getCharToProcess::screen_line#4 getCharToProcess::y#7 getCharToProcess::x#2 getCharToProcess::closest_x#7 getCharToProcess::closest_y#7 getCharToProcess::return_dist#6 ] ( main:2::getCharToProcess:29 [ getCharToProcess::screen_line#4 getCharToProcess::y#7 getCharToProcess::x#2 getCharToProcess::closest_x#7 getCharToProcess::closest_y#7 getCharToProcess::return_dist#6 ] ) always clobbers reg byte a
|
|
Statement [107] (word~) getCharToProcess::return_dist#5 ← (word) getCharToProcess::closest_dist#2 [ getCharToProcess::screen_line#4 getCharToProcess::y#7 getCharToProcess::x#2 getCharToProcess::closest_x#7 getCharToProcess::closest_y#7 getCharToProcess::return_dist#5 ] ( main:2::getCharToProcess:29 [ getCharToProcess::screen_line#4 getCharToProcess::y#7 getCharToProcess::x#2 getCharToProcess::closest_x#7 getCharToProcess::closest_y#7 getCharToProcess::return_dist#5 ] ) always clobbers reg byte a
|
|
Statement [116] (word) mul8u::return#2 ← (word) mul8u::res#2 [ initSquareTables::x#2 mul8u::return#2 ] ( main:2::initSquareTables:27 [ initSquareTables::x#2 mul8u::return#2 ] ) always clobbers reg byte a
|
|
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:24 [ initSquareTables::x#2 initSquareTables::x#1 ]
|
|
Statement [117] (word~) initSquareTables::$6 ← (word) mul8u::return#2 [ initSquareTables::x#2 initSquareTables::$6 ] ( main:2::initSquareTables:27 [ initSquareTables::x#2 initSquareTables::$6 ] ) always clobbers reg byte a
|
|
Statement [118] (byte~) initSquareTables::$16 ← (byte) initSquareTables::x#2 << (byte) 1 [ initSquareTables::x#2 initSquareTables::$6 initSquareTables::$16 ] ( main:2::initSquareTables:27 [ initSquareTables::x#2 initSquareTables::$6 initSquareTables::$16 ] ) always clobbers reg byte a
|
|
Statement [119] *((const word[$28]) SQUARES_X#0 + (byte~) initSquareTables::$16) ← (word~) initSquareTables::$6 [ initSquareTables::x#2 ] ( main:2::initSquareTables:27 [ initSquareTables::x#2 ] ) always clobbers reg byte a
|
|
Statement [129] (word) mul8u::return#3 ← (word) mul8u::res#2 [ initSquareTables::y#2 mul8u::return#3 ] ( main:2::initSquareTables:27 [ initSquareTables::y#2 mul8u::return#3 ] ) always clobbers reg byte a
|
|
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:26 [ initSquareTables::y#2 initSquareTables::y#1 ]
|
|
Statement [130] (word~) initSquareTables::$14 ← (word) mul8u::return#3 [ initSquareTables::y#2 initSquareTables::$14 ] ( main:2::initSquareTables:27 [ initSquareTables::y#2 initSquareTables::$14 ] ) always clobbers reg byte a
|
|
Statement [131] (byte~) initSquareTables::$17 ← (byte) initSquareTables::y#2 << (byte) 1 [ initSquareTables::y#2 initSquareTables::$14 initSquareTables::$17 ] ( main:2::initSquareTables:27 [ initSquareTables::y#2 initSquareTables::$14 initSquareTables::$17 ] ) always clobbers reg byte a
|
|
Statement [132] *((const word[$19]) SQUARES_Y#0 + (byte~) initSquareTables::$17) ← (word~) initSquareTables::$14 [ initSquareTables::y#2 ] ( main:2::initSquareTables:27 [ initSquareTables::y#2 ] ) always clobbers reg byte a
|
|
Statement [136] (byte~) initSquareTables::$12 ← (byte) $c - (byte) initSquareTables::y#2 [ initSquareTables::y#2 initSquareTables::$12 ] ( main:2::initSquareTables:27 [ initSquareTables::y#2 initSquareTables::$12 ] ) always clobbers reg byte a
|
|
Statement [137] (byte~) initSquareTables::$4 ← (byte) $14 - (byte) initSquareTables::x#2 [ initSquareTables::x#2 initSquareTables::$4 ] ( main:2::initSquareTables:27 [ initSquareTables::x#2 initSquareTables::$4 ] ) always clobbers reg byte a
|
|
Statement [144] (word) mul8u::res#1 ← (word) mul8u::res#2 + (word) mul8u::mb#2 [ mul8u::a#3 mul8u::mb#2 mul8u::res#1 ] ( main:2::initSquareTables:27::mul8u:115 [ initSquareTables::x#2 mul8u::a#3 mul8u::mb#2 mul8u::res#1 ] main:2::initSquareTables:27::mul8u:128 [ initSquareTables::y#2 mul8u::a#3 mul8u::mb#2 mul8u::res#1 ] ) always clobbers reg byte a
|
|
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:30 [ mul8u::a#3 mul8u::a#6 mul8u::a#2 mul8u::a#1 mul8u::a#0 ]
|
|
Statement [149] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 [ ] ( main:2::setupRasterIrq:20 [ ] ) always clobbers reg byte a
|
|
Statement [150] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 [ ] ( main:2::setupRasterIrq:20 [ ] ) always clobbers reg byte a
|
|
Statement [151] *((const byte*) CIA1_INTERRUPT#0) ← (const byte) CIA_INTERRUPT_CLEAR#0 [ ] ( main:2::setupRasterIrq:20 [ ] ) always clobbers reg byte a
|
|
Statement [152] *((const byte*) VIC_CONTROL#0) ← *((const byte*) VIC_CONTROL#0) & (byte) $7f [ ] ( main:2::setupRasterIrq:20 [ ] ) always clobbers reg byte a
|
|
Statement [153] *((const byte*) RASTER#0) ← <(const byte) RASTER_IRQ_TOP#0 [ ] ( main:2::setupRasterIrq:20 [ ] ) always clobbers reg byte a
|
|
Statement [154] *((const byte*) IRQ_ENABLE#0) ← (const byte) IRQ_RASTER#0 [ ] ( main:2::setupRasterIrq:20 [ ] ) always clobbers reg byte a
|
|
Statement [155] *((const void()**) HARDWARE_IRQ#0) ← (const void()*) setupRasterIrq::irqRoutine#0 [ ] ( main:2::setupRasterIrq:20 [ ] ) always clobbers reg byte a
|
|
Statement [162] *((const byte*) BORDERCOL#0) ← (const byte) WHITE#0 [ ] ( [ ] ) always clobbers reg byte a
|
|
Statement [163] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 [ ] ( [ ] ) always clobbers reg byte a
|
|
Statement [165] *((const byte*) BORDERCOL#0) ← (const byte) LIGHT_BLUE#0 [ ] ( [ ] ) always clobbers reg byte a
|
|
Statement [166] *((const byte*) BGCOL#0) ← (const byte) BLUE#0 [ ] ( [ ] ) always clobbers reg byte a
|
|
Statement [167] *((const byte*) RASTER#0) ← (const byte) RASTER_IRQ_TOP#0 [ ] ( [ ] ) always clobbers reg byte a
|
|
Statement [168] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_ALL)(void()) irqTop() [ ] ( [ ] ) always clobbers reg byte a
|
|
Statement [169] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 [ ] ( [ ] ) always clobbers reg byte a
|
|
Statement [170] return [ ] ( [ ] ) always clobbers reg byte a reg byte x reg byte y
|
|
Statement [173] (byte~) processChars::$18 ← (byte) processChars::i#10 << (byte) 3 [ processChars::i#10 processChars::$18 ] ( processChars:164 [ processChars::i#10 processChars::$18 ] ) always clobbers reg byte a
|
|
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:36 [ processChars::i#10 processChars::i#1 ]
|
|
Statement [174] (struct ProcessingSprite*) processChars::processing#0 ← (const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (byte~) processChars::$18 [ processChars::i#10 processChars::processing#0 ] ( processChars:164 [ processChars::i#10 processChars::processing#0 ] ) always clobbers reg byte a
|
|
Statement [175] (byte) processChars::bitmask#0 ← (byte) 1 << *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID) [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:164 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ) always clobbers reg byte a reg byte y
|
|
Removing always clobbered register reg byte y as potential for zp ZP_BYTE:36 [ processChars::i#10 processChars::i#1 ]
|
|
Statement [176] if(*((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS)==(const byte) STATUS_FREE#0) goto processChars::@2 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:164 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ) always clobbers reg byte a reg byte y
|
|
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:103 [ processChars::bitmask#0 ]
|
|
Removing always clobbered register reg byte y as potential for zp ZP_BYTE:103 [ processChars::bitmask#0 ]
|
|
Statement [177] if(*((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS)!=(const byte) STATUS_NEW#0) goto processChars::@3 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:164 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ) always clobbers reg byte a reg byte y
|
|
Statement [178] *(*((byte**)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR)) ← (byte) ' ' [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:164 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ) always clobbers reg byte a reg byte x reg byte y
|
|
Removing always clobbered register reg byte x as potential for zp ZP_BYTE:36 [ processChars::i#10 processChars::i#1 ]
|
|
Removing always clobbered register reg byte x as potential for zp ZP_BYTE:103 [ processChars::bitmask#0 ]
|
|
Statement [179] *((const byte*) SPRITES_ENABLE#0) ← *((const byte*) SPRITES_ENABLE#0) | (byte) processChars::bitmask#0 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:164 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ) always clobbers reg byte a
|
|
Statement [180] *((const byte*) SCREEN#0+(const word) SPRITE_PTRS#0 + *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID)) ← *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR) [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:164 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ) always clobbers reg byte a reg byte y
|
|
Statement [181] *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) ← (const byte) STATUS_PROCESSING#0 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:164 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ) always clobbers reg byte a reg byte y
|
|
Statement [182] (byte~) processChars::$9 ← > *((word*)(struct ProcessingSprite*) processChars::processing#0) [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 processChars::$9 ] ( processChars:164 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 processChars::$9 ] ) always clobbers reg byte a reg byte y
|
|
Statement [184] (byte~) processChars::$10 ← (byte) $ff ^ (byte) processChars::bitmask#0 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 processChars::$10 ] ( processChars:164 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 processChars::$10 ] ) always clobbers reg byte a
|
|
Statement [185] *((const byte*) SPRITES_XMSB#0) ← *((const byte*) SPRITES_XMSB#0) & (byte~) processChars::$10 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:164 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ) always clobbers reg byte a
|
|
Statement [186] (byte~) processChars::$13 ← (byte) processChars::i#10 << (byte) 1 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 processChars::$13 ] ( processChars:164 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 processChars::$13 ] ) always clobbers reg byte a
|
|
Statement [187] (byte~) processChars::$12 ← (byte)*((word*)(struct ProcessingSprite*) processChars::processing#0) [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 processChars::$13 processChars::$12 ] ( processChars:164 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 processChars::$13 processChars::$12 ] ) always clobbers reg byte a reg byte y
|
|
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:106 [ processChars::$13 ]
|
|
Removing always clobbered register reg byte y as potential for zp ZP_BYTE:106 [ processChars::$13 ]
|
|
Statement [189] *((const byte*) SPRITES_YPOS#0 + (byte~) processChars::$13) ← *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y) [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:164 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ) always clobbers reg byte a reg byte y
|
|
Statement [190] *((word*)(struct ProcessingSprite*) processChars::processing#0) ← -- *((word*)(struct ProcessingSprite*) processChars::processing#0) [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:164 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ) always clobbers reg byte a reg byte y
|
|
Statement [191] if(*((word*)(struct ProcessingSprite*) processChars::processing#0)!=(byte) 0) goto processChars::@2 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:164 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ) always clobbers reg byte a reg byte y
|
|
Statement [192] *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) ← (const byte) STATUS_FREE#0 [ processChars::i#10 processChars::bitmask#0 ] ( processChars:164 [ processChars::i#10 processChars::bitmask#0 ] ) always clobbers reg byte a reg byte y
|
|
Statement [193] (byte~) processChars::$16 ← (byte) $ff ^ (byte) processChars::bitmask#0 [ processChars::i#10 processChars::$16 ] ( processChars:164 [ processChars::i#10 processChars::$16 ] ) always clobbers reg byte a
|
|
Statement [194] *((const byte*) SPRITES_ENABLE#0) ← *((const byte*) SPRITES_ENABLE#0) & (byte~) processChars::$16 [ processChars::i#10 ] ( processChars:164 [ processChars::i#10 ] ) always clobbers reg byte a
|
|
Statement [196] if((byte) processChars::i#1!=(byte) 1) goto processChars::@1 [ processChars::i#1 ] ( processChars:164 [ processChars::i#1 ] ) always clobbers reg byte a
|
|
Statement [198] *((const byte*) SPRITES_XMSB#0) ← *((const byte*) SPRITES_XMSB#0) | (byte) processChars::bitmask#0 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:164 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ) always clobbers reg byte a
|
|
Statement [203] *((const byte*) BORDERCOL#0) ← (const byte) WHITE#0 [ ] ( [ ] ) always clobbers reg byte a
|
|
Statement [204] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 [ ] ( [ ] ) always clobbers reg byte a
|
|
Statement [208] *((const byte*) BORDERCOL#0) ← (const byte) LIGHT_BLUE#0 [ ] ( [ ] ) always clobbers reg byte a
|
|
Statement [209] *((const byte*) BGCOL#0) ← (const byte) BLUE#0 [ ] ( [ ] ) always clobbers reg byte a
|
|
Statement [210] *((const byte*) RASTER#0) ← (const byte) RASTER_IRQ_MIDDLE#0 [ ] ( [ ] ) always clobbers reg byte a
|
|
Statement [211] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_ALL)(void()) irqBottom() [ ] ( [ ] ) always clobbers reg byte a
|
|
Statement [212] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 [ ] ( [ ] ) always clobbers reg byte a
|
|
Statement [213] return [ ] ( [ ] ) always clobbers reg byte a reg byte x reg byte y
|
|
Statement [6] (byte~) main::$17 ← (byte) main::i#2 << (byte) 3 [ main::i#2 main::$17 ] ( main:2 [ main::i#2 main::$17 ] ) always clobbers reg byte a
|
|
Statement [7] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (byte~) main::$17) ← (byte) 0 [ main::i#2 main::$17 ] ( main:2 [ main::i#2 main::$17 ] ) always clobbers reg byte a
|
|
Statement [8] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y + (byte~) main::$17) ← (byte) 0 [ main::i#2 main::$17 ] ( main:2 [ main::i#2 main::$17 ] ) always clobbers reg byte a
|
|
Statement [9] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID + (byte~) main::$17) ← (byte) 0 [ main::i#2 main::$17 ] ( main:2 [ main::i#2 main::$17 ] ) always clobbers reg byte a
|
|
Statement [10] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR + (byte~) main::$17) ← (byte) 0 [ main::i#2 main::$17 ] ( main:2 [ main::i#2 main::$17 ] ) always clobbers reg byte a
|
|
Statement [11] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS + (byte~) main::$17) ← (const byte) STATUS_FREE#0 [ main::i#2 main::$17 ] ( main:2 [ main::i#2 main::$17 ] ) always clobbers reg byte a
|
|
Statement [12] *((byte**)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR + (byte~) main::$17) ← (byte*) 0 [ main::i#2 ] ( main:2 [ main::i#2 ] ) always clobbers reg byte a
|
|
Statement [16] *((byte*) main::sp#2) ← (byte) 0 [ main::sp#2 ] ( main:2 [ main::sp#2 ] ) always clobbers reg byte a reg byte y
|
|
Statement [18] if((byte*) main::sp#1<(const byte*) SPRITE_DATA#0+(const byte) SIZEOF_POINTER) goto main::@2 [ main::sp#1 ] ( main:2 [ main::sp#1 ] ) always clobbers reg byte a
|
|
Statement [22] *((byte*) main::dst#2) ← *((byte*) main::src#2) [ main::src#2 main::dst#2 ] ( main:2 [ main::src#2 main::dst#2 ] ) always clobbers reg byte a reg byte y
|
|
Statement [25] if((byte*) main::src#1!=(const byte*) SCREEN#0+(word) $3e8) goto main::@4 [ main::src#1 main::dst#1 ] ( main:2 [ main::src#1 main::dst#1 ] ) always clobbers reg byte a
|
|
Statement [32] (word) getCharToProcess::return_dist#0 ← (word) getCharToProcess::return_dist#1 [ getCharToProcess::return_x#0 getCharToProcess::return_y#0 getCharToProcess::return_dist#0 ] ( main:2 [ getCharToProcess::return_x#0 getCharToProcess::return_y#0 getCharToProcess::return_dist#0 ] ) always clobbers reg byte a
|
|
Statement [35] (word) main::center_dist#0 ← (word) getCharToProcess::return_dist#0 [ main::center_x#0 main::center_y#0 main::center_dist#0 ] ( main:2 [ main::center_x#0 main::center_y#0 main::center_dist#0 ] ) always clobbers reg byte a
|
|
Statement [36] if((word) main::center_dist#0!=(const word) NOT_FOUND#0) goto main::@7 [ main::center_x#0 main::center_y#0 ] ( main:2 [ main::center_x#0 main::center_y#0 ] ) always clobbers reg byte a
|
|
Statement [44] (byte~) startProcessing::$21 ← (byte) startProcessing::i#2 << (byte) 3 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#6 startProcessing::i#2 startProcessing::$21 ] ( main:2::startProcessing:40 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#6 startProcessing::i#2 startProcessing::$21 ] ) always clobbers reg byte a
|
|
Statement [45] if(*((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS + (byte~) startProcessing::$21)!=(const byte) STATUS_FREE#0) goto startProcessing::@3 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#6 startProcessing::i#2 ] ( main:2::startProcessing:40 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#6 startProcessing::i#2 ] ) always clobbers reg byte a
|
|
Statement [48] (word~) startProcessing::$0 ← (word)(byte) startProcessing::freeIdx#2 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::$0 ] ( main:2::startProcessing:40 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::$0 ] ) always clobbers reg byte a
|
|
Statement [49] (word~) startProcessing::$1 ← (word~) startProcessing::$0 << (byte) 6 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::$1 ] ( main:2::startProcessing:40 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::$1 ] ) always clobbers reg byte a
|
|
Statement [50] (byte*) startProcessing::spriteData#0 ← (const byte*) SPRITE_DATA#0 + (word~) startProcessing::$1 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::spriteData#0 ] ( main:2::startProcessing:40 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::spriteData#0 ] ) always clobbers reg byte a
|
|
Statement [52] *((byte*) startProcessing::spriteData#2) ← (byte) $ff [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::spriteData#2 startProcessing::i1#2 ] ( main:2::startProcessing:40 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::spriteData#2 startProcessing::i1#2 ] ) always clobbers reg byte a reg byte y
|
|
Statement [53] (byte*) startProcessing::spriteData#1 ← (byte*) startProcessing::spriteData#2 + (byte) 3 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::i1#2 startProcessing::spriteData#1 ] ( main:2::startProcessing:40 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::i1#2 startProcessing::spriteData#1 ] ) always clobbers reg byte a
|
|
Statement [56] (word~) startProcessing::$3 ← (word)(byte) startProcessing::center_x#0 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::$3 ] ( main:2::startProcessing:40 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::$3 ] ) always clobbers reg byte a
|
|
Statement [57] (word~) startProcessing::$4 ← (word~) startProcessing::$3 << (byte) 3 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::$4 ] ( main:2::startProcessing:40 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::$4 ] ) always clobbers reg byte a
|
|
Statement [58] (word) startProcessing::spriteX#0 ← (byte) $18 + (word~) startProcessing::$4 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::spriteX#0 ] ( main:2::startProcessing:40 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::spriteX#0 ] ) always clobbers reg byte a
|
|
Statement [59] (byte~) startProcessing::$6 ← (byte) startProcessing::center_y#0 << (byte) 3 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::spriteX#0 startProcessing::$6 ] ( main:2::startProcessing:40 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::spriteX#0 startProcessing::$6 ] ) always clobbers reg byte a
|
|
Statement [61] (byte) startProcessing::spritePtr#0 ← (byte)(const byte*) SPRITE_DATA#0/(byte) $40 + (byte) startProcessing::freeIdx#2 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 ] ( main:2::startProcessing:40 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 ] ) always clobbers reg byte a
|
|
Statement [62] (word~) startProcessing::$11 ← (word)(byte) startProcessing::center_y#0 [ startProcessing::center_x#0 startProcessing::freeIdx#2 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$11 ] ( main:2::startProcessing:40 [ startProcessing::center_x#0 startProcessing::freeIdx#2 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$11 ] ) always clobbers reg byte a
|
|
Statement [63] (word) startProcessing::$30 ← (word~) startProcessing::$11 << (byte) 2 [ startProcessing::center_x#0 startProcessing::freeIdx#2 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$11 startProcessing::$30 ] ( main:2::startProcessing:40 [ startProcessing::center_x#0 startProcessing::freeIdx#2 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$11 startProcessing::$30 ] ) always clobbers reg byte a
|
|
Statement [64] (word) startProcessing::$31 ← (word) startProcessing::$30 + (word~) startProcessing::$11 [ startProcessing::center_x#0 startProcessing::freeIdx#2 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$31 ] ( main:2::startProcessing:40 [ startProcessing::center_x#0 startProcessing::freeIdx#2 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$31 ] ) always clobbers reg byte a
|
|
Statement [65] (word~) startProcessing::$12 ← (word) startProcessing::$31 << (byte) 3 [ startProcessing::center_x#0 startProcessing::freeIdx#2 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$12 ] ( main:2::startProcessing:40 [ startProcessing::center_x#0 startProcessing::freeIdx#2 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$12 ] ) always clobbers reg byte a
|
|
Statement [66] (byte*~) startProcessing::$13 ← (const byte*) SCREEN#0 + (word~) startProcessing::$12 [ startProcessing::center_x#0 startProcessing::freeIdx#2 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$13 ] ( main:2::startProcessing:40 [ startProcessing::center_x#0 startProcessing::freeIdx#2 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$13 ] ) always clobbers reg byte a
|
|
Statement [67] (byte*) startProcessing::screenPtr#0 ← (byte*~) startProcessing::$13 + (byte) startProcessing::center_x#0 [ startProcessing::freeIdx#2 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::screenPtr#0 ] ( main:2::startProcessing:40 [ startProcessing::freeIdx#2 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::screenPtr#0 ] ) always clobbers reg byte a
|
|
Statement [68] (byte~) startProcessing::$22 ← (byte) startProcessing::freeIdx#2 << (byte) 3 [ startProcessing::freeIdx#2 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::screenPtr#0 startProcessing::$22 ] ( main:2::startProcessing:40 [ startProcessing::freeIdx#2 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::screenPtr#0 startProcessing::$22 ] ) always clobbers reg byte a
|
|
Statement [69] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (byte~) startProcessing::$22) ← (word) startProcessing::spriteX#0 [ startProcessing::freeIdx#2 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::screenPtr#0 startProcessing::$22 ] ( main:2::startProcessing:40 [ startProcessing::freeIdx#2 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::screenPtr#0 startProcessing::$22 ] ) always clobbers reg byte a
|
|
Statement [70] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y + (byte~) startProcessing::$22) ← (byte) startProcessing::spriteY#0 [ startProcessing::freeIdx#2 startProcessing::spritePtr#0 startProcessing::screenPtr#0 startProcessing::$22 ] ( main:2::startProcessing:40 [ startProcessing::freeIdx#2 startProcessing::spritePtr#0 startProcessing::screenPtr#0 startProcessing::$22 ] ) always clobbers reg byte a
|
|
Statement [71] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID + (byte~) startProcessing::$22) ← (byte) startProcessing::freeIdx#2 [ startProcessing::spritePtr#0 startProcessing::screenPtr#0 startProcessing::$22 ] ( main:2::startProcessing:40 [ startProcessing::spritePtr#0 startProcessing::screenPtr#0 startProcessing::$22 ] ) always clobbers reg byte a
|
|
Statement [72] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR + (byte~) startProcessing::$22) ← (byte) startProcessing::spritePtr#0 [ startProcessing::screenPtr#0 startProcessing::$22 ] ( main:2::startProcessing:40 [ startProcessing::screenPtr#0 startProcessing::$22 ] ) always clobbers reg byte a
|
|
Statement [73] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS + (byte~) startProcessing::$22) ← (const byte) STATUS_NEW#0 [ startProcessing::screenPtr#0 startProcessing::$22 ] ( main:2::startProcessing:40 [ startProcessing::screenPtr#0 startProcessing::$22 ] ) always clobbers reg byte a
|
|
Statement [74] *((byte**)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR + (byte~) startProcessing::$22) ← (byte*) startProcessing::screenPtr#0 [ ] ( main:2::startProcessing:40 [ ] ) always clobbers reg byte a
|
|
Statement [83] if(*((byte*) getCharToProcess::screen_line#4 + (byte) getCharToProcess::x#2)==(byte) ' ') goto getCharToProcess::@11 [ getCharToProcess::screen_line#4 getCharToProcess::y#7 getCharToProcess::x#2 getCharToProcess::closest_dist#2 getCharToProcess::closest_x#7 getCharToProcess::closest_y#7 ] ( main:2::getCharToProcess:29 [ getCharToProcess::screen_line#4 getCharToProcess::y#7 getCharToProcess::x#2 getCharToProcess::closest_dist#2 getCharToProcess::closest_x#7 getCharToProcess::closest_y#7 ] ) always clobbers reg byte a
|
|
Statement [84] (byte~) getCharToProcess::$13 ← (byte) getCharToProcess::x#2 << (byte) 1 [ getCharToProcess::screen_line#4 getCharToProcess::y#7 getCharToProcess::x#2 getCharToProcess::closest_dist#2 getCharToProcess::closest_x#7 getCharToProcess::closest_y#7 getCharToProcess::$13 ] ( main:2::getCharToProcess:29 [ getCharToProcess::screen_line#4 getCharToProcess::y#7 getCharToProcess::x#2 getCharToProcess::closest_dist#2 getCharToProcess::closest_x#7 getCharToProcess::closest_y#7 getCharToProcess::$13 ] ) always clobbers reg byte a
|
|
Statement [85] (byte~) getCharToProcess::$14 ← (byte) getCharToProcess::y#7 << (byte) 1 [ getCharToProcess::screen_line#4 getCharToProcess::y#7 getCharToProcess::x#2 getCharToProcess::closest_dist#2 getCharToProcess::closest_x#7 getCharToProcess::closest_y#7 getCharToProcess::$13 getCharToProcess::$14 ] ( main:2::getCharToProcess:29 [ getCharToProcess::screen_line#4 getCharToProcess::y#7 getCharToProcess::x#2 getCharToProcess::closest_dist#2 getCharToProcess::closest_x#7 getCharToProcess::closest_y#7 getCharToProcess::$13 getCharToProcess::$14 ] ) always clobbers reg byte a
|
|
Statement [86] (word) getCharToProcess::dist#0 ← *((const word[$28]) SQUARES_X#0 + (byte~) getCharToProcess::$13) + *((const word[$19]) SQUARES_Y#0 + (byte~) getCharToProcess::$14) [ getCharToProcess::screen_line#4 getCharToProcess::y#7 getCharToProcess::x#2 getCharToProcess::closest_dist#2 getCharToProcess::closest_x#7 getCharToProcess::closest_y#7 getCharToProcess::dist#0 ] ( main:2::getCharToProcess:29 [ getCharToProcess::screen_line#4 getCharToProcess::y#7 getCharToProcess::x#2 getCharToProcess::closest_dist#2 getCharToProcess::closest_x#7 getCharToProcess::closest_y#7 getCharToProcess::dist#0 ] ) always clobbers reg byte a
|
|
Statement [87] if((word) getCharToProcess::dist#0>=(word) getCharToProcess::closest_dist#2) goto getCharToProcess::@12 [ getCharToProcess::screen_line#4 getCharToProcess::y#7 getCharToProcess::x#2 getCharToProcess::closest_dist#2 getCharToProcess::closest_x#7 getCharToProcess::closest_y#7 getCharToProcess::dist#0 ] ( main:2::getCharToProcess:29 [ getCharToProcess::screen_line#4 getCharToProcess::y#7 getCharToProcess::x#2 getCharToProcess::closest_dist#2 getCharToProcess::closest_x#7 getCharToProcess::closest_y#7 getCharToProcess::dist#0 ] ) always clobbers reg byte a
|
|
Statement [93] (byte*) getCharToProcess::screen_line#1 ← (byte*) getCharToProcess::screen_line#4 + (byte) $28 [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 getCharToProcess::y#7 getCharToProcess::screen_line#1 ] ( main:2::getCharToProcess:29 [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 getCharToProcess::y#7 getCharToProcess::screen_line#1 ] ) always clobbers reg byte a
|
|
Statement [96] if((word) getCharToProcess::return_dist#1==(const word) NOT_FOUND#0) goto getCharToProcess::@return [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 ] ( main:2::getCharToProcess:29 [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 ] ) always clobbers reg byte a
|
|
Statement [97] (word~) getCharToProcess::$9 ← (word)(byte) getCharToProcess::return_y#1 [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 getCharToProcess::$9 ] ( main:2::getCharToProcess:29 [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 getCharToProcess::$9 ] ) always clobbers reg byte a
|
|
Statement [98] (word) getCharToProcess::$15 ← (word~) getCharToProcess::$9 << (byte) 2 [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 getCharToProcess::$9 getCharToProcess::$15 ] ( main:2::getCharToProcess:29 [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 getCharToProcess::$9 getCharToProcess::$15 ] ) always clobbers reg byte a
|
|
Statement [99] (word) getCharToProcess::$16 ← (word) getCharToProcess::$15 + (word~) getCharToProcess::$9 [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 getCharToProcess::$16 ] ( main:2::getCharToProcess:29 [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 getCharToProcess::$16 ] ) always clobbers reg byte a
|
|
Statement [100] (word~) getCharToProcess::$10 ← (word) getCharToProcess::$16 << (byte) 3 [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 getCharToProcess::$10 ] ( main:2::getCharToProcess:29 [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 getCharToProcess::$10 ] ) always clobbers reg byte a
|
|
Statement [101] (byte*~) getCharToProcess::$11 ← (const byte[$3e8]) SCREEN_COPY#0 + (word~) getCharToProcess::$10 [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 getCharToProcess::$11 ] ( main:2::getCharToProcess:29 [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 getCharToProcess::$11 ] ) always clobbers reg byte a
|
|
Statement [102] *((byte*~) getCharToProcess::$11 + (byte) getCharToProcess::return_x#1) ← (byte) ' ' [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 ] ( main:2::getCharToProcess:29 [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 ] ) always clobbers reg byte a
|
|
Statement [104] (word~) getCharToProcess::closest_dist#10 ← (word) getCharToProcess::return_dist#1 [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::screen_line#1 getCharToProcess::y#1 getCharToProcess::closest_dist#10 ] ( main:2::getCharToProcess:29 [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::screen_line#1 getCharToProcess::y#1 getCharToProcess::closest_dist#10 ] ) always clobbers reg byte a
|
|
Statement [105] (word~) getCharToProcess::closest_dist#12 ← (word) getCharToProcess::return_dist#1 [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::screen_line#4 getCharToProcess::y#7 getCharToProcess::x#1 getCharToProcess::closest_dist#12 ] ( main:2::getCharToProcess:29 [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::screen_line#4 getCharToProcess::y#7 getCharToProcess::x#1 getCharToProcess::closest_dist#12 ] ) always clobbers reg byte a
|
|
Statement [106] (word~) getCharToProcess::return_dist#6 ← (word) getCharToProcess::closest_dist#2 [ getCharToProcess::screen_line#4 getCharToProcess::y#7 getCharToProcess::x#2 getCharToProcess::closest_x#7 getCharToProcess::closest_y#7 getCharToProcess::return_dist#6 ] ( main:2::getCharToProcess:29 [ getCharToProcess::screen_line#4 getCharToProcess::y#7 getCharToProcess::x#2 getCharToProcess::closest_x#7 getCharToProcess::closest_y#7 getCharToProcess::return_dist#6 ] ) always clobbers reg byte a
|
|
Statement [107] (word~) getCharToProcess::return_dist#5 ← (word) getCharToProcess::closest_dist#2 [ getCharToProcess::screen_line#4 getCharToProcess::y#7 getCharToProcess::x#2 getCharToProcess::closest_x#7 getCharToProcess::closest_y#7 getCharToProcess::return_dist#5 ] ( main:2::getCharToProcess:29 [ getCharToProcess::screen_line#4 getCharToProcess::y#7 getCharToProcess::x#2 getCharToProcess::closest_x#7 getCharToProcess::closest_y#7 getCharToProcess::return_dist#5 ] ) always clobbers reg byte a
|
|
Statement [111] (byte~) initSquareTables::$2 ← (byte) initSquareTables::x#2 - (byte) $14 [ initSquareTables::x#2 initSquareTables::$2 ] ( main:2::initSquareTables:27 [ initSquareTables::x#2 initSquareTables::$2 ] ) always clobbers reg byte a
|
|
Statement [116] (word) mul8u::return#2 ← (word) mul8u::res#2 [ initSquareTables::x#2 mul8u::return#2 ] ( main:2::initSquareTables:27 [ initSquareTables::x#2 mul8u::return#2 ] ) always clobbers reg byte a
|
|
Statement [117] (word~) initSquareTables::$6 ← (word) mul8u::return#2 [ initSquareTables::x#2 initSquareTables::$6 ] ( main:2::initSquareTables:27 [ initSquareTables::x#2 initSquareTables::$6 ] ) always clobbers reg byte a
|
|
Statement [118] (byte~) initSquareTables::$16 ← (byte) initSquareTables::x#2 << (byte) 1 [ initSquareTables::x#2 initSquareTables::$6 initSquareTables::$16 ] ( main:2::initSquareTables:27 [ initSquareTables::x#2 initSquareTables::$6 initSquareTables::$16 ] ) always clobbers reg byte a
|
|
Statement [119] *((const word[$28]) SQUARES_X#0 + (byte~) initSquareTables::$16) ← (word~) initSquareTables::$6 [ initSquareTables::x#2 ] ( main:2::initSquareTables:27 [ initSquareTables::x#2 ] ) always clobbers reg byte a
|
|
Statement [124] (byte~) initSquareTables::$10 ← (byte) initSquareTables::y#2 - (byte) $c [ initSquareTables::y#2 initSquareTables::$10 ] ( main:2::initSquareTables:27 [ initSquareTables::y#2 initSquareTables::$10 ] ) always clobbers reg byte a
|
|
Statement [129] (word) mul8u::return#3 ← (word) mul8u::res#2 [ initSquareTables::y#2 mul8u::return#3 ] ( main:2::initSquareTables:27 [ initSquareTables::y#2 mul8u::return#3 ] ) always clobbers reg byte a
|
|
Statement [130] (word~) initSquareTables::$14 ← (word) mul8u::return#3 [ initSquareTables::y#2 initSquareTables::$14 ] ( main:2::initSquareTables:27 [ initSquareTables::y#2 initSquareTables::$14 ] ) always clobbers reg byte a
|
|
Statement [131] (byte~) initSquareTables::$17 ← (byte) initSquareTables::y#2 << (byte) 1 [ initSquareTables::y#2 initSquareTables::$14 initSquareTables::$17 ] ( main:2::initSquareTables:27 [ initSquareTables::y#2 initSquareTables::$14 initSquareTables::$17 ] ) always clobbers reg byte a
|
|
Statement [132] *((const word[$19]) SQUARES_Y#0 + (byte~) initSquareTables::$17) ← (word~) initSquareTables::$14 [ initSquareTables::y#2 ] ( main:2::initSquareTables:27 [ initSquareTables::y#2 ] ) always clobbers reg byte a
|
|
Statement [136] (byte~) initSquareTables::$12 ← (byte) $c - (byte) initSquareTables::y#2 [ initSquareTables::y#2 initSquareTables::$12 ] ( main:2::initSquareTables:27 [ initSquareTables::y#2 initSquareTables::$12 ] ) always clobbers reg byte a
|
|
Statement [137] (byte~) initSquareTables::$4 ← (byte) $14 - (byte) initSquareTables::x#2 [ initSquareTables::x#2 initSquareTables::$4 ] ( main:2::initSquareTables:27 [ initSquareTables::x#2 initSquareTables::$4 ] ) always clobbers reg byte a
|
|
Statement [142] (byte~) mul8u::$1 ← (byte) mul8u::a#3 & (byte) 1 [ mul8u::res#2 mul8u::a#3 mul8u::mb#2 mul8u::$1 ] ( main:2::initSquareTables:27::mul8u:115 [ initSquareTables::x#2 mul8u::res#2 mul8u::a#3 mul8u::mb#2 mul8u::$1 ] main:2::initSquareTables:27::mul8u:128 [ initSquareTables::y#2 mul8u::res#2 mul8u::a#3 mul8u::mb#2 mul8u::$1 ] ) always clobbers reg byte a
|
|
Statement [144] (word) mul8u::res#1 ← (word) mul8u::res#2 + (word) mul8u::mb#2 [ mul8u::a#3 mul8u::mb#2 mul8u::res#1 ] ( main:2::initSquareTables:27::mul8u:115 [ initSquareTables::x#2 mul8u::a#3 mul8u::mb#2 mul8u::res#1 ] main:2::initSquareTables:27::mul8u:128 [ initSquareTables::y#2 mul8u::a#3 mul8u::mb#2 mul8u::res#1 ] ) always clobbers reg byte a
|
|
Statement [149] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 [ ] ( main:2::setupRasterIrq:20 [ ] ) always clobbers reg byte a
|
|
Statement [150] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 [ ] ( main:2::setupRasterIrq:20 [ ] ) always clobbers reg byte a
|
|
Statement [151] *((const byte*) CIA1_INTERRUPT#0) ← (const byte) CIA_INTERRUPT_CLEAR#0 [ ] ( main:2::setupRasterIrq:20 [ ] ) always clobbers reg byte a
|
|
Statement [152] *((const byte*) VIC_CONTROL#0) ← *((const byte*) VIC_CONTROL#0) & (byte) $7f [ ] ( main:2::setupRasterIrq:20 [ ] ) always clobbers reg byte a
|
|
Statement [153] *((const byte*) RASTER#0) ← <(const byte) RASTER_IRQ_TOP#0 [ ] ( main:2::setupRasterIrq:20 [ ] ) always clobbers reg byte a
|
|
Statement [154] *((const byte*) IRQ_ENABLE#0) ← (const byte) IRQ_RASTER#0 [ ] ( main:2::setupRasterIrq:20 [ ] ) always clobbers reg byte a
|
|
Statement [155] *((const void()**) HARDWARE_IRQ#0) ← (const void()*) setupRasterIrq::irqRoutine#0 [ ] ( main:2::setupRasterIrq:20 [ ] ) always clobbers reg byte a
|
|
Statement [162] *((const byte*) BORDERCOL#0) ← (const byte) WHITE#0 [ ] ( [ ] ) always clobbers reg byte a
|
|
Statement [163] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 [ ] ( [ ] ) always clobbers reg byte a
|
|
Statement [165] *((const byte*) BORDERCOL#0) ← (const byte) LIGHT_BLUE#0 [ ] ( [ ] ) always clobbers reg byte a
|
|
Statement [166] *((const byte*) BGCOL#0) ← (const byte) BLUE#0 [ ] ( [ ] ) always clobbers reg byte a
|
|
Statement [167] *((const byte*) RASTER#0) ← (const byte) RASTER_IRQ_TOP#0 [ ] ( [ ] ) always clobbers reg byte a
|
|
Statement [168] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_ALL)(void()) irqTop() [ ] ( [ ] ) always clobbers reg byte a
|
|
Statement [169] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 [ ] ( [ ] ) always clobbers reg byte a
|
|
Statement [170] return [ ] ( [ ] ) always clobbers reg byte a reg byte x reg byte y
|
|
Statement [173] (byte~) processChars::$18 ← (byte) processChars::i#10 << (byte) 3 [ processChars::i#10 processChars::$18 ] ( processChars:164 [ processChars::i#10 processChars::$18 ] ) always clobbers reg byte a
|
|
Statement [174] (struct ProcessingSprite*) processChars::processing#0 ← (const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (byte~) processChars::$18 [ processChars::i#10 processChars::processing#0 ] ( processChars:164 [ processChars::i#10 processChars::processing#0 ] ) always clobbers reg byte a
|
|
Statement [175] (byte) processChars::bitmask#0 ← (byte) 1 << *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID) [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:164 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ) always clobbers reg byte a reg byte x reg byte y
|
|
Statement [176] if(*((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS)==(const byte) STATUS_FREE#0) goto processChars::@2 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:164 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ) always clobbers reg byte a reg byte y
|
|
Statement [177] if(*((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS)!=(const byte) STATUS_NEW#0) goto processChars::@3 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:164 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ) always clobbers reg byte a reg byte y
|
|
Statement [178] *(*((byte**)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR)) ← (byte) ' ' [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:164 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ) always clobbers reg byte a reg byte x reg byte y
|
|
Statement [179] *((const byte*) SPRITES_ENABLE#0) ← *((const byte*) SPRITES_ENABLE#0) | (byte) processChars::bitmask#0 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:164 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ) always clobbers reg byte a
|
|
Statement [180] *((const byte*) SCREEN#0+(const word) SPRITE_PTRS#0 + *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID)) ← *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR) [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:164 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ) always clobbers reg byte a reg byte y
|
|
Statement [181] *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) ← (const byte) STATUS_PROCESSING#0 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:164 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ) always clobbers reg byte a reg byte y
|
|
Statement [182] (byte~) processChars::$9 ← > *((word*)(struct ProcessingSprite*) processChars::processing#0) [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 processChars::$9 ] ( processChars:164 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 processChars::$9 ] ) always clobbers reg byte a reg byte y
|
|
Statement [184] (byte~) processChars::$10 ← (byte) $ff ^ (byte) processChars::bitmask#0 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 processChars::$10 ] ( processChars:164 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 processChars::$10 ] ) always clobbers reg byte a
|
|
Statement [185] *((const byte*) SPRITES_XMSB#0) ← *((const byte*) SPRITES_XMSB#0) & (byte~) processChars::$10 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:164 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ) always clobbers reg byte a
|
|
Statement [186] (byte~) processChars::$13 ← (byte) processChars::i#10 << (byte) 1 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 processChars::$13 ] ( processChars:164 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 processChars::$13 ] ) always clobbers reg byte a
|
|
Statement [187] (byte~) processChars::$12 ← (byte)*((word*)(struct ProcessingSprite*) processChars::processing#0) [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 processChars::$13 processChars::$12 ] ( processChars:164 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 processChars::$13 processChars::$12 ] ) always clobbers reg byte a reg byte y
|
|
Statement [189] *((const byte*) SPRITES_YPOS#0 + (byte~) processChars::$13) ← *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y) [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:164 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ) always clobbers reg byte a reg byte y
|
|
Statement [190] *((word*)(struct ProcessingSprite*) processChars::processing#0) ← -- *((word*)(struct ProcessingSprite*) processChars::processing#0) [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:164 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ) always clobbers reg byte a reg byte y
|
|
Statement [191] if(*((word*)(struct ProcessingSprite*) processChars::processing#0)!=(byte) 0) goto processChars::@2 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:164 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ) always clobbers reg byte a reg byte y
|
|
Statement [192] *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) ← (const byte) STATUS_FREE#0 [ processChars::i#10 processChars::bitmask#0 ] ( processChars:164 [ processChars::i#10 processChars::bitmask#0 ] ) always clobbers reg byte a reg byte y
|
|
Statement [193] (byte~) processChars::$16 ← (byte) $ff ^ (byte) processChars::bitmask#0 [ processChars::i#10 processChars::$16 ] ( processChars:164 [ processChars::i#10 processChars::$16 ] ) always clobbers reg byte a
|
|
Statement [194] *((const byte*) SPRITES_ENABLE#0) ← *((const byte*) SPRITES_ENABLE#0) & (byte~) processChars::$16 [ processChars::i#10 ] ( processChars:164 [ processChars::i#10 ] ) always clobbers reg byte a
|
|
Statement [196] if((byte) processChars::i#1!=(byte) 1) goto processChars::@1 [ processChars::i#1 ] ( processChars:164 [ processChars::i#1 ] ) always clobbers reg byte a
|
|
Statement [198] *((const byte*) SPRITES_XMSB#0) ← *((const byte*) SPRITES_XMSB#0) | (byte) processChars::bitmask#0 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:164 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ) always clobbers reg byte a
|
|
Statement [203] *((const byte*) BORDERCOL#0) ← (const byte) WHITE#0 [ ] ( [ ] ) always clobbers reg byte a
|
|
Statement [204] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 [ ] ( [ ] ) always clobbers reg byte a
|
|
Statement [208] *((const byte*) BORDERCOL#0) ← (const byte) LIGHT_BLUE#0 [ ] ( [ ] ) always clobbers reg byte a
|
|
Statement [209] *((const byte*) BGCOL#0) ← (const byte) BLUE#0 [ ] ( [ ] ) always clobbers reg byte a
|
|
Statement [210] *((const byte*) RASTER#0) ← (const byte) RASTER_IRQ_MIDDLE#0 [ ] ( [ ] ) always clobbers reg byte a
|
|
Statement [211] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_ALL)(void()) irqBottom() [ ] ( [ ] ) always clobbers reg byte a
|
|
Statement [212] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 [ ] ( [ ] ) always clobbers reg byte a
|
|
Statement [213] return [ ] ( [ ] ) always clobbers reg byte a reg byte x reg byte y
|
|
Potential registers zp ZP_BYTE:2 [ main::i#2 main::i#1 ] : zp ZP_BYTE:2 , reg byte x , reg byte y ,
|
|
Potential registers zp ZP_WORD:3 [ main::sp#2 main::sp#1 ] : zp ZP_WORD:3 ,
|
|
Potential registers zp ZP_WORD:5 [ main::src#2 main::src#1 ] : zp ZP_WORD:5 ,
|
|
Potential registers zp ZP_WORD:7 [ main::dst#2 main::dst#1 ] : zp ZP_WORD:7 ,
|
|
Potential registers zp ZP_BYTE:9 [ startProcessing::freeIdx#6 startProcessing::freeIdx#7 ] : zp ZP_BYTE:9 , reg byte x , reg byte y ,
|
|
Potential registers zp ZP_BYTE:10 [ startProcessing::freeIdx#2 startProcessing::freeIdx#8 startProcessing::i#2 startProcessing::i#1 ] : zp ZP_BYTE:10 , reg byte x ,
|
|
Potential registers zp ZP_WORD:11 [ startProcessing::spriteData#2 startProcessing::spriteData#0 startProcessing::spriteData#1 ] : zp ZP_WORD:11 ,
|
|
Potential registers zp ZP_BYTE:13 [ startProcessing::i1#2 startProcessing::i1#1 ] : zp ZP_BYTE:13 , reg byte x ,
|
|
Potential registers zp ZP_WORD:14 [ getCharToProcess::screen_line#4 getCharToProcess::screen_line#1 ] : zp ZP_WORD:14 ,
|
|
Potential registers zp ZP_BYTE:16 [ getCharToProcess::y#7 getCharToProcess::y#1 ] : zp ZP_BYTE:16 , reg byte x , reg byte y ,
|
|
Potential registers zp ZP_BYTE:17 [ getCharToProcess::x#2 getCharToProcess::x#1 ] : zp ZP_BYTE:17 , reg byte x , reg byte y ,
|
|
Potential registers zp ZP_WORD:18 [ getCharToProcess::closest_dist#2 getCharToProcess::closest_dist#8 getCharToProcess::closest_dist#10 getCharToProcess::closest_dist#12 ] : zp ZP_WORD:18 ,
|
|
Potential registers zp ZP_BYTE:20 [ getCharToProcess::closest_x#7 getCharToProcess::closest_x#9 getCharToProcess::return_x#1 getCharToProcess::return_x#7 ] : zp ZP_BYTE:20 , reg byte x , reg byte y ,
|
|
Potential registers zp ZP_BYTE:21 [ getCharToProcess::closest_y#7 getCharToProcess::closest_y#9 getCharToProcess::return_y#1 getCharToProcess::return_y#7 ] : zp ZP_BYTE:21 , reg byte x , reg byte y ,
|
|
Potential registers zp ZP_WORD:22 [ getCharToProcess::return_dist#1 getCharToProcess::return_dist#5 getCharToProcess::return_dist#6 getCharToProcess::dist#0 ] : zp ZP_WORD:22 ,
|
|
Potential registers zp ZP_BYTE:24 [ initSquareTables::x#2 initSquareTables::x#1 ] : zp ZP_BYTE:24 , reg byte x , reg byte y ,
|
|
Potential registers zp ZP_BYTE:25 [ initSquareTables::x_dist#0 initSquareTables::$4 initSquareTables::$2 ] : zp ZP_BYTE:25 , reg byte a , reg byte x , reg byte y ,
|
|
Potential registers zp ZP_BYTE:26 [ initSquareTables::y#2 initSquareTables::y#1 ] : zp ZP_BYTE:26 , reg byte x , reg byte y ,
|
|
Potential registers zp ZP_BYTE:27 [ initSquareTables::y_dist#0 initSquareTables::$12 initSquareTables::$10 ] : zp ZP_BYTE:27 , reg byte a , reg byte x , reg byte y ,
|
|
Potential registers zp ZP_BYTE:28 [ mul8u::b#1 ] : zp ZP_BYTE:28 , reg byte a , reg byte x , reg byte y ,
|
|
Potential registers zp ZP_BYTE:29 [ mul8u::b#0 ] : zp ZP_BYTE:29 , reg byte a , reg byte x , reg byte y ,
|
|
Potential registers zp ZP_BYTE:30 [ mul8u::a#3 mul8u::a#6 mul8u::a#2 mul8u::a#1 mul8u::a#0 ] : zp ZP_BYTE:30 , reg byte x , reg byte y ,
|
|
Potential registers zp ZP_WORD:31 [ mul8u::res#2 mul8u::res#6 mul8u::res#1 ] : zp ZP_WORD:31 ,
|
|
Potential registers zp ZP_WORD:33 [ mul8u::mb#2 mul8u::mb#0 mul8u::mb#1 ] : zp ZP_WORD:33 ,
|
|
Potential registers zp ZP_BYTE:35 [ irqBottom::i#2 irqBottom::i#1 ] : zp ZP_BYTE:35 , reg byte a , reg byte x , reg byte y ,
|
|
Potential registers zp ZP_BYTE:36 [ processChars::i#10 processChars::i#1 ] : zp ZP_BYTE:36 ,
|
|
Potential registers zp ZP_BYTE:37 [ irqTop::i#2 irqTop::i#1 ] : zp ZP_BYTE:37 , reg byte a , reg byte x , reg byte y ,
|
|
Potential registers zp ZP_BYTE:38 [ irqTop::i1#2 irqTop::i1#1 ] : zp ZP_BYTE:38 , reg byte a , reg byte x , reg byte y ,
|
|
Potential registers zp ZP_BYTE:39 [ main::$17 ] : zp ZP_BYTE:39 , reg byte x , reg byte y ,
|
|
Potential registers zp ZP_BYTE:40 [ getCharToProcess::return_x#0 ] : zp ZP_BYTE:40 , reg byte x , reg byte y ,
|
|
Potential registers zp ZP_BYTE:41 [ getCharToProcess::return_y#0 ] : zp ZP_BYTE:41 , reg byte x , reg byte y ,
|
|
Potential registers zp ZP_WORD:42 [ getCharToProcess::return_dist#0 ] : zp ZP_WORD:42 ,
|
|
Potential registers zp ZP_BYTE:44 [ main::center_x#0 ] : zp ZP_BYTE:44 , reg byte x , reg byte y ,
|
|
Potential registers zp ZP_BYTE:45 [ main::center_y#0 ] : zp ZP_BYTE:45 , reg byte x , reg byte y ,
|
|
Potential registers zp ZP_WORD:46 [ main::center_dist#0 ] : zp ZP_WORD:46 ,
|
|
Potential registers zp ZP_BYTE:48 [ startProcessing::center_x#0 ] : zp ZP_BYTE:48 , reg byte x ,
|
|
Potential registers zp ZP_BYTE:49 [ startProcessing::center_y#0 ] : zp ZP_BYTE:49 , reg byte x ,
|
|
Potential registers zp ZP_BYTE:50 [ startProcessing::$21 ] : zp ZP_BYTE:50 , reg byte a , reg byte x , reg byte y ,
|
|
Potential registers zp ZP_WORD:51 [ startProcessing::$0 ] : zp ZP_WORD:51 ,
|
|
Potential registers zp ZP_WORD:53 [ startProcessing::$1 ] : zp ZP_WORD:53 ,
|
|
Potential registers zp ZP_WORD:55 [ startProcessing::$3 ] : zp ZP_WORD:55 ,
|
|
Potential registers zp ZP_WORD:57 [ startProcessing::$4 ] : zp ZP_WORD:57 ,
|
|
Potential registers zp ZP_WORD:59 [ startProcessing::spriteX#0 ] : zp ZP_WORD:59 ,
|
|
Potential registers zp ZP_BYTE:61 [ startProcessing::$6 ] : zp ZP_BYTE:61 , reg byte a , reg byte x , reg byte y ,
|
|
Potential registers zp ZP_BYTE:62 [ startProcessing::spriteY#0 ] : zp ZP_BYTE:62 , reg byte x , reg byte y ,
|
|
Potential registers zp ZP_BYTE:63 [ startProcessing::spritePtr#0 ] : zp ZP_BYTE:63 , reg byte x , reg byte y ,
|
|
Potential registers zp ZP_WORD:64 [ startProcessing::$11 ] : zp ZP_WORD:64 ,
|
|
Potential registers zp ZP_WORD:66 [ startProcessing::$30 ] : zp ZP_WORD:66 ,
|
|
Potential registers zp ZP_WORD:68 [ startProcessing::$31 ] : zp ZP_WORD:68 ,
|
|
Potential registers zp ZP_WORD:70 [ startProcessing::$12 ] : zp ZP_WORD:70 ,
|
|
Potential registers zp ZP_WORD:72 [ startProcessing::$13 ] : zp ZP_WORD:72 ,
|
|
Potential registers zp ZP_WORD:74 [ startProcessing::screenPtr#0 ] : zp ZP_WORD:74 ,
|
|
Potential registers zp ZP_BYTE:76 [ startProcessing::$22 ] : zp ZP_BYTE:76 , reg byte x , reg byte y ,
|
|
Potential registers zp ZP_BYTE:77 [ getCharToProcess::$13 ] : zp ZP_BYTE:77 , reg byte x , reg byte y ,
|
|
Potential registers zp ZP_BYTE:78 [ getCharToProcess::$14 ] : zp ZP_BYTE:78 , reg byte a , reg byte x , reg byte y ,
|
|
Potential registers zp ZP_WORD:79 [ getCharToProcess::$9 ] : zp ZP_WORD:79 ,
|
|
Potential registers zp ZP_WORD:81 [ getCharToProcess::$15 ] : zp ZP_WORD:81 ,
|
|
Potential registers zp ZP_WORD:83 [ getCharToProcess::$16 ] : zp ZP_WORD:83 ,
|
|
Potential registers zp ZP_WORD:85 [ getCharToProcess::$10 ] : zp ZP_WORD:85 ,
|
|
Potential registers zp ZP_WORD:87 [ getCharToProcess::$11 ] : zp ZP_WORD:87 ,
|
|
Potential registers zp ZP_WORD:89 [ mul8u::return#2 ] : zp ZP_WORD:89 ,
|
|
Potential registers zp ZP_WORD:91 [ initSquareTables::$6 ] : zp ZP_WORD:91 ,
|
|
Potential registers zp ZP_BYTE:93 [ initSquareTables::$16 ] : zp ZP_BYTE:93 , reg byte a , reg byte x , reg byte y ,
|
|
Potential registers zp ZP_WORD:94 [ mul8u::return#3 ] : zp ZP_WORD:94 ,
|
|
Potential registers zp ZP_WORD:96 [ initSquareTables::$14 ] : zp ZP_WORD:96 ,
|
|
Potential registers zp ZP_BYTE:98 [ initSquareTables::$17 ] : zp ZP_BYTE:98 , reg byte a , reg byte x , reg byte y ,
|
|
Potential registers zp ZP_BYTE:99 [ mul8u::$1 ] : zp ZP_BYTE:99 , reg byte a , reg byte x , reg byte y ,
|
|
Potential registers zp ZP_BYTE:100 [ processChars::$18 ] : zp ZP_BYTE:100 , reg byte a , reg byte x , reg byte y ,
|
|
Potential registers zp ZP_WORD:101 [ processChars::processing#0 ] : zp ZP_WORD:101 ,
|
|
Potential registers zp ZP_BYTE:103 [ processChars::bitmask#0 ] : zp ZP_BYTE:103 ,
|
|
Potential registers zp ZP_BYTE:104 [ processChars::$9 ] : zp ZP_BYTE:104 , reg byte a , reg byte x , reg byte y ,
|
|
Potential registers zp ZP_BYTE:105 [ processChars::$10 ] : zp ZP_BYTE:105 , reg byte a , reg byte x , reg byte y ,
|
|
Potential registers zp ZP_BYTE:106 [ processChars::$13 ] : zp ZP_BYTE:106 , reg byte x ,
|
|
Potential registers zp ZP_BYTE:107 [ processChars::$12 ] : zp ZP_BYTE:107 , reg byte a , reg byte x , reg byte y ,
|
|
Potential registers zp ZP_BYTE:108 [ processChars::$16 ] : zp ZP_BYTE:108 , reg byte a , reg byte x , reg byte y ,
|
|
|
|
REGISTER UPLIFT SCOPES
|
|
Uplift Scope [getCharToProcess] 4,996.99: zp ZP_WORD:22 [ getCharToProcess::return_dist#1 getCharToProcess::return_dist#5 getCharToProcess::return_dist#6 getCharToProcess::dist#0 ] 3,090.17: zp ZP_WORD:18 [ getCharToProcess::closest_dist#2 getCharToProcess::closest_dist#8 getCharToProcess::closest_dist#10 getCharToProcess::closest_dist#12 ] 2,820.67: zp ZP_BYTE:21 [ getCharToProcess::closest_y#7 getCharToProcess::closest_y#9 getCharToProcess::return_y#1 getCharToProcess::return_y#7 ] 2,002: zp ZP_BYTE:78 [ getCharToProcess::$14 ] 1,833.24: zp ZP_BYTE:20 [ getCharToProcess::closest_x#7 getCharToProcess::closest_x#9 getCharToProcess::return_x#1 getCharToProcess::return_x#7 ] 1,456: zp ZP_BYTE:17 [ getCharToProcess::x#2 getCharToProcess::x#1 ] 1,001: zp ZP_BYTE:77 [ getCharToProcess::$13 ] 238.75: zp ZP_BYTE:16 [ getCharToProcess::y#7 getCharToProcess::y#1 ] 130.7: zp ZP_WORD:14 [ getCharToProcess::screen_line#4 getCharToProcess::screen_line#1 ] 7.33: zp ZP_BYTE:40 [ getCharToProcess::return_x#0 ] 7.33: zp ZP_BYTE:41 [ getCharToProcess::return_y#0 ] 7.33: zp ZP_WORD:42 [ getCharToProcess::return_dist#0 ] 4: zp ZP_WORD:81 [ getCharToProcess::$15 ] 4: zp ZP_WORD:83 [ getCharToProcess::$16 ] 4: zp ZP_WORD:85 [ getCharToProcess::$10 ] 4: zp ZP_WORD:87 [ getCharToProcess::$11 ] 3: zp ZP_WORD:79 [ getCharToProcess::$9 ]
|
|
Uplift Scope [startProcessing] 3,090.57: zp ZP_BYTE:10 [ startProcessing::freeIdx#2 startProcessing::freeIdx#8 startProcessing::i#2 startProcessing::i#1 ] 2,002: zp ZP_BYTE:50 [ startProcessing::$21 ] 235.67: zp ZP_BYTE:9 [ startProcessing::freeIdx#6 startProcessing::freeIdx#7 ] 223.83: zp ZP_WORD:11 [ startProcessing::spriteData#2 startProcessing::spriteData#0 startProcessing::spriteData#1 ] 218.83: zp ZP_BYTE:13 [ startProcessing::i1#2 startProcessing::i1#1 ] 4: zp ZP_WORD:51 [ startProcessing::$0 ] 4: zp ZP_WORD:53 [ startProcessing::$1 ] 4: zp ZP_WORD:55 [ startProcessing::$3 ] 4: zp ZP_WORD:57 [ startProcessing::$4 ] 4: zp ZP_BYTE:61 [ startProcessing::$6 ] 4: zp ZP_WORD:66 [ startProcessing::$30 ] 4: zp ZP_WORD:68 [ startProcessing::$31 ] 4: zp ZP_WORD:70 [ startProcessing::$12 ] 4: zp ZP_WORD:72 [ startProcessing::$13 ] 3: zp ZP_WORD:64 [ startProcessing::$11 ] 2.33: zp ZP_BYTE:76 [ startProcessing::$22 ] 0.57: zp ZP_WORD:74 [ startProcessing::screenPtr#0 ] 0.5: zp ZP_BYTE:49 [ startProcessing::center_y#0 ] 0.41: zp ZP_BYTE:48 [ startProcessing::center_x#0 ] 0.4: zp ZP_BYTE:62 [ startProcessing::spriteY#0 ] 0.36: zp ZP_WORD:59 [ startProcessing::spriteX#0 ] 0.36: zp ZP_BYTE:63 [ startProcessing::spritePtr#0 ]
|
|
Uplift Scope [mul8u] 349.43: zp ZP_WORD:31 [ mul8u::res#2 mul8u::res#6 mul8u::res#1 ] 269.57: zp ZP_WORD:33 [ mul8u::mb#2 mul8u::mb#0 mul8u::mb#1 ] 214.67: zp ZP_BYTE:30 [ mul8u::a#3 mul8u::a#6 mul8u::a#2 mul8u::a#1 mul8u::a#0 ] 202: zp ZP_BYTE:99 [ mul8u::$1 ] 22: zp ZP_BYTE:28 [ mul8u::b#1 ] 22: zp ZP_BYTE:29 [ mul8u::b#0 ] 22: zp ZP_WORD:89 [ mul8u::return#2 ] 22: zp ZP_WORD:94 [ mul8u::return#3 ]
|
|
Uplift Scope [initSquareTables] 66: zp ZP_BYTE:25 [ initSquareTables::x_dist#0 initSquareTables::$4 initSquareTables::$2 ] 66: zp ZP_BYTE:27 [ initSquareTables::y_dist#0 initSquareTables::$12 initSquareTables::$10 ] 22: zp ZP_BYTE:24 [ initSquareTables::x#2 initSquareTables::x#1 ] 22: zp ZP_BYTE:26 [ initSquareTables::y#2 initSquareTables::y#1 ] 22: zp ZP_BYTE:93 [ initSquareTables::$16 ] 22: zp ZP_BYTE:98 [ initSquareTables::$17 ] 11: zp ZP_WORD:91 [ initSquareTables::$6 ] 11: zp ZP_WORD:96 [ initSquareTables::$14 ]
|
|
Uplift Scope [main] 33: zp ZP_WORD:3 [ main::sp#2 main::sp#1 ] 27.5: zp ZP_WORD:5 [ main::src#2 main::src#1 ] 22: zp ZP_WORD:7 [ main::dst#2 main::dst#1 ] 22: zp ZP_WORD:46 [ main::center_dist#0 ] 20.62: zp ZP_BYTE:2 [ main::i#2 main::i#1 ] 12.83: zp ZP_BYTE:39 [ main::$17 ] 5.5: zp ZP_BYTE:44 [ main::center_x#0 ] 5.5: zp ZP_BYTE:45 [ main::center_y#0 ]
|
|
Uplift Scope [processChars] 22: zp ZP_BYTE:100 [ processChars::$18 ] 22: zp ZP_BYTE:104 [ processChars::$9 ] 22: zp ZP_BYTE:105 [ processChars::$10 ] 22: zp ZP_BYTE:107 [ processChars::$12 ] 22: zp ZP_BYTE:108 [ processChars::$16 ] 18.33: zp ZP_BYTE:36 [ processChars::i#10 processChars::i#1 ] 11: zp ZP_BYTE:106 [ processChars::$13 ] 2.89: zp ZP_BYTE:103 [ processChars::bitmask#0 ] 0.58: zp ZP_WORD:101 [ processChars::processing#0 ]
|
|
Uplift Scope [irqTop] 38.5: zp ZP_BYTE:37 [ irqTop::i#2 irqTop::i#1 ] 38.5: zp ZP_BYTE:38 [ irqTop::i1#2 irqTop::i1#1 ]
|
|
Uplift Scope [irqBottom] 38.5: zp ZP_BYTE:35 [ irqBottom::i#2 irqBottom::i#1 ]
|
|
Uplift Scope [ProcessingChar]
|
|
Uplift Scope [ProcessingSprite]
|
|
Uplift Scope [setupRasterIrq]
|
|
Uplift Scope []
|
|
|
|
Uplifting [getCharToProcess] best 254157 combination zp ZP_WORD:22 [ getCharToProcess::return_dist#1 getCharToProcess::return_dist#5 getCharToProcess::return_dist#6 getCharToProcess::dist#0 ] zp ZP_WORD:18 [ getCharToProcess::closest_dist#2 getCharToProcess::closest_dist#8 getCharToProcess::closest_dist#10 getCharToProcess::closest_dist#12 ] zp ZP_BYTE:21 [ getCharToProcess::closest_y#7 getCharToProcess::closest_y#9 getCharToProcess::return_y#1 getCharToProcess::return_y#7 ] reg byte a [ getCharToProcess::$14 ] zp ZP_BYTE:20 [ getCharToProcess::closest_x#7 getCharToProcess::closest_x#9 getCharToProcess::return_x#1 getCharToProcess::return_x#7 ] zp ZP_BYTE:17 [ getCharToProcess::x#2 getCharToProcess::x#1 ] zp ZP_BYTE:77 [ getCharToProcess::$13 ] zp ZP_BYTE:16 [ getCharToProcess::y#7 getCharToProcess::y#1 ] zp ZP_WORD:14 [ getCharToProcess::screen_line#4 getCharToProcess::screen_line#1 ] zp ZP_BYTE:40 [ getCharToProcess::return_x#0 ] zp ZP_BYTE:41 [ getCharToProcess::return_y#0 ] zp ZP_WORD:42 [ getCharToProcess::return_dist#0 ] zp ZP_WORD:81 [ getCharToProcess::$15 ] zp ZP_WORD:83 [ getCharToProcess::$16 ] zp ZP_WORD:85 [ getCharToProcess::$10 ] zp ZP_WORD:87 [ getCharToProcess::$11 ] zp ZP_WORD:79 [ getCharToProcess::$9 ]
|
|
Limited combination testing to 100 combinations of 8748 possible.
|
|
Uplifting [startProcessing] best 248353 combination zp ZP_BYTE:10 [ startProcessing::freeIdx#2 startProcessing::freeIdx#8 startProcessing::i#2 startProcessing::i#1 ] reg byte a [ startProcessing::$21 ] reg byte x [ startProcessing::freeIdx#6 startProcessing::freeIdx#7 ] zp ZP_WORD:11 [ startProcessing::spriteData#2 startProcessing::spriteData#0 startProcessing::spriteData#1 ] reg byte x [ startProcessing::i1#2 startProcessing::i1#1 ] zp ZP_WORD:51 [ startProcessing::$0 ] zp ZP_WORD:53 [ startProcessing::$1 ] zp ZP_WORD:55 [ startProcessing::$3 ] zp ZP_WORD:57 [ startProcessing::$4 ] reg byte a [ startProcessing::$6 ] zp ZP_WORD:66 [ startProcessing::$30 ] zp ZP_WORD:68 [ startProcessing::$31 ] zp ZP_WORD:70 [ startProcessing::$12 ] zp ZP_WORD:72 [ startProcessing::$13 ] zp ZP_WORD:64 [ startProcessing::$11 ] zp ZP_BYTE:76 [ startProcessing::$22 ] zp ZP_WORD:74 [ startProcessing::screenPtr#0 ] zp ZP_BYTE:49 [ startProcessing::center_y#0 ] zp ZP_BYTE:48 [ startProcessing::center_x#0 ] zp ZP_BYTE:62 [ startProcessing::spriteY#0 ] zp ZP_WORD:59 [ startProcessing::spriteX#0 ] zp ZP_BYTE:63 [ startProcessing::spritePtr#0 ]
|
|
Limited combination testing to 100 combinations of 20736 possible.
|
|
Uplifting [mul8u] best 247327 combination zp ZP_WORD:31 [ mul8u::res#2 mul8u::res#6 mul8u::res#1 ] zp ZP_WORD:33 [ mul8u::mb#2 mul8u::mb#0 mul8u::mb#1 ] reg byte x [ mul8u::a#3 mul8u::a#6 mul8u::a#2 mul8u::a#1 mul8u::a#0 ] reg byte a [ mul8u::$1 ] reg byte a [ mul8u::b#1 ] reg byte a [ mul8u::b#0 ] zp ZP_WORD:89 [ mul8u::return#2 ] zp ZP_WORD:94 [ mul8u::return#3 ]
|
|
Limited combination testing to 100 combinations of 192 possible.
|
|
Uplifting [initSquareTables] best 247167 combination reg byte a [ initSquareTables::x_dist#0 initSquareTables::$4 initSquareTables::$2 ] reg byte a [ initSquareTables::y_dist#0 initSquareTables::$12 initSquareTables::$10 ] zp ZP_BYTE:24 [ initSquareTables::x#2 initSquareTables::x#1 ] zp ZP_BYTE:26 [ initSquareTables::y#2 initSquareTables::y#1 ] zp ZP_BYTE:93 [ initSquareTables::$16 ] zp ZP_BYTE:98 [ initSquareTables::$17 ] zp ZP_WORD:91 [ initSquareTables::$6 ] zp ZP_WORD:96 [ initSquareTables::$14 ]
|
|
Limited combination testing to 100 combinations of 2304 possible.
|
|
Uplifting [main] best 246787 combination zp ZP_WORD:3 [ main::sp#2 main::sp#1 ] zp ZP_WORD:5 [ main::src#2 main::src#1 ] zp ZP_WORD:7 [ main::dst#2 main::dst#1 ] zp ZP_WORD:46 [ main::center_dist#0 ] reg byte y [ main::i#2 main::i#1 ] reg byte x [ main::$17 ] reg byte y [ main::center_x#0 ] reg byte x [ main::center_y#0 ]
|
|
Uplifting [processChars] best 246547 combination reg byte a [ processChars::$18 ] reg byte a [ processChars::$9 ] reg byte a [ processChars::$10 ] reg byte a [ processChars::$12 ] zp ZP_BYTE:108 [ processChars::$16 ] zp ZP_BYTE:36 [ processChars::i#10 processChars::i#1 ] zp ZP_BYTE:106 [ processChars::$13 ] zp ZP_BYTE:103 [ processChars::bitmask#0 ] zp ZP_WORD:101 [ processChars::processing#0 ]
|
|
Limited combination testing to 100 combinations of 2048 possible.
|
|
Uplifting [irqTop] best 246367 combination reg byte x [ irqTop::i#2 irqTop::i#1 ] reg byte x [ irqTop::i1#2 irqTop::i1#1 ]
|
|
Uplifting [irqBottom] best 246277 combination reg byte x [ irqBottom::i#2 irqBottom::i#1 ]
|
|
Uplifting [ProcessingChar] best 246277 combination
|
|
Uplifting [ProcessingSprite] best 246277 combination
|
|
Uplifting [setupRasterIrq] best 246277 combination
|
|
Uplifting [] best 246277 combination
|
|
Attempting to uplift remaining variables inzp ZP_BYTE:10 [ startProcessing::freeIdx#2 startProcessing::freeIdx#8 startProcessing::i#2 startProcessing::i#1 ]
|
|
Uplifting [startProcessing] best 246277 combination zp ZP_BYTE:10 [ startProcessing::freeIdx#2 startProcessing::freeIdx#8 startProcessing::i#2 startProcessing::i#1 ]
|
|
Attempting to uplift remaining variables inzp ZP_BYTE:21 [ getCharToProcess::closest_y#7 getCharToProcess::closest_y#9 getCharToProcess::return_y#1 getCharToProcess::return_y#7 ]
|
|
Uplifting [getCharToProcess] best 246277 combination zp ZP_BYTE:21 [ getCharToProcess::closest_y#7 getCharToProcess::closest_y#9 getCharToProcess::return_y#1 getCharToProcess::return_y#7 ]
|
|
Attempting to uplift remaining variables inzp ZP_BYTE:20 [ getCharToProcess::closest_x#7 getCharToProcess::closest_x#9 getCharToProcess::return_x#1 getCharToProcess::return_x#7 ]
|
|
Uplifting [getCharToProcess] best 246277 combination zp ZP_BYTE:20 [ getCharToProcess::closest_x#7 getCharToProcess::closest_x#9 getCharToProcess::return_x#1 getCharToProcess::return_x#7 ]
|
|
Attempting to uplift remaining variables inzp ZP_BYTE:17 [ getCharToProcess::x#2 getCharToProcess::x#1 ]
|
|
Uplifting [getCharToProcess] best 246277 combination zp ZP_BYTE:17 [ getCharToProcess::x#2 getCharToProcess::x#1 ]
|
|
Attempting to uplift remaining variables inzp ZP_BYTE:77 [ getCharToProcess::$13 ]
|
|
Uplifting [getCharToProcess] best 242277 combination reg byte x [ getCharToProcess::$13 ]
|
|
Attempting to uplift remaining variables inzp ZP_BYTE:16 [ getCharToProcess::y#7 getCharToProcess::y#1 ]
|
|
Uplifting [getCharToProcess] best 242277 combination zp ZP_BYTE:16 [ getCharToProcess::y#7 getCharToProcess::y#1 ]
|
|
Attempting to uplift remaining variables inzp ZP_BYTE:24 [ initSquareTables::x#2 initSquareTables::x#1 ]
|
|
Uplifting [initSquareTables] best 242277 combination zp ZP_BYTE:24 [ initSquareTables::x#2 initSquareTables::x#1 ]
|
|
Attempting to uplift remaining variables inzp ZP_BYTE:26 [ initSquareTables::y#2 initSquareTables::y#1 ]
|
|
Uplifting [initSquareTables] best 242277 combination zp ZP_BYTE:26 [ initSquareTables::y#2 initSquareTables::y#1 ]
|
|
Attempting to uplift remaining variables inzp ZP_BYTE:93 [ initSquareTables::$16 ]
|
|
Uplifting [initSquareTables] best 242237 combination reg byte a [ initSquareTables::$16 ]
|
|
Attempting to uplift remaining variables inzp ZP_BYTE:98 [ initSquareTables::$17 ]
|
|
Uplifting [initSquareTables] best 242197 combination reg byte a [ initSquareTables::$17 ]
|
|
Attempting to uplift remaining variables inzp ZP_BYTE:108 [ processChars::$16 ]
|
|
Uplifting [processChars] best 242137 combination reg byte a [ processChars::$16 ]
|
|
Attempting to uplift remaining variables inzp ZP_BYTE:36 [ processChars::i#10 processChars::i#1 ]
|
|
Uplifting [processChars] best 242137 combination zp ZP_BYTE:36 [ processChars::i#10 processChars::i#1 ]
|
|
Attempting to uplift remaining variables inzp ZP_BYTE:106 [ processChars::$13 ]
|
|
Uplifting [processChars] best 242067 combination reg byte x [ processChars::$13 ]
|
|
Attempting to uplift remaining variables inzp ZP_BYTE:40 [ getCharToProcess::return_x#0 ]
|
|
Uplifting [getCharToProcess] best 242007 combination reg byte y [ getCharToProcess::return_x#0 ]
|
|
Attempting to uplift remaining variables inzp ZP_BYTE:41 [ getCharToProcess::return_y#0 ]
|
|
Uplifting [getCharToProcess] best 241947 combination reg byte x [ getCharToProcess::return_y#0 ]
|
|
Attempting to uplift remaining variables inzp ZP_BYTE:103 [ processChars::bitmask#0 ]
|
|
Uplifting [processChars] best 241947 combination zp ZP_BYTE:103 [ processChars::bitmask#0 ]
|
|
Attempting to uplift remaining variables inzp ZP_BYTE:76 [ startProcessing::$22 ]
|
|
Uplifting [startProcessing] best 241928 combination reg byte x [ startProcessing::$22 ]
|
|
Attempting to uplift remaining variables inzp ZP_BYTE:49 [ startProcessing::center_y#0 ]
|
|
Uplifting [startProcessing] best 241928 combination zp ZP_BYTE:49 [ startProcessing::center_y#0 ]
|
|
Attempting to uplift remaining variables inzp ZP_BYTE:48 [ startProcessing::center_x#0 ]
|
|
Uplifting [startProcessing] best 241928 combination zp ZP_BYTE:48 [ startProcessing::center_x#0 ]
|
|
Attempting to uplift remaining variables inzp ZP_BYTE:62 [ startProcessing::spriteY#0 ]
|
|
Uplifting [startProcessing] best 241926 combination reg byte y [ startProcessing::spriteY#0 ]
|
|
Attempting to uplift remaining variables inzp ZP_BYTE:63 [ startProcessing::spritePtr#0 ]
|
|
Uplifting [startProcessing] best 241926 combination zp ZP_BYTE:63 [ startProcessing::spritePtr#0 ]
|
|
Coalescing zero page register with common assignment [ zp ZP_WORD:11 [ startProcessing::spriteData#2 startProcessing::spriteData#0 startProcessing::spriteData#1 ] ] with [ zp ZP_WORD:53 [ startProcessing::$1 ] ] - score: 1
|
|
Coalescing zero page register with common assignment [ zp ZP_WORD:22 [ getCharToProcess::return_dist#1 getCharToProcess::return_dist#5 getCharToProcess::return_dist#6 getCharToProcess::dist#0 ] ] with [ zp ZP_WORD:42 [ getCharToProcess::return_dist#0 ] ] - score: 1
|
|
Coalescing zero page register with common assignment [ zp ZP_WORD:31 [ mul8u::res#2 mul8u::res#6 mul8u::res#1 ] ] with [ zp ZP_WORD:89 [ mul8u::return#2 ] ] - score: 1
|
|
Coalescing zero page register with common assignment [ zp ZP_WORD:31 [ mul8u::res#2 mul8u::res#6 mul8u::res#1 mul8u::return#2 ] ] with [ zp ZP_WORD:94 [ mul8u::return#3 ] ] - score: 1
|
|
Coalescing zero page register with common assignment [ zp ZP_WORD:55 [ startProcessing::$3 ] ] with [ zp ZP_WORD:57 [ startProcessing::$4 ] ] - score: 1
|
|
Coalescing zero page register with common assignment [ zp ZP_WORD:64 [ startProcessing::$11 ] ] with [ zp ZP_WORD:68 [ startProcessing::$31 ] ] - score: 1
|
|
Coalescing zero page register with common assignment [ zp ZP_WORD:70 [ startProcessing::$12 ] ] with [ zp ZP_WORD:72 [ startProcessing::$13 ] ] - score: 1
|
|
Coalescing zero page register with common assignment [ zp ZP_WORD:79 [ getCharToProcess::$9 ] ] with [ zp ZP_WORD:83 [ getCharToProcess::$16 ] ] - score: 1
|
|
Coalescing zero page register with common assignment [ zp ZP_WORD:85 [ getCharToProcess::$10 ] ] with [ zp ZP_WORD:87 [ getCharToProcess::$11 ] ] - score: 1
|
|
Coalescing zero page register with common assignment [ zp ZP_WORD:11 [ startProcessing::spriteData#2 startProcessing::spriteData#0 startProcessing::spriteData#1 startProcessing::$1 ] ] with [ zp ZP_WORD:51 [ startProcessing::$0 ] ] - score: 1
|
|
Coalescing zero page register with common assignment [ zp ZP_WORD:22 [ getCharToProcess::return_dist#1 getCharToProcess::return_dist#5 getCharToProcess::return_dist#6 getCharToProcess::dist#0 getCharToProcess::return_dist#0 ] ] with [ zp ZP_WORD:46 [ main::center_dist#0 ] ] - score: 1
|
|
Coalescing zero page register with common assignment [ zp ZP_WORD:31 [ mul8u::res#2 mul8u::res#6 mul8u::res#1 mul8u::return#2 mul8u::return#3 ] ] with [ zp ZP_WORD:91 [ initSquareTables::$6 ] ] - score: 1
|
|
Coalescing zero page register with common assignment [ zp ZP_WORD:31 [ mul8u::res#2 mul8u::res#6 mul8u::res#1 mul8u::return#2 mul8u::return#3 initSquareTables::$6 ] ] with [ zp ZP_WORD:96 [ initSquareTables::$14 ] ] - score: 1
|
|
Coalescing zero page register with common assignment [ zp ZP_WORD:55 [ startProcessing::$3 startProcessing::$4 ] ] with [ zp ZP_WORD:59 [ startProcessing::spriteX#0 ] ] - score: 1
|
|
Coalescing zero page register with common assignment [ zp ZP_WORD:64 [ startProcessing::$11 startProcessing::$31 ] ] with [ zp ZP_WORD:70 [ startProcessing::$12 startProcessing::$13 ] ] - score: 1
|
|
Coalescing zero page register with common assignment [ zp ZP_WORD:79 [ getCharToProcess::$9 getCharToProcess::$16 ] ] with [ zp ZP_WORD:85 [ getCharToProcess::$10 getCharToProcess::$11 ] ] - score: 1
|
|
Coalescing zero page register with common assignment [ zp ZP_WORD:64 [ startProcessing::$11 startProcessing::$31 startProcessing::$12 startProcessing::$13 ] ] with [ zp ZP_WORD:74 [ startProcessing::screenPtr#0 ] ] - score: 1
|
|
Allocated (was zp ZP_WORD:3) zp ZP_WORD:2 [ main::sp#2 main::sp#1 ]
|
|
Allocated (was zp ZP_WORD:5) zp ZP_WORD:4 [ main::src#2 main::src#1 ]
|
|
Allocated (was zp ZP_WORD:7) zp ZP_WORD:6 [ main::dst#2 main::dst#1 ]
|
|
Allocated (was zp ZP_BYTE:10) zp ZP_BYTE:8 [ startProcessing::freeIdx#2 startProcessing::freeIdx#8 startProcessing::i#2 startProcessing::i#1 ]
|
|
Allocated (was zp ZP_WORD:11) zp ZP_WORD:9 [ startProcessing::spriteData#2 startProcessing::spriteData#0 startProcessing::spriteData#1 startProcessing::$1 startProcessing::$0 ]
|
|
Allocated (was zp ZP_WORD:14) zp ZP_WORD:11 [ getCharToProcess::screen_line#4 getCharToProcess::screen_line#1 ]
|
|
Allocated (was zp ZP_BYTE:16) zp ZP_BYTE:13 [ getCharToProcess::y#7 getCharToProcess::y#1 ]
|
|
Allocated (was zp ZP_BYTE:17) zp ZP_BYTE:14 [ getCharToProcess::x#2 getCharToProcess::x#1 ]
|
|
Allocated (was zp ZP_WORD:18) zp ZP_WORD:15 [ getCharToProcess::closest_dist#2 getCharToProcess::closest_dist#8 getCharToProcess::closest_dist#10 getCharToProcess::closest_dist#12 ]
|
|
Allocated (was zp ZP_BYTE:20) zp ZP_BYTE:17 [ getCharToProcess::closest_x#7 getCharToProcess::closest_x#9 getCharToProcess::return_x#1 getCharToProcess::return_x#7 ]
|
|
Allocated (was zp ZP_BYTE:21) zp ZP_BYTE:18 [ getCharToProcess::closest_y#7 getCharToProcess::closest_y#9 getCharToProcess::return_y#1 getCharToProcess::return_y#7 ]
|
|
Allocated (was zp ZP_WORD:22) zp ZP_WORD:19 [ getCharToProcess::return_dist#1 getCharToProcess::return_dist#5 getCharToProcess::return_dist#6 getCharToProcess::dist#0 getCharToProcess::return_dist#0 main::center_dist#0 ]
|
|
Allocated (was zp ZP_BYTE:24) zp ZP_BYTE:21 [ initSquareTables::x#2 initSquareTables::x#1 ]
|
|
Allocated (was zp ZP_BYTE:26) zp ZP_BYTE:22 [ initSquareTables::y#2 initSquareTables::y#1 ]
|
|
Allocated (was zp ZP_WORD:31) zp ZP_WORD:23 [ mul8u::res#2 mul8u::res#6 mul8u::res#1 mul8u::return#2 mul8u::return#3 initSquareTables::$6 initSquareTables::$14 ]
|
|
Allocated (was zp ZP_WORD:33) zp ZP_WORD:25 [ mul8u::mb#2 mul8u::mb#0 mul8u::mb#1 ]
|
|
Allocated (was zp ZP_BYTE:36) zp ZP_BYTE:27 [ processChars::i#10 processChars::i#1 ]
|
|
Allocated (was zp ZP_BYTE:48) zp ZP_BYTE:28 [ startProcessing::center_x#0 ]
|
|
Allocated (was zp ZP_BYTE:49) zp ZP_BYTE:29 [ startProcessing::center_y#0 ]
|
|
Allocated (was zp ZP_WORD:55) zp ZP_WORD:30 [ startProcessing::$3 startProcessing::$4 startProcessing::spriteX#0 ]
|
|
Allocated (was zp ZP_BYTE:63) zp ZP_BYTE:32 [ startProcessing::spritePtr#0 ]
|
|
Allocated (was zp ZP_WORD:64) zp ZP_WORD:33 [ startProcessing::$11 startProcessing::$31 startProcessing::$12 startProcessing::$13 startProcessing::screenPtr#0 ]
|
|
Allocated (was zp ZP_WORD:66) zp ZP_WORD:35 [ startProcessing::$30 ]
|
|
Allocated (was zp ZP_WORD:79) zp ZP_WORD:37 [ getCharToProcess::$9 getCharToProcess::$16 getCharToProcess::$10 getCharToProcess::$11 ]
|
|
Allocated (was zp ZP_WORD:81) zp ZP_WORD:39 [ getCharToProcess::$15 ]
|
|
Allocated (was zp ZP_WORD:101) zp ZP_WORD:41 [ processChars::processing#0 ]
|
|
Allocated (was zp ZP_BYTE:103) zp ZP_BYTE:43 [ processChars::bitmask#0 ]
|
|
|
|
ASSEMBLER BEFORE OPTIMIZATION
|
|
//SEG0 File Comments
|
|
// Black Hole at the center of the BASIC screen sucking in letters
|
|
//SEG1 Basic Upstart
|
|
.pc = $801 "Basic"
|
|
:BasicUpstart(bbegin)
|
|
.pc = $80d "Program"
|
|
//SEG2 Global Constants & labels
|
|
.const SIZEOF_POINTER = 2
|
|
.const OFFSET_STRUCT_PROCESSINGSPRITE_Y = 2
|
|
.const OFFSET_STRUCT_PROCESSINGSPRITE_ID = 3
|
|
.const OFFSET_STRUCT_PROCESSINGSPRITE_PTR = 4
|
|
.const OFFSET_STRUCT_PROCESSINGSPRITE_STATUS = 5
|
|
.const OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR = 6
|
|
// Processor port data direction register
|
|
.label PROCPORT_DDR = 0
|
|
// Mask for PROCESSOR_PORT_DDR which allows only memory configuration to be written
|
|
.const PROCPORT_DDR_MEMORY_MASK = 7
|
|
// Processor Port Register controlling RAM/ROM configuration and the datasette
|
|
.label PROCPORT = 1
|
|
// RAM in $A000, $E000 I/O in $D000
|
|
.const PROCPORT_RAM_IO = $35
|
|
// The offset of the sprite pointers from the screen start address
|
|
.const SPRITE_PTRS = $3f8
|
|
.label SPRITES_XPOS = $d000
|
|
.label SPRITES_YPOS = $d001
|
|
.label SPRITES_XMSB = $d010
|
|
.label RASTER = $d012
|
|
.label SPRITES_ENABLE = $d015
|
|
.label BORDERCOL = $d020
|
|
.label BGCOL = $d021
|
|
.label VIC_CONTROL = $d011
|
|
// VIC II IRQ Status Register
|
|
.label IRQ_STATUS = $d019
|
|
// VIC II IRQ Enable Register
|
|
.label IRQ_ENABLE = $d01a
|
|
// Bits for the IRQ Status/Enable Registers
|
|
.const IRQ_RASTER = 1
|
|
// CIA#1 Interrupt Status & Control Register
|
|
.label CIA1_INTERRUPT = $dc0d
|
|
// Value that disables all CIA interrupts when stored to the CIA Interrupt registers
|
|
.const CIA_INTERRUPT_CLEAR = $7f
|
|
// The vector used when the HARDWARE serves IRQ interrupts
|
|
.label HARDWARE_IRQ = $fffe
|
|
.const WHITE = 1
|
|
.const BLUE = 6
|
|
.const LIGHT_BLUE = $e
|
|
// Address of the screen
|
|
.label SCREEN = $400
|
|
// Sprite data for the animating sprites
|
|
.label SPRITE_DATA = $2000
|
|
// Max number of chars processed at once
|
|
.const NUM_PROCESSING = 1
|
|
// Distance value meaning not found
|
|
.const NOT_FOUND = $ffff
|
|
// Values for ProcessingSprite.status
|
|
.const STATUS_FREE = 0
|
|
.const STATUS_NEW = 1
|
|
.const STATUS_PROCESSING = 2
|
|
.const RASTER_IRQ_TOP = $30
|
|
.const RASTER_IRQ_MIDDLE = $ff
|
|
//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
|
|
//SEG7 [4] phi from @1 to main [phi:@1->main]
|
|
main_from_b1:
|
|
jsr main
|
|
//SEG8 [3] phi from @1 to @end [phi:@1->@end]
|
|
bend_from_b1:
|
|
jmp bend
|
|
//SEG9 @end
|
|
bend:
|
|
//SEG10 main
|
|
main: {
|
|
.label sp = 2
|
|
.label src = 4
|
|
.label dst = 6
|
|
.label center_dist = $13
|
|
//SEG11 [5] phi from main to main::@1 [phi:main->main::@1]
|
|
b1_from_main:
|
|
//SEG12 [5] phi (byte) main::i#2 = (byte) 0 [phi:main->main::@1#0] -- vbuyy=vbuc1
|
|
ldy #0
|
|
jmp b1
|
|
// Init processing array
|
|
//SEG13 [5] phi from main::@1 to main::@1 [phi:main::@1->main::@1]
|
|
b1_from_b1:
|
|
//SEG14 [5] phi (byte) main::i#2 = (byte) main::i#1 [phi:main::@1->main::@1#0] -- register_copy
|
|
jmp b1
|
|
//SEG15 main::@1
|
|
b1:
|
|
//SEG16 [6] (byte~) main::$17 ← (byte) main::i#2 << (byte) 3 -- vbuxx=vbuyy_rol_3
|
|
tya
|
|
asl
|
|
asl
|
|
asl
|
|
tax
|
|
//SEG17 [7] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (byte~) main::$17) ← (byte) 0 -- pwuc1_derefidx_vbuxx=vbuc2
|
|
lda #0
|
|
sta PROCESSING,x
|
|
lda #0
|
|
sta PROCESSING+1,x
|
|
//SEG18 [8] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y + (byte~) main::$17) ← (byte) 0 -- pbuc1_derefidx_vbuxx=vbuc2
|
|
lda #0
|
|
sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_Y,x
|
|
//SEG19 [9] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID + (byte~) main::$17) ← (byte) 0 -- pbuc1_derefidx_vbuxx=vbuc2
|
|
lda #0
|
|
sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_ID,x
|
|
//SEG20 [10] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR + (byte~) main::$17) ← (byte) 0 -- pbuc1_derefidx_vbuxx=vbuc2
|
|
lda #0
|
|
sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_PTR,x
|
|
//SEG21 [11] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS + (byte~) main::$17) ← (const byte) STATUS_FREE#0 -- pbuc1_derefidx_vbuxx=vbuc2
|
|
lda #STATUS_FREE
|
|
sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_STATUS,x
|
|
//SEG22 [12] *((byte**)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR + (byte~) main::$17) ← (byte*) 0 -- pptc1_derefidx_vbuxx=pbuc2
|
|
lda #<0
|
|
sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR,x
|
|
lda #>0
|
|
sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR+1,x
|
|
//SEG23 [13] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuyy=_inc_vbuyy
|
|
iny
|
|
//SEG24 [14] if((byte) main::i#1!=(byte) 1) goto main::@1 -- vbuyy_neq_vbuc1_then_la1
|
|
cpy #1
|
|
bne b1_from_b1
|
|
//SEG25 [15] phi from main::@1 to main::@2 [phi:main::@1->main::@2]
|
|
b2_from_b1:
|
|
//SEG26 [15] phi (byte*) main::sp#2 = (const byte*) SPRITE_DATA#0 [phi:main::@1->main::@2#0] -- pbuz1=pbuc1
|
|
lda #<SPRITE_DATA
|
|
sta sp
|
|
lda #>SPRITE_DATA
|
|
sta sp+1
|
|
jmp b2
|
|
// Clear sprites
|
|
//SEG27 [15] phi from main::@2 to main::@2 [phi:main::@2->main::@2]
|
|
b2_from_b2:
|
|
//SEG28 [15] phi (byte*) main::sp#2 = (byte*) main::sp#1 [phi:main::@2->main::@2#0] -- register_copy
|
|
jmp b2
|
|
//SEG29 main::@2
|
|
b2:
|
|
//SEG30 [16] *((byte*) main::sp#2) ← (byte) 0 -- _deref_pbuz1=vbuc1
|
|
lda #0
|
|
ldy #0
|
|
sta (sp),y
|
|
//SEG31 [17] (byte*) main::sp#1 ← ++ (byte*) main::sp#2 -- pbuz1=_inc_pbuz1
|
|
inc sp
|
|
bne !+
|
|
inc sp+1
|
|
!:
|
|
//SEG32 [18] if((byte*) main::sp#1<(const byte*) SPRITE_DATA#0+(const byte) SIZEOF_POINTER) goto main::@2 -- pbuz1_lt_pbuc1_then_la1
|
|
lda sp+1
|
|
cmp #>SPRITE_DATA+SIZEOF_POINTER
|
|
bcc b2_from_b2
|
|
bne !+
|
|
lda sp
|
|
cmp #<SPRITE_DATA+SIZEOF_POINTER
|
|
bcc b2_from_b2
|
|
!:
|
|
//SEG33 [19] phi from main::@2 to main::@3 [phi:main::@2->main::@3]
|
|
b3_from_b2:
|
|
jmp b3
|
|
//SEG34 main::@3
|
|
b3:
|
|
//SEG35 [20] call setupRasterIrq
|
|
jsr setupRasterIrq
|
|
//SEG36 [21] phi from main::@3 to main::@4 [phi:main::@3->main::@4]
|
|
b4_from_b3:
|
|
//SEG37 [21] phi (byte*) main::dst#2 = (const byte[$3e8]) SCREEN_COPY#0 [phi:main::@3->main::@4#0] -- pbuz1=pbuc1
|
|
lda #<SCREEN_COPY
|
|
sta dst
|
|
lda #>SCREEN_COPY
|
|
sta dst+1
|
|
//SEG38 [21] phi (byte*) main::src#2 = (const byte*) SCREEN#0 [phi:main::@3->main::@4#1] -- pbuz1=pbuc1
|
|
lda #<SCREEN
|
|
sta src
|
|
lda #>SCREEN
|
|
sta src+1
|
|
jmp b4
|
|
// Fill screen with some chars
|
|
//for( byte* sc: SCREEN..SCREEN+999) *sc = 'a'+(<sc&0x1f);
|
|
// Copy screen to screen copy
|
|
//SEG39 [21] phi from main::@4 to main::@4 [phi:main::@4->main::@4]
|
|
b4_from_b4:
|
|
//SEG40 [21] phi (byte*) main::dst#2 = (byte*) main::dst#1 [phi:main::@4->main::@4#0] -- register_copy
|
|
//SEG41 [21] phi (byte*) main::src#2 = (byte*) main::src#1 [phi:main::@4->main::@4#1] -- register_copy
|
|
jmp b4
|
|
//SEG42 main::@4
|
|
b4:
|
|
//SEG43 [22] *((byte*) main::dst#2) ← *((byte*) main::src#2) -- _deref_pbuz1=_deref_pbuz2
|
|
ldy #0
|
|
lda (src),y
|
|
ldy #0
|
|
sta (dst),y
|
|
//SEG44 [23] (byte*) main::src#1 ← ++ (byte*) main::src#2 -- pbuz1=_inc_pbuz1
|
|
inc src
|
|
bne !+
|
|
inc src+1
|
|
!:
|
|
//SEG45 [24] (byte*) main::dst#1 ← ++ (byte*) main::dst#2 -- pbuz1=_inc_pbuz1
|
|
inc dst
|
|
bne !+
|
|
inc dst+1
|
|
!:
|
|
//SEG46 [25] if((byte*) main::src#1!=(const byte*) SCREEN#0+(word) $3e8) goto main::@4 -- pbuz1_neq_pbuc1_then_la1
|
|
lda src+1
|
|
cmp #>SCREEN+$3e8
|
|
bne b4_from_b4
|
|
lda src
|
|
cmp #<SCREEN+$3e8
|
|
bne b4_from_b4
|
|
//SEG47 [26] phi from main::@4 to main::@5 [phi:main::@4->main::@5]
|
|
b5_from_b4:
|
|
jmp b5
|
|
//SEG48 main::@5
|
|
b5:
|
|
//SEG49 [27] call initSquareTables
|
|
//SEG50 [108] phi from main::@5 to initSquareTables [phi:main::@5->initSquareTables]
|
|
initSquareTables_from_b5:
|
|
jsr initSquareTables
|
|
//SEG51 [28] phi from main::@5 main::@7 to main::@6 [phi:main::@5/main::@7->main::@6]
|
|
b6_from_b5:
|
|
b6_from_b7:
|
|
jmp b6
|
|
// Main loop
|
|
//SEG52 main::@6
|
|
b6:
|
|
//SEG53 [29] call getCharToProcess
|
|
//SEG54 [80] phi from main::@6 to getCharToProcess [phi:main::@6->getCharToProcess]
|
|
getCharToProcess_from_b6:
|
|
jsr getCharToProcess
|
|
//SEG55 [30] (byte) getCharToProcess::return_x#0 ← (byte) getCharToProcess::return_x#1 -- vbuyy=vbuz1
|
|
ldy getCharToProcess.return_x
|
|
//SEG56 [31] (byte) getCharToProcess::return_y#0 ← (byte) getCharToProcess::return_y#1 -- vbuxx=vbuz1
|
|
ldx getCharToProcess.return_y
|
|
//SEG57 [32] (word) getCharToProcess::return_dist#0 ← (word) getCharToProcess::return_dist#1
|
|
jmp b9
|
|
//SEG58 main::@9
|
|
b9:
|
|
//SEG59 [33] (byte) main::center_x#0 ← (byte) getCharToProcess::return_x#0
|
|
//SEG60 [34] (byte) main::center_y#0 ← (byte) getCharToProcess::return_y#0
|
|
//SEG61 [35] (word) main::center_dist#0 ← (word) getCharToProcess::return_dist#0
|
|
//SEG62 [36] if((word) main::center_dist#0!=(const word) NOT_FOUND#0) goto main::@7 -- vwuz1_neq_vwuc1_then_la1
|
|
lda center_dist+1
|
|
cmp #>NOT_FOUND
|
|
bne b7
|
|
lda center_dist
|
|
cmp #<NOT_FOUND
|
|
bne b7
|
|
jmp b8
|
|
//SEG63 main::@8
|
|
b8:
|
|
//SEG64 [37] *((const byte*) SCREEN#0+(word) $3e7) ← ++ *((const byte*) SCREEN#0+(word) $3e7) -- _deref_pbuc1=_inc__deref_pbuc1
|
|
inc SCREEN+$3e7
|
|
jmp b8
|
|
//SEG65 main::@7
|
|
b7:
|
|
//SEG66 [38] (byte) startProcessing::center_x#0 ← (byte) main::center_x#0 -- vbuz1=vbuyy
|
|
sty startProcessing.center_x
|
|
//SEG67 [39] (byte) startProcessing::center_y#0 ← (byte) main::center_y#0 -- vbuz1=vbuxx
|
|
stx startProcessing.center_y
|
|
//SEG68 [40] call startProcessing
|
|
//SEG69 [41] phi from main::@7 to startProcessing [phi:main::@7->startProcessing]
|
|
startProcessing_from_b7:
|
|
jsr startProcessing
|
|
jmp b6_from_b7
|
|
}
|
|
//SEG70 startProcessing
|
|
// Start processing a char - by inserting it into the PROCESSING array
|
|
// startProcessing(byte zeropage($1c) center_x, byte zeropage($1d) center_y)
|
|
startProcessing: {
|
|
.label _0 = 9
|
|
.label _1 = 9
|
|
.label _3 = $1e
|
|
.label _4 = $1e
|
|
.label _11 = $21
|
|
.label _12 = $21
|
|
.label _13 = $21
|
|
.label center_x = $1c
|
|
.label center_y = $1d
|
|
.label i = 8
|
|
.label spriteData = 9
|
|
.label spriteX = $1e
|
|
.label spritePtr = $20
|
|
.label screenPtr = $21
|
|
.label freeIdx = 8
|
|
.label _30 = $23
|
|
.label _31 = $21
|
|
//SEG71 [42] phi from startProcessing to startProcessing::@1 [phi:startProcessing->startProcessing::@1]
|
|
b1_from_startProcessing:
|
|
//SEG72 [42] phi (byte) startProcessing::freeIdx#6 = (byte) $ff [phi:startProcessing->startProcessing::@1#0] -- vbuxx=vbuc1
|
|
ldx #$ff
|
|
jmp b1
|
|
//SEG73 startProcessing::@1
|
|
b1:
|
|
//SEG74 [43] phi from startProcessing::@1 to startProcessing::@2 [phi:startProcessing::@1->startProcessing::@2]
|
|
b2_from_b1:
|
|
//SEG75 [43] phi (byte) startProcessing::i#2 = (byte) 0 [phi:startProcessing::@1->startProcessing::@2#0] -- vbuz1=vbuc1
|
|
lda #0
|
|
sta i
|
|
jmp b2
|
|
//SEG76 [43] phi from startProcessing::@3 to startProcessing::@2 [phi:startProcessing::@3->startProcessing::@2]
|
|
b2_from_b3:
|
|
//SEG77 [43] phi (byte) startProcessing::i#2 = (byte) startProcessing::i#1 [phi:startProcessing::@3->startProcessing::@2#0] -- register_copy
|
|
jmp b2
|
|
//SEG78 startProcessing::@2
|
|
b2:
|
|
//SEG79 [44] (byte~) startProcessing::$21 ← (byte) startProcessing::i#2 << (byte) 3 -- vbuaa=vbuz1_rol_3
|
|
lda i
|
|
asl
|
|
asl
|
|
asl
|
|
//SEG80 [45] if(*((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS + (byte~) startProcessing::$21)!=(const byte) STATUS_FREE#0) goto startProcessing::@3 -- pbuc1_derefidx_vbuaa_neq_vbuc2_then_la1
|
|
tay
|
|
lda #STATUS_FREE
|
|
cmp PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_STATUS,y
|
|
bne b3
|
|
//SEG81 [46] phi from startProcessing::@2 startProcessing::@9 to startProcessing::@4 [phi:startProcessing::@2/startProcessing::@9->startProcessing::@4]
|
|
b4_from_b2:
|
|
b4_from_b9:
|
|
//SEG82 [46] phi (byte) startProcessing::freeIdx#2 = (byte) startProcessing::i#2 [phi:startProcessing::@2/startProcessing::@9->startProcessing::@4#0] -- register_copy
|
|
jmp b4
|
|
//SEG83 startProcessing::@4
|
|
b4:
|
|
//SEG84 [47] if((byte) startProcessing::freeIdx#2==(byte) $ff) goto startProcessing::@8 -- vbuz1_eq_vbuc1_then_la1
|
|
lda #$ff
|
|
cmp freeIdx
|
|
beq b8
|
|
jmp b5
|
|
//SEG85 startProcessing::@5
|
|
b5:
|
|
//SEG86 [48] (word~) startProcessing::$0 ← (word)(byte) startProcessing::freeIdx#2 -- vwuz1=_word_vbuz2
|
|
lda freeIdx
|
|
sta _0
|
|
lda #0
|
|
sta _0+1
|
|
//SEG87 [49] (word~) startProcessing::$1 ← (word~) startProcessing::$0 << (byte) 6 -- vwuz1=vwuz1_rol_6
|
|
asl _1
|
|
rol _1+1
|
|
asl _1
|
|
rol _1+1
|
|
asl _1
|
|
rol _1+1
|
|
asl _1
|
|
rol _1+1
|
|
asl _1
|
|
rol _1+1
|
|
asl _1
|
|
rol _1+1
|
|
//SEG88 [50] (byte*) startProcessing::spriteData#0 ← (const byte*) SPRITE_DATA#0 + (word~) startProcessing::$1 -- pbuz1=pbuc1_plus_vwuz1
|
|
clc
|
|
lda spriteData
|
|
adc #<SPRITE_DATA
|
|
sta spriteData
|
|
lda spriteData+1
|
|
adc #>SPRITE_DATA
|
|
sta spriteData+1
|
|
//SEG89 [51] phi from startProcessing::@5 to startProcessing::@6 [phi:startProcessing::@5->startProcessing::@6]
|
|
b6_from_b5:
|
|
//SEG90 [51] phi (byte) startProcessing::i1#2 = (byte) 0 [phi:startProcessing::@5->startProcessing::@6#0] -- vbuxx=vbuc1
|
|
ldx #0
|
|
//SEG91 [51] phi (byte*) startProcessing::spriteData#2 = (byte*) startProcessing::spriteData#0 [phi:startProcessing::@5->startProcessing::@6#1] -- register_copy
|
|
jmp b6
|
|
//SEG92 [51] phi from startProcessing::@6 to startProcessing::@6 [phi:startProcessing::@6->startProcessing::@6]
|
|
b6_from_b6:
|
|
//SEG93 [51] phi (byte) startProcessing::i1#2 = (byte) startProcessing::i1#1 [phi:startProcessing::@6->startProcessing::@6#0] -- register_copy
|
|
//SEG94 [51] phi (byte*) startProcessing::spriteData#2 = (byte*) startProcessing::spriteData#1 [phi:startProcessing::@6->startProcessing::@6#1] -- register_copy
|
|
jmp b6
|
|
//SEG95 startProcessing::@6
|
|
b6:
|
|
//SEG96 [52] *((byte*) startProcessing::spriteData#2) ← (byte) $ff -- _deref_pbuz1=vbuc1
|
|
lda #$ff
|
|
ldy #0
|
|
sta (spriteData),y
|
|
//SEG97 [53] (byte*) startProcessing::spriteData#1 ← (byte*) startProcessing::spriteData#2 + (byte) 3 -- pbuz1=pbuz1_plus_vbuc1
|
|
lda #3
|
|
clc
|
|
adc spriteData
|
|
sta spriteData
|
|
bcc !+
|
|
inc spriteData+1
|
|
!:
|
|
//SEG98 [54] (byte) startProcessing::i1#1 ← ++ (byte) startProcessing::i1#2 -- vbuxx=_inc_vbuxx
|
|
inx
|
|
//SEG99 [55] if((byte) startProcessing::i1#1!=(byte) 8) goto startProcessing::@6 -- vbuxx_neq_vbuc1_then_la1
|
|
cpx #8
|
|
bne b6_from_b6
|
|
jmp b7
|
|
//SEG100 startProcessing::@7
|
|
b7:
|
|
//SEG101 [56] (word~) startProcessing::$3 ← (word)(byte) startProcessing::center_x#0 -- vwuz1=_word_vbuz2
|
|
lda center_x
|
|
sta _3
|
|
lda #0
|
|
sta _3+1
|
|
//SEG102 [57] (word~) startProcessing::$4 ← (word~) startProcessing::$3 << (byte) 3 -- vwuz1=vwuz1_rol_3
|
|
asl _4
|
|
rol _4+1
|
|
asl _4
|
|
rol _4+1
|
|
asl _4
|
|
rol _4+1
|
|
//SEG103 [58] (word) startProcessing::spriteX#0 ← (byte) $18 + (word~) startProcessing::$4 -- vwuz1=vbuc1_plus_vwuz1
|
|
lda #$18
|
|
clc
|
|
adc spriteX
|
|
sta spriteX
|
|
bcc !+
|
|
inc spriteX+1
|
|
!:
|
|
//SEG104 [59] (byte~) startProcessing::$6 ← (byte) startProcessing::center_y#0 << (byte) 3 -- vbuaa=vbuz1_rol_3
|
|
lda center_y
|
|
asl
|
|
asl
|
|
asl
|
|
//SEG105 [60] (byte) startProcessing::spriteY#0 ← (byte) $32 + (byte~) startProcessing::$6 -- vbuyy=vbuc1_plus_vbuaa
|
|
clc
|
|
adc #$32
|
|
tay
|
|
//SEG106 [61] (byte) startProcessing::spritePtr#0 ← (byte)(const byte*) SPRITE_DATA#0/(byte) $40 + (byte) startProcessing::freeIdx#2 -- vbuz1=vbuc1_plus_vbuz2
|
|
lax freeIdx
|
|
axs #-[SPRITE_DATA/$40]
|
|
stx spritePtr
|
|
//SEG107 [62] (word~) startProcessing::$11 ← (word)(byte) startProcessing::center_y#0 -- vwuz1=_word_vbuz2
|
|
lda center_y
|
|
sta _11
|
|
lda #0
|
|
sta _11+1
|
|
//SEG108 [63] (word) startProcessing::$30 ← (word~) startProcessing::$11 << (byte) 2 -- vwuz1=vwuz2_rol_2
|
|
lda _11
|
|
asl
|
|
sta _30
|
|
lda _11+1
|
|
rol
|
|
sta _30+1
|
|
asl _30
|
|
rol _30+1
|
|
//SEG109 [64] (word) startProcessing::$31 ← (word) startProcessing::$30 + (word~) startProcessing::$11 -- vwuz1=vwuz2_plus_vwuz1
|
|
lda _31
|
|
clc
|
|
adc _30
|
|
sta _31
|
|
lda _31+1
|
|
adc _30+1
|
|
sta _31+1
|
|
//SEG110 [65] (word~) startProcessing::$12 ← (word) startProcessing::$31 << (byte) 3 -- vwuz1=vwuz1_rol_3
|
|
asl _12
|
|
rol _12+1
|
|
asl _12
|
|
rol _12+1
|
|
asl _12
|
|
rol _12+1
|
|
//SEG111 [66] (byte*~) startProcessing::$13 ← (const byte*) SCREEN#0 + (word~) startProcessing::$12 -- pbuz1=pbuc1_plus_vwuz1
|
|
clc
|
|
lda _13
|
|
adc #<SCREEN
|
|
sta _13
|
|
lda _13+1
|
|
adc #>SCREEN
|
|
sta _13+1
|
|
//SEG112 [67] (byte*) startProcessing::screenPtr#0 ← (byte*~) startProcessing::$13 + (byte) startProcessing::center_x#0 -- pbuz1=pbuz1_plus_vbuz2
|
|
lda center_x
|
|
clc
|
|
adc screenPtr
|
|
sta screenPtr
|
|
bcc !+
|
|
inc screenPtr+1
|
|
!:
|
|
//SEG113 [68] (byte~) startProcessing::$22 ← (byte) startProcessing::freeIdx#2 << (byte) 3 -- vbuxx=vbuz1_rol_3
|
|
lda freeIdx
|
|
asl
|
|
asl
|
|
asl
|
|
tax
|
|
//SEG114 [69] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (byte~) startProcessing::$22) ← (word) startProcessing::spriteX#0 -- pwuc1_derefidx_vbuxx=vwuz1
|
|
lda spriteX
|
|
sta PROCESSING,x
|
|
lda spriteX+1
|
|
sta PROCESSING+1,x
|
|
//SEG115 [70] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y + (byte~) startProcessing::$22) ← (byte) startProcessing::spriteY#0 -- pbuc1_derefidx_vbuxx=vbuyy
|
|
tya
|
|
sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_Y,x
|
|
//SEG116 [71] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID + (byte~) startProcessing::$22) ← (byte) startProcessing::freeIdx#2 -- pbuc1_derefidx_vbuxx=vbuz1
|
|
lda freeIdx
|
|
sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_ID,x
|
|
//SEG117 [72] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR + (byte~) startProcessing::$22) ← (byte) startProcessing::spritePtr#0 -- pbuc1_derefidx_vbuxx=vbuz1
|
|
lda spritePtr
|
|
sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_PTR,x
|
|
//SEG118 [73] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS + (byte~) startProcessing::$22) ← (const byte) STATUS_NEW#0 -- pbuc1_derefidx_vbuxx=vbuc2
|
|
lda #STATUS_NEW
|
|
sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_STATUS,x
|
|
//SEG119 [74] *((byte**)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR + (byte~) startProcessing::$22) ← (byte*) startProcessing::screenPtr#0 -- pptc1_derefidx_vbuxx=pbuz1
|
|
lda screenPtr
|
|
sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR,x
|
|
lda screenPtr+1
|
|
sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR+1,x
|
|
jmp breturn
|
|
//SEG120 startProcessing::@return
|
|
breturn:
|
|
//SEG121 [75] return
|
|
rts
|
|
//SEG122 startProcessing::@8
|
|
b8:
|
|
//SEG123 [76] (byte~) startProcessing::freeIdx#7 ← (byte) startProcessing::freeIdx#2 -- vbuxx=vbuz1
|
|
ldx freeIdx
|
|
//SEG124 [42] phi from startProcessing::@8 to startProcessing::@1 [phi:startProcessing::@8->startProcessing::@1]
|
|
b1_from_b8:
|
|
//SEG125 [42] phi (byte) startProcessing::freeIdx#6 = (byte~) startProcessing::freeIdx#7 [phi:startProcessing::@8->startProcessing::@1#0] -- register_copy
|
|
jmp b1
|
|
//SEG126 startProcessing::@3
|
|
b3:
|
|
//SEG127 [77] (byte) startProcessing::i#1 ← ++ (byte) startProcessing::i#2 -- vbuz1=_inc_vbuz1
|
|
inc i
|
|
//SEG128 [78] if((byte) startProcessing::i#1!=(byte) 1) goto startProcessing::@2 -- vbuz1_neq_vbuc1_then_la1
|
|
lda #1
|
|
cmp i
|
|
bne b2_from_b3
|
|
jmp b9
|
|
//SEG129 startProcessing::@9
|
|
b9:
|
|
//SEG130 [79] (byte~) startProcessing::freeIdx#8 ← (byte) startProcessing::freeIdx#6 -- vbuz1=vbuxx
|
|
stx freeIdx
|
|
jmp b4_from_b9
|
|
}
|
|
//SEG131 getCharToProcess
|
|
// Find the non-space char closest to the center of the screen
|
|
// If no non-space char is found the distance will be 0xffff
|
|
getCharToProcess: {
|
|
.label _9 = $25
|
|
.label _10 = $25
|
|
.label _11 = $25
|
|
.label return_dist = $13
|
|
.label x = $e
|
|
.label dist = $13
|
|
.label screen_line = $b
|
|
.label y = $d
|
|
.label return_x = $11
|
|
.label return_y = $12
|
|
.label closest_dist = $f
|
|
.label closest_x = $11
|
|
.label closest_y = $12
|
|
.label _15 = $27
|
|
.label _16 = $25
|
|
//SEG132 [81] phi from getCharToProcess to getCharToProcess::@1 [phi:getCharToProcess->getCharToProcess::@1]
|
|
b1_from_getCharToProcess:
|
|
//SEG133 [81] phi (byte) getCharToProcess::closest_y#9 = (byte) 0 [phi:getCharToProcess->getCharToProcess::@1#0] -- vbuz1=vbuc1
|
|
lda #0
|
|
sta closest_y
|
|
//SEG134 [81] phi (byte) getCharToProcess::closest_x#9 = (byte) 0 [phi:getCharToProcess->getCharToProcess::@1#1] -- vbuz1=vbuc1
|
|
lda #0
|
|
sta closest_x
|
|
//SEG135 [81] phi (word) getCharToProcess::closest_dist#8 = (const word) NOT_FOUND#0 [phi:getCharToProcess->getCharToProcess::@1#2] -- vwuz1=vwuc1
|
|
lda #<NOT_FOUND
|
|
sta closest_dist
|
|
lda #>NOT_FOUND
|
|
sta closest_dist+1
|
|
//SEG136 [81] phi (byte) getCharToProcess::y#7 = (byte) 0 [phi:getCharToProcess->getCharToProcess::@1#3] -- vbuz1=vbuc1
|
|
lda #0
|
|
sta y
|
|
//SEG137 [81] phi (byte*) getCharToProcess::screen_line#4 = (const byte[$3e8]) SCREEN_COPY#0 [phi:getCharToProcess->getCharToProcess::@1#4] -- pbuz1=pbuc1
|
|
lda #<SCREEN_COPY
|
|
sta screen_line
|
|
lda #>SCREEN_COPY
|
|
sta screen_line+1
|
|
jmp b1
|
|
//SEG138 getCharToProcess::@1
|
|
b1:
|
|
//SEG139 [82] phi from getCharToProcess::@1 to getCharToProcess::@2 [phi:getCharToProcess::@1->getCharToProcess::@2]
|
|
b2_from_b1:
|
|
//SEG140 [82] phi (byte) getCharToProcess::closest_y#7 = (byte) getCharToProcess::closest_y#9 [phi:getCharToProcess::@1->getCharToProcess::@2#0] -- register_copy
|
|
//SEG141 [82] phi (byte) getCharToProcess::closest_x#7 = (byte) getCharToProcess::closest_x#9 [phi:getCharToProcess::@1->getCharToProcess::@2#1] -- register_copy
|
|
//SEG142 [82] phi (word) getCharToProcess::closest_dist#2 = (word) getCharToProcess::closest_dist#8 [phi:getCharToProcess::@1->getCharToProcess::@2#2] -- register_copy
|
|
//SEG143 [82] phi (byte) getCharToProcess::x#2 = (byte) 0 [phi:getCharToProcess::@1->getCharToProcess::@2#3] -- vbuz1=vbuc1
|
|
lda #0
|
|
sta x
|
|
jmp b2
|
|
//SEG144 getCharToProcess::@2
|
|
b2:
|
|
//SEG145 [83] if(*((byte*) getCharToProcess::screen_line#4 + (byte) getCharToProcess::x#2)==(byte) ' ') goto getCharToProcess::@11 -- pbuz1_derefidx_vbuz2_eq_vbuc1_then_la1
|
|
ldy x
|
|
lda (screen_line),y
|
|
cmp #' '
|
|
beq b11
|
|
jmp b4
|
|
//SEG146 getCharToProcess::@4
|
|
b4:
|
|
//SEG147 [84] (byte~) getCharToProcess::$13 ← (byte) getCharToProcess::x#2 << (byte) 1 -- vbuxx=vbuz1_rol_1
|
|
lda x
|
|
asl
|
|
tax
|
|
//SEG148 [85] (byte~) getCharToProcess::$14 ← (byte) getCharToProcess::y#7 << (byte) 1 -- vbuaa=vbuz1_rol_1
|
|
lda y
|
|
asl
|
|
//SEG149 [86] (word) getCharToProcess::dist#0 ← *((const word[$28]) SQUARES_X#0 + (byte~) getCharToProcess::$13) + *((const word[$19]) SQUARES_Y#0 + (byte~) getCharToProcess::$14) -- vwuz1=pwuc1_derefidx_vbuxx_plus_pwuc2_derefidx_vbuaa
|
|
tay
|
|
lda SQUARES_X,x
|
|
clc
|
|
adc SQUARES_Y,y
|
|
sta dist
|
|
lda SQUARES_X+1,x
|
|
adc SQUARES_Y+1,y
|
|
sta dist+1
|
|
//SEG150 [87] if((word) getCharToProcess::dist#0>=(word) getCharToProcess::closest_dist#2) goto getCharToProcess::@12 -- vwuz1_ge_vwuz2_then_la1
|
|
lda closest_dist+1
|
|
cmp dist+1
|
|
bne !+
|
|
lda closest_dist
|
|
cmp dist
|
|
beq b12
|
|
!:
|
|
bcc b12
|
|
jmp b5
|
|
//SEG151 getCharToProcess::@5
|
|
b5:
|
|
//SEG152 [88] (byte~) getCharToProcess::return_x#7 ← (byte) getCharToProcess::x#2 -- vbuz1=vbuz2
|
|
lda x
|
|
sta return_x
|
|
//SEG153 [89] (byte~) getCharToProcess::return_y#7 ← (byte) getCharToProcess::y#7 -- vbuz1=vbuz2
|
|
lda y
|
|
sta return_y
|
|
//SEG154 [90] phi from getCharToProcess::@11 getCharToProcess::@12 getCharToProcess::@5 to getCharToProcess::@3 [phi:getCharToProcess::@11/getCharToProcess::@12/getCharToProcess::@5->getCharToProcess::@3]
|
|
b3_from_b11:
|
|
b3_from_b12:
|
|
b3_from_b5:
|
|
//SEG155 [90] phi (byte) getCharToProcess::return_y#1 = (byte) getCharToProcess::closest_y#7 [phi:getCharToProcess::@11/getCharToProcess::@12/getCharToProcess::@5->getCharToProcess::@3#0] -- register_copy
|
|
//SEG156 [90] phi (byte) getCharToProcess::return_x#1 = (byte) getCharToProcess::closest_x#7 [phi:getCharToProcess::@11/getCharToProcess::@12/getCharToProcess::@5->getCharToProcess::@3#1] -- register_copy
|
|
//SEG157 [90] phi (word) getCharToProcess::return_dist#1 = (word~) getCharToProcess::return_dist#5 [phi:getCharToProcess::@11/getCharToProcess::@12/getCharToProcess::@5->getCharToProcess::@3#2] -- register_copy
|
|
jmp b3
|
|
//SEG158 getCharToProcess::@3
|
|
b3:
|
|
//SEG159 [91] (byte) getCharToProcess::x#1 ← ++ (byte) getCharToProcess::x#2 -- vbuz1=_inc_vbuz1
|
|
inc x
|
|
//SEG160 [92] if((byte) getCharToProcess::x#1!=(byte) $28) goto getCharToProcess::@10 -- vbuz1_neq_vbuc1_then_la1
|
|
lda #$28
|
|
cmp x
|
|
bne b10
|
|
jmp b6
|
|
//SEG161 getCharToProcess::@6
|
|
b6:
|
|
//SEG162 [93] (byte*) getCharToProcess::screen_line#1 ← (byte*) getCharToProcess::screen_line#4 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1
|
|
lda #$28
|
|
clc
|
|
adc screen_line
|
|
sta screen_line
|
|
bcc !+
|
|
inc screen_line+1
|
|
!:
|
|
//SEG163 [94] (byte) getCharToProcess::y#1 ← ++ (byte) getCharToProcess::y#7 -- vbuz1=_inc_vbuz1
|
|
inc y
|
|
//SEG164 [95] if((byte) getCharToProcess::y#1!=(byte) $19) goto getCharToProcess::@9 -- vbuz1_neq_vbuc1_then_la1
|
|
lda #$19
|
|
cmp y
|
|
bne b9
|
|
jmp b7
|
|
//SEG165 getCharToProcess::@7
|
|
b7:
|
|
//SEG166 [96] if((word) getCharToProcess::return_dist#1==(const word) NOT_FOUND#0) goto getCharToProcess::@return -- vwuz1_eq_vwuc1_then_la1
|
|
lda return_dist
|
|
cmp #<NOT_FOUND
|
|
bne !+
|
|
lda return_dist+1
|
|
cmp #>NOT_FOUND
|
|
beq breturn
|
|
!:
|
|
jmp b8
|
|
//SEG167 getCharToProcess::@8
|
|
b8:
|
|
//SEG168 [97] (word~) getCharToProcess::$9 ← (word)(byte) getCharToProcess::return_y#1 -- vwuz1=_word_vbuz2
|
|
lda return_y
|
|
sta _9
|
|
lda #0
|
|
sta _9+1
|
|
//SEG169 [98] (word) getCharToProcess::$15 ← (word~) getCharToProcess::$9 << (byte) 2 -- vwuz1=vwuz2_rol_2
|
|
lda _9
|
|
asl
|
|
sta _15
|
|
lda _9+1
|
|
rol
|
|
sta _15+1
|
|
asl _15
|
|
rol _15+1
|
|
//SEG170 [99] (word) getCharToProcess::$16 ← (word) getCharToProcess::$15 + (word~) getCharToProcess::$9 -- vwuz1=vwuz2_plus_vwuz1
|
|
lda _16
|
|
clc
|
|
adc _15
|
|
sta _16
|
|
lda _16+1
|
|
adc _15+1
|
|
sta _16+1
|
|
//SEG171 [100] (word~) getCharToProcess::$10 ← (word) getCharToProcess::$16 << (byte) 3 -- vwuz1=vwuz1_rol_3
|
|
asl _10
|
|
rol _10+1
|
|
asl _10
|
|
rol _10+1
|
|
asl _10
|
|
rol _10+1
|
|
//SEG172 [101] (byte*~) getCharToProcess::$11 ← (const byte[$3e8]) SCREEN_COPY#0 + (word~) getCharToProcess::$10 -- pbuz1=pbuc1_plus_vwuz1
|
|
clc
|
|
lda _11
|
|
adc #<SCREEN_COPY
|
|
sta _11
|
|
lda _11+1
|
|
adc #>SCREEN_COPY
|
|
sta _11+1
|
|
//SEG173 [102] *((byte*~) getCharToProcess::$11 + (byte) getCharToProcess::return_x#1) ← (byte) ' ' -- pbuz1_derefidx_vbuz2=vbuc1
|
|
// clear the found char on the screen copy
|
|
lda #' '
|
|
ldy return_x
|
|
sta (_11),y
|
|
jmp breturn
|
|
//SEG174 getCharToProcess::@return
|
|
breturn:
|
|
//SEG175 [103] return
|
|
rts
|
|
//SEG176 getCharToProcess::@9
|
|
b9:
|
|
//SEG177 [104] (word~) getCharToProcess::closest_dist#10 ← (word) getCharToProcess::return_dist#1 -- vwuz1=vwuz2
|
|
lda return_dist
|
|
sta closest_dist
|
|
lda return_dist+1
|
|
sta closest_dist+1
|
|
//SEG178 [81] phi from getCharToProcess::@9 to getCharToProcess::@1 [phi:getCharToProcess::@9->getCharToProcess::@1]
|
|
b1_from_b9:
|
|
//SEG179 [81] phi (byte) getCharToProcess::closest_y#9 = (byte) getCharToProcess::return_y#1 [phi:getCharToProcess::@9->getCharToProcess::@1#0] -- register_copy
|
|
//SEG180 [81] phi (byte) getCharToProcess::closest_x#9 = (byte) getCharToProcess::return_x#1 [phi:getCharToProcess::@9->getCharToProcess::@1#1] -- register_copy
|
|
//SEG181 [81] phi (word) getCharToProcess::closest_dist#8 = (word~) getCharToProcess::closest_dist#10 [phi:getCharToProcess::@9->getCharToProcess::@1#2] -- register_copy
|
|
//SEG182 [81] phi (byte) getCharToProcess::y#7 = (byte) getCharToProcess::y#1 [phi:getCharToProcess::@9->getCharToProcess::@1#3] -- register_copy
|
|
//SEG183 [81] phi (byte*) getCharToProcess::screen_line#4 = (byte*) getCharToProcess::screen_line#1 [phi:getCharToProcess::@9->getCharToProcess::@1#4] -- register_copy
|
|
jmp b1
|
|
//SEG184 getCharToProcess::@10
|
|
b10:
|
|
//SEG185 [105] (word~) getCharToProcess::closest_dist#12 ← (word) getCharToProcess::return_dist#1 -- vwuz1=vwuz2
|
|
lda return_dist
|
|
sta closest_dist
|
|
lda return_dist+1
|
|
sta closest_dist+1
|
|
//SEG186 [82] phi from getCharToProcess::@10 to getCharToProcess::@2 [phi:getCharToProcess::@10->getCharToProcess::@2]
|
|
b2_from_b10:
|
|
//SEG187 [82] phi (byte) getCharToProcess::closest_y#7 = (byte) getCharToProcess::return_y#1 [phi:getCharToProcess::@10->getCharToProcess::@2#0] -- register_copy
|
|
//SEG188 [82] phi (byte) getCharToProcess::closest_x#7 = (byte) getCharToProcess::return_x#1 [phi:getCharToProcess::@10->getCharToProcess::@2#1] -- register_copy
|
|
//SEG189 [82] phi (word) getCharToProcess::closest_dist#2 = (word~) getCharToProcess::closest_dist#12 [phi:getCharToProcess::@10->getCharToProcess::@2#2] -- register_copy
|
|
//SEG190 [82] phi (byte) getCharToProcess::x#2 = (byte) getCharToProcess::x#1 [phi:getCharToProcess::@10->getCharToProcess::@2#3] -- register_copy
|
|
jmp b2
|
|
//SEG191 getCharToProcess::@12
|
|
b12:
|
|
//SEG192 [106] (word~) getCharToProcess::return_dist#6 ← (word) getCharToProcess::closest_dist#2 -- vwuz1=vwuz2
|
|
lda closest_dist
|
|
sta return_dist
|
|
lda closest_dist+1
|
|
sta return_dist+1
|
|
jmp b3_from_b12
|
|
//SEG193 getCharToProcess::@11
|
|
b11:
|
|
//SEG194 [107] (word~) getCharToProcess::return_dist#5 ← (word) getCharToProcess::closest_dist#2 -- vwuz1=vwuz2
|
|
lda closest_dist
|
|
sta return_dist
|
|
lda closest_dist+1
|
|
sta return_dist+1
|
|
jmp b3_from_b11
|
|
}
|
|
//SEG195 initSquareTables
|
|
// initialize SQUARES table
|
|
initSquareTables: {
|
|
.label _6 = $17
|
|
.label _14 = $17
|
|
.label x = $15
|
|
.label y = $16
|
|
//SEG196 [109] phi from initSquareTables to initSquareTables::@1 [phi:initSquareTables->initSquareTables::@1]
|
|
b1_from_initSquareTables:
|
|
//SEG197 [109] phi (byte) initSquareTables::x#2 = (byte) 0 [phi:initSquareTables->initSquareTables::@1#0] -- vbuz1=vbuc1
|
|
lda #0
|
|
sta x
|
|
jmp b1
|
|
//SEG198 [109] phi from initSquareTables::@9 to initSquareTables::@1 [phi:initSquareTables::@9->initSquareTables::@1]
|
|
b1_from_b9:
|
|
//SEG199 [109] phi (byte) initSquareTables::x#2 = (byte) initSquareTables::x#1 [phi:initSquareTables::@9->initSquareTables::@1#0] -- register_copy
|
|
jmp b1
|
|
//SEG200 initSquareTables::@1
|
|
b1:
|
|
//SEG201 [110] if((byte) initSquareTables::x#2<(byte) $14) goto initSquareTables::@2 -- vbuz1_lt_vbuc1_then_la1
|
|
lda x
|
|
cmp #$14
|
|
bcc b2
|
|
jmp b3
|
|
//SEG202 initSquareTables::@3
|
|
b3:
|
|
//SEG203 [111] (byte~) initSquareTables::$2 ← (byte) initSquareTables::x#2 - (byte) $14 -- vbuaa=vbuz1_minus_vbuc1
|
|
lda x
|
|
sec
|
|
sbc #$14
|
|
//SEG204 [112] phi from initSquareTables::@2 initSquareTables::@3 to initSquareTables::@4 [phi:initSquareTables::@2/initSquareTables::@3->initSquareTables::@4]
|
|
b4_from_b2:
|
|
b4_from_b3:
|
|
//SEG205 [112] phi (byte) initSquareTables::x_dist#0 = (byte~) initSquareTables::$4 [phi:initSquareTables::@2/initSquareTables::@3->initSquareTables::@4#0] -- register_copy
|
|
jmp b4
|
|
//SEG206 initSquareTables::@4
|
|
b4:
|
|
//SEG207 [113] (byte) mul8u::a#1 ← (byte) initSquareTables::x_dist#0 -- vbuxx=vbuaa
|
|
tax
|
|
//SEG208 [114] (byte) mul8u::b#0 ← (byte) initSquareTables::x_dist#0
|
|
//SEG209 [115] call mul8u
|
|
//SEG210 [138] phi from initSquareTables::@4 to mul8u [phi:initSquareTables::@4->mul8u]
|
|
mul8u_from_b4:
|
|
//SEG211 [138] phi (byte) mul8u::a#6 = (byte) mul8u::a#1 [phi:initSquareTables::@4->mul8u#0] -- register_copy
|
|
//SEG212 [138] phi (word) mul8u::mb#0 = (byte) mul8u::b#0 [phi:initSquareTables::@4->mul8u#1] -- vwuz1=vbuaa
|
|
sta mul8u.mb
|
|
lda #0
|
|
sta mul8u.mb+1
|
|
jsr mul8u
|
|
//SEG213 [116] (word) mul8u::return#2 ← (word) mul8u::res#2
|
|
jmp b9
|
|
//SEG214 initSquareTables::@9
|
|
b9:
|
|
//SEG215 [117] (word~) initSquareTables::$6 ← (word) mul8u::return#2
|
|
//SEG216 [118] (byte~) initSquareTables::$16 ← (byte) initSquareTables::x#2 << (byte) 1 -- vbuaa=vbuz1_rol_1
|
|
lda x
|
|
asl
|
|
//SEG217 [119] *((const word[$28]) SQUARES_X#0 + (byte~) initSquareTables::$16) ← (word~) initSquareTables::$6 -- pwuc1_derefidx_vbuaa=vwuz1
|
|
tay
|
|
lda _6
|
|
sta SQUARES_X,y
|
|
lda _6+1
|
|
sta SQUARES_X+1,y
|
|
//SEG218 [120] (byte) initSquareTables::x#1 ← ++ (byte) initSquareTables::x#2 -- vbuz1=_inc_vbuz1
|
|
inc x
|
|
//SEG219 [121] if((byte) initSquareTables::x#1!=(byte) $28) goto initSquareTables::@1 -- vbuz1_neq_vbuc1_then_la1
|
|
lda #$28
|
|
cmp x
|
|
bne b1_from_b9
|
|
//SEG220 [122] phi from initSquareTables::@9 to initSquareTables::@5 [phi:initSquareTables::@9->initSquareTables::@5]
|
|
b5_from_b9:
|
|
//SEG221 [122] phi (byte) initSquareTables::y#2 = (byte) 0 [phi:initSquareTables::@9->initSquareTables::@5#0] -- vbuz1=vbuc1
|
|
lda #0
|
|
sta y
|
|
jmp b5
|
|
//SEG222 [122] phi from initSquareTables::@10 to initSquareTables::@5 [phi:initSquareTables::@10->initSquareTables::@5]
|
|
b5_from_b10:
|
|
//SEG223 [122] phi (byte) initSquareTables::y#2 = (byte) initSquareTables::y#1 [phi:initSquareTables::@10->initSquareTables::@5#0] -- register_copy
|
|
jmp b5
|
|
//SEG224 initSquareTables::@5
|
|
b5:
|
|
//SEG225 [123] if((byte) initSquareTables::y#2<(byte) $c) goto initSquareTables::@6 -- vbuz1_lt_vbuc1_then_la1
|
|
lda y
|
|
cmp #$c
|
|
bcc b6
|
|
jmp b7
|
|
//SEG226 initSquareTables::@7
|
|
b7:
|
|
//SEG227 [124] (byte~) initSquareTables::$10 ← (byte) initSquareTables::y#2 - (byte) $c -- vbuaa=vbuz1_minus_vbuc1
|
|
lda y
|
|
sec
|
|
sbc #$c
|
|
//SEG228 [125] phi from initSquareTables::@6 initSquareTables::@7 to initSquareTables::@8 [phi:initSquareTables::@6/initSquareTables::@7->initSquareTables::@8]
|
|
b8_from_b6:
|
|
b8_from_b7:
|
|
//SEG229 [125] phi (byte) initSquareTables::y_dist#0 = (byte~) initSquareTables::$12 [phi:initSquareTables::@6/initSquareTables::@7->initSquareTables::@8#0] -- register_copy
|
|
jmp b8
|
|
//SEG230 initSquareTables::@8
|
|
b8:
|
|
//SEG231 [126] (byte) mul8u::a#2 ← (byte) initSquareTables::y_dist#0 -- vbuxx=vbuaa
|
|
tax
|
|
//SEG232 [127] (byte) mul8u::b#1 ← (byte) initSquareTables::y_dist#0
|
|
//SEG233 [128] call mul8u
|
|
//SEG234 [138] phi from initSquareTables::@8 to mul8u [phi:initSquareTables::@8->mul8u]
|
|
mul8u_from_b8:
|
|
//SEG235 [138] phi (byte) mul8u::a#6 = (byte) mul8u::a#2 [phi:initSquareTables::@8->mul8u#0] -- register_copy
|
|
//SEG236 [138] phi (word) mul8u::mb#0 = (byte) mul8u::b#1 [phi:initSquareTables::@8->mul8u#1] -- vwuz1=vbuaa
|
|
sta mul8u.mb
|
|
lda #0
|
|
sta mul8u.mb+1
|
|
jsr mul8u
|
|
//SEG237 [129] (word) mul8u::return#3 ← (word) mul8u::res#2
|
|
jmp b10
|
|
//SEG238 initSquareTables::@10
|
|
b10:
|
|
//SEG239 [130] (word~) initSquareTables::$14 ← (word) mul8u::return#3
|
|
//SEG240 [131] (byte~) initSquareTables::$17 ← (byte) initSquareTables::y#2 << (byte) 1 -- vbuaa=vbuz1_rol_1
|
|
lda y
|
|
asl
|
|
//SEG241 [132] *((const word[$19]) SQUARES_Y#0 + (byte~) initSquareTables::$17) ← (word~) initSquareTables::$14 -- pwuc1_derefidx_vbuaa=vwuz1
|
|
tay
|
|
lda _14
|
|
sta SQUARES_Y,y
|
|
lda _14+1
|
|
sta SQUARES_Y+1,y
|
|
//SEG242 [133] (byte) initSquareTables::y#1 ← ++ (byte) initSquareTables::y#2 -- vbuz1=_inc_vbuz1
|
|
inc y
|
|
//SEG243 [134] if((byte) initSquareTables::y#1!=(byte) $19) goto initSquareTables::@5 -- vbuz1_neq_vbuc1_then_la1
|
|
lda #$19
|
|
cmp y
|
|
bne b5_from_b10
|
|
jmp breturn
|
|
//SEG244 initSquareTables::@return
|
|
breturn:
|
|
//SEG245 [135] return
|
|
rts
|
|
//SEG246 initSquareTables::@6
|
|
b6:
|
|
//SEG247 [136] (byte~) initSquareTables::$12 ← (byte) $c - (byte) initSquareTables::y#2 -- vbuaa=vbuc1_minus_vbuz1
|
|
lda #$c
|
|
sec
|
|
sbc y
|
|
jmp b8_from_b6
|
|
//SEG248 initSquareTables::@2
|
|
b2:
|
|
//SEG249 [137] (byte~) initSquareTables::$4 ← (byte) $14 - (byte) initSquareTables::x#2 -- vbuaa=vbuc1_minus_vbuz1
|
|
lda #$14
|
|
sec
|
|
sbc x
|
|
jmp b4_from_b2
|
|
}
|
|
//SEG250 mul8u
|
|
// Perform binary multiplication of two unsigned 8-bit bytes into a 16-bit unsigned word
|
|
// mul8u(byte register(X) a, byte register(A) b)
|
|
mul8u: {
|
|
.label mb = $19
|
|
.label res = $17
|
|
.label return = $17
|
|
//SEG251 [139] phi from mul8u to mul8u::@1 [phi:mul8u->mul8u::@1]
|
|
b1_from_mul8u:
|
|
//SEG252 [139] phi (word) mul8u::mb#2 = (word) mul8u::mb#0 [phi:mul8u->mul8u::@1#0] -- register_copy
|
|
//SEG253 [139] phi (word) mul8u::res#2 = (byte) 0 [phi:mul8u->mul8u::@1#1] -- vwuz1=vbuc1
|
|
lda #0
|
|
sta res
|
|
lda #0
|
|
sta res+1
|
|
//SEG254 [139] phi (byte) mul8u::a#3 = (byte) mul8u::a#6 [phi:mul8u->mul8u::@1#2] -- register_copy
|
|
jmp b1
|
|
//SEG255 mul8u::@1
|
|
b1:
|
|
//SEG256 [140] if((byte) mul8u::a#3!=(byte) 0) goto mul8u::@2 -- vbuxx_neq_0_then_la1
|
|
cpx #0
|
|
bne b2
|
|
jmp breturn
|
|
//SEG257 mul8u::@return
|
|
breturn:
|
|
//SEG258 [141] return
|
|
rts
|
|
//SEG259 mul8u::@2
|
|
b2:
|
|
//SEG260 [142] (byte~) mul8u::$1 ← (byte) mul8u::a#3 & (byte) 1 -- vbuaa=vbuxx_band_vbuc1
|
|
txa
|
|
and #1
|
|
//SEG261 [143] if((byte~) mul8u::$1==(byte) 0) goto mul8u::@3 -- vbuaa_eq_0_then_la1
|
|
cmp #0
|
|
beq b3_from_b2
|
|
jmp b4
|
|
//SEG262 mul8u::@4
|
|
b4:
|
|
//SEG263 [144] (word) mul8u::res#1 ← (word) mul8u::res#2 + (word) mul8u::mb#2 -- vwuz1=vwuz1_plus_vwuz2
|
|
lda res
|
|
clc
|
|
adc mb
|
|
sta res
|
|
lda res+1
|
|
adc mb+1
|
|
sta res+1
|
|
//SEG264 [145] phi from mul8u::@2 mul8u::@4 to mul8u::@3 [phi:mul8u::@2/mul8u::@4->mul8u::@3]
|
|
b3_from_b2:
|
|
b3_from_b4:
|
|
//SEG265 [145] phi (word) mul8u::res#6 = (word) mul8u::res#2 [phi:mul8u::@2/mul8u::@4->mul8u::@3#0] -- register_copy
|
|
jmp b3
|
|
//SEG266 mul8u::@3
|
|
b3:
|
|
//SEG267 [146] (byte) mul8u::a#0 ← (byte) mul8u::a#3 >> (byte) 1 -- vbuxx=vbuxx_ror_1
|
|
txa
|
|
lsr
|
|
tax
|
|
//SEG268 [147] (word) mul8u::mb#1 ← (word) mul8u::mb#2 << (byte) 1 -- vwuz1=vwuz1_rol_1
|
|
asl mb
|
|
rol mb+1
|
|
//SEG269 [139] phi from mul8u::@3 to mul8u::@1 [phi:mul8u::@3->mul8u::@1]
|
|
b1_from_b3:
|
|
//SEG270 [139] phi (word) mul8u::mb#2 = (word) mul8u::mb#1 [phi:mul8u::@3->mul8u::@1#0] -- register_copy
|
|
//SEG271 [139] phi (word) mul8u::res#2 = (word) mul8u::res#6 [phi:mul8u::@3->mul8u::@1#1] -- register_copy
|
|
//SEG272 [139] phi (byte) mul8u::a#3 = (byte) mul8u::a#0 [phi:mul8u::@3->mul8u::@1#2] -- register_copy
|
|
jmp b1
|
|
}
|
|
//SEG273 setupRasterIrq
|
|
// Setup Raster IRQ
|
|
setupRasterIrq: {
|
|
.label irqRoutine = irqTop
|
|
//SEG274 asm { sei }
|
|
sei
|
|
//SEG275 [149] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 -- _deref_pbuc1=vbuc2
|
|
// Disable kernal & basic
|
|
lda #PROCPORT_DDR_MEMORY_MASK
|
|
sta PROCPORT_DDR
|
|
//SEG276 [150] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 -- _deref_pbuc1=vbuc2
|
|
lda #PROCPORT_RAM_IO
|
|
sta PROCPORT
|
|
//SEG277 [151] *((const byte*) CIA1_INTERRUPT#0) ← (const byte) CIA_INTERRUPT_CLEAR#0 -- _deref_pbuc1=vbuc2
|
|
// Disable CIA 1 Timer IRQ
|
|
lda #CIA_INTERRUPT_CLEAR
|
|
sta CIA1_INTERRUPT
|
|
jmp b1
|
|
//SEG278 setupRasterIrq::@1
|
|
b1:
|
|
//SEG279 [152] *((const byte*) VIC_CONTROL#0) ← *((const byte*) VIC_CONTROL#0) & (byte) $7f -- _deref_pbuc1=_deref_pbuc1_band_vbuc2
|
|
lda #$7f
|
|
and VIC_CONTROL
|
|
sta VIC_CONTROL
|
|
jmp b2
|
|
//SEG280 setupRasterIrq::@2
|
|
b2:
|
|
//SEG281 [153] *((const byte*) RASTER#0) ← <(const byte) RASTER_IRQ_TOP#0 -- _deref_pbuc1=vbuc2
|
|
lda #RASTER_IRQ_TOP
|
|
sta RASTER
|
|
//SEG282 [154] *((const byte*) IRQ_ENABLE#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2
|
|
// Enable Raster Interrupt
|
|
lda #IRQ_RASTER
|
|
sta IRQ_ENABLE
|
|
//SEG283 [155] *((const void()**) HARDWARE_IRQ#0) ← (const void()*) setupRasterIrq::irqRoutine#0 -- _deref_pptc1=pprc2
|
|
// Set the IRQ routine
|
|
lda #<irqRoutine
|
|
sta HARDWARE_IRQ
|
|
lda #>irqRoutine
|
|
sta HARDWARE_IRQ+1
|
|
//SEG284 asm { cli }
|
|
cli
|
|
jmp breturn
|
|
//SEG285 setupRasterIrq::@return
|
|
breturn:
|
|
//SEG286 [157] return
|
|
rts
|
|
}
|
|
//SEG287 irqBottom
|
|
// Raster Interrupt at the middle of the screen
|
|
irqBottom: {
|
|
//SEG288 entry interrupt(HARDWARE_ALL)
|
|
sta rega+1
|
|
stx regx+1
|
|
sty regy+1
|
|
//SEG289 [159] phi from irqBottom to irqBottom::@1 [phi:irqBottom->irqBottom::@1]
|
|
b1_from_irqBottom:
|
|
//SEG290 [159] phi (byte) irqBottom::i#2 = (byte) 0 [phi:irqBottom->irqBottom::@1#0] -- vbuxx=vbuc1
|
|
ldx #0
|
|
jmp b1
|
|
//SEG291 [159] phi from irqBottom::@1 to irqBottom::@1 [phi:irqBottom::@1->irqBottom::@1]
|
|
b1_from_b1:
|
|
//SEG292 [159] phi (byte) irqBottom::i#2 = (byte) irqBottom::i#1 [phi:irqBottom::@1->irqBottom::@1#0] -- register_copy
|
|
jmp b1
|
|
//SEG293 irqBottom::@1
|
|
b1:
|
|
//SEG294 [160] (byte) irqBottom::i#1 ← ++ (byte) irqBottom::i#2 -- vbuxx=_inc_vbuxx
|
|
inx
|
|
//SEG295 [161] if((byte) irqBottom::i#1!=(byte) 5) goto irqBottom::@1 -- vbuxx_neq_vbuc1_then_la1
|
|
cpx #5
|
|
bne b1_from_b1
|
|
jmp b2
|
|
//SEG296 irqBottom::@2
|
|
b2:
|
|
//SEG297 [162] *((const byte*) BORDERCOL#0) ← (const byte) WHITE#0 -- _deref_pbuc1=vbuc2
|
|
lda #WHITE
|
|
sta BORDERCOL
|
|
//SEG298 [163] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 -- _deref_pbuc1=vbuc2
|
|
lda #WHITE
|
|
sta BGCOL
|
|
//SEG299 [164] call processChars
|
|
//SEG300 [171] phi from irqBottom::@2 to processChars [phi:irqBottom::@2->processChars]
|
|
processChars_from_b2:
|
|
jsr processChars
|
|
jmp b3
|
|
//SEG301 irqBottom::@3
|
|
b3:
|
|
//SEG302 [165] *((const byte*) BORDERCOL#0) ← (const byte) LIGHT_BLUE#0 -- _deref_pbuc1=vbuc2
|
|
lda #LIGHT_BLUE
|
|
sta BORDERCOL
|
|
//SEG303 [166] *((const byte*) BGCOL#0) ← (const byte) BLUE#0 -- _deref_pbuc1=vbuc2
|
|
lda #BLUE
|
|
sta BGCOL
|
|
//SEG304 [167] *((const byte*) RASTER#0) ← (const byte) RASTER_IRQ_TOP#0 -- _deref_pbuc1=vbuc2
|
|
// Trigger IRQ at the top of the screen
|
|
lda #RASTER_IRQ_TOP
|
|
sta RASTER
|
|
//SEG305 [168] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_ALL)(void()) irqTop() -- _deref_pptc1=pprc2
|
|
lda #<irqTop
|
|
sta HARDWARE_IRQ
|
|
lda #>irqTop
|
|
sta HARDWARE_IRQ+1
|
|
//SEG306 [169] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2
|
|
// Acknowledge the IRQ
|
|
lda #IRQ_RASTER
|
|
sta IRQ_STATUS
|
|
jmp breturn
|
|
//SEG307 irqBottom::@return
|
|
breturn:
|
|
//SEG308 [170] return - exit interrupt(HARDWARE_ALL)
|
|
rega:
|
|
lda #00
|
|
regx:
|
|
ldx #00
|
|
regy:
|
|
ldy #00
|
|
rti
|
|
}
|
|
//SEG309 processChars
|
|
// Process any chars in the PROCESSING array
|
|
processChars: {
|
|
.label processing = $29
|
|
.label bitmask = $2b
|
|
.label i = $1b
|
|
//SEG310 [172] phi from processChars to processChars::@1 [phi:processChars->processChars::@1]
|
|
b1_from_processChars:
|
|
//SEG311 [172] phi (byte) processChars::i#10 = (byte) 0 [phi:processChars->processChars::@1#0] -- vbuz1=vbuc1
|
|
lda #0
|
|
sta i
|
|
jmp b1
|
|
//SEG312 [172] phi from processChars::@2 to processChars::@1 [phi:processChars::@2->processChars::@1]
|
|
b1_from_b2:
|
|
//SEG313 [172] phi (byte) processChars::i#10 = (byte) processChars::i#1 [phi:processChars::@2->processChars::@1#0] -- register_copy
|
|
jmp b1
|
|
//SEG314 processChars::@1
|
|
b1:
|
|
//SEG315 [173] (byte~) processChars::$18 ← (byte) processChars::i#10 << (byte) 3 -- vbuaa=vbuz1_rol_3
|
|
lda i
|
|
asl
|
|
asl
|
|
asl
|
|
//SEG316 [174] (struct ProcessingSprite*) processChars::processing#0 ← (const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (byte~) processChars::$18 -- pssz1=pssc1_plus_vbuaa
|
|
clc
|
|
adc #<PROCESSING
|
|
sta processing
|
|
lda #>PROCESSING
|
|
adc #0
|
|
sta processing+1
|
|
//SEG317 [175] (byte) processChars::bitmask#0 ← (byte) 1 << *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID) -- vbuz1=vbuc1_rol_pbuz2_derefidx_vbuc2
|
|
ldy #OFFSET_STRUCT_PROCESSINGSPRITE_ID
|
|
lda (processing),y
|
|
tax
|
|
lda #1
|
|
cpx #0
|
|
beq !e+
|
|
!:
|
|
asl
|
|
dex
|
|
bne !-
|
|
!e:
|
|
sta bitmask
|
|
//SEG318 [176] if(*((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS)==(const byte) STATUS_FREE#0) goto processChars::@2 -- pbuz1_derefidx_vbuc1_eq_vbuc2_then_la1
|
|
ldy #OFFSET_STRUCT_PROCESSINGSPRITE_STATUS
|
|
lda (processing),y
|
|
cmp #STATUS_FREE
|
|
beq b2
|
|
jmp b8
|
|
//SEG319 processChars::@8
|
|
b8:
|
|
//SEG320 [177] if(*((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS)!=(const byte) STATUS_NEW#0) goto processChars::@3 -- pbuz1_derefidx_vbuc1_neq_vbuc2_then_la1
|
|
ldy #OFFSET_STRUCT_PROCESSINGSPRITE_STATUS
|
|
lda (processing),y
|
|
cmp #STATUS_NEW
|
|
bne b3
|
|
jmp b9
|
|
//SEG321 processChars::@9
|
|
b9:
|
|
//SEG322 [178] *(*((byte**)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR)) ← (byte) ' ' -- _deref_pptz1_derefidx_vbuc1=vbuc2
|
|
// Clear the char on the screen
|
|
ldx #' '
|
|
ldy #OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR
|
|
lda (processing),y
|
|
sta !++1
|
|
iny
|
|
lda (processing),y
|
|
sta !++2
|
|
txa
|
|
!:
|
|
sta $ffff
|
|
//SEG323 [179] *((const byte*) SPRITES_ENABLE#0) ← *((const byte*) SPRITES_ENABLE#0) | (byte) processChars::bitmask#0 -- _deref_pbuc1=_deref_pbuc1_bor_vbuz1
|
|
// Enable the sprite
|
|
lda SPRITES_ENABLE
|
|
ora bitmask
|
|
sta SPRITES_ENABLE
|
|
//SEG324 [180] *((const byte*) SCREEN#0+(const word) SPRITE_PTRS#0 + *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID)) ← *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR) -- pbuc1_derefidx_pbuz1_derefidx_vbuc2=pbuz1_derefidx_vbuc3
|
|
// Set sprite pointer
|
|
ldy #OFFSET_STRUCT_PROCESSINGSPRITE_PTR
|
|
lda (processing),y
|
|
ldy #OFFSET_STRUCT_PROCESSINGSPRITE_ID
|
|
lda (processing),y
|
|
tay
|
|
lda SCREEN+SPRITE_PTRS,y
|
|
//SEG325 [181] *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) ← (const byte) STATUS_PROCESSING#0 -- pbuz1_derefidx_vbuc1=vbuc2
|
|
// Set status
|
|
lda #STATUS_PROCESSING
|
|
ldy #OFFSET_STRUCT_PROCESSINGSPRITE_STATUS
|
|
sta (processing),y
|
|
jmp b3
|
|
//SEG326 processChars::@3
|
|
b3:
|
|
//SEG327 [182] (byte~) processChars::$9 ← > *((word*)(struct ProcessingSprite*) processChars::processing#0) -- vbuaa=_hi__deref_pwuz1
|
|
ldy #1
|
|
lda (processing),y
|
|
//SEG328 [183] if((byte) 0!=(byte~) processChars::$9) goto processChars::@4 -- vbuc1_neq_vbuaa_then_la1
|
|
// Set sprite position
|
|
cmp #0
|
|
bne b4
|
|
jmp b6
|
|
//SEG329 processChars::@6
|
|
b6:
|
|
//SEG330 [184] (byte~) processChars::$10 ← (byte) $ff ^ (byte) processChars::bitmask#0 -- vbuaa=vbuc1_bxor_vbuz1
|
|
lda #$ff
|
|
eor bitmask
|
|
//SEG331 [185] *((const byte*) SPRITES_XMSB#0) ← *((const byte*) SPRITES_XMSB#0) & (byte~) processChars::$10 -- _deref_pbuc1=_deref_pbuc1_band_vbuaa
|
|
and SPRITES_XMSB
|
|
sta SPRITES_XMSB
|
|
jmp b5
|
|
//SEG332 processChars::@5
|
|
b5:
|
|
//SEG333 [186] (byte~) processChars::$13 ← (byte) processChars::i#10 << (byte) 1 -- vbuxx=vbuz1_rol_1
|
|
lda i
|
|
asl
|
|
tax
|
|
//SEG334 [187] (byte~) processChars::$12 ← (byte)*((word*)(struct ProcessingSprite*) processChars::processing#0) -- vbuaa=_byte__deref_pwuz1
|
|
ldy #0
|
|
lda (processing),y
|
|
//SEG335 [188] *((const byte*) SPRITES_XPOS#0 + (byte~) processChars::$13) ← (byte~) processChars::$12 -- pbuc1_derefidx_vbuxx=vbuaa
|
|
sta SPRITES_XPOS,x
|
|
//SEG336 [189] *((const byte*) SPRITES_YPOS#0 + (byte~) processChars::$13) ← *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y) -- pbuc1_derefidx_vbuxx=pbuz1_derefidx_vbuc2
|
|
ldy #OFFSET_STRUCT_PROCESSINGSPRITE_Y
|
|
lda (processing),y
|
|
sta SPRITES_YPOS,x
|
|
//SEG337 [190] *((word*)(struct ProcessingSprite*) processChars::processing#0) ← -- *((word*)(struct ProcessingSprite*) processChars::processing#0) -- _deref_pwuz1=_dec__deref_pwuz1
|
|
ldy #0
|
|
lda (processing),y
|
|
sec
|
|
sbc #1
|
|
sta (processing),y
|
|
//SEG338 [191] if(*((word*)(struct ProcessingSprite*) processChars::processing#0)!=(byte) 0) goto processChars::@2 -- _deref_pwuz1_neq_0_then_la1
|
|
ldy #0
|
|
lda (processing),y
|
|
bne b2
|
|
iny
|
|
lda (processing),y
|
|
bne b2
|
|
jmp b7
|
|
//SEG339 processChars::@7
|
|
b7:
|
|
//SEG340 [192] *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) ← (const byte) STATUS_FREE#0 -- pbuz1_derefidx_vbuc1=vbuc2
|
|
// Set status
|
|
lda #STATUS_FREE
|
|
ldy #OFFSET_STRUCT_PROCESSINGSPRITE_STATUS
|
|
sta (processing),y
|
|
//SEG341 [193] (byte~) processChars::$16 ← (byte) $ff ^ (byte) processChars::bitmask#0 -- vbuaa=vbuc1_bxor_vbuz1
|
|
lda #$ff
|
|
eor bitmask
|
|
//SEG342 [194] *((const byte*) SPRITES_ENABLE#0) ← *((const byte*) SPRITES_ENABLE#0) & (byte~) processChars::$16 -- _deref_pbuc1=_deref_pbuc1_band_vbuaa
|
|
// Disable the sprite
|
|
and SPRITES_ENABLE
|
|
sta SPRITES_ENABLE
|
|
jmp b2
|
|
//SEG343 processChars::@2
|
|
b2:
|
|
//SEG344 [195] (byte) processChars::i#1 ← ++ (byte) processChars::i#10 -- vbuz1=_inc_vbuz1
|
|
inc i
|
|
//SEG345 [196] if((byte) processChars::i#1!=(byte) 1) goto processChars::@1 -- vbuz1_neq_vbuc1_then_la1
|
|
lda #1
|
|
cmp i
|
|
bne b1_from_b2
|
|
jmp breturn
|
|
//SEG346 processChars::@return
|
|
breturn:
|
|
//SEG347 [197] return
|
|
rts
|
|
//SEG348 processChars::@4
|
|
b4:
|
|
//SEG349 [198] *((const byte*) SPRITES_XMSB#0) ← *((const byte*) SPRITES_XMSB#0) | (byte) processChars::bitmask#0 -- _deref_pbuc1=_deref_pbuc1_bor_vbuz1
|
|
lda SPRITES_XMSB
|
|
ora bitmask
|
|
sta SPRITES_XMSB
|
|
jmp b5
|
|
}
|
|
//SEG350 irqTop
|
|
// Raster Interrupt at the top of the screen
|
|
irqTop: {
|
|
//SEG351 entry interrupt(HARDWARE_ALL)
|
|
sta rega+1
|
|
stx regx+1
|
|
sty regy+1
|
|
//SEG352 [200] phi from irqTop to irqTop::@1 [phi:irqTop->irqTop::@1]
|
|
b1_from_irqTop:
|
|
//SEG353 [200] phi (byte) irqTop::i#2 = (byte) 0 [phi:irqTop->irqTop::@1#0] -- vbuxx=vbuc1
|
|
ldx #0
|
|
jmp b1
|
|
//SEG354 [200] phi from irqTop::@1 to irqTop::@1 [phi:irqTop::@1->irqTop::@1]
|
|
b1_from_b1:
|
|
//SEG355 [200] phi (byte) irqTop::i#2 = (byte) irqTop::i#1 [phi:irqTop::@1->irqTop::@1#0] -- register_copy
|
|
jmp b1
|
|
//SEG356 irqTop::@1
|
|
b1:
|
|
//SEG357 [201] (byte) irqTop::i#1 ← ++ (byte) irqTop::i#2 -- vbuxx=_inc_vbuxx
|
|
inx
|
|
//SEG358 [202] if((byte) irqTop::i#1!=(byte) 5) goto irqTop::@1 -- vbuxx_neq_vbuc1_then_la1
|
|
cpx #5
|
|
bne b1_from_b1
|
|
jmp b2
|
|
//SEG359 irqTop::@2
|
|
b2:
|
|
//SEG360 [203] *((const byte*) BORDERCOL#0) ← (const byte) WHITE#0 -- _deref_pbuc1=vbuc2
|
|
lda #WHITE
|
|
sta BORDERCOL
|
|
//SEG361 [204] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 -- _deref_pbuc1=vbuc2
|
|
lda #WHITE
|
|
sta BGCOL
|
|
//SEG362 [205] phi from irqTop::@2 to irqTop::@3 [phi:irqTop::@2->irqTop::@3]
|
|
b3_from_b2:
|
|
//SEG363 [205] phi (byte) irqTop::i1#2 = (byte) 0 [phi:irqTop::@2->irqTop::@3#0] -- vbuxx=vbuc1
|
|
ldx #0
|
|
jmp b3
|
|
//SEG364 [205] phi from irqTop::@3 to irqTop::@3 [phi:irqTop::@3->irqTop::@3]
|
|
b3_from_b3:
|
|
//SEG365 [205] phi (byte) irqTop::i1#2 = (byte) irqTop::i1#1 [phi:irqTop::@3->irqTop::@3#0] -- register_copy
|
|
jmp b3
|
|
//SEG366 irqTop::@3
|
|
b3:
|
|
//SEG367 [206] (byte) irqTop::i1#1 ← ++ (byte) irqTop::i1#2 -- vbuxx=_inc_vbuxx
|
|
inx
|
|
//SEG368 [207] if((byte) irqTop::i1#1!=(byte) 8) goto irqTop::@3 -- vbuxx_neq_vbuc1_then_la1
|
|
cpx #8
|
|
bne b3_from_b3
|
|
jmp b4
|
|
//SEG369 irqTop::@4
|
|
b4:
|
|
//SEG370 [208] *((const byte*) BORDERCOL#0) ← (const byte) LIGHT_BLUE#0 -- _deref_pbuc1=vbuc2
|
|
lda #LIGHT_BLUE
|
|
sta BORDERCOL
|
|
//SEG371 [209] *((const byte*) BGCOL#0) ← (const byte) BLUE#0 -- _deref_pbuc1=vbuc2
|
|
lda #BLUE
|
|
sta BGCOL
|
|
//SEG372 [210] *((const byte*) RASTER#0) ← (const byte) RASTER_IRQ_MIDDLE#0 -- _deref_pbuc1=vbuc2
|
|
// Trigger IRQ at the middle of the screen
|
|
lda #RASTER_IRQ_MIDDLE
|
|
sta RASTER
|
|
//SEG373 [211] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_ALL)(void()) irqBottom() -- _deref_pptc1=pprc2
|
|
lda #<irqBottom
|
|
sta HARDWARE_IRQ
|
|
lda #>irqBottom
|
|
sta HARDWARE_IRQ+1
|
|
//SEG374 [212] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2
|
|
// Acknowledge the IRQ
|
|
lda #IRQ_RASTER
|
|
sta IRQ_STATUS
|
|
jmp breturn
|
|
//SEG375 irqTop::@return
|
|
breturn:
|
|
//SEG376 [213] return - exit interrupt(HARDWARE_ALL)
|
|
rega:
|
|
lda #00
|
|
regx:
|
|
ldx #00
|
|
regy:
|
|
ldy #00
|
|
rti
|
|
}
|
|
// Copy of the screen used for finding chars to process
|
|
SCREEN_COPY: .fill $3e8, 0
|
|
// SQUARES_X[i] = (i-20)*(i-20)
|
|
SQUARES_X: .fill 2*$28, 0
|
|
// SQUARES_Y[i] = (i-12)*(i-12)
|
|
SQUARES_Y: .fill 2*$19, 0
|
|
// Sprites currently being processed in the interrupt
|
|
PROCESSING: .fill 8*NUM_PROCESSING, 0
|
|
|
|
ASSEMBLER OPTIMIZATIONS
|
|
Removing instruction jmp b1
|
|
Removing instruction jmp bend
|
|
Removing instruction jmp b1
|
|
Removing instruction jmp b2
|
|
Removing instruction jmp b3
|
|
Removing instruction jmp b4
|
|
Removing instruction jmp b5
|
|
Removing instruction jmp b6
|
|
Removing instruction jmp b9
|
|
Removing instruction jmp b8
|
|
Removing instruction jmp b1
|
|
Removing instruction jmp b2
|
|
Removing instruction jmp b4
|
|
Removing instruction jmp b5
|
|
Removing instruction jmp b6
|
|
Removing instruction jmp b7
|
|
Removing instruction jmp breturn
|
|
Removing instruction jmp b9
|
|
Removing instruction jmp b1
|
|
Removing instruction jmp b2
|
|
Removing instruction jmp b4
|
|
Removing instruction jmp b5
|
|
Removing instruction jmp b3
|
|
Removing instruction jmp b6
|
|
Removing instruction jmp b7
|
|
Removing instruction jmp b8
|
|
Removing instruction jmp breturn
|
|
Removing instruction jmp b1
|
|
Removing instruction jmp b3
|
|
Removing instruction jmp b4
|
|
Removing instruction jmp b9
|
|
Removing instruction jmp b5
|
|
Removing instruction jmp b7
|
|
Removing instruction jmp b8
|
|
Removing instruction jmp b10
|
|
Removing instruction jmp breturn
|
|
Removing instruction jmp b1
|
|
Removing instruction jmp breturn
|
|
Removing instruction jmp b4
|
|
Removing instruction jmp b3
|
|
Removing instruction jmp b1
|
|
Removing instruction jmp b2
|
|
Removing instruction jmp breturn
|
|
Removing instruction jmp b1
|
|
Removing instruction jmp b2
|
|
Removing instruction jmp b3
|
|
Removing instruction jmp breturn
|
|
Removing instruction jmp b1
|
|
Removing instruction jmp b8
|
|
Removing instruction jmp b9
|
|
Removing instruction jmp b3
|
|
Removing instruction jmp b6
|
|
Removing instruction jmp b5
|
|
Removing instruction jmp b7
|
|
Removing instruction jmp b2
|
|
Removing instruction jmp breturn
|
|
Removing instruction jmp b1
|
|
Removing instruction jmp b2
|
|
Removing instruction jmp b3
|
|
Removing instruction jmp b4
|
|
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
|
|
Replacing instruction ldy #0 with TAY
|
|
Removing instruction ldy #0
|
|
Removing instruction lda #0
|
|
Removing instruction lda #0
|
|
Removing instruction lda #WHITE
|
|
Removing instruction ldy #0
|
|
Removing instruction lda #WHITE
|
|
Succesful ASM optimization Pass5UnnecesaryLoadElimination
|
|
Replacing label b1_from_b1 with b1
|
|
Replacing label b2_from_b2 with b2
|
|
Replacing label b2_from_b2 with b2
|
|
Replacing label b4_from_b4 with b4
|
|
Replacing label b4_from_b4 with b4
|
|
Replacing label b6_from_b6 with b6
|
|
Replacing label b2_from_b3 with b2
|
|
Replacing label b4_from_b9 with b4
|
|
Replacing label b3_from_b12 with b3
|
|
Replacing label b3_from_b11 with b3
|
|
Replacing label b1_from_b9 with b1
|
|
Replacing label b5_from_b10 with b5
|
|
Replacing label b8_from_b6 with b8
|
|
Replacing label b4_from_b2 with b4
|
|
Replacing label b3_from_b2 with b3
|
|
Replacing label b1_from_b1 with b1
|
|
Replacing label b1_from_b2 with b1
|
|
Replacing label b1_from_b1 with b1
|
|
Replacing label b3_from_b3 with b3
|
|
Removing instruction b1_from_bbegin:
|
|
Removing instruction b1:
|
|
Removing instruction main_from_b1:
|
|
Removing instruction bend_from_b1:
|
|
Removing instruction b1_from_b1:
|
|
Removing instruction b2_from_b2:
|
|
Removing instruction b3_from_b2:
|
|
Removing instruction b4_from_b4:
|
|
Removing instruction b5_from_b4:
|
|
Removing instruction initSquareTables_from_b5:
|
|
Removing instruction b6_from_b5:
|
|
Removing instruction getCharToProcess_from_b6:
|
|
Removing instruction b2_from_b1:
|
|
Removing instruction b2_from_b3:
|
|
Removing instruction b4_from_b2:
|
|
Removing instruction b4_from_b9:
|
|
Removing instruction b6_from_b6:
|
|
Removing instruction b2_from_b1:
|
|
Removing instruction b3_from_b11:
|
|
Removing instruction b3_from_b12:
|
|
Removing instruction b3_from_b5:
|
|
Removing instruction b1_from_b9:
|
|
Removing instruction b4_from_b2:
|
|
Removing instruction b4_from_b3:
|
|
Removing instruction b5_from_b10:
|
|
Removing instruction b8_from_b6:
|
|
Removing instruction b8_from_b7:
|
|
Removing instruction b3_from_b2:
|
|
Removing instruction b3_from_b4:
|
|
Removing instruction b1_from_b1:
|
|
Removing instruction breturn:
|
|
Removing instruction b1_from_b2:
|
|
Removing instruction b1_from_b1:
|
|
Removing instruction b3_from_b3:
|
|
Removing instruction breturn:
|
|
Succesful ASM optimization Pass5RedundantLabelElimination
|
|
Removing instruction bend:
|
|
Removing instruction b1_from_main:
|
|
Removing instruction b2_from_b1:
|
|
Removing instruction b3:
|
|
Removing instruction b4_from_b3:
|
|
Removing instruction b5:
|
|
Removing instruction b6:
|
|
Removing instruction b9:
|
|
Removing instruction startProcessing_from_b7:
|
|
Removing instruction b1_from_startProcessing:
|
|
Removing instruction b5:
|
|
Removing instruction b6_from_b5:
|
|
Removing instruction b7:
|
|
Removing instruction breturn:
|
|
Removing instruction b1_from_b8:
|
|
Removing instruction b9:
|
|
Removing instruction b1_from_getCharToProcess:
|
|
Removing instruction b4:
|
|
Removing instruction b5:
|
|
Removing instruction b6:
|
|
Removing instruction b7:
|
|
Removing instruction b8:
|
|
Removing instruction b1_from_b9:
|
|
Removing instruction b2_from_b10:
|
|
Removing instruction b1_from_initSquareTables:
|
|
Removing instruction b3:
|
|
Removing instruction mul8u_from_b4:
|
|
Removing instruction b9:
|
|
Removing instruction b5_from_b9:
|
|
Removing instruction b7:
|
|
Removing instruction mul8u_from_b8:
|
|
Removing instruction b10:
|
|
Removing instruction breturn:
|
|
Removing instruction b1_from_mul8u:
|
|
Removing instruction breturn:
|
|
Removing instruction b4:
|
|
Removing instruction b1_from_b3:
|
|
Removing instruction b1:
|
|
Removing instruction b2:
|
|
Removing instruction breturn:
|
|
Removing instruction b1_from_irqBottom:
|
|
Removing instruction b2:
|
|
Removing instruction processChars_from_b2:
|
|
Removing instruction b3:
|
|
Removing instruction b1_from_processChars:
|
|
Removing instruction b8:
|
|
Removing instruction b9:
|
|
Removing instruction b6:
|
|
Removing instruction b7:
|
|
Removing instruction breturn:
|
|
Removing instruction b1_from_irqTop:
|
|
Removing instruction b2:
|
|
Removing instruction b3_from_b2:
|
|
Removing instruction b4:
|
|
Succesful ASM optimization Pass5UnusedLabelElimination
|
|
Updating BasicUpstart to call main directly
|
|
Removing instruction jsr main
|
|
Succesful ASM optimization Pass5SkipBegin
|
|
Relabelling long label b6_from_b7 to b3
|
|
Succesful ASM optimization Pass5RelabelLongLabels
|
|
Removing instruction jmp b1
|
|
Removing instruction jmp b2
|
|
Removing instruction jmp b4
|
|
Removing instruction jmp b2
|
|
Removing instruction jmp b6
|
|
Removing instruction jmp b1
|
|
Removing instruction jmp b5
|
|
Removing instruction jmp b1
|
|
Removing instruction jmp b1
|
|
Removing instruction jmp b1
|
|
Removing instruction jmp b3
|
|
Succesful ASM optimization Pass5NextJumpElimination
|
|
Replacing instruction lda x with TYA
|
|
Removing instruction lda #$28
|
|
Removing instruction lda x
|
|
Removing instruction lda y
|
|
Removing instruction ldy #OFFSET_STRUCT_PROCESSINGSPRITE_STATUS
|
|
Succesful ASM optimization Pass5UnnecesaryLoadElimination
|
|
Removing instruction bbegin:
|
|
Succesful ASM optimization Pass5UnusedLabelElimination
|
|
Fixing long branch [326] bne b2 to beq
|
|
Fixing long branch [752] bne b1 to beq
|
|
Fixing long branch [188] bne b3 to beq
|
|
Fixing long branch [194] beq b8 to bne
|
|
Fixing long branch [374] beq b11 to bne
|
|
Fixing long branch [395] beq b12 to bne
|
|
Fixing long branch [399] bcc b12 to bcs
|
|
|
|
FINAL SYMBOL TABLE
|
|
(label) @1
|
|
(label) @begin
|
|
(label) @end
|
|
(byte*) BGCOL
|
|
(const byte*) BGCOL#0 BGCOL = (byte*) 53281
|
|
(byte) BLUE
|
|
(const byte) BLUE#0 BLUE = (byte) 6
|
|
(byte*) BORDERCOL
|
|
(const byte*) BORDERCOL#0 BORDERCOL = (byte*) 53280
|
|
(byte*) CIA1_INTERRUPT
|
|
(const byte*) CIA1_INTERRUPT#0 CIA1_INTERRUPT = (byte*) 56333
|
|
(byte) CIA_INTERRUPT_CLEAR
|
|
(const byte) CIA_INTERRUPT_CLEAR#0 CIA_INTERRUPT_CLEAR = (byte) $7f
|
|
(void()**) HARDWARE_IRQ
|
|
(const void()**) HARDWARE_IRQ#0 HARDWARE_IRQ = (void()**) 65534
|
|
(byte*) IRQ_ENABLE
|
|
(const byte*) IRQ_ENABLE#0 IRQ_ENABLE = (byte*) 53274
|
|
(byte) IRQ_RASTER
|
|
(const byte) IRQ_RASTER#0 IRQ_RASTER = (byte) 1
|
|
(byte*) IRQ_STATUS
|
|
(const byte*) IRQ_STATUS#0 IRQ_STATUS = (byte*) 53273
|
|
(byte) LIGHT_BLUE
|
|
(const byte) LIGHT_BLUE#0 LIGHT_BLUE = (byte) $e
|
|
(word) NOT_FOUND
|
|
(const word) NOT_FOUND#0 NOT_FOUND = (word) $ffff
|
|
(byte) NUM_PROCESSING
|
|
(const byte) NUM_PROCESSING#0 NUM_PROCESSING = (byte) 1
|
|
(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID OFFSET_STRUCT_PROCESSINGSPRITE_ID = (byte) 3
|
|
(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR OFFSET_STRUCT_PROCESSINGSPRITE_PTR = (byte) 4
|
|
(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR = (byte) 6
|
|
(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS OFFSET_STRUCT_PROCESSINGSPRITE_STATUS = (byte) 5
|
|
(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y OFFSET_STRUCT_PROCESSINGSPRITE_Y = (byte) 2
|
|
(struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING
|
|
(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 PROCESSING = { fill( NUM_PROCESSING#0, 0) }
|
|
(byte*) PROCPORT
|
|
(const byte*) PROCPORT#0 PROCPORT = (byte*) 1
|
|
(byte*) PROCPORT_DDR
|
|
(const byte*) PROCPORT_DDR#0 PROCPORT_DDR = (byte*) 0
|
|
(byte) PROCPORT_DDR_MEMORY_MASK
|
|
(const byte) PROCPORT_DDR_MEMORY_MASK#0 PROCPORT_DDR_MEMORY_MASK = (byte) 7
|
|
(byte) PROCPORT_RAM_IO
|
|
(const byte) PROCPORT_RAM_IO#0 PROCPORT_RAM_IO = (byte) $35
|
|
(word) ProcessingChar::dist
|
|
(byte) ProcessingChar::x
|
|
(byte) ProcessingChar::y
|
|
(byte) ProcessingSprite::id
|
|
(byte) ProcessingSprite::ptr
|
|
(byte*) ProcessingSprite::screenPtr
|
|
(byte) ProcessingSprite::status
|
|
(word) ProcessingSprite::x
|
|
(byte) ProcessingSprite::y
|
|
(byte*) RASTER
|
|
(const byte*) RASTER#0 RASTER = (byte*) 53266
|
|
(byte) RASTER_IRQ_MIDDLE
|
|
(const byte) RASTER_IRQ_MIDDLE#0 RASTER_IRQ_MIDDLE = (byte) $ff
|
|
(byte) RASTER_IRQ_TOP
|
|
(const byte) RASTER_IRQ_TOP#0 RASTER_IRQ_TOP = (byte) $30
|
|
(byte*) SCREEN
|
|
(const byte*) SCREEN#0 SCREEN = (byte*) 1024
|
|
(byte[$3e8]) SCREEN_COPY
|
|
(const byte[$3e8]) SCREEN_COPY#0 SCREEN_COPY = { fill( $3e8, 0) }
|
|
(const byte) SIZEOF_POINTER SIZEOF_POINTER = (byte) 2
|
|
(byte*) SPRITES_ENABLE
|
|
(const byte*) SPRITES_ENABLE#0 SPRITES_ENABLE = (byte*) 53269
|
|
(byte*) SPRITES_XMSB
|
|
(const byte*) SPRITES_XMSB#0 SPRITES_XMSB = (byte*) 53264
|
|
(byte*) SPRITES_XPOS
|
|
(const byte*) SPRITES_XPOS#0 SPRITES_XPOS = (byte*) 53248
|
|
(byte*) SPRITES_YPOS
|
|
(const byte*) SPRITES_YPOS#0 SPRITES_YPOS = (byte*) 53249
|
|
(byte*) SPRITE_DATA
|
|
(const byte*) SPRITE_DATA#0 SPRITE_DATA = (byte*) 8192
|
|
(word) SPRITE_PTRS
|
|
(const word) SPRITE_PTRS#0 SPRITE_PTRS = (word) $3f8
|
|
(word[$28]) SQUARES_X
|
|
(const word[$28]) SQUARES_X#0 SQUARES_X = { fill( $28, 0) }
|
|
(word[$19]) SQUARES_Y
|
|
(const word[$19]) SQUARES_Y#0 SQUARES_Y = { fill( $19, 0) }
|
|
(byte) STATUS_FREE
|
|
(const byte) STATUS_FREE#0 STATUS_FREE = (byte) 0
|
|
(byte) STATUS_NEW
|
|
(const byte) STATUS_NEW#0 STATUS_NEW = (byte) 1
|
|
(byte) STATUS_PROCESSING
|
|
(const byte) STATUS_PROCESSING#0 STATUS_PROCESSING = (byte) 2
|
|
(byte*) VIC_CONTROL
|
|
(const byte*) VIC_CONTROL#0 VIC_CONTROL = (byte*) 53265
|
|
(byte) WHITE
|
|
(const byte) WHITE#0 WHITE = (byte) 1
|
|
(struct ProcessingChar()) getCharToProcess()
|
|
(word~) getCharToProcess::$10 $10 zp ZP_WORD:37 4.0
|
|
(byte*~) getCharToProcess::$11 $11 zp ZP_WORD:37 4.0
|
|
(byte~) getCharToProcess::$13 reg byte x 1001.0
|
|
(byte~) getCharToProcess::$14 reg byte a 2002.0
|
|
(word) getCharToProcess::$15 $15 zp ZP_WORD:39 4.0
|
|
(word) getCharToProcess::$16 $16 zp ZP_WORD:37 4.0
|
|
(word~) getCharToProcess::$9 $9 zp ZP_WORD:37 3.0
|
|
(label) getCharToProcess::@1
|
|
(label) getCharToProcess::@10
|
|
(label) getCharToProcess::@11
|
|
(label) getCharToProcess::@12
|
|
(label) getCharToProcess::@2
|
|
(label) getCharToProcess::@3
|
|
(label) getCharToProcess::@4
|
|
(label) getCharToProcess::@5
|
|
(label) getCharToProcess::@6
|
|
(label) getCharToProcess::@7
|
|
(label) getCharToProcess::@8
|
|
(label) getCharToProcess::@9
|
|
(label) getCharToProcess::@return
|
|
(struct ProcessingChar) getCharToProcess::closest
|
|
(word) getCharToProcess::closest_dist
|
|
(word~) getCharToProcess::closest_dist#10 closest_dist zp ZP_WORD:15 202.0
|
|
(word~) getCharToProcess::closest_dist#12 closest_dist zp ZP_WORD:15 2002.0
|
|
(word) getCharToProcess::closest_dist#2 closest_dist zp ZP_WORD:15 684.1666666666667
|
|
(word) getCharToProcess::closest_dist#8 closest_dist zp ZP_WORD:15 202.0
|
|
(byte) getCharToProcess::closest_x
|
|
(byte) getCharToProcess::closest_x#7 closest_x zp ZP_BYTE:17 388.0
|
|
(byte) getCharToProcess::closest_x#9 closest_x zp ZP_BYTE:17 202.0
|
|
(byte) getCharToProcess::closest_y
|
|
(byte) getCharToProcess::closest_y#7 closest_y zp ZP_BYTE:18 388.0
|
|
(byte) getCharToProcess::closest_y#9 closest_y zp ZP_BYTE:18 202.0
|
|
(word) getCharToProcess::dist
|
|
(word) getCharToProcess::dist#0 dist zp ZP_WORD:19 750.75
|
|
(struct ProcessingChar) getCharToProcess::return
|
|
(word) getCharToProcess::return_dist
|
|
(word) getCharToProcess::return_dist#0 return_dist zp ZP_WORD:19 7.333333333333333
|
|
(word) getCharToProcess::return_dist#1 return_dist zp ZP_WORD:19 242.23529411764704
|
|
(word~) getCharToProcess::return_dist#5 return_dist zp ZP_WORD:19 2002.0
|
|
(word~) getCharToProcess::return_dist#6 return_dist zp ZP_WORD:19 2002.0
|
|
(byte) getCharToProcess::return_x
|
|
(byte) getCharToProcess::return_x#0 reg byte y 7.333333333333333
|
|
(byte) getCharToProcess::return_x#1 return_x zp ZP_BYTE:17 242.23529411764704
|
|
(byte~) getCharToProcess::return_x#7 return_x zp ZP_BYTE:17 1001.0
|
|
(byte) getCharToProcess::return_y
|
|
(byte) getCharToProcess::return_y#0 reg byte x 7.333333333333333
|
|
(byte) getCharToProcess::return_y#1 return_y zp ZP_BYTE:18 228.66666666666669
|
|
(byte~) getCharToProcess::return_y#7 return_y zp ZP_BYTE:18 2002.0
|
|
(byte*) getCharToProcess::screen_line
|
|
(byte*) getCharToProcess::screen_line#1 screen_line zp ZP_WORD:11 50.5
|
|
(byte*) getCharToProcess::screen_line#4 screen_line zp ZP_WORD:11 80.2
|
|
(byte) getCharToProcess::x
|
|
(byte) getCharToProcess::x#1 x zp ZP_BYTE:14 1001.0
|
|
(byte) getCharToProcess::x#2 x zp ZP_BYTE:14 455.0
|
|
(byte) getCharToProcess::y
|
|
(byte) getCharToProcess::y#1 y zp ZP_BYTE:13 101.0
|
|
(byte) getCharToProcess::y#7 y zp ZP_BYTE:13 137.75
|
|
(void()) initSquareTables()
|
|
(byte~) initSquareTables::$10 reg byte a 22.0
|
|
(byte~) initSquareTables::$12 reg byte a 22.0
|
|
(word~) initSquareTables::$14 $14 zp ZP_WORD:23 11.0
|
|
(byte~) initSquareTables::$16 reg byte a 22.0
|
|
(byte~) initSquareTables::$17 reg byte a 22.0
|
|
(byte~) initSquareTables::$2 reg byte a 22.0
|
|
(byte~) initSquareTables::$4 reg byte a 22.0
|
|
(word~) initSquareTables::$6 $6 zp ZP_WORD:23 11.0
|
|
(label) initSquareTables::@1
|
|
(label) initSquareTables::@10
|
|
(label) initSquareTables::@2
|
|
(label) initSquareTables::@3
|
|
(label) initSquareTables::@4
|
|
(label) initSquareTables::@5
|
|
(label) initSquareTables::@6
|
|
(label) initSquareTables::@7
|
|
(label) initSquareTables::@8
|
|
(label) initSquareTables::@9
|
|
(label) initSquareTables::@return
|
|
(byte) initSquareTables::x
|
|
(byte) initSquareTables::x#1 x zp ZP_BYTE:21 16.5
|
|
(byte) initSquareTables::x#2 x zp ZP_BYTE:21 5.5
|
|
(byte) initSquareTables::x_dist
|
|
(byte) initSquareTables::x_dist#0 reg byte a 22.0
|
|
(byte) initSquareTables::y
|
|
(byte) initSquareTables::y#1 y zp ZP_BYTE:22 16.5
|
|
(byte) initSquareTables::y#2 y zp ZP_BYTE:22 5.5
|
|
(byte) initSquareTables::y_dist
|
|
(byte) initSquareTables::y_dist#0 reg byte a 22.0
|
|
interrupt(HARDWARE_ALL)(void()) irqBottom()
|
|
(label) irqBottom::@1
|
|
(label) irqBottom::@2
|
|
(label) irqBottom::@3
|
|
(label) irqBottom::@return
|
|
(byte) irqBottom::i
|
|
(byte) irqBottom::i#1 reg byte x 16.5
|
|
(byte) irqBottom::i#2 reg byte x 22.0
|
|
interrupt(HARDWARE_ALL)(void()) irqTop()
|
|
(label) irqTop::@1
|
|
(label) irqTop::@2
|
|
(label) irqTop::@3
|
|
(label) irqTop::@4
|
|
(label) irqTop::@return
|
|
(byte) irqTop::i
|
|
(byte) irqTop::i#1 reg byte x 16.5
|
|
(byte) irqTop::i#2 reg byte x 22.0
|
|
(byte) irqTop::i1
|
|
(byte) irqTop::i1#1 reg byte x 16.5
|
|
(byte) irqTop::i1#2 reg byte x 22.0
|
|
(void()) main()
|
|
(struct ProcessingChar~) main::$10
|
|
(byte~) main::$17 reg byte x 12.833333333333334
|
|
(label) main::@1
|
|
(label) main::@2
|
|
(label) main::@3
|
|
(label) main::@4
|
|
(label) main::@5
|
|
(label) main::@6
|
|
(label) main::@7
|
|
(label) main::@8
|
|
(label) main::@9
|
|
(struct ProcessingChar) main::center
|
|
(word) main::center_dist
|
|
(word) main::center_dist#0 center_dist zp ZP_WORD:19 22.0
|
|
(byte) main::center_x
|
|
(byte) main::center_x#0 reg byte y 5.5
|
|
(byte) main::center_y
|
|
(byte) main::center_y#0 reg byte x 5.5
|
|
(byte*) main::dst
|
|
(byte*) main::dst#1 dst zp ZP_WORD:6 11.0
|
|
(byte*) main::dst#2 dst zp ZP_WORD:6 11.0
|
|
(byte) main::i
|
|
(byte) main::i#1 reg byte y 16.5
|
|
(byte) main::i#2 reg byte y 4.125
|
|
(byte*) main::sp
|
|
(byte*) main::sp#1 sp zp ZP_WORD:2 16.5
|
|
(byte*) main::sp#2 sp zp ZP_WORD:2 16.5
|
|
(byte*) main::src
|
|
(byte*) main::src#1 src zp ZP_WORD:4 11.0
|
|
(byte*) main::src#2 src zp ZP_WORD:4 16.5
|
|
(word()) mul8u((byte) mul8u::a , (byte) mul8u::b)
|
|
(byte~) mul8u::$1 reg byte a 202.0
|
|
(label) mul8u::@1
|
|
(label) mul8u::@2
|
|
(label) mul8u::@3
|
|
(label) mul8u::@4
|
|
(label) mul8u::@return
|
|
(byte) mul8u::a
|
|
(byte) mul8u::a#0 reg byte x 101.0
|
|
(byte) mul8u::a#1 reg byte x 11.0
|
|
(byte) mul8u::a#2 reg byte x 11.0
|
|
(byte) mul8u::a#3 reg byte x 67.66666666666666
|
|
(byte) mul8u::a#6 reg byte x 24.0
|
|
(byte) mul8u::b
|
|
(byte) mul8u::b#0 reg byte a 22.0
|
|
(byte) mul8u::b#1 reg byte a 22.0
|
|
(word) mul8u::mb
|
|
(word) mul8u::mb#0 mb zp ZP_WORD:25 24.0
|
|
(word) mul8u::mb#1 mb zp ZP_WORD:25 202.0
|
|
(word) mul8u::mb#2 mb zp ZP_WORD:25 43.57142857142858
|
|
(word) mul8u::res
|
|
(word) mul8u::res#1 res zp ZP_WORD:23 202.0
|
|
(word) mul8u::res#2 res zp ZP_WORD:23 46.42857142857143
|
|
(word) mul8u::res#6 res zp ZP_WORD:23 101.0
|
|
(word) mul8u::return
|
|
(word) mul8u::return#2 return zp ZP_WORD:23 22.0
|
|
(word) mul8u::return#3 return zp ZP_WORD:23 22.0
|
|
(void()) processChars()
|
|
(byte~) processChars::$10 reg byte a 22.0
|
|
(byte~) processChars::$12 reg byte a 22.0
|
|
(byte~) processChars::$13 reg byte x 11.0
|
|
(byte~) processChars::$16 reg byte a 22.0
|
|
(byte~) processChars::$18 reg byte a 22.0
|
|
(byte~) processChars::$9 reg byte a 22.0
|
|
(label) processChars::@1
|
|
(label) processChars::@2
|
|
(label) processChars::@3
|
|
(label) processChars::@4
|
|
(label) processChars::@5
|
|
(label) processChars::@6
|
|
(label) processChars::@7
|
|
(label) processChars::@8
|
|
(label) processChars::@9
|
|
(label) processChars::@return
|
|
(byte) processChars::bitmask
|
|
(byte) processChars::bitmask#0 bitmask zp ZP_BYTE:43 2.8947368421052633
|
|
(byte) processChars::i
|
|
(byte) processChars::i#1 i zp ZP_BYTE:27 16.5
|
|
(byte) processChars::i#10 i zp ZP_BYTE:27 1.8333333333333333
|
|
(struct ProcessingSprite*) processChars::processing
|
|
(struct ProcessingSprite*) processChars::processing#0 processing zp ZP_WORD:41 0.5789473684210527
|
|
(void()) setupRasterIrq((word) setupRasterIrq::raster , (void()*) setupRasterIrq::irqRoutine)
|
|
(label) setupRasterIrq::@1
|
|
(label) setupRasterIrq::@2
|
|
(label) setupRasterIrq::@return
|
|
(void()*) setupRasterIrq::irqRoutine
|
|
(const void()*) setupRasterIrq::irqRoutine#0 irqRoutine = &interrupt(HARDWARE_ALL)(void()) irqTop()
|
|
(word) setupRasterIrq::raster
|
|
(void()) startProcessing((byte) startProcessing::center_x , (byte) startProcessing::center_y , (word) startProcessing::center_dist)
|
|
(word~) startProcessing::$0 $0 zp ZP_WORD:9 4.0
|
|
(word~) startProcessing::$1 $1 zp ZP_WORD:9 4.0
|
|
(word~) startProcessing::$11 $11 zp ZP_WORD:33 3.0
|
|
(word~) startProcessing::$12 $12 zp ZP_WORD:33 4.0
|
|
(byte*~) startProcessing::$13 $13 zp ZP_WORD:33 4.0
|
|
(byte~) startProcessing::$21 reg byte a 2002.0
|
|
(byte~) startProcessing::$22 reg byte x 2.333333333333333
|
|
(word~) startProcessing::$3 $3 zp ZP_WORD:30 4.0
|
|
(word) startProcessing::$30 $30 zp ZP_WORD:35 4.0
|
|
(word) startProcessing::$31 $31 zp ZP_WORD:33 4.0
|
|
(word~) startProcessing::$4 $4 zp ZP_WORD:30 4.0
|
|
(byte~) startProcessing::$6 reg byte a 4.0
|
|
(label) startProcessing::@1
|
|
(label) startProcessing::@2
|
|
(label) startProcessing::@3
|
|
(label) startProcessing::@4
|
|
(label) startProcessing::@5
|
|
(label) startProcessing::@6
|
|
(label) startProcessing::@7
|
|
(label) startProcessing::@8
|
|
(label) startProcessing::@9
|
|
(label) startProcessing::@return
|
|
(struct ProcessingChar) startProcessing::center
|
|
(word) startProcessing::center_dist
|
|
(byte) startProcessing::center_x
|
|
(byte) startProcessing::center_x#0 center_x zp ZP_BYTE:28 0.40625
|
|
(byte) startProcessing::center_y
|
|
(byte) startProcessing::center_y#0 center_y zp ZP_BYTE:29 0.5
|
|
(byte) startProcessing::freeIdx
|
|
(byte) startProcessing::freeIdx#2 freeIdx zp ZP_BYTE:8 52.39999999999999
|
|
(byte) startProcessing::freeIdx#6 reg byte x 33.666666666666664
|
|
(byte~) startProcessing::freeIdx#7 reg byte x 202.0
|
|
(byte~) startProcessing::freeIdx#8 freeIdx zp ZP_BYTE:8 202.0
|
|
(byte) startProcessing::i
|
|
(byte) startProcessing::i#1 i zp ZP_BYTE:8 1501.5
|
|
(byte) startProcessing::i#2 i zp ZP_BYTE:8 1334.6666666666667
|
|
(byte) startProcessing::i1
|
|
(byte) startProcessing::i1#1 reg byte x 151.5
|
|
(byte) startProcessing::i1#2 reg byte x 67.33333333333333
|
|
(byte*) startProcessing::screenPtr
|
|
(byte*) startProcessing::screenPtr#0 screenPtr zp ZP_WORD:33 0.5714285714285714
|
|
(byte*) startProcessing::spriteData
|
|
(byte*) startProcessing::spriteData#0 spriteData zp ZP_WORD:9 4.0
|
|
(byte*) startProcessing::spriteData#1 spriteData zp ZP_WORD:9 67.33333333333333
|
|
(byte*) startProcessing::spriteData#2 spriteData zp ZP_WORD:9 152.5
|
|
(byte) startProcessing::spriteIdx
|
|
(byte) startProcessing::spritePtr
|
|
(byte) startProcessing::spritePtr#0 spritePtr zp ZP_BYTE:32 0.36363636363636365
|
|
(word) startProcessing::spriteX
|
|
(word) startProcessing::spriteX#0 spriteX zp ZP_WORD:30 0.36363636363636365
|
|
(byte) startProcessing::spriteY
|
|
(byte) startProcessing::spriteY#0 reg byte y 0.4
|
|
|
|
reg byte y [ main::i#2 main::i#1 ]
|
|
zp ZP_WORD:2 [ main::sp#2 main::sp#1 ]
|
|
zp ZP_WORD:4 [ main::src#2 main::src#1 ]
|
|
zp ZP_WORD:6 [ main::dst#2 main::dst#1 ]
|
|
reg byte x [ startProcessing::freeIdx#6 startProcessing::freeIdx#7 ]
|
|
zp ZP_BYTE:8 [ startProcessing::freeIdx#2 startProcessing::freeIdx#8 startProcessing::i#2 startProcessing::i#1 ]
|
|
zp ZP_WORD:9 [ startProcessing::spriteData#2 startProcessing::spriteData#0 startProcessing::spriteData#1 startProcessing::$1 startProcessing::$0 ]
|
|
reg byte x [ startProcessing::i1#2 startProcessing::i1#1 ]
|
|
zp ZP_WORD:11 [ getCharToProcess::screen_line#4 getCharToProcess::screen_line#1 ]
|
|
zp ZP_BYTE:13 [ getCharToProcess::y#7 getCharToProcess::y#1 ]
|
|
zp ZP_BYTE:14 [ getCharToProcess::x#2 getCharToProcess::x#1 ]
|
|
zp ZP_WORD:15 [ getCharToProcess::closest_dist#2 getCharToProcess::closest_dist#8 getCharToProcess::closest_dist#10 getCharToProcess::closest_dist#12 ]
|
|
zp ZP_BYTE:17 [ getCharToProcess::closest_x#7 getCharToProcess::closest_x#9 getCharToProcess::return_x#1 getCharToProcess::return_x#7 ]
|
|
zp ZP_BYTE:18 [ getCharToProcess::closest_y#7 getCharToProcess::closest_y#9 getCharToProcess::return_y#1 getCharToProcess::return_y#7 ]
|
|
zp ZP_WORD:19 [ getCharToProcess::return_dist#1 getCharToProcess::return_dist#5 getCharToProcess::return_dist#6 getCharToProcess::dist#0 getCharToProcess::return_dist#0 main::center_dist#0 ]
|
|
zp ZP_BYTE:21 [ initSquareTables::x#2 initSquareTables::x#1 ]
|
|
reg byte a [ initSquareTables::x_dist#0 initSquareTables::$4 initSquareTables::$2 ]
|
|
zp ZP_BYTE:22 [ initSquareTables::y#2 initSquareTables::y#1 ]
|
|
reg byte a [ initSquareTables::y_dist#0 initSquareTables::$12 initSquareTables::$10 ]
|
|
reg byte a [ mul8u::b#1 ]
|
|
reg byte a [ mul8u::b#0 ]
|
|
reg byte x [ mul8u::a#3 mul8u::a#6 mul8u::a#2 mul8u::a#1 mul8u::a#0 ]
|
|
zp ZP_WORD:23 [ mul8u::res#2 mul8u::res#6 mul8u::res#1 mul8u::return#2 mul8u::return#3 initSquareTables::$6 initSquareTables::$14 ]
|
|
zp ZP_WORD:25 [ mul8u::mb#2 mul8u::mb#0 mul8u::mb#1 ]
|
|
reg byte x [ irqBottom::i#2 irqBottom::i#1 ]
|
|
zp ZP_BYTE:27 [ processChars::i#10 processChars::i#1 ]
|
|
reg byte x [ irqTop::i#2 irqTop::i#1 ]
|
|
reg byte x [ irqTop::i1#2 irqTop::i1#1 ]
|
|
reg byte x [ main::$17 ]
|
|
reg byte y [ getCharToProcess::return_x#0 ]
|
|
reg byte x [ getCharToProcess::return_y#0 ]
|
|
reg byte y [ main::center_x#0 ]
|
|
reg byte x [ main::center_y#0 ]
|
|
zp ZP_BYTE:28 [ startProcessing::center_x#0 ]
|
|
zp ZP_BYTE:29 [ startProcessing::center_y#0 ]
|
|
reg byte a [ startProcessing::$21 ]
|
|
zp ZP_WORD:30 [ startProcessing::$3 startProcessing::$4 startProcessing::spriteX#0 ]
|
|
reg byte a [ startProcessing::$6 ]
|
|
reg byte y [ startProcessing::spriteY#0 ]
|
|
zp ZP_BYTE:32 [ startProcessing::spritePtr#0 ]
|
|
zp ZP_WORD:33 [ startProcessing::$11 startProcessing::$31 startProcessing::$12 startProcessing::$13 startProcessing::screenPtr#0 ]
|
|
zp ZP_WORD:35 [ startProcessing::$30 ]
|
|
reg byte x [ startProcessing::$22 ]
|
|
reg byte x [ getCharToProcess::$13 ]
|
|
reg byte a [ getCharToProcess::$14 ]
|
|
zp ZP_WORD:37 [ getCharToProcess::$9 getCharToProcess::$16 getCharToProcess::$10 getCharToProcess::$11 ]
|
|
zp ZP_WORD:39 [ getCharToProcess::$15 ]
|
|
reg byte a [ initSquareTables::$16 ]
|
|
reg byte a [ initSquareTables::$17 ]
|
|
reg byte a [ mul8u::$1 ]
|
|
reg byte a [ processChars::$18 ]
|
|
zp ZP_WORD:41 [ processChars::processing#0 ]
|
|
zp ZP_BYTE:43 [ processChars::bitmask#0 ]
|
|
reg byte a [ processChars::$9 ]
|
|
reg byte a [ processChars::$10 ]
|
|
reg byte x [ processChars::$13 ]
|
|
reg byte a [ processChars::$12 ]
|
|
reg byte a [ processChars::$16 ]
|
|
|
|
|
|
FINAL ASSEMBLER
|
|
Score: 225871
|
|
|
|
//SEG0 File Comments
|
|
// Black Hole at the center of the BASIC screen sucking in letters
|
|
//SEG1 Basic Upstart
|
|
.pc = $801 "Basic"
|
|
:BasicUpstart(main)
|
|
.pc = $80d "Program"
|
|
//SEG2 Global Constants & labels
|
|
.const SIZEOF_POINTER = 2
|
|
.const OFFSET_STRUCT_PROCESSINGSPRITE_Y = 2
|
|
.const OFFSET_STRUCT_PROCESSINGSPRITE_ID = 3
|
|
.const OFFSET_STRUCT_PROCESSINGSPRITE_PTR = 4
|
|
.const OFFSET_STRUCT_PROCESSINGSPRITE_STATUS = 5
|
|
.const OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR = 6
|
|
// Processor port data direction register
|
|
.label PROCPORT_DDR = 0
|
|
// Mask for PROCESSOR_PORT_DDR which allows only memory configuration to be written
|
|
.const PROCPORT_DDR_MEMORY_MASK = 7
|
|
// Processor Port Register controlling RAM/ROM configuration and the datasette
|
|
.label PROCPORT = 1
|
|
// RAM in $A000, $E000 I/O in $D000
|
|
.const PROCPORT_RAM_IO = $35
|
|
// The offset of the sprite pointers from the screen start address
|
|
.const SPRITE_PTRS = $3f8
|
|
.label SPRITES_XPOS = $d000
|
|
.label SPRITES_YPOS = $d001
|
|
.label SPRITES_XMSB = $d010
|
|
.label RASTER = $d012
|
|
.label SPRITES_ENABLE = $d015
|
|
.label BORDERCOL = $d020
|
|
.label BGCOL = $d021
|
|
.label VIC_CONTROL = $d011
|
|
// VIC II IRQ Status Register
|
|
.label IRQ_STATUS = $d019
|
|
// VIC II IRQ Enable Register
|
|
.label IRQ_ENABLE = $d01a
|
|
// Bits for the IRQ Status/Enable Registers
|
|
.const IRQ_RASTER = 1
|
|
// CIA#1 Interrupt Status & Control Register
|
|
.label CIA1_INTERRUPT = $dc0d
|
|
// Value that disables all CIA interrupts when stored to the CIA Interrupt registers
|
|
.const CIA_INTERRUPT_CLEAR = $7f
|
|
// The vector used when the HARDWARE serves IRQ interrupts
|
|
.label HARDWARE_IRQ = $fffe
|
|
.const WHITE = 1
|
|
.const BLUE = 6
|
|
.const LIGHT_BLUE = $e
|
|
// Address of the screen
|
|
.label SCREEN = $400
|
|
// Sprite data for the animating sprites
|
|
.label SPRITE_DATA = $2000
|
|
// Max number of chars processed at once
|
|
.const NUM_PROCESSING = 1
|
|
// Distance value meaning not found
|
|
.const NOT_FOUND = $ffff
|
|
// Values for ProcessingSprite.status
|
|
.const STATUS_FREE = 0
|
|
.const STATUS_NEW = 1
|
|
.const STATUS_PROCESSING = 2
|
|
.const RASTER_IRQ_TOP = $30
|
|
.const RASTER_IRQ_MIDDLE = $ff
|
|
//SEG3 @begin
|
|
//SEG4 [1] phi from @begin to @1 [phi:@begin->@1]
|
|
//SEG5 @1
|
|
//SEG6 [2] call main
|
|
//SEG7 [4] phi from @1 to main [phi:@1->main]
|
|
//SEG8 [3] phi from @1 to @end [phi:@1->@end]
|
|
//SEG9 @end
|
|
//SEG10 main
|
|
main: {
|
|
.label sp = 2
|
|
.label src = 4
|
|
.label dst = 6
|
|
.label center_dist = $13
|
|
//SEG11 [5] phi from main to main::@1 [phi:main->main::@1]
|
|
//SEG12 [5] phi (byte) main::i#2 = (byte) 0 [phi:main->main::@1#0] -- vbuyy=vbuc1
|
|
ldy #0
|
|
// Init processing array
|
|
//SEG13 [5] phi from main::@1 to main::@1 [phi:main::@1->main::@1]
|
|
//SEG14 [5] phi (byte) main::i#2 = (byte) main::i#1 [phi:main::@1->main::@1#0] -- register_copy
|
|
//SEG15 main::@1
|
|
b1:
|
|
//SEG16 [6] (byte~) main::$17 ← (byte) main::i#2 << (byte) 3 -- vbuxx=vbuyy_rol_3
|
|
tya
|
|
asl
|
|
asl
|
|
asl
|
|
tax
|
|
//SEG17 [7] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (byte~) main::$17) ← (byte) 0 -- pwuc1_derefidx_vbuxx=vbuc2
|
|
lda #0
|
|
sta PROCESSING,x
|
|
sta PROCESSING+1,x
|
|
//SEG18 [8] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y + (byte~) main::$17) ← (byte) 0 -- pbuc1_derefidx_vbuxx=vbuc2
|
|
sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_Y,x
|
|
//SEG19 [9] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID + (byte~) main::$17) ← (byte) 0 -- pbuc1_derefidx_vbuxx=vbuc2
|
|
sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_ID,x
|
|
//SEG20 [10] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR + (byte~) main::$17) ← (byte) 0 -- pbuc1_derefidx_vbuxx=vbuc2
|
|
sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_PTR,x
|
|
//SEG21 [11] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS + (byte~) main::$17) ← (const byte) STATUS_FREE#0 -- pbuc1_derefidx_vbuxx=vbuc2
|
|
lda #STATUS_FREE
|
|
sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_STATUS,x
|
|
//SEG22 [12] *((byte**)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR + (byte~) main::$17) ← (byte*) 0 -- pptc1_derefidx_vbuxx=pbuc2
|
|
lda #<0
|
|
sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR,x
|
|
sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR+1,x
|
|
//SEG23 [13] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuyy=_inc_vbuyy
|
|
iny
|
|
//SEG24 [14] if((byte) main::i#1!=(byte) 1) goto main::@1 -- vbuyy_neq_vbuc1_then_la1
|
|
cpy #1
|
|
bne b1
|
|
//SEG25 [15] phi from main::@1 to main::@2 [phi:main::@1->main::@2]
|
|
//SEG26 [15] phi (byte*) main::sp#2 = (const byte*) SPRITE_DATA#0 [phi:main::@1->main::@2#0] -- pbuz1=pbuc1
|
|
lda #<SPRITE_DATA
|
|
sta sp
|
|
lda #>SPRITE_DATA
|
|
sta sp+1
|
|
// Clear sprites
|
|
//SEG27 [15] phi from main::@2 to main::@2 [phi:main::@2->main::@2]
|
|
//SEG28 [15] phi (byte*) main::sp#2 = (byte*) main::sp#1 [phi:main::@2->main::@2#0] -- register_copy
|
|
//SEG29 main::@2
|
|
b2:
|
|
//SEG30 [16] *((byte*) main::sp#2) ← (byte) 0 -- _deref_pbuz1=vbuc1
|
|
lda #0
|
|
tay
|
|
sta (sp),y
|
|
//SEG31 [17] (byte*) main::sp#1 ← ++ (byte*) main::sp#2 -- pbuz1=_inc_pbuz1
|
|
inc sp
|
|
bne !+
|
|
inc sp+1
|
|
!:
|
|
//SEG32 [18] if((byte*) main::sp#1<(const byte*) SPRITE_DATA#0+(const byte) SIZEOF_POINTER) goto main::@2 -- pbuz1_lt_pbuc1_then_la1
|
|
lda sp+1
|
|
cmp #>SPRITE_DATA+SIZEOF_POINTER
|
|
bcc b2
|
|
bne !+
|
|
lda sp
|
|
cmp #<SPRITE_DATA+SIZEOF_POINTER
|
|
bcc b2
|
|
!:
|
|
//SEG33 [19] phi from main::@2 to main::@3 [phi:main::@2->main::@3]
|
|
//SEG34 main::@3
|
|
//SEG35 [20] call setupRasterIrq
|
|
jsr setupRasterIrq
|
|
//SEG36 [21] phi from main::@3 to main::@4 [phi:main::@3->main::@4]
|
|
//SEG37 [21] phi (byte*) main::dst#2 = (const byte[$3e8]) SCREEN_COPY#0 [phi:main::@3->main::@4#0] -- pbuz1=pbuc1
|
|
lda #<SCREEN_COPY
|
|
sta dst
|
|
lda #>SCREEN_COPY
|
|
sta dst+1
|
|
//SEG38 [21] phi (byte*) main::src#2 = (const byte*) SCREEN#0 [phi:main::@3->main::@4#1] -- pbuz1=pbuc1
|
|
lda #<SCREEN
|
|
sta src
|
|
lda #>SCREEN
|
|
sta src+1
|
|
// Fill screen with some chars
|
|
//for( byte* sc: SCREEN..SCREEN+999) *sc = 'a'+(<sc&0x1f);
|
|
// Copy screen to screen copy
|
|
//SEG39 [21] phi from main::@4 to main::@4 [phi:main::@4->main::@4]
|
|
//SEG40 [21] phi (byte*) main::dst#2 = (byte*) main::dst#1 [phi:main::@4->main::@4#0] -- register_copy
|
|
//SEG41 [21] phi (byte*) main::src#2 = (byte*) main::src#1 [phi:main::@4->main::@4#1] -- register_copy
|
|
//SEG42 main::@4
|
|
b4:
|
|
//SEG43 [22] *((byte*) main::dst#2) ← *((byte*) main::src#2) -- _deref_pbuz1=_deref_pbuz2
|
|
ldy #0
|
|
lda (src),y
|
|
sta (dst),y
|
|
//SEG44 [23] (byte*) main::src#1 ← ++ (byte*) main::src#2 -- pbuz1=_inc_pbuz1
|
|
inc src
|
|
bne !+
|
|
inc src+1
|
|
!:
|
|
//SEG45 [24] (byte*) main::dst#1 ← ++ (byte*) main::dst#2 -- pbuz1=_inc_pbuz1
|
|
inc dst
|
|
bne !+
|
|
inc dst+1
|
|
!:
|
|
//SEG46 [25] if((byte*) main::src#1!=(const byte*) SCREEN#0+(word) $3e8) goto main::@4 -- pbuz1_neq_pbuc1_then_la1
|
|
lda src+1
|
|
cmp #>SCREEN+$3e8
|
|
bne b4
|
|
lda src
|
|
cmp #<SCREEN+$3e8
|
|
bne b4
|
|
//SEG47 [26] phi from main::@4 to main::@5 [phi:main::@4->main::@5]
|
|
//SEG48 main::@5
|
|
//SEG49 [27] call initSquareTables
|
|
//SEG50 [108] phi from main::@5 to initSquareTables [phi:main::@5->initSquareTables]
|
|
jsr initSquareTables
|
|
//SEG51 [28] phi from main::@5 main::@7 to main::@6 [phi:main::@5/main::@7->main::@6]
|
|
b3:
|
|
// Main loop
|
|
//SEG52 main::@6
|
|
//SEG53 [29] call getCharToProcess
|
|
//SEG54 [80] phi from main::@6 to getCharToProcess [phi:main::@6->getCharToProcess]
|
|
jsr getCharToProcess
|
|
//SEG55 [30] (byte) getCharToProcess::return_x#0 ← (byte) getCharToProcess::return_x#1 -- vbuyy=vbuz1
|
|
ldy getCharToProcess.return_x
|
|
//SEG56 [31] (byte) getCharToProcess::return_y#0 ← (byte) getCharToProcess::return_y#1 -- vbuxx=vbuz1
|
|
ldx getCharToProcess.return_y
|
|
//SEG57 [32] (word) getCharToProcess::return_dist#0 ← (word) getCharToProcess::return_dist#1
|
|
//SEG58 main::@9
|
|
//SEG59 [33] (byte) main::center_x#0 ← (byte) getCharToProcess::return_x#0
|
|
//SEG60 [34] (byte) main::center_y#0 ← (byte) getCharToProcess::return_y#0
|
|
//SEG61 [35] (word) main::center_dist#0 ← (word) getCharToProcess::return_dist#0
|
|
//SEG62 [36] if((word) main::center_dist#0!=(const word) NOT_FOUND#0) goto main::@7 -- vwuz1_neq_vwuc1_then_la1
|
|
lda center_dist+1
|
|
cmp #>NOT_FOUND
|
|
bne b7
|
|
lda center_dist
|
|
cmp #<NOT_FOUND
|
|
bne b7
|
|
//SEG63 main::@8
|
|
b8:
|
|
//SEG64 [37] *((const byte*) SCREEN#0+(word) $3e7) ← ++ *((const byte*) SCREEN#0+(word) $3e7) -- _deref_pbuc1=_inc__deref_pbuc1
|
|
inc SCREEN+$3e7
|
|
jmp b8
|
|
//SEG65 main::@7
|
|
b7:
|
|
//SEG66 [38] (byte) startProcessing::center_x#0 ← (byte) main::center_x#0 -- vbuz1=vbuyy
|
|
sty startProcessing.center_x
|
|
//SEG67 [39] (byte) startProcessing::center_y#0 ← (byte) main::center_y#0 -- vbuz1=vbuxx
|
|
stx startProcessing.center_y
|
|
//SEG68 [40] call startProcessing
|
|
//SEG69 [41] phi from main::@7 to startProcessing [phi:main::@7->startProcessing]
|
|
jsr startProcessing
|
|
jmp b3
|
|
}
|
|
//SEG70 startProcessing
|
|
// Start processing a char - by inserting it into the PROCESSING array
|
|
// startProcessing(byte zeropage($1c) center_x, byte zeropage($1d) center_y)
|
|
startProcessing: {
|
|
.label _0 = 9
|
|
.label _1 = 9
|
|
.label _3 = $1e
|
|
.label _4 = $1e
|
|
.label _11 = $21
|
|
.label _12 = $21
|
|
.label _13 = $21
|
|
.label center_x = $1c
|
|
.label center_y = $1d
|
|
.label i = 8
|
|
.label spriteData = 9
|
|
.label spriteX = $1e
|
|
.label spritePtr = $20
|
|
.label screenPtr = $21
|
|
.label freeIdx = 8
|
|
.label _30 = $23
|
|
.label _31 = $21
|
|
//SEG71 [42] phi from startProcessing to startProcessing::@1 [phi:startProcessing->startProcessing::@1]
|
|
//SEG72 [42] phi (byte) startProcessing::freeIdx#6 = (byte) $ff [phi:startProcessing->startProcessing::@1#0] -- vbuxx=vbuc1
|
|
ldx #$ff
|
|
//SEG73 startProcessing::@1
|
|
b1:
|
|
//SEG74 [43] phi from startProcessing::@1 to startProcessing::@2 [phi:startProcessing::@1->startProcessing::@2]
|
|
//SEG75 [43] phi (byte) startProcessing::i#2 = (byte) 0 [phi:startProcessing::@1->startProcessing::@2#0] -- vbuz1=vbuc1
|
|
lda #0
|
|
sta i
|
|
//SEG76 [43] phi from startProcessing::@3 to startProcessing::@2 [phi:startProcessing::@3->startProcessing::@2]
|
|
//SEG77 [43] phi (byte) startProcessing::i#2 = (byte) startProcessing::i#1 [phi:startProcessing::@3->startProcessing::@2#0] -- register_copy
|
|
//SEG78 startProcessing::@2
|
|
b2:
|
|
//SEG79 [44] (byte~) startProcessing::$21 ← (byte) startProcessing::i#2 << (byte) 3 -- vbuaa=vbuz1_rol_3
|
|
lda i
|
|
asl
|
|
asl
|
|
asl
|
|
//SEG80 [45] if(*((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS + (byte~) startProcessing::$21)!=(const byte) STATUS_FREE#0) goto startProcessing::@3 -- pbuc1_derefidx_vbuaa_neq_vbuc2_then_la1
|
|
tay
|
|
lda #STATUS_FREE
|
|
cmp PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_STATUS,y
|
|
beq !b3+
|
|
jmp b3
|
|
!b3:
|
|
//SEG81 [46] phi from startProcessing::@2 startProcessing::@9 to startProcessing::@4 [phi:startProcessing::@2/startProcessing::@9->startProcessing::@4]
|
|
//SEG82 [46] phi (byte) startProcessing::freeIdx#2 = (byte) startProcessing::i#2 [phi:startProcessing::@2/startProcessing::@9->startProcessing::@4#0] -- register_copy
|
|
//SEG83 startProcessing::@4
|
|
b4:
|
|
//SEG84 [47] if((byte) startProcessing::freeIdx#2==(byte) $ff) goto startProcessing::@8 -- vbuz1_eq_vbuc1_then_la1
|
|
lda #$ff
|
|
cmp freeIdx
|
|
bne !b8+
|
|
jmp b8
|
|
!b8:
|
|
//SEG85 startProcessing::@5
|
|
//SEG86 [48] (word~) startProcessing::$0 ← (word)(byte) startProcessing::freeIdx#2 -- vwuz1=_word_vbuz2
|
|
lda freeIdx
|
|
sta _0
|
|
lda #0
|
|
sta _0+1
|
|
//SEG87 [49] (word~) startProcessing::$1 ← (word~) startProcessing::$0 << (byte) 6 -- vwuz1=vwuz1_rol_6
|
|
asl _1
|
|
rol _1+1
|
|
asl _1
|
|
rol _1+1
|
|
asl _1
|
|
rol _1+1
|
|
asl _1
|
|
rol _1+1
|
|
asl _1
|
|
rol _1+1
|
|
asl _1
|
|
rol _1+1
|
|
//SEG88 [50] (byte*) startProcessing::spriteData#0 ← (const byte*) SPRITE_DATA#0 + (word~) startProcessing::$1 -- pbuz1=pbuc1_plus_vwuz1
|
|
clc
|
|
lda spriteData
|
|
adc #<SPRITE_DATA
|
|
sta spriteData
|
|
lda spriteData+1
|
|
adc #>SPRITE_DATA
|
|
sta spriteData+1
|
|
//SEG89 [51] phi from startProcessing::@5 to startProcessing::@6 [phi:startProcessing::@5->startProcessing::@6]
|
|
//SEG90 [51] phi (byte) startProcessing::i1#2 = (byte) 0 [phi:startProcessing::@5->startProcessing::@6#0] -- vbuxx=vbuc1
|
|
ldx #0
|
|
//SEG91 [51] phi (byte*) startProcessing::spriteData#2 = (byte*) startProcessing::spriteData#0 [phi:startProcessing::@5->startProcessing::@6#1] -- register_copy
|
|
//SEG92 [51] phi from startProcessing::@6 to startProcessing::@6 [phi:startProcessing::@6->startProcessing::@6]
|
|
//SEG93 [51] phi (byte) startProcessing::i1#2 = (byte) startProcessing::i1#1 [phi:startProcessing::@6->startProcessing::@6#0] -- register_copy
|
|
//SEG94 [51] phi (byte*) startProcessing::spriteData#2 = (byte*) startProcessing::spriteData#1 [phi:startProcessing::@6->startProcessing::@6#1] -- register_copy
|
|
//SEG95 startProcessing::@6
|
|
b6:
|
|
//SEG96 [52] *((byte*) startProcessing::spriteData#2) ← (byte) $ff -- _deref_pbuz1=vbuc1
|
|
lda #$ff
|
|
ldy #0
|
|
sta (spriteData),y
|
|
//SEG97 [53] (byte*) startProcessing::spriteData#1 ← (byte*) startProcessing::spriteData#2 + (byte) 3 -- pbuz1=pbuz1_plus_vbuc1
|
|
lda #3
|
|
clc
|
|
adc spriteData
|
|
sta spriteData
|
|
bcc !+
|
|
inc spriteData+1
|
|
!:
|
|
//SEG98 [54] (byte) startProcessing::i1#1 ← ++ (byte) startProcessing::i1#2 -- vbuxx=_inc_vbuxx
|
|
inx
|
|
//SEG99 [55] if((byte) startProcessing::i1#1!=(byte) 8) goto startProcessing::@6 -- vbuxx_neq_vbuc1_then_la1
|
|
cpx #8
|
|
bne b6
|
|
//SEG100 startProcessing::@7
|
|
//SEG101 [56] (word~) startProcessing::$3 ← (word)(byte) startProcessing::center_x#0 -- vwuz1=_word_vbuz2
|
|
lda center_x
|
|
sta _3
|
|
lda #0
|
|
sta _3+1
|
|
//SEG102 [57] (word~) startProcessing::$4 ← (word~) startProcessing::$3 << (byte) 3 -- vwuz1=vwuz1_rol_3
|
|
asl _4
|
|
rol _4+1
|
|
asl _4
|
|
rol _4+1
|
|
asl _4
|
|
rol _4+1
|
|
//SEG103 [58] (word) startProcessing::spriteX#0 ← (byte) $18 + (word~) startProcessing::$4 -- vwuz1=vbuc1_plus_vwuz1
|
|
lda #$18
|
|
clc
|
|
adc spriteX
|
|
sta spriteX
|
|
bcc !+
|
|
inc spriteX+1
|
|
!:
|
|
//SEG104 [59] (byte~) startProcessing::$6 ← (byte) startProcessing::center_y#0 << (byte) 3 -- vbuaa=vbuz1_rol_3
|
|
lda center_y
|
|
asl
|
|
asl
|
|
asl
|
|
//SEG105 [60] (byte) startProcessing::spriteY#0 ← (byte) $32 + (byte~) startProcessing::$6 -- vbuyy=vbuc1_plus_vbuaa
|
|
clc
|
|
adc #$32
|
|
tay
|
|
//SEG106 [61] (byte) startProcessing::spritePtr#0 ← (byte)(const byte*) SPRITE_DATA#0/(byte) $40 + (byte) startProcessing::freeIdx#2 -- vbuz1=vbuc1_plus_vbuz2
|
|
lax freeIdx
|
|
axs #-[SPRITE_DATA/$40]
|
|
stx spritePtr
|
|
//SEG107 [62] (word~) startProcessing::$11 ← (word)(byte) startProcessing::center_y#0 -- vwuz1=_word_vbuz2
|
|
lda center_y
|
|
sta _11
|
|
lda #0
|
|
sta _11+1
|
|
//SEG108 [63] (word) startProcessing::$30 ← (word~) startProcessing::$11 << (byte) 2 -- vwuz1=vwuz2_rol_2
|
|
lda _11
|
|
asl
|
|
sta _30
|
|
lda _11+1
|
|
rol
|
|
sta _30+1
|
|
asl _30
|
|
rol _30+1
|
|
//SEG109 [64] (word) startProcessing::$31 ← (word) startProcessing::$30 + (word~) startProcessing::$11 -- vwuz1=vwuz2_plus_vwuz1
|
|
lda _31
|
|
clc
|
|
adc _30
|
|
sta _31
|
|
lda _31+1
|
|
adc _30+1
|
|
sta _31+1
|
|
//SEG110 [65] (word~) startProcessing::$12 ← (word) startProcessing::$31 << (byte) 3 -- vwuz1=vwuz1_rol_3
|
|
asl _12
|
|
rol _12+1
|
|
asl _12
|
|
rol _12+1
|
|
asl _12
|
|
rol _12+1
|
|
//SEG111 [66] (byte*~) startProcessing::$13 ← (const byte*) SCREEN#0 + (word~) startProcessing::$12 -- pbuz1=pbuc1_plus_vwuz1
|
|
clc
|
|
lda _13
|
|
adc #<SCREEN
|
|
sta _13
|
|
lda _13+1
|
|
adc #>SCREEN
|
|
sta _13+1
|
|
//SEG112 [67] (byte*) startProcessing::screenPtr#0 ← (byte*~) startProcessing::$13 + (byte) startProcessing::center_x#0 -- pbuz1=pbuz1_plus_vbuz2
|
|
lda center_x
|
|
clc
|
|
adc screenPtr
|
|
sta screenPtr
|
|
bcc !+
|
|
inc screenPtr+1
|
|
!:
|
|
//SEG113 [68] (byte~) startProcessing::$22 ← (byte) startProcessing::freeIdx#2 << (byte) 3 -- vbuxx=vbuz1_rol_3
|
|
lda freeIdx
|
|
asl
|
|
asl
|
|
asl
|
|
tax
|
|
//SEG114 [69] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (byte~) startProcessing::$22) ← (word) startProcessing::spriteX#0 -- pwuc1_derefidx_vbuxx=vwuz1
|
|
lda spriteX
|
|
sta PROCESSING,x
|
|
lda spriteX+1
|
|
sta PROCESSING+1,x
|
|
//SEG115 [70] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y + (byte~) startProcessing::$22) ← (byte) startProcessing::spriteY#0 -- pbuc1_derefidx_vbuxx=vbuyy
|
|
tya
|
|
sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_Y,x
|
|
//SEG116 [71] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID + (byte~) startProcessing::$22) ← (byte) startProcessing::freeIdx#2 -- pbuc1_derefidx_vbuxx=vbuz1
|
|
lda freeIdx
|
|
sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_ID,x
|
|
//SEG117 [72] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR + (byte~) startProcessing::$22) ← (byte) startProcessing::spritePtr#0 -- pbuc1_derefidx_vbuxx=vbuz1
|
|
lda spritePtr
|
|
sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_PTR,x
|
|
//SEG118 [73] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS + (byte~) startProcessing::$22) ← (const byte) STATUS_NEW#0 -- pbuc1_derefidx_vbuxx=vbuc2
|
|
lda #STATUS_NEW
|
|
sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_STATUS,x
|
|
//SEG119 [74] *((byte**)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR + (byte~) startProcessing::$22) ← (byte*) startProcessing::screenPtr#0 -- pptc1_derefidx_vbuxx=pbuz1
|
|
lda screenPtr
|
|
sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR,x
|
|
lda screenPtr+1
|
|
sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR+1,x
|
|
//SEG120 startProcessing::@return
|
|
//SEG121 [75] return
|
|
rts
|
|
//SEG122 startProcessing::@8
|
|
b8:
|
|
//SEG123 [76] (byte~) startProcessing::freeIdx#7 ← (byte) startProcessing::freeIdx#2 -- vbuxx=vbuz1
|
|
ldx freeIdx
|
|
//SEG124 [42] phi from startProcessing::@8 to startProcessing::@1 [phi:startProcessing::@8->startProcessing::@1]
|
|
//SEG125 [42] phi (byte) startProcessing::freeIdx#6 = (byte~) startProcessing::freeIdx#7 [phi:startProcessing::@8->startProcessing::@1#0] -- register_copy
|
|
jmp b1
|
|
//SEG126 startProcessing::@3
|
|
b3:
|
|
//SEG127 [77] (byte) startProcessing::i#1 ← ++ (byte) startProcessing::i#2 -- vbuz1=_inc_vbuz1
|
|
inc i
|
|
//SEG128 [78] if((byte) startProcessing::i#1!=(byte) 1) goto startProcessing::@2 -- vbuz1_neq_vbuc1_then_la1
|
|
lda #1
|
|
cmp i
|
|
beq !b2+
|
|
jmp b2
|
|
!b2:
|
|
//SEG129 startProcessing::@9
|
|
//SEG130 [79] (byte~) startProcessing::freeIdx#8 ← (byte) startProcessing::freeIdx#6 -- vbuz1=vbuxx
|
|
stx freeIdx
|
|
jmp b4
|
|
}
|
|
//SEG131 getCharToProcess
|
|
// Find the non-space char closest to the center of the screen
|
|
// If no non-space char is found the distance will be 0xffff
|
|
getCharToProcess: {
|
|
.label _9 = $25
|
|
.label _10 = $25
|
|
.label _11 = $25
|
|
.label return_dist = $13
|
|
.label x = $e
|
|
.label dist = $13
|
|
.label screen_line = $b
|
|
.label y = $d
|
|
.label return_x = $11
|
|
.label return_y = $12
|
|
.label closest_dist = $f
|
|
.label closest_x = $11
|
|
.label closest_y = $12
|
|
.label _15 = $27
|
|
.label _16 = $25
|
|
//SEG132 [81] phi from getCharToProcess to getCharToProcess::@1 [phi:getCharToProcess->getCharToProcess::@1]
|
|
//SEG133 [81] phi (byte) getCharToProcess::closest_y#9 = (byte) 0 [phi:getCharToProcess->getCharToProcess::@1#0] -- vbuz1=vbuc1
|
|
lda #0
|
|
sta closest_y
|
|
//SEG134 [81] phi (byte) getCharToProcess::closest_x#9 = (byte) 0 [phi:getCharToProcess->getCharToProcess::@1#1] -- vbuz1=vbuc1
|
|
sta closest_x
|
|
//SEG135 [81] phi (word) getCharToProcess::closest_dist#8 = (const word) NOT_FOUND#0 [phi:getCharToProcess->getCharToProcess::@1#2] -- vwuz1=vwuc1
|
|
lda #<NOT_FOUND
|
|
sta closest_dist
|
|
lda #>NOT_FOUND
|
|
sta closest_dist+1
|
|
//SEG136 [81] phi (byte) getCharToProcess::y#7 = (byte) 0 [phi:getCharToProcess->getCharToProcess::@1#3] -- vbuz1=vbuc1
|
|
lda #0
|
|
sta y
|
|
//SEG137 [81] phi (byte*) getCharToProcess::screen_line#4 = (const byte[$3e8]) SCREEN_COPY#0 [phi:getCharToProcess->getCharToProcess::@1#4] -- pbuz1=pbuc1
|
|
lda #<SCREEN_COPY
|
|
sta screen_line
|
|
lda #>SCREEN_COPY
|
|
sta screen_line+1
|
|
//SEG138 getCharToProcess::@1
|
|
b1:
|
|
//SEG139 [82] phi from getCharToProcess::@1 to getCharToProcess::@2 [phi:getCharToProcess::@1->getCharToProcess::@2]
|
|
//SEG140 [82] phi (byte) getCharToProcess::closest_y#7 = (byte) getCharToProcess::closest_y#9 [phi:getCharToProcess::@1->getCharToProcess::@2#0] -- register_copy
|
|
//SEG141 [82] phi (byte) getCharToProcess::closest_x#7 = (byte) getCharToProcess::closest_x#9 [phi:getCharToProcess::@1->getCharToProcess::@2#1] -- register_copy
|
|
//SEG142 [82] phi (word) getCharToProcess::closest_dist#2 = (word) getCharToProcess::closest_dist#8 [phi:getCharToProcess::@1->getCharToProcess::@2#2] -- register_copy
|
|
//SEG143 [82] phi (byte) getCharToProcess::x#2 = (byte) 0 [phi:getCharToProcess::@1->getCharToProcess::@2#3] -- vbuz1=vbuc1
|
|
lda #0
|
|
sta x
|
|
//SEG144 getCharToProcess::@2
|
|
b2:
|
|
//SEG145 [83] if(*((byte*) getCharToProcess::screen_line#4 + (byte) getCharToProcess::x#2)==(byte) ' ') goto getCharToProcess::@11 -- pbuz1_derefidx_vbuz2_eq_vbuc1_then_la1
|
|
ldy x
|
|
lda (screen_line),y
|
|
cmp #' '
|
|
bne !b11+
|
|
jmp b11
|
|
!b11:
|
|
//SEG146 getCharToProcess::@4
|
|
//SEG147 [84] (byte~) getCharToProcess::$13 ← (byte) getCharToProcess::x#2 << (byte) 1 -- vbuxx=vbuz1_rol_1
|
|
tya
|
|
asl
|
|
tax
|
|
//SEG148 [85] (byte~) getCharToProcess::$14 ← (byte) getCharToProcess::y#7 << (byte) 1 -- vbuaa=vbuz1_rol_1
|
|
lda y
|
|
asl
|
|
//SEG149 [86] (word) getCharToProcess::dist#0 ← *((const word[$28]) SQUARES_X#0 + (byte~) getCharToProcess::$13) + *((const word[$19]) SQUARES_Y#0 + (byte~) getCharToProcess::$14) -- vwuz1=pwuc1_derefidx_vbuxx_plus_pwuc2_derefidx_vbuaa
|
|
tay
|
|
lda SQUARES_X,x
|
|
clc
|
|
adc SQUARES_Y,y
|
|
sta dist
|
|
lda SQUARES_X+1,x
|
|
adc SQUARES_Y+1,y
|
|
sta dist+1
|
|
//SEG150 [87] if((word) getCharToProcess::dist#0>=(word) getCharToProcess::closest_dist#2) goto getCharToProcess::@12 -- vwuz1_ge_vwuz2_then_la1
|
|
lda closest_dist+1
|
|
cmp dist+1
|
|
bne !+
|
|
lda closest_dist
|
|
cmp dist
|
|
bne !b12+
|
|
jmp b12
|
|
!b12:
|
|
!:
|
|
bcs !b12+
|
|
jmp b12
|
|
!b12:
|
|
//SEG151 getCharToProcess::@5
|
|
//SEG152 [88] (byte~) getCharToProcess::return_x#7 ← (byte) getCharToProcess::x#2 -- vbuz1=vbuz2
|
|
lda x
|
|
sta return_x
|
|
//SEG153 [89] (byte~) getCharToProcess::return_y#7 ← (byte) getCharToProcess::y#7 -- vbuz1=vbuz2
|
|
lda y
|
|
sta return_y
|
|
//SEG154 [90] phi from getCharToProcess::@11 getCharToProcess::@12 getCharToProcess::@5 to getCharToProcess::@3 [phi:getCharToProcess::@11/getCharToProcess::@12/getCharToProcess::@5->getCharToProcess::@3]
|
|
//SEG155 [90] phi (byte) getCharToProcess::return_y#1 = (byte) getCharToProcess::closest_y#7 [phi:getCharToProcess::@11/getCharToProcess::@12/getCharToProcess::@5->getCharToProcess::@3#0] -- register_copy
|
|
//SEG156 [90] phi (byte) getCharToProcess::return_x#1 = (byte) getCharToProcess::closest_x#7 [phi:getCharToProcess::@11/getCharToProcess::@12/getCharToProcess::@5->getCharToProcess::@3#1] -- register_copy
|
|
//SEG157 [90] phi (word) getCharToProcess::return_dist#1 = (word~) getCharToProcess::return_dist#5 [phi:getCharToProcess::@11/getCharToProcess::@12/getCharToProcess::@5->getCharToProcess::@3#2] -- register_copy
|
|
//SEG158 getCharToProcess::@3
|
|
b3:
|
|
//SEG159 [91] (byte) getCharToProcess::x#1 ← ++ (byte) getCharToProcess::x#2 -- vbuz1=_inc_vbuz1
|
|
inc x
|
|
//SEG160 [92] if((byte) getCharToProcess::x#1!=(byte) $28) goto getCharToProcess::@10 -- vbuz1_neq_vbuc1_then_la1
|
|
lda #$28
|
|
cmp x
|
|
bne b10
|
|
//SEG161 getCharToProcess::@6
|
|
//SEG162 [93] (byte*) getCharToProcess::screen_line#1 ← (byte*) getCharToProcess::screen_line#4 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1
|
|
clc
|
|
adc screen_line
|
|
sta screen_line
|
|
bcc !+
|
|
inc screen_line+1
|
|
!:
|
|
//SEG163 [94] (byte) getCharToProcess::y#1 ← ++ (byte) getCharToProcess::y#7 -- vbuz1=_inc_vbuz1
|
|
inc y
|
|
//SEG164 [95] if((byte) getCharToProcess::y#1!=(byte) $19) goto getCharToProcess::@9 -- vbuz1_neq_vbuc1_then_la1
|
|
lda #$19
|
|
cmp y
|
|
bne b9
|
|
//SEG165 getCharToProcess::@7
|
|
//SEG166 [96] if((word) getCharToProcess::return_dist#1==(const word) NOT_FOUND#0) goto getCharToProcess::@return -- vwuz1_eq_vwuc1_then_la1
|
|
lda return_dist
|
|
cmp #<NOT_FOUND
|
|
bne !+
|
|
lda return_dist+1
|
|
cmp #>NOT_FOUND
|
|
beq breturn
|
|
!:
|
|
//SEG167 getCharToProcess::@8
|
|
//SEG168 [97] (word~) getCharToProcess::$9 ← (word)(byte) getCharToProcess::return_y#1 -- vwuz1=_word_vbuz2
|
|
lda return_y
|
|
sta _9
|
|
lda #0
|
|
sta _9+1
|
|
//SEG169 [98] (word) getCharToProcess::$15 ← (word~) getCharToProcess::$9 << (byte) 2 -- vwuz1=vwuz2_rol_2
|
|
lda _9
|
|
asl
|
|
sta _15
|
|
lda _9+1
|
|
rol
|
|
sta _15+1
|
|
asl _15
|
|
rol _15+1
|
|
//SEG170 [99] (word) getCharToProcess::$16 ← (word) getCharToProcess::$15 + (word~) getCharToProcess::$9 -- vwuz1=vwuz2_plus_vwuz1
|
|
lda _16
|
|
clc
|
|
adc _15
|
|
sta _16
|
|
lda _16+1
|
|
adc _15+1
|
|
sta _16+1
|
|
//SEG171 [100] (word~) getCharToProcess::$10 ← (word) getCharToProcess::$16 << (byte) 3 -- vwuz1=vwuz1_rol_3
|
|
asl _10
|
|
rol _10+1
|
|
asl _10
|
|
rol _10+1
|
|
asl _10
|
|
rol _10+1
|
|
//SEG172 [101] (byte*~) getCharToProcess::$11 ← (const byte[$3e8]) SCREEN_COPY#0 + (word~) getCharToProcess::$10 -- pbuz1=pbuc1_plus_vwuz1
|
|
clc
|
|
lda _11
|
|
adc #<SCREEN_COPY
|
|
sta _11
|
|
lda _11+1
|
|
adc #>SCREEN_COPY
|
|
sta _11+1
|
|
//SEG173 [102] *((byte*~) getCharToProcess::$11 + (byte) getCharToProcess::return_x#1) ← (byte) ' ' -- pbuz1_derefidx_vbuz2=vbuc1
|
|
// clear the found char on the screen copy
|
|
lda #' '
|
|
ldy return_x
|
|
sta (_11),y
|
|
//SEG174 getCharToProcess::@return
|
|
breturn:
|
|
//SEG175 [103] return
|
|
rts
|
|
//SEG176 getCharToProcess::@9
|
|
b9:
|
|
//SEG177 [104] (word~) getCharToProcess::closest_dist#10 ← (word) getCharToProcess::return_dist#1 -- vwuz1=vwuz2
|
|
lda return_dist
|
|
sta closest_dist
|
|
lda return_dist+1
|
|
sta closest_dist+1
|
|
//SEG178 [81] phi from getCharToProcess::@9 to getCharToProcess::@1 [phi:getCharToProcess::@9->getCharToProcess::@1]
|
|
//SEG179 [81] phi (byte) getCharToProcess::closest_y#9 = (byte) getCharToProcess::return_y#1 [phi:getCharToProcess::@9->getCharToProcess::@1#0] -- register_copy
|
|
//SEG180 [81] phi (byte) getCharToProcess::closest_x#9 = (byte) getCharToProcess::return_x#1 [phi:getCharToProcess::@9->getCharToProcess::@1#1] -- register_copy
|
|
//SEG181 [81] phi (word) getCharToProcess::closest_dist#8 = (word~) getCharToProcess::closest_dist#10 [phi:getCharToProcess::@9->getCharToProcess::@1#2] -- register_copy
|
|
//SEG182 [81] phi (byte) getCharToProcess::y#7 = (byte) getCharToProcess::y#1 [phi:getCharToProcess::@9->getCharToProcess::@1#3] -- register_copy
|
|
//SEG183 [81] phi (byte*) getCharToProcess::screen_line#4 = (byte*) getCharToProcess::screen_line#1 [phi:getCharToProcess::@9->getCharToProcess::@1#4] -- register_copy
|
|
jmp b1
|
|
//SEG184 getCharToProcess::@10
|
|
b10:
|
|
//SEG185 [105] (word~) getCharToProcess::closest_dist#12 ← (word) getCharToProcess::return_dist#1 -- vwuz1=vwuz2
|
|
lda return_dist
|
|
sta closest_dist
|
|
lda return_dist+1
|
|
sta closest_dist+1
|
|
//SEG186 [82] phi from getCharToProcess::@10 to getCharToProcess::@2 [phi:getCharToProcess::@10->getCharToProcess::@2]
|
|
//SEG187 [82] phi (byte) getCharToProcess::closest_y#7 = (byte) getCharToProcess::return_y#1 [phi:getCharToProcess::@10->getCharToProcess::@2#0] -- register_copy
|
|
//SEG188 [82] phi (byte) getCharToProcess::closest_x#7 = (byte) getCharToProcess::return_x#1 [phi:getCharToProcess::@10->getCharToProcess::@2#1] -- register_copy
|
|
//SEG189 [82] phi (word) getCharToProcess::closest_dist#2 = (word~) getCharToProcess::closest_dist#12 [phi:getCharToProcess::@10->getCharToProcess::@2#2] -- register_copy
|
|
//SEG190 [82] phi (byte) getCharToProcess::x#2 = (byte) getCharToProcess::x#1 [phi:getCharToProcess::@10->getCharToProcess::@2#3] -- register_copy
|
|
jmp b2
|
|
//SEG191 getCharToProcess::@12
|
|
b12:
|
|
//SEG192 [106] (word~) getCharToProcess::return_dist#6 ← (word) getCharToProcess::closest_dist#2 -- vwuz1=vwuz2
|
|
lda closest_dist
|
|
sta return_dist
|
|
lda closest_dist+1
|
|
sta return_dist+1
|
|
jmp b3
|
|
//SEG193 getCharToProcess::@11
|
|
b11:
|
|
//SEG194 [107] (word~) getCharToProcess::return_dist#5 ← (word) getCharToProcess::closest_dist#2 -- vwuz1=vwuz2
|
|
lda closest_dist
|
|
sta return_dist
|
|
lda closest_dist+1
|
|
sta return_dist+1
|
|
jmp b3
|
|
}
|
|
//SEG195 initSquareTables
|
|
// initialize SQUARES table
|
|
initSquareTables: {
|
|
.label _6 = $17
|
|
.label _14 = $17
|
|
.label x = $15
|
|
.label y = $16
|
|
//SEG196 [109] phi from initSquareTables to initSquareTables::@1 [phi:initSquareTables->initSquareTables::@1]
|
|
//SEG197 [109] phi (byte) initSquareTables::x#2 = (byte) 0 [phi:initSquareTables->initSquareTables::@1#0] -- vbuz1=vbuc1
|
|
lda #0
|
|
sta x
|
|
//SEG198 [109] phi from initSquareTables::@9 to initSquareTables::@1 [phi:initSquareTables::@9->initSquareTables::@1]
|
|
//SEG199 [109] phi (byte) initSquareTables::x#2 = (byte) initSquareTables::x#1 [phi:initSquareTables::@9->initSquareTables::@1#0] -- register_copy
|
|
//SEG200 initSquareTables::@1
|
|
b1:
|
|
//SEG201 [110] if((byte) initSquareTables::x#2<(byte) $14) goto initSquareTables::@2 -- vbuz1_lt_vbuc1_then_la1
|
|
lda x
|
|
cmp #$14
|
|
bcc b2
|
|
//SEG202 initSquareTables::@3
|
|
//SEG203 [111] (byte~) initSquareTables::$2 ← (byte) initSquareTables::x#2 - (byte) $14 -- vbuaa=vbuz1_minus_vbuc1
|
|
sec
|
|
sbc #$14
|
|
//SEG204 [112] phi from initSquareTables::@2 initSquareTables::@3 to initSquareTables::@4 [phi:initSquareTables::@2/initSquareTables::@3->initSquareTables::@4]
|
|
//SEG205 [112] phi (byte) initSquareTables::x_dist#0 = (byte~) initSquareTables::$4 [phi:initSquareTables::@2/initSquareTables::@3->initSquareTables::@4#0] -- register_copy
|
|
//SEG206 initSquareTables::@4
|
|
b4:
|
|
//SEG207 [113] (byte) mul8u::a#1 ← (byte) initSquareTables::x_dist#0 -- vbuxx=vbuaa
|
|
tax
|
|
//SEG208 [114] (byte) mul8u::b#0 ← (byte) initSquareTables::x_dist#0
|
|
//SEG209 [115] call mul8u
|
|
//SEG210 [138] phi from initSquareTables::@4 to mul8u [phi:initSquareTables::@4->mul8u]
|
|
//SEG211 [138] phi (byte) mul8u::a#6 = (byte) mul8u::a#1 [phi:initSquareTables::@4->mul8u#0] -- register_copy
|
|
//SEG212 [138] phi (word) mul8u::mb#0 = (byte) mul8u::b#0 [phi:initSquareTables::@4->mul8u#1] -- vwuz1=vbuaa
|
|
sta mul8u.mb
|
|
lda #0
|
|
sta mul8u.mb+1
|
|
jsr mul8u
|
|
//SEG213 [116] (word) mul8u::return#2 ← (word) mul8u::res#2
|
|
//SEG214 initSquareTables::@9
|
|
//SEG215 [117] (word~) initSquareTables::$6 ← (word) mul8u::return#2
|
|
//SEG216 [118] (byte~) initSquareTables::$16 ← (byte) initSquareTables::x#2 << (byte) 1 -- vbuaa=vbuz1_rol_1
|
|
lda x
|
|
asl
|
|
//SEG217 [119] *((const word[$28]) SQUARES_X#0 + (byte~) initSquareTables::$16) ← (word~) initSquareTables::$6 -- pwuc1_derefidx_vbuaa=vwuz1
|
|
tay
|
|
lda _6
|
|
sta SQUARES_X,y
|
|
lda _6+1
|
|
sta SQUARES_X+1,y
|
|
//SEG218 [120] (byte) initSquareTables::x#1 ← ++ (byte) initSquareTables::x#2 -- vbuz1=_inc_vbuz1
|
|
inc x
|
|
//SEG219 [121] if((byte) initSquareTables::x#1!=(byte) $28) goto initSquareTables::@1 -- vbuz1_neq_vbuc1_then_la1
|
|
lda #$28
|
|
cmp x
|
|
bne b1
|
|
//SEG220 [122] phi from initSquareTables::@9 to initSquareTables::@5 [phi:initSquareTables::@9->initSquareTables::@5]
|
|
//SEG221 [122] phi (byte) initSquareTables::y#2 = (byte) 0 [phi:initSquareTables::@9->initSquareTables::@5#0] -- vbuz1=vbuc1
|
|
lda #0
|
|
sta y
|
|
//SEG222 [122] phi from initSquareTables::@10 to initSquareTables::@5 [phi:initSquareTables::@10->initSquareTables::@5]
|
|
//SEG223 [122] phi (byte) initSquareTables::y#2 = (byte) initSquareTables::y#1 [phi:initSquareTables::@10->initSquareTables::@5#0] -- register_copy
|
|
//SEG224 initSquareTables::@5
|
|
b5:
|
|
//SEG225 [123] if((byte) initSquareTables::y#2<(byte) $c) goto initSquareTables::@6 -- vbuz1_lt_vbuc1_then_la1
|
|
lda y
|
|
cmp #$c
|
|
bcc b6
|
|
//SEG226 initSquareTables::@7
|
|
//SEG227 [124] (byte~) initSquareTables::$10 ← (byte) initSquareTables::y#2 - (byte) $c -- vbuaa=vbuz1_minus_vbuc1
|
|
sec
|
|
sbc #$c
|
|
//SEG228 [125] phi from initSquareTables::@6 initSquareTables::@7 to initSquareTables::@8 [phi:initSquareTables::@6/initSquareTables::@7->initSquareTables::@8]
|
|
//SEG229 [125] phi (byte) initSquareTables::y_dist#0 = (byte~) initSquareTables::$12 [phi:initSquareTables::@6/initSquareTables::@7->initSquareTables::@8#0] -- register_copy
|
|
//SEG230 initSquareTables::@8
|
|
b8:
|
|
//SEG231 [126] (byte) mul8u::a#2 ← (byte) initSquareTables::y_dist#0 -- vbuxx=vbuaa
|
|
tax
|
|
//SEG232 [127] (byte) mul8u::b#1 ← (byte) initSquareTables::y_dist#0
|
|
//SEG233 [128] call mul8u
|
|
//SEG234 [138] phi from initSquareTables::@8 to mul8u [phi:initSquareTables::@8->mul8u]
|
|
//SEG235 [138] phi (byte) mul8u::a#6 = (byte) mul8u::a#2 [phi:initSquareTables::@8->mul8u#0] -- register_copy
|
|
//SEG236 [138] phi (word) mul8u::mb#0 = (byte) mul8u::b#1 [phi:initSquareTables::@8->mul8u#1] -- vwuz1=vbuaa
|
|
sta mul8u.mb
|
|
lda #0
|
|
sta mul8u.mb+1
|
|
jsr mul8u
|
|
//SEG237 [129] (word) mul8u::return#3 ← (word) mul8u::res#2
|
|
//SEG238 initSquareTables::@10
|
|
//SEG239 [130] (word~) initSquareTables::$14 ← (word) mul8u::return#3
|
|
//SEG240 [131] (byte~) initSquareTables::$17 ← (byte) initSquareTables::y#2 << (byte) 1 -- vbuaa=vbuz1_rol_1
|
|
lda y
|
|
asl
|
|
//SEG241 [132] *((const word[$19]) SQUARES_Y#0 + (byte~) initSquareTables::$17) ← (word~) initSquareTables::$14 -- pwuc1_derefidx_vbuaa=vwuz1
|
|
tay
|
|
lda _14
|
|
sta SQUARES_Y,y
|
|
lda _14+1
|
|
sta SQUARES_Y+1,y
|
|
//SEG242 [133] (byte) initSquareTables::y#1 ← ++ (byte) initSquareTables::y#2 -- vbuz1=_inc_vbuz1
|
|
inc y
|
|
//SEG243 [134] if((byte) initSquareTables::y#1!=(byte) $19) goto initSquareTables::@5 -- vbuz1_neq_vbuc1_then_la1
|
|
lda #$19
|
|
cmp y
|
|
bne b5
|
|
//SEG244 initSquareTables::@return
|
|
//SEG245 [135] return
|
|
rts
|
|
//SEG246 initSquareTables::@6
|
|
b6:
|
|
//SEG247 [136] (byte~) initSquareTables::$12 ← (byte) $c - (byte) initSquareTables::y#2 -- vbuaa=vbuc1_minus_vbuz1
|
|
lda #$c
|
|
sec
|
|
sbc y
|
|
jmp b8
|
|
//SEG248 initSquareTables::@2
|
|
b2:
|
|
//SEG249 [137] (byte~) initSquareTables::$4 ← (byte) $14 - (byte) initSquareTables::x#2 -- vbuaa=vbuc1_minus_vbuz1
|
|
lda #$14
|
|
sec
|
|
sbc x
|
|
jmp b4
|
|
}
|
|
//SEG250 mul8u
|
|
// Perform binary multiplication of two unsigned 8-bit bytes into a 16-bit unsigned word
|
|
// mul8u(byte register(X) a, byte register(A) b)
|
|
mul8u: {
|
|
.label mb = $19
|
|
.label res = $17
|
|
.label return = $17
|
|
//SEG251 [139] phi from mul8u to mul8u::@1 [phi:mul8u->mul8u::@1]
|
|
//SEG252 [139] phi (word) mul8u::mb#2 = (word) mul8u::mb#0 [phi:mul8u->mul8u::@1#0] -- register_copy
|
|
//SEG253 [139] phi (word) mul8u::res#2 = (byte) 0 [phi:mul8u->mul8u::@1#1] -- vwuz1=vbuc1
|
|
lda #0
|
|
sta res
|
|
sta res+1
|
|
//SEG254 [139] phi (byte) mul8u::a#3 = (byte) mul8u::a#6 [phi:mul8u->mul8u::@1#2] -- register_copy
|
|
//SEG255 mul8u::@1
|
|
b1:
|
|
//SEG256 [140] if((byte) mul8u::a#3!=(byte) 0) goto mul8u::@2 -- vbuxx_neq_0_then_la1
|
|
cpx #0
|
|
bne b2
|
|
//SEG257 mul8u::@return
|
|
//SEG258 [141] return
|
|
rts
|
|
//SEG259 mul8u::@2
|
|
b2:
|
|
//SEG260 [142] (byte~) mul8u::$1 ← (byte) mul8u::a#3 & (byte) 1 -- vbuaa=vbuxx_band_vbuc1
|
|
txa
|
|
and #1
|
|
//SEG261 [143] if((byte~) mul8u::$1==(byte) 0) goto mul8u::@3 -- vbuaa_eq_0_then_la1
|
|
cmp #0
|
|
beq b3
|
|
//SEG262 mul8u::@4
|
|
//SEG263 [144] (word) mul8u::res#1 ← (word) mul8u::res#2 + (word) mul8u::mb#2 -- vwuz1=vwuz1_plus_vwuz2
|
|
lda res
|
|
clc
|
|
adc mb
|
|
sta res
|
|
lda res+1
|
|
adc mb+1
|
|
sta res+1
|
|
//SEG264 [145] phi from mul8u::@2 mul8u::@4 to mul8u::@3 [phi:mul8u::@2/mul8u::@4->mul8u::@3]
|
|
//SEG265 [145] phi (word) mul8u::res#6 = (word) mul8u::res#2 [phi:mul8u::@2/mul8u::@4->mul8u::@3#0] -- register_copy
|
|
//SEG266 mul8u::@3
|
|
b3:
|
|
//SEG267 [146] (byte) mul8u::a#0 ← (byte) mul8u::a#3 >> (byte) 1 -- vbuxx=vbuxx_ror_1
|
|
txa
|
|
lsr
|
|
tax
|
|
//SEG268 [147] (word) mul8u::mb#1 ← (word) mul8u::mb#2 << (byte) 1 -- vwuz1=vwuz1_rol_1
|
|
asl mb
|
|
rol mb+1
|
|
//SEG269 [139] phi from mul8u::@3 to mul8u::@1 [phi:mul8u::@3->mul8u::@1]
|
|
//SEG270 [139] phi (word) mul8u::mb#2 = (word) mul8u::mb#1 [phi:mul8u::@3->mul8u::@1#0] -- register_copy
|
|
//SEG271 [139] phi (word) mul8u::res#2 = (word) mul8u::res#6 [phi:mul8u::@3->mul8u::@1#1] -- register_copy
|
|
//SEG272 [139] phi (byte) mul8u::a#3 = (byte) mul8u::a#0 [phi:mul8u::@3->mul8u::@1#2] -- register_copy
|
|
jmp b1
|
|
}
|
|
//SEG273 setupRasterIrq
|
|
// Setup Raster IRQ
|
|
setupRasterIrq: {
|
|
.label irqRoutine = irqTop
|
|
//SEG274 asm { sei }
|
|
sei
|
|
//SEG275 [149] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 -- _deref_pbuc1=vbuc2
|
|
// Disable kernal & basic
|
|
lda #PROCPORT_DDR_MEMORY_MASK
|
|
sta PROCPORT_DDR
|
|
//SEG276 [150] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 -- _deref_pbuc1=vbuc2
|
|
lda #PROCPORT_RAM_IO
|
|
sta PROCPORT
|
|
//SEG277 [151] *((const byte*) CIA1_INTERRUPT#0) ← (const byte) CIA_INTERRUPT_CLEAR#0 -- _deref_pbuc1=vbuc2
|
|
// Disable CIA 1 Timer IRQ
|
|
lda #CIA_INTERRUPT_CLEAR
|
|
sta CIA1_INTERRUPT
|
|
//SEG278 setupRasterIrq::@1
|
|
//SEG279 [152] *((const byte*) VIC_CONTROL#0) ← *((const byte*) VIC_CONTROL#0) & (byte) $7f -- _deref_pbuc1=_deref_pbuc1_band_vbuc2
|
|
lda #$7f
|
|
and VIC_CONTROL
|
|
sta VIC_CONTROL
|
|
//SEG280 setupRasterIrq::@2
|
|
//SEG281 [153] *((const byte*) RASTER#0) ← <(const byte) RASTER_IRQ_TOP#0 -- _deref_pbuc1=vbuc2
|
|
lda #RASTER_IRQ_TOP
|
|
sta RASTER
|
|
//SEG282 [154] *((const byte*) IRQ_ENABLE#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2
|
|
// Enable Raster Interrupt
|
|
lda #IRQ_RASTER
|
|
sta IRQ_ENABLE
|
|
//SEG283 [155] *((const void()**) HARDWARE_IRQ#0) ← (const void()*) setupRasterIrq::irqRoutine#0 -- _deref_pptc1=pprc2
|
|
// Set the IRQ routine
|
|
lda #<irqRoutine
|
|
sta HARDWARE_IRQ
|
|
lda #>irqRoutine
|
|
sta HARDWARE_IRQ+1
|
|
//SEG284 asm { cli }
|
|
cli
|
|
//SEG285 setupRasterIrq::@return
|
|
//SEG286 [157] return
|
|
rts
|
|
}
|
|
//SEG287 irqBottom
|
|
// Raster Interrupt at the middle of the screen
|
|
irqBottom: {
|
|
//SEG288 entry interrupt(HARDWARE_ALL)
|
|
sta rega+1
|
|
stx regx+1
|
|
sty regy+1
|
|
//SEG289 [159] phi from irqBottom to irqBottom::@1 [phi:irqBottom->irqBottom::@1]
|
|
//SEG290 [159] phi (byte) irqBottom::i#2 = (byte) 0 [phi:irqBottom->irqBottom::@1#0] -- vbuxx=vbuc1
|
|
ldx #0
|
|
//SEG291 [159] phi from irqBottom::@1 to irqBottom::@1 [phi:irqBottom::@1->irqBottom::@1]
|
|
//SEG292 [159] phi (byte) irqBottom::i#2 = (byte) irqBottom::i#1 [phi:irqBottom::@1->irqBottom::@1#0] -- register_copy
|
|
//SEG293 irqBottom::@1
|
|
b1:
|
|
//SEG294 [160] (byte) irqBottom::i#1 ← ++ (byte) irqBottom::i#2 -- vbuxx=_inc_vbuxx
|
|
inx
|
|
//SEG295 [161] if((byte) irqBottom::i#1!=(byte) 5) goto irqBottom::@1 -- vbuxx_neq_vbuc1_then_la1
|
|
cpx #5
|
|
bne b1
|
|
//SEG296 irqBottom::@2
|
|
//SEG297 [162] *((const byte*) BORDERCOL#0) ← (const byte) WHITE#0 -- _deref_pbuc1=vbuc2
|
|
lda #WHITE
|
|
sta BORDERCOL
|
|
//SEG298 [163] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 -- _deref_pbuc1=vbuc2
|
|
sta BGCOL
|
|
//SEG299 [164] call processChars
|
|
//SEG300 [171] phi from irqBottom::@2 to processChars [phi:irqBottom::@2->processChars]
|
|
jsr processChars
|
|
//SEG301 irqBottom::@3
|
|
//SEG302 [165] *((const byte*) BORDERCOL#0) ← (const byte) LIGHT_BLUE#0 -- _deref_pbuc1=vbuc2
|
|
lda #LIGHT_BLUE
|
|
sta BORDERCOL
|
|
//SEG303 [166] *((const byte*) BGCOL#0) ← (const byte) BLUE#0 -- _deref_pbuc1=vbuc2
|
|
lda #BLUE
|
|
sta BGCOL
|
|
//SEG304 [167] *((const byte*) RASTER#0) ← (const byte) RASTER_IRQ_TOP#0 -- _deref_pbuc1=vbuc2
|
|
// Trigger IRQ at the top of the screen
|
|
lda #RASTER_IRQ_TOP
|
|
sta RASTER
|
|
//SEG305 [168] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_ALL)(void()) irqTop() -- _deref_pptc1=pprc2
|
|
lda #<irqTop
|
|
sta HARDWARE_IRQ
|
|
lda #>irqTop
|
|
sta HARDWARE_IRQ+1
|
|
//SEG306 [169] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2
|
|
// Acknowledge the IRQ
|
|
lda #IRQ_RASTER
|
|
sta IRQ_STATUS
|
|
//SEG307 irqBottom::@return
|
|
//SEG308 [170] return - exit interrupt(HARDWARE_ALL)
|
|
rega:
|
|
lda #00
|
|
regx:
|
|
ldx #00
|
|
regy:
|
|
ldy #00
|
|
rti
|
|
}
|
|
//SEG309 processChars
|
|
// Process any chars in the PROCESSING array
|
|
processChars: {
|
|
.label processing = $29
|
|
.label bitmask = $2b
|
|
.label i = $1b
|
|
//SEG310 [172] phi from processChars to processChars::@1 [phi:processChars->processChars::@1]
|
|
//SEG311 [172] phi (byte) processChars::i#10 = (byte) 0 [phi:processChars->processChars::@1#0] -- vbuz1=vbuc1
|
|
lda #0
|
|
sta i
|
|
//SEG312 [172] phi from processChars::@2 to processChars::@1 [phi:processChars::@2->processChars::@1]
|
|
//SEG313 [172] phi (byte) processChars::i#10 = (byte) processChars::i#1 [phi:processChars::@2->processChars::@1#0] -- register_copy
|
|
//SEG314 processChars::@1
|
|
b1:
|
|
//SEG315 [173] (byte~) processChars::$18 ← (byte) processChars::i#10 << (byte) 3 -- vbuaa=vbuz1_rol_3
|
|
lda i
|
|
asl
|
|
asl
|
|
asl
|
|
//SEG316 [174] (struct ProcessingSprite*) processChars::processing#0 ← (const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (byte~) processChars::$18 -- pssz1=pssc1_plus_vbuaa
|
|
clc
|
|
adc #<PROCESSING
|
|
sta processing
|
|
lda #>PROCESSING
|
|
adc #0
|
|
sta processing+1
|
|
//SEG317 [175] (byte) processChars::bitmask#0 ← (byte) 1 << *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID) -- vbuz1=vbuc1_rol_pbuz2_derefidx_vbuc2
|
|
ldy #OFFSET_STRUCT_PROCESSINGSPRITE_ID
|
|
lda (processing),y
|
|
tax
|
|
lda #1
|
|
cpx #0
|
|
beq !e+
|
|
!:
|
|
asl
|
|
dex
|
|
bne !-
|
|
!e:
|
|
sta bitmask
|
|
//SEG318 [176] if(*((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS)==(const byte) STATUS_FREE#0) goto processChars::@2 -- pbuz1_derefidx_vbuc1_eq_vbuc2_then_la1
|
|
ldy #OFFSET_STRUCT_PROCESSINGSPRITE_STATUS
|
|
lda (processing),y
|
|
cmp #STATUS_FREE
|
|
beq b2
|
|
//SEG319 processChars::@8
|
|
//SEG320 [177] if(*((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS)!=(const byte) STATUS_NEW#0) goto processChars::@3 -- pbuz1_derefidx_vbuc1_neq_vbuc2_then_la1
|
|
lda (processing),y
|
|
cmp #STATUS_NEW
|
|
bne b3
|
|
//SEG321 processChars::@9
|
|
//SEG322 [178] *(*((byte**)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR)) ← (byte) ' ' -- _deref_pptz1_derefidx_vbuc1=vbuc2
|
|
// Clear the char on the screen
|
|
ldx #' '
|
|
ldy #OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR
|
|
lda (processing),y
|
|
sta !++1
|
|
iny
|
|
lda (processing),y
|
|
sta !++2
|
|
txa
|
|
!:
|
|
sta $ffff
|
|
//SEG323 [179] *((const byte*) SPRITES_ENABLE#0) ← *((const byte*) SPRITES_ENABLE#0) | (byte) processChars::bitmask#0 -- _deref_pbuc1=_deref_pbuc1_bor_vbuz1
|
|
// Enable the sprite
|
|
lda SPRITES_ENABLE
|
|
ora bitmask
|
|
sta SPRITES_ENABLE
|
|
//SEG324 [180] *((const byte*) SCREEN#0+(const word) SPRITE_PTRS#0 + *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID)) ← *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR) -- pbuc1_derefidx_pbuz1_derefidx_vbuc2=pbuz1_derefidx_vbuc3
|
|
// Set sprite pointer
|
|
ldy #OFFSET_STRUCT_PROCESSINGSPRITE_PTR
|
|
lda (processing),y
|
|
ldy #OFFSET_STRUCT_PROCESSINGSPRITE_ID
|
|
lda (processing),y
|
|
tay
|
|
lda SCREEN+SPRITE_PTRS,y
|
|
//SEG325 [181] *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) ← (const byte) STATUS_PROCESSING#0 -- pbuz1_derefidx_vbuc1=vbuc2
|
|
// Set status
|
|
lda #STATUS_PROCESSING
|
|
ldy #OFFSET_STRUCT_PROCESSINGSPRITE_STATUS
|
|
sta (processing),y
|
|
//SEG326 processChars::@3
|
|
b3:
|
|
//SEG327 [182] (byte~) processChars::$9 ← > *((word*)(struct ProcessingSprite*) processChars::processing#0) -- vbuaa=_hi__deref_pwuz1
|
|
ldy #1
|
|
lda (processing),y
|
|
//SEG328 [183] if((byte) 0!=(byte~) processChars::$9) goto processChars::@4 -- vbuc1_neq_vbuaa_then_la1
|
|
// Set sprite position
|
|
cmp #0
|
|
bne b4
|
|
//SEG329 processChars::@6
|
|
//SEG330 [184] (byte~) processChars::$10 ← (byte) $ff ^ (byte) processChars::bitmask#0 -- vbuaa=vbuc1_bxor_vbuz1
|
|
lda #$ff
|
|
eor bitmask
|
|
//SEG331 [185] *((const byte*) SPRITES_XMSB#0) ← *((const byte*) SPRITES_XMSB#0) & (byte~) processChars::$10 -- _deref_pbuc1=_deref_pbuc1_band_vbuaa
|
|
and SPRITES_XMSB
|
|
sta SPRITES_XMSB
|
|
//SEG332 processChars::@5
|
|
b5:
|
|
//SEG333 [186] (byte~) processChars::$13 ← (byte) processChars::i#10 << (byte) 1 -- vbuxx=vbuz1_rol_1
|
|
lda i
|
|
asl
|
|
tax
|
|
//SEG334 [187] (byte~) processChars::$12 ← (byte)*((word*)(struct ProcessingSprite*) processChars::processing#0) -- vbuaa=_byte__deref_pwuz1
|
|
ldy #0
|
|
lda (processing),y
|
|
//SEG335 [188] *((const byte*) SPRITES_XPOS#0 + (byte~) processChars::$13) ← (byte~) processChars::$12 -- pbuc1_derefidx_vbuxx=vbuaa
|
|
sta SPRITES_XPOS,x
|
|
//SEG336 [189] *((const byte*) SPRITES_YPOS#0 + (byte~) processChars::$13) ← *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y) -- pbuc1_derefidx_vbuxx=pbuz1_derefidx_vbuc2
|
|
ldy #OFFSET_STRUCT_PROCESSINGSPRITE_Y
|
|
lda (processing),y
|
|
sta SPRITES_YPOS,x
|
|
//SEG337 [190] *((word*)(struct ProcessingSprite*) processChars::processing#0) ← -- *((word*)(struct ProcessingSprite*) processChars::processing#0) -- _deref_pwuz1=_dec__deref_pwuz1
|
|
ldy #0
|
|
lda (processing),y
|
|
sec
|
|
sbc #1
|
|
sta (processing),y
|
|
//SEG338 [191] if(*((word*)(struct ProcessingSprite*) processChars::processing#0)!=(byte) 0) goto processChars::@2 -- _deref_pwuz1_neq_0_then_la1
|
|
lda (processing),y
|
|
bne b2
|
|
iny
|
|
lda (processing),y
|
|
bne b2
|
|
//SEG339 processChars::@7
|
|
//SEG340 [192] *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) ← (const byte) STATUS_FREE#0 -- pbuz1_derefidx_vbuc1=vbuc2
|
|
// Set status
|
|
lda #STATUS_FREE
|
|
ldy #OFFSET_STRUCT_PROCESSINGSPRITE_STATUS
|
|
sta (processing),y
|
|
//SEG341 [193] (byte~) processChars::$16 ← (byte) $ff ^ (byte) processChars::bitmask#0 -- vbuaa=vbuc1_bxor_vbuz1
|
|
lda #$ff
|
|
eor bitmask
|
|
//SEG342 [194] *((const byte*) SPRITES_ENABLE#0) ← *((const byte*) SPRITES_ENABLE#0) & (byte~) processChars::$16 -- _deref_pbuc1=_deref_pbuc1_band_vbuaa
|
|
// Disable the sprite
|
|
and SPRITES_ENABLE
|
|
sta SPRITES_ENABLE
|
|
//SEG343 processChars::@2
|
|
b2:
|
|
//SEG344 [195] (byte) processChars::i#1 ← ++ (byte) processChars::i#10 -- vbuz1=_inc_vbuz1
|
|
inc i
|
|
//SEG345 [196] if((byte) processChars::i#1!=(byte) 1) goto processChars::@1 -- vbuz1_neq_vbuc1_then_la1
|
|
lda #1
|
|
cmp i
|
|
beq !b1+
|
|
jmp b1
|
|
!b1:
|
|
//SEG346 processChars::@return
|
|
//SEG347 [197] return
|
|
rts
|
|
//SEG348 processChars::@4
|
|
b4:
|
|
//SEG349 [198] *((const byte*) SPRITES_XMSB#0) ← *((const byte*) SPRITES_XMSB#0) | (byte) processChars::bitmask#0 -- _deref_pbuc1=_deref_pbuc1_bor_vbuz1
|
|
lda SPRITES_XMSB
|
|
ora bitmask
|
|
sta SPRITES_XMSB
|
|
jmp b5
|
|
}
|
|
//SEG350 irqTop
|
|
// Raster Interrupt at the top of the screen
|
|
irqTop: {
|
|
//SEG351 entry interrupt(HARDWARE_ALL)
|
|
sta rega+1
|
|
stx regx+1
|
|
sty regy+1
|
|
//SEG352 [200] phi from irqTop to irqTop::@1 [phi:irqTop->irqTop::@1]
|
|
//SEG353 [200] phi (byte) irqTop::i#2 = (byte) 0 [phi:irqTop->irqTop::@1#0] -- vbuxx=vbuc1
|
|
ldx #0
|
|
//SEG354 [200] phi from irqTop::@1 to irqTop::@1 [phi:irqTop::@1->irqTop::@1]
|
|
//SEG355 [200] phi (byte) irqTop::i#2 = (byte) irqTop::i#1 [phi:irqTop::@1->irqTop::@1#0] -- register_copy
|
|
//SEG356 irqTop::@1
|
|
b1:
|
|
//SEG357 [201] (byte) irqTop::i#1 ← ++ (byte) irqTop::i#2 -- vbuxx=_inc_vbuxx
|
|
inx
|
|
//SEG358 [202] if((byte) irqTop::i#1!=(byte) 5) goto irqTop::@1 -- vbuxx_neq_vbuc1_then_la1
|
|
cpx #5
|
|
bne b1
|
|
//SEG359 irqTop::@2
|
|
//SEG360 [203] *((const byte*) BORDERCOL#0) ← (const byte) WHITE#0 -- _deref_pbuc1=vbuc2
|
|
lda #WHITE
|
|
sta BORDERCOL
|
|
//SEG361 [204] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 -- _deref_pbuc1=vbuc2
|
|
sta BGCOL
|
|
//SEG362 [205] phi from irqTop::@2 to irqTop::@3 [phi:irqTop::@2->irqTop::@3]
|
|
//SEG363 [205] phi (byte) irqTop::i1#2 = (byte) 0 [phi:irqTop::@2->irqTop::@3#0] -- vbuxx=vbuc1
|
|
ldx #0
|
|
//SEG364 [205] phi from irqTop::@3 to irqTop::@3 [phi:irqTop::@3->irqTop::@3]
|
|
//SEG365 [205] phi (byte) irqTop::i1#2 = (byte) irqTop::i1#1 [phi:irqTop::@3->irqTop::@3#0] -- register_copy
|
|
//SEG366 irqTop::@3
|
|
b3:
|
|
//SEG367 [206] (byte) irqTop::i1#1 ← ++ (byte) irqTop::i1#2 -- vbuxx=_inc_vbuxx
|
|
inx
|
|
//SEG368 [207] if((byte) irqTop::i1#1!=(byte) 8) goto irqTop::@3 -- vbuxx_neq_vbuc1_then_la1
|
|
cpx #8
|
|
bne b3
|
|
//SEG369 irqTop::@4
|
|
//SEG370 [208] *((const byte*) BORDERCOL#0) ← (const byte) LIGHT_BLUE#0 -- _deref_pbuc1=vbuc2
|
|
lda #LIGHT_BLUE
|
|
sta BORDERCOL
|
|
//SEG371 [209] *((const byte*) BGCOL#0) ← (const byte) BLUE#0 -- _deref_pbuc1=vbuc2
|
|
lda #BLUE
|
|
sta BGCOL
|
|
//SEG372 [210] *((const byte*) RASTER#0) ← (const byte) RASTER_IRQ_MIDDLE#0 -- _deref_pbuc1=vbuc2
|
|
// Trigger IRQ at the middle of the screen
|
|
lda #RASTER_IRQ_MIDDLE
|
|
sta RASTER
|
|
//SEG373 [211] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_ALL)(void()) irqBottom() -- _deref_pptc1=pprc2
|
|
lda #<irqBottom
|
|
sta HARDWARE_IRQ
|
|
lda #>irqBottom
|
|
sta HARDWARE_IRQ+1
|
|
//SEG374 [212] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2
|
|
// Acknowledge the IRQ
|
|
lda #IRQ_RASTER
|
|
sta IRQ_STATUS
|
|
//SEG375 irqTop::@return
|
|
//SEG376 [213] return - exit interrupt(HARDWARE_ALL)
|
|
rega:
|
|
lda #00
|
|
regx:
|
|
ldx #00
|
|
regy:
|
|
ldy #00
|
|
rti
|
|
}
|
|
// Copy of the screen used for finding chars to process
|
|
SCREEN_COPY: .fill $3e8, 0
|
|
// SQUARES_X[i] = (i-20)*(i-20)
|
|
SQUARES_X: .fill 2*$28, 0
|
|
// SQUARES_Y[i] = (i-12)*(i-12)
|
|
SQUARES_Y: .fill 2*$19, 0
|
|
// Sprites currently being processed in the interrupt
|
|
PROCESSING: .fill 8*NUM_PROCESSING, 0
|
|
|