diff --git a/src/main/fragment/vwsz1=pwsc1_derefidx_vbuxx_plus__deref_pwsc2.asm b/src/main/fragment/vwsz1=pwsc1_derefidx_vbuxx_plus__deref_pwsc2.asm new file mode 100644 index 000000000..e41410255 --- /dev/null +++ b/src/main/fragment/vwsz1=pwsc1_derefidx_vbuxx_plus__deref_pwsc2.asm @@ -0,0 +1,8 @@ +clc +lda {c1},x +adc {c2} +sta {z1} +lda {c1}+1,x +adc {c2}+1 +sta {z1}+1 + diff --git a/src/main/fragment/vwsz1=pwsc1_derefidx_vbuxx_plus__deref_pwsz1.asm b/src/main/fragment/vwsz1=pwsc1_derefidx_vbuxx_plus__deref_pwsz1.asm new file mode 100644 index 000000000..4b2e391da --- /dev/null +++ b/src/main/fragment/vwsz1=pwsc1_derefidx_vbuxx_plus__deref_pwsz1.asm @@ -0,0 +1,12 @@ +clc +ldy #0 +lda {c1},x +adc ({z1}),y +pha +iny +lda {c1}+1,x +adc ({z1}),y +sta {z1}+1 +pla +sta {z1} + diff --git a/src/main/fragment/vwsz1=pwsc1_derefidx_vbuxx_plus__deref_pwsz2.asm b/src/main/fragment/vwsz1=pwsc1_derefidx_vbuxx_plus__deref_pwsz2.asm new file mode 100644 index 000000000..f4994c7e7 --- /dev/null +++ b/src/main/fragment/vwsz1=pwsc1_derefidx_vbuxx_plus__deref_pwsz2.asm @@ -0,0 +1,10 @@ +clc +ldy #0 +lda {c1},x +adc ({z2}),y +sta {z1} +iny +lda {c1}+1,x +adc ({z2}),y +sta {z1}+1 + diff --git a/src/main/fragment/vwsz1=pwsc1_derefidx_vbuyy_plus__deref_pwsc2.asm b/src/main/fragment/vwsz1=pwsc1_derefidx_vbuyy_plus__deref_pwsc2.asm new file mode 100644 index 000000000..53ae1965e --- /dev/null +++ b/src/main/fragment/vwsz1=pwsc1_derefidx_vbuyy_plus__deref_pwsc2.asm @@ -0,0 +1,8 @@ +clc +lda {c1},y +adc {c2} +sta {z1} +lda {c1}+1,y +adc {c2}+1 +sta {z1}+1 + diff --git a/src/main/java/dk/camelot64/kickc/CompileLog.java b/src/main/java/dk/camelot64/kickc/CompileLog.java index 545d45140..19305c5d3 100644 --- a/src/main/java/dk/camelot64/kickc/CompileLog.java +++ b/src/main/java/dk/camelot64/kickc/CompileLog.java @@ -167,6 +167,11 @@ public class CompileLog { this.verboseLiveRanges = verboseLiveRanges; } + public CompileLog verboseLiveRanges() { + setVerboseLiveRanges(true); + return this; + } + public boolean isVerboseFragmentLog() { return verboseFragmentLog; } diff --git a/src/main/java/dk/camelot64/kickc/model/LiveRangeVariablesEffective.java b/src/main/java/dk/camelot64/kickc/model/LiveRangeVariablesEffective.java index f9e271b4e..f69a89384 100644 --- a/src/main/java/dk/camelot64/kickc/model/LiveRangeVariablesEffective.java +++ b/src/main/java/dk/camelot64/kickc/model/LiveRangeVariablesEffective.java @@ -105,6 +105,13 @@ public class LiveRangeVariablesEffective { referencedInProcedure = referenceInfo.getReferencedVars(procedure.getRef().getLabelRef()); } else { callPaths = new CallPaths(ROOT_PROCEDURE); + // Interrupt is called outside procedure scope - create initial call-path. + ArrayList rootPath = new ArrayList<>(); + ArrayList rootAlive = new ArrayList<>(); + // Initialize with global cross-scope aliases (assumed empty) + Pass2AliasElimination.Aliases rootAliases = new Pass2AliasElimination.Aliases(); + LiveRangeVariablesEffective.CallPath rootCallPath = new LiveRangeVariablesEffective.CallPath(rootPath, rootAlive, rootAliases, rootAliases); + callPaths.add(rootCallPath); referencedInProcedure = new ArrayList<>(); } Pass2AliasElimination.Aliases callAliases = null; @@ -169,7 +176,7 @@ public class LiveRangeVariablesEffective { /** * All variables alive in a specific procedure at a specific call-path. - * The call-path is th path from the main()-procedure to the procedure in question. + * The call-path is the path from the main()-procedure to the procedure in question. */ public static class CallPath { diff --git a/src/main/java/dk/camelot64/kickc/model/types/SymbolTypeInference.java b/src/main/java/dk/camelot64/kickc/model/types/SymbolTypeInference.java index 2127094d8..1422e89ab 100644 --- a/src/main/java/dk/camelot64/kickc/model/types/SymbolTypeInference.java +++ b/src/main/java/dk/camelot64/kickc/model/types/SymbolTypeInference.java @@ -112,9 +112,7 @@ public class SymbolTypeInference { Variable structMember = structDefinition.getVariable(structMemberRef.getMemberName()); return structMember.getType(); } else { - AsmFragmentInstanceSpec asmFragmentInstanceSpec = null; - Program program = asmFragmentInstanceSpec.getProgram(); - throw new CompileError("Dot applied to non-struct "+ structMemberRef.getStruct().toString(program)); + throw new CompileError("Dot applied to non-struct "+ structMemberRef.getStruct().toString()); } } else if(rValue instanceof StructZero) { return ((StructZero)rValue).getTypeStruct(); diff --git a/src/test/java/dk/camelot64/kickc/test/TestPrograms.java b/src/test/java/dk/camelot64/kickc/test/TestPrograms.java index 2c166c23d..de80d8301 100644 --- a/src/test/java/dk/camelot64/kickc/test/TestPrograms.java +++ b/src/test/java/dk/camelot64/kickc/test/TestPrograms.java @@ -35,6 +35,16 @@ public class TestPrograms { public TestPrograms() { } + @Test + public void testNesArray() throws IOException, URISyntaxException { + compileAndCompare("nes-array"); + } + + @Test + public void testLiverangeProblem0() throws IOException, URISyntaxException { + compileAndCompare("liverange-problem-0"); + } + @Test public void testCiaTimerCyclecount() throws IOException, URISyntaxException { compileAndCompare("cia-timer-cyclecount"); diff --git a/src/test/kc/complex/clearscreen/clearscreen.kc b/src/test/kc/complex/clearscreen/clearscreen.kc index cd782ddd9..90fd8b97f 100644 --- a/src/test/kc/complex/clearscreen/clearscreen.kc +++ b/src/test/kc/complex/clearscreen/clearscreen.kc @@ -1,6 +1,7 @@ // Clears start screen throwing around the letters (by turning them into sprites) import "stdlib" import "sqr" +import "atan2" import "multiply" import "c64" @@ -76,7 +77,7 @@ struct ProcessingSprite[NUM_PROCESSING] PROCESSING; void main() { // Initialize the screen containing distance to the center - init_dist_screen(SCREEN_DIST); + init_angle_screen(SCREEN_DIST); // Copy screen to screen copy for( byte* src=SCREEN, dst=SCREEN_COPY; src!=SCREEN+1000; src++, dst++) *dst = *src; // Init processing array @@ -248,6 +249,27 @@ void init_dist_screen(byte* screen) { } } +// Populates 1000 bytes (a screen) with values representing the angle to the center. +// Utilizes symmetry around the center +void init_angle_screen(byte* screen) { + byte* screen_topline = screen+40*12; + byte *screen_bottomline = screen+40*12; + for(byte y: 0..12) { + for( byte x=0,xb=39; x<=19; x++, xb--) { + signed word xw = (signed word)(word){ 39-x*2, 0 }; + signed word yw = (signed word)(word){ y*2, 0 }; + word angle_w = atan2_16(xw, yw); + byte ang_w = >(angle_w+0x0080); + screen_bottomline[xb] = ang_w; + screen_topline[xb] = -ang_w; + screen_topline[x] = 0x80+ang_w; + screen_bottomline[x] = 0x80-ang_w; + } + screen_topline -= 40; + screen_bottomline += 40; + } +} + // Initialize sprites void initSprites() { // Clear sprite data diff --git a/src/test/kc/liverange-problem-0.kc b/src/test/kc/liverange-problem-0.kc new file mode 100644 index 000000000..1513ff022 --- /dev/null +++ b/src/test/kc/liverange-problem-0.kc @@ -0,0 +1,18 @@ +// Error where the compiler is reusing the same ZP for two byte* variables. +// SCREEN_1 and SCREEN_2 are both allocated to ZP: 4 +// Problem is that outside main() scope statements have zero call-paths and then isStatementAllocationOverlapping() never checks liveranges +// CallPath code must be rewritten to use @begin as the outermost call instead of main() + +byte* MEM = 0x0400; +byte* malloc() { + return ++MEM; +} + +byte* SCREEN_1 = malloc(); +byte* SCREEN_2 = malloc(); + +void main() { + *SCREEN_1 = 0; + *SCREEN_2 = 0; +} + diff --git a/src/test/kc/malloc-problem-0.kc b/src/test/kc/malloc-problem-0.kc new file mode 100644 index 000000000..d1af5815f --- /dev/null +++ b/src/test/kc/malloc-problem-0.kc @@ -0,0 +1,15 @@ +// Error where the compiler is reusing the same ZP for two byte* variables. + +byte* MEM = 0x0400; +byte* malloc() { + return ++MEM; +} + +byte* SCREEN_1 = malloc(); +byte* SCREEN_2 = malloc(); + +void main() { + *SCREEN_1 = 0; + *SCREEN_2 = 0; +} + diff --git a/src/test/kc/nes-array.kc b/src/test/kc/nes-array.kc new file mode 100644 index 000000000..4b121932d --- /dev/null +++ b/src/test/kc/nes-array.kc @@ -0,0 +1,17 @@ +// Test a bit of array code from the NES forum +// https://forums.nesdev.com/viewtopic.php?f=2&t=18735 + +int[4] wow = { 0xCAFE, 0xBABE, 0x1234, 0x5678}; + +int foo(unsigned char x, int *y) { + return wow[x] + *y; +} + +void main() { + int* SCREEN = 0x400; + int y1 = 0x1234; + int y2 = 0x1234; + *SCREEN++ = foo(1, &y1); + *SCREEN++ = foo(2, &y2); + +} \ No newline at end of file diff --git a/src/test/ref/address-of-2.log b/src/test/ref/address-of-2.log index f6f372da9..2df0aed0b 100644 --- a/src/test/ref/address-of-2.log +++ b/src/test/ref/address-of-2.log @@ -485,7 +485,7 @@ setv: { //SEG40 File Data REGISTER UPLIFT POTENTIAL REGISTERS -Statement [0] (byte) val#0 ← (byte) 0 [ val#0 ] ( ) always clobbers reg byte a +Statement [0] (byte) val#0 ← (byte) 0 [ val#0 ] ( [ val#0 ] ) always clobbers reg byte a Statement [4] *((const byte*) main::SCREEN1#0) ← (byte) val#0 [ ] ( main:2 [ ] ) always clobbers reg byte a Statement [5] *((const byte*) main::SCREEN2#0) ← (byte) '.' [ ] ( main:2 [ ] ) always clobbers reg byte a Statement [6] (byte) val#1 ← (byte) 1 [ val#1 ] ( main:2 [ val#1 ] ) always clobbers reg byte a diff --git a/src/test/ref/bitmap-plot-0.log b/src/test/ref/bitmap-plot-0.log index 9fdff891a..17c0f0381 100644 --- a/src/test/ref/bitmap-plot-0.log +++ b/src/test/ref/bitmap-plot-0.log @@ -2383,7 +2383,7 @@ irq: { REGISTER UPLIFT POTENTIAL REGISTERS Equivalence Class zp ZP_BYTE:34 [ bitmap_init::$4 ] has ALU potential. -Statement [1] (byte) frame_cnt#0 ← (byte) 1 [ frame_cnt#0 ] ( ) always clobbers reg byte a +Statement [1] (byte) frame_cnt#0 ← (byte) 1 [ frame_cnt#0 ] ( [ frame_cnt#0 ] ) always clobbers reg byte a Statement [9] *((const byte*) D011#0) ← (const byte) VIC_BMM#0|(const byte) VIC_DEN#0|(const byte) VIC_RSEL#0|(byte) 3 [ frame_cnt#0 ] ( main:3 [ frame_cnt#0 ] ) always clobbers reg byte a Statement [11] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0 [ frame_cnt#0 ] ( main:3 [ frame_cnt#0 ] ) always clobbers reg byte a Statement [14] (word) bitmap_plot::x#0 ← (word) main::x#2 [ frame_cnt#0 main::x#2 main::y#2 main::vx#2 main::vy#2 bitmap_plot::x#0 ] ( main:3 [ frame_cnt#0 main::x#2 main::y#2 main::vx#2 main::vy#2 bitmap_plot::x#0 ] ) always clobbers reg byte a @@ -2425,7 +2425,7 @@ Statement [80] if((byte) 0==(byte) frame_cnt#0) goto irq::@1 [ frame_cnt#0 ] ( Statement [83] *((const byte*) BGCOL#0) ← (const byte) BLACK#0 [ ] ( [ ] ) always clobbers reg byte a Statement [84] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 [ ] ( [ ] ) always clobbers reg byte a Statement [85] return [ ] ( [ ] ) always clobbers reg byte a reg byte x reg byte y -Statement [1] (byte) frame_cnt#0 ← (byte) 1 [ frame_cnt#0 ] ( ) always clobbers reg byte a +Statement [1] (byte) frame_cnt#0 ← (byte) 1 [ frame_cnt#0 ] ( [ frame_cnt#0 ] ) always clobbers reg byte a Statement [9] *((const byte*) D011#0) ← (const byte) VIC_BMM#0|(const byte) VIC_DEN#0|(const byte) VIC_RSEL#0|(byte) 3 [ frame_cnt#0 ] ( main:3 [ frame_cnt#0 ] ) always clobbers reg byte a Statement [11] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0 [ frame_cnt#0 ] ( main:3 [ frame_cnt#0 ] ) always clobbers reg byte a Statement [14] (word) bitmap_plot::x#0 ← (word) main::x#2 [ frame_cnt#0 main::x#2 main::y#2 main::vx#2 main::vy#2 bitmap_plot::x#0 ] ( main:3 [ frame_cnt#0 main::x#2 main::y#2 main::vx#2 main::vy#2 bitmap_plot::x#0 ] ) always clobbers reg byte a diff --git a/src/test/ref/bitmap-plot-1.log b/src/test/ref/bitmap-plot-1.log index 399f9583d..7c2278fed 100644 --- a/src/test/ref/bitmap-plot-1.log +++ b/src/test/ref/bitmap-plot-1.log @@ -5867,7 +5867,7 @@ REGISTER UPLIFT POTENTIAL REGISTERS Equivalence Class zp ZP_WORD:86 [ main::$10 ] has ALU potential. Equivalence Class zp ZP_WORD:108 [ main::$15 ] has ALU potential. Equivalence Class zp ZP_BYTE:142 [ bitmap_init::$4 ] has ALU potential. -Statement [1] (byte) frame_cnt#0 ← (byte) 1 [ frame_cnt#0 ] ( ) always clobbers reg byte a +Statement [1] (byte) frame_cnt#0 ← (byte) 1 [ frame_cnt#0 ] ( [ frame_cnt#0 ] ) always clobbers reg byte a Statement [11] *((const byte*) D011#0) ← (const byte) VIC_BMM#0|(const byte) VIC_DEN#0|(const byte) VIC_RSEL#0|(byte) 3 [ frame_cnt#0 ] ( main:3 [ frame_cnt#0 ] ) always clobbers reg byte a Statement [13] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0 [ frame_cnt#0 ] ( main:3 [ frame_cnt#0 ] ) always clobbers reg byte a Statement [16] (word~) main::$24 ← (word) main::idx_x#3 << (byte) 1 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 main::$24 ] ( main:3 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 main::$24 ] ) always clobbers reg byte a @@ -5996,7 +5996,7 @@ Statement [224] if((byte) 0==(byte) frame_cnt#0) goto irq::@1 [ frame_cnt#0 ] ( Statement [227] *((const byte*) BGCOL#0) ← (const byte) BLACK#0 [ ] ( [ ] ) always clobbers reg byte a Statement [228] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 [ ] ( [ ] ) always clobbers reg byte a Statement [229] return [ ] ( [ ] ) always clobbers reg byte a reg byte x reg byte y -Statement [1] (byte) frame_cnt#0 ← (byte) 1 [ frame_cnt#0 ] ( ) always clobbers reg byte a +Statement [1] (byte) frame_cnt#0 ← (byte) 1 [ frame_cnt#0 ] ( [ frame_cnt#0 ] ) always clobbers reg byte a Statement [11] *((const byte*) D011#0) ← (const byte) VIC_BMM#0|(const byte) VIC_DEN#0|(const byte) VIC_RSEL#0|(byte) 3 [ frame_cnt#0 ] ( main:3 [ frame_cnt#0 ] ) always clobbers reg byte a Statement [13] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0 [ frame_cnt#0 ] ( main:3 [ frame_cnt#0 ] ) always clobbers reg byte a Statement [16] (word~) main::$24 ← (word) main::idx_x#3 << (byte) 1 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 main::$24 ] ( main:3 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 main::$24 ] ) always clobbers reg byte a diff --git a/src/test/ref/bitmap-plot-2.log b/src/test/ref/bitmap-plot-2.log index 9520b9f0c..894c75903 100644 --- a/src/test/ref/bitmap-plot-2.log +++ b/src/test/ref/bitmap-plot-2.log @@ -6159,7 +6159,7 @@ irq: { REGISTER UPLIFT POTENTIAL REGISTERS Equivalence Class zp ZP_BYTE:141 [ bitmap_init::$4 ] has ALU potential. -Statement [1] (byte) frame_cnt#0 ← (byte) 1 [ frame_cnt#0 ] ( ) always clobbers reg byte a +Statement [1] (byte) frame_cnt#0 ← (byte) 1 [ frame_cnt#0 ] ( [ frame_cnt#0 ] ) always clobbers reg byte a Statement [11] *((const byte*) D011#0) ← (const byte) VIC_BMM#0|(const byte) VIC_DEN#0|(const byte) VIC_RSEL#0|(byte) 3 [ frame_cnt#0 ] ( main:3 [ frame_cnt#0 ] ) always clobbers reg byte a Statement [13] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0 [ frame_cnt#0 ] ( main:3 [ frame_cnt#0 ] ) always clobbers reg byte a Statement [16] (word~) main::$32 ← (word) main::idx_x#11 << (byte) 1 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 main::$32 ] ( main:3 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 main::$32 ] ) always clobbers reg byte a @@ -6301,7 +6301,7 @@ Statement [233] if((byte) 0==(byte) frame_cnt#0) goto irq::@1 [ frame_cnt#0 ] ( Statement [236] *((const byte*) BGCOL#0) ← (const byte) BLACK#0 [ ] ( [ ] ) always clobbers reg byte a Statement [237] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 [ ] ( [ ] ) always clobbers reg byte a Statement [238] return [ ] ( [ ] ) always clobbers reg byte a reg byte x reg byte y -Statement [1] (byte) frame_cnt#0 ← (byte) 1 [ frame_cnt#0 ] ( ) always clobbers reg byte a +Statement [1] (byte) frame_cnt#0 ← (byte) 1 [ frame_cnt#0 ] ( [ frame_cnt#0 ] ) always clobbers reg byte a Statement [11] *((const byte*) D011#0) ← (const byte) VIC_BMM#0|(const byte) VIC_DEN#0|(const byte) VIC_RSEL#0|(byte) 3 [ frame_cnt#0 ] ( main:3 [ frame_cnt#0 ] ) always clobbers reg byte a Statement [13] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0 [ frame_cnt#0 ] ( main:3 [ frame_cnt#0 ] ) always clobbers reg byte a Statement [16] (word~) main::$32 ← (word) main::idx_x#11 << (byte) 1 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 main::$32 ] ( main:3 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 main::$32 ] ) always clobbers reg byte a diff --git a/src/test/ref/clobber-a-problem.log b/src/test/ref/clobber-a-problem.log index 6c6970ba1..f571d7898 100644 --- a/src/test/ref/clobber-a-problem.log +++ b/src/test/ref/clobber-a-problem.log @@ -349,7 +349,7 @@ irq: { //SEG31 File Data REGISTER UPLIFT POTENTIAL REGISTERS -Statement [1] (byte) irq_raster_next#0 ← (byte) 0 [ ] ( ) always clobbers reg byte a +Statement [1] (byte) irq_raster_next#0 ← (byte) 0 [ ] ( [ ] ) always clobbers reg byte a Statement [5] *((const void()**) KERNEL_IRQ#0) ← &interrupt(HARDWARE_CLOBBER)(void()) irq() [ ] ( main:3 [ ] ) always clobbers reg byte a Statement [7] *((const byte*) BORDERCOL#0) ← (const byte) DARK_GREY#0 [ irq_raster_next#0 ] ( [ irq_raster_next#0 ] ) always clobbers reg byte a Statement [8] (byte) irq_raster_next#1 ← (byte) irq_raster_next#0 + (byte) $15 [ irq_raster_next#1 ] ( [ irq_raster_next#1 ] ) always clobbers reg byte a reg byte x diff --git a/src/test/ref/complex/clearscreen/clearscreen.asm b/src/test/ref/complex/clearscreen/clearscreen.asm index 9f31fe498..64db08aca 100644 --- a/src/test/ref/complex/clearscreen/clearscreen.asm +++ b/src/test/ref/complex/clearscreen/clearscreen.asm @@ -2,7 +2,6 @@ .pc = $801 "Basic" :BasicUpstart(bbegin) .pc = $80d "Program" - .const SIZEOF_WORD = 2 .const STATUS_FREE = 0 .const STATUS_NEW = 1 .const STATUS_PROCESSING = 2 @@ -16,6 +15,8 @@ .const OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR = $c // Start of the heap used by malloc() .label HEAP_START = $c000 + // The number of iterations performed during 16-bit CORDIC atan2 calculation + .const CORDIC_ITERATIONS_16 = $f // Processor port data direction register .label PROCPORT_DDR = 0 // Mask for PROCESSOR_PORT_DDR which allows only memory configuration to be written @@ -68,22 +69,16 @@ .const NUM_PROCESSING = 8 // Distance value meaning not found .const NOT_FOUND = $ff - .const NUM_SQUARES = $30 .const RASTER_IRQ_TOP = $30 .const RASTER_IRQ_MIDDLE = $ff .const XPOS_RIGHTMOST = BORDER_XPOS_RIGHT<<4 .const YPOS_BOTTOMMOST = BORDER_YPOS_BOTTOM<<4 .const XPOS_LEFTMOST = BORDER_XPOS_LEFT-8<<4 .const YPOS_TOPMOST = BORDER_YPOS_TOP-8<<4 - .label heap_head = $23 - .label SQUARES = $49 - .label SCREEN_COPY = $29 - .label SCREEN_DIST = $2b + .label heap_head = $27 + .label SCREEN_COPY = $2b + .label SCREEN_DIST = $2d bbegin: - lda #<$3e8 - sta malloc.size - lda #>$3e8 - sta malloc.size+1 lda #HEAP_START @@ -93,27 +88,19 @@ bbegin: sta SCREEN_COPY lda malloc.mem+1 sta SCREEN_COPY+1 - lda #<$3e8 - sta malloc.size - lda #>$3e8 - sta malloc.size+1 jsr malloc - lda malloc.mem - sta SCREEN_DIST - lda malloc.mem+1 - sta SCREEN_DIST+1 jsr main rts main: { .label dst = 4 .label src = 2 .label i = 6 - .label center_y = $2d + .label center_y = $2f lda SCREEN_DIST - sta init_dist_screen.screen + sta init_angle_screen.screen lda SCREEN_DIST+1 - sta init_dist_screen.screen+1 - jsr init_dist_screen + sta init_angle_screen.screen+1 + jsr init_angle_screen lda SCREEN_COPY sta dst lda SCREEN_COPY+1 @@ -197,36 +184,36 @@ main: { jmp b3 } // Start processing a char - by inserting it into the PROCESSING array -// startProcessing(byte zeropage($2e) center_x, byte zeropage($2d) center_y) +// startProcessing(byte zeropage($30) center_x, byte zeropage($2f) center_y) startProcessing: { - .label _0 = $2f - .label _1 = $2f + .label _0 = $31 + .label _1 = $31 .label _5 = $a .label _6 = $a .label _8 = 8 .label _9 = 8 - .label _11 = $36 - .label _12 = $36 - .label _13 = $36 - .label _15 = $38 - .label _16 = $38 - .label _17 = $38 - .label _23 = $3b - .label center_x = $2e - .label center_y = $2d + .label _11 = $38 + .label _12 = $38 + .label _13 = $38 + .label _15 = $3a + .label _16 = $3a + .label _17 = $3a + .label _23 = $3d + .label center_x = $30 + .label center_y = $2f .label i = 7 - .label offset = $2f - .label colPtr = $33 - .label spriteCol = $35 - .label screenPtr = $2f + .label offset = $31 + .label colPtr = $35 + .label spriteCol = $37 + .label screenPtr = $31 .label spriteData = $a .label chargenData = 8 - .label spriteX = $36 - .label spriteY = $38 - .label spritePtr = $3a + .label spriteX = $38 + .label spriteY = $3a + .label spritePtr = $3c .label freeIdx = 7 - .label _47 = $31 - .label _48 = $2f + .label _47 = $33 + .label _48 = $31 ldx #$ff b1: lda #0 @@ -480,9 +467,9 @@ startProcessing: { // 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 _8 = $3d - .label _9 = $3d - .label _10 = $3d + .label _8 = $3f + .label _9 = $3f + .label _10 = $3f .label screen_line = $c .label dist_line = $e .label y = $10 @@ -491,8 +478,8 @@ getCharToProcess: { .label closest_dist = $11 .label closest_x = $12 .label closest_y = $13 - .label _12 = $3f - .label _13 = $3d + .label _12 = $41 + .label _13 = $3f lda SCREEN_COPY sta screen_line lda SCREEN_COPY+1 @@ -663,292 +650,308 @@ initSprites: { sta SPRITES_EXPAND_Y rts } -// Populates 1000 bytes (a screen) with values representing the distance to the center. -// The actual value stored is distance*2 to increase precision -// init_dist_screen(byte* zeropage($17) screen) -init_dist_screen: { +// Populates 1000 bytes (a screen) with values representing the angle to the center. +// Utilizes symmetry around the center +// init_angle_screen(byte* zeropage($17) screen) +init_angle_screen: { + .label _10 = $21 .label screen = $17 - .label screen_bottomline = $19 - .label yds = $41 - .label xds = $43 - .label ds = $43 + .label screen_topline = $19 + .label screen_bottomline = $17 + .label xw = $43 + .label yw = $45 + .label angle_w = $21 + .label ang_w = $47 .label x = $1b .label xb = $1c - .label screen_topline = $17 .label y = $16 - jsr init_squares lda screen clc - adc #<$28*$18 - sta screen_bottomline + adc #<$28*$c + sta screen_topline lda screen+1 - adc #>$28*$18 + adc #>$28*$c + sta screen_topline+1 + clc + lda screen_bottomline + adc #<$28*$c + sta screen_bottomline + lda screen_bottomline+1 + adc #>$28*$c sta screen_bottomline+1 lda #0 sta y b1: - lda y - asl - cmp #$18 - bcs b2 - eor #$ff - clc - adc #$18+1 - b4: - jsr sqr - lda sqr.return - sta sqr.return_2 - lda sqr.return+1 - sta sqr.return_2+1 lda #$27 sta xb lda #0 sta x - b5: + b2: lda x asl - cmp #$27 - bcs b6 eor #$ff clc adc #$27+1 - b8: - jsr sqr - lda ds + ldy #0 + sta xw+1 + sty xw + lda y + asl + sta yw+1 + sty yw + jsr atan2_16 + lda #$80 clc - adc yds - sta ds - lda ds+1 - adc yds+1 - sta ds+1 - jsr sqrt + adc _10 + sta _10 + bcc !+ + inc _10+1 + !: + lda _10+1 + sta ang_w + ldy xb + sta (screen_bottomline),y + eor #$ff + clc + adc #1 + sta (screen_topline),y + lda #$80 + clc + adc ang_w ldy x sta (screen_topline),y - sta (screen_bottomline),y - ldy xb - sta (screen_topline),y + lda #$80 + sec + sbc ang_w sta (screen_bottomline),y inc x dec xb lda x cmp #$13+1 - bcc b5 - lda #$28 - clc - adc screen_topline - sta screen_topline - bcc !+ - inc screen_topline+1 - !: - lda screen_bottomline + bcc b2 + lda screen_topline sec sbc #<$28 - sta screen_bottomline - lda screen_bottomline+1 + sta screen_topline + lda screen_topline+1 sbc #>$28 - sta screen_bottomline+1 + sta screen_topline+1 + lda #$28 + clc + adc screen_bottomline + sta screen_bottomline + bcc !+ + inc screen_bottomline+1 + !: inc y lda #$d cmp y bne b1 rts - b6: - sec - sbc #$27 - jmp b8 - b2: - sec - sbc #$18 - jmp b4 } -// Find the (integer) square root of a word value -// If the square is not an integer then it returns the largest integer N where N*N <= val -// Uses a table of squares that must be initialized by calling init_squares() -// sqrt(word zeropage($43) val) -sqrt: { - .label _1 = $1d - .label _3 = $1d - .label found = $1d - .label val = $43 - lda SQUARES - sta bsearch16u.items - lda SQUARES+1 - sta bsearch16u.items+1 - jsr bsearch16u - lda _3 - sec - sbc SQUARES - sta _3 - lda _3+1 - sbc SQUARES+1 - sta _3+1 - lsr _1+1 - ror _1 - lda _1 - rts -} -// Searches an array of nitems unsigned words, the initial member of which is pointed to by base, for a member that matches the value key. -// - key - The value to look for -// - items - Pointer to the start of the array to search in -// - num - The number of items in the array -// Returns pointer to an entry in the array that matches the search key -// bsearch16u(word zeropage($43) key, word* zeropage($1d) items, byte register(X) num) -bsearch16u: { +// Find the atan2(x, y) - which is the angle of the line from (0,0) to (x,y) +// Finding the angle requires a binary search using CORDIC_ITERATIONS_16 +// Returns the angle in hex-degrees (0=0, 0x8000=PI, 0x10000=2*PI) +// atan2_16(signed word zeropage($43) x, signed word zeropage($45) y) +atan2_16: { .label _2 = $1d - .label pivot = $45 - .label result = $47 - .label return = $1d - .label items = $1d - .label key = $43 - ldx #NUM_SQUARES - b3: - cpx #0 - bne b4 - ldy #1 - lda (items),y - cmp key+1 - bne !+ - dey - lda (items),y - cmp key - beq b2 - !: - bcc b2 - lda _2 + .label _7 = $1f + .label yi = $1d + .label xi = $1f + .label angle = $21 + .label xd = $25 + .label yd = $23 + .label return = $21 + .label x = $43 + .label y = $45 + lda y+1 + bmi !b1+ + jmp b1 + !b1: sec - sbc #<1*SIZEOF_WORD + lda #0 + sbc y sta _2 - lda _2+1 - sbc #>1*SIZEOF_WORD + lda #0 + sbc y+1 sta _2+1 - b2: - rts - b4: - txa - lsr - asl - clc - adc items - sta pivot - lda #0 - adc items+1 - sta pivot+1 + b3: + lda x+1 + bmi !b4+ + jmp b4 + !b4: sec - lda key - ldy #0 - sbc (pivot),y - sta result - lda key+1 - iny - sbc (pivot),y - sta result+1 - bne b6 - lda result - bne b6 - lda pivot - sta return - lda pivot+1 - sta return+1 - rts - b6: - lda result+1 - bmi b7 - bne !+ - lda result - beq b7 - !: - lda #1*SIZEOF_WORD - clc - adc pivot - sta items lda #0 - adc pivot+1 - sta items+1 - dex - b7: - txa - lsr + sbc x + sta _7 + lda #0 + sbc x+1 + sta _7+1 + b6: + lda #0 + sta angle + sta angle+1 tax - jmp b3 -} -// Find the square of a byte value -// Uses a table of squares that must be initialized by calling init_squares() -// sqr(byte register(A) val) -sqr: { - .label return = $43 - .label return_2 = $41 + b10: + lda yi+1 + bne b11 + lda yi + bne b11 + b12: + lsr angle+1 + ror angle + lda x+1 + bpl b7 + sec + lda #<$8000 + sbc angle + sta angle + lda #>$8000 + sbc angle+1 + sta angle+1 + b7: + lda y+1 + bpl b8 + sec + lda #0 + sbc angle + sta angle + lda #0 + sbc angle+1 + sta angle+1 + b8: + rts + b11: + txa + tay + lda xi + sta xd + lda xi+1 + sta xd+1 + lda yi + sta yd + lda yi+1 + sta yd+1 + b13: + cpy #2 + bcs b14 + cpy #0 + beq b17 + lda xd+1 + cmp #$80 + ror xd+1 + ror xd + lda yd+1 + cmp #$80 + ror yd+1 + ror yd + b17: + lda yi+1 + bpl b18 + lda xi + sec + sbc yd + sta xi + lda xi+1 + sbc yd+1 + sta xi+1 + lda yi + clc + adc xd + sta yi + lda yi+1 + adc xd+1 + sta yi+1 + txa asl tay - lda (SQUARES),y - sta return - iny - lda (SQUARES),y - sta return+1 - rts -} -// Initialize squares table -// Uses iterative formula (x+1)^2 = x^2 + 2*x + 1 -init_squares: { - .label squares = $21 - .label sqr = $1f - lda #NUM_SQUARES*SIZEOF_WORD - sta malloc.size - lda #0 - sta malloc.size+1 - jsr malloc - lda SQUARES - sta squares - lda SQUARES+1 - sta squares+1 - ldx #0 - txa - sta sqr - sta sqr+1 - b1: - ldy #0 - lda sqr - sta (squares),y - iny - lda sqr+1 - sta (squares),y - lda #SIZEOF_WORD + sec + lda angle + sbc CORDIC_ATAN2_ANGLES_16,y + sta angle + lda angle+1 + sbc CORDIC_ATAN2_ANGLES_16+1,y + sta angle+1 + b19: + inx + cpx #CORDIC_ITERATIONS_16-1+1 + bne !b12+ + jmp b12 + !b12: + jmp b10 + b18: + lda xi clc - adc squares - sta squares - bcc !+ - inc squares+1 - !: + adc yd + sta xi + lda xi+1 + adc yd+1 + sta xi+1 + lda yi + sec + sbc xd + sta yi + lda yi+1 + sbc xd+1 + sta yi+1 txa asl + tay clc - adc #1 - clc - adc sqr - sta sqr - bcc !+ - inc sqr+1 - !: - inx - cpx #NUM_SQUARES-1+1 - bne b1 - rts + lda angle + adc CORDIC_ATAN2_ANGLES_16,y + sta angle + lda angle+1 + adc CORDIC_ATAN2_ANGLES_16+1,y + sta angle+1 + jmp b19 + b14: + lda xd+1 + cmp #$80 + ror xd+1 + ror xd + lda xd+1 + cmp #$80 + ror xd+1 + ror xd + lda yd+1 + cmp #$80 + ror yd+1 + ror yd + lda yd+1 + cmp #$80 + ror yd+1 + ror yd + dey + dey + jmp b13 + b4: + lda x + sta xi + lda x+1 + sta xi+1 + jmp b6 + b1: + lda y + sta yi + lda y+1 + sta yi+1 + jmp b3 } // Allocates a block of size bytes of memory, returning a pointer to the beginning of the block. // The content of the newly allocated block of memory is not initialized, remaining with indeterminate values. -// malloc(word zeropage($25) size) malloc: { - .label mem = $49 - .label size = $25 + .label mem = $2d lda heap_head sta mem lda heap_head+1 sta mem+1 - lda heap_head clc - adc size + lda heap_head + adc #<$3e8 sta heap_head lda heap_head+1 - adc size+1 + adc #>$3e8 sta heap_head+1 rts } @@ -978,14 +981,14 @@ irqBottom: { } // Process any chars in the PROCESSING array processChars: { - .label _15 = $50 - .label _25 = $4e - .label processing = $4b - .label bitmask = $4d - .label i = $27 - .label xpos = $4e - .label ypos = $52 - .label numActive = $28 + .label _15 = $4d + .label _25 = $4b + .label processing = $48 + .label bitmask = $4a + .label i = $29 + .label xpos = $4b + .label ypos = $4f + .label numActive = $2a lda #0 sta numActive sta i @@ -1278,6 +1281,11 @@ irqTop: { ldy #00 rti } + // Angles representing ATAN(0.5), ATAN(0.25), ATAN(0.125), ... +CORDIC_ATAN2_ANGLES_16: +.for (var i=0; i=(byte) $18) goto init_dist_screen::@2 - to:init_dist_screen::@3 -init_dist_screen::@3: scope:[init_dist_screen] from init_dist_screen::@1 - [175] (byte~) init_dist_screen::$5 ← (byte) $18 - (byte) init_dist_screen::y2#0 - to:init_dist_screen::@4 -init_dist_screen::@4: scope:[init_dist_screen] from init_dist_screen::@2 init_dist_screen::@3 - [176] (byte) init_dist_screen::yd#0 ← phi( init_dist_screen::@2/(byte~) init_dist_screen::$7 init_dist_screen::@3/(byte~) init_dist_screen::$5 ) - [177] (byte) sqr::val#0 ← (byte) init_dist_screen::yd#0 - [178] call sqr - [179] (word) sqr::return#2 ← (word) sqr::return#0 - to:init_dist_screen::@11 -init_dist_screen::@11: scope:[init_dist_screen] from init_dist_screen::@4 - [180] (word) init_dist_screen::yds#0 ← (word) sqr::return#2 - to:init_dist_screen::@5 -init_dist_screen::@5: scope:[init_dist_screen] from init_dist_screen::@11 init_dist_screen::@13 - [181] (byte) init_dist_screen::xb#2 ← phi( init_dist_screen::@11/(byte) $27 init_dist_screen::@13/(byte) init_dist_screen::xb#1 ) - [181] (byte) init_dist_screen::x#2 ← phi( init_dist_screen::@11/(byte) 0 init_dist_screen::@13/(byte) init_dist_screen::x#1 ) - [182] (byte) init_dist_screen::x2#0 ← (byte) init_dist_screen::x#2 << (byte) 1 - [183] if((byte) init_dist_screen::x2#0>=(byte) $27) goto init_dist_screen::@6 - to:init_dist_screen::@7 -init_dist_screen::@7: scope:[init_dist_screen] from init_dist_screen::@5 - [184] (byte~) init_dist_screen::$13 ← (byte) $27 - (byte) init_dist_screen::x2#0 - to:init_dist_screen::@8 -init_dist_screen::@8: scope:[init_dist_screen] from init_dist_screen::@6 init_dist_screen::@7 - [185] (byte) init_dist_screen::xd#0 ← phi( init_dist_screen::@6/(byte~) init_dist_screen::$15 init_dist_screen::@7/(byte~) init_dist_screen::$13 ) - [186] (byte) sqr::val#1 ← (byte) init_dist_screen::xd#0 - [187] call sqr - [188] (word) sqr::return#3 ← (word) sqr::return#0 - to:init_dist_screen::@12 -init_dist_screen::@12: scope:[init_dist_screen] from init_dist_screen::@8 - [189] (word) init_dist_screen::xds#0 ← (word) sqr::return#3 - [190] (word) init_dist_screen::ds#0 ← (word) init_dist_screen::xds#0 + (word) init_dist_screen::yds#0 - [191] (word) sqrt::val#0 ← (word) init_dist_screen::ds#0 - [192] call sqrt - [193] (byte) sqrt::return#2 ← (byte) sqrt::return#0 - to:init_dist_screen::@13 -init_dist_screen::@13: scope:[init_dist_screen] from init_dist_screen::@12 - [194] (byte) init_dist_screen::d#0 ← (byte) sqrt::return#2 - [195] *((byte*) init_dist_screen::screen_topline#10 + (byte) init_dist_screen::x#2) ← (byte) init_dist_screen::d#0 - [196] *((byte*) init_dist_screen::screen_bottomline#10 + (byte) init_dist_screen::x#2) ← (byte) init_dist_screen::d#0 - [197] *((byte*) init_dist_screen::screen_topline#10 + (byte) init_dist_screen::xb#2) ← (byte) init_dist_screen::d#0 - [198] *((byte*) init_dist_screen::screen_bottomline#10 + (byte) init_dist_screen::xb#2) ← (byte) init_dist_screen::d#0 - [199] (byte) init_dist_screen::x#1 ← ++ (byte) init_dist_screen::x#2 - [200] (byte) init_dist_screen::xb#1 ← -- (byte) init_dist_screen::xb#2 - [201] if((byte) init_dist_screen::x#1<(byte) $13+(byte) 1) goto init_dist_screen::@5 - to:init_dist_screen::@9 -init_dist_screen::@9: scope:[init_dist_screen] from init_dist_screen::@13 - [202] (byte*) init_dist_screen::screen_topline#1 ← (byte*) init_dist_screen::screen_topline#10 + (byte) $28 - [203] (byte*) init_dist_screen::screen_bottomline#1 ← (byte*) init_dist_screen::screen_bottomline#10 - (byte) $28 - [204] (byte) init_dist_screen::y#1 ← ++ (byte) init_dist_screen::y#10 - [205] if((byte) init_dist_screen::y#1!=(byte) $d) goto init_dist_screen::@1 - to:init_dist_screen::@return -init_dist_screen::@return: scope:[init_dist_screen] from init_dist_screen::@9 - [206] return +init_angle_screen: scope:[init_angle_screen] from main + [169] (byte*) init_angle_screen::screen_topline#0 ← (byte*) init_angle_screen::screen#0 + (word)(number) $28*(number) $c + [170] (byte*) init_angle_screen::screen_bottomline#0 ← (byte*) init_angle_screen::screen#0 + (word)(number) $28*(number) $c + to:init_angle_screen::@1 +init_angle_screen::@1: scope:[init_angle_screen] from init_angle_screen init_angle_screen::@3 + [171] (byte*) init_angle_screen::screen_topline#5 ← phi( init_angle_screen/(byte*) init_angle_screen::screen_topline#0 init_angle_screen::@3/(byte*) init_angle_screen::screen_topline#1 ) + [171] (byte*) init_angle_screen::screen_bottomline#5 ← phi( init_angle_screen/(byte*) init_angle_screen::screen_bottomline#0 init_angle_screen::@3/(byte*) init_angle_screen::screen_bottomline#1 ) + [171] (byte) init_angle_screen::y#4 ← phi( init_angle_screen/(byte) 0 init_angle_screen::@3/(byte) init_angle_screen::y#1 ) + to:init_angle_screen::@2 +init_angle_screen::@2: scope:[init_angle_screen] from init_angle_screen::@1 init_angle_screen::@4 + [172] (byte) init_angle_screen::xb#2 ← phi( init_angle_screen::@1/(byte) $27 init_angle_screen::@4/(byte) init_angle_screen::xb#1 ) + [172] (byte) init_angle_screen::x#2 ← phi( init_angle_screen::@1/(byte) 0 init_angle_screen::@4/(byte) init_angle_screen::x#1 ) + [173] (byte~) init_angle_screen::$2 ← (byte) init_angle_screen::x#2 << (byte) 1 + [174] (byte~) init_angle_screen::$3 ← (byte) $27 - (byte~) init_angle_screen::$2 + [175] (word) init_angle_screen::xw#0 ← (byte~) init_angle_screen::$3 w= (byte) 0 + [176] (byte~) init_angle_screen::$6 ← (byte) init_angle_screen::y#4 << (byte) 1 + [177] (word) init_angle_screen::yw#0 ← (byte~) init_angle_screen::$6 w= (byte) 0 + [178] (signed word) atan2_16::x#0 ← (signed word)(word) init_angle_screen::xw#0 + [179] (signed word) atan2_16::y#0 ← (signed word)(word) init_angle_screen::yw#0 + [180] call atan2_16 + [181] (word) atan2_16::return#2 ← (word) atan2_16::return#0 + to:init_angle_screen::@4 +init_angle_screen::@4: scope:[init_angle_screen] from init_angle_screen::@2 + [182] (word) init_angle_screen::angle_w#0 ← (word) atan2_16::return#2 + [183] (word~) init_angle_screen::$10 ← (word) init_angle_screen::angle_w#0 + (byte) $80 + [184] (byte) init_angle_screen::ang_w#0 ← > (word~) init_angle_screen::$10 + [185] *((byte*) init_angle_screen::screen_bottomline#5 + (byte) init_angle_screen::xb#2) ← (byte) init_angle_screen::ang_w#0 + [186] (byte~) init_angle_screen::$12 ← - (byte) init_angle_screen::ang_w#0 + [187] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::xb#2) ← (byte~) init_angle_screen::$12 + [188] (byte~) init_angle_screen::$13 ← (byte) $80 + (byte) init_angle_screen::ang_w#0 + [189] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$13 + [190] (byte~) init_angle_screen::$14 ← (byte) $80 - (byte) init_angle_screen::ang_w#0 + [191] *((byte*) init_angle_screen::screen_bottomline#5 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$14 + [192] (byte) init_angle_screen::x#1 ← ++ (byte) init_angle_screen::x#2 + [193] (byte) init_angle_screen::xb#1 ← -- (byte) init_angle_screen::xb#2 + [194] if((byte) init_angle_screen::x#1<(byte) $13+(byte) 1) goto init_angle_screen::@2 + to:init_angle_screen::@3 +init_angle_screen::@3: scope:[init_angle_screen] from init_angle_screen::@4 + [195] (byte*) init_angle_screen::screen_topline#1 ← (byte*) init_angle_screen::screen_topline#5 - (byte) $28 + [196] (byte*) init_angle_screen::screen_bottomline#1 ← (byte*) init_angle_screen::screen_bottomline#5 + (byte) $28 + [197] (byte) init_angle_screen::y#1 ← ++ (byte) init_angle_screen::y#4 + [198] if((byte) init_angle_screen::y#1!=(byte) $d) goto init_angle_screen::@1 + to:init_angle_screen::@return +init_angle_screen::@return: scope:[init_angle_screen] from init_angle_screen::@3 + [199] return to:@return -init_dist_screen::@6: scope:[init_dist_screen] from init_dist_screen::@5 - [207] (byte~) init_dist_screen::$15 ← (byte) init_dist_screen::x2#0 - (byte) $27 - to:init_dist_screen::@8 -init_dist_screen::@2: scope:[init_dist_screen] from init_dist_screen::@1 - [208] (byte~) init_dist_screen::$7 ← (byte) init_dist_screen::y2#0 - (byte) $18 - to:init_dist_screen::@4 -sqrt: scope:[sqrt] from init_dist_screen::@12 - [209] (word) bsearch16u::key#0 ← (word) sqrt::val#0 - [210] (word*) bsearch16u::items#1 ← (word*)(void*) SQUARES#1 - [211] call bsearch16u - [212] (word*) bsearch16u::return#3 ← (word*) bsearch16u::return#1 - to:sqrt::@1 -sqrt::@1: scope:[sqrt] from sqrt - [213] (word*) sqrt::found#0 ← (word*) bsearch16u::return#3 - [214] (word~) sqrt::$3 ← (word*) sqrt::found#0 - (word*)(void*) SQUARES#1 - [215] (word~) sqrt::$1 ← (word~) sqrt::$3 >> (byte) 1 - [216] (byte) sqrt::return#0 ← (byte)(word~) sqrt::$1 - to:sqrt::@return -sqrt::@return: scope:[sqrt] from sqrt::@1 - [217] return +atan2_16: scope:[atan2_16] from init_angle_screen::@2 + [200] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 + to:atan2_16::@2 +atan2_16::@2: scope:[atan2_16] from atan2_16 + [201] (signed word~) atan2_16::$2 ← - (signed word) atan2_16::y#0 + to:atan2_16::@3 +atan2_16::@3: scope:[atan2_16] from atan2_16::@1 atan2_16::@2 + [202] (signed word) atan2_16::yi#0 ← phi( atan2_16::@1/(signed word~) atan2_16::yi#16 atan2_16::@2/(signed word~) atan2_16::$2 ) + [203] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4 + to:atan2_16::@5 +atan2_16::@5: scope:[atan2_16] from atan2_16::@3 + [204] (signed word~) atan2_16::$7 ← - (signed word) atan2_16::x#0 + to:atan2_16::@6 +atan2_16::@6: scope:[atan2_16] from atan2_16::@4 atan2_16::@5 + [205] (signed word) atan2_16::xi#0 ← phi( atan2_16::@4/(signed word~) atan2_16::xi#13 atan2_16::@5/(signed word~) atan2_16::$7 ) + to:atan2_16::@10 +atan2_16::@10: scope:[atan2_16] from atan2_16::@19 atan2_16::@6 + [206] (word) atan2_16::angle#12 ← phi( atan2_16::@19/(word) atan2_16::angle#13 atan2_16::@6/(byte) 0 ) + [206] (byte) atan2_16::i#2 ← phi( atan2_16::@19/(byte) atan2_16::i#1 atan2_16::@6/(byte) 0 ) + [206] (signed word) atan2_16::xi#3 ← phi( atan2_16::@19/(signed word) atan2_16::xi#8 atan2_16::@6/(signed word) atan2_16::xi#0 ) + [206] (signed word) atan2_16::yi#3 ← phi( atan2_16::@19/(signed word) atan2_16::yi#8 atan2_16::@6/(signed word) atan2_16::yi#0 ) + [207] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@11 + to:atan2_16::@12 +atan2_16::@12: scope:[atan2_16] from atan2_16::@10 atan2_16::@19 + [208] (word) atan2_16::angle#6 ← phi( atan2_16::@10/(word) atan2_16::angle#12 atan2_16::@19/(word) atan2_16::angle#13 ) + [209] (word) atan2_16::angle#1 ← (word) atan2_16::angle#6 >> (byte) 1 + [210] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7 + to:atan2_16::@21 +atan2_16::@21: scope:[atan2_16] from atan2_16::@12 + [211] (word) atan2_16::angle#4 ← (word) $8000 - (word) atan2_16::angle#1 + to:atan2_16::@7 +atan2_16::@7: scope:[atan2_16] from atan2_16::@12 atan2_16::@21 + [212] (word) atan2_16::angle#11 ← phi( atan2_16::@12/(word) atan2_16::angle#1 atan2_16::@21/(word) atan2_16::angle#4 ) + [213] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8 + to:atan2_16::@9 +atan2_16::@9: scope:[atan2_16] from atan2_16::@7 + [214] (word) atan2_16::angle#5 ← - (word) atan2_16::angle#11 + to:atan2_16::@8 +atan2_16::@8: scope:[atan2_16] from atan2_16::@7 atan2_16::@9 + [215] (word) atan2_16::return#0 ← phi( atan2_16::@9/(word) atan2_16::angle#5 atan2_16::@7/(word) atan2_16::angle#11 ) + to:atan2_16::@return +atan2_16::@return: scope:[atan2_16] from atan2_16::@8 + [216] return to:@return -bsearch16u: scope:[bsearch16u] from sqrt - [218] phi() - to:bsearch16u::@3 -bsearch16u::@3: scope:[bsearch16u] from bsearch16u bsearch16u::@7 - [219] (word*) bsearch16u::items#2 ← phi( bsearch16u/(word*) bsearch16u::items#1 bsearch16u::@7/(word*) bsearch16u::items#8 ) - [219] (byte) bsearch16u::num#3 ← phi( bsearch16u/(const byte) NUM_SQUARES#3 bsearch16u::@7/(byte) bsearch16u::num#0 ) - [220] if((byte) bsearch16u::num#3>(byte) 0) goto bsearch16u::@4 - to:bsearch16u::@5 -bsearch16u::@5: scope:[bsearch16u] from bsearch16u::@3 - [221] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@2 - to:bsearch16u::@1 -bsearch16u::@1: scope:[bsearch16u] from bsearch16u::@5 - [222] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#2 - (byte) 1*(const byte) SIZEOF_WORD - to:bsearch16u::@2 -bsearch16u::@2: scope:[bsearch16u] from bsearch16u::@1 bsearch16u::@5 - [223] (word*) bsearch16u::return#2 ← phi( bsearch16u::@5/(word*) bsearch16u::items#2 bsearch16u::@1/(word*~) bsearch16u::$2 ) - to:bsearch16u::@return -bsearch16u::@return: scope:[bsearch16u] from bsearch16u::@2 bsearch16u::@8 - [224] (word*) bsearch16u::return#1 ← phi( bsearch16u::@8/(word*~) bsearch16u::return#6 bsearch16u::@2/(word*) bsearch16u::return#2 ) - [225] return - to:@return -bsearch16u::@4: scope:[bsearch16u] from bsearch16u::@3 - [226] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#3 >> (byte) 1 - [227] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1 - [228] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#2 + (byte~) bsearch16u::$16 - [229] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0) - [230] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6 - to:bsearch16u::@8 -bsearch16u::@8: scope:[bsearch16u] from bsearch16u::@4 - [231] (word*~) bsearch16u::return#6 ← (word*) bsearch16u::pivot#0 - to:bsearch16u::@return -bsearch16u::@6: scope:[bsearch16u] from bsearch16u::@4 - [232] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@7 - to:bsearch16u::@9 -bsearch16u::@9: scope:[bsearch16u] from bsearch16u::@6 - [233] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD - [234] (byte) bsearch16u::num#1 ← -- (byte) bsearch16u::num#3 - to:bsearch16u::@7 -bsearch16u::@7: scope:[bsearch16u] from bsearch16u::@6 bsearch16u::@9 - [235] (word*) bsearch16u::items#8 ← phi( bsearch16u::@9/(word*) bsearch16u::items#0 bsearch16u::@6/(word*) bsearch16u::items#2 ) - [235] (byte) bsearch16u::num#5 ← phi( bsearch16u::@9/(byte) bsearch16u::num#1 bsearch16u::@6/(byte) bsearch16u::num#3 ) - [236] (byte) bsearch16u::num#0 ← (byte) bsearch16u::num#5 >> (byte) 1 - to:bsearch16u::@3 -sqr: scope:[sqr] from init_dist_screen::@4 init_dist_screen::@8 - [237] (byte) sqr::val#2 ← phi( init_dist_screen::@4/(byte) sqr::val#0 init_dist_screen::@8/(byte) sqr::val#1 ) - [238] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 - [239] (word) sqr::return#0 ← *((word*)(void*) SQUARES#1 + (byte~) sqr::$0) - to:sqr::@return -sqr::@return: scope:[sqr] from sqr - [240] return - to:@return -init_squares: scope:[init_squares] from init_dist_screen - [241] phi() - [242] call malloc - to:init_squares::@2 -init_squares::@2: scope:[init_squares] from init_squares - [243] (void*) SQUARES#1 ← (void*)(byte*) malloc::mem#0 - [244] (word*) init_squares::squares#0 ← (word*)(void*) SQUARES#1 - to:init_squares::@1 -init_squares::@1: scope:[init_squares] from init_squares::@1 init_squares::@2 - [245] (byte) init_squares::i#2 ← phi( init_squares::@1/(byte) init_squares::i#1 init_squares::@2/(byte) 0 ) - [245] (word*) init_squares::squares#2 ← phi( init_squares::@1/(word*) init_squares::squares#1 init_squares::@2/(word*) init_squares::squares#0 ) - [245] (word) init_squares::sqr#2 ← phi( init_squares::@1/(word) init_squares::sqr#1 init_squares::@2/(byte) 0 ) - [246] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 - [247] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD - [248] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 - [249] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 - [250] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 - [251] (byte) init_squares::i#1 ← ++ (byte) init_squares::i#2 - [252] if((byte) init_squares::i#1!=(const byte) NUM_SQUARES#3-(byte) 1+(byte) 1) goto init_squares::@1 - to:init_squares::@return -init_squares::@return: scope:[init_squares] from init_squares::@1 - [253] return - to:@return -malloc: scope:[malloc] from @1 @3 init_squares - [254] (word) malloc::size#3 ← phi( @1/(word) $3e8 @3/(word) $3e8 init_squares/(const byte) NUM_SQUARES#3*(const byte) SIZEOF_WORD ) - [254] (byte*) heap_head#12 ← phi( @1/(const byte*) HEAP_START#0 @3/(byte*) heap_head#1 init_squares/(byte*) heap_head#1 ) - [255] (byte*) malloc::mem#0 ← (byte*) heap_head#12 - [256] (byte*) heap_head#1 ← (byte*) heap_head#12 + (word) malloc::size#3 +atan2_16::@11: scope:[atan2_16] from atan2_16::@10 + [217] (byte~) atan2_16::shift#5 ← (byte) atan2_16::i#2 + [218] (signed word~) atan2_16::xd#10 ← (signed word) atan2_16::xi#3 + [219] (signed word~) atan2_16::yd#10 ← (signed word) atan2_16::yi#3 + to:atan2_16::@13 +atan2_16::@13: scope:[atan2_16] from atan2_16::@11 atan2_16::@14 + [220] (signed word) atan2_16::yd#3 ← phi( atan2_16::@11/(signed word~) atan2_16::yd#10 atan2_16::@14/(signed word) atan2_16::yd#1 ) + [220] (signed word) atan2_16::xd#3 ← phi( atan2_16::@11/(signed word~) atan2_16::xd#10 atan2_16::@14/(signed word) atan2_16::xd#1 ) + [220] (byte) atan2_16::shift#2 ← phi( atan2_16::@11/(byte~) atan2_16::shift#5 atan2_16::@14/(byte) atan2_16::shift#1 ) + [221] if((byte) atan2_16::shift#2>=(byte) 2) goto atan2_16::@14 + to:atan2_16::@15 +atan2_16::@15: scope:[atan2_16] from atan2_16::@13 + [222] if((byte) 0==(byte) atan2_16::shift#2) goto atan2_16::@17 + to:atan2_16::@16 +atan2_16::@16: scope:[atan2_16] from atan2_16::@15 + [223] (signed word) atan2_16::xd#2 ← (signed word) atan2_16::xd#3 >> (signed byte) 1 + [224] (signed word) atan2_16::yd#2 ← (signed word) atan2_16::yd#3 >> (signed byte) 1 + to:atan2_16::@17 +atan2_16::@17: scope:[atan2_16] from atan2_16::@15 atan2_16::@16 + [225] (signed word) atan2_16::xd#5 ← phi( atan2_16::@15/(signed word) atan2_16::xd#3 atan2_16::@16/(signed word) atan2_16::xd#2 ) + [225] (signed word) atan2_16::yd#5 ← phi( atan2_16::@15/(signed word) atan2_16::yd#3 atan2_16::@16/(signed word) atan2_16::yd#2 ) + [226] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@18 + to:atan2_16::@20 +atan2_16::@20: scope:[atan2_16] from atan2_16::@17 + [227] (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#3 - (signed word) atan2_16::yd#5 + [228] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#5 + [229] (byte~) atan2_16::$24 ← (byte) atan2_16::i#2 << (byte) 1 + [230] (word) atan2_16::angle#3 ← (word) atan2_16::angle#12 - *((const word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16#0 + (byte~) atan2_16::$24) + to:atan2_16::@19 +atan2_16::@19: scope:[atan2_16] from atan2_16::@18 atan2_16::@20 + [231] (signed word) atan2_16::xi#8 ← phi( atan2_16::@18/(signed word) atan2_16::xi#1 atan2_16::@20/(signed word) atan2_16::xi#2 ) + [231] (word) atan2_16::angle#13 ← phi( atan2_16::@18/(word) atan2_16::angle#2 atan2_16::@20/(word) atan2_16::angle#3 ) + [231] (signed word) atan2_16::yi#8 ← phi( atan2_16::@18/(signed word) atan2_16::yi#1 atan2_16::@20/(signed word) atan2_16::yi#2 ) + [232] (byte) atan2_16::i#1 ← ++ (byte) atan2_16::i#2 + [233] if((byte) atan2_16::i#1==(const byte) CORDIC_ITERATIONS_16#0-(byte) 1+(byte) 1) goto atan2_16::@12 + to:atan2_16::@10 +atan2_16::@18: scope:[atan2_16] from atan2_16::@17 + [234] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#5 + [235] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#5 + [236] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 << (byte) 1 + [237] (word) atan2_16::angle#2 ← (word) atan2_16::angle#12 + *((const word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16#0 + (byte~) atan2_16::$23) + to:atan2_16::@19 +atan2_16::@14: scope:[atan2_16] from atan2_16::@13 + [238] (signed word) atan2_16::xd#1 ← (signed word) atan2_16::xd#3 >> (signed byte) 2 + [239] (signed word) atan2_16::yd#1 ← (signed word) atan2_16::yd#3 >> (signed byte) 2 + [240] (byte) atan2_16::shift#1 ← (byte) atan2_16::shift#2 - (byte) 2 + to:atan2_16::@13 +atan2_16::@4: scope:[atan2_16] from atan2_16::@3 + [241] (signed word~) atan2_16::xi#13 ← (signed word) atan2_16::x#0 + to:atan2_16::@6 +atan2_16::@1: scope:[atan2_16] from atan2_16 + [242] (signed word~) atan2_16::yi#16 ← (signed word) atan2_16::y#0 + to:atan2_16::@3 +malloc: scope:[malloc] from @1 @3 + [243] (byte*) heap_head#5 ← phi( @1/(const byte*) HEAP_START#0 @3/(byte*) heap_head#1 ) + [244] (byte*) malloc::mem#0 ← (byte*) heap_head#5 + [245] (byte*) heap_head#1 ← (byte*) heap_head#5 + (word) $3e8 to:malloc::@return malloc::@return: scope:[malloc] from malloc - [257] return + [246] return to:@return irqBottom: scope:[irqBottom] from - [258] phi() + [247] phi() to:irqBottom::@1 irqBottom::@1: scope:[irqBottom] from irqBottom - [259] phi() - [260] call processChars + [248] phi() + [249] call processChars to:irqBottom::@2 irqBottom::@2: scope:[irqBottom] from irqBottom::@1 - [261] *((const byte*) RASTER#0) ← (const byte) RASTER_IRQ_TOP#0 - [262] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_ALL)(void()) irqTop() - [263] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 + [250] *((const byte*) RASTER#0) ← (const byte) RASTER_IRQ_TOP#0 + [251] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_ALL)(void()) irqTop() + [252] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 to:irqBottom::@return irqBottom::@return: scope:[irqBottom] from irqBottom::@2 - [264] return + [253] return to:@return processChars: scope:[processChars] from irqBottom::@1 - [265] phi() + [254] phi() to:processChars::@1 processChars::@1: scope:[processChars] from processChars processChars::@2 - [266] (byte) processChars::numActive#10 ← phi( processChars/(byte) 0 processChars::@2/(byte) processChars::numActive#3 ) - [266] (byte) processChars::i#10 ← phi( processChars/(byte) 0 processChars::@2/(byte) processChars::i#1 ) - [267] (byte) processChars::$67 ← (byte) processChars::i#10 << (byte) 1 - [268] (byte) processChars::$68 ← (byte) processChars::$67 + (byte) processChars::i#10 - [269] (byte) processChars::$69 ← (byte) processChars::$68 << (byte) 1 - [270] (byte) processChars::$70 ← (byte) processChars::$69 + (byte) processChars::i#10 - [271] (byte~) processChars::$37 ← (byte) processChars::$70 << (byte) 1 - [272] (struct ProcessingSprite*) processChars::processing#0 ← (const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (byte~) processChars::$37 - [273] (byte) processChars::bitmask#0 ← (byte) 1 << *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID) - [274] if(*((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS)==(const byte) STATUS_FREE) goto processChars::@2 + [255] (byte) processChars::numActive#10 ← phi( processChars/(byte) 0 processChars::@2/(byte) processChars::numActive#3 ) + [255] (byte) processChars::i#10 ← phi( processChars/(byte) 0 processChars::@2/(byte) processChars::i#1 ) + [256] (byte) processChars::$67 ← (byte) processChars::i#10 << (byte) 1 + [257] (byte) processChars::$68 ← (byte) processChars::$67 + (byte) processChars::i#10 + [258] (byte) processChars::$69 ← (byte) processChars::$68 << (byte) 1 + [259] (byte) processChars::$70 ← (byte) processChars::$69 + (byte) processChars::i#10 + [260] (byte~) processChars::$37 ← (byte) processChars::$70 << (byte) 1 + [261] (struct ProcessingSprite*) processChars::processing#0 ← (const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (byte~) processChars::$37 + [262] (byte) processChars::bitmask#0 ← (byte) 1 << *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID) + [263] if(*((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS)==(const byte) STATUS_FREE) goto processChars::@2 to:processChars::@10 processChars::@10: scope:[processChars] from processChars::@1 - [275] if(*((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS)!=(const byte) STATUS_NEW) goto processChars::@3 + [264] if(*((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS)!=(const byte) STATUS_NEW) goto processChars::@3 to:processChars::@11 processChars::@11: scope:[processChars] from processChars::@10 - [276] *(*((byte**)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR)) ← (byte) ' ' - [277] *((const byte*) SPRITES_ENABLE#0) ← *((const byte*) SPRITES_ENABLE#0) | (byte) processChars::bitmask#0 - [278] *((const byte*) SPRITES_COLS#0 + *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID)) ← *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_COL) - [279] *((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) - [280] *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) ← (const byte) STATUS_PROCESSING + [265] *(*((byte**)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR)) ← (byte) ' ' + [266] *((const byte*) SPRITES_ENABLE#0) ← *((const byte*) SPRITES_ENABLE#0) | (byte) processChars::bitmask#0 + [267] *((const byte*) SPRITES_COLS#0 + *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID)) ← *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_COL) + [268] *((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) + [269] *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) ← (const byte) STATUS_PROCESSING to:processChars::@3 processChars::@3: scope:[processChars] from processChars::@10 processChars::@11 - [281] (word) processChars::xpos#0 ← *((word*)(struct ProcessingSprite*) processChars::processing#0) >> (byte) 4 - [282] (byte~) processChars::$11 ← > (word) processChars::xpos#0 - [283] if((byte) 0!=(byte~) processChars::$11) goto processChars::@4 + [270] (word) processChars::xpos#0 ← *((word*)(struct ProcessingSprite*) processChars::processing#0) >> (byte) 4 + [271] (byte~) processChars::$11 ← > (word) processChars::xpos#0 + [272] if((byte) 0!=(byte~) processChars::$11) goto processChars::@4 to:processChars::@8 processChars::@8: scope:[processChars] from processChars::@3 - [284] (byte~) processChars::$12 ← (byte) $ff ^ (byte) processChars::bitmask#0 - [285] *((const byte*) SPRITES_XMSB#0) ← *((const byte*) SPRITES_XMSB#0) & (byte~) processChars::$12 + [273] (byte~) processChars::$12 ← (byte) $ff ^ (byte) processChars::bitmask#0 + [274] *((const byte*) SPRITES_XMSB#0) ← *((const byte*) SPRITES_XMSB#0) & (byte~) processChars::$12 to:processChars::@5 processChars::@5: scope:[processChars] from processChars::@4 processChars::@8 - [286] (byte~) processChars::$17 ← (byte) processChars::i#10 << (byte) 1 - [287] (byte~) processChars::$14 ← (byte)(word) processChars::xpos#0 - [288] *((const byte*) SPRITES_XPOS#0 + (byte~) processChars::$17) ← (byte~) processChars::$14 - [289] (word~) processChars::$15 ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y) >> (byte) 4 - [290] (byte) processChars::ypos#0 ← (byte)(word~) processChars::$15 - [291] *((const byte*) SPRITES_YPOS#0 + (byte~) processChars::$17) ← (byte) processChars::ypos#0 - [292] if(*((word*)(struct ProcessingSprite*) processChars::processing#0)<(const word) XPOS_LEFTMOST#0) goto processChars::@6 + [275] (byte~) processChars::$17 ← (byte) processChars::i#10 << (byte) 1 + [276] (byte~) processChars::$14 ← (byte)(word) processChars::xpos#0 + [277] *((const byte*) SPRITES_XPOS#0 + (byte~) processChars::$17) ← (byte~) processChars::$14 + [278] (word~) processChars::$15 ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y) >> (byte) 4 + [279] (byte) processChars::ypos#0 ← (byte)(word~) processChars::$15 + [280] *((const byte*) SPRITES_YPOS#0 + (byte~) processChars::$17) ← (byte) processChars::ypos#0 + [281] if(*((word*)(struct ProcessingSprite*) processChars::processing#0)<(const word) XPOS_LEFTMOST#0) goto processChars::@6 to:processChars::@14 processChars::@14: scope:[processChars] from processChars::@5 - [293] if(*((word*)(struct ProcessingSprite*) processChars::processing#0)>(const word) XPOS_RIGHTMOST#0) goto processChars::@6 + [282] if(*((word*)(struct ProcessingSprite*) processChars::processing#0)>(const word) XPOS_RIGHTMOST#0) goto processChars::@6 to:processChars::@13 processChars::@13: scope:[processChars] from processChars::@14 - [294] if(*((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y)<(const word) YPOS_TOPMOST#0) goto processChars::@6 + [283] if(*((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y)<(const word) YPOS_TOPMOST#0) goto processChars::@6 to:processChars::@12 processChars::@12: scope:[processChars] from processChars::@13 - [295] if(*((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y)>(const word) YPOS_BOTTOMMOST#0) goto processChars::@6 + [284] if(*((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y)>(const word) YPOS_BOTTOMMOST#0) goto processChars::@6 to:processChars::@9 processChars::@9: scope:[processChars] from processChars::@12 - [296] (word~) processChars::$25 ← (word) processChars::xpos#0 >> (byte) 3 - [297] (byte~) processChars::$26 ← (byte)(word~) processChars::$25 - [298] (byte) processChars::xchar#0 ← (byte~) processChars::$26 - (const byte) BORDER_XPOS_LEFT#0/(byte) 8 - [299] (byte~) processChars::$38 ← (byte) processChars::xchar#0 << (byte) 1 - [300] *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX) + *((const word[$28]) VXSIN#0 + (byte~) processChars::$38) - [301] *((word*)(struct ProcessingSprite*) processChars::processing#0) ← *((word*)(struct ProcessingSprite*) processChars::processing#0) + *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX) - [302] (byte~) processChars::$30 ← (byte) processChars::ypos#0 >> (byte) 3 - [303] (byte) processChars::ychar#0 ← (byte~) processChars::$30 - (const byte) BORDER_YPOS_TOP#0/(byte) 8 - [304] (byte~) processChars::$39 ← (byte) processChars::ychar#0 << (byte) 1 - [305] *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY) + *((const word[$19]) VYSIN#0 + (byte~) processChars::$39) - [306] *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y) + *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY) + [285] (word~) processChars::$25 ← (word) processChars::xpos#0 >> (byte) 3 + [286] (byte~) processChars::$26 ← (byte)(word~) processChars::$25 + [287] (byte) processChars::xchar#0 ← (byte~) processChars::$26 - (const byte) BORDER_XPOS_LEFT#0/(byte) 8 + [288] (byte~) processChars::$38 ← (byte) processChars::xchar#0 << (byte) 1 + [289] *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX) + *((const word[$28]) VXSIN#0 + (byte~) processChars::$38) + [290] *((word*)(struct ProcessingSprite*) processChars::processing#0) ← *((word*)(struct ProcessingSprite*) processChars::processing#0) + *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX) + [291] (byte~) processChars::$30 ← (byte) processChars::ypos#0 >> (byte) 3 + [292] (byte) processChars::ychar#0 ← (byte~) processChars::$30 - (const byte) BORDER_YPOS_TOP#0/(byte) 8 + [293] (byte~) processChars::$39 ← (byte) processChars::ychar#0 << (byte) 1 + [294] *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY) + *((const word[$19]) VYSIN#0 + (byte~) processChars::$39) + [295] *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y) + *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY) to:processChars::@7 processChars::@7: scope:[processChars] from processChars::@6 processChars::@9 - [307] (byte) processChars::numActive#1 ← ++ (byte) processChars::numActive#10 + [296] (byte) processChars::numActive#1 ← ++ (byte) processChars::numActive#10 to:processChars::@2 processChars::@2: scope:[processChars] from processChars::@1 processChars::@7 - [308] (byte) processChars::numActive#3 ← phi( processChars::@1/(byte) processChars::numActive#10 processChars::@7/(byte) processChars::numActive#1 ) - [309] (byte) processChars::i#1 ← ++ (byte) processChars::i#10 - [310] if((byte) processChars::i#1!=(const byte) NUM_PROCESSING#0-(byte) 1+(byte) 1) goto processChars::@1 + [297] (byte) processChars::numActive#3 ← phi( processChars::@1/(byte) processChars::numActive#10 processChars::@7/(byte) processChars::numActive#1 ) + [298] (byte) processChars::i#1 ← ++ (byte) processChars::i#10 + [299] if((byte) processChars::i#1!=(const byte) NUM_PROCESSING#0-(byte) 1+(byte) 1) goto processChars::@1 to:processChars::@return processChars::@return: scope:[processChars] from processChars::@2 - [311] return + [300] return to:@return processChars::@6: scope:[processChars] from processChars::@12 processChars::@13 processChars::@14 processChars::@5 - [312] *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) ← (const byte) STATUS_FREE - [313] (byte~) processChars::$33 ← (byte) $ff ^ (byte) processChars::bitmask#0 - [314] *((const byte*) SPRITES_ENABLE#0) ← *((const byte*) SPRITES_ENABLE#0) & (byte~) processChars::$33 + [301] *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) ← (const byte) STATUS_FREE + [302] (byte~) processChars::$33 ← (byte) $ff ^ (byte) processChars::bitmask#0 + [303] *((const byte*) SPRITES_ENABLE#0) ← *((const byte*) SPRITES_ENABLE#0) & (byte~) processChars::$33 to:processChars::@7 processChars::@4: scope:[processChars] from processChars::@3 - [315] *((const byte*) SPRITES_XMSB#0) ← *((const byte*) SPRITES_XMSB#0) | (byte) processChars::bitmask#0 + [304] *((const byte*) SPRITES_XMSB#0) ← *((const byte*) SPRITES_XMSB#0) | (byte) processChars::bitmask#0 to:processChars::@5 irqTop: scope:[irqTop] from - [316] phi() + [305] phi() to:irqTop::@1 irqTop::@1: scope:[irqTop] from irqTop - [317] *((const byte*) RASTER#0) ← (const byte) RASTER_IRQ_MIDDLE#0 - [318] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_ALL)(void()) irqBottom() - [319] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 + [306] *((const byte*) RASTER#0) ← (const byte) RASTER_IRQ_MIDDLE#0 + [307] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_ALL)(void()) irqBottom() + [308] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 to:irqTop::@return irqTop::@return: scope:[irqTop] from irqTop::@1 - [320] return + [309] return to:@return diff --git a/src/test/ref/complex/clearscreen/clearscreen.log b/src/test/ref/complex/clearscreen/clearscreen.log index 24a1403fc..4290da41e 100644 --- a/src/test/ref/complex/clearscreen/clearscreen.log +++ b/src/test/ref/complex/clearscreen/clearscreen.log @@ -9,6 +9,8 @@ Fixing pointer increment (word*) init_squares::squares ← ++ (word*) init_squar Fixing pointer addition (word~) sqrt::$1 ← (word*) sqrt::found - (word*) SQUARES Fixing pointer addition (struct ProcessingSprite*~) processChars::$2 ← (struct ProcessingSprite[NUM_PROCESSING]) PROCESSING + (byte) processChars::i Fixing pointer array-indexing *((word*) SQUARES + (byte) sqr::val) +Fixing pointer array-indexing *((word[CORDIC_ITERATIONS_16]) CORDIC_ATAN2_ANGLES_16 + (byte) atan2_16::i) +Fixing pointer array-indexing *((word[CORDIC_ITERATIONS_16]) CORDIC_ATAN2_ANGLES_16 + (byte) atan2_16::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) @@ -108,52 +110,54 @@ Rewriting struct pointer member access *((struct ProcessingSprite*) processChars Rewriting struct pointer member access *((struct ProcessingSprite*) processChars::processing).vy Rewriting struct pointer member access *((struct ProcessingSprite*) processChars::processing).y Warning! Adding boolean cast to non-boolean condition (byte~) processChars::$11 +Warning! Adding boolean cast to non-boolean sub-expression (byte) atan2_16::shift Identified constant variable (byte*) HEAP_START Inlined call (byte~) vicSelectGfxBank::$0 ← call toDd00 (byte*) vicSelectGfxBank::gfx Culled Empty Block (label) malloc::@1 Culled Empty Block (label) @1 Culled Empty Block (label) @2 -Culled Empty Block (label) bsearch16u::@11 -Culled Empty Block (label) bsearch16u::@12 -Culled Empty Block (label) bsearch16u::@14 -Culled Empty Block (label) bsearch16u::@16 -Culled Empty Block (label) bsearch16u::@17 -Culled Empty Block (label) bsearch16u::@4 -Culled Empty Block (label) bsearch16u::@5 -Culled Empty Block (label) init_squares::@2 +Culled Empty Block (label) @3 Culled Empty Block (label) @4 -Culled Empty Block (label) sqr::@1 Culled Empty Block (label) @5 -Culled Empty Block (label) sqrt::@1 -Culled Empty Block (label) @6 +Culled Empty Block (label) atan2_16::@9 +Culled Empty Block (label) atan2_16::@10 +Culled Empty Block (label) atan2_16::@11 +Culled Empty Block (label) atan2_16::@12 +Culled Empty Block (label) atan2_16::@28 +Culled Empty Block (label) atan2_16::@29 +Culled Empty Block (label) atan2_16::@21 +Culled Empty Block (label) atan2_16::@22 +Culled Empty Block (label) atan2_16::@23 +Culled Empty Block (label) atan2_16::@31 +Culled Empty Block (label) atan2_16::@32 +Culled Empty Block (label) atan2_16::@14 Culled Empty Block (label) @7 Culled Empty Block (label) @8 Culled Empty Block (label) @9 Culled Empty Block (label) @10 +Culled Empty Block (label) @11 Culled Empty Block (label) @12 -Culled Empty Block (label) @13 Culled Empty Block (label) @14 +Culled Empty Block (label) @15 +Culled Empty Block (label) @16 Culled Empty Block (label) main::@8 Culled Empty Block (label) main::@9 Culled Empty Block (label) main::@10 Culled Empty Block (label) main::@12 -Culled Empty Block (label) @16 +Culled Empty Block (label) @18 Culled Empty Block (label) getCharToProcess::@6 Culled Empty Block (label) getCharToProcess::@2 -Culled Empty Block (label) @17 +Culled Empty Block (label) @19 Culled Empty Block (label) startProcessing::@6 Culled Empty Block (label) startProcessing::@7 Culled Empty Block (label) processChars::@10 Culled Empty Block (label) processChars::@12 Culled Empty Block (label) processChars::@1 -Culled Empty Block (label) @19 -Culled Empty Block (label) init_dist_screen::@13 -Culled Empty Block (label) init_dist_screen::@14 -Culled Empty Block (label) init_dist_screen::@9 -Culled Empty Block (label) init_dist_screen::@10 -Culled Empty Block (label) init_dist_screen::@12 -Culled Empty Block (label) @20 Culled Empty Block (label) @21 +Culled Empty Block (label) @22 +Culled Empty Block (label) init_angle_screen::@4 +Culled Empty Block (label) @23 +Culled Empty Block (label) @24 Culled Empty Block (label) setupRasterIrq::@4 Unwinding list assignment { (byte) main::$9_x, (byte) main::$9_y, (byte) main::$9_dist } ← { (byte) getCharToProcess::return_x, (byte) getCharToProcess::return_y, (byte) getCharToProcess::return_dist } Unwinding list assignment { (byte) getCharToProcess::return_x#0, (byte) getCharToProcess::return_y#0, (byte) getCharToProcess::return_dist#0 } ← { (byte) getCharToProcess::return_x#2, (byte) getCharToProcess::return_y#2, (byte) getCharToProcess::return_dist#2 } @@ -164,191 +168,240 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (byte*) HEAP_START#0 ← ((byte*)) (number) $c000 (byte*) heap_head#0 ← (byte*) HEAP_START#0 - to:@3 -malloc: scope:[malloc] from @15 @25 init_squares - (word) malloc::size#3 ← phi( @15/(word) malloc::size#1 @25/(word) malloc::size#2 init_squares/(word) malloc::size#0 ) - (byte*) heap_head#12 ← phi( @15/(byte*) heap_head#23 @25/(byte*) heap_head#5 init_squares/(byte*) heap_head#24 ) - (byte*) malloc::mem#0 ← (byte*) heap_head#12 - (byte*) heap_head#1 ← (byte*) heap_head#12 + (word) malloc::size#3 + to:@6 +malloc: scope:[malloc] from @17 @28 + (word) malloc::size#2 ← phi( @17/(word) malloc::size#0 @28/(word) malloc::size#1 ) + (byte*) heap_head#5 ← phi( @17/(byte*) heap_head#9 @28/(byte*) heap_head#3 ) + (byte*) malloc::mem#0 ← (byte*) heap_head#5 + (byte*) heap_head#1 ← (byte*) heap_head#5 + (word) malloc::size#2 (void*) malloc::return#0 ← ((void*)) (byte*) malloc::mem#0 to:malloc::@return malloc::@return: scope:[malloc] from malloc - (byte*) heap_head#13 ← phi( malloc/(byte*) heap_head#1 ) - (void*) malloc::return#5 ← phi( malloc/(void*) malloc::return#0 ) - (void*) malloc::return#1 ← (void*) malloc::return#5 - (byte*) heap_head#2 ← (byte*) heap_head#13 + (byte*) heap_head#6 ← phi( malloc/(byte*) heap_head#1 ) + (void*) malloc::return#4 ← phi( malloc/(void*) malloc::return#0 ) + (void*) malloc::return#1 ← (void*) malloc::return#4 + (byte*) heap_head#2 ← (byte*) heap_head#6 return to:@return -bsearch16u: scope:[bsearch16u] from sqrt - (word) bsearch16u::key#4 ← phi( sqrt/(word) bsearch16u::key#0 ) - (word*) bsearch16u::items#7 ← phi( sqrt/(word*) bsearch16u::items#1 ) - (byte) bsearch16u::num#7 ← phi( sqrt/(byte) bsearch16u::num#2 ) - to:bsearch16u::@6 -bsearch16u::@6: scope:[bsearch16u] from bsearch16u bsearch16u::@10 - (word) bsearch16u::key#3 ← phi( bsearch16u/(word) bsearch16u::key#4 bsearch16u::@10/(word) bsearch16u::key#5 ) - (word*) bsearch16u::items#6 ← phi( bsearch16u/(word*) bsearch16u::items#7 bsearch16u::@10/(word*) bsearch16u::items#8 ) - (byte) bsearch16u::num#3 ← phi( bsearch16u/(byte) bsearch16u::num#7 bsearch16u::@10/(byte) bsearch16u::num#0 ) - (bool~) bsearch16u::$5 ← (byte) bsearch16u::num#3 > (number) 0 - if((bool~) bsearch16u::$5) goto bsearch16u::@7 - to:bsearch16u::@8 -bsearch16u::@7: scope:[bsearch16u] from bsearch16u::@6 - (word) bsearch16u::key#1 ← phi( bsearch16u::@6/(word) bsearch16u::key#3 ) - (word*) bsearch16u::items#2 ← phi( bsearch16u::@6/(word*) bsearch16u::items#6 ) - (byte) bsearch16u::num#4 ← phi( bsearch16u::@6/(byte) bsearch16u::num#3 ) - (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#4 >> (number) 1 - (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 * (const byte) SIZEOF_WORD - (word*~) bsearch16u::$7 ← (word*) bsearch16u::items#2 + (byte~) bsearch16u::$16 - (word*) bsearch16u::pivot#0 ← (word*~) bsearch16u::$7 - (signed word~) bsearch16u::$8 ← ((signed word)) (word) bsearch16u::key#1 - (signed word~) bsearch16u::$9 ← ((signed word)) *((word*) bsearch16u::pivot#0) - (signed word~) bsearch16u::$10 ← (signed word~) bsearch16u::$8 - (signed word~) bsearch16u::$9 - (signed word) bsearch16u::result#0 ← (signed word~) bsearch16u::$10 - (bool~) bsearch16u::$11 ← (signed word) bsearch16u::result#0 == (number) 0 - (bool~) bsearch16u::$12 ← ! (bool~) bsearch16u::$11 - if((bool~) bsearch16u::$12) goto bsearch16u::@9 - to:bsearch16u::@13 -bsearch16u::@8: scope:[bsearch16u] from bsearch16u::@6 - (word) bsearch16u::key#2 ← phi( bsearch16u::@6/(word) bsearch16u::key#3 ) - (word*) bsearch16u::items#3 ← phi( bsearch16u::@6/(word*) bsearch16u::items#6 ) - (bool~) bsearch16u::$0 ← *((word*) bsearch16u::items#3) <= (word) bsearch16u::key#2 - if((bool~) bsearch16u::$0) goto bsearch16u::@1 - to:bsearch16u::@2 -bsearch16u::@9: scope:[bsearch16u] from bsearch16u::@7 - (word) bsearch16u::key#7 ← phi( bsearch16u::@7/(word) bsearch16u::key#1 ) - (word*) bsearch16u::items#9 ← phi( bsearch16u::@7/(word*) bsearch16u::items#2 ) - (word*) bsearch16u::pivot#3 ← phi( bsearch16u::@7/(word*) bsearch16u::pivot#0 ) - (byte) bsearch16u::num#8 ← phi( bsearch16u::@7/(byte) bsearch16u::num#4 ) - (signed word) bsearch16u::result#1 ← phi( bsearch16u::@7/(signed word) bsearch16u::result#0 ) - (bool~) bsearch16u::$13 ← (signed word) bsearch16u::result#1 > (number) 0 - (bool~) bsearch16u::$14 ← ! (bool~) bsearch16u::$13 - if((bool~) bsearch16u::$14) goto bsearch16u::@10 - to:bsearch16u::@15 -bsearch16u::@13: scope:[bsearch16u] from bsearch16u::@7 - (word*) bsearch16u::pivot#1 ← phi( bsearch16u::@7/(word*) bsearch16u::pivot#0 ) - (word*) bsearch16u::return#0 ← (word*) bsearch16u::pivot#1 - to:bsearch16u::@return -bsearch16u::@return: scope:[bsearch16u] from bsearch16u::@13 bsearch16u::@3 - (word*) bsearch16u::return#4 ← phi( bsearch16u::@13/(word*) bsearch16u::return#0 bsearch16u::@3/(word*) bsearch16u::return#2 ) - (word*) bsearch16u::return#1 ← (word*) bsearch16u::return#4 +@6: scope:[] from @begin + (byte*) heap_head#11 ← phi( @begin/(byte*) heap_head#0 ) + (byte) CORDIC_ITERATIONS_16#0 ← (number) $f + (word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16#0 ← kickasm {{ .for (var i=0; i= (number) 0 + if((bool~) atan2_16::$0) goto atan2_16::@1 + to:atan2_16::@2 +atan2_16::@1: scope:[atan2_16] from atan2_16 + (signed word) atan2_16::x#5 ← phi( atan2_16/(signed word) atan2_16::x#9 ) + (signed word) atan2_16::y#2 ← phi( atan2_16/(signed word) atan2_16::y#1 ) + (signed word~) atan2_16::$3 ← (signed word) atan2_16::y#2 + to:atan2_16::@3 +atan2_16::@2: scope:[atan2_16] from atan2_16 + (signed word) atan2_16::x#6 ← phi( atan2_16/(signed word) atan2_16::x#9 ) + (signed word) atan2_16::y#3 ← phi( atan2_16/(signed word) atan2_16::y#1 ) + (signed word~) atan2_16::$1 ← - (signed word) atan2_16::y#3 + (signed word~) atan2_16::$2 ← (signed word~) atan2_16::$1 + to:atan2_16::@3 +atan2_16::@3: scope:[atan2_16] from atan2_16::@1 atan2_16::@2 + (signed word) atan2_16::y#15 ← phi( atan2_16::@1/(signed word) atan2_16::y#2 atan2_16::@2/(signed word) atan2_16::y#3 ) + (signed word) atan2_16::x#1 ← phi( atan2_16::@1/(signed word) atan2_16::x#5 atan2_16::@2/(signed word) atan2_16::x#6 ) + (signed word~) atan2_16::$4 ← phi( atan2_16::@1/(signed word~) atan2_16::$3 atan2_16::@2/(signed word~) atan2_16::$2 ) + (signed word) atan2_16::yi#0 ← (signed word~) atan2_16::$4 + (bool~) atan2_16::$5 ← (signed word) atan2_16::x#1 >= (number) 0 + if((bool~) atan2_16::$5) goto atan2_16::@4 + to:atan2_16::@5 +atan2_16::@4: scope:[atan2_16] from atan2_16::@3 + (signed word) atan2_16::y#12 ← phi( atan2_16::@3/(signed word) atan2_16::y#15 ) + (signed word) atan2_16::yi#12 ← phi( atan2_16::@3/(signed word) atan2_16::yi#0 ) + (signed word) atan2_16::x#2 ← phi( atan2_16::@3/(signed word) atan2_16::x#1 ) + (signed word~) atan2_16::$8 ← (signed word) atan2_16::x#2 + to:atan2_16::@6 +atan2_16::@5: scope:[atan2_16] from atan2_16::@3 + (signed word) atan2_16::y#13 ← phi( atan2_16::@3/(signed word) atan2_16::y#15 ) + (signed word) atan2_16::yi#13 ← phi( atan2_16::@3/(signed word) atan2_16::yi#0 ) + (signed word) atan2_16::x#3 ← phi( atan2_16::@3/(signed word) atan2_16::x#1 ) + (signed word~) atan2_16::$6 ← - (signed word) atan2_16::x#3 + (signed word~) atan2_16::$7 ← (signed word~) atan2_16::$6 + to:atan2_16::@6 +atan2_16::@6: scope:[atan2_16] from atan2_16::@4 atan2_16::@5 + (signed word) atan2_16::y#9 ← phi( atan2_16::@4/(signed word) atan2_16::y#12 atan2_16::@5/(signed word) atan2_16::y#13 ) + (signed word) atan2_16::x#10 ← phi( atan2_16::@4/(signed word) atan2_16::x#2 atan2_16::@5/(signed word) atan2_16::x#3 ) + (signed word) atan2_16::yi#9 ← phi( atan2_16::@4/(signed word) atan2_16::yi#12 atan2_16::@5/(signed word) atan2_16::yi#13 ) + (signed word~) atan2_16::$9 ← phi( atan2_16::@4/(signed word~) atan2_16::$8 atan2_16::@5/(signed word~) atan2_16::$7 ) + (signed word) atan2_16::xi#0 ← (signed word~) atan2_16::$9 + (word) atan2_16::angle#0 ← (number) 0 + (number~) atan2_16::$16 ← (byte) CORDIC_ITERATIONS_16#0 - (number) 1 + (byte) atan2_16::i#0 ← (byte) 0 + to:atan2_16::@15 +atan2_16::@15: scope:[atan2_16] from atan2_16::@27 atan2_16::@6 + (signed word) atan2_16::y#7 ← phi( atan2_16::@27/(signed word) atan2_16::y#8 atan2_16::@6/(signed word) atan2_16::y#9 ) + (signed word) atan2_16::x#7 ← phi( atan2_16::@27/(signed word) atan2_16::x#8 atan2_16::@6/(signed word) atan2_16::x#10 ) + (word) atan2_16::angle#12 ← phi( atan2_16::@27/(word) atan2_16::angle#13 atan2_16::@6/(word) atan2_16::angle#0 ) + (byte) atan2_16::i#6 ← phi( atan2_16::@27/(byte) atan2_16::i#1 atan2_16::@6/(byte) atan2_16::i#0 ) + (signed word) atan2_16::xi#6 ← phi( atan2_16::@27/(signed word) atan2_16::xi#8 atan2_16::@6/(signed word) atan2_16::xi#0 ) + (signed word) atan2_16::yi#3 ← phi( atan2_16::@27/(signed word) atan2_16::yi#8 atan2_16::@6/(signed word) atan2_16::yi#9 ) + (bool~) atan2_16::$17 ← (signed word) atan2_16::yi#3 == (number) 0 + (bool~) atan2_16::$18 ← ! (bool~) atan2_16::$17 + if((bool~) atan2_16::$18) goto atan2_16::@16 + to:atan2_16::@17 +atan2_16::@16: scope:[atan2_16] from atan2_16::@15 + (signed word) atan2_16::y#19 ← phi( atan2_16::@15/(signed word) atan2_16::y#7 ) + (signed word) atan2_16::x#17 ← phi( atan2_16::@15/(signed word) atan2_16::x#7 ) + (word) atan2_16::angle#19 ← phi( atan2_16::@15/(word) atan2_16::angle#12 ) + (byte) atan2_16::i#2 ← phi( atan2_16::@15/(byte) atan2_16::i#6 ) + (signed word) atan2_16::yi#4 ← phi( atan2_16::@15/(signed word) atan2_16::yi#3 ) + (signed word) atan2_16::xi#3 ← phi( atan2_16::@15/(signed word) atan2_16::xi#6 ) + (signed word) atan2_16::xd#0 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#0 ← (signed word) atan2_16::yi#4 + (byte) atan2_16::shift#0 ← (byte) atan2_16::i#2 + to:atan2_16::@18 +atan2_16::@17: scope:[atan2_16] from atan2_16::@15 atan2_16::@27 + (signed word) atan2_16::y#5 ← phi( atan2_16::@15/(signed word) atan2_16::y#7 atan2_16::@27/(signed word) atan2_16::y#8 ) + (signed word) atan2_16::x#4 ← phi( atan2_16::@15/(signed word) atan2_16::x#7 atan2_16::@27/(signed word) atan2_16::x#8 ) + (word) atan2_16::angle#6 ← phi( atan2_16::@15/(word) atan2_16::angle#12 atan2_16::@27/(word) atan2_16::angle#13 ) + (word) atan2_16::angle#1 ← (word) atan2_16::angle#6 / (number) 2 + (bool~) atan2_16::$10 ← (signed word) atan2_16::x#4 < (number) 0 + (bool~) atan2_16::$11 ← ! (bool~) atan2_16::$10 + if((bool~) atan2_16::$11) goto atan2_16::@7 + to:atan2_16::@33 +atan2_16::@18: scope:[atan2_16] from atan2_16::@16 atan2_16::@19 + (signed word) atan2_16::y#18 ← phi( atan2_16::@16/(signed word) atan2_16::y#19 atan2_16::@19/(signed word) atan2_16::y#20 ) + (signed word) atan2_16::x#16 ← phi( atan2_16::@16/(signed word) atan2_16::x#17 atan2_16::@19/(signed word) atan2_16::x#18 ) + (word) atan2_16::angle#18 ← phi( atan2_16::@16/(word) atan2_16::angle#19 atan2_16::@19/(word) atan2_16::angle#20 ) + (byte) atan2_16::i#10 ← phi( atan2_16::@16/(byte) atan2_16::i#2 atan2_16::@19/(byte) atan2_16::i#11 ) + (signed word) atan2_16::xi#11 ← phi( atan2_16::@16/(signed word) atan2_16::xi#3 atan2_16::@19/(signed word) atan2_16::xi#12 ) + (signed word) atan2_16::yi#14 ← phi( atan2_16::@16/(signed word) atan2_16::yi#4 atan2_16::@19/(signed word) atan2_16::yi#15 ) + (signed word) atan2_16::yd#7 ← phi( atan2_16::@16/(signed word) atan2_16::yd#0 atan2_16::@19/(signed word) atan2_16::yd#1 ) + (signed word) atan2_16::xd#7 ← phi( atan2_16::@16/(signed word) atan2_16::xd#0 atan2_16::@19/(signed word) atan2_16::xd#1 ) + (byte) atan2_16::shift#2 ← phi( atan2_16::@16/(byte) atan2_16::shift#0 atan2_16::@19/(byte) atan2_16::shift#1 ) + (bool~) atan2_16::$19 ← (byte) atan2_16::shift#2 >= (number) 2 + if((bool~) atan2_16::$19) goto atan2_16::@19 + to:atan2_16::@20 +atan2_16::@19: scope:[atan2_16] from atan2_16::@18 + (signed word) atan2_16::y#20 ← phi( atan2_16::@18/(signed word) atan2_16::y#18 ) + (signed word) atan2_16::x#18 ← phi( atan2_16::@18/(signed word) atan2_16::x#16 ) + (word) atan2_16::angle#20 ← phi( atan2_16::@18/(word) atan2_16::angle#18 ) + (byte) atan2_16::i#11 ← phi( atan2_16::@18/(byte) atan2_16::i#10 ) + (signed word) atan2_16::xi#12 ← phi( atan2_16::@18/(signed word) atan2_16::xi#11 ) + (signed word) atan2_16::yi#15 ← phi( atan2_16::@18/(signed word) atan2_16::yi#14 ) + (byte) atan2_16::shift#3 ← phi( atan2_16::@18/(byte) atan2_16::shift#2 ) + (signed word) atan2_16::yd#3 ← phi( atan2_16::@18/(signed word) atan2_16::yd#7 ) + (signed word) atan2_16::xd#3 ← phi( atan2_16::@18/(signed word) atan2_16::xd#7 ) + (signed word) atan2_16::xd#1 ← (signed word) atan2_16::xd#3 >> (number) 2 + (signed word) atan2_16::yd#1 ← (signed word) atan2_16::yd#3 >> (number) 2 + (byte) atan2_16::shift#1 ← (byte) atan2_16::shift#3 - (number) 2 + to:atan2_16::@18 +atan2_16::@20: scope:[atan2_16] from atan2_16::@18 + (signed word) atan2_16::y#16 ← phi( atan2_16::@18/(signed word) atan2_16::y#18 ) + (signed word) atan2_16::x#14 ← phi( atan2_16::@18/(signed word) atan2_16::x#16 ) + (word) atan2_16::angle#16 ← phi( atan2_16::@18/(word) atan2_16::angle#18 ) + (byte) atan2_16::i#8 ← phi( atan2_16::@18/(byte) atan2_16::i#10 ) + (signed word) atan2_16::xi#9 ← phi( atan2_16::@18/(signed word) atan2_16::xi#11 ) + (signed word) atan2_16::yd#8 ← phi( atan2_16::@18/(signed word) atan2_16::yd#7 ) + (signed word) atan2_16::xd#8 ← phi( atan2_16::@18/(signed word) atan2_16::xd#7 ) + (signed word) atan2_16::yi#10 ← phi( atan2_16::@18/(signed word) atan2_16::yi#14 ) + (byte) atan2_16::shift#4 ← phi( atan2_16::@18/(byte) atan2_16::shift#2 ) + (bool~) atan2_16::$25 ← (number) 0 != (byte) atan2_16::shift#4 + (bool~) atan2_16::$20 ← ! (bool~) atan2_16::$25 + if((bool~) atan2_16::$20) goto atan2_16::@25 + to:atan2_16::@24 +atan2_16::@25: scope:[atan2_16] from atan2_16::@20 atan2_16::@24 + (signed word) atan2_16::y#14 ← phi( atan2_16::@20/(signed word) atan2_16::y#16 atan2_16::@24/(signed word) atan2_16::y#17 ) + (signed word) atan2_16::x#13 ← phi( atan2_16::@20/(signed word) atan2_16::x#14 atan2_16::@24/(signed word) atan2_16::x#15 ) + (word) atan2_16::angle#14 ← phi( atan2_16::@20/(word) atan2_16::angle#16 atan2_16::@24/(word) atan2_16::angle#17 ) + (byte) atan2_16::i#7 ← phi( atan2_16::@20/(byte) atan2_16::i#8 atan2_16::@24/(byte) atan2_16::i#9 ) + (signed word) atan2_16::xd#9 ← phi( atan2_16::@20/(signed word) atan2_16::xd#8 atan2_16::@24/(signed word) atan2_16::xd#2 ) + (signed word) atan2_16::yd#9 ← phi( atan2_16::@20/(signed word) atan2_16::yd#8 atan2_16::@24/(signed word) atan2_16::yd#2 ) + (signed word) atan2_16::xi#7 ← phi( atan2_16::@20/(signed word) atan2_16::xi#9 atan2_16::@24/(signed word) atan2_16::xi#10 ) + (signed word) atan2_16::yi#5 ← phi( atan2_16::@20/(signed word) atan2_16::yi#10 atan2_16::@24/(signed word) atan2_16::yi#11 ) + (bool~) atan2_16::$21 ← (signed word) atan2_16::yi#5 >= (number) 0 + if((bool~) atan2_16::$21) goto atan2_16::@26 + to:atan2_16::@30 +atan2_16::@24: scope:[atan2_16] from atan2_16::@20 + (signed word) atan2_16::y#17 ← phi( atan2_16::@20/(signed word) atan2_16::y#16 ) + (signed word) atan2_16::x#15 ← phi( atan2_16::@20/(signed word) atan2_16::x#14 ) + (word) atan2_16::angle#17 ← phi( atan2_16::@20/(word) atan2_16::angle#16 ) + (byte) atan2_16::i#9 ← phi( atan2_16::@20/(byte) atan2_16::i#8 ) + (signed word) atan2_16::xi#10 ← phi( atan2_16::@20/(signed word) atan2_16::xi#9 ) + (signed word) atan2_16::yi#11 ← phi( atan2_16::@20/(signed word) atan2_16::yi#10 ) + (signed word) atan2_16::yd#4 ← phi( atan2_16::@20/(signed word) atan2_16::yd#8 ) + (signed word) atan2_16::xd#4 ← phi( atan2_16::@20/(signed word) atan2_16::xd#8 ) + (signed word) atan2_16::xd#2 ← (signed word) atan2_16::xd#4 >> (number) 1 + (signed word) atan2_16::yd#2 ← (signed word) atan2_16::yd#4 >> (number) 1 + to:atan2_16::@25 +atan2_16::@26: scope:[atan2_16] from atan2_16::@25 + (signed word) atan2_16::y#10 ← phi( atan2_16::@25/(signed word) atan2_16::y#14 ) + (signed word) atan2_16::x#11 ← phi( atan2_16::@25/(signed word) atan2_16::x#13 ) + (word) atan2_16::angle#7 ← phi( atan2_16::@25/(word) atan2_16::angle#14 ) + (byte) atan2_16::i#3 ← phi( atan2_16::@25/(byte) atan2_16::i#7 ) + (signed word) atan2_16::xd#5 ← phi( atan2_16::@25/(signed word) atan2_16::xd#9 ) + (signed word) atan2_16::yi#6 ← phi( atan2_16::@25/(signed word) atan2_16::yi#5 ) + (signed word) atan2_16::yd#5 ← phi( atan2_16::@25/(signed word) atan2_16::yd#9 ) + (signed word) atan2_16::xi#4 ← phi( atan2_16::@25/(signed word) atan2_16::xi#7 ) + (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#4 + (signed word) atan2_16::yd#5 + (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#6 - (signed word) atan2_16::xd#5 + (byte~) atan2_16::$23 ← (byte) atan2_16::i#3 * (const byte) SIZEOF_WORD + (word) atan2_16::angle#2 ← (word) atan2_16::angle#7 + *((word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16#0 + (byte~) atan2_16::$23) + to:atan2_16::@27 +atan2_16::@30: scope:[atan2_16] from atan2_16::@25 + (signed word) atan2_16::y#11 ← phi( atan2_16::@25/(signed word) atan2_16::y#14 ) + (signed word) atan2_16::x#12 ← phi( atan2_16::@25/(signed word) atan2_16::x#13 ) + (word) atan2_16::angle#8 ← phi( atan2_16::@25/(word) atan2_16::angle#14 ) + (byte) atan2_16::i#4 ← phi( atan2_16::@25/(byte) atan2_16::i#7 ) + (signed word) atan2_16::xd#6 ← phi( atan2_16::@25/(signed word) atan2_16::xd#9 ) + (signed word) atan2_16::yi#7 ← phi( atan2_16::@25/(signed word) atan2_16::yi#5 ) + (signed word) atan2_16::yd#6 ← phi( atan2_16::@25/(signed word) atan2_16::yd#9 ) + (signed word) atan2_16::xi#5 ← phi( atan2_16::@25/(signed word) atan2_16::xi#7 ) + (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#5 - (signed word) atan2_16::yd#6 + (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#7 + (signed word) atan2_16::xd#6 + (byte~) atan2_16::$24 ← (byte) atan2_16::i#4 * (const byte) SIZEOF_WORD + (word) atan2_16::angle#3 ← (word) atan2_16::angle#8 - *((word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16#0 + (byte~) atan2_16::$24) + to:atan2_16::@27 +atan2_16::@27: scope:[atan2_16] from atan2_16::@26 atan2_16::@30 + (signed word) atan2_16::y#8 ← phi( atan2_16::@26/(signed word) atan2_16::y#10 atan2_16::@30/(signed word) atan2_16::y#11 ) + (signed word) atan2_16::xi#8 ← phi( atan2_16::@26/(signed word) atan2_16::xi#1 atan2_16::@30/(signed word) atan2_16::xi#2 ) + (signed word) atan2_16::x#8 ← phi( atan2_16::@26/(signed word) atan2_16::x#11 atan2_16::@30/(signed word) atan2_16::x#12 ) + (word) atan2_16::angle#13 ← phi( atan2_16::@26/(word) atan2_16::angle#2 atan2_16::@30/(word) atan2_16::angle#3 ) + (signed word) atan2_16::yi#8 ← phi( atan2_16::@26/(signed word) atan2_16::yi#1 atan2_16::@30/(signed word) atan2_16::yi#2 ) + (byte) atan2_16::i#5 ← phi( atan2_16::@26/(byte) atan2_16::i#3 atan2_16::@30/(byte) atan2_16::i#4 ) + (byte) atan2_16::i#1 ← (byte) atan2_16::i#5 + rangenext(0,atan2_16::$16) + (bool~) atan2_16::$22 ← (byte) atan2_16::i#1 != rangelast(0,atan2_16::$16) + if((bool~) atan2_16::$22) goto atan2_16::@15 + to:atan2_16::@17 +atan2_16::@7: scope:[atan2_16] from atan2_16::@17 atan2_16::@33 + (word) atan2_16::angle#15 ← phi( atan2_16::@17/(word) atan2_16::angle#1 atan2_16::@33/(word) atan2_16::angle#4 ) + (signed word) atan2_16::y#4 ← phi( atan2_16::@17/(signed word) atan2_16::y#5 atan2_16::@33/(signed word) atan2_16::y#6 ) + (bool~) atan2_16::$13 ← (signed word) atan2_16::y#4 < (number) 0 + (bool~) atan2_16::$14 ← ! (bool~) atan2_16::$13 + if((bool~) atan2_16::$14) goto atan2_16::@8 + to:atan2_16::@13 +atan2_16::@33: scope:[atan2_16] from atan2_16::@17 + (signed word) atan2_16::y#6 ← phi( atan2_16::@17/(signed word) atan2_16::y#5 ) + (word) atan2_16::angle#9 ← phi( atan2_16::@17/(word) atan2_16::angle#1 ) + (number~) atan2_16::$12 ← (number) $8000 - (word) atan2_16::angle#9 + (word) atan2_16::angle#4 ← (number~) atan2_16::$12 + to:atan2_16::@7 +atan2_16::@8: scope:[atan2_16] from atan2_16::@13 atan2_16::@7 + (word) atan2_16::angle#10 ← phi( atan2_16::@13/(word) atan2_16::angle#5 atan2_16::@7/(word) atan2_16::angle#15 ) + (word) atan2_16::return#0 ← (word) atan2_16::angle#10 + to:atan2_16::@return +atan2_16::@13: scope:[atan2_16] from atan2_16::@7 + (word) atan2_16::angle#11 ← phi( atan2_16::@7/(word) atan2_16::angle#15 ) + (word~) atan2_16::$15 ← - (word) atan2_16::angle#11 + (word) atan2_16::angle#5 ← (word~) atan2_16::$15 + to:atan2_16::@8 +atan2_16::@return: scope:[atan2_16] from atan2_16::@8 + (word) atan2_16::return#3 ← phi( atan2_16::@8/(word) atan2_16::return#0 ) + (word) atan2_16::return#1 ← (word) atan2_16::return#3 return to:@return -bsearch16u::@10: scope:[bsearch16u] from bsearch16u::@15 bsearch16u::@9 - (word) bsearch16u::key#5 ← phi( bsearch16u::@15/(word) bsearch16u::key#6 bsearch16u::@9/(word) bsearch16u::key#7 ) - (word*) bsearch16u::items#8 ← phi( bsearch16u::@15/(word*) bsearch16u::items#0 bsearch16u::@9/(word*) bsearch16u::items#9 ) - (byte) bsearch16u::num#5 ← phi( bsearch16u::@15/(byte) bsearch16u::num#1 bsearch16u::@9/(byte) bsearch16u::num#8 ) - (byte) bsearch16u::num#0 ← (byte) bsearch16u::num#5 >> (number) 1 - to:bsearch16u::@6 -bsearch16u::@15: scope:[bsearch16u] from bsearch16u::@9 - (word) bsearch16u::key#6 ← phi( bsearch16u::@9/(word) bsearch16u::key#7 ) - (byte) bsearch16u::num#6 ← phi( bsearch16u::@9/(byte) bsearch16u::num#8 ) - (word*) bsearch16u::pivot#2 ← phi( bsearch16u::@9/(word*) bsearch16u::pivot#3 ) - (number~) bsearch16u::$17 ← (number) 1 * (const byte) SIZEOF_WORD - (word*~) bsearch16u::$15 ← (word*) bsearch16u::pivot#2 + (number~) bsearch16u::$17 - (word*) bsearch16u::items#0 ← (word*~) bsearch16u::$15 - (byte) bsearch16u::num#1 ← -- (byte) bsearch16u::num#6 - to:bsearch16u::@10 -bsearch16u::@1: scope:[bsearch16u] from bsearch16u::@8 - (word*) bsearch16u::items#4 ← phi( bsearch16u::@8/(word*) bsearch16u::items#3 ) - (word*~) bsearch16u::$3 ← (word*) bsearch16u::items#4 - to:bsearch16u::@3 -bsearch16u::@2: scope:[bsearch16u] from bsearch16u::@8 - (word*) bsearch16u::items#5 ← phi( bsearch16u::@8/(word*) bsearch16u::items#3 ) - (number~) bsearch16u::$18 ← (number) 1 * (const byte) SIZEOF_WORD - (word*~) bsearch16u::$1 ← (word*) bsearch16u::items#5 - (number~) bsearch16u::$18 - (word*~) bsearch16u::$2 ← (word*~) bsearch16u::$1 - to:bsearch16u::@3 -bsearch16u::@3: scope:[bsearch16u] from bsearch16u::@1 bsearch16u::@2 - (word*~) bsearch16u::$4 ← phi( bsearch16u::@1/(word*~) bsearch16u::$3 bsearch16u::@2/(word*~) bsearch16u::$2 ) - (word*) bsearch16u::return#2 ← (word*~) bsearch16u::$4 - to:bsearch16u::@return -@3: scope:[] from @begin - (byte*) heap_head#35 ← phi( @begin/(byte*) heap_head#0 ) - (byte) NUM_SQUARES#0 ← (number) $ff - (word*) SQUARES#0 ← (word*) 0 - to:@11 -init_squares: scope:[init_squares] from init_dist_screen - (byte*) heap_head#24 ← phi( init_dist_screen/(byte*) heap_head#28 ) - (byte) NUM_SQUARES#6 ← phi( init_dist_screen/(byte) NUM_SQUARES#3 ) - (byte~) init_squares::$0 ← (byte) NUM_SQUARES#6 * (const byte) SIZEOF_WORD - (word) malloc::size#0 ← (byte~) init_squares::$0 - call malloc - (void*) malloc::return#2 ← (void*) malloc::return#1 - to:init_squares::@3 -init_squares::@3: scope:[init_squares] from init_squares - (byte) NUM_SQUARES#7 ← phi( init_squares/(byte) NUM_SQUARES#6 ) - (byte*) heap_head#14 ← phi( init_squares/(byte*) heap_head#2 ) - (void*) malloc::return#6 ← phi( init_squares/(void*) malloc::return#2 ) - (void*~) init_squares::$1 ← (void*) malloc::return#6 - (byte*) heap_head#3 ← (byte*) heap_head#14 - (word*) SQUARES#1 ← ((word*)) (void*~) init_squares::$1 - (word*) init_squares::squares#0 ← (word*) SQUARES#1 - (word) init_squares::sqr#0 ← (number) 0 - (number~) init_squares::$2 ← (byte) NUM_SQUARES#7 - (number) 1 - (byte) init_squares::i#0 ← (byte) 0 - to:init_squares::@1 -init_squares::@1: scope:[init_squares] from init_squares::@1 init_squares::@3 - (word*) SQUARES#17 ← phi( init_squares::@1/(word*) SQUARES#17 init_squares::@3/(word*) SQUARES#1 ) - (byte*) heap_head#25 ← phi( init_squares::@1/(byte*) heap_head#25 init_squares::@3/(byte*) heap_head#3 ) - (byte) init_squares::i#2 ← phi( init_squares::@1/(byte) init_squares::i#1 init_squares::@3/(byte) init_squares::i#0 ) - (word*) init_squares::squares#2 ← phi( init_squares::@1/(word*) init_squares::squares#1 init_squares::@3/(word*) init_squares::squares#0 ) - (word) init_squares::sqr#2 ← phi( init_squares::@1/(word) init_squares::sqr#1 init_squares::@3/(word) init_squares::sqr#0 ) - *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 - (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD - (number~) init_squares::$3 ← (byte) init_squares::i#2 * (number) 2 - (number~) init_squares::$4 ← (number~) init_squares::$3 + (number) 1 - (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (number~) init_squares::$4 - (byte) init_squares::i#1 ← (byte) init_squares::i#2 + rangenext(0,init_squares::$2) - (bool~) init_squares::$5 ← (byte) init_squares::i#1 != rangelast(0,init_squares::$2) - if((bool~) init_squares::$5) goto init_squares::@1 - to:init_squares::@return -init_squares::@return: scope:[init_squares] from init_squares::@1 - (word*) SQUARES#8 ← phi( init_squares::@1/(word*) SQUARES#17 ) - (byte*) heap_head#15 ← phi( init_squares::@1/(byte*) heap_head#25 ) - (byte*) heap_head#4 ← (byte*) heap_head#15 - (word*) SQUARES#2 ← (word*) SQUARES#8 - return - to:@return -sqr: scope:[sqr] from init_dist_screen::@4 init_dist_screen::@8 - (word*) SQUARES#9 ← phi( init_dist_screen::@4/(word*) SQUARES#18 init_dist_screen::@8/(word*) SQUARES#19 ) - (byte) sqr::val#2 ← phi( init_dist_screen::@4/(byte) sqr::val#0 init_dist_screen::@8/(byte) sqr::val#1 ) - (byte~) sqr::$0 ← (byte) sqr::val#2 * (const byte) SIZEOF_WORD - (word) sqr::return#0 ← *((word*) SQUARES#9 + (byte~) sqr::$0) - to:sqr::@return -sqr::@return: scope:[sqr] from sqr - (word) sqr::return#4 ← phi( sqr/(word) sqr::return#0 ) - (word) sqr::return#1 ← (word) sqr::return#4 - return - to:@return -sqrt: scope:[sqrt] from init_dist_screen::@17 - (byte) NUM_SQUARES#8 ← phi( init_dist_screen::@17/(byte) NUM_SQUARES#13 ) - (word*) SQUARES#10 ← phi( init_dist_screen::@17/(word*) SQUARES#20 ) - (word) sqrt::val#1 ← phi( init_dist_screen::@17/(word) sqrt::val#0 ) - (word) bsearch16u::key#0 ← (word) sqrt::val#1 - (word*) bsearch16u::items#1 ← (word*) SQUARES#10 - (byte) bsearch16u::num#2 ← (byte) NUM_SQUARES#8 - call bsearch16u - (word*) bsearch16u::return#3 ← (word*) bsearch16u::return#1 - to:sqrt::@2 -sqrt::@2: scope:[sqrt] from sqrt - (word*) SQUARES#11 ← phi( sqrt/(word*) SQUARES#10 ) - (word*) bsearch16u::return#5 ← phi( sqrt/(word*) bsearch16u::return#3 ) - (word*~) sqrt::$0 ← (word*) bsearch16u::return#5 - (word*) sqrt::found#0 ← (word*~) sqrt::$0 - (word~) sqrt::$3 ← (word*) sqrt::found#0 - (word*) SQUARES#11 - (word~) sqrt::$1 ← (word~) sqrt::$3 / (const byte) SIZEOF_WORD - (byte~) sqrt::$2 ← ((byte)) (word~) sqrt::$1 - (byte) sqrt::sq#0 ← (byte~) sqrt::$2 - (byte) sqrt::return#0 ← (byte) sqrt::sq#0 - to:sqrt::@return -sqrt::@return: scope:[sqrt] from sqrt::@2 - (byte) sqrt::return#3 ← phi( sqrt::@2/(byte) sqrt::return#0 ) - (byte) sqrt::return#1 ← (byte) sqrt::return#3 - return - to:@return -@11: scope:[] from @3 - (word*) SQUARES#48 ← phi( @3/(word*) SQUARES#0 ) - (byte) NUM_SQUARES#41 ← phi( @3/(byte) NUM_SQUARES#0 ) - (byte*) heap_head#31 ← phi( @3/(byte*) heap_head#35 ) +@13: scope:[] from @6 + (byte*) heap_head#10 ← phi( @6/(byte*) heap_head#11 ) (byte*) PROCPORT_DDR#0 ← ((byte*)) (number) 0 (byte) PROCPORT_DDR_MEMORY_MASK#0 ← (number) 7 (byte*) PROCPORT#0 ← ((byte*)) (number) 1 @@ -382,11 +435,9 @@ sqrt::@return: scope:[sqrt] from sqrt::@2 (byte) WHITE#0 ← (number) 1 (byte) BLUE#0 ← (number) 6 (byte) LIGHT_BLUE#0 ← (number) $e - to:@15 -@15: scope:[] from @11 - (word*) SQUARES#46 ← phi( @11/(word*) SQUARES#48 ) - (byte) NUM_SQUARES#37 ← phi( @11/(byte) NUM_SQUARES#41 ) - (byte*) heap_head#23 ← phi( @11/(byte*) heap_head#31 ) + to:@17 +@17: scope:[] from @13 + (byte*) heap_head#9 ← phi( @13/(byte*) heap_head#10 ) (bool) DEBUG#0 ← false (byte*) SCREEN#0 ← ((byte*)) (number) $400 (byte*) SPRITE_DATA#0 ← ((byte*)) (number) $2000 @@ -398,60 +449,44 @@ sqrt::@return: scope:[sqrt] from sqrt::@2 .word -sin(toRadians([i*360]/25))*4 } }} + (word) malloc::size#0 ← (number) $3e8 + call malloc + (void*) malloc::return#2 ← (void*) malloc::return#1 + to:@28 +@28: scope:[] from @17 + (byte*) heap_head#7 ← phi( @17/(byte*) heap_head#2 ) + (void*) malloc::return#5 ← phi( @17/(void*) malloc::return#2 ) + (void*~) $0 ← (void*) malloc::return#5 + (byte*) heap_head#3 ← (byte*) heap_head#7 + (byte*) SCREEN_COPY#0 ← ((byte*)) (void*~) $0 (word) malloc::size#1 ← (number) $3e8 call malloc (void*) malloc::return#3 ← (void*) malloc::return#1 - to:@25 -@25: scope:[] from @15 - (word*) SQUARES#44 ← phi( @15/(word*) SQUARES#46 ) - (byte) NUM_SQUARES#34 ← phi( @15/(byte) NUM_SQUARES#37 ) - (byte*) heap_head#16 ← phi( @15/(byte*) heap_head#2 ) - (void*) malloc::return#7 ← phi( @15/(void*) malloc::return#3 ) - (void*~) $0 ← (void*) malloc::return#7 - (byte*) heap_head#5 ← (byte*) heap_head#16 - (byte*) SCREEN_COPY#0 ← ((byte*)) (void*~) $0 - (word) malloc::size#2 ← (number) $3e8 - call malloc - (void*) malloc::return#4 ← (void*) malloc::return#1 - to:@26 -@26: scope:[] from @25 - (byte*) SCREEN_COPY#25 ← phi( @25/(byte*) SCREEN_COPY#0 ) - (word*) SQUARES#43 ← phi( @25/(word*) SQUARES#44 ) - (byte) NUM_SQUARES#32 ← phi( @25/(byte) NUM_SQUARES#34 ) - (byte*) heap_head#17 ← phi( @25/(byte*) heap_head#2 ) - (void*) malloc::return#8 ← phi( @25/(void*) malloc::return#4 ) - (void*~) $1 ← (void*) malloc::return#8 - (byte*) heap_head#6 ← (byte*) heap_head#17 + to:@29 +@29: scope:[] from @28 + (byte*) SCREEN_COPY#25 ← phi( @28/(byte*) SCREEN_COPY#0 ) + (byte*) heap_head#8 ← phi( @28/(byte*) heap_head#2 ) + (void*) malloc::return#6 ← phi( @28/(void*) malloc::return#3 ) + (void*~) $1 ← (void*) malloc::return#6 + (byte*) heap_head#4 ← (byte*) heap_head#8 (byte*) SCREEN_DIST#0 ← ((byte*)) (void*~) $1 (byte) NUM_PROCESSING#0 ← (number) 8 (byte) NOT_FOUND#0 ← (number) $ff (struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 ← { fill( NUM_PROCESSING#0, 0) } - to:@18 -main: scope:[main] from @24 - (byte*) SCREEN_COPY#4 ← phi( @24/(byte*) SCREEN_COPY#7 ) - (word*) SQUARES#21 ← phi( @24/(word*) SQUARES#25 ) - (byte*) heap_head#26 ← phi( @24/(byte*) heap_head#30 ) - (byte) NUM_SQUARES#14 ← phi( @24/(byte) NUM_SQUARES#17 ) - (byte*) SCREEN_DIST#1 ← phi( @24/(byte*) SCREEN_DIST#3 ) - (byte*) init_dist_screen::screen#0 ← (byte*) SCREEN_DIST#1 - call init_dist_screen + to:@20 +main: scope:[main] from @27 + (byte*) SCREEN_COPY#4 ← phi( @27/(byte*) SCREEN_COPY#7 ) + (byte*) SCREEN_DIST#1 ← phi( @27/(byte*) SCREEN_DIST#3 ) + (byte*) init_angle_screen::screen#0 ← (byte*) SCREEN_DIST#1 + call init_angle_screen to:main::@13 main::@13: scope:[main] from main (byte*) SCREEN_DIST#17 ← phi( main/(byte*) SCREEN_DIST#1 ) (byte*) SCREEN_COPY#1 ← phi( main/(byte*) SCREEN_COPY#4 ) - (word*) SQUARES#12 ← phi( main/(word*) SQUARES#6 ) - (byte*) heap_head#18 ← phi( main/(byte*) heap_head#10 ) - (byte) NUM_SQUARES#9 ← phi( main/(byte) NUM_SQUARES#4 ) - (byte) NUM_SQUARES#1 ← (byte) NUM_SQUARES#9 - (byte*) heap_head#7 ← (byte*) heap_head#18 - (word*) SQUARES#3 ← (word*) SQUARES#12 (byte*) main::src#0 ← (byte*) SCREEN#0 (byte*) main::dst#0 ← (byte*) SCREEN_COPY#1 to:main::@1 main::@1: scope:[main] from main::@1 main::@13 - (word*) SQUARES#51 ← phi( main::@1/(word*) SQUARES#51 main::@13/(word*) SQUARES#3 ) - (byte*) heap_head#56 ← phi( main::@1/(byte*) heap_head#56 main::@13/(byte*) heap_head#7 ) - (byte) NUM_SQUARES#46 ← phi( main::@1/(byte) NUM_SQUARES#46 main::@13/(byte) NUM_SQUARES#1 ) (byte*) SCREEN_DIST#16 ← phi( main::@1/(byte*) SCREEN_DIST#16 main::@13/(byte*) SCREEN_DIST#17 ) (byte*) SCREEN_COPY#26 ← phi( main::@1/(byte*) SCREEN_COPY#26 main::@13/(byte*) SCREEN_COPY#1 ) (byte*) main::dst#2 ← phi( main::@1/(byte*) main::dst#1 main::@13/(byte*) main::dst#0 ) @@ -464,18 +499,12 @@ main::@1: scope:[main] from main::@1 main::@13 if((bool~) main::$6) goto main::@1 to:main::@2 main::@2: scope:[main] from main::@1 - (word*) SQUARES#50 ← phi( main::@1/(word*) SQUARES#51 ) - (byte*) heap_head#53 ← phi( main::@1/(byte*) heap_head#56 ) - (byte) NUM_SQUARES#44 ← phi( main::@1/(byte) NUM_SQUARES#46 ) (byte*) SCREEN_DIST#15 ← phi( main::@1/(byte*) SCREEN_DIST#16 ) (byte*) SCREEN_COPY#24 ← phi( main::@1/(byte*) SCREEN_COPY#26 ) (number~) main::$7 ← (byte) NUM_PROCESSING#0 - (number) 1 (byte) main::i#0 ← (byte) 0 to:main::@3 main::@3: scope:[main] from main::@2 main::@3 - (word*) SQUARES#49 ← phi( main::@2/(word*) SQUARES#50 main::@3/(word*) SQUARES#49 ) - (byte*) heap_head#51 ← phi( main::@2/(byte*) heap_head#53 main::@3/(byte*) heap_head#51 ) - (byte) NUM_SQUARES#42 ← phi( main::@2/(byte) NUM_SQUARES#44 main::@3/(byte) NUM_SQUARES#42 ) (byte*) SCREEN_DIST#14 ← phi( main::@2/(byte*) SCREEN_DIST#15 main::@3/(byte*) SCREEN_DIST#14 ) (byte*) SCREEN_COPY#21 ← phi( main::@2/(byte*) SCREEN_COPY#24 main::@3/(byte*) SCREEN_COPY#21 ) (byte) main::i#2 ← phi( main::@2/(byte) main::i#0 main::@3/(byte) main::i#1 ) @@ -503,17 +532,11 @@ main::@3: scope:[main] from main::@2 main::@3 if((bool~) main::$8) goto main::@3 to:main::@4 main::@4: scope:[main] from main::@3 - (word*) SQUARES#47 ← phi( main::@3/(word*) SQUARES#49 ) - (byte*) heap_head#49 ← phi( main::@3/(byte*) heap_head#51 ) - (byte) NUM_SQUARES#38 ← phi( main::@3/(byte) NUM_SQUARES#42 ) (byte*) SCREEN_DIST#11 ← phi( main::@3/(byte*) SCREEN_DIST#14 ) (byte*) SCREEN_COPY#15 ← phi( main::@3/(byte*) SCREEN_COPY#21 ) call initSprites to:main::@14 main::@14: scope:[main] from main::@4 - (word*) SQUARES#45 ← phi( main::@4/(word*) SQUARES#47 ) - (byte*) heap_head#47 ← phi( main::@4/(byte*) heap_head#49 ) - (byte) NUM_SQUARES#35 ← phi( main::@4/(byte) NUM_SQUARES#38 ) (byte*) SCREEN_DIST#8 ← phi( main::@4/(byte*) SCREEN_DIST#11 ) (byte*) SCREEN_COPY#11 ← phi( main::@4/(byte*) SCREEN_COPY#15 ) (void()*~) main::$2 ← & interrupt(HARDWARE_ALL)(void()) irqTop() @@ -522,16 +545,10 @@ main::@14: scope:[main] from main::@4 call setupRasterIrq to:main::@15 main::@15: scope:[main] from main::@14 - (word*) SQUARES#42 ← phi( main::@14/(word*) SQUARES#45 ) - (byte*) heap_head#44 ← phi( main::@14/(byte*) heap_head#47 ) - (byte) NUM_SQUARES#31 ← phi( main::@14/(byte) NUM_SQUARES#35 ) (byte*) SCREEN_DIST#5 ← phi( main::@14/(byte*) SCREEN_DIST#8 ) (byte*) SCREEN_COPY#8 ← phi( main::@14/(byte*) SCREEN_COPY#11 ) to:main::@5 main::@5: scope:[main] from main::@15 main::@17 - (word*) SQUARES#38 ← phi( main::@15/(word*) SQUARES#42 main::@17/(word*) SQUARES#34 ) - (byte*) heap_head#40 ← phi( main::@15/(byte*) heap_head#44 main::@17/(byte*) heap_head#37 ) - (byte) NUM_SQUARES#27 ← phi( main::@15/(byte) NUM_SQUARES#31 main::@17/(byte) NUM_SQUARES#23 ) (byte*) SCREEN_DIST#4 ← phi( main::@15/(byte*) SCREEN_DIST#5 main::@17/(byte*) SCREEN_DIST#6 ) (byte*) SCREEN_COPY#5 ← phi( main::@15/(byte*) SCREEN_COPY#8 main::@17/(byte*) SCREEN_COPY#9 ) call getCharToProcess @@ -542,9 +559,6 @@ main::@5: scope:[main] from main::@15 main::@17 main::@16: scope:[main] from main::@5 (byte*) SCREEN_DIST#12 ← phi( main::@5/(byte*) SCREEN_DIST#4 ) (byte*) SCREEN_COPY#16 ← phi( main::@5/(byte*) SCREEN_COPY#5 ) - (word*) SQUARES#33 ← phi( main::@5/(word*) SQUARES#38 ) - (byte*) heap_head#36 ← phi( main::@5/(byte*) heap_head#40 ) - (byte) NUM_SQUARES#22 ← phi( main::@5/(byte) NUM_SQUARES#27 ) (byte) getCharToProcess::return_dist#3 ← phi( main::@5/(byte) getCharToProcess::return_dist#0 ) (byte) getCharToProcess::return_y#3 ← phi( main::@5/(byte) getCharToProcess::return_y#0 ) (byte) getCharToProcess::return_x#3 ← phi( main::@5/(byte) getCharToProcess::return_x#0 ) @@ -559,9 +573,6 @@ main::@16: scope:[main] from main::@5 if((bool~) main::$11) goto main::@6 to:main::@7 main::@6: scope:[main] from main::@16 - (word*) SQUARES#39 ← phi( main::@16/(word*) SQUARES#33 ) - (byte*) heap_head#41 ← phi( main::@16/(byte*) heap_head#36 ) - (byte) NUM_SQUARES#28 ← phi( main::@16/(byte) NUM_SQUARES#22 ) (byte*) SCREEN_DIST#9 ← phi( main::@16/(byte*) SCREEN_DIST#12 ) (byte*) SCREEN_COPY#12 ← phi( main::@16/(byte*) SCREEN_COPY#16 ) (byte) main::center_dist#1 ← phi( main::@16/(byte) main::center_dist#0 ) @@ -573,35 +584,20 @@ main::@6: scope:[main] from main::@16 call startProcessing to:main::@17 main::@17: scope:[main] from main::@6 - (word*) SQUARES#34 ← phi( main::@6/(word*) SQUARES#39 ) - (byte*) heap_head#37 ← phi( main::@6/(byte*) heap_head#41 ) - (byte) NUM_SQUARES#23 ← phi( main::@6/(byte) NUM_SQUARES#28 ) (byte*) SCREEN_DIST#6 ← phi( main::@6/(byte*) SCREEN_DIST#9 ) (byte*) SCREEN_COPY#9 ← phi( main::@6/(byte*) SCREEN_COPY#12 ) if(true) goto main::@5 to:main::@7 main::@7: scope:[main] from main::@16 main::@17 - (word*) SQUARES#26 ← phi( main::@16/(word*) SQUARES#33 main::@17/(word*) SQUARES#34 ) - (byte*) heap_head#32 ← phi( main::@16/(byte*) heap_head#36 main::@17/(byte*) heap_head#37 ) - (byte) NUM_SQUARES#18 ← phi( main::@16/(byte) NUM_SQUARES#22 main::@17/(byte) NUM_SQUARES#23 ) (byte*~) main::$4 ← (byte*) SCREEN#0 + (number) $3e7 *((byte*~) main::$4) ← (byte) '.' to:main::@11 main::@11: scope:[main] from main::@11 main::@7 - (word*) SQUARES#22 ← phi( main::@11/(word*) SQUARES#22 main::@7/(word*) SQUARES#26 ) - (byte*) heap_head#27 ← phi( main::@11/(byte*) heap_head#27 main::@7/(byte*) heap_head#32 ) - (byte) NUM_SQUARES#15 ← phi( main::@11/(byte) NUM_SQUARES#15 main::@7/(byte) NUM_SQUARES#18 ) (byte*~) main::$15 ← (byte*) COLS#0 + (number) $3e7 *((byte*~) main::$15) ← ++ *((byte*~) main::$15) if(true) goto main::@11 to:main::@return main::@return: scope:[main] from main::@11 - (word*) SQUARES#13 ← phi( main::@11/(word*) SQUARES#22 ) - (byte*) heap_head#19 ← phi( main::@11/(byte*) heap_head#27 ) - (byte) NUM_SQUARES#10 ← phi( main::@11/(byte) NUM_SQUARES#15 ) - (byte) NUM_SQUARES#2 ← (byte) NUM_SQUARES#10 - (byte*) heap_head#8 ← (byte*) heap_head#19 - (word*) SQUARES#4 ← (word*) SQUARES#13 return to:@return getCharToProcess: scope:[getCharToProcess] from main::@5 @@ -863,12 +859,9 @@ startProcessing::@10: scope:[startProcessing] from startProcessing::@9 startProcessing::@return: scope:[startProcessing] from startProcessing::@10 return to:@return -@18: scope:[] from @26 - (byte*) SCREEN_COPY#23 ← phi( @26/(byte*) SCREEN_COPY#25 ) - (word*) SQUARES#41 ← phi( @26/(word*) SQUARES#43 ) - (byte*) heap_head#43 ← phi( @26/(byte*) heap_head#6 ) - (byte) NUM_SQUARES#30 ← phi( @26/(byte) NUM_SQUARES#32 ) - (byte*) SCREEN_DIST#13 ← phi( @26/(byte*) SCREEN_DIST#0 ) +@20: scope:[] from @29 + (byte*) SCREEN_COPY#23 ← phi( @29/(byte*) SCREEN_COPY#25 ) + (byte*) SCREEN_DIST#13 ← phi( @29/(byte*) SCREEN_DIST#0 ) (number~) $2 ← (byte) BORDER_XPOS_LEFT#0 - (number) 8 (word~) $3 ← ((word)) (number~) $2 (word~) $4 ← (word~) $3 << (number) 4 @@ -883,7 +876,7 @@ startProcessing::@return: scope:[startProcessing] from startProcessing::@10 (word~) $10 ← ((word)) (byte) BORDER_YPOS_BOTTOM#0 (word~) $11 ← (word~) $10 << (number) 4 (word) YPOS_BOTTOMMOST#0 ← (word~) $11 - to:@22 + to:@25 processChars: scope:[processChars] from irqBottom::@1 (byte) processChars::numActive#0 ← (number) 0 (number~) processChars::$1 ← (byte) NUM_PROCESSING#0 - (number) 1 @@ -1058,205 +1051,76 @@ processChars::@16: scope:[processChars] from processChars::@15 processChars::@return: scope:[processChars] from processChars::@15 processChars::@16 return to:@return -init_dist_screen: scope:[init_dist_screen] from main - (byte*) init_dist_screen::screen#2 ← phi( main/(byte*) init_dist_screen::screen#0 ) - (word*) SQUARES#23 ← phi( main/(word*) SQUARES#21 ) - (byte*) heap_head#28 ← phi( main/(byte*) heap_head#26 ) - (byte) NUM_SQUARES#3 ← (number) $30 - call init_squares - to:init_dist_screen::@15 -init_dist_screen::@15: scope:[init_dist_screen] from init_dist_screen - (byte) NUM_SQUARES#45 ← phi( init_dist_screen/(byte) NUM_SQUARES#3 ) - (byte*) init_dist_screen::screen#1 ← phi( init_dist_screen/(byte*) init_dist_screen::screen#2 ) - (word*) SQUARES#14 ← phi( init_dist_screen/(word*) SQUARES#2 ) - (byte*) heap_head#20 ← phi( init_dist_screen/(byte*) heap_head#4 ) - (byte*) heap_head#9 ← (byte*) heap_head#20 - (word*) SQUARES#5 ← (word*) SQUARES#14 - (byte*) init_dist_screen::screen_topline#0 ← (byte*) init_dist_screen::screen#1 - (byte*~) init_dist_screen::$1 ← (byte*) init_dist_screen::screen#1 + (number) $28*(number) $18 - (byte*) init_dist_screen::screen_bottomline#0 ← (byte*~) init_dist_screen::$1 - (byte) init_dist_screen::y#0 ← (byte) 0 - to:init_dist_screen::@1 -init_dist_screen::@1: scope:[init_dist_screen] from init_dist_screen::@11 init_dist_screen::@15 - (byte*) heap_head#57 ← phi( init_dist_screen::@11/(byte*) heap_head#29 init_dist_screen::@15/(byte*) heap_head#9 ) - (byte*) init_dist_screen::screen_bottomline#13 ← phi( init_dist_screen::@11/(byte*) init_dist_screen::screen_bottomline#1 init_dist_screen::@15/(byte*) init_dist_screen::screen_bottomline#0 ) - (byte*) init_dist_screen::screen_topline#13 ← phi( init_dist_screen::@11/(byte*) init_dist_screen::screen_topline#1 init_dist_screen::@15/(byte*) init_dist_screen::screen_topline#0 ) - (byte) NUM_SQUARES#43 ← phi( init_dist_screen::@11/(byte) NUM_SQUARES#16 init_dist_screen::@15/(byte) NUM_SQUARES#45 ) - (word*) SQUARES#35 ← phi( init_dist_screen::@11/(word*) SQUARES#24 init_dist_screen::@15/(word*) SQUARES#5 ) - (byte) init_dist_screen::y#2 ← phi( init_dist_screen::@11/(byte) init_dist_screen::y#1 init_dist_screen::@15/(byte) init_dist_screen::y#0 ) - (number~) init_dist_screen::$2 ← (byte) init_dist_screen::y#2 * (number) 2 - (byte) init_dist_screen::y2#0 ← (number~) init_dist_screen::$2 - (bool~) init_dist_screen::$3 ← (byte) init_dist_screen::y2#0 >= (number) $18 - if((bool~) init_dist_screen::$3) goto init_dist_screen::@2 - to:init_dist_screen::@3 -init_dist_screen::@2: scope:[init_dist_screen] from init_dist_screen::@1 - (byte*) heap_head#54 ← phi( init_dist_screen::@1/(byte*) heap_head#57 ) - (byte) init_dist_screen::y#12 ← phi( init_dist_screen::@1/(byte) init_dist_screen::y#2 ) - (byte*) init_dist_screen::screen_bottomline#11 ← phi( init_dist_screen::@1/(byte*) init_dist_screen::screen_bottomline#13 ) - (byte*) init_dist_screen::screen_topline#11 ← phi( init_dist_screen::@1/(byte*) init_dist_screen::screen_topline#13 ) - (byte) NUM_SQUARES#39 ← phi( init_dist_screen::@1/(byte) NUM_SQUARES#43 ) - (word*) SQUARES#27 ← phi( init_dist_screen::@1/(word*) SQUARES#35 ) - (byte) init_dist_screen::y2#1 ← phi( init_dist_screen::@1/(byte) init_dist_screen::y2#0 ) - (number~) init_dist_screen::$6 ← (byte) init_dist_screen::y2#1 - (number) $18 - (number~) init_dist_screen::$7 ← (number~) init_dist_screen::$6 - to:init_dist_screen::@4 -init_dist_screen::@3: scope:[init_dist_screen] from init_dist_screen::@1 - (byte*) heap_head#55 ← phi( init_dist_screen::@1/(byte*) heap_head#57 ) - (byte) init_dist_screen::y#13 ← phi( init_dist_screen::@1/(byte) init_dist_screen::y#2 ) - (byte*) init_dist_screen::screen_bottomline#12 ← phi( init_dist_screen::@1/(byte*) init_dist_screen::screen_bottomline#13 ) - (byte*) init_dist_screen::screen_topline#12 ← phi( init_dist_screen::@1/(byte*) init_dist_screen::screen_topline#13 ) - (byte) NUM_SQUARES#40 ← phi( init_dist_screen::@1/(byte) NUM_SQUARES#43 ) - (word*) SQUARES#28 ← phi( init_dist_screen::@1/(word*) SQUARES#35 ) - (byte) init_dist_screen::y2#2 ← phi( init_dist_screen::@1/(byte) init_dist_screen::y2#0 ) - (number~) init_dist_screen::$4 ← (number) $18 - (byte) init_dist_screen::y2#2 - (number~) init_dist_screen::$5 ← (number~) init_dist_screen::$4 - to:init_dist_screen::@4 -init_dist_screen::@4: scope:[init_dist_screen] from init_dist_screen::@2 init_dist_screen::@3 - (byte*) heap_head#52 ← phi( init_dist_screen::@2/(byte*) heap_head#54 init_dist_screen::@3/(byte*) heap_head#55 ) - (byte) init_dist_screen::y#11 ← phi( init_dist_screen::@2/(byte) init_dist_screen::y#12 init_dist_screen::@3/(byte) init_dist_screen::y#13 ) - (byte*) init_dist_screen::screen_bottomline#10 ← phi( init_dist_screen::@2/(byte*) init_dist_screen::screen_bottomline#11 init_dist_screen::@3/(byte*) init_dist_screen::screen_bottomline#12 ) - (byte*) init_dist_screen::screen_topline#10 ← phi( init_dist_screen::@2/(byte*) init_dist_screen::screen_topline#11 init_dist_screen::@3/(byte*) init_dist_screen::screen_topline#12 ) - (byte) NUM_SQUARES#36 ← phi( init_dist_screen::@2/(byte) NUM_SQUARES#39 init_dist_screen::@3/(byte) NUM_SQUARES#40 ) - (word*) SQUARES#18 ← phi( init_dist_screen::@2/(word*) SQUARES#27 init_dist_screen::@3/(word*) SQUARES#28 ) - (number~) init_dist_screen::$8 ← phi( init_dist_screen::@2/(number~) init_dist_screen::$7 init_dist_screen::@3/(number~) init_dist_screen::$5 ) - (byte) init_dist_screen::yd#0 ← (number~) init_dist_screen::$8 - (byte) sqr::val#0 ← (byte) init_dist_screen::yd#0 - call sqr - (word) sqr::return#2 ← (word) sqr::return#1 - to:init_dist_screen::@16 -init_dist_screen::@16: scope:[init_dist_screen] from init_dist_screen::@4 - (byte*) heap_head#50 ← phi( init_dist_screen::@4/(byte*) heap_head#52 ) - (byte) init_dist_screen::y#10 ← phi( init_dist_screen::@4/(byte) init_dist_screen::y#11 ) - (byte*) init_dist_screen::screen_bottomline#9 ← phi( init_dist_screen::@4/(byte*) init_dist_screen::screen_bottomline#10 ) - (byte*) init_dist_screen::screen_topline#9 ← phi( init_dist_screen::@4/(byte*) init_dist_screen::screen_topline#10 ) - (byte) NUM_SQUARES#33 ← phi( init_dist_screen::@4/(byte) NUM_SQUARES#36 ) - (word*) SQUARES#40 ← phi( init_dist_screen::@4/(word*) SQUARES#18 ) - (word) sqr::return#5 ← phi( init_dist_screen::@4/(word) sqr::return#2 ) - (word~) init_dist_screen::$9 ← (word) sqr::return#5 - (word) init_dist_screen::yds#0 ← (word~) init_dist_screen::$9 - (byte) init_dist_screen::x#0 ← (number) 0 - (byte) init_dist_screen::xb#0 ← (number) $27 - to:init_dist_screen::@5 -init_dist_screen::@5: scope:[init_dist_screen] from init_dist_screen::@16 init_dist_screen::@18 - (byte*) heap_head#48 ← phi( init_dist_screen::@16/(byte*) heap_head#50 init_dist_screen::@18/(byte*) heap_head#33 ) - (byte) init_dist_screen::y#9 ← phi( init_dist_screen::@16/(byte) init_dist_screen::y#10 init_dist_screen::@18/(byte) init_dist_screen::y#4 ) - (byte) init_dist_screen::xb#7 ← phi( init_dist_screen::@16/(byte) init_dist_screen::xb#0 init_dist_screen::@18/(byte) init_dist_screen::xb#1 ) - (byte*) init_dist_screen::screen_bottomline#8 ← phi( init_dist_screen::@16/(byte*) init_dist_screen::screen_bottomline#9 init_dist_screen::@18/(byte*) init_dist_screen::screen_bottomline#2 ) - (byte*) init_dist_screen::screen_topline#8 ← phi( init_dist_screen::@16/(byte*) init_dist_screen::screen_topline#9 init_dist_screen::@18/(byte*) init_dist_screen::screen_topline#2 ) - (byte) NUM_SQUARES#29 ← phi( init_dist_screen::@16/(byte) NUM_SQUARES#33 init_dist_screen::@18/(byte) NUM_SQUARES#20 ) - (word) init_dist_screen::yds#5 ← phi( init_dist_screen::@16/(word) init_dist_screen::yds#0 init_dist_screen::@18/(word) init_dist_screen::yds#6 ) - (word*) SQUARES#36 ← phi( init_dist_screen::@16/(word*) SQUARES#40 init_dist_screen::@18/(word*) SQUARES#31 ) - (byte) init_dist_screen::x#2 ← phi( init_dist_screen::@16/(byte) init_dist_screen::x#0 init_dist_screen::@18/(byte) init_dist_screen::x#1 ) - (number~) init_dist_screen::$10 ← (byte) init_dist_screen::x#2 * (number) 2 - (byte) init_dist_screen::x2#0 ← (number~) init_dist_screen::$10 - (bool~) init_dist_screen::$11 ← (byte) init_dist_screen::x2#0 >= (number) $27 - if((bool~) init_dist_screen::$11) goto init_dist_screen::@6 - to:init_dist_screen::@7 -init_dist_screen::@6: scope:[init_dist_screen] from init_dist_screen::@5 - (byte*) heap_head#45 ← phi( init_dist_screen::@5/(byte*) heap_head#48 ) - (byte) init_dist_screen::y#7 ← phi( init_dist_screen::@5/(byte) init_dist_screen::y#9 ) - (byte) init_dist_screen::xb#5 ← phi( init_dist_screen::@5/(byte) init_dist_screen::xb#7 ) - (byte*) init_dist_screen::screen_bottomline#6 ← phi( init_dist_screen::@5/(byte*) init_dist_screen::screen_bottomline#8 ) - (byte) init_dist_screen::x#6 ← phi( init_dist_screen::@5/(byte) init_dist_screen::x#2 ) - (byte*) init_dist_screen::screen_topline#6 ← phi( init_dist_screen::@5/(byte*) init_dist_screen::screen_topline#8 ) - (byte) NUM_SQUARES#24 ← phi( init_dist_screen::@5/(byte) NUM_SQUARES#29 ) - (word) init_dist_screen::yds#3 ← phi( init_dist_screen::@5/(word) init_dist_screen::yds#5 ) - (word*) SQUARES#29 ← phi( init_dist_screen::@5/(word*) SQUARES#36 ) - (byte) init_dist_screen::x2#1 ← phi( init_dist_screen::@5/(byte) init_dist_screen::x2#0 ) - (number~) init_dist_screen::$14 ← (byte) init_dist_screen::x2#1 - (number) $27 - (number~) init_dist_screen::$15 ← (number~) init_dist_screen::$14 - to:init_dist_screen::@8 -init_dist_screen::@7: scope:[init_dist_screen] from init_dist_screen::@5 - (byte*) heap_head#46 ← phi( init_dist_screen::@5/(byte*) heap_head#48 ) - (byte) init_dist_screen::y#8 ← phi( init_dist_screen::@5/(byte) init_dist_screen::y#9 ) - (byte) init_dist_screen::xb#6 ← phi( init_dist_screen::@5/(byte) init_dist_screen::xb#7 ) - (byte*) init_dist_screen::screen_bottomline#7 ← phi( init_dist_screen::@5/(byte*) init_dist_screen::screen_bottomline#8 ) - (byte) init_dist_screen::x#7 ← phi( init_dist_screen::@5/(byte) init_dist_screen::x#2 ) - (byte*) init_dist_screen::screen_topline#7 ← phi( init_dist_screen::@5/(byte*) init_dist_screen::screen_topline#8 ) - (byte) NUM_SQUARES#25 ← phi( init_dist_screen::@5/(byte) NUM_SQUARES#29 ) - (word) init_dist_screen::yds#4 ← phi( init_dist_screen::@5/(word) init_dist_screen::yds#5 ) - (word*) SQUARES#30 ← phi( init_dist_screen::@5/(word*) SQUARES#36 ) - (byte) init_dist_screen::x2#2 ← phi( init_dist_screen::@5/(byte) init_dist_screen::x2#0 ) - (number~) init_dist_screen::$12 ← (number) $27 - (byte) init_dist_screen::x2#2 - (number~) init_dist_screen::$13 ← (number~) init_dist_screen::$12 - to:init_dist_screen::@8 -init_dist_screen::@8: scope:[init_dist_screen] from init_dist_screen::@6 init_dist_screen::@7 - (byte*) heap_head#42 ← phi( init_dist_screen::@6/(byte*) heap_head#45 init_dist_screen::@7/(byte*) heap_head#46 ) - (byte) init_dist_screen::y#6 ← phi( init_dist_screen::@6/(byte) init_dist_screen::y#7 init_dist_screen::@7/(byte) init_dist_screen::y#8 ) - (byte) init_dist_screen::xb#4 ← phi( init_dist_screen::@6/(byte) init_dist_screen::xb#5 init_dist_screen::@7/(byte) init_dist_screen::xb#6 ) - (byte*) init_dist_screen::screen_bottomline#5 ← phi( init_dist_screen::@6/(byte*) init_dist_screen::screen_bottomline#6 init_dist_screen::@7/(byte*) init_dist_screen::screen_bottomline#7 ) - (byte) init_dist_screen::x#5 ← phi( init_dist_screen::@6/(byte) init_dist_screen::x#6 init_dist_screen::@7/(byte) init_dist_screen::x#7 ) - (byte*) init_dist_screen::screen_topline#5 ← phi( init_dist_screen::@6/(byte*) init_dist_screen::screen_topline#6 init_dist_screen::@7/(byte*) init_dist_screen::screen_topline#7 ) - (byte) NUM_SQUARES#19 ← phi( init_dist_screen::@6/(byte) NUM_SQUARES#24 init_dist_screen::@7/(byte) NUM_SQUARES#25 ) - (word) init_dist_screen::yds#2 ← phi( init_dist_screen::@6/(word) init_dist_screen::yds#3 init_dist_screen::@7/(word) init_dist_screen::yds#4 ) - (word*) SQUARES#19 ← phi( init_dist_screen::@6/(word*) SQUARES#29 init_dist_screen::@7/(word*) SQUARES#30 ) - (number~) init_dist_screen::$16 ← phi( init_dist_screen::@6/(number~) init_dist_screen::$15 init_dist_screen::@7/(number~) init_dist_screen::$13 ) - (byte) init_dist_screen::xd#0 ← (number~) init_dist_screen::$16 - (byte) sqr::val#1 ← (byte) init_dist_screen::xd#0 - call sqr - (word) sqr::return#3 ← (word) sqr::return#1 - to:init_dist_screen::@17 -init_dist_screen::@17: scope:[init_dist_screen] from init_dist_screen::@8 - (byte*) heap_head#38 ← phi( init_dist_screen::@8/(byte*) heap_head#42 ) - (byte) init_dist_screen::y#5 ← phi( init_dist_screen::@8/(byte) init_dist_screen::y#6 ) - (byte) init_dist_screen::xb#3 ← phi( init_dist_screen::@8/(byte) init_dist_screen::xb#4 ) - (byte*) init_dist_screen::screen_bottomline#4 ← phi( init_dist_screen::@8/(byte*) init_dist_screen::screen_bottomline#5 ) - (byte) init_dist_screen::x#4 ← phi( init_dist_screen::@8/(byte) init_dist_screen::x#5 ) - (byte*) init_dist_screen::screen_topline#4 ← phi( init_dist_screen::@8/(byte*) init_dist_screen::screen_topline#5 ) - (byte) NUM_SQUARES#13 ← phi( init_dist_screen::@8/(byte) NUM_SQUARES#19 ) - (word*) SQUARES#20 ← phi( init_dist_screen::@8/(word*) SQUARES#19 ) - (word) init_dist_screen::yds#1 ← phi( init_dist_screen::@8/(word) init_dist_screen::yds#2 ) - (word) sqr::return#6 ← phi( init_dist_screen::@8/(word) sqr::return#3 ) - (word~) init_dist_screen::$17 ← (word) sqr::return#6 - (word) init_dist_screen::xds#0 ← (word~) init_dist_screen::$17 - (word~) init_dist_screen::$18 ← (word) init_dist_screen::xds#0 + (word) init_dist_screen::yds#1 - (word) init_dist_screen::ds#0 ← (word~) init_dist_screen::$18 - (word) sqrt::val#0 ← (word) init_dist_screen::ds#0 - call sqrt - (byte) sqrt::return#2 ← (byte) sqrt::return#1 - to:init_dist_screen::@18 -init_dist_screen::@18: scope:[init_dist_screen] from init_dist_screen::@17 - (word) init_dist_screen::yds#6 ← phi( init_dist_screen::@17/(word) init_dist_screen::yds#1 ) - (word*) SQUARES#31 ← phi( init_dist_screen::@17/(word*) SQUARES#20 ) - (byte*) heap_head#33 ← phi( init_dist_screen::@17/(byte*) heap_head#38 ) - (byte) NUM_SQUARES#20 ← phi( init_dist_screen::@17/(byte) NUM_SQUARES#13 ) - (byte) init_dist_screen::y#4 ← phi( init_dist_screen::@17/(byte) init_dist_screen::y#5 ) - (byte) init_dist_screen::xb#2 ← phi( init_dist_screen::@17/(byte) init_dist_screen::xb#3 ) - (byte*) init_dist_screen::screen_bottomline#2 ← phi( init_dist_screen::@17/(byte*) init_dist_screen::screen_bottomline#4 ) - (byte) init_dist_screen::x#3 ← phi( init_dist_screen::@17/(byte) init_dist_screen::x#4 ) - (byte*) init_dist_screen::screen_topline#2 ← phi( init_dist_screen::@17/(byte*) init_dist_screen::screen_topline#4 ) - (byte) sqrt::return#4 ← phi( init_dist_screen::@17/(byte) sqrt::return#2 ) - (byte~) init_dist_screen::$19 ← (byte) sqrt::return#4 - (byte) init_dist_screen::d#0 ← (byte~) init_dist_screen::$19 - *((byte*) init_dist_screen::screen_topline#2 + (byte) init_dist_screen::x#3) ← (byte) init_dist_screen::d#0 - *((byte*) init_dist_screen::screen_bottomline#2 + (byte) init_dist_screen::x#3) ← (byte) init_dist_screen::d#0 - *((byte*) init_dist_screen::screen_topline#2 + (byte) init_dist_screen::xb#2) ← (byte) init_dist_screen::d#0 - *((byte*) init_dist_screen::screen_bottomline#2 + (byte) init_dist_screen::xb#2) ← (byte) init_dist_screen::d#0 - (byte) init_dist_screen::x#1 ← ++ (byte) init_dist_screen::x#3 - (byte) init_dist_screen::xb#1 ← -- (byte) init_dist_screen::xb#2 - (bool~) init_dist_screen::$20 ← (byte) init_dist_screen::x#1 <= (number) $13 - if((bool~) init_dist_screen::$20) goto init_dist_screen::@5 - to:init_dist_screen::@11 -init_dist_screen::@11: scope:[init_dist_screen] from init_dist_screen::@18 - (word*) SQUARES#24 ← phi( init_dist_screen::@18/(word*) SQUARES#31 ) - (byte*) heap_head#29 ← phi( init_dist_screen::@18/(byte*) heap_head#33 ) - (byte) NUM_SQUARES#16 ← phi( init_dist_screen::@18/(byte) NUM_SQUARES#20 ) - (byte) init_dist_screen::y#3 ← phi( init_dist_screen::@18/(byte) init_dist_screen::y#4 ) - (byte*) init_dist_screen::screen_bottomline#3 ← phi( init_dist_screen::@18/(byte*) init_dist_screen::screen_bottomline#2 ) - (byte*) init_dist_screen::screen_topline#3 ← phi( init_dist_screen::@18/(byte*) init_dist_screen::screen_topline#2 ) - (byte*) init_dist_screen::screen_topline#1 ← (byte*) init_dist_screen::screen_topline#3 + (number) $28 - (byte*) init_dist_screen::screen_bottomline#1 ← (byte*) init_dist_screen::screen_bottomline#3 - (number) $28 - (byte) init_dist_screen::y#1 ← (byte) init_dist_screen::y#3 + rangenext(0,$c) - (bool~) init_dist_screen::$21 ← (byte) init_dist_screen::y#1 != rangelast(0,$c) - if((bool~) init_dist_screen::$21) goto init_dist_screen::@1 - to:init_dist_screen::@return -init_dist_screen::@return: scope:[init_dist_screen] from init_dist_screen::@11 - (word*) SQUARES#15 ← phi( init_dist_screen::@11/(word*) SQUARES#24 ) - (byte*) heap_head#21 ← phi( init_dist_screen::@11/(byte*) heap_head#29 ) - (byte) NUM_SQUARES#11 ← phi( init_dist_screen::@11/(byte) NUM_SQUARES#16 ) - (byte) NUM_SQUARES#4 ← (byte) NUM_SQUARES#11 - (byte*) heap_head#10 ← (byte*) heap_head#21 - (word*) SQUARES#6 ← (word*) SQUARES#15 +init_angle_screen: scope:[init_angle_screen] from main + (byte*) init_angle_screen::screen#1 ← phi( main/(byte*) init_angle_screen::screen#0 ) + (byte*~) init_angle_screen::$0 ← (byte*) init_angle_screen::screen#1 + (number) $28*(number) $c + (byte*) init_angle_screen::screen_topline#0 ← (byte*~) init_angle_screen::$0 + (byte*~) init_angle_screen::$1 ← (byte*) init_angle_screen::screen#1 + (number) $28*(number) $c + (byte*) init_angle_screen::screen_bottomline#0 ← (byte*~) init_angle_screen::$1 + (byte) init_angle_screen::y#0 ← (byte) 0 + to:init_angle_screen::@1 +init_angle_screen::@1: scope:[init_angle_screen] from init_angle_screen init_angle_screen::@3 + (byte*) init_angle_screen::screen_topline#5 ← phi( init_angle_screen/(byte*) init_angle_screen::screen_topline#0 init_angle_screen::@3/(byte*) init_angle_screen::screen_topline#1 ) + (byte*) init_angle_screen::screen_bottomline#5 ← phi( init_angle_screen/(byte*) init_angle_screen::screen_bottomline#0 init_angle_screen::@3/(byte*) init_angle_screen::screen_bottomline#1 ) + (byte) init_angle_screen::y#4 ← phi( init_angle_screen/(byte) init_angle_screen::y#0 init_angle_screen::@3/(byte) init_angle_screen::y#1 ) + (byte) init_angle_screen::x#0 ← (number) 0 + (byte) init_angle_screen::xb#0 ← (number) $27 + to:init_angle_screen::@2 +init_angle_screen::@2: scope:[init_angle_screen] from init_angle_screen::@1 init_angle_screen::@5 + (byte*) init_angle_screen::screen_topline#4 ← phi( init_angle_screen::@1/(byte*) init_angle_screen::screen_topline#5 init_angle_screen::@5/(byte*) init_angle_screen::screen_topline#2 ) + (byte) init_angle_screen::xb#3 ← phi( init_angle_screen::@1/(byte) init_angle_screen::xb#0 init_angle_screen::@5/(byte) init_angle_screen::xb#1 ) + (byte*) init_angle_screen::screen_bottomline#4 ← phi( init_angle_screen::@1/(byte*) init_angle_screen::screen_bottomline#5 init_angle_screen::@5/(byte*) init_angle_screen::screen_bottomline#2 ) + (byte) init_angle_screen::y#2 ← phi( init_angle_screen::@1/(byte) init_angle_screen::y#4 init_angle_screen::@5/(byte) init_angle_screen::y#5 ) + (byte) init_angle_screen::x#2 ← phi( init_angle_screen::@1/(byte) init_angle_screen::x#0 init_angle_screen::@5/(byte) init_angle_screen::x#1 ) + (number~) init_angle_screen::$2 ← (byte) init_angle_screen::x#2 * (number) 2 + (number~) init_angle_screen::$3 ← (number) $27 - (number~) init_angle_screen::$2 + (word~) init_angle_screen::$4 ← ((word)) { (number~) init_angle_screen::$3, (number) 0 } + (signed word~) init_angle_screen::$5 ← ((signed word)) (word~) init_angle_screen::$4 + (signed word) init_angle_screen::xw#0 ← (signed word~) init_angle_screen::$5 + (number~) init_angle_screen::$6 ← (byte) init_angle_screen::y#2 * (number) 2 + (word~) init_angle_screen::$7 ← ((word)) { (number~) init_angle_screen::$6, (number) 0 } + (signed word~) init_angle_screen::$8 ← ((signed word)) (word~) init_angle_screen::$7 + (signed word) init_angle_screen::yw#0 ← (signed word~) init_angle_screen::$8 + (signed word) atan2_16::x#0 ← (signed word) init_angle_screen::xw#0 + (signed word) atan2_16::y#0 ← (signed word) init_angle_screen::yw#0 + call atan2_16 + (word) atan2_16::return#2 ← (word) atan2_16::return#1 + to:init_angle_screen::@5 +init_angle_screen::@5: scope:[init_angle_screen] from init_angle_screen::@2 + (byte) init_angle_screen::y#5 ← phi( init_angle_screen::@2/(byte) init_angle_screen::y#2 ) + (byte) init_angle_screen::x#3 ← phi( init_angle_screen::@2/(byte) init_angle_screen::x#2 ) + (byte*) init_angle_screen::screen_topline#2 ← phi( init_angle_screen::@2/(byte*) init_angle_screen::screen_topline#4 ) + (byte) init_angle_screen::xb#2 ← phi( init_angle_screen::@2/(byte) init_angle_screen::xb#3 ) + (byte*) init_angle_screen::screen_bottomline#2 ← phi( init_angle_screen::@2/(byte*) init_angle_screen::screen_bottomline#4 ) + (word) atan2_16::return#4 ← phi( init_angle_screen::@2/(word) atan2_16::return#2 ) + (word~) init_angle_screen::$9 ← (word) atan2_16::return#4 + (word) init_angle_screen::angle_w#0 ← (word~) init_angle_screen::$9 + (number~) init_angle_screen::$10 ← (word) init_angle_screen::angle_w#0 + (number) $80 + (number~) init_angle_screen::$11 ← > (number~) init_angle_screen::$10 + (byte) init_angle_screen::ang_w#0 ← (number~) init_angle_screen::$11 + *((byte*) init_angle_screen::screen_bottomline#2 + (byte) init_angle_screen::xb#2) ← (byte) init_angle_screen::ang_w#0 + (byte~) init_angle_screen::$12 ← - (byte) init_angle_screen::ang_w#0 + *((byte*) init_angle_screen::screen_topline#2 + (byte) init_angle_screen::xb#2) ← (byte~) init_angle_screen::$12 + (number~) init_angle_screen::$13 ← (number) $80 + (byte) init_angle_screen::ang_w#0 + *((byte*) init_angle_screen::screen_topline#2 + (byte) init_angle_screen::x#3) ← (number~) init_angle_screen::$13 + (number~) init_angle_screen::$14 ← (number) $80 - (byte) init_angle_screen::ang_w#0 + *((byte*) init_angle_screen::screen_bottomline#2 + (byte) init_angle_screen::x#3) ← (number~) init_angle_screen::$14 + (byte) init_angle_screen::x#1 ← ++ (byte) init_angle_screen::x#3 + (byte) init_angle_screen::xb#1 ← -- (byte) init_angle_screen::xb#2 + (bool~) init_angle_screen::$15 ← (byte) init_angle_screen::x#1 <= (number) $13 + if((bool~) init_angle_screen::$15) goto init_angle_screen::@2 + to:init_angle_screen::@3 +init_angle_screen::@3: scope:[init_angle_screen] from init_angle_screen::@5 + (byte) init_angle_screen::y#3 ← phi( init_angle_screen::@5/(byte) init_angle_screen::y#5 ) + (byte*) init_angle_screen::screen_bottomline#3 ← phi( init_angle_screen::@5/(byte*) init_angle_screen::screen_bottomline#2 ) + (byte*) init_angle_screen::screen_topline#3 ← phi( init_angle_screen::@5/(byte*) init_angle_screen::screen_topline#2 ) + (byte*) init_angle_screen::screen_topline#1 ← (byte*) init_angle_screen::screen_topline#3 - (number) $28 + (byte*) init_angle_screen::screen_bottomline#1 ← (byte*) init_angle_screen::screen_bottomline#3 + (number) $28 + (byte) init_angle_screen::y#1 ← (byte) init_angle_screen::y#3 + rangenext(0,$c) + (bool~) init_angle_screen::$16 ← (byte) init_angle_screen::y#1 != rangelast(0,$c) + if((bool~) init_angle_screen::$16) goto init_angle_screen::@1 + to:init_angle_screen::@return +init_angle_screen::@return: scope:[init_angle_screen] from init_angle_screen::@3 return to:@return initSprites: scope:[initSprites] from main::@4 @@ -1321,14 +1185,11 @@ setupRasterIrq::@2: scope:[setupRasterIrq] from setupRasterIrq::@1 setupRasterI setupRasterIrq::@return: scope:[setupRasterIrq] from setupRasterIrq::@2 return to:@return -@22: scope:[] from @18 - (byte*) SCREEN_COPY#20 ← phi( @18/(byte*) SCREEN_COPY#23 ) - (word*) SQUARES#37 ← phi( @18/(word*) SQUARES#41 ) - (byte*) heap_head#39 ← phi( @18/(byte*) heap_head#43 ) - (byte) NUM_SQUARES#26 ← phi( @18/(byte) NUM_SQUARES#30 ) - (byte*) SCREEN_DIST#10 ← phi( @18/(byte*) SCREEN_DIST#13 ) +@25: scope:[] from @20 + (byte*) SCREEN_COPY#20 ← phi( @20/(byte*) SCREEN_COPY#23 ) + (byte*) SCREEN_DIST#10 ← phi( @20/(byte*) SCREEN_DIST#13 ) (byte) RASTER_IRQ_TOP#0 ← (number) $30 - to:@23 + to:@26 irqTop: scope:[irqTop] from (bool~) irqTop::$0 ← ! (bool) DEBUG#0 if((bool~) irqTop::$0) goto irqTop::@1 @@ -1366,14 +1227,11 @@ irqTop::@6: scope:[irqTop] from irqTop::@5 irqTop::@return: scope:[irqTop] from irqTop::@1 return to:@return -@23: scope:[] from @22 - (byte*) SCREEN_COPY#14 ← phi( @22/(byte*) SCREEN_COPY#20 ) - (word*) SQUARES#32 ← phi( @22/(word*) SQUARES#37 ) - (byte*) heap_head#34 ← phi( @22/(byte*) heap_head#39 ) - (byte) NUM_SQUARES#21 ← phi( @22/(byte) NUM_SQUARES#26 ) - (byte*) SCREEN_DIST#7 ← phi( @22/(byte*) SCREEN_DIST#10 ) +@26: scope:[] from @25 + (byte*) SCREEN_COPY#14 ← phi( @25/(byte*) SCREEN_COPY#20 ) + (byte*) SCREEN_DIST#7 ← phi( @25/(byte*) SCREEN_DIST#10 ) (byte) RASTER_IRQ_MIDDLE#0 ← (number) $ff - to:@24 + to:@27 irqBottom: scope:[irqBottom] from (bool~) irqBottom::$0 ← ! (bool) DEBUG#0 if((bool~) irqBottom::$0) goto irqBottom::@1 @@ -1411,23 +1269,14 @@ irqBottom::@4: scope:[irqBottom] from irqBottom::@7 irqBottom::@return: scope:[irqBottom] from irqBottom::@2 return to:@return -@24: scope:[] from @23 - (byte*) SCREEN_COPY#7 ← phi( @23/(byte*) SCREEN_COPY#14 ) - (word*) SQUARES#25 ← phi( @23/(word*) SQUARES#32 ) - (byte*) heap_head#30 ← phi( @23/(byte*) heap_head#34 ) - (byte) NUM_SQUARES#17 ← phi( @23/(byte) NUM_SQUARES#21 ) - (byte*) SCREEN_DIST#3 ← phi( @23/(byte*) SCREEN_DIST#7 ) +@27: scope:[] from @26 + (byte*) SCREEN_COPY#7 ← phi( @26/(byte*) SCREEN_COPY#14 ) + (byte*) SCREEN_DIST#3 ← phi( @26/(byte*) SCREEN_DIST#7 ) call main - to:@27 -@27: scope:[] from @24 - (word*) SQUARES#16 ← phi( @24/(word*) SQUARES#4 ) - (byte*) heap_head#22 ← phi( @24/(byte*) heap_head#8 ) - (byte) NUM_SQUARES#12 ← phi( @24/(byte) NUM_SQUARES#2 ) - (byte) NUM_SQUARES#5 ← (byte) NUM_SQUARES#12 - (byte*) heap_head#11 ← (byte*) heap_head#22 - (word*) SQUARES#7 ← (word*) SQUARES#16 + to:@30 +@30: scope:[] from @27 to:@end -@end: scope:[] from @27 +@end: scope:[] from @30 SYMBOL TABLE SSA (void*~) $0 @@ -1442,16 +1291,16 @@ SYMBOL TABLE SSA (number~) $7 (word~) $8 (word~) $9 -(label) @11 -(label) @15 -(label) @18 -(label) @22 -(label) @23 -(label) @24 +(label) @13 +(label) @17 +(label) @20 (label) @25 (label) @26 (label) @27 -(label) @3 +(label) @28 +(label) @29 +(label) @30 +(label) @6 (label) @begin (label) @end (byte*) BGCOL @@ -1476,6 +1325,10 @@ SYMBOL TABLE SSA (byte) CIA_INTERRUPT_CLEAR#0 (byte*) COLS (byte*) COLS#0 +(word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16 +(word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16#0 +(byte) CORDIC_ITERATIONS_16 +(byte) CORDIC_ITERATIONS_16#0 (bool) DEBUG (bool) DEBUG#0 (void()**) HARDWARE_IRQ @@ -1494,54 +1347,6 @@ SYMBOL TABLE SSA (byte) NOT_FOUND#0 (byte) NUM_PROCESSING (byte) NUM_PROCESSING#0 -(byte) NUM_SQUARES -(byte) NUM_SQUARES#0 -(byte) NUM_SQUARES#1 -(byte) NUM_SQUARES#10 -(byte) NUM_SQUARES#11 -(byte) NUM_SQUARES#12 -(byte) NUM_SQUARES#13 -(byte) NUM_SQUARES#14 -(byte) NUM_SQUARES#15 -(byte) NUM_SQUARES#16 -(byte) NUM_SQUARES#17 -(byte) NUM_SQUARES#18 -(byte) NUM_SQUARES#19 -(byte) NUM_SQUARES#2 -(byte) NUM_SQUARES#20 -(byte) NUM_SQUARES#21 -(byte) NUM_SQUARES#22 -(byte) NUM_SQUARES#23 -(byte) NUM_SQUARES#24 -(byte) NUM_SQUARES#25 -(byte) NUM_SQUARES#26 -(byte) NUM_SQUARES#27 -(byte) NUM_SQUARES#28 -(byte) NUM_SQUARES#29 -(byte) NUM_SQUARES#3 -(byte) NUM_SQUARES#30 -(byte) NUM_SQUARES#31 -(byte) NUM_SQUARES#32 -(byte) NUM_SQUARES#33 -(byte) NUM_SQUARES#34 -(byte) NUM_SQUARES#35 -(byte) NUM_SQUARES#36 -(byte) NUM_SQUARES#37 -(byte) NUM_SQUARES#38 -(byte) NUM_SQUARES#39 -(byte) NUM_SQUARES#4 -(byte) NUM_SQUARES#40 -(byte) NUM_SQUARES#41 -(byte) NUM_SQUARES#42 -(byte) NUM_SQUARES#43 -(byte) NUM_SQUARES#44 -(byte) NUM_SQUARES#45 -(byte) NUM_SQUARES#46 -(byte) NUM_SQUARES#5 -(byte) NUM_SQUARES#6 -(byte) NUM_SQUARES#7 -(byte) NUM_SQUARES#8 -(byte) NUM_SQUARES#9 (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_COL = (byte) $a (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID = (byte) 8 (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR = (byte) 9 @@ -1655,59 +1460,6 @@ SYMBOL TABLE SSA (byte*) SPRITE_DATA#0 (word) SPRITE_PTRS (word) SPRITE_PTRS#0 -(word*) SQUARES -(word*) SQUARES#0 -(word*) SQUARES#1 -(word*) SQUARES#10 -(word*) SQUARES#11 -(word*) SQUARES#12 -(word*) SQUARES#13 -(word*) SQUARES#14 -(word*) SQUARES#15 -(word*) SQUARES#16 -(word*) SQUARES#17 -(word*) SQUARES#18 -(word*) SQUARES#19 -(word*) SQUARES#2 -(word*) SQUARES#20 -(word*) SQUARES#21 -(word*) SQUARES#22 -(word*) SQUARES#23 -(word*) SQUARES#24 -(word*) SQUARES#25 -(word*) SQUARES#26 -(word*) SQUARES#27 -(word*) SQUARES#28 -(word*) SQUARES#29 -(word*) SQUARES#3 -(word*) SQUARES#30 -(word*) SQUARES#31 -(word*) SQUARES#32 -(word*) SQUARES#33 -(word*) SQUARES#34 -(word*) SQUARES#35 -(word*) SQUARES#36 -(word*) SQUARES#37 -(word*) SQUARES#38 -(word*) SQUARES#39 -(word*) SQUARES#4 -(word*) SQUARES#40 -(word*) SQUARES#41 -(word*) SQUARES#42 -(word*) SQUARES#43 -(word*) SQUARES#44 -(word*) SQUARES#45 -(word*) SQUARES#46 -(word*) SQUARES#47 -(word*) SQUARES#48 -(word*) SQUARES#49 -(word*) SQUARES#5 -(word*) SQUARES#50 -(word*) SQUARES#51 -(word*) SQUARES#6 -(word*) SQUARES#7 -(word*) SQUARES#8 -(word*) SQUARES#9 (const byte) STATUS_FREE = (byte) 0 (const byte) STATUS_NEW = (byte) 1 (const byte) STATUS_PROCESSING = (byte) 2 @@ -1727,82 +1479,197 @@ SYMBOL TABLE SSA (word) YPOS_BOTTOMMOST#0 (word) YPOS_TOPMOST (word) YPOS_TOPMOST#0 -(word*()) bsearch16u((word) bsearch16u::key , (word*) bsearch16u::items , (byte) bsearch16u::num) -(bool~) bsearch16u::$0 -(word*~) bsearch16u::$1 -(signed word~) bsearch16u::$10 -(bool~) bsearch16u::$11 -(bool~) bsearch16u::$12 -(bool~) bsearch16u::$13 -(bool~) bsearch16u::$14 -(word*~) bsearch16u::$15 -(byte~) bsearch16u::$16 -(number~) bsearch16u::$17 -(number~) bsearch16u::$18 -(word*~) bsearch16u::$2 -(word*~) bsearch16u::$3 -(word*~) bsearch16u::$4 -(bool~) bsearch16u::$5 -(byte~) bsearch16u::$6 -(word*~) bsearch16u::$7 -(signed word~) bsearch16u::$8 -(signed word~) bsearch16u::$9 -(label) bsearch16u::@1 -(label) bsearch16u::@10 -(label) bsearch16u::@13 -(label) bsearch16u::@15 -(label) bsearch16u::@2 -(label) bsearch16u::@3 -(label) bsearch16u::@6 -(label) bsearch16u::@7 -(label) bsearch16u::@8 -(label) bsearch16u::@9 -(label) bsearch16u::@return -(word*) bsearch16u::items -(word*) bsearch16u::items#0 -(word*) bsearch16u::items#1 -(word*) bsearch16u::items#2 -(word*) bsearch16u::items#3 -(word*) bsearch16u::items#4 -(word*) bsearch16u::items#5 -(word*) bsearch16u::items#6 -(word*) bsearch16u::items#7 -(word*) bsearch16u::items#8 -(word*) bsearch16u::items#9 -(word) bsearch16u::key -(word) bsearch16u::key#0 -(word) bsearch16u::key#1 -(word) bsearch16u::key#2 -(word) bsearch16u::key#3 -(word) bsearch16u::key#4 -(word) bsearch16u::key#5 -(word) bsearch16u::key#6 -(word) bsearch16u::key#7 -(byte) bsearch16u::num -(byte) bsearch16u::num#0 -(byte) bsearch16u::num#1 -(byte) bsearch16u::num#2 -(byte) bsearch16u::num#3 -(byte) bsearch16u::num#4 -(byte) bsearch16u::num#5 -(byte) bsearch16u::num#6 -(byte) bsearch16u::num#7 -(byte) bsearch16u::num#8 -(word*) bsearch16u::pivot -(word*) bsearch16u::pivot#0 -(word*) bsearch16u::pivot#1 -(word*) bsearch16u::pivot#2 -(word*) bsearch16u::pivot#3 -(signed word) bsearch16u::result -(signed word) bsearch16u::result#0 -(signed word) bsearch16u::result#1 -(word*) bsearch16u::return -(word*) bsearch16u::return#0 -(word*) bsearch16u::return#1 -(word*) bsearch16u::return#2 -(word*) bsearch16u::return#3 -(word*) bsearch16u::return#4 -(word*) bsearch16u::return#5 +(word()) atan2_16((signed word) atan2_16::x , (signed word) atan2_16::y) +(bool~) atan2_16::$0 +(signed word~) atan2_16::$1 +(bool~) atan2_16::$10 +(bool~) atan2_16::$11 +(number~) atan2_16::$12 +(bool~) atan2_16::$13 +(bool~) atan2_16::$14 +(word~) atan2_16::$15 +(number~) atan2_16::$16 +(bool~) atan2_16::$17 +(bool~) atan2_16::$18 +(bool~) atan2_16::$19 +(signed word~) atan2_16::$2 +(bool~) atan2_16::$20 +(bool~) atan2_16::$21 +(bool~) atan2_16::$22 +(byte~) atan2_16::$23 +(byte~) atan2_16::$24 +(bool~) atan2_16::$25 +(signed word~) atan2_16::$3 +(signed word~) atan2_16::$4 +(bool~) atan2_16::$5 +(signed word~) atan2_16::$6 +(signed word~) atan2_16::$7 +(signed word~) atan2_16::$8 +(signed word~) atan2_16::$9 +(label) atan2_16::@1 +(label) atan2_16::@13 +(label) atan2_16::@15 +(label) atan2_16::@16 +(label) atan2_16::@17 +(label) atan2_16::@18 +(label) atan2_16::@19 +(label) atan2_16::@2 +(label) atan2_16::@20 +(label) atan2_16::@24 +(label) atan2_16::@25 +(label) atan2_16::@26 +(label) atan2_16::@27 +(label) atan2_16::@3 +(label) atan2_16::@30 +(label) atan2_16::@33 +(label) atan2_16::@4 +(label) atan2_16::@5 +(label) atan2_16::@6 +(label) atan2_16::@7 +(label) atan2_16::@8 +(label) atan2_16::@return +(word) atan2_16::angle +(word) atan2_16::angle#0 +(word) atan2_16::angle#1 +(word) atan2_16::angle#10 +(word) atan2_16::angle#11 +(word) atan2_16::angle#12 +(word) atan2_16::angle#13 +(word) atan2_16::angle#14 +(word) atan2_16::angle#15 +(word) atan2_16::angle#16 +(word) atan2_16::angle#17 +(word) atan2_16::angle#18 +(word) atan2_16::angle#19 +(word) atan2_16::angle#2 +(word) atan2_16::angle#20 +(word) atan2_16::angle#3 +(word) atan2_16::angle#4 +(word) atan2_16::angle#5 +(word) atan2_16::angle#6 +(word) atan2_16::angle#7 +(word) atan2_16::angle#8 +(word) atan2_16::angle#9 +(byte) atan2_16::i +(byte) atan2_16::i#0 +(byte) atan2_16::i#1 +(byte) atan2_16::i#10 +(byte) atan2_16::i#11 +(byte) atan2_16::i#2 +(byte) atan2_16::i#3 +(byte) atan2_16::i#4 +(byte) atan2_16::i#5 +(byte) atan2_16::i#6 +(byte) atan2_16::i#7 +(byte) atan2_16::i#8 +(byte) atan2_16::i#9 +(word) atan2_16::return +(word) atan2_16::return#0 +(word) atan2_16::return#1 +(word) atan2_16::return#2 +(word) atan2_16::return#3 +(word) atan2_16::return#4 +(byte) atan2_16::shift +(byte) atan2_16::shift#0 +(byte) atan2_16::shift#1 +(byte) atan2_16::shift#2 +(byte) atan2_16::shift#3 +(byte) atan2_16::shift#4 +(signed word) atan2_16::x +(signed word) atan2_16::x#0 +(signed word) atan2_16::x#1 +(signed word) atan2_16::x#10 +(signed word) atan2_16::x#11 +(signed word) atan2_16::x#12 +(signed word) atan2_16::x#13 +(signed word) atan2_16::x#14 +(signed word) atan2_16::x#15 +(signed word) atan2_16::x#16 +(signed word) atan2_16::x#17 +(signed word) atan2_16::x#18 +(signed word) atan2_16::x#2 +(signed word) atan2_16::x#3 +(signed word) atan2_16::x#4 +(signed word) atan2_16::x#5 +(signed word) atan2_16::x#6 +(signed word) atan2_16::x#7 +(signed word) atan2_16::x#8 +(signed word) atan2_16::x#9 +(signed word) atan2_16::xd +(signed word) atan2_16::xd#0 +(signed word) atan2_16::xd#1 +(signed word) atan2_16::xd#2 +(signed word) atan2_16::xd#3 +(signed word) atan2_16::xd#4 +(signed word) atan2_16::xd#5 +(signed word) atan2_16::xd#6 +(signed word) atan2_16::xd#7 +(signed word) atan2_16::xd#8 +(signed word) atan2_16::xd#9 +(signed word) atan2_16::xi +(signed word) atan2_16::xi#0 +(signed word) atan2_16::xi#1 +(signed word) atan2_16::xi#10 +(signed word) atan2_16::xi#11 +(signed word) atan2_16::xi#12 +(signed word) atan2_16::xi#2 +(signed word) atan2_16::xi#3 +(signed word) atan2_16::xi#4 +(signed word) atan2_16::xi#5 +(signed word) atan2_16::xi#6 +(signed word) atan2_16::xi#7 +(signed word) atan2_16::xi#8 +(signed word) atan2_16::xi#9 +(signed word) atan2_16::y +(signed word) atan2_16::y#0 +(signed word) atan2_16::y#1 +(signed word) atan2_16::y#10 +(signed word) atan2_16::y#11 +(signed word) atan2_16::y#12 +(signed word) atan2_16::y#13 +(signed word) atan2_16::y#14 +(signed word) atan2_16::y#15 +(signed word) atan2_16::y#16 +(signed word) atan2_16::y#17 +(signed word) atan2_16::y#18 +(signed word) atan2_16::y#19 +(signed word) atan2_16::y#2 +(signed word) atan2_16::y#20 +(signed word) atan2_16::y#3 +(signed word) atan2_16::y#4 +(signed word) atan2_16::y#5 +(signed word) atan2_16::y#6 +(signed word) atan2_16::y#7 +(signed word) atan2_16::y#8 +(signed word) atan2_16::y#9 +(signed word) atan2_16::yd +(signed word) atan2_16::yd#0 +(signed word) atan2_16::yd#1 +(signed word) atan2_16::yd#2 +(signed word) atan2_16::yd#3 +(signed word) atan2_16::yd#4 +(signed word) atan2_16::yd#5 +(signed word) atan2_16::yd#6 +(signed word) atan2_16::yd#7 +(signed word) atan2_16::yd#8 +(signed word) atan2_16::yd#9 +(signed word) atan2_16::yi +(signed word) atan2_16::yi#0 +(signed word) atan2_16::yi#1 +(signed word) atan2_16::yi#10 +(signed word) atan2_16::yi#11 +(signed word) atan2_16::yi#12 +(signed word) atan2_16::yi#13 +(signed word) atan2_16::yi#14 +(signed word) atan2_16::yi#15 +(signed word) atan2_16::yi#2 +(signed word) atan2_16::yi#3 +(signed word) atan2_16::yi#4 +(signed word) atan2_16::yi#5 +(signed word) atan2_16::yi#6 +(signed word) atan2_16::yi#7 +(signed word) atan2_16::yi#8 +(signed word) atan2_16::yi#9 (struct ProcessingChar()) getCharToProcess() (bool~) getCharToProcess::$0 (bool~) getCharToProcess::$1 @@ -1922,56 +1789,10 @@ SYMBOL TABLE SSA (byte*) heap_head#1 (byte*) heap_head#10 (byte*) heap_head#11 -(byte*) heap_head#12 -(byte*) heap_head#13 -(byte*) heap_head#14 -(byte*) heap_head#15 -(byte*) heap_head#16 -(byte*) heap_head#17 -(byte*) heap_head#18 -(byte*) heap_head#19 (byte*) heap_head#2 -(byte*) heap_head#20 -(byte*) heap_head#21 -(byte*) heap_head#22 -(byte*) heap_head#23 -(byte*) heap_head#24 -(byte*) heap_head#25 -(byte*) heap_head#26 -(byte*) heap_head#27 -(byte*) heap_head#28 -(byte*) heap_head#29 (byte*) heap_head#3 -(byte*) heap_head#30 -(byte*) heap_head#31 -(byte*) heap_head#32 -(byte*) heap_head#33 -(byte*) heap_head#34 -(byte*) heap_head#35 -(byte*) heap_head#36 -(byte*) heap_head#37 -(byte*) heap_head#38 -(byte*) heap_head#39 (byte*) heap_head#4 -(byte*) heap_head#40 -(byte*) heap_head#41 -(byte*) heap_head#42 -(byte*) heap_head#43 -(byte*) heap_head#44 -(byte*) heap_head#45 -(byte*) heap_head#46 -(byte*) heap_head#47 -(byte*) heap_head#48 -(byte*) heap_head#49 (byte*) heap_head#5 -(byte*) heap_head#50 -(byte*) heap_head#51 -(byte*) heap_head#52 -(byte*) heap_head#53 -(byte*) heap_head#54 -(byte*) heap_head#55 -(byte*) heap_head#56 -(byte*) heap_head#57 (byte*) heap_head#6 (byte*) heap_head#7 (byte*) heap_head#8 @@ -1994,157 +1815,71 @@ SYMBOL TABLE SSA (byte*) initSprites::sp#0 (byte*) initSprites::sp#1 (byte*) initSprites::sp#2 -(void()) init_dist_screen((byte*) init_dist_screen::screen) -(byte*~) init_dist_screen::$1 -(number~) init_dist_screen::$10 -(bool~) init_dist_screen::$11 -(number~) init_dist_screen::$12 -(number~) init_dist_screen::$13 -(number~) init_dist_screen::$14 -(number~) init_dist_screen::$15 -(number~) init_dist_screen::$16 -(word~) init_dist_screen::$17 -(word~) init_dist_screen::$18 -(byte~) init_dist_screen::$19 -(number~) init_dist_screen::$2 -(bool~) init_dist_screen::$20 -(bool~) init_dist_screen::$21 -(bool~) init_dist_screen::$3 -(number~) init_dist_screen::$4 -(number~) init_dist_screen::$5 -(number~) init_dist_screen::$6 -(number~) init_dist_screen::$7 -(number~) init_dist_screen::$8 -(word~) init_dist_screen::$9 -(label) init_dist_screen::@1 -(label) init_dist_screen::@11 -(label) init_dist_screen::@15 -(label) init_dist_screen::@16 -(label) init_dist_screen::@17 -(label) init_dist_screen::@18 -(label) init_dist_screen::@2 -(label) init_dist_screen::@3 -(label) init_dist_screen::@4 -(label) init_dist_screen::@5 -(label) init_dist_screen::@6 -(label) init_dist_screen::@7 -(label) init_dist_screen::@8 -(label) init_dist_screen::@return -(byte) init_dist_screen::d -(byte) init_dist_screen::d#0 -(word) init_dist_screen::ds -(word) init_dist_screen::ds#0 -(byte*) init_dist_screen::screen -(byte*) init_dist_screen::screen#0 -(byte*) init_dist_screen::screen#1 -(byte*) init_dist_screen::screen#2 -(byte*) init_dist_screen::screen_bottomline -(byte*) init_dist_screen::screen_bottomline#0 -(byte*) init_dist_screen::screen_bottomline#1 -(byte*) init_dist_screen::screen_bottomline#10 -(byte*) init_dist_screen::screen_bottomline#11 -(byte*) init_dist_screen::screen_bottomline#12 -(byte*) init_dist_screen::screen_bottomline#13 -(byte*) init_dist_screen::screen_bottomline#2 -(byte*) init_dist_screen::screen_bottomline#3 -(byte*) init_dist_screen::screen_bottomline#4 -(byte*) init_dist_screen::screen_bottomline#5 -(byte*) init_dist_screen::screen_bottomline#6 -(byte*) init_dist_screen::screen_bottomline#7 -(byte*) init_dist_screen::screen_bottomline#8 -(byte*) init_dist_screen::screen_bottomline#9 -(byte*) init_dist_screen::screen_topline -(byte*) init_dist_screen::screen_topline#0 -(byte*) init_dist_screen::screen_topline#1 -(byte*) init_dist_screen::screen_topline#10 -(byte*) init_dist_screen::screen_topline#11 -(byte*) init_dist_screen::screen_topline#12 -(byte*) init_dist_screen::screen_topline#13 -(byte*) init_dist_screen::screen_topline#2 -(byte*) init_dist_screen::screen_topline#3 -(byte*) init_dist_screen::screen_topline#4 -(byte*) init_dist_screen::screen_topline#5 -(byte*) init_dist_screen::screen_topline#6 -(byte*) init_dist_screen::screen_topline#7 -(byte*) init_dist_screen::screen_topline#8 -(byte*) init_dist_screen::screen_topline#9 -(byte) init_dist_screen::x -(byte) init_dist_screen::x#0 -(byte) init_dist_screen::x#1 -(byte) init_dist_screen::x#2 -(byte) init_dist_screen::x#3 -(byte) init_dist_screen::x#4 -(byte) init_dist_screen::x#5 -(byte) init_dist_screen::x#6 -(byte) init_dist_screen::x#7 -(byte) init_dist_screen::x2 -(byte) init_dist_screen::x2#0 -(byte) init_dist_screen::x2#1 -(byte) init_dist_screen::x2#2 -(byte) init_dist_screen::xb -(byte) init_dist_screen::xb#0 -(byte) init_dist_screen::xb#1 -(byte) init_dist_screen::xb#2 -(byte) init_dist_screen::xb#3 -(byte) init_dist_screen::xb#4 -(byte) init_dist_screen::xb#5 -(byte) init_dist_screen::xb#6 -(byte) init_dist_screen::xb#7 -(byte) init_dist_screen::xd -(byte) init_dist_screen::xd#0 -(word) init_dist_screen::xds -(word) init_dist_screen::xds#0 -(byte) init_dist_screen::y -(byte) init_dist_screen::y#0 -(byte) init_dist_screen::y#1 -(byte) init_dist_screen::y#10 -(byte) init_dist_screen::y#11 -(byte) init_dist_screen::y#12 -(byte) init_dist_screen::y#13 -(byte) init_dist_screen::y#2 -(byte) init_dist_screen::y#3 -(byte) init_dist_screen::y#4 -(byte) init_dist_screen::y#5 -(byte) init_dist_screen::y#6 -(byte) init_dist_screen::y#7 -(byte) init_dist_screen::y#8 -(byte) init_dist_screen::y#9 -(byte) init_dist_screen::y2 -(byte) init_dist_screen::y2#0 -(byte) init_dist_screen::y2#1 -(byte) init_dist_screen::y2#2 -(byte) init_dist_screen::yd -(byte) init_dist_screen::yd#0 -(word) init_dist_screen::yds -(word) init_dist_screen::yds#0 -(word) init_dist_screen::yds#1 -(word) init_dist_screen::yds#2 -(word) init_dist_screen::yds#3 -(word) init_dist_screen::yds#4 -(word) init_dist_screen::yds#5 -(word) init_dist_screen::yds#6 -(void()) init_squares() -(byte~) init_squares::$0 -(void*~) init_squares::$1 -(number~) init_squares::$2 -(number~) init_squares::$3 -(number~) init_squares::$4 -(bool~) init_squares::$5 -(label) init_squares::@1 -(label) init_squares::@3 -(label) init_squares::@return -(byte) init_squares::i -(byte) init_squares::i#0 -(byte) init_squares::i#1 -(byte) init_squares::i#2 -(word) init_squares::sqr -(word) init_squares::sqr#0 -(word) init_squares::sqr#1 -(word) init_squares::sqr#2 -(word*) init_squares::squares -(word*) init_squares::squares#0 -(word*) init_squares::squares#1 -(word*) init_squares::squares#2 +(void()) init_angle_screen((byte*) init_angle_screen::screen) +(byte*~) init_angle_screen::$0 +(byte*~) init_angle_screen::$1 +(number~) init_angle_screen::$10 +(number~) init_angle_screen::$11 +(byte~) init_angle_screen::$12 +(number~) init_angle_screen::$13 +(number~) init_angle_screen::$14 +(bool~) init_angle_screen::$15 +(bool~) init_angle_screen::$16 +(number~) init_angle_screen::$2 +(number~) init_angle_screen::$3 +(word~) init_angle_screen::$4 +(signed word~) init_angle_screen::$5 +(number~) init_angle_screen::$6 +(word~) init_angle_screen::$7 +(signed word~) init_angle_screen::$8 +(word~) init_angle_screen::$9 +(label) init_angle_screen::@1 +(label) init_angle_screen::@2 +(label) init_angle_screen::@3 +(label) init_angle_screen::@5 +(label) init_angle_screen::@return +(byte) init_angle_screen::ang_w +(byte) init_angle_screen::ang_w#0 +(word) init_angle_screen::angle_w +(word) init_angle_screen::angle_w#0 +(byte*) init_angle_screen::screen +(byte*) init_angle_screen::screen#0 +(byte*) init_angle_screen::screen#1 +(byte*) init_angle_screen::screen_bottomline +(byte*) init_angle_screen::screen_bottomline#0 +(byte*) init_angle_screen::screen_bottomline#1 +(byte*) init_angle_screen::screen_bottomline#2 +(byte*) init_angle_screen::screen_bottomline#3 +(byte*) init_angle_screen::screen_bottomline#4 +(byte*) init_angle_screen::screen_bottomline#5 +(byte*) init_angle_screen::screen_topline +(byte*) init_angle_screen::screen_topline#0 +(byte*) init_angle_screen::screen_topline#1 +(byte*) init_angle_screen::screen_topline#2 +(byte*) init_angle_screen::screen_topline#3 +(byte*) init_angle_screen::screen_topline#4 +(byte*) init_angle_screen::screen_topline#5 +(byte) init_angle_screen::x +(byte) init_angle_screen::x#0 +(byte) init_angle_screen::x#1 +(byte) init_angle_screen::x#2 +(byte) init_angle_screen::x#3 +(byte) init_angle_screen::xb +(byte) init_angle_screen::xb#0 +(byte) init_angle_screen::xb#1 +(byte) init_angle_screen::xb#2 +(byte) init_angle_screen::xb#3 +(signed word) init_angle_screen::xw +(signed word) init_angle_screen::xw#0 +(byte) init_angle_screen::y +(byte) init_angle_screen::y#0 +(byte) init_angle_screen::y#1 +(byte) init_angle_screen::y#2 +(byte) init_angle_screen::y#3 +(byte) init_angle_screen::y#4 +(byte) init_angle_screen::y#5 +(signed word) init_angle_screen::yw +(signed word) init_angle_screen::yw#0 interrupt(HARDWARE_ALL)(void()) irqBottom() (bool~) irqBottom::$0 (bool~) irqBottom::$2 @@ -2253,13 +1988,10 @@ interrupt(HARDWARE_ALL)(void()) irqTop() (void*) malloc::return#4 (void*) malloc::return#5 (void*) malloc::return#6 -(void*) malloc::return#7 -(void*) malloc::return#8 (word) malloc::size (word) malloc::size#0 (word) malloc::size#1 (word) malloc::size#2 -(word) malloc::size#3 (void()) processChars() (bool~) processChars::$0 (number~) processChars::$1 @@ -2423,41 +2155,6 @@ interrupt(HARDWARE_ALL)(void()) irqTop() (word) setupRasterIrq::raster#2 (word) setupRasterIrq::raster#3 (word) setupRasterIrq::raster#4 -(word()) sqr((byte) sqr::val) -(byte~) sqr::$0 -(label) sqr::@return -(word) sqr::return -(word) sqr::return#0 -(word) sqr::return#1 -(word) sqr::return#2 -(word) sqr::return#3 -(word) sqr::return#4 -(word) sqr::return#5 -(word) sqr::return#6 -(byte) sqr::val -(byte) sqr::val#0 -(byte) sqr::val#1 -(byte) sqr::val#2 -(byte()) sqrt((word) sqrt::val) -(word*~) sqrt::$0 -(word~) sqrt::$1 -(byte~) sqrt::$2 -(word~) sqrt::$3 -(label) sqrt::@2 -(label) sqrt::@return -(word*) sqrt::found -(word*) sqrt::found#0 -(byte) sqrt::return -(byte) sqrt::return#0 -(byte) sqrt::return#1 -(byte) sqrt::return#2 -(byte) sqrt::return#3 -(byte) sqrt::return#4 -(byte) sqrt::sq -(byte) sqrt::sq#0 -(word) sqrt::val -(word) sqrt::val#0 -(word) sqrt::val#1 (void()) startProcessing((byte) startProcessing::center_x , (byte) startProcessing::center_y , (byte) startProcessing::center_dist) (word~) startProcessing::$0 (number~) startProcessing::$1 @@ -2586,23 +2283,29 @@ interrupt(HARDWARE_ALL)(void()) irqTop() (word) startProcessing::spriteY (word) startProcessing::spriteY#0 -Adding number conversion cast (unumber) 0 in (bool~) bsearch16u::$5 ← (byte) bsearch16u::num#3 > (number) 0 -Adding number conversion cast (unumber) 1 in (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#4 >> (number) 1 -Adding number conversion cast (snumber) 0 in (bool~) bsearch16u::$11 ← (signed word) bsearch16u::result#0 == (number) 0 -Adding number conversion cast (snumber) 0 in (bool~) bsearch16u::$13 ← (signed word) bsearch16u::result#1 > (number) 0 -Adding number conversion cast (unumber) 1 in (byte) bsearch16u::num#0 ← (byte) bsearch16u::num#5 >> (number) 1 -Adding number conversion cast (unumber) 1 in (number~) bsearch16u::$17 ← (number) 1 * (const byte) SIZEOF_WORD -Adding number conversion cast (unumber) bsearch16u::$17 in (number~) bsearch16u::$17 ← (unumber)(number) 1 * (const byte) SIZEOF_WORD -Adding number conversion cast (unumber) 1 in (number~) bsearch16u::$18 ← (number) 1 * (const byte) SIZEOF_WORD -Adding number conversion cast (unumber) bsearch16u::$18 in (number~) bsearch16u::$18 ← (unumber)(number) 1 * (const byte) SIZEOF_WORD -Adding number conversion cast (unumber) $ff in (byte) NUM_SQUARES#0 ← (number) $ff -Adding number conversion cast (unumber) 0 in (word) init_squares::sqr#0 ← (number) 0 -Adding number conversion cast (unumber) 1 in (number~) init_squares::$2 ← (byte) NUM_SQUARES#7 - (number) 1 -Adding number conversion cast (unumber) init_squares::$2 in (number~) init_squares::$2 ← (byte) NUM_SQUARES#7 - (unumber)(number) 1 -Adding number conversion cast (unumber) 2 in (number~) init_squares::$3 ← (byte) init_squares::i#2 * (number) 2 -Adding number conversion cast (unumber) init_squares::$3 in (number~) init_squares::$3 ← (byte) init_squares::i#2 * (unumber)(number) 2 -Adding number conversion cast (unumber) 1 in (number~) init_squares::$4 ← (unumber~) init_squares::$3 + (number) 1 -Adding number conversion cast (unumber) init_squares::$4 in (number~) init_squares::$4 ← (unumber~) init_squares::$3 + (unumber)(number) 1 +Fixing inline constructor with init_angle_screen::$17 ← (byte)init_angle_screen::$3 w= (byte)0 +Fixing inline constructor with init_angle_screen::$18 ← (byte)init_angle_screen::$6 w= (byte)0 +Successful SSA optimization Pass2FixInlineConstructorsNew +Adding number conversion cast (unumber) $f in (byte) CORDIC_ITERATIONS_16#0 ← (number) $f +Adding number conversion cast (snumber) 0 in (bool~) atan2_16::$0 ← (signed word) atan2_16::y#1 >= (number) 0 +Adding number conversion cast (snumber) 0 in (bool~) atan2_16::$5 ← (signed word) atan2_16::x#1 >= (number) 0 +Adding number conversion cast (unumber) 0 in (word) atan2_16::angle#0 ← (number) 0 +Adding number conversion cast (unumber) 1 in (number~) atan2_16::$16 ← (byte) CORDIC_ITERATIONS_16#0 - (number) 1 +Adding number conversion cast (unumber) atan2_16::$16 in (number~) atan2_16::$16 ← (byte) CORDIC_ITERATIONS_16#0 - (unumber)(number) 1 +Adding number conversion cast (snumber) 0 in (bool~) atan2_16::$17 ← (signed word) atan2_16::yi#3 == (number) 0 +Adding number conversion cast (unumber) 2 in (word) atan2_16::angle#1 ← (word) atan2_16::angle#6 / (number) 2 +Adding number conversion cast (snumber) 0 in (bool~) atan2_16::$10 ← (signed word) atan2_16::x#4 < (number) 0 +Adding number conversion cast (unumber) 2 in (bool~) atan2_16::$19 ← (byte) atan2_16::shift#2 >= (number) 2 +Adding number conversion cast (snumber) 2 in (signed word) atan2_16::xd#1 ← (signed word) atan2_16::xd#3 >> (number) 2 +Adding number conversion cast (snumber) 2 in (signed word) atan2_16::yd#1 ← (signed word) atan2_16::yd#3 >> (number) 2 +Adding number conversion cast (unumber) 2 in (byte) atan2_16::shift#1 ← (byte) atan2_16::shift#3 - (number) 2 +Adding number conversion cast (unumber) 0 in (bool~) atan2_16::$25 ← (number) 0 != (byte) atan2_16::shift#4 +Adding number conversion cast (snumber) 0 in (bool~) atan2_16::$21 ← (signed word) atan2_16::yi#5 >= (number) 0 +Adding number conversion cast (snumber) 1 in (signed word) atan2_16::xd#2 ← (signed word) atan2_16::xd#4 >> (number) 1 +Adding number conversion cast (snumber) 1 in (signed word) atan2_16::yd#2 ← (signed word) atan2_16::yd#4 >> (number) 1 +Adding number conversion cast (snumber) 0 in (bool~) atan2_16::$13 ← (signed word) atan2_16::y#4 < (number) 0 +Adding number conversion cast (unumber) $8000 in (number~) atan2_16::$12 ← (number) $8000 - (word) atan2_16::angle#9 +Adding number conversion cast (unumber) atan2_16::$12 in (number~) atan2_16::$12 ← (unumber)(number) $8000 - (word) atan2_16::angle#9 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) $31 in (byte) PROCPORT_RAM_CHARROM#0 ← (number) $31 @@ -2616,8 +2319,8 @@ Adding number conversion cast (unumber) $7f in (byte) CIA_INTERRUPT_CLEAR#0 ← 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) $3e8 in (word) malloc::size#0 ← (number) $3e8 Adding number conversion cast (unumber) $3e8 in (word) malloc::size#1 ← (number) $3e8 -Adding number conversion cast (unumber) $3e8 in (word) malloc::size#2 ← (number) $3e8 Adding number conversion cast (unumber) 8 in (byte) NUM_PROCESSING#0 ← (number) 8 Adding number conversion cast (unumber) $ff in (byte) NOT_FOUND#0 ← (number) $ff Adding number conversion cast (unumber) $3e8 in (byte*~) main::$5 ← (byte*) SCREEN#0 + (number) $3e8 @@ -2699,48 +2402,26 @@ Adding number conversion cast (unumber) 8 in (number~) processChars::$31 ← (by Adding number conversion cast (unumber) processChars::$31 in (number~) processChars::$31 ← (byte) BORDER_YPOS_TOP#0 / (unumber)(number) 8 Adding number conversion cast (unumber) processChars::$32 in (number~) processChars::$32 ← (byte~) processChars::$30 - (unumber~) processChars::$31 Adding number conversion cast (unumber) $3e7 in (byte*~) processChars::$35 ← (byte*) SCREEN#0 + (number) $3e7 -Adding number conversion cast (unumber) $30 in (byte) NUM_SQUARES#3 ← (number) $30 -Adding number conversion cast (unumber) $28*$18 in (byte*~) init_dist_screen::$1 ← (byte*) init_dist_screen::screen#1 + (number) $28*(number) $18 -Adding number conversion cast (unumber) 2 in (number~) init_dist_screen::$2 ← (byte) init_dist_screen::y#2 * (number) 2 -Adding number conversion cast (unumber) init_dist_screen::$2 in (number~) init_dist_screen::$2 ← (byte) init_dist_screen::y#2 * (unumber)(number) 2 -Adding number conversion cast (unumber) $18 in (bool~) init_dist_screen::$3 ← (byte) init_dist_screen::y2#0 >= (number) $18 -Adding number conversion cast (unumber) $18 in (number~) init_dist_screen::$6 ← (byte) init_dist_screen::y2#1 - (number) $18 -Adding number conversion cast (unumber) init_dist_screen::$6 in (number~) init_dist_screen::$6 ← (byte) init_dist_screen::y2#1 - (unumber)(number) $18 -Adding number conversion cast (unumber) init_dist_screen::$7 in (number~) init_dist_screen::$7 ← (unumber~) init_dist_screen::$6 -Adding number conversion cast (unumber) $18 in (number~) init_dist_screen::$4 ← (number) $18 - (byte) init_dist_screen::y2#2 -Adding number conversion cast (unumber) init_dist_screen::$4 in (number~) init_dist_screen::$4 ← (unumber)(number) $18 - (byte) init_dist_screen::y2#2 -Adding number conversion cast (unumber) init_dist_screen::$5 in (number~) init_dist_screen::$5 ← (unumber~) init_dist_screen::$4 -Adding number conversion cast (unumber) init_dist_screen::$8 in (byte*) heap_head#52 ← phi( init_dist_screen::@2/(byte*) heap_head#54 init_dist_screen::@3/(byte*) heap_head#55 ) - (byte) init_dist_screen::y#11 ← phi( init_dist_screen::@2/(byte) init_dist_screen::y#12 init_dist_screen::@3/(byte) init_dist_screen::y#13 ) - (byte*) init_dist_screen::screen_bottomline#10 ← phi( init_dist_screen::@2/(byte*) init_dist_screen::screen_bottomline#11 init_dist_screen::@3/(byte*) init_dist_screen::screen_bottomline#12 ) - (byte*) init_dist_screen::screen_topline#10 ← phi( init_dist_screen::@2/(byte*) init_dist_screen::screen_topline#11 init_dist_screen::@3/(byte*) init_dist_screen::screen_topline#12 ) - (byte) NUM_SQUARES#36 ← phi( init_dist_screen::@2/(byte) NUM_SQUARES#39 init_dist_screen::@3/(byte) NUM_SQUARES#40 ) - (word*) SQUARES#18 ← phi( init_dist_screen::@2/(word*) SQUARES#27 init_dist_screen::@3/(word*) SQUARES#28 ) - (number~) init_dist_screen::$8 ← phi( init_dist_screen::@2/(unumber~) init_dist_screen::$7 init_dist_screen::@3/(unumber~) init_dist_screen::$5 ) -Adding number conversion cast (unumber) 0 in (byte) init_dist_screen::x#0 ← (number) 0 -Adding number conversion cast (unumber) $27 in (byte) init_dist_screen::xb#0 ← (number) $27 -Adding number conversion cast (unumber) 2 in (number~) init_dist_screen::$10 ← (byte) init_dist_screen::x#2 * (number) 2 -Adding number conversion cast (unumber) init_dist_screen::$10 in (number~) init_dist_screen::$10 ← (byte) init_dist_screen::x#2 * (unumber)(number) 2 -Adding number conversion cast (unumber) $27 in (bool~) init_dist_screen::$11 ← (byte) init_dist_screen::x2#0 >= (number) $27 -Adding number conversion cast (unumber) $27 in (number~) init_dist_screen::$14 ← (byte) init_dist_screen::x2#1 - (number) $27 -Adding number conversion cast (unumber) init_dist_screen::$14 in (number~) init_dist_screen::$14 ← (byte) init_dist_screen::x2#1 - (unumber)(number) $27 -Adding number conversion cast (unumber) init_dist_screen::$15 in (number~) init_dist_screen::$15 ← (unumber~) init_dist_screen::$14 -Adding number conversion cast (unumber) $27 in (number~) init_dist_screen::$12 ← (number) $27 - (byte) init_dist_screen::x2#2 -Adding number conversion cast (unumber) init_dist_screen::$12 in (number~) init_dist_screen::$12 ← (unumber)(number) $27 - (byte) init_dist_screen::x2#2 -Adding number conversion cast (unumber) init_dist_screen::$13 in (number~) init_dist_screen::$13 ← (unumber~) init_dist_screen::$12 -Adding number conversion cast (unumber) init_dist_screen::$16 in (byte*) heap_head#42 ← phi( init_dist_screen::@6/(byte*) heap_head#45 init_dist_screen::@7/(byte*) heap_head#46 ) - (byte) init_dist_screen::y#6 ← phi( init_dist_screen::@6/(byte) init_dist_screen::y#7 init_dist_screen::@7/(byte) init_dist_screen::y#8 ) - (byte) init_dist_screen::xb#4 ← phi( init_dist_screen::@6/(byte) init_dist_screen::xb#5 init_dist_screen::@7/(byte) init_dist_screen::xb#6 ) - (byte*) init_dist_screen::screen_bottomline#5 ← phi( init_dist_screen::@6/(byte*) init_dist_screen::screen_bottomline#6 init_dist_screen::@7/(byte*) init_dist_screen::screen_bottomline#7 ) - (byte) init_dist_screen::x#5 ← phi( init_dist_screen::@6/(byte) init_dist_screen::x#6 init_dist_screen::@7/(byte) init_dist_screen::x#7 ) - (byte*) init_dist_screen::screen_topline#5 ← phi( init_dist_screen::@6/(byte*) init_dist_screen::screen_topline#6 init_dist_screen::@7/(byte*) init_dist_screen::screen_topline#7 ) - (byte) NUM_SQUARES#19 ← phi( init_dist_screen::@6/(byte) NUM_SQUARES#24 init_dist_screen::@7/(byte) NUM_SQUARES#25 ) - (word) init_dist_screen::yds#2 ← phi( init_dist_screen::@6/(word) init_dist_screen::yds#3 init_dist_screen::@7/(word) init_dist_screen::yds#4 ) - (word*) SQUARES#19 ← phi( init_dist_screen::@6/(word*) SQUARES#29 init_dist_screen::@7/(word*) SQUARES#30 ) - (number~) init_dist_screen::$16 ← phi( init_dist_screen::@6/(unumber~) init_dist_screen::$15 init_dist_screen::@7/(unumber~) init_dist_screen::$13 ) -Adding number conversion cast (unumber) $13 in (bool~) init_dist_screen::$20 ← (byte) init_dist_screen::x#1 <= (number) $13 -Adding number conversion cast (unumber) $28 in (byte*) init_dist_screen::screen_topline#1 ← (byte*) init_dist_screen::screen_topline#3 + (number) $28 -Adding number conversion cast (unumber) $28 in (byte*) init_dist_screen::screen_bottomline#1 ← (byte*) init_dist_screen::screen_bottomline#3 - (number) $28 +Adding number conversion cast (unumber) $28*$c in (byte*~) init_angle_screen::$0 ← (byte*) init_angle_screen::screen#1 + (number) $28*(number) $c +Adding number conversion cast (unumber) $28*$c in (byte*~) init_angle_screen::$1 ← (byte*) init_angle_screen::screen#1 + (number) $28*(number) $c +Adding number conversion cast (unumber) 0 in (byte) init_angle_screen::x#0 ← (number) 0 +Adding number conversion cast (unumber) $27 in (byte) init_angle_screen::xb#0 ← (number) $27 +Adding number conversion cast (unumber) 2 in (number~) init_angle_screen::$2 ← (byte) init_angle_screen::x#2 * (number) 2 +Adding number conversion cast (unumber) init_angle_screen::$2 in (number~) init_angle_screen::$2 ← (byte) init_angle_screen::x#2 * (unumber)(number) 2 +Adding number conversion cast (unumber) $27 in (number~) init_angle_screen::$3 ← (number) $27 - (unumber~) init_angle_screen::$2 +Adding number conversion cast (unumber) init_angle_screen::$3 in (number~) init_angle_screen::$3 ← (unumber)(number) $27 - (unumber~) init_angle_screen::$2 +Adding number conversion cast (unumber) 2 in (number~) init_angle_screen::$6 ← (byte) init_angle_screen::y#2 * (number) 2 +Adding number conversion cast (unumber) init_angle_screen::$6 in (number~) init_angle_screen::$6 ← (byte) init_angle_screen::y#2 * (unumber)(number) 2 +Adding number conversion cast (unumber) $80 in (number~) init_angle_screen::$10 ← (word) init_angle_screen::angle_w#0 + (number) $80 +Adding number conversion cast (unumber) init_angle_screen::$10 in (number~) init_angle_screen::$10 ← (word) init_angle_screen::angle_w#0 + (unumber)(number) $80 +Adding number conversion cast (unumber) init_angle_screen::$11 in (number~) init_angle_screen::$11 ← > (unumber~) init_angle_screen::$10 +Adding number conversion cast (unumber) $80 in (number~) init_angle_screen::$13 ← (number) $80 + (byte) init_angle_screen::ang_w#0 +Adding number conversion cast (unumber) init_angle_screen::$13 in (number~) init_angle_screen::$13 ← (unumber)(number) $80 + (byte) init_angle_screen::ang_w#0 +Adding number conversion cast (unumber) $80 in (number~) init_angle_screen::$14 ← (number) $80 - (byte) init_angle_screen::ang_w#0 +Adding number conversion cast (unumber) init_angle_screen::$14 in (number~) init_angle_screen::$14 ← (unumber)(number) $80 - (byte) init_angle_screen::ang_w#0 +Adding number conversion cast (unumber) $13 in (bool~) init_angle_screen::$15 ← (byte) init_angle_screen::x#1 <= (number) $13 +Adding number conversion cast (unumber) $28 in (byte*) init_angle_screen::screen_topline#1 ← (byte*) init_angle_screen::screen_topline#3 - (number) $28 +Adding number conversion cast (unumber) $28 in (byte*) init_angle_screen::screen_bottomline#1 ← (byte*) init_angle_screen::screen_bottomline#3 + (number) $28 Adding number conversion cast (unumber) 0 in *((byte*) initSprites::sp#2) ← (number) 0 Adding number conversion cast (unumber) $40 in (number~) initSprites::$0 ← (byte) NUM_PROCESSING#0 * (number) $40 Adding number conversion cast (unumber) initSprites::$0 in (number~) initSprites::$0 ← (byte) NUM_PROCESSING#0 * (unumber)(number) $40 @@ -2755,12 +2436,8 @@ Adding number conversion cast (unumber) $ff in (byte) RASTER_IRQ_MIDDLE#0 ← (n Successful SSA optimization PassNAddNumberTypeConversions Inlining cast (byte*) HEAP_START#0 ← (byte*)(number) $c000 Inlining cast (void*) malloc::return#0 ← (void*)(byte*) malloc::mem#0 -Inlining cast (signed word~) bsearch16u::$8 ← (signed word)(word) bsearch16u::key#1 -Inlining cast (signed word~) bsearch16u::$9 ← (signed word)*((word*) bsearch16u::pivot#0) -Inlining cast (byte) NUM_SQUARES#0 ← (unumber)(number) $ff -Inlining cast (word*) SQUARES#1 ← (word*)(void*~) init_squares::$1 -Inlining cast (word) init_squares::sqr#0 ← (unumber)(number) 0 -Inlining cast (byte~) sqrt::$2 ← (byte)(word~) sqrt::$1 +Inlining cast (byte) CORDIC_ITERATIONS_16#0 ← (unumber)(number) $f +Inlining cast (word) atan2_16::angle#0 ← (unumber)(number) 0 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 @@ -2796,9 +2473,9 @@ Inlining cast (byte) BLUE#0 ← (unumber)(number) 6 Inlining cast (byte) LIGHT_BLUE#0 ← (unumber)(number) $e Inlining cast (byte*) SCREEN#0 ← (byte*)(number) $400 Inlining cast (byte*) SPRITE_DATA#0 ← (byte*)(number) $2000 -Inlining cast (word) malloc::size#1 ← (unumber)(number) $3e8 +Inlining cast (word) malloc::size#0 ← (unumber)(number) $3e8 Inlining cast (byte*) SCREEN_COPY#0 ← (byte*)(void*~) $0 -Inlining cast (word) malloc::size#2 ← (unumber)(number) $3e8 +Inlining cast (word) malloc::size#1 ← (unumber)(number) $3e8 Inlining cast (byte*) SCREEN_DIST#0 ← (byte*)(void*~) $1 Inlining cast (byte) NUM_PROCESSING#0 ← (unumber)(number) 8 Inlining cast (byte) NOT_FOUND#0 ← (unumber)(number) $ff @@ -2831,9 +2508,10 @@ Inlining cast (byte~) processChars::$14 ← (byte)(word) processChars::xpos#1 Inlining cast (byte~) processChars::$16 ← (byte)(word~) processChars::$15 Inlining cast (byte~) processChars::$26 ← (byte)(unumber~) processChars::$25 Inlining cast (byte~) processChars::$30 ← (byte)(unumber~) processChars::$29 -Inlining cast (byte) NUM_SQUARES#3 ← (unumber)(number) $30 -Inlining cast (byte) init_dist_screen::x#0 ← (unumber)(number) 0 -Inlining cast (byte) init_dist_screen::xb#0 ← (unumber)(number) $27 +Inlining cast (byte) init_angle_screen::x#0 ← (unumber)(number) 0 +Inlining cast (byte) init_angle_screen::xb#0 ← (unumber)(number) $27 +Inlining cast (signed word~) init_angle_screen::$5 ← (signed word)(word~) init_angle_screen::$4 +Inlining cast (signed word~) init_angle_screen::$8 ← (signed word)(word~) init_angle_screen::$7 Inlining cast *((byte*) initSprites::sp#2) ← (unumber)(number) 0 Inlining cast *((byte*) SPRITES_MC#0) ← (unumber)(number) 0 Inlining cast *((byte*) SPRITES_EXPAND_X#0) ← (unumber)(number) 0 @@ -2842,18 +2520,24 @@ 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*) 49152 +Simplifying constant integer cast $f +Simplifying constant integer cast 0 +Simplifying constant integer cast 0 Simplifying constant integer cast 0 Simplifying constant integer cast 1 Simplifying constant integer cast 0 -Simplifying constant integer cast 0 -Simplifying constant integer cast 1 -Simplifying constant integer cast 1 -Simplifying constant integer cast 1 -Simplifying constant integer cast $ff -Simplifying constant integer cast 0 -Simplifying constant integer cast 1 Simplifying constant integer cast 2 +Simplifying constant integer cast 0 +Simplifying constant integer cast 2 +Simplifying constant integer cast 2 +Simplifying constant integer cast 2 +Simplifying constant integer cast 2 +Simplifying constant integer cast 0 +Simplifying constant integer cast 0 Simplifying constant integer cast 1 +Simplifying constant integer cast 1 +Simplifying constant integer cast 0 +Simplifying constant integer cast $8000 Simplifying constant pointer cast (byte*) 0 Simplifying constant integer cast 7 Simplifying constant pointer cast (byte*) 1 @@ -2946,17 +2630,16 @@ Simplifying constant integer cast 8 Simplifying constant integer cast 8 Simplifying constant integer cast 8 Simplifying constant integer cast $3e7 -Simplifying constant integer cast $30 -Simplifying constant integer cast 2 -Simplifying constant integer cast $18 -Simplifying constant integer cast $18 -Simplifying constant integer cast $18 Simplifying constant integer cast 0 Simplifying constant integer cast $27 Simplifying constant integer cast 2 Simplifying constant integer cast $27 -Simplifying constant integer cast $27 -Simplifying constant integer cast $27 +Simplifying constant integer cast 0 +Simplifying constant integer cast 2 +Simplifying constant integer cast 0 +Simplifying constant integer cast $80 +Simplifying constant integer cast $80 +Simplifying constant integer cast $80 Simplifying constant integer cast $13 Simplifying constant integer cast $28 Simplifying constant integer cast $28 @@ -2971,18 +2654,24 @@ Simplifying constant integer cast $80 Simplifying constant integer cast $30 Simplifying constant integer cast $ff Successful SSA optimization PassNCastSimplification +Finalized unsigned number type (byte) $f +Finalized signed number type (signed byte) 0 +Finalized signed number type (signed byte) 0 Finalized unsigned number type (byte) 0 Finalized unsigned number type (byte) 1 Finalized signed number type (signed byte) 0 -Finalized signed number type (signed byte) 0 -Finalized unsigned number type (byte) 1 -Finalized unsigned number type (byte) 1 -Finalized unsigned number type (byte) 1 -Finalized unsigned number type (byte) $ff -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 signed number type (signed byte) 0 +Finalized unsigned number type (byte) 2 +Finalized signed number type (signed byte) 2 +Finalized signed number type (signed byte) 2 +Finalized unsigned number type (byte) 2 +Finalized unsigned number type (byte) 0 +Finalized signed number type (signed byte) 0 +Finalized signed number type (signed byte) 1 +Finalized signed number type (signed byte) 1 +Finalized signed number type (signed byte) 0 +Finalized unsigned number type (word) $8000 Finalized unsigned number type (byte) 7 Finalized unsigned number type (byte) $35 Finalized unsigned number type (byte) $31 @@ -3051,17 +2740,14 @@ Finalized unsigned number type (byte) 8 Finalized unsigned number type (byte) 8 Finalized unsigned number type (byte) 8 Finalized unsigned number type (word) $3e7 -Finalized unsigned number type (byte) $30 -Finalized unsigned number type (byte) 2 -Finalized unsigned number type (byte) $18 -Finalized unsigned number type (byte) $18 -Finalized unsigned number type (byte) $18 Finalized unsigned number type (byte) 0 Finalized unsigned number type (byte) $27 Finalized unsigned number type (byte) 2 Finalized unsigned number type (byte) $27 -Finalized unsigned number type (byte) $27 -Finalized unsigned number type (byte) $27 +Finalized unsigned number type (byte) 2 +Finalized unsigned number type (byte) $80 +Finalized unsigned number type (byte) $80 +Finalized unsigned number type (byte) $80 Finalized unsigned number type (byte) $13 Finalized unsigned number type (byte) $28 Finalized unsigned number type (byte) $28 @@ -3076,11 +2762,8 @@ 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~) bsearch16u::$17 ← (byte) 1 * (const byte) SIZEOF_WORD -Inferred type updated to byte in (unumber~) bsearch16u::$18 ← (byte) 1 * (const byte) SIZEOF_WORD -Inferred type updated to byte in (unumber~) init_squares::$2 ← (byte) NUM_SQUARES#7 - (byte) 1 -Inferred type updated to byte in (unumber~) init_squares::$3 ← (byte) init_squares::i#2 * (byte) 2 -Inferred type updated to byte in (unumber~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 +Inferred type updated to byte in (unumber~) atan2_16::$16 ← (byte) CORDIC_ITERATIONS_16#0 - (byte) 1 +Inferred type updated to word in (unumber~) atan2_16::$12 ← (word) $8000 - (word) atan2_16::angle#9 Inferred type updated to byte in (unumber~) main::$7 ← (byte) NUM_PROCESSING#0 - (byte) 1 Inferred type updated to word in (unumber~) getCharToProcess::$9 ← (word~) getCharToProcess::$8 * (byte) $28 Inferred type updated to byte in (unumber~) startProcessing::$24 ← (byte) NUM_PROCESSING#0 - (byte) 1 @@ -3109,89 +2792,86 @@ Inferred type updated to byte in (unumber~) processChars::$28 ← (byte~) proces Inferred type updated to byte in (unumber~) processChars::$29 ← (byte) processChars::ypos#1 / (byte) 8 Inferred type updated to byte in (unumber~) processChars::$31 ← (byte) BORDER_YPOS_TOP#0 / (byte) 8 Inferred type updated to byte in (unumber~) processChars::$32 ← (byte~) processChars::$30 - (byte~) processChars::$31 -Inferred type updated to byte in (unumber~) init_dist_screen::$2 ← (byte) init_dist_screen::y#2 * (byte) 2 -Inferred type updated to byte in (unumber~) init_dist_screen::$6 ← (byte) init_dist_screen::y2#1 - (byte) $18 -Inferred type updated to byte in (unumber~) init_dist_screen::$7 ← (byte~) init_dist_screen::$6 -Inferred type updated to byte in (unumber~) init_dist_screen::$4 ← (byte) $18 - (byte) init_dist_screen::y2#2 -Inferred type updated to byte in (unumber~) init_dist_screen::$5 ← (byte~) init_dist_screen::$4 -Inferred type updated to byte for (unumber~) init_dist_screen::$8 -Inferred type updated to byte in (unumber~) init_dist_screen::$10 ← (byte) init_dist_screen::x#2 * (byte) 2 -Inferred type updated to byte in (unumber~) init_dist_screen::$14 ← (byte) init_dist_screen::x2#1 - (byte) $27 -Inferred type updated to byte in (unumber~) init_dist_screen::$15 ← (byte~) init_dist_screen::$14 -Inferred type updated to byte in (unumber~) init_dist_screen::$12 ← (byte) $27 - (byte) init_dist_screen::x2#2 -Inferred type updated to byte in (unumber~) init_dist_screen::$13 ← (byte~) init_dist_screen::$12 -Inferred type updated to byte for (unumber~) init_dist_screen::$16 +Inferred type updated to byte in (unumber~) init_angle_screen::$2 ← (byte) init_angle_screen::x#2 * (byte) 2 +Inferred type updated to byte in (unumber~) init_angle_screen::$3 ← (byte) $27 - (byte~) init_angle_screen::$2 +Inferred type updated to byte in (unumber~) init_angle_screen::$6 ← (byte) init_angle_screen::y#2 * (byte) 2 +Inferred type updated to word in (unumber~) init_angle_screen::$10 ← (word) init_angle_screen::angle_w#0 + (byte) $80 +Inferred type updated to byte in (unumber~) init_angle_screen::$11 ← > (word~) init_angle_screen::$10 +Inferred type updated to byte in (unumber~) init_angle_screen::$13 ← (byte) $80 + (byte) init_angle_screen::ang_w#0 +Inferred type updated to byte in (unumber~) init_angle_screen::$14 ← (byte) $80 - (byte) init_angle_screen::ang_w#0 Inferred type updated to byte in (unumber~) initSprites::$0 ← (byte) NUM_PROCESSING#0 * (byte) $40 -Inversing boolean not [24] (bool~) bsearch16u::$12 ← (signed word) bsearch16u::result#0 != (signed byte) 0 from [23] (bool~) bsearch16u::$11 ← (signed word) bsearch16u::result#0 == (signed byte) 0 -Inversing boolean not [31] (bool~) bsearch16u::$14 ← (signed word) bsearch16u::result#1 <= (signed byte) 0 from [30] (bool~) bsearch16u::$13 ← (signed word) bsearch16u::result#1 > (signed byte) 0 -Inversing boolean not [225] (bool~) main::$11 ← (byte) main::center_dist#0 != (byte) NOT_FOUND#0 from [224] (bool~) main::$10 ← (byte) main::center_dist#0 == (byte) NOT_FOUND#0 -Inversing boolean not [257] (bool~) getCharToProcess::$3 ← *((byte*) getCharToProcess::screen_line#2 + (byte) getCharToProcess::x#2) == (byte) ' ' from [256] (bool~) getCharToProcess::$2 ← *((byte*) getCharToProcess::screen_line#2 + (byte) getCharToProcess::x#2) != (byte) ' ' -Inversing boolean not [266] (bool~) getCharToProcess::$5 ← (byte) getCharToProcess::dist#0 >= (byte) getCharToProcess::closest_dist#2 from [265] (bool~) getCharToProcess::$4 ← (byte) getCharToProcess::dist#0 < (byte) getCharToProcess::closest_dist#2 -Inversing boolean not [280] (bool~) getCharToProcess::$1 ← (byte) getCharToProcess::closest_dist#3 == (byte) NOT_FOUND#0 from [279] (bool~) getCharToProcess::$0 ← (byte) getCharToProcess::closest_dist#3 != (byte) NOT_FOUND#0 -Inversing boolean not [308] (bool~) startProcessing::$26 ← *((byte*) startProcessing::$41 + (byte~) startProcessing::$30) != (const byte) STATUS_FREE from [307] (bool~) startProcessing::$25 ← *((byte*) startProcessing::$41 + (byte~) startProcessing::$30) == (const byte) STATUS_FREE -Inversing boolean not [415] (bool~) processChars::$5 ← *((byte*) processChars::$41) == (const byte) STATUS_FREE from [414] (bool~) processChars::$4 ← *((byte*) processChars::$41) != (const byte) STATUS_FREE -Inversing boolean not [424] (bool~) processChars::$7 ← *((byte*) processChars::$42) != (const byte) STATUS_NEW from [423] (bool~) processChars::$6 ← *((byte*) processChars::$42) == (const byte) STATUS_NEW +Inversing boolean not [37] (bool~) atan2_16::$18 ← (signed word) atan2_16::yi#3 != (signed byte) 0 from [36] (bool~) atan2_16::$17 ← (signed word) atan2_16::yi#3 == (signed byte) 0 +Inversing boolean not [46] (bool~) atan2_16::$11 ← (signed word) atan2_16::x#4 >= (signed byte) 0 from [45] (bool~) atan2_16::$10 ← (signed word) atan2_16::x#4 < (signed byte) 0 +Inversing boolean not [57] (bool~) atan2_16::$20 ← (byte) 0 == (byte) atan2_16::shift#4 from [56] (bool~) atan2_16::$25 ← (byte) 0 != (byte) atan2_16::shift#4 +Inversing boolean not [81] (bool~) atan2_16::$14 ← (signed word) atan2_16::y#4 >= (signed byte) 0 from [80] (bool~) atan2_16::$13 ← (signed word) atan2_16::y#4 < (signed byte) 0 +Inversing boolean not [211] (bool~) main::$11 ← (byte) main::center_dist#0 != (byte) NOT_FOUND#0 from [210] (bool~) main::$10 ← (byte) main::center_dist#0 == (byte) NOT_FOUND#0 +Inversing boolean not [237] (bool~) getCharToProcess::$3 ← *((byte*) getCharToProcess::screen_line#2 + (byte) getCharToProcess::x#2) == (byte) ' ' from [236] (bool~) getCharToProcess::$2 ← *((byte*) getCharToProcess::screen_line#2 + (byte) getCharToProcess::x#2) != (byte) ' ' +Inversing boolean not [246] (bool~) getCharToProcess::$5 ← (byte) getCharToProcess::dist#0 >= (byte) getCharToProcess::closest_dist#2 from [245] (bool~) getCharToProcess::$4 ← (byte) getCharToProcess::dist#0 < (byte) getCharToProcess::closest_dist#2 +Inversing boolean not [260] (bool~) getCharToProcess::$1 ← (byte) getCharToProcess::closest_dist#3 == (byte) NOT_FOUND#0 from [259] (bool~) getCharToProcess::$0 ← (byte) getCharToProcess::closest_dist#3 != (byte) NOT_FOUND#0 +Inversing boolean not [288] (bool~) startProcessing::$26 ← *((byte*) startProcessing::$41 + (byte~) startProcessing::$30) != (const byte) STATUS_FREE from [287] (bool~) startProcessing::$25 ← *((byte*) startProcessing::$41 + (byte~) startProcessing::$30) == (const byte) STATUS_FREE +Inversing boolean not [395] (bool~) processChars::$5 ← *((byte*) processChars::$41) == (const byte) STATUS_FREE from [394] (bool~) processChars::$4 ← *((byte*) processChars::$41) != (const byte) STATUS_FREE +Inversing boolean not [404] (bool~) processChars::$7 ← *((byte*) processChars::$42) != (const byte) STATUS_NEW from [403] (bool~) processChars::$6 ← *((byte*) processChars::$42) == (const byte) STATUS_NEW Successful SSA optimization Pass2UnaryNotSimplification -Alias (byte*) HEAP_START#0 = (byte*) heap_head#0 (byte*) heap_head#35 (byte*) heap_head#31 (byte*) heap_head#23 -Alias (void*) malloc::return#0 = (void*) malloc::return#5 (void*) malloc::return#1 -Alias (byte*) heap_head#1 = (byte*) heap_head#13 (byte*) heap_head#2 -Alias (byte) bsearch16u::num#3 = (byte) bsearch16u::num#4 (byte) bsearch16u::num#8 (byte) bsearch16u::num#6 -Alias (word*) bsearch16u::items#2 = (word*) bsearch16u::items#6 (word*) bsearch16u::items#3 (word*) bsearch16u::items#9 (word*) bsearch16u::items#4 (word*~) bsearch16u::$3 (word*) bsearch16u::items#5 -Alias (word) bsearch16u::key#1 = (word) bsearch16u::key#3 (word) bsearch16u::key#2 (word) bsearch16u::key#7 (word) bsearch16u::key#6 -Alias (word*) bsearch16u::pivot#0 = (word*~) bsearch16u::$7 (word*) bsearch16u::pivot#3 (word*) bsearch16u::pivot#1 (word*) bsearch16u::return#0 (word*) bsearch16u::pivot#2 -Alias (signed word) bsearch16u::result#0 = (signed word~) bsearch16u::$10 (signed word) bsearch16u::result#1 -Alias (word*) bsearch16u::return#1 = (word*) bsearch16u::return#4 -Alias (word*) bsearch16u::items#0 = (word*~) bsearch16u::$15 -Alias (word*~) bsearch16u::$2 = (word*~) bsearch16u::$1 -Alias (word*) bsearch16u::return#2 = (word*~) bsearch16u::$4 -Alias (word) malloc::size#0 = (byte~) init_squares::$0 -Alias (void*) malloc::return#2 = (void*) malloc::return#6 -Alias (byte) NUM_SQUARES#6 = (byte) NUM_SQUARES#7 -Alias (byte*) heap_head#14 = (byte*) heap_head#3 -Alias (byte*) heap_head#15 = (byte*) heap_head#25 (byte*) heap_head#4 -Alias (word*) SQUARES#17 = (word*) SQUARES#8 (word*) SQUARES#2 -Alias (word) sqr::return#0 = (word) sqr::return#4 (word) sqr::return#1 -Alias (word*) bsearch16u::return#3 = (word*) bsearch16u::return#5 -Alias (word*) SQUARES#10 = (word*) SQUARES#11 -Alias (word*) sqrt::found#0 = (word*~) sqrt::$0 -Alias (byte) sqrt::return#0 = (byte) sqrt::sq#0 (byte~) sqrt::$2 (byte) sqrt::return#3 (byte) sqrt::return#1 -Alias (byte) NUM_SQUARES#0 = (byte) NUM_SQUARES#41 (byte) NUM_SQUARES#37 (byte) NUM_SQUARES#34 (byte) NUM_SQUARES#32 (byte) NUM_SQUARES#30 (byte) NUM_SQUARES#26 (byte) NUM_SQUARES#21 (byte) NUM_SQUARES#17 -Alias (word*) SQUARES#0 = (word*) SQUARES#48 (word*) SQUARES#46 (word*) SQUARES#44 (word*) SQUARES#43 (word*) SQUARES#41 (word*) SQUARES#37 (word*) SQUARES#32 (word*) SQUARES#25 -Alias (void*) malloc::return#3 = (void*) malloc::return#7 -Alias (byte*) heap_head#16 = (byte*) heap_head#5 -Alias (void*) malloc::return#4 = (void*) malloc::return#8 +Alias (byte*) HEAP_START#0 = (byte*) heap_head#0 (byte*) heap_head#11 (byte*) heap_head#10 (byte*) heap_head#9 +Alias (void*) malloc::return#0 = (void*) malloc::return#4 (void*) malloc::return#1 +Alias (byte*) heap_head#1 = (byte*) heap_head#6 (byte*) heap_head#2 +Alias (signed word) atan2_16::y#1 = (signed word) atan2_16::y#2 (signed word~) atan2_16::$3 (signed word) atan2_16::y#3 +Alias (signed word) atan2_16::x#5 = (signed word) atan2_16::x#9 (signed word) atan2_16::x#6 +Alias (signed word~) atan2_16::$2 = (signed word~) atan2_16::$1 +Alias (signed word) atan2_16::yi#0 = (signed word~) atan2_16::$4 (signed word) atan2_16::yi#12 (signed word) atan2_16::yi#13 +Alias (signed word) atan2_16::x#1 = (signed word) atan2_16::x#2 (signed word~) atan2_16::$8 (signed word) atan2_16::x#3 +Alias (signed word) atan2_16::y#12 = (signed word) atan2_16::y#15 (signed word) atan2_16::y#13 +Alias (signed word~) atan2_16::$7 = (signed word~) atan2_16::$6 +Alias (signed word) atan2_16::xi#0 = (signed word~) atan2_16::$9 +Alias (signed word) atan2_16::xi#3 = (signed word) atan2_16::xi#6 (signed word) atan2_16::xd#0 +Alias (signed word) atan2_16::yi#3 = (signed word) atan2_16::yi#4 (signed word) atan2_16::yd#0 +Alias (byte) atan2_16::i#2 = (byte) atan2_16::i#6 (byte) atan2_16::shift#0 +Alias (word) atan2_16::angle#12 = (word) atan2_16::angle#19 +Alias (signed word) atan2_16::x#17 = (signed word) atan2_16::x#7 +Alias (signed word) atan2_16::y#19 = (signed word) atan2_16::y#7 +Alias (signed word) atan2_16::xd#3 = (signed word) atan2_16::xd#7 (signed word) atan2_16::xd#8 (signed word) atan2_16::xd#4 +Alias (signed word) atan2_16::yd#3 = (signed word) atan2_16::yd#7 (signed word) atan2_16::yd#8 (signed word) atan2_16::yd#4 +Alias (byte) atan2_16::shift#2 = (byte) atan2_16::shift#3 (byte) atan2_16::shift#4 +Alias (signed word) atan2_16::yi#10 = (signed word) atan2_16::yi#15 (signed word) atan2_16::yi#14 (signed word) atan2_16::yi#11 +Alias (signed word) atan2_16::xi#10 = (signed word) atan2_16::xi#12 (signed word) atan2_16::xi#11 (signed word) atan2_16::xi#9 +Alias (byte) atan2_16::i#10 = (byte) atan2_16::i#11 (byte) atan2_16::i#8 (byte) atan2_16::i#9 +Alias (word) atan2_16::angle#16 = (word) atan2_16::angle#20 (word) atan2_16::angle#18 (word) atan2_16::angle#17 +Alias (signed word) atan2_16::x#14 = (signed word) atan2_16::x#18 (signed word) atan2_16::x#16 (signed word) atan2_16::x#15 +Alias (signed word) atan2_16::y#16 = (signed word) atan2_16::y#20 (signed word) atan2_16::y#18 (signed word) atan2_16::y#17 +Alias (signed word) atan2_16::xi#4 = (signed word) atan2_16::xi#7 (signed word) atan2_16::xi#5 +Alias (signed word) atan2_16::yd#5 = (signed word) atan2_16::yd#9 (signed word) atan2_16::yd#6 +Alias (signed word) atan2_16::yi#5 = (signed word) atan2_16::yi#6 (signed word) atan2_16::yi#7 +Alias (signed word) atan2_16::xd#5 = (signed word) atan2_16::xd#9 (signed word) atan2_16::xd#6 +Alias (byte) atan2_16::i#3 = (byte) atan2_16::i#7 (byte) atan2_16::i#4 +Alias (word) atan2_16::angle#14 = (word) atan2_16::angle#7 (word) atan2_16::angle#8 +Alias (signed word) atan2_16::x#11 = (signed word) atan2_16::x#13 (signed word) atan2_16::x#12 +Alias (signed word) atan2_16::y#10 = (signed word) atan2_16::y#14 (signed word) atan2_16::y#11 +Alias (word) atan2_16::angle#1 = (word) atan2_16::angle#9 +Alias (signed word) atan2_16::y#5 = (signed word) atan2_16::y#6 +Alias (word) atan2_16::angle#4 = (word~) atan2_16::$12 +Alias (word) atan2_16::return#0 = (word) atan2_16::angle#10 (word) atan2_16::return#3 (word) atan2_16::return#1 +Alias (word) atan2_16::angle#11 = (word) atan2_16::angle#15 +Alias (word) atan2_16::angle#5 = (word~) atan2_16::$15 +Alias (void*) malloc::return#2 = (void*) malloc::return#5 +Alias (byte*) heap_head#3 = (byte*) heap_head#7 +Alias (void*) malloc::return#3 = (void*) malloc::return#6 Alias (byte*) SCREEN_COPY#0 = (byte*) SCREEN_COPY#25 (byte*) SCREEN_COPY#23 (byte*) SCREEN_COPY#20 (byte*) SCREEN_COPY#14 (byte*) SCREEN_COPY#7 -Alias (byte*) heap_head#17 = (byte*) heap_head#6 (byte*) heap_head#43 (byte*) heap_head#39 (byte*) heap_head#34 (byte*) heap_head#30 +Alias (byte*) heap_head#4 = (byte*) heap_head#8 Alias (byte*) SCREEN_COPY#1 = (byte*) SCREEN_COPY#4 Alias (byte*) SCREEN_DIST#1 = (byte*) SCREEN_DIST#17 -Alias (byte) NUM_SQUARES#1 = (byte) NUM_SQUARES#9 -Alias (byte*) heap_head#18 = (byte*) heap_head#7 -Alias (word*) SQUARES#12 = (word*) SQUARES#3 Alias (byte*) SCREEN_COPY#24 = (byte*) SCREEN_COPY#26 Alias (byte*) SCREEN_DIST#15 = (byte*) SCREEN_DIST#16 -Alias (byte) NUM_SQUARES#44 = (byte) NUM_SQUARES#46 -Alias (byte*) heap_head#53 = (byte*) heap_head#56 -Alias (word*) SQUARES#50 = (word*) SQUARES#51 Alias (byte*) SCREEN_COPY#11 = (byte*) SCREEN_COPY#15 (byte*) SCREEN_COPY#21 (byte*) SCREEN_COPY#8 Alias (byte*) SCREEN_DIST#11 = (byte*) SCREEN_DIST#14 (byte*) SCREEN_DIST#8 (byte*) SCREEN_DIST#5 -Alias (byte) NUM_SQUARES#31 = (byte) NUM_SQUARES#38 (byte) NUM_SQUARES#42 (byte) NUM_SQUARES#35 -Alias (byte*) heap_head#44 = (byte*) heap_head#49 (byte*) heap_head#51 (byte*) heap_head#47 -Alias (word*) SQUARES#42 = (word*) SQUARES#47 (word*) SQUARES#49 (word*) SQUARES#45 Alias (void()*) setupRasterIrq::irqRoutine#0 = (void()*~) main::$2 Alias (byte) getCharToProcess::return_x#0 = (byte) getCharToProcess::return_x#3 Alias (byte) getCharToProcess::return_y#0 = (byte) getCharToProcess::return_y#3 Alias (byte) getCharToProcess::return_dist#0 = (byte) getCharToProcess::return_dist#3 -Alias (byte) NUM_SQUARES#22 = (byte) NUM_SQUARES#27 (byte) NUM_SQUARES#28 (byte) NUM_SQUARES#23 -Alias (byte*) heap_head#36 = (byte*) heap_head#40 (byte*) heap_head#41 (byte*) heap_head#37 -Alias (word*) SQUARES#33 = (word*) SQUARES#38 (word*) SQUARES#39 (word*) SQUARES#34 Alias (byte*) SCREEN_COPY#12 = (byte*) SCREEN_COPY#16 (byte*) SCREEN_COPY#5 (byte*) SCREEN_COPY#9 Alias (byte*) SCREEN_DIST#12 = (byte*) SCREEN_DIST#4 (byte*) SCREEN_DIST#9 (byte*) SCREEN_DIST#6 Alias (byte) main::center_x#0 = (byte) main::$9_x (byte) main::center_x#1 Alias (byte) main::center_y#0 = (byte) main::$9_y (byte) main::center_y#1 Alias (byte) main::center_dist#0 = (byte) main::$9_dist (byte) main::center_dist#1 -Alias (byte) NUM_SQUARES#10 = (byte) NUM_SQUARES#15 (byte) NUM_SQUARES#2 -Alias (byte*) heap_head#19 = (byte*) heap_head#27 (byte*) heap_head#8 -Alias (word*) SQUARES#13 = (word*) SQUARES#22 (word*) SQUARES#4 Alias (byte*) getCharToProcess::dist_line#2 = (byte*) getCharToProcess::dist_line#4 (byte*) getCharToProcess::dist_line#7 Alias (byte) getCharToProcess::x#2 = (byte) getCharToProcess::x#4 (byte) getCharToProcess::x#5 (byte) getCharToProcess::closest_x#1 Alias (byte) getCharToProcess::closest_dist#2 = (byte) getCharToProcess::closest_dist#5 @@ -3255,70 +2935,37 @@ Alias (word) processChars::xpos#1 = (word) processChars::xpos#2 Alias (byte) processChars::xchar#0 = (byte~) processChars::$28 Alias (byte) processChars::ychar#0 = (byte~) processChars::$32 Alias (byte) processChars::numActive#3 = (byte) processChars::numActive#6 (byte) processChars::numActive#8 -Alias (byte*) init_dist_screen::screen#1 = (byte*) init_dist_screen::screen#2 (byte*) init_dist_screen::screen_topline#0 -Alias (byte) NUM_SQUARES#3 = (byte) NUM_SQUARES#45 -Alias (byte*) heap_head#20 = (byte*) heap_head#9 -Alias (word*) SQUARES#14 = (word*) SQUARES#5 -Alias (byte*) init_dist_screen::screen_bottomline#0 = (byte*~) init_dist_screen::$1 -Alias (byte) init_dist_screen::y2#0 = (byte~) init_dist_screen::$2 (byte) init_dist_screen::y2#1 (byte) init_dist_screen::y2#2 -Alias (word*) SQUARES#27 = (word*) SQUARES#35 (word*) SQUARES#28 -Alias (byte) NUM_SQUARES#39 = (byte) NUM_SQUARES#43 (byte) NUM_SQUARES#40 -Alias (byte*) init_dist_screen::screen_topline#11 = (byte*) init_dist_screen::screen_topline#13 (byte*) init_dist_screen::screen_topline#12 -Alias (byte*) init_dist_screen::screen_bottomline#11 = (byte*) init_dist_screen::screen_bottomline#13 (byte*) init_dist_screen::screen_bottomline#12 -Alias (byte) init_dist_screen::y#12 = (byte) init_dist_screen::y#2 (byte) init_dist_screen::y#13 -Alias (byte*) heap_head#54 = (byte*) heap_head#57 (byte*) heap_head#55 -Alias (byte~) init_dist_screen::$7 = (byte~) init_dist_screen::$6 -Alias (byte~) init_dist_screen::$5 = (byte~) init_dist_screen::$4 -Alias (byte) init_dist_screen::yd#0 = (byte~) init_dist_screen::$8 -Alias (word) sqr::return#2 = (word) sqr::return#5 -Alias (word*) SQUARES#18 = (word*) SQUARES#40 -Alias (byte) NUM_SQUARES#33 = (byte) NUM_SQUARES#36 -Alias (byte*) init_dist_screen::screen_topline#10 = (byte*) init_dist_screen::screen_topline#9 -Alias (byte*) init_dist_screen::screen_bottomline#10 = (byte*) init_dist_screen::screen_bottomline#9 -Alias (byte) init_dist_screen::y#10 = (byte) init_dist_screen::y#11 -Alias (byte*) heap_head#50 = (byte*) heap_head#52 -Alias (word) init_dist_screen::yds#0 = (word~) init_dist_screen::$9 -Alias (byte) init_dist_screen::x2#0 = (byte~) init_dist_screen::$10 (byte) init_dist_screen::x2#1 (byte) init_dist_screen::x2#2 -Alias (word*) SQUARES#29 = (word*) SQUARES#36 (word*) SQUARES#30 -Alias (word) init_dist_screen::yds#3 = (word) init_dist_screen::yds#5 (word) init_dist_screen::yds#4 -Alias (byte) NUM_SQUARES#24 = (byte) NUM_SQUARES#29 (byte) NUM_SQUARES#25 -Alias (byte*) init_dist_screen::screen_topline#6 = (byte*) init_dist_screen::screen_topline#8 (byte*) init_dist_screen::screen_topline#7 -Alias (byte) init_dist_screen::x#2 = (byte) init_dist_screen::x#6 (byte) init_dist_screen::x#7 -Alias (byte*) init_dist_screen::screen_bottomline#6 = (byte*) init_dist_screen::screen_bottomline#8 (byte*) init_dist_screen::screen_bottomline#7 -Alias (byte) init_dist_screen::xb#5 = (byte) init_dist_screen::xb#7 (byte) init_dist_screen::xb#6 -Alias (byte) init_dist_screen::y#7 = (byte) init_dist_screen::y#9 (byte) init_dist_screen::y#8 -Alias (byte*) heap_head#45 = (byte*) heap_head#48 (byte*) heap_head#46 -Alias (byte~) init_dist_screen::$15 = (byte~) init_dist_screen::$14 -Alias (byte~) init_dist_screen::$13 = (byte~) init_dist_screen::$12 -Alias (byte) init_dist_screen::xd#0 = (byte~) init_dist_screen::$16 -Alias (word) sqr::return#3 = (word) sqr::return#6 -Alias (word) init_dist_screen::yds#1 = (word) init_dist_screen::yds#2 (word) init_dist_screen::yds#6 -Alias (word*) SQUARES#15 = (word*) SQUARES#20 (word*) SQUARES#19 (word*) SQUARES#31 (word*) SQUARES#24 (word*) SQUARES#6 -Alias (byte) NUM_SQUARES#11 = (byte) NUM_SQUARES#13 (byte) NUM_SQUARES#19 (byte) NUM_SQUARES#20 (byte) NUM_SQUARES#16 (byte) NUM_SQUARES#4 -Alias (byte*) init_dist_screen::screen_topline#2 = (byte*) init_dist_screen::screen_topline#4 (byte*) init_dist_screen::screen_topline#5 (byte*) init_dist_screen::screen_topline#3 -Alias (byte) init_dist_screen::x#3 = (byte) init_dist_screen::x#4 (byte) init_dist_screen::x#5 -Alias (byte*) init_dist_screen::screen_bottomline#2 = (byte*) init_dist_screen::screen_bottomline#4 (byte*) init_dist_screen::screen_bottomline#5 (byte*) init_dist_screen::screen_bottomline#3 -Alias (byte) init_dist_screen::xb#2 = (byte) init_dist_screen::xb#3 (byte) init_dist_screen::xb#4 -Alias (byte) init_dist_screen::y#3 = (byte) init_dist_screen::y#5 (byte) init_dist_screen::y#6 (byte) init_dist_screen::y#4 -Alias (byte*) heap_head#10 = (byte*) heap_head#38 (byte*) heap_head#42 (byte*) heap_head#33 (byte*) heap_head#29 (byte*) heap_head#21 -Alias (word) init_dist_screen::xds#0 = (word~) init_dist_screen::$17 -Alias (word) init_dist_screen::ds#0 = (word~) init_dist_screen::$18 -Alias (byte) sqrt::return#2 = (byte) sqrt::return#4 -Alias (byte) init_dist_screen::d#0 = (byte~) init_dist_screen::$19 +Alias (byte*) init_angle_screen::screen_topline#0 = (byte*~) init_angle_screen::$0 +Alias (byte*) init_angle_screen::screen_bottomline#0 = (byte*~) init_angle_screen::$1 +Alias (word~) init_angle_screen::$4 = (word~) init_angle_screen::$17 +Alias (signed word) init_angle_screen::xw#0 = (signed word~) init_angle_screen::$5 +Alias (word~) init_angle_screen::$7 = (word~) init_angle_screen::$18 +Alias (signed word) init_angle_screen::yw#0 = (signed word~) init_angle_screen::$8 +Alias (word) atan2_16::return#2 = (word) atan2_16::return#4 +Alias (byte*) init_angle_screen::screen_bottomline#2 = (byte*) init_angle_screen::screen_bottomline#4 (byte*) init_angle_screen::screen_bottomline#3 +Alias (byte) init_angle_screen::xb#2 = (byte) init_angle_screen::xb#3 +Alias (byte*) init_angle_screen::screen_topline#2 = (byte*) init_angle_screen::screen_topline#4 (byte*) init_angle_screen::screen_topline#3 +Alias (byte) init_angle_screen::x#2 = (byte) init_angle_screen::x#3 +Alias (byte) init_angle_screen::y#2 = (byte) init_angle_screen::y#5 (byte) init_angle_screen::y#3 +Alias (word) init_angle_screen::angle_w#0 = (word~) init_angle_screen::$9 +Alias (byte) init_angle_screen::ang_w#0 = (byte~) init_angle_screen::$11 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 -Alias (byte) NUM_SQUARES#12 = (byte) NUM_SQUARES#5 -Alias (byte*) heap_head#11 = (byte*) heap_head#22 -Alias (word*) SQUARES#16 = (word*) SQUARES#7 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#3 = -Alias (word) bsearch16u::key#1 = (word) bsearch16u::key#5 -Alias (byte) NUM_SQUARES#18 = (byte) NUM_SQUARES#22 -Alias (byte*) heap_head#32 = (byte*) heap_head#36 -Alias (word*) SQUARES#26 = (word*) SQUARES#33 +Alias (signed word) atan2_16::x#1 = (signed word) atan2_16::x#5 (signed word) atan2_16::x#10 +Alias (signed word) atan2_16::y#1 = (signed word) atan2_16::y#12 (signed word) atan2_16::y#9 +Alias (signed word) atan2_16::yi#0 = (signed word) atan2_16::yi#9 +Alias (signed word) atan2_16::yi#10 = (signed word) atan2_16::yi#5 +Alias (signed word) atan2_16::xi#10 = (signed word) atan2_16::xi#4 +Alias (byte) atan2_16::i#10 = (byte) atan2_16::i#3 (byte) atan2_16::i#5 +Alias (word) atan2_16::angle#14 = (word) atan2_16::angle#16 +Alias (signed word) atan2_16::x#11 = (signed word) atan2_16::x#14 (signed word) atan2_16::x#8 +Alias (signed word) atan2_16::y#10 = (signed word) atan2_16::y#16 (signed word) atan2_16::y#8 +Alias (signed word) atan2_16::y#4 = (signed word) atan2_16::y#5 Alias (byte*) getCharToProcess::screen_line#2 = (byte*) getCharToProcess::screen_line#3 Alias (byte*) getCharToProcess::dist_line#2 = (byte*) getCharToProcess::dist_line#3 Alias (byte*) SCREEN_COPY#10 = (byte*) SCREEN_COPY#17 @@ -3332,21 +2979,6 @@ Alias (byte) processChars::bitmask#0 = (byte) processChars::bitmask#2 (byte) pro Alias (byte) processChars::i#10 = (byte) processChars::i#6 (byte) processChars::i#11 (byte) processChars::i#5 Alias (byte) processChars::numActive#10 = (byte) processChars::numActive#13 (byte) processChars::numActive#4 (byte) processChars::numActive#2 Alias (word) processChars::xpos#0 = (word) processChars::xpos#1 -Alias (word*) SQUARES#18 = (word*) SQUARES#27 -Alias (byte) NUM_SQUARES#33 = (byte) NUM_SQUARES#39 -Alias (byte*) init_dist_screen::screen_topline#10 = (byte*) init_dist_screen::screen_topline#11 -Alias (byte*) init_dist_screen::screen_bottomline#10 = (byte*) init_dist_screen::screen_bottomline#11 -Alias (byte) init_dist_screen::y#10 = (byte) init_dist_screen::y#12 -Alias (byte*) heap_head#50 = (byte*) heap_head#54 -Alias (word*) SQUARES#15 = (word*) SQUARES#29 -Alias (word) init_dist_screen::yds#1 = (word) init_dist_screen::yds#3 -Alias (byte) NUM_SQUARES#11 = (byte) NUM_SQUARES#24 -Alias (byte*) init_dist_screen::screen_topline#2 = (byte*) init_dist_screen::screen_topline#6 -Alias (byte) init_dist_screen::x#2 = (byte) init_dist_screen::x#3 -Alias (byte*) init_dist_screen::screen_bottomline#2 = (byte*) init_dist_screen::screen_bottomline#6 -Alias (byte) init_dist_screen::xb#2 = (byte) init_dist_screen::xb#5 -Alias (byte) init_dist_screen::y#3 = (byte) init_dist_screen::y#7 -Alias (byte*) heap_head#10 = (byte*) heap_head#45 Alias (word) setupRasterIrq::raster#1 = (word) setupRasterIrq::raster#2 Alias (void()*) setupRasterIrq::irqRoutine#1 = (void()*) setupRasterIrq::irqRoutine#2 Successful SSA optimization Pass2AliasElimination @@ -3360,27 +2992,18 @@ 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#3 = -Self Phi Eliminated (word) bsearch16u::key#1 -Self Phi Eliminated (byte*) heap_head#15 -Self Phi Eliminated (word*) SQUARES#17 +Self Phi Eliminated (signed word) atan2_16::yi#10 +Self Phi Eliminated (signed word) atan2_16::xi#10 +Self Phi Eliminated (byte) atan2_16::i#10 +Self Phi Eliminated (word) atan2_16::angle#14 +Self Phi Eliminated (signed word) atan2_16::x#11 +Self Phi Eliminated (signed word) atan2_16::y#10 Self Phi Eliminated (byte*) SCREEN_COPY#24 Self Phi Eliminated (byte*) SCREEN_DIST#15 -Self Phi Eliminated (byte) NUM_SQUARES#44 -Self Phi Eliminated (byte*) heap_head#53 -Self Phi Eliminated (word*) SQUARES#50 Self Phi Eliminated (byte*) SCREEN_COPY#11 Self Phi Eliminated (byte*) SCREEN_DIST#11 -Self Phi Eliminated (byte) NUM_SQUARES#31 -Self Phi Eliminated (byte*) heap_head#44 -Self Phi Eliminated (word*) SQUARES#42 Self Phi Eliminated (byte*) SCREEN_COPY#12 Self Phi Eliminated (byte*) SCREEN_DIST#12 -Self Phi Eliminated (byte) NUM_SQUARES#18 -Self Phi Eliminated (byte*) heap_head#32 -Self Phi Eliminated (word*) SQUARES#26 -Self Phi Eliminated (byte) NUM_SQUARES#10 -Self Phi Eliminated (byte*) heap_head#19 -Self Phi Eliminated (word*) SQUARES#13 Self Phi Eliminated (byte*) getCharToProcess::screen_line#2 Self Phi Eliminated (byte*) getCharToProcess::dist_line#2 Self Phi Eliminated (byte*) SCREEN_COPY#10 @@ -3392,54 +3015,28 @@ Self Phi Eliminated (byte) startProcessing::center_y#2 Self Phi Eliminated (byte) startProcessing::spriteIdx#1 Self Phi Eliminated (byte) startProcessing::spriteCol#1 Self Phi Eliminated (byte*) startProcessing::screenPtr#1 -Self Phi Eliminated (word*) SQUARES#15 -Self Phi Eliminated (word) init_dist_screen::yds#1 -Self Phi Eliminated (byte) NUM_SQUARES#11 -Self Phi Eliminated (byte*) init_dist_screen::screen_topline#2 -Self Phi Eliminated (byte*) init_dist_screen::screen_bottomline#2 -Self Phi Eliminated (byte) init_dist_screen::y#3 -Self Phi Eliminated (byte*) heap_head#10 +Self Phi Eliminated (byte) init_angle_screen::y#2 +Self Phi Eliminated (byte*) init_angle_screen::screen_bottomline#2 +Self Phi Eliminated (byte*) init_angle_screen::screen_topline#2 Successful SSA optimization Pass2SelfPhiElimination -Identical Phi Values (byte) bsearch16u::num#7 (byte) bsearch16u::num#2 -Identical Phi Values (word*) bsearch16u::items#7 (word*) bsearch16u::items#1 -Identical Phi Values (word) bsearch16u::key#4 (word) bsearch16u::key#0 -Identical Phi Values (word) bsearch16u::key#1 (word) bsearch16u::key#4 -Identical Phi Values (byte) NUM_SQUARES#6 (byte) NUM_SQUARES#3 -Identical Phi Values (byte*) heap_head#24 (byte*) heap_head#28 -Identical Phi Values (byte*) heap_head#14 (byte*) heap_head#1 -Identical Phi Values (byte*) heap_head#15 (byte*) heap_head#14 -Identical Phi Values (word*) SQUARES#17 (word*) SQUARES#1 -Identical Phi Values (word) sqrt::val#1 (word) sqrt::val#0 -Identical Phi Values (word*) SQUARES#10 (word*) SQUARES#15 -Identical Phi Values (byte) NUM_SQUARES#8 (byte) NUM_SQUARES#11 -Identical Phi Values (byte*) heap_head#16 (byte*) heap_head#1 -Identical Phi Values (byte*) heap_head#17 (byte*) heap_head#1 +Identical Phi Values (signed word) atan2_16::y#1 (signed word) atan2_16::y#0 +Identical Phi Values (signed word) atan2_16::x#1 (signed word) atan2_16::x#0 +Identical Phi Values (signed word) atan2_16::yi#10 (signed word) atan2_16::yi#3 +Identical Phi Values (signed word) atan2_16::xi#10 (signed word) atan2_16::xi#3 +Identical Phi Values (byte) atan2_16::i#10 (byte) atan2_16::i#2 +Identical Phi Values (word) atan2_16::angle#14 (word) atan2_16::angle#12 +Identical Phi Values (signed word) atan2_16::x#11 (signed word) atan2_16::x#17 +Identical Phi Values (signed word) atan2_16::y#10 (signed word) atan2_16::y#19 +Identical Phi Values (byte*) heap_head#3 (byte*) heap_head#1 +Identical Phi Values (byte*) heap_head#4 (byte*) heap_head#1 Identical Phi Values (byte*) SCREEN_DIST#1 (byte*) SCREEN_DIST#0 -Identical Phi Values (byte) NUM_SQUARES#14 (byte) NUM_SQUARES#0 -Identical Phi Values (byte*) heap_head#26 (byte*) heap_head#17 -Identical Phi Values (word*) SQUARES#21 (word*) SQUARES#0 Identical Phi Values (byte*) SCREEN_COPY#1 (byte*) SCREEN_COPY#0 -Identical Phi Values (byte) NUM_SQUARES#1 (byte) NUM_SQUARES#11 -Identical Phi Values (byte*) heap_head#18 (byte*) heap_head#10 -Identical Phi Values (word*) SQUARES#12 (word*) SQUARES#15 Identical Phi Values (byte*) SCREEN_COPY#24 (byte*) SCREEN_COPY#1 Identical Phi Values (byte*) SCREEN_DIST#15 (byte*) SCREEN_DIST#1 -Identical Phi Values (byte) NUM_SQUARES#44 (byte) NUM_SQUARES#1 -Identical Phi Values (byte*) heap_head#53 (byte*) heap_head#18 -Identical Phi Values (word*) SQUARES#50 (word*) SQUARES#12 Identical Phi Values (byte*) SCREEN_COPY#11 (byte*) SCREEN_COPY#24 Identical Phi Values (byte*) SCREEN_DIST#11 (byte*) SCREEN_DIST#15 -Identical Phi Values (byte) NUM_SQUARES#31 (byte) NUM_SQUARES#44 -Identical Phi Values (byte*) heap_head#44 (byte*) heap_head#53 -Identical Phi Values (word*) SQUARES#42 (word*) SQUARES#50 Identical Phi Values (byte*) SCREEN_COPY#12 (byte*) SCREEN_COPY#11 Identical Phi Values (byte*) SCREEN_DIST#12 (byte*) SCREEN_DIST#11 -Identical Phi Values (byte) NUM_SQUARES#18 (byte) NUM_SQUARES#31 -Identical Phi Values (byte*) heap_head#32 (byte*) heap_head#44 -Identical Phi Values (word*) SQUARES#26 (word*) SQUARES#42 -Identical Phi Values (byte) NUM_SQUARES#10 (byte) NUM_SQUARES#18 -Identical Phi Values (byte*) heap_head#19 (byte*) heap_head#32 -Identical Phi Values (word*) SQUARES#13 (word*) SQUARES#26 Identical Phi Values (byte*) SCREEN_COPY#2 (byte*) SCREEN_COPY#12 Identical Phi Values (byte*) SCREEN_DIST#2 (byte*) SCREEN_DIST#12 Identical Phi Values (byte*) getCharToProcess::screen_line#2 (byte*) getCharToProcess::screen_line#4 @@ -3457,87 +3054,78 @@ Identical Phi Values (byte) startProcessing::center_y#2 (byte) startProcessing:: Identical Phi Values (byte) startProcessing::spriteIdx#1 (byte) startProcessing::freeIdx#2 Identical Phi Values (byte) startProcessing::spriteCol#1 (byte) startProcessing::spriteCol#0 Identical Phi Values (byte*) startProcessing::screenPtr#1 (byte*) startProcessing::screenPtr#0 -Identical Phi Values (byte*) heap_head#28 (byte*) heap_head#26 -Identical Phi Values (word*) SQUARES#23 (word*) SQUARES#21 -Identical Phi Values (byte*) init_dist_screen::screen#1 (byte*) init_dist_screen::screen#0 -Identical Phi Values (byte*) heap_head#20 (byte*) heap_head#15 -Identical Phi Values (word*) SQUARES#14 (word*) SQUARES#17 -Identical Phi Values (word*) SQUARES#15 (word*) SQUARES#18 -Identical Phi Values (word) init_dist_screen::yds#1 (word) init_dist_screen::yds#0 -Identical Phi Values (byte) NUM_SQUARES#11 (byte) NUM_SQUARES#33 -Identical Phi Values (byte*) init_dist_screen::screen_topline#2 (byte*) init_dist_screen::screen_topline#10 -Identical Phi Values (byte*) init_dist_screen::screen_bottomline#2 (byte*) init_dist_screen::screen_bottomline#10 -Identical Phi Values (byte) init_dist_screen::y#3 (byte) init_dist_screen::y#10 -Identical Phi Values (byte*) heap_head#10 (byte*) heap_head#50 +Identical Phi Values (byte*) init_angle_screen::screen#1 (byte*) init_angle_screen::screen#0 +Identical Phi Values (byte) init_angle_screen::y#2 (byte) init_angle_screen::y#4 +Identical Phi Values (byte*) init_angle_screen::screen_bottomline#2 (byte*) init_angle_screen::screen_bottomline#5 +Identical Phi Values (byte*) init_angle_screen::screen_topline#2 (byte*) init_angle_screen::screen_topline#5 Identical Phi Values (word) setupRasterIrq::raster#1 (word) setupRasterIrq::raster#0 Identical Phi Values (void()*) setupRasterIrq::irqRoutine#1 (void()*) setupRasterIrq::irqRoutine#0 -Identical Phi Values (byte) NUM_SQUARES#12 (byte) NUM_SQUARES#10 -Identical Phi Values (byte*) heap_head#11 (byte*) heap_head#19 -Identical Phi Values (word*) SQUARES#16 (word*) SQUARES#13 Successful SSA optimization Pass2IdenticalPhiElimination -Identical Phi Values (word*) SQUARES#9 (word*) SQUARES#18 +Identical Phi Values (signed word) atan2_16::x#4 (signed word) atan2_16::x#17 +Identical Phi Values (signed word) atan2_16::y#4 (signed word) atan2_16::y#19 Successful SSA optimization Pass2IdenticalPhiElimination -Identified duplicate assignment right side [460] (byte~) processChars::$17 ← (byte) processChars::i#10 * (byte) 2 +Identified duplicate assignment right side [440] (byte~) processChars::$17 ← (byte) processChars::i#10 * (byte) 2 Successful SSA optimization Pass2DuplicateRValueIdentification -Simple Condition (bool~) bsearch16u::$5 [13] if((byte) bsearch16u::num#3>(byte) 0) goto bsearch16u::@7 -Simple Condition (bool~) bsearch16u::$12 [25] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@9 -Simple Condition (bool~) bsearch16u::$0 [28] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@1 -Simple Condition (bool~) bsearch16u::$14 [32] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@10 -Simple Condition (bool~) init_squares::$5 [77] if((byte) init_squares::i#1!=rangelast(0,init_squares::$2)) goto init_squares::@1 -Simple Condition (bool~) main::$6 [177] if((byte*) main::src#1!=(byte*~) main::$5) goto main::@1 -Simple Condition (bool~) main::$8 [203] if((byte) main::i#1!=rangelast(0,main::$7)) goto main::@3 -Simple Condition (bool~) main::$11 [226] if((byte) main::center_dist#0!=(byte) NOT_FOUND#0) goto main::@6 -Simple Condition (bool~) getCharToProcess::$3 [258] if(*((byte*) getCharToProcess::screen_line#4 + (byte) getCharToProcess::x#2)==(byte) ' ') goto getCharToProcess::@5 -Simple Condition (bool~) getCharToProcess::$6 [262] if((byte) getCharToProcess::x#1!=rangelast(0,$27)) goto getCharToProcess::@4 -Simple Condition (bool~) getCharToProcess::$5 [267] if((byte) getCharToProcess::dist#0>=(byte) getCharToProcess::closest_dist#2) goto getCharToProcess::@5 -Simple Condition (bool~) getCharToProcess::$7 [277] if((byte) getCharToProcess::y#1!=rangelast(0,$18)) goto getCharToProcess::@3 -Simple Condition (bool~) getCharToProcess::$1 [281] if((byte) getCharToProcess::return_dist#1==(byte) NOT_FOUND#0) goto getCharToProcess::@1 -Simple Condition (bool~) startProcessing::$26 [309] if(*((byte*) startProcessing::$41 + (byte~) startProcessing::$30)!=(const byte) STATUS_FREE) goto startProcessing::@3 -Simple Condition (bool~) startProcessing::$27 [313] if((byte) startProcessing::i#1!=rangelast(0,startProcessing::$24)) goto startProcessing::@2 -Simple Condition (bool~) startProcessing::$28 [318] if((byte) startProcessing::freeIdx#2==(byte) $ff) goto startProcessing::@1 -Simple Condition (bool~) startProcessing::$29 [348] if((byte) startProcessing::i1#1!=rangelast(0,7)) goto startProcessing::@9 -Simple Condition (bool~) processChars::$5 [416] if(*((byte*) processChars::$41)==(const byte) STATUS_FREE) goto processChars::@3 -Simple Condition (bool~) processChars::$34 [420] if((byte) processChars::i#1!=rangelast(0,processChars::$1)) goto processChars::@2 -Simple Condition (bool~) processChars::$7 [425] if(*((byte*) processChars::$42)!=(const byte) STATUS_NEW) goto processChars::@4 -Simple Condition (bool~) processChars::$66 [432] if((byte) 0!=(byte~) processChars::$11) goto processChars::@5 -Simple Condition (bool~) init_dist_screen::$3 [530] if((byte) init_dist_screen::y2#0>=(byte) $18) goto init_dist_screen::@2 -Simple Condition (bool~) init_dist_screen::$11 [551] if((byte) init_dist_screen::x2#0>=(byte) $27) goto init_dist_screen::@6 -Simple Condition (bool~) init_dist_screen::$20 [581] if((byte) init_dist_screen::x#1<=(byte) $13) goto init_dist_screen::@5 -Simple Condition (bool~) init_dist_screen::$21 [587] if((byte) init_dist_screen::y#1!=rangelast(0,$c)) goto init_dist_screen::@1 -Simple Condition (bool~) initSprites::$2 [600] if((byte*) initSprites::sp#1<(byte*~) initSprites::$1) goto initSprites::@1 -Simple Condition (bool~) initSprites::$3 [606] if((byte) initSprites::i#1!=rangelast(0,7)) goto initSprites::@3 -Simple Condition (bool~) setupRasterIrq::$0 [617] if((word) setupRasterIrq::raster#0<(word) $100) goto setupRasterIrq::@1 -Simple Condition (bool~) irqTop::$2 [641] if((byte) irqTop::i#1!=rangelast(0,4)) goto irqTop::@3 -Simple Condition (bool~) irqTop::$3 [648] if((byte) irqTop::i1#1!=rangelast(0,7)) goto irqTop::@5 -Simple Condition (bool~) irqBottom::$4 [663] if((byte) irqBottom::i#1!=rangelast(0,4)) goto irqBottom::@5 +Simple Condition (bool~) atan2_16::$0 [15] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 +Simple Condition (bool~) atan2_16::$5 [24] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4 +Simple Condition (bool~) atan2_16::$18 [38] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@16 +Simple Condition (bool~) atan2_16::$11 [47] if((signed word) atan2_16::x#17>=(signed byte) 0) goto atan2_16::@7 +Simple Condition (bool~) atan2_16::$19 [50] if((byte) atan2_16::shift#2>=(byte) 2) goto atan2_16::@19 +Simple Condition (bool~) atan2_16::$20 [58] if((byte) 0==(byte) atan2_16::shift#2) goto atan2_16::@25 +Simple Condition (bool~) atan2_16::$21 [61] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@26 +Simple Condition (bool~) atan2_16::$22 [78] if((byte) atan2_16::i#1!=rangelast(0,atan2_16::$16)) goto atan2_16::@15 +Simple Condition (bool~) atan2_16::$14 [82] if((signed word) atan2_16::y#19>=(signed byte) 0) goto atan2_16::@8 +Simple Condition (bool~) main::$6 [163] if((byte*) main::src#1!=(byte*~) main::$5) goto main::@1 +Simple Condition (bool~) main::$8 [189] if((byte) main::i#1!=rangelast(0,main::$7)) goto main::@3 +Simple Condition (bool~) main::$11 [212] if((byte) main::center_dist#0!=(byte) NOT_FOUND#0) goto main::@6 +Simple Condition (bool~) getCharToProcess::$3 [238] if(*((byte*) getCharToProcess::screen_line#4 + (byte) getCharToProcess::x#2)==(byte) ' ') goto getCharToProcess::@5 +Simple Condition (bool~) getCharToProcess::$6 [242] if((byte) getCharToProcess::x#1!=rangelast(0,$27)) goto getCharToProcess::@4 +Simple Condition (bool~) getCharToProcess::$5 [247] if((byte) getCharToProcess::dist#0>=(byte) getCharToProcess::closest_dist#2) goto getCharToProcess::@5 +Simple Condition (bool~) getCharToProcess::$7 [257] if((byte) getCharToProcess::y#1!=rangelast(0,$18)) goto getCharToProcess::@3 +Simple Condition (bool~) getCharToProcess::$1 [261] if((byte) getCharToProcess::return_dist#1==(byte) NOT_FOUND#0) goto getCharToProcess::@1 +Simple Condition (bool~) startProcessing::$26 [289] if(*((byte*) startProcessing::$41 + (byte~) startProcessing::$30)!=(const byte) STATUS_FREE) goto startProcessing::@3 +Simple Condition (bool~) startProcessing::$27 [293] if((byte) startProcessing::i#1!=rangelast(0,startProcessing::$24)) goto startProcessing::@2 +Simple Condition (bool~) startProcessing::$28 [298] if((byte) startProcessing::freeIdx#2==(byte) $ff) goto startProcessing::@1 +Simple Condition (bool~) startProcessing::$29 [328] if((byte) startProcessing::i1#1!=rangelast(0,7)) goto startProcessing::@9 +Simple Condition (bool~) processChars::$5 [396] if(*((byte*) processChars::$41)==(const byte) STATUS_FREE) goto processChars::@3 +Simple Condition (bool~) processChars::$34 [400] if((byte) processChars::i#1!=rangelast(0,processChars::$1)) goto processChars::@2 +Simple Condition (bool~) processChars::$7 [405] if(*((byte*) processChars::$42)!=(const byte) STATUS_NEW) goto processChars::@4 +Simple Condition (bool~) processChars::$66 [412] if((byte) 0!=(byte~) processChars::$11) goto processChars::@5 +Simple Condition (bool~) init_angle_screen::$15 [537] if((byte) init_angle_screen::x#1<=(byte) $13) goto init_angle_screen::@2 +Simple Condition (bool~) init_angle_screen::$16 [543] if((byte) init_angle_screen::y#1!=rangelast(0,$c)) goto init_angle_screen::@1 +Simple Condition (bool~) initSprites::$2 [552] if((byte*) initSprites::sp#1<(byte*~) initSprites::$1) goto initSprites::@1 +Simple Condition (bool~) initSprites::$3 [558] if((byte) initSprites::i#1!=rangelast(0,7)) goto initSprites::@3 +Simple Condition (bool~) setupRasterIrq::$0 [569] if((word) setupRasterIrq::raster#0<(word) $100) goto setupRasterIrq::@1 +Simple Condition (bool~) irqTop::$2 [593] if((byte) irqTop::i#1!=rangelast(0,4)) goto irqTop::@3 +Simple Condition (bool~) irqTop::$3 [600] if((byte) irqTop::i1#1!=rangelast(0,7)) goto irqTop::@5 +Simple Condition (bool~) irqBottom::$4 [615] if((byte) irqBottom::i#1!=rangelast(0,4)) goto irqBottom::@5 Successful SSA optimization Pass2ConditionalJumpSimplification -Rewriting || if()-condition to two if()s [472] (bool~) processChars::$24 ← (bool~) processChars::$22 || (bool~) processChars::$23 +Rewriting || if()-condition to two if()s [452] (bool~) processChars::$24 ← (bool~) processChars::$22 || (bool~) processChars::$23 Successful SSA optimization Pass2ConditionalAndOrRewriting -Rewriting || if()-condition to two if()s [469] (bool~) processChars::$22 ← (bool~) processChars::$20 || (bool~) processChars::$21 +Rewriting || if()-condition to two if()s [449] (bool~) processChars::$22 ← (bool~) processChars::$20 || (bool~) processChars::$21 Successful SSA optimization Pass2ConditionalAndOrRewriting -Rewriting || if()-condition to two if()s [466] (bool~) processChars::$20 ← (bool~) processChars::$18 || (bool~) processChars::$19 +Rewriting || if()-condition to two if()s [446] (bool~) processChars::$20 ← (bool~) processChars::$18 || (bool~) processChars::$19 Successful SSA optimization Pass2ConditionalAndOrRewriting -Rewriting ! if()-condition to reversed if() [509] (bool~) processChars::$0 ← ! (bool) DEBUG#0 +Rewriting ! if()-condition to reversed if() [489] (bool~) processChars::$0 ← ! (bool) DEBUG#0 Successful SSA optimization Pass2ConditionalAndOrRewriting -Rewriting ! if()-condition to reversed if() [631] (bool~) irqTop::$0 ← ! (bool) DEBUG#0 +Rewriting ! if()-condition to reversed if() [583] (bool~) irqTop::$0 ← ! (bool) DEBUG#0 Successful SSA optimization Pass2ConditionalAndOrRewriting -Rewriting ! if()-condition to reversed if() [654] (bool~) irqBottom::$0 ← ! (bool) DEBUG#0 +Rewriting ! if()-condition to reversed if() [606] (bool~) irqBottom::$0 ← ! (bool) DEBUG#0 Successful SSA optimization Pass2ConditionalAndOrRewriting -Rewriting ! if()-condition to reversed if() [657] (bool~) irqBottom::$2 ← ! (bool) DEBUG#0 +Rewriting ! if()-condition to reversed if() [609] (bool~) irqBottom::$2 ← ! (bool) DEBUG#0 Successful SSA optimization Pass2ConditionalAndOrRewriting -Constant right-side identified [41] (byte~) bsearch16u::$17 ← (byte) 1 * (const byte) SIZEOF_WORD -Constant right-side identified [48] (byte~) bsearch16u::$18 ← (byte) 1 * (const byte) SIZEOF_WORD -Constant right-side identified [207] (void()*) setupRasterIrq::irqRoutine#0 ← & interrupt(HARDWARE_ALL)(void()) irqTop() -Constant right-side identified [634] (void()*~) irqTop::$1 ← & interrupt(HARDWARE_ALL)(void()) irqBottom() -Constant right-side identified [667] (void()*~) irqBottom::$3 ← & interrupt(HARDWARE_ALL)(void()) irqTop() +Negating conditional jump and destination [78] if((byte) atan2_16::i#1==rangelast(0,atan2_16::$16)) goto atan2_16::@17 +Constant right-side identified [193] (void()*) setupRasterIrq::irqRoutine#0 ← & interrupt(HARDWARE_ALL)(void()) irqTop() +Constant right-side identified [586] (void()*~) irqTop::$1 ← & interrupt(HARDWARE_ALL)(void()) irqBottom() +Constant right-side identified [619] (void()*~) irqBottom::$3 ← & interrupt(HARDWARE_ALL)(void()) irqTop() Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte*) HEAP_START#0 = (byte*) 49152 -Constant (const byte) bsearch16u::$17 = 1*SIZEOF_WORD -Constant (const byte) bsearch16u::$18 = 1*SIZEOF_WORD -Constant (const byte) NUM_SQUARES#0 = $ff -Constant (const word*) SQUARES#0 = (word*) 0 -Constant (const word) init_squares::sqr#0 = 0 -Constant (const byte) init_squares::i#0 = 0 +Constant (const byte) CORDIC_ITERATIONS_16#0 = $f +Constant (const word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16#0 = kickasm {{ .for (var i=0; i> (byte) 4 -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_X) -Converting *(pointer+n) to pointer[n] [435] *(*((byte**) processChars::$44)) ← (byte) ' ' -- *((byte**)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR) -Converting *(pointer+n) to pointer[n] [439] *((const byte*) SPRITES_COLS#0 + *((byte*) processChars::$46)) ← *((byte*) processChars::$45) -- *((byte*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_COL) -Converting *(pointer+n) to pointer[n] [439] *((const byte*) SPRITES_COLS#0 + *((byte*) processChars::$46)) ← *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_COL) -- *((byte*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_ID) -Converting *(pointer+n) to pointer[n] [442] (byte*~) processChars::$9 ← (byte*~) processChars::$8 + *((byte*) processChars::$47) -- *((byte*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_ID) -Converting *(pointer+n) to pointer[n] [444] *((byte*~) processChars::$9) ← *((byte*) processChars::$48) -- *((byte*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_PTR) -Converting *(pointer+n) to pointer[n] [444] *((byte*~) processChars::$9) ← *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR) -- *(processChars::$8 + *((byte*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_ID)) -Converting *(pointer+n) to pointer[n] [446] *((byte*) processChars::$49) ← (const byte) STATUS_PROCESSING -- *((byte*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) -Converting *(pointer+n) to pointer[n] [457] (word~) processChars::$15 ← *((word*) processChars::$50) >> (byte) 4 -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_Y) -Converting *(pointer+n) to pointer[n] [463] (bool~) processChars::$18 ← *((word*) processChars::$51) < (word) XPOS_LEFTMOST#0 -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_X) -Converting *(pointer+n) to pointer[n] [465] (bool~) processChars::$19 ← *((word*) processChars::$52) > (word) XPOS_RIGHTMOST#0 -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_X) -Converting *(pointer+n) to pointer[n] [468] (bool~) processChars::$21 ← *((word*) processChars::$53) < (word) YPOS_TOPMOST#0 -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_Y) -Converting *(pointer+n) to pointer[n] [471] (bool~) processChars::$23 ← *((word*) processChars::$54) > (word) YPOS_BOTTOMMOST#0 -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_Y) -Converting *(pointer+n) to pointer[n] [476] *((byte*) processChars::$55) ← (const byte) STATUS_FREE -- *((byte*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) -Converting *(pointer+n) to pointer[n] [488] *((word*) processChars::$57) ← *((word*) processChars::$56) + *((const word[$28]) VXSIN#0 + (byte~) processChars::$38) -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_VX) -Converting *(pointer+n) to pointer[n] [488] *((word*) processChars::$57) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX) + *((const word[$28]) VXSIN#0 + (byte~) processChars::$38) -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_VX) -Converting *(pointer+n) to pointer[n] [492] *((word*) processChars::$60) ← *((word*) processChars::$58) + *((word*) processChars::$59) -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_X) -Converting *(pointer+n) to pointer[n] [492] *((word*) processChars::$60) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X) + *((word*) processChars::$59) -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_VX) -Converting *(pointer+n) to pointer[n] [492] *((word*) processChars::$60) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X) + *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX) -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_X) -Converting *(pointer+n) to pointer[n] [501] *((word*) processChars::$62) ← *((word*) processChars::$61) + *((const word[$19]) VYSIN#0 + (byte~) processChars::$39) -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_VY) -Converting *(pointer+n) to pointer[n] [501] *((word*) processChars::$62) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY) + *((const word[$19]) VYSIN#0 + (byte~) processChars::$39) -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_VY) -Converting *(pointer+n) to pointer[n] [505] *((word*) processChars::$65) ← *((word*) processChars::$63) + *((word*) processChars::$64) -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_Y) -Converting *(pointer+n) to pointer[n] [505] *((word*) processChars::$65) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y) + *((word*) processChars::$64) -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_VY) -Converting *(pointer+n) to pointer[n] [505] *((word*) processChars::$65) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y) + *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY) -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_Y) +Resolved ranged next value [240] getCharToProcess::x#1 ← ++ getCharToProcess::x#2 to ++ +Resolved ranged comparison value [242] if(getCharToProcess::x#1!=rangelast(0,$27)) goto getCharToProcess::@4 to (number) $28 +Resolved ranged next value [255] getCharToProcess::y#1 ← ++ getCharToProcess::y#2 to ++ +Resolved ranged comparison value [257] if(getCharToProcess::y#1!=rangelast(0,$18)) goto getCharToProcess::@3 to (number) $19 +Resolved ranged next value [326] startProcessing::i1#1 ← ++ startProcessing::i1#2 to ++ +Resolved ranged comparison value [328] if(startProcessing::i1#1!=rangelast(0,7)) goto startProcessing::@9 to (number) 8 +Resolved ranged next value [541] init_angle_screen::y#1 ← ++ init_angle_screen::y#4 to ++ +Resolved ranged comparison value [543] if(init_angle_screen::y#1!=rangelast(0,$c)) goto init_angle_screen::@1 to (number) $d +Resolved ranged next value [556] initSprites::i#1 ← ++ initSprites::i#2 to ++ +Resolved ranged comparison value [558] if(initSprites::i#1!=rangelast(0,7)) goto initSprites::@3 to (number) 8 +Resolved ranged next value [591] irqTop::i#1 ← ++ irqTop::i#2 to ++ +Resolved ranged comparison value [593] if(irqTop::i#1!=rangelast(0,4)) goto irqTop::@3 to (number) 5 +Resolved ranged next value [598] irqTop::i1#1 ← ++ irqTop::i1#2 to ++ +Resolved ranged comparison value [600] if(irqTop::i1#1!=rangelast(0,7)) goto irqTop::@5 to (number) 8 +Resolved ranged next value [613] irqBottom::i#1 ← ++ irqBottom::i#2 to ++ +Resolved ranged comparison value [615] if(irqBottom::i#1!=rangelast(0,4)) goto irqBottom::@5 to (number) 5 +Rewriting conditional comparison [537] if((byte) init_angle_screen::x#1<=(byte) $13) goto init_angle_screen::@2 +Converting *(pointer+n) to pointer[n] [272] *((byte*~) getCharToProcess::$11) ← (byte) ' ' -- *(getCharToProcess::$10 + getCharToProcess::return_x#1) +Converting *(pointer+n) to pointer[n] [391] (byte) processChars::bitmask#0 ← (byte) 1 << *((byte*) processChars::$40) -- *((byte*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_ID) +Converting *(pointer+n) to pointer[n] [396] if(*((byte*) processChars::$41)==(const byte) STATUS_FREE) goto processChars::@3 -- *((byte*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) +Converting *(pointer+n) to pointer[n] [405] if(*((byte*) processChars::$42)!=(const byte) STATUS_NEW) goto processChars::@4 -- *((byte*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) +Converting *(pointer+n) to pointer[n] [408] (word) processChars::xpos#0 ← *((word*) processChars::$43) >> (byte) 4 -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_X) +Converting *(pointer+n) to pointer[n] [415] *(*((byte**) processChars::$44)) ← (byte) ' ' -- *((byte**)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR) +Converting *(pointer+n) to pointer[n] [419] *((const byte*) SPRITES_COLS#0 + *((byte*) processChars::$46)) ← *((byte*) processChars::$45) -- *((byte*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_COL) +Converting *(pointer+n) to pointer[n] [419] *((const byte*) SPRITES_COLS#0 + *((byte*) processChars::$46)) ← *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_COL) -- *((byte*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_ID) +Converting *(pointer+n) to pointer[n] [422] (byte*~) processChars::$9 ← (byte*~) processChars::$8 + *((byte*) processChars::$47) -- *((byte*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_ID) +Converting *(pointer+n) to pointer[n] [424] *((byte*~) processChars::$9) ← *((byte*) processChars::$48) -- *((byte*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_PTR) +Converting *(pointer+n) to pointer[n] [424] *((byte*~) processChars::$9) ← *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR) -- *(processChars::$8 + *((byte*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_ID)) +Converting *(pointer+n) to pointer[n] [426] *((byte*) processChars::$49) ← (const byte) STATUS_PROCESSING -- *((byte*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) +Converting *(pointer+n) to pointer[n] [437] (word~) processChars::$15 ← *((word*) processChars::$50) >> (byte) 4 -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_Y) +Converting *(pointer+n) to pointer[n] [443] (bool~) processChars::$18 ← *((word*) processChars::$51) < (word) XPOS_LEFTMOST#0 -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_X) +Converting *(pointer+n) to pointer[n] [445] (bool~) processChars::$19 ← *((word*) processChars::$52) > (word) XPOS_RIGHTMOST#0 -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_X) +Converting *(pointer+n) to pointer[n] [448] (bool~) processChars::$21 ← *((word*) processChars::$53) < (word) YPOS_TOPMOST#0 -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_Y) +Converting *(pointer+n) to pointer[n] [451] (bool~) processChars::$23 ← *((word*) processChars::$54) > (word) YPOS_BOTTOMMOST#0 -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_Y) +Converting *(pointer+n) to pointer[n] [456] *((byte*) processChars::$55) ← (const byte) STATUS_FREE -- *((byte*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) +Converting *(pointer+n) to pointer[n] [468] *((word*) processChars::$57) ← *((word*) processChars::$56) + *((const word[$28]) VXSIN#0 + (byte~) processChars::$38) -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_VX) +Converting *(pointer+n) to pointer[n] [468] *((word*) processChars::$57) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX) + *((const word[$28]) VXSIN#0 + (byte~) processChars::$38) -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_VX) +Converting *(pointer+n) to pointer[n] [472] *((word*) processChars::$60) ← *((word*) processChars::$58) + *((word*) processChars::$59) -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_X) +Converting *(pointer+n) to pointer[n] [472] *((word*) processChars::$60) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X) + *((word*) processChars::$59) -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_VX) +Converting *(pointer+n) to pointer[n] [472] *((word*) processChars::$60) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X) + *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX) -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_X) +Converting *(pointer+n) to pointer[n] [481] *((word*) processChars::$62) ← *((word*) processChars::$61) + *((const word[$19]) VYSIN#0 + (byte~) processChars::$39) -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_VY) +Converting *(pointer+n) to pointer[n] [481] *((word*) processChars::$62) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY) + *((const word[$19]) VYSIN#0 + (byte~) processChars::$39) -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_VY) +Converting *(pointer+n) to pointer[n] [485] *((word*) processChars::$65) ← *((word*) processChars::$63) + *((word*) processChars::$64) -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_Y) +Converting *(pointer+n) to pointer[n] [485] *((word*) processChars::$65) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y) + *((word*) processChars::$64) -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_VY) +Converting *(pointer+n) to pointer[n] [485] *((word*) processChars::$65) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y) + *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY) -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_Y) Successful SSA optimization Pass2InlineDerefIdx -Simplifying expression containing zero (word*)PROCESSING#0 in [183] (word*) main::$17 ← (word*)(struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X -Simplifying expression containing zero (word*)PROCESSING#0 in [369] (word*) startProcessing::$32 ← (word*)(struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X -Simplifying expression containing zero (word*)processChars::processing#0 in [427] (word*) processChars::$43 ← (word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X -Simplifying expression containing zero (word*)processChars::processing#0 in [428] (word) processChars::xpos#0 ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X) >> (byte) 4 -Simplifying expression containing zero (word*)processChars::processing#0 in [462] (word*) processChars::$51 ← (word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X -Simplifying expression containing zero (word*)processChars::processing#0 in [463] (bool~) processChars::$18 ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X) < (word) XPOS_LEFTMOST#0 -Simplifying expression containing zero (word*)processChars::processing#0 in [464] (word*) processChars::$52 ← (word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X -Simplifying expression containing zero (word*)processChars::processing#0 in [465] (bool~) processChars::$19 ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X) > (word) XPOS_RIGHTMOST#0 -Simplifying expression containing zero (word*)processChars::processing#0 in [489] (word*) processChars::$58 ← (word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X -Simplifying expression containing zero (word*)processChars::processing#0 in [491] (word*) processChars::$60 ← (word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X -Simplifying expression containing zero (word*)processChars::processing#0 in [492] *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X) + *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX) -Simplifying expression containing zero (word*)processChars::processing#0 in [492] *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X) ← *((word*)(struct ProcessingSprite*) processChars::processing#0) + *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX) +Simplifying expression containing zero (word*)PROCESSING#0 in [169] (word*) main::$17 ← (word*)(struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X +Simplifying expression containing zero (word*)PROCESSING#0 in [349] (word*) startProcessing::$32 ← (word*)(struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X +Simplifying expression containing zero (word*)processChars::processing#0 in [407] (word*) processChars::$43 ← (word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X +Simplifying expression containing zero (word*)processChars::processing#0 in [408] (word) processChars::xpos#0 ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X) >> (byte) 4 +Simplifying expression containing zero (word*)processChars::processing#0 in [442] (word*) processChars::$51 ← (word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X +Simplifying expression containing zero (word*)processChars::processing#0 in [443] (bool~) processChars::$18 ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X) < (word) XPOS_LEFTMOST#0 +Simplifying expression containing zero (word*)processChars::processing#0 in [444] (word*) processChars::$52 ← (word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X +Simplifying expression containing zero (word*)processChars::processing#0 in [445] (bool~) processChars::$19 ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X) > (word) XPOS_RIGHTMOST#0 +Simplifying expression containing zero (word*)processChars::processing#0 in [469] (word*) processChars::$58 ← (word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X +Simplifying expression containing zero (word*)processChars::processing#0 in [471] (word*) processChars::$60 ← (word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X +Simplifying expression containing zero (word*)processChars::processing#0 in [472] *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X) + *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX) +Simplifying expression containing zero (word*)processChars::processing#0 in [472] *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X) ← *((word*)(struct ProcessingSprite*) processChars::processing#0) + *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX) Successful SSA optimization PassNSimplifyExpressionWithZero -Eliminating unused variable (byte) startProcessing::center_dist#0 and assignment [107] (byte) startProcessing::center_dist#0 ← (byte) main::center_dist#0 -Eliminating unused variable (struct ProcessingChar) getCharToProcess::return#0 and assignment [129] (struct ProcessingChar) getCharToProcess::return#0 ← struct-unwound {(byte) getCharToProcess::return_x#1, (byte) getCharToProcess::return_y#1, (byte) getCharToProcess::return_dist#1} -Eliminating unused variable (byte*~) getCharToProcess::$11 and assignment [133] (byte*~) getCharToProcess::$11 ← (byte*~) getCharToProcess::$10 + (byte) getCharToProcess::return_x#1 -Eliminating unused variable (struct ProcessingChar) getCharToProcess::return#1 and assignment [135] (struct ProcessingChar) getCharToProcess::return#1 ← struct-unwound {(byte) getCharToProcess::return_x#1, (byte) getCharToProcess::return_y#1, (byte) getCharToProcess::return_dist#1} -Eliminating unused variable (byte*) processChars::$40 and assignment [216] (byte*) processChars::$40 ← (byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID -Eliminating unused variable (byte*) processChars::$41 and assignment [218] (byte*) processChars::$41 ← (byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS -Eliminating unused variable (byte*) processChars::$42 and assignment [223] (byte*) processChars::$42 ← (byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS -Eliminating unused variable (word*) processChars::$43 and assignment [225] (word*) processChars::$43 ← (word*)(struct ProcessingSprite*) processChars::processing#0 -Eliminating unused variable (byte**) processChars::$44 and assignment [229] (byte**) processChars::$44 ← (byte**)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR -Eliminating unused variable (byte*) processChars::$45 and assignment [232] (byte*) processChars::$45 ← (byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_COL -Eliminating unused variable (byte*) processChars::$46 and assignment [233] (byte*) processChars::$46 ← (byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID -Eliminating unused variable (byte*) processChars::$47 and assignment [236] (byte*) processChars::$47 ← (byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID -Eliminating unused variable (byte*~) processChars::$9 and assignment [237] (byte*~) processChars::$9 ← (byte*~) processChars::$8 + *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID) -Eliminating unused variable (byte*) processChars::$48 and assignment [238] (byte*) processChars::$48 ← (byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR -Eliminating unused variable (byte*) processChars::$49 and assignment [240] (byte*) processChars::$49 ← (byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS -Eliminating unused variable (word*) processChars::$50 and assignment [248] (word*) processChars::$50 ← (word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y -Eliminating unused variable (word*) processChars::$51 and assignment [253] (word*) processChars::$51 ← (word*)(struct ProcessingSprite*) processChars::processing#0 -Eliminating unused variable (word*) processChars::$52 and assignment [255] (word*) processChars::$52 ← (word*)(struct ProcessingSprite*) processChars::processing#0 -Eliminating unused variable (word*) processChars::$53 and assignment [257] (word*) processChars::$53 ← (word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y -Eliminating unused variable (word*) processChars::$54 and assignment [259] (word*) processChars::$54 ← (word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y -Eliminating unused variable (byte*) processChars::$55 and assignment [262] (byte*) processChars::$55 ← (byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS -Eliminating unused variable (word*) processChars::$56 and assignment [271] (word*) processChars::$56 ← (word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX -Eliminating unused variable (word*) processChars::$57 and assignment [272] (word*) processChars::$57 ← (word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX -Eliminating unused variable (word*) processChars::$58 and assignment [274] (word*) processChars::$58 ← (word*)(struct ProcessingSprite*) processChars::processing#0 -Eliminating unused variable (word*) processChars::$59 and assignment [275] (word*) processChars::$59 ← (word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX -Eliminating unused variable (word*) processChars::$60 and assignment [276] (word*) processChars::$60 ← (word*)(struct ProcessingSprite*) processChars::processing#0 -Eliminating unused variable (word*) processChars::$61 and assignment [283] (word*) processChars::$61 ← (word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY -Eliminating unused variable (word*) processChars::$62 and assignment [284] (word*) processChars::$62 ← (word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY -Eliminating unused variable (word*) processChars::$63 and assignment [286] (word*) processChars::$63 ← (word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y -Eliminating unused variable (word*) processChars::$64 and assignment [287] (word*) processChars::$64 ← (word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY -Eliminating unused variable (word*) processChars::$65 and assignment [288] (word*) processChars::$65 ← (word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y -Eliminating unused variable - keeping the phi block (byte*) heap_head#50 +Eliminating unused variable (byte) startProcessing::center_dist#0 and assignment [97] (byte) startProcessing::center_dist#0 ← (byte) main::center_dist#0 +Eliminating unused variable (struct ProcessingChar) getCharToProcess::return#0 and assignment [119] (struct ProcessingChar) getCharToProcess::return#0 ← struct-unwound {(byte) getCharToProcess::return_x#1, (byte) getCharToProcess::return_y#1, (byte) getCharToProcess::return_dist#1} +Eliminating unused variable (byte*~) getCharToProcess::$11 and assignment [123] (byte*~) getCharToProcess::$11 ← (byte*~) getCharToProcess::$10 + (byte) getCharToProcess::return_x#1 +Eliminating unused variable (struct ProcessingChar) getCharToProcess::return#1 and assignment [125] (struct ProcessingChar) getCharToProcess::return#1 ← struct-unwound {(byte) getCharToProcess::return_x#1, (byte) getCharToProcess::return_y#1, (byte) getCharToProcess::return_dist#1} +Eliminating unused variable (byte*) processChars::$40 and assignment [206] (byte*) processChars::$40 ← (byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID +Eliminating unused variable (byte*) processChars::$41 and assignment [208] (byte*) processChars::$41 ← (byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS +Eliminating unused variable (byte*) processChars::$42 and assignment [213] (byte*) processChars::$42 ← (byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS +Eliminating unused variable (word*) processChars::$43 and assignment [215] (word*) processChars::$43 ← (word*)(struct ProcessingSprite*) processChars::processing#0 +Eliminating unused variable (byte**) processChars::$44 and assignment [219] (byte**) processChars::$44 ← (byte**)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR +Eliminating unused variable (byte*) processChars::$45 and assignment [222] (byte*) processChars::$45 ← (byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_COL +Eliminating unused variable (byte*) processChars::$46 and assignment [223] (byte*) processChars::$46 ← (byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID +Eliminating unused variable (byte*) processChars::$47 and assignment [226] (byte*) processChars::$47 ← (byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID +Eliminating unused variable (byte*~) processChars::$9 and assignment [227] (byte*~) processChars::$9 ← (byte*~) processChars::$8 + *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID) +Eliminating unused variable (byte*) processChars::$48 and assignment [228] (byte*) processChars::$48 ← (byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR +Eliminating unused variable (byte*) processChars::$49 and assignment [230] (byte*) processChars::$49 ← (byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS +Eliminating unused variable (word*) processChars::$50 and assignment [238] (word*) processChars::$50 ← (word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y +Eliminating unused variable (word*) processChars::$51 and assignment [243] (word*) processChars::$51 ← (word*)(struct ProcessingSprite*) processChars::processing#0 +Eliminating unused variable (word*) processChars::$52 and assignment [245] (word*) processChars::$52 ← (word*)(struct ProcessingSprite*) processChars::processing#0 +Eliminating unused variable (word*) processChars::$53 and assignment [247] (word*) processChars::$53 ← (word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y +Eliminating unused variable (word*) processChars::$54 and assignment [249] (word*) processChars::$54 ← (word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y +Eliminating unused variable (byte*) processChars::$55 and assignment [252] (byte*) processChars::$55 ← (byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS +Eliminating unused variable (word*) processChars::$56 and assignment [261] (word*) processChars::$56 ← (word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX +Eliminating unused variable (word*) processChars::$57 and assignment [262] (word*) processChars::$57 ← (word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX +Eliminating unused variable (word*) processChars::$58 and assignment [264] (word*) processChars::$58 ← (word*)(struct ProcessingSprite*) processChars::processing#0 +Eliminating unused variable (word*) processChars::$59 and assignment [265] (word*) processChars::$59 ← (word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX +Eliminating unused variable (word*) processChars::$60 and assignment [266] (word*) processChars::$60 ← (word*)(struct ProcessingSprite*) processChars::processing#0 +Eliminating unused variable (word*) processChars::$61 and assignment [273] (word*) processChars::$61 ← (word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY +Eliminating unused variable (word*) processChars::$62 and assignment [274] (word*) processChars::$62 ← (word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY +Eliminating unused variable (word*) processChars::$63 and assignment [276] (word*) processChars::$63 ← (word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y +Eliminating unused variable (word*) processChars::$64 and assignment [277] (word*) processChars::$64 ← (word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY +Eliminating unused variable (word*) processChars::$65 and assignment [278] (word*) processChars::$65 ← (word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y Eliminating unused constant (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X -Eliminating unused constant (const byte) NUM_SQUARES#0 -Eliminating unused constant (const word*) SQUARES#0 Eliminating unused constant (const bool) DEBUG#0 Successful SSA optimization PassNEliminateUnusedVars Eliminating variable (byte*~) processChars::$35 from unused block processChars::@16 @@ -3749,15 +3333,17 @@ Successful SSA optimization Pass2EliminateUnusedBlocks 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) 8 in if((byte) startProcessing::i1#1!=(number) 8) goto startProcessing::@9 -Adding number conversion cast (unumber) $13+1 in if((byte) init_dist_screen::x#1<(byte) $13+(number) 1) goto init_dist_screen::@5 -Adding number conversion cast (unumber) 1 in if((byte) init_dist_screen::x#1<(unumber)(byte) $13+(number) 1) goto init_dist_screen::@5 -Adding number conversion cast (unumber) $d in if((byte) init_dist_screen::y#1!=(number) $d) goto init_dist_screen::@1 +Adding number conversion cast (unumber) $13+1 in if((byte) init_angle_screen::x#1<(byte) $13+(number) 1) goto init_angle_screen::@2 +Adding number conversion cast (unumber) 1 in if((byte) init_angle_screen::x#1<(unumber)(byte) $13+(number) 1) goto init_angle_screen::@2 +Adding number conversion cast (unumber) $d in if((byte) init_angle_screen::y#1!=(number) $d) goto init_angle_screen::@1 Adding number conversion cast (unumber) 8 in if((byte) initSprites::i#1!=(number) 8) goto initSprites::@3 Successful SSA optimization PassNAddNumberTypeConversions Simplifying constant integer cast $28 Simplifying constant integer cast $19 Simplifying constant integer cast 8 Simplifying constant integer cast (byte~) processChars::$29 +Simplifying constant integer cast (byte~) init_angle_screen::$3 +Simplifying constant integer cast (byte~) init_angle_screen::$6 Simplifying constant integer cast (byte) $13+(unumber)(number) 1 Simplifying constant integer cast 1 Simplifying constant integer cast $d @@ -3773,46 +3359,43 @@ Successful SSA optimization PassNFinalizeNumberTypeConversions Alias (byte~) processChars::$17 = (byte~) processChars::$13 Alias (byte~) processChars::$30 = (byte~) processChars::$29 Successful SSA optimization Pass2AliasElimination +Self Phi Eliminated (signed word) atan2_16::x#17 +Self Phi Eliminated (signed word) atan2_16::y#19 Self Phi Eliminated (byte*) SCREEN_COPY#22 Self Phi Eliminated (byte) getCharToProcess::y#2 Self Phi Eliminated (byte) startProcessing::center_y#8 Self Phi Eliminated (byte) startProcessing::center_x#8 -Self Phi Eliminated (word*) SQUARES#18 -Self Phi Eliminated (byte) NUM_SQUARES#33 Successful SSA optimization Pass2SelfPhiElimination +Identical Phi Values (signed word) atan2_16::x#17 (signed word) atan2_16::x#0 +Identical Phi Values (signed word) atan2_16::y#19 (signed word) atan2_16::y#0 Identical Phi Values (byte*) SCREEN_COPY#22 (byte*) SCREEN_COPY#0 Identical Phi Values (byte) getCharToProcess::y#2 (byte) getCharToProcess::y#7 Identical Phi Values (byte) startProcessing::center_y#8 (byte) startProcessing::center_y#0 Identical Phi Values (byte) startProcessing::center_x#8 (byte) startProcessing::center_x#0 -Identical Phi Values (word*) SQUARES#18 (word*) SQUARES#1 -Identical Phi Values (byte) NUM_SQUARES#33 (const byte) NUM_SQUARES#3 Successful SSA optimization Pass2IdenticalPhiElimination -Simple Condition (bool~) processChars::$18 [240] if(*((word*)(struct ProcessingSprite*) processChars::processing#0)<(word) XPOS_LEFTMOST#0) goto processChars::@7 -Simple Condition (bool~) processChars::$23 [334] if(*((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y)>(word) YPOS_BOTTOMMOST#0) goto processChars::@7 -Simple Condition (bool~) processChars::$21 [335] if(*((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y)<(word) YPOS_TOPMOST#0) goto processChars::@7 -Simple Condition (bool~) processChars::$19 [336] if(*((word*)(struct ProcessingSprite*) processChars::processing#0)>(word) XPOS_RIGHTMOST#0) goto processChars::@7 +Simple Condition (bool~) processChars::$18 [230] if(*((word*)(struct ProcessingSprite*) processChars::processing#0)<(word) XPOS_LEFTMOST#0) goto processChars::@7 +Simple Condition (bool~) processChars::$23 [318] if(*((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y)>(word) YPOS_BOTTOMMOST#0) goto processChars::@7 +Simple Condition (bool~) processChars::$21 [319] if(*((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y)<(word) YPOS_TOPMOST#0) goto processChars::@7 +Simple Condition (bool~) processChars::$19 [320] if(*((word*)(struct ProcessingSprite*) processChars::processing#0)>(word) XPOS_RIGHTMOST#0) goto processChars::@7 Successful SSA optimization Pass2ConditionalJumpSimplification -Constant right-side identified [24] (word) malloc::size#0 ← (const byte) NUM_SQUARES#3 * (const byte) SIZEOF_WORD -Constant right-side identified [30] (byte~) init_squares::$2 ← (const byte) NUM_SQUARES#3 - (byte) 1 -Constant right-side identified [70] (byte*~) main::$5 ← (const byte*) SCREEN#0 + (word) $3e8 -Constant right-side identified [72] (byte~) main::$7 ← (const byte) NUM_PROCESSING#0 - (byte) 1 -Constant right-side identified [108] (byte*~) main::$4 ← (const byte*) SCREEN#0 + (word) $3e7 -Constant right-side identified [110] (byte*~) main::$15 ← (const byte*) COLS#0 + (word) $3e7 -Constant right-side identified [133] (byte~) startProcessing::$24 ← (const byte) NUM_PROCESSING#0 - (byte) 1 -Constant right-side identified [173] (byte*~) startProcessing::$19 ← (const byte*) SPRITE_DATA#0 / (byte) $40 -Constant right-side identified [198] (byte~) $2 ← (const byte) BORDER_XPOS_LEFT#0 - (byte) 8 -Constant right-side identified [201] (word) XPOS_RIGHTMOST#0 ← (const word) BORDER_XPOS_RIGHT#0 << (byte) 4 -Constant right-side identified [202] (byte~) $7 ← (const byte) BORDER_YPOS_TOP#0 - (byte) 8 -Constant right-side identified [207] (byte~) processChars::$1 ← (const byte) NUM_PROCESSING#0 - (byte) 1 -Constant right-side identified [223] (byte*~) processChars::$8 ← (const byte*) SCREEN#0 + (const word) SPRITE_PTRS#0 -Constant right-side identified [246] (byte~) processChars::$27 ← (const byte) BORDER_XPOS_LEFT#0 / (byte) 8 -Constant right-side identified [253] (byte~) processChars::$31 ← (const byte) BORDER_YPOS_TOP#0 / (byte) 8 -Constant right-side identified [302] (byte~) initSprites::$0 ← (const byte) NUM_PROCESSING#0 * (byte) $40 -Constant right-side identified [318] (byte~) setupRasterIrq::$1 ← < (const word) setupRasterIrq::raster#0 +Constant right-side identified [11] (byte~) atan2_16::$16 ← (const byte) CORDIC_ITERATIONS_16#0 - (byte) 1 +Constant right-side identified [60] (byte*~) main::$5 ← (const byte*) SCREEN#0 + (word) $3e8 +Constant right-side identified [62] (byte~) main::$7 ← (const byte) NUM_PROCESSING#0 - (byte) 1 +Constant right-side identified [98] (byte*~) main::$4 ← (const byte*) SCREEN#0 + (word) $3e7 +Constant right-side identified [100] (byte*~) main::$15 ← (const byte*) COLS#0 + (word) $3e7 +Constant right-side identified [123] (byte~) startProcessing::$24 ← (const byte) NUM_PROCESSING#0 - (byte) 1 +Constant right-side identified [163] (byte*~) startProcessing::$19 ← (const byte*) SPRITE_DATA#0 / (byte) $40 +Constant right-side identified [188] (byte~) $2 ← (const byte) BORDER_XPOS_LEFT#0 - (byte) 8 +Constant right-side identified [191] (word) XPOS_RIGHTMOST#0 ← (const word) BORDER_XPOS_RIGHT#0 << (byte) 4 +Constant right-side identified [192] (byte~) $7 ← (const byte) BORDER_YPOS_TOP#0 - (byte) 8 +Constant right-side identified [197] (byte~) processChars::$1 ← (const byte) NUM_PROCESSING#0 - (byte) 1 +Constant right-side identified [213] (byte*~) processChars::$8 ← (const byte*) SCREEN#0 + (const word) SPRITE_PTRS#0 +Constant right-side identified [236] (byte~) processChars::$27 ← (const byte) BORDER_XPOS_LEFT#0 / (byte) 8 +Constant right-side identified [243] (byte~) processChars::$31 ← (const byte) BORDER_YPOS_TOP#0 / (byte) 8 +Constant right-side identified [286] (byte~) initSprites::$0 ← (const byte) NUM_PROCESSING#0 * (byte) $40 +Constant right-side identified [302] (byte~) setupRasterIrq::$1 ← < (const word) setupRasterIrq::raster#0 Successful SSA optimization Pass2ConstantRValueConsolidation -Constant (const word) malloc::size#0 = NUM_SQUARES#3*SIZEOF_WORD -Constant (const byte) init_squares::$2 = NUM_SQUARES#3-1 -Constant (const byte) bsearch16u::num#2 = NUM_SQUARES#3 +Constant (const byte) atan2_16::$16 = CORDIC_ITERATIONS_16#0-1 Constant (const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 = { fill( NUM_PROCESSING#0, 0) } Constant (const byte*) main::$5 = SCREEN#0+$3e8 Constant (const byte) main::$7 = NUM_PROCESSING#0-1 @@ -3831,37 +3414,37 @@ Constant (const byte) processChars::$31 = BORDER_YPOS_TOP#0/8 Constant (const byte) initSprites::$0 = NUM_PROCESSING#0*$40 Constant (const byte) setupRasterIrq::$1 = =(byte) $18) goto init_dist_screen::@2 - to:init_dist_screen::@3 -init_dist_screen::@3: scope:[init_dist_screen] from init_dist_screen::@1 - [175] (byte~) init_dist_screen::$5 ← (byte) $18 - (byte) init_dist_screen::y2#0 - to:init_dist_screen::@4 -init_dist_screen::@4: scope:[init_dist_screen] from init_dist_screen::@2 init_dist_screen::@3 - [176] (byte) init_dist_screen::yd#0 ← phi( init_dist_screen::@2/(byte~) init_dist_screen::$7 init_dist_screen::@3/(byte~) init_dist_screen::$5 ) - [177] (byte) sqr::val#0 ← (byte) init_dist_screen::yd#0 - [178] call sqr - [179] (word) sqr::return#2 ← (word) sqr::return#0 - to:init_dist_screen::@11 -init_dist_screen::@11: scope:[init_dist_screen] from init_dist_screen::@4 - [180] (word) init_dist_screen::yds#0 ← (word) sqr::return#2 - to:init_dist_screen::@5 -init_dist_screen::@5: scope:[init_dist_screen] from init_dist_screen::@11 init_dist_screen::@13 - [181] (byte) init_dist_screen::xb#2 ← phi( init_dist_screen::@11/(byte) $27 init_dist_screen::@13/(byte) init_dist_screen::xb#1 ) - [181] (byte) init_dist_screen::x#2 ← phi( init_dist_screen::@11/(byte) 0 init_dist_screen::@13/(byte) init_dist_screen::x#1 ) - [182] (byte) init_dist_screen::x2#0 ← (byte) init_dist_screen::x#2 << (byte) 1 - [183] if((byte) init_dist_screen::x2#0>=(byte) $27) goto init_dist_screen::@6 - to:init_dist_screen::@7 -init_dist_screen::@7: scope:[init_dist_screen] from init_dist_screen::@5 - [184] (byte~) init_dist_screen::$13 ← (byte) $27 - (byte) init_dist_screen::x2#0 - to:init_dist_screen::@8 -init_dist_screen::@8: scope:[init_dist_screen] from init_dist_screen::@6 init_dist_screen::@7 - [185] (byte) init_dist_screen::xd#0 ← phi( init_dist_screen::@6/(byte~) init_dist_screen::$15 init_dist_screen::@7/(byte~) init_dist_screen::$13 ) - [186] (byte) sqr::val#1 ← (byte) init_dist_screen::xd#0 - [187] call sqr - [188] (word) sqr::return#3 ← (word) sqr::return#0 - to:init_dist_screen::@12 -init_dist_screen::@12: scope:[init_dist_screen] from init_dist_screen::@8 - [189] (word) init_dist_screen::xds#0 ← (word) sqr::return#3 - [190] (word) init_dist_screen::ds#0 ← (word) init_dist_screen::xds#0 + (word) init_dist_screen::yds#0 - [191] (word) sqrt::val#0 ← (word) init_dist_screen::ds#0 - [192] call sqrt - [193] (byte) sqrt::return#2 ← (byte) sqrt::return#0 - to:init_dist_screen::@13 -init_dist_screen::@13: scope:[init_dist_screen] from init_dist_screen::@12 - [194] (byte) init_dist_screen::d#0 ← (byte) sqrt::return#2 - [195] *((byte*) init_dist_screen::screen_topline#10 + (byte) init_dist_screen::x#2) ← (byte) init_dist_screen::d#0 - [196] *((byte*) init_dist_screen::screen_bottomline#10 + (byte) init_dist_screen::x#2) ← (byte) init_dist_screen::d#0 - [197] *((byte*) init_dist_screen::screen_topline#10 + (byte) init_dist_screen::xb#2) ← (byte) init_dist_screen::d#0 - [198] *((byte*) init_dist_screen::screen_bottomline#10 + (byte) init_dist_screen::xb#2) ← (byte) init_dist_screen::d#0 - [199] (byte) init_dist_screen::x#1 ← ++ (byte) init_dist_screen::x#2 - [200] (byte) init_dist_screen::xb#1 ← -- (byte) init_dist_screen::xb#2 - [201] if((byte) init_dist_screen::x#1<(byte) $13+(byte) 1) goto init_dist_screen::@5 - to:init_dist_screen::@9 -init_dist_screen::@9: scope:[init_dist_screen] from init_dist_screen::@13 - [202] (byte*) init_dist_screen::screen_topline#1 ← (byte*) init_dist_screen::screen_topline#10 + (byte) $28 - [203] (byte*) init_dist_screen::screen_bottomline#1 ← (byte*) init_dist_screen::screen_bottomline#10 - (byte) $28 - [204] (byte) init_dist_screen::y#1 ← ++ (byte) init_dist_screen::y#10 - [205] if((byte) init_dist_screen::y#1!=(byte) $d) goto init_dist_screen::@1 - to:init_dist_screen::@return -init_dist_screen::@return: scope:[init_dist_screen] from init_dist_screen::@9 - [206] return +init_angle_screen: scope:[init_angle_screen] from main + [169] (byte*) init_angle_screen::screen_topline#0 ← (byte*) init_angle_screen::screen#0 + (word)(number) $28*(number) $c + [170] (byte*) init_angle_screen::screen_bottomline#0 ← (byte*) init_angle_screen::screen#0 + (word)(number) $28*(number) $c + to:init_angle_screen::@1 +init_angle_screen::@1: scope:[init_angle_screen] from init_angle_screen init_angle_screen::@3 + [171] (byte*) init_angle_screen::screen_topline#5 ← phi( init_angle_screen/(byte*) init_angle_screen::screen_topline#0 init_angle_screen::@3/(byte*) init_angle_screen::screen_topline#1 ) + [171] (byte*) init_angle_screen::screen_bottomline#5 ← phi( init_angle_screen/(byte*) init_angle_screen::screen_bottomline#0 init_angle_screen::@3/(byte*) init_angle_screen::screen_bottomline#1 ) + [171] (byte) init_angle_screen::y#4 ← phi( init_angle_screen/(byte) 0 init_angle_screen::@3/(byte) init_angle_screen::y#1 ) + to:init_angle_screen::@2 +init_angle_screen::@2: scope:[init_angle_screen] from init_angle_screen::@1 init_angle_screen::@4 + [172] (byte) init_angle_screen::xb#2 ← phi( init_angle_screen::@1/(byte) $27 init_angle_screen::@4/(byte) init_angle_screen::xb#1 ) + [172] (byte) init_angle_screen::x#2 ← phi( init_angle_screen::@1/(byte) 0 init_angle_screen::@4/(byte) init_angle_screen::x#1 ) + [173] (byte~) init_angle_screen::$2 ← (byte) init_angle_screen::x#2 << (byte) 1 + [174] (byte~) init_angle_screen::$3 ← (byte) $27 - (byte~) init_angle_screen::$2 + [175] (word) init_angle_screen::xw#0 ← (byte~) init_angle_screen::$3 w= (byte) 0 + [176] (byte~) init_angle_screen::$6 ← (byte) init_angle_screen::y#4 << (byte) 1 + [177] (word) init_angle_screen::yw#0 ← (byte~) init_angle_screen::$6 w= (byte) 0 + [178] (signed word) atan2_16::x#0 ← (signed word)(word) init_angle_screen::xw#0 + [179] (signed word) atan2_16::y#0 ← (signed word)(word) init_angle_screen::yw#0 + [180] call atan2_16 + [181] (word) atan2_16::return#2 ← (word) atan2_16::return#0 + to:init_angle_screen::@4 +init_angle_screen::@4: scope:[init_angle_screen] from init_angle_screen::@2 + [182] (word) init_angle_screen::angle_w#0 ← (word) atan2_16::return#2 + [183] (word~) init_angle_screen::$10 ← (word) init_angle_screen::angle_w#0 + (byte) $80 + [184] (byte) init_angle_screen::ang_w#0 ← > (word~) init_angle_screen::$10 + [185] *((byte*) init_angle_screen::screen_bottomline#5 + (byte) init_angle_screen::xb#2) ← (byte) init_angle_screen::ang_w#0 + [186] (byte~) init_angle_screen::$12 ← - (byte) init_angle_screen::ang_w#0 + [187] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::xb#2) ← (byte~) init_angle_screen::$12 + [188] (byte~) init_angle_screen::$13 ← (byte) $80 + (byte) init_angle_screen::ang_w#0 + [189] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$13 + [190] (byte~) init_angle_screen::$14 ← (byte) $80 - (byte) init_angle_screen::ang_w#0 + [191] *((byte*) init_angle_screen::screen_bottomline#5 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$14 + [192] (byte) init_angle_screen::x#1 ← ++ (byte) init_angle_screen::x#2 + [193] (byte) init_angle_screen::xb#1 ← -- (byte) init_angle_screen::xb#2 + [194] if((byte) init_angle_screen::x#1<(byte) $13+(byte) 1) goto init_angle_screen::@2 + to:init_angle_screen::@3 +init_angle_screen::@3: scope:[init_angle_screen] from init_angle_screen::@4 + [195] (byte*) init_angle_screen::screen_topline#1 ← (byte*) init_angle_screen::screen_topline#5 - (byte) $28 + [196] (byte*) init_angle_screen::screen_bottomline#1 ← (byte*) init_angle_screen::screen_bottomline#5 + (byte) $28 + [197] (byte) init_angle_screen::y#1 ← ++ (byte) init_angle_screen::y#4 + [198] if((byte) init_angle_screen::y#1!=(byte) $d) goto init_angle_screen::@1 + to:init_angle_screen::@return +init_angle_screen::@return: scope:[init_angle_screen] from init_angle_screen::@3 + [199] return to:@return -init_dist_screen::@6: scope:[init_dist_screen] from init_dist_screen::@5 - [207] (byte~) init_dist_screen::$15 ← (byte) init_dist_screen::x2#0 - (byte) $27 - to:init_dist_screen::@8 -init_dist_screen::@2: scope:[init_dist_screen] from init_dist_screen::@1 - [208] (byte~) init_dist_screen::$7 ← (byte) init_dist_screen::y2#0 - (byte) $18 - to:init_dist_screen::@4 -sqrt: scope:[sqrt] from init_dist_screen::@12 - [209] (word) bsearch16u::key#0 ← (word) sqrt::val#0 - [210] (word*) bsearch16u::items#1 ← (word*)(void*) SQUARES#1 - [211] call bsearch16u - [212] (word*) bsearch16u::return#3 ← (word*) bsearch16u::return#1 - to:sqrt::@1 -sqrt::@1: scope:[sqrt] from sqrt - [213] (word*) sqrt::found#0 ← (word*) bsearch16u::return#3 - [214] (word~) sqrt::$3 ← (word*) sqrt::found#0 - (word*)(void*) SQUARES#1 - [215] (word~) sqrt::$1 ← (word~) sqrt::$3 >> (byte) 1 - [216] (byte) sqrt::return#0 ← (byte)(word~) sqrt::$1 - to:sqrt::@return -sqrt::@return: scope:[sqrt] from sqrt::@1 - [217] return +atan2_16: scope:[atan2_16] from init_angle_screen::@2 + [200] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 + to:atan2_16::@2 +atan2_16::@2: scope:[atan2_16] from atan2_16 + [201] (signed word~) atan2_16::$2 ← - (signed word) atan2_16::y#0 + to:atan2_16::@3 +atan2_16::@3: scope:[atan2_16] from atan2_16::@1 atan2_16::@2 + [202] (signed word) atan2_16::yi#0 ← phi( atan2_16::@1/(signed word~) atan2_16::yi#16 atan2_16::@2/(signed word~) atan2_16::$2 ) + [203] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4 + to:atan2_16::@5 +atan2_16::@5: scope:[atan2_16] from atan2_16::@3 + [204] (signed word~) atan2_16::$7 ← - (signed word) atan2_16::x#0 + to:atan2_16::@6 +atan2_16::@6: scope:[atan2_16] from atan2_16::@4 atan2_16::@5 + [205] (signed word) atan2_16::xi#0 ← phi( atan2_16::@4/(signed word~) atan2_16::xi#13 atan2_16::@5/(signed word~) atan2_16::$7 ) + to:atan2_16::@10 +atan2_16::@10: scope:[atan2_16] from atan2_16::@19 atan2_16::@6 + [206] (word) atan2_16::angle#12 ← phi( atan2_16::@19/(word) atan2_16::angle#13 atan2_16::@6/(byte) 0 ) + [206] (byte) atan2_16::i#2 ← phi( atan2_16::@19/(byte) atan2_16::i#1 atan2_16::@6/(byte) 0 ) + [206] (signed word) atan2_16::xi#3 ← phi( atan2_16::@19/(signed word) atan2_16::xi#8 atan2_16::@6/(signed word) atan2_16::xi#0 ) + [206] (signed word) atan2_16::yi#3 ← phi( atan2_16::@19/(signed word) atan2_16::yi#8 atan2_16::@6/(signed word) atan2_16::yi#0 ) + [207] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@11 + to:atan2_16::@12 +atan2_16::@12: scope:[atan2_16] from atan2_16::@10 atan2_16::@19 + [208] (word) atan2_16::angle#6 ← phi( atan2_16::@10/(word) atan2_16::angle#12 atan2_16::@19/(word) atan2_16::angle#13 ) + [209] (word) atan2_16::angle#1 ← (word) atan2_16::angle#6 >> (byte) 1 + [210] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7 + to:atan2_16::@21 +atan2_16::@21: scope:[atan2_16] from atan2_16::@12 + [211] (word) atan2_16::angle#4 ← (word) $8000 - (word) atan2_16::angle#1 + to:atan2_16::@7 +atan2_16::@7: scope:[atan2_16] from atan2_16::@12 atan2_16::@21 + [212] (word) atan2_16::angle#11 ← phi( atan2_16::@12/(word) atan2_16::angle#1 atan2_16::@21/(word) atan2_16::angle#4 ) + [213] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8 + to:atan2_16::@9 +atan2_16::@9: scope:[atan2_16] from atan2_16::@7 + [214] (word) atan2_16::angle#5 ← - (word) atan2_16::angle#11 + to:atan2_16::@8 +atan2_16::@8: scope:[atan2_16] from atan2_16::@7 atan2_16::@9 + [215] (word) atan2_16::return#0 ← phi( atan2_16::@9/(word) atan2_16::angle#5 atan2_16::@7/(word) atan2_16::angle#11 ) + to:atan2_16::@return +atan2_16::@return: scope:[atan2_16] from atan2_16::@8 + [216] return to:@return -bsearch16u: scope:[bsearch16u] from sqrt - [218] phi() - to:bsearch16u::@3 -bsearch16u::@3: scope:[bsearch16u] from bsearch16u bsearch16u::@7 - [219] (word*) bsearch16u::items#2 ← phi( bsearch16u/(word*) bsearch16u::items#1 bsearch16u::@7/(word*) bsearch16u::items#8 ) - [219] (byte) bsearch16u::num#3 ← phi( bsearch16u/(const byte) NUM_SQUARES#3 bsearch16u::@7/(byte) bsearch16u::num#0 ) - [220] if((byte) bsearch16u::num#3>(byte) 0) goto bsearch16u::@4 - to:bsearch16u::@5 -bsearch16u::@5: scope:[bsearch16u] from bsearch16u::@3 - [221] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@2 - to:bsearch16u::@1 -bsearch16u::@1: scope:[bsearch16u] from bsearch16u::@5 - [222] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#2 - (byte) 1*(const byte) SIZEOF_WORD - to:bsearch16u::@2 -bsearch16u::@2: scope:[bsearch16u] from bsearch16u::@1 bsearch16u::@5 - [223] (word*) bsearch16u::return#2 ← phi( bsearch16u::@5/(word*) bsearch16u::items#2 bsearch16u::@1/(word*~) bsearch16u::$2 ) - to:bsearch16u::@return -bsearch16u::@return: scope:[bsearch16u] from bsearch16u::@2 bsearch16u::@8 - [224] (word*) bsearch16u::return#1 ← phi( bsearch16u::@8/(word*~) bsearch16u::return#6 bsearch16u::@2/(word*) bsearch16u::return#2 ) - [225] return - to:@return -bsearch16u::@4: scope:[bsearch16u] from bsearch16u::@3 - [226] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#3 >> (byte) 1 - [227] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1 - [228] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#2 + (byte~) bsearch16u::$16 - [229] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0) - [230] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6 - to:bsearch16u::@8 -bsearch16u::@8: scope:[bsearch16u] from bsearch16u::@4 - [231] (word*~) bsearch16u::return#6 ← (word*) bsearch16u::pivot#0 - to:bsearch16u::@return -bsearch16u::@6: scope:[bsearch16u] from bsearch16u::@4 - [232] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@7 - to:bsearch16u::@9 -bsearch16u::@9: scope:[bsearch16u] from bsearch16u::@6 - [233] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD - [234] (byte) bsearch16u::num#1 ← -- (byte) bsearch16u::num#3 - to:bsearch16u::@7 -bsearch16u::@7: scope:[bsearch16u] from bsearch16u::@6 bsearch16u::@9 - [235] (word*) bsearch16u::items#8 ← phi( bsearch16u::@9/(word*) bsearch16u::items#0 bsearch16u::@6/(word*) bsearch16u::items#2 ) - [235] (byte) bsearch16u::num#5 ← phi( bsearch16u::@9/(byte) bsearch16u::num#1 bsearch16u::@6/(byte) bsearch16u::num#3 ) - [236] (byte) bsearch16u::num#0 ← (byte) bsearch16u::num#5 >> (byte) 1 - to:bsearch16u::@3 -sqr: scope:[sqr] from init_dist_screen::@4 init_dist_screen::@8 - [237] (byte) sqr::val#2 ← phi( init_dist_screen::@4/(byte) sqr::val#0 init_dist_screen::@8/(byte) sqr::val#1 ) - [238] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 - [239] (word) sqr::return#0 ← *((word*)(void*) SQUARES#1 + (byte~) sqr::$0) - to:sqr::@return -sqr::@return: scope:[sqr] from sqr - [240] return - to:@return -init_squares: scope:[init_squares] from init_dist_screen - [241] phi() - [242] call malloc - to:init_squares::@2 -init_squares::@2: scope:[init_squares] from init_squares - [243] (void*) SQUARES#1 ← (void*)(byte*) malloc::mem#0 - [244] (word*) init_squares::squares#0 ← (word*)(void*) SQUARES#1 - to:init_squares::@1 -init_squares::@1: scope:[init_squares] from init_squares::@1 init_squares::@2 - [245] (byte) init_squares::i#2 ← phi( init_squares::@1/(byte) init_squares::i#1 init_squares::@2/(byte) 0 ) - [245] (word*) init_squares::squares#2 ← phi( init_squares::@1/(word*) init_squares::squares#1 init_squares::@2/(word*) init_squares::squares#0 ) - [245] (word) init_squares::sqr#2 ← phi( init_squares::@1/(word) init_squares::sqr#1 init_squares::@2/(byte) 0 ) - [246] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 - [247] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD - [248] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 - [249] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 - [250] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 - [251] (byte) init_squares::i#1 ← ++ (byte) init_squares::i#2 - [252] if((byte) init_squares::i#1!=(const byte) NUM_SQUARES#3-(byte) 1+(byte) 1) goto init_squares::@1 - to:init_squares::@return -init_squares::@return: scope:[init_squares] from init_squares::@1 - [253] return - to:@return -malloc: scope:[malloc] from @1 @3 init_squares - [254] (word) malloc::size#3 ← phi( @1/(word) $3e8 @3/(word) $3e8 init_squares/(const byte) NUM_SQUARES#3*(const byte) SIZEOF_WORD ) - [254] (byte*) heap_head#12 ← phi( @1/(const byte*) HEAP_START#0 @3/(byte*) heap_head#1 init_squares/(byte*) heap_head#1 ) - [255] (byte*) malloc::mem#0 ← (byte*) heap_head#12 - [256] (byte*) heap_head#1 ← (byte*) heap_head#12 + (word) malloc::size#3 +atan2_16::@11: scope:[atan2_16] from atan2_16::@10 + [217] (byte~) atan2_16::shift#5 ← (byte) atan2_16::i#2 + [218] (signed word~) atan2_16::xd#10 ← (signed word) atan2_16::xi#3 + [219] (signed word~) atan2_16::yd#10 ← (signed word) atan2_16::yi#3 + to:atan2_16::@13 +atan2_16::@13: scope:[atan2_16] from atan2_16::@11 atan2_16::@14 + [220] (signed word) atan2_16::yd#3 ← phi( atan2_16::@11/(signed word~) atan2_16::yd#10 atan2_16::@14/(signed word) atan2_16::yd#1 ) + [220] (signed word) atan2_16::xd#3 ← phi( atan2_16::@11/(signed word~) atan2_16::xd#10 atan2_16::@14/(signed word) atan2_16::xd#1 ) + [220] (byte) atan2_16::shift#2 ← phi( atan2_16::@11/(byte~) atan2_16::shift#5 atan2_16::@14/(byte) atan2_16::shift#1 ) + [221] if((byte) atan2_16::shift#2>=(byte) 2) goto atan2_16::@14 + to:atan2_16::@15 +atan2_16::@15: scope:[atan2_16] from atan2_16::@13 + [222] if((byte) 0==(byte) atan2_16::shift#2) goto atan2_16::@17 + to:atan2_16::@16 +atan2_16::@16: scope:[atan2_16] from atan2_16::@15 + [223] (signed word) atan2_16::xd#2 ← (signed word) atan2_16::xd#3 >> (signed byte) 1 + [224] (signed word) atan2_16::yd#2 ← (signed word) atan2_16::yd#3 >> (signed byte) 1 + to:atan2_16::@17 +atan2_16::@17: scope:[atan2_16] from atan2_16::@15 atan2_16::@16 + [225] (signed word) atan2_16::xd#5 ← phi( atan2_16::@15/(signed word) atan2_16::xd#3 atan2_16::@16/(signed word) atan2_16::xd#2 ) + [225] (signed word) atan2_16::yd#5 ← phi( atan2_16::@15/(signed word) atan2_16::yd#3 atan2_16::@16/(signed word) atan2_16::yd#2 ) + [226] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@18 + to:atan2_16::@20 +atan2_16::@20: scope:[atan2_16] from atan2_16::@17 + [227] (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#3 - (signed word) atan2_16::yd#5 + [228] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#5 + [229] (byte~) atan2_16::$24 ← (byte) atan2_16::i#2 << (byte) 1 + [230] (word) atan2_16::angle#3 ← (word) atan2_16::angle#12 - *((const word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16#0 + (byte~) atan2_16::$24) + to:atan2_16::@19 +atan2_16::@19: scope:[atan2_16] from atan2_16::@18 atan2_16::@20 + [231] (signed word) atan2_16::xi#8 ← phi( atan2_16::@18/(signed word) atan2_16::xi#1 atan2_16::@20/(signed word) atan2_16::xi#2 ) + [231] (word) atan2_16::angle#13 ← phi( atan2_16::@18/(word) atan2_16::angle#2 atan2_16::@20/(word) atan2_16::angle#3 ) + [231] (signed word) atan2_16::yi#8 ← phi( atan2_16::@18/(signed word) atan2_16::yi#1 atan2_16::@20/(signed word) atan2_16::yi#2 ) + [232] (byte) atan2_16::i#1 ← ++ (byte) atan2_16::i#2 + [233] if((byte) atan2_16::i#1==(const byte) CORDIC_ITERATIONS_16#0-(byte) 1+(byte) 1) goto atan2_16::@12 + to:atan2_16::@10 +atan2_16::@18: scope:[atan2_16] from atan2_16::@17 + [234] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#5 + [235] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#5 + [236] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 << (byte) 1 + [237] (word) atan2_16::angle#2 ← (word) atan2_16::angle#12 + *((const word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16#0 + (byte~) atan2_16::$23) + to:atan2_16::@19 +atan2_16::@14: scope:[atan2_16] from atan2_16::@13 + [238] (signed word) atan2_16::xd#1 ← (signed word) atan2_16::xd#3 >> (signed byte) 2 + [239] (signed word) atan2_16::yd#1 ← (signed word) atan2_16::yd#3 >> (signed byte) 2 + [240] (byte) atan2_16::shift#1 ← (byte) atan2_16::shift#2 - (byte) 2 + to:atan2_16::@13 +atan2_16::@4: scope:[atan2_16] from atan2_16::@3 + [241] (signed word~) atan2_16::xi#13 ← (signed word) atan2_16::x#0 + to:atan2_16::@6 +atan2_16::@1: scope:[atan2_16] from atan2_16 + [242] (signed word~) atan2_16::yi#16 ← (signed word) atan2_16::y#0 + to:atan2_16::@3 +malloc: scope:[malloc] from @1 @3 + [243] (byte*) heap_head#5 ← phi( @1/(const byte*) HEAP_START#0 @3/(byte*) heap_head#1 ) + [244] (byte*) malloc::mem#0 ← (byte*) heap_head#5 + [245] (byte*) heap_head#1 ← (byte*) heap_head#5 + (word) $3e8 to:malloc::@return malloc::@return: scope:[malloc] from malloc - [257] return + [246] return to:@return irqBottom: scope:[irqBottom] from - [258] phi() + [247] phi() to:irqBottom::@1 irqBottom::@1: scope:[irqBottom] from irqBottom - [259] phi() - [260] call processChars + [248] phi() + [249] call processChars to:irqBottom::@2 irqBottom::@2: scope:[irqBottom] from irqBottom::@1 - [261] *((const byte*) RASTER#0) ← (const byte) RASTER_IRQ_TOP#0 - [262] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_ALL)(void()) irqTop() - [263] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 + [250] *((const byte*) RASTER#0) ← (const byte) RASTER_IRQ_TOP#0 + [251] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_ALL)(void()) irqTop() + [252] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 to:irqBottom::@return irqBottom::@return: scope:[irqBottom] from irqBottom::@2 - [264] return + [253] return to:@return processChars: scope:[processChars] from irqBottom::@1 - [265] phi() + [254] phi() to:processChars::@1 processChars::@1: scope:[processChars] from processChars processChars::@2 - [266] (byte) processChars::numActive#10 ← phi( processChars/(byte) 0 processChars::@2/(byte) processChars::numActive#3 ) - [266] (byte) processChars::i#10 ← phi( processChars/(byte) 0 processChars::@2/(byte) processChars::i#1 ) - [267] (byte) processChars::$67 ← (byte) processChars::i#10 << (byte) 1 - [268] (byte) processChars::$68 ← (byte) processChars::$67 + (byte) processChars::i#10 - [269] (byte) processChars::$69 ← (byte) processChars::$68 << (byte) 1 - [270] (byte) processChars::$70 ← (byte) processChars::$69 + (byte) processChars::i#10 - [271] (byte~) processChars::$37 ← (byte) processChars::$70 << (byte) 1 - [272] (struct ProcessingSprite*) processChars::processing#0 ← (const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (byte~) processChars::$37 - [273] (byte) processChars::bitmask#0 ← (byte) 1 << *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID) - [274] if(*((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS)==(const byte) STATUS_FREE) goto processChars::@2 + [255] (byte) processChars::numActive#10 ← phi( processChars/(byte) 0 processChars::@2/(byte) processChars::numActive#3 ) + [255] (byte) processChars::i#10 ← phi( processChars/(byte) 0 processChars::@2/(byte) processChars::i#1 ) + [256] (byte) processChars::$67 ← (byte) processChars::i#10 << (byte) 1 + [257] (byte) processChars::$68 ← (byte) processChars::$67 + (byte) processChars::i#10 + [258] (byte) processChars::$69 ← (byte) processChars::$68 << (byte) 1 + [259] (byte) processChars::$70 ← (byte) processChars::$69 + (byte) processChars::i#10 + [260] (byte~) processChars::$37 ← (byte) processChars::$70 << (byte) 1 + [261] (struct ProcessingSprite*) processChars::processing#0 ← (const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (byte~) processChars::$37 + [262] (byte) processChars::bitmask#0 ← (byte) 1 << *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID) + [263] if(*((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS)==(const byte) STATUS_FREE) goto processChars::@2 to:processChars::@10 processChars::@10: scope:[processChars] from processChars::@1 - [275] if(*((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS)!=(const byte) STATUS_NEW) goto processChars::@3 + [264] if(*((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS)!=(const byte) STATUS_NEW) goto processChars::@3 to:processChars::@11 processChars::@11: scope:[processChars] from processChars::@10 - [276] *(*((byte**)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR)) ← (byte) ' ' - [277] *((const byte*) SPRITES_ENABLE#0) ← *((const byte*) SPRITES_ENABLE#0) | (byte) processChars::bitmask#0 - [278] *((const byte*) SPRITES_COLS#0 + *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID)) ← *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_COL) - [279] *((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) - [280] *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) ← (const byte) STATUS_PROCESSING + [265] *(*((byte**)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR)) ← (byte) ' ' + [266] *((const byte*) SPRITES_ENABLE#0) ← *((const byte*) SPRITES_ENABLE#0) | (byte) processChars::bitmask#0 + [267] *((const byte*) SPRITES_COLS#0 + *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID)) ← *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_COL) + [268] *((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) + [269] *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) ← (const byte) STATUS_PROCESSING to:processChars::@3 processChars::@3: scope:[processChars] from processChars::@10 processChars::@11 - [281] (word) processChars::xpos#0 ← *((word*)(struct ProcessingSprite*) processChars::processing#0) >> (byte) 4 - [282] (byte~) processChars::$11 ← > (word) processChars::xpos#0 - [283] if((byte) 0!=(byte~) processChars::$11) goto processChars::@4 + [270] (word) processChars::xpos#0 ← *((word*)(struct ProcessingSprite*) processChars::processing#0) >> (byte) 4 + [271] (byte~) processChars::$11 ← > (word) processChars::xpos#0 + [272] if((byte) 0!=(byte~) processChars::$11) goto processChars::@4 to:processChars::@8 processChars::@8: scope:[processChars] from processChars::@3 - [284] (byte~) processChars::$12 ← (byte) $ff ^ (byte) processChars::bitmask#0 - [285] *((const byte*) SPRITES_XMSB#0) ← *((const byte*) SPRITES_XMSB#0) & (byte~) processChars::$12 + [273] (byte~) processChars::$12 ← (byte) $ff ^ (byte) processChars::bitmask#0 + [274] *((const byte*) SPRITES_XMSB#0) ← *((const byte*) SPRITES_XMSB#0) & (byte~) processChars::$12 to:processChars::@5 processChars::@5: scope:[processChars] from processChars::@4 processChars::@8 - [286] (byte~) processChars::$17 ← (byte) processChars::i#10 << (byte) 1 - [287] (byte~) processChars::$14 ← (byte)(word) processChars::xpos#0 - [288] *((const byte*) SPRITES_XPOS#0 + (byte~) processChars::$17) ← (byte~) processChars::$14 - [289] (word~) processChars::$15 ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y) >> (byte) 4 - [290] (byte) processChars::ypos#0 ← (byte)(word~) processChars::$15 - [291] *((const byte*) SPRITES_YPOS#0 + (byte~) processChars::$17) ← (byte) processChars::ypos#0 - [292] if(*((word*)(struct ProcessingSprite*) processChars::processing#0)<(const word) XPOS_LEFTMOST#0) goto processChars::@6 + [275] (byte~) processChars::$17 ← (byte) processChars::i#10 << (byte) 1 + [276] (byte~) processChars::$14 ← (byte)(word) processChars::xpos#0 + [277] *((const byte*) SPRITES_XPOS#0 + (byte~) processChars::$17) ← (byte~) processChars::$14 + [278] (word~) processChars::$15 ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y) >> (byte) 4 + [279] (byte) processChars::ypos#0 ← (byte)(word~) processChars::$15 + [280] *((const byte*) SPRITES_YPOS#0 + (byte~) processChars::$17) ← (byte) processChars::ypos#0 + [281] if(*((word*)(struct ProcessingSprite*) processChars::processing#0)<(const word) XPOS_LEFTMOST#0) goto processChars::@6 to:processChars::@14 processChars::@14: scope:[processChars] from processChars::@5 - [293] if(*((word*)(struct ProcessingSprite*) processChars::processing#0)>(const word) XPOS_RIGHTMOST#0) goto processChars::@6 + [282] if(*((word*)(struct ProcessingSprite*) processChars::processing#0)>(const word) XPOS_RIGHTMOST#0) goto processChars::@6 to:processChars::@13 processChars::@13: scope:[processChars] from processChars::@14 - [294] if(*((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y)<(const word) YPOS_TOPMOST#0) goto processChars::@6 + [283] if(*((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y)<(const word) YPOS_TOPMOST#0) goto processChars::@6 to:processChars::@12 processChars::@12: scope:[processChars] from processChars::@13 - [295] if(*((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y)>(const word) YPOS_BOTTOMMOST#0) goto processChars::@6 + [284] if(*((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y)>(const word) YPOS_BOTTOMMOST#0) goto processChars::@6 to:processChars::@9 processChars::@9: scope:[processChars] from processChars::@12 - [296] (word~) processChars::$25 ← (word) processChars::xpos#0 >> (byte) 3 - [297] (byte~) processChars::$26 ← (byte)(word~) processChars::$25 - [298] (byte) processChars::xchar#0 ← (byte~) processChars::$26 - (const byte) BORDER_XPOS_LEFT#0/(byte) 8 - [299] (byte~) processChars::$38 ← (byte) processChars::xchar#0 << (byte) 1 - [300] *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX) + *((const word[$28]) VXSIN#0 + (byte~) processChars::$38) - [301] *((word*)(struct ProcessingSprite*) processChars::processing#0) ← *((word*)(struct ProcessingSprite*) processChars::processing#0) + *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX) - [302] (byte~) processChars::$30 ← (byte) processChars::ypos#0 >> (byte) 3 - [303] (byte) processChars::ychar#0 ← (byte~) processChars::$30 - (const byte) BORDER_YPOS_TOP#0/(byte) 8 - [304] (byte~) processChars::$39 ← (byte) processChars::ychar#0 << (byte) 1 - [305] *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY) + *((const word[$19]) VYSIN#0 + (byte~) processChars::$39) - [306] *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y) + *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY) + [285] (word~) processChars::$25 ← (word) processChars::xpos#0 >> (byte) 3 + [286] (byte~) processChars::$26 ← (byte)(word~) processChars::$25 + [287] (byte) processChars::xchar#0 ← (byte~) processChars::$26 - (const byte) BORDER_XPOS_LEFT#0/(byte) 8 + [288] (byte~) processChars::$38 ← (byte) processChars::xchar#0 << (byte) 1 + [289] *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX) + *((const word[$28]) VXSIN#0 + (byte~) processChars::$38) + [290] *((word*)(struct ProcessingSprite*) processChars::processing#0) ← *((word*)(struct ProcessingSprite*) processChars::processing#0) + *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX) + [291] (byte~) processChars::$30 ← (byte) processChars::ypos#0 >> (byte) 3 + [292] (byte) processChars::ychar#0 ← (byte~) processChars::$30 - (const byte) BORDER_YPOS_TOP#0/(byte) 8 + [293] (byte~) processChars::$39 ← (byte) processChars::ychar#0 << (byte) 1 + [294] *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY) + *((const word[$19]) VYSIN#0 + (byte~) processChars::$39) + [295] *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y) + *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY) to:processChars::@7 processChars::@7: scope:[processChars] from processChars::@6 processChars::@9 - [307] (byte) processChars::numActive#1 ← ++ (byte) processChars::numActive#10 + [296] (byte) processChars::numActive#1 ← ++ (byte) processChars::numActive#10 to:processChars::@2 processChars::@2: scope:[processChars] from processChars::@1 processChars::@7 - [308] (byte) processChars::numActive#3 ← phi( processChars::@1/(byte) processChars::numActive#10 processChars::@7/(byte) processChars::numActive#1 ) - [309] (byte) processChars::i#1 ← ++ (byte) processChars::i#10 - [310] if((byte) processChars::i#1!=(const byte) NUM_PROCESSING#0-(byte) 1+(byte) 1) goto processChars::@1 + [297] (byte) processChars::numActive#3 ← phi( processChars::@1/(byte) processChars::numActive#10 processChars::@7/(byte) processChars::numActive#1 ) + [298] (byte) processChars::i#1 ← ++ (byte) processChars::i#10 + [299] if((byte) processChars::i#1!=(const byte) NUM_PROCESSING#0-(byte) 1+(byte) 1) goto processChars::@1 to:processChars::@return processChars::@return: scope:[processChars] from processChars::@2 - [311] return + [300] return to:@return processChars::@6: scope:[processChars] from processChars::@12 processChars::@13 processChars::@14 processChars::@5 - [312] *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) ← (const byte) STATUS_FREE - [313] (byte~) processChars::$33 ← (byte) $ff ^ (byte) processChars::bitmask#0 - [314] *((const byte*) SPRITES_ENABLE#0) ← *((const byte*) SPRITES_ENABLE#0) & (byte~) processChars::$33 + [301] *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) ← (const byte) STATUS_FREE + [302] (byte~) processChars::$33 ← (byte) $ff ^ (byte) processChars::bitmask#0 + [303] *((const byte*) SPRITES_ENABLE#0) ← *((const byte*) SPRITES_ENABLE#0) & (byte~) processChars::$33 to:processChars::@7 processChars::@4: scope:[processChars] from processChars::@3 - [315] *((const byte*) SPRITES_XMSB#0) ← *((const byte*) SPRITES_XMSB#0) | (byte) processChars::bitmask#0 + [304] *((const byte*) SPRITES_XMSB#0) ← *((const byte*) SPRITES_XMSB#0) | (byte) processChars::bitmask#0 to:processChars::@5 irqTop: scope:[irqTop] from - [316] phi() + [305] phi() to:irqTop::@1 irqTop::@1: scope:[irqTop] from irqTop - [317] *((const byte*) RASTER#0) ← (const byte) RASTER_IRQ_MIDDLE#0 - [318] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_ALL)(void()) irqBottom() - [319] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 + [306] *((const byte*) RASTER#0) ← (const byte) RASTER_IRQ_MIDDLE#0 + [307] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_ALL)(void()) irqBottom() + [308] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 to:irqTop::@return irqTop::@return: scope:[irqTop] from irqTop::@1 - [320] return + [309] return to:@return @@ -4895,6 +4461,8 @@ VARIABLE REGISTER WEIGHTS (byte*) CIA1_INTERRUPT (byte) CIA_INTERRUPT_CLEAR (byte*) COLS +(word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16 +(byte) CORDIC_ITERATIONS_16 (bool) DEBUG (void()**) HARDWARE_IRQ (byte*) HEAP_START @@ -4904,7 +4472,6 @@ VARIABLE REGISTER WEIGHTS (byte) LIGHT_BLUE (byte) NOT_FOUND (byte) NUM_PROCESSING -(byte) NUM_SQUARES (struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING (byte*) PROCPORT (byte*) PROCPORT_DDR @@ -4941,8 +4508,6 @@ VARIABLE REGISTER WEIGHTS (byte*) SPRITES_YPOS (byte*) SPRITE_DATA (word) SPRITE_PTRS -(word*) SQUARES -(void*) SQUARES#1 0.03225806451612903 (byte*) VIC_CONTROL (word[$28]) VXSIN (word[$19]) VYSIN @@ -4951,31 +4516,61 @@ VARIABLE REGISTER WEIGHTS (word) XPOS_RIGHTMOST (word) YPOS_BOTTOMMOST (word) YPOS_TOPMOST -(word*()) bsearch16u((word) bsearch16u::key , (word*) bsearch16u::items , (byte) bsearch16u::num) -(byte~) bsearch16u::$16 2002.0 -(word*~) bsearch16u::$2 4.0 -(byte~) bsearch16u::$6 2002.0 -(word*) bsearch16u::items -(word*) bsearch16u::items#0 1001.0 -(word*) bsearch16u::items#1 2.0 -(word*) bsearch16u::items#2 334.5555555555556 -(word*) bsearch16u::items#8 1501.5 -(word) bsearch16u::key -(word) bsearch16u::key#0 0.26666666666666666 -(byte) bsearch16u::num -(byte) bsearch16u::num#0 2002.0 -(byte) bsearch16u::num#1 2002.0 -(byte) bsearch16u::num#3 556.1111111111111 -(byte) bsearch16u::num#5 3003.0 -(word*) bsearch16u::pivot -(word*) bsearch16u::pivot#0 501.0 -(signed word) bsearch16u::result -(signed word) bsearch16u::result#0 1501.5 -(word*) bsearch16u::return -(word*) bsearch16u::return#1 2.0 -(word*) bsearch16u::return#2 6.0 -(word*) bsearch16u::return#3 4.0 -(word*~) bsearch16u::return#6 4.0 +(word()) atan2_16((signed word) atan2_16::x , (signed word) atan2_16::y) +(signed word~) atan2_16::$2 4.0 +(byte~) atan2_16::$23 2002.0 +(byte~) atan2_16::$24 2002.0 +(signed word~) atan2_16::$7 4.0 +(word) atan2_16::angle +(word) atan2_16::angle#1 3.0 +(word) atan2_16::angle#11 4.0 +(word) atan2_16::angle#12 190.66666666666666 +(word) atan2_16::angle#13 1334.6666666666667 +(word) atan2_16::angle#2 2002.0 +(word) atan2_16::angle#3 2002.0 +(word) atan2_16::angle#4 4.0 +(word) atan2_16::angle#5 4.0 +(word) atan2_16::angle#6 2004.0 +(byte) atan2_16::i +(byte) atan2_16::i#1 1501.5 +(byte) atan2_16::i#2 208.54166666666669 +(word) atan2_16::return +(word) atan2_16::return#0 34.99999999999999 +(word) atan2_16::return#2 202.0 +(byte) atan2_16::shift +(byte) atan2_16::shift#1 20002.0 +(byte) atan2_16::shift#2 8001.25 +(byte~) atan2_16::shift#5 667.3333333333334 +(signed word) atan2_16::x +(signed word) atan2_16::x#0 2.8684210526315796 +(signed word) atan2_16::xd +(signed word) atan2_16::xd#1 6667.333333333333 +(signed word~) atan2_16::xd#10 1001.0 +(signed word) atan2_16::xd#2 1001.0 +(signed word) atan2_16::xd#3 7668.333333333332 +(signed word) atan2_16::xd#5 1001.0 +(signed word) atan2_16::xi +(signed word) atan2_16::xi#0 6.0 +(signed word) atan2_16::xi#1 500.5 +(signed word~) atan2_16::xi#13 4.0 +(signed word) atan2_16::xi#2 500.5 +(signed word) atan2_16::xi#3 267.0666666666667 +(signed word) atan2_16::xi#8 1001.0 +(signed word) atan2_16::y +(signed word) atan2_16::y#0 2.724999999999999 +(signed word) atan2_16::yd +(signed word) atan2_16::yd#1 10001.0 +(signed word~) atan2_16::yd#10 2002.0 +(signed word) atan2_16::yd#2 2002.0 +(signed word) atan2_16::yd#3 4601.0 +(signed word) atan2_16::yd#5 2002.0 +(signed word) atan2_16::yi +(signed word) atan2_16::yi#0 1.2000000000000002 +(signed word) atan2_16::yi#1 667.3333333333334 +(signed word~) atan2_16::yi#16 4.0 +(signed word) atan2_16::yi#2 667.3333333333334 +(signed word) atan2_16::yi#3 353.4117647058823 +(signed word) atan2_16::yi#8 1001.0 (struct ProcessingChar()) getCharToProcess() (byte*~) getCharToProcess::$10 4.0 (word) getCharToProcess::$12 4.0 @@ -5024,8 +4619,8 @@ VARIABLE REGISTER WEIGHTS (byte) getCharToProcess::y#1 101.0 (byte) getCharToProcess::y#7 80.2 (byte*) heap_head -(byte*) heap_head#1 0.6000000000000001 -(byte*) heap_head#12 4.0 +(byte*) heap_head#1 1.0 +(byte*) heap_head#5 3.0 (void()) initSprites() (byte) initSprites::i (byte) initSprites::i#1 16.5 @@ -5033,58 +4628,41 @@ VARIABLE REGISTER WEIGHTS (byte*) initSprites::sp (byte*) initSprites::sp#1 16.5 (byte*) initSprites::sp#2 16.5 -(void()) init_dist_screen((byte*) init_dist_screen::screen) -(byte~) init_dist_screen::$13 202.0 -(byte~) init_dist_screen::$15 202.0 -(byte~) init_dist_screen::$5 22.0 -(byte~) init_dist_screen::$7 22.0 -(byte) init_dist_screen::d -(byte) init_dist_screen::d#0 126.25 -(word) init_dist_screen::ds -(word) init_dist_screen::ds#0 202.0 -(byte*) init_dist_screen::screen -(byte*) init_dist_screen::screen#0 1.5 -(byte*) init_dist_screen::screen_bottomline -(byte*) init_dist_screen::screen_bottomline#0 4.0 -(byte*) init_dist_screen::screen_bottomline#1 7.333333333333333 -(byte*) init_dist_screen::screen_bottomline#10 6.848484848484849 -(byte*) init_dist_screen::screen_topline -(byte*) init_dist_screen::screen_topline#1 5.5 -(byte*) init_dist_screen::screen_topline#10 7.0625 -(byte) init_dist_screen::x -(byte) init_dist_screen::x#1 101.0 -(byte) init_dist_screen::x#2 26.578947368421055 -(byte) init_dist_screen::x2 -(byte) init_dist_screen::x2#0 202.0 -(byte) init_dist_screen::xb -(byte) init_dist_screen::xb#1 101.0 -(byte) init_dist_screen::xb#2 20.2 -(byte) init_dist_screen::xd -(byte) init_dist_screen::xd#0 303.0 -(word) init_dist_screen::xds -(word) init_dist_screen::xds#0 202.0 -(byte) init_dist_screen::y -(byte) init_dist_screen::y#1 16.5 -(byte) init_dist_screen::y#10 0.9705882352941178 -(byte) init_dist_screen::y2 -(byte) init_dist_screen::y2#0 22.0 -(byte) init_dist_screen::yd -(byte) init_dist_screen::yd#0 33.0 -(word) init_dist_screen::yds -(word) init_dist_screen::yds#0 4.869565217391305 -(void()) init_squares() -(byte~) init_squares::$3 22.0 -(byte~) init_squares::$4 22.0 -(byte) init_squares::i -(byte) init_squares::i#1 16.5 -(byte) init_squares::i#2 5.5 -(word) init_squares::sqr -(word) init_squares::sqr#1 7.333333333333333 -(word) init_squares::sqr#2 6.6000000000000005 -(word*) init_squares::squares -(word*) init_squares::squares#0 4.0 -(word*) init_squares::squares#1 3.6666666666666665 -(word*) init_squares::squares#2 17.5 +(void()) init_angle_screen((byte*) init_angle_screen::screen) +(word~) init_angle_screen::$10 202.0 +(byte~) init_angle_screen::$12 202.0 +(byte~) init_angle_screen::$13 202.0 +(byte~) init_angle_screen::$14 202.0 +(byte~) init_angle_screen::$2 202.0 +(byte~) init_angle_screen::$3 202.0 +(byte~) init_angle_screen::$6 202.0 +(byte) init_angle_screen::ang_w +(byte) init_angle_screen::ang_w#0 84.16666666666666 +(word) init_angle_screen::angle_w +(word) init_angle_screen::angle_w#0 202.0 +(byte*) init_angle_screen::screen +(byte*) init_angle_screen::screen#0 3.0 +(byte*) init_angle_screen::screen_bottomline +(byte*) init_angle_screen::screen_bottomline#0 4.0 +(byte*) init_angle_screen::screen_bottomline#1 7.333333333333333 +(byte*) init_angle_screen::screen_bottomline#5 9.040000000000001 +(byte*) init_angle_screen::screen_topline +(byte*) init_angle_screen::screen_topline#0 2.0 +(byte*) init_angle_screen::screen_topline#1 5.5 +(byte*) init_angle_screen::screen_topline#5 9.416666666666666 +(byte) init_angle_screen::x +(byte) init_angle_screen::x#1 101.0 +(byte) init_angle_screen::x#2 25.25 +(byte) init_angle_screen::xb +(byte) init_angle_screen::xb#1 101.0 +(byte) init_angle_screen::xb#2 19.238095238095237 +(signed word) init_angle_screen::xw +(word) init_angle_screen::xw#0 33.666666666666664 +(byte) init_angle_screen::y +(byte) init_angle_screen::y#1 16.5 +(byte) init_angle_screen::y#4 4.730769230769231 +(signed word) init_angle_screen::yw +(word) init_angle_screen::yw#0 50.5 interrupt(HARDWARE_ALL)(void()) irqBottom() (byte) irqBottom::i interrupt(HARDWARE_ALL)(void()) irqTop() @@ -5115,10 +4693,9 @@ interrupt(HARDWARE_ALL)(void()) irqTop() (byte*) main::src#2 16.5 (void*()) malloc((word) malloc::size) (byte*) malloc::mem -(byte*) malloc::mem#0 0.3333333333333333 +(byte*) malloc::mem#0 0.4 (void*) malloc::return (word) malloc::size -(word) malloc::size#3 1.0 (void()) processChars() (byte~) processChars::$11 22.0 (byte~) processChars::$12 22.0 @@ -5158,27 +4735,6 @@ interrupt(HARDWARE_ALL)(void()) irqTop() (void()) setupRasterIrq((word) setupRasterIrq::raster , (void()*) setupRasterIrq::irqRoutine) (void()*) setupRasterIrq::irqRoutine (word) setupRasterIrq::raster -(word()) sqr((byte) sqr::val) -(byte~) sqr::$0 4.0 -(word) sqr::return -(word) sqr::return#0 28.5 -(word) sqr::return#2 22.0 -(word) sqr::return#3 202.0 -(byte) sqr::val -(byte) sqr::val#0 22.0 -(byte) sqr::val#1 202.0 -(byte) sqr::val#2 114.0 -(byte()) sqrt((word) sqrt::val) -(word~) sqrt::$1 2.0 -(word~) sqrt::$3 4.0 -(word*) sqrt::found -(word*) sqrt::found#0 4.0 -(byte) sqrt::return -(byte) sqrt::return#0 34.33333333333333 -(byte) sqrt::return#2 202.0 -(byte) sqrt::sq -(word) sqrt::val -(word) sqrt::val#0 103.0 (void()) startProcessing((byte) startProcessing::center_x , (byte) startProcessing::center_y , (byte) startProcessing::center_dist) (word~) startProcessing::$0 3.0 (word~) startProcessing::$1 4.0 @@ -5268,25 +4824,25 @@ Initial phi equivalence classes [ getCharToProcess::return_dist#1 getCharToProcess::return_dist#5 getCharToProcess::return_dist#6 getCharToProcess::dist#0 ] [ initSprites::sp#2 initSprites::sp#1 ] [ initSprites::i#2 initSprites::i#1 ] -[ init_dist_screen::y#10 init_dist_screen::y#1 ] -[ init_dist_screen::screen_topline#10 init_dist_screen::screen_topline#1 init_dist_screen::screen#0 ] -[ init_dist_screen::screen_bottomline#10 init_dist_screen::screen_bottomline#1 init_dist_screen::screen_bottomline#0 ] -[ init_dist_screen::yd#0 init_dist_screen::$7 init_dist_screen::$5 ] -[ init_dist_screen::x#2 init_dist_screen::x#1 ] -[ init_dist_screen::xb#2 init_dist_screen::xb#1 ] -[ init_dist_screen::xd#0 init_dist_screen::$15 init_dist_screen::$13 ] -[ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#1 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 ] -[ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#3 bsearch16u::num#0 ] -[ sqr::val#2 sqr::val#0 sqr::val#1 ] -[ init_squares::sqr#2 init_squares::sqr#1 ] -[ init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 ] -[ init_squares::i#2 init_squares::i#1 ] -[ heap_head#12 heap_head#1 ] -[ malloc::size#3 ] +[ init_angle_screen::y#4 init_angle_screen::y#1 ] +[ init_angle_screen::screen_bottomline#5 init_angle_screen::screen_bottomline#0 init_angle_screen::screen_bottomline#1 ] +[ init_angle_screen::screen_topline#5 init_angle_screen::screen_topline#0 init_angle_screen::screen_topline#1 ] +[ init_angle_screen::x#2 init_angle_screen::x#1 ] +[ init_angle_screen::xb#2 init_angle_screen::xb#1 ] +[ atan2_16::yi#3 atan2_16::yi#8 atan2_16::yi#0 atan2_16::yi#16 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ] +[ atan2_16::xi#3 atan2_16::xi#8 atan2_16::xi#0 atan2_16::xi#13 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] +[ atan2_16::i#2 atan2_16::i#1 ] +[ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 ] +[ atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 ] +[ atan2_16::shift#2 atan2_16::shift#5 atan2_16::shift#1 ] +[ atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ] +[ atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] +[ heap_head#5 heap_head#1 ] [ processChars::i#10 processChars::i#1 ] [ processChars::numActive#10 processChars::numActive#3 processChars::numActive#1 ] Added variable SCREEN_COPY#0 to zero page equivalence class [ SCREEN_COPY#0 ] Added variable SCREEN_DIST#0 to zero page equivalence class [ SCREEN_DIST#0 ] +Added variable init_angle_screen::screen#0 to zero page equivalence class [ init_angle_screen::screen#0 ] Added variable main::$26 to zero page equivalence class [ main::$26 ] Added variable main::$27 to zero page equivalence class [ main::$27 ] Added variable main::$28 to zero page equivalence class [ main::$28 ] @@ -5339,31 +4895,22 @@ Added variable getCharToProcess::$12 to zero page equivalence class [ getCharToP Added variable getCharToProcess::$13 to zero page equivalence class [ getCharToProcess::$13 ] Added variable getCharToProcess::$9 to zero page equivalence class [ getCharToProcess::$9 ] Added variable getCharToProcess::$10 to zero page equivalence class [ getCharToProcess::$10 ] -Added variable init_dist_screen::y2#0 to zero page equivalence class [ init_dist_screen::y2#0 ] -Added variable sqr::return#2 to zero page equivalence class [ sqr::return#2 ] -Added variable init_dist_screen::yds#0 to zero page equivalence class [ init_dist_screen::yds#0 ] -Added variable init_dist_screen::x2#0 to zero page equivalence class [ init_dist_screen::x2#0 ] -Added variable sqr::return#3 to zero page equivalence class [ sqr::return#3 ] -Added variable init_dist_screen::xds#0 to zero page equivalence class [ init_dist_screen::xds#0 ] -Added variable init_dist_screen::ds#0 to zero page equivalence class [ init_dist_screen::ds#0 ] -Added variable sqrt::val#0 to zero page equivalence class [ sqrt::val#0 ] -Added variable sqrt::return#2 to zero page equivalence class [ sqrt::return#2 ] -Added variable init_dist_screen::d#0 to zero page equivalence class [ init_dist_screen::d#0 ] -Added variable bsearch16u::key#0 to zero page equivalence class [ bsearch16u::key#0 ] -Added variable bsearch16u::return#3 to zero page equivalence class [ bsearch16u::return#3 ] -Added variable sqrt::found#0 to zero page equivalence class [ sqrt::found#0 ] -Added variable sqrt::$3 to zero page equivalence class [ sqrt::$3 ] -Added variable sqrt::$1 to zero page equivalence class [ sqrt::$1 ] -Added variable sqrt::return#0 to zero page equivalence class [ sqrt::return#0 ] -Added variable bsearch16u::$6 to zero page equivalence class [ bsearch16u::$6 ] -Added variable bsearch16u::$16 to zero page equivalence class [ bsearch16u::$16 ] -Added variable bsearch16u::pivot#0 to zero page equivalence class [ bsearch16u::pivot#0 ] -Added variable bsearch16u::result#0 to zero page equivalence class [ bsearch16u::result#0 ] -Added variable sqr::$0 to zero page equivalence class [ sqr::$0 ] -Added variable sqr::return#0 to zero page equivalence class [ sqr::return#0 ] -Added variable SQUARES#1 to zero page equivalence class [ SQUARES#1 ] -Added variable init_squares::$3 to zero page equivalence class [ init_squares::$3 ] -Added variable init_squares::$4 to zero page equivalence class [ init_squares::$4 ] +Added variable init_angle_screen::$2 to zero page equivalence class [ init_angle_screen::$2 ] +Added variable init_angle_screen::$3 to zero page equivalence class [ init_angle_screen::$3 ] +Added variable init_angle_screen::xw#0 to zero page equivalence class [ init_angle_screen::xw#0 ] +Added variable init_angle_screen::$6 to zero page equivalence class [ init_angle_screen::$6 ] +Added variable init_angle_screen::yw#0 to zero page equivalence class [ init_angle_screen::yw#0 ] +Added variable atan2_16::x#0 to zero page equivalence class [ atan2_16::x#0 ] +Added variable atan2_16::y#0 to zero page equivalence class [ atan2_16::y#0 ] +Added variable atan2_16::return#2 to zero page equivalence class [ atan2_16::return#2 ] +Added variable init_angle_screen::angle_w#0 to zero page equivalence class [ init_angle_screen::angle_w#0 ] +Added variable init_angle_screen::$10 to zero page equivalence class [ init_angle_screen::$10 ] +Added variable init_angle_screen::ang_w#0 to zero page equivalence class [ init_angle_screen::ang_w#0 ] +Added variable init_angle_screen::$12 to zero page equivalence class [ init_angle_screen::$12 ] +Added variable init_angle_screen::$13 to zero page equivalence class [ init_angle_screen::$13 ] +Added variable init_angle_screen::$14 to zero page equivalence class [ init_angle_screen::$14 ] +Added variable atan2_16::$24 to zero page equivalence class [ atan2_16::$24 ] +Added variable atan2_16::$23 to zero page equivalence class [ atan2_16::$23 ] Added variable malloc::mem#0 to zero page equivalence class [ malloc::mem#0 ] Added variable processChars::$67 to zero page equivalence class [ processChars::$67 ] Added variable processChars::$68 to zero page equivalence class [ processChars::$68 ] @@ -5406,25 +4953,25 @@ Complete equivalence classes [ getCharToProcess::return_dist#1 getCharToProcess::return_dist#5 getCharToProcess::return_dist#6 getCharToProcess::dist#0 ] [ initSprites::sp#2 initSprites::sp#1 ] [ initSprites::i#2 initSprites::i#1 ] -[ init_dist_screen::y#10 init_dist_screen::y#1 ] -[ init_dist_screen::screen_topline#10 init_dist_screen::screen_topline#1 init_dist_screen::screen#0 ] -[ init_dist_screen::screen_bottomline#10 init_dist_screen::screen_bottomline#1 init_dist_screen::screen_bottomline#0 ] -[ init_dist_screen::yd#0 init_dist_screen::$7 init_dist_screen::$5 ] -[ init_dist_screen::x#2 init_dist_screen::x#1 ] -[ init_dist_screen::xb#2 init_dist_screen::xb#1 ] -[ init_dist_screen::xd#0 init_dist_screen::$15 init_dist_screen::$13 ] -[ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#1 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 ] -[ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#3 bsearch16u::num#0 ] -[ sqr::val#2 sqr::val#0 sqr::val#1 ] -[ init_squares::sqr#2 init_squares::sqr#1 ] -[ init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 ] -[ init_squares::i#2 init_squares::i#1 ] -[ heap_head#12 heap_head#1 ] -[ malloc::size#3 ] +[ init_angle_screen::y#4 init_angle_screen::y#1 ] +[ init_angle_screen::screen_bottomline#5 init_angle_screen::screen_bottomline#0 init_angle_screen::screen_bottomline#1 ] +[ init_angle_screen::screen_topline#5 init_angle_screen::screen_topline#0 init_angle_screen::screen_topline#1 ] +[ init_angle_screen::x#2 init_angle_screen::x#1 ] +[ init_angle_screen::xb#2 init_angle_screen::xb#1 ] +[ atan2_16::yi#3 atan2_16::yi#8 atan2_16::yi#0 atan2_16::yi#16 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ] +[ atan2_16::xi#3 atan2_16::xi#8 atan2_16::xi#0 atan2_16::xi#13 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] +[ atan2_16::i#2 atan2_16::i#1 ] +[ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 ] +[ atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 ] +[ atan2_16::shift#2 atan2_16::shift#5 atan2_16::shift#1 ] +[ atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ] +[ atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] +[ heap_head#5 heap_head#1 ] [ processChars::i#10 processChars::i#1 ] [ processChars::numActive#10 processChars::numActive#3 processChars::numActive#1 ] [ SCREEN_COPY#0 ] [ SCREEN_DIST#0 ] +[ init_angle_screen::screen#0 ] [ main::$26 ] [ main::$27 ] [ main::$28 ] @@ -5477,31 +5024,22 @@ Complete equivalence classes [ getCharToProcess::$13 ] [ getCharToProcess::$9 ] [ getCharToProcess::$10 ] -[ init_dist_screen::y2#0 ] -[ sqr::return#2 ] -[ init_dist_screen::yds#0 ] -[ init_dist_screen::x2#0 ] -[ sqr::return#3 ] -[ init_dist_screen::xds#0 ] -[ init_dist_screen::ds#0 ] -[ sqrt::val#0 ] -[ sqrt::return#2 ] -[ init_dist_screen::d#0 ] -[ bsearch16u::key#0 ] -[ bsearch16u::return#3 ] -[ sqrt::found#0 ] -[ sqrt::$3 ] -[ sqrt::$1 ] -[ sqrt::return#0 ] -[ bsearch16u::$6 ] -[ bsearch16u::$16 ] -[ bsearch16u::pivot#0 ] -[ bsearch16u::result#0 ] -[ sqr::$0 ] -[ sqr::return#0 ] -[ SQUARES#1 ] -[ init_squares::$3 ] -[ init_squares::$4 ] +[ init_angle_screen::$2 ] +[ init_angle_screen::$3 ] +[ init_angle_screen::xw#0 ] +[ init_angle_screen::$6 ] +[ init_angle_screen::yw#0 ] +[ atan2_16::x#0 ] +[ atan2_16::y#0 ] +[ atan2_16::return#2 ] +[ init_angle_screen::angle_w#0 ] +[ init_angle_screen::$10 ] +[ init_angle_screen::ang_w#0 ] +[ init_angle_screen::$12 ] +[ init_angle_screen::$13 ] +[ init_angle_screen::$14 ] +[ atan2_16::$24 ] +[ atan2_16::$23 ] [ malloc::mem#0 ] [ processChars::$67 ] [ processChars::$68 ] @@ -5543,125 +5081,116 @@ Allocated zp ZP_BYTE:22 [ getCharToProcess::closest_y#7 getCharToProcess::closes Allocated zp ZP_BYTE:23 [ getCharToProcess::return_dist#1 getCharToProcess::return_dist#5 getCharToProcess::return_dist#6 getCharToProcess::dist#0 ] Allocated zp ZP_WORD:24 [ initSprites::sp#2 initSprites::sp#1 ] Allocated zp ZP_BYTE:26 [ initSprites::i#2 initSprites::i#1 ] -Allocated zp ZP_BYTE:27 [ init_dist_screen::y#10 init_dist_screen::y#1 ] -Allocated zp ZP_WORD:28 [ init_dist_screen::screen_topline#10 init_dist_screen::screen_topline#1 init_dist_screen::screen#0 ] -Allocated zp ZP_WORD:30 [ init_dist_screen::screen_bottomline#10 init_dist_screen::screen_bottomline#1 init_dist_screen::screen_bottomline#0 ] -Allocated zp ZP_BYTE:32 [ init_dist_screen::yd#0 init_dist_screen::$7 init_dist_screen::$5 ] -Allocated zp ZP_BYTE:33 [ init_dist_screen::x#2 init_dist_screen::x#1 ] -Allocated zp ZP_BYTE:34 [ init_dist_screen::xb#2 init_dist_screen::xb#1 ] -Allocated zp ZP_BYTE:35 [ init_dist_screen::xd#0 init_dist_screen::$15 init_dist_screen::$13 ] -Allocated zp ZP_WORD:36 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#1 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 ] -Allocated zp ZP_BYTE:38 [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#3 bsearch16u::num#0 ] -Allocated zp ZP_BYTE:39 [ sqr::val#2 sqr::val#0 sqr::val#1 ] -Allocated zp ZP_WORD:40 [ init_squares::sqr#2 init_squares::sqr#1 ] -Allocated zp ZP_WORD:42 [ init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 ] -Allocated zp ZP_BYTE:44 [ init_squares::i#2 init_squares::i#1 ] -Allocated zp ZP_WORD:45 [ heap_head#12 heap_head#1 ] -Allocated zp ZP_WORD:47 [ malloc::size#3 ] -Allocated zp ZP_BYTE:49 [ processChars::i#10 processChars::i#1 ] -Allocated zp ZP_BYTE:50 [ processChars::numActive#10 processChars::numActive#3 processChars::numActive#1 ] -Allocated zp ZP_WORD:51 [ SCREEN_COPY#0 ] -Allocated zp ZP_WORD:53 [ SCREEN_DIST#0 ] -Allocated zp ZP_BYTE:55 [ main::$26 ] -Allocated zp ZP_BYTE:56 [ main::$27 ] -Allocated zp ZP_BYTE:57 [ main::$28 ] -Allocated zp ZP_BYTE:58 [ main::$29 ] -Allocated zp ZP_BYTE:59 [ main::$16 ] -Allocated zp ZP_BYTE:60 [ getCharToProcess::return_x#0 ] -Allocated zp ZP_BYTE:61 [ getCharToProcess::return_y#0 ] -Allocated zp ZP_BYTE:62 [ getCharToProcess::return_dist#0 ] -Allocated zp ZP_BYTE:63 [ main::center_x#0 ] -Allocated zp ZP_BYTE:64 [ main::center_y#0 ] -Allocated zp ZP_BYTE:65 [ main::center_dist#0 ] -Allocated zp ZP_BYTE:66 [ startProcessing::center_x#0 ] -Allocated zp ZP_BYTE:67 [ startProcessing::center_y#0 ] -Allocated zp ZP_BYTE:68 [ startProcessing::$42 ] -Allocated zp ZP_BYTE:69 [ startProcessing::$43 ] -Allocated zp ZP_BYTE:70 [ startProcessing::$44 ] -Allocated zp ZP_BYTE:71 [ startProcessing::$45 ] -Allocated zp ZP_BYTE:72 [ startProcessing::$30 ] -Allocated zp ZP_WORD:73 [ startProcessing::$0 ] -Allocated zp ZP_WORD:75 [ startProcessing::$47 ] -Allocated zp ZP_WORD:77 [ startProcessing::$48 ] -Allocated zp ZP_WORD:79 [ startProcessing::$1 ] -Allocated zp ZP_WORD:81 [ startProcessing::offset#0 ] -Allocated zp ZP_WORD:83 [ startProcessing::colPtr#0 ] -Allocated zp ZP_BYTE:85 [ startProcessing::spriteCol#0 ] -Allocated zp ZP_WORD:86 [ startProcessing::screenPtr#0 ] -Allocated zp ZP_WORD:88 [ startProcessing::$5 ] -Allocated zp ZP_WORD:90 [ startProcessing::$6 ] -Allocated zp ZP_BYTE:92 [ startProcessing::ch#0 ] -Allocated zp ZP_WORD:93 [ startProcessing::$8 ] -Allocated zp ZP_WORD:95 [ startProcessing::$9 ] -Allocated zp ZP_WORD:97 [ startProcessing::$11 ] -Allocated zp ZP_WORD:99 [ startProcessing::$12 ] -Allocated zp ZP_WORD:101 [ startProcessing::$13 ] -Allocated zp ZP_WORD:103 [ startProcessing::spriteX#0 ] -Allocated zp ZP_WORD:105 [ startProcessing::$15 ] -Allocated zp ZP_WORD:107 [ startProcessing::$16 ] -Allocated zp ZP_WORD:109 [ startProcessing::$17 ] -Allocated zp ZP_WORD:111 [ startProcessing::spriteY#0 ] -Allocated zp ZP_BYTE:113 [ startProcessing::spritePtr#0 ] -Allocated zp ZP_BYTE:114 [ startProcessing::$22 ] -Allocated zp ZP_WORD:115 [ startProcessing::$23 ] -Allocated zp ZP_BYTE:117 [ startProcessing::$50 ] -Allocated zp ZP_BYTE:118 [ startProcessing::$51 ] -Allocated zp ZP_BYTE:119 [ startProcessing::$52 ] -Allocated zp ZP_BYTE:120 [ startProcessing::$53 ] -Allocated zp ZP_BYTE:121 [ startProcessing::$31 ] -Allocated zp ZP_WORD:122 [ getCharToProcess::$8 ] -Allocated zp ZP_WORD:124 [ getCharToProcess::$12 ] -Allocated zp ZP_WORD:126 [ getCharToProcess::$13 ] -Allocated zp ZP_WORD:128 [ getCharToProcess::$9 ] -Allocated zp ZP_WORD:130 [ getCharToProcess::$10 ] -Allocated zp ZP_BYTE:132 [ init_dist_screen::y2#0 ] -Allocated zp ZP_WORD:133 [ sqr::return#2 ] -Allocated zp ZP_WORD:135 [ init_dist_screen::yds#0 ] -Allocated zp ZP_BYTE:137 [ init_dist_screen::x2#0 ] -Allocated zp ZP_WORD:138 [ sqr::return#3 ] -Allocated zp ZP_WORD:140 [ init_dist_screen::xds#0 ] -Allocated zp ZP_WORD:142 [ init_dist_screen::ds#0 ] -Allocated zp ZP_WORD:144 [ sqrt::val#0 ] -Allocated zp ZP_BYTE:146 [ sqrt::return#2 ] -Allocated zp ZP_BYTE:147 [ init_dist_screen::d#0 ] -Allocated zp ZP_WORD:148 [ bsearch16u::key#0 ] -Allocated zp ZP_WORD:150 [ bsearch16u::return#3 ] -Allocated zp ZP_WORD:152 [ sqrt::found#0 ] -Allocated zp ZP_WORD:154 [ sqrt::$3 ] -Allocated zp ZP_WORD:156 [ sqrt::$1 ] -Allocated zp ZP_BYTE:158 [ sqrt::return#0 ] -Allocated zp ZP_BYTE:159 [ bsearch16u::$6 ] -Allocated zp ZP_BYTE:160 [ bsearch16u::$16 ] -Allocated zp ZP_WORD:161 [ bsearch16u::pivot#0 ] -Allocated zp ZP_WORD:163 [ bsearch16u::result#0 ] -Allocated zp ZP_BYTE:165 [ sqr::$0 ] -Allocated zp ZP_WORD:166 [ sqr::return#0 ] -Allocated zp ZP_WORD:168 [ SQUARES#1 ] -Allocated zp ZP_BYTE:170 [ init_squares::$3 ] -Allocated zp ZP_BYTE:171 [ init_squares::$4 ] -Allocated zp ZP_WORD:172 [ malloc::mem#0 ] -Allocated zp ZP_BYTE:174 [ processChars::$67 ] -Allocated zp ZP_BYTE:175 [ processChars::$68 ] -Allocated zp ZP_BYTE:176 [ processChars::$69 ] -Allocated zp ZP_BYTE:177 [ processChars::$70 ] -Allocated zp ZP_BYTE:178 [ processChars::$37 ] -Allocated zp ZP_WORD:179 [ processChars::processing#0 ] -Allocated zp ZP_BYTE:181 [ processChars::bitmask#0 ] -Allocated zp ZP_WORD:182 [ processChars::xpos#0 ] -Allocated zp ZP_BYTE:184 [ processChars::$11 ] -Allocated zp ZP_BYTE:185 [ processChars::$12 ] -Allocated zp ZP_BYTE:186 [ processChars::$17 ] -Allocated zp ZP_BYTE:187 [ processChars::$14 ] -Allocated zp ZP_WORD:188 [ processChars::$15 ] -Allocated zp ZP_BYTE:190 [ processChars::ypos#0 ] -Allocated zp ZP_WORD:191 [ processChars::$25 ] -Allocated zp ZP_BYTE:193 [ processChars::$26 ] -Allocated zp ZP_BYTE:194 [ processChars::xchar#0 ] -Allocated zp ZP_BYTE:195 [ processChars::$38 ] -Allocated zp ZP_BYTE:196 [ processChars::$30 ] -Allocated zp ZP_BYTE:197 [ processChars::ychar#0 ] -Allocated zp ZP_BYTE:198 [ processChars::$39 ] -Allocated zp ZP_BYTE:199 [ processChars::$33 ] +Allocated zp ZP_BYTE:27 [ init_angle_screen::y#4 init_angle_screen::y#1 ] +Allocated zp ZP_WORD:28 [ init_angle_screen::screen_bottomline#5 init_angle_screen::screen_bottomline#0 init_angle_screen::screen_bottomline#1 ] +Allocated zp ZP_WORD:30 [ init_angle_screen::screen_topline#5 init_angle_screen::screen_topline#0 init_angle_screen::screen_topline#1 ] +Allocated zp ZP_BYTE:32 [ init_angle_screen::x#2 init_angle_screen::x#1 ] +Allocated zp ZP_BYTE:33 [ init_angle_screen::xb#2 init_angle_screen::xb#1 ] +Allocated zp ZP_WORD:34 [ atan2_16::yi#3 atan2_16::yi#8 atan2_16::yi#0 atan2_16::yi#16 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ] +Allocated zp ZP_WORD:36 [ atan2_16::xi#3 atan2_16::xi#8 atan2_16::xi#0 atan2_16::xi#13 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] +Allocated zp ZP_BYTE:38 [ atan2_16::i#2 atan2_16::i#1 ] +Allocated zp ZP_WORD:39 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 ] +Allocated zp ZP_WORD:41 [ atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 ] +Allocated zp ZP_BYTE:43 [ atan2_16::shift#2 atan2_16::shift#5 atan2_16::shift#1 ] +Allocated zp ZP_WORD:44 [ atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ] +Allocated zp ZP_WORD:46 [ atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] +Allocated zp ZP_WORD:48 [ heap_head#5 heap_head#1 ] +Allocated zp ZP_BYTE:50 [ processChars::i#10 processChars::i#1 ] +Allocated zp ZP_BYTE:51 [ processChars::numActive#10 processChars::numActive#3 processChars::numActive#1 ] +Allocated zp ZP_WORD:52 [ SCREEN_COPY#0 ] +Allocated zp ZP_WORD:54 [ SCREEN_DIST#0 ] +Allocated zp ZP_WORD:56 [ init_angle_screen::screen#0 ] +Allocated zp ZP_BYTE:58 [ main::$26 ] +Allocated zp ZP_BYTE:59 [ main::$27 ] +Allocated zp ZP_BYTE:60 [ main::$28 ] +Allocated zp ZP_BYTE:61 [ main::$29 ] +Allocated zp ZP_BYTE:62 [ main::$16 ] +Allocated zp ZP_BYTE:63 [ getCharToProcess::return_x#0 ] +Allocated zp ZP_BYTE:64 [ getCharToProcess::return_y#0 ] +Allocated zp ZP_BYTE:65 [ getCharToProcess::return_dist#0 ] +Allocated zp ZP_BYTE:66 [ main::center_x#0 ] +Allocated zp ZP_BYTE:67 [ main::center_y#0 ] +Allocated zp ZP_BYTE:68 [ main::center_dist#0 ] +Allocated zp ZP_BYTE:69 [ startProcessing::center_x#0 ] +Allocated zp ZP_BYTE:70 [ startProcessing::center_y#0 ] +Allocated zp ZP_BYTE:71 [ startProcessing::$42 ] +Allocated zp ZP_BYTE:72 [ startProcessing::$43 ] +Allocated zp ZP_BYTE:73 [ startProcessing::$44 ] +Allocated zp ZP_BYTE:74 [ startProcessing::$45 ] +Allocated zp ZP_BYTE:75 [ startProcessing::$30 ] +Allocated zp ZP_WORD:76 [ startProcessing::$0 ] +Allocated zp ZP_WORD:78 [ startProcessing::$47 ] +Allocated zp ZP_WORD:80 [ startProcessing::$48 ] +Allocated zp ZP_WORD:82 [ startProcessing::$1 ] +Allocated zp ZP_WORD:84 [ startProcessing::offset#0 ] +Allocated zp ZP_WORD:86 [ startProcessing::colPtr#0 ] +Allocated zp ZP_BYTE:88 [ startProcessing::spriteCol#0 ] +Allocated zp ZP_WORD:89 [ startProcessing::screenPtr#0 ] +Allocated zp ZP_WORD:91 [ startProcessing::$5 ] +Allocated zp ZP_WORD:93 [ startProcessing::$6 ] +Allocated zp ZP_BYTE:95 [ startProcessing::ch#0 ] +Allocated zp ZP_WORD:96 [ startProcessing::$8 ] +Allocated zp ZP_WORD:98 [ startProcessing::$9 ] +Allocated zp ZP_WORD:100 [ startProcessing::$11 ] +Allocated zp ZP_WORD:102 [ startProcessing::$12 ] +Allocated zp ZP_WORD:104 [ startProcessing::$13 ] +Allocated zp ZP_WORD:106 [ startProcessing::spriteX#0 ] +Allocated zp ZP_WORD:108 [ startProcessing::$15 ] +Allocated zp ZP_WORD:110 [ startProcessing::$16 ] +Allocated zp ZP_WORD:112 [ startProcessing::$17 ] +Allocated zp ZP_WORD:114 [ startProcessing::spriteY#0 ] +Allocated zp ZP_BYTE:116 [ startProcessing::spritePtr#0 ] +Allocated zp ZP_BYTE:117 [ startProcessing::$22 ] +Allocated zp ZP_WORD:118 [ startProcessing::$23 ] +Allocated zp ZP_BYTE:120 [ startProcessing::$50 ] +Allocated zp ZP_BYTE:121 [ startProcessing::$51 ] +Allocated zp ZP_BYTE:122 [ startProcessing::$52 ] +Allocated zp ZP_BYTE:123 [ startProcessing::$53 ] +Allocated zp ZP_BYTE:124 [ startProcessing::$31 ] +Allocated zp ZP_WORD:125 [ getCharToProcess::$8 ] +Allocated zp ZP_WORD:127 [ getCharToProcess::$12 ] +Allocated zp ZP_WORD:129 [ getCharToProcess::$13 ] +Allocated zp ZP_WORD:131 [ getCharToProcess::$9 ] +Allocated zp ZP_WORD:133 [ getCharToProcess::$10 ] +Allocated zp ZP_BYTE:135 [ init_angle_screen::$2 ] +Allocated zp ZP_BYTE:136 [ init_angle_screen::$3 ] +Allocated zp ZP_WORD:137 [ init_angle_screen::xw#0 ] +Allocated zp ZP_BYTE:139 [ init_angle_screen::$6 ] +Allocated zp ZP_WORD:140 [ init_angle_screen::yw#0 ] +Allocated zp ZP_WORD:142 [ atan2_16::x#0 ] +Allocated zp ZP_WORD:144 [ atan2_16::y#0 ] +Allocated zp ZP_WORD:146 [ atan2_16::return#2 ] +Allocated zp ZP_WORD:148 [ init_angle_screen::angle_w#0 ] +Allocated zp ZP_WORD:150 [ init_angle_screen::$10 ] +Allocated zp ZP_BYTE:152 [ init_angle_screen::ang_w#0 ] +Allocated zp ZP_BYTE:153 [ init_angle_screen::$12 ] +Allocated zp ZP_BYTE:154 [ init_angle_screen::$13 ] +Allocated zp ZP_BYTE:155 [ init_angle_screen::$14 ] +Allocated zp ZP_BYTE:156 [ atan2_16::$24 ] +Allocated zp ZP_BYTE:157 [ atan2_16::$23 ] +Allocated zp ZP_WORD:158 [ malloc::mem#0 ] +Allocated zp ZP_BYTE:160 [ processChars::$67 ] +Allocated zp ZP_BYTE:161 [ processChars::$68 ] +Allocated zp ZP_BYTE:162 [ processChars::$69 ] +Allocated zp ZP_BYTE:163 [ processChars::$70 ] +Allocated zp ZP_BYTE:164 [ processChars::$37 ] +Allocated zp ZP_WORD:165 [ processChars::processing#0 ] +Allocated zp ZP_BYTE:167 [ processChars::bitmask#0 ] +Allocated zp ZP_WORD:168 [ processChars::xpos#0 ] +Allocated zp ZP_BYTE:170 [ processChars::$11 ] +Allocated zp ZP_BYTE:171 [ processChars::$12 ] +Allocated zp ZP_BYTE:172 [ processChars::$17 ] +Allocated zp ZP_BYTE:173 [ processChars::$14 ] +Allocated zp ZP_WORD:174 [ processChars::$15 ] +Allocated zp ZP_BYTE:176 [ processChars::ypos#0 ] +Allocated zp ZP_WORD:177 [ processChars::$25 ] +Allocated zp ZP_BYTE:179 [ processChars::$26 ] +Allocated zp ZP_BYTE:180 [ processChars::xchar#0 ] +Allocated zp ZP_BYTE:181 [ processChars::$38 ] +Allocated zp ZP_BYTE:182 [ processChars::$30 ] +Allocated zp ZP_BYTE:183 [ processChars::ychar#0 ] +Allocated zp ZP_BYTE:184 [ processChars::$39 ] +Allocated zp ZP_BYTE:185 [ processChars::$33 ] INITIAL ASM //SEG0 File Comments @@ -5671,7 +5200,6 @@ INITIAL ASM :BasicUpstart(bbegin) .pc = $80d "Program" //SEG2 Global Constants & labels - .const SIZEOF_WORD = 2 .const STATUS_FREE = 0 .const STATUS_NEW = 1 .const STATUS_PROCESSING = 2 @@ -5685,6 +5213,8 @@ INITIAL ASM .const OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR = $c // Start of the heap used by malloc() .label HEAP_START = $c000 + // The number of iterations performed during 16-bit CORDIC atan2 calculation + .const CORDIC_ITERATIONS_16 = $f // Processor port data direction register .label PROCPORT_DDR = 0 // Mask for PROCESSOR_PORT_DDR which allows only memory configuration to be written @@ -5737,17 +5267,15 @@ INITIAL ASM .const NUM_PROCESSING = 8 // Distance value meaning not found .const NOT_FOUND = $ff - .const NUM_SQUARES = $30 .const RASTER_IRQ_TOP = $30 .const RASTER_IRQ_MIDDLE = $ff .const XPOS_RIGHTMOST = BORDER_XPOS_RIGHT<<4 .const YPOS_BOTTOMMOST = BORDER_YPOS_BOTTOM<<4 .const XPOS_LEFTMOST = BORDER_XPOS_LEFT-8<<4 .const YPOS_TOPMOST = BORDER_YPOS_TOP-8<<4 - .label heap_head = $2d - .label SQUARES = $a8 - .label SCREEN_COPY = $33 - .label SCREEN_DIST = $35 + .label heap_head = $30 + .label SCREEN_COPY = $34 + .label SCREEN_DIST = $36 //SEG3 @begin bbegin: //SEG4 [1] phi from @begin to @1 [phi:@begin->@1] @@ -5756,403 +5284,391 @@ b1_from_bbegin: //SEG5 @1 b1: //SEG6 [2] call malloc -//SEG7 [254] phi from @1 to malloc [phi:@1->malloc] +//SEG7 [243] phi from @1 to malloc [phi:@1->malloc] malloc_from_b1: -//SEG8 [254] phi (word) malloc::size#3 = (word) $3e8 [phi:@1->malloc#0] -- vwuz1=vwuc1 - lda #<$3e8 - sta malloc.size - lda #>$3e8 - sta malloc.size+1 -//SEG9 [254] phi (byte*) heap_head#12 = (const byte*) HEAP_START#0 [phi:@1->malloc#1] -- pbuz1=pbuc1 +//SEG8 [243] phi (byte*) heap_head#5 = (const byte*) HEAP_START#0 [phi:@1->malloc#0] -- pbuz1=pbuc1 lda #HEAP_START sta heap_head+1 jsr malloc jmp b3 -//SEG10 @3 +//SEG9 @3 b3: -//SEG11 [3] (void*) SCREEN_COPY#0 ← (void*)(byte*) malloc::mem#0 -- pvoz1=pvoz2 +//SEG10 [3] (void*) SCREEN_COPY#0 ← (void*)(byte*) malloc::mem#0 -- pvoz1=pvoz2 lda malloc.mem sta SCREEN_COPY lda malloc.mem+1 sta SCREEN_COPY+1 -//SEG12 [4] call malloc -//SEG13 [254] phi from @3 to malloc [phi:@3->malloc] +//SEG11 [4] call malloc +//SEG12 [243] phi from @3 to malloc [phi:@3->malloc] malloc_from_b3: -//SEG14 [254] phi (word) malloc::size#3 = (word) $3e8 [phi:@3->malloc#0] -- vwuz1=vwuc1 - lda #<$3e8 - sta malloc.size - lda #>$3e8 - sta malloc.size+1 -//SEG15 [254] phi (byte*) heap_head#12 = (byte*) heap_head#1 [phi:@3->malloc#1] -- register_copy +//SEG13 [243] phi (byte*) heap_head#5 = (byte*) heap_head#1 [phi:@3->malloc#0] -- register_copy jsr malloc jmp b4 -//SEG16 @4 +//SEG14 @4 b4: -//SEG17 [5] (void*) SCREEN_DIST#0 ← (void*)(byte*) malloc::mem#0 -- pvoz1=pvoz2 +//SEG15 [5] (void*) SCREEN_DIST#0 ← (void*)(byte*) malloc::mem#0 -- pvoz1=pvoz2 lda malloc.mem sta SCREEN_DIST lda malloc.mem+1 sta SCREEN_DIST+1 -//SEG18 [6] phi from @4 to @2 [phi:@4->@2] +//SEG16 [6] phi from @4 to @2 [phi:@4->@2] b2_from_b4: jmp b2 -//SEG19 @2 +//SEG17 @2 b2: -//SEG20 [7] call main +//SEG18 [7] call main jsr main -//SEG21 [8] phi from @2 to @end [phi:@2->@end] +//SEG19 [8] phi from @2 to @end [phi:@2->@end] bend_from_b2: jmp bend -//SEG22 @end +//SEG20 @end bend: -//SEG23 main +//SEG21 main main: { - .label _16 = $3b + .label _16 = $3e .label dst = 4 .label src = 2 .label i = 6 - .label center_x = $3f - .label center_y = $40 - .label center_dist = $41 - .label _26 = $37 - .label _27 = $38 - .label _28 = $39 - .label _29 = $3a - //SEG24 [9] (byte*) init_dist_screen::screen#0 ← (byte*)(void*) SCREEN_DIST#0 -- pbuz1=pbuz2 + .label center_x = $42 + .label center_y = $43 + .label center_dist = $44 + .label _26 = $3a + .label _27 = $3b + .label _28 = $3c + .label _29 = $3d + //SEG22 [9] (byte*) init_angle_screen::screen#0 ← (byte*)(void*) SCREEN_DIST#0 -- pbuz1=pbuz2 lda SCREEN_DIST - sta init_dist_screen.screen + sta init_angle_screen.screen lda SCREEN_DIST+1 - sta init_dist_screen.screen+1 - //SEG25 [10] call init_dist_screen - //SEG26 [169] phi from main to init_dist_screen [phi:main->init_dist_screen] - init_dist_screen_from_main: - jsr init_dist_screen + sta init_angle_screen.screen+1 + //SEG23 [10] call init_angle_screen + jsr init_angle_screen jmp b8 - //SEG27 main::@8 + //SEG24 main::@8 b8: - //SEG28 [11] (byte*) main::dst#0 ← (byte*)(void*) SCREEN_COPY#0 -- pbuz1=pbuz2 + //SEG25 [11] (byte*) main::dst#0 ← (byte*)(void*) SCREEN_COPY#0 -- pbuz1=pbuz2 lda SCREEN_COPY sta dst lda SCREEN_COPY+1 sta dst+1 - //SEG29 [12] phi from main::@8 to main::@1 [phi:main::@8->main::@1] + //SEG26 [12] phi from main::@8 to main::@1 [phi:main::@8->main::@1] b1_from_b8: - //SEG30 [12] phi (byte*) main::dst#2 = (byte*) main::dst#0 [phi:main::@8->main::@1#0] -- register_copy - //SEG31 [12] phi (byte*) main::src#2 = (const byte*) SCREEN#0 [phi:main::@8->main::@1#1] -- pbuz1=pbuc1 + //SEG27 [12] phi (byte*) main::dst#2 = (byte*) main::dst#0 [phi:main::@8->main::@1#0] -- register_copy + //SEG28 [12] phi (byte*) main::src#2 = (const byte*) SCREEN#0 [phi:main::@8->main::@1#1] -- pbuz1=pbuc1 lda #SCREEN sta src+1 jmp b1 // Copy screen to screen copy - //SEG32 [12] phi from main::@1 to main::@1 [phi:main::@1->main::@1] + //SEG29 [12] phi from main::@1 to main::@1 [phi:main::@1->main::@1] b1_from_b1: - //SEG33 [12] phi (byte*) main::dst#2 = (byte*) main::dst#1 [phi:main::@1->main::@1#0] -- register_copy - //SEG34 [12] phi (byte*) main::src#2 = (byte*) main::src#1 [phi:main::@1->main::@1#1] -- register_copy + //SEG30 [12] phi (byte*) main::dst#2 = (byte*) main::dst#1 [phi:main::@1->main::@1#0] -- register_copy + //SEG31 [12] phi (byte*) main::src#2 = (byte*) main::src#1 [phi:main::@1->main::@1#1] -- register_copy jmp b1 - //SEG35 main::@1 + //SEG32 main::@1 b1: - //SEG36 [13] *((byte*) main::dst#2) ← *((byte*) main::src#2) -- _deref_pbuz1=_deref_pbuz2 + //SEG33 [13] *((byte*) main::dst#2) ← *((byte*) main::src#2) -- _deref_pbuz1=_deref_pbuz2 ldy #0 lda (src),y ldy #0 sta (dst),y - //SEG37 [14] (byte*) main::src#1 ← ++ (byte*) main::src#2 -- pbuz1=_inc_pbuz1 + //SEG34 [14] (byte*) main::src#1 ← ++ (byte*) main::src#2 -- pbuz1=_inc_pbuz1 inc src bne !+ inc src+1 !: - //SEG38 [15] (byte*) main::dst#1 ← ++ (byte*) main::dst#2 -- pbuz1=_inc_pbuz1 + //SEG35 [15] (byte*) main::dst#1 ← ++ (byte*) main::dst#2 -- pbuz1=_inc_pbuz1 inc dst bne !+ inc dst+1 !: - //SEG39 [16] if((byte*) main::src#1!=(const byte*) SCREEN#0+(word) $3e8) goto main::@1 -- pbuz1_neq_pbuc1_then_la1 + //SEG36 [16] if((byte*) main::src#1!=(const byte*) SCREEN#0+(word) $3e8) goto main::@1 -- pbuz1_neq_pbuc1_then_la1 lda src+1 cmp #>SCREEN+$3e8 bne b1_from_b1 lda src cmp #main::@2] + //SEG37 [17] phi from main::@1 to main::@2 [phi:main::@1->main::@2] b2_from_b1: - //SEG41 [17] phi (byte) main::i#2 = (byte) 0 [phi:main::@1->main::@2#0] -- vbuz1=vbuc1 + //SEG38 [17] phi (byte) main::i#2 = (byte) 0 [phi:main::@1->main::@2#0] -- vbuz1=vbuc1 lda #0 sta i jmp b2 // Init processing array - //SEG42 [17] phi from main::@2 to main::@2 [phi:main::@2->main::@2] + //SEG39 [17] phi from main::@2 to main::@2 [phi:main::@2->main::@2] b2_from_b2: - //SEG43 [17] phi (byte) main::i#2 = (byte) main::i#1 [phi:main::@2->main::@2#0] -- register_copy + //SEG40 [17] phi (byte) main::i#2 = (byte) main::i#1 [phi:main::@2->main::@2#0] -- register_copy jmp b2 - //SEG44 main::@2 + //SEG41 main::@2 b2: - //SEG45 [18] (byte) main::$26 ← (byte) main::i#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 + //SEG42 [18] (byte) main::$26 ← (byte) main::i#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 lda i asl sta _26 - //SEG46 [19] (byte) main::$27 ← (byte) main::$26 + (byte) main::i#2 -- vbuz1=vbuz2_plus_vbuz3 + //SEG43 [19] (byte) main::$27 ← (byte) main::$26 + (byte) main::i#2 -- vbuz1=vbuz2_plus_vbuz3 lda _26 clc adc i sta _27 - //SEG47 [20] (byte) main::$28 ← (byte) main::$27 << (byte) 1 -- vbuz1=vbuz2_rol_1 + //SEG44 [20] (byte) main::$28 ← (byte) main::$27 << (byte) 1 -- vbuz1=vbuz2_rol_1 lda _27 asl sta _28 - //SEG48 [21] (byte) main::$29 ← (byte) main::$28 + (byte) main::i#2 -- vbuz1=vbuz2_plus_vbuz3 + //SEG45 [21] (byte) main::$29 ← (byte) main::$28 + (byte) main::i#2 -- vbuz1=vbuz2_plus_vbuz3 lda _28 clc adc i sta _29 - //SEG49 [22] (byte~) main::$16 ← (byte) main::$29 << (byte) 1 -- vbuz1=vbuz2_rol_1 + //SEG46 [22] (byte~) main::$16 ← (byte) main::$29 << (byte) 1 -- vbuz1=vbuz2_rol_1 lda _29 asl sta _16 - //SEG50 [23] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (byte~) main::$16) ← (byte) 0 -- pwuc1_derefidx_vbuz1=vbuc2 + //SEG47 [23] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (byte~) main::$16) ← (byte) 0 -- pwuc1_derefidx_vbuz1=vbuc2 lda _16 ldx #0 tay txa sta PROCESSING,y - //SEG51 [24] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y + (byte~) main::$16) ← (byte) 0 -- pwuc1_derefidx_vbuz1=vbuc2 + //SEG48 [24] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y + (byte~) main::$16) ← (byte) 0 -- pwuc1_derefidx_vbuz1=vbuc2 lda _16 ldx #0 tay txa sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_Y,y - //SEG52 [25] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX + (byte~) main::$16) ← (byte) 0 -- pwuc1_derefidx_vbuz1=vbuc2 + //SEG49 [25] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX + (byte~) main::$16) ← (byte) 0 -- pwuc1_derefidx_vbuz1=vbuc2 lda _16 ldx #0 tay txa sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_VX,y - //SEG53 [26] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY + (byte~) main::$16) ← (byte) 0 -- pwuc1_derefidx_vbuz1=vbuc2 + //SEG50 [26] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY + (byte~) main::$16) ← (byte) 0 -- pwuc1_derefidx_vbuz1=vbuc2 lda _16 ldx #0 tay txa sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_VY,y - //SEG54 [27] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID + (byte~) main::$16) ← (byte) 0 -- pbuc1_derefidx_vbuz1=vbuc2 + //SEG51 [27] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID + (byte~) main::$16) ← (byte) 0 -- pbuc1_derefidx_vbuz1=vbuc2 lda #0 ldy _16 sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_ID,y - //SEG55 [28] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR + (byte~) main::$16) ← (byte) 0 -- pbuc1_derefidx_vbuz1=vbuc2 + //SEG52 [28] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR + (byte~) main::$16) ← (byte) 0 -- pbuc1_derefidx_vbuz1=vbuc2 lda #0 ldy _16 sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_PTR,y - //SEG56 [29] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_COL + (byte~) main::$16) ← (byte) 0 -- pbuc1_derefidx_vbuz1=vbuc2 + //SEG53 [29] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_COL + (byte~) main::$16) ← (byte) 0 -- pbuc1_derefidx_vbuz1=vbuc2 lda #0 ldy _16 sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_COL,y - //SEG57 [30] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS + (byte~) main::$16) ← (const byte) STATUS_FREE -- pbuc1_derefidx_vbuz1=vbuc2 + //SEG54 [30] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS + (byte~) main::$16) ← (const byte) STATUS_FREE -- pbuc1_derefidx_vbuz1=vbuc2 lda #STATUS_FREE ldy _16 sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_STATUS,y - //SEG58 [31] *((byte**)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR + (byte~) main::$16) ← (byte*) 0 -- pptc1_derefidx_vbuz1=pbuc2 + //SEG55 [31] *((byte**)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR + (byte~) main::$16) ← (byte*) 0 -- pptc1_derefidx_vbuz1=pbuc2 ldy _16 lda #<0 sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR,y lda #>0 sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR+1,y - //SEG59 [32] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuz1=_inc_vbuz1 + //SEG56 [32] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuz1=_inc_vbuz1 inc i - //SEG60 [33] if((byte) main::i#1!=(const byte) NUM_PROCESSING#0-(byte) 1+(byte) 1) goto main::@2 -- vbuz1_neq_vbuc1_then_la1 + //SEG57 [33] if((byte) main::i#1!=(const byte) NUM_PROCESSING#0-(byte) 1+(byte) 1) goto main::@2 -- vbuz1_neq_vbuc1_then_la1 lda #NUM_PROCESSING-1+1 cmp i bne b2_from_b2 - //SEG61 [34] phi from main::@2 to main::@3 [phi:main::@2->main::@3] + //SEG58 [34] phi from main::@2 to main::@3 [phi:main::@2->main::@3] b3_from_b2: jmp b3 - //SEG62 main::@3 + //SEG59 main::@3 b3: - //SEG63 [35] call initSprites - //SEG64 [156] phi from main::@3 to initSprites [phi:main::@3->initSprites] + //SEG60 [35] call initSprites + //SEG61 [156] phi from main::@3 to initSprites [phi:main::@3->initSprites] initSprites_from_b3: jsr initSprites - //SEG65 [36] phi from main::@3 to main::@9 [phi:main::@3->main::@9] + //SEG62 [36] phi from main::@3 to main::@9 [phi:main::@3->main::@9] b9_from_b3: jmp b9 - //SEG66 main::@9 + //SEG63 main::@9 b9: - //SEG67 [37] call setupRasterIrq + //SEG64 [37] call setupRasterIrq jsr setupRasterIrq - //SEG68 [38] phi from main::@5 main::@9 to main::@4 [phi:main::@5/main::@9->main::@4] + //SEG65 [38] phi from main::@5 main::@9 to main::@4 [phi:main::@5/main::@9->main::@4] b4_from_b5: b4_from_b9: jmp b4 // Main loop - //SEG69 main::@4 + //SEG66 main::@4 b4: - //SEG70 [39] call getCharToProcess + //SEG67 [39] call getCharToProcess jsr getCharToProcess - //SEG71 [40] (byte) getCharToProcess::return_x#0 ← (byte) getCharToProcess::return_x#1 -- vbuz1=vbuz2 + //SEG68 [40] (byte) getCharToProcess::return_x#0 ← (byte) getCharToProcess::return_x#1 -- vbuz1=vbuz2 lda getCharToProcess.return_x_1 sta getCharToProcess.return_x - //SEG72 [41] (byte) getCharToProcess::return_y#0 ← (byte) getCharToProcess::return_y#1 -- vbuz1=vbuz2 + //SEG69 [41] (byte) getCharToProcess::return_y#0 ← (byte) getCharToProcess::return_y#1 -- vbuz1=vbuz2 lda getCharToProcess.return_y_1 sta getCharToProcess.return_y - //SEG73 [42] (byte) getCharToProcess::return_dist#0 ← (byte) getCharToProcess::return_dist#1 -- vbuz1=vbuz2 + //SEG70 [42] (byte) getCharToProcess::return_dist#0 ← (byte) getCharToProcess::return_dist#1 -- vbuz1=vbuz2 lda getCharToProcess.return_dist_1 sta getCharToProcess.return_dist jmp b10 - //SEG74 main::@10 + //SEG71 main::@10 b10: - //SEG75 [43] (byte) main::center_x#0 ← (byte) getCharToProcess::return_x#0 -- vbuz1=vbuz2 + //SEG72 [43] (byte) main::center_x#0 ← (byte) getCharToProcess::return_x#0 -- vbuz1=vbuz2 lda getCharToProcess.return_x sta center_x - //SEG76 [44] (byte) main::center_y#0 ← (byte) getCharToProcess::return_y#0 -- vbuz1=vbuz2 + //SEG73 [44] (byte) main::center_y#0 ← (byte) getCharToProcess::return_y#0 -- vbuz1=vbuz2 lda getCharToProcess.return_y sta center_y - //SEG77 [45] (byte) main::center_dist#0 ← (byte) getCharToProcess::return_dist#0 -- vbuz1=vbuz2 + //SEG74 [45] (byte) main::center_dist#0 ← (byte) getCharToProcess::return_dist#0 -- vbuz1=vbuz2 lda getCharToProcess.return_dist sta center_dist - //SEG78 [46] if((byte) main::center_dist#0!=(const byte) NOT_FOUND#0) goto main::@5 -- vbuz1_neq_vbuc1_then_la1 + //SEG75 [46] if((byte) main::center_dist#0!=(const byte) NOT_FOUND#0) goto main::@5 -- vbuz1_neq_vbuc1_then_la1 lda #NOT_FOUND cmp center_dist bne b5 jmp b6 - //SEG79 main::@6 + //SEG76 main::@6 b6: - //SEG80 [47] *((const byte*) SCREEN#0+(word) $3e7) ← (byte) '.' -- _deref_pbuc1=vbuc2 + //SEG77 [47] *((const byte*) SCREEN#0+(word) $3e7) ← (byte) '.' -- _deref_pbuc1=vbuc2 lda #'.' sta SCREEN+$3e7 jmp b7 - //SEG81 main::@7 + //SEG78 main::@7 b7: - //SEG82 [48] *((const byte*) COLS#0+(word) $3e7) ← ++ *((const byte*) COLS#0+(word) $3e7) -- _deref_pbuc1=_inc__deref_pbuc1 + //SEG79 [48] *((const byte*) COLS#0+(word) $3e7) ← ++ *((const byte*) COLS#0+(word) $3e7) -- _deref_pbuc1=_inc__deref_pbuc1 inc COLS+$3e7 jmp b7 - //SEG83 main::@5 + //SEG80 main::@5 b5: - //SEG84 [49] (byte) startProcessing::center_x#0 ← (byte) main::center_x#0 -- vbuz1=vbuz2 + //SEG81 [49] (byte) startProcessing::center_x#0 ← (byte) main::center_x#0 -- vbuz1=vbuz2 lda center_x sta startProcessing.center_x - //SEG85 [50] (byte) startProcessing::center_y#0 ← (byte) main::center_y#0 -- vbuz1=vbuz2 + //SEG82 [50] (byte) startProcessing::center_y#0 ← (byte) main::center_y#0 -- vbuz1=vbuz2 lda center_y sta startProcessing.center_y - //SEG86 [51] call startProcessing - //SEG87 [52] phi from main::@5 to startProcessing [phi:main::@5->startProcessing] + //SEG83 [51] call startProcessing + //SEG84 [52] phi from main::@5 to startProcessing [phi:main::@5->startProcessing] startProcessing_from_b5: jsr startProcessing jmp b4_from_b5 } -//SEG88 startProcessing +//SEG85 startProcessing // Start processing a char - by inserting it into the PROCESSING array -// startProcessing(byte zeropage($42) center_x, byte zeropage($43) center_y) +// startProcessing(byte zeropage($45) center_x, byte zeropage($46) center_y) startProcessing: { - .label _0 = $49 - .label _1 = $4f - .label _5 = $58 - .label _6 = $5a - .label _8 = $5d - .label _9 = $5f - .label _11 = $61 - .label _12 = $63 - .label _13 = $65 - .label _15 = $69 - .label _16 = $6b - .label _17 = $6d - .label _22 = $72 - .label _23 = $73 - .label _30 = $48 - .label _31 = $79 - .label center_x = $42 - .label center_y = $43 + .label _0 = $4c + .label _1 = $52 + .label _5 = $5b + .label _6 = $5d + .label _8 = $60 + .label _9 = $62 + .label _11 = $64 + .label _12 = $66 + .label _13 = $68 + .label _15 = $6c + .label _16 = $6e + .label _17 = $70 + .label _22 = $75 + .label _23 = $76 + .label _30 = $4b + .label _31 = $7c + .label center_x = $45 + .label center_y = $46 .label i = 8 - .label offset = $51 - .label colPtr = $53 - .label spriteCol = $55 - .label screenPtr = $56 + .label offset = $54 + .label colPtr = $56 + .label spriteCol = $58 + .label screenPtr = $59 .label spriteData = $b - .label ch = $5c + .label ch = $5f .label chargenData = 9 .label i1 = $d - .label spriteX = $67 - .label spriteY = $6f - .label spritePtr = $71 + .label spriteX = $6a + .label spriteY = $72 + .label spritePtr = $74 .label freeIdx = 8 .label freeIdx_6 = 7 - .label _42 = $44 - .label _43 = $45 - .label _44 = $46 - .label _45 = $47 - .label _47 = $4b - .label _48 = $4d - .label _50 = $75 - .label _51 = $76 - .label _52 = $77 - .label _53 = $78 + .label _42 = $47 + .label _43 = $48 + .label _44 = $49 + .label _45 = $4a + .label _47 = $4e + .label _48 = $50 + .label _50 = $78 + .label _51 = $79 + .label _52 = $7a + .label _53 = $7b .label freeIdx_7 = 7 - //SEG89 [53] phi from startProcessing to startProcessing::@1 [phi:startProcessing->startProcessing::@1] + //SEG86 [53] phi from startProcessing to startProcessing::@1 [phi:startProcessing->startProcessing::@1] b1_from_startProcessing: - //SEG90 [53] phi (byte) startProcessing::freeIdx#6 = (byte) $ff [phi:startProcessing->startProcessing::@1#0] -- vbuz1=vbuc1 + //SEG87 [53] phi (byte) startProcessing::freeIdx#6 = (byte) $ff [phi:startProcessing->startProcessing::@1#0] -- vbuz1=vbuc1 lda #$ff sta freeIdx_6 jmp b1 - //SEG91 startProcessing::@1 + //SEG88 startProcessing::@1 b1: - //SEG92 [54] phi from startProcessing::@1 to startProcessing::@2 [phi:startProcessing::@1->startProcessing::@2] + //SEG89 [54] phi from startProcessing::@1 to startProcessing::@2 [phi:startProcessing::@1->startProcessing::@2] b2_from_b1: - //SEG93 [54] phi (byte) startProcessing::i#2 = (byte) 0 [phi:startProcessing::@1->startProcessing::@2#0] -- vbuz1=vbuc1 + //SEG90 [54] phi (byte) startProcessing::i#2 = (byte) 0 [phi:startProcessing::@1->startProcessing::@2#0] -- vbuz1=vbuc1 lda #0 sta i jmp b2 - //SEG94 [54] phi from startProcessing::@3 to startProcessing::@2 [phi:startProcessing::@3->startProcessing::@2] + //SEG91 [54] phi from startProcessing::@3 to startProcessing::@2 [phi:startProcessing::@3->startProcessing::@2] b2_from_b3: - //SEG95 [54] phi (byte) startProcessing::i#2 = (byte) startProcessing::i#1 [phi:startProcessing::@3->startProcessing::@2#0] -- register_copy + //SEG92 [54] phi (byte) startProcessing::i#2 = (byte) startProcessing::i#1 [phi:startProcessing::@3->startProcessing::@2#0] -- register_copy jmp b2 - //SEG96 startProcessing::@2 + //SEG93 startProcessing::@2 b2: - //SEG97 [55] (byte) startProcessing::$42 ← (byte) startProcessing::i#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 + //SEG94 [55] (byte) startProcessing::$42 ← (byte) startProcessing::i#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 lda i asl sta _42 - //SEG98 [56] (byte) startProcessing::$43 ← (byte) startProcessing::$42 + (byte) startProcessing::i#2 -- vbuz1=vbuz2_plus_vbuz3 + //SEG95 [56] (byte) startProcessing::$43 ← (byte) startProcessing::$42 + (byte) startProcessing::i#2 -- vbuz1=vbuz2_plus_vbuz3 lda _42 clc adc i sta _43 - //SEG99 [57] (byte) startProcessing::$44 ← (byte) startProcessing::$43 << (byte) 1 -- vbuz1=vbuz2_rol_1 + //SEG96 [57] (byte) startProcessing::$44 ← (byte) startProcessing::$43 << (byte) 1 -- vbuz1=vbuz2_rol_1 lda _43 asl sta _44 - //SEG100 [58] (byte) startProcessing::$45 ← (byte) startProcessing::$44 + (byte) startProcessing::i#2 -- vbuz1=vbuz2_plus_vbuz3 + //SEG97 [58] (byte) startProcessing::$45 ← (byte) startProcessing::$44 + (byte) startProcessing::i#2 -- vbuz1=vbuz2_plus_vbuz3 lda _44 clc adc i sta _45 - //SEG101 [59] (byte~) startProcessing::$30 ← (byte) startProcessing::$45 << (byte) 1 -- vbuz1=vbuz2_rol_1 + //SEG98 [59] (byte~) startProcessing::$30 ← (byte) startProcessing::$45 << (byte) 1 -- vbuz1=vbuz2_rol_1 lda _45 asl sta _30 - //SEG102 [60] if(*((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS + (byte~) startProcessing::$30)!=(const byte) STATUS_FREE) goto startProcessing::@3 -- pbuc1_derefidx_vbuz1_neq_vbuc2_then_la1 + //SEG99 [60] if(*((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS + (byte~) startProcessing::$30)!=(const byte) STATUS_FREE) goto startProcessing::@3 -- pbuc1_derefidx_vbuz1_neq_vbuc2_then_la1 lda #STATUS_FREE ldy _30 cmp PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_STATUS,y bne b3 - //SEG103 [61] phi from startProcessing::@2 startProcessing::@9 to startProcessing::@4 [phi:startProcessing::@2/startProcessing::@9->startProcessing::@4] + //SEG100 [61] phi from startProcessing::@2 startProcessing::@9 to startProcessing::@4 [phi:startProcessing::@2/startProcessing::@9->startProcessing::@4] b4_from_b2: b4_from_b9: - //SEG104 [61] phi (byte) startProcessing::freeIdx#2 = (byte) startProcessing::i#2 [phi:startProcessing::@2/startProcessing::@9->startProcessing::@4#0] -- register_copy + //SEG101 [61] phi (byte) startProcessing::freeIdx#2 = (byte) startProcessing::i#2 [phi:startProcessing::@2/startProcessing::@9->startProcessing::@4#0] -- register_copy jmp b4 - //SEG105 startProcessing::@4 + //SEG102 startProcessing::@4 b4: - //SEG106 [62] if((byte) startProcessing::freeIdx#2==(byte) $ff) goto startProcessing::@8 -- vbuz1_eq_vbuc1_then_la1 + //SEG103 [62] if((byte) startProcessing::freeIdx#2==(byte) $ff) goto startProcessing::@8 -- vbuz1_eq_vbuc1_then_la1 lda #$ff cmp freeIdx beq b8 jmp b5 - //SEG107 startProcessing::@5 + //SEG104 startProcessing::@5 b5: - //SEG108 [63] (word~) startProcessing::$0 ← (word)(byte) startProcessing::center_y#0 -- vwuz1=_word_vbuz2 + //SEG105 [63] (word~) startProcessing::$0 ← (word)(byte) startProcessing::center_y#0 -- vwuz1=_word_vbuz2 lda center_y sta _0 lda #0 sta _0+1 - //SEG109 [64] (word) startProcessing::$47 ← (word~) startProcessing::$0 << (byte) 2 -- vwuz1=vwuz2_rol_2 + //SEG106 [64] (word) startProcessing::$47 ← (word~) startProcessing::$0 << (byte) 2 -- vwuz1=vwuz2_rol_2 lda _0 asl sta _47 @@ -6161,7 +5677,7 @@ startProcessing: { sta _47+1 asl _47 rol _47+1 - //SEG110 [65] (word) startProcessing::$48 ← (word) startProcessing::$47 + (word~) startProcessing::$0 -- vwuz1=vwuz2_plus_vwuz3 + //SEG107 [65] (word) startProcessing::$48 ← (word) startProcessing::$47 + (word~) startProcessing::$0 -- vwuz1=vwuz2_plus_vwuz3 lda _47 clc adc _0 @@ -6169,7 +5685,7 @@ startProcessing: { lda _47+1 adc _0+1 sta _48+1 - //SEG111 [66] (word~) startProcessing::$1 ← (word) startProcessing::$48 << (byte) 3 -- vwuz1=vwuz2_rol_3 + //SEG108 [66] (word~) startProcessing::$1 ← (word) startProcessing::$48 << (byte) 3 -- vwuz1=vwuz2_rol_3 lda _48 asl sta _1 @@ -6180,7 +5696,7 @@ startProcessing: { rol _1+1 asl _1 rol _1+1 - //SEG112 [67] (word) startProcessing::offset#0 ← (word~) startProcessing::$1 + (byte) startProcessing::center_x#0 -- vwuz1=vwuz2_plus_vbuz3 + //SEG109 [67] (word) startProcessing::offset#0 ← (word~) startProcessing::$1 + (byte) startProcessing::center_x#0 -- vwuz1=vwuz2_plus_vbuz3 lda center_x clc adc _1 @@ -6188,7 +5704,7 @@ startProcessing: { lda #0 adc _1+1 sta offset+1 - //SEG113 [68] (byte*) startProcessing::colPtr#0 ← (const byte*) COLS#0 + (word) startProcessing::offset#0 -- pbuz1=pbuc1_plus_vwuz2 + //SEG110 [68] (byte*) startProcessing::colPtr#0 ← (const byte*) COLS#0 + (word) startProcessing::offset#0 -- pbuz1=pbuc1_plus_vwuz2 lda offset clc adc #COLS sta colPtr+1 - //SEG114 [69] (byte) startProcessing::spriteCol#0 ← *((byte*) startProcessing::colPtr#0) -- vbuz1=_deref_pbuz2 + //SEG111 [69] (byte) startProcessing::spriteCol#0 ← *((byte*) startProcessing::colPtr#0) -- vbuz1=_deref_pbuz2 ldy #0 lda (colPtr),y sta spriteCol - //SEG115 [70] (byte*) startProcessing::screenPtr#0 ← (const byte*) SCREEN#0 + (word) startProcessing::offset#0 -- pbuz1=pbuc1_plus_vwuz2 + //SEG112 [70] (byte*) startProcessing::screenPtr#0 ← (const byte*) SCREEN#0 + (word) startProcessing::offset#0 -- pbuz1=pbuc1_plus_vwuz2 lda offset clc adc #SCREEN sta screenPtr+1 - //SEG116 [71] (word~) startProcessing::$5 ← (word)(byte) startProcessing::freeIdx#2 -- vwuz1=_word_vbuz2 + //SEG113 [71] (word~) startProcessing::$5 ← (word)(byte) startProcessing::freeIdx#2 -- vwuz1=_word_vbuz2 lda freeIdx sta _5 lda #0 sta _5+1 - //SEG117 [72] (word~) startProcessing::$6 ← (word~) startProcessing::$5 << (byte) 6 -- vwuz1=vwuz2_rol_6 + //SEG114 [72] (word~) startProcessing::$6 ← (word~) startProcessing::$5 << (byte) 6 -- vwuz1=vwuz2_rol_6 lda _5 asl sta _6 @@ -6230,7 +5746,7 @@ startProcessing: { rol _6+1 asl _6 rol _6+1 - //SEG118 [73] (byte*) startProcessing::spriteData#0 ← (const byte*) SPRITE_DATA#0 + (word~) startProcessing::$6 -- pbuz1=pbuc1_plus_vwuz2 + //SEG115 [73] (byte*) startProcessing::spriteData#0 ← (const byte*) SPRITE_DATA#0 + (word~) startProcessing::$6 -- pbuz1=pbuc1_plus_vwuz2 lda _6 clc adc #SPRITE_DATA sta spriteData+1 - //SEG119 [74] (byte) startProcessing::ch#0 ← *((byte*) startProcessing::screenPtr#0) -- vbuz1=_deref_pbuz2 + //SEG116 [74] (byte) startProcessing::ch#0 ← *((byte*) startProcessing::screenPtr#0) -- vbuz1=_deref_pbuz2 ldy #0 lda (screenPtr),y sta ch - //SEG120 [75] (word~) startProcessing::$8 ← (word)(byte) startProcessing::ch#0 -- vwuz1=_word_vbuz2 + //SEG117 [75] (word~) startProcessing::$8 ← (word)(byte) startProcessing::ch#0 -- vwuz1=_word_vbuz2 lda ch sta _8 lda #0 sta _8+1 - //SEG121 [76] (word~) startProcessing::$9 ← (word~) startProcessing::$8 << (byte) 3 -- vwuz1=vwuz2_rol_3 + //SEG118 [76] (word~) startProcessing::$9 ← (word~) startProcessing::$8 << (byte) 3 -- vwuz1=vwuz2_rol_3 lda _8 asl sta _9 @@ -6258,7 +5774,7 @@ startProcessing: { rol _9+1 asl _9 rol _9+1 - //SEG122 [77] (byte*) startProcessing::chargenData#0 ← (const byte*) CHARGEN#0 + (word~) startProcessing::$9 -- pbuz1=pbuc1_plus_vwuz2 + //SEG119 [77] (byte*) startProcessing::chargenData#0 ← (const byte*) CHARGEN#0 + (word~) startProcessing::$9 -- pbuz1=pbuc1_plus_vwuz2 lda _9 clc adc #CHARGEN sta chargenData+1 - //SEG123 asm { sei } + //SEG120 asm { sei } sei - //SEG124 [79] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_CHARROM#0 -- _deref_pbuc1=vbuc2 + //SEG121 [79] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_CHARROM#0 -- _deref_pbuc1=vbuc2 lda #PROCPORT_RAM_CHARROM sta PROCPORT - //SEG125 [80] phi from startProcessing::@5 to startProcessing::@6 [phi:startProcessing::@5->startProcessing::@6] + //SEG122 [80] phi from startProcessing::@5 to startProcessing::@6 [phi:startProcessing::@5->startProcessing::@6] b6_from_b5: - //SEG126 [80] phi (byte) startProcessing::i1#2 = (byte) 0 [phi:startProcessing::@5->startProcessing::@6#0] -- vbuz1=vbuc1 + //SEG123 [80] phi (byte) startProcessing::i1#2 = (byte) 0 [phi:startProcessing::@5->startProcessing::@6#0] -- vbuz1=vbuc1 lda #0 sta i1 - //SEG127 [80] phi (byte*) startProcessing::spriteData#2 = (byte*) startProcessing::spriteData#0 [phi:startProcessing::@5->startProcessing::@6#1] -- register_copy - //SEG128 [80] phi (byte*) startProcessing::chargenData#2 = (byte*) startProcessing::chargenData#0 [phi:startProcessing::@5->startProcessing::@6#2] -- register_copy + //SEG124 [80] phi (byte*) startProcessing::spriteData#2 = (byte*) startProcessing::spriteData#0 [phi:startProcessing::@5->startProcessing::@6#1] -- register_copy + //SEG125 [80] phi (byte*) startProcessing::chargenData#2 = (byte*) startProcessing::chargenData#0 [phi:startProcessing::@5->startProcessing::@6#2] -- register_copy jmp b6 - //SEG129 [80] phi from startProcessing::@6 to startProcessing::@6 [phi:startProcessing::@6->startProcessing::@6] + //SEG126 [80] phi from startProcessing::@6 to startProcessing::@6 [phi:startProcessing::@6->startProcessing::@6] b6_from_b6: - //SEG130 [80] phi (byte) startProcessing::i1#2 = (byte) startProcessing::i1#1 [phi:startProcessing::@6->startProcessing::@6#0] -- register_copy - //SEG131 [80] phi (byte*) startProcessing::spriteData#2 = (byte*) startProcessing::spriteData#1 [phi:startProcessing::@6->startProcessing::@6#1] -- register_copy - //SEG132 [80] phi (byte*) startProcessing::chargenData#2 = (byte*) startProcessing::chargenData#1 [phi:startProcessing::@6->startProcessing::@6#2] -- register_copy + //SEG127 [80] phi (byte) startProcessing::i1#2 = (byte) startProcessing::i1#1 [phi:startProcessing::@6->startProcessing::@6#0] -- register_copy + //SEG128 [80] phi (byte*) startProcessing::spriteData#2 = (byte*) startProcessing::spriteData#1 [phi:startProcessing::@6->startProcessing::@6#1] -- register_copy + //SEG129 [80] phi (byte*) startProcessing::chargenData#2 = (byte*) startProcessing::chargenData#1 [phi:startProcessing::@6->startProcessing::@6#2] -- register_copy jmp b6 - //SEG133 startProcessing::@6 + //SEG130 startProcessing::@6 b6: - //SEG134 [81] *((byte*) startProcessing::spriteData#2) ← *((byte*) startProcessing::chargenData#2) -- _deref_pbuz1=_deref_pbuz2 + //SEG131 [81] *((byte*) startProcessing::spriteData#2) ← *((byte*) startProcessing::chargenData#2) -- _deref_pbuz1=_deref_pbuz2 ldy #0 lda (chargenData),y ldy #0 sta (spriteData),y - //SEG135 [82] (byte*) startProcessing::spriteData#1 ← (byte*) startProcessing::spriteData#2 + (byte) 3 -- pbuz1=pbuz1_plus_vbuc1 + //SEG132 [82] (byte*) startProcessing::spriteData#1 ← (byte*) startProcessing::spriteData#2 + (byte) 3 -- pbuz1=pbuz1_plus_vbuc1 lda #3 clc adc spriteData @@ -6300,31 +5816,31 @@ startProcessing: { bcc !+ inc spriteData+1 !: - //SEG136 [83] (byte*) startProcessing::chargenData#1 ← ++ (byte*) startProcessing::chargenData#2 -- pbuz1=_inc_pbuz1 + //SEG133 [83] (byte*) startProcessing::chargenData#1 ← ++ (byte*) startProcessing::chargenData#2 -- pbuz1=_inc_pbuz1 inc chargenData bne !+ inc chargenData+1 !: - //SEG137 [84] (byte) startProcessing::i1#1 ← ++ (byte) startProcessing::i1#2 -- vbuz1=_inc_vbuz1 + //SEG134 [84] (byte) startProcessing::i1#1 ← ++ (byte) startProcessing::i1#2 -- vbuz1=_inc_vbuz1 inc i1 - //SEG138 [85] if((byte) startProcessing::i1#1!=(byte) 8) goto startProcessing::@6 -- vbuz1_neq_vbuc1_then_la1 + //SEG135 [85] 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 - //SEG139 startProcessing::@7 + //SEG136 startProcessing::@7 b7: - //SEG140 [86] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 -- _deref_pbuc1=vbuc2 + //SEG137 [86] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 -- _deref_pbuc1=vbuc2 lda #PROCPORT_RAM_IO sta PROCPORT - //SEG141 asm { cli } + //SEG138 asm { cli } cli - //SEG142 [88] (word~) startProcessing::$11 ← (word)(byte) startProcessing::center_x#0 -- vwuz1=_word_vbuz2 + //SEG139 [88] (word~) startProcessing::$11 ← (word)(byte) startProcessing::center_x#0 -- vwuz1=_word_vbuz2 lda center_x sta _11 lda #0 sta _11+1 - //SEG143 [89] (word~) startProcessing::$12 ← (word~) startProcessing::$11 << (byte) 3 -- vwuz1=vwuz2_rol_3 + //SEG140 [89] (word~) startProcessing::$12 ← (word~) startProcessing::$11 << (byte) 3 -- vwuz1=vwuz2_rol_3 lda _11 asl sta _12 @@ -6335,7 +5851,7 @@ startProcessing: { rol _12+1 asl _12 rol _12+1 - //SEG144 [90] (word~) startProcessing::$13 ← (const byte) BORDER_XPOS_LEFT#0 + (word~) startProcessing::$12 -- vwuz1=vbuc1_plus_vwuz2 + //SEG141 [90] (word~) startProcessing::$13 ← (const byte) BORDER_XPOS_LEFT#0 + (word~) startProcessing::$12 -- vwuz1=vbuc1_plus_vwuz2 lda #BORDER_XPOS_LEFT clc adc _12 @@ -6343,7 +5859,7 @@ startProcessing: { lda #0 adc _12+1 sta _13+1 - //SEG145 [91] (word) startProcessing::spriteX#0 ← (word~) startProcessing::$13 << (byte) 4 -- vwuz1=vwuz2_rol_4 + //SEG142 [91] (word) startProcessing::spriteX#0 ← (word~) startProcessing::$13 << (byte) 4 -- vwuz1=vwuz2_rol_4 lda _13 asl sta spriteX @@ -6356,12 +5872,12 @@ startProcessing: { rol spriteX+1 asl spriteX rol spriteX+1 - //SEG146 [92] (word~) startProcessing::$15 ← (word)(byte) startProcessing::center_y#0 -- vwuz1=_word_vbuz2 + //SEG143 [92] (word~) startProcessing::$15 ← (word)(byte) startProcessing::center_y#0 -- vwuz1=_word_vbuz2 lda center_y sta _15 lda #0 sta _15+1 - //SEG147 [93] (word~) startProcessing::$16 ← (word~) startProcessing::$15 << (byte) 3 -- vwuz1=vwuz2_rol_3 + //SEG144 [93] (word~) startProcessing::$16 ← (word~) startProcessing::$15 << (byte) 3 -- vwuz1=vwuz2_rol_3 lda _15 asl sta _16 @@ -6372,7 +5888,7 @@ startProcessing: { rol _16+1 asl _16 rol _16+1 - //SEG148 [94] (word~) startProcessing::$17 ← (const byte) BORDER_YPOS_TOP#0 + (word~) startProcessing::$16 -- vwuz1=vbuc1_plus_vwuz2 + //SEG145 [94] (word~) startProcessing::$17 ← (const byte) BORDER_YPOS_TOP#0 + (word~) startProcessing::$16 -- vwuz1=vbuc1_plus_vwuz2 lda #BORDER_YPOS_TOP clc adc _16 @@ -6380,7 +5896,7 @@ startProcessing: { lda #0 adc _16+1 sta _17+1 - //SEG149 [95] (word) startProcessing::spriteY#0 ← (word~) startProcessing::$17 << (byte) 4 -- vwuz1=vwuz2_rol_4 + //SEG146 [95] (word) startProcessing::spriteY#0 ← (word~) startProcessing::$17 << (byte) 4 -- vwuz1=vwuz2_rol_4 lda _17 asl sta spriteY @@ -6393,129 +5909,129 @@ startProcessing: { rol spriteY+1 asl spriteY rol spriteY+1 - //SEG150 [96] (byte) startProcessing::spritePtr#0 ← (byte)(const byte*) SPRITE_DATA#0/(byte) $40 + (byte) startProcessing::freeIdx#2 -- vbuz1=vbuc1_plus_vbuz2 + //SEG147 [96] (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 - //SEG151 [97] (byte~) startProcessing::$22 ← (byte) startProcessing::freeIdx#2 << (byte) 3 -- vbuz1=vbuz2_rol_3 + //SEG148 [97] (byte~) startProcessing::$22 ← (byte) startProcessing::freeIdx#2 << (byte) 3 -- vbuz1=vbuz2_rol_3 lda freeIdx asl asl asl sta _22 - //SEG152 [98] (word~) startProcessing::$23 ← (word)(byte~) startProcessing::$22 -- vwuz1=_word_vbuz2 + //SEG149 [98] (word~) startProcessing::$23 ← (word)(byte~) startProcessing::$22 -- vwuz1=_word_vbuz2 lda _22 sta _23 lda #0 sta _23+1 - //SEG153 [99] (byte) startProcessing::$50 ← (byte) startProcessing::freeIdx#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 + //SEG150 [99] (byte) startProcessing::$50 ← (byte) startProcessing::freeIdx#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 lda freeIdx asl sta _50 - //SEG154 [100] (byte) startProcessing::$51 ← (byte) startProcessing::$50 + (byte) startProcessing::freeIdx#2 -- vbuz1=vbuz2_plus_vbuz3 + //SEG151 [100] (byte) startProcessing::$51 ← (byte) startProcessing::$50 + (byte) startProcessing::freeIdx#2 -- vbuz1=vbuz2_plus_vbuz3 lda _50 clc adc freeIdx sta _51 - //SEG155 [101] (byte) startProcessing::$52 ← (byte) startProcessing::$51 << (byte) 1 -- vbuz1=vbuz2_rol_1 + //SEG152 [101] (byte) startProcessing::$52 ← (byte) startProcessing::$51 << (byte) 1 -- vbuz1=vbuz2_rol_1 lda _51 asl sta _52 - //SEG156 [102] (byte) startProcessing::$53 ← (byte) startProcessing::$52 + (byte) startProcessing::freeIdx#2 -- vbuz1=vbuz2_plus_vbuz3 + //SEG153 [102] (byte) startProcessing::$53 ← (byte) startProcessing::$52 + (byte) startProcessing::freeIdx#2 -- vbuz1=vbuz2_plus_vbuz3 lda _52 clc adc freeIdx sta _53 - //SEG157 [103] (byte~) startProcessing::$31 ← (byte) startProcessing::$53 << (byte) 1 -- vbuz1=vbuz2_rol_1 + //SEG154 [103] (byte~) startProcessing::$31 ← (byte) startProcessing::$53 << (byte) 1 -- vbuz1=vbuz2_rol_1 lda _53 asl sta _31 - //SEG158 [104] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (byte~) startProcessing::$31) ← (word) startProcessing::spriteX#0 -- pwuc1_derefidx_vbuz1=vwuz2 + //SEG155 [104] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (byte~) startProcessing::$31) ← (word) startProcessing::spriteX#0 -- pwuc1_derefidx_vbuz1=vwuz2 ldy _31 lda spriteX sta PROCESSING,y lda spriteX+1 sta PROCESSING+1,y - //SEG159 [105] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y + (byte~) startProcessing::$31) ← (word) startProcessing::spriteY#0 -- pwuc1_derefidx_vbuz1=vwuz2 + //SEG156 [105] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y + (byte~) startProcessing::$31) ← (word) startProcessing::spriteY#0 -- pwuc1_derefidx_vbuz1=vwuz2 ldy _31 lda spriteY sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_Y,y lda spriteY+1 sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_Y+1,y - //SEG160 [106] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX + (byte~) startProcessing::$31) ← (word~) startProcessing::$23 -- pwuc1_derefidx_vbuz1=vwuz2 + //SEG157 [106] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX + (byte~) startProcessing::$31) ← (word~) startProcessing::$23 -- pwuc1_derefidx_vbuz1=vwuz2 ldy _31 lda _23 sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_VX,y lda _23+1 sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_VX+1,y - //SEG161 [107] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY + (byte~) startProcessing::$31) ← (byte) $3c -- pwuc1_derefidx_vbuz1=vbuc2 + //SEG158 [107] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY + (byte~) startProcessing::$31) ← (byte) $3c -- pwuc1_derefidx_vbuz1=vbuc2 lda _31 ldx #$3c tay txa sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_VY,y - //SEG162 [108] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID + (byte~) startProcessing::$31) ← (byte) startProcessing::freeIdx#2 -- pbuc1_derefidx_vbuz1=vbuz2 + //SEG159 [108] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID + (byte~) startProcessing::$31) ← (byte) startProcessing::freeIdx#2 -- pbuc1_derefidx_vbuz1=vbuz2 lda freeIdx ldy _31 sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_ID,y - //SEG163 [109] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR + (byte~) startProcessing::$31) ← (byte) startProcessing::spritePtr#0 -- pbuc1_derefidx_vbuz1=vbuz2 + //SEG160 [109] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR + (byte~) startProcessing::$31) ← (byte) startProcessing::spritePtr#0 -- pbuc1_derefidx_vbuz1=vbuz2 lda spritePtr ldy _31 sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_PTR,y - //SEG164 [110] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_COL + (byte~) startProcessing::$31) ← (byte) startProcessing::spriteCol#0 -- pbuc1_derefidx_vbuz1=vbuz2 + //SEG161 [110] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_COL + (byte~) startProcessing::$31) ← (byte) startProcessing::spriteCol#0 -- pbuc1_derefidx_vbuz1=vbuz2 lda spriteCol ldy _31 sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_COL,y - //SEG165 [111] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS + (byte~) startProcessing::$31) ← (const byte) STATUS_NEW -- pbuc1_derefidx_vbuz1=vbuc2 + //SEG162 [111] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS + (byte~) startProcessing::$31) ← (const byte) STATUS_NEW -- pbuc1_derefidx_vbuz1=vbuc2 lda #STATUS_NEW ldy _31 sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_STATUS,y - //SEG166 [112] *((byte**)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR + (byte~) startProcessing::$31) ← (byte*) startProcessing::screenPtr#0 -- pptc1_derefidx_vbuz1=pbuz2 + //SEG163 [112] *((byte**)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR + (byte~) startProcessing::$31) ← (byte*) startProcessing::screenPtr#0 -- pptc1_derefidx_vbuz1=pbuz2 ldy _31 lda screenPtr sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR,y lda screenPtr+1 sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR+1,y jmp breturn - //SEG167 startProcessing::@return + //SEG164 startProcessing::@return breturn: - //SEG168 [113] return + //SEG165 [113] return rts - //SEG169 startProcessing::@8 + //SEG166 startProcessing::@8 b8: - //SEG170 [114] (byte~) startProcessing::freeIdx#7 ← (byte) startProcessing::freeIdx#2 -- vbuz1=vbuz2 + //SEG167 [114] (byte~) startProcessing::freeIdx#7 ← (byte) startProcessing::freeIdx#2 -- vbuz1=vbuz2 lda freeIdx sta freeIdx_7 - //SEG171 [53] phi from startProcessing::@8 to startProcessing::@1 [phi:startProcessing::@8->startProcessing::@1] + //SEG168 [53] phi from startProcessing::@8 to startProcessing::@1 [phi:startProcessing::@8->startProcessing::@1] b1_from_b8: - //SEG172 [53] phi (byte) startProcessing::freeIdx#6 = (byte~) startProcessing::freeIdx#7 [phi:startProcessing::@8->startProcessing::@1#0] -- register_copy + //SEG169 [53] phi (byte) startProcessing::freeIdx#6 = (byte~) startProcessing::freeIdx#7 [phi:startProcessing::@8->startProcessing::@1#0] -- register_copy jmp b1 - //SEG173 startProcessing::@3 + //SEG170 startProcessing::@3 b3: - //SEG174 [115] (byte) startProcessing::i#1 ← ++ (byte) startProcessing::i#2 -- vbuz1=_inc_vbuz1 + //SEG171 [115] (byte) startProcessing::i#1 ← ++ (byte) startProcessing::i#2 -- vbuz1=_inc_vbuz1 inc i - //SEG175 [116] if((byte) startProcessing::i#1!=(const byte) NUM_PROCESSING#0-(byte) 1+(byte) 1) goto startProcessing::@2 -- vbuz1_neq_vbuc1_then_la1 + //SEG172 [116] if((byte) startProcessing::i#1!=(const byte) NUM_PROCESSING#0-(byte) 1+(byte) 1) goto startProcessing::@2 -- vbuz1_neq_vbuc1_then_la1 lda #NUM_PROCESSING-1+1 cmp i bne b2_from_b3 jmp b9 - //SEG176 startProcessing::@9 + //SEG173 startProcessing::@9 b9: - //SEG177 [117] (byte~) startProcessing::freeIdx#8 ← (byte) startProcessing::freeIdx#6 -- vbuz1=vbuz2 + //SEG174 [117] (byte~) startProcessing::freeIdx#8 ← (byte) startProcessing::freeIdx#6 -- vbuz1=vbuz2 lda freeIdx_6 sta freeIdx jmp b4_from_b9 } -//SEG178 getCharToProcess +//SEG175 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 _8 = $7a - .label _9 = $80 - .label _10 = $82 - .label return_x = $3c - .label return_y = $3d - .label return_dist = $3e + .label _8 = $7d + .label _9 = $83 + .label _10 = $85 + .label return_x = $3f + .label return_y = $40 + .label return_dist = $41 .label screen_line = $e .label dist_line = $10 .label x = $13 @@ -6527,97 +6043,97 @@ getCharToProcess: { .label closest_dist = $14 .label closest_x = $15 .label closest_y = $16 - .label _12 = $7c - .label _13 = $7e + .label _12 = $7f + .label _13 = $81 .label return_dist_5 = $17 .label return_dist_6 = $17 .label return_x_7 = $15 .label return_y_7 = $16 - //SEG179 [118] (byte*) getCharToProcess::screen_line#0 ← (byte*)(void*) SCREEN_COPY#0 -- pbuz1=pbuz2 + //SEG176 [118] (byte*) getCharToProcess::screen_line#0 ← (byte*)(void*) SCREEN_COPY#0 -- pbuz1=pbuz2 lda SCREEN_COPY sta screen_line lda SCREEN_COPY+1 sta screen_line+1 - //SEG180 [119] (byte*) getCharToProcess::dist_line#0 ← (byte*)(void*) SCREEN_DIST#0 -- pbuz1=pbuz2 + //SEG177 [119] (byte*) getCharToProcess::dist_line#0 ← (byte*)(void*) SCREEN_DIST#0 -- pbuz1=pbuz2 lda SCREEN_DIST sta dist_line lda SCREEN_DIST+1 sta dist_line+1 - //SEG181 [120] phi from getCharToProcess to getCharToProcess::@1 [phi:getCharToProcess->getCharToProcess::@1] + //SEG178 [120] phi from getCharToProcess to getCharToProcess::@1 [phi:getCharToProcess->getCharToProcess::@1] b1_from_getCharToProcess: - //SEG182 [120] phi (byte) getCharToProcess::closest_y#9 = (byte) 0 [phi:getCharToProcess->getCharToProcess::@1#0] -- vbuz1=vbuc1 + //SEG179 [120] phi (byte) getCharToProcess::closest_y#9 = (byte) 0 [phi:getCharToProcess->getCharToProcess::@1#0] -- vbuz1=vbuc1 lda #0 sta closest_y - //SEG183 [120] phi (byte) getCharToProcess::closest_x#9 = (byte) 0 [phi:getCharToProcess->getCharToProcess::@1#1] -- vbuz1=vbuc1 + //SEG180 [120] phi (byte) getCharToProcess::closest_x#9 = (byte) 0 [phi:getCharToProcess->getCharToProcess::@1#1] -- vbuz1=vbuc1 lda #0 sta closest_x - //SEG184 [120] phi (byte) getCharToProcess::y#7 = (byte) 0 [phi:getCharToProcess->getCharToProcess::@1#2] -- vbuz1=vbuc1 + //SEG181 [120] phi (byte) getCharToProcess::y#7 = (byte) 0 [phi:getCharToProcess->getCharToProcess::@1#2] -- vbuz1=vbuc1 lda #0 sta y - //SEG185 [120] phi (byte) getCharToProcess::closest_dist#8 = (const byte) NOT_FOUND#0 [phi:getCharToProcess->getCharToProcess::@1#3] -- vbuz1=vbuc1 + //SEG182 [120] phi (byte) getCharToProcess::closest_dist#8 = (const byte) NOT_FOUND#0 [phi:getCharToProcess->getCharToProcess::@1#3] -- vbuz1=vbuc1 lda #NOT_FOUND sta closest_dist - //SEG186 [120] phi (byte*) getCharToProcess::dist_line#6 = (byte*) getCharToProcess::dist_line#0 [phi:getCharToProcess->getCharToProcess::@1#4] -- register_copy - //SEG187 [120] phi (byte*) getCharToProcess::screen_line#4 = (byte*) getCharToProcess::screen_line#0 [phi:getCharToProcess->getCharToProcess::@1#5] -- register_copy + //SEG183 [120] phi (byte*) getCharToProcess::dist_line#6 = (byte*) getCharToProcess::dist_line#0 [phi:getCharToProcess->getCharToProcess::@1#4] -- register_copy + //SEG184 [120] phi (byte*) getCharToProcess::screen_line#4 = (byte*) getCharToProcess::screen_line#0 [phi:getCharToProcess->getCharToProcess::@1#5] -- register_copy jmp b1 - //SEG188 getCharToProcess::@1 + //SEG185 getCharToProcess::@1 b1: - //SEG189 [121] phi from getCharToProcess::@1 to getCharToProcess::@2 [phi:getCharToProcess::@1->getCharToProcess::@2] + //SEG186 [121] phi from getCharToProcess::@1 to getCharToProcess::@2 [phi:getCharToProcess::@1->getCharToProcess::@2] b2_from_b1: - //SEG190 [121] phi (byte) getCharToProcess::closest_y#7 = (byte) getCharToProcess::closest_y#9 [phi:getCharToProcess::@1->getCharToProcess::@2#0] -- register_copy - //SEG191 [121] phi (byte) getCharToProcess::closest_x#7 = (byte) getCharToProcess::closest_x#9 [phi:getCharToProcess::@1->getCharToProcess::@2#1] -- register_copy - //SEG192 [121] phi (byte) getCharToProcess::closest_dist#2 = (byte) getCharToProcess::closest_dist#8 [phi:getCharToProcess::@1->getCharToProcess::@2#2] -- register_copy - //SEG193 [121] phi (byte) getCharToProcess::x#2 = (byte) 0 [phi:getCharToProcess::@1->getCharToProcess::@2#3] -- vbuz1=vbuc1 + //SEG187 [121] phi (byte) getCharToProcess::closest_y#7 = (byte) getCharToProcess::closest_y#9 [phi:getCharToProcess::@1->getCharToProcess::@2#0] -- register_copy + //SEG188 [121] phi (byte) getCharToProcess::closest_x#7 = (byte) getCharToProcess::closest_x#9 [phi:getCharToProcess::@1->getCharToProcess::@2#1] -- register_copy + //SEG189 [121] phi (byte) getCharToProcess::closest_dist#2 = (byte) getCharToProcess::closest_dist#8 [phi:getCharToProcess::@1->getCharToProcess::@2#2] -- register_copy + //SEG190 [121] phi (byte) getCharToProcess::x#2 = (byte) 0 [phi:getCharToProcess::@1->getCharToProcess::@2#3] -- vbuz1=vbuc1 lda #0 sta x jmp b2 - //SEG194 getCharToProcess::@2 + //SEG191 getCharToProcess::@2 b2: - //SEG195 [122] if(*((byte*) getCharToProcess::screen_line#4 + (byte) getCharToProcess::x#2)==(byte) ' ') goto getCharToProcess::@11 -- pbuz1_derefidx_vbuz2_eq_vbuc1_then_la1 + //SEG192 [122] 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 - //SEG196 getCharToProcess::@4 + //SEG193 getCharToProcess::@4 b4: - //SEG197 [123] (byte) getCharToProcess::dist#0 ← *((byte*) getCharToProcess::dist_line#6 + (byte) getCharToProcess::x#2) -- vbuz1=pbuz2_derefidx_vbuz3 + //SEG194 [123] (byte) getCharToProcess::dist#0 ← *((byte*) getCharToProcess::dist_line#6 + (byte) getCharToProcess::x#2) -- vbuz1=pbuz2_derefidx_vbuz3 ldy x lda (dist_line),y sta dist - //SEG198 [124] if((byte) getCharToProcess::dist#0>=(byte) getCharToProcess::closest_dist#2) goto getCharToProcess::@12 -- vbuz1_ge_vbuz2_then_la1 + //SEG195 [124] if((byte) getCharToProcess::dist#0>=(byte) getCharToProcess::closest_dist#2) goto getCharToProcess::@12 -- vbuz1_ge_vbuz2_then_la1 lda dist cmp closest_dist bcs b12 jmp b5 - //SEG199 getCharToProcess::@5 + //SEG196 getCharToProcess::@5 b5: - //SEG200 [125] (byte~) getCharToProcess::return_x#7 ← (byte) getCharToProcess::x#2 -- vbuz1=vbuz2 + //SEG197 [125] (byte~) getCharToProcess::return_x#7 ← (byte) getCharToProcess::x#2 -- vbuz1=vbuz2 lda x sta return_x_7 - //SEG201 [126] (byte~) getCharToProcess::return_y#7 ← (byte) getCharToProcess::y#7 -- vbuz1=vbuz2 + //SEG198 [126] (byte~) getCharToProcess::return_y#7 ← (byte) getCharToProcess::y#7 -- vbuz1=vbuz2 lda y sta return_y_7 - //SEG202 [127] phi from getCharToProcess::@11 getCharToProcess::@12 getCharToProcess::@5 to getCharToProcess::@3 [phi:getCharToProcess::@11/getCharToProcess::@12/getCharToProcess::@5->getCharToProcess::@3] + //SEG199 [127] 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: - //SEG203 [127] phi (byte) getCharToProcess::return_y#1 = (byte) getCharToProcess::closest_y#7 [phi:getCharToProcess::@11/getCharToProcess::@12/getCharToProcess::@5->getCharToProcess::@3#0] -- register_copy - //SEG204 [127] phi (byte) getCharToProcess::return_x#1 = (byte) getCharToProcess::closest_x#7 [phi:getCharToProcess::@11/getCharToProcess::@12/getCharToProcess::@5->getCharToProcess::@3#1] -- register_copy - //SEG205 [127] phi (byte) getCharToProcess::return_dist#1 = (byte~) getCharToProcess::return_dist#5 [phi:getCharToProcess::@11/getCharToProcess::@12/getCharToProcess::@5->getCharToProcess::@3#2] -- register_copy + //SEG200 [127] phi (byte) getCharToProcess::return_y#1 = (byte) getCharToProcess::closest_y#7 [phi:getCharToProcess::@11/getCharToProcess::@12/getCharToProcess::@5->getCharToProcess::@3#0] -- register_copy + //SEG201 [127] phi (byte) getCharToProcess::return_x#1 = (byte) getCharToProcess::closest_x#7 [phi:getCharToProcess::@11/getCharToProcess::@12/getCharToProcess::@5->getCharToProcess::@3#1] -- register_copy + //SEG202 [127] phi (byte) getCharToProcess::return_dist#1 = (byte~) getCharToProcess::return_dist#5 [phi:getCharToProcess::@11/getCharToProcess::@12/getCharToProcess::@5->getCharToProcess::@3#2] -- register_copy jmp b3 - //SEG206 getCharToProcess::@3 + //SEG203 getCharToProcess::@3 b3: - //SEG207 [128] (byte) getCharToProcess::x#1 ← ++ (byte) getCharToProcess::x#2 -- vbuz1=_inc_vbuz1 + //SEG204 [128] (byte) getCharToProcess::x#1 ← ++ (byte) getCharToProcess::x#2 -- vbuz1=_inc_vbuz1 inc x - //SEG208 [129] if((byte) getCharToProcess::x#1!=(byte) $28) goto getCharToProcess::@10 -- vbuz1_neq_vbuc1_then_la1 + //SEG205 [129] if((byte) getCharToProcess::x#1!=(byte) $28) goto getCharToProcess::@10 -- vbuz1_neq_vbuc1_then_la1 lda #$28 cmp x bne b10 jmp b6 - //SEG209 getCharToProcess::@6 + //SEG206 getCharToProcess::@6 b6: - //SEG210 [130] (byte*) getCharToProcess::screen_line#1 ← (byte*) getCharToProcess::screen_line#4 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 + //SEG207 [130] (byte*) getCharToProcess::screen_line#1 ← (byte*) getCharToProcess::screen_line#4 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 lda #$28 clc adc screen_line @@ -6625,7 +6141,7 @@ getCharToProcess: { bcc !+ inc screen_line+1 !: - //SEG211 [131] (byte*) getCharToProcess::dist_line#1 ← (byte*) getCharToProcess::dist_line#6 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 + //SEG208 [131] (byte*) getCharToProcess::dist_line#1 ← (byte*) getCharToProcess::dist_line#6 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 lda #$28 clc adc dist_line @@ -6633,28 +6149,28 @@ getCharToProcess: { bcc !+ inc dist_line+1 !: - //SEG212 [132] (byte) getCharToProcess::y#1 ← ++ (byte) getCharToProcess::y#7 -- vbuz1=_inc_vbuz1 + //SEG209 [132] (byte) getCharToProcess::y#1 ← ++ (byte) getCharToProcess::y#7 -- vbuz1=_inc_vbuz1 inc y - //SEG213 [133] if((byte) getCharToProcess::y#1!=(byte) $19) goto getCharToProcess::@9 -- vbuz1_neq_vbuc1_then_la1 + //SEG210 [133] if((byte) getCharToProcess::y#1!=(byte) $19) goto getCharToProcess::@9 -- vbuz1_neq_vbuc1_then_la1 lda #$19 cmp y bne b9 jmp b7 - //SEG214 getCharToProcess::@7 + //SEG211 getCharToProcess::@7 b7: - //SEG215 [134] if((byte) getCharToProcess::return_dist#1==(const byte) NOT_FOUND#0) goto getCharToProcess::@return -- vbuz1_eq_vbuc1_then_la1 + //SEG212 [134] if((byte) getCharToProcess::return_dist#1==(const byte) NOT_FOUND#0) goto getCharToProcess::@return -- vbuz1_eq_vbuc1_then_la1 lda #NOT_FOUND cmp return_dist_1 beq breturn jmp b8 - //SEG216 getCharToProcess::@8 + //SEG213 getCharToProcess::@8 b8: - //SEG217 [135] (word~) getCharToProcess::$8 ← (word)(byte) getCharToProcess::return_y#1 -- vwuz1=_word_vbuz2 + //SEG214 [135] (word~) getCharToProcess::$8 ← (word)(byte) getCharToProcess::return_y#1 -- vwuz1=_word_vbuz2 lda return_y_1 sta _8 lda #0 sta _8+1 - //SEG218 [136] (word) getCharToProcess::$12 ← (word~) getCharToProcess::$8 << (byte) 2 -- vwuz1=vwuz2_rol_2 + //SEG215 [136] (word) getCharToProcess::$12 ← (word~) getCharToProcess::$8 << (byte) 2 -- vwuz1=vwuz2_rol_2 lda _8 asl sta _12 @@ -6663,7 +6179,7 @@ getCharToProcess: { sta _12+1 asl _12 rol _12+1 - //SEG219 [137] (word) getCharToProcess::$13 ← (word) getCharToProcess::$12 + (word~) getCharToProcess::$8 -- vwuz1=vwuz2_plus_vwuz3 + //SEG216 [137] (word) getCharToProcess::$13 ← (word) getCharToProcess::$12 + (word~) getCharToProcess::$8 -- vwuz1=vwuz2_plus_vwuz3 lda _12 clc adc _8 @@ -6671,7 +6187,7 @@ getCharToProcess: { lda _12+1 adc _8+1 sta _13+1 - //SEG220 [138] (word~) getCharToProcess::$9 ← (word) getCharToProcess::$13 << (byte) 3 -- vwuz1=vwuz2_rol_3 + //SEG217 [138] (word~) getCharToProcess::$9 ← (word) getCharToProcess::$13 << (byte) 3 -- vwuz1=vwuz2_rol_3 lda _13 asl sta _9 @@ -6682,7 +6198,7 @@ getCharToProcess: { rol _9+1 asl _9 rol _9+1 - //SEG221 [139] (byte*~) getCharToProcess::$10 ← (byte*)(void*) SCREEN_COPY#0 + (word~) getCharToProcess::$9 -- pbuz1=pbuz2_plus_vwuz3 + //SEG218 [139] (byte*~) getCharToProcess::$10 ← (byte*)(void*) SCREEN_COPY#0 + (word~) getCharToProcess::$9 -- pbuz1=pbuz2_plus_vwuz3 lda SCREEN_COPY clc adc _9 @@ -6690,133 +6206,133 @@ getCharToProcess: { lda SCREEN_COPY+1 adc _9+1 sta _10+1 - //SEG222 [140] *((byte*~) getCharToProcess::$10 + (byte) getCharToProcess::return_x#1) ← (byte) ' ' -- pbuz1_derefidx_vbuz2=vbuc1 + //SEG219 [140] *((byte*~) getCharToProcess::$10 + (byte) getCharToProcess::return_x#1) ← (byte) ' ' -- pbuz1_derefidx_vbuz2=vbuc1 // clear the found char on the screen copy lda #' ' ldy return_x_1 sta (_10),y jmp breturn - //SEG223 getCharToProcess::@return + //SEG220 getCharToProcess::@return breturn: - //SEG224 [141] return + //SEG221 [141] return rts - //SEG225 getCharToProcess::@9 + //SEG222 getCharToProcess::@9 b9: - //SEG226 [142] (byte~) getCharToProcess::closest_dist#10 ← (byte) getCharToProcess::return_dist#1 -- vbuz1=vbuz2 + //SEG223 [142] (byte~) getCharToProcess::closest_dist#10 ← (byte) getCharToProcess::return_dist#1 -- vbuz1=vbuz2 lda return_dist_1 sta closest_dist - //SEG227 [120] phi from getCharToProcess::@9 to getCharToProcess::@1 [phi:getCharToProcess::@9->getCharToProcess::@1] + //SEG224 [120] phi from getCharToProcess::@9 to getCharToProcess::@1 [phi:getCharToProcess::@9->getCharToProcess::@1] b1_from_b9: - //SEG228 [120] phi (byte) getCharToProcess::closest_y#9 = (byte) getCharToProcess::return_y#1 [phi:getCharToProcess::@9->getCharToProcess::@1#0] -- register_copy - //SEG229 [120] phi (byte) getCharToProcess::closest_x#9 = (byte) getCharToProcess::return_x#1 [phi:getCharToProcess::@9->getCharToProcess::@1#1] -- register_copy - //SEG230 [120] phi (byte) getCharToProcess::y#7 = (byte) getCharToProcess::y#1 [phi:getCharToProcess::@9->getCharToProcess::@1#2] -- register_copy - //SEG231 [120] phi (byte) getCharToProcess::closest_dist#8 = (byte~) getCharToProcess::closest_dist#10 [phi:getCharToProcess::@9->getCharToProcess::@1#3] -- register_copy - //SEG232 [120] phi (byte*) getCharToProcess::dist_line#6 = (byte*) getCharToProcess::dist_line#1 [phi:getCharToProcess::@9->getCharToProcess::@1#4] -- register_copy - //SEG233 [120] phi (byte*) getCharToProcess::screen_line#4 = (byte*) getCharToProcess::screen_line#1 [phi:getCharToProcess::@9->getCharToProcess::@1#5] -- register_copy + //SEG225 [120] phi (byte) getCharToProcess::closest_y#9 = (byte) getCharToProcess::return_y#1 [phi:getCharToProcess::@9->getCharToProcess::@1#0] -- register_copy + //SEG226 [120] phi (byte) getCharToProcess::closest_x#9 = (byte) getCharToProcess::return_x#1 [phi:getCharToProcess::@9->getCharToProcess::@1#1] -- register_copy + //SEG227 [120] phi (byte) getCharToProcess::y#7 = (byte) getCharToProcess::y#1 [phi:getCharToProcess::@9->getCharToProcess::@1#2] -- register_copy + //SEG228 [120] phi (byte) getCharToProcess::closest_dist#8 = (byte~) getCharToProcess::closest_dist#10 [phi:getCharToProcess::@9->getCharToProcess::@1#3] -- register_copy + //SEG229 [120] phi (byte*) getCharToProcess::dist_line#6 = (byte*) getCharToProcess::dist_line#1 [phi:getCharToProcess::@9->getCharToProcess::@1#4] -- register_copy + //SEG230 [120] phi (byte*) getCharToProcess::screen_line#4 = (byte*) getCharToProcess::screen_line#1 [phi:getCharToProcess::@9->getCharToProcess::@1#5] -- register_copy jmp b1 - //SEG234 getCharToProcess::@10 + //SEG231 getCharToProcess::@10 b10: - //SEG235 [143] (byte~) getCharToProcess::closest_dist#12 ← (byte) getCharToProcess::return_dist#1 -- vbuz1=vbuz2 + //SEG232 [143] (byte~) getCharToProcess::closest_dist#12 ← (byte) getCharToProcess::return_dist#1 -- vbuz1=vbuz2 lda return_dist_1 sta closest_dist - //SEG236 [121] phi from getCharToProcess::@10 to getCharToProcess::@2 [phi:getCharToProcess::@10->getCharToProcess::@2] + //SEG233 [121] phi from getCharToProcess::@10 to getCharToProcess::@2 [phi:getCharToProcess::@10->getCharToProcess::@2] b2_from_b10: - //SEG237 [121] phi (byte) getCharToProcess::closest_y#7 = (byte) getCharToProcess::return_y#1 [phi:getCharToProcess::@10->getCharToProcess::@2#0] -- register_copy - //SEG238 [121] phi (byte) getCharToProcess::closest_x#7 = (byte) getCharToProcess::return_x#1 [phi:getCharToProcess::@10->getCharToProcess::@2#1] -- register_copy - //SEG239 [121] phi (byte) getCharToProcess::closest_dist#2 = (byte~) getCharToProcess::closest_dist#12 [phi:getCharToProcess::@10->getCharToProcess::@2#2] -- register_copy - //SEG240 [121] phi (byte) getCharToProcess::x#2 = (byte) getCharToProcess::x#1 [phi:getCharToProcess::@10->getCharToProcess::@2#3] -- register_copy + //SEG234 [121] phi (byte) getCharToProcess::closest_y#7 = (byte) getCharToProcess::return_y#1 [phi:getCharToProcess::@10->getCharToProcess::@2#0] -- register_copy + //SEG235 [121] phi (byte) getCharToProcess::closest_x#7 = (byte) getCharToProcess::return_x#1 [phi:getCharToProcess::@10->getCharToProcess::@2#1] -- register_copy + //SEG236 [121] phi (byte) getCharToProcess::closest_dist#2 = (byte~) getCharToProcess::closest_dist#12 [phi:getCharToProcess::@10->getCharToProcess::@2#2] -- register_copy + //SEG237 [121] phi (byte) getCharToProcess::x#2 = (byte) getCharToProcess::x#1 [phi:getCharToProcess::@10->getCharToProcess::@2#3] -- register_copy jmp b2 - //SEG241 getCharToProcess::@12 + //SEG238 getCharToProcess::@12 b12: - //SEG242 [144] (byte~) getCharToProcess::return_dist#6 ← (byte) getCharToProcess::closest_dist#2 -- vbuz1=vbuz2 + //SEG239 [144] (byte~) getCharToProcess::return_dist#6 ← (byte) getCharToProcess::closest_dist#2 -- vbuz1=vbuz2 lda closest_dist sta return_dist_6 jmp b3_from_b12 - //SEG243 getCharToProcess::@11 + //SEG240 getCharToProcess::@11 b11: - //SEG244 [145] (byte~) getCharToProcess::return_dist#5 ← (byte) getCharToProcess::closest_dist#2 -- vbuz1=vbuz2 + //SEG241 [145] (byte~) getCharToProcess::return_dist#5 ← (byte) getCharToProcess::closest_dist#2 -- vbuz1=vbuz2 lda closest_dist sta return_dist_5 jmp b3_from_b11 } -//SEG245 setupRasterIrq +//SEG242 setupRasterIrq // Setup Raster IRQ setupRasterIrq: { .label irqRoutine = irqTop - //SEG246 asm { sei } + //SEG243 asm { sei } sei - //SEG247 [147] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 -- _deref_pbuc1=vbuc2 + //SEG244 [147] *((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 - //SEG248 [148] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 -- _deref_pbuc1=vbuc2 + //SEG245 [148] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 -- _deref_pbuc1=vbuc2 lda #PROCPORT_RAM_IO sta PROCPORT - //SEG249 [149] *((const byte*) CIA1_INTERRUPT#0) ← (const byte) CIA_INTERRUPT_CLEAR#0 -- _deref_pbuc1=vbuc2 + //SEG246 [149] *((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 - //SEG250 setupRasterIrq::@1 + //SEG247 setupRasterIrq::@1 b1: - //SEG251 [150] *((const byte*) VIC_CONTROL#0) ← *((const byte*) VIC_CONTROL#0) & (byte) $7f -- _deref_pbuc1=_deref_pbuc1_band_vbuc2 + //SEG248 [150] *((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 - //SEG252 setupRasterIrq::@2 + //SEG249 setupRasterIrq::@2 b2: - //SEG253 [151] *((const byte*) RASTER#0) ← <(const byte) RASTER_IRQ_TOP#0 -- _deref_pbuc1=vbuc2 + //SEG250 [151] *((const byte*) RASTER#0) ← <(const byte) RASTER_IRQ_TOP#0 -- _deref_pbuc1=vbuc2 lda #RASTER_IRQ_TOP sta RASTER - //SEG254 [152] *((const byte*) IRQ_ENABLE#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 + //SEG251 [152] *((const byte*) IRQ_ENABLE#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 // Enable Raster Interrupt lda #IRQ_RASTER sta IRQ_ENABLE - //SEG255 [153] *((const void()**) HARDWARE_IRQ#0) ← (const void()*) setupRasterIrq::irqRoutine#0 -- _deref_pptc1=pprc2 + //SEG252 [153] *((const void()**) HARDWARE_IRQ#0) ← (const void()*) setupRasterIrq::irqRoutine#0 -- _deref_pptc1=pprc2 // Set the IRQ routine lda #irqRoutine sta HARDWARE_IRQ+1 - //SEG256 asm { cli } + //SEG253 asm { cli } cli jmp breturn - //SEG257 setupRasterIrq::@return + //SEG254 setupRasterIrq::@return breturn: - //SEG258 [155] return + //SEG255 [155] return rts } -//SEG259 initSprites +//SEG256 initSprites // Initialize sprites initSprites: { .label sp = $18 .label i = $1a - //SEG260 [157] phi from initSprites to initSprites::@1 [phi:initSprites->initSprites::@1] + //SEG257 [157] phi from initSprites to initSprites::@1 [phi:initSprites->initSprites::@1] b1_from_initSprites: - //SEG261 [157] phi (byte*) initSprites::sp#2 = (const byte*) SPRITE_DATA#0 [phi:initSprites->initSprites::@1#0] -- pbuz1=pbuc1 + //SEG258 [157] phi (byte*) initSprites::sp#2 = (const byte*) SPRITE_DATA#0 [phi:initSprites->initSprites::@1#0] -- pbuz1=pbuc1 lda #SPRITE_DATA sta sp+1 jmp b1 // Clear sprite data - //SEG262 [157] phi from initSprites::@1 to initSprites::@1 [phi:initSprites::@1->initSprites::@1] + //SEG259 [157] phi from initSprites::@1 to initSprites::@1 [phi:initSprites::@1->initSprites::@1] b1_from_b1: - //SEG263 [157] phi (byte*) initSprites::sp#2 = (byte*) initSprites::sp#1 [phi:initSprites::@1->initSprites::@1#0] -- register_copy + //SEG260 [157] phi (byte*) initSprites::sp#2 = (byte*) initSprites::sp#1 [phi:initSprites::@1->initSprites::@1#0] -- register_copy jmp b1 - //SEG264 initSprites::@1 + //SEG261 initSprites::@1 b1: - //SEG265 [158] *((byte*) initSprites::sp#2) ← (byte) 0 -- _deref_pbuz1=vbuc1 + //SEG262 [158] *((byte*) initSprites::sp#2) ← (byte) 0 -- _deref_pbuz1=vbuc1 lda #0 ldy #0 sta (sp),y - //SEG266 [159] (byte*) initSprites::sp#1 ← ++ (byte*) initSprites::sp#2 -- pbuz1=_inc_pbuz1 + //SEG263 [159] (byte*) initSprites::sp#1 ← ++ (byte*) initSprites::sp#2 -- pbuz1=_inc_pbuz1 inc sp bne !+ inc sp+1 !: - //SEG267 [160] if((byte*) initSprites::sp#1<(const byte*) SPRITE_DATA#0+(const byte) NUM_PROCESSING#0*(byte) $40) goto initSprites::@1 -- pbuz1_lt_pbuc1_then_la1 + //SEG264 [160] if((byte*) initSprites::sp#1<(const byte*) SPRITE_DATA#0+(const byte) NUM_PROCESSING#0*(byte) $40) goto initSprites::@1 -- pbuz1_lt_pbuc1_then_la1 lda sp+1 cmp #>SPRITE_DATA+NUM_PROCESSING*$40 bcc b1_from_b1 @@ -6825,696 +6341,641 @@ initSprites: { cmp #initSprites::@2] + //SEG265 [161] phi from initSprites::@1 to initSprites::@2 [phi:initSprites::@1->initSprites::@2] b2_from_b1: - //SEG269 [161] phi (byte) initSprites::i#2 = (byte) 0 [phi:initSprites::@1->initSprites::@2#0] -- vbuz1=vbuc1 + //SEG266 [161] phi (byte) initSprites::i#2 = (byte) 0 [phi:initSprites::@1->initSprites::@2#0] -- vbuz1=vbuc1 lda #0 sta i jmp b2 // Initialize sprite registers - //SEG270 [161] phi from initSprites::@2 to initSprites::@2 [phi:initSprites::@2->initSprites::@2] + //SEG267 [161] phi from initSprites::@2 to initSprites::@2 [phi:initSprites::@2->initSprites::@2] b2_from_b2: - //SEG271 [161] phi (byte) initSprites::i#2 = (byte) initSprites::i#1 [phi:initSprites::@2->initSprites::@2#0] -- register_copy + //SEG268 [161] phi (byte) initSprites::i#2 = (byte) initSprites::i#1 [phi:initSprites::@2->initSprites::@2#0] -- register_copy jmp b2 - //SEG272 initSprites::@2 + //SEG269 initSprites::@2 b2: - //SEG273 [162] *((const byte*) SPRITES_COLS#0 + (byte) initSprites::i#2) ← (const byte) LIGHT_BLUE#0 -- pbuc1_derefidx_vbuz1=vbuc2 + //SEG270 [162] *((const byte*) SPRITES_COLS#0 + (byte) initSprites::i#2) ← (const byte) LIGHT_BLUE#0 -- pbuc1_derefidx_vbuz1=vbuc2 lda #LIGHT_BLUE ldy i sta SPRITES_COLS,y - //SEG274 [163] (byte) initSprites::i#1 ← ++ (byte) initSprites::i#2 -- vbuz1=_inc_vbuz1 + //SEG271 [163] (byte) initSprites::i#1 ← ++ (byte) initSprites::i#2 -- vbuz1=_inc_vbuz1 inc i - //SEG275 [164] if((byte) initSprites::i#1!=(byte) 8) goto initSprites::@2 -- vbuz1_neq_vbuc1_then_la1 + //SEG272 [164] if((byte) initSprites::i#1!=(byte) 8) goto initSprites::@2 -- vbuz1_neq_vbuc1_then_la1 lda #8 cmp i bne b2_from_b2 jmp b3 - //SEG276 initSprites::@3 + //SEG273 initSprites::@3 b3: - //SEG277 [165] *((const byte*) SPRITES_MC#0) ← (byte) 0 -- _deref_pbuc1=vbuc2 + //SEG274 [165] *((const byte*) SPRITES_MC#0) ← (byte) 0 -- _deref_pbuc1=vbuc2 lda #0 sta SPRITES_MC - //SEG278 [166] *((const byte*) SPRITES_EXPAND_X#0) ← (byte) 0 -- _deref_pbuc1=vbuc2 + //SEG275 [166] *((const byte*) SPRITES_EXPAND_X#0) ← (byte) 0 -- _deref_pbuc1=vbuc2 lda #0 sta SPRITES_EXPAND_X - //SEG279 [167] *((const byte*) SPRITES_EXPAND_Y#0) ← (byte) 0 -- _deref_pbuc1=vbuc2 + //SEG276 [167] *((const byte*) SPRITES_EXPAND_Y#0) ← (byte) 0 -- _deref_pbuc1=vbuc2 lda #0 sta SPRITES_EXPAND_Y jmp breturn - //SEG280 initSprites::@return + //SEG277 initSprites::@return breturn: - //SEG281 [168] return + //SEG278 [168] return rts } -//SEG282 init_dist_screen -// Populates 1000 bytes (a screen) with values representing the distance to the center. -// The actual value stored is distance*2 to increase precision -// init_dist_screen(byte* zeropage($1c) screen) -init_dist_screen: { - .label _5 = $20 - .label _7 = $20 - .label _13 = $23 - .label _15 = $23 - .label screen = $1c - .label screen_bottomline = $1e - .label y2 = $84 - .label yd = $20 - .label yds = $87 - .label x2 = $89 - .label xd = $23 - .label xds = $8c - .label ds = $8e - .label d = $93 - .label x = $21 - .label xb = $22 - .label screen_topline = $1c +//SEG279 init_angle_screen +// Populates 1000 bytes (a screen) with values representing the angle to the center. +// Utilizes symmetry around the center +// init_angle_screen(byte* zeropage($38) screen) +init_angle_screen: { + .label _2 = $87 + .label _3 = $88 + .label _6 = $8b + .label _10 = $96 + .label _12 = $99 + .label _13 = $9a + .label _14 = $9b + .label screen = $38 + .label screen_topline = $1e + .label screen_bottomline = $1c + .label xw = $89 + .label yw = $8c + .label angle_w = $94 + .label ang_w = $98 + .label x = $20 + .label xb = $21 .label y = $1b - //SEG283 [170] call init_squares - //SEG284 [241] phi from init_dist_screen to init_squares [phi:init_dist_screen->init_squares] - init_squares_from_init_dist_screen: - jsr init_squares - jmp b10 - //SEG285 init_dist_screen::@10 - b10: - //SEG286 [171] (byte*) init_dist_screen::screen_bottomline#0 ← (byte*) init_dist_screen::screen#0 + (word)(number) $28*(number) $18 -- pbuz1=pbuz2_plus_vwuc1 + //SEG280 [169] (byte*) init_angle_screen::screen_topline#0 ← (byte*) init_angle_screen::screen#0 + (word)(number) $28*(number) $c -- pbuz1=pbuz2_plus_vwuc1 lda screen clc - adc #<$28*$18 + adc #<$28*$c + sta screen_topline + lda screen+1 + adc #>$28*$c + sta screen_topline+1 + //SEG281 [170] (byte*) init_angle_screen::screen_bottomline#0 ← (byte*) init_angle_screen::screen#0 + (word)(number) $28*(number) $c -- pbuz1=pbuz2_plus_vwuc1 + lda screen + clc + adc #<$28*$c sta screen_bottomline lda screen+1 - adc #>$28*$18 + adc #>$28*$c sta screen_bottomline+1 - //SEG287 [172] phi from init_dist_screen::@10 to init_dist_screen::@1 [phi:init_dist_screen::@10->init_dist_screen::@1] - b1_from_b10: - //SEG288 [172] phi (byte*) init_dist_screen::screen_bottomline#10 = (byte*) init_dist_screen::screen_bottomline#0 [phi:init_dist_screen::@10->init_dist_screen::@1#0] -- register_copy - //SEG289 [172] phi (byte*) init_dist_screen::screen_topline#10 = (byte*) init_dist_screen::screen#0 [phi:init_dist_screen::@10->init_dist_screen::@1#1] -- register_copy - //SEG290 [172] phi (byte) init_dist_screen::y#10 = (byte) 0 [phi:init_dist_screen::@10->init_dist_screen::@1#2] -- vbuz1=vbuc1 + //SEG282 [171] phi from init_angle_screen to init_angle_screen::@1 [phi:init_angle_screen->init_angle_screen::@1] + b1_from_init_angle_screen: + //SEG283 [171] phi (byte*) init_angle_screen::screen_topline#5 = (byte*) init_angle_screen::screen_topline#0 [phi:init_angle_screen->init_angle_screen::@1#0] -- register_copy + //SEG284 [171] phi (byte*) init_angle_screen::screen_bottomline#5 = (byte*) init_angle_screen::screen_bottomline#0 [phi:init_angle_screen->init_angle_screen::@1#1] -- register_copy + //SEG285 [171] phi (byte) init_angle_screen::y#4 = (byte) 0 [phi:init_angle_screen->init_angle_screen::@1#2] -- vbuz1=vbuc1 lda #0 sta y jmp b1 - //SEG291 [172] phi from init_dist_screen::@9 to init_dist_screen::@1 [phi:init_dist_screen::@9->init_dist_screen::@1] - b1_from_b9: - //SEG292 [172] phi (byte*) init_dist_screen::screen_bottomline#10 = (byte*) init_dist_screen::screen_bottomline#1 [phi:init_dist_screen::@9->init_dist_screen::@1#0] -- register_copy - //SEG293 [172] phi (byte*) init_dist_screen::screen_topline#10 = (byte*) init_dist_screen::screen_topline#1 [phi:init_dist_screen::@9->init_dist_screen::@1#1] -- register_copy - //SEG294 [172] phi (byte) init_dist_screen::y#10 = (byte) init_dist_screen::y#1 [phi:init_dist_screen::@9->init_dist_screen::@1#2] -- register_copy + //SEG286 [171] phi from init_angle_screen::@3 to init_angle_screen::@1 [phi:init_angle_screen::@3->init_angle_screen::@1] + b1_from_b3: + //SEG287 [171] phi (byte*) init_angle_screen::screen_topline#5 = (byte*) init_angle_screen::screen_topline#1 [phi:init_angle_screen::@3->init_angle_screen::@1#0] -- register_copy + //SEG288 [171] phi (byte*) init_angle_screen::screen_bottomline#5 = (byte*) init_angle_screen::screen_bottomline#1 [phi:init_angle_screen::@3->init_angle_screen::@1#1] -- register_copy + //SEG289 [171] phi (byte) init_angle_screen::y#4 = (byte) init_angle_screen::y#1 [phi:init_angle_screen::@3->init_angle_screen::@1#2] -- register_copy jmp b1 - //SEG295 init_dist_screen::@1 + //SEG290 init_angle_screen::@1 b1: - //SEG296 [173] (byte) init_dist_screen::y2#0 ← (byte) init_dist_screen::y#10 << (byte) 1 -- vbuz1=vbuz2_rol_1 - lda y - asl - sta y2 - //SEG297 [174] if((byte) init_dist_screen::y2#0>=(byte) $18) goto init_dist_screen::@2 -- vbuz1_ge_vbuc1_then_la1 - lda y2 - cmp #$18 - bcs b2 - jmp b3 - //SEG298 init_dist_screen::@3 - b3: - //SEG299 [175] (byte~) init_dist_screen::$5 ← (byte) $18 - (byte) init_dist_screen::y2#0 -- vbuz1=vbuc1_minus_vbuz2 - lda #$18 - sec - sbc y2 - sta _5 - //SEG300 [176] phi from init_dist_screen::@2 init_dist_screen::@3 to init_dist_screen::@4 [phi:init_dist_screen::@2/init_dist_screen::@3->init_dist_screen::@4] - b4_from_b2: - b4_from_b3: - //SEG301 [176] phi (byte) init_dist_screen::yd#0 = (byte~) init_dist_screen::$7 [phi:init_dist_screen::@2/init_dist_screen::@3->init_dist_screen::@4#0] -- register_copy - jmp b4 - //SEG302 init_dist_screen::@4 - b4: - //SEG303 [177] (byte) sqr::val#0 ← (byte) init_dist_screen::yd#0 -- vbuz1=vbuz2 - lda yd - sta sqr.val - //SEG304 [178] call sqr - //SEG305 [237] phi from init_dist_screen::@4 to sqr [phi:init_dist_screen::@4->sqr] - sqr_from_b4: - //SEG306 [237] phi (byte) sqr::val#2 = (byte) sqr::val#0 [phi:init_dist_screen::@4->sqr#0] -- register_copy - jsr sqr - //SEG307 [179] (word) sqr::return#2 ← (word) sqr::return#0 -- vwuz1=vwuz2 - lda sqr.return - sta sqr.return_2 - lda sqr.return+1 - sta sqr.return_2+1 - jmp b11 - //SEG308 init_dist_screen::@11 - b11: - //SEG309 [180] (word) init_dist_screen::yds#0 ← (word) sqr::return#2 -- vwuz1=vwuz2 - lda sqr.return_2 - sta yds - lda sqr.return_2+1 - sta yds+1 - //SEG310 [181] phi from init_dist_screen::@11 to init_dist_screen::@5 [phi:init_dist_screen::@11->init_dist_screen::@5] - b5_from_b11: - //SEG311 [181] phi (byte) init_dist_screen::xb#2 = (byte) $27 [phi:init_dist_screen::@11->init_dist_screen::@5#0] -- vbuz1=vbuc1 + //SEG291 [172] phi from init_angle_screen::@1 to init_angle_screen::@2 [phi:init_angle_screen::@1->init_angle_screen::@2] + b2_from_b1: + //SEG292 [172] phi (byte) init_angle_screen::xb#2 = (byte) $27 [phi:init_angle_screen::@1->init_angle_screen::@2#0] -- vbuz1=vbuc1 lda #$27 sta xb - //SEG312 [181] phi (byte) init_dist_screen::x#2 = (byte) 0 [phi:init_dist_screen::@11->init_dist_screen::@5#1] -- vbuz1=vbuc1 + //SEG293 [172] phi (byte) init_angle_screen::x#2 = (byte) 0 [phi:init_angle_screen::@1->init_angle_screen::@2#1] -- vbuz1=vbuc1 lda #0 sta x - jmp b5 - //SEG313 [181] phi from init_dist_screen::@13 to init_dist_screen::@5 [phi:init_dist_screen::@13->init_dist_screen::@5] - b5_from_b13: - //SEG314 [181] phi (byte) init_dist_screen::xb#2 = (byte) init_dist_screen::xb#1 [phi:init_dist_screen::@13->init_dist_screen::@5#0] -- register_copy - //SEG315 [181] phi (byte) init_dist_screen::x#2 = (byte) init_dist_screen::x#1 [phi:init_dist_screen::@13->init_dist_screen::@5#1] -- register_copy - jmp b5 - //SEG316 init_dist_screen::@5 - b5: - //SEG317 [182] (byte) init_dist_screen::x2#0 ← (byte) init_dist_screen::x#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 + jmp b2 + //SEG294 [172] phi from init_angle_screen::@4 to init_angle_screen::@2 [phi:init_angle_screen::@4->init_angle_screen::@2] + b2_from_b4: + //SEG295 [172] phi (byte) init_angle_screen::xb#2 = (byte) init_angle_screen::xb#1 [phi:init_angle_screen::@4->init_angle_screen::@2#0] -- register_copy + //SEG296 [172] phi (byte) init_angle_screen::x#2 = (byte) init_angle_screen::x#1 [phi:init_angle_screen::@4->init_angle_screen::@2#1] -- register_copy + jmp b2 + //SEG297 init_angle_screen::@2 + b2: + //SEG298 [173] (byte~) init_angle_screen::$2 ← (byte) init_angle_screen::x#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 lda x asl - sta x2 - //SEG318 [183] if((byte) init_dist_screen::x2#0>=(byte) $27) goto init_dist_screen::@6 -- vbuz1_ge_vbuc1_then_la1 - lda x2 - cmp #$27 - bcs b6 - jmp b7 - //SEG319 init_dist_screen::@7 - b7: - //SEG320 [184] (byte~) init_dist_screen::$13 ← (byte) $27 - (byte) init_dist_screen::x2#0 -- vbuz1=vbuc1_minus_vbuz2 + sta _2 + //SEG299 [174] (byte~) init_angle_screen::$3 ← (byte) $27 - (byte~) init_angle_screen::$2 -- vbuz1=vbuc1_minus_vbuz2 lda #$27 sec - sbc x2 - sta _13 - //SEG321 [185] phi from init_dist_screen::@6 init_dist_screen::@7 to init_dist_screen::@8 [phi:init_dist_screen::@6/init_dist_screen::@7->init_dist_screen::@8] - b8_from_b6: - b8_from_b7: - //SEG322 [185] phi (byte) init_dist_screen::xd#0 = (byte~) init_dist_screen::$15 [phi:init_dist_screen::@6/init_dist_screen::@7->init_dist_screen::@8#0] -- register_copy - jmp b8 - //SEG323 init_dist_screen::@8 - b8: - //SEG324 [186] (byte) sqr::val#1 ← (byte) init_dist_screen::xd#0 -- vbuz1=vbuz2 - lda xd - sta sqr.val - //SEG325 [187] call sqr - //SEG326 [237] phi from init_dist_screen::@8 to sqr [phi:init_dist_screen::@8->sqr] - sqr_from_b8: - //SEG327 [237] phi (byte) sqr::val#2 = (byte) sqr::val#1 [phi:init_dist_screen::@8->sqr#0] -- register_copy - jsr sqr - //SEG328 [188] (word) sqr::return#3 ← (word) sqr::return#0 -- vwuz1=vwuz2 - lda sqr.return - sta sqr.return_3 - lda sqr.return+1 - sta sqr.return_3+1 - jmp b12 - //SEG329 init_dist_screen::@12 - b12: - //SEG330 [189] (word) init_dist_screen::xds#0 ← (word) sqr::return#3 -- vwuz1=vwuz2 - lda sqr.return_3 - sta xds - lda sqr.return_3+1 - sta xds+1 - //SEG331 [190] (word) init_dist_screen::ds#0 ← (word) init_dist_screen::xds#0 + (word) init_dist_screen::yds#0 -- vwuz1=vwuz2_plus_vwuz3 - lda xds + sbc _2 + sta _3 + //SEG300 [175] (word) init_angle_screen::xw#0 ← (byte~) init_angle_screen::$3 w= (byte) 0 -- vwuz1=vbuz2_word_vbuc1 + lda _3 + ldy #0 + sta xw+1 + sty xw + //SEG301 [176] (byte~) init_angle_screen::$6 ← (byte) init_angle_screen::y#4 << (byte) 1 -- vbuz1=vbuz2_rol_1 + lda y + asl + sta _6 + //SEG302 [177] (word) init_angle_screen::yw#0 ← (byte~) init_angle_screen::$6 w= (byte) 0 -- vwuz1=vbuz2_word_vbuc1 + lda _6 + ldy #0 + sta yw+1 + sty yw + //SEG303 [178] (signed word) atan2_16::x#0 ← (signed word)(word) init_angle_screen::xw#0 -- vwsz1=vwsz2 + lda xw + sta atan2_16.x + lda xw+1 + sta atan2_16.x+1 + //SEG304 [179] (signed word) atan2_16::y#0 ← (signed word)(word) init_angle_screen::yw#0 -- vwsz1=vwsz2 + lda yw + sta atan2_16.y + lda yw+1 + sta atan2_16.y+1 + //SEG305 [180] call atan2_16 + jsr atan2_16 + //SEG306 [181] (word) atan2_16::return#2 ← (word) atan2_16::return#0 -- vwuz1=vwuz2 + lda atan2_16.return + sta atan2_16.return_2 + lda atan2_16.return+1 + sta atan2_16.return_2+1 + jmp b4 + //SEG307 init_angle_screen::@4 + b4: + //SEG308 [182] (word) init_angle_screen::angle_w#0 ← (word) atan2_16::return#2 -- vwuz1=vwuz2 + lda atan2_16.return_2 + sta angle_w + lda atan2_16.return_2+1 + sta angle_w+1 + //SEG309 [183] (word~) init_angle_screen::$10 ← (word) init_angle_screen::angle_w#0 + (byte) $80 -- vwuz1=vwuz2_plus_vbuc1 + lda #$80 clc - adc yds - sta ds - lda xds+1 - adc yds+1 - sta ds+1 - //SEG332 [191] (word) sqrt::val#0 ← (word) init_dist_screen::ds#0 -- vwuz1=vwuz2 - lda ds - sta sqrt.val - lda ds+1 - sta sqrt.val+1 - //SEG333 [192] call sqrt - jsr sqrt - //SEG334 [193] (byte) sqrt::return#2 ← (byte) sqrt::return#0 -- vbuz1=vbuz2 - lda sqrt.return - sta sqrt.return_2 - jmp b13 - //SEG335 init_dist_screen::@13 - b13: - //SEG336 [194] (byte) init_dist_screen::d#0 ← (byte) sqrt::return#2 -- vbuz1=vbuz2 - lda sqrt.return_2 - sta d - //SEG337 [195] *((byte*) init_dist_screen::screen_topline#10 + (byte) init_dist_screen::x#2) ← (byte) init_dist_screen::d#0 -- pbuz1_derefidx_vbuz2=vbuz3 - lda d - ldy x - sta (screen_topline),y - //SEG338 [196] *((byte*) init_dist_screen::screen_bottomline#10 + (byte) init_dist_screen::x#2) ← (byte) init_dist_screen::d#0 -- pbuz1_derefidx_vbuz2=vbuz3 - lda d - ldy x - sta (screen_bottomline),y - //SEG339 [197] *((byte*) init_dist_screen::screen_topline#10 + (byte) init_dist_screen::xb#2) ← (byte) init_dist_screen::d#0 -- pbuz1_derefidx_vbuz2=vbuz3 - lda d - ldy xb - sta (screen_topline),y - //SEG340 [198] *((byte*) init_dist_screen::screen_bottomline#10 + (byte) init_dist_screen::xb#2) ← (byte) init_dist_screen::d#0 -- pbuz1_derefidx_vbuz2=vbuz3 - lda d + adc angle_w + sta _10 + lda #0 + adc angle_w+1 + sta _10+1 + //SEG310 [184] (byte) init_angle_screen::ang_w#0 ← > (word~) init_angle_screen::$10 -- vbuz1=_hi_vwuz2 + lda _10+1 + sta ang_w + //SEG311 [185] *((byte*) init_angle_screen::screen_bottomline#5 + (byte) init_angle_screen::xb#2) ← (byte) init_angle_screen::ang_w#0 -- pbuz1_derefidx_vbuz2=vbuz3 + lda ang_w ldy xb sta (screen_bottomline),y - //SEG341 [199] (byte) init_dist_screen::x#1 ← ++ (byte) init_dist_screen::x#2 -- vbuz1=_inc_vbuz1 + //SEG312 [186] (byte~) init_angle_screen::$12 ← - (byte) init_angle_screen::ang_w#0 -- vbuz1=_neg_vbuz2 + lda ang_w + eor #$ff + clc + adc #1 + sta _12 + //SEG313 [187] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::xb#2) ← (byte~) init_angle_screen::$12 -- pbuz1_derefidx_vbuz2=vbuz3 + lda _12 + ldy xb + sta (screen_topline),y + //SEG314 [188] (byte~) init_angle_screen::$13 ← (byte) $80 + (byte) init_angle_screen::ang_w#0 -- vbuz1=vbuc1_plus_vbuz2 + lax ang_w + axs #-[$80] + stx _13 + //SEG315 [189] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$13 -- pbuz1_derefidx_vbuz2=vbuz3 + lda _13 + ldy x + sta (screen_topline),y + //SEG316 [190] (byte~) init_angle_screen::$14 ← (byte) $80 - (byte) init_angle_screen::ang_w#0 -- vbuz1=vbuc1_minus_vbuz2 + lda #$80 + sec + sbc ang_w + sta _14 + //SEG317 [191] *((byte*) init_angle_screen::screen_bottomline#5 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$14 -- pbuz1_derefidx_vbuz2=vbuz3 + lda _14 + ldy x + sta (screen_bottomline),y + //SEG318 [192] (byte) init_angle_screen::x#1 ← ++ (byte) init_angle_screen::x#2 -- vbuz1=_inc_vbuz1 inc x - //SEG342 [200] (byte) init_dist_screen::xb#1 ← -- (byte) init_dist_screen::xb#2 -- vbuz1=_dec_vbuz1 + //SEG319 [193] (byte) init_angle_screen::xb#1 ← -- (byte) init_angle_screen::xb#2 -- vbuz1=_dec_vbuz1 dec xb - //SEG343 [201] if((byte) init_dist_screen::x#1<(byte) $13+(byte) 1) goto init_dist_screen::@5 -- vbuz1_lt_vbuc1_then_la1 + //SEG320 [194] if((byte) init_angle_screen::x#1<(byte) $13+(byte) 1) goto init_angle_screen::@2 -- vbuz1_lt_vbuc1_then_la1 lda x cmp #$13+1 - bcc b5_from_b13 - jmp b9 - //SEG344 init_dist_screen::@9 - b9: - //SEG345 [202] (byte*) init_dist_screen::screen_topline#1 ← (byte*) init_dist_screen::screen_topline#10 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 - lda #$28 - clc - adc screen_topline - sta screen_topline - bcc !+ - inc screen_topline+1 - !: - //SEG346 [203] (byte*) init_dist_screen::screen_bottomline#1 ← (byte*) init_dist_screen::screen_bottomline#10 - (byte) $28 -- pbuz1=pbuz1_minus_vwuc1 - lda screen_bottomline + bcc b2_from_b4 + jmp b3 + //SEG321 init_angle_screen::@3 + b3: + //SEG322 [195] (byte*) init_angle_screen::screen_topline#1 ← (byte*) init_angle_screen::screen_topline#5 - (byte) $28 -- pbuz1=pbuz1_minus_vwuc1 + lda screen_topline sec sbc #<$28 - sta screen_bottomline - lda screen_bottomline+1 + sta screen_topline + lda screen_topline+1 sbc #>$28 - sta screen_bottomline+1 - //SEG347 [204] (byte) init_dist_screen::y#1 ← ++ (byte) init_dist_screen::y#10 -- vbuz1=_inc_vbuz1 + sta screen_topline+1 + //SEG323 [196] (byte*) init_angle_screen::screen_bottomline#1 ← (byte*) init_angle_screen::screen_bottomline#5 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 + lda #$28 + clc + adc screen_bottomline + sta screen_bottomline + bcc !+ + inc screen_bottomline+1 + !: + //SEG324 [197] (byte) init_angle_screen::y#1 ← ++ (byte) init_angle_screen::y#4 -- vbuz1=_inc_vbuz1 inc y - //SEG348 [205] if((byte) init_dist_screen::y#1!=(byte) $d) goto init_dist_screen::@1 -- vbuz1_neq_vbuc1_then_la1 + //SEG325 [198] if((byte) init_angle_screen::y#1!=(byte) $d) goto init_angle_screen::@1 -- vbuz1_neq_vbuc1_then_la1 lda #$d cmp y - bne b1_from_b9 + bne b1_from_b3 jmp breturn - //SEG349 init_dist_screen::@return + //SEG326 init_angle_screen::@return breturn: - //SEG350 [206] return + //SEG327 [199] return rts - //SEG351 init_dist_screen::@6 - b6: - //SEG352 [207] (byte~) init_dist_screen::$15 ← (byte) init_dist_screen::x2#0 - (byte) $27 -- vbuz1=vbuz2_minus_vbuc1 - lax x2 - axs #$27 - stx _15 - jmp b8_from_b6 - //SEG353 init_dist_screen::@2 - b2: - //SEG354 [208] (byte~) init_dist_screen::$7 ← (byte) init_dist_screen::y2#0 - (byte) $18 -- vbuz1=vbuz2_minus_vbuc1 - lax y2 - axs #$18 - stx _7 - jmp b4_from_b2 } -//SEG355 sqrt -// Find the (integer) square root of a word value -// If the square is not an integer then it returns the largest integer N where N*N <= val -// Uses a table of squares that must be initialized by calling init_squares() -// sqrt(word zeropage($90) val) -sqrt: { - .label _1 = $9c - .label _3 = $9a - .label found = $98 - .label return = $9e - .label val = $90 +//SEG328 atan2_16 +// Find the atan2(x, y) - which is the angle of the line from (0,0) to (x,y) +// Finding the angle requires a binary search using CORDIC_ITERATIONS_16 +// Returns the angle in hex-degrees (0=0, 0x8000=PI, 0x10000=2*PI) +// atan2_16(signed word zeropage($8e) x, signed word zeropage($90) y) +atan2_16: { + .label _2 = $22 + .label _7 = $24 + .label _23 = $9d + .label _24 = $9c + .label yi = $22 + .label xi = $24 + .label angle = $29 + .label xd = $2e + .label yd = $2c + .label shift = $2b + .label angle_2 = $27 + .label angle_3 = $27 + .label i = $26 + .label return = $29 + .label x = $8e + .label y = $90 .label return_2 = $92 - //SEG356 [209] (word) bsearch16u::key#0 ← (word) sqrt::val#0 -- vwuz1=vwuz2 - lda val - sta bsearch16u.key - lda val+1 - sta bsearch16u.key+1 - //SEG357 [210] (word*) bsearch16u::items#1 ← (word*)(void*) SQUARES#1 -- pwuz1=pwuz2 - lda SQUARES - sta bsearch16u.items - lda SQUARES+1 - sta bsearch16u.items+1 - //SEG358 [211] call bsearch16u - //SEG359 [218] phi from sqrt to bsearch16u [phi:sqrt->bsearch16u] - bsearch16u_from_sqrt: - jsr bsearch16u - //SEG360 [212] (word*) bsearch16u::return#3 ← (word*) bsearch16u::return#1 -- pwuz1=pwuz2 - lda bsearch16u.return - sta bsearch16u.return_3 - lda bsearch16u.return+1 - sta bsearch16u.return_3+1 - jmp b1 - //SEG361 sqrt::@1 - b1: - //SEG362 [213] (word*) sqrt::found#0 ← (word*) bsearch16u::return#3 -- pwuz1=pwuz2 - lda bsearch16u.return_3 - sta found - lda bsearch16u.return_3+1 - sta found+1 - //SEG363 [214] (word~) sqrt::$3 ← (word*) sqrt::found#0 - (word*)(void*) SQUARES#1 -- vwuz1=pwuz2_minus_pwuz3 - lda found + .label angle_6 = $27 + .label angle_12 = $27 + .label angle_13 = $27 + //SEG329 [200] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 -- vwsz1_ge_0_then_la1 + lda y+1 + bpl b1 + jmp b2 + //SEG330 atan2_16::@2 + b2: + //SEG331 [201] (signed word~) atan2_16::$2 ← - (signed word) atan2_16::y#0 -- vwsz1=_neg_vwsz2 sec - sbc SQUARES - sta _3 - lda found+1 - sbc SQUARES+1 - sta _3+1 - //SEG364 [215] (word~) sqrt::$1 ← (word~) sqrt::$3 >> (byte) 1 -- vwuz1=vwuz2_ror_1 - lda _3+1 - lsr - sta _1+1 - lda _3 - ror - sta _1 - //SEG365 [216] (byte) sqrt::return#0 ← (byte)(word~) sqrt::$1 -- vbuz1=_byte_vwuz2 - lda _1 - sta return - jmp breturn - //SEG366 sqrt::@return - breturn: - //SEG367 [217] return - rts -} -//SEG368 bsearch16u -// Searches an array of nitems unsigned words, the initial member of which is pointed to by base, for a member that matches the value key. -// - key - The value to look for -// - items - Pointer to the start of the array to search in -// - num - The number of items in the array -// Returns pointer to an entry in the array that matches the search key -// bsearch16u(word zeropage($94) key, word* zeropage($24) items, byte zeropage($26) num) -bsearch16u: { - .label _2 = $24 - .label _6 = $9f - .label _16 = $a0 - .label pivot = $a1 - .label result = $a3 - .label return = $24 - .label num = $26 - .label items = $24 - .label key = $94 - .label return_3 = $96 - //SEG369 [219] phi from bsearch16u to bsearch16u::@3 [phi:bsearch16u->bsearch16u::@3] - b3_from_bsearch16u: - //SEG370 [219] phi (word*) bsearch16u::items#2 = (word*) bsearch16u::items#1 [phi:bsearch16u->bsearch16u::@3#0] -- register_copy - //SEG371 [219] phi (byte) bsearch16u::num#3 = (const byte) NUM_SQUARES#3 [phi:bsearch16u->bsearch16u::@3#1] -- vbuz1=vbuc1 - lda #NUM_SQUARES - sta num - jmp b3 - //SEG372 bsearch16u::@3 - b3: - //SEG373 [220] if((byte) bsearch16u::num#3>(byte) 0) goto bsearch16u::@4 -- vbuz1_gt_0_then_la1 - lda num - bne b4 - jmp b5 - //SEG374 bsearch16u::@5 - b5: - //SEG375 [221] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@2 -- _deref_pwuz1_le_vwuz2_then_la1 - ldy #1 - lda (items),y - cmp key+1 - bne !+ - dey - lda (items),y - cmp key - beq b2_from_b5 - !: - bcc b2_from_b5 - jmp b1 - //SEG376 bsearch16u::@1 - b1: - //SEG377 [222] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#2 - (byte) 1*(const byte) SIZEOF_WORD -- pwuz1=pwuz1_minus_vwuc1 - lda _2 - sec - sbc #<1*SIZEOF_WORD + lda #0 + sbc y sta _2 - lda _2+1 - sbc #>1*SIZEOF_WORD + lda #0 + sbc y+1 sta _2+1 - //SEG378 [223] phi from bsearch16u::@1 bsearch16u::@5 to bsearch16u::@2 [phi:bsearch16u::@1/bsearch16u::@5->bsearch16u::@2] - b2_from_b1: - b2_from_b5: - //SEG379 [223] phi (word*) bsearch16u::return#2 = (word*~) bsearch16u::$2 [phi:bsearch16u::@1/bsearch16u::@5->bsearch16u::@2#0] -- register_copy - jmp b2 - //SEG380 bsearch16u::@2 - b2: - //SEG381 [224] phi from bsearch16u::@2 bsearch16u::@8 to bsearch16u::@return [phi:bsearch16u::@2/bsearch16u::@8->bsearch16u::@return] - breturn_from_b2: - breturn_from_b8: - //SEG382 [224] phi (word*) bsearch16u::return#1 = (word*) bsearch16u::return#2 [phi:bsearch16u::@2/bsearch16u::@8->bsearch16u::@return#0] -- register_copy - jmp breturn - //SEG383 bsearch16u::@return - breturn: - //SEG384 [225] return - rts - //SEG385 bsearch16u::@4 - b4: - //SEG386 [226] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#3 >> (byte) 1 -- vbuz1=vbuz2_ror_1 - lda num - lsr - sta _6 - //SEG387 [227] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1 -- vbuz1=vbuz2_rol_1 - lda _6 - asl - sta _16 - //SEG388 [228] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#2 + (byte~) bsearch16u::$16 -- pwuz1=pwuz2_plus_vbuz3 - lda _16 - clc - adc items - sta pivot - lda #0 - adc items+1 - sta pivot+1 - //SEG389 [229] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0) -- vwsz1=vwsz2_minus__deref_pwsz3 - sec - lda key - ldy #0 - sbc (pivot),y - sta result - lda key+1 - iny - sbc (pivot),y - sta result+1 - //SEG390 [230] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6 -- vwsz1_neq_0_then_la1 - lda result+1 - bne b6 - lda result - bne b6 - jmp b8 - //SEG391 bsearch16u::@8 - b8: - //SEG392 [231] (word*~) bsearch16u::return#6 ← (word*) bsearch16u::pivot#0 -- pwuz1=pwuz2 - lda pivot - sta return - lda pivot+1 - sta return+1 - jmp breturn_from_b8 - //SEG393 bsearch16u::@6 - b6: - //SEG394 [232] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@7 -- vwsz1_le_0_then_la1 - lda result+1 - bmi b7_from_b6 - bne !+ - lda result - beq b7_from_b6 - !: - jmp b9 - //SEG395 bsearch16u::@9 - b9: - //SEG396 [233] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD -- pwuz1=pwuz2_plus_vbuc1 - lda #1*SIZEOF_WORD - clc - adc pivot - sta items - lda #0 - adc pivot+1 - sta items+1 - //SEG397 [234] (byte) bsearch16u::num#1 ← -- (byte) bsearch16u::num#3 -- vbuz1=_dec_vbuz1 - dec num - //SEG398 [235] phi from bsearch16u::@6 bsearch16u::@9 to bsearch16u::@7 [phi:bsearch16u::@6/bsearch16u::@9->bsearch16u::@7] - b7_from_b6: - b7_from_b9: - //SEG399 [235] phi (word*) bsearch16u::items#8 = (word*) bsearch16u::items#2 [phi:bsearch16u::@6/bsearch16u::@9->bsearch16u::@7#0] -- register_copy - //SEG400 [235] phi (byte) bsearch16u::num#5 = (byte) bsearch16u::num#3 [phi:bsearch16u::@6/bsearch16u::@9->bsearch16u::@7#1] -- register_copy - jmp b7 - //SEG401 bsearch16u::@7 - b7: - //SEG402 [236] (byte) bsearch16u::num#0 ← (byte) bsearch16u::num#5 >> (byte) 1 -- vbuz1=vbuz1_ror_1 - lsr num - //SEG403 [219] phi from bsearch16u::@7 to bsearch16u::@3 [phi:bsearch16u::@7->bsearch16u::@3] - b3_from_b7: - //SEG404 [219] phi (word*) bsearch16u::items#2 = (word*) bsearch16u::items#8 [phi:bsearch16u::@7->bsearch16u::@3#0] -- register_copy - //SEG405 [219] phi (byte) bsearch16u::num#3 = (byte) bsearch16u::num#0 [phi:bsearch16u::@7->bsearch16u::@3#1] -- register_copy + //SEG332 [202] phi from atan2_16::@1 atan2_16::@2 to atan2_16::@3 [phi:atan2_16::@1/atan2_16::@2->atan2_16::@3] + b3_from_b1: + b3_from_b2: + //SEG333 [202] phi (signed word) atan2_16::yi#0 = (signed word~) atan2_16::yi#16 [phi:atan2_16::@1/atan2_16::@2->atan2_16::@3#0] -- register_copy jmp b3 -} -//SEG406 sqr -// Find the square of a byte value -// Uses a table of squares that must be initialized by calling init_squares() -// sqr(byte zeropage($27) val) -sqr: { - .label _0 = $a5 - .label return = $a6 - .label val = $27 - .label return_2 = $85 - .label return_3 = $8a - //SEG407 [238] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 - lda val - asl - sta _0 - //SEG408 [239] (word) sqr::return#0 ← *((word*)(void*) SQUARES#1 + (byte~) sqr::$0) -- vwuz1=pwuz2_derefidx_vbuz3 - ldy _0 - lda (SQUARES),y - sta return - iny - lda (SQUARES),y - sta return+1 - jmp breturn - //SEG409 sqr::@return - breturn: - //SEG410 [240] return - rts -} -//SEG411 init_squares -// Initialize squares table -// Uses iterative formula (x+1)^2 = x^2 + 2*x + 1 -init_squares: { - .label _3 = $aa - .label _4 = $ab - .label squares = $2a - .label sqr = $28 - .label i = $2c - //SEG412 [242] call malloc - //SEG413 [254] phi from init_squares to malloc [phi:init_squares->malloc] - malloc_from_init_squares: - //SEG414 [254] phi (word) malloc::size#3 = (const byte) NUM_SQUARES#3*(const byte) SIZEOF_WORD [phi:init_squares->malloc#0] -- vwuz1=vbuc1 - lda #NUM_SQUARES*SIZEOF_WORD - sta malloc.size + //SEG334 atan2_16::@3 + b3: + //SEG335 [203] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4 -- vwsz1_ge_0_then_la1 + lda x+1 + bpl b4 + jmp b5 + //SEG336 atan2_16::@5 + b5: + //SEG337 [204] (signed word~) atan2_16::$7 ← - (signed word) atan2_16::x#0 -- vwsz1=_neg_vwsz2 + sec lda #0 - sta malloc.size+1 - //SEG415 [254] phi (byte*) heap_head#12 = (byte*) heap_head#1 [phi:init_squares->malloc#1] -- register_copy - jsr malloc - jmp b2 - //SEG416 init_squares::@2 - b2: - //SEG417 [243] (void*) SQUARES#1 ← (void*)(byte*) malloc::mem#0 -- pvoz1=pvoz2 - lda malloc.mem - sta SQUARES - lda malloc.mem+1 - sta SQUARES+1 - //SEG418 [244] (word*) init_squares::squares#0 ← (word*)(void*) SQUARES#1 -- pwuz1=pwuz2 - lda SQUARES - sta squares - lda SQUARES+1 - sta squares+1 - //SEG419 [245] phi from init_squares::@2 to init_squares::@1 [phi:init_squares::@2->init_squares::@1] - b1_from_b2: - //SEG420 [245] phi (byte) init_squares::i#2 = (byte) 0 [phi:init_squares::@2->init_squares::@1#0] -- vbuz1=vbuc1 + sbc x + sta _7 + lda #0 + sbc x+1 + sta _7+1 + //SEG338 [205] phi from atan2_16::@4 atan2_16::@5 to atan2_16::@6 [phi:atan2_16::@4/atan2_16::@5->atan2_16::@6] + b6_from_b4: + b6_from_b5: + //SEG339 [205] phi (signed word) atan2_16::xi#0 = (signed word~) atan2_16::xi#13 [phi:atan2_16::@4/atan2_16::@5->atan2_16::@6#0] -- register_copy + jmp b6 + //SEG340 atan2_16::@6 + b6: + //SEG341 [206] phi from atan2_16::@6 to atan2_16::@10 [phi:atan2_16::@6->atan2_16::@10] + b10_from_b6: + //SEG342 [206] phi (word) atan2_16::angle#12 = (byte) 0 [phi:atan2_16::@6->atan2_16::@10#0] -- vwuz1=vbuc1 + lda #0 + sta angle_12 + lda #0 + sta angle_12+1 + //SEG343 [206] phi (byte) atan2_16::i#2 = (byte) 0 [phi:atan2_16::@6->atan2_16::@10#1] -- vbuz1=vbuc1 lda #0 sta i - //SEG421 [245] phi (word*) init_squares::squares#2 = (word*) init_squares::squares#0 [phi:init_squares::@2->init_squares::@1#1] -- register_copy - //SEG422 [245] phi (word) init_squares::sqr#2 = (byte) 0 [phi:init_squares::@2->init_squares::@1#2] -- vwuz1=vbuc1 + //SEG344 [206] phi (signed word) atan2_16::xi#3 = (signed word) atan2_16::xi#0 [phi:atan2_16::@6->atan2_16::@10#2] -- register_copy + //SEG345 [206] phi (signed word) atan2_16::yi#3 = (signed word) atan2_16::yi#0 [phi:atan2_16::@6->atan2_16::@10#3] -- register_copy + jmp b10 + //SEG346 atan2_16::@10 + b10: + //SEG347 [207] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@11 -- vwsz1_neq_0_then_la1 + lda yi+1 + bne b11 + lda yi + bne b11 + //SEG348 [208] phi from atan2_16::@10 atan2_16::@19 to atan2_16::@12 [phi:atan2_16::@10/atan2_16::@19->atan2_16::@12] + b12_from_b10: + b12_from_b19: + //SEG349 [208] phi (word) atan2_16::angle#6 = (word) atan2_16::angle#12 [phi:atan2_16::@10/atan2_16::@19->atan2_16::@12#0] -- register_copy + jmp b12 + //SEG350 atan2_16::@12 + b12: + //SEG351 [209] (word) atan2_16::angle#1 ← (word) atan2_16::angle#6 >> (byte) 1 -- vwuz1=vwuz2_ror_1 + lda angle_6+1 + lsr + sta angle+1 + lda angle_6 + ror + sta angle + //SEG352 [210] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7 -- vwsz1_ge_0_then_la1 + lda x+1 + bpl b7_from_b12 + jmp b21 + //SEG353 atan2_16::@21 + b21: + //SEG354 [211] (word) atan2_16::angle#4 ← (word) $8000 - (word) atan2_16::angle#1 -- vwuz1=vwuc1_minus_vwuz1 + sec + lda #<$8000 + sbc angle + sta angle + lda #>$8000 + sbc angle+1 + sta angle+1 + //SEG355 [212] phi from atan2_16::@12 atan2_16::@21 to atan2_16::@7 [phi:atan2_16::@12/atan2_16::@21->atan2_16::@7] + b7_from_b12: + b7_from_b21: + //SEG356 [212] phi (word) atan2_16::angle#11 = (word) atan2_16::angle#1 [phi:atan2_16::@12/atan2_16::@21->atan2_16::@7#0] -- register_copy + jmp b7 + //SEG357 atan2_16::@7 + b7: + //SEG358 [213] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8 -- vwsz1_ge_0_then_la1 + lda y+1 + bpl b8_from_b7 + jmp b9 + //SEG359 atan2_16::@9 + b9: + //SEG360 [214] (word) atan2_16::angle#5 ← - (word) atan2_16::angle#11 -- vwuz1=_neg_vwuz1 + sec lda #0 - sta sqr + sbc angle + sta angle lda #0 - sta sqr+1 - jmp b1 - //SEG423 [245] phi from init_squares::@1 to init_squares::@1 [phi:init_squares::@1->init_squares::@1] - b1_from_b1: - //SEG424 [245] phi (byte) init_squares::i#2 = (byte) init_squares::i#1 [phi:init_squares::@1->init_squares::@1#0] -- register_copy - //SEG425 [245] phi (word*) init_squares::squares#2 = (word*) init_squares::squares#1 [phi:init_squares::@1->init_squares::@1#1] -- register_copy - //SEG426 [245] phi (word) init_squares::sqr#2 = (word) init_squares::sqr#1 [phi:init_squares::@1->init_squares::@1#2] -- register_copy - jmp b1 - //SEG427 init_squares::@1 - b1: - //SEG428 [246] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 -- _deref_pwuz1=vwuz2 - ldy #0 - lda sqr - sta (squares),y - iny - lda sqr+1 - sta (squares),y - //SEG429 [247] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD -- pwuz1=pwuz1_plus_vbuc1 - lda #SIZEOF_WORD + sbc angle+1 + sta angle+1 + //SEG361 [215] phi from atan2_16::@7 atan2_16::@9 to atan2_16::@8 [phi:atan2_16::@7/atan2_16::@9->atan2_16::@8] + b8_from_b7: + b8_from_b9: + //SEG362 [215] phi (word) atan2_16::return#0 = (word) atan2_16::angle#11 [phi:atan2_16::@7/atan2_16::@9->atan2_16::@8#0] -- register_copy + jmp b8 + //SEG363 atan2_16::@8 + b8: + jmp breturn + //SEG364 atan2_16::@return + breturn: + //SEG365 [216] return + rts + //SEG366 atan2_16::@11 + b11: + //SEG367 [217] (byte~) atan2_16::shift#5 ← (byte) atan2_16::i#2 -- vbuz1=vbuz2 + lda i + sta shift + //SEG368 [218] (signed word~) atan2_16::xd#10 ← (signed word) atan2_16::xi#3 -- vwsz1=vwsz2 + lda xi + sta xd + lda xi+1 + sta xd+1 + //SEG369 [219] (signed word~) atan2_16::yd#10 ← (signed word) atan2_16::yi#3 -- vwsz1=vwsz2 + lda yi + sta yd + lda yi+1 + sta yd+1 + //SEG370 [220] phi from atan2_16::@11 atan2_16::@14 to atan2_16::@13 [phi:atan2_16::@11/atan2_16::@14->atan2_16::@13] + b13_from_b11: + b13_from_b14: + //SEG371 [220] phi (signed word) atan2_16::yd#3 = (signed word~) atan2_16::yd#10 [phi:atan2_16::@11/atan2_16::@14->atan2_16::@13#0] -- register_copy + //SEG372 [220] phi (signed word) atan2_16::xd#3 = (signed word~) atan2_16::xd#10 [phi:atan2_16::@11/atan2_16::@14->atan2_16::@13#1] -- register_copy + //SEG373 [220] phi (byte) atan2_16::shift#2 = (byte~) atan2_16::shift#5 [phi:atan2_16::@11/atan2_16::@14->atan2_16::@13#2] -- register_copy + jmp b13 + //SEG374 atan2_16::@13 + b13: + //SEG375 [221] if((byte) atan2_16::shift#2>=(byte) 2) goto atan2_16::@14 -- vbuz1_ge_vbuc1_then_la1 + lda shift + cmp #2 + bcs b14 + jmp b15 + //SEG376 atan2_16::@15 + b15: + //SEG377 [222] if((byte) 0==(byte) atan2_16::shift#2) goto atan2_16::@17 -- vbuc1_eq_vbuz1_then_la1 + lda #0 + cmp shift + beq b17_from_b15 + jmp b16 + //SEG378 atan2_16::@16 + b16: + //SEG379 [223] (signed word) atan2_16::xd#2 ← (signed word) atan2_16::xd#3 >> (signed byte) 1 -- vwsz1=vwsz1_ror_1 + lda xd+1 + cmp #$80 + ror xd+1 + ror xd + //SEG380 [224] (signed word) atan2_16::yd#2 ← (signed word) atan2_16::yd#3 >> (signed byte) 1 -- vwsz1=vwsz1_ror_1 + lda yd+1 + cmp #$80 + ror yd+1 + ror yd + //SEG381 [225] phi from atan2_16::@15 atan2_16::@16 to atan2_16::@17 [phi:atan2_16::@15/atan2_16::@16->atan2_16::@17] + b17_from_b15: + b17_from_b16: + //SEG382 [225] phi (signed word) atan2_16::xd#5 = (signed word) atan2_16::xd#3 [phi:atan2_16::@15/atan2_16::@16->atan2_16::@17#0] -- register_copy + //SEG383 [225] phi (signed word) atan2_16::yd#5 = (signed word) atan2_16::yd#3 [phi:atan2_16::@15/atan2_16::@16->atan2_16::@17#1] -- register_copy + jmp b17 + //SEG384 atan2_16::@17 + b17: + //SEG385 [226] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@18 -- vwsz1_ge_0_then_la1 + lda yi+1 + bpl b18 + jmp b20 + //SEG386 atan2_16::@20 + b20: + //SEG387 [227] (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#3 - (signed word) atan2_16::yd#5 -- vwsz1=vwsz1_minus_vwsz2 + lda xi + sec + sbc yd + sta xi + lda xi+1 + sbc yd+1 + sta xi+1 + //SEG388 [228] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#5 -- vwsz1=vwsz1_plus_vwsz2 + lda yi clc - adc squares - sta squares - bcc !+ - inc squares+1 - !: - //SEG430 [248] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 + adc xd + sta yi + lda yi+1 + adc xd+1 + sta yi+1 + //SEG389 [229] (byte~) atan2_16::$24 ← (byte) atan2_16::i#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 lda i asl - sta _3 - //SEG431 [249] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 -- vbuz1=vbuz2_plus_1 - ldy _3 - iny - sty _4 - //SEG432 [250] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 -- vwuz1=vwuz1_plus_vbuz2 - lda _4 - clc - adc sqr - sta sqr - bcc !+ - inc sqr+1 - !: - //SEG433 [251] (byte) init_squares::i#1 ← ++ (byte) init_squares::i#2 -- vbuz1=_inc_vbuz1 + sta _24 + //SEG390 [230] (word) atan2_16::angle#3 ← (word) atan2_16::angle#12 - *((const word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16#0 + (byte~) atan2_16::$24) -- vwuz1=vwuz1_minus_pwuc1_derefidx_vbuz2 + ldy _24 + sec + lda angle_3 + sbc CORDIC_ATAN2_ANGLES_16,y + sta angle_3 + lda angle_3+1 + sbc CORDIC_ATAN2_ANGLES_16+1,y + sta angle_3+1 + //SEG391 [231] phi from atan2_16::@18 atan2_16::@20 to atan2_16::@19 [phi:atan2_16::@18/atan2_16::@20->atan2_16::@19] + b19_from_b18: + b19_from_b20: + //SEG392 [231] phi (signed word) atan2_16::xi#8 = (signed word) atan2_16::xi#1 [phi:atan2_16::@18/atan2_16::@20->atan2_16::@19#0] -- register_copy + //SEG393 [231] phi (word) atan2_16::angle#13 = (word) atan2_16::angle#2 [phi:atan2_16::@18/atan2_16::@20->atan2_16::@19#1] -- register_copy + //SEG394 [231] phi (signed word) atan2_16::yi#8 = (signed word) atan2_16::yi#1 [phi:atan2_16::@18/atan2_16::@20->atan2_16::@19#2] -- register_copy + jmp b19 + //SEG395 atan2_16::@19 + b19: + //SEG396 [232] (byte) atan2_16::i#1 ← ++ (byte) atan2_16::i#2 -- vbuz1=_inc_vbuz1 inc i - //SEG434 [252] if((byte) init_squares::i#1!=(const byte) NUM_SQUARES#3-(byte) 1+(byte) 1) goto init_squares::@1 -- vbuz1_neq_vbuc1_then_la1 - lda #NUM_SQUARES-1+1 + //SEG397 [233] if((byte) atan2_16::i#1==(const byte) CORDIC_ITERATIONS_16#0-(byte) 1+(byte) 1) goto atan2_16::@12 -- vbuz1_eq_vbuc1_then_la1 + lda #CORDIC_ITERATIONS_16-1+1 cmp i - bne b1_from_b1 - jmp breturn - //SEG435 init_squares::@return - breturn: - //SEG436 [253] return - rts + beq b12_from_b19 + //SEG398 [206] phi from atan2_16::@19 to atan2_16::@10 [phi:atan2_16::@19->atan2_16::@10] + b10_from_b19: + //SEG399 [206] phi (word) atan2_16::angle#12 = (word) atan2_16::angle#13 [phi:atan2_16::@19->atan2_16::@10#0] -- register_copy + //SEG400 [206] phi (byte) atan2_16::i#2 = (byte) atan2_16::i#1 [phi:atan2_16::@19->atan2_16::@10#1] -- register_copy + //SEG401 [206] phi (signed word) atan2_16::xi#3 = (signed word) atan2_16::xi#8 [phi:atan2_16::@19->atan2_16::@10#2] -- register_copy + //SEG402 [206] phi (signed word) atan2_16::yi#3 = (signed word) atan2_16::yi#8 [phi:atan2_16::@19->atan2_16::@10#3] -- register_copy + jmp b10 + //SEG403 atan2_16::@18 + b18: + //SEG404 [234] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#5 -- vwsz1=vwsz1_plus_vwsz2 + lda xi + clc + adc yd + sta xi + lda xi+1 + adc yd+1 + sta xi+1 + //SEG405 [235] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#5 -- vwsz1=vwsz1_minus_vwsz2 + lda yi + sec + sbc xd + sta yi + lda yi+1 + sbc xd+1 + sta yi+1 + //SEG406 [236] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 + lda i + asl + sta _23 + //SEG407 [237] (word) atan2_16::angle#2 ← (word) atan2_16::angle#12 + *((const word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16#0 + (byte~) atan2_16::$23) -- vwuz1=vwuz1_plus_pwuc1_derefidx_vbuz2 + ldy _23 + clc + lda angle_2 + adc CORDIC_ATAN2_ANGLES_16,y + sta angle_2 + lda angle_2+1 + adc CORDIC_ATAN2_ANGLES_16+1,y + sta angle_2+1 + jmp b19_from_b18 + //SEG408 atan2_16::@14 + b14: + //SEG409 [238] (signed word) atan2_16::xd#1 ← (signed word) atan2_16::xd#3 >> (signed byte) 2 -- vwsz1=vwsz1_ror_2 + lda xd+1 + cmp #$80 + ror xd+1 + ror xd + lda xd+1 + cmp #$80 + ror xd+1 + ror xd + //SEG410 [239] (signed word) atan2_16::yd#1 ← (signed word) atan2_16::yd#3 >> (signed byte) 2 -- vwsz1=vwsz1_ror_2 + lda yd+1 + cmp #$80 + ror yd+1 + ror yd + lda yd+1 + cmp #$80 + ror yd+1 + ror yd + //SEG411 [240] (byte) atan2_16::shift#1 ← (byte) atan2_16::shift#2 - (byte) 2 -- vbuz1=vbuz1_minus_2 + dec shift + dec shift + jmp b13_from_b14 + //SEG412 atan2_16::@4 + b4: + //SEG413 [241] (signed word~) atan2_16::xi#13 ← (signed word) atan2_16::x#0 -- vwsz1=vwsz2 + lda x + sta xi + lda x+1 + sta xi+1 + jmp b6_from_b4 + //SEG414 atan2_16::@1 + b1: + //SEG415 [242] (signed word~) atan2_16::yi#16 ← (signed word) atan2_16::y#0 -- vwsz1=vwsz2 + lda y + sta yi + lda y+1 + sta yi+1 + jmp b3_from_b1 } -//SEG437 malloc +//SEG416 malloc // Allocates a block of size bytes of memory, returning a pointer to the beginning of the block. // The content of the newly allocated block of memory is not initialized, remaining with indeterminate values. -// malloc(word zeropage($2f) size) malloc: { - .label mem = $ac - .label size = $2f - //SEG438 [255] (byte*) malloc::mem#0 ← (byte*) heap_head#12 -- pbuz1=pbuz2 + .label mem = $9e + //SEG417 [244] (byte*) malloc::mem#0 ← (byte*) heap_head#5 -- pbuz1=pbuz2 lda heap_head sta mem lda heap_head+1 sta mem+1 - //SEG439 [256] (byte*) heap_head#1 ← (byte*) heap_head#12 + (word) malloc::size#3 -- pbuz1=pbuz1_plus_vwuz2 - lda heap_head + //SEG418 [245] (byte*) heap_head#1 ← (byte*) heap_head#5 + (word) $3e8 -- pbuz1=pbuz1_plus_vwuc1 clc - adc size + lda heap_head + adc #<$3e8 sta heap_head lda heap_head+1 - adc size+1 + adc #>$3e8 sta heap_head+1 jmp breturn - //SEG440 malloc::@return + //SEG419 malloc::@return breturn: - //SEG441 [257] return + //SEG420 [246] return rts } -//SEG442 irqBottom +//SEG421 irqBottom // Raster Interrupt at the bottom of the screen irqBottom: { - //SEG443 entry interrupt(HARDWARE_ALL) + //SEG422 entry interrupt(HARDWARE_ALL) sta rega+1 stx regx+1 sty regy+1 - //SEG444 [259] phi from irqBottom to irqBottom::@1 [phi:irqBottom->irqBottom::@1] + //SEG423 [248] phi from irqBottom to irqBottom::@1 [phi:irqBottom->irqBottom::@1] b1_from_irqBottom: jmp b1 - //SEG445 irqBottom::@1 + //SEG424 irqBottom::@1 b1: - //SEG446 [260] call processChars - //SEG447 [265] phi from irqBottom::@1 to processChars [phi:irqBottom::@1->processChars] + //SEG425 [249] call processChars + //SEG426 [254] phi from irqBottom::@1 to processChars [phi:irqBottom::@1->processChars] processChars_from_b1: jsr processChars jmp b2 - //SEG448 irqBottom::@2 + //SEG427 irqBottom::@2 b2: - //SEG449 [261] *((const byte*) RASTER#0) ← (const byte) RASTER_IRQ_TOP#0 -- _deref_pbuc1=vbuc2 + //SEG428 [250] *((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 - //SEG450 [262] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_ALL)(void()) irqTop() -- _deref_pptc1=pprc2 + //SEG429 [251] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_ALL)(void()) irqTop() -- _deref_pptc1=pprc2 lda #irqTop sta HARDWARE_IRQ+1 - //SEG451 [263] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 + //SEG430 [252] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 // Acknowledge the IRQ lda #IRQ_RASTER sta IRQ_STATUS jmp breturn - //SEG452 irqBottom::@return + //SEG431 irqBottom::@return breturn: - //SEG453 [264] return - exit interrupt(HARDWARE_ALL) + //SEG432 [253] return - exit interrupt(HARDWARE_ALL) rega: lda #00 regx: @@ -7523,72 +6984,72 @@ irqBottom: { ldy #00 rti } -//SEG454 processChars +//SEG433 processChars // Process any chars in the PROCESSING array processChars: { - .label _11 = $b8 - .label _12 = $b9 - .label _14 = $bb - .label _15 = $bc - .label _17 = $ba - .label _25 = $bf - .label _26 = $c1 - .label _30 = $c4 - .label _33 = $c7 - .label _37 = $b2 - .label _38 = $c3 - .label _39 = $c6 - .label processing = $b3 - .label bitmask = $b5 - .label i = $31 - .label xpos = $b6 - .label ypos = $be - .label xchar = $c2 - .label ychar = $c5 - .label numActive = $32 - .label _67 = $ae - .label _68 = $af - .label _69 = $b0 - .label _70 = $b1 - //SEG455 [266] phi from processChars to processChars::@1 [phi:processChars->processChars::@1] + .label _11 = $aa + .label _12 = $ab + .label _14 = $ad + .label _15 = $ae + .label _17 = $ac + .label _25 = $b1 + .label _26 = $b3 + .label _30 = $b6 + .label _33 = $b9 + .label _37 = $a4 + .label _38 = $b5 + .label _39 = $b8 + .label processing = $a5 + .label bitmask = $a7 + .label i = $32 + .label xpos = $a8 + .label ypos = $b0 + .label xchar = $b4 + .label ychar = $b7 + .label numActive = $33 + .label _67 = $a0 + .label _68 = $a1 + .label _69 = $a2 + .label _70 = $a3 + //SEG434 [255] phi from processChars to processChars::@1 [phi:processChars->processChars::@1] b1_from_processChars: - //SEG456 [266] phi (byte) processChars::numActive#10 = (byte) 0 [phi:processChars->processChars::@1#0] -- vbuz1=vbuc1 + //SEG435 [255] phi (byte) processChars::numActive#10 = (byte) 0 [phi:processChars->processChars::@1#0] -- vbuz1=vbuc1 lda #0 sta numActive - //SEG457 [266] phi (byte) processChars::i#10 = (byte) 0 [phi:processChars->processChars::@1#1] -- vbuz1=vbuc1 + //SEG436 [255] phi (byte) processChars::i#10 = (byte) 0 [phi:processChars->processChars::@1#1] -- vbuz1=vbuc1 lda #0 sta i jmp b1 - //SEG458 [266] phi from processChars::@2 to processChars::@1 [phi:processChars::@2->processChars::@1] + //SEG437 [255] phi from processChars::@2 to processChars::@1 [phi:processChars::@2->processChars::@1] b1_from_b2: - //SEG459 [266] phi (byte) processChars::numActive#10 = (byte) processChars::numActive#3 [phi:processChars::@2->processChars::@1#0] -- register_copy - //SEG460 [266] phi (byte) processChars::i#10 = (byte) processChars::i#1 [phi:processChars::@2->processChars::@1#1] -- register_copy + //SEG438 [255] phi (byte) processChars::numActive#10 = (byte) processChars::numActive#3 [phi:processChars::@2->processChars::@1#0] -- register_copy + //SEG439 [255] phi (byte) processChars::i#10 = (byte) processChars::i#1 [phi:processChars::@2->processChars::@1#1] -- register_copy jmp b1 - //SEG461 processChars::@1 + //SEG440 processChars::@1 b1: - //SEG462 [267] (byte) processChars::$67 ← (byte) processChars::i#10 << (byte) 1 -- vbuz1=vbuz2_rol_1 + //SEG441 [256] (byte) processChars::$67 ← (byte) processChars::i#10 << (byte) 1 -- vbuz1=vbuz2_rol_1 lda i asl sta _67 - //SEG463 [268] (byte) processChars::$68 ← (byte) processChars::$67 + (byte) processChars::i#10 -- vbuz1=vbuz2_plus_vbuz3 + //SEG442 [257] (byte) processChars::$68 ← (byte) processChars::$67 + (byte) processChars::i#10 -- vbuz1=vbuz2_plus_vbuz3 lda _67 clc adc i sta _68 - //SEG464 [269] (byte) processChars::$69 ← (byte) processChars::$68 << (byte) 1 -- vbuz1=vbuz2_rol_1 + //SEG443 [258] (byte) processChars::$69 ← (byte) processChars::$68 << (byte) 1 -- vbuz1=vbuz2_rol_1 lda _68 asl sta _69 - //SEG465 [270] (byte) processChars::$70 ← (byte) processChars::$69 + (byte) processChars::i#10 -- vbuz1=vbuz2_plus_vbuz3 + //SEG444 [259] (byte) processChars::$70 ← (byte) processChars::$69 + (byte) processChars::i#10 -- vbuz1=vbuz2_plus_vbuz3 lda _69 clc adc i sta _70 - //SEG466 [271] (byte~) processChars::$37 ← (byte) processChars::$70 << (byte) 1 -- vbuz1=vbuz2_rol_1 + //SEG445 [260] (byte~) processChars::$37 ← (byte) processChars::$70 << (byte) 1 -- vbuz1=vbuz2_rol_1 lda _70 asl sta _37 - //SEG467 [272] (struct ProcessingSprite*) processChars::processing#0 ← (const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (byte~) processChars::$37 -- pssz1=pssc1_plus_vbuz2 + //SEG446 [261] (struct ProcessingSprite*) processChars::processing#0 ← (const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (byte~) processChars::$37 -- pssz1=pssc1_plus_vbuz2 lda _37 clc adc #PROCESSING adc #0 sta processing+1 - //SEG468 [273] (byte) processChars::bitmask#0 ← (byte) 1 << *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID) -- vbuz1=vbuc1_rol_pbuz2_derefidx_vbuc2 + //SEG447 [262] (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 @@ -7609,23 +7070,23 @@ processChars: { bne !- !e: sta bitmask - //SEG469 [274] if(*((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS)==(const byte) STATUS_FREE) goto processChars::@2 -- pbuz1_derefidx_vbuc1_eq_vbuc2_then_la1 + //SEG448 [263] if(*((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS)==(const byte) STATUS_FREE) goto processChars::@2 -- pbuz1_derefidx_vbuc1_eq_vbuc2_then_la1 ldy #OFFSET_STRUCT_PROCESSINGSPRITE_STATUS lda (processing),y cmp #STATUS_FREE beq b2_from_b1 jmp b10 - //SEG470 processChars::@10 + //SEG449 processChars::@10 b10: - //SEG471 [275] if(*((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS)!=(const byte) STATUS_NEW) goto processChars::@3 -- pbuz1_derefidx_vbuc1_neq_vbuc2_then_la1 + //SEG450 [264] if(*((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS)!=(const byte) STATUS_NEW) goto processChars::@3 -- pbuz1_derefidx_vbuc1_neq_vbuc2_then_la1 ldy #OFFSET_STRUCT_PROCESSINGSPRITE_STATUS lda (processing),y cmp #STATUS_NEW bne b3 jmp b11 - //SEG472 processChars::@11 + //SEG451 processChars::@11 b11: - //SEG473 [276] *(*((byte**)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR)) ← (byte) ' ' -- _deref_pptz1_derefidx_vbuc1=vbuc2 + //SEG452 [265] *(*((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 @@ -7637,12 +7098,12 @@ processChars: { txa !: sta $ffff - //SEG474 [277] *((const byte*) SPRITES_ENABLE#0) ← *((const byte*) SPRITES_ENABLE#0) | (byte) processChars::bitmask#0 -- _deref_pbuc1=_deref_pbuc1_bor_vbuz1 + //SEG453 [266] *((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 - //SEG475 [278] *((const byte*) SPRITES_COLS#0 + *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID)) ← *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_COL) -- pbuc1_derefidx_pbuz1_derefidx_vbuc2=pbuz1_derefidx_vbuc3 + //SEG454 [267] *((const byte*) SPRITES_COLS#0 + *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID)) ← *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_COL) -- pbuc1_derefidx_pbuz1_derefidx_vbuc2=pbuz1_derefidx_vbuc3 // Set the sprite color ldy #OFFSET_STRUCT_PROCESSINGSPRITE_COL lda (processing),y @@ -7652,7 +7113,7 @@ processChars: { tay pla sta SPRITES_COLS,y - //SEG476 [279] *((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 + //SEG455 [268] *((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 @@ -7662,15 +7123,15 @@ processChars: { tay pla sta SCREEN+SPRITE_PTRS,y - //SEG477 [280] *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) ← (const byte) STATUS_PROCESSING -- pbuz1_derefidx_vbuc1=vbuc2 + //SEG456 [269] *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) ← (const byte) STATUS_PROCESSING -- pbuz1_derefidx_vbuc1=vbuc2 // Set status lda #STATUS_PROCESSING ldy #OFFSET_STRUCT_PROCESSINGSPRITE_STATUS sta (processing),y jmp b3 - //SEG478 processChars::@3 + //SEG457 processChars::@3 b3: - //SEG479 [281] (word) processChars::xpos#0 ← *((word*)(struct ProcessingSprite*) processChars::processing#0) >> (byte) 4 -- vwuz1=_deref_pwuz2_ror_4 + //SEG458 [270] (word) processChars::xpos#0 ← *((word*)(struct ProcessingSprite*) processChars::processing#0) >> (byte) 4 -- vwuz1=_deref_pwuz2_ror_4 ldy #0 lda (processing),y sta xpos @@ -7685,40 +7146,40 @@ processChars: { ror xpos lsr xpos+1 ror xpos - //SEG480 [282] (byte~) processChars::$11 ← > (word) processChars::xpos#0 -- vbuz1=_hi_vwuz2 + //SEG459 [271] (byte~) processChars::$11 ← > (word) processChars::xpos#0 -- vbuz1=_hi_vwuz2 lda xpos+1 sta _11 - //SEG481 [283] if((byte) 0!=(byte~) processChars::$11) goto processChars::@4 -- vbuc1_neq_vbuz1_then_la1 + //SEG460 [272] if((byte) 0!=(byte~) processChars::$11) goto processChars::@4 -- vbuc1_neq_vbuz1_then_la1 // Set sprite position lda #0 cmp _11 bne b4 jmp b8 - //SEG482 processChars::@8 + //SEG461 processChars::@8 b8: - //SEG483 [284] (byte~) processChars::$12 ← (byte) $ff ^ (byte) processChars::bitmask#0 -- vbuz1=vbuc1_bxor_vbuz2 + //SEG462 [273] (byte~) processChars::$12 ← (byte) $ff ^ (byte) processChars::bitmask#0 -- vbuz1=vbuc1_bxor_vbuz2 lda #$ff eor bitmask sta _12 - //SEG484 [285] *((const byte*) SPRITES_XMSB#0) ← *((const byte*) SPRITES_XMSB#0) & (byte~) processChars::$12 -- _deref_pbuc1=_deref_pbuc1_band_vbuz1 + //SEG463 [274] *((const byte*) SPRITES_XMSB#0) ← *((const byte*) SPRITES_XMSB#0) & (byte~) processChars::$12 -- _deref_pbuc1=_deref_pbuc1_band_vbuz1 lda SPRITES_XMSB and _12 sta SPRITES_XMSB jmp b5 - //SEG485 processChars::@5 + //SEG464 processChars::@5 b5: - //SEG486 [286] (byte~) processChars::$17 ← (byte) processChars::i#10 << (byte) 1 -- vbuz1=vbuz2_rol_1 + //SEG465 [275] (byte~) processChars::$17 ← (byte) processChars::i#10 << (byte) 1 -- vbuz1=vbuz2_rol_1 lda i asl sta _17 - //SEG487 [287] (byte~) processChars::$14 ← (byte)(word) processChars::xpos#0 -- vbuz1=_byte_vwuz2 + //SEG466 [276] (byte~) processChars::$14 ← (byte)(word) processChars::xpos#0 -- vbuz1=_byte_vwuz2 lda xpos sta _14 - //SEG488 [288] *((const byte*) SPRITES_XPOS#0 + (byte~) processChars::$17) ← (byte~) processChars::$14 -- pbuc1_derefidx_vbuz1=vbuz2 + //SEG467 [277] *((const byte*) SPRITES_XPOS#0 + (byte~) processChars::$17) ← (byte~) processChars::$14 -- pbuc1_derefidx_vbuz1=vbuz2 lda _14 ldy _17 sta SPRITES_XPOS,y - //SEG489 [289] (word~) processChars::$15 ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y) >> (byte) 4 -- vwuz1=pwuz2_derefidx_vbuc1_ror_4 + //SEG468 [278] (word~) processChars::$15 ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y) >> (byte) 4 -- vwuz1=pwuz2_derefidx_vbuc1_ror_4 ldy #OFFSET_STRUCT_PROCESSINGSPRITE_Y lda (processing),y sta _15 @@ -7733,14 +7194,14 @@ processChars: { ror _15 lsr _15+1 ror _15 - //SEG490 [290] (byte) processChars::ypos#0 ← (byte)(word~) processChars::$15 -- vbuz1=_byte_vwuz2 + //SEG469 [279] (byte) processChars::ypos#0 ← (byte)(word~) processChars::$15 -- vbuz1=_byte_vwuz2 lda _15 sta ypos - //SEG491 [291] *((const byte*) SPRITES_YPOS#0 + (byte~) processChars::$17) ← (byte) processChars::ypos#0 -- pbuc1_derefidx_vbuz1=vbuz2 + //SEG470 [280] *((const byte*) SPRITES_YPOS#0 + (byte~) processChars::$17) ← (byte) processChars::ypos#0 -- pbuc1_derefidx_vbuz1=vbuz2 lda ypos ldy _17 sta SPRITES_YPOS,y - //SEG492 [292] if(*((word*)(struct ProcessingSprite*) processChars::processing#0)<(const word) XPOS_LEFTMOST#0) goto processChars::@6 -- _deref_pwuz1_lt_vwuc1_then_la1 + //SEG471 [281] if(*((word*)(struct ProcessingSprite*) processChars::processing#0)<(const word) XPOS_LEFTMOST#0) goto processChars::@6 -- _deref_pwuz1_lt_vwuc1_then_la1 // Move sprite ldy #1 lda (processing),y @@ -7753,9 +7214,9 @@ processChars: { bcc b6 !: jmp b14 - //SEG493 processChars::@14 + //SEG472 processChars::@14 b14: - //SEG494 [293] if(*((word*)(struct ProcessingSprite*) processChars::processing#0)>(const word) XPOS_RIGHTMOST#0) goto processChars::@6 -- _deref_pwuz1_gt_vwuc1_then_la1 + //SEG473 [282] if(*((word*)(struct ProcessingSprite*) processChars::processing#0)>(const word) XPOS_RIGHTMOST#0) goto processChars::@6 -- _deref_pwuz1_gt_vwuc1_then_la1 ldy #1 lda #>XPOS_RIGHTMOST cmp (processing),y @@ -7767,9 +7228,9 @@ processChars: { bcc b6 !: jmp b13 - //SEG495 processChars::@13 + //SEG474 processChars::@13 b13: - //SEG496 [294] if(*((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y)<(const word) YPOS_TOPMOST#0) goto processChars::@6 -- pwuz1_derefidx_vbuc1_lt_vwuc2_then_la1 + //SEG475 [283] if(*((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y)<(const word) YPOS_TOPMOST#0) goto processChars::@6 -- pwuz1_derefidx_vbuc1_lt_vwuc2_then_la1 ldy #OFFSET_STRUCT_PROCESSINGSPRITE_Y iny lda (processing),y @@ -7782,9 +7243,9 @@ processChars: { bcc b6 !: jmp b12 - //SEG497 processChars::@12 + //SEG476 processChars::@12 b12: - //SEG498 [295] if(*((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y)>(const word) YPOS_BOTTOMMOST#0) goto processChars::@6 -- pwuz1_derefidx_vbuc1_gt_vwuc2_then_la1 + //SEG477 [284] if(*((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y)>(const word) YPOS_BOTTOMMOST#0) goto processChars::@6 -- pwuz1_derefidx_vbuc1_gt_vwuc2_then_la1 ldy #OFFSET_STRUCT_PROCESSINGSPRITE_Y iny lda #>YPOS_BOTTOMMOST @@ -7797,9 +7258,9 @@ processChars: { bcc b6 !: jmp b9 - //SEG499 processChars::@9 + //SEG478 processChars::@9 b9: - //SEG500 [296] (word~) processChars::$25 ← (word) processChars::xpos#0 >> (byte) 3 -- vwuz1=vwuz2_ror_3 + //SEG479 [285] (word~) processChars::$25 ← (word) processChars::xpos#0 >> (byte) 3 -- vwuz1=vwuz2_ror_3 lda xpos+1 lsr sta _25+1 @@ -7810,18 +7271,18 @@ processChars: { ror _25 lsr _25+1 ror _25 - //SEG501 [297] (byte~) processChars::$26 ← (byte)(word~) processChars::$25 -- vbuz1=_byte_vwuz2 + //SEG480 [286] (byte~) processChars::$26 ← (byte)(word~) processChars::$25 -- vbuz1=_byte_vwuz2 lda _25 sta _26 - //SEG502 [298] (byte) processChars::xchar#0 ← (byte~) processChars::$26 - (const byte) BORDER_XPOS_LEFT#0/(byte) 8 -- vbuz1=vbuz2_minus_vbuc1 + //SEG481 [287] (byte) processChars::xchar#0 ← (byte~) processChars::$26 - (const byte) BORDER_XPOS_LEFT#0/(byte) 8 -- vbuz1=vbuz2_minus_vbuc1 lax _26 axs #BORDER_XPOS_LEFT/8 stx xchar - //SEG503 [299] (byte~) processChars::$38 ← (byte) processChars::xchar#0 << (byte) 1 -- vbuz1=vbuz2_rol_1 + //SEG482 [288] (byte~) processChars::$38 ← (byte) processChars::xchar#0 << (byte) 1 -- vbuz1=vbuz2_rol_1 lda xchar asl sta _38 - //SEG504 [300] *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX) + *((const word[$28]) VXSIN#0 + (byte~) processChars::$38) -- pwuz1_derefidx_vbuc1=pwuz1_derefidx_vbuc1_plus_pwuc2_derefidx_vbuz2 + //SEG483 [289] *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX) + *((const word[$28]) VXSIN#0 + (byte~) processChars::$38) -- pwuz1_derefidx_vbuc1=pwuz1_derefidx_vbuc1_plus_pwuc2_derefidx_vbuz2 ldx _38 ldy #OFFSET_STRUCT_PROCESSINGSPRITE_VX clc @@ -7832,7 +7293,7 @@ processChars: { lda (processing),y adc VXSIN+1,x sta (processing),y - //SEG505 [301] *((word*)(struct ProcessingSprite*) processChars::processing#0) ← *((word*)(struct ProcessingSprite*) processChars::processing#0) + *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX) -- _deref_pwuz1=_deref_pwuz1_plus_pwuz1_derefidx_vbuc1 + //SEG484 [290] *((word*)(struct ProcessingSprite*) processChars::processing#0) ← *((word*)(struct ProcessingSprite*) processChars::processing#0) + *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX) -- _deref_pwuz1=_deref_pwuz1_plus_pwuz1_derefidx_vbuc1 ldy #OFFSET_STRUCT_PROCESSINGSPRITE_VX sty $ff clc @@ -7846,21 +7307,21 @@ processChars: { ldy #1 adc (processing),y sta (processing),y - //SEG506 [302] (byte~) processChars::$30 ← (byte) processChars::ypos#0 >> (byte) 3 -- vbuz1=vbuz2_ror_3 + //SEG485 [291] (byte~) processChars::$30 ← (byte) processChars::ypos#0 >> (byte) 3 -- vbuz1=vbuz2_ror_3 lda ypos lsr lsr lsr sta _30 - //SEG507 [303] (byte) processChars::ychar#0 ← (byte~) processChars::$30 - (const byte) BORDER_YPOS_TOP#0/(byte) 8 -- vbuz1=vbuz2_minus_vbuc1 + //SEG486 [292] (byte) processChars::ychar#0 ← (byte~) processChars::$30 - (const byte) BORDER_YPOS_TOP#0/(byte) 8 -- vbuz1=vbuz2_minus_vbuc1 lax _30 axs #BORDER_YPOS_TOP/8 stx ychar - //SEG508 [304] (byte~) processChars::$39 ← (byte) processChars::ychar#0 << (byte) 1 -- vbuz1=vbuz2_rol_1 + //SEG487 [293] (byte~) processChars::$39 ← (byte) processChars::ychar#0 << (byte) 1 -- vbuz1=vbuz2_rol_1 lda ychar asl sta _39 - //SEG509 [305] *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY) + *((const word[$19]) VYSIN#0 + (byte~) processChars::$39) -- pwuz1_derefidx_vbuc1=pwuz1_derefidx_vbuc1_plus_pwuc2_derefidx_vbuz2 + //SEG488 [294] *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY) + *((const word[$19]) VYSIN#0 + (byte~) processChars::$39) -- pwuz1_derefidx_vbuc1=pwuz1_derefidx_vbuc1_plus_pwuc2_derefidx_vbuz2 ldx _39 ldy #OFFSET_STRUCT_PROCESSINGSPRITE_VY clc @@ -7871,7 +7332,7 @@ processChars: { lda (processing),y adc VYSIN+1,x sta (processing),y - //SEG510 [306] *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y) + *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY) -- pwuz1_derefidx_vbuc1=pwuz1_derefidx_vbuc1_plus_pwuz1_derefidx_vbuc2 + //SEG489 [295] *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y) + *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY) -- pwuz1_derefidx_vbuc1=pwuz1_derefidx_vbuc1_plus_pwuz1_derefidx_vbuc2 ldy #OFFSET_STRUCT_PROCESSINGSPRITE_VY clc lda (processing),y @@ -7884,80 +7345,80 @@ processChars: { adc (processing),y sta (processing),y jmp b7 - //SEG511 processChars::@7 + //SEG490 processChars::@7 b7: - //SEG512 [307] (byte) processChars::numActive#1 ← ++ (byte) processChars::numActive#10 -- vbuz1=_inc_vbuz1 + //SEG491 [296] (byte) processChars::numActive#1 ← ++ (byte) processChars::numActive#10 -- vbuz1=_inc_vbuz1 inc numActive - //SEG513 [308] phi from processChars::@1 processChars::@7 to processChars::@2 [phi:processChars::@1/processChars::@7->processChars::@2] + //SEG492 [297] phi from processChars::@1 processChars::@7 to processChars::@2 [phi:processChars::@1/processChars::@7->processChars::@2] b2_from_b1: b2_from_b7: - //SEG514 [308] phi (byte) processChars::numActive#3 = (byte) processChars::numActive#10 [phi:processChars::@1/processChars::@7->processChars::@2#0] -- register_copy + //SEG493 [297] phi (byte) processChars::numActive#3 = (byte) processChars::numActive#10 [phi:processChars::@1/processChars::@7->processChars::@2#0] -- register_copy jmp b2 - //SEG515 processChars::@2 + //SEG494 processChars::@2 b2: - //SEG516 [309] (byte) processChars::i#1 ← ++ (byte) processChars::i#10 -- vbuz1=_inc_vbuz1 + //SEG495 [298] (byte) processChars::i#1 ← ++ (byte) processChars::i#10 -- vbuz1=_inc_vbuz1 inc i - //SEG517 [310] if((byte) processChars::i#1!=(const byte) NUM_PROCESSING#0-(byte) 1+(byte) 1) goto processChars::@1 -- vbuz1_neq_vbuc1_then_la1 + //SEG496 [299] if((byte) processChars::i#1!=(const byte) NUM_PROCESSING#0-(byte) 1+(byte) 1) goto processChars::@1 -- vbuz1_neq_vbuc1_then_la1 lda #NUM_PROCESSING-1+1 cmp i bne b1_from_b2 jmp breturn - //SEG518 processChars::@return + //SEG497 processChars::@return breturn: - //SEG519 [311] return + //SEG498 [300] return rts - //SEG520 processChars::@6 + //SEG499 processChars::@6 b6: - //SEG521 [312] *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) ← (const byte) STATUS_FREE -- pbuz1_derefidx_vbuc1=vbuc2 + //SEG500 [301] *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) ← (const byte) STATUS_FREE -- pbuz1_derefidx_vbuc1=vbuc2 // Set status to FREE lda #STATUS_FREE ldy #OFFSET_STRUCT_PROCESSINGSPRITE_STATUS sta (processing),y - //SEG522 [313] (byte~) processChars::$33 ← (byte) $ff ^ (byte) processChars::bitmask#0 -- vbuz1=vbuc1_bxor_vbuz2 + //SEG501 [302] (byte~) processChars::$33 ← (byte) $ff ^ (byte) processChars::bitmask#0 -- vbuz1=vbuc1_bxor_vbuz2 lda #$ff eor bitmask sta _33 - //SEG523 [314] *((const byte*) SPRITES_ENABLE#0) ← *((const byte*) SPRITES_ENABLE#0) & (byte~) processChars::$33 -- _deref_pbuc1=_deref_pbuc1_band_vbuz1 + //SEG502 [303] *((const byte*) SPRITES_ENABLE#0) ← *((const byte*) SPRITES_ENABLE#0) & (byte~) processChars::$33 -- _deref_pbuc1=_deref_pbuc1_band_vbuz1 // Disable the sprite lda SPRITES_ENABLE and _33 sta SPRITES_ENABLE jmp b7 - //SEG524 processChars::@4 + //SEG503 processChars::@4 b4: - //SEG525 [315] *((const byte*) SPRITES_XMSB#0) ← *((const byte*) SPRITES_XMSB#0) | (byte) processChars::bitmask#0 -- _deref_pbuc1=_deref_pbuc1_bor_vbuz1 + //SEG504 [304] *((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 } -//SEG526 irqTop +//SEG505 irqTop // Raster Interrupt at the top of the screen irqTop: { - //SEG527 entry interrupt(HARDWARE_ALL) + //SEG506 entry interrupt(HARDWARE_ALL) sta rega+1 stx regx+1 sty regy+1 jmp b1 - //SEG528 irqTop::@1 + //SEG507 irqTop::@1 b1: - //SEG529 [317] *((const byte*) RASTER#0) ← (const byte) RASTER_IRQ_MIDDLE#0 -- _deref_pbuc1=vbuc2 + //SEG508 [306] *((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 - //SEG530 [318] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_ALL)(void()) irqBottom() -- _deref_pptc1=pprc2 + //SEG509 [307] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_ALL)(void()) irqBottom() -- _deref_pptc1=pprc2 lda #irqBottom sta HARDWARE_IRQ+1 - //SEG531 [319] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 + //SEG510 [308] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 // Acknowledge the IRQ lda #IRQ_RASTER sta IRQ_STATUS jmp breturn - //SEG532 irqTop::@return + //SEG511 irqTop::@return breturn: - //SEG533 [320] return - exit interrupt(HARDWARE_ALL) + //SEG512 [309] return - exit interrupt(HARDWARE_ALL) rega: lda #00 regx: @@ -7966,7 +7427,12 @@ irqTop: { ldy #00 rti } -//SEG534 File Data +//SEG513 File Data + // Angles representing ATAN(0.5), ATAN(0.25), ATAN(0.125), ... +CORDIC_ATAN2_ANGLES_16: +.for (var i=0; i> (byte) 1 [ SQUARES#1 sqrt::$1 ] ( main:7::init_dist_screen:10::sqrt:192 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 sqrt::$1 ] ) always clobbers reg byte a -Statement [216] (byte) sqrt::return#0 ← (byte)(word~) sqrt::$1 [ sqrt::return#0 SQUARES#1 ] ( main:7::init_dist_screen:10::sqrt:192 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqrt::return#0 SQUARES#1 ] ) always clobbers reg byte a -Statement [221] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@2 [ bsearch16u::items#2 ] ( main:7::init_dist_screen:10::sqrt:192::bsearch16u:211 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::items#2 ] ) always clobbers reg byte a reg byte y -Removing always clobbered register reg byte y as potential for zp ZP_BYTE:27 [ init_dist_screen::y#10 init_dist_screen::y#1 ] -Removing always clobbered register reg byte y as potential for zp ZP_BYTE:33 [ init_dist_screen::x#2 init_dist_screen::x#1 ] -Removing always clobbered register reg byte y as potential for zp ZP_BYTE:34 [ init_dist_screen::xb#2 init_dist_screen::xb#1 ] -Statement [222] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#2 - (byte) 1*(const byte) SIZEOF_WORD [ bsearch16u::$2 ] ( main:7::init_dist_screen:10::sqrt:192::bsearch16u:211 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::$2 ] ) always clobbers reg byte a -Statement [226] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#3 >> (byte) 1 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$6 ] ( main:7::init_dist_screen:10::sqrt:192::bsearch16u:211 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$6 ] ) always clobbers reg byte a -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:38 [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#3 bsearch16u::num#0 ] -Statement [227] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$16 ] ( main:7::init_dist_screen:10::sqrt:192::bsearch16u:211 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$16 ] ) always clobbers reg byte a -Statement [228] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#2 + (byte~) bsearch16u::$16 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ( main:7::init_dist_screen:10::sqrt:192::bsearch16u:211 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ) always clobbers reg byte a -Statement [229] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0) [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ( main:7::init_dist_screen:10::sqrt:192::bsearch16u:211 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ) always clobbers reg byte a reg byte y -Removing always clobbered register reg byte y as potential for zp ZP_BYTE:38 [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#3 bsearch16u::num#0 ] -Statement [230] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ( main:7::init_dist_screen:10::sqrt:192::bsearch16u:211 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ) always clobbers reg byte a -Statement [231] (word*~) bsearch16u::return#6 ← (word*) bsearch16u::pivot#0 [ bsearch16u::return#6 ] ( main:7::init_dist_screen:10::sqrt:192::bsearch16u:211 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::return#6 ] ) always clobbers reg byte a -Statement [232] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@7 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ( main:7::init_dist_screen:10::sqrt:192::bsearch16u:211 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ) always clobbers reg byte a -Statement [233] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#0 ] ( main:7::init_dist_screen:10::sqrt:192::bsearch16u:211 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#0 ] ) always clobbers reg byte a -Statement [238] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 [ SQUARES#1 sqr::$0 ] ( main:7::init_dist_screen:10::sqr:178 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 SQUARES#1 sqr::$0 ] main:7::init_dist_screen:10::sqr:187 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 sqr::$0 ] ) always clobbers reg byte a -Statement [239] (word) sqr::return#0 ← *((word*)(void*) SQUARES#1 + (byte~) sqr::$0) [ sqr::return#0 SQUARES#1 ] ( main:7::init_dist_screen:10::sqr:178 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 sqr::return#0 SQUARES#1 ] main:7::init_dist_screen:10::sqr:187 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqr::return#0 SQUARES#1 ] ) always clobbers reg byte a reg byte y -Statement [243] (void*) SQUARES#1 ← (void*)(byte*) malloc::mem#0 [ SQUARES#1 ] ( main:7::init_dist_screen:10::init_squares:170 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::screen#0 SQUARES#1 ] ) always clobbers reg byte a -Statement [244] (word*) init_squares::squares#0 ← (word*)(void*) SQUARES#1 [ SQUARES#1 init_squares::squares#0 ] ( main:7::init_dist_screen:10::init_squares:170 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::screen#0 SQUARES#1 init_squares::squares#0 ] ) always clobbers reg byte a -Statement [246] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 [ SQUARES#1 init_squares::sqr#2 init_squares::squares#2 init_squares::i#2 ] ( main:7::init_dist_screen:10::init_squares:170 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::screen#0 SQUARES#1 init_squares::sqr#2 init_squares::squares#2 init_squares::i#2 ] ) always clobbers reg byte a reg byte y -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:44 [ init_squares::i#2 init_squares::i#1 ] -Removing always clobbered register reg byte y as potential for zp ZP_BYTE:44 [ init_squares::i#2 init_squares::i#1 ] -Statement [247] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD [ SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 ] ( main:7::init_dist_screen:10::init_squares:170 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::screen#0 SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 ] ) always clobbers reg byte a -Statement [248] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 [ SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 init_squares::$3 ] ( main:7::init_dist_screen:10::init_squares:170 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::screen#0 SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 init_squares::$3 ] ) always clobbers reg byte a -Statement [250] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 [ SQUARES#1 init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ( main:7::init_dist_screen:10::init_squares:170 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::screen#0 SQUARES#1 init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ) always clobbers reg byte a -Statement [255] (byte*) malloc::mem#0 ← (byte*) heap_head#12 [ malloc::mem#0 heap_head#12 malloc::size#3 ] ( malloc:2 [ malloc::mem#0 heap_head#12 malloc::size#3 ] malloc:4 [ malloc::mem#0 heap_head#12 malloc::size#3 ] main:7::init_dist_screen:10::init_squares:170::malloc:242 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::screen#0 malloc::mem#0 heap_head#12 malloc::size#3 ] ) always clobbers reg byte a -Statement [256] (byte*) heap_head#1 ← (byte*) heap_head#12 + (word) malloc::size#3 [ malloc::mem#0 heap_head#1 ] ( malloc:2 [ malloc::mem#0 heap_head#1 ] malloc:4 [ malloc::mem#0 heap_head#1 ] main:7::init_dist_screen:10::init_squares:170::malloc:242 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::screen#0 malloc::mem#0 heap_head#1 ] ) always clobbers reg byte a -Statement [261] *((const byte*) RASTER#0) ← (const byte) RASTER_IRQ_TOP#0 [ ] ( [ ] ) always clobbers reg byte a -Statement [262] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_ALL)(void()) irqTop() [ ] ( [ ] ) always clobbers reg byte a -Statement [263] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 [ ] ( [ ] ) always clobbers reg byte a -Statement [264] return [ ] ( [ ] ) always clobbers reg byte a reg byte x reg byte y -Statement [267] (byte) processChars::$67 ← (byte) processChars::i#10 << (byte) 1 [ processChars::i#10 processChars::numActive#10 processChars::$67 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::$67 ] ) always clobbers reg byte a -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:49 [ processChars::i#10 processChars::i#1 ] -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:50 [ processChars::numActive#10 processChars::numActive#3 processChars::numActive#1 ] -Statement [268] (byte) processChars::$68 ← (byte) processChars::$67 + (byte) processChars::i#10 [ processChars::i#10 processChars::numActive#10 processChars::$68 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::$68 ] ) always clobbers reg byte a -Statement [269] (byte) processChars::$69 ← (byte) processChars::$68 << (byte) 1 [ processChars::i#10 processChars::numActive#10 processChars::$69 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::$69 ] ) always clobbers reg byte a -Statement [270] (byte) processChars::$70 ← (byte) processChars::$69 + (byte) processChars::i#10 [ processChars::i#10 processChars::numActive#10 processChars::$70 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::$70 ] ) always clobbers reg byte a -Statement [271] (byte~) processChars::$37 ← (byte) processChars::$70 << (byte) 1 [ processChars::i#10 processChars::numActive#10 processChars::$37 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::$37 ] ) always clobbers reg byte a -Statement [272] (struct ProcessingSprite*) processChars::processing#0 ← (const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (byte~) processChars::$37 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 ] ) always clobbers reg byte a -Statement [273] (byte) processChars::bitmask#0 ← (byte) 1 << *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID) [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:260 [ processChars::i#10 processChars::numActive#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:49 [ processChars::i#10 processChars::i#1 ] -Removing always clobbered register reg byte y as potential for zp ZP_BYTE:50 [ processChars::numActive#10 processChars::numActive#3 processChars::numActive#1 ] -Statement [274] if(*((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS)==(const byte) STATUS_FREE) goto processChars::@2 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:260 [ processChars::i#10 processChars::numActive#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:181 [ processChars::bitmask#0 ] -Removing always clobbered register reg byte y as potential for zp ZP_BYTE:181 [ processChars::bitmask#0 ] -Statement [275] if(*((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS)!=(const byte) STATUS_NEW) goto processChars::@3 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 ] ) always clobbers reg byte a reg byte y -Statement [276] *(*((byte**)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR)) ← (byte) ' ' [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:260 [ processChars::i#10 processChars::numActive#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:49 [ processChars::i#10 processChars::i#1 ] -Removing always clobbered register reg byte x as potential for zp ZP_BYTE:50 [ processChars::numActive#10 processChars::numActive#3 processChars::numActive#1 ] -Removing always clobbered register reg byte x as potential for zp ZP_BYTE:181 [ processChars::bitmask#0 ] -Statement [277] *((const byte*) SPRITES_ENABLE#0) ← *((const byte*) SPRITES_ENABLE#0) | (byte) processChars::bitmask#0 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 ] ) always clobbers reg byte a -Statement [278] *((const byte*) SPRITES_COLS#0 + *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID)) ← *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_COL) [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 ] ) always clobbers reg byte a reg byte y -Statement [279] *((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::numActive#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 ] ) always clobbers reg byte a reg byte y -Statement [280] *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) ← (const byte) STATUS_PROCESSING [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 ] ) always clobbers reg byte a reg byte y -Statement [281] (word) processChars::xpos#0 ← *((word*)(struct ProcessingSprite*) processChars::processing#0) >> (byte) 4 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 ] ) always clobbers reg byte a reg byte y -Statement [282] (byte~) processChars::$11 ← > (word) processChars::xpos#0 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 processChars::$11 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 processChars::$11 ] ) always clobbers reg byte a -Statement [284] (byte~) processChars::$12 ← (byte) $ff ^ (byte) processChars::bitmask#0 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 processChars::$12 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 processChars::$12 ] ) always clobbers reg byte a -Statement [285] *((const byte*) SPRITES_XMSB#0) ← *((const byte*) SPRITES_XMSB#0) & (byte~) processChars::$12 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 ] ) always clobbers reg byte a -Statement [286] (byte~) processChars::$17 ← (byte) processChars::i#10 << (byte) 1 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 processChars::$17 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 processChars::$17 ] ) always clobbers reg byte a -Statement [287] (byte~) processChars::$14 ← (byte)(word) processChars::xpos#0 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 processChars::$17 processChars::$14 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 processChars::$17 processChars::$14 ] ) always clobbers reg byte a -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:186 [ processChars::$17 ] -Statement [289] (word~) processChars::$15 ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y) >> (byte) 4 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 processChars::$17 processChars::$15 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 processChars::$17 processChars::$15 ] ) always clobbers reg byte a reg byte y -Removing always clobbered register reg byte y as potential for zp ZP_BYTE:186 [ processChars::$17 ] -Statement [290] (byte) processChars::ypos#0 ← (byte)(word~) processChars::$15 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 processChars::$17 processChars::ypos#0 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 processChars::$17 processChars::ypos#0 ] ) always clobbers reg byte a -Statement [292] if(*((word*)(struct ProcessingSprite*) processChars::processing#0)<(const word) XPOS_LEFTMOST#0) goto processChars::@6 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 processChars::ypos#0 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 processChars::ypos#0 ] ) always clobbers reg byte a reg byte y -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:190 [ processChars::ypos#0 ] -Removing always clobbered register reg byte y as potential for zp ZP_BYTE:190 [ processChars::ypos#0 ] -Statement [293] if(*((word*)(struct ProcessingSprite*) processChars::processing#0)>(const word) XPOS_RIGHTMOST#0) goto processChars::@6 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 processChars::ypos#0 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 processChars::ypos#0 ] ) always clobbers reg byte a reg byte y -Statement [294] if(*((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y)<(const word) YPOS_TOPMOST#0) goto processChars::@6 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 processChars::ypos#0 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 processChars::ypos#0 ] ) always clobbers reg byte a reg byte y -Statement [295] if(*((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y)>(const word) YPOS_BOTTOMMOST#0) goto processChars::@6 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 processChars::ypos#0 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 processChars::ypos#0 ] ) always clobbers reg byte a reg byte y -Statement [296] (word~) processChars::$25 ← (word) processChars::xpos#0 >> (byte) 3 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::ypos#0 processChars::$25 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::ypos#0 processChars::$25 ] ) always clobbers reg byte a -Statement [297] (byte~) processChars::$26 ← (byte)(word~) processChars::$25 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::ypos#0 processChars::$26 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::ypos#0 processChars::$26 ] ) always clobbers reg byte a -Statement [299] (byte~) processChars::$38 ← (byte) processChars::xchar#0 << (byte) 1 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::ypos#0 processChars::$38 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::ypos#0 processChars::$38 ] ) always clobbers reg byte a -Statement [300] *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX) + *((const word[$28]) VXSIN#0 + (byte~) processChars::$38) [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::ypos#0 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::ypos#0 ] ) always clobbers reg byte a reg byte y -Statement [301] *((word*)(struct ProcessingSprite*) processChars::processing#0) ← *((word*)(struct ProcessingSprite*) processChars::processing#0) + *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX) [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::ypos#0 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::ypos#0 ] ) always clobbers reg byte a reg byte y -Statement [302] (byte~) processChars::$30 ← (byte) processChars::ypos#0 >> (byte) 3 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::$30 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::$30 ] ) always clobbers reg byte a -Statement [304] (byte~) processChars::$39 ← (byte) processChars::ychar#0 << (byte) 1 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::$39 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::$39 ] ) always clobbers reg byte a -Statement [305] *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY) + *((const word[$19]) VYSIN#0 + (byte~) processChars::$39) [ processChars::i#10 processChars::numActive#10 processChars::processing#0 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 ] ) always clobbers reg byte a reg byte y -Statement [306] *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y) + *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY) [ processChars::i#10 processChars::numActive#10 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 ] ) always clobbers reg byte a reg byte y -Statement [310] if((byte) processChars::i#1!=(const byte) NUM_PROCESSING#0-(byte) 1+(byte) 1) goto processChars::@1 [ processChars::i#1 processChars::numActive#3 ] ( processChars:260 [ processChars::i#1 processChars::numActive#3 ] ) always clobbers reg byte a -Statement [312] *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) ← (const byte) STATUS_FREE [ processChars::i#10 processChars::numActive#10 processChars::bitmask#0 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::bitmask#0 ] ) always clobbers reg byte a reg byte y -Statement [313] (byte~) processChars::$33 ← (byte) $ff ^ (byte) processChars::bitmask#0 [ processChars::i#10 processChars::numActive#10 processChars::$33 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::$33 ] ) always clobbers reg byte a -Statement [314] *((const byte*) SPRITES_ENABLE#0) ← *((const byte*) SPRITES_ENABLE#0) & (byte~) processChars::$33 [ processChars::i#10 processChars::numActive#10 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 ] ) always clobbers reg byte a -Statement [315] *((const byte*) SPRITES_XMSB#0) ← *((const byte*) SPRITES_XMSB#0) | (byte) processChars::bitmask#0 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 ] ) always clobbers reg byte a -Statement [317] *((const byte*) RASTER#0) ← (const byte) RASTER_IRQ_MIDDLE#0 [ ] ( [ ] ) always clobbers reg byte a -Statement [318] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_ALL)(void()) irqBottom() [ ] ( [ ] ) always clobbers reg byte a -Statement [319] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 [ ] ( [ ] ) always clobbers reg byte a -Statement [320] return [ ] ( [ ] ) always clobbers reg byte a reg byte x reg byte y -Statement [3] (void*) SCREEN_COPY#0 ← (void*)(byte*) malloc::mem#0 [ SCREEN_COPY#0 heap_head#1 ] ( ) always clobbers reg byte a -Statement [5] (void*) SCREEN_DIST#0 ← (void*)(byte*) malloc::mem#0 [ SCREEN_COPY#0 SCREEN_DIST#0 heap_head#1 ] ( ) always clobbers reg byte a -Statement [9] (byte*) init_dist_screen::screen#0 ← (byte*)(void*) SCREEN_DIST#0 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::screen#0 heap_head#1 ] ( main:7 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::screen#0 heap_head#1 ] ) always clobbers reg byte a +Statement [169] (byte*) init_angle_screen::screen_topline#0 ← (byte*) init_angle_screen::screen#0 + (word)(number) $28*(number) $c [ init_angle_screen::screen#0 init_angle_screen::screen_topline#0 ] ( main:7::init_angle_screen:10 [ SCREEN_COPY#0 SCREEN_DIST#0 init_angle_screen::screen#0 init_angle_screen::screen_topline#0 ] ) always clobbers reg byte a +Statement [170] (byte*) init_angle_screen::screen_bottomline#0 ← (byte*) init_angle_screen::screen#0 + (word)(number) $28*(number) $c [ init_angle_screen::screen_topline#0 init_angle_screen::screen_bottomline#0 ] ( main:7::init_angle_screen:10 [ SCREEN_COPY#0 SCREEN_DIST#0 init_angle_screen::screen_topline#0 init_angle_screen::screen_bottomline#0 ] ) always clobbers reg byte a +Statement [173] (byte~) init_angle_screen::$2 ← (byte) init_angle_screen::x#2 << (byte) 1 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::$2 ] ( main:7::init_angle_screen:10 [ SCREEN_COPY#0 SCREEN_DIST#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::$2 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:27 [ init_angle_screen::y#4 init_angle_screen::y#1 ] +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:32 [ init_angle_screen::x#2 init_angle_screen::x#1 ] +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:33 [ init_angle_screen::xb#2 init_angle_screen::xb#1 ] +Statement [174] (byte~) init_angle_screen::$3 ← (byte) $27 - (byte~) init_angle_screen::$2 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::$3 ] ( main:7::init_angle_screen:10 [ SCREEN_COPY#0 SCREEN_DIST#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::$3 ] ) always clobbers reg byte a +Statement [175] (word) init_angle_screen::xw#0 ← (byte~) init_angle_screen::$3 w= (byte) 0 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::xw#0 ] ( main:7::init_angle_screen:10 [ SCREEN_COPY#0 SCREEN_DIST#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::xw#0 ] ) always clobbers reg byte y +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:27 [ init_angle_screen::y#4 init_angle_screen::y#1 ] +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:32 [ init_angle_screen::x#2 init_angle_screen::x#1 ] +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:33 [ init_angle_screen::xb#2 init_angle_screen::xb#1 ] +Statement [176] (byte~) init_angle_screen::$6 ← (byte) init_angle_screen::y#4 << (byte) 1 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::xw#0 init_angle_screen::$6 ] ( main:7::init_angle_screen:10 [ SCREEN_COPY#0 SCREEN_DIST#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::xw#0 init_angle_screen::$6 ] ) always clobbers reg byte a +Statement [177] (word) init_angle_screen::yw#0 ← (byte~) init_angle_screen::$6 w= (byte) 0 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::xw#0 init_angle_screen::yw#0 ] ( main:7::init_angle_screen:10 [ SCREEN_COPY#0 SCREEN_DIST#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::xw#0 init_angle_screen::yw#0 ] ) always clobbers reg byte y +Statement [178] (signed word) atan2_16::x#0 ← (signed word)(word) init_angle_screen::xw#0 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::yw#0 atan2_16::x#0 ] ( main:7::init_angle_screen:10 [ SCREEN_COPY#0 SCREEN_DIST#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::yw#0 atan2_16::x#0 ] ) always clobbers reg byte a +Statement [179] (signed word) atan2_16::y#0 ← (signed word)(word) init_angle_screen::yw#0 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 ] ( main:7::init_angle_screen:10 [ SCREEN_COPY#0 SCREEN_DIST#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 ] ) always clobbers reg byte a +Statement [181] (word) atan2_16::return#2 ← (word) atan2_16::return#0 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::return#2 ] ( main:7::init_angle_screen:10 [ SCREEN_COPY#0 SCREEN_DIST#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::return#2 ] ) always clobbers reg byte a +Statement [182] (word) init_angle_screen::angle_w#0 ← (word) atan2_16::return#2 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::angle_w#0 ] ( main:7::init_angle_screen:10 [ SCREEN_COPY#0 SCREEN_DIST#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::angle_w#0 ] ) always clobbers reg byte a +Statement [183] (word~) init_angle_screen::$10 ← (word) init_angle_screen::angle_w#0 + (byte) $80 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::$10 ] ( main:7::init_angle_screen:10 [ SCREEN_COPY#0 SCREEN_DIST#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::$10 ] ) always clobbers reg byte a +Statement [184] (byte) init_angle_screen::ang_w#0 ← > (word~) init_angle_screen::$10 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ( main:7::init_angle_screen:10 [ SCREEN_COPY#0 SCREEN_DIST#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ) always clobbers reg byte a +Statement [185] *((byte*) init_angle_screen::screen_bottomline#5 + (byte) init_angle_screen::xb#2) ← (byte) init_angle_screen::ang_w#0 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ( main:7::init_angle_screen:10 [ SCREEN_COPY#0 SCREEN_DIST#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ) always clobbers reg byte y +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:152 [ init_angle_screen::ang_w#0 ] +Statement [186] (byte~) init_angle_screen::$12 ← - (byte) init_angle_screen::ang_w#0 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 init_angle_screen::$12 ] ( main:7::init_angle_screen:10 [ SCREEN_COPY#0 SCREEN_DIST#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 init_angle_screen::$12 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:152 [ init_angle_screen::ang_w#0 ] +Statement [187] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::xb#2) ← (byte~) init_angle_screen::$12 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ( main:7::init_angle_screen:10 [ SCREEN_COPY#0 SCREEN_DIST#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ) always clobbers reg byte y +Statement [188] (byte~) init_angle_screen::$13 ← (byte) $80 + (byte) init_angle_screen::ang_w#0 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 init_angle_screen::$13 ] ( main:7::init_angle_screen:10 [ SCREEN_COPY#0 SCREEN_DIST#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 init_angle_screen::$13 ] ) always clobbers reg byte a +Statement [189] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$13 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ( main:7::init_angle_screen:10 [ SCREEN_COPY#0 SCREEN_DIST#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ) always clobbers reg byte y +Statement [190] (byte~) init_angle_screen::$14 ← (byte) $80 - (byte) init_angle_screen::ang_w#0 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::$14 ] ( main:7::init_angle_screen:10 [ SCREEN_COPY#0 SCREEN_DIST#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::$14 ] ) always clobbers reg byte a +Statement [191] *((byte*) init_angle_screen::screen_bottomline#5 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$14 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 ] ( main:7::init_angle_screen:10 [ SCREEN_COPY#0 SCREEN_DIST#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 ] ) always clobbers reg byte y +Statement [195] (byte*) init_angle_screen::screen_topline#1 ← (byte*) init_angle_screen::screen_topline#5 - (byte) $28 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#1 ] ( main:7::init_angle_screen:10 [ SCREEN_COPY#0 SCREEN_DIST#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#1 ] ) always clobbers reg byte a +Statement [196] (byte*) init_angle_screen::screen_bottomline#1 ← (byte*) init_angle_screen::screen_bottomline#5 + (byte) $28 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#1 init_angle_screen::screen_topline#1 ] ( main:7::init_angle_screen:10 [ SCREEN_COPY#0 SCREEN_DIST#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#1 init_angle_screen::screen_topline#1 ] ) always clobbers reg byte a +Statement [200] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 [ atan2_16::x#0 atan2_16::y#0 ] ( main:7::init_angle_screen:10::atan2_16:180 [ SCREEN_COPY#0 SCREEN_DIST#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 ] ) always clobbers reg byte a +Statement [201] (signed word~) atan2_16::$2 ← - (signed word) atan2_16::y#0 [ atan2_16::x#0 atan2_16::y#0 atan2_16::$2 ] ( main:7::init_angle_screen:10::atan2_16:180 [ SCREEN_COPY#0 SCREEN_DIST#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::$2 ] ) always clobbers reg byte a +Statement [203] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 ] ( main:7::init_angle_screen:10::atan2_16:180 [ SCREEN_COPY#0 SCREEN_DIST#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 ] ) always clobbers reg byte a +Statement [204] (signed word~) atan2_16::$7 ← - (signed word) atan2_16::x#0 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 atan2_16::$7 ] ( main:7::init_angle_screen:10::atan2_16:180 [ SCREEN_COPY#0 SCREEN_DIST#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 atan2_16::$7 ] ) always clobbers reg byte a +Statement [207] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@11 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 ] ( main:7::init_angle_screen:10::atan2_16:180 [ SCREEN_COPY#0 SCREEN_DIST#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:38 [ atan2_16::i#2 atan2_16::i#1 ] +Statement [209] (word) atan2_16::angle#1 ← (word) atan2_16::angle#6 >> (byte) 1 [ atan2_16::x#0 atan2_16::y#0 atan2_16::angle#1 ] ( main:7::init_angle_screen:10::atan2_16:180 [ SCREEN_COPY#0 SCREEN_DIST#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::angle#1 ] ) always clobbers reg byte a +Statement [210] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7 [ atan2_16::y#0 atan2_16::angle#1 ] ( main:7::init_angle_screen:10::atan2_16:180 [ SCREEN_COPY#0 SCREEN_DIST#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::y#0 atan2_16::angle#1 ] ) always clobbers reg byte a +Statement [211] (word) atan2_16::angle#4 ← (word) $8000 - (word) atan2_16::angle#1 [ atan2_16::y#0 atan2_16::angle#4 ] ( main:7::init_angle_screen:10::atan2_16:180 [ SCREEN_COPY#0 SCREEN_DIST#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::y#0 atan2_16::angle#4 ] ) always clobbers reg byte a +Statement [213] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8 [ atan2_16::angle#11 ] ( main:7::init_angle_screen:10::atan2_16:180 [ SCREEN_COPY#0 SCREEN_DIST#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::angle#11 ] ) always clobbers reg byte a +Statement [214] (word) atan2_16::angle#5 ← - (word) atan2_16::angle#11 [ atan2_16::angle#5 ] ( main:7::init_angle_screen:10::atan2_16:180 [ SCREEN_COPY#0 SCREEN_DIST#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::angle#5 ] ) always clobbers reg byte a +Statement [218] (signed word~) atan2_16::xd#10 ← (signed word) atan2_16::xi#3 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#5 atan2_16::xd#10 ] ( main:7::init_angle_screen:10::atan2_16:180 [ SCREEN_COPY#0 SCREEN_DIST#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#5 atan2_16::xd#10 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:43 [ atan2_16::shift#2 atan2_16::shift#5 atan2_16::shift#1 ] +Statement [219] (signed word~) atan2_16::yd#10 ← (signed word) atan2_16::yi#3 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#5 atan2_16::xd#10 atan2_16::yd#10 ] ( main:7::init_angle_screen:10::atan2_16:180 [ SCREEN_COPY#0 SCREEN_DIST#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#5 atan2_16::xd#10 atan2_16::yd#10 ] ) always clobbers reg byte a +Statement [223] (signed word) atan2_16::xd#2 ← (signed word) atan2_16::xd#3 >> (signed byte) 1 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::yd#3 atan2_16::xd#2 ] ( main:7::init_angle_screen:10::atan2_16:180 [ SCREEN_COPY#0 SCREEN_DIST#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::yd#3 atan2_16::xd#2 ] ) always clobbers reg byte a +Statement [224] (signed word) atan2_16::yd#2 ← (signed word) atan2_16::yd#3 >> (signed byte) 1 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#2 atan2_16::yd#2 ] ( main:7::init_angle_screen:10::atan2_16:180 [ SCREEN_COPY#0 SCREEN_DIST#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#2 atan2_16::yd#2 ] ) always clobbers reg byte a +Statement [226] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@18 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::yd#5 atan2_16::xd#5 ] ( main:7::init_angle_screen:10::atan2_16:180 [ SCREEN_COPY#0 SCREEN_DIST#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::yd#5 atan2_16::xd#5 ] ) always clobbers reg byte a +Statement [227] (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#3 - (signed word) atan2_16::yd#5 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#5 atan2_16::xi#2 ] ( main:7::init_angle_screen:10::atan2_16:180 [ SCREEN_COPY#0 SCREEN_DIST#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#5 atan2_16::xi#2 ] ) always clobbers reg byte a +Statement [228] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#5 [ atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::xi#2 atan2_16::yi#2 ] ( main:7::init_angle_screen:10::atan2_16:180 [ SCREEN_COPY#0 SCREEN_DIST#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::xi#2 atan2_16::yi#2 ] ) always clobbers reg byte a +Statement [229] (byte~) atan2_16::$24 ← (byte) atan2_16::i#2 << (byte) 1 [ atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::xi#2 atan2_16::yi#2 atan2_16::$24 ] ( main:7::init_angle_screen:10::atan2_16:180 [ SCREEN_COPY#0 SCREEN_DIST#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::xi#2 atan2_16::yi#2 atan2_16::$24 ] ) always clobbers reg byte a +Statement [230] (word) atan2_16::angle#3 ← (word) atan2_16::angle#12 - *((const word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16#0 + (byte~) atan2_16::$24) [ atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::xi#2 atan2_16::yi#2 atan2_16::angle#3 ] ( main:7::init_angle_screen:10::atan2_16:180 [ SCREEN_COPY#0 SCREEN_DIST#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::xi#2 atan2_16::yi#2 atan2_16::angle#3 ] ) always clobbers reg byte a +Statement [234] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#5 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#5 atan2_16::xi#1 ] ( main:7::init_angle_screen:10::atan2_16:180 [ SCREEN_COPY#0 SCREEN_DIST#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#5 atan2_16::xi#1 ] ) always clobbers reg byte a +Statement [235] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#5 [ atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::yi#1 atan2_16::xi#1 ] ( main:7::init_angle_screen:10::atan2_16:180 [ SCREEN_COPY#0 SCREEN_DIST#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::yi#1 atan2_16::xi#1 ] ) always clobbers reg byte a +Statement [236] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 << (byte) 1 [ atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::yi#1 atan2_16::xi#1 atan2_16::$23 ] ( main:7::init_angle_screen:10::atan2_16:180 [ SCREEN_COPY#0 SCREEN_DIST#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::yi#1 atan2_16::xi#1 atan2_16::$23 ] ) always clobbers reg byte a +Statement [237] (word) atan2_16::angle#2 ← (word) atan2_16::angle#12 + *((const word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16#0 + (byte~) atan2_16::$23) [ atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::yi#1 atan2_16::angle#2 atan2_16::xi#1 ] ( main:7::init_angle_screen:10::atan2_16:180 [ SCREEN_COPY#0 SCREEN_DIST#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::yi#1 atan2_16::angle#2 atan2_16::xi#1 ] ) always clobbers reg byte a +Statement [238] (signed word) atan2_16::xd#1 ← (signed word) atan2_16::xd#3 >> (signed byte) 2 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#2 atan2_16::yd#3 atan2_16::xd#1 ] ( main:7::init_angle_screen:10::atan2_16:180 [ SCREEN_COPY#0 SCREEN_DIST#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#2 atan2_16::yd#3 atan2_16::xd#1 ] ) always clobbers reg byte a +Statement [239] (signed word) atan2_16::yd#1 ← (signed word) atan2_16::yd#3 >> (signed byte) 2 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#2 atan2_16::xd#1 atan2_16::yd#1 ] ( main:7::init_angle_screen:10::atan2_16:180 [ SCREEN_COPY#0 SCREEN_DIST#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#2 atan2_16::xd#1 atan2_16::yd#1 ] ) always clobbers reg byte a +Statement [241] (signed word~) atan2_16::xi#13 ← (signed word) atan2_16::x#0 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 atan2_16::xi#13 ] ( main:7::init_angle_screen:10::atan2_16:180 [ SCREEN_COPY#0 SCREEN_DIST#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 atan2_16::xi#13 ] ) always clobbers reg byte a +Statement [242] (signed word~) atan2_16::yi#16 ← (signed word) atan2_16::y#0 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#16 ] ( main:7::init_angle_screen:10::atan2_16:180 [ SCREEN_COPY#0 SCREEN_DIST#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#16 ] ) always clobbers reg byte a +Statement [244] (byte*) malloc::mem#0 ← (byte*) heap_head#5 [ malloc::mem#0 heap_head#5 ] ( malloc:2 [ malloc::mem#0 heap_head#5 ] malloc:4 [ malloc::mem#0 heap_head#5 ] ) always clobbers reg byte a +Statement [245] (byte*) heap_head#1 ← (byte*) heap_head#5 + (word) $3e8 [ malloc::mem#0 heap_head#1 ] ( malloc:2 [ malloc::mem#0 heap_head#1 ] malloc:4 [ malloc::mem#0 heap_head#1 ] ) always clobbers reg byte a +Statement [250] *((const byte*) RASTER#0) ← (const byte) RASTER_IRQ_TOP#0 [ ] ( [ ] ) always clobbers reg byte a +Statement [251] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_ALL)(void()) irqTop() [ ] ( [ ] ) always clobbers reg byte a +Statement [252] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 [ ] ( [ ] ) always clobbers reg byte a +Statement [253] return [ ] ( [ ] ) always clobbers reg byte a reg byte x reg byte y +Statement [256] (byte) processChars::$67 ← (byte) processChars::i#10 << (byte) 1 [ processChars::i#10 processChars::numActive#10 processChars::$67 ] ( processChars:249 [ processChars::i#10 processChars::numActive#10 processChars::$67 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:50 [ processChars::i#10 processChars::i#1 ] +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:51 [ processChars::numActive#10 processChars::numActive#3 processChars::numActive#1 ] +Statement [257] (byte) processChars::$68 ← (byte) processChars::$67 + (byte) processChars::i#10 [ processChars::i#10 processChars::numActive#10 processChars::$68 ] ( processChars:249 [ processChars::i#10 processChars::numActive#10 processChars::$68 ] ) always clobbers reg byte a +Statement [258] (byte) processChars::$69 ← (byte) processChars::$68 << (byte) 1 [ processChars::i#10 processChars::numActive#10 processChars::$69 ] ( processChars:249 [ processChars::i#10 processChars::numActive#10 processChars::$69 ] ) always clobbers reg byte a +Statement [259] (byte) processChars::$70 ← (byte) processChars::$69 + (byte) processChars::i#10 [ processChars::i#10 processChars::numActive#10 processChars::$70 ] ( processChars:249 [ processChars::i#10 processChars::numActive#10 processChars::$70 ] ) always clobbers reg byte a +Statement [260] (byte~) processChars::$37 ← (byte) processChars::$70 << (byte) 1 [ processChars::i#10 processChars::numActive#10 processChars::$37 ] ( processChars:249 [ processChars::i#10 processChars::numActive#10 processChars::$37 ] ) always clobbers reg byte a +Statement [261] (struct ProcessingSprite*) processChars::processing#0 ← (const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (byte~) processChars::$37 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 ] ( processChars:249 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 ] ) always clobbers reg byte a +Statement [262] (byte) processChars::bitmask#0 ← (byte) 1 << *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID) [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:249 [ processChars::i#10 processChars::numActive#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:50 [ processChars::i#10 processChars::i#1 ] +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:51 [ processChars::numActive#10 processChars::numActive#3 processChars::numActive#1 ] +Statement [263] if(*((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS)==(const byte) STATUS_FREE) goto processChars::@2 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:249 [ processChars::i#10 processChars::numActive#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:167 [ processChars::bitmask#0 ] +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:167 [ processChars::bitmask#0 ] +Statement [264] if(*((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS)!=(const byte) STATUS_NEW) goto processChars::@3 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:249 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 ] ) always clobbers reg byte a reg byte y +Statement [265] *(*((byte**)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR)) ← (byte) ' ' [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:249 [ processChars::i#10 processChars::numActive#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:50 [ processChars::i#10 processChars::i#1 ] +Removing always clobbered register reg byte x as potential for zp ZP_BYTE:51 [ processChars::numActive#10 processChars::numActive#3 processChars::numActive#1 ] +Removing always clobbered register reg byte x as potential for zp ZP_BYTE:167 [ processChars::bitmask#0 ] +Statement [266] *((const byte*) SPRITES_ENABLE#0) ← *((const byte*) SPRITES_ENABLE#0) | (byte) processChars::bitmask#0 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:249 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 ] ) always clobbers reg byte a +Statement [267] *((const byte*) SPRITES_COLS#0 + *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID)) ← *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_COL) [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:249 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 ] ) always clobbers reg byte a reg byte y +Statement [268] *((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::numActive#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:249 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 ] ) always clobbers reg byte a reg byte y +Statement [269] *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) ← (const byte) STATUS_PROCESSING [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:249 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 ] ) always clobbers reg byte a reg byte y +Statement [270] (word) processChars::xpos#0 ← *((word*)(struct ProcessingSprite*) processChars::processing#0) >> (byte) 4 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 ] ( processChars:249 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 ] ) always clobbers reg byte a reg byte y +Statement [271] (byte~) processChars::$11 ← > (word) processChars::xpos#0 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 processChars::$11 ] ( processChars:249 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 processChars::$11 ] ) always clobbers reg byte a +Statement [273] (byte~) processChars::$12 ← (byte) $ff ^ (byte) processChars::bitmask#0 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 processChars::$12 ] ( processChars:249 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 processChars::$12 ] ) always clobbers reg byte a +Statement [274] *((const byte*) SPRITES_XMSB#0) ← *((const byte*) SPRITES_XMSB#0) & (byte~) processChars::$12 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 ] ( processChars:249 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 ] ) always clobbers reg byte a +Statement [275] (byte~) processChars::$17 ← (byte) processChars::i#10 << (byte) 1 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 processChars::$17 ] ( processChars:249 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 processChars::$17 ] ) always clobbers reg byte a +Statement [276] (byte~) processChars::$14 ← (byte)(word) processChars::xpos#0 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 processChars::$17 processChars::$14 ] ( processChars:249 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 processChars::$17 processChars::$14 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:172 [ processChars::$17 ] +Statement [278] (word~) processChars::$15 ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y) >> (byte) 4 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 processChars::$17 processChars::$15 ] ( processChars:249 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 processChars::$17 processChars::$15 ] ) always clobbers reg byte a reg byte y +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:172 [ processChars::$17 ] +Statement [279] (byte) processChars::ypos#0 ← (byte)(word~) processChars::$15 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 processChars::$17 processChars::ypos#0 ] ( processChars:249 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 processChars::$17 processChars::ypos#0 ] ) always clobbers reg byte a +Statement [281] if(*((word*)(struct ProcessingSprite*) processChars::processing#0)<(const word) XPOS_LEFTMOST#0) goto processChars::@6 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 processChars::ypos#0 ] ( processChars:249 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 processChars::ypos#0 ] ) always clobbers reg byte a reg byte y +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:176 [ processChars::ypos#0 ] +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:176 [ processChars::ypos#0 ] +Statement [282] if(*((word*)(struct ProcessingSprite*) processChars::processing#0)>(const word) XPOS_RIGHTMOST#0) goto processChars::@6 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 processChars::ypos#0 ] ( processChars:249 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 processChars::ypos#0 ] ) always clobbers reg byte a reg byte y +Statement [283] if(*((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y)<(const word) YPOS_TOPMOST#0) goto processChars::@6 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 processChars::ypos#0 ] ( processChars:249 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 processChars::ypos#0 ] ) always clobbers reg byte a reg byte y +Statement [284] if(*((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y)>(const word) YPOS_BOTTOMMOST#0) goto processChars::@6 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 processChars::ypos#0 ] ( processChars:249 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 processChars::ypos#0 ] ) always clobbers reg byte a reg byte y +Statement [285] (word~) processChars::$25 ← (word) processChars::xpos#0 >> (byte) 3 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::ypos#0 processChars::$25 ] ( processChars:249 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::ypos#0 processChars::$25 ] ) always clobbers reg byte a +Statement [286] (byte~) processChars::$26 ← (byte)(word~) processChars::$25 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::ypos#0 processChars::$26 ] ( processChars:249 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::ypos#0 processChars::$26 ] ) always clobbers reg byte a +Statement [288] (byte~) processChars::$38 ← (byte) processChars::xchar#0 << (byte) 1 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::ypos#0 processChars::$38 ] ( processChars:249 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::ypos#0 processChars::$38 ] ) always clobbers reg byte a +Statement [289] *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX) + *((const word[$28]) VXSIN#0 + (byte~) processChars::$38) [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::ypos#0 ] ( processChars:249 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::ypos#0 ] ) always clobbers reg byte a reg byte y +Statement [290] *((word*)(struct ProcessingSprite*) processChars::processing#0) ← *((word*)(struct ProcessingSprite*) processChars::processing#0) + *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX) [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::ypos#0 ] ( processChars:249 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::ypos#0 ] ) always clobbers reg byte a reg byte y +Statement [291] (byte~) processChars::$30 ← (byte) processChars::ypos#0 >> (byte) 3 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::$30 ] ( processChars:249 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::$30 ] ) always clobbers reg byte a +Statement [293] (byte~) processChars::$39 ← (byte) processChars::ychar#0 << (byte) 1 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::$39 ] ( processChars:249 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::$39 ] ) always clobbers reg byte a +Statement [294] *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY) + *((const word[$19]) VYSIN#0 + (byte~) processChars::$39) [ processChars::i#10 processChars::numActive#10 processChars::processing#0 ] ( processChars:249 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 ] ) always clobbers reg byte a reg byte y +Statement [295] *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y) + *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY) [ processChars::i#10 processChars::numActive#10 ] ( processChars:249 [ processChars::i#10 processChars::numActive#10 ] ) always clobbers reg byte a reg byte y +Statement [299] if((byte) processChars::i#1!=(const byte) NUM_PROCESSING#0-(byte) 1+(byte) 1) goto processChars::@1 [ processChars::i#1 processChars::numActive#3 ] ( processChars:249 [ processChars::i#1 processChars::numActive#3 ] ) always clobbers reg byte a +Statement [301] *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) ← (const byte) STATUS_FREE [ processChars::i#10 processChars::numActive#10 processChars::bitmask#0 ] ( processChars:249 [ processChars::i#10 processChars::numActive#10 processChars::bitmask#0 ] ) always clobbers reg byte a reg byte y +Statement [302] (byte~) processChars::$33 ← (byte) $ff ^ (byte) processChars::bitmask#0 [ processChars::i#10 processChars::numActive#10 processChars::$33 ] ( processChars:249 [ processChars::i#10 processChars::numActive#10 processChars::$33 ] ) always clobbers reg byte a +Statement [303] *((const byte*) SPRITES_ENABLE#0) ← *((const byte*) SPRITES_ENABLE#0) & (byte~) processChars::$33 [ processChars::i#10 processChars::numActive#10 ] ( processChars:249 [ processChars::i#10 processChars::numActive#10 ] ) always clobbers reg byte a +Statement [304] *((const byte*) SPRITES_XMSB#0) ← *((const byte*) SPRITES_XMSB#0) | (byte) processChars::bitmask#0 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 ] ( processChars:249 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 ] ) always clobbers reg byte a +Statement [306] *((const byte*) RASTER#0) ← (const byte) RASTER_IRQ_MIDDLE#0 [ ] ( [ ] ) always clobbers reg byte a +Statement [307] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_ALL)(void()) irqBottom() [ ] ( [ ] ) always clobbers reg byte a +Statement [308] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 [ ] ( [ ] ) always clobbers reg byte a +Statement [309] return [ ] ( [ ] ) always clobbers reg byte a reg byte x reg byte y +Statement [3] (void*) SCREEN_COPY#0 ← (void*)(byte*) malloc::mem#0 [ SCREEN_COPY#0 heap_head#1 ] ( [ SCREEN_COPY#0 heap_head#1 ] ) always clobbers reg byte a +Statement [5] (void*) SCREEN_DIST#0 ← (void*)(byte*) malloc::mem#0 [ SCREEN_COPY#0 SCREEN_DIST#0 ] ( [ SCREEN_COPY#0 SCREEN_DIST#0 ] ) always clobbers reg byte a +Statement [9] (byte*) init_angle_screen::screen#0 ← (byte*)(void*) SCREEN_DIST#0 [ SCREEN_COPY#0 SCREEN_DIST#0 init_angle_screen::screen#0 ] ( main:7 [ SCREEN_COPY#0 SCREEN_DIST#0 init_angle_screen::screen#0 ] ) always clobbers reg byte a Statement [11] (byte*) main::dst#0 ← (byte*)(void*) SCREEN_COPY#0 [ SCREEN_COPY#0 SCREEN_DIST#0 main::dst#0 ] ( main:7 [ SCREEN_COPY#0 SCREEN_DIST#0 main::dst#0 ] ) always clobbers reg byte a Statement [13] *((byte*) main::dst#2) ← *((byte*) main::src#2) [ SCREEN_COPY#0 SCREEN_DIST#0 main::src#2 main::dst#2 ] ( main:7 [ SCREEN_COPY#0 SCREEN_DIST#0 main::src#2 main::dst#2 ] ) always clobbers reg byte a reg byte y Statement [16] if((byte*) main::src#1!=(const byte*) SCREEN#0+(word) $3e8) goto main::@1 [ SCREEN_COPY#0 SCREEN_DIST#0 main::src#1 main::dst#1 ] ( main:7 [ SCREEN_COPY#0 SCREEN_DIST#0 main::src#1 main::dst#1 ] ) always clobbers reg byte a @@ -8308,289 +7785,106 @@ Statement [162] *((const byte*) SPRITES_COLS#0 + (byte) initSprites::i#2) ← (c Statement [165] *((const byte*) SPRITES_MC#0) ← (byte) 0 [ ] ( main:7::initSprites:35 [ SCREEN_COPY#0 SCREEN_DIST#0 ] ) always clobbers reg byte a Statement [166] *((const byte*) SPRITES_EXPAND_X#0) ← (byte) 0 [ ] ( main:7::initSprites:35 [ SCREEN_COPY#0 SCREEN_DIST#0 ] ) always clobbers reg byte a Statement [167] *((const byte*) SPRITES_EXPAND_Y#0) ← (byte) 0 [ ] ( main:7::initSprites:35 [ SCREEN_COPY#0 SCREEN_DIST#0 ] ) always clobbers reg byte a -Statement [171] (byte*) init_dist_screen::screen_bottomline#0 ← (byte*) init_dist_screen::screen#0 + (word)(number) $28*(number) $18 [ init_dist_screen::screen#0 init_dist_screen::screen_bottomline#0 SQUARES#1 ] ( main:7::init_dist_screen:10 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::screen#0 init_dist_screen::screen_bottomline#0 SQUARES#1 ] ) always clobbers reg byte a -Statement [173] (byte) init_dist_screen::y2#0 ← (byte) init_dist_screen::y#10 << (byte) 1 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::y2#0 SQUARES#1 ] ( main:7::init_dist_screen:10 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::y2#0 SQUARES#1 ] ) always clobbers reg byte a -Statement [175] (byte~) init_dist_screen::$5 ← (byte) $18 - (byte) init_dist_screen::y2#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::$5 SQUARES#1 ] ( main:7::init_dist_screen:10 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::$5 SQUARES#1 ] ) always clobbers reg byte a -Statement [179] (word) sqr::return#2 ← (word) sqr::return#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 sqr::return#2 SQUARES#1 ] ( main:7::init_dist_screen:10 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 sqr::return#2 SQUARES#1 ] ) always clobbers reg byte a -Statement [180] (word) init_dist_screen::yds#0 ← (word) sqr::return#2 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 SQUARES#1 ] ( main:7::init_dist_screen:10 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 SQUARES#1 ] ) always clobbers reg byte a -Statement [182] (byte) init_dist_screen::x2#0 ← (byte) init_dist_screen::x#2 << (byte) 1 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::x2#0 SQUARES#1 ] ( main:7::init_dist_screen:10 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::x2#0 SQUARES#1 ] ) always clobbers reg byte a -Statement [184] (byte~) init_dist_screen::$13 ← (byte) $27 - (byte) init_dist_screen::x2#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::$13 SQUARES#1 ] ( main:7::init_dist_screen:10 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::$13 SQUARES#1 ] ) always clobbers reg byte a -Statement [188] (word) sqr::return#3 ← (word) sqr::return#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqr::return#3 SQUARES#1 ] ( main:7::init_dist_screen:10 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqr::return#3 SQUARES#1 ] ) always clobbers reg byte a -Statement [189] (word) init_dist_screen::xds#0 ← (word) sqr::return#3 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::xds#0 SQUARES#1 ] ( main:7::init_dist_screen:10 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::xds#0 SQUARES#1 ] ) always clobbers reg byte a -Statement [190] (word) init_dist_screen::ds#0 ← (word) init_dist_screen::xds#0 + (word) init_dist_screen::yds#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::ds#0 SQUARES#1 ] ( main:7::init_dist_screen:10 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::ds#0 SQUARES#1 ] ) always clobbers reg byte a -Statement [191] (word) sqrt::val#0 ← (word) init_dist_screen::ds#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqrt::val#0 SQUARES#1 ] ( main:7::init_dist_screen:10 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqrt::val#0 SQUARES#1 ] ) always clobbers reg byte a -Statement [195] *((byte*) init_dist_screen::screen_topline#10 + (byte) init_dist_screen::x#2) ← (byte) init_dist_screen::d#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::d#0 SQUARES#1 ] ( main:7::init_dist_screen:10 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::d#0 SQUARES#1 ] ) always clobbers reg byte y -Removing always clobbered register reg byte y as potential for zp ZP_BYTE:147 [ init_dist_screen::d#0 ] -Statement [196] *((byte*) init_dist_screen::screen_bottomline#10 + (byte) init_dist_screen::x#2) ← (byte) init_dist_screen::d#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::d#0 SQUARES#1 ] ( main:7::init_dist_screen:10 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::d#0 SQUARES#1 ] ) always clobbers reg byte y -Statement [197] *((byte*) init_dist_screen::screen_topline#10 + (byte) init_dist_screen::xb#2) ← (byte) init_dist_screen::d#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::d#0 SQUARES#1 ] ( main:7::init_dist_screen:10 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::d#0 SQUARES#1 ] ) always clobbers reg byte y -Statement [198] *((byte*) init_dist_screen::screen_bottomline#10 + (byte) init_dist_screen::xb#2) ← (byte) init_dist_screen::d#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 ] ( main:7::init_dist_screen:10 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 ] ) always clobbers reg byte y -Statement [202] (byte*) init_dist_screen::screen_topline#1 ← (byte*) init_dist_screen::screen_topline#10 + (byte) $28 [ init_dist_screen::y#10 init_dist_screen::screen_bottomline#10 init_dist_screen::screen_topline#1 SQUARES#1 ] ( main:7::init_dist_screen:10 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::y#10 init_dist_screen::screen_bottomline#10 init_dist_screen::screen_topline#1 SQUARES#1 ] ) always clobbers reg byte a -Statement [203] (byte*) init_dist_screen::screen_bottomline#1 ← (byte*) init_dist_screen::screen_bottomline#10 - (byte) $28 [ init_dist_screen::y#10 init_dist_screen::screen_topline#1 init_dist_screen::screen_bottomline#1 SQUARES#1 ] ( main:7::init_dist_screen:10 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::y#10 init_dist_screen::screen_topline#1 init_dist_screen::screen_bottomline#1 SQUARES#1 ] ) always clobbers reg byte a -Statement [209] (word) bsearch16u::key#0 ← (word) sqrt::val#0 [ bsearch16u::key#0 SQUARES#1 ] ( main:7::init_dist_screen:10::sqrt:192 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::key#0 SQUARES#1 ] ) always clobbers reg byte a -Statement [210] (word*) bsearch16u::items#1 ← (word*)(void*) SQUARES#1 [ bsearch16u::key#0 bsearch16u::items#1 SQUARES#1 ] ( main:7::init_dist_screen:10::sqrt:192 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::key#0 bsearch16u::items#1 SQUARES#1 ] ) always clobbers reg byte a -Statement [212] (word*) bsearch16u::return#3 ← (word*) bsearch16u::return#1 [ SQUARES#1 bsearch16u::return#3 ] ( main:7::init_dist_screen:10::sqrt:192 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::return#3 ] ) always clobbers reg byte a -Statement [213] (word*) sqrt::found#0 ← (word*) bsearch16u::return#3 [ SQUARES#1 sqrt::found#0 ] ( main:7::init_dist_screen:10::sqrt:192 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 sqrt::found#0 ] ) always clobbers reg byte a -Statement [214] (word~) sqrt::$3 ← (word*) sqrt::found#0 - (word*)(void*) SQUARES#1 [ SQUARES#1 sqrt::$3 ] ( main:7::init_dist_screen:10::sqrt:192 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 sqrt::$3 ] ) always clobbers reg byte a -Statement [215] (word~) sqrt::$1 ← (word~) sqrt::$3 >> (byte) 1 [ SQUARES#1 sqrt::$1 ] ( main:7::init_dist_screen:10::sqrt:192 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 sqrt::$1 ] ) always clobbers reg byte a -Statement [216] (byte) sqrt::return#0 ← (byte)(word~) sqrt::$1 [ sqrt::return#0 SQUARES#1 ] ( main:7::init_dist_screen:10::sqrt:192 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqrt::return#0 SQUARES#1 ] ) always clobbers reg byte a -Statement [221] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@2 [ bsearch16u::items#2 ] ( main:7::init_dist_screen:10::sqrt:192::bsearch16u:211 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::items#2 ] ) always clobbers reg byte a reg byte y -Statement [222] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#2 - (byte) 1*(const byte) SIZEOF_WORD [ bsearch16u::$2 ] ( main:7::init_dist_screen:10::sqrt:192::bsearch16u:211 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::$2 ] ) always clobbers reg byte a -Statement [226] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#3 >> (byte) 1 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$6 ] ( main:7::init_dist_screen:10::sqrt:192::bsearch16u:211 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$6 ] ) always clobbers reg byte a -Statement [227] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$16 ] ( main:7::init_dist_screen:10::sqrt:192::bsearch16u:211 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$16 ] ) always clobbers reg byte a -Statement [228] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#2 + (byte~) bsearch16u::$16 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ( main:7::init_dist_screen:10::sqrt:192::bsearch16u:211 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ) always clobbers reg byte a -Statement [229] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0) [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ( main:7::init_dist_screen:10::sqrt:192::bsearch16u:211 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ) always clobbers reg byte a reg byte y -Statement [230] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ( main:7::init_dist_screen:10::sqrt:192::bsearch16u:211 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ) always clobbers reg byte a -Statement [231] (word*~) bsearch16u::return#6 ← (word*) bsearch16u::pivot#0 [ bsearch16u::return#6 ] ( main:7::init_dist_screen:10::sqrt:192::bsearch16u:211 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::return#6 ] ) always clobbers reg byte a -Statement [232] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@7 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ( main:7::init_dist_screen:10::sqrt:192::bsearch16u:211 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ) always clobbers reg byte a -Statement [233] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#0 ] ( main:7::init_dist_screen:10::sqrt:192::bsearch16u:211 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#0 ] ) always clobbers reg byte a -Statement [238] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 [ SQUARES#1 sqr::$0 ] ( main:7::init_dist_screen:10::sqr:178 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 SQUARES#1 sqr::$0 ] main:7::init_dist_screen:10::sqr:187 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 sqr::$0 ] ) always clobbers reg byte a -Statement [239] (word) sqr::return#0 ← *((word*)(void*) SQUARES#1 + (byte~) sqr::$0) [ sqr::return#0 SQUARES#1 ] ( main:7::init_dist_screen:10::sqr:178 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 sqr::return#0 SQUARES#1 ] main:7::init_dist_screen:10::sqr:187 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqr::return#0 SQUARES#1 ] ) always clobbers reg byte a reg byte y -Statement [243] (void*) SQUARES#1 ← (void*)(byte*) malloc::mem#0 [ SQUARES#1 ] ( main:7::init_dist_screen:10::init_squares:170 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::screen#0 SQUARES#1 ] ) always clobbers reg byte a -Statement [244] (word*) init_squares::squares#0 ← (word*)(void*) SQUARES#1 [ SQUARES#1 init_squares::squares#0 ] ( main:7::init_dist_screen:10::init_squares:170 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::screen#0 SQUARES#1 init_squares::squares#0 ] ) always clobbers reg byte a -Statement [246] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 [ SQUARES#1 init_squares::sqr#2 init_squares::squares#2 init_squares::i#2 ] ( main:7::init_dist_screen:10::init_squares:170 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::screen#0 SQUARES#1 init_squares::sqr#2 init_squares::squares#2 init_squares::i#2 ] ) always clobbers reg byte a reg byte y -Statement [247] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD [ SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 ] ( main:7::init_dist_screen:10::init_squares:170 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::screen#0 SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 ] ) always clobbers reg byte a -Statement [248] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 [ SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 init_squares::$3 ] ( main:7::init_dist_screen:10::init_squares:170 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::screen#0 SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 init_squares::$3 ] ) always clobbers reg byte a -Statement [250] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 [ SQUARES#1 init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ( main:7::init_dist_screen:10::init_squares:170 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::screen#0 SQUARES#1 init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ) always clobbers reg byte a -Statement [255] (byte*) malloc::mem#0 ← (byte*) heap_head#12 [ malloc::mem#0 heap_head#12 malloc::size#3 ] ( malloc:2 [ malloc::mem#0 heap_head#12 malloc::size#3 ] malloc:4 [ malloc::mem#0 heap_head#12 malloc::size#3 ] main:7::init_dist_screen:10::init_squares:170::malloc:242 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::screen#0 malloc::mem#0 heap_head#12 malloc::size#3 ] ) always clobbers reg byte a -Statement [256] (byte*) heap_head#1 ← (byte*) heap_head#12 + (word) malloc::size#3 [ malloc::mem#0 heap_head#1 ] ( malloc:2 [ malloc::mem#0 heap_head#1 ] malloc:4 [ malloc::mem#0 heap_head#1 ] main:7::init_dist_screen:10::init_squares:170::malloc:242 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::screen#0 malloc::mem#0 heap_head#1 ] ) always clobbers reg byte a -Statement [261] *((const byte*) RASTER#0) ← (const byte) RASTER_IRQ_TOP#0 [ ] ( [ ] ) always clobbers reg byte a -Statement [262] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_ALL)(void()) irqTop() [ ] ( [ ] ) always clobbers reg byte a -Statement [263] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 [ ] ( [ ] ) always clobbers reg byte a -Statement [264] return [ ] ( [ ] ) always clobbers reg byte a reg byte x reg byte y -Statement [267] (byte) processChars::$67 ← (byte) processChars::i#10 << (byte) 1 [ processChars::i#10 processChars::numActive#10 processChars::$67 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::$67 ] ) always clobbers reg byte a -Statement [268] (byte) processChars::$68 ← (byte) processChars::$67 + (byte) processChars::i#10 [ processChars::i#10 processChars::numActive#10 processChars::$68 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::$68 ] ) always clobbers reg byte a -Statement [269] (byte) processChars::$69 ← (byte) processChars::$68 << (byte) 1 [ processChars::i#10 processChars::numActive#10 processChars::$69 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::$69 ] ) always clobbers reg byte a -Statement [270] (byte) processChars::$70 ← (byte) processChars::$69 + (byte) processChars::i#10 [ processChars::i#10 processChars::numActive#10 processChars::$70 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::$70 ] ) always clobbers reg byte a -Statement [271] (byte~) processChars::$37 ← (byte) processChars::$70 << (byte) 1 [ processChars::i#10 processChars::numActive#10 processChars::$37 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::$37 ] ) always clobbers reg byte a -Statement [272] (struct ProcessingSprite*) processChars::processing#0 ← (const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (byte~) processChars::$37 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 ] ) always clobbers reg byte a -Statement [273] (byte) processChars::bitmask#0 ← (byte) 1 << *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID) [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 ] ) always clobbers reg byte a reg byte x reg byte y -Statement [274] if(*((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS)==(const byte) STATUS_FREE) goto processChars::@2 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 ] ) always clobbers reg byte a reg byte y -Statement [275] if(*((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS)!=(const byte) STATUS_NEW) goto processChars::@3 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 ] ) always clobbers reg byte a reg byte y -Statement [276] *(*((byte**)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR)) ← (byte) ' ' [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 ] ) always clobbers reg byte a reg byte x reg byte y -Statement [277] *((const byte*) SPRITES_ENABLE#0) ← *((const byte*) SPRITES_ENABLE#0) | (byte) processChars::bitmask#0 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 ] ) always clobbers reg byte a -Statement [278] *((const byte*) SPRITES_COLS#0 + *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID)) ← *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_COL) [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 ] ) always clobbers reg byte a reg byte y -Statement [279] *((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::numActive#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 ] ) always clobbers reg byte a reg byte y -Statement [280] *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) ← (const byte) STATUS_PROCESSING [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 ] ) always clobbers reg byte a reg byte y -Statement [281] (word) processChars::xpos#0 ← *((word*)(struct ProcessingSprite*) processChars::processing#0) >> (byte) 4 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 ] ) always clobbers reg byte a reg byte y -Statement [282] (byte~) processChars::$11 ← > (word) processChars::xpos#0 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 processChars::$11 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 processChars::$11 ] ) always clobbers reg byte a -Statement [284] (byte~) processChars::$12 ← (byte) $ff ^ (byte) processChars::bitmask#0 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 processChars::$12 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 processChars::$12 ] ) always clobbers reg byte a -Statement [285] *((const byte*) SPRITES_XMSB#0) ← *((const byte*) SPRITES_XMSB#0) & (byte~) processChars::$12 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 ] ) always clobbers reg byte a -Statement [286] (byte~) processChars::$17 ← (byte) processChars::i#10 << (byte) 1 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 processChars::$17 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 processChars::$17 ] ) always clobbers reg byte a -Statement [287] (byte~) processChars::$14 ← (byte)(word) processChars::xpos#0 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 processChars::$17 processChars::$14 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 processChars::$17 processChars::$14 ] ) always clobbers reg byte a -Statement [289] (word~) processChars::$15 ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y) >> (byte) 4 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 processChars::$17 processChars::$15 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 processChars::$17 processChars::$15 ] ) always clobbers reg byte a reg byte y -Statement [290] (byte) processChars::ypos#0 ← (byte)(word~) processChars::$15 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 processChars::$17 processChars::ypos#0 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 processChars::$17 processChars::ypos#0 ] ) always clobbers reg byte a -Statement [291] *((const byte*) SPRITES_YPOS#0 + (byte~) processChars::$17) ← (byte) processChars::ypos#0 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 processChars::ypos#0 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 processChars::ypos#0 ] ) always clobbers reg byte a -Statement [292] if(*((word*)(struct ProcessingSprite*) processChars::processing#0)<(const word) XPOS_LEFTMOST#0) goto processChars::@6 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 processChars::ypos#0 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 processChars::ypos#0 ] ) always clobbers reg byte a reg byte y -Statement [293] if(*((word*)(struct ProcessingSprite*) processChars::processing#0)>(const word) XPOS_RIGHTMOST#0) goto processChars::@6 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 processChars::ypos#0 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 processChars::ypos#0 ] ) always clobbers reg byte a reg byte y -Statement [294] if(*((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y)<(const word) YPOS_TOPMOST#0) goto processChars::@6 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 processChars::ypos#0 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 processChars::ypos#0 ] ) always clobbers reg byte a reg byte y -Statement [295] if(*((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y)>(const word) YPOS_BOTTOMMOST#0) goto processChars::@6 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 processChars::ypos#0 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 processChars::ypos#0 ] ) always clobbers reg byte a reg byte y -Statement [296] (word~) processChars::$25 ← (word) processChars::xpos#0 >> (byte) 3 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::ypos#0 processChars::$25 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::ypos#0 processChars::$25 ] ) always clobbers reg byte a -Statement [297] (byte~) processChars::$26 ← (byte)(word~) processChars::$25 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::ypos#0 processChars::$26 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::ypos#0 processChars::$26 ] ) always clobbers reg byte a -Statement [299] (byte~) processChars::$38 ← (byte) processChars::xchar#0 << (byte) 1 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::ypos#0 processChars::$38 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::ypos#0 processChars::$38 ] ) always clobbers reg byte a -Statement [300] *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX) + *((const word[$28]) VXSIN#0 + (byte~) processChars::$38) [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::ypos#0 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::ypos#0 ] ) always clobbers reg byte a reg byte y -Statement [301] *((word*)(struct ProcessingSprite*) processChars::processing#0) ← *((word*)(struct ProcessingSprite*) processChars::processing#0) + *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX) [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::ypos#0 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::ypos#0 ] ) always clobbers reg byte a reg byte y -Statement [302] (byte~) processChars::$30 ← (byte) processChars::ypos#0 >> (byte) 3 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::$30 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::$30 ] ) always clobbers reg byte a -Statement [304] (byte~) processChars::$39 ← (byte) processChars::ychar#0 << (byte) 1 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::$39 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::$39 ] ) always clobbers reg byte a -Statement [305] *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY) + *((const word[$19]) VYSIN#0 + (byte~) processChars::$39) [ processChars::i#10 processChars::numActive#10 processChars::processing#0 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 ] ) always clobbers reg byte a reg byte y -Statement [306] *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y) + *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY) [ processChars::i#10 processChars::numActive#10 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 ] ) always clobbers reg byte a reg byte y -Statement [310] if((byte) processChars::i#1!=(const byte) NUM_PROCESSING#0-(byte) 1+(byte) 1) goto processChars::@1 [ processChars::i#1 processChars::numActive#3 ] ( processChars:260 [ processChars::i#1 processChars::numActive#3 ] ) always clobbers reg byte a -Statement [312] *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) ← (const byte) STATUS_FREE [ processChars::i#10 processChars::numActive#10 processChars::bitmask#0 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::bitmask#0 ] ) always clobbers reg byte a reg byte y -Statement [313] (byte~) processChars::$33 ← (byte) $ff ^ (byte) processChars::bitmask#0 [ processChars::i#10 processChars::numActive#10 processChars::$33 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::$33 ] ) always clobbers reg byte a -Statement [314] *((const byte*) SPRITES_ENABLE#0) ← *((const byte*) SPRITES_ENABLE#0) & (byte~) processChars::$33 [ processChars::i#10 processChars::numActive#10 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 ] ) always clobbers reg byte a -Statement [315] *((const byte*) SPRITES_XMSB#0) ← *((const byte*) SPRITES_XMSB#0) | (byte) processChars::bitmask#0 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 ] ) always clobbers reg byte a -Statement [317] *((const byte*) RASTER#0) ← (const byte) RASTER_IRQ_MIDDLE#0 [ ] ( [ ] ) always clobbers reg byte a -Statement [318] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_ALL)(void()) irqBottom() [ ] ( [ ] ) always clobbers reg byte a -Statement [319] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 [ ] ( [ ] ) always clobbers reg byte a -Statement [320] return [ ] ( [ ] ) always clobbers reg byte a reg byte x reg byte y -Statement [3] (void*) SCREEN_COPY#0 ← (void*)(byte*) malloc::mem#0 [ SCREEN_COPY#0 heap_head#1 ] ( ) always clobbers reg byte a -Statement [5] (void*) SCREEN_DIST#0 ← (void*)(byte*) malloc::mem#0 [ SCREEN_COPY#0 SCREEN_DIST#0 heap_head#1 ] ( ) always clobbers reg byte a -Statement [9] (byte*) init_dist_screen::screen#0 ← (byte*)(void*) SCREEN_DIST#0 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::screen#0 heap_head#1 ] ( main:7 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::screen#0 heap_head#1 ] ) always clobbers reg byte a -Statement [11] (byte*) main::dst#0 ← (byte*)(void*) SCREEN_COPY#0 [ SCREEN_COPY#0 SCREEN_DIST#0 main::dst#0 ] ( main:7 [ SCREEN_COPY#0 SCREEN_DIST#0 main::dst#0 ] ) always clobbers reg byte a -Statement [13] *((byte*) main::dst#2) ← *((byte*) main::src#2) [ SCREEN_COPY#0 SCREEN_DIST#0 main::src#2 main::dst#2 ] ( main:7 [ SCREEN_COPY#0 SCREEN_DIST#0 main::src#2 main::dst#2 ] ) always clobbers reg byte a reg byte y -Statement [16] if((byte*) main::src#1!=(const byte*) SCREEN#0+(word) $3e8) goto main::@1 [ SCREEN_COPY#0 SCREEN_DIST#0 main::src#1 main::dst#1 ] ( main:7 [ SCREEN_COPY#0 SCREEN_DIST#0 main::src#1 main::dst#1 ] ) always clobbers reg byte a -Statement [18] (byte) main::$26 ← (byte) main::i#2 << (byte) 1 [ SCREEN_COPY#0 SCREEN_DIST#0 main::i#2 main::$26 ] ( main:7 [ SCREEN_COPY#0 SCREEN_DIST#0 main::i#2 main::$26 ] ) always clobbers reg byte a -Statement [19] (byte) main::$27 ← (byte) main::$26 + (byte) main::i#2 [ SCREEN_COPY#0 SCREEN_DIST#0 main::i#2 main::$27 ] ( main:7 [ SCREEN_COPY#0 SCREEN_DIST#0 main::i#2 main::$27 ] ) always clobbers reg byte a -Statement [20] (byte) main::$28 ← (byte) main::$27 << (byte) 1 [ SCREEN_COPY#0 SCREEN_DIST#0 main::i#2 main::$28 ] ( main:7 [ SCREEN_COPY#0 SCREEN_DIST#0 main::i#2 main::$28 ] ) always clobbers reg byte a -Statement [21] (byte) main::$29 ← (byte) main::$28 + (byte) main::i#2 [ SCREEN_COPY#0 SCREEN_DIST#0 main::i#2 main::$29 ] ( main:7 [ SCREEN_COPY#0 SCREEN_DIST#0 main::i#2 main::$29 ] ) always clobbers reg byte a -Statement [22] (byte~) main::$16 ← (byte) main::$29 << (byte) 1 [ SCREEN_COPY#0 SCREEN_DIST#0 main::i#2 main::$16 ] ( main:7 [ SCREEN_COPY#0 SCREEN_DIST#0 main::i#2 main::$16 ] ) always clobbers reg byte a -Statement [23] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (byte~) main::$16) ← (byte) 0 [ SCREEN_COPY#0 SCREEN_DIST#0 main::i#2 main::$16 ] ( main:7 [ SCREEN_COPY#0 SCREEN_DIST#0 main::i#2 main::$16 ] ) always clobbers reg byte a -Statement [24] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y + (byte~) main::$16) ← (byte) 0 [ SCREEN_COPY#0 SCREEN_DIST#0 main::i#2 main::$16 ] ( main:7 [ SCREEN_COPY#0 SCREEN_DIST#0 main::i#2 main::$16 ] ) always clobbers reg byte a -Statement [25] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX + (byte~) main::$16) ← (byte) 0 [ SCREEN_COPY#0 SCREEN_DIST#0 main::i#2 main::$16 ] ( main:7 [ SCREEN_COPY#0 SCREEN_DIST#0 main::i#2 main::$16 ] ) always clobbers reg byte a -Statement [26] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY + (byte~) main::$16) ← (byte) 0 [ SCREEN_COPY#0 SCREEN_DIST#0 main::i#2 main::$16 ] ( main:7 [ SCREEN_COPY#0 SCREEN_DIST#0 main::i#2 main::$16 ] ) always clobbers reg byte a -Statement [27] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID + (byte~) main::$16) ← (byte) 0 [ SCREEN_COPY#0 SCREEN_DIST#0 main::i#2 main::$16 ] ( main:7 [ SCREEN_COPY#0 SCREEN_DIST#0 main::i#2 main::$16 ] ) always clobbers reg byte a -Statement [28] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR + (byte~) main::$16) ← (byte) 0 [ SCREEN_COPY#0 SCREEN_DIST#0 main::i#2 main::$16 ] ( main:7 [ SCREEN_COPY#0 SCREEN_DIST#0 main::i#2 main::$16 ] ) always clobbers reg byte a -Statement [29] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_COL + (byte~) main::$16) ← (byte) 0 [ SCREEN_COPY#0 SCREEN_DIST#0 main::i#2 main::$16 ] ( main:7 [ SCREEN_COPY#0 SCREEN_DIST#0 main::i#2 main::$16 ] ) always clobbers reg byte a -Statement [30] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS + (byte~) main::$16) ← (const byte) STATUS_FREE [ SCREEN_COPY#0 SCREEN_DIST#0 main::i#2 main::$16 ] ( main:7 [ SCREEN_COPY#0 SCREEN_DIST#0 main::i#2 main::$16 ] ) always clobbers reg byte a -Statement [31] *((byte**)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR + (byte~) main::$16) ← (byte*) 0 [ SCREEN_COPY#0 SCREEN_DIST#0 main::i#2 ] ( main:7 [ SCREEN_COPY#0 SCREEN_DIST#0 main::i#2 ] ) always clobbers reg byte a -Statement [47] *((const byte*) SCREEN#0+(word) $3e7) ← (byte) '.' [ ] ( main:7 [ ] ) always clobbers reg byte a -Statement [55] (byte) startProcessing::$42 ← (byte) startProcessing::i#2 << (byte) 1 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#6 startProcessing::i#2 startProcessing::$42 ] ( main:7::startProcessing:51 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#6 startProcessing::i#2 startProcessing::$42 ] ) always clobbers reg byte a -Statement [56] (byte) startProcessing::$43 ← (byte) startProcessing::$42 + (byte) startProcessing::i#2 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#6 startProcessing::i#2 startProcessing::$43 ] ( main:7::startProcessing:51 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#6 startProcessing::i#2 startProcessing::$43 ] ) always clobbers reg byte a -Statement [57] (byte) startProcessing::$44 ← (byte) startProcessing::$43 << (byte) 1 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#6 startProcessing::i#2 startProcessing::$44 ] ( main:7::startProcessing:51 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#6 startProcessing::i#2 startProcessing::$44 ] ) always clobbers reg byte a -Statement [58] (byte) startProcessing::$45 ← (byte) startProcessing::$44 + (byte) startProcessing::i#2 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#6 startProcessing::i#2 startProcessing::$45 ] ( main:7::startProcessing:51 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#6 startProcessing::i#2 startProcessing::$45 ] ) always clobbers reg byte a -Statement [59] (byte~) startProcessing::$30 ← (byte) startProcessing::$45 << (byte) 1 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#6 startProcessing::i#2 startProcessing::$30 ] ( main:7::startProcessing:51 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#6 startProcessing::i#2 startProcessing::$30 ] ) always clobbers reg byte a -Statement [60] if(*((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS + (byte~) startProcessing::$30)!=(const byte) STATUS_FREE) goto startProcessing::@3 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#6 startProcessing::i#2 ] ( main:7::startProcessing:51 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#6 startProcessing::i#2 ] ) always clobbers reg byte a -Statement [63] (word~) startProcessing::$0 ← (word)(byte) startProcessing::center_y#0 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::$0 ] ( main:7::startProcessing:51 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::$0 ] ) always clobbers reg byte a -Statement [64] (word) startProcessing::$47 ← (word~) startProcessing::$0 << (byte) 2 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::$0 startProcessing::$47 ] ( main:7::startProcessing:51 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::$0 startProcessing::$47 ] ) always clobbers reg byte a -Statement [65] (word) startProcessing::$48 ← (word) startProcessing::$47 + (word~) startProcessing::$0 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::$48 ] ( main:7::startProcessing:51 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::$48 ] ) always clobbers reg byte a -Statement [66] (word~) startProcessing::$1 ← (word) startProcessing::$48 << (byte) 3 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::$1 ] ( main:7::startProcessing:51 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::$1 ] ) always clobbers reg byte a -Statement [67] (word) startProcessing::offset#0 ← (word~) startProcessing::$1 + (byte) startProcessing::center_x#0 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::offset#0 ] ( main:7::startProcessing:51 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::offset#0 ] ) always clobbers reg byte a -Statement [68] (byte*) startProcessing::colPtr#0 ← (const byte*) COLS#0 + (word) startProcessing::offset#0 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::offset#0 startProcessing::colPtr#0 ] ( main:7::startProcessing:51 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::offset#0 startProcessing::colPtr#0 ] ) always clobbers reg byte a -Statement [69] (byte) startProcessing::spriteCol#0 ← *((byte*) startProcessing::colPtr#0) [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::offset#0 startProcessing::spriteCol#0 ] ( main:7::startProcessing:51 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::offset#0 startProcessing::spriteCol#0 ] ) always clobbers reg byte a reg byte y -Statement [70] (byte*) startProcessing::screenPtr#0 ← (const byte*) SCREEN#0 + (word) startProcessing::offset#0 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 ] ( main:7::startProcessing:51 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 ] ) always clobbers reg byte a -Statement [71] (word~) startProcessing::$5 ← (word)(byte) startProcessing::freeIdx#2 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::$5 ] ( main:7::startProcessing:51 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::$5 ] ) always clobbers reg byte a -Statement [72] (word~) startProcessing::$6 ← (word~) startProcessing::$5 << (byte) 6 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::$6 ] ( main:7::startProcessing:51 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::$6 ] ) always clobbers reg byte a -Statement [73] (byte*) startProcessing::spriteData#0 ← (const byte*) SPRITE_DATA#0 + (word~) startProcessing::$6 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::spriteData#0 ] ( main:7::startProcessing:51 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::spriteData#0 ] ) always clobbers reg byte a -Statement [74] (byte) startProcessing::ch#0 ← *((byte*) startProcessing::screenPtr#0) [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::spriteData#0 startProcessing::ch#0 ] ( main:7::startProcessing:51 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::spriteData#0 startProcessing::ch#0 ] ) always clobbers reg byte a reg byte y -Statement [75] (word~) startProcessing::$8 ← (word)(byte) startProcessing::ch#0 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::spriteData#0 startProcessing::$8 ] ( main:7::startProcessing:51 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::spriteData#0 startProcessing::$8 ] ) always clobbers reg byte a -Statement [76] (word~) startProcessing::$9 ← (word~) startProcessing::$8 << (byte) 3 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::spriteData#0 startProcessing::$9 ] ( main:7::startProcessing:51 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::spriteData#0 startProcessing::$9 ] ) always clobbers reg byte a -Statement [77] (byte*) startProcessing::chargenData#0 ← (const byte*) CHARGEN#0 + (word~) startProcessing::$9 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::spriteData#0 startProcessing::chargenData#0 ] ( main:7::startProcessing:51 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::spriteData#0 startProcessing::chargenData#0 ] ) always clobbers reg byte a -Statement [79] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_CHARROM#0 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::spriteData#0 startProcessing::chargenData#0 ] ( main:7::startProcessing:51 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::spriteData#0 startProcessing::chargenData#0 ] ) always clobbers reg byte a -Statement [81] *((byte*) startProcessing::spriteData#2) ← *((byte*) startProcessing::chargenData#2) [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::chargenData#2 startProcessing::spriteData#2 startProcessing::i1#2 ] ( main:7::startProcessing:51 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::chargenData#2 startProcessing::spriteData#2 startProcessing::i1#2 ] ) always clobbers reg byte a reg byte y -Statement [82] (byte*) startProcessing::spriteData#1 ← (byte*) startProcessing::spriteData#2 + (byte) 3 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::chargenData#2 startProcessing::i1#2 startProcessing::spriteData#1 ] ( main:7::startProcessing:51 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::chargenData#2 startProcessing::i1#2 startProcessing::spriteData#1 ] ) always clobbers reg byte a -Statement [86] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 ] ( main:7::startProcessing:51 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 ] ) always clobbers reg byte a -Statement [88] (word~) startProcessing::$11 ← (word)(byte) startProcessing::center_x#0 [ startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::$11 ] ( main:7::startProcessing:51 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::$11 ] ) always clobbers reg byte a -Statement [89] (word~) startProcessing::$12 ← (word~) startProcessing::$11 << (byte) 3 [ startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::$12 ] ( main:7::startProcessing:51 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::$12 ] ) always clobbers reg byte a -Statement [90] (word~) startProcessing::$13 ← (const byte) BORDER_XPOS_LEFT#0 + (word~) startProcessing::$12 [ startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::$13 ] ( main:7::startProcessing:51 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::$13 ] ) always clobbers reg byte a -Statement [91] (word) startProcessing::spriteX#0 ← (word~) startProcessing::$13 << (byte) 4 [ startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::spriteX#0 ] ( main:7::startProcessing:51 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::spriteX#0 ] ) always clobbers reg byte a -Statement [92] (word~) startProcessing::$15 ← (word)(byte) startProcessing::center_y#0 [ startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::spriteX#0 startProcessing::$15 ] ( main:7::startProcessing:51 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::spriteX#0 startProcessing::$15 ] ) always clobbers reg byte a -Statement [93] (word~) startProcessing::$16 ← (word~) startProcessing::$15 << (byte) 3 [ startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::spriteX#0 startProcessing::$16 ] ( main:7::startProcessing:51 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::spriteX#0 startProcessing::$16 ] ) always clobbers reg byte a -Statement [94] (word~) startProcessing::$17 ← (const byte) BORDER_YPOS_TOP#0 + (word~) startProcessing::$16 [ startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::spriteX#0 startProcessing::$17 ] ( main:7::startProcessing:51 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::spriteX#0 startProcessing::$17 ] ) always clobbers reg byte a -Statement [95] (word) startProcessing::spriteY#0 ← (word~) startProcessing::$17 << (byte) 4 [ startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::spriteX#0 startProcessing::spriteY#0 ] ( main:7::startProcessing:51 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::spriteX#0 startProcessing::spriteY#0 ] ) always clobbers reg byte a -Statement [96] (byte) startProcessing::spritePtr#0 ← (byte)(const byte*) SPRITE_DATA#0/(byte) $40 + (byte) startProcessing::freeIdx#2 [ startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 ] ( main:7::startProcessing:51 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 ] ) always clobbers reg byte a -Statement [97] (byte~) startProcessing::$22 ← (byte) startProcessing::freeIdx#2 << (byte) 3 [ startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$22 ] ( main:7::startProcessing:51 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$22 ] ) always clobbers reg byte a -Statement [98] (word~) startProcessing::$23 ← (word)(byte~) startProcessing::$22 [ startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$23 ] ( main:7::startProcessing:51 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$23 ] ) always clobbers reg byte a -Statement [99] (byte) startProcessing::$50 ← (byte) startProcessing::freeIdx#2 << (byte) 1 [ startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$23 startProcessing::$50 ] ( main:7::startProcessing:51 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$23 startProcessing::$50 ] ) always clobbers reg byte a -Statement [100] (byte) startProcessing::$51 ← (byte) startProcessing::$50 + (byte) startProcessing::freeIdx#2 [ startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$23 startProcessing::$51 ] ( main:7::startProcessing:51 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$23 startProcessing::$51 ] ) always clobbers reg byte a -Statement [101] (byte) startProcessing::$52 ← (byte) startProcessing::$51 << (byte) 1 [ startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$23 startProcessing::$52 ] ( main:7::startProcessing:51 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$23 startProcessing::$52 ] ) always clobbers reg byte a -Statement [102] (byte) startProcessing::$53 ← (byte) startProcessing::$52 + (byte) startProcessing::freeIdx#2 [ startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$23 startProcessing::$53 ] ( main:7::startProcessing:51 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$23 startProcessing::$53 ] ) always clobbers reg byte a -Statement [103] (byte~) startProcessing::$31 ← (byte) startProcessing::$53 << (byte) 1 [ startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$23 startProcessing::$31 ] ( main:7::startProcessing:51 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$23 startProcessing::$31 ] ) always clobbers reg byte a -Statement [104] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (byte~) startProcessing::$31) ← (word) startProcessing::spriteX#0 [ startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$23 startProcessing::$31 ] ( main:7::startProcessing:51 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$23 startProcessing::$31 ] ) always clobbers reg byte a -Statement [105] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y + (byte~) startProcessing::$31) ← (word) startProcessing::spriteY#0 [ startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::spritePtr#0 startProcessing::$23 startProcessing::$31 ] ( main:7::startProcessing:51 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::spritePtr#0 startProcessing::$23 startProcessing::$31 ] ) always clobbers reg byte a -Statement [106] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX + (byte~) startProcessing::$31) ← (word~) startProcessing::$23 [ startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::spritePtr#0 startProcessing::$31 ] ( main:7::startProcessing:51 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::spritePtr#0 startProcessing::$31 ] ) always clobbers reg byte a -Statement [107] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY + (byte~) startProcessing::$31) ← (byte) $3c [ startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::spritePtr#0 startProcessing::$31 ] ( main:7::startProcessing:51 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::spritePtr#0 startProcessing::$31 ] ) always clobbers reg byte a -Statement [108] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID + (byte~) startProcessing::$31) ← (byte) startProcessing::freeIdx#2 [ startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::spritePtr#0 startProcessing::$31 ] ( main:7::startProcessing:51 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::spritePtr#0 startProcessing::$31 ] ) always clobbers reg byte a -Statement [109] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR + (byte~) startProcessing::$31) ← (byte) startProcessing::spritePtr#0 [ startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::$31 ] ( main:7::startProcessing:51 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::$31 ] ) always clobbers reg byte a -Statement [110] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_COL + (byte~) startProcessing::$31) ← (byte) startProcessing::spriteCol#0 [ startProcessing::screenPtr#0 startProcessing::$31 ] ( main:7::startProcessing:51 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::screenPtr#0 startProcessing::$31 ] ) always clobbers reg byte a -Statement [111] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS + (byte~) startProcessing::$31) ← (const byte) STATUS_NEW [ startProcessing::screenPtr#0 startProcessing::$31 ] ( main:7::startProcessing:51 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::screenPtr#0 startProcessing::$31 ] ) always clobbers reg byte a -Statement [112] *((byte**)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR + (byte~) startProcessing::$31) ← (byte*) startProcessing::screenPtr#0 [ ] ( main:7::startProcessing:51 [ SCREEN_COPY#0 SCREEN_DIST#0 ] ) always clobbers reg byte a -Statement [118] (byte*) getCharToProcess::screen_line#0 ← (byte*)(void*) SCREEN_COPY#0 [ SCREEN_COPY#0 SCREEN_DIST#0 getCharToProcess::screen_line#0 ] ( main:7::getCharToProcess:39 [ SCREEN_COPY#0 SCREEN_DIST#0 getCharToProcess::screen_line#0 ] ) always clobbers reg byte a -Statement [119] (byte*) getCharToProcess::dist_line#0 ← (byte*)(void*) SCREEN_DIST#0 [ SCREEN_COPY#0 SCREEN_DIST#0 getCharToProcess::screen_line#0 getCharToProcess::dist_line#0 ] ( main:7::getCharToProcess:39 [ SCREEN_COPY#0 SCREEN_DIST#0 getCharToProcess::screen_line#0 getCharToProcess::dist_line#0 ] ) always clobbers reg byte a -Statement [122] if(*((byte*) getCharToProcess::screen_line#4 + (byte) getCharToProcess::x#2)==(byte) ' ') goto getCharToProcess::@11 [ SCREEN_COPY#0 SCREEN_DIST#0 getCharToProcess::screen_line#4 getCharToProcess::dist_line#6 getCharToProcess::y#7 getCharToProcess::x#2 getCharToProcess::closest_dist#2 getCharToProcess::closest_x#7 getCharToProcess::closest_y#7 ] ( main:7::getCharToProcess:39 [ SCREEN_COPY#0 SCREEN_DIST#0 getCharToProcess::screen_line#4 getCharToProcess::dist_line#6 getCharToProcess::y#7 getCharToProcess::x#2 getCharToProcess::closest_dist#2 getCharToProcess::closest_x#7 getCharToProcess::closest_y#7 ] ) always clobbers reg byte a -Statement [123] (byte) getCharToProcess::dist#0 ← *((byte*) getCharToProcess::dist_line#6 + (byte) getCharToProcess::x#2) [ SCREEN_COPY#0 SCREEN_DIST#0 getCharToProcess::screen_line#4 getCharToProcess::dist_line#6 getCharToProcess::y#7 getCharToProcess::x#2 getCharToProcess::closest_dist#2 getCharToProcess::closest_x#7 getCharToProcess::closest_y#7 getCharToProcess::dist#0 ] ( main:7::getCharToProcess:39 [ SCREEN_COPY#0 SCREEN_DIST#0 getCharToProcess::screen_line#4 getCharToProcess::dist_line#6 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 [130] (byte*) getCharToProcess::screen_line#1 ← (byte*) getCharToProcess::screen_line#4 + (byte) $28 [ SCREEN_COPY#0 SCREEN_DIST#0 getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 getCharToProcess::dist_line#6 getCharToProcess::y#7 getCharToProcess::screen_line#1 ] ( main:7::getCharToProcess:39 [ SCREEN_COPY#0 SCREEN_DIST#0 getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 getCharToProcess::dist_line#6 getCharToProcess::y#7 getCharToProcess::screen_line#1 ] ) always clobbers reg byte a -Statement [131] (byte*) getCharToProcess::dist_line#1 ← (byte*) getCharToProcess::dist_line#6 + (byte) $28 [ SCREEN_COPY#0 SCREEN_DIST#0 getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 getCharToProcess::y#7 getCharToProcess::screen_line#1 getCharToProcess::dist_line#1 ] ( main:7::getCharToProcess:39 [ SCREEN_COPY#0 SCREEN_DIST#0 getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 getCharToProcess::y#7 getCharToProcess::screen_line#1 getCharToProcess::dist_line#1 ] ) always clobbers reg byte a -Statement [135] (word~) getCharToProcess::$8 ← (word)(byte) getCharToProcess::return_y#1 [ SCREEN_COPY#0 SCREEN_DIST#0 getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 getCharToProcess::$8 ] ( main:7::getCharToProcess:39 [ SCREEN_COPY#0 SCREEN_DIST#0 getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 getCharToProcess::$8 ] ) always clobbers reg byte a -Statement [136] (word) getCharToProcess::$12 ← (word~) getCharToProcess::$8 << (byte) 2 [ SCREEN_COPY#0 SCREEN_DIST#0 getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 getCharToProcess::$8 getCharToProcess::$12 ] ( main:7::getCharToProcess:39 [ SCREEN_COPY#0 SCREEN_DIST#0 getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 getCharToProcess::$8 getCharToProcess::$12 ] ) always clobbers reg byte a -Statement [137] (word) getCharToProcess::$13 ← (word) getCharToProcess::$12 + (word~) getCharToProcess::$8 [ SCREEN_COPY#0 SCREEN_DIST#0 getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 getCharToProcess::$13 ] ( main:7::getCharToProcess:39 [ SCREEN_COPY#0 SCREEN_DIST#0 getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 getCharToProcess::$13 ] ) always clobbers reg byte a -Statement [138] (word~) getCharToProcess::$9 ← (word) getCharToProcess::$13 << (byte) 3 [ SCREEN_COPY#0 SCREEN_DIST#0 getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 getCharToProcess::$9 ] ( main:7::getCharToProcess:39 [ SCREEN_COPY#0 SCREEN_DIST#0 getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 getCharToProcess::$9 ] ) always clobbers reg byte a -Statement [139] (byte*~) getCharToProcess::$10 ← (byte*)(void*) SCREEN_COPY#0 + (word~) getCharToProcess::$9 [ SCREEN_COPY#0 SCREEN_DIST#0 getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 getCharToProcess::$10 ] ( main:7::getCharToProcess:39 [ SCREEN_COPY#0 SCREEN_DIST#0 getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 getCharToProcess::$10 ] ) always clobbers reg byte a -Statement [140] *((byte*~) getCharToProcess::$10 + (byte) getCharToProcess::return_x#1) ← (byte) ' ' [ SCREEN_COPY#0 SCREEN_DIST#0 getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 ] ( main:7::getCharToProcess:39 [ SCREEN_COPY#0 SCREEN_DIST#0 getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 ] ) always clobbers reg byte a -Statement [147] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 [ ] ( main:7::setupRasterIrq:37 [ SCREEN_COPY#0 SCREEN_DIST#0 ] ) always clobbers reg byte a -Statement [148] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 [ ] ( main:7::setupRasterIrq:37 [ SCREEN_COPY#0 SCREEN_DIST#0 ] ) always clobbers reg byte a -Statement [149] *((const byte*) CIA1_INTERRUPT#0) ← (const byte) CIA_INTERRUPT_CLEAR#0 [ ] ( main:7::setupRasterIrq:37 [ SCREEN_COPY#0 SCREEN_DIST#0 ] ) always clobbers reg byte a -Statement [150] *((const byte*) VIC_CONTROL#0) ← *((const byte*) VIC_CONTROL#0) & (byte) $7f [ ] ( main:7::setupRasterIrq:37 [ SCREEN_COPY#0 SCREEN_DIST#0 ] ) always clobbers reg byte a -Statement [151] *((const byte*) RASTER#0) ← <(const byte) RASTER_IRQ_TOP#0 [ ] ( main:7::setupRasterIrq:37 [ SCREEN_COPY#0 SCREEN_DIST#0 ] ) always clobbers reg byte a -Statement [152] *((const byte*) IRQ_ENABLE#0) ← (const byte) IRQ_RASTER#0 [ ] ( main:7::setupRasterIrq:37 [ SCREEN_COPY#0 SCREEN_DIST#0 ] ) always clobbers reg byte a -Statement [153] *((const void()**) HARDWARE_IRQ#0) ← (const void()*) setupRasterIrq::irqRoutine#0 [ ] ( main:7::setupRasterIrq:37 [ SCREEN_COPY#0 SCREEN_DIST#0 ] ) always clobbers reg byte a -Statement [158] *((byte*) initSprites::sp#2) ← (byte) 0 [ initSprites::sp#2 ] ( main:7::initSprites:35 [ SCREEN_COPY#0 SCREEN_DIST#0 initSprites::sp#2 ] ) always clobbers reg byte a reg byte y -Statement [160] if((byte*) initSprites::sp#1<(const byte*) SPRITE_DATA#0+(const byte) NUM_PROCESSING#0*(byte) $40) goto initSprites::@1 [ initSprites::sp#1 ] ( main:7::initSprites:35 [ SCREEN_COPY#0 SCREEN_DIST#0 initSprites::sp#1 ] ) always clobbers reg byte a -Statement [162] *((const byte*) SPRITES_COLS#0 + (byte) initSprites::i#2) ← (const byte) LIGHT_BLUE#0 [ initSprites::i#2 ] ( main:7::initSprites:35 [ SCREEN_COPY#0 SCREEN_DIST#0 initSprites::i#2 ] ) always clobbers reg byte a -Statement [165] *((const byte*) SPRITES_MC#0) ← (byte) 0 [ ] ( main:7::initSprites:35 [ SCREEN_COPY#0 SCREEN_DIST#0 ] ) always clobbers reg byte a -Statement [166] *((const byte*) SPRITES_EXPAND_X#0) ← (byte) 0 [ ] ( main:7::initSprites:35 [ SCREEN_COPY#0 SCREEN_DIST#0 ] ) always clobbers reg byte a -Statement [167] *((const byte*) SPRITES_EXPAND_Y#0) ← (byte) 0 [ ] ( main:7::initSprites:35 [ SCREEN_COPY#0 SCREEN_DIST#0 ] ) always clobbers reg byte a -Statement [171] (byte*) init_dist_screen::screen_bottomline#0 ← (byte*) init_dist_screen::screen#0 + (word)(number) $28*(number) $18 [ init_dist_screen::screen#0 init_dist_screen::screen_bottomline#0 SQUARES#1 ] ( main:7::init_dist_screen:10 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::screen#0 init_dist_screen::screen_bottomline#0 SQUARES#1 ] ) always clobbers reg byte a -Statement [173] (byte) init_dist_screen::y2#0 ← (byte) init_dist_screen::y#10 << (byte) 1 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::y2#0 SQUARES#1 ] ( main:7::init_dist_screen:10 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::y2#0 SQUARES#1 ] ) always clobbers reg byte a -Statement [175] (byte~) init_dist_screen::$5 ← (byte) $18 - (byte) init_dist_screen::y2#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::$5 SQUARES#1 ] ( main:7::init_dist_screen:10 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::$5 SQUARES#1 ] ) always clobbers reg byte a -Statement [179] (word) sqr::return#2 ← (word) sqr::return#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 sqr::return#2 SQUARES#1 ] ( main:7::init_dist_screen:10 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 sqr::return#2 SQUARES#1 ] ) always clobbers reg byte a -Statement [180] (word) init_dist_screen::yds#0 ← (word) sqr::return#2 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 SQUARES#1 ] ( main:7::init_dist_screen:10 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 SQUARES#1 ] ) always clobbers reg byte a -Statement [182] (byte) init_dist_screen::x2#0 ← (byte) init_dist_screen::x#2 << (byte) 1 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::x2#0 SQUARES#1 ] ( main:7::init_dist_screen:10 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::x2#0 SQUARES#1 ] ) always clobbers reg byte a -Statement [184] (byte~) init_dist_screen::$13 ← (byte) $27 - (byte) init_dist_screen::x2#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::$13 SQUARES#1 ] ( main:7::init_dist_screen:10 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::$13 SQUARES#1 ] ) always clobbers reg byte a -Statement [188] (word) sqr::return#3 ← (word) sqr::return#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqr::return#3 SQUARES#1 ] ( main:7::init_dist_screen:10 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqr::return#3 SQUARES#1 ] ) always clobbers reg byte a -Statement [189] (word) init_dist_screen::xds#0 ← (word) sqr::return#3 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::xds#0 SQUARES#1 ] ( main:7::init_dist_screen:10 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::xds#0 SQUARES#1 ] ) always clobbers reg byte a -Statement [190] (word) init_dist_screen::ds#0 ← (word) init_dist_screen::xds#0 + (word) init_dist_screen::yds#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::ds#0 SQUARES#1 ] ( main:7::init_dist_screen:10 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::ds#0 SQUARES#1 ] ) always clobbers reg byte a -Statement [191] (word) sqrt::val#0 ← (word) init_dist_screen::ds#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqrt::val#0 SQUARES#1 ] ( main:7::init_dist_screen:10 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqrt::val#0 SQUARES#1 ] ) always clobbers reg byte a -Statement [195] *((byte*) init_dist_screen::screen_topline#10 + (byte) init_dist_screen::x#2) ← (byte) init_dist_screen::d#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::d#0 SQUARES#1 ] ( main:7::init_dist_screen:10 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::d#0 SQUARES#1 ] ) always clobbers reg byte y -Statement [196] *((byte*) init_dist_screen::screen_bottomline#10 + (byte) init_dist_screen::x#2) ← (byte) init_dist_screen::d#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::d#0 SQUARES#1 ] ( main:7::init_dist_screen:10 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::d#0 SQUARES#1 ] ) always clobbers reg byte y -Statement [197] *((byte*) init_dist_screen::screen_topline#10 + (byte) init_dist_screen::xb#2) ← (byte) init_dist_screen::d#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::d#0 SQUARES#1 ] ( main:7::init_dist_screen:10 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::d#0 SQUARES#1 ] ) always clobbers reg byte y -Statement [198] *((byte*) init_dist_screen::screen_bottomline#10 + (byte) init_dist_screen::xb#2) ← (byte) init_dist_screen::d#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 ] ( main:7::init_dist_screen:10 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 ] ) always clobbers reg byte y -Statement [202] (byte*) init_dist_screen::screen_topline#1 ← (byte*) init_dist_screen::screen_topline#10 + (byte) $28 [ init_dist_screen::y#10 init_dist_screen::screen_bottomline#10 init_dist_screen::screen_topline#1 SQUARES#1 ] ( main:7::init_dist_screen:10 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::y#10 init_dist_screen::screen_bottomline#10 init_dist_screen::screen_topline#1 SQUARES#1 ] ) always clobbers reg byte a -Statement [203] (byte*) init_dist_screen::screen_bottomline#1 ← (byte*) init_dist_screen::screen_bottomline#10 - (byte) $28 [ init_dist_screen::y#10 init_dist_screen::screen_topline#1 init_dist_screen::screen_bottomline#1 SQUARES#1 ] ( main:7::init_dist_screen:10 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::y#10 init_dist_screen::screen_topline#1 init_dist_screen::screen_bottomline#1 SQUARES#1 ] ) always clobbers reg byte a -Statement [209] (word) bsearch16u::key#0 ← (word) sqrt::val#0 [ bsearch16u::key#0 SQUARES#1 ] ( main:7::init_dist_screen:10::sqrt:192 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::key#0 SQUARES#1 ] ) always clobbers reg byte a -Statement [210] (word*) bsearch16u::items#1 ← (word*)(void*) SQUARES#1 [ bsearch16u::key#0 bsearch16u::items#1 SQUARES#1 ] ( main:7::init_dist_screen:10::sqrt:192 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::key#0 bsearch16u::items#1 SQUARES#1 ] ) always clobbers reg byte a -Statement [212] (word*) bsearch16u::return#3 ← (word*) bsearch16u::return#1 [ SQUARES#1 bsearch16u::return#3 ] ( main:7::init_dist_screen:10::sqrt:192 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::return#3 ] ) always clobbers reg byte a -Statement [213] (word*) sqrt::found#0 ← (word*) bsearch16u::return#3 [ SQUARES#1 sqrt::found#0 ] ( main:7::init_dist_screen:10::sqrt:192 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 sqrt::found#0 ] ) always clobbers reg byte a -Statement [214] (word~) sqrt::$3 ← (word*) sqrt::found#0 - (word*)(void*) SQUARES#1 [ SQUARES#1 sqrt::$3 ] ( main:7::init_dist_screen:10::sqrt:192 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 sqrt::$3 ] ) always clobbers reg byte a -Statement [215] (word~) sqrt::$1 ← (word~) sqrt::$3 >> (byte) 1 [ SQUARES#1 sqrt::$1 ] ( main:7::init_dist_screen:10::sqrt:192 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 sqrt::$1 ] ) always clobbers reg byte a -Statement [216] (byte) sqrt::return#0 ← (byte)(word~) sqrt::$1 [ sqrt::return#0 SQUARES#1 ] ( main:7::init_dist_screen:10::sqrt:192 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqrt::return#0 SQUARES#1 ] ) always clobbers reg byte a -Statement [221] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@2 [ bsearch16u::items#2 ] ( main:7::init_dist_screen:10::sqrt:192::bsearch16u:211 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::items#2 ] ) always clobbers reg byte a reg byte y -Statement [222] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#2 - (byte) 1*(const byte) SIZEOF_WORD [ bsearch16u::$2 ] ( main:7::init_dist_screen:10::sqrt:192::bsearch16u:211 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::$2 ] ) always clobbers reg byte a -Statement [226] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#3 >> (byte) 1 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$6 ] ( main:7::init_dist_screen:10::sqrt:192::bsearch16u:211 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$6 ] ) always clobbers reg byte a -Statement [227] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$16 ] ( main:7::init_dist_screen:10::sqrt:192::bsearch16u:211 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$16 ] ) always clobbers reg byte a -Statement [228] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#2 + (byte~) bsearch16u::$16 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ( main:7::init_dist_screen:10::sqrt:192::bsearch16u:211 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ) always clobbers reg byte a -Statement [229] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0) [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ( main:7::init_dist_screen:10::sqrt:192::bsearch16u:211 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ) always clobbers reg byte a reg byte y -Statement [230] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ( main:7::init_dist_screen:10::sqrt:192::bsearch16u:211 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ) always clobbers reg byte a -Statement [231] (word*~) bsearch16u::return#6 ← (word*) bsearch16u::pivot#0 [ bsearch16u::return#6 ] ( main:7::init_dist_screen:10::sqrt:192::bsearch16u:211 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::return#6 ] ) always clobbers reg byte a -Statement [232] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@7 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ( main:7::init_dist_screen:10::sqrt:192::bsearch16u:211 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ) always clobbers reg byte a -Statement [233] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#0 ] ( main:7::init_dist_screen:10::sqrt:192::bsearch16u:211 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#0 ] ) always clobbers reg byte a -Statement [238] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 [ SQUARES#1 sqr::$0 ] ( main:7::init_dist_screen:10::sqr:178 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 SQUARES#1 sqr::$0 ] main:7::init_dist_screen:10::sqr:187 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 sqr::$0 ] ) always clobbers reg byte a -Statement [239] (word) sqr::return#0 ← *((word*)(void*) SQUARES#1 + (byte~) sqr::$0) [ sqr::return#0 SQUARES#1 ] ( main:7::init_dist_screen:10::sqr:178 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 sqr::return#0 SQUARES#1 ] main:7::init_dist_screen:10::sqr:187 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqr::return#0 SQUARES#1 ] ) always clobbers reg byte a reg byte y -Statement [243] (void*) SQUARES#1 ← (void*)(byte*) malloc::mem#0 [ SQUARES#1 ] ( main:7::init_dist_screen:10::init_squares:170 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::screen#0 SQUARES#1 ] ) always clobbers reg byte a -Statement [244] (word*) init_squares::squares#0 ← (word*)(void*) SQUARES#1 [ SQUARES#1 init_squares::squares#0 ] ( main:7::init_dist_screen:10::init_squares:170 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::screen#0 SQUARES#1 init_squares::squares#0 ] ) always clobbers reg byte a -Statement [246] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 [ SQUARES#1 init_squares::sqr#2 init_squares::squares#2 init_squares::i#2 ] ( main:7::init_dist_screen:10::init_squares:170 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::screen#0 SQUARES#1 init_squares::sqr#2 init_squares::squares#2 init_squares::i#2 ] ) always clobbers reg byte a reg byte y -Statement [247] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD [ SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 ] ( main:7::init_dist_screen:10::init_squares:170 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::screen#0 SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 ] ) always clobbers reg byte a -Statement [248] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 [ SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 init_squares::$3 ] ( main:7::init_dist_screen:10::init_squares:170 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::screen#0 SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 init_squares::$3 ] ) always clobbers reg byte a -Statement [250] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 [ SQUARES#1 init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ( main:7::init_dist_screen:10::init_squares:170 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::screen#0 SQUARES#1 init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ) always clobbers reg byte a -Statement [255] (byte*) malloc::mem#0 ← (byte*) heap_head#12 [ malloc::mem#0 heap_head#12 malloc::size#3 ] ( malloc:2 [ malloc::mem#0 heap_head#12 malloc::size#3 ] malloc:4 [ malloc::mem#0 heap_head#12 malloc::size#3 ] main:7::init_dist_screen:10::init_squares:170::malloc:242 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::screen#0 malloc::mem#0 heap_head#12 malloc::size#3 ] ) always clobbers reg byte a -Statement [256] (byte*) heap_head#1 ← (byte*) heap_head#12 + (word) malloc::size#3 [ malloc::mem#0 heap_head#1 ] ( malloc:2 [ malloc::mem#0 heap_head#1 ] malloc:4 [ malloc::mem#0 heap_head#1 ] main:7::init_dist_screen:10::init_squares:170::malloc:242 [ SCREEN_COPY#0 SCREEN_DIST#0 init_dist_screen::screen#0 malloc::mem#0 heap_head#1 ] ) always clobbers reg byte a -Statement [261] *((const byte*) RASTER#0) ← (const byte) RASTER_IRQ_TOP#0 [ ] ( [ ] ) always clobbers reg byte a -Statement [262] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_ALL)(void()) irqTop() [ ] ( [ ] ) always clobbers reg byte a -Statement [263] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 [ ] ( [ ] ) always clobbers reg byte a -Statement [264] return [ ] ( [ ] ) always clobbers reg byte a reg byte x reg byte y -Statement [267] (byte) processChars::$67 ← (byte) processChars::i#10 << (byte) 1 [ processChars::i#10 processChars::numActive#10 processChars::$67 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::$67 ] ) always clobbers reg byte a -Statement [268] (byte) processChars::$68 ← (byte) processChars::$67 + (byte) processChars::i#10 [ processChars::i#10 processChars::numActive#10 processChars::$68 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::$68 ] ) always clobbers reg byte a -Statement [269] (byte) processChars::$69 ← (byte) processChars::$68 << (byte) 1 [ processChars::i#10 processChars::numActive#10 processChars::$69 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::$69 ] ) always clobbers reg byte a -Statement [270] (byte) processChars::$70 ← (byte) processChars::$69 + (byte) processChars::i#10 [ processChars::i#10 processChars::numActive#10 processChars::$70 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::$70 ] ) always clobbers reg byte a -Statement [271] (byte~) processChars::$37 ← (byte) processChars::$70 << (byte) 1 [ processChars::i#10 processChars::numActive#10 processChars::$37 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::$37 ] ) always clobbers reg byte a -Statement [272] (struct ProcessingSprite*) processChars::processing#0 ← (const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (byte~) processChars::$37 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 ] ) always clobbers reg byte a -Statement [273] (byte) processChars::bitmask#0 ← (byte) 1 << *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID) [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 ] ) always clobbers reg byte a reg byte x reg byte y -Statement [274] if(*((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS)==(const byte) STATUS_FREE) goto processChars::@2 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 ] ) always clobbers reg byte a reg byte y -Statement [275] if(*((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS)!=(const byte) STATUS_NEW) goto processChars::@3 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 ] ) always clobbers reg byte a reg byte y -Statement [276] *(*((byte**)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR)) ← (byte) ' ' [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 ] ) always clobbers reg byte a reg byte x reg byte y -Statement [277] *((const byte*) SPRITES_ENABLE#0) ← *((const byte*) SPRITES_ENABLE#0) | (byte) processChars::bitmask#0 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 ] ) always clobbers reg byte a -Statement [278] *((const byte*) SPRITES_COLS#0 + *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID)) ← *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_COL) [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 ] ) always clobbers reg byte a reg byte y -Statement [279] *((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::numActive#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 ] ) always clobbers reg byte a reg byte y -Statement [280] *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) ← (const byte) STATUS_PROCESSING [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 ] ) always clobbers reg byte a reg byte y -Statement [281] (word) processChars::xpos#0 ← *((word*)(struct ProcessingSprite*) processChars::processing#0) >> (byte) 4 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 ] ) always clobbers reg byte a reg byte y -Statement [282] (byte~) processChars::$11 ← > (word) processChars::xpos#0 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 processChars::$11 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 processChars::$11 ] ) always clobbers reg byte a -Statement [284] (byte~) processChars::$12 ← (byte) $ff ^ (byte) processChars::bitmask#0 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 processChars::$12 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 processChars::$12 ] ) always clobbers reg byte a -Statement [285] *((const byte*) SPRITES_XMSB#0) ← *((const byte*) SPRITES_XMSB#0) & (byte~) processChars::$12 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 ] ) always clobbers reg byte a -Statement [286] (byte~) processChars::$17 ← (byte) processChars::i#10 << (byte) 1 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 processChars::$17 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 processChars::$17 ] ) always clobbers reg byte a -Statement [287] (byte~) processChars::$14 ← (byte)(word) processChars::xpos#0 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 processChars::$17 processChars::$14 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 processChars::$17 processChars::$14 ] ) always clobbers reg byte a -Statement [289] (word~) processChars::$15 ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y) >> (byte) 4 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 processChars::$17 processChars::$15 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 processChars::$17 processChars::$15 ] ) always clobbers reg byte a reg byte y -Statement [290] (byte) processChars::ypos#0 ← (byte)(word~) processChars::$15 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 processChars::$17 processChars::ypos#0 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 processChars::$17 processChars::ypos#0 ] ) always clobbers reg byte a -Statement [291] *((const byte*) SPRITES_YPOS#0 + (byte~) processChars::$17) ← (byte) processChars::ypos#0 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 processChars::ypos#0 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 processChars::ypos#0 ] ) always clobbers reg byte a -Statement [292] if(*((word*)(struct ProcessingSprite*) processChars::processing#0)<(const word) XPOS_LEFTMOST#0) goto processChars::@6 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 processChars::ypos#0 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 processChars::ypos#0 ] ) always clobbers reg byte a reg byte y -Statement [293] if(*((word*)(struct ProcessingSprite*) processChars::processing#0)>(const word) XPOS_RIGHTMOST#0) goto processChars::@6 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 processChars::ypos#0 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 processChars::ypos#0 ] ) always clobbers reg byte a reg byte y -Statement [294] if(*((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y)<(const word) YPOS_TOPMOST#0) goto processChars::@6 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 processChars::ypos#0 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 processChars::ypos#0 ] ) always clobbers reg byte a reg byte y -Statement [295] if(*((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y)>(const word) YPOS_BOTTOMMOST#0) goto processChars::@6 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 processChars::ypos#0 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 processChars::ypos#0 ] ) always clobbers reg byte a reg byte y -Statement [296] (word~) processChars::$25 ← (word) processChars::xpos#0 >> (byte) 3 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::ypos#0 processChars::$25 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::ypos#0 processChars::$25 ] ) always clobbers reg byte a -Statement [297] (byte~) processChars::$26 ← (byte)(word~) processChars::$25 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::ypos#0 processChars::$26 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::ypos#0 processChars::$26 ] ) always clobbers reg byte a -Statement [299] (byte~) processChars::$38 ← (byte) processChars::xchar#0 << (byte) 1 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::ypos#0 processChars::$38 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::ypos#0 processChars::$38 ] ) always clobbers reg byte a -Statement [300] *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX) + *((const word[$28]) VXSIN#0 + (byte~) processChars::$38) [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::ypos#0 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::ypos#0 ] ) always clobbers reg byte a reg byte y -Statement [301] *((word*)(struct ProcessingSprite*) processChars::processing#0) ← *((word*)(struct ProcessingSprite*) processChars::processing#0) + *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX) [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::ypos#0 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::ypos#0 ] ) always clobbers reg byte a reg byte y -Statement [302] (byte~) processChars::$30 ← (byte) processChars::ypos#0 >> (byte) 3 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::$30 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::$30 ] ) always clobbers reg byte a -Statement [304] (byte~) processChars::$39 ← (byte) processChars::ychar#0 << (byte) 1 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::$39 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::$39 ] ) always clobbers reg byte a -Statement [305] *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY) + *((const word[$19]) VYSIN#0 + (byte~) processChars::$39) [ processChars::i#10 processChars::numActive#10 processChars::processing#0 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 ] ) always clobbers reg byte a reg byte y -Statement [306] *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y) + *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY) [ processChars::i#10 processChars::numActive#10 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 ] ) always clobbers reg byte a reg byte y -Statement [310] if((byte) processChars::i#1!=(const byte) NUM_PROCESSING#0-(byte) 1+(byte) 1) goto processChars::@1 [ processChars::i#1 processChars::numActive#3 ] ( processChars:260 [ processChars::i#1 processChars::numActive#3 ] ) always clobbers reg byte a -Statement [312] *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) ← (const byte) STATUS_FREE [ processChars::i#10 processChars::numActive#10 processChars::bitmask#0 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::bitmask#0 ] ) always clobbers reg byte a reg byte y -Statement [313] (byte~) processChars::$33 ← (byte) $ff ^ (byte) processChars::bitmask#0 [ processChars::i#10 processChars::numActive#10 processChars::$33 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::$33 ] ) always clobbers reg byte a -Statement [314] *((const byte*) SPRITES_ENABLE#0) ← *((const byte*) SPRITES_ENABLE#0) & (byte~) processChars::$33 [ processChars::i#10 processChars::numActive#10 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 ] ) always clobbers reg byte a -Statement [315] *((const byte*) SPRITES_XMSB#0) ← *((const byte*) SPRITES_XMSB#0) | (byte) processChars::bitmask#0 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 ] ( processChars:260 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 ] ) always clobbers reg byte a -Statement [317] *((const byte*) RASTER#0) ← (const byte) RASTER_IRQ_MIDDLE#0 [ ] ( [ ] ) always clobbers reg byte a -Statement [318] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_ALL)(void()) irqBottom() [ ] ( [ ] ) always clobbers reg byte a -Statement [319] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 [ ] ( [ ] ) always clobbers reg byte a -Statement [320] return [ ] ( [ ] ) always clobbers reg byte a reg byte x reg byte y +Statement [169] (byte*) init_angle_screen::screen_topline#0 ← (byte*) init_angle_screen::screen#0 + (word)(number) $28*(number) $c [ init_angle_screen::screen#0 init_angle_screen::screen_topline#0 ] ( main:7::init_angle_screen:10 [ SCREEN_COPY#0 SCREEN_DIST#0 init_angle_screen::screen#0 init_angle_screen::screen_topline#0 ] ) always clobbers reg byte a +Statement [170] (byte*) init_angle_screen::screen_bottomline#0 ← (byte*) init_angle_screen::screen#0 + (word)(number) $28*(number) $c [ init_angle_screen::screen_topline#0 init_angle_screen::screen_bottomline#0 ] ( main:7::init_angle_screen:10 [ SCREEN_COPY#0 SCREEN_DIST#0 init_angle_screen::screen_topline#0 init_angle_screen::screen_bottomline#0 ] ) always clobbers reg byte a +Statement [173] (byte~) init_angle_screen::$2 ← (byte) init_angle_screen::x#2 << (byte) 1 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::$2 ] ( main:7::init_angle_screen:10 [ SCREEN_COPY#0 SCREEN_DIST#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::$2 ] ) always clobbers reg byte a +Statement [174] (byte~) init_angle_screen::$3 ← (byte) $27 - (byte~) init_angle_screen::$2 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::$3 ] ( main:7::init_angle_screen:10 [ SCREEN_COPY#0 SCREEN_DIST#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::$3 ] ) always clobbers reg byte a +Statement [175] (word) init_angle_screen::xw#0 ← (byte~) init_angle_screen::$3 w= (byte) 0 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::xw#0 ] ( main:7::init_angle_screen:10 [ SCREEN_COPY#0 SCREEN_DIST#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::xw#0 ] ) always clobbers reg byte y +Statement [176] (byte~) init_angle_screen::$6 ← (byte) init_angle_screen::y#4 << (byte) 1 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::xw#0 init_angle_screen::$6 ] ( main:7::init_angle_screen:10 [ SCREEN_COPY#0 SCREEN_DIST#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::xw#0 init_angle_screen::$6 ] ) always clobbers reg byte a +Statement [177] (word) init_angle_screen::yw#0 ← (byte~) init_angle_screen::$6 w= (byte) 0 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::xw#0 init_angle_screen::yw#0 ] ( main:7::init_angle_screen:10 [ SCREEN_COPY#0 SCREEN_DIST#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::xw#0 init_angle_screen::yw#0 ] ) always clobbers reg byte y +Statement [178] (signed word) atan2_16::x#0 ← (signed word)(word) init_angle_screen::xw#0 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::yw#0 atan2_16::x#0 ] ( main:7::init_angle_screen:10 [ SCREEN_COPY#0 SCREEN_DIST#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::yw#0 atan2_16::x#0 ] ) always clobbers reg byte a +Statement [179] (signed word) atan2_16::y#0 ← (signed word)(word) init_angle_screen::yw#0 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 ] ( main:7::init_angle_screen:10 [ SCREEN_COPY#0 SCREEN_DIST#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 ] ) always clobbers reg byte a +Statement [181] (word) atan2_16::return#2 ← (word) atan2_16::return#0 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::return#2 ] ( main:7::init_angle_screen:10 [ SCREEN_COPY#0 SCREEN_DIST#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::return#2 ] ) always clobbers reg byte a +Statement [182] (word) init_angle_screen::angle_w#0 ← (word) atan2_16::return#2 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::angle_w#0 ] ( main:7::init_angle_screen:10 [ SCREEN_COPY#0 SCREEN_DIST#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::angle_w#0 ] ) always clobbers reg byte a +Statement [183] (word~) init_angle_screen::$10 ← (word) init_angle_screen::angle_w#0 + (byte) $80 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::$10 ] ( main:7::init_angle_screen:10 [ SCREEN_COPY#0 SCREEN_DIST#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::$10 ] ) always clobbers reg byte a +Statement [184] (byte) init_angle_screen::ang_w#0 ← > (word~) init_angle_screen::$10 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ( main:7::init_angle_screen:10 [ SCREEN_COPY#0 SCREEN_DIST#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ) always clobbers reg byte a +Statement [185] *((byte*) init_angle_screen::screen_bottomline#5 + (byte) init_angle_screen::xb#2) ← (byte) init_angle_screen::ang_w#0 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ( main:7::init_angle_screen:10 [ SCREEN_COPY#0 SCREEN_DIST#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ) always clobbers reg byte a reg byte y +Statement [186] (byte~) init_angle_screen::$12 ← - (byte) init_angle_screen::ang_w#0 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 init_angle_screen::$12 ] ( main:7::init_angle_screen:10 [ SCREEN_COPY#0 SCREEN_DIST#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 init_angle_screen::$12 ] ) always clobbers reg byte a +Statement [187] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::xb#2) ← (byte~) init_angle_screen::$12 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ( main:7::init_angle_screen:10 [ SCREEN_COPY#0 SCREEN_DIST#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ) always clobbers reg byte y +Statement [188] (byte~) init_angle_screen::$13 ← (byte) $80 + (byte) init_angle_screen::ang_w#0 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 init_angle_screen::$13 ] ( main:7::init_angle_screen:10 [ SCREEN_COPY#0 SCREEN_DIST#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 init_angle_screen::$13 ] ) always clobbers reg byte a +Statement [189] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$13 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ( main:7::init_angle_screen:10 [ SCREEN_COPY#0 SCREEN_DIST#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ) always clobbers reg byte y +Statement [190] (byte~) init_angle_screen::$14 ← (byte) $80 - (byte) init_angle_screen::ang_w#0 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::$14 ] ( main:7::init_angle_screen:10 [ SCREEN_COPY#0 SCREEN_DIST#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::$14 ] ) always clobbers reg byte a +Statement [191] *((byte*) init_angle_screen::screen_bottomline#5 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$14 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 ] ( main:7::init_angle_screen:10 [ SCREEN_COPY#0 SCREEN_DIST#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 ] ) always clobbers reg byte y +Statement [195] (byte*) init_angle_screen::screen_topline#1 ← (byte*) init_angle_screen::screen_topline#5 - (byte) $28 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#1 ] ( main:7::init_angle_screen:10 [ SCREEN_COPY#0 SCREEN_DIST#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#1 ] ) always clobbers reg byte a +Statement [196] (byte*) init_angle_screen::screen_bottomline#1 ← (byte*) init_angle_screen::screen_bottomline#5 + (byte) $28 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#1 init_angle_screen::screen_topline#1 ] ( main:7::init_angle_screen:10 [ SCREEN_COPY#0 SCREEN_DIST#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#1 init_angle_screen::screen_topline#1 ] ) always clobbers reg byte a +Statement [200] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 [ atan2_16::x#0 atan2_16::y#0 ] ( main:7::init_angle_screen:10::atan2_16:180 [ SCREEN_COPY#0 SCREEN_DIST#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 ] ) always clobbers reg byte a +Statement [201] (signed word~) atan2_16::$2 ← - (signed word) atan2_16::y#0 [ atan2_16::x#0 atan2_16::y#0 atan2_16::$2 ] ( main:7::init_angle_screen:10::atan2_16:180 [ SCREEN_COPY#0 SCREEN_DIST#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::$2 ] ) always clobbers reg byte a +Statement [203] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 ] ( main:7::init_angle_screen:10::atan2_16:180 [ SCREEN_COPY#0 SCREEN_DIST#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 ] ) always clobbers reg byte a +Statement [204] (signed word~) atan2_16::$7 ← - (signed word) atan2_16::x#0 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 atan2_16::$7 ] ( main:7::init_angle_screen:10::atan2_16:180 [ SCREEN_COPY#0 SCREEN_DIST#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 atan2_16::$7 ] ) always clobbers reg byte a +Statement [207] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@11 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 ] ( main:7::init_angle_screen:10::atan2_16:180 [ SCREEN_COPY#0 SCREEN_DIST#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 ] ) always clobbers reg byte a +Statement [209] (word) atan2_16::angle#1 ← (word) atan2_16::angle#6 >> (byte) 1 [ atan2_16::x#0 atan2_16::y#0 atan2_16::angle#1 ] ( main:7::init_angle_screen:10::atan2_16:180 [ SCREEN_COPY#0 SCREEN_DIST#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::angle#1 ] ) always clobbers reg byte a +Statement [210] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7 [ atan2_16::y#0 atan2_16::angle#1 ] ( main:7::init_angle_screen:10::atan2_16:180 [ SCREEN_COPY#0 SCREEN_DIST#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::y#0 atan2_16::angle#1 ] ) always clobbers reg byte a +Statement [211] (word) atan2_16::angle#4 ← (word) $8000 - (word) atan2_16::angle#1 [ atan2_16::y#0 atan2_16::angle#4 ] ( main:7::init_angle_screen:10::atan2_16:180 [ SCREEN_COPY#0 SCREEN_DIST#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::y#0 atan2_16::angle#4 ] ) always clobbers reg byte a +Statement [213] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8 [ atan2_16::angle#11 ] ( main:7::init_angle_screen:10::atan2_16:180 [ SCREEN_COPY#0 SCREEN_DIST#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::angle#11 ] ) always clobbers reg byte a +Statement [214] (word) atan2_16::angle#5 ← - (word) atan2_16::angle#11 [ atan2_16::angle#5 ] ( main:7::init_angle_screen:10::atan2_16:180 [ SCREEN_COPY#0 SCREEN_DIST#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::angle#5 ] ) always clobbers reg byte a +Statement [218] (signed word~) atan2_16::xd#10 ← (signed word) atan2_16::xi#3 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#5 atan2_16::xd#10 ] ( main:7::init_angle_screen:10::atan2_16:180 [ SCREEN_COPY#0 SCREEN_DIST#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#5 atan2_16::xd#10 ] ) always clobbers reg byte a +Statement [219] (signed word~) atan2_16::yd#10 ← (signed word) atan2_16::yi#3 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#5 atan2_16::xd#10 atan2_16::yd#10 ] ( main:7::init_angle_screen:10::atan2_16:180 [ SCREEN_COPY#0 SCREEN_DIST#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#5 atan2_16::xd#10 atan2_16::yd#10 ] ) always clobbers reg byte a +Statement [223] (signed word) atan2_16::xd#2 ← (signed word) atan2_16::xd#3 >> (signed byte) 1 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::yd#3 atan2_16::xd#2 ] ( main:7::init_angle_screen:10::atan2_16:180 [ SCREEN_COPY#0 SCREEN_DIST#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::yd#3 atan2_16::xd#2 ] ) always clobbers reg byte a +Statement [224] (signed word) atan2_16::yd#2 ← (signed word) atan2_16::yd#3 >> (signed byte) 1 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#2 atan2_16::yd#2 ] ( main:7::init_angle_screen:10::atan2_16:180 [ SCREEN_COPY#0 SCREEN_DIST#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#2 atan2_16::yd#2 ] ) always clobbers reg byte a +Statement [226] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@18 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::yd#5 atan2_16::xd#5 ] ( main:7::init_angle_screen:10::atan2_16:180 [ SCREEN_COPY#0 SCREEN_DIST#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::yd#5 atan2_16::xd#5 ] ) always clobbers reg byte a +Statement [227] (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#3 - (signed word) atan2_16::yd#5 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#5 atan2_16::xi#2 ] ( main:7::init_angle_screen:10::atan2_16:180 [ SCREEN_COPY#0 SCREEN_DIST#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#5 atan2_16::xi#2 ] ) always clobbers reg byte a +Statement [228] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#5 [ atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::xi#2 atan2_16::yi#2 ] ( main:7::init_angle_screen:10::atan2_16:180 [ SCREEN_COPY#0 SCREEN_DIST#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::xi#2 atan2_16::yi#2 ] ) always clobbers reg byte a +Statement [229] (byte~) atan2_16::$24 ← (byte) atan2_16::i#2 << (byte) 1 [ atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::xi#2 atan2_16::yi#2 atan2_16::$24 ] ( main:7::init_angle_screen:10::atan2_16:180 [ SCREEN_COPY#0 SCREEN_DIST#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::xi#2 atan2_16::yi#2 atan2_16::$24 ] ) always clobbers reg byte a +Statement [230] (word) atan2_16::angle#3 ← (word) atan2_16::angle#12 - *((const word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16#0 + (byte~) atan2_16::$24) [ atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::xi#2 atan2_16::yi#2 atan2_16::angle#3 ] ( main:7::init_angle_screen:10::atan2_16:180 [ SCREEN_COPY#0 SCREEN_DIST#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::xi#2 atan2_16::yi#2 atan2_16::angle#3 ] ) always clobbers reg byte a +Statement [234] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#5 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#5 atan2_16::xi#1 ] ( main:7::init_angle_screen:10::atan2_16:180 [ SCREEN_COPY#0 SCREEN_DIST#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#5 atan2_16::xi#1 ] ) always clobbers reg byte a +Statement [235] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#5 [ atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::yi#1 atan2_16::xi#1 ] ( main:7::init_angle_screen:10::atan2_16:180 [ SCREEN_COPY#0 SCREEN_DIST#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::yi#1 atan2_16::xi#1 ] ) always clobbers reg byte a +Statement [236] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 << (byte) 1 [ atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::yi#1 atan2_16::xi#1 atan2_16::$23 ] ( main:7::init_angle_screen:10::atan2_16:180 [ SCREEN_COPY#0 SCREEN_DIST#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::yi#1 atan2_16::xi#1 atan2_16::$23 ] ) always clobbers reg byte a +Statement [237] (word) atan2_16::angle#2 ← (word) atan2_16::angle#12 + *((const word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16#0 + (byte~) atan2_16::$23) [ atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::yi#1 atan2_16::angle#2 atan2_16::xi#1 ] ( main:7::init_angle_screen:10::atan2_16:180 [ SCREEN_COPY#0 SCREEN_DIST#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::yi#1 atan2_16::angle#2 atan2_16::xi#1 ] ) always clobbers reg byte a +Statement [238] (signed word) atan2_16::xd#1 ← (signed word) atan2_16::xd#3 >> (signed byte) 2 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#2 atan2_16::yd#3 atan2_16::xd#1 ] ( main:7::init_angle_screen:10::atan2_16:180 [ SCREEN_COPY#0 SCREEN_DIST#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#2 atan2_16::yd#3 atan2_16::xd#1 ] ) always clobbers reg byte a +Statement [239] (signed word) atan2_16::yd#1 ← (signed word) atan2_16::yd#3 >> (signed byte) 2 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#2 atan2_16::xd#1 atan2_16::yd#1 ] ( main:7::init_angle_screen:10::atan2_16:180 [ SCREEN_COPY#0 SCREEN_DIST#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#2 atan2_16::xd#1 atan2_16::yd#1 ] ) always clobbers reg byte a +Statement [241] (signed word~) atan2_16::xi#13 ← (signed word) atan2_16::x#0 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 atan2_16::xi#13 ] ( main:7::init_angle_screen:10::atan2_16:180 [ SCREEN_COPY#0 SCREEN_DIST#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 atan2_16::xi#13 ] ) always clobbers reg byte a +Statement [242] (signed word~) atan2_16::yi#16 ← (signed word) atan2_16::y#0 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#16 ] ( main:7::init_angle_screen:10::atan2_16:180 [ SCREEN_COPY#0 SCREEN_DIST#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#16 ] ) always clobbers reg byte a +Statement [244] (byte*) malloc::mem#0 ← (byte*) heap_head#5 [ malloc::mem#0 heap_head#5 ] ( malloc:2 [ malloc::mem#0 heap_head#5 ] malloc:4 [ malloc::mem#0 heap_head#5 ] ) always clobbers reg byte a +Statement [245] (byte*) heap_head#1 ← (byte*) heap_head#5 + (word) $3e8 [ malloc::mem#0 heap_head#1 ] ( malloc:2 [ malloc::mem#0 heap_head#1 ] malloc:4 [ malloc::mem#0 heap_head#1 ] ) always clobbers reg byte a +Statement [250] *((const byte*) RASTER#0) ← (const byte) RASTER_IRQ_TOP#0 [ ] ( [ ] ) always clobbers reg byte a +Statement [251] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_ALL)(void()) irqTop() [ ] ( [ ] ) always clobbers reg byte a +Statement [252] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 [ ] ( [ ] ) always clobbers reg byte a +Statement [253] return [ ] ( [ ] ) always clobbers reg byte a reg byte x reg byte y +Statement [256] (byte) processChars::$67 ← (byte) processChars::i#10 << (byte) 1 [ processChars::i#10 processChars::numActive#10 processChars::$67 ] ( processChars:249 [ processChars::i#10 processChars::numActive#10 processChars::$67 ] ) always clobbers reg byte a +Statement [257] (byte) processChars::$68 ← (byte) processChars::$67 + (byte) processChars::i#10 [ processChars::i#10 processChars::numActive#10 processChars::$68 ] ( processChars:249 [ processChars::i#10 processChars::numActive#10 processChars::$68 ] ) always clobbers reg byte a +Statement [258] (byte) processChars::$69 ← (byte) processChars::$68 << (byte) 1 [ processChars::i#10 processChars::numActive#10 processChars::$69 ] ( processChars:249 [ processChars::i#10 processChars::numActive#10 processChars::$69 ] ) always clobbers reg byte a +Statement [259] (byte) processChars::$70 ← (byte) processChars::$69 + (byte) processChars::i#10 [ processChars::i#10 processChars::numActive#10 processChars::$70 ] ( processChars:249 [ processChars::i#10 processChars::numActive#10 processChars::$70 ] ) always clobbers reg byte a +Statement [260] (byte~) processChars::$37 ← (byte) processChars::$70 << (byte) 1 [ processChars::i#10 processChars::numActive#10 processChars::$37 ] ( processChars:249 [ processChars::i#10 processChars::numActive#10 processChars::$37 ] ) always clobbers reg byte a +Statement [261] (struct ProcessingSprite*) processChars::processing#0 ← (const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (byte~) processChars::$37 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 ] ( processChars:249 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 ] ) always clobbers reg byte a +Statement [262] (byte) processChars::bitmask#0 ← (byte) 1 << *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID) [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:249 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 ] ) always clobbers reg byte a reg byte x reg byte y +Statement [263] if(*((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS)==(const byte) STATUS_FREE) goto processChars::@2 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:249 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 ] ) always clobbers reg byte a reg byte y +Statement [264] if(*((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS)!=(const byte) STATUS_NEW) goto processChars::@3 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:249 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 ] ) always clobbers reg byte a reg byte y +Statement [265] *(*((byte**)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR)) ← (byte) ' ' [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:249 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 ] ) always clobbers reg byte a reg byte x reg byte y +Statement [266] *((const byte*) SPRITES_ENABLE#0) ← *((const byte*) SPRITES_ENABLE#0) | (byte) processChars::bitmask#0 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:249 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 ] ) always clobbers reg byte a +Statement [267] *((const byte*) SPRITES_COLS#0 + *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID)) ← *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_COL) [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:249 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 ] ) always clobbers reg byte a reg byte y +Statement [268] *((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::numActive#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:249 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 ] ) always clobbers reg byte a reg byte y +Statement [269] *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) ← (const byte) STATUS_PROCESSING [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:249 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 ] ) always clobbers reg byte a reg byte y +Statement [270] (word) processChars::xpos#0 ← *((word*)(struct ProcessingSprite*) processChars::processing#0) >> (byte) 4 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 ] ( processChars:249 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 ] ) always clobbers reg byte a reg byte y +Statement [271] (byte~) processChars::$11 ← > (word) processChars::xpos#0 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 processChars::$11 ] ( processChars:249 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 processChars::$11 ] ) always clobbers reg byte a +Statement [273] (byte~) processChars::$12 ← (byte) $ff ^ (byte) processChars::bitmask#0 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 processChars::$12 ] ( processChars:249 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 processChars::$12 ] ) always clobbers reg byte a +Statement [274] *((const byte*) SPRITES_XMSB#0) ← *((const byte*) SPRITES_XMSB#0) & (byte~) processChars::$12 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 ] ( processChars:249 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 ] ) always clobbers reg byte a +Statement [275] (byte~) processChars::$17 ← (byte) processChars::i#10 << (byte) 1 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 processChars::$17 ] ( processChars:249 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 processChars::$17 ] ) always clobbers reg byte a +Statement [276] (byte~) processChars::$14 ← (byte)(word) processChars::xpos#0 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 processChars::$17 processChars::$14 ] ( processChars:249 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 processChars::$17 processChars::$14 ] ) always clobbers reg byte a +Statement [278] (word~) processChars::$15 ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y) >> (byte) 4 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 processChars::$17 processChars::$15 ] ( processChars:249 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 processChars::$17 processChars::$15 ] ) always clobbers reg byte a reg byte y +Statement [279] (byte) processChars::ypos#0 ← (byte)(word~) processChars::$15 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 processChars::$17 processChars::ypos#0 ] ( processChars:249 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 processChars::$17 processChars::ypos#0 ] ) always clobbers reg byte a +Statement [280] *((const byte*) SPRITES_YPOS#0 + (byte~) processChars::$17) ← (byte) processChars::ypos#0 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 processChars::ypos#0 ] ( processChars:249 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 processChars::ypos#0 ] ) always clobbers reg byte a +Statement [281] if(*((word*)(struct ProcessingSprite*) processChars::processing#0)<(const word) XPOS_LEFTMOST#0) goto processChars::@6 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 processChars::ypos#0 ] ( processChars:249 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 processChars::ypos#0 ] ) always clobbers reg byte a reg byte y +Statement [282] if(*((word*)(struct ProcessingSprite*) processChars::processing#0)>(const word) XPOS_RIGHTMOST#0) goto processChars::@6 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 processChars::ypos#0 ] ( processChars:249 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 processChars::ypos#0 ] ) always clobbers reg byte a reg byte y +Statement [283] if(*((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y)<(const word) YPOS_TOPMOST#0) goto processChars::@6 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 processChars::ypos#0 ] ( processChars:249 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 processChars::ypos#0 ] ) always clobbers reg byte a reg byte y +Statement [284] if(*((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y)>(const word) YPOS_BOTTOMMOST#0) goto processChars::@6 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 processChars::ypos#0 ] ( processChars:249 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 processChars::ypos#0 ] ) always clobbers reg byte a reg byte y +Statement [285] (word~) processChars::$25 ← (word) processChars::xpos#0 >> (byte) 3 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::ypos#0 processChars::$25 ] ( processChars:249 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::ypos#0 processChars::$25 ] ) always clobbers reg byte a +Statement [286] (byte~) processChars::$26 ← (byte)(word~) processChars::$25 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::ypos#0 processChars::$26 ] ( processChars:249 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::ypos#0 processChars::$26 ] ) always clobbers reg byte a +Statement [288] (byte~) processChars::$38 ← (byte) processChars::xchar#0 << (byte) 1 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::ypos#0 processChars::$38 ] ( processChars:249 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::ypos#0 processChars::$38 ] ) always clobbers reg byte a +Statement [289] *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX) + *((const word[$28]) VXSIN#0 + (byte~) processChars::$38) [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::ypos#0 ] ( processChars:249 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::ypos#0 ] ) always clobbers reg byte a reg byte y +Statement [290] *((word*)(struct ProcessingSprite*) processChars::processing#0) ← *((word*)(struct ProcessingSprite*) processChars::processing#0) + *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX) [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::ypos#0 ] ( processChars:249 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::ypos#0 ] ) always clobbers reg byte a reg byte y +Statement [291] (byte~) processChars::$30 ← (byte) processChars::ypos#0 >> (byte) 3 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::$30 ] ( processChars:249 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::$30 ] ) always clobbers reg byte a +Statement [293] (byte~) processChars::$39 ← (byte) processChars::ychar#0 << (byte) 1 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::$39 ] ( processChars:249 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::$39 ] ) always clobbers reg byte a +Statement [294] *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY) + *((const word[$19]) VYSIN#0 + (byte~) processChars::$39) [ processChars::i#10 processChars::numActive#10 processChars::processing#0 ] ( processChars:249 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 ] ) always clobbers reg byte a reg byte y +Statement [295] *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y) + *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY) [ processChars::i#10 processChars::numActive#10 ] ( processChars:249 [ processChars::i#10 processChars::numActive#10 ] ) always clobbers reg byte a reg byte y +Statement [299] if((byte) processChars::i#1!=(const byte) NUM_PROCESSING#0-(byte) 1+(byte) 1) goto processChars::@1 [ processChars::i#1 processChars::numActive#3 ] ( processChars:249 [ processChars::i#1 processChars::numActive#3 ] ) always clobbers reg byte a +Statement [301] *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) ← (const byte) STATUS_FREE [ processChars::i#10 processChars::numActive#10 processChars::bitmask#0 ] ( processChars:249 [ processChars::i#10 processChars::numActive#10 processChars::bitmask#0 ] ) always clobbers reg byte a reg byte y +Statement [302] (byte~) processChars::$33 ← (byte) $ff ^ (byte) processChars::bitmask#0 [ processChars::i#10 processChars::numActive#10 processChars::$33 ] ( processChars:249 [ processChars::i#10 processChars::numActive#10 processChars::$33 ] ) always clobbers reg byte a +Statement [303] *((const byte*) SPRITES_ENABLE#0) ← *((const byte*) SPRITES_ENABLE#0) & (byte~) processChars::$33 [ processChars::i#10 processChars::numActive#10 ] ( processChars:249 [ processChars::i#10 processChars::numActive#10 ] ) always clobbers reg byte a +Statement [304] *((const byte*) SPRITES_XMSB#0) ← *((const byte*) SPRITES_XMSB#0) | (byte) processChars::bitmask#0 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 ] ( processChars:249 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 ] ) always clobbers reg byte a +Statement [306] *((const byte*) RASTER#0) ← (const byte) RASTER_IRQ_MIDDLE#0 [ ] ( [ ] ) always clobbers reg byte a +Statement [307] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_ALL)(void()) irqBottom() [ ] ( [ ] ) always clobbers reg byte a +Statement [308] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 [ ] ( [ ] ) always clobbers reg byte a +Statement [309] return [ ] ( [ ] ) always clobbers reg byte a reg byte x reg byte y Potential registers zp ZP_WORD:2 [ main::src#2 main::src#1 ] : zp ZP_WORD:2 , Potential registers zp ZP_WORD:4 [ main::dst#2 main::dst#1 main::dst#0 ] : zp ZP_WORD:4 , Potential registers zp ZP_BYTE:6 [ main::i#2 main::i#1 ] : zp ZP_BYTE:6 , reg byte x , reg byte y , @@ -8609,139 +7903,127 @@ Potential registers zp ZP_BYTE:22 [ getCharToProcess::closest_y#7 getCharToProce Potential registers zp ZP_BYTE:23 [ getCharToProcess::return_dist#1 getCharToProcess::return_dist#5 getCharToProcess::return_dist#6 getCharToProcess::dist#0 ] : zp ZP_BYTE:23 , reg byte x , reg byte y , Potential registers zp ZP_WORD:24 [ initSprites::sp#2 initSprites::sp#1 ] : zp ZP_WORD:24 , Potential registers zp ZP_BYTE:26 [ initSprites::i#2 initSprites::i#1 ] : zp ZP_BYTE:26 , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:27 [ init_dist_screen::y#10 init_dist_screen::y#1 ] : zp ZP_BYTE:27 , reg byte x , -Potential registers zp ZP_WORD:28 [ init_dist_screen::screen_topline#10 init_dist_screen::screen_topline#1 init_dist_screen::screen#0 ] : zp ZP_WORD:28 , -Potential registers zp ZP_WORD:30 [ init_dist_screen::screen_bottomline#10 init_dist_screen::screen_bottomline#1 init_dist_screen::screen_bottomline#0 ] : zp ZP_WORD:30 , -Potential registers zp ZP_BYTE:32 [ init_dist_screen::yd#0 init_dist_screen::$7 init_dist_screen::$5 ] : zp ZP_BYTE:32 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:33 [ init_dist_screen::x#2 init_dist_screen::x#1 ] : zp ZP_BYTE:33 , reg byte x , -Potential registers zp ZP_BYTE:34 [ init_dist_screen::xb#2 init_dist_screen::xb#1 ] : zp ZP_BYTE:34 , reg byte x , -Potential registers zp ZP_BYTE:35 [ init_dist_screen::xd#0 init_dist_screen::$15 init_dist_screen::$13 ] : zp ZP_BYTE:35 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_WORD:36 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#1 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 ] : zp ZP_WORD:36 , -Potential registers zp ZP_BYTE:38 [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#3 bsearch16u::num#0 ] : zp ZP_BYTE:38 , reg byte x , -Potential registers zp ZP_BYTE:39 [ sqr::val#2 sqr::val#0 sqr::val#1 ] : zp ZP_BYTE:39 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_WORD:40 [ init_squares::sqr#2 init_squares::sqr#1 ] : zp ZP_WORD:40 , -Potential registers zp ZP_WORD:42 [ init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 ] : zp ZP_WORD:42 , -Potential registers zp ZP_BYTE:44 [ init_squares::i#2 init_squares::i#1 ] : zp ZP_BYTE:44 , reg byte x , -Potential registers zp ZP_WORD:45 [ heap_head#12 heap_head#1 ] : zp ZP_WORD:45 , -Potential registers zp ZP_WORD:47 [ malloc::size#3 ] : zp ZP_WORD:47 , -Potential registers zp ZP_BYTE:49 [ processChars::i#10 processChars::i#1 ] : zp ZP_BYTE:49 , -Potential registers zp ZP_BYTE:50 [ processChars::numActive#10 processChars::numActive#3 processChars::numActive#1 ] : zp ZP_BYTE:50 , -Potential registers zp ZP_WORD:51 [ SCREEN_COPY#0 ] : zp ZP_WORD:51 , -Potential registers zp ZP_WORD:53 [ SCREEN_DIST#0 ] : zp ZP_WORD:53 , -Potential registers zp ZP_BYTE:55 [ main::$26 ] : zp ZP_BYTE:55 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:56 [ main::$27 ] : zp ZP_BYTE:56 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:57 [ main::$28 ] : zp ZP_BYTE:57 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:58 [ main::$29 ] : zp ZP_BYTE:58 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:59 [ main::$16 ] : zp ZP_BYTE:59 , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:60 [ getCharToProcess::return_x#0 ] : zp ZP_BYTE:60 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:61 [ getCharToProcess::return_y#0 ] : zp ZP_BYTE:61 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:62 [ getCharToProcess::return_dist#0 ] : zp ZP_BYTE:62 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:63 [ main::center_x#0 ] : zp ZP_BYTE:63 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:64 [ main::center_y#0 ] : zp ZP_BYTE:64 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:65 [ main::center_dist#0 ] : zp ZP_BYTE:65 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:66 [ startProcessing::center_x#0 ] : zp ZP_BYTE:66 , reg byte x , -Potential registers zp ZP_BYTE:67 [ startProcessing::center_y#0 ] : zp ZP_BYTE:67 , reg byte x , -Potential registers zp ZP_BYTE:68 [ startProcessing::$42 ] : zp ZP_BYTE:68 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:69 [ startProcessing::$43 ] : zp ZP_BYTE:69 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:70 [ startProcessing::$44 ] : zp ZP_BYTE:70 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:71 [ startProcessing::$45 ] : zp ZP_BYTE:71 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:72 [ startProcessing::$30 ] : zp ZP_BYTE:72 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_WORD:73 [ startProcessing::$0 ] : zp ZP_WORD:73 , -Potential registers zp ZP_WORD:75 [ startProcessing::$47 ] : zp ZP_WORD:75 , -Potential registers zp ZP_WORD:77 [ startProcessing::$48 ] : zp ZP_WORD:77 , -Potential registers zp ZP_WORD:79 [ startProcessing::$1 ] : zp ZP_WORD:79 , -Potential registers zp ZP_WORD:81 [ startProcessing::offset#0 ] : zp ZP_WORD:81 , -Potential registers zp ZP_WORD:83 [ startProcessing::colPtr#0 ] : zp ZP_WORD:83 , -Potential registers zp ZP_BYTE:85 [ startProcessing::spriteCol#0 ] : zp ZP_BYTE:85 , reg byte x , -Potential registers zp ZP_WORD:86 [ startProcessing::screenPtr#0 ] : zp ZP_WORD:86 , -Potential registers zp ZP_WORD:88 [ startProcessing::$5 ] : zp ZP_WORD:88 , -Potential registers zp ZP_WORD:90 [ startProcessing::$6 ] : zp ZP_WORD:90 , -Potential registers zp ZP_BYTE:92 [ startProcessing::ch#0 ] : zp ZP_BYTE:92 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_WORD:93 [ startProcessing::$8 ] : zp ZP_WORD:93 , -Potential registers zp ZP_WORD:95 [ startProcessing::$9 ] : zp ZP_WORD:95 , -Potential registers zp ZP_WORD:97 [ startProcessing::$11 ] : zp ZP_WORD:97 , -Potential registers zp ZP_WORD:99 [ startProcessing::$12 ] : zp ZP_WORD:99 , -Potential registers zp ZP_WORD:101 [ startProcessing::$13 ] : zp ZP_WORD:101 , -Potential registers zp ZP_WORD:103 [ startProcessing::spriteX#0 ] : zp ZP_WORD:103 , -Potential registers zp ZP_WORD:105 [ startProcessing::$15 ] : zp ZP_WORD:105 , -Potential registers zp ZP_WORD:107 [ startProcessing::$16 ] : zp ZP_WORD:107 , -Potential registers zp ZP_WORD:109 [ startProcessing::$17 ] : zp ZP_WORD:109 , -Potential registers zp ZP_WORD:111 [ startProcessing::spriteY#0 ] : zp ZP_WORD:111 , -Potential registers zp ZP_BYTE:113 [ startProcessing::spritePtr#0 ] : zp ZP_BYTE:113 , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:114 [ startProcessing::$22 ] : zp ZP_BYTE:114 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_WORD:115 [ startProcessing::$23 ] : zp ZP_WORD:115 , -Potential registers zp ZP_BYTE:117 [ startProcessing::$50 ] : zp ZP_BYTE:117 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:118 [ startProcessing::$51 ] : zp ZP_BYTE:118 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:119 [ startProcessing::$52 ] : zp ZP_BYTE:119 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:120 [ startProcessing::$53 ] : zp ZP_BYTE:120 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:121 [ startProcessing::$31 ] : zp ZP_BYTE:121 , reg byte x , reg byte y , -Potential registers zp ZP_WORD:122 [ getCharToProcess::$8 ] : zp ZP_WORD:122 , -Potential registers zp ZP_WORD:124 [ getCharToProcess::$12 ] : zp ZP_WORD:124 , -Potential registers zp ZP_WORD:126 [ getCharToProcess::$13 ] : zp ZP_WORD:126 , -Potential registers zp ZP_WORD:128 [ getCharToProcess::$9 ] : zp ZP_WORD:128 , -Potential registers zp ZP_WORD:130 [ getCharToProcess::$10 ] : zp ZP_WORD:130 , -Potential registers zp ZP_BYTE:132 [ init_dist_screen::y2#0 ] : zp ZP_BYTE:132 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_WORD:133 [ sqr::return#2 ] : zp ZP_WORD:133 , -Potential registers zp ZP_WORD:135 [ init_dist_screen::yds#0 ] : zp ZP_WORD:135 , -Potential registers zp ZP_BYTE:137 [ init_dist_screen::x2#0 ] : zp ZP_BYTE:137 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_WORD:138 [ sqr::return#3 ] : zp ZP_WORD:138 , -Potential registers zp ZP_WORD:140 [ init_dist_screen::xds#0 ] : zp ZP_WORD:140 , -Potential registers zp ZP_WORD:142 [ init_dist_screen::ds#0 ] : zp ZP_WORD:142 , -Potential registers zp ZP_WORD:144 [ sqrt::val#0 ] : zp ZP_WORD:144 , -Potential registers zp ZP_BYTE:146 [ sqrt::return#2 ] : zp ZP_BYTE:146 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:147 [ init_dist_screen::d#0 ] : zp ZP_BYTE:147 , reg byte a , reg byte x , -Potential registers zp ZP_WORD:148 [ bsearch16u::key#0 ] : zp ZP_WORD:148 , -Potential registers zp ZP_WORD:150 [ bsearch16u::return#3 ] : zp ZP_WORD:150 , -Potential registers zp ZP_WORD:152 [ sqrt::found#0 ] : zp ZP_WORD:152 , -Potential registers zp ZP_WORD:154 [ sqrt::$3 ] : zp ZP_WORD:154 , -Potential registers zp ZP_WORD:156 [ sqrt::$1 ] : zp ZP_WORD:156 , -Potential registers zp ZP_BYTE:158 [ sqrt::return#0 ] : zp ZP_BYTE:158 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:159 [ bsearch16u::$6 ] : zp ZP_BYTE:159 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:160 [ bsearch16u::$16 ] : zp ZP_BYTE:160 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_WORD:161 [ bsearch16u::pivot#0 ] : zp ZP_WORD:161 , -Potential registers zp ZP_WORD:163 [ bsearch16u::result#0 ] : zp ZP_WORD:163 , -Potential registers zp ZP_BYTE:165 [ sqr::$0 ] : zp ZP_BYTE:165 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_WORD:166 [ sqr::return#0 ] : zp ZP_WORD:166 , -Potential registers zp ZP_WORD:168 [ SQUARES#1 ] : zp ZP_WORD:168 , -Potential registers zp ZP_BYTE:170 [ init_squares::$3 ] : zp ZP_BYTE:170 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:171 [ init_squares::$4 ] : zp ZP_BYTE:171 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_WORD:172 [ malloc::mem#0 ] : zp ZP_WORD:172 , -Potential registers zp ZP_BYTE:174 [ processChars::$67 ] : zp ZP_BYTE:174 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:175 [ processChars::$68 ] : zp ZP_BYTE:175 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:176 [ processChars::$69 ] : zp ZP_BYTE:176 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:177 [ processChars::$70 ] : zp ZP_BYTE:177 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:178 [ processChars::$37 ] : zp ZP_BYTE:178 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_WORD:179 [ processChars::processing#0 ] : zp ZP_WORD:179 , -Potential registers zp ZP_BYTE:181 [ processChars::bitmask#0 ] : zp ZP_BYTE:181 , -Potential registers zp ZP_WORD:182 [ processChars::xpos#0 ] : zp ZP_WORD:182 , -Potential registers zp ZP_BYTE:184 [ processChars::$11 ] : zp ZP_BYTE:184 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:185 [ processChars::$12 ] : zp ZP_BYTE:185 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:186 [ processChars::$17 ] : zp ZP_BYTE:186 , reg byte x , -Potential registers zp ZP_BYTE:187 [ processChars::$14 ] : zp ZP_BYTE:187 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_WORD:188 [ processChars::$15 ] : zp ZP_WORD:188 , -Potential registers zp ZP_BYTE:190 [ processChars::ypos#0 ] : zp ZP_BYTE:190 , reg byte x , -Potential registers zp ZP_WORD:191 [ processChars::$25 ] : zp ZP_WORD:191 , -Potential registers zp ZP_BYTE:193 [ processChars::$26 ] : zp ZP_BYTE:193 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:194 [ processChars::xchar#0 ] : zp ZP_BYTE:194 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:195 [ processChars::$38 ] : zp ZP_BYTE:195 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:196 [ processChars::$30 ] : zp ZP_BYTE:196 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:197 [ processChars::ychar#0 ] : zp ZP_BYTE:197 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:198 [ processChars::$39 ] : zp ZP_BYTE:198 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:199 [ processChars::$33 ] : zp ZP_BYTE:199 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:27 [ init_angle_screen::y#4 init_angle_screen::y#1 ] : zp ZP_BYTE:27 , reg byte x , +Potential registers zp ZP_WORD:28 [ init_angle_screen::screen_bottomline#5 init_angle_screen::screen_bottomline#0 init_angle_screen::screen_bottomline#1 ] : zp ZP_WORD:28 , +Potential registers zp ZP_WORD:30 [ init_angle_screen::screen_topline#5 init_angle_screen::screen_topline#0 init_angle_screen::screen_topline#1 ] : zp ZP_WORD:30 , +Potential registers zp ZP_BYTE:32 [ init_angle_screen::x#2 init_angle_screen::x#1 ] : zp ZP_BYTE:32 , reg byte x , +Potential registers zp ZP_BYTE:33 [ init_angle_screen::xb#2 init_angle_screen::xb#1 ] : zp ZP_BYTE:33 , reg byte x , +Potential registers zp ZP_WORD:34 [ atan2_16::yi#3 atan2_16::yi#8 atan2_16::yi#0 atan2_16::yi#16 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ] : zp ZP_WORD:34 , +Potential registers zp ZP_WORD:36 [ atan2_16::xi#3 atan2_16::xi#8 atan2_16::xi#0 atan2_16::xi#13 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] : zp ZP_WORD:36 , +Potential registers zp ZP_BYTE:38 [ atan2_16::i#2 atan2_16::i#1 ] : zp ZP_BYTE:38 , reg byte x , reg byte y , +Potential registers zp ZP_WORD:39 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 ] : zp ZP_WORD:39 , +Potential registers zp ZP_WORD:41 [ atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 ] : zp ZP_WORD:41 , +Potential registers zp ZP_BYTE:43 [ atan2_16::shift#2 atan2_16::shift#5 atan2_16::shift#1 ] : zp ZP_BYTE:43 , reg byte x , reg byte y , +Potential registers zp ZP_WORD:44 [ atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ] : zp ZP_WORD:44 , +Potential registers zp ZP_WORD:46 [ atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] : zp ZP_WORD:46 , +Potential registers zp ZP_WORD:48 [ heap_head#5 heap_head#1 ] : zp ZP_WORD:48 , +Potential registers zp ZP_BYTE:50 [ processChars::i#10 processChars::i#1 ] : zp ZP_BYTE:50 , +Potential registers zp ZP_BYTE:51 [ processChars::numActive#10 processChars::numActive#3 processChars::numActive#1 ] : zp ZP_BYTE:51 , +Potential registers zp ZP_WORD:52 [ SCREEN_COPY#0 ] : zp ZP_WORD:52 , +Potential registers zp ZP_WORD:54 [ SCREEN_DIST#0 ] : zp ZP_WORD:54 , +Potential registers zp ZP_WORD:56 [ init_angle_screen::screen#0 ] : zp ZP_WORD:56 , +Potential registers zp ZP_BYTE:58 [ main::$26 ] : zp ZP_BYTE:58 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:59 [ main::$27 ] : zp ZP_BYTE:59 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:60 [ main::$28 ] : zp ZP_BYTE:60 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:61 [ main::$29 ] : zp ZP_BYTE:61 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:62 [ main::$16 ] : zp ZP_BYTE:62 , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:63 [ getCharToProcess::return_x#0 ] : zp ZP_BYTE:63 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:64 [ getCharToProcess::return_y#0 ] : zp ZP_BYTE:64 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:65 [ getCharToProcess::return_dist#0 ] : zp ZP_BYTE:65 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:66 [ main::center_x#0 ] : zp ZP_BYTE:66 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:67 [ main::center_y#0 ] : zp ZP_BYTE:67 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:68 [ main::center_dist#0 ] : zp ZP_BYTE:68 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:69 [ startProcessing::center_x#0 ] : zp ZP_BYTE:69 , reg byte x , +Potential registers zp ZP_BYTE:70 [ startProcessing::center_y#0 ] : zp ZP_BYTE:70 , reg byte x , +Potential registers zp ZP_BYTE:71 [ startProcessing::$42 ] : zp ZP_BYTE:71 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:72 [ startProcessing::$43 ] : zp ZP_BYTE:72 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:73 [ startProcessing::$44 ] : zp ZP_BYTE:73 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:74 [ startProcessing::$45 ] : zp ZP_BYTE:74 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:75 [ startProcessing::$30 ] : zp ZP_BYTE:75 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_WORD:76 [ startProcessing::$0 ] : zp ZP_WORD:76 , +Potential registers zp ZP_WORD:78 [ startProcessing::$47 ] : zp ZP_WORD:78 , +Potential registers zp ZP_WORD:80 [ startProcessing::$48 ] : zp ZP_WORD:80 , +Potential registers zp ZP_WORD:82 [ startProcessing::$1 ] : zp ZP_WORD:82 , +Potential registers zp ZP_WORD:84 [ startProcessing::offset#0 ] : zp ZP_WORD:84 , +Potential registers zp ZP_WORD:86 [ startProcessing::colPtr#0 ] : zp ZP_WORD:86 , +Potential registers zp ZP_BYTE:88 [ startProcessing::spriteCol#0 ] : zp ZP_BYTE:88 , reg byte x , +Potential registers zp ZP_WORD:89 [ startProcessing::screenPtr#0 ] : zp ZP_WORD:89 , +Potential registers zp ZP_WORD:91 [ startProcessing::$5 ] : zp ZP_WORD:91 , +Potential registers zp ZP_WORD:93 [ startProcessing::$6 ] : zp ZP_WORD:93 , +Potential registers zp ZP_BYTE:95 [ startProcessing::ch#0 ] : zp ZP_BYTE:95 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_WORD:96 [ startProcessing::$8 ] : zp ZP_WORD:96 , +Potential registers zp ZP_WORD:98 [ startProcessing::$9 ] : zp ZP_WORD:98 , +Potential registers zp ZP_WORD:100 [ startProcessing::$11 ] : zp ZP_WORD:100 , +Potential registers zp ZP_WORD:102 [ startProcessing::$12 ] : zp ZP_WORD:102 , +Potential registers zp ZP_WORD:104 [ startProcessing::$13 ] : zp ZP_WORD:104 , +Potential registers zp ZP_WORD:106 [ startProcessing::spriteX#0 ] : zp ZP_WORD:106 , +Potential registers zp ZP_WORD:108 [ startProcessing::$15 ] : zp ZP_WORD:108 , +Potential registers zp ZP_WORD:110 [ startProcessing::$16 ] : zp ZP_WORD:110 , +Potential registers zp ZP_WORD:112 [ startProcessing::$17 ] : zp ZP_WORD:112 , +Potential registers zp ZP_WORD:114 [ startProcessing::spriteY#0 ] : zp ZP_WORD:114 , +Potential registers zp ZP_BYTE:116 [ startProcessing::spritePtr#0 ] : zp ZP_BYTE:116 , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:117 [ startProcessing::$22 ] : zp ZP_BYTE:117 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_WORD:118 [ startProcessing::$23 ] : zp ZP_WORD:118 , +Potential registers zp ZP_BYTE:120 [ startProcessing::$50 ] : zp ZP_BYTE:120 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:121 [ startProcessing::$51 ] : zp ZP_BYTE:121 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:122 [ startProcessing::$52 ] : zp ZP_BYTE:122 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:123 [ startProcessing::$53 ] : zp ZP_BYTE:123 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:124 [ startProcessing::$31 ] : zp ZP_BYTE:124 , reg byte x , reg byte y , +Potential registers zp ZP_WORD:125 [ getCharToProcess::$8 ] : zp ZP_WORD:125 , +Potential registers zp ZP_WORD:127 [ getCharToProcess::$12 ] : zp ZP_WORD:127 , +Potential registers zp ZP_WORD:129 [ getCharToProcess::$13 ] : zp ZP_WORD:129 , +Potential registers zp ZP_WORD:131 [ getCharToProcess::$9 ] : zp ZP_WORD:131 , +Potential registers zp ZP_WORD:133 [ getCharToProcess::$10 ] : zp ZP_WORD:133 , +Potential registers zp ZP_BYTE:135 [ init_angle_screen::$2 ] : zp ZP_BYTE:135 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:136 [ init_angle_screen::$3 ] : zp ZP_BYTE:136 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_WORD:137 [ init_angle_screen::xw#0 ] : zp ZP_WORD:137 , +Potential registers zp ZP_BYTE:139 [ init_angle_screen::$6 ] : zp ZP_BYTE:139 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_WORD:140 [ init_angle_screen::yw#0 ] : zp ZP_WORD:140 , +Potential registers zp ZP_WORD:142 [ atan2_16::x#0 ] : zp ZP_WORD:142 , +Potential registers zp ZP_WORD:144 [ atan2_16::y#0 ] : zp ZP_WORD:144 , +Potential registers zp ZP_WORD:146 [ atan2_16::return#2 ] : zp ZP_WORD:146 , +Potential registers zp ZP_WORD:148 [ init_angle_screen::angle_w#0 ] : zp ZP_WORD:148 , +Potential registers zp ZP_WORD:150 [ init_angle_screen::$10 ] : zp ZP_WORD:150 , +Potential registers zp ZP_BYTE:152 [ init_angle_screen::ang_w#0 ] : zp ZP_BYTE:152 , reg byte x , +Potential registers zp ZP_BYTE:153 [ init_angle_screen::$12 ] : zp ZP_BYTE:153 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:154 [ init_angle_screen::$13 ] : zp ZP_BYTE:154 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:155 [ init_angle_screen::$14 ] : zp ZP_BYTE:155 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:156 [ atan2_16::$24 ] : zp ZP_BYTE:156 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:157 [ atan2_16::$23 ] : zp ZP_BYTE:157 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_WORD:158 [ malloc::mem#0 ] : zp ZP_WORD:158 , +Potential registers zp ZP_BYTE:160 [ processChars::$67 ] : zp ZP_BYTE:160 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:161 [ processChars::$68 ] : zp ZP_BYTE:161 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:162 [ processChars::$69 ] : zp ZP_BYTE:162 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:163 [ processChars::$70 ] : zp ZP_BYTE:163 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:164 [ processChars::$37 ] : zp ZP_BYTE:164 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_WORD:165 [ processChars::processing#0 ] : zp ZP_WORD:165 , +Potential registers zp ZP_BYTE:167 [ processChars::bitmask#0 ] : zp ZP_BYTE:167 , +Potential registers zp ZP_WORD:168 [ processChars::xpos#0 ] : zp ZP_WORD:168 , +Potential registers zp ZP_BYTE:170 [ processChars::$11 ] : zp ZP_BYTE:170 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:171 [ processChars::$12 ] : zp ZP_BYTE:171 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:172 [ processChars::$17 ] : zp ZP_BYTE:172 , reg byte x , +Potential registers zp ZP_BYTE:173 [ processChars::$14 ] : zp ZP_BYTE:173 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_WORD:174 [ processChars::$15 ] : zp ZP_WORD:174 , +Potential registers zp ZP_BYTE:176 [ processChars::ypos#0 ] : zp ZP_BYTE:176 , reg byte x , +Potential registers zp ZP_WORD:177 [ processChars::$25 ] : zp ZP_WORD:177 , +Potential registers zp ZP_BYTE:179 [ processChars::$26 ] : zp ZP_BYTE:179 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:180 [ processChars::xchar#0 ] : zp ZP_BYTE:180 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:181 [ processChars::$38 ] : zp ZP_BYTE:181 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:182 [ processChars::$30 ] : zp ZP_BYTE:182 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:183 [ processChars::ychar#0 ] : zp ZP_BYTE:183 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:184 [ processChars::$39 ] : zp ZP_BYTE:184 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:185 [ processChars::$33 ] : zp ZP_BYTE:185 , reg byte a , reg byte x , reg byte y , REGISTER UPLIFT SCOPES -Uplift Scope [bsearch16u] 7,563.11: zp ZP_BYTE:38 [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#3 bsearch16u::num#0 ] 2,855.06: zp ZP_WORD:36 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#1 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 ] 2,002: zp ZP_BYTE:159 [ bsearch16u::$6 ] 2,002: zp ZP_BYTE:160 [ bsearch16u::$16 ] 1,501.5: zp ZP_WORD:163 [ bsearch16u::result#0 ] 501: zp ZP_WORD:161 [ bsearch16u::pivot#0 ] 4: zp ZP_WORD:150 [ bsearch16u::return#3 ] 0.27: zp ZP_WORD:148 [ bsearch16u::key#0 ] -Uplift Scope [getCharToProcess] 4,983.53: zp ZP_BYTE:23 [ getCharToProcess::return_dist#1 getCharToProcess::return_dist#5 getCharToProcess::return_dist#6 getCharToProcess::dist#0 ] 3,432.25: zp ZP_BYTE:20 [ getCharToProcess::closest_dist#2 getCharToProcess::closest_dist#8 getCharToProcess::closest_dist#10 getCharToProcess::closest_dist#12 ] 2,937.96: zp ZP_BYTE:22 [ getCharToProcess::closest_y#7 getCharToProcess::closest_y#9 getCharToProcess::return_y#1 getCharToProcess::return_y#7 ] 1,949.11: zp ZP_BYTE:21 [ getCharToProcess::closest_x#7 getCharToProcess::closest_x#9 getCharToProcess::return_x#1 getCharToProcess::return_x#7 ] 1,557.11: zp ZP_BYTE:19 [ getCharToProcess::x#2 getCharToProcess::x#1 ] 181.2: zp ZP_BYTE:18 [ getCharToProcess::y#7 getCharToProcess::y#1 ] 140.57: zp ZP_WORD:16 [ getCharToProcess::dist_line#6 getCharToProcess::dist_line#0 getCharToProcess::dist_line#1 ] 135.09: zp ZP_WORD:14 [ getCharToProcess::screen_line#4 getCharToProcess::screen_line#0 getCharToProcess::screen_line#1 ] 7.33: zp ZP_BYTE:60 [ getCharToProcess::return_x#0 ] 7.33: zp ZP_BYTE:61 [ getCharToProcess::return_y#0 ] 7.33: zp ZP_BYTE:62 [ getCharToProcess::return_dist#0 ] 4: zp ZP_WORD:124 [ getCharToProcess::$12 ] 4: zp ZP_WORD:126 [ getCharToProcess::$13 ] 4: zp ZP_WORD:128 [ getCharToProcess::$9 ] 4: zp ZP_WORD:130 [ getCharToProcess::$10 ] 3: zp ZP_WORD:122 [ getCharToProcess::$8 ] -Uplift Scope [startProcessing] 2,589.5: zp ZP_BYTE:8 [ startProcessing::freeIdx#2 startProcessing::freeIdx#8 startProcessing::i#2 startProcessing::i#1 ] 2,002: zp ZP_BYTE:68 [ startProcessing::$42 ] 2,002: zp ZP_BYTE:69 [ startProcessing::$43 ] 2,002: zp ZP_BYTE:70 [ startProcessing::$44 ] 2,002: zp ZP_BYTE:71 [ startProcessing::$45 ] 2,002: zp ZP_BYTE:72 [ startProcessing::$30 ] 222.2: zp ZP_BYTE:7 [ startProcessing::freeIdx#6 startProcessing::freeIdx#7 ] 203.57: zp ZP_WORD:11 [ startProcessing::spriteData#2 startProcessing::spriteData#0 startProcessing::spriteData#1 ] 202: zp ZP_BYTE:13 [ startProcessing::i1#2 startProcessing::i1#1 ] 170.33: zp ZP_WORD:9 [ startProcessing::chargenData#2 startProcessing::chargenData#0 startProcessing::chargenData#1 ] 4: zp ZP_WORD:75 [ startProcessing::$47 ] 4: zp ZP_WORD:77 [ startProcessing::$48 ] 4: zp ZP_WORD:79 [ startProcessing::$1 ] 4: zp ZP_WORD:83 [ startProcessing::colPtr#0 ] 4: zp ZP_WORD:88 [ startProcessing::$5 ] 4: zp ZP_WORD:90 [ startProcessing::$6 ] 4: zp ZP_WORD:93 [ startProcessing::$8 ] 4: zp ZP_WORD:95 [ startProcessing::$9 ] 4: zp ZP_WORD:97 [ startProcessing::$11 ] 4: zp ZP_WORD:99 [ startProcessing::$12 ] 4: zp ZP_WORD:101 [ startProcessing::$13 ] 4: zp ZP_WORD:105 [ startProcessing::$15 ] 4: zp ZP_WORD:107 [ startProcessing::$16 ] 4: zp ZP_WORD:109 [ startProcessing::$17 ] 4: zp ZP_BYTE:117 [ startProcessing::$50 ] 4: zp ZP_BYTE:118 [ startProcessing::$51 ] 4: zp ZP_BYTE:119 [ startProcessing::$52 ] 4: zp ZP_BYTE:120 [ startProcessing::$53 ] 3: zp ZP_WORD:73 [ startProcessing::$0 ] 2.22: zp ZP_BYTE:121 [ startProcessing::$31 ] 2: zp ZP_WORD:81 [ startProcessing::offset#0 ] 2: zp ZP_BYTE:92 [ startProcessing::ch#0 ] 2: zp ZP_BYTE:114 [ startProcessing::$22 ] 0.5: zp ZP_WORD:115 [ startProcessing::$23 ] 0.4: zp ZP_WORD:111 [ startProcessing::spriteY#0 ] 0.31: zp ZP_BYTE:66 [ startProcessing::center_x#0 ] 0.31: zp ZP_WORD:103 [ startProcessing::spriteX#0 ] 0.31: zp ZP_BYTE:113 [ startProcessing::spritePtr#0 ] 0.24: zp ZP_BYTE:67 [ startProcessing::center_y#0 ] 0.14: zp ZP_WORD:86 [ startProcessing::screenPtr#0 ] 0.1: zp ZP_BYTE:85 [ startProcessing::spriteCol#0 ] -Uplift Scope [init_dist_screen] 707: zp ZP_BYTE:35 [ init_dist_screen::xd#0 init_dist_screen::$15 init_dist_screen::$13 ] 202: zp ZP_BYTE:137 [ init_dist_screen::x2#0 ] 202: zp ZP_WORD:140 [ init_dist_screen::xds#0 ] 202: zp ZP_WORD:142 [ init_dist_screen::ds#0 ] 127.58: zp ZP_BYTE:33 [ init_dist_screen::x#2 init_dist_screen::x#1 ] 126.25: zp ZP_BYTE:147 [ init_dist_screen::d#0 ] 121.2: zp ZP_BYTE:34 [ init_dist_screen::xb#2 init_dist_screen::xb#1 ] 77: zp ZP_BYTE:32 [ init_dist_screen::yd#0 init_dist_screen::$7 init_dist_screen::$5 ] 22: zp ZP_BYTE:132 [ init_dist_screen::y2#0 ] 18.18: zp ZP_WORD:30 [ init_dist_screen::screen_bottomline#10 init_dist_screen::screen_bottomline#1 init_dist_screen::screen_bottomline#0 ] 17.47: zp ZP_BYTE:27 [ init_dist_screen::y#10 init_dist_screen::y#1 ] 14.06: zp ZP_WORD:28 [ init_dist_screen::screen_topline#10 init_dist_screen::screen_topline#1 init_dist_screen::screen#0 ] 4.87: zp ZP_WORD:135 [ init_dist_screen::yds#0 ] -Uplift Scope [sqr] 338: zp ZP_BYTE:39 [ sqr::val#2 sqr::val#0 sqr::val#1 ] 202: zp ZP_WORD:138 [ sqr::return#3 ] 28.5: zp ZP_WORD:166 [ sqr::return#0 ] 22: zp ZP_WORD:133 [ sqr::return#2 ] 4: zp ZP_BYTE:165 [ sqr::$0 ] -Uplift Scope [processChars] 33.73: zp ZP_BYTE:50 [ processChars::numActive#10 processChars::numActive#3 processChars::numActive#1 ] 22: zp ZP_BYTE:174 [ processChars::$67 ] 22: zp ZP_BYTE:175 [ processChars::$68 ] 22: zp ZP_BYTE:176 [ processChars::$69 ] 22: zp ZP_BYTE:177 [ processChars::$70 ] 22: zp ZP_BYTE:178 [ processChars::$37 ] 22: zp ZP_BYTE:184 [ processChars::$11 ] 22: zp ZP_BYTE:185 [ processChars::$12 ] 22: zp ZP_BYTE:187 [ processChars::$14 ] 22: zp ZP_BYTE:193 [ processChars::$26 ] 22: zp ZP_BYTE:194 [ processChars::xchar#0 ] 22: zp ZP_BYTE:195 [ processChars::$38 ] 22: zp ZP_BYTE:196 [ processChars::$30 ] 22: zp ZP_BYTE:197 [ processChars::ychar#0 ] 22: zp ZP_BYTE:198 [ processChars::$39 ] 22: zp ZP_BYTE:199 [ processChars::$33 ] 17.9: zp ZP_BYTE:49 [ processChars::i#10 processChars::i#1 ] 11: zp ZP_WORD:188 [ processChars::$15 ] 11: zp ZP_WORD:191 [ processChars::$25 ] 6.6: zp ZP_BYTE:186 [ processChars::$17 ] 2.75: zp ZP_BYTE:190 [ processChars::ypos#0 ] 2.2: zp ZP_BYTE:181 [ processChars::bitmask#0 ] 2.06: zp ZP_WORD:182 [ processChars::xpos#0 ] 0.31: zp ZP_WORD:179 [ processChars::processing#0 ] -Uplift Scope [sqrt] 202: zp ZP_BYTE:146 [ sqrt::return#2 ] 103: zp ZP_WORD:144 [ sqrt::val#0 ] 34.33: zp ZP_BYTE:158 [ sqrt::return#0 ] 4: zp ZP_WORD:152 [ sqrt::found#0 ] 4: zp ZP_WORD:154 [ sqrt::$3 ] 2: zp ZP_WORD:156 [ sqrt::$1 ] -Uplift Scope [main] 27.5: zp ZP_WORD:2 [ main::src#2 main::src#1 ] 26.67: zp ZP_WORD:4 [ main::dst#2 main::dst#1 main::dst#0 ] 22: zp ZP_BYTE:55 [ main::$26 ] 22: zp ZP_BYTE:56 [ main::$27 ] 22: zp ZP_BYTE:57 [ main::$28 ] 22: zp ZP_BYTE:58 [ main::$29 ] 22: zp ZP_BYTE:65 [ main::center_dist#0 ] 20.17: zp ZP_BYTE:6 [ main::i#2 main::i#1 ] 12.22: zp ZP_BYTE:59 [ main::$16 ] 5.5: zp ZP_BYTE:63 [ main::center_x#0 ] 5.5: zp ZP_BYTE:64 [ main::center_y#0 ] -Uplift Scope [init_squares] 25.17: zp ZP_WORD:42 [ init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 ] 22: zp ZP_BYTE:44 [ init_squares::i#2 init_squares::i#1 ] 22: zp ZP_BYTE:170 [ init_squares::$3 ] 22: zp ZP_BYTE:171 [ init_squares::$4 ] 13.93: zp ZP_WORD:40 [ init_squares::sqr#2 init_squares::sqr#1 ] +Uplift Scope [atan2_16] 28,670.58: zp ZP_BYTE:43 [ atan2_16::shift#2 atan2_16::shift#5 atan2_16::shift#1 ] 20,608: zp ZP_WORD:44 [ atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ] 17,338.67: zp ZP_WORD:46 [ atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] 7,533.33: zp ZP_WORD:39 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 ] 2,698.28: zp ZP_WORD:34 [ atan2_16::yi#3 atan2_16::yi#8 atan2_16::yi#0 atan2_16::yi#16 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ] 2,283.07: zp ZP_WORD:36 [ atan2_16::xi#3 atan2_16::xi#8 atan2_16::xi#0 atan2_16::xi#13 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] 2,002: zp ZP_BYTE:156 [ atan2_16::$24 ] 2,002: zp ZP_BYTE:157 [ atan2_16::$23 ] 1,710.04: zp ZP_BYTE:38 [ atan2_16::i#2 atan2_16::i#1 ] 202: zp ZP_WORD:146 [ atan2_16::return#2 ] 50: zp ZP_WORD:41 [ atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 ] 2.87: zp ZP_WORD:142 [ atan2_16::x#0 ] 2.72: zp ZP_WORD:144 [ atan2_16::y#0 ] +Uplift Scope [getCharToProcess] 4,983.53: zp ZP_BYTE:23 [ getCharToProcess::return_dist#1 getCharToProcess::return_dist#5 getCharToProcess::return_dist#6 getCharToProcess::dist#0 ] 3,432.25: zp ZP_BYTE:20 [ getCharToProcess::closest_dist#2 getCharToProcess::closest_dist#8 getCharToProcess::closest_dist#10 getCharToProcess::closest_dist#12 ] 2,937.96: zp ZP_BYTE:22 [ getCharToProcess::closest_y#7 getCharToProcess::closest_y#9 getCharToProcess::return_y#1 getCharToProcess::return_y#7 ] 1,949.11: zp ZP_BYTE:21 [ getCharToProcess::closest_x#7 getCharToProcess::closest_x#9 getCharToProcess::return_x#1 getCharToProcess::return_x#7 ] 1,557.11: zp ZP_BYTE:19 [ getCharToProcess::x#2 getCharToProcess::x#1 ] 181.2: zp ZP_BYTE:18 [ getCharToProcess::y#7 getCharToProcess::y#1 ] 140.57: zp ZP_WORD:16 [ getCharToProcess::dist_line#6 getCharToProcess::dist_line#0 getCharToProcess::dist_line#1 ] 135.09: zp ZP_WORD:14 [ getCharToProcess::screen_line#4 getCharToProcess::screen_line#0 getCharToProcess::screen_line#1 ] 7.33: zp ZP_BYTE:63 [ getCharToProcess::return_x#0 ] 7.33: zp ZP_BYTE:64 [ getCharToProcess::return_y#0 ] 7.33: zp ZP_BYTE:65 [ getCharToProcess::return_dist#0 ] 4: zp ZP_WORD:127 [ getCharToProcess::$12 ] 4: zp ZP_WORD:129 [ getCharToProcess::$13 ] 4: zp ZP_WORD:131 [ getCharToProcess::$9 ] 4: zp ZP_WORD:133 [ getCharToProcess::$10 ] 3: zp ZP_WORD:125 [ getCharToProcess::$8 ] +Uplift Scope [startProcessing] 2,589.5: zp ZP_BYTE:8 [ startProcessing::freeIdx#2 startProcessing::freeIdx#8 startProcessing::i#2 startProcessing::i#1 ] 2,002: zp ZP_BYTE:71 [ startProcessing::$42 ] 2,002: zp ZP_BYTE:72 [ startProcessing::$43 ] 2,002: zp ZP_BYTE:73 [ startProcessing::$44 ] 2,002: zp ZP_BYTE:74 [ startProcessing::$45 ] 2,002: zp ZP_BYTE:75 [ startProcessing::$30 ] 222.2: zp ZP_BYTE:7 [ startProcessing::freeIdx#6 startProcessing::freeIdx#7 ] 203.57: zp ZP_WORD:11 [ startProcessing::spriteData#2 startProcessing::spriteData#0 startProcessing::spriteData#1 ] 202: zp ZP_BYTE:13 [ startProcessing::i1#2 startProcessing::i1#1 ] 170.33: zp ZP_WORD:9 [ startProcessing::chargenData#2 startProcessing::chargenData#0 startProcessing::chargenData#1 ] 4: zp ZP_WORD:78 [ startProcessing::$47 ] 4: zp ZP_WORD:80 [ startProcessing::$48 ] 4: zp ZP_WORD:82 [ startProcessing::$1 ] 4: zp ZP_WORD:86 [ startProcessing::colPtr#0 ] 4: zp ZP_WORD:91 [ startProcessing::$5 ] 4: zp ZP_WORD:93 [ startProcessing::$6 ] 4: zp ZP_WORD:96 [ startProcessing::$8 ] 4: zp ZP_WORD:98 [ startProcessing::$9 ] 4: zp ZP_WORD:100 [ startProcessing::$11 ] 4: zp ZP_WORD:102 [ startProcessing::$12 ] 4: zp ZP_WORD:104 [ startProcessing::$13 ] 4: zp ZP_WORD:108 [ startProcessing::$15 ] 4: zp ZP_WORD:110 [ startProcessing::$16 ] 4: zp ZP_WORD:112 [ startProcessing::$17 ] 4: zp ZP_BYTE:120 [ startProcessing::$50 ] 4: zp ZP_BYTE:121 [ startProcessing::$51 ] 4: zp ZP_BYTE:122 [ startProcessing::$52 ] 4: zp ZP_BYTE:123 [ startProcessing::$53 ] 3: zp ZP_WORD:76 [ startProcessing::$0 ] 2.22: zp ZP_BYTE:124 [ startProcessing::$31 ] 2: zp ZP_WORD:84 [ startProcessing::offset#0 ] 2: zp ZP_BYTE:95 [ startProcessing::ch#0 ] 2: zp ZP_BYTE:117 [ startProcessing::$22 ] 0.5: zp ZP_WORD:118 [ startProcessing::$23 ] 0.4: zp ZP_WORD:114 [ startProcessing::spriteY#0 ] 0.31: zp ZP_BYTE:69 [ startProcessing::center_x#0 ] 0.31: zp ZP_WORD:106 [ startProcessing::spriteX#0 ] 0.31: zp ZP_BYTE:116 [ startProcessing::spritePtr#0 ] 0.24: zp ZP_BYTE:70 [ startProcessing::center_y#0 ] 0.14: zp ZP_WORD:89 [ startProcessing::screenPtr#0 ] 0.1: zp ZP_BYTE:88 [ startProcessing::spriteCol#0 ] +Uplift Scope [init_angle_screen] 202: zp ZP_BYTE:135 [ init_angle_screen::$2 ] 202: zp ZP_BYTE:136 [ init_angle_screen::$3 ] 202: zp ZP_BYTE:139 [ init_angle_screen::$6 ] 202: zp ZP_WORD:148 [ init_angle_screen::angle_w#0 ] 202: zp ZP_WORD:150 [ init_angle_screen::$10 ] 202: zp ZP_BYTE:153 [ init_angle_screen::$12 ] 202: zp ZP_BYTE:154 [ init_angle_screen::$13 ] 202: zp ZP_BYTE:155 [ init_angle_screen::$14 ] 126.25: zp ZP_BYTE:32 [ init_angle_screen::x#2 init_angle_screen::x#1 ] 120.24: zp ZP_BYTE:33 [ init_angle_screen::xb#2 init_angle_screen::xb#1 ] 84.17: zp ZP_BYTE:152 [ init_angle_screen::ang_w#0 ] 50.5: zp ZP_WORD:140 [ init_angle_screen::yw#0 ] 33.67: zp ZP_WORD:137 [ init_angle_screen::xw#0 ] 21.23: zp ZP_BYTE:27 [ init_angle_screen::y#4 init_angle_screen::y#1 ] 20.37: zp ZP_WORD:28 [ init_angle_screen::screen_bottomline#5 init_angle_screen::screen_bottomline#0 init_angle_screen::screen_bottomline#1 ] 16.92: zp ZP_WORD:30 [ init_angle_screen::screen_topline#5 init_angle_screen::screen_topline#0 init_angle_screen::screen_topline#1 ] 3: zp ZP_WORD:56 [ init_angle_screen::screen#0 ] +Uplift Scope [processChars] 33.73: zp ZP_BYTE:51 [ processChars::numActive#10 processChars::numActive#3 processChars::numActive#1 ] 22: zp ZP_BYTE:160 [ processChars::$67 ] 22: zp ZP_BYTE:161 [ processChars::$68 ] 22: zp ZP_BYTE:162 [ processChars::$69 ] 22: zp ZP_BYTE:163 [ processChars::$70 ] 22: zp ZP_BYTE:164 [ processChars::$37 ] 22: zp ZP_BYTE:170 [ processChars::$11 ] 22: zp ZP_BYTE:171 [ processChars::$12 ] 22: zp ZP_BYTE:173 [ processChars::$14 ] 22: zp ZP_BYTE:179 [ processChars::$26 ] 22: zp ZP_BYTE:180 [ processChars::xchar#0 ] 22: zp ZP_BYTE:181 [ processChars::$38 ] 22: zp ZP_BYTE:182 [ processChars::$30 ] 22: zp ZP_BYTE:183 [ processChars::ychar#0 ] 22: zp ZP_BYTE:184 [ processChars::$39 ] 22: zp ZP_BYTE:185 [ processChars::$33 ] 17.9: zp ZP_BYTE:50 [ processChars::i#10 processChars::i#1 ] 11: zp ZP_WORD:174 [ processChars::$15 ] 11: zp ZP_WORD:177 [ processChars::$25 ] 6.6: zp ZP_BYTE:172 [ processChars::$17 ] 2.75: zp ZP_BYTE:176 [ processChars::ypos#0 ] 2.2: zp ZP_BYTE:167 [ processChars::bitmask#0 ] 2.06: zp ZP_WORD:168 [ processChars::xpos#0 ] 0.31: zp ZP_WORD:165 [ processChars::processing#0 ] +Uplift Scope [main] 27.5: zp ZP_WORD:2 [ main::src#2 main::src#1 ] 26.67: zp ZP_WORD:4 [ main::dst#2 main::dst#1 main::dst#0 ] 22: zp ZP_BYTE:58 [ main::$26 ] 22: zp ZP_BYTE:59 [ main::$27 ] 22: zp ZP_BYTE:60 [ main::$28 ] 22: zp ZP_BYTE:61 [ main::$29 ] 22: zp ZP_BYTE:68 [ main::center_dist#0 ] 20.17: zp ZP_BYTE:6 [ main::i#2 main::i#1 ] 12.22: zp ZP_BYTE:62 [ main::$16 ] 5.5: zp ZP_BYTE:66 [ main::center_x#0 ] 5.5: zp ZP_BYTE:67 [ main::center_y#0 ] Uplift Scope [initSprites] 33: zp ZP_WORD:24 [ initSprites::sp#2 initSprites::sp#1 ] 33: zp ZP_BYTE:26 [ initSprites::i#2 initSprites::i#1 ] -Uplift Scope [] 4.6: zp ZP_WORD:45 [ heap_head#12 heap_head#1 ] 0.03: zp ZP_WORD:168 [ SQUARES#1 ] 0.03: zp ZP_WORD:53 [ SCREEN_DIST#0 ] 0.03: zp ZP_WORD:51 [ SCREEN_COPY#0 ] -Uplift Scope [malloc] 1: zp ZP_WORD:47 [ malloc::size#3 ] 0.33: zp ZP_WORD:172 [ malloc::mem#0 ] +Uplift Scope [] 4: zp ZP_WORD:48 [ heap_head#5 heap_head#1 ] 0.03: zp ZP_WORD:54 [ SCREEN_DIST#0 ] 0.03: zp ZP_WORD:52 [ SCREEN_COPY#0 ] +Uplift Scope [malloc] 0.4: zp ZP_WORD:158 [ malloc::mem#0 ] Uplift Scope [ProcessingChar] Uplift Scope [ProcessingSprite] Uplift Scope [ProcessingSprite::$0] @@ -8749,169 +8031,166 @@ Uplift Scope [setupRasterIrq] Uplift Scope [irqTop] Uplift Scope [irqBottom] -Uplifting [bsearch16u] best 373435 combination reg byte x [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#3 bsearch16u::num#0 ] zp ZP_WORD:36 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#1 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 ] reg byte a [ bsearch16u::$6 ] reg byte a [ bsearch16u::$16 ] zp ZP_WORD:163 [ bsearch16u::result#0 ] zp ZP_WORD:161 [ bsearch16u::pivot#0 ] zp ZP_WORD:150 [ bsearch16u::return#3 ] zp ZP_WORD:148 [ bsearch16u::key#0 ] -Uplifting [getCharToProcess] best 360102 combination reg byte x [ getCharToProcess::return_dist#1 getCharToProcess::return_dist#5 getCharToProcess::return_dist#6 getCharToProcess::dist#0 ] zp ZP_BYTE:20 [ getCharToProcess::closest_dist#2 getCharToProcess::closest_dist#8 getCharToProcess::closest_dist#10 getCharToProcess::closest_dist#12 ] zp ZP_BYTE:22 [ getCharToProcess::closest_y#7 getCharToProcess::closest_y#9 getCharToProcess::return_y#1 getCharToProcess::return_y#7 ] zp ZP_BYTE:21 [ getCharToProcess::closest_x#7 getCharToProcess::closest_x#9 getCharToProcess::return_x#1 getCharToProcess::return_x#7 ] zp ZP_BYTE:19 [ getCharToProcess::x#2 getCharToProcess::x#1 ] zp ZP_BYTE:18 [ getCharToProcess::y#7 getCharToProcess::y#1 ] zp ZP_WORD:16 [ getCharToProcess::dist_line#6 getCharToProcess::dist_line#0 getCharToProcess::dist_line#1 ] zp ZP_WORD:14 [ getCharToProcess::screen_line#4 getCharToProcess::screen_line#0 getCharToProcess::screen_line#1 ] zp ZP_BYTE:60 [ getCharToProcess::return_x#0 ] zp ZP_BYTE:61 [ getCharToProcess::return_y#0 ] zp ZP_BYTE:62 [ getCharToProcess::return_dist#0 ] zp ZP_WORD:124 [ getCharToProcess::$12 ] zp ZP_WORD:126 [ getCharToProcess::$13 ] zp ZP_WORD:128 [ getCharToProcess::$9 ] zp ZP_WORD:130 [ getCharToProcess::$10 ] zp ZP_WORD:122 [ getCharToProcess::$8 ] +Uplifting [atan2_16] best 1280029 combination reg byte y [ atan2_16::shift#2 atan2_16::shift#5 atan2_16::shift#1 ] zp ZP_WORD:44 [ atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ] zp ZP_WORD:46 [ atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] zp ZP_WORD:39 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 ] zp ZP_WORD:34 [ atan2_16::yi#3 atan2_16::yi#8 atan2_16::yi#0 atan2_16::yi#16 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ] zp ZP_WORD:36 [ atan2_16::xi#3 atan2_16::xi#8 atan2_16::xi#0 atan2_16::xi#13 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] reg byte a [ atan2_16::$24 ] reg byte a [ atan2_16::$23 ] reg byte x [ atan2_16::i#2 atan2_16::i#1 ] zp ZP_WORD:146 [ atan2_16::return#2 ] zp ZP_WORD:41 [ atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 ] zp ZP_WORD:142 [ atan2_16::x#0 ] zp ZP_WORD:144 [ atan2_16::y#0 ] +Limited combination testing to 100 combinations of 144 possible. +Uplifting [getCharToProcess] best 1266696 combination reg byte x [ getCharToProcess::return_dist#1 getCharToProcess::return_dist#5 getCharToProcess::return_dist#6 getCharToProcess::dist#0 ] zp ZP_BYTE:20 [ getCharToProcess::closest_dist#2 getCharToProcess::closest_dist#8 getCharToProcess::closest_dist#10 getCharToProcess::closest_dist#12 ] zp ZP_BYTE:22 [ getCharToProcess::closest_y#7 getCharToProcess::closest_y#9 getCharToProcess::return_y#1 getCharToProcess::return_y#7 ] zp ZP_BYTE:21 [ getCharToProcess::closest_x#7 getCharToProcess::closest_x#9 getCharToProcess::return_x#1 getCharToProcess::return_x#7 ] zp ZP_BYTE:19 [ getCharToProcess::x#2 getCharToProcess::x#1 ] zp ZP_BYTE:18 [ getCharToProcess::y#7 getCharToProcess::y#1 ] zp ZP_WORD:16 [ getCharToProcess::dist_line#6 getCharToProcess::dist_line#0 getCharToProcess::dist_line#1 ] zp ZP_WORD:14 [ getCharToProcess::screen_line#4 getCharToProcess::screen_line#0 getCharToProcess::screen_line#1 ] zp ZP_BYTE:63 [ getCharToProcess::return_x#0 ] zp ZP_BYTE:64 [ getCharToProcess::return_y#0 ] zp ZP_BYTE:65 [ getCharToProcess::return_dist#0 ] zp ZP_WORD:127 [ getCharToProcess::$12 ] zp ZP_WORD:129 [ getCharToProcess::$13 ] zp ZP_WORD:131 [ getCharToProcess::$9 ] zp ZP_WORD:133 [ getCharToProcess::$10 ] zp ZP_WORD:125 [ getCharToProcess::$8 ] Limited combination testing to 100 combinations of 46656 possible. -Uplifting [init_dist_screen] best 356902 combination reg byte a [ init_dist_screen::xd#0 init_dist_screen::$15 init_dist_screen::$13 ] reg byte a [ init_dist_screen::x2#0 ] zp ZP_WORD:140 [ init_dist_screen::xds#0 ] zp ZP_WORD:142 [ init_dist_screen::ds#0 ] zp ZP_BYTE:33 [ init_dist_screen::x#2 init_dist_screen::x#1 ] reg byte a [ init_dist_screen::d#0 ] zp ZP_BYTE:34 [ init_dist_screen::xb#2 init_dist_screen::xb#1 ] zp ZP_BYTE:32 [ init_dist_screen::yd#0 init_dist_screen::$7 init_dist_screen::$5 ] zp ZP_BYTE:132 [ init_dist_screen::y2#0 ] zp ZP_WORD:30 [ init_dist_screen::screen_bottomline#10 init_dist_screen::screen_bottomline#1 init_dist_screen::screen_bottomline#0 ] zp ZP_BYTE:27 [ init_dist_screen::y#10 init_dist_screen::y#1 ] zp ZP_WORD:28 [ init_dist_screen::screen_topline#10 init_dist_screen::screen_topline#1 init_dist_screen::screen#0 ] zp ZP_WORD:135 [ init_dist_screen::yds#0 ] -Limited combination testing to 100 combinations of 6144 possible. -Uplifting [sqr] best 356565 combination reg byte a [ sqr::val#2 sqr::val#0 sqr::val#1 ] zp ZP_WORD:138 [ sqr::return#3 ] zp ZP_WORD:166 [ sqr::return#0 ] zp ZP_WORD:133 [ sqr::return#2 ] reg byte a [ sqr::$0 ] -Uplifting [sqrt] best 355662 combination reg byte a [ sqrt::return#2 ] zp ZP_WORD:144 [ sqrt::val#0 ] reg byte a [ sqrt::return#0 ] zp ZP_WORD:152 [ sqrt::found#0 ] zp ZP_WORD:154 [ sqrt::$3 ] zp ZP_WORD:156 [ sqrt::$1 ] -Uplifting [main] best 355422 combination zp ZP_WORD:2 [ main::src#2 main::src#1 ] zp ZP_WORD:4 [ main::dst#2 main::dst#1 main::dst#0 ] reg byte a [ main::$26 ] reg byte a [ main::$27 ] reg byte a [ main::$28 ] reg byte a [ main::$29 ] zp ZP_BYTE:65 [ main::center_dist#0 ] zp ZP_BYTE:6 [ main::i#2 main::i#1 ] zp ZP_BYTE:59 [ main::$16 ] zp ZP_BYTE:63 [ main::center_x#0 ] zp ZP_BYTE:64 [ main::center_y#0 ] +Uplifting [init_angle_screen] best 1264496 combination reg byte a [ init_angle_screen::$2 ] reg byte a [ init_angle_screen::$3 ] reg byte a [ init_angle_screen::$6 ] zp ZP_WORD:148 [ init_angle_screen::angle_w#0 ] zp ZP_WORD:150 [ init_angle_screen::$10 ] reg byte a [ init_angle_screen::$12 ] zp ZP_BYTE:154 [ init_angle_screen::$13 ] zp ZP_BYTE:155 [ init_angle_screen::$14 ] zp ZP_BYTE:32 [ init_angle_screen::x#2 init_angle_screen::x#1 ] zp ZP_BYTE:33 [ init_angle_screen::xb#2 init_angle_screen::xb#1 ] zp ZP_BYTE:152 [ init_angle_screen::ang_w#0 ] zp ZP_WORD:140 [ init_angle_screen::yw#0 ] zp ZP_WORD:137 [ init_angle_screen::xw#0 ] zp ZP_BYTE:27 [ init_angle_screen::y#4 init_angle_screen::y#1 ] zp ZP_WORD:28 [ init_angle_screen::screen_bottomline#5 init_angle_screen::screen_bottomline#0 init_angle_screen::screen_bottomline#1 ] zp ZP_WORD:30 [ init_angle_screen::screen_topline#5 init_angle_screen::screen_topline#0 init_angle_screen::screen_topline#1 ] zp ZP_WORD:56 [ init_angle_screen::screen#0 ] +Limited combination testing to 100 combinations of 65536 possible. +Uplifting [main] best 1264256 combination zp ZP_WORD:2 [ main::src#2 main::src#1 ] zp ZP_WORD:4 [ main::dst#2 main::dst#1 main::dst#0 ] reg byte a [ main::$26 ] reg byte a [ main::$27 ] reg byte a [ main::$28 ] reg byte a [ main::$29 ] zp ZP_BYTE:68 [ main::center_dist#0 ] zp ZP_BYTE:6 [ main::i#2 main::i#1 ] zp ZP_BYTE:62 [ main::$16 ] zp ZP_BYTE:66 [ main::center_x#0 ] zp ZP_BYTE:67 [ main::center_y#0 ] Limited combination testing to 100 combinations of 147456 possible. -Uplifting [init_squares] best 355222 combination zp ZP_WORD:42 [ init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 ] reg byte x [ init_squares::i#2 init_squares::i#1 ] reg byte a [ init_squares::$3 ] reg byte a [ init_squares::$4 ] zp ZP_WORD:40 [ init_squares::sqr#2 init_squares::sqr#1 ] -Uplifting [initSprites] best 355102 combination zp ZP_WORD:24 [ initSprites::sp#2 initSprites::sp#1 ] reg byte x [ initSprites::i#2 initSprites::i#1 ] -Uplifting [] best 355102 combination zp ZP_WORD:45 [ heap_head#12 heap_head#1 ] zp ZP_WORD:168 [ SQUARES#1 ] zp ZP_WORD:53 [ SCREEN_DIST#0 ] zp ZP_WORD:51 [ SCREEN_COPY#0 ] -Uplifting [malloc] best 355102 combination zp ZP_WORD:47 [ malloc::size#3 ] zp ZP_WORD:172 [ malloc::mem#0 ] -Uplifting [ProcessingChar] best 355102 combination -Uplifting [ProcessingSprite] best 355102 combination -Uplifting [ProcessingSprite::$0] best 355102 combination -Uplifting [setupRasterIrq] best 355102 combination -Uplifting [irqTop] best 355102 combination -Uplifting [irqBottom] best 355102 combination +Uplifting [initSprites] best 1264136 combination zp ZP_WORD:24 [ initSprites::sp#2 initSprites::sp#1 ] reg byte x [ initSprites::i#2 initSprites::i#1 ] +Uplifting [] best 1264136 combination zp ZP_WORD:48 [ heap_head#5 heap_head#1 ] zp ZP_WORD:54 [ SCREEN_DIST#0 ] zp ZP_WORD:52 [ SCREEN_COPY#0 ] +Uplifting [malloc] best 1264136 combination zp ZP_WORD:158 [ malloc::mem#0 ] +Uplifting [ProcessingChar] best 1264136 combination +Uplifting [ProcessingSprite] best 1264136 combination +Uplifting [ProcessingSprite::$0] best 1264136 combination +Uplifting [setupRasterIrq] best 1264136 combination +Uplifting [irqTop] best 1264136 combination +Uplifting [irqBottom] best 1264136 combination Attempting to uplift remaining variables inzp ZP_BYTE:20 [ getCharToProcess::closest_dist#2 getCharToProcess::closest_dist#8 getCharToProcess::closest_dist#10 getCharToProcess::closest_dist#12 ] -Uplifting [getCharToProcess] best 355102 combination zp ZP_BYTE:20 [ getCharToProcess::closest_dist#2 getCharToProcess::closest_dist#8 getCharToProcess::closest_dist#10 getCharToProcess::closest_dist#12 ] +Uplifting [getCharToProcess] best 1264136 combination zp ZP_BYTE:20 [ getCharToProcess::closest_dist#2 getCharToProcess::closest_dist#8 getCharToProcess::closest_dist#10 getCharToProcess::closest_dist#12 ] Attempting to uplift remaining variables inzp ZP_BYTE:22 [ getCharToProcess::closest_y#7 getCharToProcess::closest_y#9 getCharToProcess::return_y#1 getCharToProcess::return_y#7 ] -Uplifting [getCharToProcess] best 355102 combination zp ZP_BYTE:22 [ getCharToProcess::closest_y#7 getCharToProcess::closest_y#9 getCharToProcess::return_y#1 getCharToProcess::return_y#7 ] +Uplifting [getCharToProcess] best 1264136 combination zp ZP_BYTE:22 [ getCharToProcess::closest_y#7 getCharToProcess::closest_y#9 getCharToProcess::return_y#1 getCharToProcess::return_y#7 ] Attempting to uplift remaining variables inzp ZP_BYTE:8 [ startProcessing::freeIdx#2 startProcessing::freeIdx#8 startProcessing::i#2 startProcessing::i#1 ] -Uplifting [startProcessing] best 355102 combination zp ZP_BYTE:8 [ startProcessing::freeIdx#2 startProcessing::freeIdx#8 startProcessing::i#2 startProcessing::i#1 ] -Attempting to uplift remaining variables inzp ZP_BYTE:68 [ startProcessing::$42 ] -Uplifting [startProcessing] best 349102 combination reg byte a [ startProcessing::$42 ] -Attempting to uplift remaining variables inzp ZP_BYTE:69 [ startProcessing::$43 ] -Uplifting [startProcessing] best 343102 combination reg byte a [ startProcessing::$43 ] -Attempting to uplift remaining variables inzp ZP_BYTE:70 [ startProcessing::$44 ] -Uplifting [startProcessing] best 337102 combination reg byte a [ startProcessing::$44 ] -Attempting to uplift remaining variables inzp ZP_BYTE:71 [ startProcessing::$45 ] -Uplifting [startProcessing] best 331102 combination reg byte a [ startProcessing::$45 ] -Attempting to uplift remaining variables inzp ZP_BYTE:72 [ startProcessing::$30 ] -Uplifting [startProcessing] best 327102 combination reg byte a [ startProcessing::$30 ] +Uplifting [startProcessing] best 1264136 combination zp ZP_BYTE:8 [ startProcessing::freeIdx#2 startProcessing::freeIdx#8 startProcessing::i#2 startProcessing::i#1 ] +Attempting to uplift remaining variables inzp ZP_BYTE:71 [ startProcessing::$42 ] +Uplifting [startProcessing] best 1258136 combination reg byte a [ startProcessing::$42 ] +Attempting to uplift remaining variables inzp ZP_BYTE:72 [ startProcessing::$43 ] +Uplifting [startProcessing] best 1252136 combination reg byte a [ startProcessing::$43 ] +Attempting to uplift remaining variables inzp ZP_BYTE:73 [ startProcessing::$44 ] +Uplifting [startProcessing] best 1246136 combination reg byte a [ startProcessing::$44 ] +Attempting to uplift remaining variables inzp ZP_BYTE:74 [ startProcessing::$45 ] +Uplifting [startProcessing] best 1240136 combination reg byte a [ startProcessing::$45 ] +Attempting to uplift remaining variables inzp ZP_BYTE:75 [ startProcessing::$30 ] +Uplifting [startProcessing] best 1236136 combination reg byte a [ startProcessing::$30 ] Attempting to uplift remaining variables inzp ZP_BYTE:21 [ getCharToProcess::closest_x#7 getCharToProcess::closest_x#9 getCharToProcess::return_x#1 getCharToProcess::return_x#7 ] -Uplifting [getCharToProcess] best 327102 combination zp ZP_BYTE:21 [ getCharToProcess::closest_x#7 getCharToProcess::closest_x#9 getCharToProcess::return_x#1 getCharToProcess::return_x#7 ] +Uplifting [getCharToProcess] best 1236136 combination zp ZP_BYTE:21 [ getCharToProcess::closest_x#7 getCharToProcess::closest_x#9 getCharToProcess::return_x#1 getCharToProcess::return_x#7 ] Attempting to uplift remaining variables inzp ZP_BYTE:19 [ getCharToProcess::x#2 getCharToProcess::x#1 ] -Uplifting [getCharToProcess] best 309102 combination reg byte y [ getCharToProcess::x#2 getCharToProcess::x#1 ] +Uplifting [getCharToProcess] best 1218136 combination reg byte y [ getCharToProcess::x#2 getCharToProcess::x#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:7 [ startProcessing::freeIdx#6 startProcessing::freeIdx#7 ] -Uplifting [startProcessing] best 308202 combination reg byte x [ startProcessing::freeIdx#6 startProcessing::freeIdx#7 ] +Uplifting [startProcessing] best 1217236 combination reg byte x [ startProcessing::freeIdx#6 startProcessing::freeIdx#7 ] Attempting to uplift remaining variables inzp ZP_BYTE:13 [ startProcessing::i1#2 startProcessing::i1#1 ] -Uplifting [startProcessing] best 307302 combination reg byte x [ startProcessing::i1#2 startProcessing::i1#1 ] +Uplifting [startProcessing] best 1216336 combination reg byte x [ startProcessing::i1#2 startProcessing::i1#1 ] +Attempting to uplift remaining variables inzp ZP_BYTE:154 [ init_angle_screen::$13 ] +Uplifting [init_angle_screen] best 1215936 combination reg byte a [ init_angle_screen::$13 ] +Attempting to uplift remaining variables inzp ZP_BYTE:155 [ init_angle_screen::$14 ] +Uplifting [init_angle_screen] best 1215336 combination reg byte a [ init_angle_screen::$14 ] Attempting to uplift remaining variables inzp ZP_BYTE:18 [ getCharToProcess::y#7 getCharToProcess::y#1 ] -Uplifting [getCharToProcess] best 307302 combination zp ZP_BYTE:18 [ getCharToProcess::y#7 getCharToProcess::y#1 ] -Attempting to uplift remaining variables inzp ZP_BYTE:33 [ init_dist_screen::x#2 init_dist_screen::x#1 ] -Uplifting [init_dist_screen] best 307302 combination zp ZP_BYTE:33 [ init_dist_screen::x#2 init_dist_screen::x#1 ] -Attempting to uplift remaining variables inzp ZP_BYTE:34 [ init_dist_screen::xb#2 init_dist_screen::xb#1 ] -Uplifting [init_dist_screen] best 307302 combination zp ZP_BYTE:34 [ init_dist_screen::xb#2 init_dist_screen::xb#1 ] -Attempting to uplift remaining variables inzp ZP_BYTE:32 [ init_dist_screen::yd#0 init_dist_screen::$7 init_dist_screen::$5 ] -Uplifting [init_dist_screen] best 307232 combination reg byte a [ init_dist_screen::yd#0 init_dist_screen::$7 init_dist_screen::$5 ] -Attempting to uplift remaining variables inzp ZP_BYTE:50 [ processChars::numActive#10 processChars::numActive#3 processChars::numActive#1 ] -Uplifting [processChars] best 307232 combination zp ZP_BYTE:50 [ processChars::numActive#10 processChars::numActive#3 processChars::numActive#1 ] -Attempting to uplift remaining variables inzp ZP_BYTE:65 [ main::center_dist#0 ] -Uplifting [main] best 307172 combination reg byte a [ main::center_dist#0 ] -Attempting to uplift remaining variables inzp ZP_BYTE:132 [ init_dist_screen::y2#0 ] -Uplifting [init_dist_screen] best 307072 combination reg byte a [ init_dist_screen::y2#0 ] -Attempting to uplift remaining variables inzp ZP_BYTE:174 [ processChars::$67 ] -Uplifting [processChars] best 307012 combination reg byte a [ processChars::$67 ] -Attempting to uplift remaining variables inzp ZP_BYTE:175 [ processChars::$68 ] -Uplifting [processChars] best 306952 combination reg byte a [ processChars::$68 ] -Attempting to uplift remaining variables inzp ZP_BYTE:176 [ processChars::$69 ] -Uplifting [processChars] best 306892 combination reg byte a [ processChars::$69 ] -Attempting to uplift remaining variables inzp ZP_BYTE:177 [ processChars::$70 ] -Uplifting [processChars] best 306832 combination reg byte a [ processChars::$70 ] -Attempting to uplift remaining variables inzp ZP_BYTE:178 [ processChars::$37 ] -Uplifting [processChars] best 306772 combination reg byte a [ processChars::$37 ] -Attempting to uplift remaining variables inzp ZP_BYTE:184 [ processChars::$11 ] -Uplifting [processChars] best 306712 combination reg byte a [ processChars::$11 ] -Attempting to uplift remaining variables inzp ZP_BYTE:185 [ processChars::$12 ] -Uplifting [processChars] best 306652 combination reg byte a [ processChars::$12 ] -Attempting to uplift remaining variables inzp ZP_BYTE:187 [ processChars::$14 ] -Uplifting [processChars] best 306592 combination reg byte a [ processChars::$14 ] -Attempting to uplift remaining variables inzp ZP_BYTE:193 [ processChars::$26 ] -Uplifting [processChars] best 306552 combination reg byte a [ processChars::$26 ] -Attempting to uplift remaining variables inzp ZP_BYTE:194 [ processChars::xchar#0 ] -Uplifting [processChars] best 306492 combination reg byte a [ processChars::xchar#0 ] -Attempting to uplift remaining variables inzp ZP_BYTE:195 [ processChars::$38 ] -Uplifting [processChars] best 306452 combination reg byte a [ processChars::$38 ] -Attempting to uplift remaining variables inzp ZP_BYTE:196 [ processChars::$30 ] -Uplifting [processChars] best 306412 combination reg byte a [ processChars::$30 ] -Attempting to uplift remaining variables inzp ZP_BYTE:197 [ processChars::ychar#0 ] -Uplifting [processChars] best 306352 combination reg byte a [ processChars::ychar#0 ] -Attempting to uplift remaining variables inzp ZP_BYTE:198 [ processChars::$39 ] -Uplifting [processChars] best 306312 combination reg byte a [ processChars::$39 ] -Attempting to uplift remaining variables inzp ZP_BYTE:199 [ processChars::$33 ] -Uplifting [processChars] best 306252 combination reg byte a [ processChars::$33 ] +Uplifting [getCharToProcess] best 1215336 combination zp ZP_BYTE:18 [ getCharToProcess::y#7 getCharToProcess::y#1 ] +Attempting to uplift remaining variables inzp ZP_BYTE:32 [ init_angle_screen::x#2 init_angle_screen::x#1 ] +Uplifting [init_angle_screen] best 1215336 combination zp ZP_BYTE:32 [ init_angle_screen::x#2 init_angle_screen::x#1 ] +Attempting to uplift remaining variables inzp ZP_BYTE:33 [ init_angle_screen::xb#2 init_angle_screen::xb#1 ] +Uplifting [init_angle_screen] best 1215336 combination zp ZP_BYTE:33 [ init_angle_screen::xb#2 init_angle_screen::xb#1 ] +Attempting to uplift remaining variables inzp ZP_BYTE:152 [ init_angle_screen::ang_w#0 ] +Uplifting [init_angle_screen] best 1215336 combination zp ZP_BYTE:152 [ init_angle_screen::ang_w#0 ] +Attempting to uplift remaining variables inzp ZP_BYTE:51 [ processChars::numActive#10 processChars::numActive#3 processChars::numActive#1 ] +Uplifting [processChars] best 1215336 combination zp ZP_BYTE:51 [ processChars::numActive#10 processChars::numActive#3 processChars::numActive#1 ] +Attempting to uplift remaining variables inzp ZP_BYTE:68 [ main::center_dist#0 ] +Uplifting [main] best 1215276 combination reg byte a [ main::center_dist#0 ] +Attempting to uplift remaining variables inzp ZP_BYTE:160 [ processChars::$67 ] +Uplifting [processChars] best 1215216 combination reg byte a [ processChars::$67 ] +Attempting to uplift remaining variables inzp ZP_BYTE:161 [ processChars::$68 ] +Uplifting [processChars] best 1215156 combination reg byte a [ processChars::$68 ] +Attempting to uplift remaining variables inzp ZP_BYTE:162 [ processChars::$69 ] +Uplifting [processChars] best 1215096 combination reg byte a [ processChars::$69 ] +Attempting to uplift remaining variables inzp ZP_BYTE:163 [ processChars::$70 ] +Uplifting [processChars] best 1215036 combination reg byte a [ processChars::$70 ] +Attempting to uplift remaining variables inzp ZP_BYTE:164 [ processChars::$37 ] +Uplifting [processChars] best 1214976 combination reg byte a [ processChars::$37 ] +Attempting to uplift remaining variables inzp ZP_BYTE:170 [ processChars::$11 ] +Uplifting [processChars] best 1214916 combination reg byte a [ processChars::$11 ] +Attempting to uplift remaining variables inzp ZP_BYTE:171 [ processChars::$12 ] +Uplifting [processChars] best 1214856 combination reg byte a [ processChars::$12 ] +Attempting to uplift remaining variables inzp ZP_BYTE:173 [ processChars::$14 ] +Uplifting [processChars] best 1214796 combination reg byte a [ processChars::$14 ] +Attempting to uplift remaining variables inzp ZP_BYTE:179 [ processChars::$26 ] +Uplifting [processChars] best 1214756 combination reg byte a [ processChars::$26 ] +Attempting to uplift remaining variables inzp ZP_BYTE:180 [ processChars::xchar#0 ] +Uplifting [processChars] best 1214696 combination reg byte a [ processChars::xchar#0 ] +Attempting to uplift remaining variables inzp ZP_BYTE:181 [ processChars::$38 ] +Uplifting [processChars] best 1214656 combination reg byte a [ processChars::$38 ] +Attempting to uplift remaining variables inzp ZP_BYTE:182 [ processChars::$30 ] +Uplifting [processChars] best 1214616 combination reg byte a [ processChars::$30 ] +Attempting to uplift remaining variables inzp ZP_BYTE:183 [ processChars::ychar#0 ] +Uplifting [processChars] best 1214556 combination reg byte a [ processChars::ychar#0 ] +Attempting to uplift remaining variables inzp ZP_BYTE:184 [ processChars::$39 ] +Uplifting [processChars] best 1214516 combination reg byte a [ processChars::$39 ] +Attempting to uplift remaining variables inzp ZP_BYTE:185 [ processChars::$33 ] +Uplifting [processChars] best 1214456 combination reg byte a [ processChars::$33 ] +Attempting to uplift remaining variables inzp ZP_BYTE:27 [ init_angle_screen::y#4 init_angle_screen::y#1 ] +Uplifting [init_angle_screen] best 1214456 combination zp ZP_BYTE:27 [ init_angle_screen::y#4 init_angle_screen::y#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:6 [ main::i#2 main::i#1 ] -Uplifting [main] best 306252 combination zp ZP_BYTE:6 [ main::i#2 main::i#1 ] -Attempting to uplift remaining variables inzp ZP_BYTE:49 [ processChars::i#10 processChars::i#1 ] -Uplifting [processChars] best 306252 combination zp ZP_BYTE:49 [ processChars::i#10 processChars::i#1 ] -Attempting to uplift remaining variables inzp ZP_BYTE:27 [ init_dist_screen::y#10 init_dist_screen::y#1 ] -Uplifting [init_dist_screen] best 306252 combination zp ZP_BYTE:27 [ init_dist_screen::y#10 init_dist_screen::y#1 ] -Attempting to uplift remaining variables inzp ZP_BYTE:59 [ main::$16 ] -Uplifting [main] best 306092 combination reg byte x [ main::$16 ] -Attempting to uplift remaining variables inzp ZP_BYTE:60 [ getCharToProcess::return_x#0 ] -Uplifting [getCharToProcess] best 306032 combination reg byte y [ getCharToProcess::return_x#0 ] -Attempting to uplift remaining variables inzp ZP_BYTE:61 [ getCharToProcess::return_y#0 ] -Uplifting [getCharToProcess] best 305972 combination reg byte a [ getCharToProcess::return_y#0 ] -Attempting to uplift remaining variables inzp ZP_BYTE:62 [ getCharToProcess::return_dist#0 ] -Uplifting [getCharToProcess] best 305932 combination reg byte x [ getCharToProcess::return_dist#0 ] -Attempting to uplift remaining variables inzp ZP_BYTE:186 [ processChars::$17 ] -Uplifting [processChars] best 305862 combination reg byte x [ processChars::$17 ] -Attempting to uplift remaining variables inzp ZP_BYTE:63 [ main::center_x#0 ] -Uplifting [main] best 305802 combination reg byte y [ main::center_x#0 ] -Attempting to uplift remaining variables inzp ZP_BYTE:64 [ main::center_y#0 ] -Uplifting [main] best 305802 combination zp ZP_BYTE:64 [ main::center_y#0 ] -Attempting to uplift remaining variables inzp ZP_BYTE:117 [ startProcessing::$50 ] -Uplifting [startProcessing] best 305796 combination reg byte a [ startProcessing::$50 ] -Attempting to uplift remaining variables inzp ZP_BYTE:118 [ startProcessing::$51 ] -Uplifting [startProcessing] best 305790 combination reg byte a [ startProcessing::$51 ] -Attempting to uplift remaining variables inzp ZP_BYTE:119 [ startProcessing::$52 ] -Uplifting [startProcessing] best 305784 combination reg byte a [ startProcessing::$52 ] -Attempting to uplift remaining variables inzp ZP_BYTE:120 [ startProcessing::$53 ] -Uplifting [startProcessing] best 305778 combination reg byte a [ startProcessing::$53 ] -Attempting to uplift remaining variables inzp ZP_BYTE:190 [ processChars::ypos#0 ] -Uplifting [processChars] best 305778 combination zp ZP_BYTE:190 [ processChars::ypos#0 ] -Attempting to uplift remaining variables inzp ZP_BYTE:121 [ startProcessing::$31 ] -Uplifting [startProcessing] best 305753 combination reg byte x [ startProcessing::$31 ] -Attempting to uplift remaining variables inzp ZP_BYTE:181 [ processChars::bitmask#0 ] -Uplifting [processChars] best 305753 combination zp ZP_BYTE:181 [ processChars::bitmask#0 ] -Attempting to uplift remaining variables inzp ZP_BYTE:92 [ startProcessing::ch#0 ] -Uplifting [startProcessing] best 305747 combination reg byte a [ startProcessing::ch#0 ] -Attempting to uplift remaining variables inzp ZP_BYTE:114 [ startProcessing::$22 ] -Uplifting [startProcessing] best 305741 combination reg byte a [ startProcessing::$22 ] -Attempting to uplift remaining variables inzp ZP_BYTE:66 [ startProcessing::center_x#0 ] -Uplifting [startProcessing] best 305741 combination zp ZP_BYTE:66 [ startProcessing::center_x#0 ] -Attempting to uplift remaining variables inzp ZP_BYTE:113 [ startProcessing::spritePtr#0 ] -Uplifting [startProcessing] best 305741 combination zp ZP_BYTE:113 [ startProcessing::spritePtr#0 ] -Attempting to uplift remaining variables inzp ZP_BYTE:67 [ startProcessing::center_y#0 ] -Uplifting [startProcessing] best 305741 combination zp ZP_BYTE:67 [ startProcessing::center_y#0 ] -Attempting to uplift remaining variables inzp ZP_BYTE:85 [ startProcessing::spriteCol#0 ] -Uplifting [startProcessing] best 305741 combination zp ZP_BYTE:85 [ startProcessing::spriteCol#0 ] -Coalescing zero page register with common assignment [ zp ZP_WORD:9 [ startProcessing::chargenData#2 startProcessing::chargenData#0 startProcessing::chargenData#1 ] ] with [ zp ZP_WORD:95 [ startProcessing::$9 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:11 [ startProcessing::spriteData#2 startProcessing::spriteData#0 startProcessing::spriteData#1 ] ] with [ zp ZP_WORD:90 [ startProcessing::$6 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:36 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#1 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 ] ] with [ zp ZP_WORD:150 [ bsearch16u::return#3 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_BYTE:64 [ main::center_y#0 ] ] with [ zp ZP_BYTE:67 [ startProcessing::center_y#0 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:73 [ startProcessing::$0 ] ] with [ zp ZP_WORD:77 [ startProcessing::$48 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:79 [ startProcessing::$1 ] ] with [ zp ZP_WORD:81 [ startProcessing::offset#0 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:97 [ startProcessing::$11 ] ] with [ zp ZP_WORD:99 [ startProcessing::$12 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:101 [ startProcessing::$13 ] ] with [ zp ZP_WORD:103 [ startProcessing::spriteX#0 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:105 [ startProcessing::$15 ] ] with [ zp ZP_WORD:107 [ startProcessing::$16 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:109 [ startProcessing::$17 ] ] with [ zp ZP_WORD:111 [ startProcessing::spriteY#0 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:122 [ getCharToProcess::$8 ] ] with [ zp ZP_WORD:126 [ getCharToProcess::$13 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:128 [ getCharToProcess::$9 ] ] with [ zp ZP_WORD:130 [ getCharToProcess::$10 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:133 [ sqr::return#2 ] ] with [ zp ZP_WORD:135 [ init_dist_screen::yds#0 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:138 [ sqr::return#3 ] ] with [ zp ZP_WORD:140 [ init_dist_screen::xds#0 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:138 [ sqr::return#3 init_dist_screen::xds#0 ] ] with [ zp ZP_WORD:166 [ sqr::return#0 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:142 [ init_dist_screen::ds#0 ] ] with [ zp ZP_WORD:144 [ sqrt::val#0 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:152 [ sqrt::found#0 ] ] with [ zp ZP_WORD:154 [ sqrt::$3 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:168 [ SQUARES#1 ] ] with [ zp ZP_WORD:172 [ malloc::mem#0 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:182 [ processChars::xpos#0 ] ] with [ zp ZP_WORD:191 [ processChars::$25 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:9 [ startProcessing::chargenData#2 startProcessing::chargenData#0 startProcessing::chargenData#1 startProcessing::$9 ] ] with [ zp ZP_WORD:93 [ startProcessing::$8 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:11 [ startProcessing::spriteData#2 startProcessing::spriteData#0 startProcessing::spriteData#1 startProcessing::$6 ] ] with [ zp ZP_WORD:88 [ startProcessing::$5 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:36 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#1 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 bsearch16u::return#3 ] ] with [ zp ZP_WORD:152 [ sqrt::found#0 sqrt::$3 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:73 [ startProcessing::$0 startProcessing::$48 ] ] with [ zp ZP_WORD:79 [ startProcessing::$1 startProcessing::offset#0 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:97 [ startProcessing::$11 startProcessing::$12 ] ] with [ zp ZP_WORD:101 [ startProcessing::$13 startProcessing::spriteX#0 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:105 [ startProcessing::$15 startProcessing::$16 ] ] with [ zp ZP_WORD:109 [ startProcessing::$17 startProcessing::spriteY#0 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:122 [ getCharToProcess::$8 getCharToProcess::$13 ] ] with [ zp ZP_WORD:128 [ getCharToProcess::$9 getCharToProcess::$10 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:138 [ sqr::return#3 init_dist_screen::xds#0 sqr::return#0 ] ] with [ zp ZP_WORD:142 [ init_dist_screen::ds#0 sqrt::val#0 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:36 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#1 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 bsearch16u::return#3 sqrt::found#0 sqrt::$3 ] ] with [ zp ZP_WORD:156 [ sqrt::$1 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:73 [ startProcessing::$0 startProcessing::$48 startProcessing::$1 startProcessing::offset#0 ] ] with [ zp ZP_WORD:86 [ startProcessing::screenPtr#0 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:138 [ sqr::return#3 init_dist_screen::xds#0 sqr::return#0 init_dist_screen::ds#0 sqrt::val#0 ] ] with [ zp ZP_WORD:148 [ bsearch16u::key#0 ] ] - score: 1 +Uplifting [main] best 1214456 combination zp ZP_BYTE:6 [ main::i#2 main::i#1 ] +Attempting to uplift remaining variables inzp ZP_BYTE:50 [ processChars::i#10 processChars::i#1 ] +Uplifting [processChars] best 1214456 combination zp ZP_BYTE:50 [ processChars::i#10 processChars::i#1 ] +Attempting to uplift remaining variables inzp ZP_BYTE:62 [ main::$16 ] +Uplifting [main] best 1214296 combination reg byte x [ main::$16 ] +Attempting to uplift remaining variables inzp ZP_BYTE:63 [ getCharToProcess::return_x#0 ] +Uplifting [getCharToProcess] best 1214236 combination reg byte y [ getCharToProcess::return_x#0 ] +Attempting to uplift remaining variables inzp ZP_BYTE:64 [ getCharToProcess::return_y#0 ] +Uplifting [getCharToProcess] best 1214176 combination reg byte a [ getCharToProcess::return_y#0 ] +Attempting to uplift remaining variables inzp ZP_BYTE:65 [ getCharToProcess::return_dist#0 ] +Uplifting [getCharToProcess] best 1214136 combination reg byte x [ getCharToProcess::return_dist#0 ] +Attempting to uplift remaining variables inzp ZP_BYTE:172 [ processChars::$17 ] +Uplifting [processChars] best 1214066 combination reg byte x [ processChars::$17 ] +Attempting to uplift remaining variables inzp ZP_BYTE:66 [ main::center_x#0 ] +Uplifting [main] best 1214006 combination reg byte y [ main::center_x#0 ] +Attempting to uplift remaining variables inzp ZP_BYTE:67 [ main::center_y#0 ] +Uplifting [main] best 1214006 combination zp ZP_BYTE:67 [ main::center_y#0 ] +Attempting to uplift remaining variables inzp ZP_BYTE:120 [ startProcessing::$50 ] +Uplifting [startProcessing] best 1214000 combination reg byte a [ startProcessing::$50 ] +Attempting to uplift remaining variables inzp ZP_BYTE:121 [ startProcessing::$51 ] +Uplifting [startProcessing] best 1213994 combination reg byte a [ startProcessing::$51 ] +Attempting to uplift remaining variables inzp ZP_BYTE:122 [ startProcessing::$52 ] +Uplifting [startProcessing] best 1213988 combination reg byte a [ startProcessing::$52 ] +Attempting to uplift remaining variables inzp ZP_BYTE:123 [ startProcessing::$53 ] +Uplifting [startProcessing] best 1213982 combination reg byte a [ startProcessing::$53 ] +Attempting to uplift remaining variables inzp ZP_BYTE:176 [ processChars::ypos#0 ] +Uplifting [processChars] best 1213982 combination zp ZP_BYTE:176 [ processChars::ypos#0 ] +Attempting to uplift remaining variables inzp ZP_BYTE:124 [ startProcessing::$31 ] +Uplifting [startProcessing] best 1213957 combination reg byte x [ startProcessing::$31 ] +Attempting to uplift remaining variables inzp ZP_BYTE:167 [ processChars::bitmask#0 ] +Uplifting [processChars] best 1213957 combination zp ZP_BYTE:167 [ processChars::bitmask#0 ] +Attempting to uplift remaining variables inzp ZP_BYTE:95 [ startProcessing::ch#0 ] +Uplifting [startProcessing] best 1213951 combination reg byte a [ startProcessing::ch#0 ] +Attempting to uplift remaining variables inzp ZP_BYTE:117 [ startProcessing::$22 ] +Uplifting [startProcessing] best 1213945 combination reg byte a [ startProcessing::$22 ] +Attempting to uplift remaining variables inzp ZP_BYTE:69 [ startProcessing::center_x#0 ] +Uplifting [startProcessing] best 1213945 combination zp ZP_BYTE:69 [ startProcessing::center_x#0 ] +Attempting to uplift remaining variables inzp ZP_BYTE:116 [ startProcessing::spritePtr#0 ] +Uplifting [startProcessing] best 1213945 combination zp ZP_BYTE:116 [ startProcessing::spritePtr#0 ] +Attempting to uplift remaining variables inzp ZP_BYTE:70 [ startProcessing::center_y#0 ] +Uplifting [startProcessing] best 1213945 combination zp ZP_BYTE:70 [ startProcessing::center_y#0 ] +Attempting to uplift remaining variables inzp ZP_BYTE:88 [ startProcessing::spriteCol#0 ] +Uplifting [startProcessing] best 1213945 combination zp ZP_BYTE:88 [ startProcessing::spriteCol#0 ] +Coalescing zero page register with common assignment [ zp ZP_WORD:9 [ startProcessing::chargenData#2 startProcessing::chargenData#0 startProcessing::chargenData#1 ] ] with [ zp ZP_WORD:98 [ startProcessing::$9 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:11 [ startProcessing::spriteData#2 startProcessing::spriteData#0 startProcessing::spriteData#1 ] ] with [ zp ZP_WORD:93 [ startProcessing::$6 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:28 [ init_angle_screen::screen_bottomline#5 init_angle_screen::screen_bottomline#0 init_angle_screen::screen_bottomline#1 ] ] with [ zp ZP_WORD:56 [ init_angle_screen::screen#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:39 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 ] ] with [ zp ZP_WORD:41 [ atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:54 [ SCREEN_DIST#0 ] ] with [ zp ZP_WORD:158 [ malloc::mem#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_BYTE:67 [ main::center_y#0 ] ] with [ zp ZP_BYTE:70 [ startProcessing::center_y#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:76 [ startProcessing::$0 ] ] with [ zp ZP_WORD:80 [ startProcessing::$48 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:82 [ startProcessing::$1 ] ] with [ zp ZP_WORD:84 [ startProcessing::offset#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:100 [ startProcessing::$11 ] ] with [ zp ZP_WORD:102 [ startProcessing::$12 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:104 [ startProcessing::$13 ] ] with [ zp ZP_WORD:106 [ startProcessing::spriteX#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:108 [ startProcessing::$15 ] ] with [ zp ZP_WORD:110 [ startProcessing::$16 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:112 [ startProcessing::$17 ] ] with [ zp ZP_WORD:114 [ startProcessing::spriteY#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:125 [ getCharToProcess::$8 ] ] with [ zp ZP_WORD:129 [ getCharToProcess::$13 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:131 [ getCharToProcess::$9 ] ] with [ zp ZP_WORD:133 [ getCharToProcess::$10 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:137 [ init_angle_screen::xw#0 ] ] with [ zp ZP_WORD:142 [ atan2_16::x#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:140 [ init_angle_screen::yw#0 ] ] with [ zp ZP_WORD:144 [ atan2_16::y#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:146 [ atan2_16::return#2 ] ] with [ zp ZP_WORD:148 [ init_angle_screen::angle_w#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:168 [ processChars::xpos#0 ] ] with [ zp ZP_WORD:177 [ processChars::$25 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:9 [ startProcessing::chargenData#2 startProcessing::chargenData#0 startProcessing::chargenData#1 startProcessing::$9 ] ] with [ zp ZP_WORD:96 [ startProcessing::$8 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:11 [ startProcessing::spriteData#2 startProcessing::spriteData#0 startProcessing::spriteData#1 startProcessing::$6 ] ] with [ zp ZP_WORD:91 [ startProcessing::$5 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:39 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 ] ] with [ zp ZP_WORD:146 [ atan2_16::return#2 init_angle_screen::angle_w#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:76 [ startProcessing::$0 startProcessing::$48 ] ] with [ zp ZP_WORD:82 [ startProcessing::$1 startProcessing::offset#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:100 [ startProcessing::$11 startProcessing::$12 ] ] with [ zp ZP_WORD:104 [ startProcessing::$13 startProcessing::spriteX#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:108 [ startProcessing::$15 startProcessing::$16 ] ] with [ zp ZP_WORD:112 [ startProcessing::$17 startProcessing::spriteY#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:125 [ getCharToProcess::$8 getCharToProcess::$13 ] ] with [ zp ZP_WORD:131 [ getCharToProcess::$9 getCharToProcess::$10 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:39 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 atan2_16::return#2 init_angle_screen::angle_w#0 ] ] with [ zp ZP_WORD:150 [ init_angle_screen::$10 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:76 [ startProcessing::$0 startProcessing::$48 startProcessing::$1 startProcessing::offset#0 ] ] with [ zp ZP_WORD:89 [ startProcessing::screenPtr#0 ] ] - score: 1 Allocated (was zp ZP_BYTE:8) zp ZP_BYTE:7 [ startProcessing::freeIdx#2 startProcessing::freeIdx#8 startProcessing::i#2 startProcessing::i#1 ] Allocated (was zp ZP_WORD:9) zp ZP_WORD:8 [ startProcessing::chargenData#2 startProcessing::chargenData#0 startProcessing::chargenData#1 startProcessing::$9 startProcessing::$8 ] Allocated (was zp ZP_WORD:11) zp ZP_WORD:10 [ startProcessing::spriteData#2 startProcessing::spriteData#0 startProcessing::spriteData#1 startProcessing::$6 startProcessing::$5 ] @@ -8922,42 +8201,41 @@ Allocated (was zp ZP_BYTE:20) zp ZP_BYTE:17 [ getCharToProcess::closest_dist#2 g Allocated (was zp ZP_BYTE:21) zp ZP_BYTE:18 [ getCharToProcess::closest_x#7 getCharToProcess::closest_x#9 getCharToProcess::return_x#1 getCharToProcess::return_x#7 ] Allocated (was zp ZP_BYTE:22) zp ZP_BYTE:19 [ getCharToProcess::closest_y#7 getCharToProcess::closest_y#9 getCharToProcess::return_y#1 getCharToProcess::return_y#7 ] Allocated (was zp ZP_WORD:24) zp ZP_WORD:20 [ initSprites::sp#2 initSprites::sp#1 ] -Allocated (was zp ZP_BYTE:27) zp ZP_BYTE:22 [ init_dist_screen::y#10 init_dist_screen::y#1 ] -Allocated (was zp ZP_WORD:28) zp ZP_WORD:23 [ init_dist_screen::screen_topline#10 init_dist_screen::screen_topline#1 init_dist_screen::screen#0 ] -Allocated (was zp ZP_WORD:30) zp ZP_WORD:25 [ init_dist_screen::screen_bottomline#10 init_dist_screen::screen_bottomline#1 init_dist_screen::screen_bottomline#0 ] -Allocated (was zp ZP_BYTE:33) zp ZP_BYTE:27 [ init_dist_screen::x#2 init_dist_screen::x#1 ] -Allocated (was zp ZP_BYTE:34) zp ZP_BYTE:28 [ init_dist_screen::xb#2 init_dist_screen::xb#1 ] -Allocated (was zp ZP_WORD:36) zp ZP_WORD:29 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#1 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 bsearch16u::return#3 sqrt::found#0 sqrt::$3 sqrt::$1 ] -Allocated (was zp ZP_WORD:40) zp ZP_WORD:31 [ init_squares::sqr#2 init_squares::sqr#1 ] -Allocated (was zp ZP_WORD:42) zp ZP_WORD:33 [ init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 ] -Allocated (was zp ZP_WORD:45) zp ZP_WORD:35 [ heap_head#12 heap_head#1 ] -Allocated (was zp ZP_WORD:47) zp ZP_WORD:37 [ malloc::size#3 ] -Allocated (was zp ZP_BYTE:49) zp ZP_BYTE:39 [ processChars::i#10 processChars::i#1 ] -Allocated (was zp ZP_BYTE:50) zp ZP_BYTE:40 [ processChars::numActive#10 processChars::numActive#3 processChars::numActive#1 ] -Allocated (was zp ZP_WORD:51) zp ZP_WORD:41 [ SCREEN_COPY#0 ] -Allocated (was zp ZP_WORD:53) zp ZP_WORD:43 [ SCREEN_DIST#0 ] -Allocated (was zp ZP_BYTE:64) zp ZP_BYTE:45 [ main::center_y#0 startProcessing::center_y#0 ] -Allocated (was zp ZP_BYTE:66) zp ZP_BYTE:46 [ startProcessing::center_x#0 ] -Allocated (was zp ZP_WORD:73) zp ZP_WORD:47 [ startProcessing::$0 startProcessing::$48 startProcessing::$1 startProcessing::offset#0 startProcessing::screenPtr#0 ] -Allocated (was zp ZP_WORD:75) zp ZP_WORD:49 [ startProcessing::$47 ] -Allocated (was zp ZP_WORD:83) zp ZP_WORD:51 [ startProcessing::colPtr#0 ] -Allocated (was zp ZP_BYTE:85) zp ZP_BYTE:53 [ startProcessing::spriteCol#0 ] -Allocated (was zp ZP_WORD:97) zp ZP_WORD:54 [ startProcessing::$11 startProcessing::$12 startProcessing::$13 startProcessing::spriteX#0 ] -Allocated (was zp ZP_WORD:105) zp ZP_WORD:56 [ startProcessing::$15 startProcessing::$16 startProcessing::$17 startProcessing::spriteY#0 ] -Allocated (was zp ZP_BYTE:113) zp ZP_BYTE:58 [ startProcessing::spritePtr#0 ] -Allocated (was zp ZP_WORD:115) zp ZP_WORD:59 [ startProcessing::$23 ] -Allocated (was zp ZP_WORD:122) zp ZP_WORD:61 [ getCharToProcess::$8 getCharToProcess::$13 getCharToProcess::$9 getCharToProcess::$10 ] -Allocated (was zp ZP_WORD:124) zp ZP_WORD:63 [ getCharToProcess::$12 ] -Allocated (was zp ZP_WORD:133) zp ZP_WORD:65 [ sqr::return#2 init_dist_screen::yds#0 ] -Allocated (was zp ZP_WORD:138) zp ZP_WORD:67 [ sqr::return#3 init_dist_screen::xds#0 sqr::return#0 init_dist_screen::ds#0 sqrt::val#0 bsearch16u::key#0 ] -Allocated (was zp ZP_WORD:161) zp ZP_WORD:69 [ bsearch16u::pivot#0 ] -Allocated (was zp ZP_WORD:163) zp ZP_WORD:71 [ bsearch16u::result#0 ] -Allocated (was zp ZP_WORD:168) zp ZP_WORD:73 [ SQUARES#1 malloc::mem#0 ] -Allocated (was zp ZP_WORD:179) zp ZP_WORD:75 [ processChars::processing#0 ] -Allocated (was zp ZP_BYTE:181) zp ZP_BYTE:77 [ processChars::bitmask#0 ] -Allocated (was zp ZP_WORD:182) zp ZP_WORD:78 [ processChars::xpos#0 processChars::$25 ] -Allocated (was zp ZP_WORD:188) zp ZP_WORD:80 [ processChars::$15 ] -Allocated (was zp ZP_BYTE:190) zp ZP_BYTE:82 [ processChars::ypos#0 ] +Allocated (was zp ZP_BYTE:27) zp ZP_BYTE:22 [ init_angle_screen::y#4 init_angle_screen::y#1 ] +Allocated (was zp ZP_WORD:28) zp ZP_WORD:23 [ init_angle_screen::screen_bottomline#5 init_angle_screen::screen_bottomline#0 init_angle_screen::screen_bottomline#1 init_angle_screen::screen#0 ] +Allocated (was zp ZP_WORD:30) zp ZP_WORD:25 [ init_angle_screen::screen_topline#5 init_angle_screen::screen_topline#0 init_angle_screen::screen_topline#1 ] +Allocated (was zp ZP_BYTE:32) zp ZP_BYTE:27 [ init_angle_screen::x#2 init_angle_screen::x#1 ] +Allocated (was zp ZP_BYTE:33) zp ZP_BYTE:28 [ init_angle_screen::xb#2 init_angle_screen::xb#1 ] +Allocated (was zp ZP_WORD:34) zp ZP_WORD:29 [ atan2_16::yi#3 atan2_16::yi#8 atan2_16::yi#0 atan2_16::yi#16 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ] +Allocated (was zp ZP_WORD:36) zp ZP_WORD:31 [ atan2_16::xi#3 atan2_16::xi#8 atan2_16::xi#0 atan2_16::xi#13 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] +Allocated (was zp ZP_WORD:39) zp ZP_WORD:33 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 atan2_16::return#2 init_angle_screen::angle_w#0 init_angle_screen::$10 ] +Allocated (was zp ZP_WORD:44) zp ZP_WORD:35 [ atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ] +Allocated (was zp ZP_WORD:46) zp ZP_WORD:37 [ atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] +Allocated (was zp ZP_WORD:48) zp ZP_WORD:39 [ heap_head#5 heap_head#1 ] +Allocated (was zp ZP_BYTE:50) zp ZP_BYTE:41 [ processChars::i#10 processChars::i#1 ] +Allocated (was zp ZP_BYTE:51) zp ZP_BYTE:42 [ processChars::numActive#10 processChars::numActive#3 processChars::numActive#1 ] +Allocated (was zp ZP_WORD:52) zp ZP_WORD:43 [ SCREEN_COPY#0 ] +Allocated (was zp ZP_WORD:54) zp ZP_WORD:45 [ SCREEN_DIST#0 malloc::mem#0 ] +Allocated (was zp ZP_BYTE:67) zp ZP_BYTE:47 [ main::center_y#0 startProcessing::center_y#0 ] +Allocated (was zp ZP_BYTE:69) zp ZP_BYTE:48 [ startProcessing::center_x#0 ] +Allocated (was zp ZP_WORD:76) zp ZP_WORD:49 [ startProcessing::$0 startProcessing::$48 startProcessing::$1 startProcessing::offset#0 startProcessing::screenPtr#0 ] +Allocated (was zp ZP_WORD:78) zp ZP_WORD:51 [ startProcessing::$47 ] +Allocated (was zp ZP_WORD:86) zp ZP_WORD:53 [ startProcessing::colPtr#0 ] +Allocated (was zp ZP_BYTE:88) zp ZP_BYTE:55 [ startProcessing::spriteCol#0 ] +Allocated (was zp ZP_WORD:100) zp ZP_WORD:56 [ startProcessing::$11 startProcessing::$12 startProcessing::$13 startProcessing::spriteX#0 ] +Allocated (was zp ZP_WORD:108) zp ZP_WORD:58 [ startProcessing::$15 startProcessing::$16 startProcessing::$17 startProcessing::spriteY#0 ] +Allocated (was zp ZP_BYTE:116) zp ZP_BYTE:60 [ startProcessing::spritePtr#0 ] +Allocated (was zp ZP_WORD:118) zp ZP_WORD:61 [ startProcessing::$23 ] +Allocated (was zp ZP_WORD:125) zp ZP_WORD:63 [ getCharToProcess::$8 getCharToProcess::$13 getCharToProcess::$9 getCharToProcess::$10 ] +Allocated (was zp ZP_WORD:127) zp ZP_WORD:65 [ getCharToProcess::$12 ] +Allocated (was zp ZP_WORD:137) zp ZP_WORD:67 [ init_angle_screen::xw#0 atan2_16::x#0 ] +Allocated (was zp ZP_WORD:140) zp ZP_WORD:69 [ init_angle_screen::yw#0 atan2_16::y#0 ] +Allocated (was zp ZP_BYTE:152) zp ZP_BYTE:71 [ init_angle_screen::ang_w#0 ] +Allocated (was zp ZP_WORD:165) zp ZP_WORD:72 [ processChars::processing#0 ] +Allocated (was zp ZP_BYTE:167) zp ZP_BYTE:74 [ processChars::bitmask#0 ] +Allocated (was zp ZP_WORD:168) zp ZP_WORD:75 [ processChars::xpos#0 processChars::$25 ] +Allocated (was zp ZP_WORD:174) zp ZP_WORD:77 [ processChars::$15 ] +Allocated (was zp ZP_BYTE:176) zp ZP_BYTE:79 [ processChars::ypos#0 ] ASSEMBLER BEFORE OPTIMIZATION //SEG0 File Comments @@ -8967,7 +8245,6 @@ ASSEMBLER BEFORE OPTIMIZATION :BasicUpstart(bbegin) .pc = $80d "Program" //SEG2 Global Constants & labels - .const SIZEOF_WORD = 2 .const STATUS_FREE = 0 .const STATUS_NEW = 1 .const STATUS_PROCESSING = 2 @@ -8981,6 +8258,8 @@ ASSEMBLER BEFORE OPTIMIZATION .const OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR = $c // Start of the heap used by malloc() .label HEAP_START = $c000 + // The number of iterations performed during 16-bit CORDIC atan2 calculation + .const CORDIC_ITERATIONS_16 = $f // Processor port data direction register .label PROCPORT_DDR = 0 // Mask for PROCESSOR_PORT_DDR which allows only memory configuration to be written @@ -9033,17 +8312,15 @@ ASSEMBLER BEFORE OPTIMIZATION .const NUM_PROCESSING = 8 // Distance value meaning not found .const NOT_FOUND = $ff - .const NUM_SQUARES = $30 .const RASTER_IRQ_TOP = $30 .const RASTER_IRQ_MIDDLE = $ff .const XPOS_RIGHTMOST = BORDER_XPOS_RIGHT<<4 .const YPOS_BOTTOMMOST = BORDER_YPOS_BOTTOM<<4 .const XPOS_LEFTMOST = BORDER_XPOS_LEFT-8<<4 .const YPOS_TOPMOST = BORDER_YPOS_TOP-8<<4 - .label heap_head = $23 - .label SQUARES = $49 - .label SCREEN_COPY = $29 - .label SCREEN_DIST = $2b + .label heap_head = $27 + .label SCREEN_COPY = $2b + .label SCREEN_DIST = $2d //SEG3 @begin bbegin: //SEG4 [1] phi from @begin to @1 [phi:@begin->@1] @@ -9052,342 +8329,326 @@ b1_from_bbegin: //SEG5 @1 b1: //SEG6 [2] call malloc -//SEG7 [254] phi from @1 to malloc [phi:@1->malloc] +//SEG7 [243] phi from @1 to malloc [phi:@1->malloc] malloc_from_b1: -//SEG8 [254] phi (word) malloc::size#3 = (word) $3e8 [phi:@1->malloc#0] -- vwuz1=vwuc1 - lda #<$3e8 - sta malloc.size - lda #>$3e8 - sta malloc.size+1 -//SEG9 [254] phi (byte*) heap_head#12 = (const byte*) HEAP_START#0 [phi:@1->malloc#1] -- pbuz1=pbuc1 +//SEG8 [243] phi (byte*) heap_head#5 = (const byte*) HEAP_START#0 [phi:@1->malloc#0] -- pbuz1=pbuc1 lda #HEAP_START sta heap_head+1 jsr malloc jmp b3 -//SEG10 @3 +//SEG9 @3 b3: -//SEG11 [3] (void*) SCREEN_COPY#0 ← (void*)(byte*) malloc::mem#0 -- pvoz1=pvoz2 +//SEG10 [3] (void*) SCREEN_COPY#0 ← (void*)(byte*) malloc::mem#0 -- pvoz1=pvoz2 lda malloc.mem sta SCREEN_COPY lda malloc.mem+1 sta SCREEN_COPY+1 -//SEG12 [4] call malloc -//SEG13 [254] phi from @3 to malloc [phi:@3->malloc] +//SEG11 [4] call malloc +//SEG12 [243] phi from @3 to malloc [phi:@3->malloc] malloc_from_b3: -//SEG14 [254] phi (word) malloc::size#3 = (word) $3e8 [phi:@3->malloc#0] -- vwuz1=vwuc1 - lda #<$3e8 - sta malloc.size - lda #>$3e8 - sta malloc.size+1 -//SEG15 [254] phi (byte*) heap_head#12 = (byte*) heap_head#1 [phi:@3->malloc#1] -- register_copy +//SEG13 [243] phi (byte*) heap_head#5 = (byte*) heap_head#1 [phi:@3->malloc#0] -- register_copy jsr malloc jmp b4 -//SEG16 @4 +//SEG14 @4 b4: -//SEG17 [5] (void*) SCREEN_DIST#0 ← (void*)(byte*) malloc::mem#0 -- pvoz1=pvoz2 - lda malloc.mem - sta SCREEN_DIST - lda malloc.mem+1 - sta SCREEN_DIST+1 -//SEG18 [6] phi from @4 to @2 [phi:@4->@2] +//SEG15 [5] (void*) SCREEN_DIST#0 ← (void*)(byte*) malloc::mem#0 +//SEG16 [6] phi from @4 to @2 [phi:@4->@2] b2_from_b4: jmp b2 -//SEG19 @2 +//SEG17 @2 b2: -//SEG20 [7] call main +//SEG18 [7] call main jsr main -//SEG21 [8] phi from @2 to @end [phi:@2->@end] +//SEG19 [8] phi from @2 to @end [phi:@2->@end] bend_from_b2: jmp bend -//SEG22 @end +//SEG20 @end bend: -//SEG23 main +//SEG21 main main: { .label dst = 4 .label src = 2 .label i = 6 - .label center_y = $2d - //SEG24 [9] (byte*) init_dist_screen::screen#0 ← (byte*)(void*) SCREEN_DIST#0 -- pbuz1=pbuz2 + .label center_y = $2f + //SEG22 [9] (byte*) init_angle_screen::screen#0 ← (byte*)(void*) SCREEN_DIST#0 -- pbuz1=pbuz2 lda SCREEN_DIST - sta init_dist_screen.screen + sta init_angle_screen.screen lda SCREEN_DIST+1 - sta init_dist_screen.screen+1 - //SEG25 [10] call init_dist_screen - //SEG26 [169] phi from main to init_dist_screen [phi:main->init_dist_screen] - init_dist_screen_from_main: - jsr init_dist_screen + sta init_angle_screen.screen+1 + //SEG23 [10] call init_angle_screen + jsr init_angle_screen jmp b8 - //SEG27 main::@8 + //SEG24 main::@8 b8: - //SEG28 [11] (byte*) main::dst#0 ← (byte*)(void*) SCREEN_COPY#0 -- pbuz1=pbuz2 + //SEG25 [11] (byte*) main::dst#0 ← (byte*)(void*) SCREEN_COPY#0 -- pbuz1=pbuz2 lda SCREEN_COPY sta dst lda SCREEN_COPY+1 sta dst+1 - //SEG29 [12] phi from main::@8 to main::@1 [phi:main::@8->main::@1] + //SEG26 [12] phi from main::@8 to main::@1 [phi:main::@8->main::@1] b1_from_b8: - //SEG30 [12] phi (byte*) main::dst#2 = (byte*) main::dst#0 [phi:main::@8->main::@1#0] -- register_copy - //SEG31 [12] phi (byte*) main::src#2 = (const byte*) SCREEN#0 [phi:main::@8->main::@1#1] -- pbuz1=pbuc1 + //SEG27 [12] phi (byte*) main::dst#2 = (byte*) main::dst#0 [phi:main::@8->main::@1#0] -- register_copy + //SEG28 [12] phi (byte*) main::src#2 = (const byte*) SCREEN#0 [phi:main::@8->main::@1#1] -- pbuz1=pbuc1 lda #SCREEN sta src+1 jmp b1 // Copy screen to screen copy - //SEG32 [12] phi from main::@1 to main::@1 [phi:main::@1->main::@1] + //SEG29 [12] phi from main::@1 to main::@1 [phi:main::@1->main::@1] b1_from_b1: - //SEG33 [12] phi (byte*) main::dst#2 = (byte*) main::dst#1 [phi:main::@1->main::@1#0] -- register_copy - //SEG34 [12] phi (byte*) main::src#2 = (byte*) main::src#1 [phi:main::@1->main::@1#1] -- register_copy + //SEG30 [12] phi (byte*) main::dst#2 = (byte*) main::dst#1 [phi:main::@1->main::@1#0] -- register_copy + //SEG31 [12] phi (byte*) main::src#2 = (byte*) main::src#1 [phi:main::@1->main::@1#1] -- register_copy jmp b1 - //SEG35 main::@1 + //SEG32 main::@1 b1: - //SEG36 [13] *((byte*) main::dst#2) ← *((byte*) main::src#2) -- _deref_pbuz1=_deref_pbuz2 + //SEG33 [13] *((byte*) main::dst#2) ← *((byte*) main::src#2) -- _deref_pbuz1=_deref_pbuz2 ldy #0 lda (src),y ldy #0 sta (dst),y - //SEG37 [14] (byte*) main::src#1 ← ++ (byte*) main::src#2 -- pbuz1=_inc_pbuz1 + //SEG34 [14] (byte*) main::src#1 ← ++ (byte*) main::src#2 -- pbuz1=_inc_pbuz1 inc src bne !+ inc src+1 !: - //SEG38 [15] (byte*) main::dst#1 ← ++ (byte*) main::dst#2 -- pbuz1=_inc_pbuz1 + //SEG35 [15] (byte*) main::dst#1 ← ++ (byte*) main::dst#2 -- pbuz1=_inc_pbuz1 inc dst bne !+ inc dst+1 !: - //SEG39 [16] if((byte*) main::src#1!=(const byte*) SCREEN#0+(word) $3e8) goto main::@1 -- pbuz1_neq_pbuc1_then_la1 + //SEG36 [16] if((byte*) main::src#1!=(const byte*) SCREEN#0+(word) $3e8) goto main::@1 -- pbuz1_neq_pbuc1_then_la1 lda src+1 cmp #>SCREEN+$3e8 bne b1_from_b1 lda src cmp #main::@2] + //SEG37 [17] phi from main::@1 to main::@2 [phi:main::@1->main::@2] b2_from_b1: - //SEG41 [17] phi (byte) main::i#2 = (byte) 0 [phi:main::@1->main::@2#0] -- vbuz1=vbuc1 + //SEG38 [17] phi (byte) main::i#2 = (byte) 0 [phi:main::@1->main::@2#0] -- vbuz1=vbuc1 lda #0 sta i jmp b2 // Init processing array - //SEG42 [17] phi from main::@2 to main::@2 [phi:main::@2->main::@2] + //SEG39 [17] phi from main::@2 to main::@2 [phi:main::@2->main::@2] b2_from_b2: - //SEG43 [17] phi (byte) main::i#2 = (byte) main::i#1 [phi:main::@2->main::@2#0] -- register_copy + //SEG40 [17] phi (byte) main::i#2 = (byte) main::i#1 [phi:main::@2->main::@2#0] -- register_copy jmp b2 - //SEG44 main::@2 + //SEG41 main::@2 b2: - //SEG45 [18] (byte) main::$26 ← (byte) main::i#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 + //SEG42 [18] (byte) main::$26 ← (byte) main::i#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 lda i asl - //SEG46 [19] (byte) main::$27 ← (byte) main::$26 + (byte) main::i#2 -- vbuaa=vbuaa_plus_vbuz1 + //SEG43 [19] (byte) main::$27 ← (byte) main::$26 + (byte) main::i#2 -- vbuaa=vbuaa_plus_vbuz1 clc adc i - //SEG47 [20] (byte) main::$28 ← (byte) main::$27 << (byte) 1 -- vbuaa=vbuaa_rol_1 + //SEG44 [20] (byte) main::$28 ← (byte) main::$27 << (byte) 1 -- vbuaa=vbuaa_rol_1 asl - //SEG48 [21] (byte) main::$29 ← (byte) main::$28 + (byte) main::i#2 -- vbuaa=vbuaa_plus_vbuz1 + //SEG45 [21] (byte) main::$29 ← (byte) main::$28 + (byte) main::i#2 -- vbuaa=vbuaa_plus_vbuz1 clc adc i - //SEG49 [22] (byte~) main::$16 ← (byte) main::$29 << (byte) 1 -- vbuxx=vbuaa_rol_1 + //SEG46 [22] (byte~) main::$16 ← (byte) main::$29 << (byte) 1 -- vbuxx=vbuaa_rol_1 asl tax - //SEG50 [23] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (byte~) main::$16) ← (byte) 0 -- pwuc1_derefidx_vbuxx=vbuc2 + //SEG47 [23] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (byte~) main::$16) ← (byte) 0 -- pwuc1_derefidx_vbuxx=vbuc2 lda #0 sta PROCESSING,x lda #0 sta PROCESSING+1,x - //SEG51 [24] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y + (byte~) main::$16) ← (byte) 0 -- pwuc1_derefidx_vbuxx=vbuc2 + //SEG48 [24] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y + (byte~) main::$16) ← (byte) 0 -- pwuc1_derefidx_vbuxx=vbuc2 lda #0 sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_Y,x lda #0 sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_Y+1,x - //SEG52 [25] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX + (byte~) main::$16) ← (byte) 0 -- pwuc1_derefidx_vbuxx=vbuc2 + //SEG49 [25] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX + (byte~) main::$16) ← (byte) 0 -- pwuc1_derefidx_vbuxx=vbuc2 lda #0 sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_VX,x lda #0 sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_VX+1,x - //SEG53 [26] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY + (byte~) main::$16) ← (byte) 0 -- pwuc1_derefidx_vbuxx=vbuc2 + //SEG50 [26] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY + (byte~) main::$16) ← (byte) 0 -- pwuc1_derefidx_vbuxx=vbuc2 lda #0 sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_VY,x lda #0 sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_VY+1,x - //SEG54 [27] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID + (byte~) main::$16) ← (byte) 0 -- pbuc1_derefidx_vbuxx=vbuc2 + //SEG51 [27] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID + (byte~) main::$16) ← (byte) 0 -- pbuc1_derefidx_vbuxx=vbuc2 lda #0 sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_ID,x - //SEG55 [28] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR + (byte~) main::$16) ← (byte) 0 -- pbuc1_derefidx_vbuxx=vbuc2 + //SEG52 [28] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR + (byte~) main::$16) ← (byte) 0 -- pbuc1_derefidx_vbuxx=vbuc2 lda #0 sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_PTR,x - //SEG56 [29] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_COL + (byte~) main::$16) ← (byte) 0 -- pbuc1_derefidx_vbuxx=vbuc2 + //SEG53 [29] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_COL + (byte~) main::$16) ← (byte) 0 -- pbuc1_derefidx_vbuxx=vbuc2 lda #0 sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_COL,x - //SEG57 [30] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS + (byte~) main::$16) ← (const byte) STATUS_FREE -- pbuc1_derefidx_vbuxx=vbuc2 + //SEG54 [30] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS + (byte~) main::$16) ← (const byte) STATUS_FREE -- pbuc1_derefidx_vbuxx=vbuc2 lda #STATUS_FREE sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_STATUS,x - //SEG58 [31] *((byte**)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR + (byte~) main::$16) ← (byte*) 0 -- pptc1_derefidx_vbuxx=pbuc2 + //SEG55 [31] *((byte**)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR + (byte~) main::$16) ← (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 - //SEG59 [32] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuz1=_inc_vbuz1 + //SEG56 [32] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuz1=_inc_vbuz1 inc i - //SEG60 [33] if((byte) main::i#1!=(const byte) NUM_PROCESSING#0-(byte) 1+(byte) 1) goto main::@2 -- vbuz1_neq_vbuc1_then_la1 + //SEG57 [33] if((byte) main::i#1!=(const byte) NUM_PROCESSING#0-(byte) 1+(byte) 1) goto main::@2 -- vbuz1_neq_vbuc1_then_la1 lda #NUM_PROCESSING-1+1 cmp i bne b2_from_b2 - //SEG61 [34] phi from main::@2 to main::@3 [phi:main::@2->main::@3] + //SEG58 [34] phi from main::@2 to main::@3 [phi:main::@2->main::@3] b3_from_b2: jmp b3 - //SEG62 main::@3 + //SEG59 main::@3 b3: - //SEG63 [35] call initSprites - //SEG64 [156] phi from main::@3 to initSprites [phi:main::@3->initSprites] + //SEG60 [35] call initSprites + //SEG61 [156] phi from main::@3 to initSprites [phi:main::@3->initSprites] initSprites_from_b3: jsr initSprites - //SEG65 [36] phi from main::@3 to main::@9 [phi:main::@3->main::@9] + //SEG62 [36] phi from main::@3 to main::@9 [phi:main::@3->main::@9] b9_from_b3: jmp b9 - //SEG66 main::@9 + //SEG63 main::@9 b9: - //SEG67 [37] call setupRasterIrq + //SEG64 [37] call setupRasterIrq jsr setupRasterIrq - //SEG68 [38] phi from main::@5 main::@9 to main::@4 [phi:main::@5/main::@9->main::@4] + //SEG65 [38] phi from main::@5 main::@9 to main::@4 [phi:main::@5/main::@9->main::@4] b4_from_b5: b4_from_b9: jmp b4 // Main loop - //SEG69 main::@4 + //SEG66 main::@4 b4: - //SEG70 [39] call getCharToProcess + //SEG67 [39] call getCharToProcess jsr getCharToProcess - //SEG71 [40] (byte) getCharToProcess::return_x#0 ← (byte) getCharToProcess::return_x#1 -- vbuyy=vbuz1 + //SEG68 [40] (byte) getCharToProcess::return_x#0 ← (byte) getCharToProcess::return_x#1 -- vbuyy=vbuz1 ldy getCharToProcess.return_x - //SEG72 [41] (byte) getCharToProcess::return_y#0 ← (byte) getCharToProcess::return_y#1 -- vbuaa=vbuz1 + //SEG69 [41] (byte) getCharToProcess::return_y#0 ← (byte) getCharToProcess::return_y#1 -- vbuaa=vbuz1 lda getCharToProcess.return_y - //SEG73 [42] (byte) getCharToProcess::return_dist#0 ← (byte) getCharToProcess::return_dist#1 + //SEG70 [42] (byte) getCharToProcess::return_dist#0 ← (byte) getCharToProcess::return_dist#1 jmp b10 - //SEG74 main::@10 + //SEG71 main::@10 b10: - //SEG75 [43] (byte) main::center_x#0 ← (byte) getCharToProcess::return_x#0 - //SEG76 [44] (byte) main::center_y#0 ← (byte) getCharToProcess::return_y#0 -- vbuz1=vbuaa + //SEG72 [43] (byte) main::center_x#0 ← (byte) getCharToProcess::return_x#0 + //SEG73 [44] (byte) main::center_y#0 ← (byte) getCharToProcess::return_y#0 -- vbuz1=vbuaa sta center_y - //SEG77 [45] (byte) main::center_dist#0 ← (byte) getCharToProcess::return_dist#0 -- vbuaa=vbuxx + //SEG74 [45] (byte) main::center_dist#0 ← (byte) getCharToProcess::return_dist#0 -- vbuaa=vbuxx txa - //SEG78 [46] if((byte) main::center_dist#0!=(const byte) NOT_FOUND#0) goto main::@5 -- vbuaa_neq_vbuc1_then_la1 + //SEG75 [46] if((byte) main::center_dist#0!=(const byte) NOT_FOUND#0) goto main::@5 -- vbuaa_neq_vbuc1_then_la1 cmp #NOT_FOUND bne b5 jmp b6 - //SEG79 main::@6 + //SEG76 main::@6 b6: - //SEG80 [47] *((const byte*) SCREEN#0+(word) $3e7) ← (byte) '.' -- _deref_pbuc1=vbuc2 + //SEG77 [47] *((const byte*) SCREEN#0+(word) $3e7) ← (byte) '.' -- _deref_pbuc1=vbuc2 lda #'.' sta SCREEN+$3e7 jmp b7 - //SEG81 main::@7 + //SEG78 main::@7 b7: - //SEG82 [48] *((const byte*) COLS#0+(word) $3e7) ← ++ *((const byte*) COLS#0+(word) $3e7) -- _deref_pbuc1=_inc__deref_pbuc1 + //SEG79 [48] *((const byte*) COLS#0+(word) $3e7) ← ++ *((const byte*) COLS#0+(word) $3e7) -- _deref_pbuc1=_inc__deref_pbuc1 inc COLS+$3e7 jmp b7 - //SEG83 main::@5 + //SEG80 main::@5 b5: - //SEG84 [49] (byte) startProcessing::center_x#0 ← (byte) main::center_x#0 -- vbuz1=vbuyy + //SEG81 [49] (byte) startProcessing::center_x#0 ← (byte) main::center_x#0 -- vbuz1=vbuyy sty startProcessing.center_x - //SEG85 [50] (byte) startProcessing::center_y#0 ← (byte) main::center_y#0 - //SEG86 [51] call startProcessing - //SEG87 [52] phi from main::@5 to startProcessing [phi:main::@5->startProcessing] + //SEG82 [50] (byte) startProcessing::center_y#0 ← (byte) main::center_y#0 + //SEG83 [51] call startProcessing + //SEG84 [52] phi from main::@5 to startProcessing [phi:main::@5->startProcessing] startProcessing_from_b5: jsr startProcessing jmp b4_from_b5 } -//SEG88 startProcessing +//SEG85 startProcessing // Start processing a char - by inserting it into the PROCESSING array -// startProcessing(byte zeropage($2e) center_x, byte zeropage($2d) center_y) +// startProcessing(byte zeropage($30) center_x, byte zeropage($2f) center_y) startProcessing: { - .label _0 = $2f - .label _1 = $2f + .label _0 = $31 + .label _1 = $31 .label _5 = $a .label _6 = $a .label _8 = 8 .label _9 = 8 - .label _11 = $36 - .label _12 = $36 - .label _13 = $36 - .label _15 = $38 - .label _16 = $38 - .label _17 = $38 - .label _23 = $3b - .label center_x = $2e - .label center_y = $2d + .label _11 = $38 + .label _12 = $38 + .label _13 = $38 + .label _15 = $3a + .label _16 = $3a + .label _17 = $3a + .label _23 = $3d + .label center_x = $30 + .label center_y = $2f .label i = 7 - .label offset = $2f - .label colPtr = $33 - .label spriteCol = $35 - .label screenPtr = $2f + .label offset = $31 + .label colPtr = $35 + .label spriteCol = $37 + .label screenPtr = $31 .label spriteData = $a .label chargenData = 8 - .label spriteX = $36 - .label spriteY = $38 - .label spritePtr = $3a + .label spriteX = $38 + .label spriteY = $3a + .label spritePtr = $3c .label freeIdx = 7 - .label _47 = $31 - .label _48 = $2f - //SEG89 [53] phi from startProcessing to startProcessing::@1 [phi:startProcessing->startProcessing::@1] + .label _47 = $33 + .label _48 = $31 + //SEG86 [53] phi from startProcessing to startProcessing::@1 [phi:startProcessing->startProcessing::@1] b1_from_startProcessing: - //SEG90 [53] phi (byte) startProcessing::freeIdx#6 = (byte) $ff [phi:startProcessing->startProcessing::@1#0] -- vbuxx=vbuc1 + //SEG87 [53] phi (byte) startProcessing::freeIdx#6 = (byte) $ff [phi:startProcessing->startProcessing::@1#0] -- vbuxx=vbuc1 ldx #$ff jmp b1 - //SEG91 startProcessing::@1 + //SEG88 startProcessing::@1 b1: - //SEG92 [54] phi from startProcessing::@1 to startProcessing::@2 [phi:startProcessing::@1->startProcessing::@2] + //SEG89 [54] phi from startProcessing::@1 to startProcessing::@2 [phi:startProcessing::@1->startProcessing::@2] b2_from_b1: - //SEG93 [54] phi (byte) startProcessing::i#2 = (byte) 0 [phi:startProcessing::@1->startProcessing::@2#0] -- vbuz1=vbuc1 + //SEG90 [54] phi (byte) startProcessing::i#2 = (byte) 0 [phi:startProcessing::@1->startProcessing::@2#0] -- vbuz1=vbuc1 lda #0 sta i jmp b2 - //SEG94 [54] phi from startProcessing::@3 to startProcessing::@2 [phi:startProcessing::@3->startProcessing::@2] + //SEG91 [54] phi from startProcessing::@3 to startProcessing::@2 [phi:startProcessing::@3->startProcessing::@2] b2_from_b3: - //SEG95 [54] phi (byte) startProcessing::i#2 = (byte) startProcessing::i#1 [phi:startProcessing::@3->startProcessing::@2#0] -- register_copy + //SEG92 [54] phi (byte) startProcessing::i#2 = (byte) startProcessing::i#1 [phi:startProcessing::@3->startProcessing::@2#0] -- register_copy jmp b2 - //SEG96 startProcessing::@2 + //SEG93 startProcessing::@2 b2: - //SEG97 [55] (byte) startProcessing::$42 ← (byte) startProcessing::i#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 + //SEG94 [55] (byte) startProcessing::$42 ← (byte) startProcessing::i#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 lda i asl - //SEG98 [56] (byte) startProcessing::$43 ← (byte) startProcessing::$42 + (byte) startProcessing::i#2 -- vbuaa=vbuaa_plus_vbuz1 + //SEG95 [56] (byte) startProcessing::$43 ← (byte) startProcessing::$42 + (byte) startProcessing::i#2 -- vbuaa=vbuaa_plus_vbuz1 clc adc i - //SEG99 [57] (byte) startProcessing::$44 ← (byte) startProcessing::$43 << (byte) 1 -- vbuaa=vbuaa_rol_1 + //SEG96 [57] (byte) startProcessing::$44 ← (byte) startProcessing::$43 << (byte) 1 -- vbuaa=vbuaa_rol_1 asl - //SEG100 [58] (byte) startProcessing::$45 ← (byte) startProcessing::$44 + (byte) startProcessing::i#2 -- vbuaa=vbuaa_plus_vbuz1 + //SEG97 [58] (byte) startProcessing::$45 ← (byte) startProcessing::$44 + (byte) startProcessing::i#2 -- vbuaa=vbuaa_plus_vbuz1 clc adc i - //SEG101 [59] (byte~) startProcessing::$30 ← (byte) startProcessing::$45 << (byte) 1 -- vbuaa=vbuaa_rol_1 + //SEG98 [59] (byte~) startProcessing::$30 ← (byte) startProcessing::$45 << (byte) 1 -- vbuaa=vbuaa_rol_1 asl - //SEG102 [60] if(*((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS + (byte~) startProcessing::$30)!=(const byte) STATUS_FREE) goto startProcessing::@3 -- pbuc1_derefidx_vbuaa_neq_vbuc2_then_la1 + //SEG99 [60] if(*((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS + (byte~) startProcessing::$30)!=(const byte) STATUS_FREE) goto startProcessing::@3 -- pbuc1_derefidx_vbuaa_neq_vbuc2_then_la1 tay lda #STATUS_FREE cmp PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_STATUS,y bne b3 - //SEG103 [61] phi from startProcessing::@2 startProcessing::@9 to startProcessing::@4 [phi:startProcessing::@2/startProcessing::@9->startProcessing::@4] + //SEG100 [61] phi from startProcessing::@2 startProcessing::@9 to startProcessing::@4 [phi:startProcessing::@2/startProcessing::@9->startProcessing::@4] b4_from_b2: b4_from_b9: - //SEG104 [61] phi (byte) startProcessing::freeIdx#2 = (byte) startProcessing::i#2 [phi:startProcessing::@2/startProcessing::@9->startProcessing::@4#0] -- register_copy + //SEG101 [61] phi (byte) startProcessing::freeIdx#2 = (byte) startProcessing::i#2 [phi:startProcessing::@2/startProcessing::@9->startProcessing::@4#0] -- register_copy jmp b4 - //SEG105 startProcessing::@4 + //SEG102 startProcessing::@4 b4: - //SEG106 [62] if((byte) startProcessing::freeIdx#2==(byte) $ff) goto startProcessing::@8 -- vbuz1_eq_vbuc1_then_la1 + //SEG103 [62] if((byte) startProcessing::freeIdx#2==(byte) $ff) goto startProcessing::@8 -- vbuz1_eq_vbuc1_then_la1 lda #$ff cmp freeIdx beq b8 jmp b5 - //SEG107 startProcessing::@5 + //SEG104 startProcessing::@5 b5: - //SEG108 [63] (word~) startProcessing::$0 ← (word)(byte) startProcessing::center_y#0 -- vwuz1=_word_vbuz2 + //SEG105 [63] (word~) startProcessing::$0 ← (word)(byte) startProcessing::center_y#0 -- vwuz1=_word_vbuz2 lda center_y sta _0 lda #0 sta _0+1 - //SEG109 [64] (word) startProcessing::$47 ← (word~) startProcessing::$0 << (byte) 2 -- vwuz1=vwuz2_rol_2 + //SEG106 [64] (word) startProcessing::$47 ← (word~) startProcessing::$0 << (byte) 2 -- vwuz1=vwuz2_rol_2 lda _0 asl sta _47 @@ -9396,7 +8657,7 @@ startProcessing: { sta _47+1 asl _47 rol _47+1 - //SEG110 [65] (word) startProcessing::$48 ← (word) startProcessing::$47 + (word~) startProcessing::$0 -- vwuz1=vwuz2_plus_vwuz1 + //SEG107 [65] (word) startProcessing::$48 ← (word) startProcessing::$47 + (word~) startProcessing::$0 -- vwuz1=vwuz2_plus_vwuz1 lda _48 clc adc _47 @@ -9404,14 +8665,14 @@ startProcessing: { lda _48+1 adc _47+1 sta _48+1 - //SEG111 [66] (word~) startProcessing::$1 ← (word) startProcessing::$48 << (byte) 3 -- vwuz1=vwuz1_rol_3 + //SEG108 [66] (word~) startProcessing::$1 ← (word) startProcessing::$48 << (byte) 3 -- vwuz1=vwuz1_rol_3 asl _1 rol _1+1 asl _1 rol _1+1 asl _1 rol _1+1 - //SEG112 [67] (word) startProcessing::offset#0 ← (word~) startProcessing::$1 + (byte) startProcessing::center_x#0 -- vwuz1=vwuz1_plus_vbuz2 + //SEG109 [67] (word) startProcessing::offset#0 ← (word~) startProcessing::$1 + (byte) startProcessing::center_x#0 -- vwuz1=vwuz1_plus_vbuz2 lda center_x clc adc offset @@ -9419,7 +8680,7 @@ startProcessing: { bcc !+ inc offset+1 !: - //SEG113 [68] (byte*) startProcessing::colPtr#0 ← (const byte*) COLS#0 + (word) startProcessing::offset#0 -- pbuz1=pbuc1_plus_vwuz2 + //SEG110 [68] (byte*) startProcessing::colPtr#0 ← (const byte*) COLS#0 + (word) startProcessing::offset#0 -- pbuz1=pbuc1_plus_vwuz2 lda offset clc adc #COLS sta colPtr+1 - //SEG114 [69] (byte) startProcessing::spriteCol#0 ← *((byte*) startProcessing::colPtr#0) -- vbuz1=_deref_pbuz2 + //SEG111 [69] (byte) startProcessing::spriteCol#0 ← *((byte*) startProcessing::colPtr#0) -- vbuz1=_deref_pbuz2 ldy #0 lda (colPtr),y sta spriteCol - //SEG115 [70] (byte*) startProcessing::screenPtr#0 ← (const byte*) SCREEN#0 + (word) startProcessing::offset#0 -- pbuz1=pbuc1_plus_vwuz1 + //SEG112 [70] (byte*) startProcessing::screenPtr#0 ← (const byte*) SCREEN#0 + (word) startProcessing::offset#0 -- pbuz1=pbuc1_plus_vwuz1 clc lda screenPtr adc #SCREEN sta screenPtr+1 - //SEG116 [71] (word~) startProcessing::$5 ← (word)(byte) startProcessing::freeIdx#2 -- vwuz1=_word_vbuz2 + //SEG113 [71] (word~) startProcessing::$5 ← (word)(byte) startProcessing::freeIdx#2 -- vwuz1=_word_vbuz2 lda freeIdx sta _5 lda #0 sta _5+1 - //SEG117 [72] (word~) startProcessing::$6 ← (word~) startProcessing::$5 << (byte) 6 -- vwuz1=vwuz1_rol_6 + //SEG114 [72] (word~) startProcessing::$6 ← (word~) startProcessing::$5 << (byte) 6 -- vwuz1=vwuz1_rol_6 asl _6 rol _6+1 asl _6 @@ -9457,7 +8718,7 @@ startProcessing: { rol _6+1 asl _6 rol _6+1 - //SEG118 [73] (byte*) startProcessing::spriteData#0 ← (const byte*) SPRITE_DATA#0 + (word~) startProcessing::$6 -- pbuz1=pbuc1_plus_vwuz1 + //SEG115 [73] (byte*) startProcessing::spriteData#0 ← (const byte*) SPRITE_DATA#0 + (word~) startProcessing::$6 -- pbuz1=pbuc1_plus_vwuz1 clc lda spriteData adc #SPRITE_DATA sta spriteData+1 - //SEG119 [74] (byte) startProcessing::ch#0 ← *((byte*) startProcessing::screenPtr#0) -- vbuaa=_deref_pbuz1 + //SEG116 [74] (byte) startProcessing::ch#0 ← *((byte*) startProcessing::screenPtr#0) -- vbuaa=_deref_pbuz1 ldy #0 lda (screenPtr),y - //SEG120 [75] (word~) startProcessing::$8 ← (word)(byte) startProcessing::ch#0 -- vwuz1=_word_vbuaa + //SEG117 [75] (word~) startProcessing::$8 ← (word)(byte) startProcessing::ch#0 -- vwuz1=_word_vbuaa sta _8 lda #0 sta _8+1 - //SEG121 [76] (word~) startProcessing::$9 ← (word~) startProcessing::$8 << (byte) 3 -- vwuz1=vwuz1_rol_3 + //SEG118 [76] (word~) startProcessing::$9 ← (word~) startProcessing::$8 << (byte) 3 -- vwuz1=vwuz1_rol_3 asl _9 rol _9+1 asl _9 rol _9+1 asl _9 rol _9+1 - //SEG122 [77] (byte*) startProcessing::chargenData#0 ← (const byte*) CHARGEN#0 + (word~) startProcessing::$9 -- pbuz1=pbuc1_plus_vwuz1 + //SEG119 [77] (byte*) startProcessing::chargenData#0 ← (const byte*) CHARGEN#0 + (word~) startProcessing::$9 -- pbuz1=pbuc1_plus_vwuz1 clc lda chargenData adc #CHARGEN sta chargenData+1 - //SEG123 asm { sei } + //SEG120 asm { sei } sei - //SEG124 [79] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_CHARROM#0 -- _deref_pbuc1=vbuc2 + //SEG121 [79] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_CHARROM#0 -- _deref_pbuc1=vbuc2 lda #PROCPORT_RAM_CHARROM sta PROCPORT - //SEG125 [80] phi from startProcessing::@5 to startProcessing::@6 [phi:startProcessing::@5->startProcessing::@6] + //SEG122 [80] phi from startProcessing::@5 to startProcessing::@6 [phi:startProcessing::@5->startProcessing::@6] b6_from_b5: - //SEG126 [80] phi (byte) startProcessing::i1#2 = (byte) 0 [phi:startProcessing::@5->startProcessing::@6#0] -- vbuxx=vbuc1 + //SEG123 [80] phi (byte) startProcessing::i1#2 = (byte) 0 [phi:startProcessing::@5->startProcessing::@6#0] -- vbuxx=vbuc1 ldx #0 - //SEG127 [80] phi (byte*) startProcessing::spriteData#2 = (byte*) startProcessing::spriteData#0 [phi:startProcessing::@5->startProcessing::@6#1] -- register_copy - //SEG128 [80] phi (byte*) startProcessing::chargenData#2 = (byte*) startProcessing::chargenData#0 [phi:startProcessing::@5->startProcessing::@6#2] -- register_copy + //SEG124 [80] phi (byte*) startProcessing::spriteData#2 = (byte*) startProcessing::spriteData#0 [phi:startProcessing::@5->startProcessing::@6#1] -- register_copy + //SEG125 [80] phi (byte*) startProcessing::chargenData#2 = (byte*) startProcessing::chargenData#0 [phi:startProcessing::@5->startProcessing::@6#2] -- register_copy jmp b6 - //SEG129 [80] phi from startProcessing::@6 to startProcessing::@6 [phi:startProcessing::@6->startProcessing::@6] + //SEG126 [80] phi from startProcessing::@6 to startProcessing::@6 [phi:startProcessing::@6->startProcessing::@6] b6_from_b6: - //SEG130 [80] phi (byte) startProcessing::i1#2 = (byte) startProcessing::i1#1 [phi:startProcessing::@6->startProcessing::@6#0] -- register_copy - //SEG131 [80] phi (byte*) startProcessing::spriteData#2 = (byte*) startProcessing::spriteData#1 [phi:startProcessing::@6->startProcessing::@6#1] -- register_copy - //SEG132 [80] phi (byte*) startProcessing::chargenData#2 = (byte*) startProcessing::chargenData#1 [phi:startProcessing::@6->startProcessing::@6#2] -- register_copy + //SEG127 [80] phi (byte) startProcessing::i1#2 = (byte) startProcessing::i1#1 [phi:startProcessing::@6->startProcessing::@6#0] -- register_copy + //SEG128 [80] phi (byte*) startProcessing::spriteData#2 = (byte*) startProcessing::spriteData#1 [phi:startProcessing::@6->startProcessing::@6#1] -- register_copy + //SEG129 [80] phi (byte*) startProcessing::chargenData#2 = (byte*) startProcessing::chargenData#1 [phi:startProcessing::@6->startProcessing::@6#2] -- register_copy jmp b6 - //SEG133 startProcessing::@6 + //SEG130 startProcessing::@6 b6: - //SEG134 [81] *((byte*) startProcessing::spriteData#2) ← *((byte*) startProcessing::chargenData#2) -- _deref_pbuz1=_deref_pbuz2 + //SEG131 [81] *((byte*) startProcessing::spriteData#2) ← *((byte*) startProcessing::chargenData#2) -- _deref_pbuz1=_deref_pbuz2 ldy #0 lda (chargenData),y ldy #0 sta (spriteData),y - //SEG135 [82] (byte*) startProcessing::spriteData#1 ← (byte*) startProcessing::spriteData#2 + (byte) 3 -- pbuz1=pbuz1_plus_vbuc1 + //SEG132 [82] (byte*) startProcessing::spriteData#1 ← (byte*) startProcessing::spriteData#2 + (byte) 3 -- pbuz1=pbuz1_plus_vbuc1 lda #3 clc adc spriteData @@ -9520,37 +8781,37 @@ startProcessing: { bcc !+ inc spriteData+1 !: - //SEG136 [83] (byte*) startProcessing::chargenData#1 ← ++ (byte*) startProcessing::chargenData#2 -- pbuz1=_inc_pbuz1 + //SEG133 [83] (byte*) startProcessing::chargenData#1 ← ++ (byte*) startProcessing::chargenData#2 -- pbuz1=_inc_pbuz1 inc chargenData bne !+ inc chargenData+1 !: - //SEG137 [84] (byte) startProcessing::i1#1 ← ++ (byte) startProcessing::i1#2 -- vbuxx=_inc_vbuxx + //SEG134 [84] (byte) startProcessing::i1#1 ← ++ (byte) startProcessing::i1#2 -- vbuxx=_inc_vbuxx inx - //SEG138 [85] if((byte) startProcessing::i1#1!=(byte) 8) goto startProcessing::@6 -- vbuxx_neq_vbuc1_then_la1 + //SEG135 [85] if((byte) startProcessing::i1#1!=(byte) 8) goto startProcessing::@6 -- vbuxx_neq_vbuc1_then_la1 cpx #8 bne b6_from_b6 jmp b7 - //SEG139 startProcessing::@7 + //SEG136 startProcessing::@7 b7: - //SEG140 [86] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 -- _deref_pbuc1=vbuc2 + //SEG137 [86] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 -- _deref_pbuc1=vbuc2 lda #PROCPORT_RAM_IO sta PROCPORT - //SEG141 asm { cli } + //SEG138 asm { cli } cli - //SEG142 [88] (word~) startProcessing::$11 ← (word)(byte) startProcessing::center_x#0 -- vwuz1=_word_vbuz2 + //SEG139 [88] (word~) startProcessing::$11 ← (word)(byte) startProcessing::center_x#0 -- vwuz1=_word_vbuz2 lda center_x sta _11 lda #0 sta _11+1 - //SEG143 [89] (word~) startProcessing::$12 ← (word~) startProcessing::$11 << (byte) 3 -- vwuz1=vwuz1_rol_3 + //SEG140 [89] (word~) startProcessing::$12 ← (word~) startProcessing::$11 << (byte) 3 -- vwuz1=vwuz1_rol_3 asl _12 rol _12+1 asl _12 rol _12+1 asl _12 rol _12+1 - //SEG144 [90] (word~) startProcessing::$13 ← (const byte) BORDER_XPOS_LEFT#0 + (word~) startProcessing::$12 -- vwuz1=vbuc1_plus_vwuz1 + //SEG141 [90] (word~) startProcessing::$13 ← (const byte) BORDER_XPOS_LEFT#0 + (word~) startProcessing::$12 -- vwuz1=vbuc1_plus_vwuz1 lda #BORDER_XPOS_LEFT clc adc _13 @@ -9558,7 +8819,7 @@ startProcessing: { bcc !+ inc _13+1 !: - //SEG145 [91] (word) startProcessing::spriteX#0 ← (word~) startProcessing::$13 << (byte) 4 -- vwuz1=vwuz1_rol_4 + //SEG142 [91] (word) startProcessing::spriteX#0 ← (word~) startProcessing::$13 << (byte) 4 -- vwuz1=vwuz1_rol_4 asl spriteX rol spriteX+1 asl spriteX @@ -9567,19 +8828,19 @@ startProcessing: { rol spriteX+1 asl spriteX rol spriteX+1 - //SEG146 [92] (word~) startProcessing::$15 ← (word)(byte) startProcessing::center_y#0 -- vwuz1=_word_vbuz2 + //SEG143 [92] (word~) startProcessing::$15 ← (word)(byte) startProcessing::center_y#0 -- vwuz1=_word_vbuz2 lda center_y sta _15 lda #0 sta _15+1 - //SEG147 [93] (word~) startProcessing::$16 ← (word~) startProcessing::$15 << (byte) 3 -- vwuz1=vwuz1_rol_3 + //SEG144 [93] (word~) startProcessing::$16 ← (word~) startProcessing::$15 << (byte) 3 -- vwuz1=vwuz1_rol_3 asl _16 rol _16+1 asl _16 rol _16+1 asl _16 rol _16+1 - //SEG148 [94] (word~) startProcessing::$17 ← (const byte) BORDER_YPOS_TOP#0 + (word~) startProcessing::$16 -- vwuz1=vbuc1_plus_vwuz1 + //SEG145 [94] (word~) startProcessing::$17 ← (const byte) BORDER_YPOS_TOP#0 + (word~) startProcessing::$16 -- vwuz1=vbuc1_plus_vwuz1 lda #BORDER_YPOS_TOP clc adc _17 @@ -9587,7 +8848,7 @@ startProcessing: { bcc !+ inc _17+1 !: - //SEG149 [95] (word) startProcessing::spriteY#0 ← (word~) startProcessing::$17 << (byte) 4 -- vwuz1=vwuz1_rol_4 + //SEG146 [95] (word) startProcessing::spriteY#0 ← (word~) startProcessing::$17 << (byte) 4 -- vwuz1=vwuz1_rol_4 asl spriteY rol spriteY+1 asl spriteY @@ -9596,105 +8857,105 @@ startProcessing: { rol spriteY+1 asl spriteY rol spriteY+1 - //SEG150 [96] (byte) startProcessing::spritePtr#0 ← (byte)(const byte*) SPRITE_DATA#0/(byte) $40 + (byte) startProcessing::freeIdx#2 -- vbuz1=vbuc1_plus_vbuz2 + //SEG147 [96] (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 - //SEG151 [97] (byte~) startProcessing::$22 ← (byte) startProcessing::freeIdx#2 << (byte) 3 -- vbuaa=vbuz1_rol_3 + //SEG148 [97] (byte~) startProcessing::$22 ← (byte) startProcessing::freeIdx#2 << (byte) 3 -- vbuaa=vbuz1_rol_3 lda freeIdx asl asl asl - //SEG152 [98] (word~) startProcessing::$23 ← (word)(byte~) startProcessing::$22 -- vwuz1=_word_vbuaa + //SEG149 [98] (word~) startProcessing::$23 ← (word)(byte~) startProcessing::$22 -- vwuz1=_word_vbuaa sta _23 lda #0 sta _23+1 - //SEG153 [99] (byte) startProcessing::$50 ← (byte) startProcessing::freeIdx#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 + //SEG150 [99] (byte) startProcessing::$50 ← (byte) startProcessing::freeIdx#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 lda freeIdx asl - //SEG154 [100] (byte) startProcessing::$51 ← (byte) startProcessing::$50 + (byte) startProcessing::freeIdx#2 -- vbuaa=vbuaa_plus_vbuz1 + //SEG151 [100] (byte) startProcessing::$51 ← (byte) startProcessing::$50 + (byte) startProcessing::freeIdx#2 -- vbuaa=vbuaa_plus_vbuz1 clc adc freeIdx - //SEG155 [101] (byte) startProcessing::$52 ← (byte) startProcessing::$51 << (byte) 1 -- vbuaa=vbuaa_rol_1 + //SEG152 [101] (byte) startProcessing::$52 ← (byte) startProcessing::$51 << (byte) 1 -- vbuaa=vbuaa_rol_1 asl - //SEG156 [102] (byte) startProcessing::$53 ← (byte) startProcessing::$52 + (byte) startProcessing::freeIdx#2 -- vbuaa=vbuaa_plus_vbuz1 + //SEG153 [102] (byte) startProcessing::$53 ← (byte) startProcessing::$52 + (byte) startProcessing::freeIdx#2 -- vbuaa=vbuaa_plus_vbuz1 clc adc freeIdx - //SEG157 [103] (byte~) startProcessing::$31 ← (byte) startProcessing::$53 << (byte) 1 -- vbuxx=vbuaa_rol_1 + //SEG154 [103] (byte~) startProcessing::$31 ← (byte) startProcessing::$53 << (byte) 1 -- vbuxx=vbuaa_rol_1 asl tax - //SEG158 [104] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (byte~) startProcessing::$31) ← (word) startProcessing::spriteX#0 -- pwuc1_derefidx_vbuxx=vwuz1 + //SEG155 [104] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (byte~) startProcessing::$31) ← (word) startProcessing::spriteX#0 -- pwuc1_derefidx_vbuxx=vwuz1 lda spriteX sta PROCESSING,x lda spriteX+1 sta PROCESSING+1,x - //SEG159 [105] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y + (byte~) startProcessing::$31) ← (word) startProcessing::spriteY#0 -- pwuc1_derefidx_vbuxx=vwuz1 + //SEG156 [105] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y + (byte~) startProcessing::$31) ← (word) startProcessing::spriteY#0 -- pwuc1_derefidx_vbuxx=vwuz1 lda spriteY sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_Y,x lda spriteY+1 sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_Y+1,x - //SEG160 [106] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX + (byte~) startProcessing::$31) ← (word~) startProcessing::$23 -- pwuc1_derefidx_vbuxx=vwuz1 + //SEG157 [106] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX + (byte~) startProcessing::$31) ← (word~) startProcessing::$23 -- pwuc1_derefidx_vbuxx=vwuz1 lda _23 sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_VX,x lda _23+1 sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_VX+1,x - //SEG161 [107] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY + (byte~) startProcessing::$31) ← (byte) $3c -- pwuc1_derefidx_vbuxx=vbuc2 + //SEG158 [107] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY + (byte~) startProcessing::$31) ← (byte) $3c -- pwuc1_derefidx_vbuxx=vbuc2 lda #$3c sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_VY,x lda #0 sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_VY+1,x - //SEG162 [108] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID + (byte~) startProcessing::$31) ← (byte) startProcessing::freeIdx#2 -- pbuc1_derefidx_vbuxx=vbuz1 + //SEG159 [108] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID + (byte~) startProcessing::$31) ← (byte) startProcessing::freeIdx#2 -- pbuc1_derefidx_vbuxx=vbuz1 lda freeIdx sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_ID,x - //SEG163 [109] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR + (byte~) startProcessing::$31) ← (byte) startProcessing::spritePtr#0 -- pbuc1_derefidx_vbuxx=vbuz1 + //SEG160 [109] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR + (byte~) startProcessing::$31) ← (byte) startProcessing::spritePtr#0 -- pbuc1_derefidx_vbuxx=vbuz1 lda spritePtr sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_PTR,x - //SEG164 [110] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_COL + (byte~) startProcessing::$31) ← (byte) startProcessing::spriteCol#0 -- pbuc1_derefidx_vbuxx=vbuz1 + //SEG161 [110] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_COL + (byte~) startProcessing::$31) ← (byte) startProcessing::spriteCol#0 -- pbuc1_derefidx_vbuxx=vbuz1 lda spriteCol sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_COL,x - //SEG165 [111] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS + (byte~) startProcessing::$31) ← (const byte) STATUS_NEW -- pbuc1_derefidx_vbuxx=vbuc2 + //SEG162 [111] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS + (byte~) startProcessing::$31) ← (const byte) STATUS_NEW -- pbuc1_derefidx_vbuxx=vbuc2 lda #STATUS_NEW sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_STATUS,x - //SEG166 [112] *((byte**)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR + (byte~) startProcessing::$31) ← (byte*) startProcessing::screenPtr#0 -- pptc1_derefidx_vbuxx=pbuz1 + //SEG163 [112] *((byte**)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR + (byte~) startProcessing::$31) ← (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 - //SEG167 startProcessing::@return + //SEG164 startProcessing::@return breturn: - //SEG168 [113] return + //SEG165 [113] return rts - //SEG169 startProcessing::@8 + //SEG166 startProcessing::@8 b8: - //SEG170 [114] (byte~) startProcessing::freeIdx#7 ← (byte) startProcessing::freeIdx#2 -- vbuxx=vbuz1 + //SEG167 [114] (byte~) startProcessing::freeIdx#7 ← (byte) startProcessing::freeIdx#2 -- vbuxx=vbuz1 ldx freeIdx - //SEG171 [53] phi from startProcessing::@8 to startProcessing::@1 [phi:startProcessing::@8->startProcessing::@1] + //SEG168 [53] phi from startProcessing::@8 to startProcessing::@1 [phi:startProcessing::@8->startProcessing::@1] b1_from_b8: - //SEG172 [53] phi (byte) startProcessing::freeIdx#6 = (byte~) startProcessing::freeIdx#7 [phi:startProcessing::@8->startProcessing::@1#0] -- register_copy + //SEG169 [53] phi (byte) startProcessing::freeIdx#6 = (byte~) startProcessing::freeIdx#7 [phi:startProcessing::@8->startProcessing::@1#0] -- register_copy jmp b1 - //SEG173 startProcessing::@3 + //SEG170 startProcessing::@3 b3: - //SEG174 [115] (byte) startProcessing::i#1 ← ++ (byte) startProcessing::i#2 -- vbuz1=_inc_vbuz1 + //SEG171 [115] (byte) startProcessing::i#1 ← ++ (byte) startProcessing::i#2 -- vbuz1=_inc_vbuz1 inc i - //SEG175 [116] if((byte) startProcessing::i#1!=(const byte) NUM_PROCESSING#0-(byte) 1+(byte) 1) goto startProcessing::@2 -- vbuz1_neq_vbuc1_then_la1 + //SEG172 [116] if((byte) startProcessing::i#1!=(const byte) NUM_PROCESSING#0-(byte) 1+(byte) 1) goto startProcessing::@2 -- vbuz1_neq_vbuc1_then_la1 lda #NUM_PROCESSING-1+1 cmp i bne b2_from_b3 jmp b9 - //SEG176 startProcessing::@9 + //SEG173 startProcessing::@9 b9: - //SEG177 [117] (byte~) startProcessing::freeIdx#8 ← (byte) startProcessing::freeIdx#6 -- vbuz1=vbuxx + //SEG174 [117] (byte~) startProcessing::freeIdx#8 ← (byte) startProcessing::freeIdx#6 -- vbuz1=vbuxx stx freeIdx jmp b4_from_b9 } -//SEG178 getCharToProcess +//SEG175 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 _8 = $3d - .label _9 = $3d - .label _10 = $3d + .label _8 = $3f + .label _9 = $3f + .label _10 = $3f .label screen_line = $c .label dist_line = $e .label y = $10 @@ -9703,87 +8964,87 @@ getCharToProcess: { .label closest_dist = $11 .label closest_x = $12 .label closest_y = $13 - .label _12 = $3f - .label _13 = $3d - //SEG179 [118] (byte*) getCharToProcess::screen_line#0 ← (byte*)(void*) SCREEN_COPY#0 -- pbuz1=pbuz2 + .label _12 = $41 + .label _13 = $3f + //SEG176 [118] (byte*) getCharToProcess::screen_line#0 ← (byte*)(void*) SCREEN_COPY#0 -- pbuz1=pbuz2 lda SCREEN_COPY sta screen_line lda SCREEN_COPY+1 sta screen_line+1 - //SEG180 [119] (byte*) getCharToProcess::dist_line#0 ← (byte*)(void*) SCREEN_DIST#0 -- pbuz1=pbuz2 + //SEG177 [119] (byte*) getCharToProcess::dist_line#0 ← (byte*)(void*) SCREEN_DIST#0 -- pbuz1=pbuz2 lda SCREEN_DIST sta dist_line lda SCREEN_DIST+1 sta dist_line+1 - //SEG181 [120] phi from getCharToProcess to getCharToProcess::@1 [phi:getCharToProcess->getCharToProcess::@1] + //SEG178 [120] phi from getCharToProcess to getCharToProcess::@1 [phi:getCharToProcess->getCharToProcess::@1] b1_from_getCharToProcess: - //SEG182 [120] phi (byte) getCharToProcess::closest_y#9 = (byte) 0 [phi:getCharToProcess->getCharToProcess::@1#0] -- vbuz1=vbuc1 + //SEG179 [120] phi (byte) getCharToProcess::closest_y#9 = (byte) 0 [phi:getCharToProcess->getCharToProcess::@1#0] -- vbuz1=vbuc1 lda #0 sta closest_y - //SEG183 [120] phi (byte) getCharToProcess::closest_x#9 = (byte) 0 [phi:getCharToProcess->getCharToProcess::@1#1] -- vbuz1=vbuc1 + //SEG180 [120] phi (byte) getCharToProcess::closest_x#9 = (byte) 0 [phi:getCharToProcess->getCharToProcess::@1#1] -- vbuz1=vbuc1 lda #0 sta closest_x - //SEG184 [120] phi (byte) getCharToProcess::y#7 = (byte) 0 [phi:getCharToProcess->getCharToProcess::@1#2] -- vbuz1=vbuc1 + //SEG181 [120] phi (byte) getCharToProcess::y#7 = (byte) 0 [phi:getCharToProcess->getCharToProcess::@1#2] -- vbuz1=vbuc1 lda #0 sta y - //SEG185 [120] phi (byte) getCharToProcess::closest_dist#8 = (const byte) NOT_FOUND#0 [phi:getCharToProcess->getCharToProcess::@1#3] -- vbuz1=vbuc1 + //SEG182 [120] phi (byte) getCharToProcess::closest_dist#8 = (const byte) NOT_FOUND#0 [phi:getCharToProcess->getCharToProcess::@1#3] -- vbuz1=vbuc1 lda #NOT_FOUND sta closest_dist - //SEG186 [120] phi (byte*) getCharToProcess::dist_line#6 = (byte*) getCharToProcess::dist_line#0 [phi:getCharToProcess->getCharToProcess::@1#4] -- register_copy - //SEG187 [120] phi (byte*) getCharToProcess::screen_line#4 = (byte*) getCharToProcess::screen_line#0 [phi:getCharToProcess->getCharToProcess::@1#5] -- register_copy + //SEG183 [120] phi (byte*) getCharToProcess::dist_line#6 = (byte*) getCharToProcess::dist_line#0 [phi:getCharToProcess->getCharToProcess::@1#4] -- register_copy + //SEG184 [120] phi (byte*) getCharToProcess::screen_line#4 = (byte*) getCharToProcess::screen_line#0 [phi:getCharToProcess->getCharToProcess::@1#5] -- register_copy jmp b1 - //SEG188 getCharToProcess::@1 + //SEG185 getCharToProcess::@1 b1: - //SEG189 [121] phi from getCharToProcess::@1 to getCharToProcess::@2 [phi:getCharToProcess::@1->getCharToProcess::@2] + //SEG186 [121] phi from getCharToProcess::@1 to getCharToProcess::@2 [phi:getCharToProcess::@1->getCharToProcess::@2] b2_from_b1: - //SEG190 [121] phi (byte) getCharToProcess::closest_y#7 = (byte) getCharToProcess::closest_y#9 [phi:getCharToProcess::@1->getCharToProcess::@2#0] -- register_copy - //SEG191 [121] phi (byte) getCharToProcess::closest_x#7 = (byte) getCharToProcess::closest_x#9 [phi:getCharToProcess::@1->getCharToProcess::@2#1] -- register_copy - //SEG192 [121] phi (byte) getCharToProcess::closest_dist#2 = (byte) getCharToProcess::closest_dist#8 [phi:getCharToProcess::@1->getCharToProcess::@2#2] -- register_copy - //SEG193 [121] phi (byte) getCharToProcess::x#2 = (byte) 0 [phi:getCharToProcess::@1->getCharToProcess::@2#3] -- vbuyy=vbuc1 + //SEG187 [121] phi (byte) getCharToProcess::closest_y#7 = (byte) getCharToProcess::closest_y#9 [phi:getCharToProcess::@1->getCharToProcess::@2#0] -- register_copy + //SEG188 [121] phi (byte) getCharToProcess::closest_x#7 = (byte) getCharToProcess::closest_x#9 [phi:getCharToProcess::@1->getCharToProcess::@2#1] -- register_copy + //SEG189 [121] phi (byte) getCharToProcess::closest_dist#2 = (byte) getCharToProcess::closest_dist#8 [phi:getCharToProcess::@1->getCharToProcess::@2#2] -- register_copy + //SEG190 [121] phi (byte) getCharToProcess::x#2 = (byte) 0 [phi:getCharToProcess::@1->getCharToProcess::@2#3] -- vbuyy=vbuc1 ldy #0 jmp b2 - //SEG194 getCharToProcess::@2 + //SEG191 getCharToProcess::@2 b2: - //SEG195 [122] if(*((byte*) getCharToProcess::screen_line#4 + (byte) getCharToProcess::x#2)==(byte) ' ') goto getCharToProcess::@11 -- pbuz1_derefidx_vbuyy_eq_vbuc1_then_la1 + //SEG192 [122] if(*((byte*) getCharToProcess::screen_line#4 + (byte) getCharToProcess::x#2)==(byte) ' ') goto getCharToProcess::@11 -- pbuz1_derefidx_vbuyy_eq_vbuc1_then_la1 lda (screen_line),y cmp #' ' beq b11 jmp b4 - //SEG196 getCharToProcess::@4 + //SEG193 getCharToProcess::@4 b4: - //SEG197 [123] (byte) getCharToProcess::dist#0 ← *((byte*) getCharToProcess::dist_line#6 + (byte) getCharToProcess::x#2) -- vbuxx=pbuz1_derefidx_vbuyy + //SEG194 [123] (byte) getCharToProcess::dist#0 ← *((byte*) getCharToProcess::dist_line#6 + (byte) getCharToProcess::x#2) -- vbuxx=pbuz1_derefidx_vbuyy lda (dist_line),y tax - //SEG198 [124] if((byte) getCharToProcess::dist#0>=(byte) getCharToProcess::closest_dist#2) goto getCharToProcess::@12 -- vbuxx_ge_vbuz1_then_la1 + //SEG195 [124] if((byte) getCharToProcess::dist#0>=(byte) getCharToProcess::closest_dist#2) goto getCharToProcess::@12 -- vbuxx_ge_vbuz1_then_la1 cpx closest_dist bcs b12 jmp b5 - //SEG199 getCharToProcess::@5 + //SEG196 getCharToProcess::@5 b5: - //SEG200 [125] (byte~) getCharToProcess::return_x#7 ← (byte) getCharToProcess::x#2 -- vbuz1=vbuyy + //SEG197 [125] (byte~) getCharToProcess::return_x#7 ← (byte) getCharToProcess::x#2 -- vbuz1=vbuyy sty return_x - //SEG201 [126] (byte~) getCharToProcess::return_y#7 ← (byte) getCharToProcess::y#7 -- vbuz1=vbuz2 + //SEG198 [126] (byte~) getCharToProcess::return_y#7 ← (byte) getCharToProcess::y#7 -- vbuz1=vbuz2 lda y sta return_y - //SEG202 [127] phi from getCharToProcess::@11 getCharToProcess::@12 getCharToProcess::@5 to getCharToProcess::@3 [phi:getCharToProcess::@11/getCharToProcess::@12/getCharToProcess::@5->getCharToProcess::@3] + //SEG199 [127] 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: - //SEG203 [127] phi (byte) getCharToProcess::return_y#1 = (byte) getCharToProcess::closest_y#7 [phi:getCharToProcess::@11/getCharToProcess::@12/getCharToProcess::@5->getCharToProcess::@3#0] -- register_copy - //SEG204 [127] phi (byte) getCharToProcess::return_x#1 = (byte) getCharToProcess::closest_x#7 [phi:getCharToProcess::@11/getCharToProcess::@12/getCharToProcess::@5->getCharToProcess::@3#1] -- register_copy - //SEG205 [127] phi (byte) getCharToProcess::return_dist#1 = (byte~) getCharToProcess::return_dist#5 [phi:getCharToProcess::@11/getCharToProcess::@12/getCharToProcess::@5->getCharToProcess::@3#2] -- register_copy + //SEG200 [127] phi (byte) getCharToProcess::return_y#1 = (byte) getCharToProcess::closest_y#7 [phi:getCharToProcess::@11/getCharToProcess::@12/getCharToProcess::@5->getCharToProcess::@3#0] -- register_copy + //SEG201 [127] phi (byte) getCharToProcess::return_x#1 = (byte) getCharToProcess::closest_x#7 [phi:getCharToProcess::@11/getCharToProcess::@12/getCharToProcess::@5->getCharToProcess::@3#1] -- register_copy + //SEG202 [127] phi (byte) getCharToProcess::return_dist#1 = (byte~) getCharToProcess::return_dist#5 [phi:getCharToProcess::@11/getCharToProcess::@12/getCharToProcess::@5->getCharToProcess::@3#2] -- register_copy jmp b3 - //SEG206 getCharToProcess::@3 + //SEG203 getCharToProcess::@3 b3: - //SEG207 [128] (byte) getCharToProcess::x#1 ← ++ (byte) getCharToProcess::x#2 -- vbuyy=_inc_vbuyy + //SEG204 [128] (byte) getCharToProcess::x#1 ← ++ (byte) getCharToProcess::x#2 -- vbuyy=_inc_vbuyy iny - //SEG208 [129] if((byte) getCharToProcess::x#1!=(byte) $28) goto getCharToProcess::@10 -- vbuyy_neq_vbuc1_then_la1 + //SEG205 [129] if((byte) getCharToProcess::x#1!=(byte) $28) goto getCharToProcess::@10 -- vbuyy_neq_vbuc1_then_la1 cpy #$28 bne b10 jmp b6 - //SEG209 getCharToProcess::@6 + //SEG206 getCharToProcess::@6 b6: - //SEG210 [130] (byte*) getCharToProcess::screen_line#1 ← (byte*) getCharToProcess::screen_line#4 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 + //SEG207 [130] (byte*) getCharToProcess::screen_line#1 ← (byte*) getCharToProcess::screen_line#4 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 lda #$28 clc adc screen_line @@ -9791,7 +9052,7 @@ getCharToProcess: { bcc !+ inc screen_line+1 !: - //SEG211 [131] (byte*) getCharToProcess::dist_line#1 ← (byte*) getCharToProcess::dist_line#6 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 + //SEG208 [131] (byte*) getCharToProcess::dist_line#1 ← (byte*) getCharToProcess::dist_line#6 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 lda #$28 clc adc dist_line @@ -9799,27 +9060,27 @@ getCharToProcess: { bcc !+ inc dist_line+1 !: - //SEG212 [132] (byte) getCharToProcess::y#1 ← ++ (byte) getCharToProcess::y#7 -- vbuz1=_inc_vbuz1 + //SEG209 [132] (byte) getCharToProcess::y#1 ← ++ (byte) getCharToProcess::y#7 -- vbuz1=_inc_vbuz1 inc y - //SEG213 [133] if((byte) getCharToProcess::y#1!=(byte) $19) goto getCharToProcess::@9 -- vbuz1_neq_vbuc1_then_la1 + //SEG210 [133] if((byte) getCharToProcess::y#1!=(byte) $19) goto getCharToProcess::@9 -- vbuz1_neq_vbuc1_then_la1 lda #$19 cmp y bne b9 jmp b7 - //SEG214 getCharToProcess::@7 + //SEG211 getCharToProcess::@7 b7: - //SEG215 [134] if((byte) getCharToProcess::return_dist#1==(const byte) NOT_FOUND#0) goto getCharToProcess::@return -- vbuxx_eq_vbuc1_then_la1 + //SEG212 [134] if((byte) getCharToProcess::return_dist#1==(const byte) NOT_FOUND#0) goto getCharToProcess::@return -- vbuxx_eq_vbuc1_then_la1 cpx #NOT_FOUND beq breturn jmp b8 - //SEG216 getCharToProcess::@8 + //SEG213 getCharToProcess::@8 b8: - //SEG217 [135] (word~) getCharToProcess::$8 ← (word)(byte) getCharToProcess::return_y#1 -- vwuz1=_word_vbuz2 + //SEG214 [135] (word~) getCharToProcess::$8 ← (word)(byte) getCharToProcess::return_y#1 -- vwuz1=_word_vbuz2 lda return_y sta _8 lda #0 sta _8+1 - //SEG218 [136] (word) getCharToProcess::$12 ← (word~) getCharToProcess::$8 << (byte) 2 -- vwuz1=vwuz2_rol_2 + //SEG215 [136] (word) getCharToProcess::$12 ← (word~) getCharToProcess::$8 << (byte) 2 -- vwuz1=vwuz2_rol_2 lda _8 asl sta _12 @@ -9828,7 +9089,7 @@ getCharToProcess: { sta _12+1 asl _12 rol _12+1 - //SEG219 [137] (word) getCharToProcess::$13 ← (word) getCharToProcess::$12 + (word~) getCharToProcess::$8 -- vwuz1=vwuz2_plus_vwuz1 + //SEG216 [137] (word) getCharToProcess::$13 ← (word) getCharToProcess::$12 + (word~) getCharToProcess::$8 -- vwuz1=vwuz2_plus_vwuz1 lda _13 clc adc _12 @@ -9836,14 +9097,14 @@ getCharToProcess: { lda _13+1 adc _12+1 sta _13+1 - //SEG220 [138] (word~) getCharToProcess::$9 ← (word) getCharToProcess::$13 << (byte) 3 -- vwuz1=vwuz1_rol_3 + //SEG217 [138] (word~) getCharToProcess::$9 ← (word) getCharToProcess::$13 << (byte) 3 -- vwuz1=vwuz1_rol_3 asl _9 rol _9+1 asl _9 rol _9+1 asl _9 rol _9+1 - //SEG221 [139] (byte*~) getCharToProcess::$10 ← (byte*)(void*) SCREEN_COPY#0 + (word~) getCharToProcess::$9 -- pbuz1=pbuz2_plus_vwuz1 + //SEG218 [139] (byte*~) getCharToProcess::$10 ← (byte*)(void*) SCREEN_COPY#0 + (word~) getCharToProcess::$9 -- pbuz1=pbuz2_plus_vwuz1 lda _10 clc adc SCREEN_COPY @@ -9851,128 +9112,128 @@ getCharToProcess: { lda _10+1 adc SCREEN_COPY+1 sta _10+1 - //SEG222 [140] *((byte*~) getCharToProcess::$10 + (byte) getCharToProcess::return_x#1) ← (byte) ' ' -- pbuz1_derefidx_vbuz2=vbuc1 + //SEG219 [140] *((byte*~) getCharToProcess::$10 + (byte) getCharToProcess::return_x#1) ← (byte) ' ' -- pbuz1_derefidx_vbuz2=vbuc1 // clear the found char on the screen copy lda #' ' ldy return_x sta (_10),y jmp breturn - //SEG223 getCharToProcess::@return + //SEG220 getCharToProcess::@return breturn: - //SEG224 [141] return + //SEG221 [141] return rts - //SEG225 getCharToProcess::@9 + //SEG222 getCharToProcess::@9 b9: - //SEG226 [142] (byte~) getCharToProcess::closest_dist#10 ← (byte) getCharToProcess::return_dist#1 -- vbuz1=vbuxx + //SEG223 [142] (byte~) getCharToProcess::closest_dist#10 ← (byte) getCharToProcess::return_dist#1 -- vbuz1=vbuxx stx closest_dist - //SEG227 [120] phi from getCharToProcess::@9 to getCharToProcess::@1 [phi:getCharToProcess::@9->getCharToProcess::@1] + //SEG224 [120] phi from getCharToProcess::@9 to getCharToProcess::@1 [phi:getCharToProcess::@9->getCharToProcess::@1] b1_from_b9: - //SEG228 [120] phi (byte) getCharToProcess::closest_y#9 = (byte) getCharToProcess::return_y#1 [phi:getCharToProcess::@9->getCharToProcess::@1#0] -- register_copy - //SEG229 [120] phi (byte) getCharToProcess::closest_x#9 = (byte) getCharToProcess::return_x#1 [phi:getCharToProcess::@9->getCharToProcess::@1#1] -- register_copy - //SEG230 [120] phi (byte) getCharToProcess::y#7 = (byte) getCharToProcess::y#1 [phi:getCharToProcess::@9->getCharToProcess::@1#2] -- register_copy - //SEG231 [120] phi (byte) getCharToProcess::closest_dist#8 = (byte~) getCharToProcess::closest_dist#10 [phi:getCharToProcess::@9->getCharToProcess::@1#3] -- register_copy - //SEG232 [120] phi (byte*) getCharToProcess::dist_line#6 = (byte*) getCharToProcess::dist_line#1 [phi:getCharToProcess::@9->getCharToProcess::@1#4] -- register_copy - //SEG233 [120] phi (byte*) getCharToProcess::screen_line#4 = (byte*) getCharToProcess::screen_line#1 [phi:getCharToProcess::@9->getCharToProcess::@1#5] -- register_copy + //SEG225 [120] phi (byte) getCharToProcess::closest_y#9 = (byte) getCharToProcess::return_y#1 [phi:getCharToProcess::@9->getCharToProcess::@1#0] -- register_copy + //SEG226 [120] phi (byte) getCharToProcess::closest_x#9 = (byte) getCharToProcess::return_x#1 [phi:getCharToProcess::@9->getCharToProcess::@1#1] -- register_copy + //SEG227 [120] phi (byte) getCharToProcess::y#7 = (byte) getCharToProcess::y#1 [phi:getCharToProcess::@9->getCharToProcess::@1#2] -- register_copy + //SEG228 [120] phi (byte) getCharToProcess::closest_dist#8 = (byte~) getCharToProcess::closest_dist#10 [phi:getCharToProcess::@9->getCharToProcess::@1#3] -- register_copy + //SEG229 [120] phi (byte*) getCharToProcess::dist_line#6 = (byte*) getCharToProcess::dist_line#1 [phi:getCharToProcess::@9->getCharToProcess::@1#4] -- register_copy + //SEG230 [120] phi (byte*) getCharToProcess::screen_line#4 = (byte*) getCharToProcess::screen_line#1 [phi:getCharToProcess::@9->getCharToProcess::@1#5] -- register_copy jmp b1 - //SEG234 getCharToProcess::@10 + //SEG231 getCharToProcess::@10 b10: - //SEG235 [143] (byte~) getCharToProcess::closest_dist#12 ← (byte) getCharToProcess::return_dist#1 -- vbuz1=vbuxx + //SEG232 [143] (byte~) getCharToProcess::closest_dist#12 ← (byte) getCharToProcess::return_dist#1 -- vbuz1=vbuxx stx closest_dist - //SEG236 [121] phi from getCharToProcess::@10 to getCharToProcess::@2 [phi:getCharToProcess::@10->getCharToProcess::@2] + //SEG233 [121] phi from getCharToProcess::@10 to getCharToProcess::@2 [phi:getCharToProcess::@10->getCharToProcess::@2] b2_from_b10: - //SEG237 [121] phi (byte) getCharToProcess::closest_y#7 = (byte) getCharToProcess::return_y#1 [phi:getCharToProcess::@10->getCharToProcess::@2#0] -- register_copy - //SEG238 [121] phi (byte) getCharToProcess::closest_x#7 = (byte) getCharToProcess::return_x#1 [phi:getCharToProcess::@10->getCharToProcess::@2#1] -- register_copy - //SEG239 [121] phi (byte) getCharToProcess::closest_dist#2 = (byte~) getCharToProcess::closest_dist#12 [phi:getCharToProcess::@10->getCharToProcess::@2#2] -- register_copy - //SEG240 [121] phi (byte) getCharToProcess::x#2 = (byte) getCharToProcess::x#1 [phi:getCharToProcess::@10->getCharToProcess::@2#3] -- register_copy + //SEG234 [121] phi (byte) getCharToProcess::closest_y#7 = (byte) getCharToProcess::return_y#1 [phi:getCharToProcess::@10->getCharToProcess::@2#0] -- register_copy + //SEG235 [121] phi (byte) getCharToProcess::closest_x#7 = (byte) getCharToProcess::return_x#1 [phi:getCharToProcess::@10->getCharToProcess::@2#1] -- register_copy + //SEG236 [121] phi (byte) getCharToProcess::closest_dist#2 = (byte~) getCharToProcess::closest_dist#12 [phi:getCharToProcess::@10->getCharToProcess::@2#2] -- register_copy + //SEG237 [121] phi (byte) getCharToProcess::x#2 = (byte) getCharToProcess::x#1 [phi:getCharToProcess::@10->getCharToProcess::@2#3] -- register_copy jmp b2 - //SEG241 getCharToProcess::@12 + //SEG238 getCharToProcess::@12 b12: - //SEG242 [144] (byte~) getCharToProcess::return_dist#6 ← (byte) getCharToProcess::closest_dist#2 -- vbuxx=vbuz1 + //SEG239 [144] (byte~) getCharToProcess::return_dist#6 ← (byte) getCharToProcess::closest_dist#2 -- vbuxx=vbuz1 ldx closest_dist jmp b3_from_b12 - //SEG243 getCharToProcess::@11 + //SEG240 getCharToProcess::@11 b11: - //SEG244 [145] (byte~) getCharToProcess::return_dist#5 ← (byte) getCharToProcess::closest_dist#2 -- vbuxx=vbuz1 + //SEG241 [145] (byte~) getCharToProcess::return_dist#5 ← (byte) getCharToProcess::closest_dist#2 -- vbuxx=vbuz1 ldx closest_dist jmp b3_from_b11 } -//SEG245 setupRasterIrq +//SEG242 setupRasterIrq // Setup Raster IRQ setupRasterIrq: { .label irqRoutine = irqTop - //SEG246 asm { sei } + //SEG243 asm { sei } sei - //SEG247 [147] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 -- _deref_pbuc1=vbuc2 + //SEG244 [147] *((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 - //SEG248 [148] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 -- _deref_pbuc1=vbuc2 + //SEG245 [148] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 -- _deref_pbuc1=vbuc2 lda #PROCPORT_RAM_IO sta PROCPORT - //SEG249 [149] *((const byte*) CIA1_INTERRUPT#0) ← (const byte) CIA_INTERRUPT_CLEAR#0 -- _deref_pbuc1=vbuc2 + //SEG246 [149] *((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 - //SEG250 setupRasterIrq::@1 + //SEG247 setupRasterIrq::@1 b1: - //SEG251 [150] *((const byte*) VIC_CONTROL#0) ← *((const byte*) VIC_CONTROL#0) & (byte) $7f -- _deref_pbuc1=_deref_pbuc1_band_vbuc2 + //SEG248 [150] *((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 - //SEG252 setupRasterIrq::@2 + //SEG249 setupRasterIrq::@2 b2: - //SEG253 [151] *((const byte*) RASTER#0) ← <(const byte) RASTER_IRQ_TOP#0 -- _deref_pbuc1=vbuc2 + //SEG250 [151] *((const byte*) RASTER#0) ← <(const byte) RASTER_IRQ_TOP#0 -- _deref_pbuc1=vbuc2 lda #RASTER_IRQ_TOP sta RASTER - //SEG254 [152] *((const byte*) IRQ_ENABLE#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 + //SEG251 [152] *((const byte*) IRQ_ENABLE#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 // Enable Raster Interrupt lda #IRQ_RASTER sta IRQ_ENABLE - //SEG255 [153] *((const void()**) HARDWARE_IRQ#0) ← (const void()*) setupRasterIrq::irqRoutine#0 -- _deref_pptc1=pprc2 + //SEG252 [153] *((const void()**) HARDWARE_IRQ#0) ← (const void()*) setupRasterIrq::irqRoutine#0 -- _deref_pptc1=pprc2 // Set the IRQ routine lda #irqRoutine sta HARDWARE_IRQ+1 - //SEG256 asm { cli } + //SEG253 asm { cli } cli jmp breturn - //SEG257 setupRasterIrq::@return + //SEG254 setupRasterIrq::@return breturn: - //SEG258 [155] return + //SEG255 [155] return rts } -//SEG259 initSprites +//SEG256 initSprites // Initialize sprites initSprites: { .label sp = $14 - //SEG260 [157] phi from initSprites to initSprites::@1 [phi:initSprites->initSprites::@1] + //SEG257 [157] phi from initSprites to initSprites::@1 [phi:initSprites->initSprites::@1] b1_from_initSprites: - //SEG261 [157] phi (byte*) initSprites::sp#2 = (const byte*) SPRITE_DATA#0 [phi:initSprites->initSprites::@1#0] -- pbuz1=pbuc1 + //SEG258 [157] phi (byte*) initSprites::sp#2 = (const byte*) SPRITE_DATA#0 [phi:initSprites->initSprites::@1#0] -- pbuz1=pbuc1 lda #SPRITE_DATA sta sp+1 jmp b1 // Clear sprite data - //SEG262 [157] phi from initSprites::@1 to initSprites::@1 [phi:initSprites::@1->initSprites::@1] + //SEG259 [157] phi from initSprites::@1 to initSprites::@1 [phi:initSprites::@1->initSprites::@1] b1_from_b1: - //SEG263 [157] phi (byte*) initSprites::sp#2 = (byte*) initSprites::sp#1 [phi:initSprites::@1->initSprites::@1#0] -- register_copy + //SEG260 [157] phi (byte*) initSprites::sp#2 = (byte*) initSprites::sp#1 [phi:initSprites::@1->initSprites::@1#0] -- register_copy jmp b1 - //SEG264 initSprites::@1 + //SEG261 initSprites::@1 b1: - //SEG265 [158] *((byte*) initSprites::sp#2) ← (byte) 0 -- _deref_pbuz1=vbuc1 + //SEG262 [158] *((byte*) initSprites::sp#2) ← (byte) 0 -- _deref_pbuz1=vbuc1 lda #0 ldy #0 sta (sp),y - //SEG266 [159] (byte*) initSprites::sp#1 ← ++ (byte*) initSprites::sp#2 -- pbuz1=_inc_pbuz1 + //SEG263 [159] (byte*) initSprites::sp#1 ← ++ (byte*) initSprites::sp#2 -- pbuz1=_inc_pbuz1 inc sp bne !+ inc sp+1 !: - //SEG267 [160] if((byte*) initSprites::sp#1<(const byte*) SPRITE_DATA#0+(const byte) NUM_PROCESSING#0*(byte) $40) goto initSprites::@1 -- pbuz1_lt_pbuc1_then_la1 + //SEG264 [160] if((byte*) initSprites::sp#1<(const byte*) SPRITE_DATA#0+(const byte) NUM_PROCESSING#0*(byte) $40) goto initSprites::@1 -- pbuz1_lt_pbuc1_then_la1 lda sp+1 cmp #>SPRITE_DATA+NUM_PROCESSING*$40 bcc b1_from_b1 @@ -9981,605 +9242,586 @@ initSprites: { cmp #initSprites::@2] + //SEG265 [161] phi from initSprites::@1 to initSprites::@2 [phi:initSprites::@1->initSprites::@2] b2_from_b1: - //SEG269 [161] phi (byte) initSprites::i#2 = (byte) 0 [phi:initSprites::@1->initSprites::@2#0] -- vbuxx=vbuc1 + //SEG266 [161] phi (byte) initSprites::i#2 = (byte) 0 [phi:initSprites::@1->initSprites::@2#0] -- vbuxx=vbuc1 ldx #0 jmp b2 // Initialize sprite registers - //SEG270 [161] phi from initSprites::@2 to initSprites::@2 [phi:initSprites::@2->initSprites::@2] + //SEG267 [161] phi from initSprites::@2 to initSprites::@2 [phi:initSprites::@2->initSprites::@2] b2_from_b2: - //SEG271 [161] phi (byte) initSprites::i#2 = (byte) initSprites::i#1 [phi:initSprites::@2->initSprites::@2#0] -- register_copy + //SEG268 [161] phi (byte) initSprites::i#2 = (byte) initSprites::i#1 [phi:initSprites::@2->initSprites::@2#0] -- register_copy jmp b2 - //SEG272 initSprites::@2 + //SEG269 initSprites::@2 b2: - //SEG273 [162] *((const byte*) SPRITES_COLS#0 + (byte) initSprites::i#2) ← (const byte) LIGHT_BLUE#0 -- pbuc1_derefidx_vbuxx=vbuc2 + //SEG270 [162] *((const byte*) SPRITES_COLS#0 + (byte) initSprites::i#2) ← (const byte) LIGHT_BLUE#0 -- pbuc1_derefidx_vbuxx=vbuc2 lda #LIGHT_BLUE sta SPRITES_COLS,x - //SEG274 [163] (byte) initSprites::i#1 ← ++ (byte) initSprites::i#2 -- vbuxx=_inc_vbuxx + //SEG271 [163] (byte) initSprites::i#1 ← ++ (byte) initSprites::i#2 -- vbuxx=_inc_vbuxx inx - //SEG275 [164] if((byte) initSprites::i#1!=(byte) 8) goto initSprites::@2 -- vbuxx_neq_vbuc1_then_la1 + //SEG272 [164] if((byte) initSprites::i#1!=(byte) 8) goto initSprites::@2 -- vbuxx_neq_vbuc1_then_la1 cpx #8 bne b2_from_b2 jmp b3 - //SEG276 initSprites::@3 + //SEG273 initSprites::@3 b3: - //SEG277 [165] *((const byte*) SPRITES_MC#0) ← (byte) 0 -- _deref_pbuc1=vbuc2 + //SEG274 [165] *((const byte*) SPRITES_MC#0) ← (byte) 0 -- _deref_pbuc1=vbuc2 lda #0 sta SPRITES_MC - //SEG278 [166] *((const byte*) SPRITES_EXPAND_X#0) ← (byte) 0 -- _deref_pbuc1=vbuc2 + //SEG275 [166] *((const byte*) SPRITES_EXPAND_X#0) ← (byte) 0 -- _deref_pbuc1=vbuc2 lda #0 sta SPRITES_EXPAND_X - //SEG279 [167] *((const byte*) SPRITES_EXPAND_Y#0) ← (byte) 0 -- _deref_pbuc1=vbuc2 + //SEG276 [167] *((const byte*) SPRITES_EXPAND_Y#0) ← (byte) 0 -- _deref_pbuc1=vbuc2 lda #0 sta SPRITES_EXPAND_Y jmp breturn - //SEG280 initSprites::@return + //SEG277 initSprites::@return breturn: - //SEG281 [168] return + //SEG278 [168] return rts } -//SEG282 init_dist_screen -// Populates 1000 bytes (a screen) with values representing the distance to the center. -// The actual value stored is distance*2 to increase precision -// init_dist_screen(byte* zeropage($17) screen) -init_dist_screen: { +//SEG279 init_angle_screen +// Populates 1000 bytes (a screen) with values representing the angle to the center. +// Utilizes symmetry around the center +// init_angle_screen(byte* zeropage($17) screen) +init_angle_screen: { + .label _10 = $21 .label screen = $17 - .label screen_bottomline = $19 - .label yds = $41 - .label xds = $43 - .label ds = $43 + .label screen_topline = $19 + .label screen_bottomline = $17 + .label xw = $43 + .label yw = $45 + .label angle_w = $21 + .label ang_w = $47 .label x = $1b .label xb = $1c - .label screen_topline = $17 .label y = $16 - //SEG283 [170] call init_squares - //SEG284 [241] phi from init_dist_screen to init_squares [phi:init_dist_screen->init_squares] - init_squares_from_init_dist_screen: - jsr init_squares - jmp b10 - //SEG285 init_dist_screen::@10 - b10: - //SEG286 [171] (byte*) init_dist_screen::screen_bottomline#0 ← (byte*) init_dist_screen::screen#0 + (word)(number) $28*(number) $18 -- pbuz1=pbuz2_plus_vwuc1 + //SEG280 [169] (byte*) init_angle_screen::screen_topline#0 ← (byte*) init_angle_screen::screen#0 + (word)(number) $28*(number) $c -- pbuz1=pbuz2_plus_vwuc1 lda screen clc - adc #<$28*$18 - sta screen_bottomline + adc #<$28*$c + sta screen_topline lda screen+1 - adc #>$28*$18 + adc #>$28*$c + sta screen_topline+1 + //SEG281 [170] (byte*) init_angle_screen::screen_bottomline#0 ← (byte*) init_angle_screen::screen#0 + (word)(number) $28*(number) $c -- pbuz1=pbuz1_plus_vwuc1 + clc + lda screen_bottomline + adc #<$28*$c + sta screen_bottomline + lda screen_bottomline+1 + adc #>$28*$c sta screen_bottomline+1 - //SEG287 [172] phi from init_dist_screen::@10 to init_dist_screen::@1 [phi:init_dist_screen::@10->init_dist_screen::@1] - b1_from_b10: - //SEG288 [172] phi (byte*) init_dist_screen::screen_bottomline#10 = (byte*) init_dist_screen::screen_bottomline#0 [phi:init_dist_screen::@10->init_dist_screen::@1#0] -- register_copy - //SEG289 [172] phi (byte*) init_dist_screen::screen_topline#10 = (byte*) init_dist_screen::screen#0 [phi:init_dist_screen::@10->init_dist_screen::@1#1] -- register_copy - //SEG290 [172] phi (byte) init_dist_screen::y#10 = (byte) 0 [phi:init_dist_screen::@10->init_dist_screen::@1#2] -- vbuz1=vbuc1 + //SEG282 [171] phi from init_angle_screen to init_angle_screen::@1 [phi:init_angle_screen->init_angle_screen::@1] + b1_from_init_angle_screen: + //SEG283 [171] phi (byte*) init_angle_screen::screen_topline#5 = (byte*) init_angle_screen::screen_topline#0 [phi:init_angle_screen->init_angle_screen::@1#0] -- register_copy + //SEG284 [171] phi (byte*) init_angle_screen::screen_bottomline#5 = (byte*) init_angle_screen::screen_bottomline#0 [phi:init_angle_screen->init_angle_screen::@1#1] -- register_copy + //SEG285 [171] phi (byte) init_angle_screen::y#4 = (byte) 0 [phi:init_angle_screen->init_angle_screen::@1#2] -- vbuz1=vbuc1 lda #0 sta y jmp b1 - //SEG291 [172] phi from init_dist_screen::@9 to init_dist_screen::@1 [phi:init_dist_screen::@9->init_dist_screen::@1] - b1_from_b9: - //SEG292 [172] phi (byte*) init_dist_screen::screen_bottomline#10 = (byte*) init_dist_screen::screen_bottomline#1 [phi:init_dist_screen::@9->init_dist_screen::@1#0] -- register_copy - //SEG293 [172] phi (byte*) init_dist_screen::screen_topline#10 = (byte*) init_dist_screen::screen_topline#1 [phi:init_dist_screen::@9->init_dist_screen::@1#1] -- register_copy - //SEG294 [172] phi (byte) init_dist_screen::y#10 = (byte) init_dist_screen::y#1 [phi:init_dist_screen::@9->init_dist_screen::@1#2] -- register_copy + //SEG286 [171] phi from init_angle_screen::@3 to init_angle_screen::@1 [phi:init_angle_screen::@3->init_angle_screen::@1] + b1_from_b3: + //SEG287 [171] phi (byte*) init_angle_screen::screen_topline#5 = (byte*) init_angle_screen::screen_topline#1 [phi:init_angle_screen::@3->init_angle_screen::@1#0] -- register_copy + //SEG288 [171] phi (byte*) init_angle_screen::screen_bottomline#5 = (byte*) init_angle_screen::screen_bottomline#1 [phi:init_angle_screen::@3->init_angle_screen::@1#1] -- register_copy + //SEG289 [171] phi (byte) init_angle_screen::y#4 = (byte) init_angle_screen::y#1 [phi:init_angle_screen::@3->init_angle_screen::@1#2] -- register_copy jmp b1 - //SEG295 init_dist_screen::@1 + //SEG290 init_angle_screen::@1 b1: - //SEG296 [173] (byte) init_dist_screen::y2#0 ← (byte) init_dist_screen::y#10 << (byte) 1 -- vbuaa=vbuz1_rol_1 - lda y - asl - //SEG297 [174] if((byte) init_dist_screen::y2#0>=(byte) $18) goto init_dist_screen::@2 -- vbuaa_ge_vbuc1_then_la1 - cmp #$18 - bcs b2 - jmp b3 - //SEG298 init_dist_screen::@3 - b3: - //SEG299 [175] (byte~) init_dist_screen::$5 ← (byte) $18 - (byte) init_dist_screen::y2#0 -- vbuaa=vbuc1_minus_vbuaa - eor #$ff - clc - adc #$18+1 - //SEG300 [176] phi from init_dist_screen::@2 init_dist_screen::@3 to init_dist_screen::@4 [phi:init_dist_screen::@2/init_dist_screen::@3->init_dist_screen::@4] - b4_from_b2: - b4_from_b3: - //SEG301 [176] phi (byte) init_dist_screen::yd#0 = (byte~) init_dist_screen::$7 [phi:init_dist_screen::@2/init_dist_screen::@3->init_dist_screen::@4#0] -- register_copy - jmp b4 - //SEG302 init_dist_screen::@4 - b4: - //SEG303 [177] (byte) sqr::val#0 ← (byte) init_dist_screen::yd#0 - //SEG304 [178] call sqr - //SEG305 [237] phi from init_dist_screen::@4 to sqr [phi:init_dist_screen::@4->sqr] - sqr_from_b4: - //SEG306 [237] phi (byte) sqr::val#2 = (byte) sqr::val#0 [phi:init_dist_screen::@4->sqr#0] -- register_copy - jsr sqr - //SEG307 [179] (word) sqr::return#2 ← (word) sqr::return#0 -- vwuz1=vwuz2 - lda sqr.return - sta sqr.return_2 - lda sqr.return+1 - sta sqr.return_2+1 - jmp b11 - //SEG308 init_dist_screen::@11 - b11: - //SEG309 [180] (word) init_dist_screen::yds#0 ← (word) sqr::return#2 - //SEG310 [181] phi from init_dist_screen::@11 to init_dist_screen::@5 [phi:init_dist_screen::@11->init_dist_screen::@5] - b5_from_b11: - //SEG311 [181] phi (byte) init_dist_screen::xb#2 = (byte) $27 [phi:init_dist_screen::@11->init_dist_screen::@5#0] -- vbuz1=vbuc1 + //SEG291 [172] phi from init_angle_screen::@1 to init_angle_screen::@2 [phi:init_angle_screen::@1->init_angle_screen::@2] + b2_from_b1: + //SEG292 [172] phi (byte) init_angle_screen::xb#2 = (byte) $27 [phi:init_angle_screen::@1->init_angle_screen::@2#0] -- vbuz1=vbuc1 lda #$27 sta xb - //SEG312 [181] phi (byte) init_dist_screen::x#2 = (byte) 0 [phi:init_dist_screen::@11->init_dist_screen::@5#1] -- vbuz1=vbuc1 + //SEG293 [172] phi (byte) init_angle_screen::x#2 = (byte) 0 [phi:init_angle_screen::@1->init_angle_screen::@2#1] -- vbuz1=vbuc1 lda #0 sta x - jmp b5 - //SEG313 [181] phi from init_dist_screen::@13 to init_dist_screen::@5 [phi:init_dist_screen::@13->init_dist_screen::@5] - b5_from_b13: - //SEG314 [181] phi (byte) init_dist_screen::xb#2 = (byte) init_dist_screen::xb#1 [phi:init_dist_screen::@13->init_dist_screen::@5#0] -- register_copy - //SEG315 [181] phi (byte) init_dist_screen::x#2 = (byte) init_dist_screen::x#1 [phi:init_dist_screen::@13->init_dist_screen::@5#1] -- register_copy - jmp b5 - //SEG316 init_dist_screen::@5 - b5: - //SEG317 [182] (byte) init_dist_screen::x2#0 ← (byte) init_dist_screen::x#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 + jmp b2 + //SEG294 [172] phi from init_angle_screen::@4 to init_angle_screen::@2 [phi:init_angle_screen::@4->init_angle_screen::@2] + b2_from_b4: + //SEG295 [172] phi (byte) init_angle_screen::xb#2 = (byte) init_angle_screen::xb#1 [phi:init_angle_screen::@4->init_angle_screen::@2#0] -- register_copy + //SEG296 [172] phi (byte) init_angle_screen::x#2 = (byte) init_angle_screen::x#1 [phi:init_angle_screen::@4->init_angle_screen::@2#1] -- register_copy + jmp b2 + //SEG297 init_angle_screen::@2 + b2: + //SEG298 [173] (byte~) init_angle_screen::$2 ← (byte) init_angle_screen::x#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 lda x asl - //SEG318 [183] if((byte) init_dist_screen::x2#0>=(byte) $27) goto init_dist_screen::@6 -- vbuaa_ge_vbuc1_then_la1 - cmp #$27 - bcs b6 - jmp b7 - //SEG319 init_dist_screen::@7 - b7: - //SEG320 [184] (byte~) init_dist_screen::$13 ← (byte) $27 - (byte) init_dist_screen::x2#0 -- vbuaa=vbuc1_minus_vbuaa + //SEG299 [174] (byte~) init_angle_screen::$3 ← (byte) $27 - (byte~) init_angle_screen::$2 -- vbuaa=vbuc1_minus_vbuaa eor #$ff clc adc #$27+1 - //SEG321 [185] phi from init_dist_screen::@6 init_dist_screen::@7 to init_dist_screen::@8 [phi:init_dist_screen::@6/init_dist_screen::@7->init_dist_screen::@8] - b8_from_b6: - b8_from_b7: - //SEG322 [185] phi (byte) init_dist_screen::xd#0 = (byte~) init_dist_screen::$15 [phi:init_dist_screen::@6/init_dist_screen::@7->init_dist_screen::@8#0] -- register_copy - jmp b8 - //SEG323 init_dist_screen::@8 - b8: - //SEG324 [186] (byte) sqr::val#1 ← (byte) init_dist_screen::xd#0 - //SEG325 [187] call sqr - //SEG326 [237] phi from init_dist_screen::@8 to sqr [phi:init_dist_screen::@8->sqr] - sqr_from_b8: - //SEG327 [237] phi (byte) sqr::val#2 = (byte) sqr::val#1 [phi:init_dist_screen::@8->sqr#0] -- register_copy - jsr sqr - //SEG328 [188] (word) sqr::return#3 ← (word) sqr::return#0 - jmp b12 - //SEG329 init_dist_screen::@12 - b12: - //SEG330 [189] (word) init_dist_screen::xds#0 ← (word) sqr::return#3 - //SEG331 [190] (word) init_dist_screen::ds#0 ← (word) init_dist_screen::xds#0 + (word) init_dist_screen::yds#0 -- vwuz1=vwuz1_plus_vwuz2 - lda ds - clc - adc yds - sta ds - lda ds+1 - adc yds+1 - sta ds+1 - //SEG332 [191] (word) sqrt::val#0 ← (word) init_dist_screen::ds#0 - //SEG333 [192] call sqrt - jsr sqrt - //SEG334 [193] (byte) sqrt::return#2 ← (byte) sqrt::return#0 - jmp b13 - //SEG335 init_dist_screen::@13 - b13: - //SEG336 [194] (byte) init_dist_screen::d#0 ← (byte) sqrt::return#2 - //SEG337 [195] *((byte*) init_dist_screen::screen_topline#10 + (byte) init_dist_screen::x#2) ← (byte) init_dist_screen::d#0 -- pbuz1_derefidx_vbuz2=vbuaa - ldy x - sta (screen_topline),y - //SEG338 [196] *((byte*) init_dist_screen::screen_bottomline#10 + (byte) init_dist_screen::x#2) ← (byte) init_dist_screen::d#0 -- pbuz1_derefidx_vbuz2=vbuaa - ldy x - sta (screen_bottomline),y - //SEG339 [197] *((byte*) init_dist_screen::screen_topline#10 + (byte) init_dist_screen::xb#2) ← (byte) init_dist_screen::d#0 -- pbuz1_derefidx_vbuz2=vbuaa - ldy xb - sta (screen_topline),y - //SEG340 [198] *((byte*) init_dist_screen::screen_bottomline#10 + (byte) init_dist_screen::xb#2) ← (byte) init_dist_screen::d#0 -- pbuz1_derefidx_vbuz2=vbuaa - ldy xb - sta (screen_bottomline),y - //SEG341 [199] (byte) init_dist_screen::x#1 ← ++ (byte) init_dist_screen::x#2 -- vbuz1=_inc_vbuz1 - inc x - //SEG342 [200] (byte) init_dist_screen::xb#1 ← -- (byte) init_dist_screen::xb#2 -- vbuz1=_dec_vbuz1 - dec xb - //SEG343 [201] if((byte) init_dist_screen::x#1<(byte) $13+(byte) 1) goto init_dist_screen::@5 -- vbuz1_lt_vbuc1_then_la1 - lda x - cmp #$13+1 - bcc b5_from_b13 - jmp b9 - //SEG344 init_dist_screen::@9 - b9: - //SEG345 [202] (byte*) init_dist_screen::screen_topline#1 ← (byte*) init_dist_screen::screen_topline#10 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 - lda #$28 - clc - adc screen_topline - sta screen_topline - bcc !+ - inc screen_topline+1 - !: - //SEG346 [203] (byte*) init_dist_screen::screen_bottomline#1 ← (byte*) init_dist_screen::screen_bottomline#10 - (byte) $28 -- pbuz1=pbuz1_minus_vwuc1 - lda screen_bottomline - sec - sbc #<$28 - sta screen_bottomline - lda screen_bottomline+1 - sbc #>$28 - sta screen_bottomline+1 - //SEG347 [204] (byte) init_dist_screen::y#1 ← ++ (byte) init_dist_screen::y#10 -- vbuz1=_inc_vbuz1 - inc y - //SEG348 [205] if((byte) init_dist_screen::y#1!=(byte) $d) goto init_dist_screen::@1 -- vbuz1_neq_vbuc1_then_la1 - lda #$d - cmp y - bne b1_from_b9 - jmp breturn - //SEG349 init_dist_screen::@return - breturn: - //SEG350 [206] return - rts - //SEG351 init_dist_screen::@6 - b6: - //SEG352 [207] (byte~) init_dist_screen::$15 ← (byte) init_dist_screen::x2#0 - (byte) $27 -- vbuaa=vbuaa_minus_vbuc1 - sec - sbc #$27 - jmp b8_from_b6 - //SEG353 init_dist_screen::@2 - b2: - //SEG354 [208] (byte~) init_dist_screen::$7 ← (byte) init_dist_screen::y2#0 - (byte) $18 -- vbuaa=vbuaa_minus_vbuc1 - sec - sbc #$18 - jmp b4_from_b2 -} -//SEG355 sqrt -// Find the (integer) square root of a word value -// If the square is not an integer then it returns the largest integer N where N*N <= val -// Uses a table of squares that must be initialized by calling init_squares() -// sqrt(word zeropage($43) val) -sqrt: { - .label _1 = $1d - .label _3 = $1d - .label found = $1d - .label val = $43 - //SEG356 [209] (word) bsearch16u::key#0 ← (word) sqrt::val#0 - //SEG357 [210] (word*) bsearch16u::items#1 ← (word*)(void*) SQUARES#1 -- pwuz1=pwuz2 - lda SQUARES - sta bsearch16u.items - lda SQUARES+1 - sta bsearch16u.items+1 - //SEG358 [211] call bsearch16u - //SEG359 [218] phi from sqrt to bsearch16u [phi:sqrt->bsearch16u] - bsearch16u_from_sqrt: - jsr bsearch16u - //SEG360 [212] (word*) bsearch16u::return#3 ← (word*) bsearch16u::return#1 - jmp b1 - //SEG361 sqrt::@1 - b1: - //SEG362 [213] (word*) sqrt::found#0 ← (word*) bsearch16u::return#3 - //SEG363 [214] (word~) sqrt::$3 ← (word*) sqrt::found#0 - (word*)(void*) SQUARES#1 -- vwuz1=pwuz1_minus_pwuz2 - lda _3 - sec - sbc SQUARES - sta _3 - lda _3+1 - sbc SQUARES+1 - sta _3+1 - //SEG364 [215] (word~) sqrt::$1 ← (word~) sqrt::$3 >> (byte) 1 -- vwuz1=vwuz1_ror_1 - lsr _1+1 - ror _1 - //SEG365 [216] (byte) sqrt::return#0 ← (byte)(word~) sqrt::$1 -- vbuaa=_byte_vwuz1 - lda _1 - jmp breturn - //SEG366 sqrt::@return - breturn: - //SEG367 [217] return - rts -} -//SEG368 bsearch16u -// Searches an array of nitems unsigned words, the initial member of which is pointed to by base, for a member that matches the value key. -// - key - The value to look for -// - items - Pointer to the start of the array to search in -// - num - The number of items in the array -// Returns pointer to an entry in the array that matches the search key -// bsearch16u(word zeropage($43) key, word* zeropage($1d) items, byte register(X) num) -bsearch16u: { - .label _2 = $1d - .label pivot = $45 - .label result = $47 - .label return = $1d - .label items = $1d - .label key = $43 - //SEG369 [219] phi from bsearch16u to bsearch16u::@3 [phi:bsearch16u->bsearch16u::@3] - b3_from_bsearch16u: - //SEG370 [219] phi (word*) bsearch16u::items#2 = (word*) bsearch16u::items#1 [phi:bsearch16u->bsearch16u::@3#0] -- register_copy - //SEG371 [219] phi (byte) bsearch16u::num#3 = (const byte) NUM_SQUARES#3 [phi:bsearch16u->bsearch16u::@3#1] -- vbuxx=vbuc1 - ldx #NUM_SQUARES - jmp b3 - //SEG372 bsearch16u::@3 - b3: - //SEG373 [220] if((byte) bsearch16u::num#3>(byte) 0) goto bsearch16u::@4 -- vbuxx_gt_0_then_la1 - cpx #0 - bne b4 - jmp b5 - //SEG374 bsearch16u::@5 - b5: - //SEG375 [221] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@2 -- _deref_pwuz1_le_vwuz2_then_la1 - ldy #1 - lda (items),y - cmp key+1 - bne !+ - dey - lda (items),y - cmp key - beq b2_from_b5 - !: - bcc b2_from_b5 - jmp b1 - //SEG376 bsearch16u::@1 - b1: - //SEG377 [222] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#2 - (byte) 1*(const byte) SIZEOF_WORD -- pwuz1=pwuz1_minus_vwuc1 - lda _2 - sec - sbc #<1*SIZEOF_WORD - sta _2 - lda _2+1 - sbc #>1*SIZEOF_WORD - sta _2+1 - //SEG378 [223] phi from bsearch16u::@1 bsearch16u::@5 to bsearch16u::@2 [phi:bsearch16u::@1/bsearch16u::@5->bsearch16u::@2] - b2_from_b1: - b2_from_b5: - //SEG379 [223] phi (word*) bsearch16u::return#2 = (word*~) bsearch16u::$2 [phi:bsearch16u::@1/bsearch16u::@5->bsearch16u::@2#0] -- register_copy - jmp b2 - //SEG380 bsearch16u::@2 - b2: - //SEG381 [224] phi from bsearch16u::@2 bsearch16u::@8 to bsearch16u::@return [phi:bsearch16u::@2/bsearch16u::@8->bsearch16u::@return] - breturn_from_b2: - breturn_from_b8: - //SEG382 [224] phi (word*) bsearch16u::return#1 = (word*) bsearch16u::return#2 [phi:bsearch16u::@2/bsearch16u::@8->bsearch16u::@return#0] -- register_copy - jmp breturn - //SEG383 bsearch16u::@return - breturn: - //SEG384 [225] return - rts - //SEG385 bsearch16u::@4 + //SEG300 [175] (word) init_angle_screen::xw#0 ← (byte~) init_angle_screen::$3 w= (byte) 0 -- vwuz1=vbuaa_word_vbuc1 + ldy #0 + sta xw+1 + sty xw + //SEG301 [176] (byte~) init_angle_screen::$6 ← (byte) init_angle_screen::y#4 << (byte) 1 -- vbuaa=vbuz1_rol_1 + lda y + asl + //SEG302 [177] (word) init_angle_screen::yw#0 ← (byte~) init_angle_screen::$6 w= (byte) 0 -- vwuz1=vbuaa_word_vbuc1 + ldy #0 + sta yw+1 + sty yw + //SEG303 [178] (signed word) atan2_16::x#0 ← (signed word)(word) init_angle_screen::xw#0 + //SEG304 [179] (signed word) atan2_16::y#0 ← (signed word)(word) init_angle_screen::yw#0 + //SEG305 [180] call atan2_16 + jsr atan2_16 + //SEG306 [181] (word) atan2_16::return#2 ← (word) atan2_16::return#0 + jmp b4 + //SEG307 init_angle_screen::@4 b4: - //SEG386 [226] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#3 >> (byte) 1 -- vbuaa=vbuxx_ror_1 - txa - lsr - //SEG387 [227] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1 -- vbuaa=vbuaa_rol_1 - asl - //SEG388 [228] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#2 + (byte~) bsearch16u::$16 -- pwuz1=pwuz2_plus_vbuaa + //SEG308 [182] (word) init_angle_screen::angle_w#0 ← (word) atan2_16::return#2 + //SEG309 [183] (word~) init_angle_screen::$10 ← (word) init_angle_screen::angle_w#0 + (byte) $80 -- vwuz1=vwuz1_plus_vbuc1 + lda #$80 clc - adc items - sta pivot - lda #0 - adc items+1 - sta pivot+1 - //SEG389 [229] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0) -- vwsz1=vwsz2_minus__deref_pwsz3 - sec - lda key - ldy #0 - sbc (pivot),y - sta result - lda key+1 - iny - sbc (pivot),y - sta result+1 - //SEG390 [230] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6 -- vwsz1_neq_0_then_la1 - lda result+1 - bne b6 - lda result - bne b6 - jmp b8 - //SEG391 bsearch16u::@8 - b8: - //SEG392 [231] (word*~) bsearch16u::return#6 ← (word*) bsearch16u::pivot#0 -- pwuz1=pwuz2 - lda pivot - sta return - lda pivot+1 - sta return+1 - jmp breturn_from_b8 - //SEG393 bsearch16u::@6 - b6: - //SEG394 [232] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@7 -- vwsz1_le_0_then_la1 - lda result+1 - bmi b7_from_b6 - bne !+ - lda result - beq b7_from_b6 - !: - jmp b9 - //SEG395 bsearch16u::@9 - b9: - //SEG396 [233] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD -- pwuz1=pwuz2_plus_vbuc1 - lda #1*SIZEOF_WORD - clc - adc pivot - sta items - lda #0 - adc pivot+1 - sta items+1 - //SEG397 [234] (byte) bsearch16u::num#1 ← -- (byte) bsearch16u::num#3 -- vbuxx=_dec_vbuxx - dex - //SEG398 [235] phi from bsearch16u::@6 bsearch16u::@9 to bsearch16u::@7 [phi:bsearch16u::@6/bsearch16u::@9->bsearch16u::@7] - b7_from_b6: - b7_from_b9: - //SEG399 [235] phi (word*) bsearch16u::items#8 = (word*) bsearch16u::items#2 [phi:bsearch16u::@6/bsearch16u::@9->bsearch16u::@7#0] -- register_copy - //SEG400 [235] phi (byte) bsearch16u::num#5 = (byte) bsearch16u::num#3 [phi:bsearch16u::@6/bsearch16u::@9->bsearch16u::@7#1] -- register_copy - jmp b7 - //SEG401 bsearch16u::@7 - b7: - //SEG402 [236] (byte) bsearch16u::num#0 ← (byte) bsearch16u::num#5 >> (byte) 1 -- vbuxx=vbuxx_ror_1 - txa - lsr - tax - //SEG403 [219] phi from bsearch16u::@7 to bsearch16u::@3 [phi:bsearch16u::@7->bsearch16u::@3] - b3_from_b7: - //SEG404 [219] phi (word*) bsearch16u::items#2 = (word*) bsearch16u::items#8 [phi:bsearch16u::@7->bsearch16u::@3#0] -- register_copy - //SEG405 [219] phi (byte) bsearch16u::num#3 = (byte) bsearch16u::num#0 [phi:bsearch16u::@7->bsearch16u::@3#1] -- register_copy - jmp b3 -} -//SEG406 sqr -// Find the square of a byte value -// Uses a table of squares that must be initialized by calling init_squares() -// sqr(byte register(A) val) -sqr: { - .label return = $43 - .label return_2 = $41 - //SEG407 [238] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 -- vbuaa=vbuaa_rol_1 - asl - //SEG408 [239] (word) sqr::return#0 ← *((word*)(void*) SQUARES#1 + (byte~) sqr::$0) -- vwuz1=pwuz2_derefidx_vbuaa - tay - lda (SQUARES),y - sta return - iny - lda (SQUARES),y - sta return+1 - jmp breturn - //SEG409 sqr::@return - breturn: - //SEG410 [240] return - rts -} -//SEG411 init_squares -// Initialize squares table -// Uses iterative formula (x+1)^2 = x^2 + 2*x + 1 -init_squares: { - .label squares = $21 - .label sqr = $1f - //SEG412 [242] call malloc - //SEG413 [254] phi from init_squares to malloc [phi:init_squares->malloc] - malloc_from_init_squares: - //SEG414 [254] phi (word) malloc::size#3 = (const byte) NUM_SQUARES#3*(const byte) SIZEOF_WORD [phi:init_squares->malloc#0] -- vwuz1=vbuc1 - lda #NUM_SQUARES*SIZEOF_WORD - sta malloc.size - lda #0 - sta malloc.size+1 - //SEG415 [254] phi (byte*) heap_head#12 = (byte*) heap_head#1 [phi:init_squares->malloc#1] -- register_copy - jsr malloc - jmp b2 - //SEG416 init_squares::@2 - b2: - //SEG417 [243] (void*) SQUARES#1 ← (void*)(byte*) malloc::mem#0 - //SEG418 [244] (word*) init_squares::squares#0 ← (word*)(void*) SQUARES#1 -- pwuz1=pwuz2 - lda SQUARES - sta squares - lda SQUARES+1 - sta squares+1 - //SEG419 [245] phi from init_squares::@2 to init_squares::@1 [phi:init_squares::@2->init_squares::@1] - b1_from_b2: - //SEG420 [245] phi (byte) init_squares::i#2 = (byte) 0 [phi:init_squares::@2->init_squares::@1#0] -- vbuxx=vbuc1 - ldx #0 - //SEG421 [245] phi (word*) init_squares::squares#2 = (word*) init_squares::squares#0 [phi:init_squares::@2->init_squares::@1#1] -- register_copy - //SEG422 [245] phi (word) init_squares::sqr#2 = (byte) 0 [phi:init_squares::@2->init_squares::@1#2] -- vwuz1=vbuc1 - lda #0 - sta sqr - lda #0 - sta sqr+1 - jmp b1 - //SEG423 [245] phi from init_squares::@1 to init_squares::@1 [phi:init_squares::@1->init_squares::@1] - b1_from_b1: - //SEG424 [245] phi (byte) init_squares::i#2 = (byte) init_squares::i#1 [phi:init_squares::@1->init_squares::@1#0] -- register_copy - //SEG425 [245] phi (word*) init_squares::squares#2 = (word*) init_squares::squares#1 [phi:init_squares::@1->init_squares::@1#1] -- register_copy - //SEG426 [245] phi (word) init_squares::sqr#2 = (word) init_squares::sqr#1 [phi:init_squares::@1->init_squares::@1#2] -- register_copy - jmp b1 - //SEG427 init_squares::@1 - b1: - //SEG428 [246] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 -- _deref_pwuz1=vwuz2 - ldy #0 - lda sqr - sta (squares),y - iny - lda sqr+1 - sta (squares),y - //SEG429 [247] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD -- pwuz1=pwuz1_plus_vbuc1 - lda #SIZEOF_WORD - clc - adc squares - sta squares + adc _10 + sta _10 bcc !+ - inc squares+1 + inc _10+1 !: - //SEG430 [248] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 -- vbuaa=vbuxx_rol_1 - txa - asl - //SEG431 [249] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 -- vbuaa=vbuaa_plus_1 + //SEG310 [184] (byte) init_angle_screen::ang_w#0 ← > (word~) init_angle_screen::$10 -- vbuz1=_hi_vwuz2 + lda _10+1 + sta ang_w + //SEG311 [185] *((byte*) init_angle_screen::screen_bottomline#5 + (byte) init_angle_screen::xb#2) ← (byte) init_angle_screen::ang_w#0 -- pbuz1_derefidx_vbuz2=vbuz3 + lda ang_w + ldy xb + sta (screen_bottomline),y + //SEG312 [186] (byte~) init_angle_screen::$12 ← - (byte) init_angle_screen::ang_w#0 -- vbuaa=_neg_vbuz1 + lda ang_w + eor #$ff clc adc #1 - //SEG432 [250] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 -- vwuz1=vwuz1_plus_vbuaa + //SEG313 [187] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::xb#2) ← (byte~) init_angle_screen::$12 -- pbuz1_derefidx_vbuz2=vbuaa + ldy xb + sta (screen_topline),y + //SEG314 [188] (byte~) init_angle_screen::$13 ← (byte) $80 + (byte) init_angle_screen::ang_w#0 -- vbuaa=vbuc1_plus_vbuz1 + lda #$80 clc - adc sqr - sta sqr + adc ang_w + //SEG315 [189] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$13 -- pbuz1_derefidx_vbuz2=vbuaa + ldy x + sta (screen_topline),y + //SEG316 [190] (byte~) init_angle_screen::$14 ← (byte) $80 - (byte) init_angle_screen::ang_w#0 -- vbuaa=vbuc1_minus_vbuz1 + lda #$80 + sec + sbc ang_w + //SEG317 [191] *((byte*) init_angle_screen::screen_bottomline#5 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$14 -- pbuz1_derefidx_vbuz2=vbuaa + ldy x + sta (screen_bottomline),y + //SEG318 [192] (byte) init_angle_screen::x#1 ← ++ (byte) init_angle_screen::x#2 -- vbuz1=_inc_vbuz1 + inc x + //SEG319 [193] (byte) init_angle_screen::xb#1 ← -- (byte) init_angle_screen::xb#2 -- vbuz1=_dec_vbuz1 + dec xb + //SEG320 [194] if((byte) init_angle_screen::x#1<(byte) $13+(byte) 1) goto init_angle_screen::@2 -- vbuz1_lt_vbuc1_then_la1 + lda x + cmp #$13+1 + bcc b2_from_b4 + jmp b3 + //SEG321 init_angle_screen::@3 + b3: + //SEG322 [195] (byte*) init_angle_screen::screen_topline#1 ← (byte*) init_angle_screen::screen_topline#5 - (byte) $28 -- pbuz1=pbuz1_minus_vwuc1 + lda screen_topline + sec + sbc #<$28 + sta screen_topline + lda screen_topline+1 + sbc #>$28 + sta screen_topline+1 + //SEG323 [196] (byte*) init_angle_screen::screen_bottomline#1 ← (byte*) init_angle_screen::screen_bottomline#5 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 + lda #$28 + clc + adc screen_bottomline + sta screen_bottomline bcc !+ - inc sqr+1 + inc screen_bottomline+1 !: - //SEG433 [251] (byte) init_squares::i#1 ← ++ (byte) init_squares::i#2 -- vbuxx=_inc_vbuxx - inx - //SEG434 [252] if((byte) init_squares::i#1!=(const byte) NUM_SQUARES#3-(byte) 1+(byte) 1) goto init_squares::@1 -- vbuxx_neq_vbuc1_then_la1 - cpx #NUM_SQUARES-1+1 - bne b1_from_b1 + //SEG324 [197] (byte) init_angle_screen::y#1 ← ++ (byte) init_angle_screen::y#4 -- vbuz1=_inc_vbuz1 + inc y + //SEG325 [198] if((byte) init_angle_screen::y#1!=(byte) $d) goto init_angle_screen::@1 -- vbuz1_neq_vbuc1_then_la1 + lda #$d + cmp y + bne b1_from_b3 jmp breturn - //SEG435 init_squares::@return + //SEG326 init_angle_screen::@return breturn: - //SEG436 [253] return + //SEG327 [199] return rts } -//SEG437 malloc +//SEG328 atan2_16 +// Find the atan2(x, y) - which is the angle of the line from (0,0) to (x,y) +// Finding the angle requires a binary search using CORDIC_ITERATIONS_16 +// Returns the angle in hex-degrees (0=0, 0x8000=PI, 0x10000=2*PI) +// atan2_16(signed word zeropage($43) x, signed word zeropage($45) y) +atan2_16: { + .label _2 = $1d + .label _7 = $1f + .label yi = $1d + .label xi = $1f + .label angle = $21 + .label xd = $25 + .label yd = $23 + .label return = $21 + .label x = $43 + .label y = $45 + //SEG329 [200] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 -- vwsz1_ge_0_then_la1 + lda y+1 + bpl b1 + jmp b2 + //SEG330 atan2_16::@2 + b2: + //SEG331 [201] (signed word~) atan2_16::$2 ← - (signed word) atan2_16::y#0 -- vwsz1=_neg_vwsz2 + sec + lda #0 + sbc y + sta _2 + lda #0 + sbc y+1 + sta _2+1 + //SEG332 [202] phi from atan2_16::@1 atan2_16::@2 to atan2_16::@3 [phi:atan2_16::@1/atan2_16::@2->atan2_16::@3] + b3_from_b1: + b3_from_b2: + //SEG333 [202] phi (signed word) atan2_16::yi#0 = (signed word~) atan2_16::yi#16 [phi:atan2_16::@1/atan2_16::@2->atan2_16::@3#0] -- register_copy + jmp b3 + //SEG334 atan2_16::@3 + b3: + //SEG335 [203] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4 -- vwsz1_ge_0_then_la1 + lda x+1 + bpl b4 + jmp b5 + //SEG336 atan2_16::@5 + b5: + //SEG337 [204] (signed word~) atan2_16::$7 ← - (signed word) atan2_16::x#0 -- vwsz1=_neg_vwsz2 + sec + lda #0 + sbc x + sta _7 + lda #0 + sbc x+1 + sta _7+1 + //SEG338 [205] phi from atan2_16::@4 atan2_16::@5 to atan2_16::@6 [phi:atan2_16::@4/atan2_16::@5->atan2_16::@6] + b6_from_b4: + b6_from_b5: + //SEG339 [205] phi (signed word) atan2_16::xi#0 = (signed word~) atan2_16::xi#13 [phi:atan2_16::@4/atan2_16::@5->atan2_16::@6#0] -- register_copy + jmp b6 + //SEG340 atan2_16::@6 + b6: + //SEG341 [206] phi from atan2_16::@6 to atan2_16::@10 [phi:atan2_16::@6->atan2_16::@10] + b10_from_b6: + //SEG342 [206] phi (word) atan2_16::angle#12 = (byte) 0 [phi:atan2_16::@6->atan2_16::@10#0] -- vwuz1=vbuc1 + lda #0 + sta angle + lda #0 + sta angle+1 + //SEG343 [206] phi (byte) atan2_16::i#2 = (byte) 0 [phi:atan2_16::@6->atan2_16::@10#1] -- vbuxx=vbuc1 + ldx #0 + //SEG344 [206] phi (signed word) atan2_16::xi#3 = (signed word) atan2_16::xi#0 [phi:atan2_16::@6->atan2_16::@10#2] -- register_copy + //SEG345 [206] phi (signed word) atan2_16::yi#3 = (signed word) atan2_16::yi#0 [phi:atan2_16::@6->atan2_16::@10#3] -- register_copy + jmp b10 + //SEG346 atan2_16::@10 + b10: + //SEG347 [207] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@11 -- vwsz1_neq_0_then_la1 + lda yi+1 + bne b11 + lda yi + bne b11 + //SEG348 [208] phi from atan2_16::@10 atan2_16::@19 to atan2_16::@12 [phi:atan2_16::@10/atan2_16::@19->atan2_16::@12] + b12_from_b10: + b12_from_b19: + //SEG349 [208] phi (word) atan2_16::angle#6 = (word) atan2_16::angle#12 [phi:atan2_16::@10/atan2_16::@19->atan2_16::@12#0] -- register_copy + jmp b12 + //SEG350 atan2_16::@12 + b12: + //SEG351 [209] (word) atan2_16::angle#1 ← (word) atan2_16::angle#6 >> (byte) 1 -- vwuz1=vwuz1_ror_1 + lsr angle+1 + ror angle + //SEG352 [210] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7 -- vwsz1_ge_0_then_la1 + lda x+1 + bpl b7_from_b12 + jmp b21 + //SEG353 atan2_16::@21 + b21: + //SEG354 [211] (word) atan2_16::angle#4 ← (word) $8000 - (word) atan2_16::angle#1 -- vwuz1=vwuc1_minus_vwuz1 + sec + lda #<$8000 + sbc angle + sta angle + lda #>$8000 + sbc angle+1 + sta angle+1 + //SEG355 [212] phi from atan2_16::@12 atan2_16::@21 to atan2_16::@7 [phi:atan2_16::@12/atan2_16::@21->atan2_16::@7] + b7_from_b12: + b7_from_b21: + //SEG356 [212] phi (word) atan2_16::angle#11 = (word) atan2_16::angle#1 [phi:atan2_16::@12/atan2_16::@21->atan2_16::@7#0] -- register_copy + jmp b7 + //SEG357 atan2_16::@7 + b7: + //SEG358 [213] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8 -- vwsz1_ge_0_then_la1 + lda y+1 + bpl b8_from_b7 + jmp b9 + //SEG359 atan2_16::@9 + b9: + //SEG360 [214] (word) atan2_16::angle#5 ← - (word) atan2_16::angle#11 -- vwuz1=_neg_vwuz1 + sec + lda #0 + sbc angle + sta angle + lda #0 + sbc angle+1 + sta angle+1 + //SEG361 [215] phi from atan2_16::@7 atan2_16::@9 to atan2_16::@8 [phi:atan2_16::@7/atan2_16::@9->atan2_16::@8] + b8_from_b7: + b8_from_b9: + //SEG362 [215] phi (word) atan2_16::return#0 = (word) atan2_16::angle#11 [phi:atan2_16::@7/atan2_16::@9->atan2_16::@8#0] -- register_copy + jmp b8 + //SEG363 atan2_16::@8 + b8: + jmp breturn + //SEG364 atan2_16::@return + breturn: + //SEG365 [216] return + rts + //SEG366 atan2_16::@11 + b11: + //SEG367 [217] (byte~) atan2_16::shift#5 ← (byte) atan2_16::i#2 -- vbuyy=vbuxx + txa + tay + //SEG368 [218] (signed word~) atan2_16::xd#10 ← (signed word) atan2_16::xi#3 -- vwsz1=vwsz2 + lda xi + sta xd + lda xi+1 + sta xd+1 + //SEG369 [219] (signed word~) atan2_16::yd#10 ← (signed word) atan2_16::yi#3 -- vwsz1=vwsz2 + lda yi + sta yd + lda yi+1 + sta yd+1 + //SEG370 [220] phi from atan2_16::@11 atan2_16::@14 to atan2_16::@13 [phi:atan2_16::@11/atan2_16::@14->atan2_16::@13] + b13_from_b11: + b13_from_b14: + //SEG371 [220] phi (signed word) atan2_16::yd#3 = (signed word~) atan2_16::yd#10 [phi:atan2_16::@11/atan2_16::@14->atan2_16::@13#0] -- register_copy + //SEG372 [220] phi (signed word) atan2_16::xd#3 = (signed word~) atan2_16::xd#10 [phi:atan2_16::@11/atan2_16::@14->atan2_16::@13#1] -- register_copy + //SEG373 [220] phi (byte) atan2_16::shift#2 = (byte~) atan2_16::shift#5 [phi:atan2_16::@11/atan2_16::@14->atan2_16::@13#2] -- register_copy + jmp b13 + //SEG374 atan2_16::@13 + b13: + //SEG375 [221] if((byte) atan2_16::shift#2>=(byte) 2) goto atan2_16::@14 -- vbuyy_ge_vbuc1_then_la1 + cpy #2 + bcs b14 + jmp b15 + //SEG376 atan2_16::@15 + b15: + //SEG377 [222] if((byte) 0==(byte) atan2_16::shift#2) goto atan2_16::@17 -- vbuc1_eq_vbuyy_then_la1 + cpy #0 + beq b17_from_b15 + jmp b16 + //SEG378 atan2_16::@16 + b16: + //SEG379 [223] (signed word) atan2_16::xd#2 ← (signed word) atan2_16::xd#3 >> (signed byte) 1 -- vwsz1=vwsz1_ror_1 + lda xd+1 + cmp #$80 + ror xd+1 + ror xd + //SEG380 [224] (signed word) atan2_16::yd#2 ← (signed word) atan2_16::yd#3 >> (signed byte) 1 -- vwsz1=vwsz1_ror_1 + lda yd+1 + cmp #$80 + ror yd+1 + ror yd + //SEG381 [225] phi from atan2_16::@15 atan2_16::@16 to atan2_16::@17 [phi:atan2_16::@15/atan2_16::@16->atan2_16::@17] + b17_from_b15: + b17_from_b16: + //SEG382 [225] phi (signed word) atan2_16::xd#5 = (signed word) atan2_16::xd#3 [phi:atan2_16::@15/atan2_16::@16->atan2_16::@17#0] -- register_copy + //SEG383 [225] phi (signed word) atan2_16::yd#5 = (signed word) atan2_16::yd#3 [phi:atan2_16::@15/atan2_16::@16->atan2_16::@17#1] -- register_copy + jmp b17 + //SEG384 atan2_16::@17 + b17: + //SEG385 [226] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@18 -- vwsz1_ge_0_then_la1 + lda yi+1 + bpl b18 + jmp b20 + //SEG386 atan2_16::@20 + b20: + //SEG387 [227] (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#3 - (signed word) atan2_16::yd#5 -- vwsz1=vwsz1_minus_vwsz2 + lda xi + sec + sbc yd + sta xi + lda xi+1 + sbc yd+1 + sta xi+1 + //SEG388 [228] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#5 -- vwsz1=vwsz1_plus_vwsz2 + lda yi + clc + adc xd + sta yi + lda yi+1 + adc xd+1 + sta yi+1 + //SEG389 [229] (byte~) atan2_16::$24 ← (byte) atan2_16::i#2 << (byte) 1 -- vbuaa=vbuxx_rol_1 + txa + asl + //SEG390 [230] (word) atan2_16::angle#3 ← (word) atan2_16::angle#12 - *((const word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16#0 + (byte~) atan2_16::$24) -- vwuz1=vwuz1_minus_pwuc1_derefidx_vbuaa + tay + sec + lda angle + sbc CORDIC_ATAN2_ANGLES_16,y + sta angle + lda angle+1 + sbc CORDIC_ATAN2_ANGLES_16+1,y + sta angle+1 + //SEG391 [231] phi from atan2_16::@18 atan2_16::@20 to atan2_16::@19 [phi:atan2_16::@18/atan2_16::@20->atan2_16::@19] + b19_from_b18: + b19_from_b20: + //SEG392 [231] phi (signed word) atan2_16::xi#8 = (signed word) atan2_16::xi#1 [phi:atan2_16::@18/atan2_16::@20->atan2_16::@19#0] -- register_copy + //SEG393 [231] phi (word) atan2_16::angle#13 = (word) atan2_16::angle#2 [phi:atan2_16::@18/atan2_16::@20->atan2_16::@19#1] -- register_copy + //SEG394 [231] phi (signed word) atan2_16::yi#8 = (signed word) atan2_16::yi#1 [phi:atan2_16::@18/atan2_16::@20->atan2_16::@19#2] -- register_copy + jmp b19 + //SEG395 atan2_16::@19 + b19: + //SEG396 [232] (byte) atan2_16::i#1 ← ++ (byte) atan2_16::i#2 -- vbuxx=_inc_vbuxx + inx + //SEG397 [233] if((byte) atan2_16::i#1==(const byte) CORDIC_ITERATIONS_16#0-(byte) 1+(byte) 1) goto atan2_16::@12 -- vbuxx_eq_vbuc1_then_la1 + cpx #CORDIC_ITERATIONS_16-1+1 + beq b12_from_b19 + //SEG398 [206] phi from atan2_16::@19 to atan2_16::@10 [phi:atan2_16::@19->atan2_16::@10] + b10_from_b19: + //SEG399 [206] phi (word) atan2_16::angle#12 = (word) atan2_16::angle#13 [phi:atan2_16::@19->atan2_16::@10#0] -- register_copy + //SEG400 [206] phi (byte) atan2_16::i#2 = (byte) atan2_16::i#1 [phi:atan2_16::@19->atan2_16::@10#1] -- register_copy + //SEG401 [206] phi (signed word) atan2_16::xi#3 = (signed word) atan2_16::xi#8 [phi:atan2_16::@19->atan2_16::@10#2] -- register_copy + //SEG402 [206] phi (signed word) atan2_16::yi#3 = (signed word) atan2_16::yi#8 [phi:atan2_16::@19->atan2_16::@10#3] -- register_copy + jmp b10 + //SEG403 atan2_16::@18 + b18: + //SEG404 [234] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#5 -- vwsz1=vwsz1_plus_vwsz2 + lda xi + clc + adc yd + sta xi + lda xi+1 + adc yd+1 + sta xi+1 + //SEG405 [235] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#5 -- vwsz1=vwsz1_minus_vwsz2 + lda yi + sec + sbc xd + sta yi + lda yi+1 + sbc xd+1 + sta yi+1 + //SEG406 [236] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 << (byte) 1 -- vbuaa=vbuxx_rol_1 + txa + asl + //SEG407 [237] (word) atan2_16::angle#2 ← (word) atan2_16::angle#12 + *((const word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16#0 + (byte~) atan2_16::$23) -- vwuz1=vwuz1_plus_pwuc1_derefidx_vbuaa + tay + clc + lda angle + adc CORDIC_ATAN2_ANGLES_16,y + sta angle + lda angle+1 + adc CORDIC_ATAN2_ANGLES_16+1,y + sta angle+1 + jmp b19_from_b18 + //SEG408 atan2_16::@14 + b14: + //SEG409 [238] (signed word) atan2_16::xd#1 ← (signed word) atan2_16::xd#3 >> (signed byte) 2 -- vwsz1=vwsz1_ror_2 + lda xd+1 + cmp #$80 + ror xd+1 + ror xd + lda xd+1 + cmp #$80 + ror xd+1 + ror xd + //SEG410 [239] (signed word) atan2_16::yd#1 ← (signed word) atan2_16::yd#3 >> (signed byte) 2 -- vwsz1=vwsz1_ror_2 + lda yd+1 + cmp #$80 + ror yd+1 + ror yd + lda yd+1 + cmp #$80 + ror yd+1 + ror yd + //SEG411 [240] (byte) atan2_16::shift#1 ← (byte) atan2_16::shift#2 - (byte) 2 -- vbuyy=vbuyy_minus_2 + dey + dey + jmp b13_from_b14 + //SEG412 atan2_16::@4 + b4: + //SEG413 [241] (signed word~) atan2_16::xi#13 ← (signed word) atan2_16::x#0 -- vwsz1=vwsz2 + lda x + sta xi + lda x+1 + sta xi+1 + jmp b6_from_b4 + //SEG414 atan2_16::@1 + b1: + //SEG415 [242] (signed word~) atan2_16::yi#16 ← (signed word) atan2_16::y#0 -- vwsz1=vwsz2 + lda y + sta yi + lda y+1 + sta yi+1 + jmp b3_from_b1 +} +//SEG416 malloc // Allocates a block of size bytes of memory, returning a pointer to the beginning of the block. // The content of the newly allocated block of memory is not initialized, remaining with indeterminate values. -// malloc(word zeropage($25) size) malloc: { - .label mem = $49 - .label size = $25 - //SEG438 [255] (byte*) malloc::mem#0 ← (byte*) heap_head#12 -- pbuz1=pbuz2 + .label mem = $2d + //SEG417 [244] (byte*) malloc::mem#0 ← (byte*) heap_head#5 -- pbuz1=pbuz2 lda heap_head sta mem lda heap_head+1 sta mem+1 - //SEG439 [256] (byte*) heap_head#1 ← (byte*) heap_head#12 + (word) malloc::size#3 -- pbuz1=pbuz1_plus_vwuz2 - lda heap_head + //SEG418 [245] (byte*) heap_head#1 ← (byte*) heap_head#5 + (word) $3e8 -- pbuz1=pbuz1_plus_vwuc1 clc - adc size + lda heap_head + adc #<$3e8 sta heap_head lda heap_head+1 - adc size+1 + adc #>$3e8 sta heap_head+1 jmp breturn - //SEG440 malloc::@return + //SEG419 malloc::@return breturn: - //SEG441 [257] return + //SEG420 [246] return rts } -//SEG442 irqBottom +//SEG421 irqBottom // Raster Interrupt at the bottom of the screen irqBottom: { - //SEG443 entry interrupt(HARDWARE_ALL) + //SEG422 entry interrupt(HARDWARE_ALL) sta rega+1 stx regx+1 sty regy+1 - //SEG444 [259] phi from irqBottom to irqBottom::@1 [phi:irqBottom->irqBottom::@1] + //SEG423 [248] phi from irqBottom to irqBottom::@1 [phi:irqBottom->irqBottom::@1] b1_from_irqBottom: jmp b1 - //SEG445 irqBottom::@1 + //SEG424 irqBottom::@1 b1: - //SEG446 [260] call processChars - //SEG447 [265] phi from irqBottom::@1 to processChars [phi:irqBottom::@1->processChars] + //SEG425 [249] call processChars + //SEG426 [254] phi from irqBottom::@1 to processChars [phi:irqBottom::@1->processChars] processChars_from_b1: jsr processChars jmp b2 - //SEG448 irqBottom::@2 + //SEG427 irqBottom::@2 b2: - //SEG449 [261] *((const byte*) RASTER#0) ← (const byte) RASTER_IRQ_TOP#0 -- _deref_pbuc1=vbuc2 + //SEG428 [250] *((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 - //SEG450 [262] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_ALL)(void()) irqTop() -- _deref_pptc1=pprc2 + //SEG429 [251] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_ALL)(void()) irqTop() -- _deref_pptc1=pprc2 lda #irqTop sta HARDWARE_IRQ+1 - //SEG451 [263] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 + //SEG430 [252] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 // Acknowledge the IRQ lda #IRQ_RASTER sta IRQ_STATUS jmp breturn - //SEG452 irqBottom::@return + //SEG431 irqBottom::@return breturn: - //SEG453 [264] return - exit interrupt(HARDWARE_ALL) + //SEG432 [253] return - exit interrupt(HARDWARE_ALL) rega: lda #00 regx: @@ -10588,54 +9830,54 @@ irqBottom: { ldy #00 rti } -//SEG454 processChars +//SEG433 processChars // Process any chars in the PROCESSING array processChars: { - .label _15 = $50 - .label _25 = $4e - .label processing = $4b - .label bitmask = $4d - .label i = $27 - .label xpos = $4e - .label ypos = $52 - .label numActive = $28 - //SEG455 [266] phi from processChars to processChars::@1 [phi:processChars->processChars::@1] + .label _15 = $4d + .label _25 = $4b + .label processing = $48 + .label bitmask = $4a + .label i = $29 + .label xpos = $4b + .label ypos = $4f + .label numActive = $2a + //SEG434 [255] phi from processChars to processChars::@1 [phi:processChars->processChars::@1] b1_from_processChars: - //SEG456 [266] phi (byte) processChars::numActive#10 = (byte) 0 [phi:processChars->processChars::@1#0] -- vbuz1=vbuc1 + //SEG435 [255] phi (byte) processChars::numActive#10 = (byte) 0 [phi:processChars->processChars::@1#0] -- vbuz1=vbuc1 lda #0 sta numActive - //SEG457 [266] phi (byte) processChars::i#10 = (byte) 0 [phi:processChars->processChars::@1#1] -- vbuz1=vbuc1 + //SEG436 [255] phi (byte) processChars::i#10 = (byte) 0 [phi:processChars->processChars::@1#1] -- vbuz1=vbuc1 lda #0 sta i jmp b1 - //SEG458 [266] phi from processChars::@2 to processChars::@1 [phi:processChars::@2->processChars::@1] + //SEG437 [255] phi from processChars::@2 to processChars::@1 [phi:processChars::@2->processChars::@1] b1_from_b2: - //SEG459 [266] phi (byte) processChars::numActive#10 = (byte) processChars::numActive#3 [phi:processChars::@2->processChars::@1#0] -- register_copy - //SEG460 [266] phi (byte) processChars::i#10 = (byte) processChars::i#1 [phi:processChars::@2->processChars::@1#1] -- register_copy + //SEG438 [255] phi (byte) processChars::numActive#10 = (byte) processChars::numActive#3 [phi:processChars::@2->processChars::@1#0] -- register_copy + //SEG439 [255] phi (byte) processChars::i#10 = (byte) processChars::i#1 [phi:processChars::@2->processChars::@1#1] -- register_copy jmp b1 - //SEG461 processChars::@1 + //SEG440 processChars::@1 b1: - //SEG462 [267] (byte) processChars::$67 ← (byte) processChars::i#10 << (byte) 1 -- vbuaa=vbuz1_rol_1 + //SEG441 [256] (byte) processChars::$67 ← (byte) processChars::i#10 << (byte) 1 -- vbuaa=vbuz1_rol_1 lda i asl - //SEG463 [268] (byte) processChars::$68 ← (byte) processChars::$67 + (byte) processChars::i#10 -- vbuaa=vbuaa_plus_vbuz1 + //SEG442 [257] (byte) processChars::$68 ← (byte) processChars::$67 + (byte) processChars::i#10 -- vbuaa=vbuaa_plus_vbuz1 clc adc i - //SEG464 [269] (byte) processChars::$69 ← (byte) processChars::$68 << (byte) 1 -- vbuaa=vbuaa_rol_1 + //SEG443 [258] (byte) processChars::$69 ← (byte) processChars::$68 << (byte) 1 -- vbuaa=vbuaa_rol_1 asl - //SEG465 [270] (byte) processChars::$70 ← (byte) processChars::$69 + (byte) processChars::i#10 -- vbuaa=vbuaa_plus_vbuz1 + //SEG444 [259] (byte) processChars::$70 ← (byte) processChars::$69 + (byte) processChars::i#10 -- vbuaa=vbuaa_plus_vbuz1 clc adc i - //SEG466 [271] (byte~) processChars::$37 ← (byte) processChars::$70 << (byte) 1 -- vbuaa=vbuaa_rol_1 + //SEG445 [260] (byte~) processChars::$37 ← (byte) processChars::$70 << (byte) 1 -- vbuaa=vbuaa_rol_1 asl - //SEG467 [272] (struct ProcessingSprite*) processChars::processing#0 ← (const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (byte~) processChars::$37 -- pssz1=pssc1_plus_vbuaa + //SEG446 [261] (struct ProcessingSprite*) processChars::processing#0 ← (const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (byte~) processChars::$37 -- pssz1=pssc1_plus_vbuaa clc adc #PROCESSING adc #0 sta processing+1 - //SEG468 [273] (byte) processChars::bitmask#0 ← (byte) 1 << *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID) -- vbuz1=vbuc1_rol_pbuz2_derefidx_vbuc2 + //SEG447 [262] (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 @@ -10648,23 +9890,23 @@ processChars: { bne !- !e: sta bitmask - //SEG469 [274] if(*((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS)==(const byte) STATUS_FREE) goto processChars::@2 -- pbuz1_derefidx_vbuc1_eq_vbuc2_then_la1 + //SEG448 [263] if(*((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS)==(const byte) STATUS_FREE) goto processChars::@2 -- pbuz1_derefidx_vbuc1_eq_vbuc2_then_la1 ldy #OFFSET_STRUCT_PROCESSINGSPRITE_STATUS lda (processing),y cmp #STATUS_FREE beq b2_from_b1 jmp b10 - //SEG470 processChars::@10 + //SEG449 processChars::@10 b10: - //SEG471 [275] if(*((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS)!=(const byte) STATUS_NEW) goto processChars::@3 -- pbuz1_derefidx_vbuc1_neq_vbuc2_then_la1 + //SEG450 [264] if(*((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS)!=(const byte) STATUS_NEW) goto processChars::@3 -- pbuz1_derefidx_vbuc1_neq_vbuc2_then_la1 ldy #OFFSET_STRUCT_PROCESSINGSPRITE_STATUS lda (processing),y cmp #STATUS_NEW bne b3 jmp b11 - //SEG472 processChars::@11 + //SEG451 processChars::@11 b11: - //SEG473 [276] *(*((byte**)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR)) ← (byte) ' ' -- _deref_pptz1_derefidx_vbuc1=vbuc2 + //SEG452 [265] *(*((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 @@ -10676,12 +9918,12 @@ processChars: { txa !: sta $ffff - //SEG474 [277] *((const byte*) SPRITES_ENABLE#0) ← *((const byte*) SPRITES_ENABLE#0) | (byte) processChars::bitmask#0 -- _deref_pbuc1=_deref_pbuc1_bor_vbuz1 + //SEG453 [266] *((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 - //SEG475 [278] *((const byte*) SPRITES_COLS#0 + *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID)) ← *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_COL) -- pbuc1_derefidx_pbuz1_derefidx_vbuc2=pbuz1_derefidx_vbuc3 + //SEG454 [267] *((const byte*) SPRITES_COLS#0 + *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID)) ← *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_COL) -- pbuc1_derefidx_pbuz1_derefidx_vbuc2=pbuz1_derefidx_vbuc3 // Set the sprite color ldy #OFFSET_STRUCT_PROCESSINGSPRITE_COL lda (processing),y @@ -10691,7 +9933,7 @@ processChars: { tay pla sta SPRITES_COLS,y - //SEG476 [279] *((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 + //SEG455 [268] *((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 @@ -10701,15 +9943,15 @@ processChars: { tay pla sta SCREEN+SPRITE_PTRS,y - //SEG477 [280] *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) ← (const byte) STATUS_PROCESSING -- pbuz1_derefidx_vbuc1=vbuc2 + //SEG456 [269] *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) ← (const byte) STATUS_PROCESSING -- pbuz1_derefidx_vbuc1=vbuc2 // Set status lda #STATUS_PROCESSING ldy #OFFSET_STRUCT_PROCESSINGSPRITE_STATUS sta (processing),y jmp b3 - //SEG478 processChars::@3 + //SEG457 processChars::@3 b3: - //SEG479 [281] (word) processChars::xpos#0 ← *((word*)(struct ProcessingSprite*) processChars::processing#0) >> (byte) 4 -- vwuz1=_deref_pwuz2_ror_4 + //SEG458 [270] (word) processChars::xpos#0 ← *((word*)(struct ProcessingSprite*) processChars::processing#0) >> (byte) 4 -- vwuz1=_deref_pwuz2_ror_4 ldy #0 lda (processing),y sta xpos @@ -10724,33 +9966,33 @@ processChars: { ror xpos lsr xpos+1 ror xpos - //SEG480 [282] (byte~) processChars::$11 ← > (word) processChars::xpos#0 -- vbuaa=_hi_vwuz1 + //SEG459 [271] (byte~) processChars::$11 ← > (word) processChars::xpos#0 -- vbuaa=_hi_vwuz1 lda xpos+1 - //SEG481 [283] if((byte) 0!=(byte~) processChars::$11) goto processChars::@4 -- vbuc1_neq_vbuaa_then_la1 + //SEG460 [272] if((byte) 0!=(byte~) processChars::$11) goto processChars::@4 -- vbuc1_neq_vbuaa_then_la1 // Set sprite position cmp #0 bne b4 jmp b8 - //SEG482 processChars::@8 + //SEG461 processChars::@8 b8: - //SEG483 [284] (byte~) processChars::$12 ← (byte) $ff ^ (byte) processChars::bitmask#0 -- vbuaa=vbuc1_bxor_vbuz1 + //SEG462 [273] (byte~) processChars::$12 ← (byte) $ff ^ (byte) processChars::bitmask#0 -- vbuaa=vbuc1_bxor_vbuz1 lda #$ff eor bitmask - //SEG484 [285] *((const byte*) SPRITES_XMSB#0) ← *((const byte*) SPRITES_XMSB#0) & (byte~) processChars::$12 -- _deref_pbuc1=_deref_pbuc1_band_vbuaa + //SEG463 [274] *((const byte*) SPRITES_XMSB#0) ← *((const byte*) SPRITES_XMSB#0) & (byte~) processChars::$12 -- _deref_pbuc1=_deref_pbuc1_band_vbuaa and SPRITES_XMSB sta SPRITES_XMSB jmp b5 - //SEG485 processChars::@5 + //SEG464 processChars::@5 b5: - //SEG486 [286] (byte~) processChars::$17 ← (byte) processChars::i#10 << (byte) 1 -- vbuxx=vbuz1_rol_1 + //SEG465 [275] (byte~) processChars::$17 ← (byte) processChars::i#10 << (byte) 1 -- vbuxx=vbuz1_rol_1 lda i asl tax - //SEG487 [287] (byte~) processChars::$14 ← (byte)(word) processChars::xpos#0 -- vbuaa=_byte_vwuz1 + //SEG466 [276] (byte~) processChars::$14 ← (byte)(word) processChars::xpos#0 -- vbuaa=_byte_vwuz1 lda xpos - //SEG488 [288] *((const byte*) SPRITES_XPOS#0 + (byte~) processChars::$17) ← (byte~) processChars::$14 -- pbuc1_derefidx_vbuxx=vbuaa + //SEG467 [277] *((const byte*) SPRITES_XPOS#0 + (byte~) processChars::$17) ← (byte~) processChars::$14 -- pbuc1_derefidx_vbuxx=vbuaa sta SPRITES_XPOS,x - //SEG489 [289] (word~) processChars::$15 ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y) >> (byte) 4 -- vwuz1=pwuz2_derefidx_vbuc1_ror_4 + //SEG468 [278] (word~) processChars::$15 ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y) >> (byte) 4 -- vwuz1=pwuz2_derefidx_vbuc1_ror_4 ldy #OFFSET_STRUCT_PROCESSINGSPRITE_Y lda (processing),y sta _15 @@ -10765,13 +10007,13 @@ processChars: { ror _15 lsr _15+1 ror _15 - //SEG490 [290] (byte) processChars::ypos#0 ← (byte)(word~) processChars::$15 -- vbuz1=_byte_vwuz2 + //SEG469 [279] (byte) processChars::ypos#0 ← (byte)(word~) processChars::$15 -- vbuz1=_byte_vwuz2 lda _15 sta ypos - //SEG491 [291] *((const byte*) SPRITES_YPOS#0 + (byte~) processChars::$17) ← (byte) processChars::ypos#0 -- pbuc1_derefidx_vbuxx=vbuz1 + //SEG470 [280] *((const byte*) SPRITES_YPOS#0 + (byte~) processChars::$17) ← (byte) processChars::ypos#0 -- pbuc1_derefidx_vbuxx=vbuz1 lda ypos sta SPRITES_YPOS,x - //SEG492 [292] if(*((word*)(struct ProcessingSprite*) processChars::processing#0)<(const word) XPOS_LEFTMOST#0) goto processChars::@6 -- _deref_pwuz1_lt_vwuc1_then_la1 + //SEG471 [281] if(*((word*)(struct ProcessingSprite*) processChars::processing#0)<(const word) XPOS_LEFTMOST#0) goto processChars::@6 -- _deref_pwuz1_lt_vwuc1_then_la1 // Move sprite ldy #1 lda (processing),y @@ -10784,9 +10026,9 @@ processChars: { bcc b6 !: jmp b14 - //SEG493 processChars::@14 + //SEG472 processChars::@14 b14: - //SEG494 [293] if(*((word*)(struct ProcessingSprite*) processChars::processing#0)>(const word) XPOS_RIGHTMOST#0) goto processChars::@6 -- _deref_pwuz1_gt_vwuc1_then_la1 + //SEG473 [282] if(*((word*)(struct ProcessingSprite*) processChars::processing#0)>(const word) XPOS_RIGHTMOST#0) goto processChars::@6 -- _deref_pwuz1_gt_vwuc1_then_la1 ldy #1 lda #>XPOS_RIGHTMOST cmp (processing),y @@ -10798,9 +10040,9 @@ processChars: { bcc b6 !: jmp b13 - //SEG495 processChars::@13 + //SEG474 processChars::@13 b13: - //SEG496 [294] if(*((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y)<(const word) YPOS_TOPMOST#0) goto processChars::@6 -- pwuz1_derefidx_vbuc1_lt_vwuc2_then_la1 + //SEG475 [283] if(*((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y)<(const word) YPOS_TOPMOST#0) goto processChars::@6 -- pwuz1_derefidx_vbuc1_lt_vwuc2_then_la1 ldy #OFFSET_STRUCT_PROCESSINGSPRITE_Y iny lda (processing),y @@ -10813,9 +10055,9 @@ processChars: { bcc b6 !: jmp b12 - //SEG497 processChars::@12 + //SEG476 processChars::@12 b12: - //SEG498 [295] if(*((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y)>(const word) YPOS_BOTTOMMOST#0) goto processChars::@6 -- pwuz1_derefidx_vbuc1_gt_vwuc2_then_la1 + //SEG477 [284] if(*((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y)>(const word) YPOS_BOTTOMMOST#0) goto processChars::@6 -- pwuz1_derefidx_vbuc1_gt_vwuc2_then_la1 ldy #OFFSET_STRUCT_PROCESSINGSPRITE_Y iny lda #>YPOS_BOTTOMMOST @@ -10828,23 +10070,23 @@ processChars: { bcc b6 !: jmp b9 - //SEG499 processChars::@9 + //SEG478 processChars::@9 b9: - //SEG500 [296] (word~) processChars::$25 ← (word) processChars::xpos#0 >> (byte) 3 -- vwuz1=vwuz1_ror_3 + //SEG479 [285] (word~) processChars::$25 ← (word) processChars::xpos#0 >> (byte) 3 -- vwuz1=vwuz1_ror_3 lsr _25+1 ror _25 lsr _25+1 ror _25 lsr _25+1 ror _25 - //SEG501 [297] (byte~) processChars::$26 ← (byte)(word~) processChars::$25 -- vbuaa=_byte_vwuz1 + //SEG480 [286] (byte~) processChars::$26 ← (byte)(word~) processChars::$25 -- vbuaa=_byte_vwuz1 lda _25 - //SEG502 [298] (byte) processChars::xchar#0 ← (byte~) processChars::$26 - (const byte) BORDER_XPOS_LEFT#0/(byte) 8 -- vbuaa=vbuaa_minus_vbuc1 + //SEG481 [287] (byte) processChars::xchar#0 ← (byte~) processChars::$26 - (const byte) BORDER_XPOS_LEFT#0/(byte) 8 -- vbuaa=vbuaa_minus_vbuc1 sec sbc #BORDER_XPOS_LEFT/8 - //SEG503 [299] (byte~) processChars::$38 ← (byte) processChars::xchar#0 << (byte) 1 -- vbuaa=vbuaa_rol_1 + //SEG482 [288] (byte~) processChars::$38 ← (byte) processChars::xchar#0 << (byte) 1 -- vbuaa=vbuaa_rol_1 asl - //SEG504 [300] *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX) + *((const word[$28]) VXSIN#0 + (byte~) processChars::$38) -- pwuz1_derefidx_vbuc1=pwuz1_derefidx_vbuc1_plus_pwuc2_derefidx_vbuaa + //SEG483 [289] *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX) + *((const word[$28]) VXSIN#0 + (byte~) processChars::$38) -- pwuz1_derefidx_vbuc1=pwuz1_derefidx_vbuc1_plus_pwuc2_derefidx_vbuaa ldy #OFFSET_STRUCT_PROCESSINGSPRITE_VX tax clc @@ -10855,7 +10097,7 @@ processChars: { lda (processing),y adc VXSIN+1,x sta (processing),y - //SEG505 [301] *((word*)(struct ProcessingSprite*) processChars::processing#0) ← *((word*)(struct ProcessingSprite*) processChars::processing#0) + *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX) -- _deref_pwuz1=_deref_pwuz1_plus_pwuz1_derefidx_vbuc1 + //SEG484 [290] *((word*)(struct ProcessingSprite*) processChars::processing#0) ← *((word*)(struct ProcessingSprite*) processChars::processing#0) + *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX) -- _deref_pwuz1=_deref_pwuz1_plus_pwuz1_derefidx_vbuc1 ldy #OFFSET_STRUCT_PROCESSINGSPRITE_VX sty $ff clc @@ -10869,17 +10111,17 @@ processChars: { ldy #1 adc (processing),y sta (processing),y - //SEG506 [302] (byte~) processChars::$30 ← (byte) processChars::ypos#0 >> (byte) 3 -- vbuaa=vbuz1_ror_3 + //SEG485 [291] (byte~) processChars::$30 ← (byte) processChars::ypos#0 >> (byte) 3 -- vbuaa=vbuz1_ror_3 lda ypos lsr lsr lsr - //SEG507 [303] (byte) processChars::ychar#0 ← (byte~) processChars::$30 - (const byte) BORDER_YPOS_TOP#0/(byte) 8 -- vbuaa=vbuaa_minus_vbuc1 + //SEG486 [292] (byte) processChars::ychar#0 ← (byte~) processChars::$30 - (const byte) BORDER_YPOS_TOP#0/(byte) 8 -- vbuaa=vbuaa_minus_vbuc1 sec sbc #BORDER_YPOS_TOP/8 - //SEG508 [304] (byte~) processChars::$39 ← (byte) processChars::ychar#0 << (byte) 1 -- vbuaa=vbuaa_rol_1 + //SEG487 [293] (byte~) processChars::$39 ← (byte) processChars::ychar#0 << (byte) 1 -- vbuaa=vbuaa_rol_1 asl - //SEG509 [305] *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY) + *((const word[$19]) VYSIN#0 + (byte~) processChars::$39) -- pwuz1_derefidx_vbuc1=pwuz1_derefidx_vbuc1_plus_pwuc2_derefidx_vbuaa + //SEG488 [294] *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY) + *((const word[$19]) VYSIN#0 + (byte~) processChars::$39) -- pwuz1_derefidx_vbuc1=pwuz1_derefidx_vbuc1_plus_pwuc2_derefidx_vbuaa ldy #OFFSET_STRUCT_PROCESSINGSPRITE_VY tax clc @@ -10890,7 +10132,7 @@ processChars: { lda (processing),y adc VYSIN+1,x sta (processing),y - //SEG510 [306] *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y) + *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY) -- pwuz1_derefidx_vbuc1=pwuz1_derefidx_vbuc1_plus_pwuz1_derefidx_vbuc2 + //SEG489 [295] *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y) + *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY) -- pwuz1_derefidx_vbuc1=pwuz1_derefidx_vbuc1_plus_pwuz1_derefidx_vbuc2 ldy #OFFSET_STRUCT_PROCESSINGSPRITE_VY clc lda (processing),y @@ -10903,78 +10145,78 @@ processChars: { adc (processing),y sta (processing),y jmp b7 - //SEG511 processChars::@7 + //SEG490 processChars::@7 b7: - //SEG512 [307] (byte) processChars::numActive#1 ← ++ (byte) processChars::numActive#10 -- vbuz1=_inc_vbuz1 + //SEG491 [296] (byte) processChars::numActive#1 ← ++ (byte) processChars::numActive#10 -- vbuz1=_inc_vbuz1 inc numActive - //SEG513 [308] phi from processChars::@1 processChars::@7 to processChars::@2 [phi:processChars::@1/processChars::@7->processChars::@2] + //SEG492 [297] phi from processChars::@1 processChars::@7 to processChars::@2 [phi:processChars::@1/processChars::@7->processChars::@2] b2_from_b1: b2_from_b7: - //SEG514 [308] phi (byte) processChars::numActive#3 = (byte) processChars::numActive#10 [phi:processChars::@1/processChars::@7->processChars::@2#0] -- register_copy + //SEG493 [297] phi (byte) processChars::numActive#3 = (byte) processChars::numActive#10 [phi:processChars::@1/processChars::@7->processChars::@2#0] -- register_copy jmp b2 - //SEG515 processChars::@2 + //SEG494 processChars::@2 b2: - //SEG516 [309] (byte) processChars::i#1 ← ++ (byte) processChars::i#10 -- vbuz1=_inc_vbuz1 + //SEG495 [298] (byte) processChars::i#1 ← ++ (byte) processChars::i#10 -- vbuz1=_inc_vbuz1 inc i - //SEG517 [310] if((byte) processChars::i#1!=(const byte) NUM_PROCESSING#0-(byte) 1+(byte) 1) goto processChars::@1 -- vbuz1_neq_vbuc1_then_la1 + //SEG496 [299] if((byte) processChars::i#1!=(const byte) NUM_PROCESSING#0-(byte) 1+(byte) 1) goto processChars::@1 -- vbuz1_neq_vbuc1_then_la1 lda #NUM_PROCESSING-1+1 cmp i bne b1_from_b2 jmp breturn - //SEG518 processChars::@return + //SEG497 processChars::@return breturn: - //SEG519 [311] return + //SEG498 [300] return rts - //SEG520 processChars::@6 + //SEG499 processChars::@6 b6: - //SEG521 [312] *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) ← (const byte) STATUS_FREE -- pbuz1_derefidx_vbuc1=vbuc2 + //SEG500 [301] *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) ← (const byte) STATUS_FREE -- pbuz1_derefidx_vbuc1=vbuc2 // Set status to FREE lda #STATUS_FREE ldy #OFFSET_STRUCT_PROCESSINGSPRITE_STATUS sta (processing),y - //SEG522 [313] (byte~) processChars::$33 ← (byte) $ff ^ (byte) processChars::bitmask#0 -- vbuaa=vbuc1_bxor_vbuz1 + //SEG501 [302] (byte~) processChars::$33 ← (byte) $ff ^ (byte) processChars::bitmask#0 -- vbuaa=vbuc1_bxor_vbuz1 lda #$ff eor bitmask - //SEG523 [314] *((const byte*) SPRITES_ENABLE#0) ← *((const byte*) SPRITES_ENABLE#0) & (byte~) processChars::$33 -- _deref_pbuc1=_deref_pbuc1_band_vbuaa + //SEG502 [303] *((const byte*) SPRITES_ENABLE#0) ← *((const byte*) SPRITES_ENABLE#0) & (byte~) processChars::$33 -- _deref_pbuc1=_deref_pbuc1_band_vbuaa // Disable the sprite and SPRITES_ENABLE sta SPRITES_ENABLE jmp b7 - //SEG524 processChars::@4 + //SEG503 processChars::@4 b4: - //SEG525 [315] *((const byte*) SPRITES_XMSB#0) ← *((const byte*) SPRITES_XMSB#0) | (byte) processChars::bitmask#0 -- _deref_pbuc1=_deref_pbuc1_bor_vbuz1 + //SEG504 [304] *((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 } -//SEG526 irqTop +//SEG505 irqTop // Raster Interrupt at the top of the screen irqTop: { - //SEG527 entry interrupt(HARDWARE_ALL) + //SEG506 entry interrupt(HARDWARE_ALL) sta rega+1 stx regx+1 sty regy+1 jmp b1 - //SEG528 irqTop::@1 + //SEG507 irqTop::@1 b1: - //SEG529 [317] *((const byte*) RASTER#0) ← (const byte) RASTER_IRQ_MIDDLE#0 -- _deref_pbuc1=vbuc2 + //SEG508 [306] *((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 - //SEG530 [318] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_ALL)(void()) irqBottom() -- _deref_pptc1=pprc2 + //SEG509 [307] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_ALL)(void()) irqBottom() -- _deref_pptc1=pprc2 lda #irqBottom sta HARDWARE_IRQ+1 - //SEG531 [319] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 + //SEG510 [308] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 // Acknowledge the IRQ lda #IRQ_RASTER sta IRQ_STATUS jmp breturn - //SEG532 irqTop::@return + //SEG511 irqTop::@return breturn: - //SEG533 [320] return - exit interrupt(HARDWARE_ALL) + //SEG512 [309] return - exit interrupt(HARDWARE_ALL) rega: lda #00 regx: @@ -10983,7 +10225,12 @@ irqTop: { ldy #00 rti } -//SEG534 File Data +//SEG513 File Data + // Angles representing ATAN(0.5), ATAN(0.25), ATAN(0.125), ... +CORDIC_ATAN2_ANGLES_16: +.for (var i=0; i@1] //SEG5 @1 //SEG6 [2] call malloc -//SEG7 [254] phi from @1 to malloc [phi:@1->malloc] -//SEG8 [254] phi (word) malloc::size#3 = (word) $3e8 [phi:@1->malloc#0] -- vwuz1=vwuc1 - lda #<$3e8 - sta malloc.size - lda #>$3e8 - sta malloc.size+1 -//SEG9 [254] phi (byte*) heap_head#12 = (const byte*) HEAP_START#0 [phi:@1->malloc#1] -- pbuz1=pbuc1 +//SEG7 [243] phi from @1 to malloc [phi:@1->malloc] +//SEG8 [243] phi (byte*) heap_head#5 = (const byte*) HEAP_START#0 [phi:@1->malloc#0] -- pbuz1=pbuc1 lda #HEAP_START sta heap_head+1 jsr malloc -//SEG10 @3 -//SEG11 [3] (void*) SCREEN_COPY#0 ← (void*)(byte*) malloc::mem#0 -- pvoz1=pvoz2 +//SEG9 @3 +//SEG10 [3] (void*) SCREEN_COPY#0 ← (void*)(byte*) malloc::mem#0 -- pvoz1=pvoz2 lda malloc.mem sta SCREEN_COPY lda malloc.mem+1 sta SCREEN_COPY+1 -//SEG12 [4] call malloc -//SEG13 [254] phi from @3 to malloc [phi:@3->malloc] -//SEG14 [254] phi (word) malloc::size#3 = (word) $3e8 [phi:@3->malloc#0] -- vwuz1=vwuc1 - lda #<$3e8 - sta malloc.size - lda #>$3e8 - sta malloc.size+1 -//SEG15 [254] phi (byte*) heap_head#12 = (byte*) heap_head#1 [phi:@3->malloc#1] -- register_copy +//SEG11 [4] call malloc +//SEG12 [243] phi from @3 to malloc [phi:@3->malloc] +//SEG13 [243] phi (byte*) heap_head#5 = (byte*) heap_head#1 [phi:@3->malloc#0] -- register_copy jsr malloc -//SEG16 @4 -//SEG17 [5] (void*) SCREEN_DIST#0 ← (void*)(byte*) malloc::mem#0 -- pvoz1=pvoz2 - lda malloc.mem - sta SCREEN_DIST - lda malloc.mem+1 - sta SCREEN_DIST+1 -//SEG18 [6] phi from @4 to @2 [phi:@4->@2] -//SEG19 @2 -//SEG20 [7] call main +//SEG14 @4 +//SEG15 [5] (void*) SCREEN_DIST#0 ← (void*)(byte*) malloc::mem#0 +//SEG16 [6] phi from @4 to @2 [phi:@4->@2] +//SEG17 @2 +//SEG18 [7] call main jsr main rts -//SEG21 [8] phi from @2 to @end [phi:@2->@end] -//SEG22 @end -//SEG23 main +//SEG19 [8] phi from @2 to @end [phi:@2->@end] +//SEG20 @end +//SEG21 main main: { .label dst = 4 .label src = 2 .label i = 6 - .label center_y = $2d - //SEG24 [9] (byte*) init_dist_screen::screen#0 ← (byte*)(void*) SCREEN_DIST#0 -- pbuz1=pbuz2 + .label center_y = $2f + //SEG22 [9] (byte*) init_angle_screen::screen#0 ← (byte*)(void*) SCREEN_DIST#0 -- pbuz1=pbuz2 lda SCREEN_DIST - sta init_dist_screen.screen + sta init_angle_screen.screen lda SCREEN_DIST+1 - sta init_dist_screen.screen+1 - //SEG25 [10] call init_dist_screen - //SEG26 [169] phi from main to init_dist_screen [phi:main->init_dist_screen] - jsr init_dist_screen - //SEG27 main::@8 - //SEG28 [11] (byte*) main::dst#0 ← (byte*)(void*) SCREEN_COPY#0 -- pbuz1=pbuz2 + sta init_angle_screen.screen+1 + //SEG23 [10] call init_angle_screen + jsr init_angle_screen + //SEG24 main::@8 + //SEG25 [11] (byte*) main::dst#0 ← (byte*)(void*) SCREEN_COPY#0 -- pbuz1=pbuz2 lda SCREEN_COPY sta dst lda SCREEN_COPY+1 sta dst+1 - //SEG29 [12] phi from main::@8 to main::@1 [phi:main::@8->main::@1] - //SEG30 [12] phi (byte*) main::dst#2 = (byte*) main::dst#0 [phi:main::@8->main::@1#0] -- register_copy - //SEG31 [12] phi (byte*) main::src#2 = (const byte*) SCREEN#0 [phi:main::@8->main::@1#1] -- pbuz1=pbuc1 + //SEG26 [12] phi from main::@8 to main::@1 [phi:main::@8->main::@1] + //SEG27 [12] phi (byte*) main::dst#2 = (byte*) main::dst#0 [phi:main::@8->main::@1#0] -- register_copy + //SEG28 [12] phi (byte*) main::src#2 = (const byte*) SCREEN#0 [phi:main::@8->main::@1#1] -- pbuz1=pbuc1 lda #SCREEN sta src+1 // Copy screen to screen copy - //SEG32 [12] phi from main::@1 to main::@1 [phi:main::@1->main::@1] - //SEG33 [12] phi (byte*) main::dst#2 = (byte*) main::dst#1 [phi:main::@1->main::@1#0] -- register_copy - //SEG34 [12] phi (byte*) main::src#2 = (byte*) main::src#1 [phi:main::@1->main::@1#1] -- register_copy - //SEG35 main::@1 + //SEG29 [12] phi from main::@1 to main::@1 [phi:main::@1->main::@1] + //SEG30 [12] phi (byte*) main::dst#2 = (byte*) main::dst#1 [phi:main::@1->main::@1#0] -- register_copy + //SEG31 [12] phi (byte*) main::src#2 = (byte*) main::src#1 [phi:main::@1->main::@1#1] -- register_copy + //SEG32 main::@1 b1: - //SEG36 [13] *((byte*) main::dst#2) ← *((byte*) main::src#2) -- _deref_pbuz1=_deref_pbuz2 + //SEG33 [13] *((byte*) main::dst#2) ← *((byte*) main::src#2) -- _deref_pbuz1=_deref_pbuz2 ldy #0 lda (src),y sta (dst),y - //SEG37 [14] (byte*) main::src#1 ← ++ (byte*) main::src#2 -- pbuz1=_inc_pbuz1 + //SEG34 [14] (byte*) main::src#1 ← ++ (byte*) main::src#2 -- pbuz1=_inc_pbuz1 inc src bne !+ inc src+1 !: - //SEG38 [15] (byte*) main::dst#1 ← ++ (byte*) main::dst#2 -- pbuz1=_inc_pbuz1 + //SEG35 [15] (byte*) main::dst#1 ← ++ (byte*) main::dst#2 -- pbuz1=_inc_pbuz1 inc dst bne !+ inc dst+1 !: - //SEG39 [16] if((byte*) main::src#1!=(const byte*) SCREEN#0+(word) $3e8) goto main::@1 -- pbuz1_neq_pbuc1_then_la1 + //SEG36 [16] if((byte*) main::src#1!=(const byte*) SCREEN#0+(word) $3e8) goto main::@1 -- pbuz1_neq_pbuc1_then_la1 lda src+1 cmp #>SCREEN+$3e8 bne b1 lda src cmp #main::@2] - //SEG41 [17] phi (byte) main::i#2 = (byte) 0 [phi:main::@1->main::@2#0] -- vbuz1=vbuc1 + //SEG37 [17] phi from main::@1 to main::@2 [phi:main::@1->main::@2] + //SEG38 [17] phi (byte) main::i#2 = (byte) 0 [phi:main::@1->main::@2#0] -- vbuz1=vbuc1 lda #0 sta i // Init processing array - //SEG42 [17] phi from main::@2 to main::@2 [phi:main::@2->main::@2] - //SEG43 [17] phi (byte) main::i#2 = (byte) main::i#1 [phi:main::@2->main::@2#0] -- register_copy - //SEG44 main::@2 + //SEG39 [17] phi from main::@2 to main::@2 [phi:main::@2->main::@2] + //SEG40 [17] phi (byte) main::i#2 = (byte) main::i#1 [phi:main::@2->main::@2#0] -- register_copy + //SEG41 main::@2 b2: - //SEG45 [18] (byte) main::$26 ← (byte) main::i#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 + //SEG42 [18] (byte) main::$26 ← (byte) main::i#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 lda i asl - //SEG46 [19] (byte) main::$27 ← (byte) main::$26 + (byte) main::i#2 -- vbuaa=vbuaa_plus_vbuz1 + //SEG43 [19] (byte) main::$27 ← (byte) main::$26 + (byte) main::i#2 -- vbuaa=vbuaa_plus_vbuz1 clc adc i - //SEG47 [20] (byte) main::$28 ← (byte) main::$27 << (byte) 1 -- vbuaa=vbuaa_rol_1 + //SEG44 [20] (byte) main::$28 ← (byte) main::$27 << (byte) 1 -- vbuaa=vbuaa_rol_1 asl - //SEG48 [21] (byte) main::$29 ← (byte) main::$28 + (byte) main::i#2 -- vbuaa=vbuaa_plus_vbuz1 + //SEG45 [21] (byte) main::$29 ← (byte) main::$28 + (byte) main::i#2 -- vbuaa=vbuaa_plus_vbuz1 clc adc i - //SEG49 [22] (byte~) main::$16 ← (byte) main::$29 << (byte) 1 -- vbuxx=vbuaa_rol_1 + //SEG46 [22] (byte~) main::$16 ← (byte) main::$29 << (byte) 1 -- vbuxx=vbuaa_rol_1 asl tax - //SEG50 [23] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (byte~) main::$16) ← (byte) 0 -- pwuc1_derefidx_vbuxx=vbuc2 + //SEG47 [23] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (byte~) main::$16) ← (byte) 0 -- pwuc1_derefidx_vbuxx=vbuc2 lda #0 sta PROCESSING,x sta PROCESSING+1,x - //SEG51 [24] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y + (byte~) main::$16) ← (byte) 0 -- pwuc1_derefidx_vbuxx=vbuc2 + //SEG48 [24] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y + (byte~) main::$16) ← (byte) 0 -- pwuc1_derefidx_vbuxx=vbuc2 sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_Y,x sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_Y+1,x - //SEG52 [25] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX + (byte~) main::$16) ← (byte) 0 -- pwuc1_derefidx_vbuxx=vbuc2 + //SEG49 [25] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX + (byte~) main::$16) ← (byte) 0 -- pwuc1_derefidx_vbuxx=vbuc2 sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_VX,x sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_VX+1,x - //SEG53 [26] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY + (byte~) main::$16) ← (byte) 0 -- pwuc1_derefidx_vbuxx=vbuc2 + //SEG50 [26] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY + (byte~) main::$16) ← (byte) 0 -- pwuc1_derefidx_vbuxx=vbuc2 sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_VY,x sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_VY+1,x - //SEG54 [27] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID + (byte~) main::$16) ← (byte) 0 -- pbuc1_derefidx_vbuxx=vbuc2 + //SEG51 [27] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID + (byte~) main::$16) ← (byte) 0 -- pbuc1_derefidx_vbuxx=vbuc2 sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_ID,x - //SEG55 [28] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR + (byte~) main::$16) ← (byte) 0 -- pbuc1_derefidx_vbuxx=vbuc2 + //SEG52 [28] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR + (byte~) main::$16) ← (byte) 0 -- pbuc1_derefidx_vbuxx=vbuc2 sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_PTR,x - //SEG56 [29] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_COL + (byte~) main::$16) ← (byte) 0 -- pbuc1_derefidx_vbuxx=vbuc2 + //SEG53 [29] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_COL + (byte~) main::$16) ← (byte) 0 -- pbuc1_derefidx_vbuxx=vbuc2 sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_COL,x - //SEG57 [30] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS + (byte~) main::$16) ← (const byte) STATUS_FREE -- pbuc1_derefidx_vbuxx=vbuc2 + //SEG54 [30] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS + (byte~) main::$16) ← (const byte) STATUS_FREE -- pbuc1_derefidx_vbuxx=vbuc2 lda #STATUS_FREE sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_STATUS,x - //SEG58 [31] *((byte**)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR + (byte~) main::$16) ← (byte*) 0 -- pptc1_derefidx_vbuxx=pbuc2 + //SEG55 [31] *((byte**)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR + (byte~) main::$16) ← (byte*) 0 -- pptc1_derefidx_vbuxx=pbuc2 lda #<0 sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR,x sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR+1,x - //SEG59 [32] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuz1=_inc_vbuz1 + //SEG56 [32] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuz1=_inc_vbuz1 inc i - //SEG60 [33] if((byte) main::i#1!=(const byte) NUM_PROCESSING#0-(byte) 1+(byte) 1) goto main::@2 -- vbuz1_neq_vbuc1_then_la1 + //SEG57 [33] if((byte) main::i#1!=(const byte) NUM_PROCESSING#0-(byte) 1+(byte) 1) goto main::@2 -- vbuz1_neq_vbuc1_then_la1 lda #NUM_PROCESSING-1+1 cmp i bne b2 - //SEG61 [34] phi from main::@2 to main::@3 [phi:main::@2->main::@3] - //SEG62 main::@3 - //SEG63 [35] call initSprites - //SEG64 [156] phi from main::@3 to initSprites [phi:main::@3->initSprites] + //SEG58 [34] phi from main::@2 to main::@3 [phi:main::@2->main::@3] + //SEG59 main::@3 + //SEG60 [35] call initSprites + //SEG61 [156] phi from main::@3 to initSprites [phi:main::@3->initSprites] jsr initSprites - //SEG65 [36] phi from main::@3 to main::@9 [phi:main::@3->main::@9] - //SEG66 main::@9 - //SEG67 [37] call setupRasterIrq + //SEG62 [36] phi from main::@3 to main::@9 [phi:main::@3->main::@9] + //SEG63 main::@9 + //SEG64 [37] call setupRasterIrq jsr setupRasterIrq - //SEG68 [38] phi from main::@5 main::@9 to main::@4 [phi:main::@5/main::@9->main::@4] + //SEG65 [38] phi from main::@5 main::@9 to main::@4 [phi:main::@5/main::@9->main::@4] b3: // Main loop - //SEG69 main::@4 - //SEG70 [39] call getCharToProcess + //SEG66 main::@4 + //SEG67 [39] call getCharToProcess jsr getCharToProcess - //SEG71 [40] (byte) getCharToProcess::return_x#0 ← (byte) getCharToProcess::return_x#1 -- vbuyy=vbuz1 + //SEG68 [40] (byte) getCharToProcess::return_x#0 ← (byte) getCharToProcess::return_x#1 -- vbuyy=vbuz1 ldy getCharToProcess.return_x - //SEG72 [41] (byte) getCharToProcess::return_y#0 ← (byte) getCharToProcess::return_y#1 -- vbuaa=vbuz1 + //SEG69 [41] (byte) getCharToProcess::return_y#0 ← (byte) getCharToProcess::return_y#1 -- vbuaa=vbuz1 lda getCharToProcess.return_y - //SEG73 [42] (byte) getCharToProcess::return_dist#0 ← (byte) getCharToProcess::return_dist#1 - //SEG74 main::@10 - //SEG75 [43] (byte) main::center_x#0 ← (byte) getCharToProcess::return_x#0 - //SEG76 [44] (byte) main::center_y#0 ← (byte) getCharToProcess::return_y#0 -- vbuz1=vbuaa + //SEG70 [42] (byte) getCharToProcess::return_dist#0 ← (byte) getCharToProcess::return_dist#1 + //SEG71 main::@10 + //SEG72 [43] (byte) main::center_x#0 ← (byte) getCharToProcess::return_x#0 + //SEG73 [44] (byte) main::center_y#0 ← (byte) getCharToProcess::return_y#0 -- vbuz1=vbuaa sta center_y - //SEG77 [45] (byte) main::center_dist#0 ← (byte) getCharToProcess::return_dist#0 -- vbuaa=vbuxx + //SEG74 [45] (byte) main::center_dist#0 ← (byte) getCharToProcess::return_dist#0 -- vbuaa=vbuxx txa - //SEG78 [46] if((byte) main::center_dist#0!=(const byte) NOT_FOUND#0) goto main::@5 -- vbuaa_neq_vbuc1_then_la1 + //SEG75 [46] if((byte) main::center_dist#0!=(const byte) NOT_FOUND#0) goto main::@5 -- vbuaa_neq_vbuc1_then_la1 cmp #NOT_FOUND bne b5 - //SEG79 main::@6 - //SEG80 [47] *((const byte*) SCREEN#0+(word) $3e7) ← (byte) '.' -- _deref_pbuc1=vbuc2 + //SEG76 main::@6 + //SEG77 [47] *((const byte*) SCREEN#0+(word) $3e7) ← (byte) '.' -- _deref_pbuc1=vbuc2 lda #'.' sta SCREEN+$3e7 - //SEG81 main::@7 + //SEG78 main::@7 b7: - //SEG82 [48] *((const byte*) COLS#0+(word) $3e7) ← ++ *((const byte*) COLS#0+(word) $3e7) -- _deref_pbuc1=_inc__deref_pbuc1 + //SEG79 [48] *((const byte*) COLS#0+(word) $3e7) ← ++ *((const byte*) COLS#0+(word) $3e7) -- _deref_pbuc1=_inc__deref_pbuc1 inc COLS+$3e7 jmp b7 - //SEG83 main::@5 + //SEG80 main::@5 b5: - //SEG84 [49] (byte) startProcessing::center_x#0 ← (byte) main::center_x#0 -- vbuz1=vbuyy + //SEG81 [49] (byte) startProcessing::center_x#0 ← (byte) main::center_x#0 -- vbuz1=vbuyy sty startProcessing.center_x - //SEG85 [50] (byte) startProcessing::center_y#0 ← (byte) main::center_y#0 - //SEG86 [51] call startProcessing - //SEG87 [52] phi from main::@5 to startProcessing [phi:main::@5->startProcessing] + //SEG82 [50] (byte) startProcessing::center_y#0 ← (byte) main::center_y#0 + //SEG83 [51] call startProcessing + //SEG84 [52] phi from main::@5 to startProcessing [phi:main::@5->startProcessing] jsr startProcessing jmp b3 } -//SEG88 startProcessing +//SEG85 startProcessing // Start processing a char - by inserting it into the PROCESSING array -// startProcessing(byte zeropage($2e) center_x, byte zeropage($2d) center_y) +// startProcessing(byte zeropage($30) center_x, byte zeropage($2f) center_y) startProcessing: { - .label _0 = $2f - .label _1 = $2f + .label _0 = $31 + .label _1 = $31 .label _5 = $a .label _6 = $a .label _8 = 8 .label _9 = 8 - .label _11 = $36 - .label _12 = $36 - .label _13 = $36 - .label _15 = $38 - .label _16 = $38 - .label _17 = $38 - .label _23 = $3b - .label center_x = $2e - .label center_y = $2d + .label _11 = $38 + .label _12 = $38 + .label _13 = $38 + .label _15 = $3a + .label _16 = $3a + .label _17 = $3a + .label _23 = $3d + .label center_x = $30 + .label center_y = $2f .label i = 7 - .label offset = $2f - .label colPtr = $33 - .label spriteCol = $35 - .label screenPtr = $2f + .label offset = $31 + .label colPtr = $35 + .label spriteCol = $37 + .label screenPtr = $31 .label spriteData = $a .label chargenData = 8 - .label spriteX = $36 - .label spriteY = $38 - .label spritePtr = $3a + .label spriteX = $38 + .label spriteY = $3a + .label spritePtr = $3c .label freeIdx = 7 - .label _47 = $31 - .label _48 = $2f - //SEG89 [53] phi from startProcessing to startProcessing::@1 [phi:startProcessing->startProcessing::@1] - //SEG90 [53] phi (byte) startProcessing::freeIdx#6 = (byte) $ff [phi:startProcessing->startProcessing::@1#0] -- vbuxx=vbuc1 + .label _47 = $33 + .label _48 = $31 + //SEG86 [53] phi from startProcessing to startProcessing::@1 [phi:startProcessing->startProcessing::@1] + //SEG87 [53] phi (byte) startProcessing::freeIdx#6 = (byte) $ff [phi:startProcessing->startProcessing::@1#0] -- vbuxx=vbuc1 ldx #$ff - //SEG91 startProcessing::@1 + //SEG88 startProcessing::@1 b1: - //SEG92 [54] phi from startProcessing::@1 to startProcessing::@2 [phi:startProcessing::@1->startProcessing::@2] - //SEG93 [54] phi (byte) startProcessing::i#2 = (byte) 0 [phi:startProcessing::@1->startProcessing::@2#0] -- vbuz1=vbuc1 + //SEG89 [54] phi from startProcessing::@1 to startProcessing::@2 [phi:startProcessing::@1->startProcessing::@2] + //SEG90 [54] phi (byte) startProcessing::i#2 = (byte) 0 [phi:startProcessing::@1->startProcessing::@2#0] -- vbuz1=vbuc1 lda #0 sta i - //SEG94 [54] phi from startProcessing::@3 to startProcessing::@2 [phi:startProcessing::@3->startProcessing::@2] - //SEG95 [54] phi (byte) startProcessing::i#2 = (byte) startProcessing::i#1 [phi:startProcessing::@3->startProcessing::@2#0] -- register_copy - //SEG96 startProcessing::@2 + //SEG91 [54] phi from startProcessing::@3 to startProcessing::@2 [phi:startProcessing::@3->startProcessing::@2] + //SEG92 [54] phi (byte) startProcessing::i#2 = (byte) startProcessing::i#1 [phi:startProcessing::@3->startProcessing::@2#0] -- register_copy + //SEG93 startProcessing::@2 b2: - //SEG97 [55] (byte) startProcessing::$42 ← (byte) startProcessing::i#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 + //SEG94 [55] (byte) startProcessing::$42 ← (byte) startProcessing::i#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 lda i asl - //SEG98 [56] (byte) startProcessing::$43 ← (byte) startProcessing::$42 + (byte) startProcessing::i#2 -- vbuaa=vbuaa_plus_vbuz1 + //SEG95 [56] (byte) startProcessing::$43 ← (byte) startProcessing::$42 + (byte) startProcessing::i#2 -- vbuaa=vbuaa_plus_vbuz1 clc adc i - //SEG99 [57] (byte) startProcessing::$44 ← (byte) startProcessing::$43 << (byte) 1 -- vbuaa=vbuaa_rol_1 + //SEG96 [57] (byte) startProcessing::$44 ← (byte) startProcessing::$43 << (byte) 1 -- vbuaa=vbuaa_rol_1 asl - //SEG100 [58] (byte) startProcessing::$45 ← (byte) startProcessing::$44 + (byte) startProcessing::i#2 -- vbuaa=vbuaa_plus_vbuz1 + //SEG97 [58] (byte) startProcessing::$45 ← (byte) startProcessing::$44 + (byte) startProcessing::i#2 -- vbuaa=vbuaa_plus_vbuz1 clc adc i - //SEG101 [59] (byte~) startProcessing::$30 ← (byte) startProcessing::$45 << (byte) 1 -- vbuaa=vbuaa_rol_1 + //SEG98 [59] (byte~) startProcessing::$30 ← (byte) startProcessing::$45 << (byte) 1 -- vbuaa=vbuaa_rol_1 asl - //SEG102 [60] if(*((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS + (byte~) startProcessing::$30)!=(const byte) STATUS_FREE) goto startProcessing::@3 -- pbuc1_derefidx_vbuaa_neq_vbuc2_then_la1 + //SEG99 [60] if(*((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS + (byte~) startProcessing::$30)!=(const byte) STATUS_FREE) 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: - //SEG103 [61] phi from startProcessing::@2 startProcessing::@9 to startProcessing::@4 [phi:startProcessing::@2/startProcessing::@9->startProcessing::@4] - //SEG104 [61] phi (byte) startProcessing::freeIdx#2 = (byte) startProcessing::i#2 [phi:startProcessing::@2/startProcessing::@9->startProcessing::@4#0] -- register_copy - //SEG105 startProcessing::@4 + //SEG100 [61] phi from startProcessing::@2 startProcessing::@9 to startProcessing::@4 [phi:startProcessing::@2/startProcessing::@9->startProcessing::@4] + //SEG101 [61] phi (byte) startProcessing::freeIdx#2 = (byte) startProcessing::i#2 [phi:startProcessing::@2/startProcessing::@9->startProcessing::@4#0] -- register_copy + //SEG102 startProcessing::@4 b4: - //SEG106 [62] if((byte) startProcessing::freeIdx#2==(byte) $ff) goto startProcessing::@8 -- vbuz1_eq_vbuc1_then_la1 + //SEG103 [62] if((byte) startProcessing::freeIdx#2==(byte) $ff) goto startProcessing::@8 -- vbuz1_eq_vbuc1_then_la1 lda #$ff cmp freeIdx bne !b8+ jmp b8 !b8: - //SEG107 startProcessing::@5 - //SEG108 [63] (word~) startProcessing::$0 ← (word)(byte) startProcessing::center_y#0 -- vwuz1=_word_vbuz2 + //SEG104 startProcessing::@5 + //SEG105 [63] (word~) startProcessing::$0 ← (word)(byte) startProcessing::center_y#0 -- vwuz1=_word_vbuz2 lda center_y sta _0 lda #0 sta _0+1 - //SEG109 [64] (word) startProcessing::$47 ← (word~) startProcessing::$0 << (byte) 2 -- vwuz1=vwuz2_rol_2 + //SEG106 [64] (word) startProcessing::$47 ← (word~) startProcessing::$0 << (byte) 2 -- vwuz1=vwuz2_rol_2 lda _0 asl sta _47 @@ -12307,7 +11510,7 @@ startProcessing: { sta _47+1 asl _47 rol _47+1 - //SEG110 [65] (word) startProcessing::$48 ← (word) startProcessing::$47 + (word~) startProcessing::$0 -- vwuz1=vwuz2_plus_vwuz1 + //SEG107 [65] (word) startProcessing::$48 ← (word) startProcessing::$47 + (word~) startProcessing::$0 -- vwuz1=vwuz2_plus_vwuz1 lda _48 clc adc _47 @@ -12315,14 +11518,14 @@ startProcessing: { lda _48+1 adc _47+1 sta _48+1 - //SEG111 [66] (word~) startProcessing::$1 ← (word) startProcessing::$48 << (byte) 3 -- vwuz1=vwuz1_rol_3 + //SEG108 [66] (word~) startProcessing::$1 ← (word) startProcessing::$48 << (byte) 3 -- vwuz1=vwuz1_rol_3 asl _1 rol _1+1 asl _1 rol _1+1 asl _1 rol _1+1 - //SEG112 [67] (word) startProcessing::offset#0 ← (word~) startProcessing::$1 + (byte) startProcessing::center_x#0 -- vwuz1=vwuz1_plus_vbuz2 + //SEG109 [67] (word) startProcessing::offset#0 ← (word~) startProcessing::$1 + (byte) startProcessing::center_x#0 -- vwuz1=vwuz1_plus_vbuz2 lda center_x clc adc offset @@ -12330,7 +11533,7 @@ startProcessing: { bcc !+ inc offset+1 !: - //SEG113 [68] (byte*) startProcessing::colPtr#0 ← (const byte*) COLS#0 + (word) startProcessing::offset#0 -- pbuz1=pbuc1_plus_vwuz2 + //SEG110 [68] (byte*) startProcessing::colPtr#0 ← (const byte*) COLS#0 + (word) startProcessing::offset#0 -- pbuz1=pbuc1_plus_vwuz2 lda offset clc adc #COLS sta colPtr+1 - //SEG114 [69] (byte) startProcessing::spriteCol#0 ← *((byte*) startProcessing::colPtr#0) -- vbuz1=_deref_pbuz2 + //SEG111 [69] (byte) startProcessing::spriteCol#0 ← *((byte*) startProcessing::colPtr#0) -- vbuz1=_deref_pbuz2 ldy #0 lda (colPtr),y sta spriteCol - //SEG115 [70] (byte*) startProcessing::screenPtr#0 ← (const byte*) SCREEN#0 + (word) startProcessing::offset#0 -- pbuz1=pbuc1_plus_vwuz1 + //SEG112 [70] (byte*) startProcessing::screenPtr#0 ← (const byte*) SCREEN#0 + (word) startProcessing::offset#0 -- pbuz1=pbuc1_plus_vwuz1 clc lda screenPtr adc #SCREEN sta screenPtr+1 - //SEG116 [71] (word~) startProcessing::$5 ← (word)(byte) startProcessing::freeIdx#2 -- vwuz1=_word_vbuz2 + //SEG113 [71] (word~) startProcessing::$5 ← (word)(byte) startProcessing::freeIdx#2 -- vwuz1=_word_vbuz2 lda freeIdx sta _5 tya sta _5+1 - //SEG117 [72] (word~) startProcessing::$6 ← (word~) startProcessing::$5 << (byte) 6 -- vwuz1=vwuz1_rol_6 + //SEG114 [72] (word~) startProcessing::$6 ← (word~) startProcessing::$5 << (byte) 6 -- vwuz1=vwuz1_rol_6 asl _6 rol _6+1 asl _6 @@ -12368,7 +11571,7 @@ startProcessing: { rol _6+1 asl _6 rol _6+1 - //SEG118 [73] (byte*) startProcessing::spriteData#0 ← (const byte*) SPRITE_DATA#0 + (word~) startProcessing::$6 -- pbuz1=pbuc1_plus_vwuz1 + //SEG115 [73] (byte*) startProcessing::spriteData#0 ← (const byte*) SPRITE_DATA#0 + (word~) startProcessing::$6 -- pbuz1=pbuc1_plus_vwuz1 clc lda spriteData adc #SPRITE_DATA sta spriteData+1 - //SEG119 [74] (byte) startProcessing::ch#0 ← *((byte*) startProcessing::screenPtr#0) -- vbuaa=_deref_pbuz1 + //SEG116 [74] (byte) startProcessing::ch#0 ← *((byte*) startProcessing::screenPtr#0) -- vbuaa=_deref_pbuz1 lda (screenPtr),y - //SEG120 [75] (word~) startProcessing::$8 ← (word)(byte) startProcessing::ch#0 -- vwuz1=_word_vbuaa + //SEG117 [75] (word~) startProcessing::$8 ← (word)(byte) startProcessing::ch#0 -- vwuz1=_word_vbuaa sta _8 tya sta _8+1 - //SEG121 [76] (word~) startProcessing::$9 ← (word~) startProcessing::$8 << (byte) 3 -- vwuz1=vwuz1_rol_3 + //SEG118 [76] (word~) startProcessing::$9 ← (word~) startProcessing::$8 << (byte) 3 -- vwuz1=vwuz1_rol_3 asl _9 rol _9+1 asl _9 rol _9+1 asl _9 rol _9+1 - //SEG122 [77] (byte*) startProcessing::chargenData#0 ← (const byte*) CHARGEN#0 + (word~) startProcessing::$9 -- pbuz1=pbuc1_plus_vwuz1 + //SEG119 [77] (byte*) startProcessing::chargenData#0 ← (const byte*) CHARGEN#0 + (word~) startProcessing::$9 -- pbuz1=pbuc1_plus_vwuz1 clc lda chargenData adc #CHARGEN sta chargenData+1 - //SEG123 asm { sei } + //SEG120 asm { sei } sei - //SEG124 [79] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_CHARROM#0 -- _deref_pbuc1=vbuc2 + //SEG121 [79] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_CHARROM#0 -- _deref_pbuc1=vbuc2 lda #PROCPORT_RAM_CHARROM sta PROCPORT - //SEG125 [80] phi from startProcessing::@5 to startProcessing::@6 [phi:startProcessing::@5->startProcessing::@6] - //SEG126 [80] phi (byte) startProcessing::i1#2 = (byte) 0 [phi:startProcessing::@5->startProcessing::@6#0] -- vbuxx=vbuc1 + //SEG122 [80] phi from startProcessing::@5 to startProcessing::@6 [phi:startProcessing::@5->startProcessing::@6] + //SEG123 [80] phi (byte) startProcessing::i1#2 = (byte) 0 [phi:startProcessing::@5->startProcessing::@6#0] -- vbuxx=vbuc1 ldx #0 - //SEG127 [80] phi (byte*) startProcessing::spriteData#2 = (byte*) startProcessing::spriteData#0 [phi:startProcessing::@5->startProcessing::@6#1] -- register_copy - //SEG128 [80] phi (byte*) startProcessing::chargenData#2 = (byte*) startProcessing::chargenData#0 [phi:startProcessing::@5->startProcessing::@6#2] -- register_copy - //SEG129 [80] phi from startProcessing::@6 to startProcessing::@6 [phi:startProcessing::@6->startProcessing::@6] - //SEG130 [80] phi (byte) startProcessing::i1#2 = (byte) startProcessing::i1#1 [phi:startProcessing::@6->startProcessing::@6#0] -- register_copy - //SEG131 [80] phi (byte*) startProcessing::spriteData#2 = (byte*) startProcessing::spriteData#1 [phi:startProcessing::@6->startProcessing::@6#1] -- register_copy - //SEG132 [80] phi (byte*) startProcessing::chargenData#2 = (byte*) startProcessing::chargenData#1 [phi:startProcessing::@6->startProcessing::@6#2] -- register_copy - //SEG133 startProcessing::@6 + //SEG124 [80] phi (byte*) startProcessing::spriteData#2 = (byte*) startProcessing::spriteData#0 [phi:startProcessing::@5->startProcessing::@6#1] -- register_copy + //SEG125 [80] phi (byte*) startProcessing::chargenData#2 = (byte*) startProcessing::chargenData#0 [phi:startProcessing::@5->startProcessing::@6#2] -- register_copy + //SEG126 [80] phi from startProcessing::@6 to startProcessing::@6 [phi:startProcessing::@6->startProcessing::@6] + //SEG127 [80] phi (byte) startProcessing::i1#2 = (byte) startProcessing::i1#1 [phi:startProcessing::@6->startProcessing::@6#0] -- register_copy + //SEG128 [80] phi (byte*) startProcessing::spriteData#2 = (byte*) startProcessing::spriteData#1 [phi:startProcessing::@6->startProcessing::@6#1] -- register_copy + //SEG129 [80] phi (byte*) startProcessing::chargenData#2 = (byte*) startProcessing::chargenData#1 [phi:startProcessing::@6->startProcessing::@6#2] -- register_copy + //SEG130 startProcessing::@6 b6: - //SEG134 [81] *((byte*) startProcessing::spriteData#2) ← *((byte*) startProcessing::chargenData#2) -- _deref_pbuz1=_deref_pbuz2 + //SEG131 [81] *((byte*) startProcessing::spriteData#2) ← *((byte*) startProcessing::chargenData#2) -- _deref_pbuz1=_deref_pbuz2 ldy #0 lda (chargenData),y sta (spriteData),y - //SEG135 [82] (byte*) startProcessing::spriteData#1 ← (byte*) startProcessing::spriteData#2 + (byte) 3 -- pbuz1=pbuz1_plus_vbuc1 + //SEG132 [82] (byte*) startProcessing::spriteData#1 ← (byte*) startProcessing::spriteData#2 + (byte) 3 -- pbuz1=pbuz1_plus_vbuc1 lda #3 clc adc spriteData @@ -12425,35 +11628,35 @@ startProcessing: { bcc !+ inc spriteData+1 !: - //SEG136 [83] (byte*) startProcessing::chargenData#1 ← ++ (byte*) startProcessing::chargenData#2 -- pbuz1=_inc_pbuz1 + //SEG133 [83] (byte*) startProcessing::chargenData#1 ← ++ (byte*) startProcessing::chargenData#2 -- pbuz1=_inc_pbuz1 inc chargenData bne !+ inc chargenData+1 !: - //SEG137 [84] (byte) startProcessing::i1#1 ← ++ (byte) startProcessing::i1#2 -- vbuxx=_inc_vbuxx + //SEG134 [84] (byte) startProcessing::i1#1 ← ++ (byte) startProcessing::i1#2 -- vbuxx=_inc_vbuxx inx - //SEG138 [85] if((byte) startProcessing::i1#1!=(byte) 8) goto startProcessing::@6 -- vbuxx_neq_vbuc1_then_la1 + //SEG135 [85] if((byte) startProcessing::i1#1!=(byte) 8) goto startProcessing::@6 -- vbuxx_neq_vbuc1_then_la1 cpx #8 bne b6 - //SEG139 startProcessing::@7 - //SEG140 [86] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 -- _deref_pbuc1=vbuc2 + //SEG136 startProcessing::@7 + //SEG137 [86] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 -- _deref_pbuc1=vbuc2 lda #PROCPORT_RAM_IO sta PROCPORT - //SEG141 asm { cli } + //SEG138 asm { cli } cli - //SEG142 [88] (word~) startProcessing::$11 ← (word)(byte) startProcessing::center_x#0 -- vwuz1=_word_vbuz2 + //SEG139 [88] (word~) startProcessing::$11 ← (word)(byte) startProcessing::center_x#0 -- vwuz1=_word_vbuz2 lda center_x sta _11 lda #0 sta _11+1 - //SEG143 [89] (word~) startProcessing::$12 ← (word~) startProcessing::$11 << (byte) 3 -- vwuz1=vwuz1_rol_3 + //SEG140 [89] (word~) startProcessing::$12 ← (word~) startProcessing::$11 << (byte) 3 -- vwuz1=vwuz1_rol_3 asl _12 rol _12+1 asl _12 rol _12+1 asl _12 rol _12+1 - //SEG144 [90] (word~) startProcessing::$13 ← (const byte) BORDER_XPOS_LEFT#0 + (word~) startProcessing::$12 -- vwuz1=vbuc1_plus_vwuz1 + //SEG141 [90] (word~) startProcessing::$13 ← (const byte) BORDER_XPOS_LEFT#0 + (word~) startProcessing::$12 -- vwuz1=vbuc1_plus_vwuz1 lda #BORDER_XPOS_LEFT clc adc _13 @@ -12461,7 +11664,7 @@ startProcessing: { bcc !+ inc _13+1 !: - //SEG145 [91] (word) startProcessing::spriteX#0 ← (word~) startProcessing::$13 << (byte) 4 -- vwuz1=vwuz1_rol_4 + //SEG142 [91] (word) startProcessing::spriteX#0 ← (word~) startProcessing::$13 << (byte) 4 -- vwuz1=vwuz1_rol_4 asl spriteX rol spriteX+1 asl spriteX @@ -12470,19 +11673,19 @@ startProcessing: { rol spriteX+1 asl spriteX rol spriteX+1 - //SEG146 [92] (word~) startProcessing::$15 ← (word)(byte) startProcessing::center_y#0 -- vwuz1=_word_vbuz2 + //SEG143 [92] (word~) startProcessing::$15 ← (word)(byte) startProcessing::center_y#0 -- vwuz1=_word_vbuz2 lda center_y sta _15 lda #0 sta _15+1 - //SEG147 [93] (word~) startProcessing::$16 ← (word~) startProcessing::$15 << (byte) 3 -- vwuz1=vwuz1_rol_3 + //SEG144 [93] (word~) startProcessing::$16 ← (word~) startProcessing::$15 << (byte) 3 -- vwuz1=vwuz1_rol_3 asl _16 rol _16+1 asl _16 rol _16+1 asl _16 rol _16+1 - //SEG148 [94] (word~) startProcessing::$17 ← (const byte) BORDER_YPOS_TOP#0 + (word~) startProcessing::$16 -- vwuz1=vbuc1_plus_vwuz1 + //SEG145 [94] (word~) startProcessing::$17 ← (const byte) BORDER_YPOS_TOP#0 + (word~) startProcessing::$16 -- vwuz1=vbuc1_plus_vwuz1 lda #BORDER_YPOS_TOP clc adc _17 @@ -12490,7 +11693,7 @@ startProcessing: { bcc !+ inc _17+1 !: - //SEG149 [95] (word) startProcessing::spriteY#0 ← (word~) startProcessing::$17 << (byte) 4 -- vwuz1=vwuz1_rol_4 + //SEG146 [95] (word) startProcessing::spriteY#0 ← (word~) startProcessing::$17 << (byte) 4 -- vwuz1=vwuz1_rol_4 asl spriteY rol spriteY+1 asl spriteY @@ -12499,102 +11702,102 @@ startProcessing: { rol spriteY+1 asl spriteY rol spriteY+1 - //SEG150 [96] (byte) startProcessing::spritePtr#0 ← (byte)(const byte*) SPRITE_DATA#0/(byte) $40 + (byte) startProcessing::freeIdx#2 -- vbuz1=vbuc1_plus_vbuz2 + //SEG147 [96] (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 - //SEG151 [97] (byte~) startProcessing::$22 ← (byte) startProcessing::freeIdx#2 << (byte) 3 -- vbuaa=vbuz1_rol_3 + //SEG148 [97] (byte~) startProcessing::$22 ← (byte) startProcessing::freeIdx#2 << (byte) 3 -- vbuaa=vbuz1_rol_3 lda freeIdx asl asl asl - //SEG152 [98] (word~) startProcessing::$23 ← (word)(byte~) startProcessing::$22 -- vwuz1=_word_vbuaa + //SEG149 [98] (word~) startProcessing::$23 ← (word)(byte~) startProcessing::$22 -- vwuz1=_word_vbuaa sta _23 lda #0 sta _23+1 - //SEG153 [99] (byte) startProcessing::$50 ← (byte) startProcessing::freeIdx#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 + //SEG150 [99] (byte) startProcessing::$50 ← (byte) startProcessing::freeIdx#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 lda freeIdx asl - //SEG154 [100] (byte) startProcessing::$51 ← (byte) startProcessing::$50 + (byte) startProcessing::freeIdx#2 -- vbuaa=vbuaa_plus_vbuz1 + //SEG151 [100] (byte) startProcessing::$51 ← (byte) startProcessing::$50 + (byte) startProcessing::freeIdx#2 -- vbuaa=vbuaa_plus_vbuz1 clc adc freeIdx - //SEG155 [101] (byte) startProcessing::$52 ← (byte) startProcessing::$51 << (byte) 1 -- vbuaa=vbuaa_rol_1 + //SEG152 [101] (byte) startProcessing::$52 ← (byte) startProcessing::$51 << (byte) 1 -- vbuaa=vbuaa_rol_1 asl - //SEG156 [102] (byte) startProcessing::$53 ← (byte) startProcessing::$52 + (byte) startProcessing::freeIdx#2 -- vbuaa=vbuaa_plus_vbuz1 + //SEG153 [102] (byte) startProcessing::$53 ← (byte) startProcessing::$52 + (byte) startProcessing::freeIdx#2 -- vbuaa=vbuaa_plus_vbuz1 clc adc freeIdx - //SEG157 [103] (byte~) startProcessing::$31 ← (byte) startProcessing::$53 << (byte) 1 -- vbuxx=vbuaa_rol_1 + //SEG154 [103] (byte~) startProcessing::$31 ← (byte) startProcessing::$53 << (byte) 1 -- vbuxx=vbuaa_rol_1 asl tax - //SEG158 [104] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (byte~) startProcessing::$31) ← (word) startProcessing::spriteX#0 -- pwuc1_derefidx_vbuxx=vwuz1 + //SEG155 [104] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (byte~) startProcessing::$31) ← (word) startProcessing::spriteX#0 -- pwuc1_derefidx_vbuxx=vwuz1 lda spriteX sta PROCESSING,x lda spriteX+1 sta PROCESSING+1,x - //SEG159 [105] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y + (byte~) startProcessing::$31) ← (word) startProcessing::spriteY#0 -- pwuc1_derefidx_vbuxx=vwuz1 + //SEG156 [105] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y + (byte~) startProcessing::$31) ← (word) startProcessing::spriteY#0 -- pwuc1_derefidx_vbuxx=vwuz1 lda spriteY sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_Y,x lda spriteY+1 sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_Y+1,x - //SEG160 [106] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX + (byte~) startProcessing::$31) ← (word~) startProcessing::$23 -- pwuc1_derefidx_vbuxx=vwuz1 + //SEG157 [106] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX + (byte~) startProcessing::$31) ← (word~) startProcessing::$23 -- pwuc1_derefidx_vbuxx=vwuz1 lda _23 sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_VX,x lda _23+1 sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_VX+1,x - //SEG161 [107] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY + (byte~) startProcessing::$31) ← (byte) $3c -- pwuc1_derefidx_vbuxx=vbuc2 + //SEG158 [107] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY + (byte~) startProcessing::$31) ← (byte) $3c -- pwuc1_derefidx_vbuxx=vbuc2 lda #$3c sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_VY,x lda #0 sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_VY+1,x - //SEG162 [108] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID + (byte~) startProcessing::$31) ← (byte) startProcessing::freeIdx#2 -- pbuc1_derefidx_vbuxx=vbuz1 + //SEG159 [108] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID + (byte~) startProcessing::$31) ← (byte) startProcessing::freeIdx#2 -- pbuc1_derefidx_vbuxx=vbuz1 lda freeIdx sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_ID,x - //SEG163 [109] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR + (byte~) startProcessing::$31) ← (byte) startProcessing::spritePtr#0 -- pbuc1_derefidx_vbuxx=vbuz1 + //SEG160 [109] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR + (byte~) startProcessing::$31) ← (byte) startProcessing::spritePtr#0 -- pbuc1_derefidx_vbuxx=vbuz1 lda spritePtr sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_PTR,x - //SEG164 [110] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_COL + (byte~) startProcessing::$31) ← (byte) startProcessing::spriteCol#0 -- pbuc1_derefidx_vbuxx=vbuz1 + //SEG161 [110] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_COL + (byte~) startProcessing::$31) ← (byte) startProcessing::spriteCol#0 -- pbuc1_derefidx_vbuxx=vbuz1 lda spriteCol sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_COL,x - //SEG165 [111] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS + (byte~) startProcessing::$31) ← (const byte) STATUS_NEW -- pbuc1_derefidx_vbuxx=vbuc2 + //SEG162 [111] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS + (byte~) startProcessing::$31) ← (const byte) STATUS_NEW -- pbuc1_derefidx_vbuxx=vbuc2 lda #STATUS_NEW sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_STATUS,x - //SEG166 [112] *((byte**)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR + (byte~) startProcessing::$31) ← (byte*) startProcessing::screenPtr#0 -- pptc1_derefidx_vbuxx=pbuz1 + //SEG163 [112] *((byte**)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR + (byte~) startProcessing::$31) ← (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 - //SEG167 startProcessing::@return - //SEG168 [113] return + //SEG164 startProcessing::@return + //SEG165 [113] return rts - //SEG169 startProcessing::@8 + //SEG166 startProcessing::@8 b8: - //SEG170 [114] (byte~) startProcessing::freeIdx#7 ← (byte) startProcessing::freeIdx#2 -- vbuxx=vbuz1 + //SEG167 [114] (byte~) startProcessing::freeIdx#7 ← (byte) startProcessing::freeIdx#2 -- vbuxx=vbuz1 ldx freeIdx - //SEG171 [53] phi from startProcessing::@8 to startProcessing::@1 [phi:startProcessing::@8->startProcessing::@1] - //SEG172 [53] phi (byte) startProcessing::freeIdx#6 = (byte~) startProcessing::freeIdx#7 [phi:startProcessing::@8->startProcessing::@1#0] -- register_copy + //SEG168 [53] phi from startProcessing::@8 to startProcessing::@1 [phi:startProcessing::@8->startProcessing::@1] + //SEG169 [53] phi (byte) startProcessing::freeIdx#6 = (byte~) startProcessing::freeIdx#7 [phi:startProcessing::@8->startProcessing::@1#0] -- register_copy jmp b1 - //SEG173 startProcessing::@3 + //SEG170 startProcessing::@3 b3: - //SEG174 [115] (byte) startProcessing::i#1 ← ++ (byte) startProcessing::i#2 -- vbuz1=_inc_vbuz1 + //SEG171 [115] (byte) startProcessing::i#1 ← ++ (byte) startProcessing::i#2 -- vbuz1=_inc_vbuz1 inc i - //SEG175 [116] if((byte) startProcessing::i#1!=(const byte) NUM_PROCESSING#0-(byte) 1+(byte) 1) goto startProcessing::@2 -- vbuz1_neq_vbuc1_then_la1 + //SEG172 [116] if((byte) startProcessing::i#1!=(const byte) NUM_PROCESSING#0-(byte) 1+(byte) 1) goto startProcessing::@2 -- vbuz1_neq_vbuc1_then_la1 lda #NUM_PROCESSING-1+1 cmp i beq !b2+ jmp b2 !b2: - //SEG176 startProcessing::@9 - //SEG177 [117] (byte~) startProcessing::freeIdx#8 ← (byte) startProcessing::freeIdx#6 -- vbuz1=vbuxx + //SEG173 startProcessing::@9 + //SEG174 [117] (byte~) startProcessing::freeIdx#8 ← (byte) startProcessing::freeIdx#6 -- vbuz1=vbuxx stx freeIdx jmp b4 } -//SEG178 getCharToProcess +//SEG175 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 _8 = $3d - .label _9 = $3d - .label _10 = $3d + .label _8 = $3f + .label _9 = $3f + .label _10 = $3f .label screen_line = $c .label dist_line = $e .label y = $10 @@ -12603,73 +11806,73 @@ getCharToProcess: { .label closest_dist = $11 .label closest_x = $12 .label closest_y = $13 - .label _12 = $3f - .label _13 = $3d - //SEG179 [118] (byte*) getCharToProcess::screen_line#0 ← (byte*)(void*) SCREEN_COPY#0 -- pbuz1=pbuz2 + .label _12 = $41 + .label _13 = $3f + //SEG176 [118] (byte*) getCharToProcess::screen_line#0 ← (byte*)(void*) SCREEN_COPY#0 -- pbuz1=pbuz2 lda SCREEN_COPY sta screen_line lda SCREEN_COPY+1 sta screen_line+1 - //SEG180 [119] (byte*) getCharToProcess::dist_line#0 ← (byte*)(void*) SCREEN_DIST#0 -- pbuz1=pbuz2 + //SEG177 [119] (byte*) getCharToProcess::dist_line#0 ← (byte*)(void*) SCREEN_DIST#0 -- pbuz1=pbuz2 lda SCREEN_DIST sta dist_line lda SCREEN_DIST+1 sta dist_line+1 - //SEG181 [120] phi from getCharToProcess to getCharToProcess::@1 [phi:getCharToProcess->getCharToProcess::@1] - //SEG182 [120] phi (byte) getCharToProcess::closest_y#9 = (byte) 0 [phi:getCharToProcess->getCharToProcess::@1#0] -- vbuz1=vbuc1 + //SEG178 [120] phi from getCharToProcess to getCharToProcess::@1 [phi:getCharToProcess->getCharToProcess::@1] + //SEG179 [120] phi (byte) getCharToProcess::closest_y#9 = (byte) 0 [phi:getCharToProcess->getCharToProcess::@1#0] -- vbuz1=vbuc1 lda #0 sta closest_y - //SEG183 [120] phi (byte) getCharToProcess::closest_x#9 = (byte) 0 [phi:getCharToProcess->getCharToProcess::@1#1] -- vbuz1=vbuc1 + //SEG180 [120] phi (byte) getCharToProcess::closest_x#9 = (byte) 0 [phi:getCharToProcess->getCharToProcess::@1#1] -- vbuz1=vbuc1 sta closest_x - //SEG184 [120] phi (byte) getCharToProcess::y#7 = (byte) 0 [phi:getCharToProcess->getCharToProcess::@1#2] -- vbuz1=vbuc1 + //SEG181 [120] phi (byte) getCharToProcess::y#7 = (byte) 0 [phi:getCharToProcess->getCharToProcess::@1#2] -- vbuz1=vbuc1 sta y - //SEG185 [120] phi (byte) getCharToProcess::closest_dist#8 = (const byte) NOT_FOUND#0 [phi:getCharToProcess->getCharToProcess::@1#3] -- vbuz1=vbuc1 + //SEG182 [120] phi (byte) getCharToProcess::closest_dist#8 = (const byte) NOT_FOUND#0 [phi:getCharToProcess->getCharToProcess::@1#3] -- vbuz1=vbuc1 lda #NOT_FOUND sta closest_dist - //SEG186 [120] phi (byte*) getCharToProcess::dist_line#6 = (byte*) getCharToProcess::dist_line#0 [phi:getCharToProcess->getCharToProcess::@1#4] -- register_copy - //SEG187 [120] phi (byte*) getCharToProcess::screen_line#4 = (byte*) getCharToProcess::screen_line#0 [phi:getCharToProcess->getCharToProcess::@1#5] -- register_copy - //SEG188 getCharToProcess::@1 + //SEG183 [120] phi (byte*) getCharToProcess::dist_line#6 = (byte*) getCharToProcess::dist_line#0 [phi:getCharToProcess->getCharToProcess::@1#4] -- register_copy + //SEG184 [120] phi (byte*) getCharToProcess::screen_line#4 = (byte*) getCharToProcess::screen_line#0 [phi:getCharToProcess->getCharToProcess::@1#5] -- register_copy + //SEG185 getCharToProcess::@1 b1: - //SEG189 [121] phi from getCharToProcess::@1 to getCharToProcess::@2 [phi:getCharToProcess::@1->getCharToProcess::@2] - //SEG190 [121] phi (byte) getCharToProcess::closest_y#7 = (byte) getCharToProcess::closest_y#9 [phi:getCharToProcess::@1->getCharToProcess::@2#0] -- register_copy - //SEG191 [121] phi (byte) getCharToProcess::closest_x#7 = (byte) getCharToProcess::closest_x#9 [phi:getCharToProcess::@1->getCharToProcess::@2#1] -- register_copy - //SEG192 [121] phi (byte) getCharToProcess::closest_dist#2 = (byte) getCharToProcess::closest_dist#8 [phi:getCharToProcess::@1->getCharToProcess::@2#2] -- register_copy - //SEG193 [121] phi (byte) getCharToProcess::x#2 = (byte) 0 [phi:getCharToProcess::@1->getCharToProcess::@2#3] -- vbuyy=vbuc1 + //SEG186 [121] phi from getCharToProcess::@1 to getCharToProcess::@2 [phi:getCharToProcess::@1->getCharToProcess::@2] + //SEG187 [121] phi (byte) getCharToProcess::closest_y#7 = (byte) getCharToProcess::closest_y#9 [phi:getCharToProcess::@1->getCharToProcess::@2#0] -- register_copy + //SEG188 [121] phi (byte) getCharToProcess::closest_x#7 = (byte) getCharToProcess::closest_x#9 [phi:getCharToProcess::@1->getCharToProcess::@2#1] -- register_copy + //SEG189 [121] phi (byte) getCharToProcess::closest_dist#2 = (byte) getCharToProcess::closest_dist#8 [phi:getCharToProcess::@1->getCharToProcess::@2#2] -- register_copy + //SEG190 [121] phi (byte) getCharToProcess::x#2 = (byte) 0 [phi:getCharToProcess::@1->getCharToProcess::@2#3] -- vbuyy=vbuc1 ldy #0 - //SEG194 getCharToProcess::@2 + //SEG191 getCharToProcess::@2 b2: - //SEG195 [122] if(*((byte*) getCharToProcess::screen_line#4 + (byte) getCharToProcess::x#2)==(byte) ' ') goto getCharToProcess::@11 -- pbuz1_derefidx_vbuyy_eq_vbuc1_then_la1 + //SEG192 [122] if(*((byte*) getCharToProcess::screen_line#4 + (byte) getCharToProcess::x#2)==(byte) ' ') goto getCharToProcess::@11 -- pbuz1_derefidx_vbuyy_eq_vbuc1_then_la1 lda (screen_line),y cmp #' ' bne !b11+ jmp b11 !b11: - //SEG196 getCharToProcess::@4 - //SEG197 [123] (byte) getCharToProcess::dist#0 ← *((byte*) getCharToProcess::dist_line#6 + (byte) getCharToProcess::x#2) -- vbuxx=pbuz1_derefidx_vbuyy + //SEG193 getCharToProcess::@4 + //SEG194 [123] (byte) getCharToProcess::dist#0 ← *((byte*) getCharToProcess::dist_line#6 + (byte) getCharToProcess::x#2) -- vbuxx=pbuz1_derefidx_vbuyy lda (dist_line),y tax - //SEG198 [124] if((byte) getCharToProcess::dist#0>=(byte) getCharToProcess::closest_dist#2) goto getCharToProcess::@12 -- vbuxx_ge_vbuz1_then_la1 + //SEG195 [124] if((byte) getCharToProcess::dist#0>=(byte) getCharToProcess::closest_dist#2) goto getCharToProcess::@12 -- vbuxx_ge_vbuz1_then_la1 cpx closest_dist bcs b12 - //SEG199 getCharToProcess::@5 - //SEG200 [125] (byte~) getCharToProcess::return_x#7 ← (byte) getCharToProcess::x#2 -- vbuz1=vbuyy + //SEG196 getCharToProcess::@5 + //SEG197 [125] (byte~) getCharToProcess::return_x#7 ← (byte) getCharToProcess::x#2 -- vbuz1=vbuyy sty return_x - //SEG201 [126] (byte~) getCharToProcess::return_y#7 ← (byte) getCharToProcess::y#7 -- vbuz1=vbuz2 + //SEG198 [126] (byte~) getCharToProcess::return_y#7 ← (byte) getCharToProcess::y#7 -- vbuz1=vbuz2 lda y sta return_y - //SEG202 [127] phi from getCharToProcess::@11 getCharToProcess::@12 getCharToProcess::@5 to getCharToProcess::@3 [phi:getCharToProcess::@11/getCharToProcess::@12/getCharToProcess::@5->getCharToProcess::@3] - //SEG203 [127] phi (byte) getCharToProcess::return_y#1 = (byte) getCharToProcess::closest_y#7 [phi:getCharToProcess::@11/getCharToProcess::@12/getCharToProcess::@5->getCharToProcess::@3#0] -- register_copy - //SEG204 [127] phi (byte) getCharToProcess::return_x#1 = (byte) getCharToProcess::closest_x#7 [phi:getCharToProcess::@11/getCharToProcess::@12/getCharToProcess::@5->getCharToProcess::@3#1] -- register_copy - //SEG205 [127] phi (byte) getCharToProcess::return_dist#1 = (byte~) getCharToProcess::return_dist#5 [phi:getCharToProcess::@11/getCharToProcess::@12/getCharToProcess::@5->getCharToProcess::@3#2] -- register_copy - //SEG206 getCharToProcess::@3 + //SEG199 [127] phi from getCharToProcess::@11 getCharToProcess::@12 getCharToProcess::@5 to getCharToProcess::@3 [phi:getCharToProcess::@11/getCharToProcess::@12/getCharToProcess::@5->getCharToProcess::@3] + //SEG200 [127] phi (byte) getCharToProcess::return_y#1 = (byte) getCharToProcess::closest_y#7 [phi:getCharToProcess::@11/getCharToProcess::@12/getCharToProcess::@5->getCharToProcess::@3#0] -- register_copy + //SEG201 [127] phi (byte) getCharToProcess::return_x#1 = (byte) getCharToProcess::closest_x#7 [phi:getCharToProcess::@11/getCharToProcess::@12/getCharToProcess::@5->getCharToProcess::@3#1] -- register_copy + //SEG202 [127] phi (byte) getCharToProcess::return_dist#1 = (byte~) getCharToProcess::return_dist#5 [phi:getCharToProcess::@11/getCharToProcess::@12/getCharToProcess::@5->getCharToProcess::@3#2] -- register_copy + //SEG203 getCharToProcess::@3 b3: - //SEG207 [128] (byte) getCharToProcess::x#1 ← ++ (byte) getCharToProcess::x#2 -- vbuyy=_inc_vbuyy + //SEG204 [128] (byte) getCharToProcess::x#1 ← ++ (byte) getCharToProcess::x#2 -- vbuyy=_inc_vbuyy iny - //SEG208 [129] if((byte) getCharToProcess::x#1!=(byte) $28) goto getCharToProcess::@10 -- vbuyy_neq_vbuc1_then_la1 + //SEG205 [129] if((byte) getCharToProcess::x#1!=(byte) $28) goto getCharToProcess::@10 -- vbuyy_neq_vbuc1_then_la1 cpy #$28 bne b10 - //SEG209 getCharToProcess::@6 - //SEG210 [130] (byte*) getCharToProcess::screen_line#1 ← (byte*) getCharToProcess::screen_line#4 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 + //SEG206 getCharToProcess::@6 + //SEG207 [130] (byte*) getCharToProcess::screen_line#1 ← (byte*) getCharToProcess::screen_line#4 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 lda #$28 clc adc screen_line @@ -12677,7 +11880,7 @@ getCharToProcess: { bcc !+ inc screen_line+1 !: - //SEG211 [131] (byte*) getCharToProcess::dist_line#1 ← (byte*) getCharToProcess::dist_line#6 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 + //SEG208 [131] (byte*) getCharToProcess::dist_line#1 ← (byte*) getCharToProcess::dist_line#6 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 lda #$28 clc adc dist_line @@ -12685,23 +11888,23 @@ getCharToProcess: { bcc !+ inc dist_line+1 !: - //SEG212 [132] (byte) getCharToProcess::y#1 ← ++ (byte) getCharToProcess::y#7 -- vbuz1=_inc_vbuz1 + //SEG209 [132] (byte) getCharToProcess::y#1 ← ++ (byte) getCharToProcess::y#7 -- vbuz1=_inc_vbuz1 inc y - //SEG213 [133] if((byte) getCharToProcess::y#1!=(byte) $19) goto getCharToProcess::@9 -- vbuz1_neq_vbuc1_then_la1 + //SEG210 [133] if((byte) getCharToProcess::y#1!=(byte) $19) goto getCharToProcess::@9 -- vbuz1_neq_vbuc1_then_la1 lda #$19 cmp y bne b9 - //SEG214 getCharToProcess::@7 - //SEG215 [134] if((byte) getCharToProcess::return_dist#1==(const byte) NOT_FOUND#0) goto getCharToProcess::@return -- vbuxx_eq_vbuc1_then_la1 + //SEG211 getCharToProcess::@7 + //SEG212 [134] if((byte) getCharToProcess::return_dist#1==(const byte) NOT_FOUND#0) goto getCharToProcess::@return -- vbuxx_eq_vbuc1_then_la1 cpx #NOT_FOUND beq breturn - //SEG216 getCharToProcess::@8 - //SEG217 [135] (word~) getCharToProcess::$8 ← (word)(byte) getCharToProcess::return_y#1 -- vwuz1=_word_vbuz2 + //SEG213 getCharToProcess::@8 + //SEG214 [135] (word~) getCharToProcess::$8 ← (word)(byte) getCharToProcess::return_y#1 -- vwuz1=_word_vbuz2 lda return_y sta _8 lda #0 sta _8+1 - //SEG218 [136] (word) getCharToProcess::$12 ← (word~) getCharToProcess::$8 << (byte) 2 -- vwuz1=vwuz2_rol_2 + //SEG215 [136] (word) getCharToProcess::$12 ← (word~) getCharToProcess::$8 << (byte) 2 -- vwuz1=vwuz2_rol_2 lda _8 asl sta _12 @@ -12710,7 +11913,7 @@ getCharToProcess: { sta _12+1 asl _12 rol _12+1 - //SEG219 [137] (word) getCharToProcess::$13 ← (word) getCharToProcess::$12 + (word~) getCharToProcess::$8 -- vwuz1=vwuz2_plus_vwuz1 + //SEG216 [137] (word) getCharToProcess::$13 ← (word) getCharToProcess::$12 + (word~) getCharToProcess::$8 -- vwuz1=vwuz2_plus_vwuz1 lda _13 clc adc _12 @@ -12718,14 +11921,14 @@ getCharToProcess: { lda _13+1 adc _12+1 sta _13+1 - //SEG220 [138] (word~) getCharToProcess::$9 ← (word) getCharToProcess::$13 << (byte) 3 -- vwuz1=vwuz1_rol_3 + //SEG217 [138] (word~) getCharToProcess::$9 ← (word) getCharToProcess::$13 << (byte) 3 -- vwuz1=vwuz1_rol_3 asl _9 rol _9+1 asl _9 rol _9+1 asl _9 rol _9+1 - //SEG221 [139] (byte*~) getCharToProcess::$10 ← (byte*)(void*) SCREEN_COPY#0 + (word~) getCharToProcess::$9 -- pbuz1=pbuz2_plus_vwuz1 + //SEG218 [139] (byte*~) getCharToProcess::$10 ← (byte*)(void*) SCREEN_COPY#0 + (word~) getCharToProcess::$9 -- pbuz1=pbuz2_plus_vwuz1 lda _10 clc adc SCREEN_COPY @@ -12733,115 +11936,115 @@ getCharToProcess: { lda _10+1 adc SCREEN_COPY+1 sta _10+1 - //SEG222 [140] *((byte*~) getCharToProcess::$10 + (byte) getCharToProcess::return_x#1) ← (byte) ' ' -- pbuz1_derefidx_vbuz2=vbuc1 + //SEG219 [140] *((byte*~) getCharToProcess::$10 + (byte) getCharToProcess::return_x#1) ← (byte) ' ' -- pbuz1_derefidx_vbuz2=vbuc1 // clear the found char on the screen copy lda #' ' ldy return_x sta (_10),y - //SEG223 getCharToProcess::@return + //SEG220 getCharToProcess::@return breturn: - //SEG224 [141] return + //SEG221 [141] return rts - //SEG225 getCharToProcess::@9 + //SEG222 getCharToProcess::@9 b9: - //SEG226 [142] (byte~) getCharToProcess::closest_dist#10 ← (byte) getCharToProcess::return_dist#1 -- vbuz1=vbuxx + //SEG223 [142] (byte~) getCharToProcess::closest_dist#10 ← (byte) getCharToProcess::return_dist#1 -- vbuz1=vbuxx stx closest_dist - //SEG227 [120] phi from getCharToProcess::@9 to getCharToProcess::@1 [phi:getCharToProcess::@9->getCharToProcess::@1] - //SEG228 [120] phi (byte) getCharToProcess::closest_y#9 = (byte) getCharToProcess::return_y#1 [phi:getCharToProcess::@9->getCharToProcess::@1#0] -- register_copy - //SEG229 [120] phi (byte) getCharToProcess::closest_x#9 = (byte) getCharToProcess::return_x#1 [phi:getCharToProcess::@9->getCharToProcess::@1#1] -- register_copy - //SEG230 [120] phi (byte) getCharToProcess::y#7 = (byte) getCharToProcess::y#1 [phi:getCharToProcess::@9->getCharToProcess::@1#2] -- register_copy - //SEG231 [120] phi (byte) getCharToProcess::closest_dist#8 = (byte~) getCharToProcess::closest_dist#10 [phi:getCharToProcess::@9->getCharToProcess::@1#3] -- register_copy - //SEG232 [120] phi (byte*) getCharToProcess::dist_line#6 = (byte*) getCharToProcess::dist_line#1 [phi:getCharToProcess::@9->getCharToProcess::@1#4] -- register_copy - //SEG233 [120] phi (byte*) getCharToProcess::screen_line#4 = (byte*) getCharToProcess::screen_line#1 [phi:getCharToProcess::@9->getCharToProcess::@1#5] -- register_copy + //SEG224 [120] phi from getCharToProcess::@9 to getCharToProcess::@1 [phi:getCharToProcess::@9->getCharToProcess::@1] + //SEG225 [120] phi (byte) getCharToProcess::closest_y#9 = (byte) getCharToProcess::return_y#1 [phi:getCharToProcess::@9->getCharToProcess::@1#0] -- register_copy + //SEG226 [120] phi (byte) getCharToProcess::closest_x#9 = (byte) getCharToProcess::return_x#1 [phi:getCharToProcess::@9->getCharToProcess::@1#1] -- register_copy + //SEG227 [120] phi (byte) getCharToProcess::y#7 = (byte) getCharToProcess::y#1 [phi:getCharToProcess::@9->getCharToProcess::@1#2] -- register_copy + //SEG228 [120] phi (byte) getCharToProcess::closest_dist#8 = (byte~) getCharToProcess::closest_dist#10 [phi:getCharToProcess::@9->getCharToProcess::@1#3] -- register_copy + //SEG229 [120] phi (byte*) getCharToProcess::dist_line#6 = (byte*) getCharToProcess::dist_line#1 [phi:getCharToProcess::@9->getCharToProcess::@1#4] -- register_copy + //SEG230 [120] phi (byte*) getCharToProcess::screen_line#4 = (byte*) getCharToProcess::screen_line#1 [phi:getCharToProcess::@9->getCharToProcess::@1#5] -- register_copy jmp b1 - //SEG234 getCharToProcess::@10 + //SEG231 getCharToProcess::@10 b10: - //SEG235 [143] (byte~) getCharToProcess::closest_dist#12 ← (byte) getCharToProcess::return_dist#1 -- vbuz1=vbuxx + //SEG232 [143] (byte~) getCharToProcess::closest_dist#12 ← (byte) getCharToProcess::return_dist#1 -- vbuz1=vbuxx stx closest_dist - //SEG236 [121] phi from getCharToProcess::@10 to getCharToProcess::@2 [phi:getCharToProcess::@10->getCharToProcess::@2] - //SEG237 [121] phi (byte) getCharToProcess::closest_y#7 = (byte) getCharToProcess::return_y#1 [phi:getCharToProcess::@10->getCharToProcess::@2#0] -- register_copy - //SEG238 [121] phi (byte) getCharToProcess::closest_x#7 = (byte) getCharToProcess::return_x#1 [phi:getCharToProcess::@10->getCharToProcess::@2#1] -- register_copy - //SEG239 [121] phi (byte) getCharToProcess::closest_dist#2 = (byte~) getCharToProcess::closest_dist#12 [phi:getCharToProcess::@10->getCharToProcess::@2#2] -- register_copy - //SEG240 [121] phi (byte) getCharToProcess::x#2 = (byte) getCharToProcess::x#1 [phi:getCharToProcess::@10->getCharToProcess::@2#3] -- register_copy + //SEG233 [121] phi from getCharToProcess::@10 to getCharToProcess::@2 [phi:getCharToProcess::@10->getCharToProcess::@2] + //SEG234 [121] phi (byte) getCharToProcess::closest_y#7 = (byte) getCharToProcess::return_y#1 [phi:getCharToProcess::@10->getCharToProcess::@2#0] -- register_copy + //SEG235 [121] phi (byte) getCharToProcess::closest_x#7 = (byte) getCharToProcess::return_x#1 [phi:getCharToProcess::@10->getCharToProcess::@2#1] -- register_copy + //SEG236 [121] phi (byte) getCharToProcess::closest_dist#2 = (byte~) getCharToProcess::closest_dist#12 [phi:getCharToProcess::@10->getCharToProcess::@2#2] -- register_copy + //SEG237 [121] phi (byte) getCharToProcess::x#2 = (byte) getCharToProcess::x#1 [phi:getCharToProcess::@10->getCharToProcess::@2#3] -- register_copy jmp b2 - //SEG241 getCharToProcess::@12 + //SEG238 getCharToProcess::@12 b12: - //SEG242 [144] (byte~) getCharToProcess::return_dist#6 ← (byte) getCharToProcess::closest_dist#2 -- vbuxx=vbuz1 + //SEG239 [144] (byte~) getCharToProcess::return_dist#6 ← (byte) getCharToProcess::closest_dist#2 -- vbuxx=vbuz1 ldx closest_dist jmp b3 - //SEG243 getCharToProcess::@11 + //SEG240 getCharToProcess::@11 b11: - //SEG244 [145] (byte~) getCharToProcess::return_dist#5 ← (byte) getCharToProcess::closest_dist#2 -- vbuxx=vbuz1 + //SEG241 [145] (byte~) getCharToProcess::return_dist#5 ← (byte) getCharToProcess::closest_dist#2 -- vbuxx=vbuz1 ldx closest_dist jmp b3 } -//SEG245 setupRasterIrq +//SEG242 setupRasterIrq // Setup Raster IRQ setupRasterIrq: { .label irqRoutine = irqTop - //SEG246 asm { sei } + //SEG243 asm { sei } sei - //SEG247 [147] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 -- _deref_pbuc1=vbuc2 + //SEG244 [147] *((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 - //SEG248 [148] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 -- _deref_pbuc1=vbuc2 + //SEG245 [148] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 -- _deref_pbuc1=vbuc2 lda #PROCPORT_RAM_IO sta PROCPORT - //SEG249 [149] *((const byte*) CIA1_INTERRUPT#0) ← (const byte) CIA_INTERRUPT_CLEAR#0 -- _deref_pbuc1=vbuc2 + //SEG246 [149] *((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 - //SEG250 setupRasterIrq::@1 - //SEG251 [150] *((const byte*) VIC_CONTROL#0) ← *((const byte*) VIC_CONTROL#0) & (byte) $7f -- _deref_pbuc1=_deref_pbuc1_band_vbuc2 + //SEG247 setupRasterIrq::@1 + //SEG248 [150] *((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 - //SEG252 setupRasterIrq::@2 - //SEG253 [151] *((const byte*) RASTER#0) ← <(const byte) RASTER_IRQ_TOP#0 -- _deref_pbuc1=vbuc2 + //SEG249 setupRasterIrq::@2 + //SEG250 [151] *((const byte*) RASTER#0) ← <(const byte) RASTER_IRQ_TOP#0 -- _deref_pbuc1=vbuc2 lda #RASTER_IRQ_TOP sta RASTER - //SEG254 [152] *((const byte*) IRQ_ENABLE#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 + //SEG251 [152] *((const byte*) IRQ_ENABLE#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 // Enable Raster Interrupt lda #IRQ_RASTER sta IRQ_ENABLE - //SEG255 [153] *((const void()**) HARDWARE_IRQ#0) ← (const void()*) setupRasterIrq::irqRoutine#0 -- _deref_pptc1=pprc2 + //SEG252 [153] *((const void()**) HARDWARE_IRQ#0) ← (const void()*) setupRasterIrq::irqRoutine#0 -- _deref_pptc1=pprc2 // Set the IRQ routine lda #irqRoutine sta HARDWARE_IRQ+1 - //SEG256 asm { cli } + //SEG253 asm { cli } cli - //SEG257 setupRasterIrq::@return - //SEG258 [155] return + //SEG254 setupRasterIrq::@return + //SEG255 [155] return rts } -//SEG259 initSprites +//SEG256 initSprites // Initialize sprites initSprites: { .label sp = $14 - //SEG260 [157] phi from initSprites to initSprites::@1 [phi:initSprites->initSprites::@1] - //SEG261 [157] phi (byte*) initSprites::sp#2 = (const byte*) SPRITE_DATA#0 [phi:initSprites->initSprites::@1#0] -- pbuz1=pbuc1 + //SEG257 [157] phi from initSprites to initSprites::@1 [phi:initSprites->initSprites::@1] + //SEG258 [157] phi (byte*) initSprites::sp#2 = (const byte*) SPRITE_DATA#0 [phi:initSprites->initSprites::@1#0] -- pbuz1=pbuc1 lda #SPRITE_DATA sta sp+1 // Clear sprite data - //SEG262 [157] phi from initSprites::@1 to initSprites::@1 [phi:initSprites::@1->initSprites::@1] - //SEG263 [157] phi (byte*) initSprites::sp#2 = (byte*) initSprites::sp#1 [phi:initSprites::@1->initSprites::@1#0] -- register_copy - //SEG264 initSprites::@1 + //SEG259 [157] phi from initSprites::@1 to initSprites::@1 [phi:initSprites::@1->initSprites::@1] + //SEG260 [157] phi (byte*) initSprites::sp#2 = (byte*) initSprites::sp#1 [phi:initSprites::@1->initSprites::@1#0] -- register_copy + //SEG261 initSprites::@1 b1: - //SEG265 [158] *((byte*) initSprites::sp#2) ← (byte) 0 -- _deref_pbuz1=vbuc1 + //SEG262 [158] *((byte*) initSprites::sp#2) ← (byte) 0 -- _deref_pbuz1=vbuc1 lda #0 tay sta (sp),y - //SEG266 [159] (byte*) initSprites::sp#1 ← ++ (byte*) initSprites::sp#2 -- pbuz1=_inc_pbuz1 + //SEG263 [159] (byte*) initSprites::sp#1 ← ++ (byte*) initSprites::sp#2 -- pbuz1=_inc_pbuz1 inc sp bne !+ inc sp+1 !: - //SEG267 [160] if((byte*) initSprites::sp#1<(const byte*) SPRITE_DATA#0+(const byte) NUM_PROCESSING#0*(byte) $40) goto initSprites::@1 -- pbuz1_lt_pbuc1_then_la1 + //SEG264 [160] if((byte*) initSprites::sp#1<(const byte*) SPRITE_DATA#0+(const byte) NUM_PROCESSING#0*(byte) $40) goto initSprites::@1 -- pbuz1_lt_pbuc1_then_la1 lda sp+1 cmp #>SPRITE_DATA+NUM_PROCESSING*$40 bcc b1 @@ -12850,511 +12053,509 @@ initSprites: { cmp #initSprites::@2] - //SEG269 [161] phi (byte) initSprites::i#2 = (byte) 0 [phi:initSprites::@1->initSprites::@2#0] -- vbuxx=vbuc1 + //SEG265 [161] phi from initSprites::@1 to initSprites::@2 [phi:initSprites::@1->initSprites::@2] + //SEG266 [161] phi (byte) initSprites::i#2 = (byte) 0 [phi:initSprites::@1->initSprites::@2#0] -- vbuxx=vbuc1 ldx #0 // Initialize sprite registers - //SEG270 [161] phi from initSprites::@2 to initSprites::@2 [phi:initSprites::@2->initSprites::@2] - //SEG271 [161] phi (byte) initSprites::i#2 = (byte) initSprites::i#1 [phi:initSprites::@2->initSprites::@2#0] -- register_copy - //SEG272 initSprites::@2 + //SEG267 [161] phi from initSprites::@2 to initSprites::@2 [phi:initSprites::@2->initSprites::@2] + //SEG268 [161] phi (byte) initSprites::i#2 = (byte) initSprites::i#1 [phi:initSprites::@2->initSprites::@2#0] -- register_copy + //SEG269 initSprites::@2 b2: - //SEG273 [162] *((const byte*) SPRITES_COLS#0 + (byte) initSprites::i#2) ← (const byte) LIGHT_BLUE#0 -- pbuc1_derefidx_vbuxx=vbuc2 + //SEG270 [162] *((const byte*) SPRITES_COLS#0 + (byte) initSprites::i#2) ← (const byte) LIGHT_BLUE#0 -- pbuc1_derefidx_vbuxx=vbuc2 lda #LIGHT_BLUE sta SPRITES_COLS,x - //SEG274 [163] (byte) initSprites::i#1 ← ++ (byte) initSprites::i#2 -- vbuxx=_inc_vbuxx + //SEG271 [163] (byte) initSprites::i#1 ← ++ (byte) initSprites::i#2 -- vbuxx=_inc_vbuxx inx - //SEG275 [164] if((byte) initSprites::i#1!=(byte) 8) goto initSprites::@2 -- vbuxx_neq_vbuc1_then_la1 + //SEG272 [164] if((byte) initSprites::i#1!=(byte) 8) goto initSprites::@2 -- vbuxx_neq_vbuc1_then_la1 cpx #8 bne b2 - //SEG276 initSprites::@3 - //SEG277 [165] *((const byte*) SPRITES_MC#0) ← (byte) 0 -- _deref_pbuc1=vbuc2 + //SEG273 initSprites::@3 + //SEG274 [165] *((const byte*) SPRITES_MC#0) ← (byte) 0 -- _deref_pbuc1=vbuc2 lda #0 sta SPRITES_MC - //SEG278 [166] *((const byte*) SPRITES_EXPAND_X#0) ← (byte) 0 -- _deref_pbuc1=vbuc2 + //SEG275 [166] *((const byte*) SPRITES_EXPAND_X#0) ← (byte) 0 -- _deref_pbuc1=vbuc2 sta SPRITES_EXPAND_X - //SEG279 [167] *((const byte*) SPRITES_EXPAND_Y#0) ← (byte) 0 -- _deref_pbuc1=vbuc2 + //SEG276 [167] *((const byte*) SPRITES_EXPAND_Y#0) ← (byte) 0 -- _deref_pbuc1=vbuc2 sta SPRITES_EXPAND_Y - //SEG280 initSprites::@return - //SEG281 [168] return + //SEG277 initSprites::@return + //SEG278 [168] return rts } -//SEG282 init_dist_screen -// Populates 1000 bytes (a screen) with values representing the distance to the center. -// The actual value stored is distance*2 to increase precision -// init_dist_screen(byte* zeropage($17) screen) -init_dist_screen: { +//SEG279 init_angle_screen +// Populates 1000 bytes (a screen) with values representing the angle to the center. +// Utilizes symmetry around the center +// init_angle_screen(byte* zeropage($17) screen) +init_angle_screen: { + .label _10 = $21 .label screen = $17 - .label screen_bottomline = $19 - .label yds = $41 - .label xds = $43 - .label ds = $43 + .label screen_topline = $19 + .label screen_bottomline = $17 + .label xw = $43 + .label yw = $45 + .label angle_w = $21 + .label ang_w = $47 .label x = $1b .label xb = $1c - .label screen_topline = $17 .label y = $16 - //SEG283 [170] call init_squares - //SEG284 [241] phi from init_dist_screen to init_squares [phi:init_dist_screen->init_squares] - jsr init_squares - //SEG285 init_dist_screen::@10 - //SEG286 [171] (byte*) init_dist_screen::screen_bottomline#0 ← (byte*) init_dist_screen::screen#0 + (word)(number) $28*(number) $18 -- pbuz1=pbuz2_plus_vwuc1 + //SEG280 [169] (byte*) init_angle_screen::screen_topline#0 ← (byte*) init_angle_screen::screen#0 + (word)(number) $28*(number) $c -- pbuz1=pbuz2_plus_vwuc1 lda screen clc - adc #<$28*$18 - sta screen_bottomline + adc #<$28*$c + sta screen_topline lda screen+1 - adc #>$28*$18 + adc #>$28*$c + sta screen_topline+1 + //SEG281 [170] (byte*) init_angle_screen::screen_bottomline#0 ← (byte*) init_angle_screen::screen#0 + (word)(number) $28*(number) $c -- pbuz1=pbuz1_plus_vwuc1 + clc + lda screen_bottomline + adc #<$28*$c + sta screen_bottomline + lda screen_bottomline+1 + adc #>$28*$c sta screen_bottomline+1 - //SEG287 [172] phi from init_dist_screen::@10 to init_dist_screen::@1 [phi:init_dist_screen::@10->init_dist_screen::@1] - //SEG288 [172] phi (byte*) init_dist_screen::screen_bottomline#10 = (byte*) init_dist_screen::screen_bottomline#0 [phi:init_dist_screen::@10->init_dist_screen::@1#0] -- register_copy - //SEG289 [172] phi (byte*) init_dist_screen::screen_topline#10 = (byte*) init_dist_screen::screen#0 [phi:init_dist_screen::@10->init_dist_screen::@1#1] -- register_copy - //SEG290 [172] phi (byte) init_dist_screen::y#10 = (byte) 0 [phi:init_dist_screen::@10->init_dist_screen::@1#2] -- vbuz1=vbuc1 + //SEG282 [171] phi from init_angle_screen to init_angle_screen::@1 [phi:init_angle_screen->init_angle_screen::@1] + //SEG283 [171] phi (byte*) init_angle_screen::screen_topline#5 = (byte*) init_angle_screen::screen_topline#0 [phi:init_angle_screen->init_angle_screen::@1#0] -- register_copy + //SEG284 [171] phi (byte*) init_angle_screen::screen_bottomline#5 = (byte*) init_angle_screen::screen_bottomline#0 [phi:init_angle_screen->init_angle_screen::@1#1] -- register_copy + //SEG285 [171] phi (byte) init_angle_screen::y#4 = (byte) 0 [phi:init_angle_screen->init_angle_screen::@1#2] -- vbuz1=vbuc1 lda #0 sta y - //SEG291 [172] phi from init_dist_screen::@9 to init_dist_screen::@1 [phi:init_dist_screen::@9->init_dist_screen::@1] - //SEG292 [172] phi (byte*) init_dist_screen::screen_bottomline#10 = (byte*) init_dist_screen::screen_bottomline#1 [phi:init_dist_screen::@9->init_dist_screen::@1#0] -- register_copy - //SEG293 [172] phi (byte*) init_dist_screen::screen_topline#10 = (byte*) init_dist_screen::screen_topline#1 [phi:init_dist_screen::@9->init_dist_screen::@1#1] -- register_copy - //SEG294 [172] phi (byte) init_dist_screen::y#10 = (byte) init_dist_screen::y#1 [phi:init_dist_screen::@9->init_dist_screen::@1#2] -- register_copy - //SEG295 init_dist_screen::@1 + //SEG286 [171] phi from init_angle_screen::@3 to init_angle_screen::@1 [phi:init_angle_screen::@3->init_angle_screen::@1] + //SEG287 [171] phi (byte*) init_angle_screen::screen_topline#5 = (byte*) init_angle_screen::screen_topline#1 [phi:init_angle_screen::@3->init_angle_screen::@1#0] -- register_copy + //SEG288 [171] phi (byte*) init_angle_screen::screen_bottomline#5 = (byte*) init_angle_screen::screen_bottomline#1 [phi:init_angle_screen::@3->init_angle_screen::@1#1] -- register_copy + //SEG289 [171] phi (byte) init_angle_screen::y#4 = (byte) init_angle_screen::y#1 [phi:init_angle_screen::@3->init_angle_screen::@1#2] -- register_copy + //SEG290 init_angle_screen::@1 b1: - //SEG296 [173] (byte) init_dist_screen::y2#0 ← (byte) init_dist_screen::y#10 << (byte) 1 -- vbuaa=vbuz1_rol_1 - lda y - asl - //SEG297 [174] if((byte) init_dist_screen::y2#0>=(byte) $18) goto init_dist_screen::@2 -- vbuaa_ge_vbuc1_then_la1 - cmp #$18 - bcs b2 - //SEG298 init_dist_screen::@3 - //SEG299 [175] (byte~) init_dist_screen::$5 ← (byte) $18 - (byte) init_dist_screen::y2#0 -- vbuaa=vbuc1_minus_vbuaa - eor #$ff - clc - adc #$18+1 - //SEG300 [176] phi from init_dist_screen::@2 init_dist_screen::@3 to init_dist_screen::@4 [phi:init_dist_screen::@2/init_dist_screen::@3->init_dist_screen::@4] - //SEG301 [176] phi (byte) init_dist_screen::yd#0 = (byte~) init_dist_screen::$7 [phi:init_dist_screen::@2/init_dist_screen::@3->init_dist_screen::@4#0] -- register_copy - //SEG302 init_dist_screen::@4 - b4: - //SEG303 [177] (byte) sqr::val#0 ← (byte) init_dist_screen::yd#0 - //SEG304 [178] call sqr - //SEG305 [237] phi from init_dist_screen::@4 to sqr [phi:init_dist_screen::@4->sqr] - //SEG306 [237] phi (byte) sqr::val#2 = (byte) sqr::val#0 [phi:init_dist_screen::@4->sqr#0] -- register_copy - jsr sqr - //SEG307 [179] (word) sqr::return#2 ← (word) sqr::return#0 -- vwuz1=vwuz2 - lda sqr.return - sta sqr.return_2 - lda sqr.return+1 - sta sqr.return_2+1 - //SEG308 init_dist_screen::@11 - //SEG309 [180] (word) init_dist_screen::yds#0 ← (word) sqr::return#2 - //SEG310 [181] phi from init_dist_screen::@11 to init_dist_screen::@5 [phi:init_dist_screen::@11->init_dist_screen::@5] - //SEG311 [181] phi (byte) init_dist_screen::xb#2 = (byte) $27 [phi:init_dist_screen::@11->init_dist_screen::@5#0] -- vbuz1=vbuc1 + //SEG291 [172] phi from init_angle_screen::@1 to init_angle_screen::@2 [phi:init_angle_screen::@1->init_angle_screen::@2] + //SEG292 [172] phi (byte) init_angle_screen::xb#2 = (byte) $27 [phi:init_angle_screen::@1->init_angle_screen::@2#0] -- vbuz1=vbuc1 lda #$27 sta xb - //SEG312 [181] phi (byte) init_dist_screen::x#2 = (byte) 0 [phi:init_dist_screen::@11->init_dist_screen::@5#1] -- vbuz1=vbuc1 + //SEG293 [172] phi (byte) init_angle_screen::x#2 = (byte) 0 [phi:init_angle_screen::@1->init_angle_screen::@2#1] -- vbuz1=vbuc1 lda #0 sta x - //SEG313 [181] phi from init_dist_screen::@13 to init_dist_screen::@5 [phi:init_dist_screen::@13->init_dist_screen::@5] - //SEG314 [181] phi (byte) init_dist_screen::xb#2 = (byte) init_dist_screen::xb#1 [phi:init_dist_screen::@13->init_dist_screen::@5#0] -- register_copy - //SEG315 [181] phi (byte) init_dist_screen::x#2 = (byte) init_dist_screen::x#1 [phi:init_dist_screen::@13->init_dist_screen::@5#1] -- register_copy - //SEG316 init_dist_screen::@5 - b5: - //SEG317 [182] (byte) init_dist_screen::x2#0 ← (byte) init_dist_screen::x#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 + //SEG294 [172] phi from init_angle_screen::@4 to init_angle_screen::@2 [phi:init_angle_screen::@4->init_angle_screen::@2] + //SEG295 [172] phi (byte) init_angle_screen::xb#2 = (byte) init_angle_screen::xb#1 [phi:init_angle_screen::@4->init_angle_screen::@2#0] -- register_copy + //SEG296 [172] phi (byte) init_angle_screen::x#2 = (byte) init_angle_screen::x#1 [phi:init_angle_screen::@4->init_angle_screen::@2#1] -- register_copy + //SEG297 init_angle_screen::@2 + b2: + //SEG298 [173] (byte~) init_angle_screen::$2 ← (byte) init_angle_screen::x#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 lda x asl - //SEG318 [183] if((byte) init_dist_screen::x2#0>=(byte) $27) goto init_dist_screen::@6 -- vbuaa_ge_vbuc1_then_la1 - cmp #$27 - bcs b6 - //SEG319 init_dist_screen::@7 - //SEG320 [184] (byte~) init_dist_screen::$13 ← (byte) $27 - (byte) init_dist_screen::x2#0 -- vbuaa=vbuc1_minus_vbuaa + //SEG299 [174] (byte~) init_angle_screen::$3 ← (byte) $27 - (byte~) init_angle_screen::$2 -- vbuaa=vbuc1_minus_vbuaa eor #$ff clc adc #$27+1 - //SEG321 [185] phi from init_dist_screen::@6 init_dist_screen::@7 to init_dist_screen::@8 [phi:init_dist_screen::@6/init_dist_screen::@7->init_dist_screen::@8] - //SEG322 [185] phi (byte) init_dist_screen::xd#0 = (byte~) init_dist_screen::$15 [phi:init_dist_screen::@6/init_dist_screen::@7->init_dist_screen::@8#0] -- register_copy - //SEG323 init_dist_screen::@8 - b8: - //SEG324 [186] (byte) sqr::val#1 ← (byte) init_dist_screen::xd#0 - //SEG325 [187] call sqr - //SEG326 [237] phi from init_dist_screen::@8 to sqr [phi:init_dist_screen::@8->sqr] - //SEG327 [237] phi (byte) sqr::val#2 = (byte) sqr::val#1 [phi:init_dist_screen::@8->sqr#0] -- register_copy - jsr sqr - //SEG328 [188] (word) sqr::return#3 ← (word) sqr::return#0 - //SEG329 init_dist_screen::@12 - //SEG330 [189] (word) init_dist_screen::xds#0 ← (word) sqr::return#3 - //SEG331 [190] (word) init_dist_screen::ds#0 ← (word) init_dist_screen::xds#0 + (word) init_dist_screen::yds#0 -- vwuz1=vwuz1_plus_vwuz2 - lda ds + //SEG300 [175] (word) init_angle_screen::xw#0 ← (byte~) init_angle_screen::$3 w= (byte) 0 -- vwuz1=vbuaa_word_vbuc1 + ldy #0 + sta xw+1 + sty xw + //SEG301 [176] (byte~) init_angle_screen::$6 ← (byte) init_angle_screen::y#4 << (byte) 1 -- vbuaa=vbuz1_rol_1 + lda y + asl + //SEG302 [177] (word) init_angle_screen::yw#0 ← (byte~) init_angle_screen::$6 w= (byte) 0 -- vwuz1=vbuaa_word_vbuc1 + sta yw+1 + sty yw + //SEG303 [178] (signed word) atan2_16::x#0 ← (signed word)(word) init_angle_screen::xw#0 + //SEG304 [179] (signed word) atan2_16::y#0 ← (signed word)(word) init_angle_screen::yw#0 + //SEG305 [180] call atan2_16 + jsr atan2_16 + //SEG306 [181] (word) atan2_16::return#2 ← (word) atan2_16::return#0 + //SEG307 init_angle_screen::@4 + //SEG308 [182] (word) init_angle_screen::angle_w#0 ← (word) atan2_16::return#2 + //SEG309 [183] (word~) init_angle_screen::$10 ← (word) init_angle_screen::angle_w#0 + (byte) $80 -- vwuz1=vwuz1_plus_vbuc1 + lda #$80 clc - adc yds - sta ds - lda ds+1 - adc yds+1 - sta ds+1 - //SEG332 [191] (word) sqrt::val#0 ← (word) init_dist_screen::ds#0 - //SEG333 [192] call sqrt - jsr sqrt - //SEG334 [193] (byte) sqrt::return#2 ← (byte) sqrt::return#0 - //SEG335 init_dist_screen::@13 - //SEG336 [194] (byte) init_dist_screen::d#0 ← (byte) sqrt::return#2 - //SEG337 [195] *((byte*) init_dist_screen::screen_topline#10 + (byte) init_dist_screen::x#2) ← (byte) init_dist_screen::d#0 -- pbuz1_derefidx_vbuz2=vbuaa + adc _10 + sta _10 + bcc !+ + inc _10+1 + !: + //SEG310 [184] (byte) init_angle_screen::ang_w#0 ← > (word~) init_angle_screen::$10 -- vbuz1=_hi_vwuz2 + lda _10+1 + sta ang_w + //SEG311 [185] *((byte*) init_angle_screen::screen_bottomline#5 + (byte) init_angle_screen::xb#2) ← (byte) init_angle_screen::ang_w#0 -- pbuz1_derefidx_vbuz2=vbuz3 + ldy xb + sta (screen_bottomline),y + //SEG312 [186] (byte~) init_angle_screen::$12 ← - (byte) init_angle_screen::ang_w#0 -- vbuaa=_neg_vbuz1 + eor #$ff + clc + adc #1 + //SEG313 [187] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::xb#2) ← (byte~) init_angle_screen::$12 -- pbuz1_derefidx_vbuz2=vbuaa + sta (screen_topline),y + //SEG314 [188] (byte~) init_angle_screen::$13 ← (byte) $80 + (byte) init_angle_screen::ang_w#0 -- vbuaa=vbuc1_plus_vbuz1 + lda #$80 + clc + adc ang_w + //SEG315 [189] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$13 -- pbuz1_derefidx_vbuz2=vbuaa ldy x sta (screen_topline),y - //SEG338 [196] *((byte*) init_dist_screen::screen_bottomline#10 + (byte) init_dist_screen::x#2) ← (byte) init_dist_screen::d#0 -- pbuz1_derefidx_vbuz2=vbuaa + //SEG316 [190] (byte~) init_angle_screen::$14 ← (byte) $80 - (byte) init_angle_screen::ang_w#0 -- vbuaa=vbuc1_minus_vbuz1 + lda #$80 + sec + sbc ang_w + //SEG317 [191] *((byte*) init_angle_screen::screen_bottomline#5 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$14 -- pbuz1_derefidx_vbuz2=vbuaa sta (screen_bottomline),y - //SEG339 [197] *((byte*) init_dist_screen::screen_topline#10 + (byte) init_dist_screen::xb#2) ← (byte) init_dist_screen::d#0 -- pbuz1_derefidx_vbuz2=vbuaa - ldy xb - sta (screen_topline),y - //SEG340 [198] *((byte*) init_dist_screen::screen_bottomline#10 + (byte) init_dist_screen::xb#2) ← (byte) init_dist_screen::d#0 -- pbuz1_derefidx_vbuz2=vbuaa - sta (screen_bottomline),y - //SEG341 [199] (byte) init_dist_screen::x#1 ← ++ (byte) init_dist_screen::x#2 -- vbuz1=_inc_vbuz1 + //SEG318 [192] (byte) init_angle_screen::x#1 ← ++ (byte) init_angle_screen::x#2 -- vbuz1=_inc_vbuz1 inc x - //SEG342 [200] (byte) init_dist_screen::xb#1 ← -- (byte) init_dist_screen::xb#2 -- vbuz1=_dec_vbuz1 + //SEG319 [193] (byte) init_angle_screen::xb#1 ← -- (byte) init_angle_screen::xb#2 -- vbuz1=_dec_vbuz1 dec xb - //SEG343 [201] if((byte) init_dist_screen::x#1<(byte) $13+(byte) 1) goto init_dist_screen::@5 -- vbuz1_lt_vbuc1_then_la1 + //SEG320 [194] if((byte) init_angle_screen::x#1<(byte) $13+(byte) 1) goto init_angle_screen::@2 -- vbuz1_lt_vbuc1_then_la1 lda x cmp #$13+1 - bcc b5 - //SEG344 init_dist_screen::@9 - //SEG345 [202] (byte*) init_dist_screen::screen_topline#1 ← (byte*) init_dist_screen::screen_topline#10 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 - lda #$28 - clc - adc screen_topline - sta screen_topline - bcc !+ - inc screen_topline+1 - !: - //SEG346 [203] (byte*) init_dist_screen::screen_bottomline#1 ← (byte*) init_dist_screen::screen_bottomline#10 - (byte) $28 -- pbuz1=pbuz1_minus_vwuc1 - lda screen_bottomline + bcc b2 + //SEG321 init_angle_screen::@3 + //SEG322 [195] (byte*) init_angle_screen::screen_topline#1 ← (byte*) init_angle_screen::screen_topline#5 - (byte) $28 -- pbuz1=pbuz1_minus_vwuc1 + lda screen_topline sec sbc #<$28 - sta screen_bottomline - lda screen_bottomline+1 + sta screen_topline + lda screen_topline+1 sbc #>$28 - sta screen_bottomline+1 - //SEG347 [204] (byte) init_dist_screen::y#1 ← ++ (byte) init_dist_screen::y#10 -- vbuz1=_inc_vbuz1 + sta screen_topline+1 + //SEG323 [196] (byte*) init_angle_screen::screen_bottomline#1 ← (byte*) init_angle_screen::screen_bottomline#5 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 + lda #$28 + clc + adc screen_bottomline + sta screen_bottomline + bcc !+ + inc screen_bottomline+1 + !: + //SEG324 [197] (byte) init_angle_screen::y#1 ← ++ (byte) init_angle_screen::y#4 -- vbuz1=_inc_vbuz1 inc y - //SEG348 [205] if((byte) init_dist_screen::y#1!=(byte) $d) goto init_dist_screen::@1 -- vbuz1_neq_vbuc1_then_la1 + //SEG325 [198] if((byte) init_angle_screen::y#1!=(byte) $d) goto init_angle_screen::@1 -- vbuz1_neq_vbuc1_then_la1 lda #$d cmp y bne b1 - //SEG349 init_dist_screen::@return - //SEG350 [206] return - rts - //SEG351 init_dist_screen::@6 - b6: - //SEG352 [207] (byte~) init_dist_screen::$15 ← (byte) init_dist_screen::x2#0 - (byte) $27 -- vbuaa=vbuaa_minus_vbuc1 - sec - sbc #$27 - jmp b8 - //SEG353 init_dist_screen::@2 - b2: - //SEG354 [208] (byte~) init_dist_screen::$7 ← (byte) init_dist_screen::y2#0 - (byte) $18 -- vbuaa=vbuaa_minus_vbuc1 - sec - sbc #$18 - jmp b4 -} -//SEG355 sqrt -// Find the (integer) square root of a word value -// If the square is not an integer then it returns the largest integer N where N*N <= val -// Uses a table of squares that must be initialized by calling init_squares() -// sqrt(word zeropage($43) val) -sqrt: { - .label _1 = $1d - .label _3 = $1d - .label found = $1d - .label val = $43 - //SEG356 [209] (word) bsearch16u::key#0 ← (word) sqrt::val#0 - //SEG357 [210] (word*) bsearch16u::items#1 ← (word*)(void*) SQUARES#1 -- pwuz1=pwuz2 - lda SQUARES - sta bsearch16u.items - lda SQUARES+1 - sta bsearch16u.items+1 - //SEG358 [211] call bsearch16u - //SEG359 [218] phi from sqrt to bsearch16u [phi:sqrt->bsearch16u] - jsr bsearch16u - //SEG360 [212] (word*) bsearch16u::return#3 ← (word*) bsearch16u::return#1 - //SEG361 sqrt::@1 - //SEG362 [213] (word*) sqrt::found#0 ← (word*) bsearch16u::return#3 - //SEG363 [214] (word~) sqrt::$3 ← (word*) sqrt::found#0 - (word*)(void*) SQUARES#1 -- vwuz1=pwuz1_minus_pwuz2 - lda _3 - sec - sbc SQUARES - sta _3 - lda _3+1 - sbc SQUARES+1 - sta _3+1 - //SEG364 [215] (word~) sqrt::$1 ← (word~) sqrt::$3 >> (byte) 1 -- vwuz1=vwuz1_ror_1 - lsr _1+1 - ror _1 - //SEG365 [216] (byte) sqrt::return#0 ← (byte)(word~) sqrt::$1 -- vbuaa=_byte_vwuz1 - lda _1 - //SEG366 sqrt::@return - //SEG367 [217] return + //SEG326 init_angle_screen::@return + //SEG327 [199] return rts } -//SEG368 bsearch16u -// Searches an array of nitems unsigned words, the initial member of which is pointed to by base, for a member that matches the value key. -// - key - The value to look for -// - items - Pointer to the start of the array to search in -// - num - The number of items in the array -// Returns pointer to an entry in the array that matches the search key -// bsearch16u(word zeropage($43) key, word* zeropage($1d) items, byte register(X) num) -bsearch16u: { +//SEG328 atan2_16 +// Find the atan2(x, y) - which is the angle of the line from (0,0) to (x,y) +// Finding the angle requires a binary search using CORDIC_ITERATIONS_16 +// Returns the angle in hex-degrees (0=0, 0x8000=PI, 0x10000=2*PI) +// atan2_16(signed word zeropage($43) x, signed word zeropage($45) y) +atan2_16: { .label _2 = $1d - .label pivot = $45 - .label result = $47 - .label return = $1d - .label items = $1d - .label key = $43 - //SEG369 [219] phi from bsearch16u to bsearch16u::@3 [phi:bsearch16u->bsearch16u::@3] - //SEG370 [219] phi (word*) bsearch16u::items#2 = (word*) bsearch16u::items#1 [phi:bsearch16u->bsearch16u::@3#0] -- register_copy - //SEG371 [219] phi (byte) bsearch16u::num#3 = (const byte) NUM_SQUARES#3 [phi:bsearch16u->bsearch16u::@3#1] -- vbuxx=vbuc1 - ldx #NUM_SQUARES - //SEG372 bsearch16u::@3 - b3: - //SEG373 [220] if((byte) bsearch16u::num#3>(byte) 0) goto bsearch16u::@4 -- vbuxx_gt_0_then_la1 - cpx #0 - bne b4 - //SEG374 bsearch16u::@5 - //SEG375 [221] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@2 -- _deref_pwuz1_le_vwuz2_then_la1 - ldy #1 - lda (items),y - cmp key+1 - bne !+ - dey - lda (items),y - cmp key - beq b2 - !: - bcc b2 - //SEG376 bsearch16u::@1 - //SEG377 [222] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#2 - (byte) 1*(const byte) SIZEOF_WORD -- pwuz1=pwuz1_minus_vwuc1 - lda _2 + .label _7 = $1f + .label yi = $1d + .label xi = $1f + .label angle = $21 + .label xd = $25 + .label yd = $23 + .label return = $21 + .label x = $43 + .label y = $45 + //SEG329 [200] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 -- vwsz1_ge_0_then_la1 + lda y+1 + bmi !b1+ + jmp b1 + !b1: + //SEG330 atan2_16::@2 + //SEG331 [201] (signed word~) atan2_16::$2 ← - (signed word) atan2_16::y#0 -- vwsz1=_neg_vwsz2 sec - sbc #<1*SIZEOF_WORD + lda #0 + sbc y sta _2 - lda _2+1 - sbc #>1*SIZEOF_WORD + lda #0 + sbc y+1 sta _2+1 - //SEG378 [223] phi from bsearch16u::@1 bsearch16u::@5 to bsearch16u::@2 [phi:bsearch16u::@1/bsearch16u::@5->bsearch16u::@2] - //SEG379 [223] phi (word*) bsearch16u::return#2 = (word*~) bsearch16u::$2 [phi:bsearch16u::@1/bsearch16u::@5->bsearch16u::@2#0] -- register_copy - //SEG380 bsearch16u::@2 - b2: - //SEG381 [224] phi from bsearch16u::@2 bsearch16u::@8 to bsearch16u::@return [phi:bsearch16u::@2/bsearch16u::@8->bsearch16u::@return] - //SEG382 [224] phi (word*) bsearch16u::return#1 = (word*) bsearch16u::return#2 [phi:bsearch16u::@2/bsearch16u::@8->bsearch16u::@return#0] -- register_copy - //SEG383 bsearch16u::@return - //SEG384 [225] return - rts - //SEG385 bsearch16u::@4 - b4: - //SEG386 [226] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#3 >> (byte) 1 -- vbuaa=vbuxx_ror_1 - txa - lsr - //SEG387 [227] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1 -- vbuaa=vbuaa_rol_1 - asl - //SEG388 [228] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#2 + (byte~) bsearch16u::$16 -- pwuz1=pwuz2_plus_vbuaa - clc - adc items - sta pivot - lda #0 - adc items+1 - sta pivot+1 - //SEG389 [229] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0) -- vwsz1=vwsz2_minus__deref_pwsz3 + //SEG332 [202] phi from atan2_16::@1 atan2_16::@2 to atan2_16::@3 [phi:atan2_16::@1/atan2_16::@2->atan2_16::@3] + //SEG333 [202] phi (signed word) atan2_16::yi#0 = (signed word~) atan2_16::yi#16 [phi:atan2_16::@1/atan2_16::@2->atan2_16::@3#0] -- register_copy + //SEG334 atan2_16::@3 + b3: + //SEG335 [203] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4 -- vwsz1_ge_0_then_la1 + lda x+1 + bmi !b4+ + jmp b4 + !b4: + //SEG336 atan2_16::@5 + //SEG337 [204] (signed word~) atan2_16::$7 ← - (signed word) atan2_16::x#0 -- vwsz1=_neg_vwsz2 sec - lda key - ldy #0 - sbc (pivot),y - sta result - lda key+1 - iny - sbc (pivot),y - sta result+1 - //SEG390 [230] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6 -- vwsz1_neq_0_then_la1 - bne b6 - lda result - bne b6 - //SEG391 bsearch16u::@8 - //SEG392 [231] (word*~) bsearch16u::return#6 ← (word*) bsearch16u::pivot#0 -- pwuz1=pwuz2 - lda pivot - sta return - lda pivot+1 - sta return+1 - rts - //SEG393 bsearch16u::@6 - b6: - //SEG394 [232] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@7 -- vwsz1_le_0_then_la1 - lda result+1 - bmi b7 - bne !+ - lda result - beq b7 - !: - //SEG395 bsearch16u::@9 - //SEG396 [233] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD -- pwuz1=pwuz2_plus_vbuc1 - lda #1*SIZEOF_WORD - clc - adc pivot - sta items lda #0 - adc pivot+1 - sta items+1 - //SEG397 [234] (byte) bsearch16u::num#1 ← -- (byte) bsearch16u::num#3 -- vbuxx=_dec_vbuxx - dex - //SEG398 [235] phi from bsearch16u::@6 bsearch16u::@9 to bsearch16u::@7 [phi:bsearch16u::@6/bsearch16u::@9->bsearch16u::@7] - //SEG399 [235] phi (word*) bsearch16u::items#8 = (word*) bsearch16u::items#2 [phi:bsearch16u::@6/bsearch16u::@9->bsearch16u::@7#0] -- register_copy - //SEG400 [235] phi (byte) bsearch16u::num#5 = (byte) bsearch16u::num#3 [phi:bsearch16u::@6/bsearch16u::@9->bsearch16u::@7#1] -- register_copy - //SEG401 bsearch16u::@7 - b7: - //SEG402 [236] (byte) bsearch16u::num#0 ← (byte) bsearch16u::num#5 >> (byte) 1 -- vbuxx=vbuxx_ror_1 - txa - lsr + sbc x + sta _7 + lda #0 + sbc x+1 + sta _7+1 + //SEG338 [205] phi from atan2_16::@4 atan2_16::@5 to atan2_16::@6 [phi:atan2_16::@4/atan2_16::@5->atan2_16::@6] + //SEG339 [205] phi (signed word) atan2_16::xi#0 = (signed word~) atan2_16::xi#13 [phi:atan2_16::@4/atan2_16::@5->atan2_16::@6#0] -- register_copy + //SEG340 atan2_16::@6 + b6: + //SEG341 [206] phi from atan2_16::@6 to atan2_16::@10 [phi:atan2_16::@6->atan2_16::@10] + //SEG342 [206] phi (word) atan2_16::angle#12 = (byte) 0 [phi:atan2_16::@6->atan2_16::@10#0] -- vwuz1=vbuc1 + lda #0 + sta angle + sta angle+1 + //SEG343 [206] phi (byte) atan2_16::i#2 = (byte) 0 [phi:atan2_16::@6->atan2_16::@10#1] -- vbuxx=vbuc1 tax - //SEG403 [219] phi from bsearch16u::@7 to bsearch16u::@3 [phi:bsearch16u::@7->bsearch16u::@3] - //SEG404 [219] phi (word*) bsearch16u::items#2 = (word*) bsearch16u::items#8 [phi:bsearch16u::@7->bsearch16u::@3#0] -- register_copy - //SEG405 [219] phi (byte) bsearch16u::num#3 = (byte) bsearch16u::num#0 [phi:bsearch16u::@7->bsearch16u::@3#1] -- register_copy + //SEG344 [206] phi (signed word) atan2_16::xi#3 = (signed word) atan2_16::xi#0 [phi:atan2_16::@6->atan2_16::@10#2] -- register_copy + //SEG345 [206] phi (signed word) atan2_16::yi#3 = (signed word) atan2_16::yi#0 [phi:atan2_16::@6->atan2_16::@10#3] -- register_copy + //SEG346 atan2_16::@10 + b10: + //SEG347 [207] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@11 -- vwsz1_neq_0_then_la1 + lda yi+1 + bne b11 + lda yi + bne b11 + //SEG348 [208] phi from atan2_16::@10 atan2_16::@19 to atan2_16::@12 [phi:atan2_16::@10/atan2_16::@19->atan2_16::@12] + //SEG349 [208] phi (word) atan2_16::angle#6 = (word) atan2_16::angle#12 [phi:atan2_16::@10/atan2_16::@19->atan2_16::@12#0] -- register_copy + //SEG350 atan2_16::@12 + b12: + //SEG351 [209] (word) atan2_16::angle#1 ← (word) atan2_16::angle#6 >> (byte) 1 -- vwuz1=vwuz1_ror_1 + lsr angle+1 + ror angle + //SEG352 [210] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7 -- vwsz1_ge_0_then_la1 + lda x+1 + bpl b7 + //SEG353 atan2_16::@21 + //SEG354 [211] (word) atan2_16::angle#4 ← (word) $8000 - (word) atan2_16::angle#1 -- vwuz1=vwuc1_minus_vwuz1 + sec + lda #<$8000 + sbc angle + sta angle + lda #>$8000 + sbc angle+1 + sta angle+1 + //SEG355 [212] phi from atan2_16::@12 atan2_16::@21 to atan2_16::@7 [phi:atan2_16::@12/atan2_16::@21->atan2_16::@7] + //SEG356 [212] phi (word) atan2_16::angle#11 = (word) atan2_16::angle#1 [phi:atan2_16::@12/atan2_16::@21->atan2_16::@7#0] -- register_copy + //SEG357 atan2_16::@7 + b7: + //SEG358 [213] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8 -- vwsz1_ge_0_then_la1 + lda y+1 + bpl b8 + //SEG359 atan2_16::@9 + //SEG360 [214] (word) atan2_16::angle#5 ← - (word) atan2_16::angle#11 -- vwuz1=_neg_vwuz1 + sec + lda #0 + sbc angle + sta angle + lda #0 + sbc angle+1 + sta angle+1 + //SEG361 [215] phi from atan2_16::@7 atan2_16::@9 to atan2_16::@8 [phi:atan2_16::@7/atan2_16::@9->atan2_16::@8] + //SEG362 [215] phi (word) atan2_16::return#0 = (word) atan2_16::angle#11 [phi:atan2_16::@7/atan2_16::@9->atan2_16::@8#0] -- register_copy + //SEG363 atan2_16::@8 + b8: + //SEG364 atan2_16::@return + //SEG365 [216] return + rts + //SEG366 atan2_16::@11 + b11: + //SEG367 [217] (byte~) atan2_16::shift#5 ← (byte) atan2_16::i#2 -- vbuyy=vbuxx + txa + tay + //SEG368 [218] (signed word~) atan2_16::xd#10 ← (signed word) atan2_16::xi#3 -- vwsz1=vwsz2 + lda xi + sta xd + lda xi+1 + sta xd+1 + //SEG369 [219] (signed word~) atan2_16::yd#10 ← (signed word) atan2_16::yi#3 -- vwsz1=vwsz2 + lda yi + sta yd + lda yi+1 + sta yd+1 + //SEG370 [220] phi from atan2_16::@11 atan2_16::@14 to atan2_16::@13 [phi:atan2_16::@11/atan2_16::@14->atan2_16::@13] + //SEG371 [220] phi (signed word) atan2_16::yd#3 = (signed word~) atan2_16::yd#10 [phi:atan2_16::@11/atan2_16::@14->atan2_16::@13#0] -- register_copy + //SEG372 [220] phi (signed word) atan2_16::xd#3 = (signed word~) atan2_16::xd#10 [phi:atan2_16::@11/atan2_16::@14->atan2_16::@13#1] -- register_copy + //SEG373 [220] phi (byte) atan2_16::shift#2 = (byte~) atan2_16::shift#5 [phi:atan2_16::@11/atan2_16::@14->atan2_16::@13#2] -- register_copy + //SEG374 atan2_16::@13 + b13: + //SEG375 [221] if((byte) atan2_16::shift#2>=(byte) 2) goto atan2_16::@14 -- vbuyy_ge_vbuc1_then_la1 + cpy #2 + bcs b14 + //SEG376 atan2_16::@15 + //SEG377 [222] if((byte) 0==(byte) atan2_16::shift#2) goto atan2_16::@17 -- vbuc1_eq_vbuyy_then_la1 + cpy #0 + beq b17 + //SEG378 atan2_16::@16 + //SEG379 [223] (signed word) atan2_16::xd#2 ← (signed word) atan2_16::xd#3 >> (signed byte) 1 -- vwsz1=vwsz1_ror_1 + lda xd+1 + cmp #$80 + ror xd+1 + ror xd + //SEG380 [224] (signed word) atan2_16::yd#2 ← (signed word) atan2_16::yd#3 >> (signed byte) 1 -- vwsz1=vwsz1_ror_1 + lda yd+1 + cmp #$80 + ror yd+1 + ror yd + //SEG381 [225] phi from atan2_16::@15 atan2_16::@16 to atan2_16::@17 [phi:atan2_16::@15/atan2_16::@16->atan2_16::@17] + //SEG382 [225] phi (signed word) atan2_16::xd#5 = (signed word) atan2_16::xd#3 [phi:atan2_16::@15/atan2_16::@16->atan2_16::@17#0] -- register_copy + //SEG383 [225] phi (signed word) atan2_16::yd#5 = (signed word) atan2_16::yd#3 [phi:atan2_16::@15/atan2_16::@16->atan2_16::@17#1] -- register_copy + //SEG384 atan2_16::@17 + b17: + //SEG385 [226] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@18 -- vwsz1_ge_0_then_la1 + lda yi+1 + bpl b18 + //SEG386 atan2_16::@20 + //SEG387 [227] (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#3 - (signed word) atan2_16::yd#5 -- vwsz1=vwsz1_minus_vwsz2 + lda xi + sec + sbc yd + sta xi + lda xi+1 + sbc yd+1 + sta xi+1 + //SEG388 [228] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#5 -- vwsz1=vwsz1_plus_vwsz2 + lda yi + clc + adc xd + sta yi + lda yi+1 + adc xd+1 + sta yi+1 + //SEG389 [229] (byte~) atan2_16::$24 ← (byte) atan2_16::i#2 << (byte) 1 -- vbuaa=vbuxx_rol_1 + txa + asl + //SEG390 [230] (word) atan2_16::angle#3 ← (word) atan2_16::angle#12 - *((const word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16#0 + (byte~) atan2_16::$24) -- vwuz1=vwuz1_minus_pwuc1_derefidx_vbuaa + tay + sec + lda angle + sbc CORDIC_ATAN2_ANGLES_16,y + sta angle + lda angle+1 + sbc CORDIC_ATAN2_ANGLES_16+1,y + sta angle+1 + //SEG391 [231] phi from atan2_16::@18 atan2_16::@20 to atan2_16::@19 [phi:atan2_16::@18/atan2_16::@20->atan2_16::@19] + //SEG392 [231] phi (signed word) atan2_16::xi#8 = (signed word) atan2_16::xi#1 [phi:atan2_16::@18/atan2_16::@20->atan2_16::@19#0] -- register_copy + //SEG393 [231] phi (word) atan2_16::angle#13 = (word) atan2_16::angle#2 [phi:atan2_16::@18/atan2_16::@20->atan2_16::@19#1] -- register_copy + //SEG394 [231] phi (signed word) atan2_16::yi#8 = (signed word) atan2_16::yi#1 [phi:atan2_16::@18/atan2_16::@20->atan2_16::@19#2] -- register_copy + //SEG395 atan2_16::@19 + b19: + //SEG396 [232] (byte) atan2_16::i#1 ← ++ (byte) atan2_16::i#2 -- vbuxx=_inc_vbuxx + inx + //SEG397 [233] if((byte) atan2_16::i#1==(const byte) CORDIC_ITERATIONS_16#0-(byte) 1+(byte) 1) goto atan2_16::@12 -- vbuxx_eq_vbuc1_then_la1 + cpx #CORDIC_ITERATIONS_16-1+1 + bne !b12+ + jmp b12 + !b12: + //SEG398 [206] phi from atan2_16::@19 to atan2_16::@10 [phi:atan2_16::@19->atan2_16::@10] + //SEG399 [206] phi (word) atan2_16::angle#12 = (word) atan2_16::angle#13 [phi:atan2_16::@19->atan2_16::@10#0] -- register_copy + //SEG400 [206] phi (byte) atan2_16::i#2 = (byte) atan2_16::i#1 [phi:atan2_16::@19->atan2_16::@10#1] -- register_copy + //SEG401 [206] phi (signed word) atan2_16::xi#3 = (signed word) atan2_16::xi#8 [phi:atan2_16::@19->atan2_16::@10#2] -- register_copy + //SEG402 [206] phi (signed word) atan2_16::yi#3 = (signed word) atan2_16::yi#8 [phi:atan2_16::@19->atan2_16::@10#3] -- register_copy + jmp b10 + //SEG403 atan2_16::@18 + b18: + //SEG404 [234] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#5 -- vwsz1=vwsz1_plus_vwsz2 + lda xi + clc + adc yd + sta xi + lda xi+1 + adc yd+1 + sta xi+1 + //SEG405 [235] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#5 -- vwsz1=vwsz1_minus_vwsz2 + lda yi + sec + sbc xd + sta yi + lda yi+1 + sbc xd+1 + sta yi+1 + //SEG406 [236] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 << (byte) 1 -- vbuaa=vbuxx_rol_1 + txa + asl + //SEG407 [237] (word) atan2_16::angle#2 ← (word) atan2_16::angle#12 + *((const word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16#0 + (byte~) atan2_16::$23) -- vwuz1=vwuz1_plus_pwuc1_derefidx_vbuaa + tay + clc + lda angle + adc CORDIC_ATAN2_ANGLES_16,y + sta angle + lda angle+1 + adc CORDIC_ATAN2_ANGLES_16+1,y + sta angle+1 + jmp b19 + //SEG408 atan2_16::@14 + b14: + //SEG409 [238] (signed word) atan2_16::xd#1 ← (signed word) atan2_16::xd#3 >> (signed byte) 2 -- vwsz1=vwsz1_ror_2 + lda xd+1 + cmp #$80 + ror xd+1 + ror xd + lda xd+1 + cmp #$80 + ror xd+1 + ror xd + //SEG410 [239] (signed word) atan2_16::yd#1 ← (signed word) atan2_16::yd#3 >> (signed byte) 2 -- vwsz1=vwsz1_ror_2 + lda yd+1 + cmp #$80 + ror yd+1 + ror yd + lda yd+1 + cmp #$80 + ror yd+1 + ror yd + //SEG411 [240] (byte) atan2_16::shift#1 ← (byte) atan2_16::shift#2 - (byte) 2 -- vbuyy=vbuyy_minus_2 + dey + dey + jmp b13 + //SEG412 atan2_16::@4 + b4: + //SEG413 [241] (signed word~) atan2_16::xi#13 ← (signed word) atan2_16::x#0 -- vwsz1=vwsz2 + lda x + sta xi + lda x+1 + sta xi+1 + jmp b6 + //SEG414 atan2_16::@1 + b1: + //SEG415 [242] (signed word~) atan2_16::yi#16 ← (signed word) atan2_16::y#0 -- vwsz1=vwsz2 + lda y + sta yi + lda y+1 + sta yi+1 jmp b3 } -//SEG406 sqr -// Find the square of a byte value -// Uses a table of squares that must be initialized by calling init_squares() -// sqr(byte register(A) val) -sqr: { - .label return = $43 - .label return_2 = $41 - //SEG407 [238] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 -- vbuaa=vbuaa_rol_1 - asl - //SEG408 [239] (word) sqr::return#0 ← *((word*)(void*) SQUARES#1 + (byte~) sqr::$0) -- vwuz1=pwuz2_derefidx_vbuaa - tay - lda (SQUARES),y - sta return - iny - lda (SQUARES),y - sta return+1 - //SEG409 sqr::@return - //SEG410 [240] return - rts -} -//SEG411 init_squares -// Initialize squares table -// Uses iterative formula (x+1)^2 = x^2 + 2*x + 1 -init_squares: { - .label squares = $21 - .label sqr = $1f - //SEG412 [242] call malloc - //SEG413 [254] phi from init_squares to malloc [phi:init_squares->malloc] - //SEG414 [254] phi (word) malloc::size#3 = (const byte) NUM_SQUARES#3*(const byte) SIZEOF_WORD [phi:init_squares->malloc#0] -- vwuz1=vbuc1 - lda #NUM_SQUARES*SIZEOF_WORD - sta malloc.size - lda #0 - sta malloc.size+1 - //SEG415 [254] phi (byte*) heap_head#12 = (byte*) heap_head#1 [phi:init_squares->malloc#1] -- register_copy - jsr malloc - //SEG416 init_squares::@2 - //SEG417 [243] (void*) SQUARES#1 ← (void*)(byte*) malloc::mem#0 - //SEG418 [244] (word*) init_squares::squares#0 ← (word*)(void*) SQUARES#1 -- pwuz1=pwuz2 - lda SQUARES - sta squares - lda SQUARES+1 - sta squares+1 - //SEG419 [245] phi from init_squares::@2 to init_squares::@1 [phi:init_squares::@2->init_squares::@1] - //SEG420 [245] phi (byte) init_squares::i#2 = (byte) 0 [phi:init_squares::@2->init_squares::@1#0] -- vbuxx=vbuc1 - ldx #0 - //SEG421 [245] phi (word*) init_squares::squares#2 = (word*) init_squares::squares#0 [phi:init_squares::@2->init_squares::@1#1] -- register_copy - //SEG422 [245] phi (word) init_squares::sqr#2 = (byte) 0 [phi:init_squares::@2->init_squares::@1#2] -- vwuz1=vbuc1 - txa - sta sqr - sta sqr+1 - //SEG423 [245] phi from init_squares::@1 to init_squares::@1 [phi:init_squares::@1->init_squares::@1] - //SEG424 [245] phi (byte) init_squares::i#2 = (byte) init_squares::i#1 [phi:init_squares::@1->init_squares::@1#0] -- register_copy - //SEG425 [245] phi (word*) init_squares::squares#2 = (word*) init_squares::squares#1 [phi:init_squares::@1->init_squares::@1#1] -- register_copy - //SEG426 [245] phi (word) init_squares::sqr#2 = (word) init_squares::sqr#1 [phi:init_squares::@1->init_squares::@1#2] -- register_copy - //SEG427 init_squares::@1 - b1: - //SEG428 [246] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 -- _deref_pwuz1=vwuz2 - ldy #0 - lda sqr - sta (squares),y - iny - lda sqr+1 - sta (squares),y - //SEG429 [247] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD -- pwuz1=pwuz1_plus_vbuc1 - lda #SIZEOF_WORD - clc - adc squares - sta squares - bcc !+ - inc squares+1 - !: - //SEG430 [248] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 -- vbuaa=vbuxx_rol_1 - txa - asl - //SEG431 [249] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 -- vbuaa=vbuaa_plus_1 - clc - adc #1 - //SEG432 [250] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 -- vwuz1=vwuz1_plus_vbuaa - clc - adc sqr - sta sqr - bcc !+ - inc sqr+1 - !: - //SEG433 [251] (byte) init_squares::i#1 ← ++ (byte) init_squares::i#2 -- vbuxx=_inc_vbuxx - inx - //SEG434 [252] if((byte) init_squares::i#1!=(const byte) NUM_SQUARES#3-(byte) 1+(byte) 1) goto init_squares::@1 -- vbuxx_neq_vbuc1_then_la1 - cpx #NUM_SQUARES-1+1 - bne b1 - //SEG435 init_squares::@return - //SEG436 [253] return - rts -} -//SEG437 malloc +//SEG416 malloc // Allocates a block of size bytes of memory, returning a pointer to the beginning of the block. // The content of the newly allocated block of memory is not initialized, remaining with indeterminate values. -// malloc(word zeropage($25) size) malloc: { - .label mem = $49 - .label size = $25 - //SEG438 [255] (byte*) malloc::mem#0 ← (byte*) heap_head#12 -- pbuz1=pbuz2 + .label mem = $2d + //SEG417 [244] (byte*) malloc::mem#0 ← (byte*) heap_head#5 -- pbuz1=pbuz2 lda heap_head sta mem lda heap_head+1 sta mem+1 - //SEG439 [256] (byte*) heap_head#1 ← (byte*) heap_head#12 + (word) malloc::size#3 -- pbuz1=pbuz1_plus_vwuz2 - lda heap_head + //SEG418 [245] (byte*) heap_head#1 ← (byte*) heap_head#5 + (word) $3e8 -- pbuz1=pbuz1_plus_vwuc1 clc - adc size + lda heap_head + adc #<$3e8 sta heap_head lda heap_head+1 - adc size+1 + adc #>$3e8 sta heap_head+1 - //SEG440 malloc::@return - //SEG441 [257] return + //SEG419 malloc::@return + //SEG420 [246] return rts } -//SEG442 irqBottom +//SEG421 irqBottom // Raster Interrupt at the bottom of the screen irqBottom: { - //SEG443 entry interrupt(HARDWARE_ALL) + //SEG422 entry interrupt(HARDWARE_ALL) sta rega+1 stx regx+1 sty regy+1 - //SEG444 [259] phi from irqBottom to irqBottom::@1 [phi:irqBottom->irqBottom::@1] - //SEG445 irqBottom::@1 - //SEG446 [260] call processChars - //SEG447 [265] phi from irqBottom::@1 to processChars [phi:irqBottom::@1->processChars] + //SEG423 [248] phi from irqBottom to irqBottom::@1 [phi:irqBottom->irqBottom::@1] + //SEG424 irqBottom::@1 + //SEG425 [249] call processChars + //SEG426 [254] phi from irqBottom::@1 to processChars [phi:irqBottom::@1->processChars] jsr processChars - //SEG448 irqBottom::@2 - //SEG449 [261] *((const byte*) RASTER#0) ← (const byte) RASTER_IRQ_TOP#0 -- _deref_pbuc1=vbuc2 + //SEG427 irqBottom::@2 + //SEG428 [250] *((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 - //SEG450 [262] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_ALL)(void()) irqTop() -- _deref_pptc1=pprc2 + //SEG429 [251] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_ALL)(void()) irqTop() -- _deref_pptc1=pprc2 lda #irqTop sta HARDWARE_IRQ+1 - //SEG451 [263] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 + //SEG430 [252] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 // Acknowledge the IRQ lda #IRQ_RASTER sta IRQ_STATUS - //SEG452 irqBottom::@return - //SEG453 [264] return - exit interrupt(HARDWARE_ALL) + //SEG431 irqBottom::@return + //SEG432 [253] return - exit interrupt(HARDWARE_ALL) rega: lda #00 regx: @@ -13363,49 +12564,49 @@ irqBottom: { ldy #00 rti } -//SEG454 processChars +//SEG433 processChars // Process any chars in the PROCESSING array processChars: { - .label _15 = $50 - .label _25 = $4e - .label processing = $4b - .label bitmask = $4d - .label i = $27 - .label xpos = $4e - .label ypos = $52 - .label numActive = $28 - //SEG455 [266] phi from processChars to processChars::@1 [phi:processChars->processChars::@1] - //SEG456 [266] phi (byte) processChars::numActive#10 = (byte) 0 [phi:processChars->processChars::@1#0] -- vbuz1=vbuc1 + .label _15 = $4d + .label _25 = $4b + .label processing = $48 + .label bitmask = $4a + .label i = $29 + .label xpos = $4b + .label ypos = $4f + .label numActive = $2a + //SEG434 [255] phi from processChars to processChars::@1 [phi:processChars->processChars::@1] + //SEG435 [255] phi (byte) processChars::numActive#10 = (byte) 0 [phi:processChars->processChars::@1#0] -- vbuz1=vbuc1 lda #0 sta numActive - //SEG457 [266] phi (byte) processChars::i#10 = (byte) 0 [phi:processChars->processChars::@1#1] -- vbuz1=vbuc1 + //SEG436 [255] phi (byte) processChars::i#10 = (byte) 0 [phi:processChars->processChars::@1#1] -- vbuz1=vbuc1 sta i - //SEG458 [266] phi from processChars::@2 to processChars::@1 [phi:processChars::@2->processChars::@1] - //SEG459 [266] phi (byte) processChars::numActive#10 = (byte) processChars::numActive#3 [phi:processChars::@2->processChars::@1#0] -- register_copy - //SEG460 [266] phi (byte) processChars::i#10 = (byte) processChars::i#1 [phi:processChars::@2->processChars::@1#1] -- register_copy - //SEG461 processChars::@1 + //SEG437 [255] phi from processChars::@2 to processChars::@1 [phi:processChars::@2->processChars::@1] + //SEG438 [255] phi (byte) processChars::numActive#10 = (byte) processChars::numActive#3 [phi:processChars::@2->processChars::@1#0] -- register_copy + //SEG439 [255] phi (byte) processChars::i#10 = (byte) processChars::i#1 [phi:processChars::@2->processChars::@1#1] -- register_copy + //SEG440 processChars::@1 b1: - //SEG462 [267] (byte) processChars::$67 ← (byte) processChars::i#10 << (byte) 1 -- vbuaa=vbuz1_rol_1 + //SEG441 [256] (byte) processChars::$67 ← (byte) processChars::i#10 << (byte) 1 -- vbuaa=vbuz1_rol_1 lda i asl - //SEG463 [268] (byte) processChars::$68 ← (byte) processChars::$67 + (byte) processChars::i#10 -- vbuaa=vbuaa_plus_vbuz1 + //SEG442 [257] (byte) processChars::$68 ← (byte) processChars::$67 + (byte) processChars::i#10 -- vbuaa=vbuaa_plus_vbuz1 clc adc i - //SEG464 [269] (byte) processChars::$69 ← (byte) processChars::$68 << (byte) 1 -- vbuaa=vbuaa_rol_1 + //SEG443 [258] (byte) processChars::$69 ← (byte) processChars::$68 << (byte) 1 -- vbuaa=vbuaa_rol_1 asl - //SEG465 [270] (byte) processChars::$70 ← (byte) processChars::$69 + (byte) processChars::i#10 -- vbuaa=vbuaa_plus_vbuz1 + //SEG444 [259] (byte) processChars::$70 ← (byte) processChars::$69 + (byte) processChars::i#10 -- vbuaa=vbuaa_plus_vbuz1 clc adc i - //SEG466 [271] (byte~) processChars::$37 ← (byte) processChars::$70 << (byte) 1 -- vbuaa=vbuaa_rol_1 + //SEG445 [260] (byte~) processChars::$37 ← (byte) processChars::$70 << (byte) 1 -- vbuaa=vbuaa_rol_1 asl - //SEG467 [272] (struct ProcessingSprite*) processChars::processing#0 ← (const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (byte~) processChars::$37 -- pssz1=pssc1_plus_vbuaa + //SEG446 [261] (struct ProcessingSprite*) processChars::processing#0 ← (const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (byte~) processChars::$37 -- pssz1=pssc1_plus_vbuaa clc adc #PROCESSING adc #0 sta processing+1 - //SEG468 [273] (byte) processChars::bitmask#0 ← (byte) 1 << *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID) -- vbuz1=vbuc1_rol_pbuz2_derefidx_vbuc2 + //SEG447 [262] (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 @@ -13418,20 +12619,20 @@ processChars: { bne !- !e: sta bitmask - //SEG469 [274] if(*((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS)==(const byte) STATUS_FREE) goto processChars::@2 -- pbuz1_derefidx_vbuc1_eq_vbuc2_then_la1 + //SEG448 [263] if(*((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS)==(const byte) STATUS_FREE) goto processChars::@2 -- pbuz1_derefidx_vbuc1_eq_vbuc2_then_la1 ldy #OFFSET_STRUCT_PROCESSINGSPRITE_STATUS lda (processing),y cmp #STATUS_FREE bne !b2+ jmp b2 !b2: - //SEG470 processChars::@10 - //SEG471 [275] if(*((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS)!=(const byte) STATUS_NEW) goto processChars::@3 -- pbuz1_derefidx_vbuc1_neq_vbuc2_then_la1 + //SEG449 processChars::@10 + //SEG450 [264] if(*((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS)!=(const byte) STATUS_NEW) goto processChars::@3 -- pbuz1_derefidx_vbuc1_neq_vbuc2_then_la1 lda (processing),y cmp #STATUS_NEW bne b3 - //SEG472 processChars::@11 - //SEG473 [276] *(*((byte**)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR)) ← (byte) ' ' -- _deref_pptz1_derefidx_vbuc1=vbuc2 + //SEG451 processChars::@11 + //SEG452 [265] *(*((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 @@ -13443,12 +12644,12 @@ processChars: { txa !: sta $ffff - //SEG474 [277] *((const byte*) SPRITES_ENABLE#0) ← *((const byte*) SPRITES_ENABLE#0) | (byte) processChars::bitmask#0 -- _deref_pbuc1=_deref_pbuc1_bor_vbuz1 + //SEG453 [266] *((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 - //SEG475 [278] *((const byte*) SPRITES_COLS#0 + *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID)) ← *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_COL) -- pbuc1_derefidx_pbuz1_derefidx_vbuc2=pbuz1_derefidx_vbuc3 + //SEG454 [267] *((const byte*) SPRITES_COLS#0 + *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID)) ← *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_COL) -- pbuc1_derefidx_pbuz1_derefidx_vbuc2=pbuz1_derefidx_vbuc3 // Set the sprite color ldy #OFFSET_STRUCT_PROCESSINGSPRITE_COL lda (processing),y @@ -13458,7 +12659,7 @@ processChars: { tay pla sta SPRITES_COLS,y - //SEG476 [279] *((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 + //SEG455 [268] *((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 @@ -13468,14 +12669,14 @@ processChars: { tay pla sta SCREEN+SPRITE_PTRS,y - //SEG477 [280] *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) ← (const byte) STATUS_PROCESSING -- pbuz1_derefidx_vbuc1=vbuc2 + //SEG456 [269] *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) ← (const byte) STATUS_PROCESSING -- pbuz1_derefidx_vbuc1=vbuc2 // Set status lda #STATUS_PROCESSING ldy #OFFSET_STRUCT_PROCESSINGSPRITE_STATUS sta (processing),y - //SEG478 processChars::@3 + //SEG457 processChars::@3 b3: - //SEG479 [281] (word) processChars::xpos#0 ← *((word*)(struct ProcessingSprite*) processChars::processing#0) >> (byte) 4 -- vwuz1=_deref_pwuz2_ror_4 + //SEG458 [270] (word) processChars::xpos#0 ← *((word*)(struct ProcessingSprite*) processChars::processing#0) >> (byte) 4 -- vwuz1=_deref_pwuz2_ror_4 ldy #0 lda (processing),y sta xpos @@ -13490,32 +12691,32 @@ processChars: { ror xpos lsr xpos+1 ror xpos - //SEG480 [282] (byte~) processChars::$11 ← > (word) processChars::xpos#0 -- vbuaa=_hi_vwuz1 + //SEG459 [271] (byte~) processChars::$11 ← > (word) processChars::xpos#0 -- vbuaa=_hi_vwuz1 lda xpos+1 - //SEG481 [283] if((byte) 0!=(byte~) processChars::$11) goto processChars::@4 -- vbuc1_neq_vbuaa_then_la1 + //SEG460 [272] if((byte) 0!=(byte~) processChars::$11) goto processChars::@4 -- vbuc1_neq_vbuaa_then_la1 // Set sprite position cmp #0 beq !b4+ jmp b4 !b4: - //SEG482 processChars::@8 - //SEG483 [284] (byte~) processChars::$12 ← (byte) $ff ^ (byte) processChars::bitmask#0 -- vbuaa=vbuc1_bxor_vbuz1 + //SEG461 processChars::@8 + //SEG462 [273] (byte~) processChars::$12 ← (byte) $ff ^ (byte) processChars::bitmask#0 -- vbuaa=vbuc1_bxor_vbuz1 lda #$ff eor bitmask - //SEG484 [285] *((const byte*) SPRITES_XMSB#0) ← *((const byte*) SPRITES_XMSB#0) & (byte~) processChars::$12 -- _deref_pbuc1=_deref_pbuc1_band_vbuaa + //SEG463 [274] *((const byte*) SPRITES_XMSB#0) ← *((const byte*) SPRITES_XMSB#0) & (byte~) processChars::$12 -- _deref_pbuc1=_deref_pbuc1_band_vbuaa and SPRITES_XMSB sta SPRITES_XMSB - //SEG485 processChars::@5 + //SEG464 processChars::@5 b5: - //SEG486 [286] (byte~) processChars::$17 ← (byte) processChars::i#10 << (byte) 1 -- vbuxx=vbuz1_rol_1 + //SEG465 [275] (byte~) processChars::$17 ← (byte) processChars::i#10 << (byte) 1 -- vbuxx=vbuz1_rol_1 lda i asl tax - //SEG487 [287] (byte~) processChars::$14 ← (byte)(word) processChars::xpos#0 -- vbuaa=_byte_vwuz1 + //SEG466 [276] (byte~) processChars::$14 ← (byte)(word) processChars::xpos#0 -- vbuaa=_byte_vwuz1 lda xpos - //SEG488 [288] *((const byte*) SPRITES_XPOS#0 + (byte~) processChars::$17) ← (byte~) processChars::$14 -- pbuc1_derefidx_vbuxx=vbuaa + //SEG467 [277] *((const byte*) SPRITES_XPOS#0 + (byte~) processChars::$17) ← (byte~) processChars::$14 -- pbuc1_derefidx_vbuxx=vbuaa sta SPRITES_XPOS,x - //SEG489 [289] (word~) processChars::$15 ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y) >> (byte) 4 -- vwuz1=pwuz2_derefidx_vbuc1_ror_4 + //SEG468 [278] (word~) processChars::$15 ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y) >> (byte) 4 -- vwuz1=pwuz2_derefidx_vbuc1_ror_4 ldy #OFFSET_STRUCT_PROCESSINGSPRITE_Y lda (processing),y sta _15 @@ -13530,12 +12731,12 @@ processChars: { ror _15 lsr _15+1 ror _15 - //SEG490 [290] (byte) processChars::ypos#0 ← (byte)(word~) processChars::$15 -- vbuz1=_byte_vwuz2 + //SEG469 [279] (byte) processChars::ypos#0 ← (byte)(word~) processChars::$15 -- vbuz1=_byte_vwuz2 lda _15 sta ypos - //SEG491 [291] *((const byte*) SPRITES_YPOS#0 + (byte~) processChars::$17) ← (byte) processChars::ypos#0 -- pbuc1_derefidx_vbuxx=vbuz1 + //SEG470 [280] *((const byte*) SPRITES_YPOS#0 + (byte~) processChars::$17) ← (byte) processChars::ypos#0 -- pbuc1_derefidx_vbuxx=vbuz1 sta SPRITES_YPOS,x - //SEG492 [292] if(*((word*)(struct ProcessingSprite*) processChars::processing#0)<(const word) XPOS_LEFTMOST#0) goto processChars::@6 -- _deref_pwuz1_lt_vwuc1_then_la1 + //SEG471 [281] if(*((word*)(struct ProcessingSprite*) processChars::processing#0)<(const word) XPOS_LEFTMOST#0) goto processChars::@6 -- _deref_pwuz1_lt_vwuc1_then_la1 // Move sprite ldy #1 lda (processing),y @@ -13551,8 +12752,8 @@ processChars: { jmp b6 !b6: !: - //SEG493 processChars::@14 - //SEG494 [293] if(*((word*)(struct ProcessingSprite*) processChars::processing#0)>(const word) XPOS_RIGHTMOST#0) goto processChars::@6 -- _deref_pwuz1_gt_vwuc1_then_la1 + //SEG472 processChars::@14 + //SEG473 [282] if(*((word*)(struct ProcessingSprite*) processChars::processing#0)>(const word) XPOS_RIGHTMOST#0) goto processChars::@6 -- _deref_pwuz1_gt_vwuc1_then_la1 ldy #1 lda #>XPOS_RIGHTMOST cmp (processing),y @@ -13567,8 +12768,8 @@ processChars: { jmp b6 !b6: !: - //SEG495 processChars::@13 - //SEG496 [294] if(*((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y)<(const word) YPOS_TOPMOST#0) goto processChars::@6 -- pwuz1_derefidx_vbuc1_lt_vwuc2_then_la1 + //SEG474 processChars::@13 + //SEG475 [283] if(*((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y)<(const word) YPOS_TOPMOST#0) goto processChars::@6 -- pwuz1_derefidx_vbuc1_lt_vwuc2_then_la1 ldy #OFFSET_STRUCT_PROCESSINGSPRITE_Y iny lda (processing),y @@ -13584,8 +12785,8 @@ processChars: { jmp b6 !b6: !: - //SEG497 processChars::@12 - //SEG498 [295] if(*((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y)>(const word) YPOS_BOTTOMMOST#0) goto processChars::@6 -- pwuz1_derefidx_vbuc1_gt_vwuc2_then_la1 + //SEG476 processChars::@12 + //SEG477 [284] if(*((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y)>(const word) YPOS_BOTTOMMOST#0) goto processChars::@6 -- pwuz1_derefidx_vbuc1_gt_vwuc2_then_la1 ldy #OFFSET_STRUCT_PROCESSINGSPRITE_Y iny lda #>YPOS_BOTTOMMOST @@ -13599,22 +12800,22 @@ processChars: { cmp (processing),y bcc b6 !: - //SEG499 processChars::@9 - //SEG500 [296] (word~) processChars::$25 ← (word) processChars::xpos#0 >> (byte) 3 -- vwuz1=vwuz1_ror_3 + //SEG478 processChars::@9 + //SEG479 [285] (word~) processChars::$25 ← (word) processChars::xpos#0 >> (byte) 3 -- vwuz1=vwuz1_ror_3 lsr _25+1 ror _25 lsr _25+1 ror _25 lsr _25+1 ror _25 - //SEG501 [297] (byte~) processChars::$26 ← (byte)(word~) processChars::$25 -- vbuaa=_byte_vwuz1 + //SEG480 [286] (byte~) processChars::$26 ← (byte)(word~) processChars::$25 -- vbuaa=_byte_vwuz1 lda _25 - //SEG502 [298] (byte) processChars::xchar#0 ← (byte~) processChars::$26 - (const byte) BORDER_XPOS_LEFT#0/(byte) 8 -- vbuaa=vbuaa_minus_vbuc1 + //SEG481 [287] (byte) processChars::xchar#0 ← (byte~) processChars::$26 - (const byte) BORDER_XPOS_LEFT#0/(byte) 8 -- vbuaa=vbuaa_minus_vbuc1 sec sbc #BORDER_XPOS_LEFT/8 - //SEG503 [299] (byte~) processChars::$38 ← (byte) processChars::xchar#0 << (byte) 1 -- vbuaa=vbuaa_rol_1 + //SEG482 [288] (byte~) processChars::$38 ← (byte) processChars::xchar#0 << (byte) 1 -- vbuaa=vbuaa_rol_1 asl - //SEG504 [300] *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX) + *((const word[$28]) VXSIN#0 + (byte~) processChars::$38) -- pwuz1_derefidx_vbuc1=pwuz1_derefidx_vbuc1_plus_pwuc2_derefidx_vbuaa + //SEG483 [289] *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX) + *((const word[$28]) VXSIN#0 + (byte~) processChars::$38) -- pwuz1_derefidx_vbuc1=pwuz1_derefidx_vbuc1_plus_pwuc2_derefidx_vbuaa ldy #OFFSET_STRUCT_PROCESSINGSPRITE_VX tax clc @@ -13625,7 +12826,7 @@ processChars: { lda (processing),y adc VXSIN+1,x sta (processing),y - //SEG505 [301] *((word*)(struct ProcessingSprite*) processChars::processing#0) ← *((word*)(struct ProcessingSprite*) processChars::processing#0) + *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX) -- _deref_pwuz1=_deref_pwuz1_plus_pwuz1_derefidx_vbuc1 + //SEG484 [290] *((word*)(struct ProcessingSprite*) processChars::processing#0) ← *((word*)(struct ProcessingSprite*) processChars::processing#0) + *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX) -- _deref_pwuz1=_deref_pwuz1_plus_pwuz1_derefidx_vbuc1 ldy #OFFSET_STRUCT_PROCESSINGSPRITE_VX sty $ff clc @@ -13639,17 +12840,17 @@ processChars: { ldy #1 adc (processing),y sta (processing),y - //SEG506 [302] (byte~) processChars::$30 ← (byte) processChars::ypos#0 >> (byte) 3 -- vbuaa=vbuz1_ror_3 + //SEG485 [291] (byte~) processChars::$30 ← (byte) processChars::ypos#0 >> (byte) 3 -- vbuaa=vbuz1_ror_3 lda ypos lsr lsr lsr - //SEG507 [303] (byte) processChars::ychar#0 ← (byte~) processChars::$30 - (const byte) BORDER_YPOS_TOP#0/(byte) 8 -- vbuaa=vbuaa_minus_vbuc1 + //SEG486 [292] (byte) processChars::ychar#0 ← (byte~) processChars::$30 - (const byte) BORDER_YPOS_TOP#0/(byte) 8 -- vbuaa=vbuaa_minus_vbuc1 sec sbc #BORDER_YPOS_TOP/8 - //SEG508 [304] (byte~) processChars::$39 ← (byte) processChars::ychar#0 << (byte) 1 -- vbuaa=vbuaa_rol_1 + //SEG487 [293] (byte~) processChars::$39 ← (byte) processChars::ychar#0 << (byte) 1 -- vbuaa=vbuaa_rol_1 asl - //SEG509 [305] *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY) + *((const word[$19]) VYSIN#0 + (byte~) processChars::$39) -- pwuz1_derefidx_vbuc1=pwuz1_derefidx_vbuc1_plus_pwuc2_derefidx_vbuaa + //SEG488 [294] *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY) + *((const word[$19]) VYSIN#0 + (byte~) processChars::$39) -- pwuz1_derefidx_vbuc1=pwuz1_derefidx_vbuc1_plus_pwuc2_derefidx_vbuaa ldy #OFFSET_STRUCT_PROCESSINGSPRITE_VY tax clc @@ -13660,7 +12861,7 @@ processChars: { lda (processing),y adc VYSIN+1,x sta (processing),y - //SEG510 [306] *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y) + *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY) -- pwuz1_derefidx_vbuc1=pwuz1_derefidx_vbuc1_plus_pwuz1_derefidx_vbuc2 + //SEG489 [295] *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y) + *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY) -- pwuz1_derefidx_vbuc1=pwuz1_derefidx_vbuc1_plus_pwuz1_derefidx_vbuc2 ldy #OFFSET_STRUCT_PROCESSINGSPRITE_VY clc lda (processing),y @@ -13672,71 +12873,71 @@ processChars: { ldy #OFFSET_STRUCT_PROCESSINGSPRITE_Y+1 adc (processing),y sta (processing),y - //SEG511 processChars::@7 + //SEG490 processChars::@7 b7: - //SEG512 [307] (byte) processChars::numActive#1 ← ++ (byte) processChars::numActive#10 -- vbuz1=_inc_vbuz1 + //SEG491 [296] (byte) processChars::numActive#1 ← ++ (byte) processChars::numActive#10 -- vbuz1=_inc_vbuz1 inc numActive - //SEG513 [308] phi from processChars::@1 processChars::@7 to processChars::@2 [phi:processChars::@1/processChars::@7->processChars::@2] - //SEG514 [308] phi (byte) processChars::numActive#3 = (byte) processChars::numActive#10 [phi:processChars::@1/processChars::@7->processChars::@2#0] -- register_copy - //SEG515 processChars::@2 + //SEG492 [297] phi from processChars::@1 processChars::@7 to processChars::@2 [phi:processChars::@1/processChars::@7->processChars::@2] + //SEG493 [297] phi (byte) processChars::numActive#3 = (byte) processChars::numActive#10 [phi:processChars::@1/processChars::@7->processChars::@2#0] -- register_copy + //SEG494 processChars::@2 b2: - //SEG516 [309] (byte) processChars::i#1 ← ++ (byte) processChars::i#10 -- vbuz1=_inc_vbuz1 + //SEG495 [298] (byte) processChars::i#1 ← ++ (byte) processChars::i#10 -- vbuz1=_inc_vbuz1 inc i - //SEG517 [310] if((byte) processChars::i#1!=(const byte) NUM_PROCESSING#0-(byte) 1+(byte) 1) goto processChars::@1 -- vbuz1_neq_vbuc1_then_la1 + //SEG496 [299] if((byte) processChars::i#1!=(const byte) NUM_PROCESSING#0-(byte) 1+(byte) 1) goto processChars::@1 -- vbuz1_neq_vbuc1_then_la1 lda #NUM_PROCESSING-1+1 cmp i beq !b1+ jmp b1 !b1: - //SEG518 processChars::@return - //SEG519 [311] return + //SEG497 processChars::@return + //SEG498 [300] return rts - //SEG520 processChars::@6 + //SEG499 processChars::@6 b6: - //SEG521 [312] *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) ← (const byte) STATUS_FREE -- pbuz1_derefidx_vbuc1=vbuc2 + //SEG500 [301] *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) ← (const byte) STATUS_FREE -- pbuz1_derefidx_vbuc1=vbuc2 // Set status to FREE lda #STATUS_FREE ldy #OFFSET_STRUCT_PROCESSINGSPRITE_STATUS sta (processing),y - //SEG522 [313] (byte~) processChars::$33 ← (byte) $ff ^ (byte) processChars::bitmask#0 -- vbuaa=vbuc1_bxor_vbuz1 + //SEG501 [302] (byte~) processChars::$33 ← (byte) $ff ^ (byte) processChars::bitmask#0 -- vbuaa=vbuc1_bxor_vbuz1 lda #$ff eor bitmask - //SEG523 [314] *((const byte*) SPRITES_ENABLE#0) ← *((const byte*) SPRITES_ENABLE#0) & (byte~) processChars::$33 -- _deref_pbuc1=_deref_pbuc1_band_vbuaa + //SEG502 [303] *((const byte*) SPRITES_ENABLE#0) ← *((const byte*) SPRITES_ENABLE#0) & (byte~) processChars::$33 -- _deref_pbuc1=_deref_pbuc1_band_vbuaa // Disable the sprite and SPRITES_ENABLE sta SPRITES_ENABLE jmp b7 - //SEG524 processChars::@4 + //SEG503 processChars::@4 b4: - //SEG525 [315] *((const byte*) SPRITES_XMSB#0) ← *((const byte*) SPRITES_XMSB#0) | (byte) processChars::bitmask#0 -- _deref_pbuc1=_deref_pbuc1_bor_vbuz1 + //SEG504 [304] *((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 } -//SEG526 irqTop +//SEG505 irqTop // Raster Interrupt at the top of the screen irqTop: { - //SEG527 entry interrupt(HARDWARE_ALL) + //SEG506 entry interrupt(HARDWARE_ALL) sta rega+1 stx regx+1 sty regy+1 - //SEG528 irqTop::@1 - //SEG529 [317] *((const byte*) RASTER#0) ← (const byte) RASTER_IRQ_MIDDLE#0 -- _deref_pbuc1=vbuc2 + //SEG507 irqTop::@1 + //SEG508 [306] *((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 - //SEG530 [318] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_ALL)(void()) irqBottom() -- _deref_pptc1=pprc2 + //SEG509 [307] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_ALL)(void()) irqBottom() -- _deref_pptc1=pprc2 lda #irqBottom sta HARDWARE_IRQ+1 - //SEG531 [319] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 + //SEG510 [308] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 // Acknowledge the IRQ lda #IRQ_RASTER sta IRQ_STATUS - //SEG532 irqTop::@return - //SEG533 [320] return - exit interrupt(HARDWARE_ALL) + //SEG511 irqTop::@return + //SEG512 [309] return - exit interrupt(HARDWARE_ALL) rega: lda #00 regx: @@ -13745,7 +12946,12 @@ irqTop: { ldy #00 rti } -//SEG534 File Data +//SEG513 File Data + // Angles representing ATAN(0.5), ATAN(0.25), ATAN(0.125), ... +CORDIC_ATAN2_ANGLES_16: +.for (var i=0; i$400 + sta MEM+1 + jsr malloc + lda malloc.return + sta malloc.return_2 + lda malloc.return+1 + sta malloc.return_2+1 + jsr malloc + jsr main + rts +main: { + lda #0 + tay + sta (SCREEN_1),y + sta (SCREEN_2),y + rts +} +malloc: { + .label return = 6 + .label return_2 = 4 + inc MEM + bne !+ + inc MEM+1 + !: + lda MEM + sta return + lda MEM+1 + sta return+1 + rts +} diff --git a/src/test/ref/liverange-problem-0.cfg b/src/test/ref/liverange-problem-0.cfg new file mode 100644 index 000000000..aab315c3e --- /dev/null +++ b/src/test/ref/liverange-problem-0.cfg @@ -0,0 +1,37 @@ +@begin: scope:[] from + [0] phi() + to:@1 +@1: scope:[] from @begin + [1] phi() + [2] call malloc + [3] (byte*) malloc::return#2 ← (byte*) malloc::return#0 + to:@3 +@3: scope:[] from @1 + [4] (byte*) SCREEN_1#0 ← (byte*) malloc::return#2 + [5] call malloc + [6] (byte*) malloc::return#3 ← (byte*) malloc::return#0 + to:@4 +@4: scope:[] from @3 + [7] (byte*) SCREEN_2#0 ← (byte*) malloc::return#3 + to:@2 +@2: scope:[] from @4 + [8] phi() + [9] call main + to:@end +@end: scope:[] from @2 + [10] phi() +main: scope:[main] from @2 + [11] *((byte*) SCREEN_1#0) ← (byte) 0 + [12] *((byte*) SCREEN_2#0) ← (byte) 0 + to:main::@return +main::@return: scope:[main] from main + [13] return + to:@return +malloc: scope:[malloc] from @1 @3 + [14] (byte*) MEM#5 ← phi( @1/(byte*) 1024 @3/(byte*) MEM#1 ) + [15] (byte*) MEM#1 ← ++ (byte*) MEM#5 + [16] (byte*) malloc::return#0 ← (byte*) MEM#1 + to:malloc::@return +malloc::@return: scope:[malloc] from malloc + [17] return + to:@return diff --git a/src/test/ref/liverange-problem-0.log b/src/test/ref/liverange-problem-0.log new file mode 100644 index 000000000..6e11e7365 --- /dev/null +++ b/src/test/ref/liverange-problem-0.log @@ -0,0 +1,606 @@ +Culled Empty Block (label) malloc::@1 + +CONTROL FLOW GRAPH SSA +@begin: scope:[] from + (byte*) MEM#0 ← ((byte*)) (number) $400 + to:@1 +malloc: scope:[malloc] from @1 @3 + (byte*) MEM#5 ← phi( @1/(byte*) MEM#9 @3/(byte*) MEM#3 ) + (byte*) MEM#1 ← ++ (byte*) MEM#5 + (byte*) malloc::return#0 ← (byte*) MEM#1 + to:malloc::@return +malloc::@return: scope:[malloc] from malloc + (byte*) MEM#6 ← phi( malloc/(byte*) MEM#1 ) + (byte*) malloc::return#4 ← phi( malloc/(byte*) malloc::return#0 ) + (byte*) malloc::return#1 ← (byte*) malloc::return#4 + (byte*) MEM#2 ← (byte*) MEM#6 + return + to:@return +@1: scope:[] from @begin + (byte*) MEM#9 ← phi( @begin/(byte*) MEM#0 ) + call malloc + (byte*) malloc::return#2 ← (byte*) malloc::return#1 + to:@3 +@3: scope:[] from @1 + (byte*) MEM#7 ← phi( @1/(byte*) MEM#2 ) + (byte*) malloc::return#5 ← phi( @1/(byte*) malloc::return#2 ) + (byte*~) $0 ← (byte*) malloc::return#5 + (byte*) MEM#3 ← (byte*) MEM#7 + (byte*) SCREEN_1#0 ← (byte*~) $0 + call malloc + (byte*) malloc::return#3 ← (byte*) malloc::return#1 + to:@4 +@4: scope:[] from @3 + (byte*) SCREEN_1#3 ← phi( @3/(byte*) SCREEN_1#0 ) + (byte*) MEM#8 ← phi( @3/(byte*) MEM#2 ) + (byte*) malloc::return#6 ← phi( @3/(byte*) malloc::return#3 ) + (byte*~) $1 ← (byte*) malloc::return#6 + (byte*) MEM#4 ← (byte*) MEM#8 + (byte*) SCREEN_2#0 ← (byte*~) $1 + to:@2 +main: scope:[main] from @2 + (byte*) SCREEN_2#1 ← phi( @2/(byte*) SCREEN_2#2 ) + (byte*) SCREEN_1#1 ← phi( @2/(byte*) SCREEN_1#2 ) + *((byte*) SCREEN_1#1) ← (number) 0 + *((byte*) SCREEN_2#1) ← (number) 0 + to:main::@return +main::@return: scope:[main] from main + return + to:@return +@2: scope:[] from @4 + (byte*) SCREEN_2#2 ← phi( @4/(byte*) SCREEN_2#0 ) + (byte*) SCREEN_1#2 ← phi( @4/(byte*) SCREEN_1#3 ) + call main + to:@5 +@5: scope:[] from @2 + to:@end +@end: scope:[] from @5 + +SYMBOL TABLE SSA +(byte*~) $0 +(byte*~) $1 +(label) @1 +(label) @2 +(label) @3 +(label) @4 +(label) @5 +(label) @begin +(label) @end +(byte*) MEM +(byte*) MEM#0 +(byte*) MEM#1 +(byte*) MEM#2 +(byte*) MEM#3 +(byte*) MEM#4 +(byte*) MEM#5 +(byte*) MEM#6 +(byte*) MEM#7 +(byte*) MEM#8 +(byte*) MEM#9 +(byte*) SCREEN_1 +(byte*) SCREEN_1#0 +(byte*) SCREEN_1#1 +(byte*) SCREEN_1#2 +(byte*) SCREEN_1#3 +(byte*) SCREEN_2 +(byte*) SCREEN_2#0 +(byte*) SCREEN_2#1 +(byte*) SCREEN_2#2 +(void()) main() +(label) main::@return +(byte*()) malloc() +(label) malloc::@return +(byte*) malloc::return +(byte*) malloc::return#0 +(byte*) malloc::return#1 +(byte*) malloc::return#2 +(byte*) malloc::return#3 +(byte*) malloc::return#4 +(byte*) malloc::return#5 +(byte*) malloc::return#6 + +Adding number conversion cast (unumber) 0 in *((byte*) SCREEN_1#1) ← (number) 0 +Adding number conversion cast (unumber) 0 in *((byte*) SCREEN_2#1) ← (number) 0 +Successful SSA optimization PassNAddNumberTypeConversions +Inlining cast (byte*) MEM#0 ← (byte*)(number) $400 +Inlining cast *((byte*) SCREEN_1#1) ← (unumber)(number) 0 +Inlining cast *((byte*) SCREEN_2#1) ← (unumber)(number) 0 +Successful SSA optimization Pass2InlineCast +Simplifying constant pointer cast (byte*) 1024 +Simplifying constant integer cast 0 +Simplifying constant integer cast 0 +Successful SSA optimization PassNCastSimplification +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 0 +Successful SSA optimization PassNFinalizeNumberTypeConversions +Alias (byte*) malloc::return#0 = (byte*) malloc::return#4 (byte*) malloc::return#1 +Alias (byte*) MEM#1 = (byte*) MEM#6 (byte*) MEM#2 +Alias (byte*) MEM#0 = (byte*) MEM#9 +Alias (byte*) malloc::return#2 = (byte*) malloc::return#5 +Alias (byte*) MEM#3 = (byte*) MEM#7 +Alias (byte*) SCREEN_1#0 = (byte*~) $0 (byte*) SCREEN_1#3 (byte*) SCREEN_1#2 +Alias (byte*) malloc::return#3 = (byte*) malloc::return#6 +Alias (byte*) MEM#4 = (byte*) MEM#8 +Alias (byte*) SCREEN_2#0 = (byte*~) $1 (byte*) SCREEN_2#2 +Successful SSA optimization Pass2AliasElimination +Identical Phi Values (byte*) MEM#3 (byte*) MEM#1 +Identical Phi Values (byte*) MEM#4 (byte*) MEM#1 +Identical Phi Values (byte*) SCREEN_1#1 (byte*) SCREEN_1#0 +Identical Phi Values (byte*) SCREEN_2#1 (byte*) SCREEN_2#0 +Successful SSA optimization Pass2IdenticalPhiElimination +Constant (const byte*) MEM#0 = (byte*) 1024 +Successful SSA optimization Pass2ConstantIdentification +Inlining constant with var siblings (const byte*) MEM#0 +Constant inlined MEM#0 = (byte*) 1024 +Successful SSA optimization Pass2ConstantInlining +Adding NOP phi() at start of @begin +Adding NOP phi() at start of @1 +Adding NOP phi() at start of @2 +Adding NOP phi() at start of @5 +Adding NOP phi() at start of @end +CALL GRAPH +Calls in [] to malloc:2 malloc:6 main:10 + +Created 1 initial phi equivalence classes +Coalesced [5] MEM#10 ← MEM#1 +Coalesced down to 1 phi equivalence classes +Culled Empty Block (label) @5 +Adding NOP phi() at start of @begin +Adding NOP phi() at start of @1 +Adding NOP phi() at start of @2 +Adding NOP phi() at start of @end + +FINAL CONTROL FLOW GRAPH +@begin: scope:[] from + [0] phi() + to:@1 +@1: scope:[] from @begin + [1] phi() + [2] call malloc + [3] (byte*) malloc::return#2 ← (byte*) malloc::return#0 + to:@3 +@3: scope:[] from @1 + [4] (byte*) SCREEN_1#0 ← (byte*) malloc::return#2 + [5] call malloc + [6] (byte*) malloc::return#3 ← (byte*) malloc::return#0 + to:@4 +@4: scope:[] from @3 + [7] (byte*) SCREEN_2#0 ← (byte*) malloc::return#3 + to:@2 +@2: scope:[] from @4 + [8] phi() + [9] call main + to:@end +@end: scope:[] from @2 + [10] phi() +main: scope:[main] from @2 + [11] *((byte*) SCREEN_1#0) ← (byte) 0 + [12] *((byte*) SCREEN_2#0) ← (byte) 0 + to:main::@return +main::@return: scope:[main] from main + [13] return + to:@return +malloc: scope:[malloc] from @1 @3 + [14] (byte*) MEM#5 ← phi( @1/(byte*) 1024 @3/(byte*) MEM#1 ) + [15] (byte*) MEM#1 ← ++ (byte*) MEM#5 + [16] (byte*) malloc::return#0 ← (byte*) MEM#1 + to:malloc::@return +malloc::@return: scope:[malloc] from malloc + [17] return + to:@return + + +VARIABLE REGISTER WEIGHTS +(byte*) MEM +(byte*) MEM#1 1.0 +(byte*) MEM#5 4.0 +(byte*) SCREEN_1 +(byte*) SCREEN_1#0 0.8 +(byte*) SCREEN_2 +(byte*) SCREEN_2#0 1.3333333333333333 +(void()) main() +(byte*()) malloc() +(byte*) malloc::return +(byte*) malloc::return#0 1.5 +(byte*) malloc::return#2 4.0 +(byte*) malloc::return#3 4.0 + +Initial phi equivalence classes +[ MEM#5 MEM#1 ] +Added variable malloc::return#2 to zero page equivalence class [ malloc::return#2 ] +Added variable SCREEN_1#0 to zero page equivalence class [ SCREEN_1#0 ] +Added variable malloc::return#3 to zero page equivalence class [ malloc::return#3 ] +Added variable SCREEN_2#0 to zero page equivalence class [ SCREEN_2#0 ] +Added variable malloc::return#0 to zero page equivalence class [ malloc::return#0 ] +Complete equivalence classes +[ MEM#5 MEM#1 ] +[ malloc::return#2 ] +[ SCREEN_1#0 ] +[ malloc::return#3 ] +[ SCREEN_2#0 ] +[ malloc::return#0 ] +Allocated zp ZP_WORD:2 [ MEM#5 MEM#1 ] +Allocated zp ZP_WORD:4 [ malloc::return#2 ] +Allocated zp ZP_WORD:6 [ SCREEN_1#0 ] +Allocated zp ZP_WORD:8 [ malloc::return#3 ] +Allocated zp ZP_WORD:10 [ SCREEN_2#0 ] +Allocated zp ZP_WORD:12 [ malloc::return#0 ] + +INITIAL ASM +//SEG0 File Comments +// Error where the compiler is reusing the same ZP for two byte* variables. +// SCREEN_1 and SCREEN_2 are both allocated to ZP: 4 +// Problem is that outside main() scope statements have zero call-paths and then isStatementAllocationOverlapping() never checks liveranges +// CallPath code must be rewritten to use @begin as the outermost call instead of main() +//SEG1 Basic Upstart +.pc = $801 "Basic" +:BasicUpstart(bbegin) +.pc = $80d "Program" +//SEG2 Global Constants & labels + .label MEM = 2 + .label SCREEN_1 = 6 + .label SCREEN_2 = $a +//SEG3 @begin +bbegin: +//SEG4 [1] phi from @begin to @1 [phi:@begin->@1] +b1_from_bbegin: + jmp b1 +//SEG5 @1 +b1: +//SEG6 [2] call malloc +//SEG7 [14] phi from @1 to malloc [phi:@1->malloc] +malloc_from_b1: +//SEG8 [14] phi (byte*) MEM#5 = (byte*) 1024 [phi:@1->malloc#0] -- pbuz1=pbuc1 + lda #<$400 + sta MEM + lda #>$400 + sta MEM+1 + jsr malloc +//SEG9 [3] (byte*) malloc::return#2 ← (byte*) malloc::return#0 -- pbuz1=pbuz2 + lda malloc.return + sta malloc.return_2 + lda malloc.return+1 + sta malloc.return_2+1 + jmp b3 +//SEG10 @3 +b3: +//SEG11 [4] (byte*) SCREEN_1#0 ← (byte*) malloc::return#2 -- pbuz1=pbuz2 + lda malloc.return_2 + sta SCREEN_1 + lda malloc.return_2+1 + sta SCREEN_1+1 +//SEG12 [5] call malloc +//SEG13 [14] phi from @3 to malloc [phi:@3->malloc] +malloc_from_b3: +//SEG14 [14] phi (byte*) MEM#5 = (byte*) MEM#1 [phi:@3->malloc#0] -- register_copy + jsr malloc +//SEG15 [6] (byte*) malloc::return#3 ← (byte*) malloc::return#0 -- pbuz1=pbuz2 + lda malloc.return + sta malloc.return_3 + lda malloc.return+1 + sta malloc.return_3+1 + jmp b4 +//SEG16 @4 +b4: +//SEG17 [7] (byte*) SCREEN_2#0 ← (byte*) malloc::return#3 -- pbuz1=pbuz2 + lda malloc.return_3 + sta SCREEN_2 + lda malloc.return_3+1 + sta SCREEN_2+1 +//SEG18 [8] phi from @4 to @2 [phi:@4->@2] +b2_from_b4: + jmp b2 +//SEG19 @2 +b2: +//SEG20 [9] call main + jsr main +//SEG21 [10] phi from @2 to @end [phi:@2->@end] +bend_from_b2: + jmp bend +//SEG22 @end +bend: +//SEG23 main +main: { + //SEG24 [11] *((byte*) SCREEN_1#0) ← (byte) 0 -- _deref_pbuz1=vbuc1 + lda #0 + ldy #0 + sta (SCREEN_1),y + //SEG25 [12] *((byte*) SCREEN_2#0) ← (byte) 0 -- _deref_pbuz1=vbuc1 + lda #0 + ldy #0 + sta (SCREEN_2),y + jmp breturn + //SEG26 main::@return + breturn: + //SEG27 [13] return + rts +} +//SEG28 malloc +malloc: { + .label return = $c + .label return_2 = 4 + .label return_3 = 8 + //SEG29 [15] (byte*) MEM#1 ← ++ (byte*) MEM#5 -- pbuz1=_inc_pbuz1 + inc MEM + bne !+ + inc MEM+1 + !: + //SEG30 [16] (byte*) malloc::return#0 ← (byte*) MEM#1 -- pbuz1=pbuz2 + lda MEM + sta return + lda MEM+1 + sta return+1 + jmp breturn + //SEG31 malloc::@return + breturn: + //SEG32 [17] return + rts +} +//SEG33 File Data + +REGISTER UPLIFT POTENTIAL REGISTERS +Statement [3] (byte*) malloc::return#2 ← (byte*) malloc::return#0 [ malloc::return#2 MEM#1 ] ( [ malloc::return#2 MEM#1 ] ) always clobbers reg byte a +Statement [4] (byte*) SCREEN_1#0 ← (byte*) malloc::return#2 [ SCREEN_1#0 MEM#1 ] ( [ SCREEN_1#0 MEM#1 ] ) always clobbers reg byte a +Statement [6] (byte*) malloc::return#3 ← (byte*) malloc::return#0 [ SCREEN_1#0 malloc::return#3 ] ( [ SCREEN_1#0 malloc::return#3 ] ) always clobbers reg byte a +Statement [7] (byte*) SCREEN_2#0 ← (byte*) malloc::return#3 [ SCREEN_1#0 SCREEN_2#0 ] ( [ SCREEN_1#0 SCREEN_2#0 ] ) always clobbers reg byte a +Statement [11] *((byte*) SCREEN_1#0) ← (byte) 0 [ SCREEN_2#0 ] ( main:9 [ SCREEN_2#0 ] ) always clobbers reg byte a reg byte y +Statement [12] *((byte*) SCREEN_2#0) ← (byte) 0 [ ] ( main:9 [ ] ) always clobbers reg byte a reg byte y +Statement [16] (byte*) malloc::return#0 ← (byte*) MEM#1 [ malloc::return#0 MEM#1 ] ( malloc:2 [ malloc::return#0 MEM#1 ] malloc:5 [ malloc::return#0 MEM#1 ] ) always clobbers reg byte a +Potential registers zp ZP_WORD:2 [ MEM#5 MEM#1 ] : zp ZP_WORD:2 , +Potential registers zp ZP_WORD:4 [ malloc::return#2 ] : zp ZP_WORD:4 , +Potential registers zp ZP_WORD:6 [ SCREEN_1#0 ] : zp ZP_WORD:6 , +Potential registers zp ZP_WORD:8 [ malloc::return#3 ] : zp ZP_WORD:8 , +Potential registers zp ZP_WORD:10 [ SCREEN_2#0 ] : zp ZP_WORD:10 , +Potential registers zp ZP_WORD:12 [ malloc::return#0 ] : zp ZP_WORD:12 , + +REGISTER UPLIFT SCOPES +Uplift Scope [malloc] 4: zp ZP_WORD:4 [ malloc::return#2 ] 4: zp ZP_WORD:8 [ malloc::return#3 ] 1.5: zp ZP_WORD:12 [ malloc::return#0 ] +Uplift Scope [] 5: zp ZP_WORD:2 [ MEM#5 MEM#1 ] 1.33: zp ZP_WORD:10 [ SCREEN_2#0 ] 0.8: zp ZP_WORD:6 [ SCREEN_1#0 ] +Uplift Scope [main] + +Uplifting [malloc] best 153 combination zp ZP_WORD:4 [ malloc::return#2 ] zp ZP_WORD:8 [ malloc::return#3 ] zp ZP_WORD:12 [ malloc::return#0 ] +Uplifting [] best 153 combination zp ZP_WORD:2 [ MEM#5 MEM#1 ] zp ZP_WORD:10 [ SCREEN_2#0 ] zp ZP_WORD:6 [ SCREEN_1#0 ] +Uplifting [main] best 153 combination +Coalescing zero page register with common assignment [ zp ZP_WORD:4 [ malloc::return#2 ] ] with [ zp ZP_WORD:6 [ SCREEN_1#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:8 [ malloc::return#3 ] ] with [ zp ZP_WORD:10 [ SCREEN_2#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:8 [ malloc::return#3 SCREEN_2#0 ] ] with [ zp ZP_WORD:12 [ malloc::return#0 ] ] - score: 1 +Allocated (was zp ZP_WORD:8) zp ZP_WORD:6 [ malloc::return#3 SCREEN_2#0 malloc::return#0 ] + +ASSEMBLER BEFORE OPTIMIZATION +//SEG0 File Comments +// Error where the compiler is reusing the same ZP for two byte* variables. +// SCREEN_1 and SCREEN_2 are both allocated to ZP: 4 +// Problem is that outside main() scope statements have zero call-paths and then isStatementAllocationOverlapping() never checks liveranges +// CallPath code must be rewritten to use @begin as the outermost call instead of main() +//SEG1 Basic Upstart +.pc = $801 "Basic" +:BasicUpstart(bbegin) +.pc = $80d "Program" +//SEG2 Global Constants & labels + .label MEM = 2 + .label SCREEN_1 = 4 + .label SCREEN_2 = 6 +//SEG3 @begin +bbegin: +//SEG4 [1] phi from @begin to @1 [phi:@begin->@1] +b1_from_bbegin: + jmp b1 +//SEG5 @1 +b1: +//SEG6 [2] call malloc +//SEG7 [14] phi from @1 to malloc [phi:@1->malloc] +malloc_from_b1: +//SEG8 [14] phi (byte*) MEM#5 = (byte*) 1024 [phi:@1->malloc#0] -- pbuz1=pbuc1 + lda #<$400 + sta MEM + lda #>$400 + sta MEM+1 + jsr malloc +//SEG9 [3] (byte*) malloc::return#2 ← (byte*) malloc::return#0 -- pbuz1=pbuz2 + lda malloc.return + sta malloc.return_2 + lda malloc.return+1 + sta malloc.return_2+1 + jmp b3 +//SEG10 @3 +b3: +//SEG11 [4] (byte*) SCREEN_1#0 ← (byte*) malloc::return#2 +//SEG12 [5] call malloc +//SEG13 [14] phi from @3 to malloc [phi:@3->malloc] +malloc_from_b3: +//SEG14 [14] phi (byte*) MEM#5 = (byte*) MEM#1 [phi:@3->malloc#0] -- register_copy + jsr malloc +//SEG15 [6] (byte*) malloc::return#3 ← (byte*) malloc::return#0 + jmp b4 +//SEG16 @4 +b4: +//SEG17 [7] (byte*) SCREEN_2#0 ← (byte*) malloc::return#3 +//SEG18 [8] phi from @4 to @2 [phi:@4->@2] +b2_from_b4: + jmp b2 +//SEG19 @2 +b2: +//SEG20 [9] call main + jsr main +//SEG21 [10] phi from @2 to @end [phi:@2->@end] +bend_from_b2: + jmp bend +//SEG22 @end +bend: +//SEG23 main +main: { + //SEG24 [11] *((byte*) SCREEN_1#0) ← (byte) 0 -- _deref_pbuz1=vbuc1 + lda #0 + ldy #0 + sta (SCREEN_1),y + //SEG25 [12] *((byte*) SCREEN_2#0) ← (byte) 0 -- _deref_pbuz1=vbuc1 + lda #0 + ldy #0 + sta (SCREEN_2),y + jmp breturn + //SEG26 main::@return + breturn: + //SEG27 [13] return + rts +} +//SEG28 malloc +malloc: { + .label return = 6 + .label return_2 = 4 + //SEG29 [15] (byte*) MEM#1 ← ++ (byte*) MEM#5 -- pbuz1=_inc_pbuz1 + inc MEM + bne !+ + inc MEM+1 + !: + //SEG30 [16] (byte*) malloc::return#0 ← (byte*) MEM#1 -- pbuz1=pbuz2 + lda MEM + sta return + lda MEM+1 + sta return+1 + jmp breturn + //SEG31 malloc::@return + breturn: + //SEG32 [17] return + rts +} +//SEG33 File Data + +ASSEMBLER OPTIMIZATIONS +Removing instruction jmp b1 +Removing instruction jmp b3 +Removing instruction jmp b4 +Removing instruction jmp b2 +Removing instruction jmp bend +Removing instruction jmp breturn +Removing instruction jmp breturn +Succesful ASM optimization Pass5NextJumpElimination +Replacing instruction ldy #0 with TAY +Removing instruction lda #0 +Removing instruction ldy #0 +Succesful ASM optimization Pass5UnnecesaryLoadElimination +Removing instruction b1_from_bbegin: +Removing instruction b1: +Removing instruction malloc_from_b1: +Removing instruction malloc_from_b3: +Removing instruction b4: +Removing instruction b2_from_b4: +Removing instruction bend_from_b2: +Succesful ASM optimization Pass5RedundantLabelElimination +Removing instruction b3: +Removing instruction b2: +Removing instruction bend: +Removing instruction breturn: +Removing instruction breturn: +Succesful ASM optimization Pass5UnusedLabelElimination +Adding RTS to root block +Succesful ASM optimization Pass5AddMainRts + +FINAL SYMBOL TABLE +(label) @1 +(label) @2 +(label) @3 +(label) @4 +(label) @begin +(label) @end +(byte*) MEM +(byte*) MEM#1 MEM zp ZP_WORD:2 1.0 +(byte*) MEM#5 MEM zp ZP_WORD:2 4.0 +(byte*) SCREEN_1 +(byte*) SCREEN_1#0 SCREEN_1 zp ZP_WORD:4 0.8 +(byte*) SCREEN_2 +(byte*) SCREEN_2#0 SCREEN_2 zp ZP_WORD:6 1.3333333333333333 +(void()) main() +(label) main::@return +(byte*()) malloc() +(label) malloc::@return +(byte*) malloc::return +(byte*) malloc::return#0 return zp ZP_WORD:6 1.5 +(byte*) malloc::return#2 return#2 zp ZP_WORD:4 4.0 +(byte*) malloc::return#3 return zp ZP_WORD:6 4.0 + +zp ZP_WORD:2 [ MEM#5 MEM#1 ] +zp ZP_WORD:4 [ malloc::return#2 SCREEN_1#0 ] +zp ZP_WORD:6 [ malloc::return#3 SCREEN_2#0 malloc::return#0 ] + + +FINAL ASSEMBLER +Score: 98 + +//SEG0 File Comments +// Error where the compiler is reusing the same ZP for two byte* variables. +// SCREEN_1 and SCREEN_2 are both allocated to ZP: 4 +// Problem is that outside main() scope statements have zero call-paths and then isStatementAllocationOverlapping() never checks liveranges +// CallPath code must be rewritten to use @begin as the outermost call instead of main() +//SEG1 Basic Upstart +.pc = $801 "Basic" +:BasicUpstart(bbegin) +.pc = $80d "Program" +//SEG2 Global Constants & labels + .label MEM = 2 + .label SCREEN_1 = 4 + .label SCREEN_2 = 6 +//SEG3 @begin +bbegin: +//SEG4 [1] phi from @begin to @1 [phi:@begin->@1] +//SEG5 @1 +//SEG6 [2] call malloc +//SEG7 [14] phi from @1 to malloc [phi:@1->malloc] +//SEG8 [14] phi (byte*) MEM#5 = (byte*) 1024 [phi:@1->malloc#0] -- pbuz1=pbuc1 + lda #<$400 + sta MEM + lda #>$400 + sta MEM+1 + jsr malloc +//SEG9 [3] (byte*) malloc::return#2 ← (byte*) malloc::return#0 -- pbuz1=pbuz2 + lda malloc.return + sta malloc.return_2 + lda malloc.return+1 + sta malloc.return_2+1 +//SEG10 @3 +//SEG11 [4] (byte*) SCREEN_1#0 ← (byte*) malloc::return#2 +//SEG12 [5] call malloc +//SEG13 [14] phi from @3 to malloc [phi:@3->malloc] +//SEG14 [14] phi (byte*) MEM#5 = (byte*) MEM#1 [phi:@3->malloc#0] -- register_copy + jsr malloc +//SEG15 [6] (byte*) malloc::return#3 ← (byte*) malloc::return#0 +//SEG16 @4 +//SEG17 [7] (byte*) SCREEN_2#0 ← (byte*) malloc::return#3 +//SEG18 [8] phi from @4 to @2 [phi:@4->@2] +//SEG19 @2 +//SEG20 [9] call main + jsr main + rts +//SEG21 [10] phi from @2 to @end [phi:@2->@end] +//SEG22 @end +//SEG23 main +main: { + //SEG24 [11] *((byte*) SCREEN_1#0) ← (byte) 0 -- _deref_pbuz1=vbuc1 + lda #0 + tay + sta (SCREEN_1),y + //SEG25 [12] *((byte*) SCREEN_2#0) ← (byte) 0 -- _deref_pbuz1=vbuc1 + sta (SCREEN_2),y + //SEG26 main::@return + //SEG27 [13] return + rts +} +//SEG28 malloc +malloc: { + .label return = 6 + .label return_2 = 4 + //SEG29 [15] (byte*) MEM#1 ← ++ (byte*) MEM#5 -- pbuz1=_inc_pbuz1 + inc MEM + bne !+ + inc MEM+1 + !: + //SEG30 [16] (byte*) malloc::return#0 ← (byte*) MEM#1 -- pbuz1=pbuz2 + lda MEM + sta return + lda MEM+1 + sta return+1 + //SEG31 malloc::@return + //SEG32 [17] return + rts +} +//SEG33 File Data + diff --git a/src/test/ref/liverange-problem-0.sym b/src/test/ref/liverange-problem-0.sym new file mode 100644 index 000000000..4d05da18f --- /dev/null +++ b/src/test/ref/liverange-problem-0.sym @@ -0,0 +1,25 @@ +(label) @1 +(label) @2 +(label) @3 +(label) @4 +(label) @begin +(label) @end +(byte*) MEM +(byte*) MEM#1 MEM zp ZP_WORD:2 1.0 +(byte*) MEM#5 MEM zp ZP_WORD:2 4.0 +(byte*) SCREEN_1 +(byte*) SCREEN_1#0 SCREEN_1 zp ZP_WORD:4 0.8 +(byte*) SCREEN_2 +(byte*) SCREEN_2#0 SCREEN_2 zp ZP_WORD:6 1.3333333333333333 +(void()) main() +(label) main::@return +(byte*()) malloc() +(label) malloc::@return +(byte*) malloc::return +(byte*) malloc::return#0 return zp ZP_WORD:6 1.5 +(byte*) malloc::return#2 return#2 zp ZP_WORD:4 4.0 +(byte*) malloc::return#3 return zp ZP_WORD:6 4.0 + +zp ZP_WORD:2 [ MEM#5 MEM#1 ] +zp ZP_WORD:4 [ malloc::return#2 SCREEN_1#0 ] +zp ZP_WORD:6 [ malloc::return#3 SCREEN_2#0 malloc::return#0 ] diff --git a/src/test/ref/longbranch-interrupt-problem.log b/src/test/ref/longbranch-interrupt-problem.log index 40795ba41..ca4692a53 100644 --- a/src/test/ref/longbranch-interrupt-problem.log +++ b/src/test/ref/longbranch-interrupt-problem.log @@ -328,7 +328,7 @@ irq: { //SEG31 File Data REGISTER UPLIFT POTENTIAL REGISTERS -Statement [0] (byte) col#0 ← (byte) 0 [ col#0 ] ( ) always clobbers reg byte a +Statement [0] (byte) col#0 ← (byte) 0 [ col#0 ] ( [ col#0 ] ) always clobbers reg byte a Statement [4] *((const void()**) KERNEL_IRQ#0) ← &interrupt(KERNEL_MIN)(void()) irq() [ col#0 ] ( main:2 [ col#0 ] ) always clobbers reg byte a Statement [6] if((byte) col#12<(byte) $a+(byte) 1) goto main::@1 [ ] ( main:2 [ ] ) always clobbers reg byte a Statement [7] (byte) col#1 ← (byte) 0 [ col#1 ] ( main:2 [ col#1 ] ) always clobbers reg byte a diff --git a/src/test/ref/multiplexer-irq/simple-multiplexer-irq.log b/src/test/ref/multiplexer-irq/simple-multiplexer-irq.log index 149fca8ee..90fa0d24a 100644 --- a/src/test/ref/multiplexer-irq/simple-multiplexer-irq.log +++ b/src/test/ref/multiplexer-irq/simple-multiplexer-irq.log @@ -3180,11 +3180,11 @@ YSIN: REGISTER UPLIFT POTENTIAL REGISTERS -Statement [1] (byte) plex_show_idx#0 ← (byte) 0 [ plex_show_idx#0 ] ( ) always clobbers reg byte a -Statement [2] (byte) plex_sprite_idx#0 ← (byte) 0 [ plex_show_idx#0 plex_sprite_idx#0 ] ( ) always clobbers reg byte a -Statement [3] (byte) plex_sprite_msb#0 ← (byte) 1 [ plex_show_idx#0 plex_sprite_idx#0 plex_sprite_msb#0 ] ( ) always clobbers reg byte a -Statement [4] (byte) plex_free_next#31 ← (byte) 0 [ plex_show_idx#0 plex_sprite_idx#0 plex_sprite_msb#0 plex_free_next#31 ] ( ) always clobbers reg byte a -Statement [6] (bool) framedone#17 ← true [ plex_show_idx#0 plex_sprite_idx#0 plex_sprite_msb#0 plex_free_next#31 framedone#17 ] ( ) always clobbers reg byte a +Statement [1] (byte) plex_show_idx#0 ← (byte) 0 [ plex_show_idx#0 ] ( [ plex_show_idx#0 ] ) always clobbers reg byte a +Statement [2] (byte) plex_sprite_idx#0 ← (byte) 0 [ plex_show_idx#0 plex_sprite_idx#0 ] ( [ plex_show_idx#0 plex_sprite_idx#0 ] ) always clobbers reg byte a +Statement [3] (byte) plex_sprite_msb#0 ← (byte) 1 [ plex_show_idx#0 plex_sprite_idx#0 plex_sprite_msb#0 ] ( [ plex_show_idx#0 plex_sprite_idx#0 plex_sprite_msb#0 ] ) always clobbers reg byte a +Statement [4] (byte) plex_free_next#31 ← (byte) 0 [ plex_show_idx#0 plex_sprite_idx#0 plex_sprite_msb#0 plex_free_next#31 ] ( [ plex_show_idx#0 plex_sprite_idx#0 plex_sprite_msb#0 plex_free_next#31 ] ) always clobbers reg byte a +Statement [6] (bool) framedone#17 ← true [ plex_show_idx#0 plex_sprite_idx#0 plex_sprite_msb#0 plex_free_next#31 framedone#17 ] ( [ plex_show_idx#0 plex_sprite_idx#0 plex_sprite_msb#0 plex_free_next#31 framedone#17 ] ) always clobbers reg byte a Statement [17] if((bool) framedone#12) goto loop::@3 [ framedone#12 loop::sin_idx#6 ] ( main:8::loop:13 [ framedone#12 loop::sin_idx#6 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp ZP_BYTE:2 [ loop::sin_idx#6 loop::sin_idx#1 ] Statement [18] *((const byte*) BORDERCOL#0) ← (const byte) RED#0 [ loop::sin_idx#6 ] ( main:8::loop:13 [ loop::sin_idx#6 ] ) always clobbers reg byte a @@ -3252,11 +3252,11 @@ Statement [116] (byte~) plexShowSprite::$6 ← (byte~) plexShowSprite::$5 & (byt Statement [119] if((byte) plex_sprite_msb#3!=(byte) 0) goto plexShowSprite::@return [ plexShowSprite::$6 plex_show_idx#16 plexShowSprite::plexFreeAdd1_$2#0 plex_sprite_msb#3 ] ( plexShowSprite:87 [ framedone#17 plexShowSprite::$6 plex_show_idx#16 plexShowSprite::plexFreeAdd1_$2#0 plex_sprite_msb#3 ] ) always clobbers reg byte a Statement [120] (byte) plex_sprite_msb#4 ← (byte) 1 [ plexShowSprite::$6 plex_show_idx#16 plexShowSprite::plexFreeAdd1_$2#0 plex_sprite_msb#4 ] ( plexShowSprite:87 [ framedone#17 plexShowSprite::$6 plex_show_idx#16 plexShowSprite::plexFreeAdd1_$2#0 plex_sprite_msb#4 ] ) always clobbers reg byte a Statement [123] *((const byte*) SPRITES_XMSB#0) ← *((const byte*) SPRITES_XMSB#0) | (byte) plex_sprite_msb#28 [ plex_sprite_idx#25 plex_show_idx#27 plex_sprite_msb#28 plexShowSprite::plexFreeAdd1_$2#0 ] ( plexShowSprite:87 [ framedone#17 plex_sprite_idx#25 plex_show_idx#27 plex_sprite_msb#28 plexShowSprite::plexFreeAdd1_$2#0 ] ) always clobbers reg byte a -Statement [1] (byte) plex_show_idx#0 ← (byte) 0 [ plex_show_idx#0 ] ( ) always clobbers reg byte a -Statement [2] (byte) plex_sprite_idx#0 ← (byte) 0 [ plex_show_idx#0 plex_sprite_idx#0 ] ( ) always clobbers reg byte a -Statement [3] (byte) plex_sprite_msb#0 ← (byte) 1 [ plex_show_idx#0 plex_sprite_idx#0 plex_sprite_msb#0 ] ( ) always clobbers reg byte a -Statement [4] (byte) plex_free_next#31 ← (byte) 0 [ plex_show_idx#0 plex_sprite_idx#0 plex_sprite_msb#0 plex_free_next#31 ] ( ) always clobbers reg byte a -Statement [6] (bool) framedone#17 ← true [ plex_show_idx#0 plex_sprite_idx#0 plex_sprite_msb#0 plex_free_next#31 framedone#17 ] ( ) always clobbers reg byte a +Statement [1] (byte) plex_show_idx#0 ← (byte) 0 [ plex_show_idx#0 ] ( [ plex_show_idx#0 ] ) always clobbers reg byte a +Statement [2] (byte) plex_sprite_idx#0 ← (byte) 0 [ plex_show_idx#0 plex_sprite_idx#0 ] ( [ plex_show_idx#0 plex_sprite_idx#0 ] ) always clobbers reg byte a +Statement [3] (byte) plex_sprite_msb#0 ← (byte) 1 [ plex_show_idx#0 plex_sprite_idx#0 plex_sprite_msb#0 ] ( [ plex_show_idx#0 plex_sprite_idx#0 plex_sprite_msb#0 ] ) always clobbers reg byte a +Statement [4] (byte) plex_free_next#31 ← (byte) 0 [ plex_show_idx#0 plex_sprite_idx#0 plex_sprite_msb#0 plex_free_next#31 ] ( [ plex_show_idx#0 plex_sprite_idx#0 plex_sprite_msb#0 plex_free_next#31 ] ) always clobbers reg byte a +Statement [6] (bool) framedone#17 ← true [ plex_show_idx#0 plex_sprite_idx#0 plex_sprite_msb#0 plex_free_next#31 framedone#17 ] ( [ plex_show_idx#0 plex_sprite_idx#0 plex_sprite_msb#0 plex_free_next#31 framedone#17 ] ) always clobbers reg byte a Statement [17] if((bool) framedone#12) goto loop::@3 [ framedone#12 loop::sin_idx#6 ] ( main:8::loop:13 [ framedone#12 loop::sin_idx#6 ] ) always clobbers reg byte a Statement [18] *((const byte*) BORDERCOL#0) ← (const byte) RED#0 [ loop::sin_idx#6 ] ( main:8::loop:13 [ loop::sin_idx#6 ] ) always clobbers reg byte a Statement [21] *((const byte[PLEX_COUNT#0]) PLEX_YPOS#0 + (byte) loop::sy#2) ← *((const byte[$100]) YSIN#0 + (byte) loop::y_idx#2) [ loop::sin_idx#6 loop::y_idx#2 loop::sy#2 ] ( main:8::loop:13 [ loop::sin_idx#6 loop::y_idx#2 loop::sy#2 ] ) always clobbers reg byte a @@ -3310,11 +3310,11 @@ Statement [116] (byte~) plexShowSprite::$6 ← (byte~) plexShowSprite::$5 & (byt Statement [119] if((byte) plex_sprite_msb#3!=(byte) 0) goto plexShowSprite::@return [ plexShowSprite::$6 plex_show_idx#16 plexShowSprite::plexFreeAdd1_$2#0 plex_sprite_msb#3 ] ( plexShowSprite:87 [ framedone#17 plexShowSprite::$6 plex_show_idx#16 plexShowSprite::plexFreeAdd1_$2#0 plex_sprite_msb#3 ] ) always clobbers reg byte a Statement [120] (byte) plex_sprite_msb#4 ← (byte) 1 [ plexShowSprite::$6 plex_show_idx#16 plexShowSprite::plexFreeAdd1_$2#0 plex_sprite_msb#4 ] ( plexShowSprite:87 [ framedone#17 plexShowSprite::$6 plex_show_idx#16 plexShowSprite::plexFreeAdd1_$2#0 plex_sprite_msb#4 ] ) always clobbers reg byte a Statement [123] *((const byte*) SPRITES_XMSB#0) ← *((const byte*) SPRITES_XMSB#0) | (byte) plex_sprite_msb#28 [ plex_sprite_idx#25 plex_show_idx#27 plex_sprite_msb#28 plexShowSprite::plexFreeAdd1_$2#0 ] ( plexShowSprite:87 [ framedone#17 plex_sprite_idx#25 plex_show_idx#27 plex_sprite_msb#28 plexShowSprite::plexFreeAdd1_$2#0 ] ) always clobbers reg byte a -Statement [1] (byte) plex_show_idx#0 ← (byte) 0 [ plex_show_idx#0 ] ( ) always clobbers reg byte a -Statement [2] (byte) plex_sprite_idx#0 ← (byte) 0 [ plex_show_idx#0 plex_sprite_idx#0 ] ( ) always clobbers reg byte a -Statement [3] (byte) plex_sprite_msb#0 ← (byte) 1 [ plex_show_idx#0 plex_sprite_idx#0 plex_sprite_msb#0 ] ( ) always clobbers reg byte a -Statement [4] (byte) plex_free_next#31 ← (byte) 0 [ plex_show_idx#0 plex_sprite_idx#0 plex_sprite_msb#0 plex_free_next#31 ] ( ) always clobbers reg byte a -Statement [6] (bool) framedone#17 ← true [ plex_show_idx#0 plex_sprite_idx#0 plex_sprite_msb#0 plex_free_next#31 framedone#17 ] ( ) always clobbers reg byte a +Statement [1] (byte) plex_show_idx#0 ← (byte) 0 [ plex_show_idx#0 ] ( [ plex_show_idx#0 ] ) always clobbers reg byte a +Statement [2] (byte) plex_sprite_idx#0 ← (byte) 0 [ plex_show_idx#0 plex_sprite_idx#0 ] ( [ plex_show_idx#0 plex_sprite_idx#0 ] ) always clobbers reg byte a +Statement [3] (byte) plex_sprite_msb#0 ← (byte) 1 [ plex_show_idx#0 plex_sprite_idx#0 plex_sprite_msb#0 ] ( [ plex_show_idx#0 plex_sprite_idx#0 plex_sprite_msb#0 ] ) always clobbers reg byte a +Statement [4] (byte) plex_free_next#31 ← (byte) 0 [ plex_show_idx#0 plex_sprite_idx#0 plex_sprite_msb#0 plex_free_next#31 ] ( [ plex_show_idx#0 plex_sprite_idx#0 plex_sprite_msb#0 plex_free_next#31 ] ) always clobbers reg byte a +Statement [6] (bool) framedone#17 ← true [ plex_show_idx#0 plex_sprite_idx#0 plex_sprite_msb#0 plex_free_next#31 framedone#17 ] ( [ plex_show_idx#0 plex_sprite_idx#0 plex_sprite_msb#0 plex_free_next#31 framedone#17 ] ) always clobbers reg byte a Statement [17] if((bool) framedone#12) goto loop::@3 [ framedone#12 loop::sin_idx#6 ] ( main:8::loop:13 [ framedone#12 loop::sin_idx#6 ] ) always clobbers reg byte a Statement [18] *((const byte*) BORDERCOL#0) ← (const byte) RED#0 [ loop::sin_idx#6 ] ( main:8::loop:13 [ loop::sin_idx#6 ] ) always clobbers reg byte a Statement [21] *((const byte[PLEX_COUNT#0]) PLEX_YPOS#0 + (byte) loop::sy#2) ← *((const byte[$100]) YSIN#0 + (byte) loop::y_idx#2) [ loop::sin_idx#6 loop::y_idx#2 loop::sy#2 ] ( main:8::loop:13 [ loop::sin_idx#6 loop::y_idx#2 loop::sy#2 ] ) always clobbers reg byte a diff --git a/src/test/ref/nes-array.asm b/src/test/ref/nes-array.asm new file mode 100644 index 000000000..18fb83a2c --- /dev/null +++ b/src/test/ref/nes-array.asm @@ -0,0 +1,63 @@ +// Test a bit of array code from the NES forum +// https://forums.nesdev.com/viewtopic.php?f=2&t=18735 +.pc = $801 "Basic" +:BasicUpstart(main) +.pc = $80d "Program" + .const SIZEOF_SIGNED_WORD = 2 +main: { + .label SCREEN = $400 + .label _1 = 2 + .label _3 = 2 + .label y1 = 4 + .label y2 = 6 + lda #<$1234 + sta y1 + lda #>$1234 + sta y1+1 + lda #<$1234 + sta y2 + lda #>$1234 + sta y2+1 + lda #y1 + sta foo.y+1 + ldx #1 + jsr foo + lda _1 + sta SCREEN + lda _1+1 + sta SCREEN+1 + lda #y2 + sta foo.y+1 + ldx #2 + jsr foo + lda _3 + sta SCREEN+SIZEOF_SIGNED_WORD + lda _3+1 + sta SCREEN+SIZEOF_SIGNED_WORD+1 + rts +} +// foo(byte register(X) x, signed word* zeropage(2) y) +foo: { + .label return = 2 + .label y = 2 + txa + asl + tax + clc + ldy #0 + lda wow,x + adc (return),y + pha + iny + lda wow+1,x + adc (return),y + sta return+1 + pla + sta return + rts +} + wow: .word $cafe, $babe, $1234, $5678 diff --git a/src/test/ref/nes-array.cfg b/src/test/ref/nes-array.cfg new file mode 100644 index 000000000..e2de90afb --- /dev/null +++ b/src/test/ref/nes-array.cfg @@ -0,0 +1,37 @@ +@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] (signed word) main::y1#0 ← (signed word) $1234 + [5] (signed word) main::y2#0 ← (signed word) $1234 + [6] call foo + [7] (signed word) foo::return#2 ← (signed word) foo::return#0 + to:main::@1 +main::@1: scope:[main] from main + [8] (signed word~) main::$1 ← (signed word) foo::return#2 + [9] *((const signed word*) main::SCREEN#0) ← (signed word~) main::$1 + [10] call foo + [11] (signed word) foo::return#3 ← (signed word) foo::return#0 + to:main::@2 +main::@2: scope:[main] from main::@1 + [12] (signed word~) main::$3 ← (signed word) foo::return#3 + [13] *((const signed word*) main::SCREEN#0+(const byte) SIZEOF_SIGNED_WORD) ← (signed word~) main::$3 + to:main::@return +main::@return: scope:[main] from main::@2 + [14] return + to:@return +foo: scope:[foo] from main main::@1 + [15] (signed word*) foo::y#2 ← phi( main/&(signed word) main::y1#0 main::@1/&(signed word) main::y2#0 ) + [15] (byte) foo::x#2 ← phi( main/(byte) 1 main::@1/(byte) 2 ) + [16] (byte~) foo::$1 ← (byte) foo::x#2 << (byte) 1 + [17] (signed word) foo::return#0 ← *((const signed word[4]) wow#0 + (byte~) foo::$1) + *((signed word*) foo::y#2) + to:foo::@return +foo::@return: scope:[foo] from foo + [18] return + to:@return diff --git a/src/test/ref/nes-array.log b/src/test/ref/nes-array.log new file mode 100644 index 000000000..c8d7c9e73 --- /dev/null +++ b/src/test/ref/nes-array.log @@ -0,0 +1,752 @@ +Setting inferred volatile on symbol affected by address-of (signed word*~) main::$0 ← & (signed word) main::y1 +Setting inferred volatile on symbol affected by address-of (signed word*~) main::$2 ← & (signed word) main::y2 +Fixing pointer increment (signed word*) main::SCREEN ← ++ (signed word*) main::SCREEN +Fixing pointer increment (signed word*) main::SCREEN ← ++ (signed word*) main::SCREEN +Fixing pointer array-indexing *((signed word[4]) wow + (byte) foo::x) +Culled Empty Block (label) foo::@1 +Culled Empty Block (label) @1 + +CONTROL FLOW GRAPH SSA +@begin: scope:[] from + (signed word[4]) wow#0 ← { (number) $cafe, (number) $babe, (number) $1234, (number) $5678 } + to:@2 +foo: scope:[foo] from main main::@1 + (signed word*) foo::y#2 ← phi( main/(signed word*) foo::y#0 main::@1/(signed word*) foo::y#1 ) + (byte) foo::x#2 ← phi( main/(byte) foo::x#0 main::@1/(byte) foo::x#1 ) + (byte~) foo::$1 ← (byte) foo::x#2 * (const byte) SIZEOF_SIGNED_WORD + (signed word~) foo::$0 ← *((signed word[4]) wow#0 + (byte~) foo::$1) + *((signed word*) foo::y#2) + (signed word) foo::return#0 ← (signed word~) foo::$0 + to:foo::@return +foo::@return: scope:[foo] from foo + (signed word) foo::return#4 ← phi( foo/(signed word) foo::return#0 ) + (signed word) foo::return#1 ← (signed word) foo::return#4 + return + to:@return +main: scope:[main] from @2 + (signed word*) main::SCREEN#0 ← ((signed word*)) (number) $400 + (signed word) main::y1#0 ← (number) $1234 + (signed word) main::y2#0 ← (number) $1234 + (signed word*~) main::$0 ← & (signed word) main::y1#0 + (byte) foo::x#0 ← (number) 1 + (signed word*) foo::y#0 ← (signed word*~) main::$0 + call foo + (signed word) foo::return#2 ← (signed word) foo::return#1 + to:main::@1 +main::@1: scope:[main] from main + (signed word) main::y2#1 ← phi( main/(signed word) main::y2#0 ) + (signed word*) main::SCREEN#3 ← phi( main/(signed word*) main::SCREEN#0 ) + (signed word) foo::return#5 ← phi( main/(signed word) foo::return#2 ) + (signed word~) main::$1 ← (signed word) foo::return#5 + *((signed word*) main::SCREEN#3) ← (signed word~) main::$1 + (signed word*) main::SCREEN#1 ← (signed word*) main::SCREEN#3 + (const byte) SIZEOF_SIGNED_WORD + (signed word*~) main::$2 ← & (signed word) main::y2#1 + (byte) foo::x#1 ← (number) 2 + (signed word*) foo::y#1 ← (signed word*~) main::$2 + call foo + (signed word) foo::return#3 ← (signed word) foo::return#1 + to:main::@2 +main::@2: scope:[main] from main::@1 + (signed word*) main::SCREEN#4 ← phi( main::@1/(signed word*) main::SCREEN#1 ) + (signed word) foo::return#6 ← phi( main::@1/(signed word) foo::return#3 ) + (signed word~) main::$3 ← (signed word) foo::return#6 + *((signed word*) main::SCREEN#4) ← (signed word~) main::$3 + (signed word*) main::SCREEN#2 ← (signed word*) main::SCREEN#4 + (const byte) SIZEOF_SIGNED_WORD + to:main::@return +main::@return: scope:[main] from main::@2 + return + to:@return +@2: scope:[] from @begin + call main + to:@3 +@3: scope:[] from @2 + to:@end +@end: scope:[] from @3 + +SYMBOL TABLE SSA +(label) @2 +(label) @3 +(label) @begin +(label) @end +(const byte) SIZEOF_SIGNED_WORD = (byte) 2 +(signed word()) foo((byte) foo::x , (signed word*) foo::y) +(signed word~) foo::$0 +(byte~) foo::$1 +(label) foo::@return +(signed word) foo::return +(signed word) foo::return#0 +(signed word) foo::return#1 +(signed word) foo::return#2 +(signed word) foo::return#3 +(signed word) foo::return#4 +(signed word) foo::return#5 +(signed word) foo::return#6 +(byte) foo::x +(byte) foo::x#0 +(byte) foo::x#1 +(byte) foo::x#2 +(signed word*) foo::y +(signed word*) foo::y#0 +(signed word*) foo::y#1 +(signed word*) foo::y#2 +(void()) main() +(signed word*~) main::$0 +(signed word~) main::$1 +(signed word*~) main::$2 +(signed word~) main::$3 +(label) main::@1 +(label) main::@2 +(label) main::@return +(signed word*) main::SCREEN +(signed word*) main::SCREEN#0 +(signed word*) main::SCREEN#1 +(signed word*) main::SCREEN#2 +(signed word*) main::SCREEN#3 +(signed word*) main::SCREEN#4 +(signed word) main::y1 +(signed word) main::y1#0 +(signed word) main::y2 +(signed word) main::y2#0 +(signed word) main::y2#1 +(signed word[4]) wow +(signed word[4]) wow#0 + +Adding number conversion cast (snumber) $1234 in (signed word) main::y1#0 ← (number) $1234 +Adding number conversion cast (snumber) $1234 in (signed word) main::y2#0 ← (number) $1234 +Adding number conversion cast (unumber) 1 in (byte) foo::x#0 ← (number) 1 +Adding number conversion cast (unumber) 2 in (byte) foo::x#1 ← (number) 2 +Successful SSA optimization PassNAddNumberTypeConversions +Adding number conversion cast (signed word) to elements in (signed word[4]) wow#0 ← { (signed word)(number) $cafe, (signed word)(number) $babe, (signed word)(number) $1234, (signed word)(number) $5678 } +Successful SSA optimization PassNAddArrayNumberTypeConversions +Inlining cast (signed word*) main::SCREEN#0 ← (signed word*)(number) $400 +Inlining cast (signed word) main::y1#0 ← (snumber)(number) $1234 +Inlining cast (signed word) main::y2#0 ← (snumber)(number) $1234 +Inlining cast (byte) foo::x#0 ← (unumber)(number) 1 +Inlining cast (byte) foo::x#1 ← (unumber)(number) 2 +Successful SSA optimization Pass2InlineCast +Simplifying constant integer cast $cafe +Simplifying constant integer cast $babe +Simplifying constant integer cast $1234 +Simplifying constant integer cast $5678 +Simplifying constant pointer cast (signed word*) 1024 +Simplifying constant integer cast $1234 +Simplifying constant integer cast $1234 +Simplifying constant integer cast 1 +Simplifying constant integer cast 2 +Successful SSA optimization PassNCastSimplification +Finalized signed number type (signed word) $1234 +Finalized signed number type (signed word) $1234 +Finalized unsigned number type (byte) 1 +Finalized unsigned number type (byte) 2 +Successful SSA optimization PassNFinalizeNumberTypeConversions +Alias (signed word) foo::return#0 = (signed word~) foo::$0 (signed word) foo::return#4 (signed word) foo::return#1 +Alias (signed word*) foo::y#0 = (signed word*~) main::$0 +Alias (signed word) foo::return#2 = (signed word) foo::return#5 +Alias (signed word*) main::SCREEN#0 = (signed word*) main::SCREEN#3 +Alias (signed word) main::y2#0 = (signed word) main::y2#1 +Alias (signed word*) foo::y#1 = (signed word*~) main::$2 +Alias (signed word) foo::return#3 = (signed word) foo::return#6 +Alias (signed word*) main::SCREEN#1 = (signed word*) main::SCREEN#4 +Successful SSA optimization Pass2AliasElimination +Constant right-side identified [0] (signed word[4]) wow#0 ← { (signed word) $cafe, (signed word) $babe, (signed word) $1234, (signed word) $5678 } +Constant right-side identified [11] (signed word*) foo::y#0 ← & (signed word) main::y1#0 +Constant right-side identified [20] (signed word*) foo::y#1 ← & (signed word) main::y2#0 +Successful SSA optimization Pass2ConstantRValueConsolidation +Constant (const signed word[4]) wow#0 = { $cafe, $babe, $1234, $5678 } +Constant (const signed word*) main::SCREEN#0 = (signed word*) 1024 +Constant (const signed word*) foo::y#0 = &main::y1#0 +Constant (const byte) foo::x#0 = 1 +Constant (const signed word*) foo::y#1 = &main::y2#0 +Constant (const byte) foo::x#1 = 2 +Successful SSA optimization Pass2ConstantIdentification +Converting *(pointer+n) to pointer[n] [27] *((signed word*) main::SCREEN#1) ← (signed word~) main::$3 -- *(main::SCREEN#0 + SIZEOF_SIGNED_WORD) +Successful SSA optimization Pass2InlineDerefIdx +Eliminating unused variable (signed word*) main::SCREEN#2 and assignment [15] (signed word*) main::SCREEN#2 ← (signed word*) main::SCREEN#1 + (const byte) SIZEOF_SIGNED_WORD +Successful SSA optimization PassNEliminateUnusedVars +Eliminating unused variable (signed word*) main::SCREEN#1 and assignment [10] (signed word*) main::SCREEN#1 ← (const signed word*) main::SCREEN#0 + (const byte) SIZEOF_SIGNED_WORD +Successful SSA optimization PassNEliminateUnusedVars +Rewriting multiplication to use shift [1] (byte~) foo::$1 ← (byte) foo::x#2 * (const byte) SIZEOF_SIGNED_WORD +Successful SSA optimization Pass2MultiplyToShiftRewriting +Inlining constant with var siblings (const signed word*) foo::y#0 +Inlining constant with var siblings (const byte) foo::x#0 +Inlining constant with var siblings (const signed word*) foo::y#1 +Inlining constant with var siblings (const byte) foo::x#1 +Constant inlined foo::y#0 = &(signed word) main::y1#0 +Constant inlined foo::x#1 = (byte) 2 +Constant inlined foo::y#1 = &(signed word) main::y2#0 +Constant inlined foo::x#0 = (byte) 1 +Successful SSA optimization Pass2ConstantInlining +Consolidated array index constant in *(main::SCREEN#0+SIZEOF_SIGNED_WORD) +Successful SSA optimization Pass2ConstantAdditionElimination +Adding NOP phi() at start of @begin +Adding NOP phi() at start of @2 +Adding NOP phi() at start of @3 +Adding NOP phi() at start of @end +CALL GRAPH +Calls in [] to main:2 +Calls in [main] to foo:7 foo:11 + +Created 2 initial phi equivalence classes +Coalesced down to 2 phi equivalence classes +Culled Empty Block (label) @3 +Renumbering block @2 to @1 +Adding NOP phi() at start of @begin +Adding NOP phi() at start of @1 +Adding NOP phi() at start of @end + +FINAL CONTROL FLOW GRAPH +@begin: scope:[] from + [0] phi() + to:@1 +@1: scope:[] from @begin + [1] phi() + [2] call main + to:@end +@end: scope:[] from @1 + [3] phi() +main: scope:[main] from @1 + [4] (signed word) main::y1#0 ← (signed word) $1234 + [5] (signed word) main::y2#0 ← (signed word) $1234 + [6] call foo + [7] (signed word) foo::return#2 ← (signed word) foo::return#0 + to:main::@1 +main::@1: scope:[main] from main + [8] (signed word~) main::$1 ← (signed word) foo::return#2 + [9] *((const signed word*) main::SCREEN#0) ← (signed word~) main::$1 + [10] call foo + [11] (signed word) foo::return#3 ← (signed word) foo::return#0 + to:main::@2 +main::@2: scope:[main] from main::@1 + [12] (signed word~) main::$3 ← (signed word) foo::return#3 + [13] *((const signed word*) main::SCREEN#0+(const byte) SIZEOF_SIGNED_WORD) ← (signed word~) main::$3 + to:main::@return +main::@return: scope:[main] from main::@2 + [14] return + to:@return +foo: scope:[foo] from main main::@1 + [15] (signed word*) foo::y#2 ← phi( main/&(signed word) main::y1#0 main::@1/&(signed word) main::y2#0 ) + [15] (byte) foo::x#2 ← phi( main/(byte) 1 main::@1/(byte) 2 ) + [16] (byte~) foo::$1 ← (byte) foo::x#2 << (byte) 1 + [17] (signed word) foo::return#0 ← *((const signed word[4]) wow#0 + (byte~) foo::$1) + *((signed word*) foo::y#2) + to:foo::@return +foo::@return: scope:[foo] from foo + [18] return + to:@return + + +VARIABLE REGISTER WEIGHTS +(signed word()) foo((byte) foo::x , (signed word*) foo::y) +(byte~) foo::$1 4.0 +(signed word) foo::return +(signed word) foo::return#0 1.5 +(signed word) foo::return#2 4.0 +(signed word) foo::return#3 4.0 +(byte) foo::x +(byte) foo::x#2 2.0 +(signed word*) foo::y +(signed word*) foo::y#2 1.0 +(void()) main() +(signed word~) main::$1 4.0 +(signed word~) main::$3 4.0 +(signed word*) main::SCREEN +(signed word) main::y1 +(signed word) main::y1#0 20.0 +(signed word) main::y2 +(signed word) main::y2#0 20.0 +(signed word[4]) wow + +Initial phi equivalence classes +[ foo::x#2 ] +[ foo::y#2 ] +Added variable foo::return#2 to zero page equivalence class [ foo::return#2 ] +Added variable main::$1 to zero page equivalence class [ main::$1 ] +Added variable foo::return#3 to zero page equivalence class [ foo::return#3 ] +Added variable main::$3 to zero page equivalence class [ main::$3 ] +Added variable foo::$1 to zero page equivalence class [ foo::$1 ] +Added variable foo::return#0 to zero page equivalence class [ foo::return#0 ] +Complete equivalence classes +[ foo::x#2 ] +[ foo::y#2 ] +[ main::y1#0 ] +[ main::y2#0 ] +[ foo::return#2 ] +[ main::$1 ] +[ foo::return#3 ] +[ main::$3 ] +[ foo::$1 ] +[ foo::return#0 ] +Allocated zp ZP_BYTE:2 [ foo::x#2 ] +Allocated zp ZP_WORD:3 [ foo::y#2 ] +Allocated zp ZP_WORD:5 [ main::y1#0 ] +Allocated zp ZP_WORD:7 [ main::y2#0 ] +Allocated zp ZP_WORD:9 [ foo::return#2 ] +Allocated zp ZP_WORD:11 [ main::$1 ] +Allocated zp ZP_WORD:13 [ foo::return#3 ] +Allocated zp ZP_WORD:15 [ main::$3 ] +Allocated zp ZP_BYTE:17 [ foo::$1 ] +Allocated zp ZP_WORD:18 [ foo::return#0 ] + +INITIAL ASM +//SEG0 File Comments +// Test a bit of array code from the NES forum +// https://forums.nesdev.com/viewtopic.php?f=2&t=18735 +//SEG1 Basic Upstart +.pc = $801 "Basic" +:BasicUpstart(bbegin) +.pc = $80d "Program" +//SEG2 Global Constants & labels + .const SIZEOF_SIGNED_WORD = 2 +//SEG3 @begin +bbegin: +//SEG4 [1] phi from @begin to @1 [phi:@begin->@1] +b1_from_bbegin: + jmp b1 +//SEG5 @1 +b1: +//SEG6 [2] call main + jsr main +//SEG7 [3] phi from @1 to @end [phi:@1->@end] +bend_from_b1: + jmp bend +//SEG8 @end +bend: +//SEG9 main +main: { + .label SCREEN = $400 + .label _1 = $b + .label _3 = $f + .label y1 = 5 + .label y2 = 7 + //SEG10 [4] (signed word) main::y1#0 ← (signed word) $1234 -- vwsz1=vwsc1 + lda #<$1234 + sta y1 + lda #>$1234 + sta y1+1 + //SEG11 [5] (signed word) main::y2#0 ← (signed word) $1234 -- vwsz1=vwsc1 + lda #<$1234 + sta y2 + lda #>$1234 + sta y2+1 + //SEG12 [6] call foo + //SEG13 [15] phi from main to foo [phi:main->foo] + foo_from_main: + //SEG14 [15] phi (signed word*) foo::y#2 = &(signed word) main::y1#0 [phi:main->foo#0] -- pwsz1=pwsc1 + lda #y1 + sta foo.y+1 + //SEG15 [15] phi (byte) foo::x#2 = (byte) 1 [phi:main->foo#1] -- vbuz1=vbuc1 + lda #1 + sta foo.x + jsr foo + //SEG16 [7] (signed word) foo::return#2 ← (signed word) foo::return#0 -- vwsz1=vwsz2 + lda foo.return + sta foo.return_2 + lda foo.return+1 + sta foo.return_2+1 + jmp b1 + //SEG17 main::@1 + b1: + //SEG18 [8] (signed word~) main::$1 ← (signed word) foo::return#2 -- vwsz1=vwsz2 + lda foo.return_2 + sta _1 + lda foo.return_2+1 + sta _1+1 + //SEG19 [9] *((const signed word*) main::SCREEN#0) ← (signed word~) main::$1 -- _deref_pwsc1=vwsz1 + lda _1 + sta SCREEN + lda _1+1 + sta SCREEN+1 + //SEG20 [10] call foo + //SEG21 [15] phi from main::@1 to foo [phi:main::@1->foo] + foo_from_b1: + //SEG22 [15] phi (signed word*) foo::y#2 = &(signed word) main::y2#0 [phi:main::@1->foo#0] -- pwsz1=pwsc1 + lda #y2 + sta foo.y+1 + //SEG23 [15] phi (byte) foo::x#2 = (byte) 2 [phi:main::@1->foo#1] -- vbuz1=vbuc1 + lda #2 + sta foo.x + jsr foo + //SEG24 [11] (signed word) foo::return#3 ← (signed word) foo::return#0 -- vwsz1=vwsz2 + lda foo.return + sta foo.return_3 + lda foo.return+1 + sta foo.return_3+1 + jmp b2 + //SEG25 main::@2 + b2: + //SEG26 [12] (signed word~) main::$3 ← (signed word) foo::return#3 -- vwsz1=vwsz2 + lda foo.return_3 + sta _3 + lda foo.return_3+1 + sta _3+1 + //SEG27 [13] *((const signed word*) main::SCREEN#0+(const byte) SIZEOF_SIGNED_WORD) ← (signed word~) main::$3 -- _deref_pwsc1=vwsz1 + lda _3 + sta SCREEN+SIZEOF_SIGNED_WORD + lda _3+1 + sta SCREEN+SIZEOF_SIGNED_WORD+1 + jmp breturn + //SEG28 main::@return + breturn: + //SEG29 [14] return + rts +} +//SEG30 foo +// foo(byte zeropage(2) x, signed word* zeropage(3) y) +foo: { + .label _1 = $11 + .label return = $12 + .label return_2 = 9 + .label return_3 = $d + .label x = 2 + .label y = 3 + //SEG31 [16] (byte~) foo::$1 ← (byte) foo::x#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 + lda x + asl + sta _1 + //SEG32 [17] (signed word) foo::return#0 ← *((const signed word[4]) wow#0 + (byte~) foo::$1) + *((signed word*) foo::y#2) -- vwsz1=pwsc1_derefidx_vbuz2_plus__deref_pwsz3 + ldx _1 + clc + ldy #0 + lda wow,x + adc (y),y + sta return + iny + lda wow+1,x + adc (y),y + sta return+1 + jmp breturn + //SEG33 foo::@return + breturn: + //SEG34 [18] return + rts +} +//SEG35 File Data + wow: .word $cafe, $babe, $1234, $5678 + +REGISTER UPLIFT POTENTIAL REGISTERS +Statement [4] (signed word) main::y1#0 ← (signed word) $1234 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [5] (signed word) main::y2#0 ← (signed word) $1234 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [7] (signed word) foo::return#2 ← (signed word) foo::return#0 [ foo::return#2 ] ( main:2 [ foo::return#2 ] ) always clobbers reg byte a +Statement [8] (signed word~) main::$1 ← (signed word) foo::return#2 [ main::$1 ] ( main:2 [ main::$1 ] ) always clobbers reg byte a +Statement [9] *((const signed word*) main::SCREEN#0) ← (signed word~) main::$1 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [11] (signed word) foo::return#3 ← (signed word) foo::return#0 [ foo::return#3 ] ( main:2 [ foo::return#3 ] ) always clobbers reg byte a +Statement [12] (signed word~) main::$3 ← (signed word) foo::return#3 [ main::$3 ] ( main:2 [ main::$3 ] ) always clobbers reg byte a +Statement [13] *((const signed word*) main::SCREEN#0+(const byte) SIZEOF_SIGNED_WORD) ← (signed word~) main::$3 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [16] (byte~) foo::$1 ← (byte) foo::x#2 << (byte) 1 [ foo::y#2 foo::$1 ] ( main:2::foo:6 [ foo::y#2 foo::$1 ] main:2::foo:10 [ foo::y#2 foo::$1 ] ) always clobbers reg byte a +Statement [17] (signed word) foo::return#0 ← *((const signed word[4]) wow#0 + (byte~) foo::$1) + *((signed word*) foo::y#2) [ foo::return#0 ] ( main:2::foo:6 [ foo::return#0 ] main:2::foo:10 [ foo::return#0 ] ) always clobbers reg byte a reg byte y +Potential registers zp ZP_BYTE:2 [ foo::x#2 ] : zp ZP_BYTE:2 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_WORD:3 [ foo::y#2 ] : zp ZP_WORD:3 , +Potential registers zp ZP_WORD:5 [ main::y1#0 ] : zp ZP_WORD:5 , +Potential registers zp ZP_WORD:7 [ main::y2#0 ] : zp ZP_WORD:7 , +Potential registers zp ZP_WORD:9 [ foo::return#2 ] : zp ZP_WORD:9 , +Potential registers zp ZP_WORD:11 [ main::$1 ] : zp ZP_WORD:11 , +Potential registers zp ZP_WORD:13 [ foo::return#3 ] : zp ZP_WORD:13 , +Potential registers zp ZP_WORD:15 [ main::$3 ] : zp ZP_WORD:15 , +Potential registers zp ZP_BYTE:17 [ foo::$1 ] : zp ZP_BYTE:17 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_WORD:18 [ foo::return#0 ] : zp ZP_WORD:18 , + +REGISTER UPLIFT SCOPES +Uplift Scope [main] 20: zp ZP_WORD:5 [ main::y1#0 ] 20: zp ZP_WORD:7 [ main::y2#0 ] 4: zp ZP_WORD:11 [ main::$1 ] 4: zp ZP_WORD:15 [ main::$3 ] +Uplift Scope [foo] 4: zp ZP_WORD:9 [ foo::return#2 ] 4: zp ZP_WORD:13 [ foo::return#3 ] 4: zp ZP_BYTE:17 [ foo::$1 ] 2: zp ZP_BYTE:2 [ foo::x#2 ] 1.5: zp ZP_WORD:18 [ foo::return#0 ] 1: zp ZP_WORD:3 [ foo::y#2 ] +Uplift Scope [] + +Uplifting [main] best 217 combination zp ZP_WORD:5 [ main::y1#0 ] zp ZP_WORD:7 [ main::y2#0 ] zp ZP_WORD:11 [ main::$1 ] zp ZP_WORD:15 [ main::$3 ] +Uplifting [foo] best 206 combination zp ZP_WORD:9 [ foo::return#2 ] zp ZP_WORD:13 [ foo::return#3 ] reg byte a [ foo::$1 ] reg byte x [ foo::x#2 ] zp ZP_WORD:18 [ foo::return#0 ] zp ZP_WORD:3 [ foo::y#2 ] +Uplifting [] best 206 combination +Coalescing zero page register with common assignment [ zp ZP_WORD:3 [ foo::y#2 ] ] with [ zp ZP_WORD:18 [ foo::return#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:9 [ foo::return#2 ] ] with [ zp ZP_WORD:11 [ main::$1 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:13 [ foo::return#3 ] ] with [ zp ZP_WORD:15 [ main::$3 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:3 [ foo::y#2 foo::return#0 ] ] with [ zp ZP_WORD:9 [ foo::return#2 main::$1 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:3 [ foo::y#2 foo::return#0 foo::return#2 main::$1 ] ] with [ zp ZP_WORD:13 [ foo::return#3 main::$3 ] ] - score: 1 +Allocated (was zp ZP_WORD:3) zp ZP_WORD:2 [ foo::y#2 foo::return#0 foo::return#2 main::$1 foo::return#3 main::$3 ] +Allocated (was zp ZP_WORD:5) zp ZP_WORD:4 [ main::y1#0 ] +Allocated (was zp ZP_WORD:7) zp ZP_WORD:6 [ main::y2#0 ] + +ASSEMBLER BEFORE OPTIMIZATION +//SEG0 File Comments +// Test a bit of array code from the NES forum +// https://forums.nesdev.com/viewtopic.php?f=2&t=18735 +//SEG1 Basic Upstart +.pc = $801 "Basic" +:BasicUpstart(bbegin) +.pc = $80d "Program" +//SEG2 Global Constants & labels + .const SIZEOF_SIGNED_WORD = 2 +//SEG3 @begin +bbegin: +//SEG4 [1] phi from @begin to @1 [phi:@begin->@1] +b1_from_bbegin: + jmp b1 +//SEG5 @1 +b1: +//SEG6 [2] call main + jsr main +//SEG7 [3] phi from @1 to @end [phi:@1->@end] +bend_from_b1: + jmp bend +//SEG8 @end +bend: +//SEG9 main +main: { + .label SCREEN = $400 + .label _1 = 2 + .label _3 = 2 + .label y1 = 4 + .label y2 = 6 + //SEG10 [4] (signed word) main::y1#0 ← (signed word) $1234 -- vwsz1=vwsc1 + lda #<$1234 + sta y1 + lda #>$1234 + sta y1+1 + //SEG11 [5] (signed word) main::y2#0 ← (signed word) $1234 -- vwsz1=vwsc1 + lda #<$1234 + sta y2 + lda #>$1234 + sta y2+1 + //SEG12 [6] call foo + //SEG13 [15] phi from main to foo [phi:main->foo] + foo_from_main: + //SEG14 [15] phi (signed word*) foo::y#2 = &(signed word) main::y1#0 [phi:main->foo#0] -- pwsz1=pwsc1 + lda #y1 + sta foo.y+1 + //SEG15 [15] phi (byte) foo::x#2 = (byte) 1 [phi:main->foo#1] -- vbuxx=vbuc1 + ldx #1 + jsr foo + //SEG16 [7] (signed word) foo::return#2 ← (signed word) foo::return#0 + jmp b1 + //SEG17 main::@1 + b1: + //SEG18 [8] (signed word~) main::$1 ← (signed word) foo::return#2 + //SEG19 [9] *((const signed word*) main::SCREEN#0) ← (signed word~) main::$1 -- _deref_pwsc1=vwsz1 + lda _1 + sta SCREEN + lda _1+1 + sta SCREEN+1 + //SEG20 [10] call foo + //SEG21 [15] phi from main::@1 to foo [phi:main::@1->foo] + foo_from_b1: + //SEG22 [15] phi (signed word*) foo::y#2 = &(signed word) main::y2#0 [phi:main::@1->foo#0] -- pwsz1=pwsc1 + lda #y2 + sta foo.y+1 + //SEG23 [15] phi (byte) foo::x#2 = (byte) 2 [phi:main::@1->foo#1] -- vbuxx=vbuc1 + ldx #2 + jsr foo + //SEG24 [11] (signed word) foo::return#3 ← (signed word) foo::return#0 + jmp b2 + //SEG25 main::@2 + b2: + //SEG26 [12] (signed word~) main::$3 ← (signed word) foo::return#3 + //SEG27 [13] *((const signed word*) main::SCREEN#0+(const byte) SIZEOF_SIGNED_WORD) ← (signed word~) main::$3 -- _deref_pwsc1=vwsz1 + lda _3 + sta SCREEN+SIZEOF_SIGNED_WORD + lda _3+1 + sta SCREEN+SIZEOF_SIGNED_WORD+1 + jmp breturn + //SEG28 main::@return + breturn: + //SEG29 [14] return + rts +} +//SEG30 foo +// foo(byte register(X) x, signed word* zeropage(2) y) +foo: { + .label return = 2 + .label y = 2 + //SEG31 [16] (byte~) foo::$1 ← (byte) foo::x#2 << (byte) 1 -- vbuaa=vbuxx_rol_1 + txa + asl + //SEG32 [17] (signed word) foo::return#0 ← *((const signed word[4]) wow#0 + (byte~) foo::$1) + *((signed word*) foo::y#2) -- vwsz1=pwsc1_derefidx_vbuaa_plus__deref_pwsz1 + tax + clc + ldy #0 + lda wow,x + adc (return),y + pha + iny + lda wow+1,x + adc (return),y + sta return+1 + pla + sta return + jmp breturn + //SEG33 foo::@return + breturn: + //SEG34 [18] return + rts +} +//SEG35 File Data + wow: .word $cafe, $babe, $1234, $5678 + +ASSEMBLER OPTIMIZATIONS +Removing instruction jmp b1 +Removing instruction jmp bend +Removing instruction jmp b1 +Removing instruction jmp b2 +Removing instruction jmp breturn +Removing instruction jmp breturn +Succesful ASM optimization Pass5NextJumpElimination +Removing instruction b1_from_bbegin: +Removing instruction b1: +Removing instruction bend_from_b1: +Succesful ASM optimization Pass5RedundantLabelElimination +Removing instruction bend: +Removing instruction foo_from_main: +Removing instruction b1: +Removing instruction foo_from_b1: +Removing instruction b2: +Removing instruction breturn: +Removing instruction breturn: +Succesful ASM optimization Pass5UnusedLabelElimination +Updating BasicUpstart to call main directly +Removing instruction jsr main +Succesful ASM optimization Pass5SkipBegin +Removing instruction bbegin: +Succesful ASM optimization Pass5UnusedLabelElimination + +FINAL SYMBOL TABLE +(label) @1 +(label) @begin +(label) @end +(const byte) SIZEOF_SIGNED_WORD SIZEOF_SIGNED_WORD = (byte) 2 +(signed word()) foo((byte) foo::x , (signed word*) foo::y) +(byte~) foo::$1 reg byte a 4.0 +(label) foo::@return +(signed word) foo::return +(signed word) foo::return#0 return zp ZP_WORD:2 1.5 +(signed word) foo::return#2 return zp ZP_WORD:2 4.0 +(signed word) foo::return#3 return zp ZP_WORD:2 4.0 +(byte) foo::x +(byte) foo::x#2 reg byte x 2.0 +(signed word*) foo::y +(signed word*) foo::y#2 y zp ZP_WORD:2 1.0 +(void()) main() +(signed word~) main::$1 $1 zp ZP_WORD:2 4.0 +(signed word~) main::$3 $3 zp ZP_WORD:2 4.0 +(label) main::@1 +(label) main::@2 +(label) main::@return +(signed word*) main::SCREEN +(const signed word*) main::SCREEN#0 SCREEN = (signed word*) 1024 +(signed word) main::y1 +(signed word) main::y1#0 y1 zp ZP_WORD:4 20.0 +(signed word) main::y2 +(signed word) main::y2#0 y2 zp ZP_WORD:6 20.0 +(signed word[4]) wow +(const signed word[4]) wow#0 wow = { (signed word) $cafe, (signed word) $babe, (signed word) $1234, (signed word) $5678 } + +reg byte x [ foo::x#2 ] +zp ZP_WORD:2 [ foo::y#2 foo::return#0 foo::return#2 main::$1 foo::return#3 main::$3 ] +zp ZP_WORD:4 [ main::y1#0 ] +zp ZP_WORD:6 [ main::y2#0 ] +reg byte a [ foo::$1 ] + + +FINAL ASSEMBLER +Score: 141 + +//SEG0 File Comments +// Test a bit of array code from the NES forum +// https://forums.nesdev.com/viewtopic.php?f=2&t=18735 +//SEG1 Basic Upstart +.pc = $801 "Basic" +:BasicUpstart(main) +.pc = $80d "Program" +//SEG2 Global Constants & labels + .const SIZEOF_SIGNED_WORD = 2 +//SEG3 @begin +//SEG4 [1] phi from @begin to @1 [phi:@begin->@1] +//SEG5 @1 +//SEG6 [2] call main +//SEG7 [3] phi from @1 to @end [phi:@1->@end] +//SEG8 @end +//SEG9 main +main: { + .label SCREEN = $400 + .label _1 = 2 + .label _3 = 2 + .label y1 = 4 + .label y2 = 6 + //SEG10 [4] (signed word) main::y1#0 ← (signed word) $1234 -- vwsz1=vwsc1 + lda #<$1234 + sta y1 + lda #>$1234 + sta y1+1 + //SEG11 [5] (signed word) main::y2#0 ← (signed word) $1234 -- vwsz1=vwsc1 + lda #<$1234 + sta y2 + lda #>$1234 + sta y2+1 + //SEG12 [6] call foo + //SEG13 [15] phi from main to foo [phi:main->foo] + //SEG14 [15] phi (signed word*) foo::y#2 = &(signed word) main::y1#0 [phi:main->foo#0] -- pwsz1=pwsc1 + lda #y1 + sta foo.y+1 + //SEG15 [15] phi (byte) foo::x#2 = (byte) 1 [phi:main->foo#1] -- vbuxx=vbuc1 + ldx #1 + jsr foo + //SEG16 [7] (signed word) foo::return#2 ← (signed word) foo::return#0 + //SEG17 main::@1 + //SEG18 [8] (signed word~) main::$1 ← (signed word) foo::return#2 + //SEG19 [9] *((const signed word*) main::SCREEN#0) ← (signed word~) main::$1 -- _deref_pwsc1=vwsz1 + lda _1 + sta SCREEN + lda _1+1 + sta SCREEN+1 + //SEG20 [10] call foo + //SEG21 [15] phi from main::@1 to foo [phi:main::@1->foo] + //SEG22 [15] phi (signed word*) foo::y#2 = &(signed word) main::y2#0 [phi:main::@1->foo#0] -- pwsz1=pwsc1 + lda #y2 + sta foo.y+1 + //SEG23 [15] phi (byte) foo::x#2 = (byte) 2 [phi:main::@1->foo#1] -- vbuxx=vbuc1 + ldx #2 + jsr foo + //SEG24 [11] (signed word) foo::return#3 ← (signed word) foo::return#0 + //SEG25 main::@2 + //SEG26 [12] (signed word~) main::$3 ← (signed word) foo::return#3 + //SEG27 [13] *((const signed word*) main::SCREEN#0+(const byte) SIZEOF_SIGNED_WORD) ← (signed word~) main::$3 -- _deref_pwsc1=vwsz1 + lda _3 + sta SCREEN+SIZEOF_SIGNED_WORD + lda _3+1 + sta SCREEN+SIZEOF_SIGNED_WORD+1 + //SEG28 main::@return + //SEG29 [14] return + rts +} +//SEG30 foo +// foo(byte register(X) x, signed word* zeropage(2) y) +foo: { + .label return = 2 + .label y = 2 + //SEG31 [16] (byte~) foo::$1 ← (byte) foo::x#2 << (byte) 1 -- vbuaa=vbuxx_rol_1 + txa + asl + //SEG32 [17] (signed word) foo::return#0 ← *((const signed word[4]) wow#0 + (byte~) foo::$1) + *((signed word*) foo::y#2) -- vwsz1=pwsc1_derefidx_vbuaa_plus__deref_pwsz1 + tax + clc + ldy #0 + lda wow,x + adc (return),y + pha + iny + lda wow+1,x + adc (return),y + sta return+1 + pla + sta return + //SEG33 foo::@return + //SEG34 [18] return + rts +} +//SEG35 File Data + wow: .word $cafe, $babe, $1234, $5678 + diff --git a/src/test/ref/nes-array.sym b/src/test/ref/nes-array.sym new file mode 100644 index 000000000..eea18bc83 --- /dev/null +++ b/src/test/ref/nes-array.sym @@ -0,0 +1,35 @@ +(label) @1 +(label) @begin +(label) @end +(const byte) SIZEOF_SIGNED_WORD SIZEOF_SIGNED_WORD = (byte) 2 +(signed word()) foo((byte) foo::x , (signed word*) foo::y) +(byte~) foo::$1 reg byte a 4.0 +(label) foo::@return +(signed word) foo::return +(signed word) foo::return#0 return zp ZP_WORD:2 1.5 +(signed word) foo::return#2 return zp ZP_WORD:2 4.0 +(signed word) foo::return#3 return zp ZP_WORD:2 4.0 +(byte) foo::x +(byte) foo::x#2 reg byte x 2.0 +(signed word*) foo::y +(signed word*) foo::y#2 y zp ZP_WORD:2 1.0 +(void()) main() +(signed word~) main::$1 $1 zp ZP_WORD:2 4.0 +(signed word~) main::$3 $3 zp ZP_WORD:2 4.0 +(label) main::@1 +(label) main::@2 +(label) main::@return +(signed word*) main::SCREEN +(const signed word*) main::SCREEN#0 SCREEN = (signed word*) 1024 +(signed word) main::y1 +(signed word) main::y1#0 y1 zp ZP_WORD:4 20.0 +(signed word) main::y2 +(signed word) main::y2#0 y2 zp ZP_WORD:6 20.0 +(signed word[4]) wow +(const signed word[4]) wow#0 wow = { (signed word) $cafe, (signed word) $babe, (signed word) $1234, (signed word) $5678 } + +reg byte x [ foo::x#2 ] +zp ZP_WORD:2 [ foo::y#2 foo::return#0 foo::return#2 main::$1 foo::return#3 main::$3 ] +zp ZP_WORD:4 [ main::y1#0 ] +zp ZP_WORD:6 [ main::y2#0 ] +reg byte a [ foo::$1 ] diff --git a/src/test/ref/pointer-pointer-3.log b/src/test/ref/pointer-pointer-3.log index fefb2e98a..69952fb33 100644 --- a/src/test/ref/pointer-pointer-3.log +++ b/src/test/ref/pointer-pointer-3.log @@ -286,7 +286,7 @@ setscreen: { //SEG28 File Data REGISTER UPLIFT POTENTIAL REGISTERS -Statement [0] (byte*) screen#0 ← (byte*) 1024 [ screen#0 ] ( ) always clobbers reg byte a +Statement [0] (byte*) screen#0 ← (byte*) 1024 [ screen#0 ] ( [ screen#0 ] ) always clobbers reg byte a Statement [6] *((byte*) screen#0) ← (byte) 'a' [ screen#0 ] ( main:2 [ screen#0 ] ) always clobbers reg byte a reg byte y Statement [8] *((byte*) screen#0) ← (byte) 'a' [ ] ( main:2 [ ] ) always clobbers reg byte a reg byte y Statement [11] *(&(byte*) screen#0) ← (byte*) setscreen::val#2 [ screen#0 ] ( main:2::setscreen:5 [ screen#0 ] main:2::setscreen:7 [ screen#0 ] ) always clobbers reg byte a diff --git a/src/test/ref/test-interrupt-volatile-write.log b/src/test/ref/test-interrupt-volatile-write.log index 59e4be4bc..74cf3e842 100644 --- a/src/test/ref/test-interrupt-volatile-write.log +++ b/src/test/ref/test-interrupt-volatile-write.log @@ -349,7 +349,7 @@ irq: { //SEG33 File Data REGISTER UPLIFT POTENTIAL REGISTERS -Statement [0] (byte) col#0 ← (byte) 0 [ col#0 ] ( ) always clobbers reg byte a +Statement [0] (byte) col#0 ← (byte) 0 [ col#0 ] ( [ col#0 ] ) always clobbers reg byte a Statement [4] *((const void()**) KERNEL_IRQ#0) ← &interrupt(KERNEL_MIN)(void()) irq() [ col#0 ] ( main:2 [ col#0 ] ) always clobbers reg byte a Statement [6] if((byte) col#14<(byte) $a+(byte) 1) goto main::@1 [ ] ( main:2 [ ] ) always clobbers reg byte a Statement [7] (byte) col#1 ← (byte) 0 [ col#1 ] ( main:2 [ col#1 ] ) always clobbers reg byte a diff --git a/src/test/ref/test-interrupt-volatile.log b/src/test/ref/test-interrupt-volatile.log index 8b3ddf13e..7c10aabe8 100644 --- a/src/test/ref/test-interrupt-volatile.log +++ b/src/test/ref/test-interrupt-volatile.log @@ -232,7 +232,7 @@ irq: { //SEG23 File Data REGISTER UPLIFT POTENTIAL REGISTERS -Statement [0] (byte) col#0 ← (byte) 0 [ col#0 ] ( ) always clobbers reg byte a +Statement [0] (byte) col#0 ← (byte) 0 [ col#0 ] ( [ col#0 ] ) always clobbers reg byte a Statement [4] *((const void()**) KERNEL_IRQ#0) ← &interrupt(KERNEL_MIN)(void()) irq() [ col#0 ] ( main:2 [ col#0 ] ) always clobbers reg byte a Statement asm { lda$dc0d } always clobbers reg byte a Statement [8] *((const byte*) BGCOL#0) ← (byte) col#0 [ ] ( [ ] ) always clobbers reg byte a