diff --git a/src/main/fragment/vwsz1=vwsz1_plus_vbuz2.asm b/src/main/fragment/vwsz1=vwsz1_plus_vbuz2.asm index 94a4667d1..74694e0ed 100644 --- a/src/main/fragment/vwsz1=vwsz1_plus_vbuz2.asm +++ b/src/main/fragment/vwsz1=vwsz1_plus_vbuz2.asm @@ -1,6 +1,6 @@ clc lda {z1} -adc {z1} +adc {z2} sta {z1} lda {z1}+1 adc #0 diff --git a/src/main/kc/stdlib/string.kc b/src/main/kc/stdlib/string.kc index 7af38e4d1..1839e51b2 100644 --- a/src/main/kc/stdlib/string.kc +++ b/src/main/kc/stdlib/string.kc @@ -7,7 +7,8 @@ typedef word size_t ; void* memcpy( void* destination, void* source, size_t num ) { byte* src = source; byte* dst = destination; - for( size_t i=0; i=512) idx_y = 0; r += r_add; - //if((idx_x==0) && (r_add!=1)) r_add /= 2; + if((idx_x==0) && (r_add!=1)) r_add /= 2; if(r>=512*12+256) break; } while(true) diff --git a/src/test/kc/memcpy-0.kc b/src/test/kc/memcpy-0.kc new file mode 100644 index 000000000..7a6b1ba05 --- /dev/null +++ b/src/test/kc/memcpy-0.kc @@ -0,0 +1,18 @@ +// Test memcpy - copy charset and screen using memcpy() from stdlib string + +import "c64" +import "string" + +const byte* CHARSET = 0x2000; +const byte* SCREEN = 0x0400; +const byte* SCREEN_COPY = 0x2400; + +void main() { + *D018 = toD018(SCREEN_COPY, CHARSET); + memcpy(SCREEN_COPY, SCREEN, 0x0400); + asm { sei } + *PROCPORT = PROCPORT_RAM_CHARROM; + memcpy(CHARSET, CHARGEN, 0x0800); + *PROCPORT = PROCPORT_BASIC_KERNEL_IO; + asm { cli } +} \ No newline at end of file diff --git a/src/test/ref/bitmap-plot-2.asm b/src/test/ref/bitmap-plot-2.asm index 5777cbf91..c13440be7 100644 --- a/src/test/ref/bitmap-plot-2.asm +++ b/src/test/ref/bitmap-plot-2.asm @@ -44,8 +44,8 @@ .const PI_HALF_u4f28 = $1921fb54 .label BITMAP = $2000 .label SCREEN = $400 - .label rem16u = $2b - .label frame_cnt = $31 + .label rem16u = $2c + .label frame_cnt = $32 bbegin: // Counts frames - updated by the IRQ lda #1 @@ -53,24 +53,24 @@ bbegin: jsr main rts main: { - .const r_add = 4 .const toD0181_return = (>(SCREEN&$3fff)*4)|(>BITMAP)/4&$f - .label _9 = $32 - .label _11 = $32 - .label _15 = $34 - .label _17 = $34 - .label _18 = $34 - .label _28 = 8 - .label _29 = 8 - .label cos_x = 8 - .label xpos = $a - .label sin_y = 8 - .label ypos = $a + .label _9 = $33 + .label _11 = $33 + .label _15 = $35 + .label _17 = $35 + .label _18 = $35 + .label _32 = 9 + .label _33 = 9 + .label cos_x = 9 + .label xpos = $b + .label sin_y = 9 + .label ypos = $b .label idx_x = 2 .label idx_y = 6 .label r = 4 - .label _30 = 8 - .label _31 = 8 + .label r_add = 8 + .label _34 = 9 + .label _35 = 9 jsr sin16s_gen2 jsr bitmap_init jsr bitmap_clear @@ -79,6 +79,8 @@ main: { lda #toD0181_return sta D018 jsr init_irq + lda #$20 + sta r_add lda #$80 sta idx_y lda #0 @@ -90,17 +92,17 @@ main: { b2: lda idx_x asl - sta _28 + sta _32 lda idx_x+1 rol - sta _28+1 + sta _32+1 clc - lda _30 + lda _34 adc #SINUS - sta _30+1 + sta _34+1 ldy #0 lda (cos_x),y tax @@ -130,17 +132,17 @@ main: { sta bitmap_plot.x+1 lda idx_y asl - sta _29 + sta _33 lda idx_y+1 rol - sta _29+1 + sta _33+1 clc - lda _31 + lda _35 adc #SINUS - sta _31+1 + sta _35+1 ldy #0 lda (sin_y),y tax @@ -179,7 +181,7 @@ main: { jsr bitmap_plot ldx frame_cnt inc plots_per_frame,x - lda #r_add + lda r_add clc adc idx_x sta idx_x @@ -198,7 +200,7 @@ main: { sta idx_x sta idx_x+1 b3: - lda #r_add + lda r_add clc adc idx_y sta idx_y @@ -217,20 +219,22 @@ main: { sta idx_y sta idx_y+1 b4: - lda #r_add - sta $fe - ora #$7f - bmi !+ - lda #0 - !: - sta $ff clc lda r - adc $fe + adc r_add sta r lda r+1 - adc $ff + adc #0 sta r+1 + lda idx_x + bne b5 + lda idx_x+1 + bne b5 + lda #1 + cmp r_add + beq b5 + lsr r_add + b5: lda r cmp #<$200*$c+$100 lda r+1 @@ -238,19 +242,19 @@ main: { bvc !+ eor #$80 !: - bpl b5 + bpl b7 jmp b2 - b5: + b7: inc BORDERCOL - jmp b5 + jmp b7 } // Plot a single dot in the bitmap -// bitmap_plot(signed word zeropage($32) x, byte register(A) y) +// bitmap_plot(signed word zeropage($33) x, byte register(A) y) bitmap_plot: { - .label _1 = $38 - .label plotter = $36 - .label x = $32 - .label _3 = $36 + .label _1 = $39 + .label plotter = $37 + .label x = $33 + .label _3 = $37 tay lda bitmap_plot_yhi,y sta _3+1 @@ -279,16 +283,16 @@ bitmap_plot: { } // Multiply of two signed words to a signed double word // Fixes offsets introduced by using unsigned multiplication -// mul16s(signed word zeropage(4) a, signed word zeropage(8) b) +// mul16s(signed word zeropage(4) a, signed word zeropage(9) b) mul16s: { - .label _9 = $3a - .label _13 = $3c - .label _16 = $3a - .label _17 = $3c - .label m = $a - .label return = $a + .label _9 = $3b + .label _13 = $3d + .label _16 = $3b + .label _17 = $3d + .label m = $b + .label return = $b .label a = 4 - .label b = 8 + .label b = 9 lda b sta mul16u.mb lda b+1 @@ -340,13 +344,13 @@ mul16s: { rts } // Perform binary multiplication of two unsigned 16-bit words into a 32-bit unsigned double word -// mul16u(word zeropage($10) a, word zeropage($e) b) +// mul16u(word zeropage($11) a, word zeropage($f) b) mul16u: { - .label mb = $12 - .label a = $10 - .label res = $a - .label return = $a - .label b = $e + .label mb = $13 + .label a = $11 + .label res = $b + .label return = $b + .label b = $f lda #0 sta res sta res+1 @@ -441,12 +445,12 @@ bitmap_clear: { rts } // Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str. -// memset(void* zeropage($16) str, byte register(X) c, word zeropage($18) num) +// memset(void* zeropage($17) str, byte register(X) c, word zeropage($19) num) memset: { - .label end = $18 - .label dst = $16 - .label str = $16 - .label num = $18 + .label end = $19 + .label dst = $17 + .label str = $17 + .label num = $19 lda end clc adc str @@ -472,8 +476,8 @@ memset: { } // Initialize bitmap plotting tables bitmap_init: { - .label _7 = $3e - .label yoffs = $1a + .label _7 = $3f + .label yoffs = $1b ldx #0 lda #$80 b1: @@ -518,18 +522,18 @@ bitmap_init: { // Generate signed word sinus table - with values in the range min-max. // sintab - the table to generate into // wavelength - the number of sinus points in a total sinus wavelength (the size of the table) -// sin16s_gen2(signed word* zeropage($20) sintab) +// sin16s_gen2(signed word* zeropage($21) sintab) sin16s_gen2: { .label wavelength = $200 .const min = -$1001 .const max = $1001 .const ampl = max-min - .label _5 = $a - .label _6 = $43 - .label step = $3f - .label sintab = $20 - .label x = $1c - .label i = $22 + .label _5 = $b + .label _6 = $44 + .label step = $40 + .label sintab = $21 + .label x = $1d + .label i = $23 jsr div32u16u lda #0 sta i @@ -606,21 +610,21 @@ sin16s_gen2: { // Calculate signed word sinus sin(x) // x: unsigned dword input u[4.28] in the interval $00000000 - PI2_u4f28 // result: signed word sin(x) s[0.15] - using the full range -$7fff - $7fff -// sin16s(dword zeropage($25) x) +// sin16s(dword zeropage($26) x) sin16s: { - .label _4 = $25 - .label x = $25 + .label _4 = $26 + .label x = $26 .label return = 4 - .label x1 = $45 - .label x2 = $29 - .label x3 = $29 - .label x3_6 = $47 + .label x1 = $46 + .label x2 = $2a + .label x3 = $2a + .label x3_6 = $48 .label usinx = 4 - .label x4 = $29 - .label x5 = $47 - .label x5_128 = $47 + .label x4 = $2a + .label x5 = $48 + .label x5_128 = $48 .label sinx = 4 - .label isUpper = $24 + .label isUpper = $25 lda x+3 cmp #>PI_u4f28>>$10 bcc b4 @@ -782,15 +786,15 @@ sin16s: { } // Calculate val*val for two unsigned word values - the result is 16 selected bits of the 32-bit result. // The select parameter indicates how many of the highest bits of the 32-bit result to skip -// mulu16_sel(word zeropage($29) v1, word zeropage($e) v2, byte register(X) select) +// mulu16_sel(word zeropage($2a) v1, word zeropage($f) v2, byte register(X) select) mulu16_sel: { - .label _0 = $a - .label _1 = $a - .label v1 = $29 - .label v2 = $e - .label return = $47 - .label return_1 = $29 - .label return_10 = $29 + .label _0 = $b + .label _1 = $b + .label v1 = $2a + .label v2 = $f + .label return = $48 + .label return_1 = $2a + .label return_10 = $2a lda v1 sta mul16u.a lda v1+1 @@ -822,9 +826,9 @@ mulu16_sel: { // Divide unsigned 32-bit dword dividend with a 16-bit word divisor // The 16-bit word remainder can be found in rem16u after the division div32u16u: { - .label quotient_hi = $49 - .label quotient_lo = $2f - .label return = $3f + .label quotient_hi = $4a + .label quotient_lo = $30 + .label return = $40 lda #>$10 sta divr16u.dividend lda #>PI2_u4f28>>$10 @@ -856,12 +860,12 @@ div32u16u: { // Returns the quotient dividend/divisor. // The final remainder will be set into the global variable rem16u // Implemented using simple binary division -// divr16u(word zeropage($2d) dividend, word zeropage($2b) rem) +// divr16u(word zeropage($2e) dividend, word zeropage($2c) rem) divr16u: { - .label rem = $2b - .label dividend = $2d - .label quotient = $2f - .label return = $2f + .label rem = $2c + .label dividend = $2e + .label quotient = $30 + .label return = $30 ldx #0 txa sta quotient diff --git a/src/test/ref/bitmap-plot-2.cfg b/src/test/ref/bitmap-plot-2.cfg index 7410b3261..c68831766 100644 --- a/src/test/ref/bitmap-plot-2.cfg +++ b/src/test/ref/bitmap-plot-2.cfg @@ -13,421 +13,432 @@ main: scope:[main] from @2 [5] phi() [6] call sin16s_gen2 - to:main::@7 -main::@7: scope:[main] from main + to:main::@9 +main::@9: scope:[main] from main [7] phi() [8] call bitmap_init - to:main::@8 -main::@8: scope:[main] from main::@7 + to:main::@10 +main::@10: scope:[main] from main::@9 [9] phi() [10] call bitmap_clear - to:main::@9 -main::@9: scope:[main] from main::@8 + to:main::@11 +main::@11: scope:[main] from main::@10 [11] *((const byte*) D011#0) ← (const byte) VIC_BMM#0|(const byte) VIC_DEN#0|(const byte) VIC_RSEL#0|(byte) 3 to:main::toD0181 -main::toD0181: scope:[main] from main::@9 +main::toD0181: scope:[main] from main::@11 [12] phi() - to:main::@6 -main::@6: scope:[main] from main::toD0181 + to:main::@8 +main::@8: scope:[main] from main::toD0181 [13] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0 [14] call init_irq to:main::@1 -main::@1: scope:[main] from main::@4 main::@6 - [15] (word) main::idx_y#3 ← phi( main::@6/(byte) $80 main::@4/(word) main::idx_y#10 ) - [15] (signed word) main::r#10 ← phi( main::@6/(signed byte) 0 main::@4/(signed word) main::r#1 ) - [15] (word) main::idx_x#3 ← phi( main::@6/(byte) 0 main::@4/(word) main::idx_x#10 ) +main::@1: scope:[main] from main::@5 main::@8 + [15] (byte) main::r_add#10 ← phi( main::@8/(byte) $20 main::@5/(byte) main::r_add#12 ) + [15] (word) main::idx_y#3 ← phi( main::@8/(byte) $80 main::@5/(word) main::idx_y#10 ) + [15] (signed word) main::r#10 ← phi( main::@8/(signed byte) 0 main::@5/(signed word) main::r#1 ) + [15] (word) main::idx_x#11 ← phi( main::@8/(byte) 0 main::@5/(word) main::idx_x#10 ) to:main::@2 main::@2: scope:[main] from main::@1 - [16] (word~) main::$28 ← (word) main::idx_x#3 << (byte) 1 - [17] (signed word*~) main::$30 ← (const signed word[$200]) SINUS#0 + (word~) main::$28 - [18] (signed word) main::cos_x#0 ← *((signed word*~) main::$30) + [16] (word~) main::$32 ← (word) main::idx_x#11 << (byte) 1 + [17] (signed word*~) main::$34 ← (const signed word[$200]) SINUS#0 + (word~) main::$32 + [18] (signed word) main::cos_x#0 ← *((signed word*~) main::$34) [19] (signed word) mul16s::a#1 ← (signed word) main::r#10 [20] (signed word) mul16s::b#1 ← (signed word) main::cos_x#0 [21] call mul16s [22] (signed dword) mul16s::return#3 ← (signed dword) mul16s::return#0 - to:main::@10 -main::@10: scope:[main] from main::@2 + to:main::@12 +main::@12: scope:[main] from main::@2 [23] (signed dword) main::xpos#0 ← (signed dword) mul16s::return#3 [24] (word~) main::$9 ← > (signed dword) main::xpos#0 [25] (signed word~) main::$11 ← (signed word)(word~) main::$9 >> (signed byte) 2 [26] (signed word) bitmap_plot::x#0 ← (signed word) $a0 + (signed word~) main::$11 - [27] (word~) main::$29 ← (word) main::idx_y#3 << (byte) 1 - [28] (signed word*~) main::$31 ← (const signed word[$200]) SINUS#0 + (word~) main::$29 - [29] (signed word) main::sin_y#0 ← *((signed word*~) main::$31) + [27] (word~) main::$33 ← (word) main::idx_y#3 << (byte) 1 + [28] (signed word*~) main::$35 ← (const signed word[$200]) SINUS#0 + (word~) main::$33 + [29] (signed word) main::sin_y#0 ← *((signed word*~) main::$35) [30] (signed word) mul16s::a#2 ← (signed word) main::r#10 [31] (signed word) mul16s::b#2 ← (signed word) main::sin_y#0 [32] call mul16s [33] (signed dword) mul16s::return#4 ← (signed dword) mul16s::return#0 - to:main::@11 -main::@11: scope:[main] from main::@10 + to:main::@13 +main::@13: scope:[main] from main::@12 [34] (signed dword) main::ypos#0 ← (signed dword) mul16s::return#4 [35] (word~) main::$15 ← > (signed dword) main::ypos#0 [36] (signed word~) main::$17 ← (signed word)(word~) main::$15 >> (signed byte) 2 [37] (signed word~) main::$18 ← (signed byte) $64 + (signed word~) main::$17 [38] (byte) bitmap_plot::y#0 ← (byte)(word)(signed word~) main::$18 [39] call bitmap_plot - to:main::@12 -main::@12: scope:[main] from main::@11 + to:main::@14 +main::@14: scope:[main] from main::@13 [40] *((const byte[$100]) plots_per_frame#0 + (byte) frame_cnt#0) ← ++ *((const byte[$100]) plots_per_frame#0 + (byte) frame_cnt#0) - [41] (word) main::idx_x#1 ← (word) main::idx_x#3 + (const byte) main::r_add#0 - [42] if((word) main::idx_x#1<(word) $200) goto main::@13 + [41] (word) main::idx_x#1 ← (word) main::idx_x#11 + (byte) main::r_add#10 + [42] if((word) main::idx_x#1<(word) $200) goto main::@16 to:main::@3 -main::@13: scope:[main] from main::@12 +main::@16: scope:[main] from main::@14 [43] phi() to:main::@3 -main::@3: scope:[main] from main::@12 main::@13 - [44] (word) main::idx_x#10 ← phi( main::@12/(byte) 0 main::@13/(word) main::idx_x#1 ) - [45] (word) main::idx_y#1 ← (word) main::idx_y#3 + (const byte) main::r_add#0 - [46] if((word) main::idx_y#1<(word) $200) goto main::@14 +main::@3: scope:[main] from main::@14 main::@16 + [44] (word) main::idx_x#10 ← phi( main::@14/(byte) 0 main::@16/(word) main::idx_x#1 ) + [45] (word) main::idx_y#1 ← (word) main::idx_y#3 + (byte) main::r_add#10 + [46] if((word) main::idx_y#1<(word) $200) goto main::@17 to:main::@4 -main::@14: scope:[main] from main::@3 +main::@17: scope:[main] from main::@3 [47] phi() to:main::@4 -main::@4: scope:[main] from main::@14 main::@3 - [48] (word) main::idx_y#10 ← phi( main::@3/(byte) 0 main::@14/(word) main::idx_y#1 ) - [49] (signed word) main::r#1 ← (signed word) main::r#10 + (const byte) main::r_add#0 - [50] if((signed word) main::r#1>=(signed word)(number) $200*(number) $c+(number) $100) goto main::@5 - to:main::@1 -main::@5: scope:[main] from main::@4 main::@5 - [51] *((const byte*) BORDERCOL#0) ← ++ *((const byte*) BORDERCOL#0) +main::@4: scope:[main] from main::@17 main::@3 + [48] (word) main::idx_y#10 ← phi( main::@3/(byte) 0 main::@17/(word) main::idx_y#1 ) + [49] (signed word) main::r#1 ← (signed word) main::r#10 + (byte) main::r_add#10 + [50] if((word) main::idx_x#10!=(byte) 0) goto main::@5 + to:main::@15 +main::@15: scope:[main] from main::@4 + [51] if((byte) main::r_add#10==(byte) 1) goto main::@5 + to:main::@6 +main::@6: scope:[main] from main::@15 + [52] (byte) main::r_add#1 ← (byte) main::r_add#10 >> (byte) 1 to:main::@5 -bitmap_plot: scope:[bitmap_plot] from main::@11 - [52] (word~) bitmap_plot::$3 ← *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_plot::y#0) w= *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_plot::y#0) - [53] (word~) bitmap_plot::$1 ← (word)(signed word) bitmap_plot::x#0 & (word) $fff8 - [54] (byte*) bitmap_plot::plotter#1 ← (byte*)(word~) bitmap_plot::$3 + (word~) bitmap_plot::$1 - [55] (byte~) bitmap_plot::$2 ← < (word)(signed word) bitmap_plot::x#0 - [56] *((byte*) bitmap_plot::plotter#1) ← *((byte*) bitmap_plot::plotter#1) | *((const byte[$100]) bitmap_plot_bit#0 + (byte~) bitmap_plot::$2) +main::@5: scope:[main] from main::@15 main::@4 main::@6 + [53] (byte) main::r_add#12 ← phi( main::@6/(byte) main::r_add#1 main::@4/(byte) main::r_add#10 ) + [54] if((signed word) main::r#1>=(signed word)(number) $200*(number) $c+(number) $100) goto main::@7 + to:main::@1 +main::@7: scope:[main] from main::@5 main::@7 + [55] *((const byte*) BORDERCOL#0) ← ++ *((const byte*) BORDERCOL#0) + to:main::@7 +bitmap_plot: scope:[bitmap_plot] from main::@13 + [56] (word~) bitmap_plot::$3 ← *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_plot::y#0) w= *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_plot::y#0) + [57] (word~) bitmap_plot::$1 ← (word)(signed word) bitmap_plot::x#0 & (word) $fff8 + [58] (byte*) bitmap_plot::plotter#1 ← (byte*)(word~) bitmap_plot::$3 + (word~) bitmap_plot::$1 + [59] (byte~) bitmap_plot::$2 ← < (word)(signed word) bitmap_plot::x#0 + [60] *((byte*) bitmap_plot::plotter#1) ← *((byte*) bitmap_plot::plotter#1) | *((const byte[$100]) bitmap_plot_bit#0 + (byte~) bitmap_plot::$2) to:bitmap_plot::@return bitmap_plot::@return: scope:[bitmap_plot] from bitmap_plot - [57] return + [61] return to:@return -mul16s: scope:[mul16s] from main::@10 main::@2 sin16s_gen2::@3 - [58] (signed word) mul16s::b#3 ← phi( main::@2/(signed word) mul16s::b#1 main::@10/(signed word) mul16s::b#2 sin16s_gen2::@3/(const signed word) sin16s_gen2::ampl#0 ) - [58] (signed word) mul16s::a#3 ← phi( main::@2/(signed word) mul16s::a#1 main::@10/(signed word) mul16s::a#2 sin16s_gen2::@3/(signed word) mul16s::a#0 ) - [59] (dword~) mul16u::mb#6 ← (word)(signed word) mul16s::b#3 - [60] (word~) mul16u::a#8 ← (word)(signed word) mul16s::a#3 - [61] call mul16u - [62] (dword) mul16u::return#2 ← (dword) mul16u::res#2 +mul16s: scope:[mul16s] from main::@12 main::@2 sin16s_gen2::@3 + [62] (signed word) mul16s::b#3 ← phi( main::@2/(signed word) mul16s::b#1 main::@12/(signed word) mul16s::b#2 sin16s_gen2::@3/(const signed word) sin16s_gen2::ampl#0 ) + [62] (signed word) mul16s::a#3 ← phi( main::@2/(signed word) mul16s::a#1 main::@12/(signed word) mul16s::a#2 sin16s_gen2::@3/(signed word) mul16s::a#0 ) + [63] (dword~) mul16u::mb#6 ← (word)(signed word) mul16s::b#3 + [64] (word~) mul16u::a#8 ← (word)(signed word) mul16s::a#3 + [65] call mul16u + [66] (dword) mul16u::return#2 ← (dword) mul16u::res#2 to:mul16s::@5 mul16s::@5: scope:[mul16s] from mul16s - [63] (dword) mul16s::m#0 ← (dword) mul16u::return#2 - [64] if((signed word) mul16s::a#3>=(signed byte) 0) goto mul16s::@1 + [67] (dword) mul16s::m#0 ← (dword) mul16u::return#2 + [68] if((signed word) mul16s::a#3>=(signed byte) 0) goto mul16s::@1 to:mul16s::@3 mul16s::@3: scope:[mul16s] from mul16s::@5 - [65] (word~) mul16s::$9 ← > (dword) mul16s::m#0 - [66] (word~) mul16s::$16 ← (word~) mul16s::$9 - (word)(signed word) mul16s::b#3 - [67] (dword) mul16s::m#1 ← (dword) mul16s::m#0 hi= (word~) mul16s::$16 + [69] (word~) mul16s::$9 ← > (dword) mul16s::m#0 + [70] (word~) mul16s::$16 ← (word~) mul16s::$9 - (word)(signed word) mul16s::b#3 + [71] (dword) mul16s::m#1 ← (dword) mul16s::m#0 hi= (word~) mul16s::$16 to:mul16s::@1 mul16s::@1: scope:[mul16s] from mul16s::@3 mul16s::@5 - [68] (dword) mul16s::m#5 ← phi( mul16s::@3/(dword) mul16s::m#1 mul16s::@5/(dword) mul16s::m#0 ) - [69] if((signed word) mul16s::b#3>=(signed byte) 0) goto mul16s::@2 + [72] (dword) mul16s::m#5 ← phi( mul16s::@3/(dword) mul16s::m#1 mul16s::@5/(dword) mul16s::m#0 ) + [73] if((signed word) mul16s::b#3>=(signed byte) 0) goto mul16s::@2 to:mul16s::@4 mul16s::@4: scope:[mul16s] from mul16s::@1 - [70] (word~) mul16s::$13 ← > (dword) mul16s::m#5 - [71] (word~) mul16s::$17 ← (word~) mul16s::$13 - (word)(signed word) mul16s::a#3 - [72] (dword) mul16s::m#2 ← (dword) mul16s::m#5 hi= (word~) mul16s::$17 + [74] (word~) mul16s::$13 ← > (dword) mul16s::m#5 + [75] (word~) mul16s::$17 ← (word~) mul16s::$13 - (word)(signed word) mul16s::a#3 + [76] (dword) mul16s::m#2 ← (dword) mul16s::m#5 hi= (word~) mul16s::$17 to:mul16s::@2 mul16s::@2: scope:[mul16s] from mul16s::@1 mul16s::@4 - [73] (dword) mul16s::m#4 ← phi( mul16s::@1/(dword) mul16s::m#5 mul16s::@4/(dword) mul16s::m#2 ) - [74] (signed dword) mul16s::return#0 ← (signed dword)(dword) mul16s::m#4 + [77] (dword) mul16s::m#4 ← phi( mul16s::@1/(dword) mul16s::m#5 mul16s::@4/(dword) mul16s::m#2 ) + [78] (signed dword) mul16s::return#0 ← (signed dword)(dword) mul16s::m#4 to:mul16s::@return mul16s::@return: scope:[mul16s] from mul16s::@2 - [75] return - to:@return -mul16u: scope:[mul16u] from mul16s mulu16_sel - [76] (word) mul16u::a#6 ← phi( mul16s/(word~) mul16u::a#8 mulu16_sel/(word) mul16u::a#2 ) - [76] (dword) mul16u::mb#0 ← phi( mul16s/(dword~) mul16u::mb#6 mulu16_sel/(word) mul16u::b#1 ) - to:mul16u::@1 -mul16u::@1: scope:[mul16u] from mul16u mul16u::@3 - [77] (dword) mul16u::mb#2 ← phi( mul16u/(dword) mul16u::mb#0 mul16u::@3/(dword) mul16u::mb#1 ) - [77] (dword) mul16u::res#2 ← phi( mul16u/(byte) 0 mul16u::@3/(dword) mul16u::res#6 ) - [77] (word) mul16u::a#3 ← phi( mul16u/(word) mul16u::a#6 mul16u::@3/(word) mul16u::a#0 ) - [78] if((word) mul16u::a#3!=(byte) 0) goto mul16u::@2 - to:mul16u::@return -mul16u::@return: scope:[mul16u] from mul16u::@1 [79] return to:@return +mul16u: scope:[mul16u] from mul16s mulu16_sel + [80] (word) mul16u::a#6 ← phi( mul16s/(word~) mul16u::a#8 mulu16_sel/(word) mul16u::a#2 ) + [80] (dword) mul16u::mb#0 ← phi( mul16s/(dword~) mul16u::mb#6 mulu16_sel/(word) mul16u::b#1 ) + to:mul16u::@1 +mul16u::@1: scope:[mul16u] from mul16u mul16u::@3 + [81] (dword) mul16u::mb#2 ← phi( mul16u/(dword) mul16u::mb#0 mul16u::@3/(dword) mul16u::mb#1 ) + [81] (dword) mul16u::res#2 ← phi( mul16u/(byte) 0 mul16u::@3/(dword) mul16u::res#6 ) + [81] (word) mul16u::a#3 ← phi( mul16u/(word) mul16u::a#6 mul16u::@3/(word) mul16u::a#0 ) + [82] if((word) mul16u::a#3!=(byte) 0) goto mul16u::@2 + to:mul16u::@return +mul16u::@return: scope:[mul16u] from mul16u::@1 + [83] return + to:@return mul16u::@2: scope:[mul16u] from mul16u::@1 - [80] (byte~) mul16u::$1 ← (word) mul16u::a#3 & (byte) 1 - [81] if((byte~) mul16u::$1==(byte) 0) goto mul16u::@3 + [84] (byte~) mul16u::$1 ← (word) mul16u::a#3 & (byte) 1 + [85] if((byte~) mul16u::$1==(byte) 0) goto mul16u::@3 to:mul16u::@4 mul16u::@4: scope:[mul16u] from mul16u::@2 - [82] (dword) mul16u::res#1 ← (dword) mul16u::res#2 + (dword) mul16u::mb#2 + [86] (dword) mul16u::res#1 ← (dword) mul16u::res#2 + (dword) mul16u::mb#2 to:mul16u::@3 mul16u::@3: scope:[mul16u] from mul16u::@2 mul16u::@4 - [83] (dword) mul16u::res#6 ← phi( mul16u::@2/(dword) mul16u::res#2 mul16u::@4/(dword) mul16u::res#1 ) - [84] (word) mul16u::a#0 ← (word) mul16u::a#3 >> (byte) 1 - [85] (dword) mul16u::mb#1 ← (dword) mul16u::mb#2 << (byte) 1 + [87] (dword) mul16u::res#6 ← phi( mul16u::@2/(dword) mul16u::res#2 mul16u::@4/(dword) mul16u::res#1 ) + [88] (word) mul16u::a#0 ← (word) mul16u::a#3 >> (byte) 1 + [89] (dword) mul16u::mb#1 ← (dword) mul16u::mb#2 << (byte) 1 to:mul16u::@1 -init_irq: scope:[init_irq] from main::@6 +init_irq: scope:[init_irq] from main::@8 asm { sei } - [87] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 - [88] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 - [89] *((const byte*) CIA1_INTERRUPT#0) ← (const byte) CIA_INTERRUPT_CLEAR#0 - [90] *((const byte*) VIC_CONTROL#0) ← *((const byte*) VIC_CONTROL#0) | (byte) $80 - [91] *((const byte*) RASTER#0) ← (byte) 0 - [92] *((const byte*) IRQ_ENABLE#0) ← (const byte) IRQ_RASTER#0 - [93] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_CLOBBER)(void()) irq() + [91] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 + [92] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 + [93] *((const byte*) CIA1_INTERRUPT#0) ← (const byte) CIA_INTERRUPT_CLEAR#0 + [94] *((const byte*) VIC_CONTROL#0) ← *((const byte*) VIC_CONTROL#0) | (byte) $80 + [95] *((const byte*) RASTER#0) ← (byte) 0 + [96] *((const byte*) IRQ_ENABLE#0) ← (const byte) IRQ_RASTER#0 + [97] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_CLOBBER)(void()) irq() asm { cli } to:init_irq::@return init_irq::@return: scope:[init_irq] from init_irq - [95] return + [99] return to:@return -bitmap_clear: scope:[bitmap_clear] from main::@8 - [96] phi() - [97] call memset +bitmap_clear: scope:[bitmap_clear] from main::@10 + [100] phi() + [101] call memset to:bitmap_clear::@1 bitmap_clear::@1: scope:[bitmap_clear] from bitmap_clear - [98] phi() - [99] call memset + [102] phi() + [103] call memset to:bitmap_clear::@return bitmap_clear::@return: scope:[bitmap_clear] from bitmap_clear::@1 - [100] return + [104] return to:@return memset: scope:[memset] from bitmap_clear bitmap_clear::@1 - [101] (byte) memset::c#3 ← phi( bitmap_clear/(const byte) bitmap_clear::col#0 bitmap_clear::@1/(byte) 0 ) - [101] (word) memset::num#2 ← phi( bitmap_clear/(word) $3e8 bitmap_clear::@1/(word) $1f40 ) - [101] (void*) memset::str#2 ← phi( bitmap_clear/(void*)(const byte*) SCREEN#0 bitmap_clear::@1/(void*)(const byte*) BITMAP#0 ) - [102] (byte*) memset::end#0 ← (byte*)(void*) memset::str#2 + (word) memset::num#2 - [103] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#2 + [105] (byte) memset::c#3 ← phi( bitmap_clear/(const byte) bitmap_clear::col#0 bitmap_clear::@1/(byte) 0 ) + [105] (word) memset::num#2 ← phi( bitmap_clear/(word) $3e8 bitmap_clear::@1/(word) $1f40 ) + [105] (void*) memset::str#2 ← phi( bitmap_clear/(void*)(const byte*) SCREEN#0 bitmap_clear::@1/(void*)(const byte*) BITMAP#0 ) + [106] (byte*) memset::end#0 ← (byte*)(void*) memset::str#2 + (word) memset::num#2 + [107] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#2 to:memset::@1 memset::@1: scope:[memset] from memset memset::@1 - [104] (byte*) memset::dst#2 ← phi( memset/(byte*~) memset::dst#3 memset::@1/(byte*) memset::dst#1 ) - [105] *((byte*) memset::dst#2) ← (byte) memset::c#3 - [106] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 - [107] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@1 + [108] (byte*) memset::dst#2 ← phi( memset/(byte*~) memset::dst#3 memset::@1/(byte*) memset::dst#1 ) + [109] *((byte*) memset::dst#2) ← (byte) memset::c#3 + [110] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 + [111] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@1 to:memset::@return memset::@return: scope:[memset] from memset::@1 - [108] return + [112] return to:@return -bitmap_init: scope:[bitmap_init] from main::@7 - [109] phi() +bitmap_init: scope:[bitmap_init] from main::@9 + [113] phi() to:bitmap_init::@1 bitmap_init::@1: scope:[bitmap_init] from bitmap_init bitmap_init::@2 - [110] (byte) bitmap_init::x#2 ← phi( bitmap_init/(byte) 0 bitmap_init::@2/(byte) bitmap_init::x#1 ) - [110] (byte) bitmap_init::bits#3 ← phi( bitmap_init/(byte) $80 bitmap_init::@2/(byte) bitmap_init::bits#4 ) - [111] *((const byte[$100]) bitmap_plot_bit#0 + (byte) bitmap_init::x#2) ← (byte) bitmap_init::bits#3 - [112] (byte) bitmap_init::bits#1 ← (byte) bitmap_init::bits#3 >> (byte) 1 - [113] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@6 + [114] (byte) bitmap_init::x#2 ← phi( bitmap_init/(byte) 0 bitmap_init::@2/(byte) bitmap_init::x#1 ) + [114] (byte) bitmap_init::bits#3 ← phi( bitmap_init/(byte) $80 bitmap_init::@2/(byte) bitmap_init::bits#4 ) + [115] *((const byte[$100]) bitmap_plot_bit#0 + (byte) bitmap_init::x#2) ← (byte) bitmap_init::bits#3 + [116] (byte) bitmap_init::bits#1 ← (byte) bitmap_init::bits#3 >> (byte) 1 + [117] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@6 to:bitmap_init::@2 bitmap_init::@6: scope:[bitmap_init] from bitmap_init::@1 - [114] phi() + [118] phi() to:bitmap_init::@2 bitmap_init::@2: scope:[bitmap_init] from bitmap_init::@1 bitmap_init::@6 - [115] (byte) bitmap_init::bits#4 ← phi( bitmap_init::@6/(byte) bitmap_init::bits#1 bitmap_init::@1/(byte) $80 ) - [116] (byte) bitmap_init::x#1 ← ++ (byte) bitmap_init::x#2 - [117] if((byte) bitmap_init::x#1!=(byte) 0) goto bitmap_init::@1 + [119] (byte) bitmap_init::bits#4 ← phi( bitmap_init::@6/(byte) bitmap_init::bits#1 bitmap_init::@1/(byte) $80 ) + [120] (byte) bitmap_init::x#1 ← ++ (byte) bitmap_init::x#2 + [121] if((byte) bitmap_init::x#1!=(byte) 0) goto bitmap_init::@1 to:bitmap_init::@3 bitmap_init::@3: scope:[bitmap_init] from bitmap_init::@2 bitmap_init::@4 - [118] (byte*) bitmap_init::yoffs#2 ← phi( bitmap_init::@2/(const byte*) BITMAP#0 bitmap_init::@4/(byte*) bitmap_init::yoffs#4 ) - [118] (byte) bitmap_init::y#2 ← phi( bitmap_init::@2/(byte) 0 bitmap_init::@4/(byte) bitmap_init::y#1 ) - [119] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 - [120] (byte~) bitmap_init::$4 ← < (byte*) bitmap_init::yoffs#2 - [121] (byte~) bitmap_init::$5 ← (byte~) bitmap_init::$7 | (byte~) bitmap_init::$4 - [122] *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$5 - [123] (byte~) bitmap_init::$6 ← > (byte*) bitmap_init::yoffs#2 - [124] *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$6 - [125] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@4 + [122] (byte*) bitmap_init::yoffs#2 ← phi( bitmap_init::@2/(const byte*) BITMAP#0 bitmap_init::@4/(byte*) bitmap_init::yoffs#4 ) + [122] (byte) bitmap_init::y#2 ← phi( bitmap_init::@2/(byte) 0 bitmap_init::@4/(byte) bitmap_init::y#1 ) + [123] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 + [124] (byte~) bitmap_init::$4 ← < (byte*) bitmap_init::yoffs#2 + [125] (byte~) bitmap_init::$5 ← (byte~) bitmap_init::$7 | (byte~) bitmap_init::$4 + [126] *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$5 + [127] (byte~) bitmap_init::$6 ← > (byte*) bitmap_init::yoffs#2 + [128] *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$6 + [129] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@4 to:bitmap_init::@5 bitmap_init::@5: scope:[bitmap_init] from bitmap_init::@3 - [126] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 + [130] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 to:bitmap_init::@4 bitmap_init::@4: scope:[bitmap_init] from bitmap_init::@3 bitmap_init::@5 - [127] (byte*) bitmap_init::yoffs#4 ← phi( bitmap_init::@3/(byte*) bitmap_init::yoffs#2 bitmap_init::@5/(byte*) bitmap_init::yoffs#1 ) - [128] (byte) bitmap_init::y#1 ← ++ (byte) bitmap_init::y#2 - [129] if((byte) bitmap_init::y#1!=(byte) 0) goto bitmap_init::@3 + [131] (byte*) bitmap_init::yoffs#4 ← phi( bitmap_init::@3/(byte*) bitmap_init::yoffs#2 bitmap_init::@5/(byte*) bitmap_init::yoffs#1 ) + [132] (byte) bitmap_init::y#1 ← ++ (byte) bitmap_init::y#2 + [133] if((byte) bitmap_init::y#1!=(byte) 0) goto bitmap_init::@3 to:bitmap_init::@return bitmap_init::@return: scope:[bitmap_init] from bitmap_init::@4 - [130] return + [134] return to:@return sin16s_gen2: scope:[sin16s_gen2] from main - [131] phi() - [132] call div32u16u - [133] (dword) div32u16u::return#2 ← (dword) div32u16u::return#0 + [135] phi() + [136] call div32u16u + [137] (dword) div32u16u::return#2 ← (dword) div32u16u::return#0 to:sin16s_gen2::@2 sin16s_gen2::@2: scope:[sin16s_gen2] from sin16s_gen2 - [134] (dword) sin16s_gen2::step#0 ← (dword) div32u16u::return#2 + [138] (dword) sin16s_gen2::step#0 ← (dword) div32u16u::return#2 to:sin16s_gen2::@1 sin16s_gen2::@1: scope:[sin16s_gen2] from sin16s_gen2::@2 sin16s_gen2::@4 - [135] (word) sin16s_gen2::i#2 ← phi( sin16s_gen2::@2/(byte) 0 sin16s_gen2::@4/(word) sin16s_gen2::i#1 ) - [135] (signed word*) sin16s_gen2::sintab#2 ← phi( sin16s_gen2::@2/(const signed word[$200]) SINUS#0 sin16s_gen2::@4/(signed word*) sin16s_gen2::sintab#0 ) - [135] (dword) sin16s_gen2::x#2 ← phi( sin16s_gen2::@2/(byte) 0 sin16s_gen2::@4/(dword) sin16s_gen2::x#1 ) - [136] (dword) sin16s::x#0 ← (dword) sin16s_gen2::x#2 - [137] call sin16s - [138] (signed word) sin16s::return#0 ← (signed word) sin16s::return#1 + [139] (word) sin16s_gen2::i#2 ← phi( sin16s_gen2::@2/(byte) 0 sin16s_gen2::@4/(word) sin16s_gen2::i#1 ) + [139] (signed word*) sin16s_gen2::sintab#2 ← phi( sin16s_gen2::@2/(const signed word[$200]) SINUS#0 sin16s_gen2::@4/(signed word*) sin16s_gen2::sintab#0 ) + [139] (dword) sin16s_gen2::x#2 ← phi( sin16s_gen2::@2/(byte) 0 sin16s_gen2::@4/(dword) sin16s_gen2::x#1 ) + [140] (dword) sin16s::x#0 ← (dword) sin16s_gen2::x#2 + [141] call sin16s + [142] (signed word) sin16s::return#0 ← (signed word) sin16s::return#1 to:sin16s_gen2::@3 sin16s_gen2::@3: scope:[sin16s_gen2] from sin16s_gen2::@1 - [139] (signed word) mul16s::a#0 ← (signed word) sin16s::return#0 - [140] call mul16s - [141] (signed dword) mul16s::return#2 ← (signed dword) mul16s::return#0 + [143] (signed word) mul16s::a#0 ← (signed word) sin16s::return#0 + [144] call mul16s + [145] (signed dword) mul16s::return#2 ← (signed dword) mul16s::return#0 to:sin16s_gen2::@4 sin16s_gen2::@4: scope:[sin16s_gen2] from sin16s_gen2::@3 - [142] (signed dword~) sin16s_gen2::$5 ← (signed dword) mul16s::return#2 - [143] (word~) sin16s_gen2::$6 ← > (signed dword~) sin16s_gen2::$5 - [144] *((signed word*) sin16s_gen2::sintab#2) ← (signed word)(word~) sin16s_gen2::$6 - [145] (signed word*) sin16s_gen2::sintab#0 ← (signed word*) sin16s_gen2::sintab#2 + (const byte) SIZEOF_SIGNED_WORD - [146] (dword) sin16s_gen2::x#1 ← (dword) sin16s_gen2::x#2 + (dword) sin16s_gen2::step#0 - [147] (word) sin16s_gen2::i#1 ← ++ (word) sin16s_gen2::i#2 - [148] if((word) sin16s_gen2::i#1<(const word) sin16s_gen2::wavelength#0) goto sin16s_gen2::@1 + [146] (signed dword~) sin16s_gen2::$5 ← (signed dword) mul16s::return#2 + [147] (word~) sin16s_gen2::$6 ← > (signed dword~) sin16s_gen2::$5 + [148] *((signed word*) sin16s_gen2::sintab#2) ← (signed word)(word~) sin16s_gen2::$6 + [149] (signed word*) sin16s_gen2::sintab#0 ← (signed word*) sin16s_gen2::sintab#2 + (const byte) SIZEOF_SIGNED_WORD + [150] (dword) sin16s_gen2::x#1 ← (dword) sin16s_gen2::x#2 + (dword) sin16s_gen2::step#0 + [151] (word) sin16s_gen2::i#1 ← ++ (word) sin16s_gen2::i#2 + [152] if((word) sin16s_gen2::i#1<(const word) sin16s_gen2::wavelength#0) goto sin16s_gen2::@1 to:sin16s_gen2::@return sin16s_gen2::@return: scope:[sin16s_gen2] from sin16s_gen2::@4 - [149] return + [153] return to:@return sin16s: scope:[sin16s] from sin16s_gen2::@1 - [150] if((dword) sin16s::x#0<(const dword) PI_u4f28#0) goto sin16s::@1 + [154] if((dword) sin16s::x#0<(const dword) PI_u4f28#0) goto sin16s::@1 to:sin16s::@4 sin16s::@4: scope:[sin16s] from sin16s - [151] (dword) sin16s::x#1 ← (dword) sin16s::x#0 - (const dword) PI_u4f28#0 + [155] (dword) sin16s::x#1 ← (dword) sin16s::x#0 - (const dword) PI_u4f28#0 to:sin16s::@1 sin16s::@1: scope:[sin16s] from sin16s sin16s::@4 - [152] (byte) sin16s::isUpper#2 ← phi( sin16s/(byte) 0 sin16s::@4/(byte) 1 ) - [152] (dword) sin16s::x#4 ← phi( sin16s/(dword) sin16s::x#0 sin16s::@4/(dword) sin16s::x#1 ) - [153] if((dword) sin16s::x#4<(const dword) PI_HALF_u4f28#0) goto sin16s::@2 + [156] (byte) sin16s::isUpper#2 ← phi( sin16s/(byte) 0 sin16s::@4/(byte) 1 ) + [156] (dword) sin16s::x#4 ← phi( sin16s/(dword) sin16s::x#0 sin16s::@4/(dword) sin16s::x#1 ) + [157] if((dword) sin16s::x#4<(const dword) PI_HALF_u4f28#0) goto sin16s::@2 to:sin16s::@5 sin16s::@5: scope:[sin16s] from sin16s::@1 - [154] (dword) sin16s::x#2 ← (const dword) PI_u4f28#0 - (dword) sin16s::x#4 + [158] (dword) sin16s::x#2 ← (const dword) PI_u4f28#0 - (dword) sin16s::x#4 to:sin16s::@2 sin16s::@2: scope:[sin16s] from sin16s::@1 sin16s::@5 - [155] (dword) sin16s::x#6 ← phi( sin16s::@1/(dword) sin16s::x#4 sin16s::@5/(dword) sin16s::x#2 ) - [156] (dword~) sin16s::$4 ← (dword) sin16s::x#6 << (byte) 3 - [157] (word) sin16s::x1#0 ← > (dword~) sin16s::$4 - [158] (word) mulu16_sel::v1#0 ← (word) sin16s::x1#0 - [159] (word) mulu16_sel::v2#0 ← (word) sin16s::x1#0 - [160] call mulu16_sel - [161] (word) mulu16_sel::return#0 ← (word) mulu16_sel::return#12 + [159] (dword) sin16s::x#6 ← phi( sin16s::@1/(dword) sin16s::x#4 sin16s::@5/(dword) sin16s::x#2 ) + [160] (dword~) sin16s::$4 ← (dword) sin16s::x#6 << (byte) 3 + [161] (word) sin16s::x1#0 ← > (dword~) sin16s::$4 + [162] (word) mulu16_sel::v1#0 ← (word) sin16s::x1#0 + [163] (word) mulu16_sel::v2#0 ← (word) sin16s::x1#0 + [164] call mulu16_sel + [165] (word) mulu16_sel::return#0 ← (word) mulu16_sel::return#12 to:sin16s::@7 sin16s::@7: scope:[sin16s] from sin16s::@2 - [162] (word) sin16s::x2#0 ← (word) mulu16_sel::return#0 - [163] (word) mulu16_sel::v1#1 ← (word) sin16s::x2#0 - [164] (word) mulu16_sel::v2#1 ← (word) sin16s::x1#0 - [165] call mulu16_sel - [166] (word) mulu16_sel::return#1 ← (word) mulu16_sel::return#12 + [166] (word) sin16s::x2#0 ← (word) mulu16_sel::return#0 + [167] (word) mulu16_sel::v1#1 ← (word) sin16s::x2#0 + [168] (word) mulu16_sel::v2#1 ← (word) sin16s::x1#0 + [169] call mulu16_sel + [170] (word) mulu16_sel::return#1 ← (word) mulu16_sel::return#12 to:sin16s::@8 sin16s::@8: scope:[sin16s] from sin16s::@7 - [167] (word) sin16s::x3#0 ← (word) mulu16_sel::return#1 - [168] (word) mulu16_sel::v1#2 ← (word) sin16s::x3#0 - [169] call mulu16_sel - [170] (word) mulu16_sel::return#2 ← (word) mulu16_sel::return#12 + [171] (word) sin16s::x3#0 ← (word) mulu16_sel::return#1 + [172] (word) mulu16_sel::v1#2 ← (word) sin16s::x3#0 + [173] call mulu16_sel + [174] (word) mulu16_sel::return#2 ← (word) mulu16_sel::return#12 to:sin16s::@9 sin16s::@9: scope:[sin16s] from sin16s::@8 - [171] (word) sin16s::x3_6#0 ← (word) mulu16_sel::return#2 - [172] (word) sin16s::usinx#0 ← (word) sin16s::x1#0 - (word) sin16s::x3_6#0 - [173] (word) mulu16_sel::v1#3 ← (word) sin16s::x3#0 - [174] (word) mulu16_sel::v2#3 ← (word) sin16s::x1#0 - [175] call mulu16_sel - [176] (word) mulu16_sel::return#10 ← (word) mulu16_sel::return#12 + [175] (word) sin16s::x3_6#0 ← (word) mulu16_sel::return#2 + [176] (word) sin16s::usinx#0 ← (word) sin16s::x1#0 - (word) sin16s::x3_6#0 + [177] (word) mulu16_sel::v1#3 ← (word) sin16s::x3#0 + [178] (word) mulu16_sel::v2#3 ← (word) sin16s::x1#0 + [179] call mulu16_sel + [180] (word) mulu16_sel::return#10 ← (word) mulu16_sel::return#12 to:sin16s::@10 sin16s::@10: scope:[sin16s] from sin16s::@9 - [177] (word) sin16s::x4#0 ← (word) mulu16_sel::return#10 - [178] (word) mulu16_sel::v1#4 ← (word) sin16s::x4#0 - [179] (word) mulu16_sel::v2#4 ← (word) sin16s::x1#0 - [180] call mulu16_sel - [181] (word) mulu16_sel::return#11 ← (word) mulu16_sel::return#12 + [181] (word) sin16s::x4#0 ← (word) mulu16_sel::return#10 + [182] (word) mulu16_sel::v1#4 ← (word) sin16s::x4#0 + [183] (word) mulu16_sel::v2#4 ← (word) sin16s::x1#0 + [184] call mulu16_sel + [185] (word) mulu16_sel::return#11 ← (word) mulu16_sel::return#12 to:sin16s::@11 sin16s::@11: scope:[sin16s] from sin16s::@10 - [182] (word) sin16s::x5#0 ← (word) mulu16_sel::return#11 - [183] (word) sin16s::x5_128#0 ← (word) sin16s::x5#0 >> (byte) 4 - [184] (word) sin16s::usinx#1 ← (word) sin16s::usinx#0 + (word) sin16s::x5_128#0 - [185] if((byte) sin16s::isUpper#2==(byte) 0) goto sin16s::@12 + [186] (word) sin16s::x5#0 ← (word) mulu16_sel::return#11 + [187] (word) sin16s::x5_128#0 ← (word) sin16s::x5#0 >> (byte) 4 + [188] (word) sin16s::usinx#1 ← (word) sin16s::usinx#0 + (word) sin16s::x5_128#0 + [189] if((byte) sin16s::isUpper#2==(byte) 0) goto sin16s::@12 to:sin16s::@6 sin16s::@6: scope:[sin16s] from sin16s::@11 - [186] (signed word) sin16s::sinx#1 ← - (signed word)(word) sin16s::usinx#1 + [190] (signed word) sin16s::sinx#1 ← - (signed word)(word) sin16s::usinx#1 to:sin16s::@3 sin16s::@3: scope:[sin16s] from sin16s::@12 sin16s::@6 - [187] (signed word) sin16s::return#1 ← phi( sin16s::@12/(signed word~) sin16s::return#5 sin16s::@6/(signed word) sin16s::sinx#1 ) + [191] (signed word) sin16s::return#1 ← phi( sin16s::@12/(signed word~) sin16s::return#5 sin16s::@6/(signed word) sin16s::sinx#1 ) to:sin16s::@return sin16s::@return: scope:[sin16s] from sin16s::@3 - [188] return + [192] return to:@return sin16s::@12: scope:[sin16s] from sin16s::@11 - [189] (signed word~) sin16s::return#5 ← (signed word)(word) sin16s::usinx#1 + [193] (signed word~) sin16s::return#5 ← (signed word)(word) sin16s::usinx#1 to:sin16s::@3 mulu16_sel: scope:[mulu16_sel] from sin16s::@10 sin16s::@2 sin16s::@7 sin16s::@8 sin16s::@9 - [190] (byte) mulu16_sel::select#5 ← phi( sin16s::@9/(byte) 0 sin16s::@10/(byte) 0 sin16s::@2/(byte) 0 sin16s::@7/(byte) 1 sin16s::@8/(byte) 1 ) - [190] (word) mulu16_sel::v2#5 ← phi( sin16s::@9/(word) mulu16_sel::v2#3 sin16s::@10/(word) mulu16_sel::v2#4 sin16s::@2/(word) mulu16_sel::v2#0 sin16s::@7/(word) mulu16_sel::v2#1 sin16s::@8/(word)(number) $10000/(number) 6 ) - [190] (word) mulu16_sel::v1#5 ← phi( sin16s::@9/(word) mulu16_sel::v1#3 sin16s::@10/(word) mulu16_sel::v1#4 sin16s::@2/(word) mulu16_sel::v1#0 sin16s::@7/(word) mulu16_sel::v1#1 sin16s::@8/(word) mulu16_sel::v1#2 ) - [191] (word) mul16u::a#2 ← (word) mulu16_sel::v1#5 - [192] (word) mul16u::b#1 ← (word) mulu16_sel::v2#5 - [193] call mul16u - [194] (dword) mul16u::return#3 ← (dword) mul16u::res#2 + [194] (byte) mulu16_sel::select#5 ← phi( sin16s::@9/(byte) 0 sin16s::@10/(byte) 0 sin16s::@2/(byte) 0 sin16s::@7/(byte) 1 sin16s::@8/(byte) 1 ) + [194] (word) mulu16_sel::v2#5 ← phi( sin16s::@9/(word) mulu16_sel::v2#3 sin16s::@10/(word) mulu16_sel::v2#4 sin16s::@2/(word) mulu16_sel::v2#0 sin16s::@7/(word) mulu16_sel::v2#1 sin16s::@8/(word)(number) $10000/(number) 6 ) + [194] (word) mulu16_sel::v1#5 ← phi( sin16s::@9/(word) mulu16_sel::v1#3 sin16s::@10/(word) mulu16_sel::v1#4 sin16s::@2/(word) mulu16_sel::v1#0 sin16s::@7/(word) mulu16_sel::v1#1 sin16s::@8/(word) mulu16_sel::v1#2 ) + [195] (word) mul16u::a#2 ← (word) mulu16_sel::v1#5 + [196] (word) mul16u::b#1 ← (word) mulu16_sel::v2#5 + [197] call mul16u + [198] (dword) mul16u::return#3 ← (dword) mul16u::res#2 to:mulu16_sel::@1 mulu16_sel::@1: scope:[mulu16_sel] from mulu16_sel - [195] (dword~) mulu16_sel::$0 ← (dword) mul16u::return#3 - [196] (dword~) mulu16_sel::$1 ← (dword~) mulu16_sel::$0 << (byte) mulu16_sel::select#5 - [197] (word) mulu16_sel::return#12 ← > (dword~) mulu16_sel::$1 + [199] (dword~) mulu16_sel::$0 ← (dword) mul16u::return#3 + [200] (dword~) mulu16_sel::$1 ← (dword~) mulu16_sel::$0 << (byte) mulu16_sel::select#5 + [201] (word) mulu16_sel::return#12 ← > (dword~) mulu16_sel::$1 to:mulu16_sel::@return mulu16_sel::@return: scope:[mulu16_sel] from mulu16_sel::@1 - [198] return + [202] return to:@return div32u16u: scope:[div32u16u] from sin16s_gen2 - [199] phi() - [200] call divr16u - [201] (word) divr16u::return#2 ← (word) divr16u::return#0 + [203] phi() + [204] call divr16u + [205] (word) divr16u::return#2 ← (word) divr16u::return#0 to:div32u16u::@1 div32u16u::@1: scope:[div32u16u] from div32u16u - [202] (word) div32u16u::quotient_hi#0 ← (word) divr16u::return#2 - [203] (word) divr16u::rem#4 ← (word) rem16u#1 - [204] call divr16u - [205] (word) divr16u::return#3 ← (word) divr16u::return#0 + [206] (word) div32u16u::quotient_hi#0 ← (word) divr16u::return#2 + [207] (word) divr16u::rem#4 ← (word) rem16u#1 + [208] call divr16u + [209] (word) divr16u::return#3 ← (word) divr16u::return#0 to:div32u16u::@2 div32u16u::@2: scope:[div32u16u] from div32u16u::@1 - [206] (word) div32u16u::quotient_lo#0 ← (word) divr16u::return#3 - [207] (dword) div32u16u::return#0 ← (word) div32u16u::quotient_hi#0 dw= (word) div32u16u::quotient_lo#0 + [210] (word) div32u16u::quotient_lo#0 ← (word) divr16u::return#3 + [211] (dword) div32u16u::return#0 ← (word) div32u16u::quotient_hi#0 dw= (word) div32u16u::quotient_lo#0 to:div32u16u::@return div32u16u::@return: scope:[div32u16u] from div32u16u::@2 - [208] return + [212] return to:@return divr16u: scope:[divr16u] from div32u16u div32u16u::@1 - [209] (word) divr16u::dividend#5 ← phi( div32u16u/>(const dword) PI2_u4f28#0 div32u16u::@1/<(const dword) PI2_u4f28#0 ) - [209] (word) divr16u::rem#10 ← phi( div32u16u/(byte) 0 div32u16u::@1/(word) divr16u::rem#4 ) + [213] (word) divr16u::dividend#5 ← phi( div32u16u/>(const dword) PI2_u4f28#0 div32u16u::@1/<(const dword) PI2_u4f28#0 ) + [213] (word) divr16u::rem#10 ← phi( div32u16u/(byte) 0 div32u16u::@1/(word) divr16u::rem#4 ) to:divr16u::@1 divr16u::@1: scope:[divr16u] from divr16u divr16u::@3 - [210] (byte) divr16u::i#2 ← phi( divr16u/(byte) 0 divr16u::@3/(byte) divr16u::i#1 ) - [210] (word) divr16u::quotient#3 ← phi( divr16u/(byte) 0 divr16u::@3/(word) divr16u::return#0 ) - [210] (word) divr16u::dividend#3 ← phi( divr16u/(word) divr16u::dividend#5 divr16u::@3/(word) divr16u::dividend#0 ) - [210] (word) divr16u::rem#5 ← phi( divr16u/(word) divr16u::rem#10 divr16u::@3/(word) divr16u::rem#11 ) - [211] (word) divr16u::rem#0 ← (word) divr16u::rem#5 << (byte) 1 - [212] (byte~) divr16u::$1 ← > (word) divr16u::dividend#3 - [213] (byte~) divr16u::$2 ← (byte~) divr16u::$1 & (byte) $80 - [214] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 + [214] (byte) divr16u::i#2 ← phi( divr16u/(byte) 0 divr16u::@3/(byte) divr16u::i#1 ) + [214] (word) divr16u::quotient#3 ← phi( divr16u/(byte) 0 divr16u::@3/(word) divr16u::return#0 ) + [214] (word) divr16u::dividend#3 ← phi( divr16u/(word) divr16u::dividend#5 divr16u::@3/(word) divr16u::dividend#0 ) + [214] (word) divr16u::rem#5 ← phi( divr16u/(word) divr16u::rem#10 divr16u::@3/(word) divr16u::rem#11 ) + [215] (word) divr16u::rem#0 ← (word) divr16u::rem#5 << (byte) 1 + [216] (byte~) divr16u::$1 ← > (word) divr16u::dividend#3 + [217] (byte~) divr16u::$2 ← (byte~) divr16u::$1 & (byte) $80 + [218] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 to:divr16u::@4 divr16u::@4: scope:[divr16u] from divr16u::@1 - [215] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 + [219] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 to:divr16u::@2 divr16u::@2: scope:[divr16u] from divr16u::@1 divr16u::@4 - [216] (word) divr16u::rem#6 ← phi( divr16u::@1/(word) divr16u::rem#0 divr16u::@4/(word) divr16u::rem#1 ) - [217] (word) divr16u::dividend#0 ← (word) divr16u::dividend#3 << (byte) 1 - [218] (word) divr16u::quotient#1 ← (word) divr16u::quotient#3 << (byte) 1 - [219] if((word) divr16u::rem#6<(const word) sin16s_gen2::wavelength#0) goto divr16u::@3 + [220] (word) divr16u::rem#6 ← phi( divr16u::@1/(word) divr16u::rem#0 divr16u::@4/(word) divr16u::rem#1 ) + [221] (word) divr16u::dividend#0 ← (word) divr16u::dividend#3 << (byte) 1 + [222] (word) divr16u::quotient#1 ← (word) divr16u::quotient#3 << (byte) 1 + [223] if((word) divr16u::rem#6<(const word) sin16s_gen2::wavelength#0) goto divr16u::@3 to:divr16u::@5 divr16u::@5: scope:[divr16u] from divr16u::@2 - [220] (word) divr16u::quotient#2 ← ++ (word) divr16u::quotient#1 - [221] (word) divr16u::rem#2 ← (word) divr16u::rem#6 - (const word) sin16s_gen2::wavelength#0 + [224] (word) divr16u::quotient#2 ← ++ (word) divr16u::quotient#1 + [225] (word) divr16u::rem#2 ← (word) divr16u::rem#6 - (const word) sin16s_gen2::wavelength#0 to:divr16u::@3 divr16u::@3: scope:[divr16u] from divr16u::@2 divr16u::@5 - [222] (word) divr16u::return#0 ← phi( divr16u::@2/(word) divr16u::quotient#1 divr16u::@5/(word) divr16u::quotient#2 ) - [222] (word) divr16u::rem#11 ← phi( divr16u::@2/(word) divr16u::rem#6 divr16u::@5/(word) divr16u::rem#2 ) - [223] (byte) divr16u::i#1 ← ++ (byte) divr16u::i#2 - [224] if((byte) divr16u::i#1!=(byte) $10) goto divr16u::@1 + [226] (word) divr16u::return#0 ← phi( divr16u::@2/(word) divr16u::quotient#1 divr16u::@5/(word) divr16u::quotient#2 ) + [226] (word) divr16u::rem#11 ← phi( divr16u::@2/(word) divr16u::rem#6 divr16u::@5/(word) divr16u::rem#2 ) + [227] (byte) divr16u::i#1 ← ++ (byte) divr16u::i#2 + [228] if((byte) divr16u::i#1!=(byte) $10) goto divr16u::@1 to:divr16u::@6 divr16u::@6: scope:[divr16u] from divr16u::@3 - [225] (word) rem16u#1 ← (word) divr16u::rem#11 + [229] (word) rem16u#1 ← (word) divr16u::rem#11 to:divr16u::@return divr16u::@return: scope:[divr16u] from divr16u::@6 - [226] return + [230] return to:@return irq: scope:[irq] from - [227] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 - [228] if((byte) 0==(byte) frame_cnt#0) goto irq::@1 + [231] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 + [232] if((byte) 0==(byte) frame_cnt#0) goto irq::@1 to:irq::@2 irq::@2: scope:[irq] from irq - [229] (byte) frame_cnt#1 ← ++ (byte) frame_cnt#0 + [233] (byte) frame_cnt#1 ← ++ (byte) frame_cnt#0 to:irq::@1 irq::@1: scope:[irq] from irq irq::@2 - [230] (byte) frame_cnt#2 ← phi( irq/(byte) frame_cnt#0 irq::@2/(byte) frame_cnt#1 ) - [231] *((const byte*) BGCOL#0) ← (const byte) BLACK#0 - [232] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 + [234] (byte) frame_cnt#2 ← phi( irq/(byte) frame_cnt#0 irq::@2/(byte) frame_cnt#1 ) + [235] *((const byte*) BGCOL#0) ← (const byte) BLACK#0 + [236] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 to:irq::@return irq::@return: scope:[irq] from irq::@1 - [233] return + [237] return to:@return diff --git a/src/test/ref/bitmap-plot-2.log b/src/test/ref/bitmap-plot-2.log index a8a683c67..79977bcf8 100644 --- a/src/test/ref/bitmap-plot-2.log +++ b/src/test/ref/bitmap-plot-2.log @@ -60,7 +60,6 @@ Warning! Adding boolean cast to non-boolean condition *((byte*) strcpy::src) Warning! Adding boolean cast to non-boolean sub-expression (byte) frame_cnt Identified constant variable (byte*) BITMAP Identified constant variable (byte*) SCREEN -Identified constant variable (byte) main::r_add Inlined call (byte~) vicSelectGfxBank::$0 ← call toDd00 (byte*) vicSelectGfxBank::gfx Inlined call (byte~) main::$6 ← call toD018 (byte*) SCREEN (byte*) BITMAP Culled Empty Block (label) @1 @@ -103,18 +102,18 @@ Culled Empty Block (label) bitmap_init::@8 Culled Empty Block (label) @29 Culled Empty Block (label) @30 Culled Empty Block (label) main::toD0181_@1 -Culled Empty Block (label) main::@8 -Culled Empty Block (label) main::@3 Culled Empty Block (label) main::@9 -Culled Empty Block (label) main::@6 -Culled Empty Block (label) main::@12 +Culled Empty Block (label) main::@3 +Culled Empty Block (label) main::@10 Culled Empty Block (label) main::@7 -Culled Empty Block (label) main::@13 Culled Empty Block (label) main::@14 -Culled Empty Block (label) main::@18 -Culled Empty Block (label) main::@17 -Culled Empty Block (label) main::@19 +Culled Empty Block (label) main::@8 +Culled Empty Block (label) main::@15 +Culled Empty Block (label) main::@16 Culled Empty Block (label) main::@20 +Culled Empty Block (label) main::@19 +Culled Empty Block (label) main::@21 +Culled Empty Block (label) main::@22 Culled Empty Block (label) @33 CONTROL FLOW GRAPH SSA @@ -311,9 +310,9 @@ mul16u::@return: scope:[mul16u] from mul16u::@3 (dword) mul16u::return#1 ← (dword) mul16u::return#4 return to:@return -mul16s: scope:[mul16s] from main::@2 main::@26 sin16s_gen2::@4 - (signed word) mul16s::b#3 ← phi( main::@2/(signed word) mul16s::b#1 main::@26/(signed word) mul16s::b#2 sin16s_gen2::@4/(signed word) mul16s::b#0 ) - (signed word) mul16s::a#3 ← phi( main::@2/(signed word) mul16s::a#1 main::@26/(signed word) mul16s::a#2 sin16s_gen2::@4/(signed word) mul16s::a#0 ) +mul16s: scope:[mul16s] from main::@2 main::@28 sin16s_gen2::@4 + (signed word) mul16s::b#3 ← phi( main::@2/(signed word) mul16s::b#1 main::@28/(signed word) mul16s::b#2 sin16s_gen2::@4/(signed word) mul16s::b#0 ) + (signed word) mul16s::a#3 ← phi( main::@2/(signed word) mul16s::a#1 main::@28/(signed word) mul16s::a#2 sin16s_gen2::@4/(signed word) mul16s::a#0 ) (word~) mul16s::$0 ← ((word)) (signed word) mul16s::a#3 (word~) mul16s::$1 ← ((word)) (signed word) mul16s::b#3 (word) mul16u::a#1 ← (word~) mul16s::$0 @@ -638,9 +637,9 @@ memset::@return: scope:[memset] from memset::@2 (byte[$100]) bitmap_plot_yhi#0 ← { fill( $100, 0) } (byte[$100]) bitmap_plot_bit#0 ← { fill( $100, 0) } to:@31 -bitmap_init: scope:[bitmap_init] from main::@22 - (byte*) bitmap_init::screen#1 ← phi( main::@22/(byte*) bitmap_init::screen#0 ) - (byte*) bitmap_init::gfx#1 ← phi( main::@22/(byte*) bitmap_init::gfx#0 ) +bitmap_init: scope:[bitmap_init] from main::@24 + (byte*) bitmap_init::screen#1 ← phi( main::@24/(byte*) bitmap_init::screen#0 ) + (byte*) bitmap_init::gfx#1 ← phi( main::@24/(byte*) bitmap_init::gfx#0 ) (byte*) bitmap_gfx#1 ← (byte*) bitmap_init::gfx#1 (byte*) bitmap_screen#1 ← (byte*) bitmap_init::screen#1 (byte) bitmap_init::bits#0 ← (number) $80 @@ -722,11 +721,11 @@ bitmap_init::@return: scope:[bitmap_init] from bitmap_init::@6 (byte*) bitmap_screen#2 ← (byte*) bitmap_screen#6 return to:@return -bitmap_clear: scope:[bitmap_clear] from main::@23 - (byte*) bitmap_gfx#12 ← phi( main::@23/(byte*) bitmap_gfx#3 ) - (byte*) bitmap_screen#7 ← phi( main::@23/(byte*) bitmap_screen#3 ) - (byte) bitmap_clear::bgcol#1 ← phi( main::@23/(byte) bitmap_clear::bgcol#0 ) - (byte) bitmap_clear::fgcol#1 ← phi( main::@23/(byte) bitmap_clear::fgcol#0 ) +bitmap_clear: scope:[bitmap_clear] from main::@25 + (byte*) bitmap_gfx#12 ← phi( main::@25/(byte*) bitmap_gfx#3 ) + (byte*) bitmap_screen#7 ← phi( main::@25/(byte*) bitmap_screen#3 ) + (byte) bitmap_clear::bgcol#1 ← phi( main::@25/(byte) bitmap_clear::bgcol#0 ) + (byte) bitmap_clear::fgcol#1 ← phi( main::@25/(byte) bitmap_clear::fgcol#0 ) (number~) bitmap_clear::$0 ← (byte) bitmap_clear::fgcol#1 * (number) $10 (number~) bitmap_clear::$1 ← (number~) bitmap_clear::$0 + (byte) bitmap_clear::bgcol#1 (byte) bitmap_clear::col#0 ← (number~) bitmap_clear::$1 @@ -749,9 +748,9 @@ bitmap_clear::@2: scope:[bitmap_clear] from bitmap_clear::@1 bitmap_clear::@return: scope:[bitmap_clear] from bitmap_clear::@2 return to:@return -bitmap_plot: scope:[bitmap_plot] from main::@27 - (word) bitmap_plot::x#1 ← phi( main::@27/(word) bitmap_plot::x#0 ) - (byte) bitmap_plot::y#1 ← phi( main::@27/(byte) bitmap_plot::y#0 ) +bitmap_plot: scope:[bitmap_plot] from main::@29 + (word) bitmap_plot::x#1 ← phi( main::@29/(word) bitmap_plot::x#0 ) + (byte) bitmap_plot::y#1 ← phi( main::@29/(byte) bitmap_plot::y#0 ) (byte*~) bitmap_plot::$0 ← ((byte*)) { *((byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_plot::y#1), *((byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_plot::y#1) } (byte*) bitmap_plot::plotter#0 ← (byte*~) bitmap_plot::$0 (number~) bitmap_plot::$1 ← (word) bitmap_plot::x#1 & (number) $fff8 @@ -772,7 +771,7 @@ bitmap_plot::@return: scope:[bitmap_plot] from bitmap_plot (signed word[$200]) SINUS#0 ← { fill( $200, 0) } to:@32 main: scope:[main] from @34 - (byte) frame_cnt#24 ← phi( @34/(byte) frame_cnt#8 ) + (byte) frame_cnt#26 ← phi( @34/(byte) frame_cnt#8 ) (byte*) bitmap_screen#17 ← phi( @34/(byte*) bitmap_screen#14 ) (byte*) bitmap_gfx#18 ← phi( @34/(byte*) bitmap_gfx#15 ) (word) rem16u#23 ← phi( @34/(word) rem16u#25 ) @@ -781,9 +780,9 @@ main: scope:[main] from @34 (signed word) sin16s_gen2::min#0 ← (number) -$1001 (signed word) sin16s_gen2::max#0 ← (number) $1001 call sin16s_gen2 - to:main::@22 -main::@22: scope:[main] from main - (byte) frame_cnt#23 ← phi( main/(byte) frame_cnt#24 ) + to:main::@24 +main::@24: scope:[main] from main + (byte) frame_cnt#25 ← phi( main/(byte) frame_cnt#26 ) (byte*) bitmap_screen#12 ← phi( main/(byte*) bitmap_screen#17 ) (byte*) bitmap_gfx#13 ← phi( main/(byte*) bitmap_gfx#18 ) (word) rem16u#17 ← phi( main/(word) rem16u#7 ) @@ -791,23 +790,23 @@ main::@22: scope:[main] from main (byte*) bitmap_init::gfx#0 ← (byte*) BITMAP#0 (byte*) bitmap_init::screen#0 ← (byte*) SCREEN#0 call bitmap_init - to:main::@23 -main::@23: scope:[main] from main::@22 - (byte) frame_cnt#22 ← phi( main::@22/(byte) frame_cnt#23 ) - (word) rem16u#47 ← phi( main::@22/(word) rem16u#8 ) - (byte*) bitmap_screen#8 ← phi( main::@22/(byte*) bitmap_screen#2 ) - (byte*) bitmap_gfx#8 ← phi( main::@22/(byte*) bitmap_gfx#2 ) + to:main::@25 +main::@25: scope:[main] from main::@24 + (byte) frame_cnt#24 ← phi( main::@24/(byte) frame_cnt#25 ) + (word) rem16u#48 ← phi( main::@24/(word) rem16u#8 ) + (byte*) bitmap_screen#8 ← phi( main::@24/(byte*) bitmap_screen#2 ) + (byte*) bitmap_gfx#8 ← phi( main::@24/(byte*) bitmap_gfx#2 ) (byte*) bitmap_gfx#3 ← (byte*) bitmap_gfx#8 (byte*) bitmap_screen#3 ← (byte*) bitmap_screen#8 (byte) bitmap_clear::bgcol#0 ← (byte) BLACK#0 (byte) bitmap_clear::fgcol#0 ← (byte) WHITE#0 call bitmap_clear - to:main::@24 -main::@24: scope:[main] from main::@23 - (byte) frame_cnt#21 ← phi( main::@23/(byte) frame_cnt#22 ) - (byte*) bitmap_screen#37 ← phi( main::@23/(byte*) bitmap_screen#3 ) - (byte*) bitmap_gfx#38 ← phi( main::@23/(byte*) bitmap_gfx#3 ) - (word) rem16u#45 ← phi( main::@23/(word) rem16u#47 ) + to:main::@26 +main::@26: scope:[main] from main::@25 + (byte) frame_cnt#23 ← phi( main::@25/(byte) frame_cnt#24 ) + (byte*) bitmap_screen#38 ← phi( main::@25/(byte*) bitmap_screen#3 ) + (byte*) bitmap_gfx#39 ← phi( main::@25/(byte*) bitmap_gfx#3 ) + (word) rem16u#46 ← phi( main::@25/(word) rem16u#48 ) (byte~) main::$3 ← (byte) VIC_BMM#0 | (byte) VIC_DEN#0 (byte~) main::$4 ← (byte~) main::$3 | (byte) VIC_RSEL#0 (number~) main::$5 ← (byte~) main::$4 | (number) 3 @@ -815,13 +814,13 @@ main::@24: scope:[main] from main::@23 (byte*) main::toD0181_screen#0 ← (byte*) SCREEN#0 (byte*) main::toD0181_gfx#0 ← (byte*) BITMAP#0 to:main::toD0181 -main::toD0181: scope:[main] from main::@24 - (byte) frame_cnt#20 ← phi( main::@24/(byte) frame_cnt#21 ) - (byte*) bitmap_screen#35 ← phi( main::@24/(byte*) bitmap_screen#37 ) - (byte*) bitmap_gfx#36 ← phi( main::@24/(byte*) bitmap_gfx#38 ) - (word) rem16u#43 ← phi( main::@24/(word) rem16u#45 ) - (byte*) main::toD0181_gfx#1 ← phi( main::@24/(byte*) main::toD0181_gfx#0 ) - (byte*) main::toD0181_screen#1 ← phi( main::@24/(byte*) main::toD0181_screen#0 ) +main::toD0181: scope:[main] from main::@26 + (byte) frame_cnt#21 ← phi( main::@26/(byte) frame_cnt#23 ) + (byte*) bitmap_screen#36 ← phi( main::@26/(byte*) bitmap_screen#38 ) + (byte*) bitmap_gfx#37 ← phi( main::@26/(byte*) bitmap_gfx#39 ) + (word) rem16u#44 ← phi( main::@26/(word) rem16u#46 ) + (byte*) main::toD0181_gfx#1 ← phi( main::@26/(byte*) main::toD0181_gfx#0 ) + (byte*) main::toD0181_screen#1 ← phi( main::@26/(byte*) main::toD0181_screen#0 ) (word~) main::toD0181_$0#0 ← ((word)) (byte*) main::toD0181_screen#1 (number~) main::toD0181_$1#0 ← (word~) main::toD0181_$0#0 & (number) $3fff (number~) main::toD0181_$2#0 ← (number~) main::toD0181_$1#0 * (number) 4 @@ -834,14 +833,14 @@ main::toD0181: scope:[main] from main::@24 (byte) main::toD0181_return#0 ← (number~) main::toD0181_$8#0 to:main::toD0181_@return main::toD0181_@return: scope:[main] from main::toD0181 - (byte) frame_cnt#18 ← phi( main::toD0181/(byte) frame_cnt#20 ) - (byte*) bitmap_screen#33 ← phi( main::toD0181/(byte*) bitmap_screen#35 ) - (byte*) bitmap_gfx#34 ← phi( main::toD0181/(byte*) bitmap_gfx#36 ) - (word) rem16u#41 ← phi( main::toD0181/(word) rem16u#43 ) + (byte) frame_cnt#18 ← phi( main::toD0181/(byte) frame_cnt#21 ) + (byte*) bitmap_screen#33 ← phi( main::toD0181/(byte*) bitmap_screen#36 ) + (byte*) bitmap_gfx#34 ← phi( main::toD0181/(byte*) bitmap_gfx#37 ) + (word) rem16u#41 ← phi( main::toD0181/(word) rem16u#44 ) (byte) main::toD0181_return#2 ← phi( main::toD0181/(byte) main::toD0181_return#0 ) (byte) main::toD0181_return#1 ← (byte) main::toD0181_return#2 - to:main::@21 -main::@21: scope:[main] from main::toD0181_@return + to:main::@23 +main::@23: scope:[main] from main::toD0181_@return (byte) frame_cnt#15 ← phi( main::toD0181_@return/(byte) frame_cnt#18 ) (byte*) bitmap_screen#28 ← phi( main::toD0181_@return/(byte*) bitmap_screen#33 ) (byte*) bitmap_gfx#29 ← phi( main::toD0181_@return/(byte*) bitmap_gfx#34 ) @@ -850,47 +849,50 @@ main::@21: scope:[main] from main::toD0181_@return (byte~) main::$6 ← (byte) main::toD0181_return#3 *((byte*) D018#0) ← (byte~) main::$6 call init_irq - to:main::@25 -main::@25: scope:[main] from main::@21 - (byte) frame_cnt#13 ← phi( main::@21/(byte) frame_cnt#15 ) - (byte*) bitmap_screen#23 ← phi( main::@21/(byte*) bitmap_screen#28 ) - (byte*) bitmap_gfx#24 ← phi( main::@21/(byte*) bitmap_gfx#29 ) - (word) rem16u#32 ← phi( main::@21/(word) rem16u#37 ) + to:main::@27 +main::@27: scope:[main] from main::@23 + (byte) frame_cnt#13 ← phi( main::@23/(byte) frame_cnt#15 ) + (byte*) bitmap_screen#23 ← phi( main::@23/(byte*) bitmap_screen#28 ) + (byte*) bitmap_gfx#24 ← phi( main::@23/(byte*) bitmap_gfx#29 ) + (word) rem16u#32 ← phi( main::@23/(word) rem16u#37 ) (word) main::idx_x#0 ← (number) 0 (word) main::idx_y#0 ← (number) $80 (signed word) main::r#0 ← (number) 0 - (byte) main::r_add#0 ← (number) 4 + (byte) main::r_add#0 ← (number) $20 to:main::@1 -main::@1: scope:[main] from main::@25 main::@5 - (byte) frame_cnt#12 ← phi( main::@25/(byte) frame_cnt#13 main::@5/(byte) frame_cnt#14 ) - (byte*) bitmap_screen#18 ← phi( main::@25/(byte*) bitmap_screen#23 main::@5/(byte*) bitmap_screen#20 ) - (byte*) bitmap_gfx#19 ← phi( main::@25/(byte*) bitmap_gfx#24 main::@5/(byte*) bitmap_gfx#21 ) - (word) rem16u#27 ← phi( main::@25/(word) rem16u#32 main::@5/(word) rem16u#29 ) - (word) main::idx_y#8 ← phi( main::@25/(word) main::idx_y#0 main::@5/(word) main::idx_y#10 ) - (signed word) main::r#5 ← phi( main::@25/(signed word) main::r#0 main::@5/(signed word) main::r#1 ) - (word) main::idx_x#5 ← phi( main::@25/(word) main::idx_x#0 main::@5/(word) main::idx_x#7 ) +main::@1: scope:[main] from main::@27 main::@6 + (byte) main::r_add#11 ← phi( main::@27/(byte) main::r_add#0 main::@6/(byte) main::r_add#12 ) + (byte) frame_cnt#12 ← phi( main::@27/(byte) frame_cnt#13 main::@6/(byte) frame_cnt#14 ) + (byte*) bitmap_screen#18 ← phi( main::@27/(byte*) bitmap_screen#23 main::@6/(byte*) bitmap_screen#20 ) + (byte*) bitmap_gfx#19 ← phi( main::@27/(byte*) bitmap_gfx#24 main::@6/(byte*) bitmap_gfx#21 ) + (word) rem16u#27 ← phi( main::@27/(word) rem16u#32 main::@6/(word) rem16u#29 ) + (word) main::idx_y#8 ← phi( main::@27/(word) main::idx_y#0 main::@6/(word) main::idx_y#10 ) + (signed word) main::r#6 ← phi( main::@27/(signed word) main::r#0 main::@6/(signed word) main::r#5 ) + (word) main::idx_x#6 ← phi( main::@27/(word) main::idx_x#0 main::@6/(word) main::idx_x#10 ) if(true) goto main::@2 - to:main::@15 + to:main::@17 main::@2: scope:[main] from main::@1 - (byte*) bitmap_screen#38 ← phi( main::@1/(byte*) bitmap_screen#18 ) - (byte*) bitmap_gfx#39 ← phi( main::@1/(byte*) bitmap_gfx#19 ) - (word) rem16u#46 ← phi( main::@1/(word) rem16u#27 ) + (byte*) bitmap_screen#40 ← phi( main::@1/(byte*) bitmap_screen#18 ) + (byte*) bitmap_gfx#41 ← phi( main::@1/(byte*) bitmap_gfx#19 ) + (word) rem16u#49 ← phi( main::@1/(word) rem16u#27 ) + (byte) main::r_add#10 ← phi( main::@1/(byte) main::r_add#11 ) (byte) frame_cnt#11 ← phi( main::@1/(byte) frame_cnt#12 ) (word) main::idx_y#5 ← phi( main::@1/(word) main::idx_y#8 ) - (signed word) main::r#2 ← phi( main::@1/(signed word) main::r#5 ) - (word) main::idx_x#3 ← phi( main::@1/(word) main::idx_x#5 ) - (word~) main::$28 ← (word) main::idx_x#3 * (const byte) SIZEOF_SIGNED_WORD - (signed word) main::cos_x#0 ← *((signed word[$200]) SINUS#0 + (word~) main::$28) + (signed word) main::r#2 ← phi( main::@1/(signed word) main::r#6 ) + (word) main::idx_x#3 ← phi( main::@1/(word) main::idx_x#6 ) + (word~) main::$32 ← (word) main::idx_x#3 * (const byte) SIZEOF_SIGNED_WORD + (signed word) main::cos_x#0 ← *((signed word[$200]) SINUS#0 + (word~) main::$32) (signed word) mul16s::a#1 ← (signed word) main::r#2 (signed word) mul16s::b#1 ← (signed word) main::cos_x#0 call mul16s (signed dword) mul16s::return#3 ← (signed dword) mul16s::return#1 - to:main::@26 -main::@26: scope:[main] from main::@2 - (byte*) bitmap_screen#36 ← phi( main::@2/(byte*) bitmap_screen#38 ) - (byte*) bitmap_gfx#37 ← phi( main::@2/(byte*) bitmap_gfx#39 ) - (word) rem16u#44 ← phi( main::@2/(word) rem16u#46 ) - (word) main::idx_x#8 ← phi( main::@2/(word) main::idx_x#3 ) + to:main::@28 +main::@28: scope:[main] from main::@2 + (byte*) bitmap_screen#39 ← phi( main::@2/(byte*) bitmap_screen#40 ) + (byte*) bitmap_gfx#40 ← phi( main::@2/(byte*) bitmap_gfx#41 ) + (word) rem16u#47 ← phi( main::@2/(word) rem16u#49 ) + (byte) main::r_add#9 ← phi( main::@2/(byte) main::r_add#10 ) + (word) main::idx_x#11 ← phi( main::@2/(word) main::idx_x#3 ) (byte) frame_cnt#10 ← phi( main::@2/(byte) frame_cnt#11 ) (signed word) main::r#3 ← phi( main::@2/(signed word) main::r#2 ) (word) main::idx_y#3 ← phi( main::@2/(word) main::idx_y#5 ) @@ -903,23 +905,24 @@ main::@26: scope:[main] from main::@2 (number~) main::$12 ← (number) $a0 + (signed word~) main::$11 (word~) main::$13 ← ((word)) (number~) main::$12 (word) main::x#0 ← (word~) main::$13 - (word~) main::$29 ← (word) main::idx_y#3 * (const byte) SIZEOF_SIGNED_WORD - (signed word) main::sin_y#0 ← *((signed word[$200]) SINUS#0 + (word~) main::$29) + (word~) main::$33 ← (word) main::idx_y#3 * (const byte) SIZEOF_SIGNED_WORD + (signed word) main::sin_y#0 ← *((signed word[$200]) SINUS#0 + (word~) main::$33) (signed word) mul16s::a#2 ← (signed word) main::r#3 (signed word) mul16s::b#2 ← (signed word) main::sin_y#0 call mul16s (signed dword) mul16s::return#4 ← (signed dword) mul16s::return#1 - to:main::@27 -main::@27: scope:[main] from main::@26 - (byte*) bitmap_screen#34 ← phi( main::@26/(byte*) bitmap_screen#36 ) - (byte*) bitmap_gfx#35 ← phi( main::@26/(byte*) bitmap_gfx#37 ) - (word) rem16u#42 ← phi( main::@26/(word) rem16u#44 ) - (signed word) main::r#10 ← phi( main::@26/(signed word) main::r#3 ) - (word) main::idx_y#9 ← phi( main::@26/(word) main::idx_y#3 ) - (word) main::idx_x#6 ← phi( main::@26/(word) main::idx_x#8 ) - (byte) frame_cnt#7 ← phi( main::@26/(byte) frame_cnt#10 ) - (word) main::x#1 ← phi( main::@26/(word) main::x#0 ) - (signed dword) mul16s::return#8 ← phi( main::@26/(signed dword) mul16s::return#4 ) + to:main::@29 +main::@29: scope:[main] from main::@28 + (byte*) bitmap_screen#37 ← phi( main::@28/(byte*) bitmap_screen#39 ) + (byte*) bitmap_gfx#38 ← phi( main::@28/(byte*) bitmap_gfx#40 ) + (word) rem16u#45 ← phi( main::@28/(word) rem16u#47 ) + (signed word) main::r#12 ← phi( main::@28/(signed word) main::r#3 ) + (word) main::idx_y#9 ← phi( main::@28/(word) main::idx_y#3 ) + (byte) main::r_add#6 ← phi( main::@28/(byte) main::r_add#9 ) + (word) main::idx_x#7 ← phi( main::@28/(word) main::idx_x#11 ) + (byte) frame_cnt#7 ← phi( main::@28/(byte) frame_cnt#10 ) + (word) main::x#1 ← phi( main::@28/(word) main::x#0 ) + (signed dword) mul16s::return#8 ← phi( main::@28/(signed dword) mul16s::return#4 ) (signed dword~) main::$14 ← (signed dword) mul16s::return#8 (signed dword) main::ypos#0 ← (signed dword~) main::$14 (word~) main::$15 ← > (signed dword) main::ypos#0 @@ -932,81 +935,112 @@ main::@27: scope:[main] from main::@26 (word) bitmap_plot::x#0 ← (word) main::x#1 (byte) bitmap_plot::y#0 ← (byte~) main::$20 call bitmap_plot - to:main::@28 -main::@28: scope:[main] from main::@27 - (byte*) bitmap_screen#30 ← phi( main::@27/(byte*) bitmap_screen#34 ) - (byte*) bitmap_gfx#31 ← phi( main::@27/(byte*) bitmap_gfx#35 ) - (word) rem16u#39 ← phi( main::@27/(word) rem16u#42 ) - (signed word) main::r#9 ← phi( main::@27/(signed word) main::r#10 ) - (word) main::idx_y#7 ← phi( main::@27/(word) main::idx_y#9 ) - (word) main::idx_x#4 ← phi( main::@27/(word) main::idx_x#6 ) - (byte) frame_cnt#3 ← phi( main::@27/(byte) frame_cnt#7 ) + to:main::@30 +main::@30: scope:[main] from main::@29 + (byte*) bitmap_screen#35 ← phi( main::@29/(byte*) bitmap_screen#37 ) + (byte*) bitmap_gfx#36 ← phi( main::@29/(byte*) bitmap_gfx#38 ) + (word) rem16u#43 ← phi( main::@29/(word) rem16u#45 ) + (signed word) main::r#11 ← phi( main::@29/(signed word) main::r#12 ) + (word) main::idx_y#7 ← phi( main::@29/(word) main::idx_y#9 ) + (byte) main::r_add#2 ← phi( main::@29/(byte) main::r_add#6 ) + (word) main::idx_x#4 ← phi( main::@29/(word) main::idx_x#7 ) + (byte) frame_cnt#3 ← phi( main::@29/(byte) frame_cnt#7 ) *((byte[$100]) plots_per_frame#0 + (byte) frame_cnt#3) ← ++ *((byte[$100]) plots_per_frame#0 + (byte) frame_cnt#3) - (word) main::idx_x#1 ← (word) main::idx_x#4 + (byte) main::r_add#0 + (word) main::idx_x#1 ← (word) main::idx_x#4 + (byte) main::r_add#2 (bool~) main::$22 ← (word) main::idx_x#1 >= (number) $200 (bool~) main::$23 ← ! (bool~) main::$22 if((bool~) main::$23) goto main::@4 - to:main::@10 -main::@4: scope:[main] from main::@10 main::@28 - (byte) frame_cnt#17 ← phi( main::@10/(byte) frame_cnt#19 main::@28/(byte) frame_cnt#3 ) - (byte*) bitmap_screen#25 ← phi( main::@10/(byte*) bitmap_screen#29 main::@28/(byte*) bitmap_screen#30 ) - (byte*) bitmap_gfx#26 ← phi( main::@10/(byte*) bitmap_gfx#30 main::@28/(byte*) bitmap_gfx#31 ) - (word) rem16u#34 ← phi( main::@10/(word) rem16u#38 main::@28/(word) rem16u#39 ) - (word) main::idx_x#10 ← phi( main::@10/(word) main::idx_x#2 main::@28/(word) main::idx_x#1 ) - (signed word) main::r#7 ← phi( main::@10/(signed word) main::r#8 main::@28/(signed word) main::r#9 ) - (word) main::idx_y#4 ← phi( main::@10/(word) main::idx_y#6 main::@28/(word) main::idx_y#7 ) - (word) main::idx_y#1 ← (word) main::idx_y#4 + (byte) main::r_add#0 + to:main::@11 +main::@4: scope:[main] from main::@11 main::@30 + (byte) frame_cnt#20 ← phi( main::@11/(byte) frame_cnt#22 main::@30/(byte) frame_cnt#3 ) + (byte*) bitmap_screen#30 ← phi( main::@11/(byte*) bitmap_screen#34 main::@30/(byte*) bitmap_screen#35 ) + (byte*) bitmap_gfx#31 ← phi( main::@11/(byte*) bitmap_gfx#35 main::@30/(byte*) bitmap_gfx#36 ) + (word) rem16u#39 ← phi( main::@11/(word) rem16u#42 main::@30/(word) rem16u#43 ) + (word) main::idx_x#9 ← phi( main::@11/(word) main::idx_x#2 main::@30/(word) main::idx_x#1 ) + (signed word) main::r#8 ← phi( main::@11/(signed word) main::r#10 main::@30/(signed word) main::r#11 ) + (byte) main::r_add#3 ← phi( main::@11/(byte) main::r_add#7 main::@30/(byte) main::r_add#2 ) + (word) main::idx_y#4 ← phi( main::@11/(word) main::idx_y#6 main::@30/(word) main::idx_y#7 ) + (word) main::idx_y#1 ← (word) main::idx_y#4 + (byte) main::r_add#3 (bool~) main::$24 ← (word) main::idx_y#1 >= (number) $200 (bool~) main::$25 ← ! (bool~) main::$24 if((bool~) main::$25) goto main::@5 - to:main::@11 -main::@10: scope:[main] from main::@28 - (byte) frame_cnt#19 ← phi( main::@28/(byte) frame_cnt#3 ) - (byte*) bitmap_screen#29 ← phi( main::@28/(byte*) bitmap_screen#30 ) - (byte*) bitmap_gfx#30 ← phi( main::@28/(byte*) bitmap_gfx#31 ) - (word) rem16u#38 ← phi( main::@28/(word) rem16u#39 ) - (signed word) main::r#8 ← phi( main::@28/(signed word) main::r#9 ) - (word) main::idx_y#6 ← phi( main::@28/(word) main::idx_y#7 ) + to:main::@12 +main::@11: scope:[main] from main::@30 + (byte) frame_cnt#22 ← phi( main::@30/(byte) frame_cnt#3 ) + (byte*) bitmap_screen#34 ← phi( main::@30/(byte*) bitmap_screen#35 ) + (byte*) bitmap_gfx#35 ← phi( main::@30/(byte*) bitmap_gfx#36 ) + (word) rem16u#42 ← phi( main::@30/(word) rem16u#43 ) + (signed word) main::r#10 ← phi( main::@30/(signed word) main::r#11 ) + (byte) main::r_add#7 ← phi( main::@30/(byte) main::r_add#2 ) + (word) main::idx_y#6 ← phi( main::@30/(word) main::idx_y#7 ) (word) main::idx_x#2 ← (number) 0 to:main::@4 -main::@5: scope:[main] from main::@11 main::@4 - (byte) frame_cnt#14 ← phi( main::@11/(byte) frame_cnt#16 main::@4/(byte) frame_cnt#17 ) - (word) main::idx_y#10 ← phi( main::@11/(word) main::idx_y#2 main::@4/(word) main::idx_y#1 ) - (byte*) bitmap_screen#20 ← phi( main::@11/(byte*) bitmap_screen#24 main::@4/(byte*) bitmap_screen#25 ) - (byte*) bitmap_gfx#21 ← phi( main::@11/(byte*) bitmap_gfx#25 main::@4/(byte*) bitmap_gfx#26 ) - (word) rem16u#29 ← phi( main::@11/(word) rem16u#33 main::@4/(word) rem16u#34 ) - (word) main::idx_x#7 ← phi( main::@11/(word) main::idx_x#9 main::@4/(word) main::idx_x#10 ) - (signed word) main::r#4 ← phi( main::@11/(signed word) main::r#6 main::@4/(signed word) main::r#7 ) - (signed word) main::r#1 ← (signed word) main::r#4 + (byte) main::r_add#0 - (bool~) main::$26 ← (signed word) main::r#1 >= (number) $200*(number) $c+(number) $100 - (bool~) main::$27 ← ! (bool~) main::$26 - if((bool~) main::$27) goto main::@1 - to:main::@15 -main::@11: scope:[main] from main::@4 - (byte) frame_cnt#16 ← phi( main::@4/(byte) frame_cnt#17 ) - (byte*) bitmap_screen#24 ← phi( main::@4/(byte*) bitmap_screen#25 ) - (byte*) bitmap_gfx#25 ← phi( main::@4/(byte*) bitmap_gfx#26 ) - (word) rem16u#33 ← phi( main::@4/(word) rem16u#34 ) - (word) main::idx_x#9 ← phi( main::@4/(word) main::idx_x#10 ) - (signed word) main::r#6 ← phi( main::@4/(signed word) main::r#7 ) +main::@5: scope:[main] from main::@12 main::@4 + (byte) frame_cnt#17 ← phi( main::@12/(byte) frame_cnt#19 main::@4/(byte) frame_cnt#20 ) + (word) main::idx_y#12 ← phi( main::@12/(word) main::idx_y#2 main::@4/(word) main::idx_y#1 ) + (byte*) bitmap_screen#25 ← phi( main::@12/(byte*) bitmap_screen#29 main::@4/(byte*) bitmap_screen#30 ) + (byte*) bitmap_gfx#26 ← phi( main::@12/(byte*) bitmap_gfx#30 main::@4/(byte*) bitmap_gfx#31 ) + (word) rem16u#34 ← phi( main::@12/(word) rem16u#38 main::@4/(word) rem16u#39 ) + (word) main::idx_x#5 ← phi( main::@12/(word) main::idx_x#8 main::@4/(word) main::idx_x#9 ) + (byte) main::r_add#4 ← phi( main::@12/(byte) main::r_add#8 main::@4/(byte) main::r_add#3 ) + (signed word) main::r#4 ← phi( main::@12/(signed word) main::r#7 main::@4/(signed word) main::r#8 ) + (signed word) main::r#1 ← (signed word) main::r#4 + (byte) main::r_add#4 + (bool~) main::$26 ← (word) main::idx_x#5 == (number) 0 + (bool~) main::$27 ← (byte) main::r_add#4 != (number) 1 + (bool~) main::$28 ← (bool~) main::$26 && (bool~) main::$27 + (bool~) main::$29 ← ! (bool~) main::$28 + if((bool~) main::$29) goto main::@6 + to:main::@13 +main::@12: scope:[main] from main::@4 + (byte) frame_cnt#19 ← phi( main::@4/(byte) frame_cnt#20 ) + (byte*) bitmap_screen#29 ← phi( main::@4/(byte*) bitmap_screen#30 ) + (byte*) bitmap_gfx#30 ← phi( main::@4/(byte*) bitmap_gfx#31 ) + (word) rem16u#38 ← phi( main::@4/(word) rem16u#39 ) + (word) main::idx_x#8 ← phi( main::@4/(word) main::idx_x#9 ) + (byte) main::r_add#8 ← phi( main::@4/(byte) main::r_add#3 ) + (signed word) main::r#7 ← phi( main::@4/(signed word) main::r#8 ) (word) main::idx_y#2 ← (number) 0 to:main::@5 -main::@15: scope:[main] from main::@1 main::@16 main::@5 - (byte*) bitmap_screen#13 ← phi( main::@1/(byte*) bitmap_screen#18 main::@16/(byte*) bitmap_screen#19 main::@5/(byte*) bitmap_screen#20 ) - (byte*) bitmap_gfx#14 ← phi( main::@1/(byte*) bitmap_gfx#19 main::@16/(byte*) bitmap_gfx#20 main::@5/(byte*) bitmap_gfx#21 ) - (word) rem16u#24 ← phi( main::@1/(word) rem16u#27 main::@16/(word) rem16u#28 main::@5/(word) rem16u#29 ) - if(true) goto main::@16 +main::@6: scope:[main] from main::@13 main::@5 + (byte) main::r_add#12 ← phi( main::@13/(byte) main::r_add#1 main::@5/(byte) main::r_add#4 ) + (byte) frame_cnt#14 ← phi( main::@13/(byte) frame_cnt#16 main::@5/(byte) frame_cnt#17 ) + (word) main::idx_y#10 ← phi( main::@13/(word) main::idx_y#11 main::@5/(word) main::idx_y#12 ) + (byte*) bitmap_screen#20 ← phi( main::@13/(byte*) bitmap_screen#24 main::@5/(byte*) bitmap_screen#25 ) + (byte*) bitmap_gfx#21 ← phi( main::@13/(byte*) bitmap_gfx#25 main::@5/(byte*) bitmap_gfx#26 ) + (word) rem16u#29 ← phi( main::@13/(word) rem16u#33 main::@5/(word) rem16u#34 ) + (word) main::idx_x#10 ← phi( main::@13/(word) main::idx_x#12 main::@5/(word) main::idx_x#5 ) + (signed word) main::r#5 ← phi( main::@13/(signed word) main::r#9 main::@5/(signed word) main::r#1 ) + (bool~) main::$30 ← (signed word) main::r#5 >= (number) $200*(number) $c+(number) $100 + (bool~) main::$31 ← ! (bool~) main::$30 + if((bool~) main::$31) goto main::@1 + to:main::@17 +main::@13: scope:[main] from main::@5 + (byte) frame_cnt#16 ← phi( main::@5/(byte) frame_cnt#17 ) + (word) main::idx_y#11 ← phi( main::@5/(word) main::idx_y#12 ) + (byte*) bitmap_screen#24 ← phi( main::@5/(byte*) bitmap_screen#25 ) + (byte*) bitmap_gfx#25 ← phi( main::@5/(byte*) bitmap_gfx#26 ) + (word) rem16u#33 ← phi( main::@5/(word) rem16u#34 ) + (word) main::idx_x#12 ← phi( main::@5/(word) main::idx_x#5 ) + (signed word) main::r#9 ← phi( main::@5/(signed word) main::r#1 ) + (byte) main::r_add#5 ← phi( main::@5/(byte) main::r_add#4 ) + (byte) main::r_add#1 ← (byte) main::r_add#5 / (number) 2 + to:main::@6 +main::@17: scope:[main] from main::@1 main::@18 main::@6 + (byte*) bitmap_screen#13 ← phi( main::@1/(byte*) bitmap_screen#18 main::@18/(byte*) bitmap_screen#19 main::@6/(byte*) bitmap_screen#20 ) + (byte*) bitmap_gfx#14 ← phi( main::@1/(byte*) bitmap_gfx#19 main::@18/(byte*) bitmap_gfx#20 main::@6/(byte*) bitmap_gfx#21 ) + (word) rem16u#24 ← phi( main::@1/(word) rem16u#27 main::@18/(word) rem16u#28 main::@6/(word) rem16u#29 ) + if(true) goto main::@18 to:main::@return -main::@16: scope:[main] from main::@15 - (byte*) bitmap_screen#19 ← phi( main::@15/(byte*) bitmap_screen#13 ) - (byte*) bitmap_gfx#20 ← phi( main::@15/(byte*) bitmap_gfx#14 ) - (word) rem16u#28 ← phi( main::@15/(word) rem16u#24 ) +main::@18: scope:[main] from main::@17 + (byte*) bitmap_screen#19 ← phi( main::@17/(byte*) bitmap_screen#13 ) + (byte*) bitmap_gfx#20 ← phi( main::@17/(byte*) bitmap_gfx#14 ) + (word) rem16u#28 ← phi( main::@17/(word) rem16u#24 ) *((byte*) BORDERCOL#0) ← ++ *((byte*) BORDERCOL#0) - to:main::@15 -main::@return: scope:[main] from main::@15 - (byte*) bitmap_screen#9 ← phi( main::@15/(byte*) bitmap_screen#13 ) - (byte*) bitmap_gfx#9 ← phi( main::@15/(byte*) bitmap_gfx#14 ) - (word) rem16u#18 ← phi( main::@15/(word) rem16u#24 ) + to:main::@17 +main::@return: scope:[main] from main::@17 + (byte*) bitmap_screen#9 ← phi( main::@17/(byte*) bitmap_screen#13 ) + (byte*) bitmap_gfx#9 ← phi( main::@17/(byte*) bitmap_gfx#14 ) + (word) rem16u#18 ← phi( main::@17/(word) rem16u#24 ) (word) rem16u#9 ← (word) rem16u#18 (byte*) bitmap_gfx#4 ← (byte*) bitmap_gfx#9 (byte*) bitmap_screen#4 ← (byte*) bitmap_screen#9 @@ -1018,7 +1052,7 @@ main::@return: scope:[main] from main::@15 (word) rem16u#30 ← phi( @31/(word) rem16u#35 ) (byte) frame_cnt#0 ← (number) 1 to:@34 -init_irq: scope:[init_irq] from main::@21 +init_irq: scope:[init_irq] from main::@23 asm { sei } *((byte*) PROCPORT_DDR#0) ← (byte) PROCPORT_DDR_MEMORY_MASK#0 *((byte*) PROCPORT#0) ← (byte) PROCPORT_RAM_IO#0 @@ -1186,6 +1220,8 @@ SYMBOL TABLE SSA (byte*) bitmap_gfx#38 (byte*) bitmap_gfx#39 (byte*) bitmap_gfx#4 +(byte*) bitmap_gfx#40 +(byte*) bitmap_gfx#41 (byte*) bitmap_gfx#5 (byte*) bitmap_gfx#6 (byte*) bitmap_gfx#7 @@ -1300,7 +1336,9 @@ SYMBOL TABLE SSA (byte*) bitmap_screen#36 (byte*) bitmap_screen#37 (byte*) bitmap_screen#38 +(byte*) bitmap_screen#39 (byte*) bitmap_screen#4 +(byte*) bitmap_screen#40 (byte*) bitmap_screen#5 (byte*) bitmap_screen#6 (byte*) bitmap_screen#7 @@ -1432,6 +1470,8 @@ SYMBOL TABLE SSA (byte) frame_cnt#22 (byte) frame_cnt#23 (byte) frame_cnt#24 +(byte) frame_cnt#25 +(byte) frame_cnt#26 (byte) frame_cnt#3 (byte) frame_cnt#4 (byte) frame_cnt#5 @@ -1466,30 +1506,36 @@ interrupt(HARDWARE_CLOBBER)(void()) irq() (bool~) main::$25 (bool~) main::$26 (bool~) main::$27 -(word~) main::$28 -(word~) main::$29 +(bool~) main::$28 +(bool~) main::$29 (byte~) main::$3 +(bool~) main::$30 +(bool~) main::$31 +(word~) main::$32 +(word~) main::$33 (byte~) main::$4 (number~) main::$5 (byte~) main::$6 (signed dword~) main::$8 (word~) main::$9 (label) main::@1 -(label) main::@10 (label) main::@11 -(label) main::@15 -(label) main::@16 +(label) main::@12 +(label) main::@13 +(label) main::@17 +(label) main::@18 (label) main::@2 -(label) main::@21 -(label) main::@22 (label) main::@23 (label) main::@24 (label) main::@25 (label) main::@26 (label) main::@27 (label) main::@28 +(label) main::@29 +(label) main::@30 (label) main::@4 (label) main::@5 +(label) main::@6 (label) main::@return (signed word) main::cos_x (signed word) main::cos_x#0 @@ -1497,6 +1543,8 @@ interrupt(HARDWARE_CLOBBER)(void()) irq() (word) main::idx_x#0 (word) main::idx_x#1 (word) main::idx_x#10 +(word) main::idx_x#11 +(word) main::idx_x#12 (word) main::idx_x#2 (word) main::idx_x#3 (word) main::idx_x#4 @@ -1509,6 +1557,8 @@ interrupt(HARDWARE_CLOBBER)(void()) irq() (word) main::idx_y#0 (word) main::idx_y#1 (word) main::idx_y#10 +(word) main::idx_y#11 +(word) main::idx_y#12 (word) main::idx_y#2 (word) main::idx_y#3 (word) main::idx_y#4 @@ -1521,6 +1571,8 @@ interrupt(HARDWARE_CLOBBER)(void()) irq() (signed word) main::r#0 (signed word) main::r#1 (signed word) main::r#10 +(signed word) main::r#11 +(signed word) main::r#12 (signed word) main::r#2 (signed word) main::r#3 (signed word) main::r#4 @@ -1531,6 +1583,18 @@ interrupt(HARDWARE_CLOBBER)(void()) irq() (signed word) main::r#9 (byte) main::r_add (byte) main::r_add#0 +(byte) main::r_add#1 +(byte) main::r_add#10 +(byte) main::r_add#11 +(byte) main::r_add#12 +(byte) main::r_add#2 +(byte) main::r_add#3 +(byte) main::r_add#4 +(byte) main::r_add#5 +(byte) main::r_add#6 +(byte) main::r_add#7 +(byte) main::r_add#8 +(byte) main::r_add#9 (signed word) main::sin_y (signed word) main::sin_y#0 (label) main::toD0181 @@ -1804,6 +1868,8 @@ interrupt(HARDWARE_CLOBBER)(void()) irq() (word) rem16u#45 (word) rem16u#46 (word) rem16u#47 +(word) rem16u#48 +(word) rem16u#49 (word) rem16u#5 (word) rem16u#6 (word) rem16u#7 @@ -2050,7 +2116,7 @@ Adding number conversion cast (unumber) main::toD0181_$8#0 in (number~) main::to Adding number conversion cast (unumber) 0 in (word) main::idx_x#0 ← (number) 0 Adding number conversion cast (unumber) $80 in (word) main::idx_y#0 ← (number) $80 Adding number conversion cast (snumber) 0 in (signed word) main::r#0 ← (number) 0 -Adding number conversion cast (unumber) 4 in (byte) main::r_add#0 ← (number) 4 +Adding number conversion cast (unumber) $20 in (byte) main::r_add#0 ← (number) $20 Adding number conversion cast (snumber) 2 in (signed word~) main::$11 ← (signed word~) main::$10 >> (number) 2 Adding number conversion cast (snumber) $a0 in (number~) main::$12 ← (number) $a0 + (signed word~) main::$11 Adding number conversion cast (snumber) main::$12 in (number~) main::$12 ← (snumber)(number) $a0 + (signed word~) main::$11 @@ -2060,8 +2126,11 @@ Adding number conversion cast (snumber) main::$18 in (number~) main::$18 ← (sn Adding number conversion cast (unumber) $200 in (bool~) main::$22 ← (word) main::idx_x#1 >= (number) $200 Adding number conversion cast (unumber) $200 in (bool~) main::$24 ← (word) main::idx_y#1 >= (number) $200 Adding number conversion cast (unumber) 0 in (word) main::idx_x#2 ← (number) 0 -Adding number conversion cast (snumber) $200*$c+$100 in (bool~) main::$26 ← (signed word) main::r#1 >= (number) $200*(number) $c+(number) $100 +Adding number conversion cast (unumber) 0 in (bool~) main::$26 ← (word) main::idx_x#5 == (number) 0 +Adding number conversion cast (unumber) 1 in (bool~) main::$27 ← (byte) main::r_add#4 != (number) 1 Adding number conversion cast (unumber) 0 in (word) main::idx_y#2 ← (number) 0 +Adding number conversion cast (snumber) $200*$c+$100 in (bool~) main::$30 ← (signed word) main::r#5 >= (number) $200*(number) $c+(number) $100 +Adding number conversion cast (unumber) 2 in (byte) main::r_add#1 ← (byte) main::r_add#5 / (number) 2 Adding number conversion cast (unumber) 1 in (byte) frame_cnt#0 ← (number) 1 Adding number conversion cast (unumber) $80 in *((byte*) VIC_CONTROL#0) ← *((byte*) VIC_CONTROL#0) | (number) $80 Adding number conversion cast (unumber) 0 in *((byte*) RASTER#0) ← (number) 0 @@ -2128,7 +2197,7 @@ Inlining cast (word~) main::toD0181_$4#0 ← (word)(byte*) main::toD0181_gfx#1 Inlining cast (word) main::idx_x#0 ← (unumber)(number) 0 Inlining cast (word) main::idx_y#0 ← (unumber)(number) $80 Inlining cast (signed word) main::r#0 ← (snumber)(number) 0 -Inlining cast (byte) main::r_add#0 ← (unumber)(number) 4 +Inlining cast (byte) main::r_add#0 ← (unumber)(number) $20 Inlining cast (signed word~) main::$10 ← (signed word)(word~) main::$9 Inlining cast (word~) main::$13 ← (word)(snumber~) main::$12 Inlining cast (signed word~) main::$16 ← (signed word)(word~) main::$15 @@ -2220,7 +2289,7 @@ Simplifying constant integer cast $f Simplifying constant integer cast 0 Simplifying constant integer cast $80 Simplifying constant integer cast 0 -Simplifying constant integer cast 4 +Simplifying constant integer cast $20 Simplifying constant integer cast 2 Simplifying constant integer cast $a0 Simplifying constant integer cast 2 @@ -2230,6 +2299,9 @@ Simplifying constant integer cast $200 Simplifying constant integer cast 0 Simplifying constant integer cast 0 Simplifying constant integer cast 1 +Simplifying constant integer cast 0 +Simplifying constant integer cast 2 +Simplifying constant integer cast 1 Simplifying constant integer cast $80 Simplifying constant integer cast 0 Simplifying constant integer cast 0 @@ -2297,7 +2369,7 @@ Finalized unsigned number type (byte) $f Finalized unsigned number type (byte) 0 Finalized unsigned number type (byte) $80 Finalized signed number type (signed byte) 0 -Finalized unsigned number type (byte) 4 +Finalized unsigned number type (byte) $20 Finalized signed number type (signed byte) 2 Finalized signed number type (signed word) $a0 Finalized signed number type (signed byte) 2 @@ -2307,6 +2379,9 @@ Finalized unsigned number type (word) $200 Finalized unsigned number type (byte) 0 Finalized unsigned number type (byte) 0 Finalized unsigned number type (byte) 1 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 2 +Finalized unsigned number type (byte) 1 Finalized unsigned number type (byte) $80 Finalized unsigned number type (byte) 0 Finalized unsigned number type (byte) 0 @@ -2343,8 +2418,8 @@ Inversing boolean not [314] (bool~) bitmap_init::$1 ← (byte) bitmap_init::bits Inversing boolean not [334] (bool~) bitmap_init::$9 ← (byte~) bitmap_init::$7 != (byte) 7 from [333] (bool~) bitmap_init::$8 ← (byte~) bitmap_init::$7 == (byte) 7 Inversing boolean not [464] (bool~) main::$23 ← (word) main::idx_x#1 < (word) $200 from [463] (bool~) main::$22 ← (word) main::idx_x#1 >= (word) $200 Inversing boolean not [469] (bool~) main::$25 ← (word) main::idx_y#1 < (word) $200 from [468] (bool~) main::$24 ← (word) main::idx_y#1 >= (word) $200 -Inversing boolean not [476] (bool~) main::$27 ← (signed word) main::r#1 < (signed word)(number) $200*(number) $c+(number) $100 from [475] (bool~) main::$26 ← (signed word) main::r#1 >= (signed word)(number) $200*(number) $c+(number) $100 -Inversing boolean not [505] (bool~) irq::$0 ← (byte) 0 == (byte) frame_cnt#4 from [504] (bool~) irq::$1 ← (byte) 0 != (byte) frame_cnt#4 +Inversing boolean not [484] (bool~) main::$31 ← (signed word) main::r#5 < (signed word)(number) $200*(number) $c+(number) $100 from [483] (bool~) main::$30 ← (signed word) main::r#5 >= (signed word)(number) $200*(number) $c+(number) $100 +Inversing boolean not [513] (bool~) irq::$0 ← (byte) 0 == (byte) frame_cnt#4 from [512] (bool~) irq::$1 ← (byte) 0 != (byte) frame_cnt#4 Successful SSA optimization Pass2UnaryNotSimplification Alias (word) divr16u::rem#0 = (word~) divr16u::$0 (word) divr16u::rem#7 Alias (word) divr16u::dividend#0 = (word~) divr16u::$6 (word) divr16u::dividend#8 @@ -2459,20 +2534,21 @@ Alias (byte*) bitmap_gfx#0 = (byte*) bitmap_gfx#27 (byte*) bitmap_gfx#22 (byte*) Alias (byte*) bitmap_screen#0 = (byte*) bitmap_screen#26 (byte*) bitmap_screen#21 (byte*) bitmap_screen#14 Alias (byte*) bitmap_gfx#13 = (byte*) bitmap_gfx#18 Alias (byte*) bitmap_screen#12 = (byte*) bitmap_screen#17 -Alias (byte) frame_cnt#13 = (byte) frame_cnt#23 (byte) frame_cnt#24 (byte) frame_cnt#22 (byte) frame_cnt#21 (byte) frame_cnt#20 (byte) frame_cnt#18 (byte) frame_cnt#15 -Alias (word) rem16u#17 = (word) rem16u#8 (word) rem16u#47 (word) rem16u#45 (word) rem16u#43 (word) rem16u#41 (word) rem16u#37 (word) rem16u#32 -Alias (byte*) bitmap_gfx#24 = (byte*) bitmap_gfx#3 (byte*) bitmap_gfx#8 (byte*) bitmap_gfx#38 (byte*) bitmap_gfx#36 (byte*) bitmap_gfx#34 (byte*) bitmap_gfx#29 -Alias (byte*) bitmap_screen#23 = (byte*) bitmap_screen#3 (byte*) bitmap_screen#8 (byte*) bitmap_screen#37 (byte*) bitmap_screen#35 (byte*) bitmap_screen#33 (byte*) bitmap_screen#28 +Alias (byte) frame_cnt#13 = (byte) frame_cnt#25 (byte) frame_cnt#26 (byte) frame_cnt#24 (byte) frame_cnt#23 (byte) frame_cnt#21 (byte) frame_cnt#18 (byte) frame_cnt#15 +Alias (word) rem16u#17 = (word) rem16u#8 (word) rem16u#48 (word) rem16u#46 (word) rem16u#44 (word) rem16u#41 (word) rem16u#37 (word) rem16u#32 +Alias (byte*) bitmap_gfx#24 = (byte*) bitmap_gfx#3 (byte*) bitmap_gfx#8 (byte*) bitmap_gfx#39 (byte*) bitmap_gfx#37 (byte*) bitmap_gfx#34 (byte*) bitmap_gfx#29 +Alias (byte*) bitmap_screen#23 = (byte*) bitmap_screen#3 (byte*) bitmap_screen#8 (byte*) bitmap_screen#38 (byte*) bitmap_screen#36 (byte*) bitmap_screen#33 (byte*) bitmap_screen#28 Alias (byte*) main::toD0181_screen#0 = (byte*) main::toD0181_screen#1 Alias (byte*) main::toD0181_gfx#0 = (byte*) main::toD0181_gfx#1 Alias (byte) main::toD0181_return#0 = (byte~) main::toD0181_$8#0 (byte) main::toD0181_return#2 (byte) main::toD0181_return#1 (byte) main::toD0181_return#3 (byte~) main::$6 -Alias (word) main::idx_x#3 = (word) main::idx_x#5 (word) main::idx_x#8 (word) main::idx_x#6 (word) main::idx_x#4 -Alias (signed word) main::r#10 = (signed word) main::r#2 (signed word) main::r#5 (signed word) main::r#3 (signed word) main::r#9 (signed word) main::r#8 +Alias (word) main::idx_x#11 = (word) main::idx_x#3 (word) main::idx_x#6 (word) main::idx_x#7 (word) main::idx_x#4 +Alias (signed word) main::r#10 = (signed word) main::r#2 (signed word) main::r#6 (signed word) main::r#3 (signed word) main::r#12 (signed word) main::r#11 Alias (word) main::idx_y#3 = (word) main::idx_y#5 (word) main::idx_y#8 (word) main::idx_y#9 (word) main::idx_y#7 (word) main::idx_y#6 -Alias (byte) frame_cnt#10 = (byte) frame_cnt#11 (byte) frame_cnt#12 (byte) frame_cnt#7 (byte) frame_cnt#3 (byte) frame_cnt#19 -Alias (word) rem16u#27 = (word) rem16u#46 (word) rem16u#44 (word) rem16u#42 (word) rem16u#39 (word) rem16u#38 -Alias (byte*) bitmap_gfx#19 = (byte*) bitmap_gfx#39 (byte*) bitmap_gfx#37 (byte*) bitmap_gfx#35 (byte*) bitmap_gfx#31 (byte*) bitmap_gfx#30 -Alias (byte*) bitmap_screen#18 = (byte*) bitmap_screen#38 (byte*) bitmap_screen#36 (byte*) bitmap_screen#34 (byte*) bitmap_screen#30 (byte*) bitmap_screen#29 +Alias (byte) frame_cnt#10 = (byte) frame_cnt#11 (byte) frame_cnt#12 (byte) frame_cnt#7 (byte) frame_cnt#3 (byte) frame_cnt#22 +Alias (byte) main::r_add#10 = (byte) main::r_add#11 (byte) main::r_add#9 (byte) main::r_add#6 (byte) main::r_add#2 (byte) main::r_add#7 +Alias (word) rem16u#27 = (word) rem16u#49 (word) rem16u#47 (word) rem16u#45 (word) rem16u#43 (word) rem16u#42 +Alias (byte*) bitmap_gfx#19 = (byte*) bitmap_gfx#41 (byte*) bitmap_gfx#40 (byte*) bitmap_gfx#38 (byte*) bitmap_gfx#36 (byte*) bitmap_gfx#35 +Alias (byte*) bitmap_screen#18 = (byte*) bitmap_screen#40 (byte*) bitmap_screen#39 (byte*) bitmap_screen#37 (byte*) bitmap_screen#35 (byte*) bitmap_screen#34 Alias (signed dword) mul16s::return#3 = (signed dword) mul16s::return#7 Alias (signed dword) main::xpos#0 = (signed dword~) main::$8 Alias (word) main::x#0 = (word~) main::$13 (word) main::x#1 @@ -2480,11 +2556,20 @@ Alias (signed dword) mul16s::return#4 = (signed dword) mul16s::return#8 Alias (signed dword) main::ypos#0 = (signed dword~) main::$14 Alias (word) main::y#0 = (word~) main::$19 Alias (byte) bitmap_plot::y#0 = (byte~) main::$20 -Alias (signed word) main::r#6 = (signed word) main::r#7 -Alias (word) main::idx_x#10 = (word) main::idx_x#9 +Alias (signed word) main::r#7 = (signed word) main::r#8 +Alias (byte) main::r_add#3 = (byte) main::r_add#8 +Alias (word) main::idx_x#8 = (word) main::idx_x#9 +Alias (word) rem16u#38 = (word) rem16u#39 +Alias (byte*) bitmap_gfx#30 = (byte*) bitmap_gfx#31 +Alias (byte*) bitmap_screen#29 = (byte*) bitmap_screen#30 +Alias (byte) frame_cnt#19 = (byte) frame_cnt#20 +Alias (byte) main::r_add#4 = (byte) main::r_add#5 +Alias (signed word) main::r#1 = (signed word) main::r#9 +Alias (word) main::idx_x#12 = (word) main::idx_x#5 Alias (word) rem16u#33 = (word) rem16u#34 Alias (byte*) bitmap_gfx#25 = (byte*) bitmap_gfx#26 Alias (byte*) bitmap_screen#24 = (byte*) bitmap_screen#25 +Alias (word) main::idx_y#11 = (word) main::idx_y#12 Alias (byte) frame_cnt#16 = (byte) frame_cnt#17 Alias (word) rem16u#18 = (word) rem16u#28 (word) rem16u#24 (word) rem16u#9 Alias (byte*) bitmap_gfx#14 = (byte*) bitmap_gfx#20 (byte*) bitmap_gfx#9 (byte*) bitmap_gfx#4 @@ -2514,12 +2599,15 @@ Alias (byte) bitmap_init::y#2 = (byte) bitmap_init::y#3 Alias (byte*) bitmap_gfx#11 = (byte*) bitmap_gfx#16 Alias (byte*) bitmap_screen#11 = (byte*) bitmap_screen#15 Alias (word) main::idx_y#3 = (word) main::idx_y#4 -Alias (signed word) main::r#10 = (signed word) main::r#6 (signed word) main::r#4 -Alias (word) rem16u#27 = (word) rem16u#33 (word) rem16u#29 -Alias (byte*) bitmap_gfx#19 = (byte*) bitmap_gfx#25 (byte*) bitmap_gfx#21 -Alias (byte*) bitmap_screen#18 = (byte*) bitmap_screen#24 (byte*) bitmap_screen#20 -Alias (byte) frame_cnt#10 = (byte) frame_cnt#16 (byte) frame_cnt#14 -Alias (word) main::idx_x#10 = (word) main::idx_x#7 +Alias (byte) main::r_add#10 = (byte) main::r_add#3 (byte) main::r_add#4 +Alias (signed word) main::r#10 = (signed word) main::r#7 (signed word) main::r#4 +Alias (word) rem16u#27 = (word) rem16u#38 (word) rem16u#33 (word) rem16u#29 +Alias (byte*) bitmap_gfx#19 = (byte*) bitmap_gfx#30 (byte*) bitmap_gfx#25 (byte*) bitmap_gfx#21 +Alias (byte*) bitmap_screen#18 = (byte*) bitmap_screen#29 (byte*) bitmap_screen#24 (byte*) bitmap_screen#20 +Alias (byte) frame_cnt#10 = (byte) frame_cnt#19 (byte) frame_cnt#16 (byte) frame_cnt#14 +Alias (word) main::idx_x#10 = (word) main::idx_x#12 (word) main::idx_x#8 +Alias (signed word) main::r#1 = (signed word) main::r#5 +Alias (word) main::idx_y#10 = (word) main::idx_y#11 Successful SSA optimization Pass2AliasElimination Self Phi Eliminated (word) divr16u::divisor#2 Self Phi Eliminated (signed word) sin16s_gen2::ampl#1 @@ -2616,18 +2704,21 @@ Simple Condition (bool~) bitmap_init::$9 [335] if((byte~) bitmap_init::$7!=(byte Simple Condition (bool~) bitmap_init::$11 [339] if((byte) bitmap_init::y#1!=rangelast(0,$ff)) goto bitmap_init::@5 Simple Condition (bool~) main::$23 [465] if((word) main::idx_x#1<(word) $200) goto main::@4 Simple Condition (bool~) main::$25 [470] if((word) main::idx_y#1<(word) $200) goto main::@5 -Simple Condition (bool~) main::$27 [477] if((signed word) main::r#1<(signed word)(number) $200*(number) $c+(number) $100) goto main::@1 -Simple Condition (bool~) irq::$0 [506] if((byte) 0==(byte) frame_cnt#0) goto irq::@1 +Simple Condition (bool~) main::$31 [485] if((signed word) main::r#1<(signed word)(number) $200*(number) $c+(number) $100) goto main::@1 +Simple Condition (bool~) irq::$0 [514] if((byte) 0==(byte) frame_cnt#0) goto irq::@1 Successful SSA optimization Pass2ConditionalJumpSimplification -Negating conditional jump and destination [477] if((signed word) main::r#1>=(signed word)(number) $200*(number) $c+(number) $100) goto main::@15 -Successful SSA optimization Pass2ConditionalJumpSequenceImprovement +Rewriting ! if()-condition to reversed if() [478] (bool~) main::$29 ← ! (bool~) main::$28 +Successful SSA optimization Pass2ConditionalAndOrRewriting +Rewriting && if()-condition to two if()s [477] (bool~) main::$28 ← (bool~) main::$26 && (bool~) main::$27 +Successful SSA optimization Pass2ConditionalAndOrRewriting +Negating conditional jump and destination [485] if((signed word) main::r#1>=(signed word)(number) $200*(number) $c+(number) $100) goto main::@17 Constant right-side identified [225] (word) mulu16_sel::v2#2 ← (unumber)(number) $10000/(number) 6 Constant right-side identified [302] (byte[$100]) bitmap_plot_ylo#0 ← { fill( $100, 0) } Constant right-side identified [303] (byte[$100]) bitmap_plot_yhi#0 ← { fill( $100, 0) } Constant right-side identified [304] (byte[$100]) bitmap_plot_bit#0 ← { fill( $100, 0) } Constant right-side identified [375] (byte[$100]) plots_per_frame#0 ← { fill( $100, 0) } Constant right-side identified [376] (signed word[$200]) SINUS#0 ← { fill( $200, 0) } -Constant right-side identified [498] (void()*~) init_irq::$0 ← & interrupt(HARDWARE_CLOBBER)(void()) irq() +Constant right-side identified [506] (void()*~) init_irq::$0 ← & interrupt(HARDWARE_CLOBBER)(void()) irq() Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte*) PROCPORT_DDR#0 = (byte*) 0 Constant (const byte) PROCPORT_DDR_MEMORY_MASK#0 = 7 @@ -2690,7 +2781,7 @@ Constant (const signed word) sin16s_gen2::max#0 = $1001 Constant (const word) main::idx_x#0 = 0 Constant (const word) main::idx_y#0 = $80 Constant (const signed word) main::r#0 = 0 -Constant (const byte) main::r_add#0 = 4 +Constant (const byte) main::r_add#0 = $20 Constant (const word) main::idx_x#2 = 0 Constant (const word) main::idx_y#2 = 0 Constant (const void()*) init_irq::$0 = &irq @@ -2716,7 +2807,7 @@ Constant value identified (word)main::toD0181_screen#0 in [402] (word~) main::to Constant value identified (word)main::toD0181_gfx#0 in [406] (word~) main::toD0181_$4#0 ← (word)(const byte*) main::toD0181_gfx#0 Successful SSA optimization Pass2ConstantValues if() condition always true - replacing block destination [424] if(true) goto main::@2 -if() condition always true - replacing block destination [481] if(true) goto main::@16 +if() condition always true - replacing block destination [489] if(true) goto main::@18 Successful SSA optimization Pass2ConstantIfs Resolved ranged next value [45] divr16u::i#1 ← ++ divr16u::i#2 to ++ Resolved ranged comparison value [47] if(divr16u::i#1!=rangelast(0,$f)) goto divr16u::@1 to (number) $10 @@ -2724,8 +2815,8 @@ Resolved ranged next value [317] bitmap_init::x#1 ← ++ bitmap_init::x#2 to ++ Resolved ranged comparison value [319] if(bitmap_init::x#1!=rangelast(0,$ff)) goto bitmap_init::@1 to (number) 0 Resolved ranged next value [337] bitmap_init::y#1 ← ++ bitmap_init::y#2 to ++ Resolved ranged comparison value [339] if(bitmap_init::y#1!=rangelast(0,$ff)) goto bitmap_init::@5 to (number) 0 -De-inlining pointer[w] to *(pointer+w) [427] (signed word) main::cos_x#0 ← *((const signed word[$200]) SINUS#0 + (word~) main::$28) -De-inlining pointer[w] to *(pointer+w) [442] (signed word) main::sin_y#0 ← *((const signed word[$200]) SINUS#0 + (word~) main::$29) +De-inlining pointer[w] to *(pointer+w) [427] (signed word) main::cos_x#0 ← *((const signed word[$200]) SINUS#0 + (word~) main::$32) +De-inlining pointer[w] to *(pointer+w) [442] (signed word) main::sin_y#0 ← *((const signed word[$200]) SINUS#0 + (word~) main::$33) Successful SSA optimization Pass2DeInlineWordDerefIdx Simplifying expression containing zero bitmap_clear::$0 in [349] (byte) bitmap_clear::col#0 ← (byte~) bitmap_clear::$0 + (const byte) bitmap_clear::bgcol#0 Successful SSA optimization PassNSimplifyExpressionWithZero @@ -2755,6 +2846,12 @@ Successful SSA optimization PassNFinalizeNumberTypeConversions Alias (byte~) bitmap_init::$7 = (byte~) bitmap_init::$3 Alias (byte) bitmap_clear::col#0 = (byte~) bitmap_clear::$0 Successful SSA optimization Pass2AliasElimination +Simple Condition (bool~) main::$26 [236] if((word) main::idx_x#10==(byte) 0) goto main::@31 +Simple Condition (bool~) main::$27 [260] if((byte) main::r_add#10!=(byte) 1) goto main::@13 +Successful SSA optimization Pass2ConditionalJumpSimplification +Negating conditional jump and destination [236] if((word) main::idx_x#10!=(byte) 0) goto main::@6 +Negating conditional jump and destination [260] if((byte) main::r_add#10==(byte) 1) goto main::@6 +Successful SSA optimization Pass2ConditionalJumpSequenceImprovement Constant right-side identified [18] (word) divr16u::dividend#1 ← > (const dword) div32u16u::dividend#0 Constant right-side identified [22] (word) divr16u::dividend#2 ← < (const dword) div32u16u::dividend#0 Constant right-side identified [59] (signed word) sin16s_gen2::ampl#0 ← (const signed word) sin16s_gen2::max#0 - (const signed word) sin16s_gen2::min#0 @@ -2828,8 +2925,9 @@ Inlining Noop Cast [184] (word) main::x#0 ← (word)(signed word~) main::$12 kee Inlining Noop Cast [194] (signed word~) main::$16 ← (signed word)(word~) main::$15 keeping main::$15 Inlining Noop Cast [197] (word) main::y#0 ← (word)(signed word~) main::$18 keeping main::$18 Successful SSA optimization Pass2NopCastInlining -Rewriting multiplication to use shift [172] (word~) main::$28 ← (word) main::idx_x#3 * (const byte) SIZEOF_SIGNED_WORD -Rewriting multiplication to use shift [185] (word~) main::$29 ← (word) main::idx_y#3 * (const byte) SIZEOF_SIGNED_WORD +Rewriting multiplication to use shift [172] (word~) main::$32 ← (word) main::idx_x#11 * (const byte) SIZEOF_SIGNED_WORD +Rewriting multiplication to use shift [185] (word~) main::$33 ← (word) main::idx_y#3 * (const byte) SIZEOF_SIGNED_WORD +Rewriting division to use shift [212] (byte) main::r_add#1 ← (byte) main::r_add#10 / (byte) 2 Successful SSA optimization Pass2MultiplyToShiftRewriting Inlining constant with var siblings (const word) divr16u::quotient#0 Inlining constant with var siblings (const byte) divr16u::i#0 @@ -2864,6 +2962,7 @@ Inlining constant with var siblings (const byte) bitmap_init::y#0 Inlining constant with var siblings (const word) main::idx_x#0 Inlining constant with var siblings (const word) main::idx_y#0 Inlining constant with var siblings (const signed word) main::r#0 +Inlining constant with var siblings (const byte) main::r_add#0 Inlining constant with var siblings (const word) main::idx_x#2 Inlining constant with var siblings (const word) main::idx_y#2 Constant inlined bitmap_init::screen#0 = (const byte*) SCREEN#0 @@ -2897,6 +2996,7 @@ Constant inlined main::toD0181_gfx#0 = (const byte*) BITMAP#0 Constant inlined divr16u::i#0 = (byte) 0 Constant inlined div32u16u::dividend#0 = (const dword) PI2_u4f28#0 Constant inlined bitmap_init::bits#0 = (byte) $80 +Constant inlined main::r_add#0 = (byte) $20 Constant inlined bitmap_init::bits#2 = (byte) $80 Constant inlined divr16u::quotient#0 = (byte) 0 Constant inlined sin16s_gen2::x#0 = (byte) 0 @@ -2943,9 +3043,10 @@ Added new block during phi lifting bitmap_init::@9(between bitmap_init::@2 and b Added new block during phi lifting bitmap_init::@10(between bitmap_init::@1 and bitmap_init::@2) Added new block during phi lifting bitmap_init::@11(between bitmap_init::@6 and bitmap_init::@5) Added new block during phi lifting bitmap_init::@12(between bitmap_init::@5 and bitmap_init::@6) -Added new block during phi lifting main::@29(between main::@5 and main::@1) -Added new block during phi lifting main::@30(between main::@28 and main::@4) -Added new block during phi lifting main::@31(between main::@4 and main::@5) +Added new block during phi lifting main::@32(between main::@6 and main::@1) +Added new block during phi lifting main::@33(between main::@30 and main::@4) +Added new block during phi lifting main::@34(between main::@4 and main::@5) +Added new block during phi lifting main::@35(between main::@5 and main::@6) Added new block during phi lifting irq::@3(between irq and irq::@1) Adding NOP phi() at start of @begin Adding NOP phi() at start of @6 @@ -2956,14 +3057,14 @@ Adding NOP phi() at start of @34 Adding NOP phi() at start of @35 Adding NOP phi() at start of @end Adding NOP phi() at start of main -Adding NOP phi() at start of main::@22 -Adding NOP phi() at start of main::@23 +Adding NOP phi() at start of main::@24 +Adding NOP phi() at start of main::@25 Adding NOP phi() at start of main::toD0181 Adding NOP phi() at start of main::toD0181_@return -Adding NOP phi() at start of main::@25 -Adding NOP phi() at start of main::@10 +Adding NOP phi() at start of main::@27 Adding NOP phi() at start of main::@11 -Adding NOP phi() at start of main::@15 +Adding NOP phi() at start of main::@12 +Adding NOP phi() at start of main::@17 Adding NOP phi() at start of mul16u::@3 Adding NOP phi() at start of bitmap_clear Adding NOP phi() at start of bitmap_clear::@1 @@ -2977,89 +3078,93 @@ Adding NOP phi() at start of div32u16u CALL GRAPH Calls in [] to main:7 Calls in [main] to sin16s_gen2:11 bitmap_init:13 bitmap_clear:15 init_irq:20 mul16s:30 mul16s:43 bitmap_plot:50 -Calls in [mul16s] to mul16u:78 -Calls in [bitmap_clear] to memset:126 memset:128 -Calls in [sin16s_gen2] to div32u16u:172 sin16s:177 mul16s:181 -Calls in [sin16s] to mulu16_sel:208 mulu16_sel:215 mulu16_sel:220 mulu16_sel:228 mulu16_sel:235 -Calls in [mulu16_sel] to mul16u:253 -Calls in [div32u16u] to divr16u:260 divr16u:265 +Calls in [mul16s] to mul16u:85 +Calls in [bitmap_clear] to memset:133 memset:135 +Calls in [sin16s_gen2] to div32u16u:179 sin16s:184 mul16s:188 +Calls in [sin16s] to mulu16_sel:215 mulu16_sel:222 mulu16_sel:227 mulu16_sel:235 mulu16_sel:242 +Calls in [mulu16_sel] to mul16u:260 +Calls in [div32u16u] to divr16u:267 divr16u:272 -Created 45 initial phi equivalence classes +Created 47 initial phi equivalence classes Coalesced [28] mul16s::a#8 ← mul16s::a#1 Coalesced [29] mul16s::b#7 ← mul16s::b#1 Coalesced [41] mul16s::a#9 ← mul16s::a#2 Coalesced [42] mul16s::b#8 ← mul16s::b#2 -Coalesced [62] main::idx_x#11 ← main::idx_x#10 -Coalesced [63] main::r#11 ← main::r#1 -Coalesced [64] main::idx_y#11 ← main::idx_y#10 -Coalesced [67] main::idx_y#12 ← main::idx_y#1 -Coalesced [68] main::idx_x#12 ← main::idx_x#1 -Coalesced [85] mul16s::m#7 ← mul16s::m#1 -Coalesced [91] mul16s::m#10 ← mul16s::m#2 -Coalesced [95] mul16s::m#9 ← mul16s::m#5 -Coalesced [96] mul16s::m#8 ← mul16s::m#0 -Coalesced [98] mul16u::a#10 ← mul16u::a#6 -Coalesced [99] mul16u::mb#8 ← mul16u::mb#0 -Coalesced [107] mul16u::res#9 ← mul16u::res#1 -Coalesced [111] mul16u::a#11 ← mul16u::a#0 -Coalesced [112] mul16u::res#7 ← mul16u::res#6 -Coalesced [113] mul16u::mb#9 ← mul16u::mb#1 -Coalesced (already) [114] mul16u::res#8 ← mul16u::res#2 -Coalesced [140] memset::dst#4 ← memset::dst#1 -Coalesced [160] bitmap_init::yoffs#7 ← bitmap_init::yoffs#1 -Coalesced [165] bitmap_init::y#5 ← bitmap_init::y#1 -Coalesced [166] bitmap_init::yoffs#5 ← bitmap_init::yoffs#4 -Coalesced (already) [167] bitmap_init::yoffs#6 ← bitmap_init::yoffs#2 -Coalesced [168] bitmap_init::bits#5 ← bitmap_init::bits#4 -Coalesced [169] bitmap_init::x#5 ← bitmap_init::x#1 -Coalesced [170] bitmap_init::bits#6 ← bitmap_init::bits#1 -Coalesced [180] mul16s::a#10 ← mul16s::a#0 -Coalesced [191] sin16s_gen2::x#5 ← sin16s_gen2::x#1 -Coalesced [192] sin16s_gen2::sintab#7 ← sin16s_gen2::sintab#0 -Coalesced [193] sin16s_gen2::i#5 ← sin16s_gen2::i#1 -Coalesced [196] sin16s::x#9 ← sin16s::x#1 -Coalesced [200] sin16s::x#11 ← sin16s::x#2 -Coalesced [206] mulu16_sel::v1#8 ← mulu16_sel::v1#0 -Coalesced [207] mulu16_sel::v2#8 ← mulu16_sel::v2#0 -Coalesced [213] mulu16_sel::v1#9 ← mulu16_sel::v1#1 -Coalesced [214] mulu16_sel::v2#9 ← mulu16_sel::v2#1 -Coalesced [219] mulu16_sel::v1#10 ← mulu16_sel::v1#2 -Coalesced [226] mulu16_sel::v1#6 ← mulu16_sel::v1#3 -Coalesced [227] mulu16_sel::v2#6 ← mulu16_sel::v2#3 -Coalesced [233] mulu16_sel::v1#7 ← mulu16_sel::v1#4 -Coalesced [234] mulu16_sel::v2#7 ← mulu16_sel::v2#4 -Coalesced [242] sin16s::return#6 ← sin16s::sinx#1 -Coalesced [246] sin16s::x#10 ← sin16s::x#4 -Coalesced [247] sin16s::x#8 ← sin16s::x#0 -Coalesced [251] mul16u::mb#7 ← mul16u::b#1 -Coalesced [252] mul16u::a#9 ← mul16u::a#2 -Coalesced [264] divr16u::rem#12 ← divr16u::rem#4 -Coalesced [271] divr16u::rem#13 ← divr16u::rem#10 -Coalesced [272] divr16u::dividend#9 ← divr16u::dividend#5 -Coalesced [279] divr16u::rem#16 ← divr16u::rem#1 -Coalesced [286] divr16u::rem#18 ← divr16u::rem#2 -Coalesced [287] divr16u::return#8 ← divr16u::quotient#2 -Coalesced [293] divr16u::rem#14 ← divr16u::rem#11 -Coalesced [294] divr16u::dividend#10 ← divr16u::dividend#0 -Coalesced [295] divr16u::quotient#9 ← divr16u::return#0 -Coalesced [296] divr16u::i#7 ← divr16u::i#1 -Coalesced [297] divr16u::rem#17 ← divr16u::rem#6 -Coalesced [298] divr16u::return#7 ← divr16u::quotient#1 -Coalesced [299] divr16u::rem#15 ← divr16u::rem#0 -Coalesced [303] frame_cnt#26 ← frame_cnt#1 -Coalesced [308] frame_cnt#25 ← frame_cnt#0 -Coalesced down to 31 phi equivalence classes +Coalesced [64] main::r_add#14 ← main::r_add#1 +Coalesced [67] main::idx_x#13 ← main::idx_x#10 +Coalesced [68] main::r#13 ← main::r#1 +Coalesced [69] main::idx_y#13 ← main::idx_y#10 +Coalesced [70] main::r_add#13 ← main::r_add#12 +Coalesced (already) [73] main::r_add#15 ← main::r_add#10 +Coalesced [74] main::idx_y#14 ← main::idx_y#1 +Coalesced [75] main::idx_x#14 ← main::idx_x#1 +Coalesced [92] mul16s::m#7 ← mul16s::m#1 +Coalesced [98] mul16s::m#10 ← mul16s::m#2 +Coalesced [102] mul16s::m#9 ← mul16s::m#5 +Coalesced [103] mul16s::m#8 ← mul16s::m#0 +Coalesced [105] mul16u::a#10 ← mul16u::a#6 +Coalesced [106] mul16u::mb#8 ← mul16u::mb#0 +Coalesced [114] mul16u::res#9 ← mul16u::res#1 +Coalesced [118] mul16u::a#11 ← mul16u::a#0 +Coalesced [119] mul16u::res#7 ← mul16u::res#6 +Coalesced [120] mul16u::mb#9 ← mul16u::mb#1 +Coalesced (already) [121] mul16u::res#8 ← mul16u::res#2 +Coalesced [147] memset::dst#4 ← memset::dst#1 +Coalesced [167] bitmap_init::yoffs#7 ← bitmap_init::yoffs#1 +Coalesced [172] bitmap_init::y#5 ← bitmap_init::y#1 +Coalesced [173] bitmap_init::yoffs#5 ← bitmap_init::yoffs#4 +Coalesced (already) [174] bitmap_init::yoffs#6 ← bitmap_init::yoffs#2 +Coalesced [175] bitmap_init::bits#5 ← bitmap_init::bits#4 +Coalesced [176] bitmap_init::x#5 ← bitmap_init::x#1 +Coalesced [177] bitmap_init::bits#6 ← bitmap_init::bits#1 +Coalesced [187] mul16s::a#10 ← mul16s::a#0 +Coalesced [198] sin16s_gen2::x#5 ← sin16s_gen2::x#1 +Coalesced [199] sin16s_gen2::sintab#7 ← sin16s_gen2::sintab#0 +Coalesced [200] sin16s_gen2::i#5 ← sin16s_gen2::i#1 +Coalesced [203] sin16s::x#9 ← sin16s::x#1 +Coalesced [207] sin16s::x#11 ← sin16s::x#2 +Coalesced [213] mulu16_sel::v1#8 ← mulu16_sel::v1#0 +Coalesced [214] mulu16_sel::v2#8 ← mulu16_sel::v2#0 +Coalesced [220] mulu16_sel::v1#9 ← mulu16_sel::v1#1 +Coalesced [221] mulu16_sel::v2#9 ← mulu16_sel::v2#1 +Coalesced [226] mulu16_sel::v1#10 ← mulu16_sel::v1#2 +Coalesced [233] mulu16_sel::v1#6 ← mulu16_sel::v1#3 +Coalesced [234] mulu16_sel::v2#6 ← mulu16_sel::v2#3 +Coalesced [240] mulu16_sel::v1#7 ← mulu16_sel::v1#4 +Coalesced [241] mulu16_sel::v2#7 ← mulu16_sel::v2#4 +Coalesced [249] sin16s::return#6 ← sin16s::sinx#1 +Coalesced [253] sin16s::x#10 ← sin16s::x#4 +Coalesced [254] sin16s::x#8 ← sin16s::x#0 +Coalesced [258] mul16u::mb#7 ← mul16u::b#1 +Coalesced [259] mul16u::a#9 ← mul16u::a#2 +Coalesced [271] divr16u::rem#12 ← divr16u::rem#4 +Coalesced [278] divr16u::rem#13 ← divr16u::rem#10 +Coalesced [279] divr16u::dividend#9 ← divr16u::dividend#5 +Coalesced [286] divr16u::rem#16 ← divr16u::rem#1 +Coalesced [293] divr16u::rem#18 ← divr16u::rem#2 +Coalesced [294] divr16u::return#8 ← divr16u::quotient#2 +Coalesced [300] divr16u::rem#14 ← divr16u::rem#11 +Coalesced [301] divr16u::dividend#10 ← divr16u::dividend#0 +Coalesced [302] divr16u::quotient#9 ← divr16u::return#0 +Coalesced [303] divr16u::i#7 ← divr16u::i#1 +Coalesced [304] divr16u::rem#17 ← divr16u::rem#6 +Coalesced [305] divr16u::return#7 ← divr16u::quotient#1 +Coalesced [306] divr16u::rem#15 ← divr16u::rem#0 +Coalesced [310] frame_cnt#28 ← frame_cnt#1 +Coalesced [315] frame_cnt#27 ← frame_cnt#0 +Coalesced down to 32 phi equivalence classes Culled Empty Block (label) @6 Culled Empty Block (label) @17 Culled Empty Block (label) @28 Culled Empty Block (label) @31 Culled Empty Block (label) @35 Culled Empty Block (label) main::toD0181_@return -Culled Empty Block (label) main::@25 -Culled Empty Block (label) main::@10 +Culled Empty Block (label) main::@27 Culled Empty Block (label) main::@11 -Culled Empty Block (label) main::@29 -Culled Empty Block (label) main::@15 +Culled Empty Block (label) main::@12 +Culled Empty Block (label) main::@32 +Culled Empty Block (label) main::@17 +Culled Empty Block (label) main::@35 Culled Empty Block (label) mul16s::@8 Culled Empty Block (label) mul16s::@7 Culled Empty Block (label) mul16u::@3 @@ -3102,25 +3207,28 @@ Renumbering block bitmap_init::@7 to bitmap_init::@5 Renumbering block bitmap_init::@10 to bitmap_init::@6 Renumbering block main::@4 to main::@3 Renumbering block main::@5 to main::@4 -Renumbering block main::@16 to main::@5 -Renumbering block main::@21 to main::@6 -Renumbering block main::@22 to main::@7 +Renumbering block main::@6 to main::@5 +Renumbering block main::@13 to main::@6 +Renumbering block main::@18 to main::@7 Renumbering block main::@23 to main::@8 Renumbering block main::@24 to main::@9 -Renumbering block main::@26 to main::@10 -Renumbering block main::@27 to main::@11 +Renumbering block main::@25 to main::@10 +Renumbering block main::@26 to main::@11 Renumbering block main::@28 to main::@12 -Renumbering block main::@30 to main::@13 -Renumbering block main::@31 to main::@14 +Renumbering block main::@29 to main::@13 +Renumbering block main::@30 to main::@14 +Renumbering block main::@31 to main::@15 +Renumbering block main::@33 to main::@16 +Renumbering block main::@34 to main::@17 Adding NOP phi() at start of @begin Adding NOP phi() at start of @2 Adding NOP phi() at start of @end Adding NOP phi() at start of main -Adding NOP phi() at start of main::@7 -Adding NOP phi() at start of main::@8 +Adding NOP phi() at start of main::@9 +Adding NOP phi() at start of main::@10 Adding NOP phi() at start of main::toD0181 -Adding NOP phi() at start of main::@13 -Adding NOP phi() at start of main::@14 +Adding NOP phi() at start of main::@16 +Adding NOP phi() at start of main::@17 Adding NOP phi() at start of bitmap_clear Adding NOP phi() at start of bitmap_clear::@1 Adding NOP phi() at start of bitmap_init @@ -3144,423 +3252,434 @@ FINAL CONTROL FLOW GRAPH main: scope:[main] from @2 [5] phi() [6] call sin16s_gen2 - to:main::@7 -main::@7: scope:[main] from main + to:main::@9 +main::@9: scope:[main] from main [7] phi() [8] call bitmap_init - to:main::@8 -main::@8: scope:[main] from main::@7 + to:main::@10 +main::@10: scope:[main] from main::@9 [9] phi() [10] call bitmap_clear - to:main::@9 -main::@9: scope:[main] from main::@8 + to:main::@11 +main::@11: scope:[main] from main::@10 [11] *((const byte*) D011#0) ← (const byte) VIC_BMM#0|(const byte) VIC_DEN#0|(const byte) VIC_RSEL#0|(byte) 3 to:main::toD0181 -main::toD0181: scope:[main] from main::@9 +main::toD0181: scope:[main] from main::@11 [12] phi() - to:main::@6 -main::@6: scope:[main] from main::toD0181 + to:main::@8 +main::@8: scope:[main] from main::toD0181 [13] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0 [14] call init_irq to:main::@1 -main::@1: scope:[main] from main::@4 main::@6 - [15] (word) main::idx_y#3 ← phi( main::@6/(byte) $80 main::@4/(word) main::idx_y#10 ) - [15] (signed word) main::r#10 ← phi( main::@6/(signed byte) 0 main::@4/(signed word) main::r#1 ) - [15] (word) main::idx_x#3 ← phi( main::@6/(byte) 0 main::@4/(word) main::idx_x#10 ) +main::@1: scope:[main] from main::@5 main::@8 + [15] (byte) main::r_add#10 ← phi( main::@8/(byte) $20 main::@5/(byte) main::r_add#12 ) + [15] (word) main::idx_y#3 ← phi( main::@8/(byte) $80 main::@5/(word) main::idx_y#10 ) + [15] (signed word) main::r#10 ← phi( main::@8/(signed byte) 0 main::@5/(signed word) main::r#1 ) + [15] (word) main::idx_x#11 ← phi( main::@8/(byte) 0 main::@5/(word) main::idx_x#10 ) to:main::@2 main::@2: scope:[main] from main::@1 - [16] (word~) main::$28 ← (word) main::idx_x#3 << (byte) 1 - [17] (signed word*~) main::$30 ← (const signed word[$200]) SINUS#0 + (word~) main::$28 - [18] (signed word) main::cos_x#0 ← *((signed word*~) main::$30) + [16] (word~) main::$32 ← (word) main::idx_x#11 << (byte) 1 + [17] (signed word*~) main::$34 ← (const signed word[$200]) SINUS#0 + (word~) main::$32 + [18] (signed word) main::cos_x#0 ← *((signed word*~) main::$34) [19] (signed word) mul16s::a#1 ← (signed word) main::r#10 [20] (signed word) mul16s::b#1 ← (signed word) main::cos_x#0 [21] call mul16s [22] (signed dword) mul16s::return#3 ← (signed dword) mul16s::return#0 - to:main::@10 -main::@10: scope:[main] from main::@2 + to:main::@12 +main::@12: scope:[main] from main::@2 [23] (signed dword) main::xpos#0 ← (signed dword) mul16s::return#3 [24] (word~) main::$9 ← > (signed dword) main::xpos#0 [25] (signed word~) main::$11 ← (signed word)(word~) main::$9 >> (signed byte) 2 [26] (signed word) bitmap_plot::x#0 ← (signed word) $a0 + (signed word~) main::$11 - [27] (word~) main::$29 ← (word) main::idx_y#3 << (byte) 1 - [28] (signed word*~) main::$31 ← (const signed word[$200]) SINUS#0 + (word~) main::$29 - [29] (signed word) main::sin_y#0 ← *((signed word*~) main::$31) + [27] (word~) main::$33 ← (word) main::idx_y#3 << (byte) 1 + [28] (signed word*~) main::$35 ← (const signed word[$200]) SINUS#0 + (word~) main::$33 + [29] (signed word) main::sin_y#0 ← *((signed word*~) main::$35) [30] (signed word) mul16s::a#2 ← (signed word) main::r#10 [31] (signed word) mul16s::b#2 ← (signed word) main::sin_y#0 [32] call mul16s [33] (signed dword) mul16s::return#4 ← (signed dword) mul16s::return#0 - to:main::@11 -main::@11: scope:[main] from main::@10 + to:main::@13 +main::@13: scope:[main] from main::@12 [34] (signed dword) main::ypos#0 ← (signed dword) mul16s::return#4 [35] (word~) main::$15 ← > (signed dword) main::ypos#0 [36] (signed word~) main::$17 ← (signed word)(word~) main::$15 >> (signed byte) 2 [37] (signed word~) main::$18 ← (signed byte) $64 + (signed word~) main::$17 [38] (byte) bitmap_plot::y#0 ← (byte)(word)(signed word~) main::$18 [39] call bitmap_plot - to:main::@12 -main::@12: scope:[main] from main::@11 + to:main::@14 +main::@14: scope:[main] from main::@13 [40] *((const byte[$100]) plots_per_frame#0 + (byte) frame_cnt#0) ← ++ *((const byte[$100]) plots_per_frame#0 + (byte) frame_cnt#0) - [41] (word) main::idx_x#1 ← (word) main::idx_x#3 + (const byte) main::r_add#0 - [42] if((word) main::idx_x#1<(word) $200) goto main::@13 + [41] (word) main::idx_x#1 ← (word) main::idx_x#11 + (byte) main::r_add#10 + [42] if((word) main::idx_x#1<(word) $200) goto main::@16 to:main::@3 -main::@13: scope:[main] from main::@12 +main::@16: scope:[main] from main::@14 [43] phi() to:main::@3 -main::@3: scope:[main] from main::@12 main::@13 - [44] (word) main::idx_x#10 ← phi( main::@12/(byte) 0 main::@13/(word) main::idx_x#1 ) - [45] (word) main::idx_y#1 ← (word) main::idx_y#3 + (const byte) main::r_add#0 - [46] if((word) main::idx_y#1<(word) $200) goto main::@14 +main::@3: scope:[main] from main::@14 main::@16 + [44] (word) main::idx_x#10 ← phi( main::@14/(byte) 0 main::@16/(word) main::idx_x#1 ) + [45] (word) main::idx_y#1 ← (word) main::idx_y#3 + (byte) main::r_add#10 + [46] if((word) main::idx_y#1<(word) $200) goto main::@17 to:main::@4 -main::@14: scope:[main] from main::@3 +main::@17: scope:[main] from main::@3 [47] phi() to:main::@4 -main::@4: scope:[main] from main::@14 main::@3 - [48] (word) main::idx_y#10 ← phi( main::@3/(byte) 0 main::@14/(word) main::idx_y#1 ) - [49] (signed word) main::r#1 ← (signed word) main::r#10 + (const byte) main::r_add#0 - [50] if((signed word) main::r#1>=(signed word)(number) $200*(number) $c+(number) $100) goto main::@5 - to:main::@1 -main::@5: scope:[main] from main::@4 main::@5 - [51] *((const byte*) BORDERCOL#0) ← ++ *((const byte*) BORDERCOL#0) +main::@4: scope:[main] from main::@17 main::@3 + [48] (word) main::idx_y#10 ← phi( main::@3/(byte) 0 main::@17/(word) main::idx_y#1 ) + [49] (signed word) main::r#1 ← (signed word) main::r#10 + (byte) main::r_add#10 + [50] if((word) main::idx_x#10!=(byte) 0) goto main::@5 + to:main::@15 +main::@15: scope:[main] from main::@4 + [51] if((byte) main::r_add#10==(byte) 1) goto main::@5 + to:main::@6 +main::@6: scope:[main] from main::@15 + [52] (byte) main::r_add#1 ← (byte) main::r_add#10 >> (byte) 1 to:main::@5 -bitmap_plot: scope:[bitmap_plot] from main::@11 - [52] (word~) bitmap_plot::$3 ← *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_plot::y#0) w= *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_plot::y#0) - [53] (word~) bitmap_plot::$1 ← (word)(signed word) bitmap_plot::x#0 & (word) $fff8 - [54] (byte*) bitmap_plot::plotter#1 ← (byte*)(word~) bitmap_plot::$3 + (word~) bitmap_plot::$1 - [55] (byte~) bitmap_plot::$2 ← < (word)(signed word) bitmap_plot::x#0 - [56] *((byte*) bitmap_plot::plotter#1) ← *((byte*) bitmap_plot::plotter#1) | *((const byte[$100]) bitmap_plot_bit#0 + (byte~) bitmap_plot::$2) +main::@5: scope:[main] from main::@15 main::@4 main::@6 + [53] (byte) main::r_add#12 ← phi( main::@6/(byte) main::r_add#1 main::@4/(byte) main::r_add#10 ) + [54] if((signed word) main::r#1>=(signed word)(number) $200*(number) $c+(number) $100) goto main::@7 + to:main::@1 +main::@7: scope:[main] from main::@5 main::@7 + [55] *((const byte*) BORDERCOL#0) ← ++ *((const byte*) BORDERCOL#0) + to:main::@7 +bitmap_plot: scope:[bitmap_plot] from main::@13 + [56] (word~) bitmap_plot::$3 ← *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_plot::y#0) w= *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_plot::y#0) + [57] (word~) bitmap_plot::$1 ← (word)(signed word) bitmap_plot::x#0 & (word) $fff8 + [58] (byte*) bitmap_plot::plotter#1 ← (byte*)(word~) bitmap_plot::$3 + (word~) bitmap_plot::$1 + [59] (byte~) bitmap_plot::$2 ← < (word)(signed word) bitmap_plot::x#0 + [60] *((byte*) bitmap_plot::plotter#1) ← *((byte*) bitmap_plot::plotter#1) | *((const byte[$100]) bitmap_plot_bit#0 + (byte~) bitmap_plot::$2) to:bitmap_plot::@return bitmap_plot::@return: scope:[bitmap_plot] from bitmap_plot - [57] return + [61] return to:@return -mul16s: scope:[mul16s] from main::@10 main::@2 sin16s_gen2::@3 - [58] (signed word) mul16s::b#3 ← phi( main::@2/(signed word) mul16s::b#1 main::@10/(signed word) mul16s::b#2 sin16s_gen2::@3/(const signed word) sin16s_gen2::ampl#0 ) - [58] (signed word) mul16s::a#3 ← phi( main::@2/(signed word) mul16s::a#1 main::@10/(signed word) mul16s::a#2 sin16s_gen2::@3/(signed word) mul16s::a#0 ) - [59] (dword~) mul16u::mb#6 ← (word)(signed word) mul16s::b#3 - [60] (word~) mul16u::a#8 ← (word)(signed word) mul16s::a#3 - [61] call mul16u - [62] (dword) mul16u::return#2 ← (dword) mul16u::res#2 +mul16s: scope:[mul16s] from main::@12 main::@2 sin16s_gen2::@3 + [62] (signed word) mul16s::b#3 ← phi( main::@2/(signed word) mul16s::b#1 main::@12/(signed word) mul16s::b#2 sin16s_gen2::@3/(const signed word) sin16s_gen2::ampl#0 ) + [62] (signed word) mul16s::a#3 ← phi( main::@2/(signed word) mul16s::a#1 main::@12/(signed word) mul16s::a#2 sin16s_gen2::@3/(signed word) mul16s::a#0 ) + [63] (dword~) mul16u::mb#6 ← (word)(signed word) mul16s::b#3 + [64] (word~) mul16u::a#8 ← (word)(signed word) mul16s::a#3 + [65] call mul16u + [66] (dword) mul16u::return#2 ← (dword) mul16u::res#2 to:mul16s::@5 mul16s::@5: scope:[mul16s] from mul16s - [63] (dword) mul16s::m#0 ← (dword) mul16u::return#2 - [64] if((signed word) mul16s::a#3>=(signed byte) 0) goto mul16s::@1 + [67] (dword) mul16s::m#0 ← (dword) mul16u::return#2 + [68] if((signed word) mul16s::a#3>=(signed byte) 0) goto mul16s::@1 to:mul16s::@3 mul16s::@3: scope:[mul16s] from mul16s::@5 - [65] (word~) mul16s::$9 ← > (dword) mul16s::m#0 - [66] (word~) mul16s::$16 ← (word~) mul16s::$9 - (word)(signed word) mul16s::b#3 - [67] (dword) mul16s::m#1 ← (dword) mul16s::m#0 hi= (word~) mul16s::$16 + [69] (word~) mul16s::$9 ← > (dword) mul16s::m#0 + [70] (word~) mul16s::$16 ← (word~) mul16s::$9 - (word)(signed word) mul16s::b#3 + [71] (dword) mul16s::m#1 ← (dword) mul16s::m#0 hi= (word~) mul16s::$16 to:mul16s::@1 mul16s::@1: scope:[mul16s] from mul16s::@3 mul16s::@5 - [68] (dword) mul16s::m#5 ← phi( mul16s::@3/(dword) mul16s::m#1 mul16s::@5/(dword) mul16s::m#0 ) - [69] if((signed word) mul16s::b#3>=(signed byte) 0) goto mul16s::@2 + [72] (dword) mul16s::m#5 ← phi( mul16s::@3/(dword) mul16s::m#1 mul16s::@5/(dword) mul16s::m#0 ) + [73] if((signed word) mul16s::b#3>=(signed byte) 0) goto mul16s::@2 to:mul16s::@4 mul16s::@4: scope:[mul16s] from mul16s::@1 - [70] (word~) mul16s::$13 ← > (dword) mul16s::m#5 - [71] (word~) mul16s::$17 ← (word~) mul16s::$13 - (word)(signed word) mul16s::a#3 - [72] (dword) mul16s::m#2 ← (dword) mul16s::m#5 hi= (word~) mul16s::$17 + [74] (word~) mul16s::$13 ← > (dword) mul16s::m#5 + [75] (word~) mul16s::$17 ← (word~) mul16s::$13 - (word)(signed word) mul16s::a#3 + [76] (dword) mul16s::m#2 ← (dword) mul16s::m#5 hi= (word~) mul16s::$17 to:mul16s::@2 mul16s::@2: scope:[mul16s] from mul16s::@1 mul16s::@4 - [73] (dword) mul16s::m#4 ← phi( mul16s::@1/(dword) mul16s::m#5 mul16s::@4/(dword) mul16s::m#2 ) - [74] (signed dword) mul16s::return#0 ← (signed dword)(dword) mul16s::m#4 + [77] (dword) mul16s::m#4 ← phi( mul16s::@1/(dword) mul16s::m#5 mul16s::@4/(dword) mul16s::m#2 ) + [78] (signed dword) mul16s::return#0 ← (signed dword)(dword) mul16s::m#4 to:mul16s::@return mul16s::@return: scope:[mul16s] from mul16s::@2 - [75] return - to:@return -mul16u: scope:[mul16u] from mul16s mulu16_sel - [76] (word) mul16u::a#6 ← phi( mul16s/(word~) mul16u::a#8 mulu16_sel/(word) mul16u::a#2 ) - [76] (dword) mul16u::mb#0 ← phi( mul16s/(dword~) mul16u::mb#6 mulu16_sel/(word) mul16u::b#1 ) - to:mul16u::@1 -mul16u::@1: scope:[mul16u] from mul16u mul16u::@3 - [77] (dword) mul16u::mb#2 ← phi( mul16u/(dword) mul16u::mb#0 mul16u::@3/(dword) mul16u::mb#1 ) - [77] (dword) mul16u::res#2 ← phi( mul16u/(byte) 0 mul16u::@3/(dword) mul16u::res#6 ) - [77] (word) mul16u::a#3 ← phi( mul16u/(word) mul16u::a#6 mul16u::@3/(word) mul16u::a#0 ) - [78] if((word) mul16u::a#3!=(byte) 0) goto mul16u::@2 - to:mul16u::@return -mul16u::@return: scope:[mul16u] from mul16u::@1 [79] return to:@return +mul16u: scope:[mul16u] from mul16s mulu16_sel + [80] (word) mul16u::a#6 ← phi( mul16s/(word~) mul16u::a#8 mulu16_sel/(word) mul16u::a#2 ) + [80] (dword) mul16u::mb#0 ← phi( mul16s/(dword~) mul16u::mb#6 mulu16_sel/(word) mul16u::b#1 ) + to:mul16u::@1 +mul16u::@1: scope:[mul16u] from mul16u mul16u::@3 + [81] (dword) mul16u::mb#2 ← phi( mul16u/(dword) mul16u::mb#0 mul16u::@3/(dword) mul16u::mb#1 ) + [81] (dword) mul16u::res#2 ← phi( mul16u/(byte) 0 mul16u::@3/(dword) mul16u::res#6 ) + [81] (word) mul16u::a#3 ← phi( mul16u/(word) mul16u::a#6 mul16u::@3/(word) mul16u::a#0 ) + [82] if((word) mul16u::a#3!=(byte) 0) goto mul16u::@2 + to:mul16u::@return +mul16u::@return: scope:[mul16u] from mul16u::@1 + [83] return + to:@return mul16u::@2: scope:[mul16u] from mul16u::@1 - [80] (byte~) mul16u::$1 ← (word) mul16u::a#3 & (byte) 1 - [81] if((byte~) mul16u::$1==(byte) 0) goto mul16u::@3 + [84] (byte~) mul16u::$1 ← (word) mul16u::a#3 & (byte) 1 + [85] if((byte~) mul16u::$1==(byte) 0) goto mul16u::@3 to:mul16u::@4 mul16u::@4: scope:[mul16u] from mul16u::@2 - [82] (dword) mul16u::res#1 ← (dword) mul16u::res#2 + (dword) mul16u::mb#2 + [86] (dword) mul16u::res#1 ← (dword) mul16u::res#2 + (dword) mul16u::mb#2 to:mul16u::@3 mul16u::@3: scope:[mul16u] from mul16u::@2 mul16u::@4 - [83] (dword) mul16u::res#6 ← phi( mul16u::@2/(dword) mul16u::res#2 mul16u::@4/(dword) mul16u::res#1 ) - [84] (word) mul16u::a#0 ← (word) mul16u::a#3 >> (byte) 1 - [85] (dword) mul16u::mb#1 ← (dword) mul16u::mb#2 << (byte) 1 + [87] (dword) mul16u::res#6 ← phi( mul16u::@2/(dword) mul16u::res#2 mul16u::@4/(dword) mul16u::res#1 ) + [88] (word) mul16u::a#0 ← (word) mul16u::a#3 >> (byte) 1 + [89] (dword) mul16u::mb#1 ← (dword) mul16u::mb#2 << (byte) 1 to:mul16u::@1 -init_irq: scope:[init_irq] from main::@6 +init_irq: scope:[init_irq] from main::@8 asm { sei } - [87] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 - [88] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 - [89] *((const byte*) CIA1_INTERRUPT#0) ← (const byte) CIA_INTERRUPT_CLEAR#0 - [90] *((const byte*) VIC_CONTROL#0) ← *((const byte*) VIC_CONTROL#0) | (byte) $80 - [91] *((const byte*) RASTER#0) ← (byte) 0 - [92] *((const byte*) IRQ_ENABLE#0) ← (const byte) IRQ_RASTER#0 - [93] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_CLOBBER)(void()) irq() + [91] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 + [92] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 + [93] *((const byte*) CIA1_INTERRUPT#0) ← (const byte) CIA_INTERRUPT_CLEAR#0 + [94] *((const byte*) VIC_CONTROL#0) ← *((const byte*) VIC_CONTROL#0) | (byte) $80 + [95] *((const byte*) RASTER#0) ← (byte) 0 + [96] *((const byte*) IRQ_ENABLE#0) ← (const byte) IRQ_RASTER#0 + [97] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_CLOBBER)(void()) irq() asm { cli } to:init_irq::@return init_irq::@return: scope:[init_irq] from init_irq - [95] return + [99] return to:@return -bitmap_clear: scope:[bitmap_clear] from main::@8 - [96] phi() - [97] call memset +bitmap_clear: scope:[bitmap_clear] from main::@10 + [100] phi() + [101] call memset to:bitmap_clear::@1 bitmap_clear::@1: scope:[bitmap_clear] from bitmap_clear - [98] phi() - [99] call memset + [102] phi() + [103] call memset to:bitmap_clear::@return bitmap_clear::@return: scope:[bitmap_clear] from bitmap_clear::@1 - [100] return + [104] return to:@return memset: scope:[memset] from bitmap_clear bitmap_clear::@1 - [101] (byte) memset::c#3 ← phi( bitmap_clear/(const byte) bitmap_clear::col#0 bitmap_clear::@1/(byte) 0 ) - [101] (word) memset::num#2 ← phi( bitmap_clear/(word) $3e8 bitmap_clear::@1/(word) $1f40 ) - [101] (void*) memset::str#2 ← phi( bitmap_clear/(void*)(const byte*) SCREEN#0 bitmap_clear::@1/(void*)(const byte*) BITMAP#0 ) - [102] (byte*) memset::end#0 ← (byte*)(void*) memset::str#2 + (word) memset::num#2 - [103] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#2 + [105] (byte) memset::c#3 ← phi( bitmap_clear/(const byte) bitmap_clear::col#0 bitmap_clear::@1/(byte) 0 ) + [105] (word) memset::num#2 ← phi( bitmap_clear/(word) $3e8 bitmap_clear::@1/(word) $1f40 ) + [105] (void*) memset::str#2 ← phi( bitmap_clear/(void*)(const byte*) SCREEN#0 bitmap_clear::@1/(void*)(const byte*) BITMAP#0 ) + [106] (byte*) memset::end#0 ← (byte*)(void*) memset::str#2 + (word) memset::num#2 + [107] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#2 to:memset::@1 memset::@1: scope:[memset] from memset memset::@1 - [104] (byte*) memset::dst#2 ← phi( memset/(byte*~) memset::dst#3 memset::@1/(byte*) memset::dst#1 ) - [105] *((byte*) memset::dst#2) ← (byte) memset::c#3 - [106] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 - [107] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@1 + [108] (byte*) memset::dst#2 ← phi( memset/(byte*~) memset::dst#3 memset::@1/(byte*) memset::dst#1 ) + [109] *((byte*) memset::dst#2) ← (byte) memset::c#3 + [110] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 + [111] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@1 to:memset::@return memset::@return: scope:[memset] from memset::@1 - [108] return + [112] return to:@return -bitmap_init: scope:[bitmap_init] from main::@7 - [109] phi() +bitmap_init: scope:[bitmap_init] from main::@9 + [113] phi() to:bitmap_init::@1 bitmap_init::@1: scope:[bitmap_init] from bitmap_init bitmap_init::@2 - [110] (byte) bitmap_init::x#2 ← phi( bitmap_init/(byte) 0 bitmap_init::@2/(byte) bitmap_init::x#1 ) - [110] (byte) bitmap_init::bits#3 ← phi( bitmap_init/(byte) $80 bitmap_init::@2/(byte) bitmap_init::bits#4 ) - [111] *((const byte[$100]) bitmap_plot_bit#0 + (byte) bitmap_init::x#2) ← (byte) bitmap_init::bits#3 - [112] (byte) bitmap_init::bits#1 ← (byte) bitmap_init::bits#3 >> (byte) 1 - [113] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@6 + [114] (byte) bitmap_init::x#2 ← phi( bitmap_init/(byte) 0 bitmap_init::@2/(byte) bitmap_init::x#1 ) + [114] (byte) bitmap_init::bits#3 ← phi( bitmap_init/(byte) $80 bitmap_init::@2/(byte) bitmap_init::bits#4 ) + [115] *((const byte[$100]) bitmap_plot_bit#0 + (byte) bitmap_init::x#2) ← (byte) bitmap_init::bits#3 + [116] (byte) bitmap_init::bits#1 ← (byte) bitmap_init::bits#3 >> (byte) 1 + [117] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@6 to:bitmap_init::@2 bitmap_init::@6: scope:[bitmap_init] from bitmap_init::@1 - [114] phi() + [118] phi() to:bitmap_init::@2 bitmap_init::@2: scope:[bitmap_init] from bitmap_init::@1 bitmap_init::@6 - [115] (byte) bitmap_init::bits#4 ← phi( bitmap_init::@6/(byte) bitmap_init::bits#1 bitmap_init::@1/(byte) $80 ) - [116] (byte) bitmap_init::x#1 ← ++ (byte) bitmap_init::x#2 - [117] if((byte) bitmap_init::x#1!=(byte) 0) goto bitmap_init::@1 + [119] (byte) bitmap_init::bits#4 ← phi( bitmap_init::@6/(byte) bitmap_init::bits#1 bitmap_init::@1/(byte) $80 ) + [120] (byte) bitmap_init::x#1 ← ++ (byte) bitmap_init::x#2 + [121] if((byte) bitmap_init::x#1!=(byte) 0) goto bitmap_init::@1 to:bitmap_init::@3 bitmap_init::@3: scope:[bitmap_init] from bitmap_init::@2 bitmap_init::@4 - [118] (byte*) bitmap_init::yoffs#2 ← phi( bitmap_init::@2/(const byte*) BITMAP#0 bitmap_init::@4/(byte*) bitmap_init::yoffs#4 ) - [118] (byte) bitmap_init::y#2 ← phi( bitmap_init::@2/(byte) 0 bitmap_init::@4/(byte) bitmap_init::y#1 ) - [119] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 - [120] (byte~) bitmap_init::$4 ← < (byte*) bitmap_init::yoffs#2 - [121] (byte~) bitmap_init::$5 ← (byte~) bitmap_init::$7 | (byte~) bitmap_init::$4 - [122] *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$5 - [123] (byte~) bitmap_init::$6 ← > (byte*) bitmap_init::yoffs#2 - [124] *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$6 - [125] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@4 + [122] (byte*) bitmap_init::yoffs#2 ← phi( bitmap_init::@2/(const byte*) BITMAP#0 bitmap_init::@4/(byte*) bitmap_init::yoffs#4 ) + [122] (byte) bitmap_init::y#2 ← phi( bitmap_init::@2/(byte) 0 bitmap_init::@4/(byte) bitmap_init::y#1 ) + [123] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 + [124] (byte~) bitmap_init::$4 ← < (byte*) bitmap_init::yoffs#2 + [125] (byte~) bitmap_init::$5 ← (byte~) bitmap_init::$7 | (byte~) bitmap_init::$4 + [126] *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$5 + [127] (byte~) bitmap_init::$6 ← > (byte*) bitmap_init::yoffs#2 + [128] *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$6 + [129] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@4 to:bitmap_init::@5 bitmap_init::@5: scope:[bitmap_init] from bitmap_init::@3 - [126] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 + [130] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 to:bitmap_init::@4 bitmap_init::@4: scope:[bitmap_init] from bitmap_init::@3 bitmap_init::@5 - [127] (byte*) bitmap_init::yoffs#4 ← phi( bitmap_init::@3/(byte*) bitmap_init::yoffs#2 bitmap_init::@5/(byte*) bitmap_init::yoffs#1 ) - [128] (byte) bitmap_init::y#1 ← ++ (byte) bitmap_init::y#2 - [129] if((byte) bitmap_init::y#1!=(byte) 0) goto bitmap_init::@3 + [131] (byte*) bitmap_init::yoffs#4 ← phi( bitmap_init::@3/(byte*) bitmap_init::yoffs#2 bitmap_init::@5/(byte*) bitmap_init::yoffs#1 ) + [132] (byte) bitmap_init::y#1 ← ++ (byte) bitmap_init::y#2 + [133] if((byte) bitmap_init::y#1!=(byte) 0) goto bitmap_init::@3 to:bitmap_init::@return bitmap_init::@return: scope:[bitmap_init] from bitmap_init::@4 - [130] return + [134] return to:@return sin16s_gen2: scope:[sin16s_gen2] from main - [131] phi() - [132] call div32u16u - [133] (dword) div32u16u::return#2 ← (dword) div32u16u::return#0 + [135] phi() + [136] call div32u16u + [137] (dword) div32u16u::return#2 ← (dword) div32u16u::return#0 to:sin16s_gen2::@2 sin16s_gen2::@2: scope:[sin16s_gen2] from sin16s_gen2 - [134] (dword) sin16s_gen2::step#0 ← (dword) div32u16u::return#2 + [138] (dword) sin16s_gen2::step#0 ← (dword) div32u16u::return#2 to:sin16s_gen2::@1 sin16s_gen2::@1: scope:[sin16s_gen2] from sin16s_gen2::@2 sin16s_gen2::@4 - [135] (word) sin16s_gen2::i#2 ← phi( sin16s_gen2::@2/(byte) 0 sin16s_gen2::@4/(word) sin16s_gen2::i#1 ) - [135] (signed word*) sin16s_gen2::sintab#2 ← phi( sin16s_gen2::@2/(const signed word[$200]) SINUS#0 sin16s_gen2::@4/(signed word*) sin16s_gen2::sintab#0 ) - [135] (dword) sin16s_gen2::x#2 ← phi( sin16s_gen2::@2/(byte) 0 sin16s_gen2::@4/(dword) sin16s_gen2::x#1 ) - [136] (dword) sin16s::x#0 ← (dword) sin16s_gen2::x#2 - [137] call sin16s - [138] (signed word) sin16s::return#0 ← (signed word) sin16s::return#1 + [139] (word) sin16s_gen2::i#2 ← phi( sin16s_gen2::@2/(byte) 0 sin16s_gen2::@4/(word) sin16s_gen2::i#1 ) + [139] (signed word*) sin16s_gen2::sintab#2 ← phi( sin16s_gen2::@2/(const signed word[$200]) SINUS#0 sin16s_gen2::@4/(signed word*) sin16s_gen2::sintab#0 ) + [139] (dword) sin16s_gen2::x#2 ← phi( sin16s_gen2::@2/(byte) 0 sin16s_gen2::@4/(dword) sin16s_gen2::x#1 ) + [140] (dword) sin16s::x#0 ← (dword) sin16s_gen2::x#2 + [141] call sin16s + [142] (signed word) sin16s::return#0 ← (signed word) sin16s::return#1 to:sin16s_gen2::@3 sin16s_gen2::@3: scope:[sin16s_gen2] from sin16s_gen2::@1 - [139] (signed word) mul16s::a#0 ← (signed word) sin16s::return#0 - [140] call mul16s - [141] (signed dword) mul16s::return#2 ← (signed dword) mul16s::return#0 + [143] (signed word) mul16s::a#0 ← (signed word) sin16s::return#0 + [144] call mul16s + [145] (signed dword) mul16s::return#2 ← (signed dword) mul16s::return#0 to:sin16s_gen2::@4 sin16s_gen2::@4: scope:[sin16s_gen2] from sin16s_gen2::@3 - [142] (signed dword~) sin16s_gen2::$5 ← (signed dword) mul16s::return#2 - [143] (word~) sin16s_gen2::$6 ← > (signed dword~) sin16s_gen2::$5 - [144] *((signed word*) sin16s_gen2::sintab#2) ← (signed word)(word~) sin16s_gen2::$6 - [145] (signed word*) sin16s_gen2::sintab#0 ← (signed word*) sin16s_gen2::sintab#2 + (const byte) SIZEOF_SIGNED_WORD - [146] (dword) sin16s_gen2::x#1 ← (dword) sin16s_gen2::x#2 + (dword) sin16s_gen2::step#0 - [147] (word) sin16s_gen2::i#1 ← ++ (word) sin16s_gen2::i#2 - [148] if((word) sin16s_gen2::i#1<(const word) sin16s_gen2::wavelength#0) goto sin16s_gen2::@1 + [146] (signed dword~) sin16s_gen2::$5 ← (signed dword) mul16s::return#2 + [147] (word~) sin16s_gen2::$6 ← > (signed dword~) sin16s_gen2::$5 + [148] *((signed word*) sin16s_gen2::sintab#2) ← (signed word)(word~) sin16s_gen2::$6 + [149] (signed word*) sin16s_gen2::sintab#0 ← (signed word*) sin16s_gen2::sintab#2 + (const byte) SIZEOF_SIGNED_WORD + [150] (dword) sin16s_gen2::x#1 ← (dword) sin16s_gen2::x#2 + (dword) sin16s_gen2::step#0 + [151] (word) sin16s_gen2::i#1 ← ++ (word) sin16s_gen2::i#2 + [152] if((word) sin16s_gen2::i#1<(const word) sin16s_gen2::wavelength#0) goto sin16s_gen2::@1 to:sin16s_gen2::@return sin16s_gen2::@return: scope:[sin16s_gen2] from sin16s_gen2::@4 - [149] return + [153] return to:@return sin16s: scope:[sin16s] from sin16s_gen2::@1 - [150] if((dword) sin16s::x#0<(const dword) PI_u4f28#0) goto sin16s::@1 + [154] if((dword) sin16s::x#0<(const dword) PI_u4f28#0) goto sin16s::@1 to:sin16s::@4 sin16s::@4: scope:[sin16s] from sin16s - [151] (dword) sin16s::x#1 ← (dword) sin16s::x#0 - (const dword) PI_u4f28#0 + [155] (dword) sin16s::x#1 ← (dword) sin16s::x#0 - (const dword) PI_u4f28#0 to:sin16s::@1 sin16s::@1: scope:[sin16s] from sin16s sin16s::@4 - [152] (byte) sin16s::isUpper#2 ← phi( sin16s/(byte) 0 sin16s::@4/(byte) 1 ) - [152] (dword) sin16s::x#4 ← phi( sin16s/(dword) sin16s::x#0 sin16s::@4/(dword) sin16s::x#1 ) - [153] if((dword) sin16s::x#4<(const dword) PI_HALF_u4f28#0) goto sin16s::@2 + [156] (byte) sin16s::isUpper#2 ← phi( sin16s/(byte) 0 sin16s::@4/(byte) 1 ) + [156] (dword) sin16s::x#4 ← phi( sin16s/(dword) sin16s::x#0 sin16s::@4/(dword) sin16s::x#1 ) + [157] if((dword) sin16s::x#4<(const dword) PI_HALF_u4f28#0) goto sin16s::@2 to:sin16s::@5 sin16s::@5: scope:[sin16s] from sin16s::@1 - [154] (dword) sin16s::x#2 ← (const dword) PI_u4f28#0 - (dword) sin16s::x#4 + [158] (dword) sin16s::x#2 ← (const dword) PI_u4f28#0 - (dword) sin16s::x#4 to:sin16s::@2 sin16s::@2: scope:[sin16s] from sin16s::@1 sin16s::@5 - [155] (dword) sin16s::x#6 ← phi( sin16s::@1/(dword) sin16s::x#4 sin16s::@5/(dword) sin16s::x#2 ) - [156] (dword~) sin16s::$4 ← (dword) sin16s::x#6 << (byte) 3 - [157] (word) sin16s::x1#0 ← > (dword~) sin16s::$4 - [158] (word) mulu16_sel::v1#0 ← (word) sin16s::x1#0 - [159] (word) mulu16_sel::v2#0 ← (word) sin16s::x1#0 - [160] call mulu16_sel - [161] (word) mulu16_sel::return#0 ← (word) mulu16_sel::return#12 + [159] (dword) sin16s::x#6 ← phi( sin16s::@1/(dword) sin16s::x#4 sin16s::@5/(dword) sin16s::x#2 ) + [160] (dword~) sin16s::$4 ← (dword) sin16s::x#6 << (byte) 3 + [161] (word) sin16s::x1#0 ← > (dword~) sin16s::$4 + [162] (word) mulu16_sel::v1#0 ← (word) sin16s::x1#0 + [163] (word) mulu16_sel::v2#0 ← (word) sin16s::x1#0 + [164] call mulu16_sel + [165] (word) mulu16_sel::return#0 ← (word) mulu16_sel::return#12 to:sin16s::@7 sin16s::@7: scope:[sin16s] from sin16s::@2 - [162] (word) sin16s::x2#0 ← (word) mulu16_sel::return#0 - [163] (word) mulu16_sel::v1#1 ← (word) sin16s::x2#0 - [164] (word) mulu16_sel::v2#1 ← (word) sin16s::x1#0 - [165] call mulu16_sel - [166] (word) mulu16_sel::return#1 ← (word) mulu16_sel::return#12 + [166] (word) sin16s::x2#0 ← (word) mulu16_sel::return#0 + [167] (word) mulu16_sel::v1#1 ← (word) sin16s::x2#0 + [168] (word) mulu16_sel::v2#1 ← (word) sin16s::x1#0 + [169] call mulu16_sel + [170] (word) mulu16_sel::return#1 ← (word) mulu16_sel::return#12 to:sin16s::@8 sin16s::@8: scope:[sin16s] from sin16s::@7 - [167] (word) sin16s::x3#0 ← (word) mulu16_sel::return#1 - [168] (word) mulu16_sel::v1#2 ← (word) sin16s::x3#0 - [169] call mulu16_sel - [170] (word) mulu16_sel::return#2 ← (word) mulu16_sel::return#12 + [171] (word) sin16s::x3#0 ← (word) mulu16_sel::return#1 + [172] (word) mulu16_sel::v1#2 ← (word) sin16s::x3#0 + [173] call mulu16_sel + [174] (word) mulu16_sel::return#2 ← (word) mulu16_sel::return#12 to:sin16s::@9 sin16s::@9: scope:[sin16s] from sin16s::@8 - [171] (word) sin16s::x3_6#0 ← (word) mulu16_sel::return#2 - [172] (word) sin16s::usinx#0 ← (word) sin16s::x1#0 - (word) sin16s::x3_6#0 - [173] (word) mulu16_sel::v1#3 ← (word) sin16s::x3#0 - [174] (word) mulu16_sel::v2#3 ← (word) sin16s::x1#0 - [175] call mulu16_sel - [176] (word) mulu16_sel::return#10 ← (word) mulu16_sel::return#12 + [175] (word) sin16s::x3_6#0 ← (word) mulu16_sel::return#2 + [176] (word) sin16s::usinx#0 ← (word) sin16s::x1#0 - (word) sin16s::x3_6#0 + [177] (word) mulu16_sel::v1#3 ← (word) sin16s::x3#0 + [178] (word) mulu16_sel::v2#3 ← (word) sin16s::x1#0 + [179] call mulu16_sel + [180] (word) mulu16_sel::return#10 ← (word) mulu16_sel::return#12 to:sin16s::@10 sin16s::@10: scope:[sin16s] from sin16s::@9 - [177] (word) sin16s::x4#0 ← (word) mulu16_sel::return#10 - [178] (word) mulu16_sel::v1#4 ← (word) sin16s::x4#0 - [179] (word) mulu16_sel::v2#4 ← (word) sin16s::x1#0 - [180] call mulu16_sel - [181] (word) mulu16_sel::return#11 ← (word) mulu16_sel::return#12 + [181] (word) sin16s::x4#0 ← (word) mulu16_sel::return#10 + [182] (word) mulu16_sel::v1#4 ← (word) sin16s::x4#0 + [183] (word) mulu16_sel::v2#4 ← (word) sin16s::x1#0 + [184] call mulu16_sel + [185] (word) mulu16_sel::return#11 ← (word) mulu16_sel::return#12 to:sin16s::@11 sin16s::@11: scope:[sin16s] from sin16s::@10 - [182] (word) sin16s::x5#0 ← (word) mulu16_sel::return#11 - [183] (word) sin16s::x5_128#0 ← (word) sin16s::x5#0 >> (byte) 4 - [184] (word) sin16s::usinx#1 ← (word) sin16s::usinx#0 + (word) sin16s::x5_128#0 - [185] if((byte) sin16s::isUpper#2==(byte) 0) goto sin16s::@12 + [186] (word) sin16s::x5#0 ← (word) mulu16_sel::return#11 + [187] (word) sin16s::x5_128#0 ← (word) sin16s::x5#0 >> (byte) 4 + [188] (word) sin16s::usinx#1 ← (word) sin16s::usinx#0 + (word) sin16s::x5_128#0 + [189] if((byte) sin16s::isUpper#2==(byte) 0) goto sin16s::@12 to:sin16s::@6 sin16s::@6: scope:[sin16s] from sin16s::@11 - [186] (signed word) sin16s::sinx#1 ← - (signed word)(word) sin16s::usinx#1 + [190] (signed word) sin16s::sinx#1 ← - (signed word)(word) sin16s::usinx#1 to:sin16s::@3 sin16s::@3: scope:[sin16s] from sin16s::@12 sin16s::@6 - [187] (signed word) sin16s::return#1 ← phi( sin16s::@12/(signed word~) sin16s::return#5 sin16s::@6/(signed word) sin16s::sinx#1 ) + [191] (signed word) sin16s::return#1 ← phi( sin16s::@12/(signed word~) sin16s::return#5 sin16s::@6/(signed word) sin16s::sinx#1 ) to:sin16s::@return sin16s::@return: scope:[sin16s] from sin16s::@3 - [188] return + [192] return to:@return sin16s::@12: scope:[sin16s] from sin16s::@11 - [189] (signed word~) sin16s::return#5 ← (signed word)(word) sin16s::usinx#1 + [193] (signed word~) sin16s::return#5 ← (signed word)(word) sin16s::usinx#1 to:sin16s::@3 mulu16_sel: scope:[mulu16_sel] from sin16s::@10 sin16s::@2 sin16s::@7 sin16s::@8 sin16s::@9 - [190] (byte) mulu16_sel::select#5 ← phi( sin16s::@9/(byte) 0 sin16s::@10/(byte) 0 sin16s::@2/(byte) 0 sin16s::@7/(byte) 1 sin16s::@8/(byte) 1 ) - [190] (word) mulu16_sel::v2#5 ← phi( sin16s::@9/(word) mulu16_sel::v2#3 sin16s::@10/(word) mulu16_sel::v2#4 sin16s::@2/(word) mulu16_sel::v2#0 sin16s::@7/(word) mulu16_sel::v2#1 sin16s::@8/(word)(number) $10000/(number) 6 ) - [190] (word) mulu16_sel::v1#5 ← phi( sin16s::@9/(word) mulu16_sel::v1#3 sin16s::@10/(word) mulu16_sel::v1#4 sin16s::@2/(word) mulu16_sel::v1#0 sin16s::@7/(word) mulu16_sel::v1#1 sin16s::@8/(word) mulu16_sel::v1#2 ) - [191] (word) mul16u::a#2 ← (word) mulu16_sel::v1#5 - [192] (word) mul16u::b#1 ← (word) mulu16_sel::v2#5 - [193] call mul16u - [194] (dword) mul16u::return#3 ← (dword) mul16u::res#2 + [194] (byte) mulu16_sel::select#5 ← phi( sin16s::@9/(byte) 0 sin16s::@10/(byte) 0 sin16s::@2/(byte) 0 sin16s::@7/(byte) 1 sin16s::@8/(byte) 1 ) + [194] (word) mulu16_sel::v2#5 ← phi( sin16s::@9/(word) mulu16_sel::v2#3 sin16s::@10/(word) mulu16_sel::v2#4 sin16s::@2/(word) mulu16_sel::v2#0 sin16s::@7/(word) mulu16_sel::v2#1 sin16s::@8/(word)(number) $10000/(number) 6 ) + [194] (word) mulu16_sel::v1#5 ← phi( sin16s::@9/(word) mulu16_sel::v1#3 sin16s::@10/(word) mulu16_sel::v1#4 sin16s::@2/(word) mulu16_sel::v1#0 sin16s::@7/(word) mulu16_sel::v1#1 sin16s::@8/(word) mulu16_sel::v1#2 ) + [195] (word) mul16u::a#2 ← (word) mulu16_sel::v1#5 + [196] (word) mul16u::b#1 ← (word) mulu16_sel::v2#5 + [197] call mul16u + [198] (dword) mul16u::return#3 ← (dword) mul16u::res#2 to:mulu16_sel::@1 mulu16_sel::@1: scope:[mulu16_sel] from mulu16_sel - [195] (dword~) mulu16_sel::$0 ← (dword) mul16u::return#3 - [196] (dword~) mulu16_sel::$1 ← (dword~) mulu16_sel::$0 << (byte) mulu16_sel::select#5 - [197] (word) mulu16_sel::return#12 ← > (dword~) mulu16_sel::$1 + [199] (dword~) mulu16_sel::$0 ← (dword) mul16u::return#3 + [200] (dword~) mulu16_sel::$1 ← (dword~) mulu16_sel::$0 << (byte) mulu16_sel::select#5 + [201] (word) mulu16_sel::return#12 ← > (dword~) mulu16_sel::$1 to:mulu16_sel::@return mulu16_sel::@return: scope:[mulu16_sel] from mulu16_sel::@1 - [198] return + [202] return to:@return div32u16u: scope:[div32u16u] from sin16s_gen2 - [199] phi() - [200] call divr16u - [201] (word) divr16u::return#2 ← (word) divr16u::return#0 + [203] phi() + [204] call divr16u + [205] (word) divr16u::return#2 ← (word) divr16u::return#0 to:div32u16u::@1 div32u16u::@1: scope:[div32u16u] from div32u16u - [202] (word) div32u16u::quotient_hi#0 ← (word) divr16u::return#2 - [203] (word) divr16u::rem#4 ← (word) rem16u#1 - [204] call divr16u - [205] (word) divr16u::return#3 ← (word) divr16u::return#0 + [206] (word) div32u16u::quotient_hi#0 ← (word) divr16u::return#2 + [207] (word) divr16u::rem#4 ← (word) rem16u#1 + [208] call divr16u + [209] (word) divr16u::return#3 ← (word) divr16u::return#0 to:div32u16u::@2 div32u16u::@2: scope:[div32u16u] from div32u16u::@1 - [206] (word) div32u16u::quotient_lo#0 ← (word) divr16u::return#3 - [207] (dword) div32u16u::return#0 ← (word) div32u16u::quotient_hi#0 dw= (word) div32u16u::quotient_lo#0 + [210] (word) div32u16u::quotient_lo#0 ← (word) divr16u::return#3 + [211] (dword) div32u16u::return#0 ← (word) div32u16u::quotient_hi#0 dw= (word) div32u16u::quotient_lo#0 to:div32u16u::@return div32u16u::@return: scope:[div32u16u] from div32u16u::@2 - [208] return + [212] return to:@return divr16u: scope:[divr16u] from div32u16u div32u16u::@1 - [209] (word) divr16u::dividend#5 ← phi( div32u16u/>(const dword) PI2_u4f28#0 div32u16u::@1/<(const dword) PI2_u4f28#0 ) - [209] (word) divr16u::rem#10 ← phi( div32u16u/(byte) 0 div32u16u::@1/(word) divr16u::rem#4 ) + [213] (word) divr16u::dividend#5 ← phi( div32u16u/>(const dword) PI2_u4f28#0 div32u16u::@1/<(const dword) PI2_u4f28#0 ) + [213] (word) divr16u::rem#10 ← phi( div32u16u/(byte) 0 div32u16u::@1/(word) divr16u::rem#4 ) to:divr16u::@1 divr16u::@1: scope:[divr16u] from divr16u divr16u::@3 - [210] (byte) divr16u::i#2 ← phi( divr16u/(byte) 0 divr16u::@3/(byte) divr16u::i#1 ) - [210] (word) divr16u::quotient#3 ← phi( divr16u/(byte) 0 divr16u::@3/(word) divr16u::return#0 ) - [210] (word) divr16u::dividend#3 ← phi( divr16u/(word) divr16u::dividend#5 divr16u::@3/(word) divr16u::dividend#0 ) - [210] (word) divr16u::rem#5 ← phi( divr16u/(word) divr16u::rem#10 divr16u::@3/(word) divr16u::rem#11 ) - [211] (word) divr16u::rem#0 ← (word) divr16u::rem#5 << (byte) 1 - [212] (byte~) divr16u::$1 ← > (word) divr16u::dividend#3 - [213] (byte~) divr16u::$2 ← (byte~) divr16u::$1 & (byte) $80 - [214] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 + [214] (byte) divr16u::i#2 ← phi( divr16u/(byte) 0 divr16u::@3/(byte) divr16u::i#1 ) + [214] (word) divr16u::quotient#3 ← phi( divr16u/(byte) 0 divr16u::@3/(word) divr16u::return#0 ) + [214] (word) divr16u::dividend#3 ← phi( divr16u/(word) divr16u::dividend#5 divr16u::@3/(word) divr16u::dividend#0 ) + [214] (word) divr16u::rem#5 ← phi( divr16u/(word) divr16u::rem#10 divr16u::@3/(word) divr16u::rem#11 ) + [215] (word) divr16u::rem#0 ← (word) divr16u::rem#5 << (byte) 1 + [216] (byte~) divr16u::$1 ← > (word) divr16u::dividend#3 + [217] (byte~) divr16u::$2 ← (byte~) divr16u::$1 & (byte) $80 + [218] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 to:divr16u::@4 divr16u::@4: scope:[divr16u] from divr16u::@1 - [215] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 + [219] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 to:divr16u::@2 divr16u::@2: scope:[divr16u] from divr16u::@1 divr16u::@4 - [216] (word) divr16u::rem#6 ← phi( divr16u::@1/(word) divr16u::rem#0 divr16u::@4/(word) divr16u::rem#1 ) - [217] (word) divr16u::dividend#0 ← (word) divr16u::dividend#3 << (byte) 1 - [218] (word) divr16u::quotient#1 ← (word) divr16u::quotient#3 << (byte) 1 - [219] if((word) divr16u::rem#6<(const word) sin16s_gen2::wavelength#0) goto divr16u::@3 + [220] (word) divr16u::rem#6 ← phi( divr16u::@1/(word) divr16u::rem#0 divr16u::@4/(word) divr16u::rem#1 ) + [221] (word) divr16u::dividend#0 ← (word) divr16u::dividend#3 << (byte) 1 + [222] (word) divr16u::quotient#1 ← (word) divr16u::quotient#3 << (byte) 1 + [223] if((word) divr16u::rem#6<(const word) sin16s_gen2::wavelength#0) goto divr16u::@3 to:divr16u::@5 divr16u::@5: scope:[divr16u] from divr16u::@2 - [220] (word) divr16u::quotient#2 ← ++ (word) divr16u::quotient#1 - [221] (word) divr16u::rem#2 ← (word) divr16u::rem#6 - (const word) sin16s_gen2::wavelength#0 + [224] (word) divr16u::quotient#2 ← ++ (word) divr16u::quotient#1 + [225] (word) divr16u::rem#2 ← (word) divr16u::rem#6 - (const word) sin16s_gen2::wavelength#0 to:divr16u::@3 divr16u::@3: scope:[divr16u] from divr16u::@2 divr16u::@5 - [222] (word) divr16u::return#0 ← phi( divr16u::@2/(word) divr16u::quotient#1 divr16u::@5/(word) divr16u::quotient#2 ) - [222] (word) divr16u::rem#11 ← phi( divr16u::@2/(word) divr16u::rem#6 divr16u::@5/(word) divr16u::rem#2 ) - [223] (byte) divr16u::i#1 ← ++ (byte) divr16u::i#2 - [224] if((byte) divr16u::i#1!=(byte) $10) goto divr16u::@1 + [226] (word) divr16u::return#0 ← phi( divr16u::@2/(word) divr16u::quotient#1 divr16u::@5/(word) divr16u::quotient#2 ) + [226] (word) divr16u::rem#11 ← phi( divr16u::@2/(word) divr16u::rem#6 divr16u::@5/(word) divr16u::rem#2 ) + [227] (byte) divr16u::i#1 ← ++ (byte) divr16u::i#2 + [228] if((byte) divr16u::i#1!=(byte) $10) goto divr16u::@1 to:divr16u::@6 divr16u::@6: scope:[divr16u] from divr16u::@3 - [225] (word) rem16u#1 ← (word) divr16u::rem#11 + [229] (word) rem16u#1 ← (word) divr16u::rem#11 to:divr16u::@return divr16u::@return: scope:[divr16u] from divr16u::@6 - [226] return + [230] return to:@return irq: scope:[irq] from - [227] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 - [228] if((byte) 0==(byte) frame_cnt#0) goto irq::@1 + [231] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 + [232] if((byte) 0==(byte) frame_cnt#0) goto irq::@1 to:irq::@2 irq::@2: scope:[irq] from irq - [229] (byte) frame_cnt#1 ← ++ (byte) frame_cnt#0 + [233] (byte) frame_cnt#1 ← ++ (byte) frame_cnt#0 to:irq::@1 irq::@1: scope:[irq] from irq irq::@2 - [230] (byte) frame_cnt#2 ← phi( irq/(byte) frame_cnt#0 irq::@2/(byte) frame_cnt#1 ) - [231] *((const byte*) BGCOL#0) ← (const byte) BLACK#0 - [232] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 + [234] (byte) frame_cnt#2 ← phi( irq/(byte) frame_cnt#0 irq::@2/(byte) frame_cnt#1 ) + [235] *((const byte*) BGCOL#0) ← (const byte) BLACK#0 + [236] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 to:irq::@return irq::@return: scope:[irq] from irq::@1 - [233] return + [237] return to:@return @@ -3672,7 +3791,7 @@ VARIABLE REGISTER WEIGHTS (word) divr16u::return#2 4.0 (word) divr16u::return#3 4.0 (byte) frame_cnt -(byte) frame_cnt#0 0.6000000000000001 +(byte) frame_cnt#0 0.5555555555555556 (byte) frame_cnt#1 4.0 (byte) frame_cnt#2 40.0 (void()) init_irq() @@ -3682,25 +3801,28 @@ interrupt(HARDWARE_CLOBBER)(void()) irq() (word~) main::$15 11.0 (signed word~) main::$17 22.0 (signed word~) main::$18 11.0 -(word~) main::$28 22.0 -(word~) main::$29 22.0 -(signed word*~) main::$30 22.0 -(signed word*~) main::$31 22.0 +(word~) main::$32 22.0 +(word~) main::$33 22.0 +(signed word*~) main::$34 22.0 +(signed word*~) main::$35 22.0 (word~) main::$9 11.0 (signed word) main::cos_x (signed word) main::cos_x#0 11.0 (word) main::idx_x (word) main::idx_x#1 11.0 -(word) main::idx_x#10 3.142857142857143 -(word) main::idx_x#3 1.2692307692307692 +(word) main::idx_x#10 3.0 +(word) main::idx_x#11 1.2692307692307692 (word) main::idx_y (word) main::idx_y#1 11.0 -(word) main::idx_y#10 7.333333333333333 +(word) main::idx_y#10 3.142857142857143 (word) main::idx_y#3 1.0999999999999999 (signed word) main::r -(signed word) main::r#1 16.5 +(signed word) main::r#1 5.5 (signed word) main::r#10 1.2941176470588236 (byte) main::r_add +(byte) main::r_add#1 22.0 +(byte) main::r_add#10 2.081081081081081 +(byte) main::r_add#12 16.5 (signed word) main::sin_y (signed word) main::sin_y#0 11.0 (word~) main::toD0181_$0 @@ -3865,9 +3987,10 @@ interrupt(HARDWARE_CLOBBER)(void()) irq() Not consolidating phi with different size mul16u::mb#0 mul16u::b#1 Initial phi equivalence classes -[ main::idx_x#3 main::idx_x#10 main::idx_x#1 ] +[ main::idx_x#11 main::idx_x#10 main::idx_x#1 ] [ main::r#10 main::r#1 ] [ main::idx_y#3 main::idx_y#10 main::idx_y#1 ] +[ main::r_add#10 main::r_add#12 main::r_add#1 ] [ mul16s::a#3 mul16s::a#1 mul16s::a#2 mul16s::a#0 ] [ mul16s::b#3 mul16s::b#1 mul16s::b#2 ] [ mul16s::m#4 mul16s::m#5 mul16s::m#1 mul16s::m#0 mul16s::m#2 ] @@ -3897,16 +4020,16 @@ Initial phi equivalence classes [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 ] [ divr16u::i#2 divr16u::i#1 ] [ frame_cnt#2 frame_cnt#0 frame_cnt#1 ] -Added variable main::$28 to zero page equivalence class [ main::$28 ] -Added variable main::$30 to zero page equivalence class [ main::$30 ] +Added variable main::$32 to zero page equivalence class [ main::$32 ] +Added variable main::$34 to zero page equivalence class [ main::$34 ] Added variable main::cos_x#0 to zero page equivalence class [ main::cos_x#0 ] Added variable mul16s::return#3 to zero page equivalence class [ mul16s::return#3 ] Added variable main::xpos#0 to zero page equivalence class [ main::xpos#0 ] Added variable main::$9 to zero page equivalence class [ main::$9 ] Added variable main::$11 to zero page equivalence class [ main::$11 ] Added variable bitmap_plot::x#0 to zero page equivalence class [ bitmap_plot::x#0 ] -Added variable main::$29 to zero page equivalence class [ main::$29 ] -Added variable main::$31 to zero page equivalence class [ main::$31 ] +Added variable main::$33 to zero page equivalence class [ main::$33 ] +Added variable main::$35 to zero page equivalence class [ main::$35 ] Added variable main::sin_y#0 to zero page equivalence class [ main::sin_y#0 ] Added variable mul16s::return#4 to zero page equivalence class [ mul16s::return#4 ] Added variable main::ypos#0 to zero page equivalence class [ main::ypos#0 ] @@ -3964,9 +4087,10 @@ Added variable divr16u::$1 to zero page equivalence class [ divr16u::$1 ] Added variable divr16u::$2 to zero page equivalence class [ divr16u::$2 ] Added variable rem16u#1 to zero page equivalence class [ rem16u#1 ] Complete equivalence classes -[ main::idx_x#3 main::idx_x#10 main::idx_x#1 ] +[ main::idx_x#11 main::idx_x#10 main::idx_x#1 ] [ main::r#10 main::r#1 ] [ main::idx_y#3 main::idx_y#10 main::idx_y#1 ] +[ main::r_add#10 main::r_add#12 main::r_add#1 ] [ mul16s::a#3 mul16s::a#1 mul16s::a#2 mul16s::a#0 ] [ mul16s::b#3 mul16s::b#1 mul16s::b#2 ] [ mul16s::m#4 mul16s::m#5 mul16s::m#1 mul16s::m#0 mul16s::m#2 ] @@ -3996,16 +4120,16 @@ Complete equivalence classes [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 ] [ divr16u::i#2 divr16u::i#1 ] [ frame_cnt#2 frame_cnt#0 frame_cnt#1 ] -[ main::$28 ] -[ main::$30 ] +[ main::$32 ] +[ main::$34 ] [ main::cos_x#0 ] [ mul16s::return#3 ] [ main::xpos#0 ] [ main::$9 ] [ main::$11 ] [ bitmap_plot::x#0 ] -[ main::$29 ] -[ main::$31 ] +[ main::$33 ] +[ main::$35 ] [ main::sin_y#0 ] [ mul16s::return#4 ] [ main::ypos#0 ] @@ -4062,104 +4186,105 @@ Complete equivalence classes [ divr16u::$1 ] [ divr16u::$2 ] [ rem16u#1 ] -Allocated zp ZP_WORD:2 [ main::idx_x#3 main::idx_x#10 main::idx_x#1 ] +Allocated zp ZP_WORD:2 [ main::idx_x#11 main::idx_x#10 main::idx_x#1 ] Allocated zp ZP_WORD:4 [ main::r#10 main::r#1 ] Allocated zp ZP_WORD:6 [ main::idx_y#3 main::idx_y#10 main::idx_y#1 ] -Allocated zp ZP_WORD:8 [ mul16s::a#3 mul16s::a#1 mul16s::a#2 mul16s::a#0 ] -Allocated zp ZP_WORD:10 [ mul16s::b#3 mul16s::b#1 mul16s::b#2 ] -Allocated zp ZP_DWORD:12 [ mul16s::m#4 mul16s::m#5 mul16s::m#1 mul16s::m#0 mul16s::m#2 ] -Allocated zp ZP_WORD:16 [ mul16u::b#1 ] -Allocated zp ZP_WORD:18 [ mul16u::a#3 mul16u::a#6 mul16u::a#8 mul16u::a#2 mul16u::a#0 ] -Allocated zp ZP_DWORD:20 [ mul16u::res#2 mul16u::res#6 mul16u::res#1 ] -Allocated zp ZP_DWORD:24 [ mul16u::mb#2 mul16u::mb#0 mul16u::mb#6 mul16u::mb#1 ] -Allocated zp ZP_WORD:28 [ memset::str#2 ] -Allocated zp ZP_WORD:30 [ memset::num#2 ] -Allocated zp ZP_BYTE:32 [ memset::c#3 ] -Allocated zp ZP_WORD:33 [ memset::dst#2 memset::dst#3 memset::dst#1 ] -Allocated zp ZP_BYTE:35 [ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ] -Allocated zp ZP_BYTE:36 [ bitmap_init::x#2 bitmap_init::x#1 ] -Allocated zp ZP_BYTE:37 [ bitmap_init::y#2 bitmap_init::y#1 ] -Allocated zp ZP_WORD:38 [ bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 ] -Allocated zp ZP_DWORD:40 [ sin16s_gen2::x#2 sin16s_gen2::x#1 ] -Allocated zp ZP_WORD:44 [ sin16s_gen2::sintab#2 sin16s_gen2::sintab#0 ] -Allocated zp ZP_WORD:46 [ sin16s_gen2::i#2 sin16s_gen2::i#1 ] -Allocated zp ZP_BYTE:48 [ sin16s::isUpper#2 ] -Allocated zp ZP_DWORD:49 [ sin16s::x#6 sin16s::x#4 sin16s::x#0 sin16s::x#1 sin16s::x#2 ] -Allocated zp ZP_WORD:53 [ sin16s::return#1 sin16s::return#5 sin16s::sinx#1 ] -Allocated zp ZP_WORD:55 [ mulu16_sel::v1#5 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 ] -Allocated zp ZP_WORD:57 [ mulu16_sel::v2#5 mulu16_sel::v2#3 mulu16_sel::v2#4 mulu16_sel::v2#0 mulu16_sel::v2#1 ] -Allocated zp ZP_BYTE:59 [ mulu16_sel::select#5 ] -Allocated zp ZP_WORD:60 [ divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u::rem#11 divr16u::rem#6 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 ] -Allocated zp ZP_WORD:62 [ divr16u::dividend#3 divr16u::dividend#5 divr16u::dividend#0 ] -Allocated zp ZP_WORD:64 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 ] -Allocated zp ZP_BYTE:66 [ divr16u::i#2 divr16u::i#1 ] -Allocated zp ZP_BYTE:67 [ frame_cnt#2 frame_cnt#0 frame_cnt#1 ] -Allocated zp ZP_WORD:68 [ main::$28 ] -Allocated zp ZP_WORD:70 [ main::$30 ] -Allocated zp ZP_WORD:72 [ main::cos_x#0 ] -Allocated zp ZP_DWORD:74 [ mul16s::return#3 ] -Allocated zp ZP_DWORD:78 [ main::xpos#0 ] -Allocated zp ZP_WORD:82 [ main::$9 ] -Allocated zp ZP_WORD:84 [ main::$11 ] -Allocated zp ZP_WORD:86 [ bitmap_plot::x#0 ] -Allocated zp ZP_WORD:88 [ main::$29 ] -Allocated zp ZP_WORD:90 [ main::$31 ] -Allocated zp ZP_WORD:92 [ main::sin_y#0 ] -Allocated zp ZP_DWORD:94 [ mul16s::return#4 ] -Allocated zp ZP_DWORD:98 [ main::ypos#0 ] -Allocated zp ZP_WORD:102 [ main::$15 ] -Allocated zp ZP_WORD:104 [ main::$17 ] -Allocated zp ZP_WORD:106 [ main::$18 ] -Allocated zp ZP_BYTE:108 [ bitmap_plot::y#0 ] -Allocated zp ZP_WORD:109 [ bitmap_plot::$3 ] -Allocated zp ZP_WORD:111 [ bitmap_plot::$1 ] -Allocated zp ZP_WORD:113 [ bitmap_plot::plotter#1 ] -Allocated zp ZP_BYTE:115 [ bitmap_plot::$2 ] -Allocated zp ZP_DWORD:116 [ mul16u::return#2 ] -Allocated zp ZP_WORD:120 [ mul16s::$9 ] -Allocated zp ZP_WORD:122 [ mul16s::$16 ] -Allocated zp ZP_WORD:124 [ mul16s::$13 ] -Allocated zp ZP_WORD:126 [ mul16s::$17 ] -Allocated zp ZP_DWORD:128 [ mul16s::return#0 ] -Allocated zp ZP_BYTE:132 [ mul16u::$1 ] -Allocated zp ZP_WORD:133 [ memset::end#0 ] -Allocated zp ZP_BYTE:135 [ bitmap_init::$7 ] -Allocated zp ZP_BYTE:136 [ bitmap_init::$4 ] -Allocated zp ZP_BYTE:137 [ bitmap_init::$5 ] -Allocated zp ZP_BYTE:138 [ bitmap_init::$6 ] -Allocated zp ZP_DWORD:139 [ div32u16u::return#2 ] -Allocated zp ZP_DWORD:143 [ sin16s_gen2::step#0 ] -Allocated zp ZP_WORD:147 [ sin16s::return#0 ] -Allocated zp ZP_DWORD:149 [ mul16s::return#2 ] -Allocated zp ZP_DWORD:153 [ sin16s_gen2::$5 ] -Allocated zp ZP_WORD:157 [ sin16s_gen2::$6 ] -Allocated zp ZP_DWORD:159 [ sin16s::$4 ] -Allocated zp ZP_WORD:163 [ sin16s::x1#0 ] -Allocated zp ZP_WORD:165 [ mulu16_sel::return#0 ] -Allocated zp ZP_WORD:167 [ sin16s::x2#0 ] -Allocated zp ZP_WORD:169 [ mulu16_sel::return#1 ] -Allocated zp ZP_WORD:171 [ sin16s::x3#0 ] -Allocated zp ZP_WORD:173 [ mulu16_sel::return#2 ] -Allocated zp ZP_WORD:175 [ sin16s::x3_6#0 ] -Allocated zp ZP_WORD:177 [ sin16s::usinx#0 ] -Allocated zp ZP_WORD:179 [ mulu16_sel::return#10 ] -Allocated zp ZP_WORD:181 [ sin16s::x4#0 ] -Allocated zp ZP_WORD:183 [ mulu16_sel::return#11 ] -Allocated zp ZP_WORD:185 [ sin16s::x5#0 ] -Allocated zp ZP_WORD:187 [ sin16s::x5_128#0 ] -Allocated zp ZP_WORD:189 [ sin16s::usinx#1 ] -Allocated zp ZP_DWORD:191 [ mul16u::return#3 ] -Allocated zp ZP_DWORD:195 [ mulu16_sel::$0 ] -Allocated zp ZP_DWORD:199 [ mulu16_sel::$1 ] -Allocated zp ZP_WORD:203 [ mulu16_sel::return#12 ] -Allocated zp ZP_WORD:205 [ divr16u::return#2 ] -Allocated zp ZP_WORD:207 [ div32u16u::quotient_hi#0 ] -Allocated zp ZP_WORD:209 [ divr16u::return#3 ] -Allocated zp ZP_WORD:211 [ div32u16u::quotient_lo#0 ] -Allocated zp ZP_DWORD:213 [ div32u16u::return#0 ] -Allocated zp ZP_BYTE:217 [ divr16u::$1 ] -Allocated zp ZP_BYTE:218 [ divr16u::$2 ] -Allocated zp ZP_WORD:219 [ rem16u#1 ] +Allocated zp ZP_BYTE:8 [ main::r_add#10 main::r_add#12 main::r_add#1 ] +Allocated zp ZP_WORD:9 [ mul16s::a#3 mul16s::a#1 mul16s::a#2 mul16s::a#0 ] +Allocated zp ZP_WORD:11 [ mul16s::b#3 mul16s::b#1 mul16s::b#2 ] +Allocated zp ZP_DWORD:13 [ mul16s::m#4 mul16s::m#5 mul16s::m#1 mul16s::m#0 mul16s::m#2 ] +Allocated zp ZP_WORD:17 [ mul16u::b#1 ] +Allocated zp ZP_WORD:19 [ mul16u::a#3 mul16u::a#6 mul16u::a#8 mul16u::a#2 mul16u::a#0 ] +Allocated zp ZP_DWORD:21 [ mul16u::res#2 mul16u::res#6 mul16u::res#1 ] +Allocated zp ZP_DWORD:25 [ mul16u::mb#2 mul16u::mb#0 mul16u::mb#6 mul16u::mb#1 ] +Allocated zp ZP_WORD:29 [ memset::str#2 ] +Allocated zp ZP_WORD:31 [ memset::num#2 ] +Allocated zp ZP_BYTE:33 [ memset::c#3 ] +Allocated zp ZP_WORD:34 [ memset::dst#2 memset::dst#3 memset::dst#1 ] +Allocated zp ZP_BYTE:36 [ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ] +Allocated zp ZP_BYTE:37 [ bitmap_init::x#2 bitmap_init::x#1 ] +Allocated zp ZP_BYTE:38 [ bitmap_init::y#2 bitmap_init::y#1 ] +Allocated zp ZP_WORD:39 [ bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 ] +Allocated zp ZP_DWORD:41 [ sin16s_gen2::x#2 sin16s_gen2::x#1 ] +Allocated zp ZP_WORD:45 [ sin16s_gen2::sintab#2 sin16s_gen2::sintab#0 ] +Allocated zp ZP_WORD:47 [ sin16s_gen2::i#2 sin16s_gen2::i#1 ] +Allocated zp ZP_BYTE:49 [ sin16s::isUpper#2 ] +Allocated zp ZP_DWORD:50 [ sin16s::x#6 sin16s::x#4 sin16s::x#0 sin16s::x#1 sin16s::x#2 ] +Allocated zp ZP_WORD:54 [ sin16s::return#1 sin16s::return#5 sin16s::sinx#1 ] +Allocated zp ZP_WORD:56 [ mulu16_sel::v1#5 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 ] +Allocated zp ZP_WORD:58 [ mulu16_sel::v2#5 mulu16_sel::v2#3 mulu16_sel::v2#4 mulu16_sel::v2#0 mulu16_sel::v2#1 ] +Allocated zp ZP_BYTE:60 [ mulu16_sel::select#5 ] +Allocated zp ZP_WORD:61 [ divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u::rem#11 divr16u::rem#6 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 ] +Allocated zp ZP_WORD:63 [ divr16u::dividend#3 divr16u::dividend#5 divr16u::dividend#0 ] +Allocated zp ZP_WORD:65 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 ] +Allocated zp ZP_BYTE:67 [ divr16u::i#2 divr16u::i#1 ] +Allocated zp ZP_BYTE:68 [ frame_cnt#2 frame_cnt#0 frame_cnt#1 ] +Allocated zp ZP_WORD:69 [ main::$32 ] +Allocated zp ZP_WORD:71 [ main::$34 ] +Allocated zp ZP_WORD:73 [ main::cos_x#0 ] +Allocated zp ZP_DWORD:75 [ mul16s::return#3 ] +Allocated zp ZP_DWORD:79 [ main::xpos#0 ] +Allocated zp ZP_WORD:83 [ main::$9 ] +Allocated zp ZP_WORD:85 [ main::$11 ] +Allocated zp ZP_WORD:87 [ bitmap_plot::x#0 ] +Allocated zp ZP_WORD:89 [ main::$33 ] +Allocated zp ZP_WORD:91 [ main::$35 ] +Allocated zp ZP_WORD:93 [ main::sin_y#0 ] +Allocated zp ZP_DWORD:95 [ mul16s::return#4 ] +Allocated zp ZP_DWORD:99 [ main::ypos#0 ] +Allocated zp ZP_WORD:103 [ main::$15 ] +Allocated zp ZP_WORD:105 [ main::$17 ] +Allocated zp ZP_WORD:107 [ main::$18 ] +Allocated zp ZP_BYTE:109 [ bitmap_plot::y#0 ] +Allocated zp ZP_WORD:110 [ bitmap_plot::$3 ] +Allocated zp ZP_WORD:112 [ bitmap_plot::$1 ] +Allocated zp ZP_WORD:114 [ bitmap_plot::plotter#1 ] +Allocated zp ZP_BYTE:116 [ bitmap_plot::$2 ] +Allocated zp ZP_DWORD:117 [ mul16u::return#2 ] +Allocated zp ZP_WORD:121 [ mul16s::$9 ] +Allocated zp ZP_WORD:123 [ mul16s::$16 ] +Allocated zp ZP_WORD:125 [ mul16s::$13 ] +Allocated zp ZP_WORD:127 [ mul16s::$17 ] +Allocated zp ZP_DWORD:129 [ mul16s::return#0 ] +Allocated zp ZP_BYTE:133 [ mul16u::$1 ] +Allocated zp ZP_WORD:134 [ memset::end#0 ] +Allocated zp ZP_BYTE:136 [ bitmap_init::$7 ] +Allocated zp ZP_BYTE:137 [ bitmap_init::$4 ] +Allocated zp ZP_BYTE:138 [ bitmap_init::$5 ] +Allocated zp ZP_BYTE:139 [ bitmap_init::$6 ] +Allocated zp ZP_DWORD:140 [ div32u16u::return#2 ] +Allocated zp ZP_DWORD:144 [ sin16s_gen2::step#0 ] +Allocated zp ZP_WORD:148 [ sin16s::return#0 ] +Allocated zp ZP_DWORD:150 [ mul16s::return#2 ] +Allocated zp ZP_DWORD:154 [ sin16s_gen2::$5 ] +Allocated zp ZP_WORD:158 [ sin16s_gen2::$6 ] +Allocated zp ZP_DWORD:160 [ sin16s::$4 ] +Allocated zp ZP_WORD:164 [ sin16s::x1#0 ] +Allocated zp ZP_WORD:166 [ mulu16_sel::return#0 ] +Allocated zp ZP_WORD:168 [ sin16s::x2#0 ] +Allocated zp ZP_WORD:170 [ mulu16_sel::return#1 ] +Allocated zp ZP_WORD:172 [ sin16s::x3#0 ] +Allocated zp ZP_WORD:174 [ mulu16_sel::return#2 ] +Allocated zp ZP_WORD:176 [ sin16s::x3_6#0 ] +Allocated zp ZP_WORD:178 [ sin16s::usinx#0 ] +Allocated zp ZP_WORD:180 [ mulu16_sel::return#10 ] +Allocated zp ZP_WORD:182 [ sin16s::x4#0 ] +Allocated zp ZP_WORD:184 [ mulu16_sel::return#11 ] +Allocated zp ZP_WORD:186 [ sin16s::x5#0 ] +Allocated zp ZP_WORD:188 [ sin16s::x5_128#0 ] +Allocated zp ZP_WORD:190 [ sin16s::usinx#1 ] +Allocated zp ZP_DWORD:192 [ mul16u::return#3 ] +Allocated zp ZP_DWORD:196 [ mulu16_sel::$0 ] +Allocated zp ZP_DWORD:200 [ mulu16_sel::$1 ] +Allocated zp ZP_WORD:204 [ mulu16_sel::return#12 ] +Allocated zp ZP_WORD:206 [ divr16u::return#2 ] +Allocated zp ZP_WORD:208 [ div32u16u::quotient_hi#0 ] +Allocated zp ZP_WORD:210 [ divr16u::return#3 ] +Allocated zp ZP_WORD:212 [ div32u16u::quotient_lo#0 ] +Allocated zp ZP_DWORD:214 [ div32u16u::return#0 ] +Allocated zp ZP_BYTE:218 [ divr16u::$1 ] +Allocated zp ZP_BYTE:219 [ divr16u::$2 ] +Allocated zp ZP_WORD:220 [ rem16u#1 ] INITIAL ASM //SEG0 File Comments @@ -4211,8 +4336,8 @@ INITIAL ASM .const PI_HALF_u4f28 = $1921fb54 .label BITMAP = $2000 .label SCREEN = $400 - .label rem16u = $db - .label frame_cnt = $43 + .label rem16u = $dc + .label frame_cnt = $44 //SEG3 @begin bbegin: jmp b1 @@ -4238,127 +4363,130 @@ bend_from_b2: bend: //SEG12 main main: { - .const r_add = 4 .const toD0181_return = (>(SCREEN&$3fff)*4)|(>BITMAP)/4&$f - .label _9 = $52 - .label _11 = $54 - .label _15 = $66 - .label _17 = $68 - .label _18 = $6a - .label _28 = $44 - .label _29 = $58 - .label cos_x = $48 - .label xpos = $4e - .label sin_y = $5c - .label ypos = $62 + .label _9 = $53 + .label _11 = $55 + .label _15 = $67 + .label _17 = $69 + .label _18 = $6b + .label _32 = $45 + .label _33 = $59 + .label cos_x = $49 + .label xpos = $4f + .label sin_y = $5d + .label ypos = $63 .label idx_x = 2 .label idx_y = 6 .label r = 4 - .label _30 = $46 - .label _31 = $5a + .label r_add = 8 + .label _34 = $47 + .label _35 = $5b //SEG13 [6] call sin16s_gen2 - //SEG14 [131] phi from main to sin16s_gen2 [phi:main->sin16s_gen2] + //SEG14 [135] phi from main to sin16s_gen2 [phi:main->sin16s_gen2] sin16s_gen2_from_main: jsr sin16s_gen2 - //SEG15 [7] phi from main to main::@7 [phi:main->main::@7] - b7_from_main: - jmp b7 - //SEG16 main::@7 - b7: - //SEG17 [8] call bitmap_init - //SEG18 [109] phi from main::@7 to bitmap_init [phi:main::@7->bitmap_init] - bitmap_init_from_b7: - jsr bitmap_init - //SEG19 [9] phi from main::@7 to main::@8 [phi:main::@7->main::@8] - b8_from_b7: - jmp b8 - //SEG20 main::@8 - b8: - //SEG21 [10] call bitmap_clear - //SEG22 [96] phi from main::@8 to bitmap_clear [phi:main::@8->bitmap_clear] - bitmap_clear_from_b8: - jsr bitmap_clear + //SEG15 [7] phi from main to main::@9 [phi:main->main::@9] + b9_from_main: jmp b9 - //SEG23 main::@9 + //SEG16 main::@9 b9: + //SEG17 [8] call bitmap_init + //SEG18 [113] phi from main::@9 to bitmap_init [phi:main::@9->bitmap_init] + bitmap_init_from_b9: + jsr bitmap_init + //SEG19 [9] phi from main::@9 to main::@10 [phi:main::@9->main::@10] + b10_from_b9: + jmp b10 + //SEG20 main::@10 + b10: + //SEG21 [10] call bitmap_clear + //SEG22 [100] phi from main::@10 to bitmap_clear [phi:main::@10->bitmap_clear] + bitmap_clear_from_b10: + jsr bitmap_clear + jmp b11 + //SEG23 main::@11 + b11: //SEG24 [11] *((const byte*) D011#0) ← (const byte) VIC_BMM#0|(const byte) VIC_DEN#0|(const byte) VIC_RSEL#0|(byte) 3 -- _deref_pbuc1=vbuc2 lda #VIC_BMM|VIC_DEN|VIC_RSEL|3 sta D011 - //SEG25 [12] phi from main::@9 to main::toD0181 [phi:main::@9->main::toD0181] - toD0181_from_b9: + //SEG25 [12] phi from main::@11 to main::toD0181 [phi:main::@11->main::toD0181] + toD0181_from_b11: jmp toD0181 //SEG26 main::toD0181 toD0181: - jmp b6 - //SEG27 main::@6 - b6: + jmp b8 + //SEG27 main::@8 + b8: //SEG28 [13] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0 -- _deref_pbuc1=vbuc2 lda #toD0181_return sta D018 //SEG29 [14] call init_irq jsr init_irq - //SEG30 [15] phi from main::@6 to main::@1 [phi:main::@6->main::@1] - b1_from_b6: - //SEG31 [15] phi (word) main::idx_y#3 = (byte) $80 [phi:main::@6->main::@1#0] -- vwuz1=vbuc1 + //SEG30 [15] phi from main::@8 to main::@1 [phi:main::@8->main::@1] + b1_from_b8: + //SEG31 [15] phi (byte) main::r_add#10 = (byte) $20 [phi:main::@8->main::@1#0] -- vbuz1=vbuc1 + lda #$20 + sta r_add + //SEG32 [15] phi (word) main::idx_y#3 = (byte) $80 [phi:main::@8->main::@1#1] -- vwuz1=vbuc1 lda #$80 sta idx_y lda #0 sta idx_y+1 - //SEG32 [15] phi (signed word) main::r#10 = (signed byte) 0 [phi:main::@6->main::@1#1] -- vwsz1=vbsc1 + //SEG33 [15] phi (signed word) main::r#10 = (signed byte) 0 [phi:main::@8->main::@1#2] -- vwsz1=vbsc1 lda #0 sta r lda #0 sta r+1 - //SEG33 [15] phi (word) main::idx_x#3 = (byte) 0 [phi:main::@6->main::@1#2] -- vwuz1=vbuc1 + //SEG34 [15] phi (word) main::idx_x#11 = (byte) 0 [phi:main::@8->main::@1#3] -- vwuz1=vbuc1 lda #0 sta idx_x lda #0 sta idx_x+1 jmp b1 - //SEG34 main::@1 + //SEG35 main::@1 b1: jmp b2 - //SEG35 main::@2 + //SEG36 main::@2 b2: - //SEG36 [16] (word~) main::$28 ← (word) main::idx_x#3 << (byte) 1 -- vwuz1=vwuz2_rol_1 + //SEG37 [16] (word~) main::$32 ← (word) main::idx_x#11 << (byte) 1 -- vwuz1=vwuz2_rol_1 lda idx_x asl - sta _28 + sta _32 lda idx_x+1 rol - sta _28+1 - //SEG37 [17] (signed word*~) main::$30 ← (const signed word[$200]) SINUS#0 + (word~) main::$28 -- pwsz1=pwsc1_plus_vwuz2 - lda _28 + sta _32+1 + //SEG38 [17] (signed word*~) main::$34 ← (const signed word[$200]) SINUS#0 + (word~) main::$32 -- pwsz1=pwsc1_plus_vwuz2 + lda _32 clc adc #SINUS - sta _30+1 - //SEG38 [18] (signed word) main::cos_x#0 ← *((signed word*~) main::$30) -- vwsz1=_deref_pwsz2 + sta _34+1 + //SEG39 [18] (signed word) main::cos_x#0 ← *((signed word*~) main::$34) -- vwsz1=_deref_pwsz2 ldy #0 - lda (_30),y + lda (_34),y sta cos_x iny - lda (_30),y + lda (_34),y sta cos_x+1 - //SEG39 [19] (signed word) mul16s::a#1 ← (signed word) main::r#10 -- vwsz1=vwsz2 + //SEG40 [19] (signed word) mul16s::a#1 ← (signed word) main::r#10 -- vwsz1=vwsz2 lda r sta mul16s.a lda r+1 sta mul16s.a+1 - //SEG40 [20] (signed word) mul16s::b#1 ← (signed word) main::cos_x#0 -- vwsz1=vwsz2 + //SEG41 [20] (signed word) mul16s::b#1 ← (signed word) main::cos_x#0 -- vwsz1=vwsz2 lda cos_x sta mul16s.b lda cos_x+1 sta mul16s.b+1 - //SEG41 [21] call mul16s - //SEG42 [58] phi from main::@2 to mul16s [phi:main::@2->mul16s] + //SEG42 [21] call mul16s + //SEG43 [62] phi from main::@2 to mul16s [phi:main::@2->mul16s] mul16s_from_b2: - //SEG43 [58] phi (signed word) mul16s::b#3 = (signed word) mul16s::b#1 [phi:main::@2->mul16s#0] -- register_copy - //SEG44 [58] phi (signed word) mul16s::a#3 = (signed word) mul16s::a#1 [phi:main::@2->mul16s#1] -- register_copy + //SEG44 [62] phi (signed word) mul16s::b#3 = (signed word) mul16s::b#1 [phi:main::@2->mul16s#0] -- register_copy + //SEG45 [62] phi (signed word) mul16s::a#3 = (signed word) mul16s::a#1 [phi:main::@2->mul16s#1] -- register_copy jsr mul16s - //SEG45 [22] (signed dword) mul16s::return#3 ← (signed dword) mul16s::return#0 -- vdsz1=vdsz2 + //SEG46 [22] (signed dword) mul16s::return#3 ← (signed dword) mul16s::return#0 -- vdsz1=vdsz2 lda mul16s.return sta mul16s.return_3 lda mul16s.return+1 @@ -4367,10 +4495,10 @@ main: { sta mul16s.return_3+2 lda mul16s.return+3 sta mul16s.return_3+3 - jmp b10 - //SEG46 main::@10 - b10: - //SEG47 [23] (signed dword) main::xpos#0 ← (signed dword) mul16s::return#3 -- vdsz1=vdsz2 + jmp b12 + //SEG47 main::@12 + b12: + //SEG48 [23] (signed dword) main::xpos#0 ← (signed dword) mul16s::return#3 -- vdsz1=vdsz2 lda mul16s.return_3 sta xpos lda mul16s.return_3+1 @@ -4379,12 +4507,12 @@ main: { sta xpos+2 lda mul16s.return_3+3 sta xpos+3 - //SEG48 [24] (word~) main::$9 ← > (signed dword) main::xpos#0 -- vwuz1=_hi_vdsz2 + //SEG49 [24] (word~) main::$9 ← > (signed dword) main::xpos#0 -- vwuz1=_hi_vdsz2 lda xpos+2 sta _9 lda xpos+3 sta _9+1 - //SEG49 [25] (signed word~) main::$11 ← (signed word)(word~) main::$9 >> (signed byte) 2 -- vwsz1=vwsz2_ror_2 + //SEG50 [25] (signed word~) main::$11 ← (signed word)(word~) main::$9 >> (signed byte) 2 -- vwsz1=vwsz2_ror_2 lda _9+1 cmp #$80 ror @@ -4396,7 +4524,7 @@ main: { cmp #$80 ror _11+1 ror _11 - //SEG50 [26] (signed word) bitmap_plot::x#0 ← (signed word) $a0 + (signed word~) main::$11 -- vwsz1=vwsc1_plus_vwsz2 + //SEG51 [26] (signed word) bitmap_plot::x#0 ← (signed word) $a0 + (signed word~) main::$11 -- vwsz1=vwsc1_plus_vwsz2 lda _11 clc adc #<$a0 @@ -4404,45 +4532,45 @@ main: { lda _11+1 adc #>$a0 sta bitmap_plot.x+1 - //SEG51 [27] (word~) main::$29 ← (word) main::idx_y#3 << (byte) 1 -- vwuz1=vwuz2_rol_1 + //SEG52 [27] (word~) main::$33 ← (word) main::idx_y#3 << (byte) 1 -- vwuz1=vwuz2_rol_1 lda idx_y asl - sta _29 + sta _33 lda idx_y+1 rol - sta _29+1 - //SEG52 [28] (signed word*~) main::$31 ← (const signed word[$200]) SINUS#0 + (word~) main::$29 -- pwsz1=pwsc1_plus_vwuz2 - lda _29 + sta _33+1 + //SEG53 [28] (signed word*~) main::$35 ← (const signed word[$200]) SINUS#0 + (word~) main::$33 -- pwsz1=pwsc1_plus_vwuz2 + lda _33 clc adc #SINUS - sta _31+1 - //SEG53 [29] (signed word) main::sin_y#0 ← *((signed word*~) main::$31) -- vwsz1=_deref_pwsz2 + sta _35+1 + //SEG54 [29] (signed word) main::sin_y#0 ← *((signed word*~) main::$35) -- vwsz1=_deref_pwsz2 ldy #0 - lda (_31),y + lda (_35),y sta sin_y iny - lda (_31),y + lda (_35),y sta sin_y+1 - //SEG54 [30] (signed word) mul16s::a#2 ← (signed word) main::r#10 -- vwsz1=vwsz2 + //SEG55 [30] (signed word) mul16s::a#2 ← (signed word) main::r#10 -- vwsz1=vwsz2 lda r sta mul16s.a lda r+1 sta mul16s.a+1 - //SEG55 [31] (signed word) mul16s::b#2 ← (signed word) main::sin_y#0 -- vwsz1=vwsz2 + //SEG56 [31] (signed word) mul16s::b#2 ← (signed word) main::sin_y#0 -- vwsz1=vwsz2 lda sin_y sta mul16s.b lda sin_y+1 sta mul16s.b+1 - //SEG56 [32] call mul16s - //SEG57 [58] phi from main::@10 to mul16s [phi:main::@10->mul16s] - mul16s_from_b10: - //SEG58 [58] phi (signed word) mul16s::b#3 = (signed word) mul16s::b#2 [phi:main::@10->mul16s#0] -- register_copy - //SEG59 [58] phi (signed word) mul16s::a#3 = (signed word) mul16s::a#2 [phi:main::@10->mul16s#1] -- register_copy + //SEG57 [32] call mul16s + //SEG58 [62] phi from main::@12 to mul16s [phi:main::@12->mul16s] + mul16s_from_b12: + //SEG59 [62] phi (signed word) mul16s::b#3 = (signed word) mul16s::b#2 [phi:main::@12->mul16s#0] -- register_copy + //SEG60 [62] phi (signed word) mul16s::a#3 = (signed word) mul16s::a#2 [phi:main::@12->mul16s#1] -- register_copy jsr mul16s - //SEG60 [33] (signed dword) mul16s::return#4 ← (signed dword) mul16s::return#0 -- vdsz1=vdsz2 + //SEG61 [33] (signed dword) mul16s::return#4 ← (signed dword) mul16s::return#0 -- vdsz1=vdsz2 lda mul16s.return sta mul16s.return_4 lda mul16s.return+1 @@ -4451,10 +4579,10 @@ main: { sta mul16s.return_4+2 lda mul16s.return+3 sta mul16s.return_4+3 - jmp b11 - //SEG61 main::@11 - b11: - //SEG62 [34] (signed dword) main::ypos#0 ← (signed dword) mul16s::return#4 -- vdsz1=vdsz2 + jmp b13 + //SEG62 main::@13 + b13: + //SEG63 [34] (signed dword) main::ypos#0 ← (signed dword) mul16s::return#4 -- vdsz1=vdsz2 lda mul16s.return_4 sta ypos lda mul16s.return_4+1 @@ -4463,12 +4591,12 @@ main: { sta ypos+2 lda mul16s.return_4+3 sta ypos+3 - //SEG63 [35] (word~) main::$15 ← > (signed dword) main::ypos#0 -- vwuz1=_hi_vdsz2 + //SEG64 [35] (word~) main::$15 ← > (signed dword) main::ypos#0 -- vwuz1=_hi_vdsz2 lda ypos+2 sta _15 lda ypos+3 sta _15+1 - //SEG64 [36] (signed word~) main::$17 ← (signed word)(word~) main::$15 >> (signed byte) 2 -- vwsz1=vwsz2_ror_2 + //SEG65 [36] (signed word~) main::$17 ← (signed word)(word~) main::$15 >> (signed byte) 2 -- vwsz1=vwsz2_ror_2 lda _15+1 cmp #$80 ror @@ -4480,7 +4608,7 @@ main: { cmp #$80 ror _17+1 ror _17 - //SEG65 [37] (signed word~) main::$18 ← (signed byte) $64 + (signed word~) main::$17 -- vwsz1=vbsc1_plus_vwsz2 + //SEG66 [37] (signed word~) main::$18 ← (signed byte) $64 + (signed word~) main::$17 -- vwsz1=vbsc1_plus_vwsz2 lda #$64 sta $fe ora #$7f @@ -4495,105 +4623,125 @@ main: { lda _17+1 adc $ff sta _18+1 - //SEG66 [38] (byte) bitmap_plot::y#0 ← (byte)(word)(signed word~) main::$18 -- vbuz1=_byte_vwuz2 + //SEG67 [38] (byte) bitmap_plot::y#0 ← (byte)(word)(signed word~) main::$18 -- vbuz1=_byte_vwuz2 lda _18 sta bitmap_plot.y - //SEG67 [39] call bitmap_plot + //SEG68 [39] call bitmap_plot jsr bitmap_plot - jmp b12 - //SEG68 main::@12 - b12: - //SEG69 [40] *((const byte[$100]) plots_per_frame#0 + (byte) frame_cnt#0) ← ++ *((const byte[$100]) plots_per_frame#0 + (byte) frame_cnt#0) -- pbuc1_derefidx_vbuz1=_inc_pbuc1_derefidx_vbuz1 + jmp b14 + //SEG69 main::@14 + b14: + //SEG70 [40] *((const byte[$100]) plots_per_frame#0 + (byte) frame_cnt#0) ← ++ *((const byte[$100]) plots_per_frame#0 + (byte) frame_cnt#0) -- pbuc1_derefidx_vbuz1=_inc_pbuc1_derefidx_vbuz1 ldx frame_cnt inc plots_per_frame,x - //SEG70 [41] (word) main::idx_x#1 ← (word) main::idx_x#3 + (const byte) main::r_add#0 -- vwuz1=vwuz1_plus_vbuc1 - lda #r_add + //SEG71 [41] (word) main::idx_x#1 ← (word) main::idx_x#11 + (byte) main::r_add#10 -- vwuz1=vwuz1_plus_vbuz2 + lda r_add clc adc idx_x sta idx_x bcc !+ inc idx_x+1 !: - //SEG71 [42] if((word) main::idx_x#1<(word) $200) goto main::@13 -- vwuz1_lt_vwuc1_then_la1 + //SEG72 [42] if((word) main::idx_x#1<(word) $200) goto main::@16 -- vwuz1_lt_vwuc1_then_la1 lda idx_x+1 cmp #>$200 - bcc b13_from_b12 + bcc b16_from_b14 bne !+ lda idx_x cmp #<$200 - bcc b13_from_b12 + bcc b16_from_b14 !: - //SEG72 [44] phi from main::@12 to main::@3 [phi:main::@12->main::@3] - b3_from_b12: - //SEG73 [44] phi (word) main::idx_x#10 = (byte) 0 [phi:main::@12->main::@3#0] -- vwuz1=vbuc1 + //SEG73 [44] phi from main::@14 to main::@3 [phi:main::@14->main::@3] + b3_from_b14: + //SEG74 [44] phi (word) main::idx_x#10 = (byte) 0 [phi:main::@14->main::@3#0] -- vwuz1=vbuc1 lda #0 sta idx_x lda #0 sta idx_x+1 jmp b3 - //SEG74 [43] phi from main::@12 to main::@13 [phi:main::@12->main::@13] - b13_from_b12: - jmp b13 - //SEG75 main::@13 - b13: - //SEG76 [44] phi from main::@13 to main::@3 [phi:main::@13->main::@3] - b3_from_b13: - //SEG77 [44] phi (word) main::idx_x#10 = (word) main::idx_x#1 [phi:main::@13->main::@3#0] -- register_copy + //SEG75 [43] phi from main::@14 to main::@16 [phi:main::@14->main::@16] + b16_from_b14: + jmp b16 + //SEG76 main::@16 + b16: + //SEG77 [44] phi from main::@16 to main::@3 [phi:main::@16->main::@3] + b3_from_b16: + //SEG78 [44] phi (word) main::idx_x#10 = (word) main::idx_x#1 [phi:main::@16->main::@3#0] -- register_copy jmp b3 - //SEG78 main::@3 + //SEG79 main::@3 b3: - //SEG79 [45] (word) main::idx_y#1 ← (word) main::idx_y#3 + (const byte) main::r_add#0 -- vwuz1=vwuz1_plus_vbuc1 - lda #r_add + //SEG80 [45] (word) main::idx_y#1 ← (word) main::idx_y#3 + (byte) main::r_add#10 -- vwuz1=vwuz1_plus_vbuz2 + lda r_add clc adc idx_y sta idx_y bcc !+ inc idx_y+1 !: - //SEG80 [46] if((word) main::idx_y#1<(word) $200) goto main::@14 -- vwuz1_lt_vwuc1_then_la1 + //SEG81 [46] if((word) main::idx_y#1<(word) $200) goto main::@17 -- vwuz1_lt_vwuc1_then_la1 lda idx_y+1 cmp #>$200 - bcc b14_from_b3 + bcc b17_from_b3 bne !+ lda idx_y cmp #<$200 - bcc b14_from_b3 + bcc b17_from_b3 !: - //SEG81 [48] phi from main::@3 to main::@4 [phi:main::@3->main::@4] + //SEG82 [48] phi from main::@3 to main::@4 [phi:main::@3->main::@4] b4_from_b3: - //SEG82 [48] phi (word) main::idx_y#10 = (byte) 0 [phi:main::@3->main::@4#0] -- vwuz1=vbuc1 + //SEG83 [48] phi (word) main::idx_y#10 = (byte) 0 [phi:main::@3->main::@4#0] -- vwuz1=vbuc1 lda #0 sta idx_y lda #0 sta idx_y+1 jmp b4 - //SEG83 [47] phi from main::@3 to main::@14 [phi:main::@3->main::@14] - b14_from_b3: - jmp b14 - //SEG84 main::@14 - b14: - //SEG85 [48] phi from main::@14 to main::@4 [phi:main::@14->main::@4] - b4_from_b14: - //SEG86 [48] phi (word) main::idx_y#10 = (word) main::idx_y#1 [phi:main::@14->main::@4#0] -- register_copy + //SEG84 [47] phi from main::@3 to main::@17 [phi:main::@3->main::@17] + b17_from_b3: + jmp b17 + //SEG85 main::@17 + b17: + //SEG86 [48] phi from main::@17 to main::@4 [phi:main::@17->main::@4] + b4_from_b17: + //SEG87 [48] phi (word) main::idx_y#10 = (word) main::idx_y#1 [phi:main::@17->main::@4#0] -- register_copy jmp b4 - //SEG87 main::@4 + //SEG88 main::@4 b4: - //SEG88 [49] (signed word) main::r#1 ← (signed word) main::r#10 + (const byte) main::r_add#0 -- vwsz1=vwsz1_plus_vbsc1 - lda #r_add - sta $fe - ora #$7f - bmi !+ - lda #0 - !: - sta $ff + //SEG89 [49] (signed word) main::r#1 ← (signed word) main::r#10 + (byte) main::r_add#10 -- vwsz1=vwsz1_plus_vbuz2 clc lda r - adc $fe + adc r_add sta r lda r+1 - adc $ff + adc #0 sta r+1 - //SEG89 [50] if((signed word) main::r#1>=(signed word)(number) $200*(number) $c+(number) $100) goto main::@5 -- vwsz1_ge_vwsc1_then_la1 + //SEG90 [50] if((word) main::idx_x#10!=(byte) 0) goto main::@5 -- vwuz1_neq_0_then_la1 + lda idx_x + bne b5_from_b4 + lda idx_x+1 + bne b5_from_b4 + jmp b15 + //SEG91 main::@15 + b15: + //SEG92 [51] if((byte) main::r_add#10==(byte) 1) goto main::@5 -- vbuz1_eq_vbuc1_then_la1 + lda #1 + cmp r_add + beq b5_from_b15 + jmp b6 + //SEG93 main::@6 + b6: + //SEG94 [52] (byte) main::r_add#1 ← (byte) main::r_add#10 >> (byte) 1 -- vbuz1=vbuz1_ror_1 + lsr r_add + //SEG95 [53] phi from main::@4 main::@6 to main::@5 [phi:main::@4/main::@6->main::@5] + b5_from_b4: + b5_from_b6: + //SEG96 [53] phi (byte) main::r_add#12 = (byte) main::r_add#10 [phi:main::@4/main::@6->main::@5#0] -- register_copy + jmp b5 + //SEG97 [53] phi from main::@15 to main::@5 [phi:main::@15->main::@5] + b5_from_b15: + jmp b5 + //SEG98 main::@5 + b5: + //SEG99 [54] if((signed word) main::r#1>=(signed word)(number) $200*(number) $c+(number) $100) goto main::@7 -- vwsz1_ge_vwsc1_then_la1 lda r cmp #<$200*$c+$100 lda r+1 @@ -4601,43 +4749,44 @@ main: { bvc !+ eor #$80 !: - bpl b5 - //SEG90 [15] phi from main::@4 to main::@1 [phi:main::@4->main::@1] - b1_from_b4: - //SEG91 [15] phi (word) main::idx_y#3 = (word) main::idx_y#10 [phi:main::@4->main::@1#0] -- register_copy - //SEG92 [15] phi (signed word) main::r#10 = (signed word) main::r#1 [phi:main::@4->main::@1#1] -- register_copy - //SEG93 [15] phi (word) main::idx_x#3 = (word) main::idx_x#10 [phi:main::@4->main::@1#2] -- register_copy + bpl b7 + //SEG100 [15] phi from main::@5 to main::@1 [phi:main::@5->main::@1] + b1_from_b5: + //SEG101 [15] phi (byte) main::r_add#10 = (byte) main::r_add#12 [phi:main::@5->main::@1#0] -- register_copy + //SEG102 [15] phi (word) main::idx_y#3 = (word) main::idx_y#10 [phi:main::@5->main::@1#1] -- register_copy + //SEG103 [15] phi (signed word) main::r#10 = (signed word) main::r#1 [phi:main::@5->main::@1#2] -- register_copy + //SEG104 [15] phi (word) main::idx_x#11 = (word) main::idx_x#10 [phi:main::@5->main::@1#3] -- register_copy jmp b1 - //SEG94 main::@5 - b5: - //SEG95 [51] *((const byte*) BORDERCOL#0) ← ++ *((const byte*) BORDERCOL#0) -- _deref_pbuc1=_inc__deref_pbuc1 + //SEG105 main::@7 + b7: + //SEG106 [55] *((const byte*) BORDERCOL#0) ← ++ *((const byte*) BORDERCOL#0) -- _deref_pbuc1=_inc__deref_pbuc1 inc BORDERCOL - jmp b5 + jmp b7 } -//SEG96 bitmap_plot +//SEG107 bitmap_plot // Plot a single dot in the bitmap -// bitmap_plot(signed word zeropage($56) x, byte zeropage($6c) y) +// bitmap_plot(signed word zeropage($57) x, byte zeropage($6d) y) bitmap_plot: { - .label _1 = $6f - .label _2 = $73 - .label plotter = $71 - .label x = $56 - .label y = $6c - .label _3 = $6d - //SEG97 [52] (word~) bitmap_plot::$3 ← *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_plot::y#0) w= *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_plot::y#0) -- vwuz1=pbuc1_derefidx_vbuz2_word_pbuc2_derefidx_vbuz2 + .label _1 = $70 + .label _2 = $74 + .label plotter = $72 + .label x = $57 + .label y = $6d + .label _3 = $6e + //SEG108 [56] (word~) bitmap_plot::$3 ← *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_plot::y#0) w= *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_plot::y#0) -- vwuz1=pbuc1_derefidx_vbuz2_word_pbuc2_derefidx_vbuz2 ldy y lda bitmap_plot_yhi,y sta _3+1 lda bitmap_plot_ylo,y sta _3 - //SEG98 [53] (word~) bitmap_plot::$1 ← (word)(signed word) bitmap_plot::x#0 & (word) $fff8 -- vwuz1=vwuz2_band_vwuc1 + //SEG109 [57] (word~) bitmap_plot::$1 ← (word)(signed word) bitmap_plot::x#0 & (word) $fff8 -- vwuz1=vwuz2_band_vwuc1 lda x and #<$fff8 sta _1 lda x+1 and #>$fff8 sta _1+1 - //SEG99 [54] (byte*) bitmap_plot::plotter#1 ← (byte*)(word~) bitmap_plot::$3 + (word~) bitmap_plot::$1 -- pbuz1=pbuz2_plus_vwuz3 + //SEG110 [58] (byte*) bitmap_plot::plotter#1 ← (byte*)(word~) bitmap_plot::$3 + (word~) bitmap_plot::$1 -- pbuz1=pbuz2_plus_vwuz3 lda _3 clc adc _1 @@ -4645,10 +4794,10 @@ bitmap_plot: { lda _3+1 adc _1+1 sta plotter+1 - //SEG100 [55] (byte~) bitmap_plot::$2 ← < (word)(signed word) bitmap_plot::x#0 -- vbuz1=_lo_vwuz2 + //SEG111 [59] (byte~) bitmap_plot::$2 ← < (word)(signed word) bitmap_plot::x#0 -- vbuz1=_lo_vwuz2 lda x sta _2 - //SEG101 [56] *((byte*) bitmap_plot::plotter#1) ← *((byte*) bitmap_plot::plotter#1) | *((const byte[$100]) bitmap_plot_bit#0 + (byte~) bitmap_plot::$2) -- _deref_pbuz1=_deref_pbuz1_bor_pbuc1_derefidx_vbuz2 + //SEG112 [60] *((byte*) bitmap_plot::plotter#1) ← *((byte*) bitmap_plot::plotter#1) | *((const byte[$100]) bitmap_plot_bit#0 + (byte~) bitmap_plot::$2) -- _deref_pbuz1=_deref_pbuz1_bor_pbuc1_derefidx_vbuz2 ldy #0 lda (plotter),y ldy _2 @@ -4656,28 +4805,28 @@ bitmap_plot: { ldy #0 sta (plotter),y jmp breturn - //SEG102 bitmap_plot::@return + //SEG113 bitmap_plot::@return breturn: - //SEG103 [57] return + //SEG114 [61] return rts } -//SEG104 mul16s +//SEG115 mul16s // Multiply of two signed words to a signed double word // Fixes offsets introduced by using unsigned multiplication -// mul16s(signed word zeropage(8) a, signed word zeropage($a) b) +// mul16s(signed word zeropage(9) a, signed word zeropage($b) b) mul16s: { - .label _9 = $78 - .label _13 = $7c - .label _16 = $7a - .label _17 = $7e - .label m = $c - .label return = $80 - .label a = 8 - .label return_2 = $95 - .label b = $a - .label return_3 = $4a - .label return_4 = $5e - //SEG105 [59] (dword~) mul16u::mb#6 ← (word)(signed word) mul16s::b#3 -- vduz1=vwuz2 + .label _9 = $79 + .label _13 = $7d + .label _16 = $7b + .label _17 = $7f + .label m = $d + .label return = $81 + .label a = 9 + .label return_2 = $96 + .label b = $b + .label return_3 = $4b + .label return_4 = $5f + //SEG116 [63] (dword~) mul16u::mb#6 ← (word)(signed word) mul16s::b#3 -- vduz1=vwuz2 lda b sta mul16u.mb lda b+1 @@ -4685,18 +4834,18 @@ mul16s: { lda #0 sta mul16u.mb+2 sta mul16u.mb+3 - //SEG106 [60] (word~) mul16u::a#8 ← (word)(signed word) mul16s::a#3 -- vwuz1=vwuz2 + //SEG117 [64] (word~) mul16u::a#8 ← (word)(signed word) mul16s::a#3 -- vwuz1=vwuz2 lda a sta mul16u.a lda a+1 sta mul16u.a+1 - //SEG107 [61] call mul16u - //SEG108 [76] phi from mul16s to mul16u [phi:mul16s->mul16u] + //SEG118 [65] call mul16u + //SEG119 [80] phi from mul16s to mul16u [phi:mul16s->mul16u] mul16u_from_mul16s: - //SEG109 [76] phi (word) mul16u::a#6 = (word~) mul16u::a#8 [phi:mul16s->mul16u#0] -- register_copy - //SEG110 [76] phi (dword) mul16u::mb#0 = (dword~) mul16u::mb#6 [phi:mul16s->mul16u#1] -- register_copy + //SEG120 [80] phi (word) mul16u::a#6 = (word~) mul16u::a#8 [phi:mul16s->mul16u#0] -- register_copy + //SEG121 [80] phi (dword) mul16u::mb#0 = (dword~) mul16u::mb#6 [phi:mul16s->mul16u#1] -- register_copy jsr mul16u - //SEG111 [62] (dword) mul16u::return#2 ← (dword) mul16u::res#2 -- vduz1=vduz2 + //SEG122 [66] (dword) mul16u::return#2 ← (dword) mul16u::res#2 -- vduz1=vduz2 lda mul16u.res sta mul16u.return lda mul16u.res+1 @@ -4706,9 +4855,9 @@ mul16s: { lda mul16u.res+3 sta mul16u.return+3 jmp b5 - //SEG112 mul16s::@5 + //SEG123 mul16s::@5 b5: - //SEG113 [63] (dword) mul16s::m#0 ← (dword) mul16u::return#2 -- vduz1=vduz2 + //SEG124 [67] (dword) mul16s::m#0 ← (dword) mul16u::return#2 -- vduz1=vduz2 lda mul16u.return sta m lda mul16u.return+1 @@ -4717,18 +4866,18 @@ mul16s: { sta m+2 lda mul16u.return+3 sta m+3 - //SEG114 [64] if((signed word) mul16s::a#3>=(signed byte) 0) goto mul16s::@1 -- vwsz1_ge_0_then_la1 + //SEG125 [68] if((signed word) mul16s::a#3>=(signed byte) 0) goto mul16s::@1 -- vwsz1_ge_0_then_la1 lda a+1 bpl b1_from_b5 jmp b3 - //SEG115 mul16s::@3 + //SEG126 mul16s::@3 b3: - //SEG116 [65] (word~) mul16s::$9 ← > (dword) mul16s::m#0 -- vwuz1=_hi_vduz2 + //SEG127 [69] (word~) mul16s::$9 ← > (dword) mul16s::m#0 -- vwuz1=_hi_vduz2 lda m+2 sta _9 lda m+3 sta _9+1 - //SEG117 [66] (word~) mul16s::$16 ← (word~) mul16s::$9 - (word)(signed word) mul16s::b#3 -- vwuz1=vwuz2_minus_vwuz3 + //SEG128 [70] (word~) mul16s::$16 ← (word~) mul16s::$9 - (word)(signed word) mul16s::b#3 -- vwuz1=vwuz2_minus_vwuz3 lda _9 sec sbc b @@ -4736,30 +4885,30 @@ mul16s: { lda _9+1 sbc b+1 sta _16+1 - //SEG118 [67] (dword) mul16s::m#1 ← (dword) mul16s::m#0 hi= (word~) mul16s::$16 -- vduz1=vduz1_sethi_vwuz2 + //SEG129 [71] (dword) mul16s::m#1 ← (dword) mul16s::m#0 hi= (word~) mul16s::$16 -- vduz1=vduz1_sethi_vwuz2 lda _16 sta m+2 lda _16+1 sta m+3 - //SEG119 [68] phi from mul16s::@3 mul16s::@5 to mul16s::@1 [phi:mul16s::@3/mul16s::@5->mul16s::@1] + //SEG130 [72] phi from mul16s::@3 mul16s::@5 to mul16s::@1 [phi:mul16s::@3/mul16s::@5->mul16s::@1] b1_from_b3: b1_from_b5: - //SEG120 [68] phi (dword) mul16s::m#5 = (dword) mul16s::m#1 [phi:mul16s::@3/mul16s::@5->mul16s::@1#0] -- register_copy + //SEG131 [72] phi (dword) mul16s::m#5 = (dword) mul16s::m#1 [phi:mul16s::@3/mul16s::@5->mul16s::@1#0] -- register_copy jmp b1 - //SEG121 mul16s::@1 + //SEG132 mul16s::@1 b1: - //SEG122 [69] if((signed word) mul16s::b#3>=(signed byte) 0) goto mul16s::@2 -- vwsz1_ge_0_then_la1 + //SEG133 [73] if((signed word) mul16s::b#3>=(signed byte) 0) goto mul16s::@2 -- vwsz1_ge_0_then_la1 lda b+1 bpl b2_from_b1 jmp b4 - //SEG123 mul16s::@4 + //SEG134 mul16s::@4 b4: - //SEG124 [70] (word~) mul16s::$13 ← > (dword) mul16s::m#5 -- vwuz1=_hi_vduz2 + //SEG135 [74] (word~) mul16s::$13 ← > (dword) mul16s::m#5 -- vwuz1=_hi_vduz2 lda m+2 sta _13 lda m+3 sta _13+1 - //SEG125 [71] (word~) mul16s::$17 ← (word~) mul16s::$13 - (word)(signed word) mul16s::a#3 -- vwuz1=vwuz2_minus_vwuz3 + //SEG136 [75] (word~) mul16s::$17 ← (word~) mul16s::$13 - (word)(signed word) mul16s::a#3 -- vwuz1=vwuz2_minus_vwuz3 lda _13 sec sbc a @@ -4767,19 +4916,19 @@ mul16s: { lda _13+1 sbc a+1 sta _17+1 - //SEG126 [72] (dword) mul16s::m#2 ← (dword) mul16s::m#5 hi= (word~) mul16s::$17 -- vduz1=vduz1_sethi_vwuz2 + //SEG137 [76] (dword) mul16s::m#2 ← (dword) mul16s::m#5 hi= (word~) mul16s::$17 -- vduz1=vduz1_sethi_vwuz2 lda _17 sta m+2 lda _17+1 sta m+3 - //SEG127 [73] phi from mul16s::@1 mul16s::@4 to mul16s::@2 [phi:mul16s::@1/mul16s::@4->mul16s::@2] + //SEG138 [77] phi from mul16s::@1 mul16s::@4 to mul16s::@2 [phi:mul16s::@1/mul16s::@4->mul16s::@2] b2_from_b1: b2_from_b4: - //SEG128 [73] phi (dword) mul16s::m#4 = (dword) mul16s::m#5 [phi:mul16s::@1/mul16s::@4->mul16s::@2#0] -- register_copy + //SEG139 [77] phi (dword) mul16s::m#4 = (dword) mul16s::m#5 [phi:mul16s::@1/mul16s::@4->mul16s::@2#0] -- register_copy jmp b2 - //SEG129 mul16s::@2 + //SEG140 mul16s::@2 b2: - //SEG130 [74] (signed dword) mul16s::return#0 ← (signed dword)(dword) mul16s::m#4 -- vdsz1=vdsz2 + //SEG141 [78] (signed dword) mul16s::return#0 ← (signed dword)(dword) mul16s::m#4 -- vdsz1=vdsz2 lda m sta return lda m+1 @@ -4789,60 +4938,60 @@ mul16s: { lda m+3 sta return+3 jmp breturn - //SEG131 mul16s::@return + //SEG142 mul16s::@return breturn: - //SEG132 [75] return + //SEG143 [79] return rts } -//SEG133 mul16u +//SEG144 mul16u // Perform binary multiplication of two unsigned 16-bit words into a 32-bit unsigned double word -// mul16u(word zeropage($12) a, word zeropage($10) b) +// mul16u(word zeropage($13) a, word zeropage($11) b) mul16u: { - .label _1 = $84 - .label mb = $18 - .label a = $12 - .label res = $14 - .label return = $74 - .label b = $10 - .label return_3 = $bf - //SEG134 [77] phi from mul16u to mul16u::@1 [phi:mul16u->mul16u::@1] + .label _1 = $85 + .label mb = $19 + .label a = $13 + .label res = $15 + .label return = $75 + .label b = $11 + .label return_3 = $c0 + //SEG145 [81] phi from mul16u to mul16u::@1 [phi:mul16u->mul16u::@1] b1_from_mul16u: - //SEG135 [77] phi (dword) mul16u::mb#2 = (dword) mul16u::mb#0 [phi:mul16u->mul16u::@1#0] -- register_copy - //SEG136 [77] phi (dword) mul16u::res#2 = (byte) 0 [phi:mul16u->mul16u::@1#1] -- vduz1=vbuc1 + //SEG146 [81] phi (dword) mul16u::mb#2 = (dword) mul16u::mb#0 [phi:mul16u->mul16u::@1#0] -- register_copy + //SEG147 [81] phi (dword) mul16u::res#2 = (byte) 0 [phi:mul16u->mul16u::@1#1] -- vduz1=vbuc1 lda #0 sta res lda #0 sta res+1 sta res+2 sta res+3 - //SEG137 [77] phi (word) mul16u::a#3 = (word) mul16u::a#6 [phi:mul16u->mul16u::@1#2] -- register_copy + //SEG148 [81] phi (word) mul16u::a#3 = (word) mul16u::a#6 [phi:mul16u->mul16u::@1#2] -- register_copy jmp b1 - //SEG138 mul16u::@1 + //SEG149 mul16u::@1 b1: - //SEG139 [78] if((word) mul16u::a#3!=(byte) 0) goto mul16u::@2 -- vwuz1_neq_0_then_la1 + //SEG150 [82] if((word) mul16u::a#3!=(byte) 0) goto mul16u::@2 -- vwuz1_neq_0_then_la1 lda a bne b2 lda a+1 bne b2 jmp breturn - //SEG140 mul16u::@return + //SEG151 mul16u::@return breturn: - //SEG141 [79] return + //SEG152 [83] return rts - //SEG142 mul16u::@2 + //SEG153 mul16u::@2 b2: - //SEG143 [80] (byte~) mul16u::$1 ← (word) mul16u::a#3 & (byte) 1 -- vbuz1=vwuz2_band_vbuc1 + //SEG154 [84] (byte~) mul16u::$1 ← (word) mul16u::a#3 & (byte) 1 -- vbuz1=vwuz2_band_vbuc1 lda a and #1 sta _1 - //SEG144 [81] if((byte~) mul16u::$1==(byte) 0) goto mul16u::@3 -- vbuz1_eq_0_then_la1 + //SEG155 [85] if((byte~) mul16u::$1==(byte) 0) goto mul16u::@3 -- vbuz1_eq_0_then_la1 lda _1 cmp #0 beq b3_from_b2 jmp b4 - //SEG145 mul16u::@4 + //SEG156 mul16u::@4 b4: - //SEG146 [82] (dword) mul16u::res#1 ← (dword) mul16u::res#2 + (dword) mul16u::mb#2 -- vduz1=vduz1_plus_vduz2 + //SEG157 [86] (dword) mul16u::res#1 ← (dword) mul16u::res#2 + (dword) mul16u::mb#2 -- vduz1=vduz1_plus_vduz2 lda res clc adc mb @@ -4856,131 +5005,131 @@ mul16u: { lda res+3 adc mb+3 sta res+3 - //SEG147 [83] phi from mul16u::@2 mul16u::@4 to mul16u::@3 [phi:mul16u::@2/mul16u::@4->mul16u::@3] + //SEG158 [87] phi from mul16u::@2 mul16u::@4 to mul16u::@3 [phi:mul16u::@2/mul16u::@4->mul16u::@3] b3_from_b2: b3_from_b4: - //SEG148 [83] phi (dword) mul16u::res#6 = (dword) mul16u::res#2 [phi:mul16u::@2/mul16u::@4->mul16u::@3#0] -- register_copy + //SEG159 [87] phi (dword) mul16u::res#6 = (dword) mul16u::res#2 [phi:mul16u::@2/mul16u::@4->mul16u::@3#0] -- register_copy jmp b3 - //SEG149 mul16u::@3 + //SEG160 mul16u::@3 b3: - //SEG150 [84] (word) mul16u::a#0 ← (word) mul16u::a#3 >> (byte) 1 -- vwuz1=vwuz1_ror_1 + //SEG161 [88] (word) mul16u::a#0 ← (word) mul16u::a#3 >> (byte) 1 -- vwuz1=vwuz1_ror_1 lsr a+1 ror a - //SEG151 [85] (dword) mul16u::mb#1 ← (dword) mul16u::mb#2 << (byte) 1 -- vduz1=vduz1_rol_1 + //SEG162 [89] (dword) mul16u::mb#1 ← (dword) mul16u::mb#2 << (byte) 1 -- vduz1=vduz1_rol_1 asl mb rol mb+1 rol mb+2 rol mb+3 - //SEG152 [77] phi from mul16u::@3 to mul16u::@1 [phi:mul16u::@3->mul16u::@1] + //SEG163 [81] phi from mul16u::@3 to mul16u::@1 [phi:mul16u::@3->mul16u::@1] b1_from_b3: - //SEG153 [77] phi (dword) mul16u::mb#2 = (dword) mul16u::mb#1 [phi:mul16u::@3->mul16u::@1#0] -- register_copy - //SEG154 [77] phi (dword) mul16u::res#2 = (dword) mul16u::res#6 [phi:mul16u::@3->mul16u::@1#1] -- register_copy - //SEG155 [77] phi (word) mul16u::a#3 = (word) mul16u::a#0 [phi:mul16u::@3->mul16u::@1#2] -- register_copy + //SEG164 [81] phi (dword) mul16u::mb#2 = (dword) mul16u::mb#1 [phi:mul16u::@3->mul16u::@1#0] -- register_copy + //SEG165 [81] phi (dword) mul16u::res#2 = (dword) mul16u::res#6 [phi:mul16u::@3->mul16u::@1#1] -- register_copy + //SEG166 [81] phi (word) mul16u::a#3 = (word) mul16u::a#0 [phi:mul16u::@3->mul16u::@1#2] -- register_copy jmp b1 } -//SEG156 init_irq +//SEG167 init_irq // Setup the IRQ init_irq: { - //SEG157 asm { sei } + //SEG168 asm { sei } sei - //SEG158 [87] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 -- _deref_pbuc1=vbuc2 + //SEG169 [91] *((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 - //SEG159 [88] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 -- _deref_pbuc1=vbuc2 + //SEG170 [92] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 -- _deref_pbuc1=vbuc2 lda #PROCPORT_RAM_IO sta PROCPORT - //SEG160 [89] *((const byte*) CIA1_INTERRUPT#0) ← (const byte) CIA_INTERRUPT_CLEAR#0 -- _deref_pbuc1=vbuc2 + //SEG171 [93] *((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 - //SEG161 [90] *((const byte*) VIC_CONTROL#0) ← *((const byte*) VIC_CONTROL#0) | (byte) $80 -- _deref_pbuc1=_deref_pbuc1_bor_vbuc2 + //SEG172 [94] *((const byte*) VIC_CONTROL#0) ← *((const byte*) VIC_CONTROL#0) | (byte) $80 -- _deref_pbuc1=_deref_pbuc1_bor_vbuc2 // Set raster line to $100 lda #$80 ora VIC_CONTROL sta VIC_CONTROL - //SEG162 [91] *((const byte*) RASTER#0) ← (byte) 0 -- _deref_pbuc1=vbuc2 + //SEG173 [95] *((const byte*) RASTER#0) ← (byte) 0 -- _deref_pbuc1=vbuc2 lda #0 sta RASTER - //SEG163 [92] *((const byte*) IRQ_ENABLE#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 + //SEG174 [96] *((const byte*) IRQ_ENABLE#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 // Enable Raster Interrupt lda #IRQ_RASTER sta IRQ_ENABLE - //SEG164 [93] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_CLOBBER)(void()) irq() -- _deref_pptc1=pprc2 + //SEG175 [97] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_CLOBBER)(void()) irq() -- _deref_pptc1=pprc2 // Set the IRQ routine lda #irq sta HARDWARE_IRQ+1 - //SEG165 asm { cli } + //SEG176 asm { cli } cli jmp breturn - //SEG166 init_irq::@return + //SEG177 init_irq::@return breturn: - //SEG167 [95] return + //SEG178 [99] return rts } -//SEG168 bitmap_clear +//SEG179 bitmap_clear // Clear all graphics on the bitmap // bgcol - the background color to fill the screen with // fgcol - the foreground color to fill the screen with bitmap_clear: { .const col = WHITE*$10 - //SEG169 [97] call memset - //SEG170 [101] phi from bitmap_clear to memset [phi:bitmap_clear->memset] + //SEG180 [101] call memset + //SEG181 [105] phi from bitmap_clear to memset [phi:bitmap_clear->memset] memset_from_bitmap_clear: - //SEG171 [101] phi (byte) memset::c#3 = (const byte) bitmap_clear::col#0 [phi:bitmap_clear->memset#0] -- vbuz1=vbuc1 + //SEG182 [105] phi (byte) memset::c#3 = (const byte) bitmap_clear::col#0 [phi:bitmap_clear->memset#0] -- vbuz1=vbuc1 lda #col sta memset.c - //SEG172 [101] phi (word) memset::num#2 = (word) $3e8 [phi:bitmap_clear->memset#1] -- vwuz1=vwuc1 + //SEG183 [105] phi (word) memset::num#2 = (word) $3e8 [phi:bitmap_clear->memset#1] -- vwuz1=vwuc1 lda #<$3e8 sta memset.num lda #>$3e8 sta memset.num+1 - //SEG173 [101] phi (void*) memset::str#2 = (void*)(const byte*) SCREEN#0 [phi:bitmap_clear->memset#2] -- pvoz1=pvoc1 + //SEG184 [105] phi (void*) memset::str#2 = (void*)(const byte*) SCREEN#0 [phi:bitmap_clear->memset#2] -- pvoz1=pvoc1 lda #SCREEN sta memset.str+1 jsr memset - //SEG174 [98] phi from bitmap_clear to bitmap_clear::@1 [phi:bitmap_clear->bitmap_clear::@1] + //SEG185 [102] phi from bitmap_clear to bitmap_clear::@1 [phi:bitmap_clear->bitmap_clear::@1] b1_from_bitmap_clear: jmp b1 - //SEG175 bitmap_clear::@1 + //SEG186 bitmap_clear::@1 b1: - //SEG176 [99] call memset - //SEG177 [101] phi from bitmap_clear::@1 to memset [phi:bitmap_clear::@1->memset] + //SEG187 [103] call memset + //SEG188 [105] phi from bitmap_clear::@1 to memset [phi:bitmap_clear::@1->memset] memset_from_b1: - //SEG178 [101] phi (byte) memset::c#3 = (byte) 0 [phi:bitmap_clear::@1->memset#0] -- vbuz1=vbuc1 + //SEG189 [105] phi (byte) memset::c#3 = (byte) 0 [phi:bitmap_clear::@1->memset#0] -- vbuz1=vbuc1 lda #0 sta memset.c - //SEG179 [101] phi (word) memset::num#2 = (word) $1f40 [phi:bitmap_clear::@1->memset#1] -- vwuz1=vwuc1 + //SEG190 [105] phi (word) memset::num#2 = (word) $1f40 [phi:bitmap_clear::@1->memset#1] -- vwuz1=vwuc1 lda #<$1f40 sta memset.num lda #>$1f40 sta memset.num+1 - //SEG180 [101] phi (void*) memset::str#2 = (void*)(const byte*) BITMAP#0 [phi:bitmap_clear::@1->memset#2] -- pvoz1=pvoc1 + //SEG191 [105] phi (void*) memset::str#2 = (void*)(const byte*) BITMAP#0 [phi:bitmap_clear::@1->memset#2] -- pvoz1=pvoc1 lda #BITMAP sta memset.str+1 jsr memset jmp breturn - //SEG181 bitmap_clear::@return + //SEG192 bitmap_clear::@return breturn: - //SEG182 [100] return + //SEG193 [104] return rts } -//SEG183 memset +//SEG194 memset // Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str. -// memset(void* zeropage($1c) str, byte zeropage($20) c, word zeropage($1e) num) +// memset(void* zeropage($1d) str, byte zeropage($21) c, word zeropage($1f) num) memset: { - .label end = $85 - .label dst = $21 - .label str = $1c - .label num = $1e - .label c = $20 - //SEG184 [102] (byte*) memset::end#0 ← (byte*)(void*) memset::str#2 + (word) memset::num#2 -- pbuz1=pbuz2_plus_vwuz3 + .label end = $86 + .label dst = $22 + .label str = $1d + .label num = $1f + .label c = $21 + //SEG195 [106] (byte*) memset::end#0 ← (byte*)(void*) memset::str#2 + (word) memset::num#2 -- pbuz1=pbuz2_plus_vwuz3 lda str clc adc num @@ -4988,28 +5137,28 @@ memset: { lda str+1 adc num+1 sta end+1 - //SEG185 [103] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#2 -- pbuz1=pbuz2 + //SEG196 [107] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#2 -- pbuz1=pbuz2 lda str sta dst lda str+1 sta dst+1 - //SEG186 [104] phi from memset memset::@1 to memset::@1 [phi:memset/memset::@1->memset::@1] + //SEG197 [108] phi from memset memset::@1 to memset::@1 [phi:memset/memset::@1->memset::@1] b1_from_memset: b1_from_b1: - //SEG187 [104] phi (byte*) memset::dst#2 = (byte*~) memset::dst#3 [phi:memset/memset::@1->memset::@1#0] -- register_copy + //SEG198 [108] phi (byte*) memset::dst#2 = (byte*~) memset::dst#3 [phi:memset/memset::@1->memset::@1#0] -- register_copy jmp b1 - //SEG188 memset::@1 + //SEG199 memset::@1 b1: - //SEG189 [105] *((byte*) memset::dst#2) ← (byte) memset::c#3 -- _deref_pbuz1=vbuz2 + //SEG200 [109] *((byte*) memset::dst#2) ← (byte) memset::c#3 -- _deref_pbuz1=vbuz2 lda c ldy #0 sta (dst),y - //SEG190 [106] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 -- pbuz1=_inc_pbuz1 + //SEG201 [110] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 -- pbuz1=_inc_pbuz1 inc dst bne !+ inc dst+1 !: - //SEG191 [107] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@1 -- pbuz1_neq_pbuz2_then_la1 + //SEG202 [111] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@1 -- pbuz1_neq_pbuz2_then_la1 lda dst+1 cmp end+1 bne b1_from_b1 @@ -5017,119 +5166,119 @@ memset: { cmp end bne b1_from_b1 jmp breturn - //SEG192 memset::@return + //SEG203 memset::@return breturn: - //SEG193 [108] return + //SEG204 [112] return rts } -//SEG194 bitmap_init +//SEG205 bitmap_init // Initialize bitmap plotting tables bitmap_init: { - .label _4 = $88 - .label _5 = $89 - .label _6 = $8a - .label _7 = $87 - .label bits = $23 - .label x = $24 - .label y = $25 - .label yoffs = $26 - //SEG195 [110] phi from bitmap_init to bitmap_init::@1 [phi:bitmap_init->bitmap_init::@1] + .label _4 = $89 + .label _5 = $8a + .label _6 = $8b + .label _7 = $88 + .label bits = $24 + .label x = $25 + .label y = $26 + .label yoffs = $27 + //SEG206 [114] phi from bitmap_init to bitmap_init::@1 [phi:bitmap_init->bitmap_init::@1] b1_from_bitmap_init: - //SEG196 [110] phi (byte) bitmap_init::x#2 = (byte) 0 [phi:bitmap_init->bitmap_init::@1#0] -- vbuz1=vbuc1 + //SEG207 [114] phi (byte) bitmap_init::x#2 = (byte) 0 [phi:bitmap_init->bitmap_init::@1#0] -- vbuz1=vbuc1 lda #0 sta x - //SEG197 [110] phi (byte) bitmap_init::bits#3 = (byte) $80 [phi:bitmap_init->bitmap_init::@1#1] -- vbuz1=vbuc1 + //SEG208 [114] phi (byte) bitmap_init::bits#3 = (byte) $80 [phi:bitmap_init->bitmap_init::@1#1] -- vbuz1=vbuc1 lda #$80 sta bits jmp b1 - //SEG198 [110] phi from bitmap_init::@2 to bitmap_init::@1 [phi:bitmap_init::@2->bitmap_init::@1] + //SEG209 [114] phi from bitmap_init::@2 to bitmap_init::@1 [phi:bitmap_init::@2->bitmap_init::@1] b1_from_b2: - //SEG199 [110] phi (byte) bitmap_init::x#2 = (byte) bitmap_init::x#1 [phi:bitmap_init::@2->bitmap_init::@1#0] -- register_copy - //SEG200 [110] phi (byte) bitmap_init::bits#3 = (byte) bitmap_init::bits#4 [phi:bitmap_init::@2->bitmap_init::@1#1] -- register_copy + //SEG210 [114] phi (byte) bitmap_init::x#2 = (byte) bitmap_init::x#1 [phi:bitmap_init::@2->bitmap_init::@1#0] -- register_copy + //SEG211 [114] phi (byte) bitmap_init::bits#3 = (byte) bitmap_init::bits#4 [phi:bitmap_init::@2->bitmap_init::@1#1] -- register_copy jmp b1 - //SEG201 bitmap_init::@1 + //SEG212 bitmap_init::@1 b1: - //SEG202 [111] *((const byte[$100]) bitmap_plot_bit#0 + (byte) bitmap_init::x#2) ← (byte) bitmap_init::bits#3 -- pbuc1_derefidx_vbuz1=vbuz2 + //SEG213 [115] *((const byte[$100]) bitmap_plot_bit#0 + (byte) bitmap_init::x#2) ← (byte) bitmap_init::bits#3 -- pbuc1_derefidx_vbuz1=vbuz2 lda bits ldy x sta bitmap_plot_bit,y - //SEG203 [112] (byte) bitmap_init::bits#1 ← (byte) bitmap_init::bits#3 >> (byte) 1 -- vbuz1=vbuz1_ror_1 + //SEG214 [116] (byte) bitmap_init::bits#1 ← (byte) bitmap_init::bits#3 >> (byte) 1 -- vbuz1=vbuz1_ror_1 lsr bits - //SEG204 [113] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@6 -- vbuz1_neq_0_then_la1 + //SEG215 [117] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@6 -- vbuz1_neq_0_then_la1 lda bits cmp #0 bne b6_from_b1 - //SEG205 [115] phi from bitmap_init::@1 to bitmap_init::@2 [phi:bitmap_init::@1->bitmap_init::@2] + //SEG216 [119] phi from bitmap_init::@1 to bitmap_init::@2 [phi:bitmap_init::@1->bitmap_init::@2] b2_from_b1: - //SEG206 [115] phi (byte) bitmap_init::bits#4 = (byte) $80 [phi:bitmap_init::@1->bitmap_init::@2#0] -- vbuz1=vbuc1 + //SEG217 [119] phi (byte) bitmap_init::bits#4 = (byte) $80 [phi:bitmap_init::@1->bitmap_init::@2#0] -- vbuz1=vbuc1 lda #$80 sta bits jmp b2 - //SEG207 [114] phi from bitmap_init::@1 to bitmap_init::@6 [phi:bitmap_init::@1->bitmap_init::@6] + //SEG218 [118] phi from bitmap_init::@1 to bitmap_init::@6 [phi:bitmap_init::@1->bitmap_init::@6] b6_from_b1: jmp b6 - //SEG208 bitmap_init::@6 + //SEG219 bitmap_init::@6 b6: - //SEG209 [115] phi from bitmap_init::@6 to bitmap_init::@2 [phi:bitmap_init::@6->bitmap_init::@2] + //SEG220 [119] phi from bitmap_init::@6 to bitmap_init::@2 [phi:bitmap_init::@6->bitmap_init::@2] b2_from_b6: - //SEG210 [115] phi (byte) bitmap_init::bits#4 = (byte) bitmap_init::bits#1 [phi:bitmap_init::@6->bitmap_init::@2#0] -- register_copy + //SEG221 [119] phi (byte) bitmap_init::bits#4 = (byte) bitmap_init::bits#1 [phi:bitmap_init::@6->bitmap_init::@2#0] -- register_copy jmp b2 - //SEG211 bitmap_init::@2 + //SEG222 bitmap_init::@2 b2: - //SEG212 [116] (byte) bitmap_init::x#1 ← ++ (byte) bitmap_init::x#2 -- vbuz1=_inc_vbuz1 + //SEG223 [120] (byte) bitmap_init::x#1 ← ++ (byte) bitmap_init::x#2 -- vbuz1=_inc_vbuz1 inc x - //SEG213 [117] if((byte) bitmap_init::x#1!=(byte) 0) goto bitmap_init::@1 -- vbuz1_neq_0_then_la1 + //SEG224 [121] if((byte) bitmap_init::x#1!=(byte) 0) goto bitmap_init::@1 -- vbuz1_neq_0_then_la1 lda x cmp #0 bne b1_from_b2 - //SEG214 [118] phi from bitmap_init::@2 to bitmap_init::@3 [phi:bitmap_init::@2->bitmap_init::@3] + //SEG225 [122] phi from bitmap_init::@2 to bitmap_init::@3 [phi:bitmap_init::@2->bitmap_init::@3] b3_from_b2: - //SEG215 [118] phi (byte*) bitmap_init::yoffs#2 = (const byte*) BITMAP#0 [phi:bitmap_init::@2->bitmap_init::@3#0] -- pbuz1=pbuc1 + //SEG226 [122] phi (byte*) bitmap_init::yoffs#2 = (const byte*) BITMAP#0 [phi:bitmap_init::@2->bitmap_init::@3#0] -- pbuz1=pbuc1 lda #BITMAP sta yoffs+1 - //SEG216 [118] phi (byte) bitmap_init::y#2 = (byte) 0 [phi:bitmap_init::@2->bitmap_init::@3#1] -- vbuz1=vbuc1 + //SEG227 [122] phi (byte) bitmap_init::y#2 = (byte) 0 [phi:bitmap_init::@2->bitmap_init::@3#1] -- vbuz1=vbuc1 lda #0 sta y jmp b3 - //SEG217 [118] phi from bitmap_init::@4 to bitmap_init::@3 [phi:bitmap_init::@4->bitmap_init::@3] + //SEG228 [122] phi from bitmap_init::@4 to bitmap_init::@3 [phi:bitmap_init::@4->bitmap_init::@3] b3_from_b4: - //SEG218 [118] phi (byte*) bitmap_init::yoffs#2 = (byte*) bitmap_init::yoffs#4 [phi:bitmap_init::@4->bitmap_init::@3#0] -- register_copy - //SEG219 [118] phi (byte) bitmap_init::y#2 = (byte) bitmap_init::y#1 [phi:bitmap_init::@4->bitmap_init::@3#1] -- register_copy + //SEG229 [122] phi (byte*) bitmap_init::yoffs#2 = (byte*) bitmap_init::yoffs#4 [phi:bitmap_init::@4->bitmap_init::@3#0] -- register_copy + //SEG230 [122] phi (byte) bitmap_init::y#2 = (byte) bitmap_init::y#1 [phi:bitmap_init::@4->bitmap_init::@3#1] -- register_copy jmp b3 - //SEG220 bitmap_init::@3 + //SEG231 bitmap_init::@3 b3: - //SEG221 [119] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 -- vbuz1=vbuz2_band_vbuc1 + //SEG232 [123] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 -- vbuz1=vbuz2_band_vbuc1 lda #7 and y sta _7 - //SEG222 [120] (byte~) bitmap_init::$4 ← < (byte*) bitmap_init::yoffs#2 -- vbuz1=_lo_pbuz2 + //SEG233 [124] (byte~) bitmap_init::$4 ← < (byte*) bitmap_init::yoffs#2 -- vbuz1=_lo_pbuz2 lda yoffs sta _4 - //SEG223 [121] (byte~) bitmap_init::$5 ← (byte~) bitmap_init::$7 | (byte~) bitmap_init::$4 -- vbuz1=vbuz2_bor_vbuz3 + //SEG234 [125] (byte~) bitmap_init::$5 ← (byte~) bitmap_init::$7 | (byte~) bitmap_init::$4 -- vbuz1=vbuz2_bor_vbuz3 lda _7 ora _4 sta _5 - //SEG224 [122] *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$5 -- pbuc1_derefidx_vbuz1=vbuz2 + //SEG235 [126] *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$5 -- pbuc1_derefidx_vbuz1=vbuz2 lda _5 ldy y sta bitmap_plot_ylo,y - //SEG225 [123] (byte~) bitmap_init::$6 ← > (byte*) bitmap_init::yoffs#2 -- vbuz1=_hi_pbuz2 + //SEG236 [127] (byte~) bitmap_init::$6 ← > (byte*) bitmap_init::yoffs#2 -- vbuz1=_hi_pbuz2 lda yoffs+1 sta _6 - //SEG226 [124] *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$6 -- pbuc1_derefidx_vbuz1=vbuz2 + //SEG237 [128] *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$6 -- pbuc1_derefidx_vbuz1=vbuz2 lda _6 ldy y sta bitmap_plot_yhi,y - //SEG227 [125] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@4 -- vbuz1_neq_vbuc1_then_la1 + //SEG238 [129] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@4 -- vbuz1_neq_vbuc1_then_la1 lda #7 cmp _7 bne b4_from_b3 jmp b5 - //SEG228 bitmap_init::@5 + //SEG239 bitmap_init::@5 b5: - //SEG229 [126] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 -- pbuz1=pbuz1_plus_vwuc1 + //SEG240 [130] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 -- pbuz1=pbuz1_plus_vwuc1 clc lda yoffs adc #<$28*8 @@ -5137,46 +5286,46 @@ bitmap_init: { lda yoffs+1 adc #>$28*8 sta yoffs+1 - //SEG230 [127] phi from bitmap_init::@3 bitmap_init::@5 to bitmap_init::@4 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4] + //SEG241 [131] phi from bitmap_init::@3 bitmap_init::@5 to bitmap_init::@4 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4] b4_from_b3: b4_from_b5: - //SEG231 [127] phi (byte*) bitmap_init::yoffs#4 = (byte*) bitmap_init::yoffs#2 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4#0] -- register_copy + //SEG242 [131] phi (byte*) bitmap_init::yoffs#4 = (byte*) bitmap_init::yoffs#2 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4#0] -- register_copy jmp b4 - //SEG232 bitmap_init::@4 + //SEG243 bitmap_init::@4 b4: - //SEG233 [128] (byte) bitmap_init::y#1 ← ++ (byte) bitmap_init::y#2 -- vbuz1=_inc_vbuz1 + //SEG244 [132] (byte) bitmap_init::y#1 ← ++ (byte) bitmap_init::y#2 -- vbuz1=_inc_vbuz1 inc y - //SEG234 [129] if((byte) bitmap_init::y#1!=(byte) 0) goto bitmap_init::@3 -- vbuz1_neq_0_then_la1 + //SEG245 [133] if((byte) bitmap_init::y#1!=(byte) 0) goto bitmap_init::@3 -- vbuz1_neq_0_then_la1 lda y cmp #0 bne b3_from_b4 jmp breturn - //SEG235 bitmap_init::@return + //SEG246 bitmap_init::@return breturn: - //SEG236 [130] return + //SEG247 [134] return rts } -//SEG237 sin16s_gen2 +//SEG248 sin16s_gen2 // Generate signed word sinus table - with values in the range min-max. // sintab - the table to generate into // wavelength - the number of sinus points in a total sinus wavelength (the size of the table) -// sin16s_gen2(signed word* zeropage($2c) sintab) +// sin16s_gen2(signed word* zeropage($2d) sintab) sin16s_gen2: { .label wavelength = $200 .const min = -$1001 .const max = $1001 .const ampl = max-min - .label _5 = $99 - .label _6 = $9d - .label step = $8f - .label sintab = $2c - .label x = $28 - .label i = $2e - //SEG238 [132] call div32u16u - //SEG239 [199] phi from sin16s_gen2 to div32u16u [phi:sin16s_gen2->div32u16u] + .label _5 = $9a + .label _6 = $9e + .label step = $90 + .label sintab = $2d + .label x = $29 + .label i = $2f + //SEG249 [136] call div32u16u + //SEG250 [203] phi from sin16s_gen2 to div32u16u [phi:sin16s_gen2->div32u16u] div32u16u_from_sin16s_gen2: jsr div32u16u - //SEG240 [133] (dword) div32u16u::return#2 ← (dword) div32u16u::return#0 -- vduz1=vduz2 + //SEG251 [137] (dword) div32u16u::return#2 ← (dword) div32u16u::return#0 -- vduz1=vduz2 lda div32u16u.return sta div32u16u.return_2 lda div32u16u.return+1 @@ -5186,9 +5335,9 @@ sin16s_gen2: { lda div32u16u.return+3 sta div32u16u.return_2+3 jmp b2 - //SEG241 sin16s_gen2::@2 + //SEG252 sin16s_gen2::@2 b2: - //SEG242 [134] (dword) sin16s_gen2::step#0 ← (dword) div32u16u::return#2 -- vduz1=vduz2 + //SEG253 [138] (dword) sin16s_gen2::step#0 ← (dword) div32u16u::return#2 -- vduz1=vduz2 lda div32u16u.return_2 sta step lda div32u16u.return_2+1 @@ -5197,19 +5346,19 @@ sin16s_gen2: { sta step+2 lda div32u16u.return_2+3 sta step+3 - //SEG243 [135] phi from sin16s_gen2::@2 to sin16s_gen2::@1 [phi:sin16s_gen2::@2->sin16s_gen2::@1] + //SEG254 [139] phi from sin16s_gen2::@2 to sin16s_gen2::@1 [phi:sin16s_gen2::@2->sin16s_gen2::@1] b1_from_b2: - //SEG244 [135] phi (word) sin16s_gen2::i#2 = (byte) 0 [phi:sin16s_gen2::@2->sin16s_gen2::@1#0] -- vwuz1=vbuc1 + //SEG255 [139] phi (word) sin16s_gen2::i#2 = (byte) 0 [phi:sin16s_gen2::@2->sin16s_gen2::@1#0] -- vwuz1=vbuc1 lda #0 sta i lda #0 sta i+1 - //SEG245 [135] phi (signed word*) sin16s_gen2::sintab#2 = (const signed word[$200]) SINUS#0 [phi:sin16s_gen2::@2->sin16s_gen2::@1#1] -- pwsz1=pwsc1 + //SEG256 [139] phi (signed word*) sin16s_gen2::sintab#2 = (const signed word[$200]) SINUS#0 [phi:sin16s_gen2::@2->sin16s_gen2::@1#1] -- pwsz1=pwsc1 lda #SINUS sta sintab+1 - //SEG246 [135] phi (dword) sin16s_gen2::x#2 = (byte) 0 [phi:sin16s_gen2::@2->sin16s_gen2::@1#2] -- vduz1=vbuc1 + //SEG257 [139] phi (dword) sin16s_gen2::x#2 = (byte) 0 [phi:sin16s_gen2::@2->sin16s_gen2::@1#2] -- vduz1=vbuc1 lda #0 sta x lda #0 @@ -5218,15 +5367,15 @@ sin16s_gen2: { sta x+3 jmp b1 // u[4.28] - //SEG247 [135] phi from sin16s_gen2::@4 to sin16s_gen2::@1 [phi:sin16s_gen2::@4->sin16s_gen2::@1] + //SEG258 [139] phi from sin16s_gen2::@4 to sin16s_gen2::@1 [phi:sin16s_gen2::@4->sin16s_gen2::@1] b1_from_b4: - //SEG248 [135] phi (word) sin16s_gen2::i#2 = (word) sin16s_gen2::i#1 [phi:sin16s_gen2::@4->sin16s_gen2::@1#0] -- register_copy - //SEG249 [135] phi (signed word*) sin16s_gen2::sintab#2 = (signed word*) sin16s_gen2::sintab#0 [phi:sin16s_gen2::@4->sin16s_gen2::@1#1] -- register_copy - //SEG250 [135] phi (dword) sin16s_gen2::x#2 = (dword) sin16s_gen2::x#1 [phi:sin16s_gen2::@4->sin16s_gen2::@1#2] -- register_copy + //SEG259 [139] phi (word) sin16s_gen2::i#2 = (word) sin16s_gen2::i#1 [phi:sin16s_gen2::@4->sin16s_gen2::@1#0] -- register_copy + //SEG260 [139] phi (signed word*) sin16s_gen2::sintab#2 = (signed word*) sin16s_gen2::sintab#0 [phi:sin16s_gen2::@4->sin16s_gen2::@1#1] -- register_copy + //SEG261 [139] phi (dword) sin16s_gen2::x#2 = (dword) sin16s_gen2::x#1 [phi:sin16s_gen2::@4->sin16s_gen2::@1#2] -- register_copy jmp b1 - //SEG251 sin16s_gen2::@1 + //SEG262 sin16s_gen2::@1 b1: - //SEG252 [136] (dword) sin16s::x#0 ← (dword) sin16s_gen2::x#2 -- vduz1=vduz2 + //SEG263 [140] (dword) sin16s::x#0 ← (dword) sin16s_gen2::x#2 -- vduz1=vduz2 lda x sta sin16s.x lda x+1 @@ -5235,32 +5384,32 @@ sin16s_gen2: { sta sin16s.x+2 lda x+3 sta sin16s.x+3 - //SEG253 [137] call sin16s + //SEG264 [141] call sin16s jsr sin16s - //SEG254 [138] (signed word) sin16s::return#0 ← (signed word) sin16s::return#1 -- vwsz1=vwsz2 + //SEG265 [142] (signed word) sin16s::return#0 ← (signed word) sin16s::return#1 -- vwsz1=vwsz2 lda sin16s.return_1 sta sin16s.return lda sin16s.return_1+1 sta sin16s.return+1 jmp b3 - //SEG255 sin16s_gen2::@3 + //SEG266 sin16s_gen2::@3 b3: - //SEG256 [139] (signed word) mul16s::a#0 ← (signed word) sin16s::return#0 -- vwsz1=vwsz2 + //SEG267 [143] (signed word) mul16s::a#0 ← (signed word) sin16s::return#0 -- vwsz1=vwsz2 lda sin16s.return sta mul16s.a lda sin16s.return+1 sta mul16s.a+1 - //SEG257 [140] call mul16s - //SEG258 [58] phi from sin16s_gen2::@3 to mul16s [phi:sin16s_gen2::@3->mul16s] + //SEG268 [144] call mul16s + //SEG269 [62] phi from sin16s_gen2::@3 to mul16s [phi:sin16s_gen2::@3->mul16s] mul16s_from_b3: - //SEG259 [58] phi (signed word) mul16s::b#3 = (const signed word) sin16s_gen2::ampl#0 [phi:sin16s_gen2::@3->mul16s#0] -- vwsz1=vwsc1 + //SEG270 [62] phi (signed word) mul16s::b#3 = (const signed word) sin16s_gen2::ampl#0 [phi:sin16s_gen2::@3->mul16s#0] -- vwsz1=vwsc1 lda #ampl sta mul16s.b+1 - //SEG260 [58] phi (signed word) mul16s::a#3 = (signed word) mul16s::a#0 [phi:sin16s_gen2::@3->mul16s#1] -- register_copy + //SEG271 [62] phi (signed word) mul16s::a#3 = (signed word) mul16s::a#0 [phi:sin16s_gen2::@3->mul16s#1] -- register_copy jsr mul16s - //SEG261 [141] (signed dword) mul16s::return#2 ← (signed dword) mul16s::return#0 -- vdsz1=vdsz2 + //SEG272 [145] (signed dword) mul16s::return#2 ← (signed dword) mul16s::return#0 -- vdsz1=vdsz2 lda mul16s.return sta mul16s.return_2 lda mul16s.return+1 @@ -5270,9 +5419,9 @@ sin16s_gen2: { lda mul16s.return+3 sta mul16s.return_2+3 jmp b4 - //SEG262 sin16s_gen2::@4 + //SEG273 sin16s_gen2::@4 b4: - //SEG263 [142] (signed dword~) sin16s_gen2::$5 ← (signed dword) mul16s::return#2 -- vdsz1=vdsz2 + //SEG274 [146] (signed dword~) sin16s_gen2::$5 ← (signed dword) mul16s::return#2 -- vdsz1=vdsz2 lda mul16s.return_2 sta _5 lda mul16s.return_2+1 @@ -5281,19 +5430,19 @@ sin16s_gen2: { sta _5+2 lda mul16s.return_2+3 sta _5+3 - //SEG264 [143] (word~) sin16s_gen2::$6 ← > (signed dword~) sin16s_gen2::$5 -- vwuz1=_hi_vdsz2 + //SEG275 [147] (word~) sin16s_gen2::$6 ← > (signed dword~) sin16s_gen2::$5 -- vwuz1=_hi_vdsz2 lda _5+2 sta _6 lda _5+3 sta _6+1 - //SEG265 [144] *((signed word*) sin16s_gen2::sintab#2) ← (signed word)(word~) sin16s_gen2::$6 -- _deref_pwsz1=vwsz2 + //SEG276 [148] *((signed word*) sin16s_gen2::sintab#2) ← (signed word)(word~) sin16s_gen2::$6 -- _deref_pwsz1=vwsz2 ldy #0 lda _6 sta (sintab),y iny lda _6+1 sta (sintab),y - //SEG266 [145] (signed word*) sin16s_gen2::sintab#0 ← (signed word*) sin16s_gen2::sintab#2 + (const byte) SIZEOF_SIGNED_WORD -- pwsz1=pwsz1_plus_vbuc1 + //SEG277 [149] (signed word*) sin16s_gen2::sintab#0 ← (signed word*) sin16s_gen2::sintab#2 + (const byte) SIZEOF_SIGNED_WORD -- pwsz1=pwsz1_plus_vbuc1 lda #SIZEOF_SIGNED_WORD clc adc sintab @@ -5301,7 +5450,7 @@ sin16s_gen2: { bcc !+ inc sintab+1 !: - //SEG267 [146] (dword) sin16s_gen2::x#1 ← (dword) sin16s_gen2::x#2 + (dword) sin16s_gen2::step#0 -- vduz1=vduz1_plus_vduz2 + //SEG278 [150] (dword) sin16s_gen2::x#1 ← (dword) sin16s_gen2::x#2 + (dword) sin16s_gen2::step#0 -- vduz1=vduz1_plus_vduz2 lda x clc adc step @@ -5315,12 +5464,12 @@ sin16s_gen2: { lda x+3 adc step+3 sta x+3 - //SEG268 [147] (word) sin16s_gen2::i#1 ← ++ (word) sin16s_gen2::i#2 -- vwuz1=_inc_vwuz1 + //SEG279 [151] (word) sin16s_gen2::i#1 ← ++ (word) sin16s_gen2::i#2 -- vwuz1=_inc_vwuz1 inc i bne !+ inc i+1 !: - //SEG269 [148] if((word) sin16s_gen2::i#1<(const word) sin16s_gen2::wavelength#0) goto sin16s_gen2::@1 -- vwuz1_lt_vwuc1_then_la1 + //SEG280 [152] if((word) sin16s_gen2::i#1<(const word) sin16s_gen2::wavelength#0) goto sin16s_gen2::@1 -- vwuz1_lt_vwuc1_then_la1 lda i+1 cmp #>wavelength bcc b1_from_b4 @@ -5330,34 +5479,34 @@ sin16s_gen2: { bcc b1_from_b4 !: jmp breturn - //SEG270 sin16s_gen2::@return + //SEG281 sin16s_gen2::@return breturn: - //SEG271 [149] return + //SEG282 [153] return rts } -//SEG272 sin16s +//SEG283 sin16s // Calculate signed word sinus sin(x) // x: unsigned dword input u[4.28] in the interval $00000000 - PI2_u4f28 // result: signed word sin(x) s[0.15] - using the full range -$7fff - $7fff -// sin16s(dword zeropage($31) x) +// sin16s(dword zeropage($32) x) sin16s: { - .label _4 = $9f - .label x = $31 - .label return = $93 - .label x1 = $a3 - .label x2 = $a7 - .label x3 = $ab - .label x3_6 = $af - .label usinx = $b1 - .label x4 = $b5 - .label x5 = $b9 - .label x5_128 = $bb - .label usinx_1 = $bd - .label return_1 = $35 - .label sinx = $35 - .label isUpper = $30 - .label return_5 = $35 - //SEG273 [150] if((dword) sin16s::x#0<(const dword) PI_u4f28#0) goto sin16s::@1 -- vduz1_lt_vduc1_then_la1 + .label _4 = $a0 + .label x = $32 + .label return = $94 + .label x1 = $a4 + .label x2 = $a8 + .label x3 = $ac + .label x3_6 = $b0 + .label usinx = $b2 + .label x4 = $b6 + .label x5 = $ba + .label x5_128 = $bc + .label usinx_1 = $be + .label return_1 = $36 + .label sinx = $36 + .label isUpper = $31 + .label return_5 = $36 + //SEG284 [154] if((dword) sin16s::x#0<(const dword) PI_u4f28#0) goto sin16s::@1 -- vduz1_lt_vduc1_then_la1 lda x+3 cmp #>PI_u4f28>>$10 bcc b1_from_sin16s @@ -5375,9 +5524,9 @@ sin16s: { bcc b1_from_sin16s !: jmp b4 - //SEG274 sin16s::@4 + //SEG285 sin16s::@4 b4: - //SEG275 [151] (dword) sin16s::x#1 ← (dword) sin16s::x#0 - (const dword) PI_u4f28#0 -- vduz1=vduz1_minus_vduc1 + //SEG286 [155] (dword) sin16s::x#1 ← (dword) sin16s::x#0 - (const dword) PI_u4f28#0 -- vduz1=vduz1_minus_vduc1 lda x sec sbc #PI_u4f28>>$10 sta x+3 - //SEG276 [152] phi from sin16s::@4 to sin16s::@1 [phi:sin16s::@4->sin16s::@1] + //SEG287 [156] phi from sin16s::@4 to sin16s::@1 [phi:sin16s::@4->sin16s::@1] b1_from_b4: - //SEG277 [152] phi (byte) sin16s::isUpper#2 = (byte) 1 [phi:sin16s::@4->sin16s::@1#0] -- vbuz1=vbuc1 + //SEG288 [156] phi (byte) sin16s::isUpper#2 = (byte) 1 [phi:sin16s::@4->sin16s::@1#0] -- vbuz1=vbuc1 lda #1 sta isUpper - //SEG278 [152] phi (dword) sin16s::x#4 = (dword) sin16s::x#1 [phi:sin16s::@4->sin16s::@1#1] -- register_copy + //SEG289 [156] phi (dword) sin16s::x#4 = (dword) sin16s::x#1 [phi:sin16s::@4->sin16s::@1#1] -- register_copy jmp b1 - //SEG279 [152] phi from sin16s to sin16s::@1 [phi:sin16s->sin16s::@1] + //SEG290 [156] phi from sin16s to sin16s::@1 [phi:sin16s->sin16s::@1] b1_from_sin16s: - //SEG280 [152] phi (byte) sin16s::isUpper#2 = (byte) 0 [phi:sin16s->sin16s::@1#0] -- vbuz1=vbuc1 + //SEG291 [156] phi (byte) sin16s::isUpper#2 = (byte) 0 [phi:sin16s->sin16s::@1#0] -- vbuz1=vbuc1 lda #0 sta isUpper - //SEG281 [152] phi (dword) sin16s::x#4 = (dword) sin16s::x#0 [phi:sin16s->sin16s::@1#1] -- register_copy + //SEG292 [156] phi (dword) sin16s::x#4 = (dword) sin16s::x#0 [phi:sin16s->sin16s::@1#1] -- register_copy jmp b1 - //SEG282 sin16s::@1 + //SEG293 sin16s::@1 b1: - //SEG283 [153] if((dword) sin16s::x#4<(const dword) PI_HALF_u4f28#0) goto sin16s::@2 -- vduz1_lt_vduc1_then_la1 + //SEG294 [157] if((dword) sin16s::x#4<(const dword) PI_HALF_u4f28#0) goto sin16s::@2 -- vduz1_lt_vduc1_then_la1 lda x+3 cmp #>PI_HALF_u4f28>>$10 bcc b2_from_b1 @@ -5425,9 +5574,9 @@ sin16s: { bcc b2_from_b1 !: jmp b5 - //SEG284 sin16s::@5 + //SEG295 sin16s::@5 b5: - //SEG285 [154] (dword) sin16s::x#2 ← (const dword) PI_u4f28#0 - (dword) sin16s::x#4 -- vduz1=vduc1_minus_vduz1 + //SEG296 [158] (dword) sin16s::x#2 ← (const dword) PI_u4f28#0 - (dword) sin16s::x#4 -- vduz1=vduc1_minus_vduz1 lda #PI_u4f28>>$10 sbc x+3 sta x+3 - //SEG286 [155] phi from sin16s::@1 sin16s::@5 to sin16s::@2 [phi:sin16s::@1/sin16s::@5->sin16s::@2] + //SEG297 [159] phi from sin16s::@1 sin16s::@5 to sin16s::@2 [phi:sin16s::@1/sin16s::@5->sin16s::@2] b2_from_b1: b2_from_b5: - //SEG287 [155] phi (dword) sin16s::x#6 = (dword) sin16s::x#4 [phi:sin16s::@1/sin16s::@5->sin16s::@2#0] -- register_copy + //SEG298 [159] phi (dword) sin16s::x#6 = (dword) sin16s::x#4 [phi:sin16s::@1/sin16s::@5->sin16s::@2#0] -- register_copy jmp b2 - //SEG288 sin16s::@2 + //SEG299 sin16s::@2 b2: - //SEG289 [156] (dword~) sin16s::$4 ← (dword) sin16s::x#6 << (byte) 3 -- vduz1=vduz2_rol_3 + //SEG300 [160] (dword~) sin16s::$4 ← (dword) sin16s::x#6 << (byte) 3 -- vduz1=vduz2_rol_3 lda x sta _4 lda x+1 @@ -5465,107 +5614,107 @@ sin16s: { rol _4+3 dey bne !- - //SEG290 [157] (word) sin16s::x1#0 ← > (dword~) sin16s::$4 -- vwuz1=_hi_vduz2 + //SEG301 [161] (word) sin16s::x1#0 ← > (dword~) sin16s::$4 -- vwuz1=_hi_vduz2 lda _4+2 sta x1 lda _4+3 sta x1+1 - //SEG291 [158] (word) mulu16_sel::v1#0 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 + //SEG302 [162] (word) mulu16_sel::v1#0 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 lda x1 sta mulu16_sel.v1 lda x1+1 sta mulu16_sel.v1+1 - //SEG292 [159] (word) mulu16_sel::v2#0 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 + //SEG303 [163] (word) mulu16_sel::v2#0 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 lda x1 sta mulu16_sel.v2 lda x1+1 sta mulu16_sel.v2+1 - //SEG293 [160] call mulu16_sel - //SEG294 [190] phi from sin16s::@2 to mulu16_sel [phi:sin16s::@2->mulu16_sel] + //SEG304 [164] call mulu16_sel + //SEG305 [194] phi from sin16s::@2 to mulu16_sel [phi:sin16s::@2->mulu16_sel] mulu16_sel_from_b2: - //SEG295 [190] phi (byte) mulu16_sel::select#5 = (byte) 0 [phi:sin16s::@2->mulu16_sel#0] -- vbuz1=vbuc1 + //SEG306 [194] phi (byte) mulu16_sel::select#5 = (byte) 0 [phi:sin16s::@2->mulu16_sel#0] -- vbuz1=vbuc1 lda #0 sta mulu16_sel.select - //SEG296 [190] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#0 [phi:sin16s::@2->mulu16_sel#1] -- register_copy - //SEG297 [190] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#0 [phi:sin16s::@2->mulu16_sel#2] -- register_copy + //SEG307 [194] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#0 [phi:sin16s::@2->mulu16_sel#1] -- register_copy + //SEG308 [194] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#0 [phi:sin16s::@2->mulu16_sel#2] -- register_copy jsr mulu16_sel - //SEG298 [161] (word) mulu16_sel::return#0 ← (word) mulu16_sel::return#12 -- vwuz1=vwuz2 + //SEG309 [165] (word) mulu16_sel::return#0 ← (word) mulu16_sel::return#12 -- vwuz1=vwuz2 lda mulu16_sel.return_12 sta mulu16_sel.return lda mulu16_sel.return_12+1 sta mulu16_sel.return+1 jmp b7 - //SEG299 sin16s::@7 + //SEG310 sin16s::@7 b7: - //SEG300 [162] (word) sin16s::x2#0 ← (word) mulu16_sel::return#0 -- vwuz1=vwuz2 + //SEG311 [166] (word) sin16s::x2#0 ← (word) mulu16_sel::return#0 -- vwuz1=vwuz2 lda mulu16_sel.return sta x2 lda mulu16_sel.return+1 sta x2+1 - //SEG301 [163] (word) mulu16_sel::v1#1 ← (word) sin16s::x2#0 -- vwuz1=vwuz2 + //SEG312 [167] (word) mulu16_sel::v1#1 ← (word) sin16s::x2#0 -- vwuz1=vwuz2 lda x2 sta mulu16_sel.v1 lda x2+1 sta mulu16_sel.v1+1 - //SEG302 [164] (word) mulu16_sel::v2#1 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 + //SEG313 [168] (word) mulu16_sel::v2#1 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 lda x1 sta mulu16_sel.v2 lda x1+1 sta mulu16_sel.v2+1 - //SEG303 [165] call mulu16_sel - //SEG304 [190] phi from sin16s::@7 to mulu16_sel [phi:sin16s::@7->mulu16_sel] + //SEG314 [169] call mulu16_sel + //SEG315 [194] phi from sin16s::@7 to mulu16_sel [phi:sin16s::@7->mulu16_sel] mulu16_sel_from_b7: - //SEG305 [190] phi (byte) mulu16_sel::select#5 = (byte) 1 [phi:sin16s::@7->mulu16_sel#0] -- vbuz1=vbuc1 + //SEG316 [194] phi (byte) mulu16_sel::select#5 = (byte) 1 [phi:sin16s::@7->mulu16_sel#0] -- vbuz1=vbuc1 lda #1 sta mulu16_sel.select - //SEG306 [190] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#1 [phi:sin16s::@7->mulu16_sel#1] -- register_copy - //SEG307 [190] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#1 [phi:sin16s::@7->mulu16_sel#2] -- register_copy + //SEG317 [194] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#1 [phi:sin16s::@7->mulu16_sel#1] -- register_copy + //SEG318 [194] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#1 [phi:sin16s::@7->mulu16_sel#2] -- register_copy jsr mulu16_sel - //SEG308 [166] (word) mulu16_sel::return#1 ← (word) mulu16_sel::return#12 -- vwuz1=vwuz2 + //SEG319 [170] (word) mulu16_sel::return#1 ← (word) mulu16_sel::return#12 -- vwuz1=vwuz2 lda mulu16_sel.return_12 sta mulu16_sel.return_1 lda mulu16_sel.return_12+1 sta mulu16_sel.return_1+1 jmp b8 - //SEG309 sin16s::@8 + //SEG320 sin16s::@8 b8: - //SEG310 [167] (word) sin16s::x3#0 ← (word) mulu16_sel::return#1 -- vwuz1=vwuz2 + //SEG321 [171] (word) sin16s::x3#0 ← (word) mulu16_sel::return#1 -- vwuz1=vwuz2 lda mulu16_sel.return_1 sta x3 lda mulu16_sel.return_1+1 sta x3+1 - //SEG311 [168] (word) mulu16_sel::v1#2 ← (word) sin16s::x3#0 -- vwuz1=vwuz2 + //SEG322 [172] (word) mulu16_sel::v1#2 ← (word) sin16s::x3#0 -- vwuz1=vwuz2 lda x3 sta mulu16_sel.v1 lda x3+1 sta mulu16_sel.v1+1 - //SEG312 [169] call mulu16_sel - //SEG313 [190] phi from sin16s::@8 to mulu16_sel [phi:sin16s::@8->mulu16_sel] + //SEG323 [173] call mulu16_sel + //SEG324 [194] phi from sin16s::@8 to mulu16_sel [phi:sin16s::@8->mulu16_sel] mulu16_sel_from_b8: - //SEG314 [190] phi (byte) mulu16_sel::select#5 = (byte) 1 [phi:sin16s::@8->mulu16_sel#0] -- vbuz1=vbuc1 + //SEG325 [194] phi (byte) mulu16_sel::select#5 = (byte) 1 [phi:sin16s::@8->mulu16_sel#0] -- vbuz1=vbuc1 lda #1 sta mulu16_sel.select - //SEG315 [190] phi (word) mulu16_sel::v2#5 = (word)(number) $10000/(number) 6 [phi:sin16s::@8->mulu16_sel#1] -- vwuz1=vwuc1 + //SEG326 [194] phi (word) mulu16_sel::v2#5 = (word)(number) $10000/(number) 6 [phi:sin16s::@8->mulu16_sel#1] -- vwuz1=vwuc1 lda #<$10000/6 sta mulu16_sel.v2 lda #>$10000/6 sta mulu16_sel.v2+1 - //SEG316 [190] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#2 [phi:sin16s::@8->mulu16_sel#2] -- register_copy + //SEG327 [194] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#2 [phi:sin16s::@8->mulu16_sel#2] -- register_copy jsr mulu16_sel - //SEG317 [170] (word) mulu16_sel::return#2 ← (word) mulu16_sel::return#12 -- vwuz1=vwuz2 + //SEG328 [174] (word) mulu16_sel::return#2 ← (word) mulu16_sel::return#12 -- vwuz1=vwuz2 lda mulu16_sel.return_12 sta mulu16_sel.return_2 lda mulu16_sel.return_12+1 sta mulu16_sel.return_2+1 jmp b9 - //SEG318 sin16s::@9 + //SEG329 sin16s::@9 b9: - //SEG319 [171] (word) sin16s::x3_6#0 ← (word) mulu16_sel::return#2 -- vwuz1=vwuz2 + //SEG330 [175] (word) sin16s::x3_6#0 ← (word) mulu16_sel::return#2 -- vwuz1=vwuz2 lda mulu16_sel.return_2 sta x3_6 lda mulu16_sel.return_2+1 sta x3_6+1 - //SEG320 [172] (word) sin16s::usinx#0 ← (word) sin16s::x1#0 - (word) sin16s::x3_6#0 -- vwuz1=vwuz2_minus_vwuz3 + //SEG331 [176] (word) sin16s::usinx#0 ← (word) sin16s::x1#0 - (word) sin16s::x3_6#0 -- vwuz1=vwuz2_minus_vwuz3 lda x1 sec sbc x3_6 @@ -5573,71 +5722,71 @@ sin16s: { lda x1+1 sbc x3_6+1 sta usinx+1 - //SEG321 [173] (word) mulu16_sel::v1#3 ← (word) sin16s::x3#0 -- vwuz1=vwuz2 + //SEG332 [177] (word) mulu16_sel::v1#3 ← (word) sin16s::x3#0 -- vwuz1=vwuz2 lda x3 sta mulu16_sel.v1 lda x3+1 sta mulu16_sel.v1+1 - //SEG322 [174] (word) mulu16_sel::v2#3 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 + //SEG333 [178] (word) mulu16_sel::v2#3 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 lda x1 sta mulu16_sel.v2 lda x1+1 sta mulu16_sel.v2+1 - //SEG323 [175] call mulu16_sel - //SEG324 [190] phi from sin16s::@9 to mulu16_sel [phi:sin16s::@9->mulu16_sel] + //SEG334 [179] call mulu16_sel + //SEG335 [194] phi from sin16s::@9 to mulu16_sel [phi:sin16s::@9->mulu16_sel] mulu16_sel_from_b9: - //SEG325 [190] phi (byte) mulu16_sel::select#5 = (byte) 0 [phi:sin16s::@9->mulu16_sel#0] -- vbuz1=vbuc1 + //SEG336 [194] phi (byte) mulu16_sel::select#5 = (byte) 0 [phi:sin16s::@9->mulu16_sel#0] -- vbuz1=vbuc1 lda #0 sta mulu16_sel.select - //SEG326 [190] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#3 [phi:sin16s::@9->mulu16_sel#1] -- register_copy - //SEG327 [190] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#3 [phi:sin16s::@9->mulu16_sel#2] -- register_copy + //SEG337 [194] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#3 [phi:sin16s::@9->mulu16_sel#1] -- register_copy + //SEG338 [194] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#3 [phi:sin16s::@9->mulu16_sel#2] -- register_copy jsr mulu16_sel - //SEG328 [176] (word) mulu16_sel::return#10 ← (word) mulu16_sel::return#12 -- vwuz1=vwuz2 + //SEG339 [180] (word) mulu16_sel::return#10 ← (word) mulu16_sel::return#12 -- vwuz1=vwuz2 lda mulu16_sel.return_12 sta mulu16_sel.return_10 lda mulu16_sel.return_12+1 sta mulu16_sel.return_10+1 jmp b10 - //SEG329 sin16s::@10 + //SEG340 sin16s::@10 b10: - //SEG330 [177] (word) sin16s::x4#0 ← (word) mulu16_sel::return#10 -- vwuz1=vwuz2 + //SEG341 [181] (word) sin16s::x4#0 ← (word) mulu16_sel::return#10 -- vwuz1=vwuz2 lda mulu16_sel.return_10 sta x4 lda mulu16_sel.return_10+1 sta x4+1 - //SEG331 [178] (word) mulu16_sel::v1#4 ← (word) sin16s::x4#0 -- vwuz1=vwuz2 + //SEG342 [182] (word) mulu16_sel::v1#4 ← (word) sin16s::x4#0 -- vwuz1=vwuz2 lda x4 sta mulu16_sel.v1 lda x4+1 sta mulu16_sel.v1+1 - //SEG332 [179] (word) mulu16_sel::v2#4 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 + //SEG343 [183] (word) mulu16_sel::v2#4 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 lda x1 sta mulu16_sel.v2 lda x1+1 sta mulu16_sel.v2+1 - //SEG333 [180] call mulu16_sel - //SEG334 [190] phi from sin16s::@10 to mulu16_sel [phi:sin16s::@10->mulu16_sel] + //SEG344 [184] call mulu16_sel + //SEG345 [194] phi from sin16s::@10 to mulu16_sel [phi:sin16s::@10->mulu16_sel] mulu16_sel_from_b10: - //SEG335 [190] phi (byte) mulu16_sel::select#5 = (byte) 0 [phi:sin16s::@10->mulu16_sel#0] -- vbuz1=vbuc1 + //SEG346 [194] phi (byte) mulu16_sel::select#5 = (byte) 0 [phi:sin16s::@10->mulu16_sel#0] -- vbuz1=vbuc1 lda #0 sta mulu16_sel.select - //SEG336 [190] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#4 [phi:sin16s::@10->mulu16_sel#1] -- register_copy - //SEG337 [190] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#4 [phi:sin16s::@10->mulu16_sel#2] -- register_copy + //SEG347 [194] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#4 [phi:sin16s::@10->mulu16_sel#1] -- register_copy + //SEG348 [194] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#4 [phi:sin16s::@10->mulu16_sel#2] -- register_copy jsr mulu16_sel - //SEG338 [181] (word) mulu16_sel::return#11 ← (word) mulu16_sel::return#12 -- vwuz1=vwuz2 + //SEG349 [185] (word) mulu16_sel::return#11 ← (word) mulu16_sel::return#12 -- vwuz1=vwuz2 lda mulu16_sel.return_12 sta mulu16_sel.return_11 lda mulu16_sel.return_12+1 sta mulu16_sel.return_11+1 jmp b11 - //SEG339 sin16s::@11 + //SEG350 sin16s::@11 b11: - //SEG340 [182] (word) sin16s::x5#0 ← (word) mulu16_sel::return#11 -- vwuz1=vwuz2 + //SEG351 [186] (word) sin16s::x5#0 ← (word) mulu16_sel::return#11 -- vwuz1=vwuz2 lda mulu16_sel.return_11 sta x5 lda mulu16_sel.return_11+1 sta x5+1 - //SEG341 [183] (word) sin16s::x5_128#0 ← (word) sin16s::x5#0 >> (byte) 4 -- vwuz1=vwuz2_ror_4 + //SEG352 [187] (word) sin16s::x5_128#0 ← (word) sin16s::x5#0 >> (byte) 4 -- vwuz1=vwuz2_ror_4 lda x5+1 lsr sta x5_128+1 @@ -5650,7 +5799,7 @@ sin16s: { ror x5_128 lsr x5_128+1 ror x5_128 - //SEG342 [184] (word) sin16s::usinx#1 ← (word) sin16s::usinx#0 + (word) sin16s::x5_128#0 -- vwuz1=vwuz2_plus_vwuz3 + //SEG353 [188] (word) sin16s::usinx#1 ← (word) sin16s::usinx#0 + (word) sin16s::x5_128#0 -- vwuz1=vwuz2_plus_vwuz3 lda usinx clc adc x5_128 @@ -5658,14 +5807,14 @@ sin16s: { lda usinx+1 adc x5_128+1 sta usinx_1+1 - //SEG343 [185] if((byte) sin16s::isUpper#2==(byte) 0) goto sin16s::@12 -- vbuz1_eq_0_then_la1 + //SEG354 [189] if((byte) sin16s::isUpper#2==(byte) 0) goto sin16s::@12 -- vbuz1_eq_0_then_la1 lda isUpper cmp #0 beq b12 jmp b6 - //SEG344 sin16s::@6 + //SEG355 sin16s::@6 b6: - //SEG345 [186] (signed word) sin16s::sinx#1 ← - (signed word)(word) sin16s::usinx#1 -- vwsz1=_neg_vwsz2 + //SEG356 [190] (signed word) sin16s::sinx#1 ← - (signed word)(word) sin16s::usinx#1 -- vwsz1=_neg_vwsz2 sec lda #0 sbc usinx_1 @@ -5673,58 +5822,58 @@ sin16s: { lda #0 sbc usinx_1+1 sta sinx+1 - //SEG346 [187] phi from sin16s::@12 sin16s::@6 to sin16s::@3 [phi:sin16s::@12/sin16s::@6->sin16s::@3] + //SEG357 [191] phi from sin16s::@12 sin16s::@6 to sin16s::@3 [phi:sin16s::@12/sin16s::@6->sin16s::@3] b3_from_b12: b3_from_b6: - //SEG347 [187] phi (signed word) sin16s::return#1 = (signed word~) sin16s::return#5 [phi:sin16s::@12/sin16s::@6->sin16s::@3#0] -- register_copy + //SEG358 [191] phi (signed word) sin16s::return#1 = (signed word~) sin16s::return#5 [phi:sin16s::@12/sin16s::@6->sin16s::@3#0] -- register_copy jmp b3 - //SEG348 sin16s::@3 + //SEG359 sin16s::@3 b3: jmp breturn - //SEG349 sin16s::@return + //SEG360 sin16s::@return breturn: - //SEG350 [188] return + //SEG361 [192] return rts - //SEG351 sin16s::@12 + //SEG362 sin16s::@12 b12: - //SEG352 [189] (signed word~) sin16s::return#5 ← (signed word)(word) sin16s::usinx#1 -- vwsz1=vwsz2 + //SEG363 [193] (signed word~) sin16s::return#5 ← (signed word)(word) sin16s::usinx#1 -- vwsz1=vwsz2 lda usinx_1 sta return_5 lda usinx_1+1 sta return_5+1 jmp b3_from_b12 } -//SEG353 mulu16_sel +//SEG364 mulu16_sel // Calculate val*val for two unsigned word values - the result is 16 selected bits of the 32-bit result. // The select parameter indicates how many of the highest bits of the 32-bit result to skip -// mulu16_sel(word zeropage($37) v1, word zeropage($39) v2, byte zeropage($3b) select) +// mulu16_sel(word zeropage($38) v1, word zeropage($3a) v2, byte zeropage($3c) select) mulu16_sel: { - .label _0 = $c3 - .label _1 = $c7 - .label v1 = $37 - .label v2 = $39 - .label return = $a5 - .label return_1 = $a9 - .label return_2 = $ad - .label return_10 = $b3 - .label return_11 = $b7 - .label select = $3b - .label return_12 = $cb - //SEG354 [191] (word) mul16u::a#2 ← (word) mulu16_sel::v1#5 -- vwuz1=vwuz2 + .label _0 = $c4 + .label _1 = $c8 + .label v1 = $38 + .label v2 = $3a + .label return = $a6 + .label return_1 = $aa + .label return_2 = $ae + .label return_10 = $b4 + .label return_11 = $b8 + .label select = $3c + .label return_12 = $cc + //SEG365 [195] (word) mul16u::a#2 ← (word) mulu16_sel::v1#5 -- vwuz1=vwuz2 lda v1 sta mul16u.a lda v1+1 sta mul16u.a+1 - //SEG355 [192] (word) mul16u::b#1 ← (word) mulu16_sel::v2#5 -- vwuz1=vwuz2 + //SEG366 [196] (word) mul16u::b#1 ← (word) mulu16_sel::v2#5 -- vwuz1=vwuz2 lda v2 sta mul16u.b lda v2+1 sta mul16u.b+1 - //SEG356 [193] call mul16u - //SEG357 [76] phi from mulu16_sel to mul16u [phi:mulu16_sel->mul16u] + //SEG367 [197] call mul16u + //SEG368 [80] phi from mulu16_sel to mul16u [phi:mulu16_sel->mul16u] mul16u_from_mulu16_sel: - //SEG358 [76] phi (word) mul16u::a#6 = (word) mul16u::a#2 [phi:mulu16_sel->mul16u#0] -- register_copy - //SEG359 [76] phi (dword) mul16u::mb#0 = (word) mul16u::b#1 [phi:mulu16_sel->mul16u#1] -- vduz1=vwuz2 + //SEG369 [80] phi (word) mul16u::a#6 = (word) mul16u::a#2 [phi:mulu16_sel->mul16u#0] -- register_copy + //SEG370 [80] phi (dword) mul16u::mb#0 = (word) mul16u::b#1 [phi:mulu16_sel->mul16u#1] -- vduz1=vwuz2 lda mul16u.b sta mul16u.mb lda mul16u.b+1 @@ -5733,7 +5882,7 @@ mulu16_sel: { sta mul16u.mb+2 sta mul16u.mb+3 jsr mul16u - //SEG360 [194] (dword) mul16u::return#3 ← (dword) mul16u::res#2 -- vduz1=vduz2 + //SEG371 [198] (dword) mul16u::return#3 ← (dword) mul16u::res#2 -- vduz1=vduz2 lda mul16u.res sta mul16u.return_3 lda mul16u.res+1 @@ -5743,9 +5892,9 @@ mulu16_sel: { lda mul16u.res+3 sta mul16u.return_3+3 jmp b1 - //SEG361 mulu16_sel::@1 + //SEG372 mulu16_sel::@1 b1: - //SEG362 [195] (dword~) mulu16_sel::$0 ← (dword) mul16u::return#3 -- vduz1=vduz2 + //SEG373 [199] (dword~) mulu16_sel::$0 ← (dword) mul16u::return#3 -- vduz1=vduz2 lda mul16u.return_3 sta _0 lda mul16u.return_3+1 @@ -5754,7 +5903,7 @@ mulu16_sel: { sta _0+2 lda mul16u.return_3+3 sta _0+3 - //SEG363 [196] (dword~) mulu16_sel::$1 ← (dword~) mulu16_sel::$0 << (byte) mulu16_sel::select#5 -- vduz1=vduz2_rol_vbuz3 + //SEG374 [200] (dword~) mulu16_sel::$1 ← (dword~) mulu16_sel::$0 << (byte) mulu16_sel::select#5 -- vduz1=vduz2_rol_vbuz3 lda _0 sta _1 lda _0+1 @@ -5773,81 +5922,81 @@ mulu16_sel: { dex bne !- !e: - //SEG364 [197] (word) mulu16_sel::return#12 ← > (dword~) mulu16_sel::$1 -- vwuz1=_hi_vduz2 + //SEG375 [201] (word) mulu16_sel::return#12 ← > (dword~) mulu16_sel::$1 -- vwuz1=_hi_vduz2 lda _1+2 sta return_12 lda _1+3 sta return_12+1 jmp breturn - //SEG365 mulu16_sel::@return + //SEG376 mulu16_sel::@return breturn: - //SEG366 [198] return + //SEG377 [202] return rts } -//SEG367 div32u16u +//SEG378 div32u16u // Divide unsigned 32-bit dword dividend with a 16-bit word divisor // The 16-bit word remainder can be found in rem16u after the division div32u16u: { - .label quotient_hi = $cf - .label quotient_lo = $d3 - .label return = $d5 - .label return_2 = $8b - //SEG368 [200] call divr16u - //SEG369 [209] phi from div32u16u to divr16u [phi:div32u16u->divr16u] + .label quotient_hi = $d0 + .label quotient_lo = $d4 + .label return = $d6 + .label return_2 = $8c + //SEG379 [204] call divr16u + //SEG380 [213] phi from div32u16u to divr16u [phi:div32u16u->divr16u] divr16u_from_div32u16u: - //SEG370 [209] phi (word) divr16u::dividend#5 = >(const dword) PI2_u4f28#0 [phi:div32u16u->divr16u#0] -- vwuz1=vwuc1 + //SEG381 [213] phi (word) divr16u::dividend#5 = >(const dword) PI2_u4f28#0 [phi:div32u16u->divr16u#0] -- vwuz1=vwuc1 lda #>$10 sta divr16u.dividend lda #>PI2_u4f28>>$10 sta divr16u.dividend+1 - //SEG371 [209] phi (word) divr16u::rem#10 = (byte) 0 [phi:div32u16u->divr16u#1] -- vwuz1=vbuc1 + //SEG382 [213] phi (word) divr16u::rem#10 = (byte) 0 [phi:div32u16u->divr16u#1] -- vwuz1=vbuc1 lda #0 sta divr16u.rem lda #0 sta divr16u.rem+1 jsr divr16u - //SEG372 [201] (word) divr16u::return#2 ← (word) divr16u::return#0 -- vwuz1=vwuz2 + //SEG383 [205] (word) divr16u::return#2 ← (word) divr16u::return#0 -- vwuz1=vwuz2 lda divr16u.return sta divr16u.return_2 lda divr16u.return+1 sta divr16u.return_2+1 jmp b1 - //SEG373 div32u16u::@1 + //SEG384 div32u16u::@1 b1: - //SEG374 [202] (word) div32u16u::quotient_hi#0 ← (word) divr16u::return#2 -- vwuz1=vwuz2 + //SEG385 [206] (word) div32u16u::quotient_hi#0 ← (word) divr16u::return#2 -- vwuz1=vwuz2 lda divr16u.return_2 sta quotient_hi lda divr16u.return_2+1 sta quotient_hi+1 - //SEG375 [203] (word) divr16u::rem#4 ← (word) rem16u#1 -- vwuz1=vwuz2 + //SEG386 [207] (word) divr16u::rem#4 ← (word) rem16u#1 -- vwuz1=vwuz2 lda rem16u sta divr16u.rem lda rem16u+1 sta divr16u.rem+1 - //SEG376 [204] call divr16u - //SEG377 [209] phi from div32u16u::@1 to divr16u [phi:div32u16u::@1->divr16u] + //SEG387 [208] call divr16u + //SEG388 [213] phi from div32u16u::@1 to divr16u [phi:div32u16u::@1->divr16u] divr16u_from_b1: - //SEG378 [209] phi (word) divr16u::dividend#5 = <(const dword) PI2_u4f28#0 [phi:div32u16u::@1->divr16u#0] -- vwuz1=vwuc1 + //SEG389 [213] phi (word) divr16u::dividend#5 = <(const dword) PI2_u4f28#0 [phi:div32u16u::@1->divr16u#0] -- vwuz1=vwuc1 lda #PI2_u4f28&$ffff sta divr16u.dividend+1 - //SEG379 [209] phi (word) divr16u::rem#10 = (word) divr16u::rem#4 [phi:div32u16u::@1->divr16u#1] -- register_copy + //SEG390 [213] phi (word) divr16u::rem#10 = (word) divr16u::rem#4 [phi:div32u16u::@1->divr16u#1] -- register_copy jsr divr16u - //SEG380 [205] (word) divr16u::return#3 ← (word) divr16u::return#0 -- vwuz1=vwuz2 + //SEG391 [209] (word) divr16u::return#3 ← (word) divr16u::return#0 -- vwuz1=vwuz2 lda divr16u.return sta divr16u.return_3 lda divr16u.return+1 sta divr16u.return_3+1 jmp b2 - //SEG381 div32u16u::@2 + //SEG392 div32u16u::@2 b2: - //SEG382 [206] (word) div32u16u::quotient_lo#0 ← (word) divr16u::return#3 -- vwuz1=vwuz2 + //SEG393 [210] (word) div32u16u::quotient_lo#0 ← (word) divr16u::return#3 -- vwuz1=vwuz2 lda divr16u.return_3 sta quotient_lo lda divr16u.return_3+1 sta quotient_lo+1 - //SEG383 [207] (dword) div32u16u::return#0 ← (word) div32u16u::quotient_hi#0 dw= (word) div32u16u::quotient_lo#0 -- vduz1=vwuz2_dword_vwuz3 + //SEG394 [211] (dword) div32u16u::return#0 ← (word) div32u16u::quotient_hi#0 dw= (word) div32u16u::quotient_lo#0 -- vduz1=vwuz2_dword_vwuz3 lda quotient_hi sta return+2 lda quotient_hi+1 @@ -5857,84 +6006,84 @@ div32u16u: { lda quotient_lo+1 sta return+1 jmp breturn - //SEG384 div32u16u::@return + //SEG395 div32u16u::@return breturn: - //SEG385 [208] return + //SEG396 [212] return rts } -//SEG386 divr16u +//SEG397 divr16u // Performs division on two 16 bit unsigned words and an initial remainder // Returns the quotient dividend/divisor. // The final remainder will be set into the global variable rem16u // Implemented using simple binary division -// divr16u(word zeropage($3e) dividend, word zeropage($3c) rem) +// divr16u(word zeropage($3f) dividend, word zeropage($3d) rem) divr16u: { - .label _1 = $d9 - .label _2 = $da - .label rem = $3c - .label dividend = $3e - .label quotient = $40 - .label i = $42 - .label return = $40 - .label return_2 = $cd - .label return_3 = $d1 - //SEG387 [210] phi from divr16u to divr16u::@1 [phi:divr16u->divr16u::@1] + .label _1 = $da + .label _2 = $db + .label rem = $3d + .label dividend = $3f + .label quotient = $41 + .label i = $43 + .label return = $41 + .label return_2 = $ce + .label return_3 = $d2 + //SEG398 [214] phi from divr16u to divr16u::@1 [phi:divr16u->divr16u::@1] b1_from_divr16u: - //SEG388 [210] phi (byte) divr16u::i#2 = (byte) 0 [phi:divr16u->divr16u::@1#0] -- vbuz1=vbuc1 + //SEG399 [214] phi (byte) divr16u::i#2 = (byte) 0 [phi:divr16u->divr16u::@1#0] -- vbuz1=vbuc1 lda #0 sta i - //SEG389 [210] phi (word) divr16u::quotient#3 = (byte) 0 [phi:divr16u->divr16u::@1#1] -- vwuz1=vbuc1 + //SEG400 [214] phi (word) divr16u::quotient#3 = (byte) 0 [phi:divr16u->divr16u::@1#1] -- vwuz1=vbuc1 lda #0 sta quotient lda #0 sta quotient+1 - //SEG390 [210] phi (word) divr16u::dividend#3 = (word) divr16u::dividend#5 [phi:divr16u->divr16u::@1#2] -- register_copy - //SEG391 [210] phi (word) divr16u::rem#5 = (word) divr16u::rem#10 [phi:divr16u->divr16u::@1#3] -- register_copy + //SEG401 [214] phi (word) divr16u::dividend#3 = (word) divr16u::dividend#5 [phi:divr16u->divr16u::@1#2] -- register_copy + //SEG402 [214] phi (word) divr16u::rem#5 = (word) divr16u::rem#10 [phi:divr16u->divr16u::@1#3] -- register_copy jmp b1 - //SEG392 [210] phi from divr16u::@3 to divr16u::@1 [phi:divr16u::@3->divr16u::@1] + //SEG403 [214] phi from divr16u::@3 to divr16u::@1 [phi:divr16u::@3->divr16u::@1] b1_from_b3: - //SEG393 [210] phi (byte) divr16u::i#2 = (byte) divr16u::i#1 [phi:divr16u::@3->divr16u::@1#0] -- register_copy - //SEG394 [210] phi (word) divr16u::quotient#3 = (word) divr16u::return#0 [phi:divr16u::@3->divr16u::@1#1] -- register_copy - //SEG395 [210] phi (word) divr16u::dividend#3 = (word) divr16u::dividend#0 [phi:divr16u::@3->divr16u::@1#2] -- register_copy - //SEG396 [210] phi (word) divr16u::rem#5 = (word) divr16u::rem#11 [phi:divr16u::@3->divr16u::@1#3] -- register_copy + //SEG404 [214] phi (byte) divr16u::i#2 = (byte) divr16u::i#1 [phi:divr16u::@3->divr16u::@1#0] -- register_copy + //SEG405 [214] phi (word) divr16u::quotient#3 = (word) divr16u::return#0 [phi:divr16u::@3->divr16u::@1#1] -- register_copy + //SEG406 [214] phi (word) divr16u::dividend#3 = (word) divr16u::dividend#0 [phi:divr16u::@3->divr16u::@1#2] -- register_copy + //SEG407 [214] phi (word) divr16u::rem#5 = (word) divr16u::rem#11 [phi:divr16u::@3->divr16u::@1#3] -- register_copy jmp b1 - //SEG397 divr16u::@1 + //SEG408 divr16u::@1 b1: - //SEG398 [211] (word) divr16u::rem#0 ← (word) divr16u::rem#5 << (byte) 1 -- vwuz1=vwuz1_rol_1 + //SEG409 [215] (word) divr16u::rem#0 ← (word) divr16u::rem#5 << (byte) 1 -- vwuz1=vwuz1_rol_1 asl rem rol rem+1 - //SEG399 [212] (byte~) divr16u::$1 ← > (word) divr16u::dividend#3 -- vbuz1=_hi_vwuz2 + //SEG410 [216] (byte~) divr16u::$1 ← > (word) divr16u::dividend#3 -- vbuz1=_hi_vwuz2 lda dividend+1 sta _1 - //SEG400 [213] (byte~) divr16u::$2 ← (byte~) divr16u::$1 & (byte) $80 -- vbuz1=vbuz2_band_vbuc1 + //SEG411 [217] (byte~) divr16u::$2 ← (byte~) divr16u::$1 & (byte) $80 -- vbuz1=vbuz2_band_vbuc1 lda #$80 and _1 sta _2 - //SEG401 [214] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 -- vbuz1_eq_0_then_la1 + //SEG412 [218] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 -- vbuz1_eq_0_then_la1 lda _2 cmp #0 beq b2_from_b1 jmp b4 - //SEG402 divr16u::@4 + //SEG413 divr16u::@4 b4: - //SEG403 [215] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 -- vwuz1=vwuz1_bor_vbuc1 + //SEG414 [219] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 -- vwuz1=vwuz1_bor_vbuc1 lda #1 ora rem sta rem - //SEG404 [216] phi from divr16u::@1 divr16u::@4 to divr16u::@2 [phi:divr16u::@1/divr16u::@4->divr16u::@2] + //SEG415 [220] phi from divr16u::@1 divr16u::@4 to divr16u::@2 [phi:divr16u::@1/divr16u::@4->divr16u::@2] b2_from_b1: b2_from_b4: - //SEG405 [216] phi (word) divr16u::rem#6 = (word) divr16u::rem#0 [phi:divr16u::@1/divr16u::@4->divr16u::@2#0] -- register_copy + //SEG416 [220] phi (word) divr16u::rem#6 = (word) divr16u::rem#0 [phi:divr16u::@1/divr16u::@4->divr16u::@2#0] -- register_copy jmp b2 - //SEG406 divr16u::@2 + //SEG417 divr16u::@2 b2: - //SEG407 [217] (word) divr16u::dividend#0 ← (word) divr16u::dividend#3 << (byte) 1 -- vwuz1=vwuz1_rol_1 + //SEG418 [221] (word) divr16u::dividend#0 ← (word) divr16u::dividend#3 << (byte) 1 -- vwuz1=vwuz1_rol_1 asl dividend rol dividend+1 - //SEG408 [218] (word) divr16u::quotient#1 ← (word) divr16u::quotient#3 << (byte) 1 -- vwuz1=vwuz1_rol_1 + //SEG419 [222] (word) divr16u::quotient#1 ← (word) divr16u::quotient#3 << (byte) 1 -- vwuz1=vwuz1_rol_1 asl quotient rol quotient+1 - //SEG409 [219] if((word) divr16u::rem#6<(const word) sin16s_gen2::wavelength#0) goto divr16u::@3 -- vwuz1_lt_vwuc1_then_la1 + //SEG420 [223] if((word) divr16u::rem#6<(const word) sin16s_gen2::wavelength#0) goto divr16u::@3 -- vwuz1_lt_vwuc1_then_la1 lda rem+1 cmp #>sin16s_gen2.wavelength bcc b3_from_b2 @@ -5944,14 +6093,14 @@ divr16u: { bcc b3_from_b2 !: jmp b5 - //SEG410 divr16u::@5 + //SEG421 divr16u::@5 b5: - //SEG411 [220] (word) divr16u::quotient#2 ← ++ (word) divr16u::quotient#1 -- vwuz1=_inc_vwuz1 + //SEG422 [224] (word) divr16u::quotient#2 ← ++ (word) divr16u::quotient#1 -- vwuz1=_inc_vwuz1 inc quotient bne !+ inc quotient+1 !: - //SEG412 [221] (word) divr16u::rem#2 ← (word) divr16u::rem#6 - (const word) sin16s_gen2::wavelength#0 -- vwuz1=vwuz1_minus_vwuc1 + //SEG423 [225] (word) divr16u::rem#2 ← (word) divr16u::rem#6 - (const word) sin16s_gen2::wavelength#0 -- vwuz1=vwuz1_minus_vwuc1 lda rem sec sbc #sin16s_gen2.wavelength sta rem+1 - //SEG413 [222] phi from divr16u::@2 divr16u::@5 to divr16u::@3 [phi:divr16u::@2/divr16u::@5->divr16u::@3] + //SEG424 [226] phi from divr16u::@2 divr16u::@5 to divr16u::@3 [phi:divr16u::@2/divr16u::@5->divr16u::@3] b3_from_b2: b3_from_b5: - //SEG414 [222] phi (word) divr16u::return#0 = (word) divr16u::quotient#1 [phi:divr16u::@2/divr16u::@5->divr16u::@3#0] -- register_copy - //SEG415 [222] phi (word) divr16u::rem#11 = (word) divr16u::rem#6 [phi:divr16u::@2/divr16u::@5->divr16u::@3#1] -- register_copy + //SEG425 [226] phi (word) divr16u::return#0 = (word) divr16u::quotient#1 [phi:divr16u::@2/divr16u::@5->divr16u::@3#0] -- register_copy + //SEG426 [226] phi (word) divr16u::rem#11 = (word) divr16u::rem#6 [phi:divr16u::@2/divr16u::@5->divr16u::@3#1] -- register_copy jmp b3 - //SEG416 divr16u::@3 + //SEG427 divr16u::@3 b3: - //SEG417 [223] (byte) divr16u::i#1 ← ++ (byte) divr16u::i#2 -- vbuz1=_inc_vbuz1 + //SEG428 [227] (byte) divr16u::i#1 ← ++ (byte) divr16u::i#2 -- vbuz1=_inc_vbuz1 inc i - //SEG418 [224] if((byte) divr16u::i#1!=(byte) $10) goto divr16u::@1 -- vbuz1_neq_vbuc1_then_la1 + //SEG429 [228] if((byte) divr16u::i#1!=(byte) $10) goto divr16u::@1 -- vbuz1_neq_vbuc1_then_la1 lda #$10 cmp i bne b1_from_b3 jmp b6 - //SEG419 divr16u::@6 + //SEG430 divr16u::@6 b6: - //SEG420 [225] (word) rem16u#1 ← (word) divr16u::rem#11 -- vwuz1=vwuz2 + //SEG431 [229] (word) rem16u#1 ← (word) divr16u::rem#11 -- vwuz1=vwuz2 lda rem sta rem16u lda rem+1 sta rem16u+1 jmp breturn - //SEG421 divr16u::@return + //SEG432 divr16u::@return breturn: - //SEG422 [226] return + //SEG433 [230] return rts } -//SEG423 irq +//SEG434 irq // Interrupt Routine counting frames irq: { - //SEG424 entry interrupt(HARDWARE_CLOBBER) + //SEG435 entry interrupt(HARDWARE_CLOBBER) sta rega+1 stx regx+1 sty regy+1 - //SEG425 [227] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 -- _deref_pbuc1=vbuc2 + //SEG436 [231] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 -- _deref_pbuc1=vbuc2 lda #WHITE sta BGCOL - //SEG426 [228] if((byte) 0==(byte) frame_cnt#0) goto irq::@1 -- vbuc1_eq_vbuz1_then_la1 + //SEG437 [232] if((byte) 0==(byte) frame_cnt#0) goto irq::@1 -- vbuc1_eq_vbuz1_then_la1 lda #0 cmp frame_cnt beq b1_from_irq jmp b2 - //SEG427 irq::@2 + //SEG438 irq::@2 b2: - //SEG428 [229] (byte) frame_cnt#1 ← ++ (byte) frame_cnt#0 -- vbuz1=_inc_vbuz1 + //SEG439 [233] (byte) frame_cnt#1 ← ++ (byte) frame_cnt#0 -- vbuz1=_inc_vbuz1 inc frame_cnt - //SEG429 [230] phi from irq irq::@2 to irq::@1 [phi:irq/irq::@2->irq::@1] + //SEG440 [234] phi from irq irq::@2 to irq::@1 [phi:irq/irq::@2->irq::@1] b1_from_irq: b1_from_b2: - //SEG430 [230] phi (byte) frame_cnt#2 = (byte) frame_cnt#0 [phi:irq/irq::@2->irq::@1#0] -- register_copy + //SEG441 [234] phi (byte) frame_cnt#2 = (byte) frame_cnt#0 [phi:irq/irq::@2->irq::@1#0] -- register_copy jmp b1 - //SEG431 irq::@1 + //SEG442 irq::@1 b1: - //SEG432 [231] *((const byte*) BGCOL#0) ← (const byte) BLACK#0 -- _deref_pbuc1=vbuc2 + //SEG443 [235] *((const byte*) BGCOL#0) ← (const byte) BLACK#0 -- _deref_pbuc1=vbuc2 lda #BLACK sta BGCOL - //SEG433 [232] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 + //SEG444 [236] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 // Acknowledge the IRQ lda #IRQ_RASTER sta IRQ_STATUS jmp breturn - //SEG434 irq::@return + //SEG445 irq::@return breturn: - //SEG435 [233] return - exit interrupt(HARDWARE_CLOBBER) + //SEG446 [237] return - exit interrupt(HARDWARE_CLOBBER) rega: lda #00 regx: @@ -6032,7 +6181,7 @@ irq: { ldy #00 rti } -//SEG436 File Data +//SEG447 File Data // Tables for the plotter - initialized by calling bitmap_init(); bitmap_plot_ylo: .fill $100, 0 bitmap_plot_yhi: .fill $100, 0 @@ -6042,501 +6191,511 @@ irq: { SINUS: .fill 2*$200, 0 REGISTER UPLIFT POTENTIAL REGISTERS -Equivalence Class zp ZP_BYTE:136 [ bitmap_init::$4 ] has ALU potential. +Equivalence Class zp ZP_BYTE:137 [ bitmap_init::$4 ] has ALU potential. Statement [1] (byte) frame_cnt#0 ← (byte) 1 [ 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::$28 ← (word) main::idx_x#3 << (byte) 1 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 main::$28 ] ( main:3 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 main::$28 ] ) always clobbers reg byte a -Statement [17] (signed word*~) main::$30 ← (const signed word[$200]) SINUS#0 + (word~) main::$28 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 main::$30 ] ( main:3 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 main::$30 ] ) always clobbers reg byte a -Statement [18] (signed word) main::cos_x#0 ← *((signed word*~) main::$30) [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 main::cos_x#0 ] ( main:3 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 main::cos_x#0 ] ) always clobbers reg byte a reg byte y -Statement [19] (signed word) mul16s::a#1 ← (signed word) main::r#10 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 main::cos_x#0 mul16s::a#1 ] ( main:3 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 main::cos_x#0 mul16s::a#1 ] ) always clobbers reg byte a -Statement [20] (signed word) mul16s::b#1 ← (signed word) main::cos_x#0 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 mul16s::a#1 mul16s::b#1 ] ( main:3 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 mul16s::a#1 mul16s::b#1 ] ) always clobbers reg byte a -Statement [22] (signed dword) mul16s::return#3 ← (signed dword) mul16s::return#0 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 mul16s::return#3 ] ( main:3 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 mul16s::return#3 ] ) always clobbers reg byte a -Statement [23] (signed dword) main::xpos#0 ← (signed dword) mul16s::return#3 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 main::xpos#0 ] ( main:3 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 main::xpos#0 ] ) always clobbers reg byte a -Statement [24] (word~) main::$9 ← > (signed dword) main::xpos#0 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 main::$9 ] ( main:3 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 main::$9 ] ) always clobbers reg byte a -Statement [25] (signed word~) main::$11 ← (signed word)(word~) main::$9 >> (signed byte) 2 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 main::$11 ] ( main:3 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 main::$11 ] ) always clobbers reg byte a -Statement [26] (signed word) bitmap_plot::x#0 ← (signed word) $a0 + (signed word~) main::$11 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 ] ( main:3 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 ] ) always clobbers reg byte a -Statement [27] (word~) main::$29 ← (word) main::idx_y#3 << (byte) 1 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 main::$29 ] ( main:3 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 main::$29 ] ) always clobbers reg byte a -Statement [28] (signed word*~) main::$31 ← (const signed word[$200]) SINUS#0 + (word~) main::$29 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 main::$31 ] ( main:3 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 main::$31 ] ) always clobbers reg byte a -Statement [29] (signed word) main::sin_y#0 ← *((signed word*~) main::$31) [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 main::sin_y#0 ] ( main:3 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 main::sin_y#0 ] ) always clobbers reg byte a reg byte y -Statement [30] (signed word) mul16s::a#2 ← (signed word) main::r#10 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 main::sin_y#0 mul16s::a#2 ] ( main:3 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 main::sin_y#0 mul16s::a#2 ] ) always clobbers reg byte a -Statement [31] (signed word) mul16s::b#2 ← (signed word) main::sin_y#0 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 mul16s::a#2 mul16s::b#2 ] ( main:3 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 mul16s::a#2 mul16s::b#2 ] ) always clobbers reg byte a -Statement [33] (signed dword) mul16s::return#4 ← (signed dword) mul16s::return#0 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 mul16s::return#4 ] ( main:3 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 mul16s::return#4 ] ) always clobbers reg byte a -Statement [34] (signed dword) main::ypos#0 ← (signed dword) mul16s::return#4 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 main::ypos#0 ] ( main:3 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 main::ypos#0 ] ) always clobbers reg byte a -Statement [35] (word~) main::$15 ← > (signed dword) main::ypos#0 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 main::$15 ] ( main:3 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 main::$15 ] ) always clobbers reg byte a -Statement [36] (signed word~) main::$17 ← (signed word)(word~) main::$15 >> (signed byte) 2 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 main::$17 ] ( main:3 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 main::$17 ] ) always clobbers reg byte a -Statement [37] (signed word~) main::$18 ← (signed byte) $64 + (signed word~) main::$17 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 main::$18 ] ( main:3 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 main::$18 ] ) always clobbers reg byte a -Statement [38] (byte) bitmap_plot::y#0 ← (byte)(word)(signed word~) main::$18 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 bitmap_plot::y#0 ] ( main:3 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 bitmap_plot::y#0 ] ) always clobbers reg byte a -Statement [40] *((const byte[$100]) plots_per_frame#0 + (byte) frame_cnt#0) ← ++ *((const byte[$100]) plots_per_frame#0 + (byte) frame_cnt#0) [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 ] ( main:3 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 ] ) always clobbers reg byte x -Statement [41] (word) main::idx_x#1 ← (word) main::idx_x#3 + (const byte) main::r_add#0 [ frame_cnt#0 main::r#10 main::idx_y#3 main::idx_x#1 ] ( main:3 [ frame_cnt#0 main::r#10 main::idx_y#3 main::idx_x#1 ] ) always clobbers reg byte a -Statement [42] if((word) main::idx_x#1<(word) $200) goto main::@13 [ frame_cnt#0 main::r#10 main::idx_y#3 main::idx_x#1 ] ( main:3 [ frame_cnt#0 main::r#10 main::idx_y#3 main::idx_x#1 ] ) always clobbers reg byte a -Statement [45] (word) main::idx_y#1 ← (word) main::idx_y#3 + (const byte) main::r_add#0 [ frame_cnt#0 main::r#10 main::idx_x#10 main::idx_y#1 ] ( main:3 [ frame_cnt#0 main::r#10 main::idx_x#10 main::idx_y#1 ] ) always clobbers reg byte a -Statement [46] if((word) main::idx_y#1<(word) $200) goto main::@14 [ frame_cnt#0 main::r#10 main::idx_x#10 main::idx_y#1 ] ( main:3 [ frame_cnt#0 main::r#10 main::idx_x#10 main::idx_y#1 ] ) always clobbers reg byte a -Statement [49] (signed word) main::r#1 ← (signed word) main::r#10 + (const byte) main::r_add#0 [ frame_cnt#0 main::idx_x#10 main::r#1 main::idx_y#10 ] ( main:3 [ frame_cnt#0 main::idx_x#10 main::r#1 main::idx_y#10 ] ) always clobbers reg byte a -Statement [50] if((signed word) main::r#1>=(signed word)(number) $200*(number) $c+(number) $100) goto main::@5 [ frame_cnt#0 main::idx_x#10 main::r#1 main::idx_y#10 ] ( main:3 [ frame_cnt#0 main::idx_x#10 main::r#1 main::idx_y#10 ] ) always clobbers reg byte a -Statement [52] (word~) bitmap_plot::$3 ← *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_plot::y#0) w= *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_plot::y#0) [ bitmap_plot::x#0 bitmap_plot::$3 ] ( main:3::bitmap_plot:39 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 bitmap_plot::$3 ] ) always clobbers reg byte a -Statement [53] (word~) bitmap_plot::$1 ← (word)(signed word) bitmap_plot::x#0 & (word) $fff8 [ bitmap_plot::x#0 bitmap_plot::$3 bitmap_plot::$1 ] ( main:3::bitmap_plot:39 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 bitmap_plot::$3 bitmap_plot::$1 ] ) always clobbers reg byte a -Statement [54] (byte*) bitmap_plot::plotter#1 ← (byte*)(word~) bitmap_plot::$3 + (word~) bitmap_plot::$1 [ bitmap_plot::x#0 bitmap_plot::plotter#1 ] ( main:3::bitmap_plot:39 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 bitmap_plot::plotter#1 ] ) always clobbers reg byte a -Statement [55] (byte~) bitmap_plot::$2 ← < (word)(signed word) bitmap_plot::x#0 [ bitmap_plot::plotter#1 bitmap_plot::$2 ] ( main:3::bitmap_plot:39 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::plotter#1 bitmap_plot::$2 ] ) always clobbers reg byte a -Statement [56] *((byte*) bitmap_plot::plotter#1) ← *((byte*) bitmap_plot::plotter#1) | *((const byte[$100]) bitmap_plot_bit#0 + (byte~) bitmap_plot::$2) [ ] ( main:3::bitmap_plot:39 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 ] ) always clobbers reg byte a reg byte y -Statement [59] (dword~) mul16u::mb#6 ← (word)(signed word) mul16s::b#3 [ mul16s::a#3 mul16s::b#3 mul16u::mb#6 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 mul16s::a#3 mul16s::b#3 mul16u::mb#6 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 mul16s::a#3 mul16s::b#3 mul16u::mb#6 ] main:3::sin16s_gen2:6::mul16s:140 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16u::mb#6 ] ) always clobbers reg byte a -Statement [60] (word~) mul16u::a#8 ← (word)(signed word) mul16s::a#3 [ mul16s::a#3 mul16s::b#3 mul16u::mb#6 mul16u::a#8 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 mul16s::a#3 mul16s::b#3 mul16u::mb#6 mul16u::a#8 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 mul16s::a#3 mul16s::b#3 mul16u::mb#6 mul16u::a#8 ] main:3::sin16s_gen2:6::mul16s:140 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16u::mb#6 mul16u::a#8 ] ) always clobbers reg byte a -Statement [62] (dword) mul16u::return#2 ← (dword) mul16u::res#2 [ mul16s::a#3 mul16s::b#3 mul16u::return#2 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 mul16s::a#3 mul16s::b#3 mul16u::return#2 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 mul16s::a#3 mul16s::b#3 mul16u::return#2 ] main:3::sin16s_gen2:6::mul16s:140 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16u::return#2 ] ) always clobbers reg byte a -Statement [63] (dword) mul16s::m#0 ← (dword) mul16u::return#2 [ mul16s::a#3 mul16s::b#3 mul16s::m#0 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 mul16s::a#3 mul16s::b#3 mul16s::m#0 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 mul16s::a#3 mul16s::b#3 mul16s::m#0 ] main:3::sin16s_gen2:6::mul16s:140 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16s::m#0 ] ) always clobbers reg byte a -Statement [64] if((signed word) mul16s::a#3>=(signed byte) 0) goto mul16s::@1 [ mul16s::a#3 mul16s::b#3 mul16s::m#0 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 mul16s::a#3 mul16s::b#3 mul16s::m#0 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 mul16s::a#3 mul16s::b#3 mul16s::m#0 ] main:3::sin16s_gen2:6::mul16s:140 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16s::m#0 ] ) always clobbers reg byte a -Statement [65] (word~) mul16s::$9 ← > (dword) mul16s::m#0 [ mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$9 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$9 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$9 ] main:3::sin16s_gen2:6::mul16s:140 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$9 ] ) always clobbers reg byte a -Statement [66] (word~) mul16s::$16 ← (word~) mul16s::$9 - (word)(signed word) mul16s::b#3 [ mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$16 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$16 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$16 ] main:3::sin16s_gen2:6::mul16s:140 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$16 ] ) always clobbers reg byte a -Statement [67] (dword) mul16s::m#1 ← (dword) mul16s::m#0 hi= (word~) mul16s::$16 [ mul16s::a#3 mul16s::b#3 mul16s::m#1 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 mul16s::a#3 mul16s::b#3 mul16s::m#1 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 mul16s::a#3 mul16s::b#3 mul16s::m#1 ] main:3::sin16s_gen2:6::mul16s:140 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16s::m#1 ] ) always clobbers reg byte a -Statement [69] if((signed word) mul16s::b#3>=(signed byte) 0) goto mul16s::@2 [ mul16s::a#3 mul16s::m#5 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 mul16s::a#3 mul16s::m#5 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 mul16s::a#3 mul16s::m#5 ] main:3::sin16s_gen2:6::mul16s:140 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::m#5 ] ) always clobbers reg byte a -Statement [70] (word~) mul16s::$13 ← > (dword) mul16s::m#5 [ mul16s::a#3 mul16s::m#5 mul16s::$13 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 mul16s::a#3 mul16s::m#5 mul16s::$13 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 mul16s::a#3 mul16s::m#5 mul16s::$13 ] main:3::sin16s_gen2:6::mul16s:140 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::m#5 mul16s::$13 ] ) always clobbers reg byte a -Statement [71] (word~) mul16s::$17 ← (word~) mul16s::$13 - (word)(signed word) mul16s::a#3 [ mul16s::m#5 mul16s::$17 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 mul16s::m#5 mul16s::$17 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 mul16s::m#5 mul16s::$17 ] main:3::sin16s_gen2:6::mul16s:140 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::m#5 mul16s::$17 ] ) always clobbers reg byte a -Statement [72] (dword) mul16s::m#2 ← (dword) mul16s::m#5 hi= (word~) mul16s::$17 [ mul16s::m#2 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 mul16s::m#2 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 mul16s::m#2 ] main:3::sin16s_gen2:6::mul16s:140 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::m#2 ] ) always clobbers reg byte a -Statement [74] (signed dword) mul16s::return#0 ← (signed dword)(dword) mul16s::m#4 [ mul16s::return#0 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 mul16s::return#0 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 mul16s::return#0 ] main:3::sin16s_gen2:6::mul16s:140 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::return#0 ] ) always clobbers reg byte a -Statement [78] if((word) mul16u::a#3!=(byte) 0) goto mul16u::@2 [ mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] ( main:3::mul16s:21::mul16u:61 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 mul16s::a#3 mul16s::b#3 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::mul16s:32::mul16u:61 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 mul16s::a#3 mul16s::b#3 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::sin16s_gen2:6::mul16s:140::mul16u:61 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:160::mul16u:193 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:165::mul16u:193 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:169::mul16u:193 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:175::mul16u:193 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:180::mul16u:193 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] ) always clobbers reg byte a -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:48 [ sin16s::isUpper#2 ] -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:59 [ mulu16_sel::select#5 ] -Statement [80] (byte~) mul16u::$1 ← (word) mul16u::a#3 & (byte) 1 [ mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] ( main:3::mul16s:21::mul16u:61 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 mul16s::a#3 mul16s::b#3 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::mul16s:32::mul16u:61 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 mul16s::a#3 mul16s::b#3 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::sin16s_gen2:6::mul16s:140::mul16u:61 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:160::mul16u:193 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:165::mul16u:193 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:169::mul16u:193 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:175::mul16u:193 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:180::mul16u:193 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] ) always clobbers reg byte a -Statement [82] (dword) mul16u::res#1 ← (dword) mul16u::res#2 + (dword) mul16u::mb#2 [ mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] ( main:3::mul16s:21::mul16u:61 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 mul16s::a#3 mul16s::b#3 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::mul16s:32::mul16u:61 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 mul16s::a#3 mul16s::b#3 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::sin16s_gen2:6::mul16s:140::mul16u:61 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:160::mul16u:193 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:165::mul16u:193 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:169::mul16u:193 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:175::mul16u:193 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:180::mul16u:193 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] ) always clobbers reg byte a -Statement [87] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 [ ] ( main:3::init_irq:14 [ frame_cnt#0 ] ) always clobbers reg byte a -Statement [88] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 [ ] ( main:3::init_irq:14 [ frame_cnt#0 ] ) always clobbers reg byte a -Statement [89] *((const byte*) CIA1_INTERRUPT#0) ← (const byte) CIA_INTERRUPT_CLEAR#0 [ ] ( main:3::init_irq:14 [ frame_cnt#0 ] ) always clobbers reg byte a -Statement [90] *((const byte*) VIC_CONTROL#0) ← *((const byte*) VIC_CONTROL#0) | (byte) $80 [ ] ( main:3::init_irq:14 [ frame_cnt#0 ] ) always clobbers reg byte a -Statement [91] *((const byte*) RASTER#0) ← (byte) 0 [ ] ( main:3::init_irq:14 [ frame_cnt#0 ] ) always clobbers reg byte a -Statement [92] *((const byte*) IRQ_ENABLE#0) ← (const byte) IRQ_RASTER#0 [ ] ( main:3::init_irq:14 [ frame_cnt#0 ] ) always clobbers reg byte a -Statement [93] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_CLOBBER)(void()) irq() [ ] ( main:3::init_irq:14 [ frame_cnt#0 ] ) always clobbers reg byte a -Statement [102] (byte*) memset::end#0 ← (byte*)(void*) memset::str#2 + (word) memset::num#2 [ memset::str#2 memset::c#3 memset::end#0 ] ( main:3::bitmap_clear:10::memset:97 [ frame_cnt#0 memset::str#2 memset::c#3 memset::end#0 ] main:3::bitmap_clear:10::memset:99 [ frame_cnt#0 memset::str#2 memset::c#3 memset::end#0 ] ) always clobbers reg byte a -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:32 [ memset::c#3 ] -Statement [103] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#2 [ memset::c#3 memset::end#0 memset::dst#3 ] ( main:3::bitmap_clear:10::memset:97 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#3 ] main:3::bitmap_clear:10::memset:99 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#3 ] ) always clobbers reg byte a -Statement [105] *((byte*) memset::dst#2) ← (byte) memset::c#3 [ memset::c#3 memset::end#0 memset::dst#2 ] ( main:3::bitmap_clear:10::memset:97 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#2 ] main:3::bitmap_clear:10::memset:99 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#2 ] ) always clobbers reg byte a reg byte y -Removing always clobbered register reg byte y as potential for zp ZP_BYTE:32 [ memset::c#3 ] -Statement [107] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@1 [ memset::c#3 memset::end#0 memset::dst#1 ] ( main:3::bitmap_clear:10::memset:97 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#1 ] main:3::bitmap_clear:10::memset:99 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#1 ] ) always clobbers reg byte a -Statement [126] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 [ bitmap_init::y#2 bitmap_init::yoffs#1 ] ( main:3::bitmap_init:8 [ frame_cnt#0 bitmap_init::y#2 bitmap_init::yoffs#1 ] ) always clobbers reg byte a -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:37 [ bitmap_init::y#2 bitmap_init::y#1 ] -Statement [133] (dword) div32u16u::return#2 ← (dword) div32u16u::return#0 [ div32u16u::return#2 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 div32u16u::return#2 ] ) always clobbers reg byte a -Statement [134] (dword) sin16s_gen2::step#0 ← (dword) div32u16u::return#2 [ sin16s_gen2::step#0 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 ] ) always clobbers reg byte a -Statement [136] (dword) sin16s::x#0 ← (dword) sin16s_gen2::x#2 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::x#0 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::x#0 ] ) always clobbers reg byte a -Statement [138] (signed word) sin16s::return#0 ← (signed word) sin16s::return#1 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::return#0 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::return#0 ] ) always clobbers reg byte a -Statement [139] (signed word) mul16s::a#0 ← (signed word) sin16s::return#0 [ mul16s::a#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 mul16s::a#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 ] ) always clobbers reg byte a -Statement [141] (signed dword) mul16s::return#2 ← (signed dword) mul16s::return#0 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::return#2 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::return#2 ] ) always clobbers reg byte a -Statement [142] (signed dword~) sin16s_gen2::$5 ← (signed dword) mul16s::return#2 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s_gen2::$5 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s_gen2::$5 ] ) always clobbers reg byte a -Statement [143] (word~) sin16s_gen2::$6 ← > (signed dword~) sin16s_gen2::$5 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s_gen2::$6 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s_gen2::$6 ] ) always clobbers reg byte a -Statement [144] *((signed word*) sin16s_gen2::sintab#2) ← (signed word)(word~) sin16s_gen2::$6 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 ] ) always clobbers reg byte a reg byte y -Statement [145] (signed word*) sin16s_gen2::sintab#0 ← (signed word*) sin16s_gen2::sintab#2 + (const byte) SIZEOF_SIGNED_WORD [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::i#2 sin16s_gen2::sintab#0 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::i#2 sin16s_gen2::sintab#0 ] ) always clobbers reg byte a -Statement [146] (dword) sin16s_gen2::x#1 ← (dword) sin16s_gen2::x#2 + (dword) sin16s_gen2::step#0 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#1 sin16s_gen2::sintab#0 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#1 sin16s_gen2::sintab#0 ] ) always clobbers reg byte a -Statement [148] if((word) sin16s_gen2::i#1<(const word) sin16s_gen2::wavelength#0) goto sin16s_gen2::@1 [ sin16s_gen2::step#0 sin16s_gen2::x#1 sin16s_gen2::sintab#0 sin16s_gen2::i#1 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#1 sin16s_gen2::sintab#0 sin16s_gen2::i#1 ] ) always clobbers reg byte a -Statement [150] if((dword) sin16s::x#0<(const dword) PI_u4f28#0) goto sin16s::@1 [ sin16s::x#0 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::x#0 ] ) always clobbers reg byte a -Statement [151] (dword) sin16s::x#1 ← (dword) sin16s::x#0 - (const dword) PI_u4f28#0 [ sin16s::x#1 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::x#1 ] ) always clobbers reg byte a -Statement [153] if((dword) sin16s::x#4<(const dword) PI_HALF_u4f28#0) goto sin16s::@2 [ sin16s::x#4 sin16s::isUpper#2 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::x#4 sin16s::isUpper#2 ] ) always clobbers reg byte a -Statement [154] (dword) sin16s::x#2 ← (const dword) PI_u4f28#0 - (dword) sin16s::x#4 [ sin16s::isUpper#2 sin16s::x#2 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x#2 ] ) always clobbers reg byte a -Statement [156] (dword~) sin16s::$4 ← (dword) sin16s::x#6 << (byte) 3 [ sin16s::isUpper#2 sin16s::$4 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::$4 ] ) always clobbers reg byte a reg byte y -Removing always clobbered register reg byte y as potential for zp ZP_BYTE:48 [ sin16s::isUpper#2 ] -Statement [157] (word) sin16s::x1#0 ← > (dword~) sin16s::$4 [ sin16s::isUpper#2 sin16s::x1#0 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 ] ) always clobbers reg byte a -Statement [158] (word) mulu16_sel::v1#0 ← (word) sin16s::x1#0 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#0 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#0 ] ) always clobbers reg byte a -Statement [159] (word) mulu16_sel::v2#0 ← (word) sin16s::x1#0 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#0 mulu16_sel::v2#0 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#0 mulu16_sel::v2#0 ] ) always clobbers reg byte a -Statement [161] (word) mulu16_sel::return#0 ← (word) mulu16_sel::return#12 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#0 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#0 ] ) always clobbers reg byte a -Statement [162] (word) sin16s::x2#0 ← (word) mulu16_sel::return#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x2#0 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x2#0 ] ) always clobbers reg byte a -Statement [163] (word) mulu16_sel::v1#1 ← (word) sin16s::x2#0 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#1 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#1 ] ) always clobbers reg byte a -Statement [164] (word) mulu16_sel::v2#1 ← (word) sin16s::x1#0 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#1 mulu16_sel::v2#1 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#1 mulu16_sel::v2#1 ] ) always clobbers reg byte a -Statement [166] (word) mulu16_sel::return#1 ← (word) mulu16_sel::return#12 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#1 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#1 ] ) always clobbers reg byte a -Statement [167] (word) sin16s::x3#0 ← (word) mulu16_sel::return#1 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 ] ) always clobbers reg byte a -Statement [168] (word) mulu16_sel::v1#2 ← (word) sin16s::x3#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::v1#2 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::v1#2 ] ) always clobbers reg byte a -Statement [170] (word) mulu16_sel::return#2 ← (word) mulu16_sel::return#12 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::return#2 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::return#2 ] ) always clobbers reg byte a -Statement [171] (word) sin16s::x3_6#0 ← (word) mulu16_sel::return#2 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 sin16s::x3_6#0 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 sin16s::x3_6#0 ] ) always clobbers reg byte a -Statement [172] (word) sin16s::usinx#0 ← (word) sin16s::x1#0 - (word) sin16s::x3_6#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 sin16s::usinx#0 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 sin16s::usinx#0 ] ) always clobbers reg byte a -Statement [173] (word) mulu16_sel::v1#3 ← (word) sin16s::x3#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#3 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#3 ] ) always clobbers reg byte a -Statement [174] (word) mulu16_sel::v2#3 ← (word) sin16s::x1#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#3 mulu16_sel::v2#3 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#3 mulu16_sel::v2#3 ] ) always clobbers reg byte a -Statement [176] (word) mulu16_sel::return#10 ← (word) mulu16_sel::return#12 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::return#10 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::return#10 ] ) always clobbers reg byte a -Statement [177] (word) sin16s::x4#0 ← (word) mulu16_sel::return#10 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 sin16s::x4#0 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 sin16s::x4#0 ] ) always clobbers reg byte a -Statement [178] (word) mulu16_sel::v1#4 ← (word) sin16s::x4#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#4 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#4 ] ) always clobbers reg byte a -Statement [179] (word) mulu16_sel::v2#4 ← (word) sin16s::x1#0 [ sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::v1#4 mulu16_sel::v2#4 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::v1#4 mulu16_sel::v2#4 ] ) always clobbers reg byte a -Statement [181] (word) mulu16_sel::return#11 ← (word) mulu16_sel::return#12 [ sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::return#11 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::return#11 ] ) always clobbers reg byte a -Statement [182] (word) sin16s::x5#0 ← (word) mulu16_sel::return#11 [ sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5#0 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5#0 ] ) always clobbers reg byte a -Statement [183] (word) sin16s::x5_128#0 ← (word) sin16s::x5#0 >> (byte) 4 [ sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5_128#0 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5_128#0 ] ) always clobbers reg byte a -Statement [184] (word) sin16s::usinx#1 ← (word) sin16s::usinx#0 + (word) sin16s::x5_128#0 [ sin16s::isUpper#2 sin16s::usinx#1 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#1 ] ) always clobbers reg byte a -Statement [186] (signed word) sin16s::sinx#1 ← - (signed word)(word) sin16s::usinx#1 [ sin16s::sinx#1 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::sinx#1 ] ) always clobbers reg byte a -Statement [189] (signed word~) sin16s::return#5 ← (signed word)(word) sin16s::usinx#1 [ sin16s::return#5 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::return#5 ] ) always clobbers reg byte a -Statement [191] (word) mul16u::a#2 ← (word) mulu16_sel::v1#5 [ mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] ( main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:160 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:165 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:169 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:175 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:180 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] ) always clobbers reg byte a -Statement [192] (word) mul16u::b#1 ← (word) mulu16_sel::v2#5 [ mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] ( main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:160 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:165 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:169 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:175 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:180 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] ) always clobbers reg byte a -Statement [194] (dword) mul16u::return#3 ← (dword) mul16u::res#2 [ mulu16_sel::select#5 mul16u::return#3 ] ( main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:160 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::return#3 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:165 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::return#3 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:169 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::return#3 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:175 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::return#3 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:180 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::return#3 ] ) always clobbers reg byte a -Statement [195] (dword~) mulu16_sel::$0 ← (dword) mul16u::return#3 [ mulu16_sel::select#5 mulu16_sel::$0 ] ( main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:160 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mulu16_sel::$0 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:165 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mulu16_sel::$0 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:169 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mulu16_sel::$0 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:175 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mulu16_sel::$0 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:180 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mulu16_sel::$0 ] ) always clobbers reg byte a -Statement [196] (dword~) mulu16_sel::$1 ← (dword~) mulu16_sel::$0 << (byte) mulu16_sel::select#5 [ mulu16_sel::$1 ] ( main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:160 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::$1 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:165 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::$1 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:169 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::$1 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:175 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::$1 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:180 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::$1 ] ) always clobbers reg byte a -Statement [197] (word) mulu16_sel::return#12 ← > (dword~) mulu16_sel::$1 [ mulu16_sel::return#12 ] ( main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:160 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#12 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:165 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#12 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:169 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::return#12 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:175 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::return#12 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:180 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::return#12 ] ) always clobbers reg byte a -Statement [201] (word) divr16u::return#2 ← (word) divr16u::return#0 [ divr16u::return#2 rem16u#1 ] ( main:3::sin16s_gen2:6::div32u16u:132 [ frame_cnt#0 divr16u::return#2 rem16u#1 ] ) always clobbers reg byte a -Statement [202] (word) div32u16u::quotient_hi#0 ← (word) divr16u::return#2 [ div32u16u::quotient_hi#0 rem16u#1 ] ( main:3::sin16s_gen2:6::div32u16u:132 [ frame_cnt#0 div32u16u::quotient_hi#0 rem16u#1 ] ) always clobbers reg byte a -Statement [203] (word) divr16u::rem#4 ← (word) rem16u#1 [ div32u16u::quotient_hi#0 divr16u::rem#4 ] ( main:3::sin16s_gen2:6::div32u16u:132 [ frame_cnt#0 div32u16u::quotient_hi#0 divr16u::rem#4 ] ) always clobbers reg byte a -Statement [205] (word) divr16u::return#3 ← (word) divr16u::return#0 [ div32u16u::quotient_hi#0 divr16u::return#3 ] ( main:3::sin16s_gen2:6::div32u16u:132 [ frame_cnt#0 div32u16u::quotient_hi#0 divr16u::return#3 ] ) always clobbers reg byte a -Statement [206] (word) div32u16u::quotient_lo#0 ← (word) divr16u::return#3 [ div32u16u::quotient_hi#0 div32u16u::quotient_lo#0 ] ( main:3::sin16s_gen2:6::div32u16u:132 [ frame_cnt#0 div32u16u::quotient_hi#0 div32u16u::quotient_lo#0 ] ) always clobbers reg byte a -Statement [207] (dword) div32u16u::return#0 ← (word) div32u16u::quotient_hi#0 dw= (word) div32u16u::quotient_lo#0 [ div32u16u::return#0 ] ( main:3::sin16s_gen2:6::div32u16u:132 [ frame_cnt#0 div32u16u::return#0 ] ) always clobbers reg byte a -Statement [212] (byte~) divr16u::$1 ← > (word) divr16u::dividend#3 [ divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#0 divr16u::$1 ] ( main:3::sin16s_gen2:6::div32u16u:132::divr16u:200 [ frame_cnt#0 divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#0 divr16u::$1 ] main:3::sin16s_gen2:6::div32u16u:132::divr16u:204 [ frame_cnt#0 div32u16u::quotient_hi#0 divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#0 divr16u::$1 ] ) always clobbers reg byte a -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:66 [ divr16u::i#2 divr16u::i#1 ] -Statement [215] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 [ divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#1 ] ( main:3::sin16s_gen2:6::div32u16u:132::divr16u:200 [ frame_cnt#0 divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#1 ] main:3::sin16s_gen2:6::div32u16u:132::divr16u:204 [ frame_cnt#0 div32u16u::quotient_hi#0 divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#1 ] ) always clobbers reg byte a -Statement [219] if((word) divr16u::rem#6<(const word) sin16s_gen2::wavelength#0) goto divr16u::@3 [ divr16u::i#2 divr16u::dividend#0 divr16u::rem#6 divr16u::quotient#1 ] ( main:3::sin16s_gen2:6::div32u16u:132::divr16u:200 [ frame_cnt#0 divr16u::i#2 divr16u::dividend#0 divr16u::rem#6 divr16u::quotient#1 ] main:3::sin16s_gen2:6::div32u16u:132::divr16u:204 [ frame_cnt#0 div32u16u::quotient_hi#0 divr16u::i#2 divr16u::dividend#0 divr16u::rem#6 divr16u::quotient#1 ] ) always clobbers reg byte a -Statement [221] (word) divr16u::rem#2 ← (word) divr16u::rem#6 - (const word) sin16s_gen2::wavelength#0 [ divr16u::i#2 divr16u::dividend#0 divr16u::quotient#2 divr16u::rem#2 ] ( main:3::sin16s_gen2:6::div32u16u:132::divr16u:200 [ frame_cnt#0 divr16u::i#2 divr16u::dividend#0 divr16u::quotient#2 divr16u::rem#2 ] main:3::sin16s_gen2:6::div32u16u:132::divr16u:204 [ frame_cnt#0 div32u16u::quotient_hi#0 divr16u::i#2 divr16u::dividend#0 divr16u::quotient#2 divr16u::rem#2 ] ) always clobbers reg byte a -Statement [225] (word) rem16u#1 ← (word) divr16u::rem#11 [ divr16u::return#0 rem16u#1 ] ( main:3::sin16s_gen2:6::div32u16u:132::divr16u:200 [ frame_cnt#0 divr16u::return#0 rem16u#1 ] main:3::sin16s_gen2:6::div32u16u:132::divr16u:204 [ frame_cnt#0 div32u16u::quotient_hi#0 divr16u::return#0 rem16u#1 ] ) always clobbers reg byte a -Statement [227] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 [ frame_cnt#0 ] ( [ frame_cnt#0 ] ) always clobbers reg byte a -Statement [228] if((byte) 0==(byte) frame_cnt#0) goto irq::@1 [ frame_cnt#0 ] ( [ frame_cnt#0 ] ) always clobbers reg byte a -Statement [231] *((const byte*) BGCOL#0) ← (const byte) BLACK#0 [ ] ( [ ] ) always clobbers reg byte a -Statement [232] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 [ ] ( [ ] ) always clobbers reg byte a -Statement [233] return [ ] ( [ ] ) always clobbers reg byte a reg byte x reg byte y +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 +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:8 [ main::r_add#10 main::r_add#12 main::r_add#1 ] +Statement [17] (signed word*~) main::$34 ← (const signed word[$200]) SINUS#0 + (word~) main::$32 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 main::$34 ] ( main:3 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 main::$34 ] ) always clobbers reg byte a +Statement [18] (signed word) main::cos_x#0 ← *((signed word*~) main::$34) [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 main::cos_x#0 ] ( main:3 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 main::cos_x#0 ] ) always clobbers reg byte a reg byte y +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:8 [ main::r_add#10 main::r_add#12 main::r_add#1 ] +Statement [19] (signed word) mul16s::a#1 ← (signed word) main::r#10 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 main::cos_x#0 mul16s::a#1 ] ( main:3 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 main::cos_x#0 mul16s::a#1 ] ) always clobbers reg byte a +Statement [20] (signed word) mul16s::b#1 ← (signed word) main::cos_x#0 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 mul16s::a#1 mul16s::b#1 ] ( main:3 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 mul16s::a#1 mul16s::b#1 ] ) always clobbers reg byte a +Statement [22] (signed dword) mul16s::return#3 ← (signed dword) mul16s::return#0 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 mul16s::return#3 ] ( main:3 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 mul16s::return#3 ] ) always clobbers reg byte a +Statement [23] (signed dword) main::xpos#0 ← (signed dword) mul16s::return#3 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 main::xpos#0 ] ( main:3 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 main::xpos#0 ] ) always clobbers reg byte a +Statement [24] (word~) main::$9 ← > (signed dword) main::xpos#0 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 main::$9 ] ( main:3 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 main::$9 ] ) always clobbers reg byte a +Statement [25] (signed word~) main::$11 ← (signed word)(word~) main::$9 >> (signed byte) 2 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 main::$11 ] ( main:3 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 main::$11 ] ) always clobbers reg byte a +Statement [26] (signed word) bitmap_plot::x#0 ← (signed word) $a0 + (signed word~) main::$11 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 bitmap_plot::x#0 ] ( main:3 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 bitmap_plot::x#0 ] ) always clobbers reg byte a +Statement [27] (word~) main::$33 ← (word) main::idx_y#3 << (byte) 1 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 bitmap_plot::x#0 main::$33 ] ( main:3 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 bitmap_plot::x#0 main::$33 ] ) always clobbers reg byte a +Statement [28] (signed word*~) main::$35 ← (const signed word[$200]) SINUS#0 + (word~) main::$33 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 bitmap_plot::x#0 main::$35 ] ( main:3 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 bitmap_plot::x#0 main::$35 ] ) always clobbers reg byte a +Statement [29] (signed word) main::sin_y#0 ← *((signed word*~) main::$35) [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 bitmap_plot::x#0 main::sin_y#0 ] ( main:3 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 bitmap_plot::x#0 main::sin_y#0 ] ) always clobbers reg byte a reg byte y +Statement [30] (signed word) mul16s::a#2 ← (signed word) main::r#10 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 bitmap_plot::x#0 main::sin_y#0 mul16s::a#2 ] ( main:3 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 bitmap_plot::x#0 main::sin_y#0 mul16s::a#2 ] ) always clobbers reg byte a +Statement [31] (signed word) mul16s::b#2 ← (signed word) main::sin_y#0 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 bitmap_plot::x#0 mul16s::a#2 mul16s::b#2 ] ( main:3 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 bitmap_plot::x#0 mul16s::a#2 mul16s::b#2 ] ) always clobbers reg byte a +Statement [33] (signed dword) mul16s::return#4 ← (signed dword) mul16s::return#0 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 bitmap_plot::x#0 mul16s::return#4 ] ( main:3 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 bitmap_plot::x#0 mul16s::return#4 ] ) always clobbers reg byte a +Statement [34] (signed dword) main::ypos#0 ← (signed dword) mul16s::return#4 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 bitmap_plot::x#0 main::ypos#0 ] ( main:3 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 bitmap_plot::x#0 main::ypos#0 ] ) always clobbers reg byte a +Statement [35] (word~) main::$15 ← > (signed dword) main::ypos#0 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 bitmap_plot::x#0 main::$15 ] ( main:3 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 bitmap_plot::x#0 main::$15 ] ) always clobbers reg byte a +Statement [36] (signed word~) main::$17 ← (signed word)(word~) main::$15 >> (signed byte) 2 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 bitmap_plot::x#0 main::$17 ] ( main:3 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 bitmap_plot::x#0 main::$17 ] ) always clobbers reg byte a +Statement [37] (signed word~) main::$18 ← (signed byte) $64 + (signed word~) main::$17 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 bitmap_plot::x#0 main::$18 ] ( main:3 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 bitmap_plot::x#0 main::$18 ] ) always clobbers reg byte a +Statement [38] (byte) bitmap_plot::y#0 ← (byte)(word)(signed word~) main::$18 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 bitmap_plot::x#0 bitmap_plot::y#0 ] ( main:3 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 bitmap_plot::x#0 bitmap_plot::y#0 ] ) always clobbers reg byte a +Statement [40] *((const byte[$100]) plots_per_frame#0 + (byte) frame_cnt#0) ← ++ *((const byte[$100]) plots_per_frame#0 + (byte) frame_cnt#0) [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 ] ( main:3 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 ] ) always clobbers reg byte x +Removing always clobbered register reg byte x as potential for zp ZP_BYTE:8 [ main::r_add#10 main::r_add#12 main::r_add#1 ] +Statement [41] (word) main::idx_x#1 ← (word) main::idx_x#11 + (byte) main::r_add#10 [ frame_cnt#0 main::r#10 main::idx_y#3 main::r_add#10 main::idx_x#1 ] ( main:3 [ frame_cnt#0 main::r#10 main::idx_y#3 main::r_add#10 main::idx_x#1 ] ) always clobbers reg byte a +Statement [42] if((word) main::idx_x#1<(word) $200) goto main::@16 [ frame_cnt#0 main::r#10 main::idx_y#3 main::r_add#10 main::idx_x#1 ] ( main:3 [ frame_cnt#0 main::r#10 main::idx_y#3 main::r_add#10 main::idx_x#1 ] ) always clobbers reg byte a +Statement [45] (word) main::idx_y#1 ← (word) main::idx_y#3 + (byte) main::r_add#10 [ frame_cnt#0 main::r#10 main::r_add#10 main::idx_x#10 main::idx_y#1 ] ( main:3 [ frame_cnt#0 main::r#10 main::r_add#10 main::idx_x#10 main::idx_y#1 ] ) always clobbers reg byte a +Statement [46] if((word) main::idx_y#1<(word) $200) goto main::@17 [ frame_cnt#0 main::r#10 main::r_add#10 main::idx_x#10 main::idx_y#1 ] ( main:3 [ frame_cnt#0 main::r#10 main::r_add#10 main::idx_x#10 main::idx_y#1 ] ) always clobbers reg byte a +Statement [49] (signed word) main::r#1 ← (signed word) main::r#10 + (byte) main::r_add#10 [ frame_cnt#0 main::r_add#10 main::idx_x#10 main::r#1 main::idx_y#10 ] ( main:3 [ frame_cnt#0 main::r_add#10 main::idx_x#10 main::r#1 main::idx_y#10 ] ) always clobbers reg byte a +Statement [50] if((word) main::idx_x#10!=(byte) 0) goto main::@5 [ frame_cnt#0 main::r_add#10 main::idx_x#10 main::r#1 main::idx_y#10 ] ( main:3 [ frame_cnt#0 main::r_add#10 main::idx_x#10 main::r#1 main::idx_y#10 ] ) always clobbers reg byte a +Statement [51] if((byte) main::r_add#10==(byte) 1) goto main::@5 [ frame_cnt#0 main::r_add#10 main::idx_x#10 main::r#1 main::idx_y#10 ] ( main:3 [ frame_cnt#0 main::r_add#10 main::idx_x#10 main::r#1 main::idx_y#10 ] ) always clobbers reg byte a +Statement [54] if((signed word) main::r#1>=(signed word)(number) $200*(number) $c+(number) $100) goto main::@7 [ frame_cnt#0 main::idx_x#10 main::r#1 main::idx_y#10 main::r_add#12 ] ( main:3 [ frame_cnt#0 main::idx_x#10 main::r#1 main::idx_y#10 main::r_add#12 ] ) always clobbers reg byte a +Statement [56] (word~) bitmap_plot::$3 ← *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_plot::y#0) w= *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_plot::y#0) [ bitmap_plot::x#0 bitmap_plot::$3 ] ( main:3::bitmap_plot:39 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 bitmap_plot::x#0 bitmap_plot::$3 ] ) always clobbers reg byte a +Statement [57] (word~) bitmap_plot::$1 ← (word)(signed word) bitmap_plot::x#0 & (word) $fff8 [ bitmap_plot::x#0 bitmap_plot::$3 bitmap_plot::$1 ] ( main:3::bitmap_plot:39 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 bitmap_plot::x#0 bitmap_plot::$3 bitmap_plot::$1 ] ) always clobbers reg byte a +Statement [58] (byte*) bitmap_plot::plotter#1 ← (byte*)(word~) bitmap_plot::$3 + (word~) bitmap_plot::$1 [ bitmap_plot::x#0 bitmap_plot::plotter#1 ] ( main:3::bitmap_plot:39 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 bitmap_plot::x#0 bitmap_plot::plotter#1 ] ) always clobbers reg byte a +Statement [59] (byte~) bitmap_plot::$2 ← < (word)(signed word) bitmap_plot::x#0 [ bitmap_plot::plotter#1 bitmap_plot::$2 ] ( main:3::bitmap_plot:39 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 bitmap_plot::plotter#1 bitmap_plot::$2 ] ) always clobbers reg byte a +Statement [60] *((byte*) bitmap_plot::plotter#1) ← *((byte*) bitmap_plot::plotter#1) | *((const byte[$100]) bitmap_plot_bit#0 + (byte~) bitmap_plot::$2) [ ] ( main:3::bitmap_plot:39 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 ] ) always clobbers reg byte a reg byte y +Statement [63] (dword~) mul16u::mb#6 ← (word)(signed word) mul16s::b#3 [ mul16s::a#3 mul16s::b#3 mul16u::mb#6 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 mul16s::a#3 mul16s::b#3 mul16u::mb#6 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 bitmap_plot::x#0 mul16s::a#3 mul16s::b#3 mul16u::mb#6 ] main:3::sin16s_gen2:6::mul16s:144 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16u::mb#6 ] ) always clobbers reg byte a +Statement [64] (word~) mul16u::a#8 ← (word)(signed word) mul16s::a#3 [ mul16s::a#3 mul16s::b#3 mul16u::mb#6 mul16u::a#8 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 mul16s::a#3 mul16s::b#3 mul16u::mb#6 mul16u::a#8 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 bitmap_plot::x#0 mul16s::a#3 mul16s::b#3 mul16u::mb#6 mul16u::a#8 ] main:3::sin16s_gen2:6::mul16s:144 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16u::mb#6 mul16u::a#8 ] ) always clobbers reg byte a +Statement [66] (dword) mul16u::return#2 ← (dword) mul16u::res#2 [ mul16s::a#3 mul16s::b#3 mul16u::return#2 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 mul16s::a#3 mul16s::b#3 mul16u::return#2 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 bitmap_plot::x#0 mul16s::a#3 mul16s::b#3 mul16u::return#2 ] main:3::sin16s_gen2:6::mul16s:144 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16u::return#2 ] ) always clobbers reg byte a +Statement [67] (dword) mul16s::m#0 ← (dword) mul16u::return#2 [ mul16s::a#3 mul16s::b#3 mul16s::m#0 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 mul16s::a#3 mul16s::b#3 mul16s::m#0 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 bitmap_plot::x#0 mul16s::a#3 mul16s::b#3 mul16s::m#0 ] main:3::sin16s_gen2:6::mul16s:144 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16s::m#0 ] ) always clobbers reg byte a +Statement [68] if((signed word) mul16s::a#3>=(signed byte) 0) goto mul16s::@1 [ mul16s::a#3 mul16s::b#3 mul16s::m#0 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 mul16s::a#3 mul16s::b#3 mul16s::m#0 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 bitmap_plot::x#0 mul16s::a#3 mul16s::b#3 mul16s::m#0 ] main:3::sin16s_gen2:6::mul16s:144 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16s::m#0 ] ) always clobbers reg byte a +Statement [69] (word~) mul16s::$9 ← > (dword) mul16s::m#0 [ mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$9 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$9 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 bitmap_plot::x#0 mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$9 ] main:3::sin16s_gen2:6::mul16s:144 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$9 ] ) always clobbers reg byte a +Statement [70] (word~) mul16s::$16 ← (word~) mul16s::$9 - (word)(signed word) mul16s::b#3 [ mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$16 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$16 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 bitmap_plot::x#0 mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$16 ] main:3::sin16s_gen2:6::mul16s:144 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$16 ] ) always clobbers reg byte a +Statement [71] (dword) mul16s::m#1 ← (dword) mul16s::m#0 hi= (word~) mul16s::$16 [ mul16s::a#3 mul16s::b#3 mul16s::m#1 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 mul16s::a#3 mul16s::b#3 mul16s::m#1 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 bitmap_plot::x#0 mul16s::a#3 mul16s::b#3 mul16s::m#1 ] main:3::sin16s_gen2:6::mul16s:144 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16s::m#1 ] ) always clobbers reg byte a +Statement [73] if((signed word) mul16s::b#3>=(signed byte) 0) goto mul16s::@2 [ mul16s::a#3 mul16s::m#5 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 mul16s::a#3 mul16s::m#5 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 bitmap_plot::x#0 mul16s::a#3 mul16s::m#5 ] main:3::sin16s_gen2:6::mul16s:144 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::m#5 ] ) always clobbers reg byte a +Statement [74] (word~) mul16s::$13 ← > (dword) mul16s::m#5 [ mul16s::a#3 mul16s::m#5 mul16s::$13 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 mul16s::a#3 mul16s::m#5 mul16s::$13 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 bitmap_plot::x#0 mul16s::a#3 mul16s::m#5 mul16s::$13 ] main:3::sin16s_gen2:6::mul16s:144 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::m#5 mul16s::$13 ] ) always clobbers reg byte a +Statement [75] (word~) mul16s::$17 ← (word~) mul16s::$13 - (word)(signed word) mul16s::a#3 [ mul16s::m#5 mul16s::$17 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 mul16s::m#5 mul16s::$17 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 bitmap_plot::x#0 mul16s::m#5 mul16s::$17 ] main:3::sin16s_gen2:6::mul16s:144 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::m#5 mul16s::$17 ] ) always clobbers reg byte a +Statement [76] (dword) mul16s::m#2 ← (dword) mul16s::m#5 hi= (word~) mul16s::$17 [ mul16s::m#2 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 mul16s::m#2 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 bitmap_plot::x#0 mul16s::m#2 ] main:3::sin16s_gen2:6::mul16s:144 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::m#2 ] ) always clobbers reg byte a +Statement [78] (signed dword) mul16s::return#0 ← (signed dword)(dword) mul16s::m#4 [ mul16s::return#0 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 mul16s::return#0 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 bitmap_plot::x#0 mul16s::return#0 ] main:3::sin16s_gen2:6::mul16s:144 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::return#0 ] ) always clobbers reg byte a +Statement [82] if((word) mul16u::a#3!=(byte) 0) goto mul16u::@2 [ mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] ( main:3::mul16s:21::mul16u:65 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 mul16s::a#3 mul16s::b#3 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::mul16s:32::mul16u:65 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 bitmap_plot::x#0 mul16s::a#3 mul16s::b#3 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::sin16s_gen2:6::mul16s:144::mul16u:65 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::sin16s_gen2:6::sin16s:141::mulu16_sel:164::mul16u:197 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::sin16s_gen2:6::sin16s:141::mulu16_sel:169::mul16u:197 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::sin16s_gen2:6::sin16s:141::mulu16_sel:173::mul16u:197 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::sin16s_gen2:6::sin16s:141::mulu16_sel:179::mul16u:197 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::sin16s_gen2:6::sin16s:141::mulu16_sel:184::mul16u:197 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:49 [ sin16s::isUpper#2 ] +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:60 [ mulu16_sel::select#5 ] +Statement [84] (byte~) mul16u::$1 ← (word) mul16u::a#3 & (byte) 1 [ mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] ( main:3::mul16s:21::mul16u:65 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 mul16s::a#3 mul16s::b#3 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::mul16s:32::mul16u:65 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 bitmap_plot::x#0 mul16s::a#3 mul16s::b#3 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::sin16s_gen2:6::mul16s:144::mul16u:65 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::sin16s_gen2:6::sin16s:141::mulu16_sel:164::mul16u:197 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::sin16s_gen2:6::sin16s:141::mulu16_sel:169::mul16u:197 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::sin16s_gen2:6::sin16s:141::mulu16_sel:173::mul16u:197 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::sin16s_gen2:6::sin16s:141::mulu16_sel:179::mul16u:197 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::sin16s_gen2:6::sin16s:141::mulu16_sel:184::mul16u:197 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] ) always clobbers reg byte a +Statement [86] (dword) mul16u::res#1 ← (dword) mul16u::res#2 + (dword) mul16u::mb#2 [ mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] ( main:3::mul16s:21::mul16u:65 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 mul16s::a#3 mul16s::b#3 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::mul16s:32::mul16u:65 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 bitmap_plot::x#0 mul16s::a#3 mul16s::b#3 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::sin16s_gen2:6::mul16s:144::mul16u:65 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::sin16s_gen2:6::sin16s:141::mulu16_sel:164::mul16u:197 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::sin16s_gen2:6::sin16s:141::mulu16_sel:169::mul16u:197 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::sin16s_gen2:6::sin16s:141::mulu16_sel:173::mul16u:197 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::sin16s_gen2:6::sin16s:141::mulu16_sel:179::mul16u:197 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::sin16s_gen2:6::sin16s:141::mulu16_sel:184::mul16u:197 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] ) always clobbers reg byte a +Statement [91] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 [ ] ( main:3::init_irq:14 [ frame_cnt#0 ] ) always clobbers reg byte a +Statement [92] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 [ ] ( main:3::init_irq:14 [ frame_cnt#0 ] ) always clobbers reg byte a +Statement [93] *((const byte*) CIA1_INTERRUPT#0) ← (const byte) CIA_INTERRUPT_CLEAR#0 [ ] ( main:3::init_irq:14 [ frame_cnt#0 ] ) always clobbers reg byte a +Statement [94] *((const byte*) VIC_CONTROL#0) ← *((const byte*) VIC_CONTROL#0) | (byte) $80 [ ] ( main:3::init_irq:14 [ frame_cnt#0 ] ) always clobbers reg byte a +Statement [95] *((const byte*) RASTER#0) ← (byte) 0 [ ] ( main:3::init_irq:14 [ frame_cnt#0 ] ) always clobbers reg byte a +Statement [96] *((const byte*) IRQ_ENABLE#0) ← (const byte) IRQ_RASTER#0 [ ] ( main:3::init_irq:14 [ frame_cnt#0 ] ) always clobbers reg byte a +Statement [97] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_CLOBBER)(void()) irq() [ ] ( main:3::init_irq:14 [ frame_cnt#0 ] ) always clobbers reg byte a +Statement [106] (byte*) memset::end#0 ← (byte*)(void*) memset::str#2 + (word) memset::num#2 [ memset::str#2 memset::c#3 memset::end#0 ] ( main:3::bitmap_clear:10::memset:101 [ frame_cnt#0 memset::str#2 memset::c#3 memset::end#0 ] main:3::bitmap_clear:10::memset:103 [ frame_cnt#0 memset::str#2 memset::c#3 memset::end#0 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:33 [ memset::c#3 ] +Statement [107] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#2 [ memset::c#3 memset::end#0 memset::dst#3 ] ( main:3::bitmap_clear:10::memset:101 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#3 ] main:3::bitmap_clear:10::memset:103 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#3 ] ) always clobbers reg byte a +Statement [109] *((byte*) memset::dst#2) ← (byte) memset::c#3 [ memset::c#3 memset::end#0 memset::dst#2 ] ( main:3::bitmap_clear:10::memset:101 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#2 ] main:3::bitmap_clear:10::memset:103 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#2 ] ) always clobbers reg byte a reg byte y +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:33 [ memset::c#3 ] +Statement [111] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@1 [ memset::c#3 memset::end#0 memset::dst#1 ] ( main:3::bitmap_clear:10::memset:101 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#1 ] main:3::bitmap_clear:10::memset:103 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#1 ] ) always clobbers reg byte a +Statement [130] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 [ bitmap_init::y#2 bitmap_init::yoffs#1 ] ( main:3::bitmap_init:8 [ frame_cnt#0 bitmap_init::y#2 bitmap_init::yoffs#1 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:38 [ bitmap_init::y#2 bitmap_init::y#1 ] +Statement [137] (dword) div32u16u::return#2 ← (dword) div32u16u::return#0 [ div32u16u::return#2 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 div32u16u::return#2 ] ) always clobbers reg byte a +Statement [138] (dword) sin16s_gen2::step#0 ← (dword) div32u16u::return#2 [ sin16s_gen2::step#0 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 ] ) always clobbers reg byte a +Statement [140] (dword) sin16s::x#0 ← (dword) sin16s_gen2::x#2 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::x#0 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::x#0 ] ) always clobbers reg byte a +Statement [142] (signed word) sin16s::return#0 ← (signed word) sin16s::return#1 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::return#0 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::return#0 ] ) always clobbers reg byte a +Statement [143] (signed word) mul16s::a#0 ← (signed word) sin16s::return#0 [ mul16s::a#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 mul16s::a#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 ] ) always clobbers reg byte a +Statement [145] (signed dword) mul16s::return#2 ← (signed dword) mul16s::return#0 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::return#2 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::return#2 ] ) always clobbers reg byte a +Statement [146] (signed dword~) sin16s_gen2::$5 ← (signed dword) mul16s::return#2 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s_gen2::$5 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s_gen2::$5 ] ) always clobbers reg byte a +Statement [147] (word~) sin16s_gen2::$6 ← > (signed dword~) sin16s_gen2::$5 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s_gen2::$6 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s_gen2::$6 ] ) always clobbers reg byte a +Statement [148] *((signed word*) sin16s_gen2::sintab#2) ← (signed word)(word~) sin16s_gen2::$6 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 ] ) always clobbers reg byte a reg byte y +Statement [149] (signed word*) sin16s_gen2::sintab#0 ← (signed word*) sin16s_gen2::sintab#2 + (const byte) SIZEOF_SIGNED_WORD [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::i#2 sin16s_gen2::sintab#0 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::i#2 sin16s_gen2::sintab#0 ] ) always clobbers reg byte a +Statement [150] (dword) sin16s_gen2::x#1 ← (dword) sin16s_gen2::x#2 + (dword) sin16s_gen2::step#0 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#1 sin16s_gen2::sintab#0 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#1 sin16s_gen2::sintab#0 ] ) always clobbers reg byte a +Statement [152] if((word) sin16s_gen2::i#1<(const word) sin16s_gen2::wavelength#0) goto sin16s_gen2::@1 [ sin16s_gen2::step#0 sin16s_gen2::x#1 sin16s_gen2::sintab#0 sin16s_gen2::i#1 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#1 sin16s_gen2::sintab#0 sin16s_gen2::i#1 ] ) always clobbers reg byte a +Statement [154] if((dword) sin16s::x#0<(const dword) PI_u4f28#0) goto sin16s::@1 [ sin16s::x#0 ] ( main:3::sin16s_gen2:6::sin16s:141 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::x#0 ] ) always clobbers reg byte a +Statement [155] (dword) sin16s::x#1 ← (dword) sin16s::x#0 - (const dword) PI_u4f28#0 [ sin16s::x#1 ] ( main:3::sin16s_gen2:6::sin16s:141 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::x#1 ] ) always clobbers reg byte a +Statement [157] if((dword) sin16s::x#4<(const dword) PI_HALF_u4f28#0) goto sin16s::@2 [ sin16s::x#4 sin16s::isUpper#2 ] ( main:3::sin16s_gen2:6::sin16s:141 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::x#4 sin16s::isUpper#2 ] ) always clobbers reg byte a +Statement [158] (dword) sin16s::x#2 ← (const dword) PI_u4f28#0 - (dword) sin16s::x#4 [ sin16s::isUpper#2 sin16s::x#2 ] ( main:3::sin16s_gen2:6::sin16s:141 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x#2 ] ) always clobbers reg byte a +Statement [160] (dword~) sin16s::$4 ← (dword) sin16s::x#6 << (byte) 3 [ sin16s::isUpper#2 sin16s::$4 ] ( main:3::sin16s_gen2:6::sin16s:141 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::$4 ] ) always clobbers reg byte a reg byte y +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:49 [ sin16s::isUpper#2 ] +Statement [161] (word) sin16s::x1#0 ← > (dword~) sin16s::$4 [ sin16s::isUpper#2 sin16s::x1#0 ] ( main:3::sin16s_gen2:6::sin16s:141 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 ] ) always clobbers reg byte a +Statement [162] (word) mulu16_sel::v1#0 ← (word) sin16s::x1#0 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#0 ] ( main:3::sin16s_gen2:6::sin16s:141 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#0 ] ) always clobbers reg byte a +Statement [163] (word) mulu16_sel::v2#0 ← (word) sin16s::x1#0 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#0 mulu16_sel::v2#0 ] ( main:3::sin16s_gen2:6::sin16s:141 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#0 mulu16_sel::v2#0 ] ) always clobbers reg byte a +Statement [165] (word) mulu16_sel::return#0 ← (word) mulu16_sel::return#12 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#0 ] ( main:3::sin16s_gen2:6::sin16s:141 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#0 ] ) always clobbers reg byte a +Statement [166] (word) sin16s::x2#0 ← (word) mulu16_sel::return#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x2#0 ] ( main:3::sin16s_gen2:6::sin16s:141 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x2#0 ] ) always clobbers reg byte a +Statement [167] (word) mulu16_sel::v1#1 ← (word) sin16s::x2#0 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#1 ] ( main:3::sin16s_gen2:6::sin16s:141 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#1 ] ) always clobbers reg byte a +Statement [168] (word) mulu16_sel::v2#1 ← (word) sin16s::x1#0 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#1 mulu16_sel::v2#1 ] ( main:3::sin16s_gen2:6::sin16s:141 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#1 mulu16_sel::v2#1 ] ) always clobbers reg byte a +Statement [170] (word) mulu16_sel::return#1 ← (word) mulu16_sel::return#12 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#1 ] ( main:3::sin16s_gen2:6::sin16s:141 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#1 ] ) always clobbers reg byte a +Statement [171] (word) sin16s::x3#0 ← (word) mulu16_sel::return#1 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 ] ( main:3::sin16s_gen2:6::sin16s:141 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 ] ) always clobbers reg byte a +Statement [172] (word) mulu16_sel::v1#2 ← (word) sin16s::x3#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::v1#2 ] ( main:3::sin16s_gen2:6::sin16s:141 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::v1#2 ] ) always clobbers reg byte a +Statement [174] (word) mulu16_sel::return#2 ← (word) mulu16_sel::return#12 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::return#2 ] ( main:3::sin16s_gen2:6::sin16s:141 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::return#2 ] ) always clobbers reg byte a +Statement [175] (word) sin16s::x3_6#0 ← (word) mulu16_sel::return#2 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 sin16s::x3_6#0 ] ( main:3::sin16s_gen2:6::sin16s:141 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 sin16s::x3_6#0 ] ) always clobbers reg byte a +Statement [176] (word) sin16s::usinx#0 ← (word) sin16s::x1#0 - (word) sin16s::x3_6#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 sin16s::usinx#0 ] ( main:3::sin16s_gen2:6::sin16s:141 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 sin16s::usinx#0 ] ) always clobbers reg byte a +Statement [177] (word) mulu16_sel::v1#3 ← (word) sin16s::x3#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#3 ] ( main:3::sin16s_gen2:6::sin16s:141 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#3 ] ) always clobbers reg byte a +Statement [178] (word) mulu16_sel::v2#3 ← (word) sin16s::x1#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#3 mulu16_sel::v2#3 ] ( main:3::sin16s_gen2:6::sin16s:141 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#3 mulu16_sel::v2#3 ] ) always clobbers reg byte a +Statement [180] (word) mulu16_sel::return#10 ← (word) mulu16_sel::return#12 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::return#10 ] ( main:3::sin16s_gen2:6::sin16s:141 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::return#10 ] ) always clobbers reg byte a +Statement [181] (word) sin16s::x4#0 ← (word) mulu16_sel::return#10 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 sin16s::x4#0 ] ( main:3::sin16s_gen2:6::sin16s:141 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 sin16s::x4#0 ] ) always clobbers reg byte a +Statement [182] (word) mulu16_sel::v1#4 ← (word) sin16s::x4#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#4 ] ( main:3::sin16s_gen2:6::sin16s:141 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#4 ] ) always clobbers reg byte a +Statement [183] (word) mulu16_sel::v2#4 ← (word) sin16s::x1#0 [ sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::v1#4 mulu16_sel::v2#4 ] ( main:3::sin16s_gen2:6::sin16s:141 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::v1#4 mulu16_sel::v2#4 ] ) always clobbers reg byte a +Statement [185] (word) mulu16_sel::return#11 ← (word) mulu16_sel::return#12 [ sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::return#11 ] ( main:3::sin16s_gen2:6::sin16s:141 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::return#11 ] ) always clobbers reg byte a +Statement [186] (word) sin16s::x5#0 ← (word) mulu16_sel::return#11 [ sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5#0 ] ( main:3::sin16s_gen2:6::sin16s:141 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5#0 ] ) always clobbers reg byte a +Statement [187] (word) sin16s::x5_128#0 ← (word) sin16s::x5#0 >> (byte) 4 [ sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5_128#0 ] ( main:3::sin16s_gen2:6::sin16s:141 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5_128#0 ] ) always clobbers reg byte a +Statement [188] (word) sin16s::usinx#1 ← (word) sin16s::usinx#0 + (word) sin16s::x5_128#0 [ sin16s::isUpper#2 sin16s::usinx#1 ] ( main:3::sin16s_gen2:6::sin16s:141 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#1 ] ) always clobbers reg byte a +Statement [190] (signed word) sin16s::sinx#1 ← - (signed word)(word) sin16s::usinx#1 [ sin16s::sinx#1 ] ( main:3::sin16s_gen2:6::sin16s:141 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::sinx#1 ] ) always clobbers reg byte a +Statement [193] (signed word~) sin16s::return#5 ← (signed word)(word) sin16s::usinx#1 [ sin16s::return#5 ] ( main:3::sin16s_gen2:6::sin16s:141 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::return#5 ] ) always clobbers reg byte a +Statement [195] (word) mul16u::a#2 ← (word) mulu16_sel::v1#5 [ mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] ( main:3::sin16s_gen2:6::sin16s:141::mulu16_sel:164 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:141::mulu16_sel:169 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:141::mulu16_sel:173 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:141::mulu16_sel:179 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:141::mulu16_sel:184 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] ) always clobbers reg byte a +Statement [196] (word) mul16u::b#1 ← (word) mulu16_sel::v2#5 [ mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] ( main:3::sin16s_gen2:6::sin16s:141::mulu16_sel:164 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:141::mulu16_sel:169 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:141::mulu16_sel:173 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:141::mulu16_sel:179 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:141::mulu16_sel:184 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] ) always clobbers reg byte a +Statement [198] (dword) mul16u::return#3 ← (dword) mul16u::res#2 [ mulu16_sel::select#5 mul16u::return#3 ] ( main:3::sin16s_gen2:6::sin16s:141::mulu16_sel:164 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::return#3 ] main:3::sin16s_gen2:6::sin16s:141::mulu16_sel:169 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::return#3 ] main:3::sin16s_gen2:6::sin16s:141::mulu16_sel:173 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::return#3 ] main:3::sin16s_gen2:6::sin16s:141::mulu16_sel:179 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::return#3 ] main:3::sin16s_gen2:6::sin16s:141::mulu16_sel:184 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::return#3 ] ) always clobbers reg byte a +Statement [199] (dword~) mulu16_sel::$0 ← (dword) mul16u::return#3 [ mulu16_sel::select#5 mulu16_sel::$0 ] ( main:3::sin16s_gen2:6::sin16s:141::mulu16_sel:164 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mulu16_sel::$0 ] main:3::sin16s_gen2:6::sin16s:141::mulu16_sel:169 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mulu16_sel::$0 ] main:3::sin16s_gen2:6::sin16s:141::mulu16_sel:173 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mulu16_sel::$0 ] main:3::sin16s_gen2:6::sin16s:141::mulu16_sel:179 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mulu16_sel::$0 ] main:3::sin16s_gen2:6::sin16s:141::mulu16_sel:184 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mulu16_sel::$0 ] ) always clobbers reg byte a +Statement [200] (dword~) mulu16_sel::$1 ← (dword~) mulu16_sel::$0 << (byte) mulu16_sel::select#5 [ mulu16_sel::$1 ] ( main:3::sin16s_gen2:6::sin16s:141::mulu16_sel:164 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::$1 ] main:3::sin16s_gen2:6::sin16s:141::mulu16_sel:169 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::$1 ] main:3::sin16s_gen2:6::sin16s:141::mulu16_sel:173 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::$1 ] main:3::sin16s_gen2:6::sin16s:141::mulu16_sel:179 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::$1 ] main:3::sin16s_gen2:6::sin16s:141::mulu16_sel:184 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::$1 ] ) always clobbers reg byte a +Statement [201] (word) mulu16_sel::return#12 ← > (dword~) mulu16_sel::$1 [ mulu16_sel::return#12 ] ( main:3::sin16s_gen2:6::sin16s:141::mulu16_sel:164 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#12 ] main:3::sin16s_gen2:6::sin16s:141::mulu16_sel:169 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#12 ] main:3::sin16s_gen2:6::sin16s:141::mulu16_sel:173 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::return#12 ] main:3::sin16s_gen2:6::sin16s:141::mulu16_sel:179 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::return#12 ] main:3::sin16s_gen2:6::sin16s:141::mulu16_sel:184 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::return#12 ] ) always clobbers reg byte a +Statement [205] (word) divr16u::return#2 ← (word) divr16u::return#0 [ divr16u::return#2 rem16u#1 ] ( main:3::sin16s_gen2:6::div32u16u:136 [ frame_cnt#0 divr16u::return#2 rem16u#1 ] ) always clobbers reg byte a +Statement [206] (word) div32u16u::quotient_hi#0 ← (word) divr16u::return#2 [ div32u16u::quotient_hi#0 rem16u#1 ] ( main:3::sin16s_gen2:6::div32u16u:136 [ frame_cnt#0 div32u16u::quotient_hi#0 rem16u#1 ] ) always clobbers reg byte a +Statement [207] (word) divr16u::rem#4 ← (word) rem16u#1 [ div32u16u::quotient_hi#0 divr16u::rem#4 ] ( main:3::sin16s_gen2:6::div32u16u:136 [ frame_cnt#0 div32u16u::quotient_hi#0 divr16u::rem#4 ] ) always clobbers reg byte a +Statement [209] (word) divr16u::return#3 ← (word) divr16u::return#0 [ div32u16u::quotient_hi#0 divr16u::return#3 ] ( main:3::sin16s_gen2:6::div32u16u:136 [ frame_cnt#0 div32u16u::quotient_hi#0 divr16u::return#3 ] ) always clobbers reg byte a +Statement [210] (word) div32u16u::quotient_lo#0 ← (word) divr16u::return#3 [ div32u16u::quotient_hi#0 div32u16u::quotient_lo#0 ] ( main:3::sin16s_gen2:6::div32u16u:136 [ frame_cnt#0 div32u16u::quotient_hi#0 div32u16u::quotient_lo#0 ] ) always clobbers reg byte a +Statement [211] (dword) div32u16u::return#0 ← (word) div32u16u::quotient_hi#0 dw= (word) div32u16u::quotient_lo#0 [ div32u16u::return#0 ] ( main:3::sin16s_gen2:6::div32u16u:136 [ frame_cnt#0 div32u16u::return#0 ] ) always clobbers reg byte a +Statement [216] (byte~) divr16u::$1 ← > (word) divr16u::dividend#3 [ divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#0 divr16u::$1 ] ( main:3::sin16s_gen2:6::div32u16u:136::divr16u:204 [ frame_cnt#0 divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#0 divr16u::$1 ] main:3::sin16s_gen2:6::div32u16u:136::divr16u:208 [ frame_cnt#0 div32u16u::quotient_hi#0 divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#0 divr16u::$1 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:67 [ divr16u::i#2 divr16u::i#1 ] +Statement [219] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 [ divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#1 ] ( main:3::sin16s_gen2:6::div32u16u:136::divr16u:204 [ frame_cnt#0 divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#1 ] main:3::sin16s_gen2:6::div32u16u:136::divr16u:208 [ frame_cnt#0 div32u16u::quotient_hi#0 divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#1 ] ) always clobbers reg byte a +Statement [223] if((word) divr16u::rem#6<(const word) sin16s_gen2::wavelength#0) goto divr16u::@3 [ divr16u::i#2 divr16u::dividend#0 divr16u::rem#6 divr16u::quotient#1 ] ( main:3::sin16s_gen2:6::div32u16u:136::divr16u:204 [ frame_cnt#0 divr16u::i#2 divr16u::dividend#0 divr16u::rem#6 divr16u::quotient#1 ] main:3::sin16s_gen2:6::div32u16u:136::divr16u:208 [ frame_cnt#0 div32u16u::quotient_hi#0 divr16u::i#2 divr16u::dividend#0 divr16u::rem#6 divr16u::quotient#1 ] ) always clobbers reg byte a +Statement [225] (word) divr16u::rem#2 ← (word) divr16u::rem#6 - (const word) sin16s_gen2::wavelength#0 [ divr16u::i#2 divr16u::dividend#0 divr16u::quotient#2 divr16u::rem#2 ] ( main:3::sin16s_gen2:6::div32u16u:136::divr16u:204 [ frame_cnt#0 divr16u::i#2 divr16u::dividend#0 divr16u::quotient#2 divr16u::rem#2 ] main:3::sin16s_gen2:6::div32u16u:136::divr16u:208 [ frame_cnt#0 div32u16u::quotient_hi#0 divr16u::i#2 divr16u::dividend#0 divr16u::quotient#2 divr16u::rem#2 ] ) always clobbers reg byte a +Statement [229] (word) rem16u#1 ← (word) divr16u::rem#11 [ divr16u::return#0 rem16u#1 ] ( main:3::sin16s_gen2:6::div32u16u:136::divr16u:204 [ frame_cnt#0 divr16u::return#0 rem16u#1 ] main:3::sin16s_gen2:6::div32u16u:136::divr16u:208 [ frame_cnt#0 div32u16u::quotient_hi#0 divr16u::return#0 rem16u#1 ] ) always clobbers reg byte a +Statement [231] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 [ frame_cnt#0 ] ( [ frame_cnt#0 ] ) always clobbers reg byte a +Statement [232] if((byte) 0==(byte) frame_cnt#0) goto irq::@1 [ frame_cnt#0 ] ( [ frame_cnt#0 ] ) always clobbers reg byte a +Statement [235] *((const byte*) BGCOL#0) ← (const byte) BLACK#0 [ ] ( [ ] ) always clobbers reg byte a +Statement [236] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 [ ] ( [ ] ) always clobbers reg byte a +Statement [237] 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 [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::$28 ← (word) main::idx_x#3 << (byte) 1 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 main::$28 ] ( main:3 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 main::$28 ] ) always clobbers reg byte a -Statement [17] (signed word*~) main::$30 ← (const signed word[$200]) SINUS#0 + (word~) main::$28 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 main::$30 ] ( main:3 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 main::$30 ] ) always clobbers reg byte a -Statement [18] (signed word) main::cos_x#0 ← *((signed word*~) main::$30) [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 main::cos_x#0 ] ( main:3 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 main::cos_x#0 ] ) always clobbers reg byte a reg byte y -Statement [19] (signed word) mul16s::a#1 ← (signed word) main::r#10 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 main::cos_x#0 mul16s::a#1 ] ( main:3 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 main::cos_x#0 mul16s::a#1 ] ) always clobbers reg byte a -Statement [20] (signed word) mul16s::b#1 ← (signed word) main::cos_x#0 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 mul16s::a#1 mul16s::b#1 ] ( main:3 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 mul16s::a#1 mul16s::b#1 ] ) always clobbers reg byte a -Statement [22] (signed dword) mul16s::return#3 ← (signed dword) mul16s::return#0 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 mul16s::return#3 ] ( main:3 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 mul16s::return#3 ] ) always clobbers reg byte a -Statement [23] (signed dword) main::xpos#0 ← (signed dword) mul16s::return#3 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 main::xpos#0 ] ( main:3 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 main::xpos#0 ] ) always clobbers reg byte a -Statement [24] (word~) main::$9 ← > (signed dword) main::xpos#0 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 main::$9 ] ( main:3 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 main::$9 ] ) always clobbers reg byte a -Statement [25] (signed word~) main::$11 ← (signed word)(word~) main::$9 >> (signed byte) 2 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 main::$11 ] ( main:3 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 main::$11 ] ) always clobbers reg byte a -Statement [26] (signed word) bitmap_plot::x#0 ← (signed word) $a0 + (signed word~) main::$11 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 ] ( main:3 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 ] ) always clobbers reg byte a -Statement [27] (word~) main::$29 ← (word) main::idx_y#3 << (byte) 1 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 main::$29 ] ( main:3 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 main::$29 ] ) always clobbers reg byte a -Statement [28] (signed word*~) main::$31 ← (const signed word[$200]) SINUS#0 + (word~) main::$29 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 main::$31 ] ( main:3 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 main::$31 ] ) always clobbers reg byte a -Statement [29] (signed word) main::sin_y#0 ← *((signed word*~) main::$31) [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 main::sin_y#0 ] ( main:3 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 main::sin_y#0 ] ) always clobbers reg byte a reg byte y -Statement [30] (signed word) mul16s::a#2 ← (signed word) main::r#10 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 main::sin_y#0 mul16s::a#2 ] ( main:3 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 main::sin_y#0 mul16s::a#2 ] ) always clobbers reg byte a -Statement [31] (signed word) mul16s::b#2 ← (signed word) main::sin_y#0 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 mul16s::a#2 mul16s::b#2 ] ( main:3 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 mul16s::a#2 mul16s::b#2 ] ) always clobbers reg byte a -Statement [33] (signed dword) mul16s::return#4 ← (signed dword) mul16s::return#0 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 mul16s::return#4 ] ( main:3 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 mul16s::return#4 ] ) always clobbers reg byte a -Statement [34] (signed dword) main::ypos#0 ← (signed dword) mul16s::return#4 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 main::ypos#0 ] ( main:3 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 main::ypos#0 ] ) always clobbers reg byte a -Statement [35] (word~) main::$15 ← > (signed dword) main::ypos#0 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 main::$15 ] ( main:3 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 main::$15 ] ) always clobbers reg byte a -Statement [36] (signed word~) main::$17 ← (signed word)(word~) main::$15 >> (signed byte) 2 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 main::$17 ] ( main:3 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 main::$17 ] ) always clobbers reg byte a -Statement [37] (signed word~) main::$18 ← (signed byte) $64 + (signed word~) main::$17 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 main::$18 ] ( main:3 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 main::$18 ] ) always clobbers reg byte a -Statement [38] (byte) bitmap_plot::y#0 ← (byte)(word)(signed word~) main::$18 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 bitmap_plot::y#0 ] ( main:3 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 bitmap_plot::y#0 ] ) always clobbers reg byte a -Statement [40] *((const byte[$100]) plots_per_frame#0 + (byte) frame_cnt#0) ← ++ *((const byte[$100]) plots_per_frame#0 + (byte) frame_cnt#0) [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 ] ( main:3 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 ] ) always clobbers reg byte x -Statement [41] (word) main::idx_x#1 ← (word) main::idx_x#3 + (const byte) main::r_add#0 [ frame_cnt#0 main::r#10 main::idx_y#3 main::idx_x#1 ] ( main:3 [ frame_cnt#0 main::r#10 main::idx_y#3 main::idx_x#1 ] ) always clobbers reg byte a -Statement [42] if((word) main::idx_x#1<(word) $200) goto main::@13 [ frame_cnt#0 main::r#10 main::idx_y#3 main::idx_x#1 ] ( main:3 [ frame_cnt#0 main::r#10 main::idx_y#3 main::idx_x#1 ] ) always clobbers reg byte a -Statement [45] (word) main::idx_y#1 ← (word) main::idx_y#3 + (const byte) main::r_add#0 [ frame_cnt#0 main::r#10 main::idx_x#10 main::idx_y#1 ] ( main:3 [ frame_cnt#0 main::r#10 main::idx_x#10 main::idx_y#1 ] ) always clobbers reg byte a -Statement [46] if((word) main::idx_y#1<(word) $200) goto main::@14 [ frame_cnt#0 main::r#10 main::idx_x#10 main::idx_y#1 ] ( main:3 [ frame_cnt#0 main::r#10 main::idx_x#10 main::idx_y#1 ] ) always clobbers reg byte a -Statement [49] (signed word) main::r#1 ← (signed word) main::r#10 + (const byte) main::r_add#0 [ frame_cnt#0 main::idx_x#10 main::r#1 main::idx_y#10 ] ( main:3 [ frame_cnt#0 main::idx_x#10 main::r#1 main::idx_y#10 ] ) always clobbers reg byte a -Statement [50] if((signed word) main::r#1>=(signed word)(number) $200*(number) $c+(number) $100) goto main::@5 [ frame_cnt#0 main::idx_x#10 main::r#1 main::idx_y#10 ] ( main:3 [ frame_cnt#0 main::idx_x#10 main::r#1 main::idx_y#10 ] ) always clobbers reg byte a -Statement [52] (word~) bitmap_plot::$3 ← *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_plot::y#0) w= *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_plot::y#0) [ bitmap_plot::x#0 bitmap_plot::$3 ] ( main:3::bitmap_plot:39 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 bitmap_plot::$3 ] ) always clobbers reg byte a -Statement [53] (word~) bitmap_plot::$1 ← (word)(signed word) bitmap_plot::x#0 & (word) $fff8 [ bitmap_plot::x#0 bitmap_plot::$3 bitmap_plot::$1 ] ( main:3::bitmap_plot:39 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 bitmap_plot::$3 bitmap_plot::$1 ] ) always clobbers reg byte a -Statement [54] (byte*) bitmap_plot::plotter#1 ← (byte*)(word~) bitmap_plot::$3 + (word~) bitmap_plot::$1 [ bitmap_plot::x#0 bitmap_plot::plotter#1 ] ( main:3::bitmap_plot:39 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 bitmap_plot::plotter#1 ] ) always clobbers reg byte a -Statement [55] (byte~) bitmap_plot::$2 ← < (word)(signed word) bitmap_plot::x#0 [ bitmap_plot::plotter#1 bitmap_plot::$2 ] ( main:3::bitmap_plot:39 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::plotter#1 bitmap_plot::$2 ] ) always clobbers reg byte a -Statement [56] *((byte*) bitmap_plot::plotter#1) ← *((byte*) bitmap_plot::plotter#1) | *((const byte[$100]) bitmap_plot_bit#0 + (byte~) bitmap_plot::$2) [ ] ( main:3::bitmap_plot:39 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 ] ) always clobbers reg byte a reg byte y -Statement [59] (dword~) mul16u::mb#6 ← (word)(signed word) mul16s::b#3 [ mul16s::a#3 mul16s::b#3 mul16u::mb#6 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 mul16s::a#3 mul16s::b#3 mul16u::mb#6 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 mul16s::a#3 mul16s::b#3 mul16u::mb#6 ] main:3::sin16s_gen2:6::mul16s:140 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16u::mb#6 ] ) always clobbers reg byte a -Statement [60] (word~) mul16u::a#8 ← (word)(signed word) mul16s::a#3 [ mul16s::a#3 mul16s::b#3 mul16u::mb#6 mul16u::a#8 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 mul16s::a#3 mul16s::b#3 mul16u::mb#6 mul16u::a#8 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 mul16s::a#3 mul16s::b#3 mul16u::mb#6 mul16u::a#8 ] main:3::sin16s_gen2:6::mul16s:140 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16u::mb#6 mul16u::a#8 ] ) always clobbers reg byte a -Statement [62] (dword) mul16u::return#2 ← (dword) mul16u::res#2 [ mul16s::a#3 mul16s::b#3 mul16u::return#2 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 mul16s::a#3 mul16s::b#3 mul16u::return#2 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 mul16s::a#3 mul16s::b#3 mul16u::return#2 ] main:3::sin16s_gen2:6::mul16s:140 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16u::return#2 ] ) always clobbers reg byte a -Statement [63] (dword) mul16s::m#0 ← (dword) mul16u::return#2 [ mul16s::a#3 mul16s::b#3 mul16s::m#0 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 mul16s::a#3 mul16s::b#3 mul16s::m#0 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 mul16s::a#3 mul16s::b#3 mul16s::m#0 ] main:3::sin16s_gen2:6::mul16s:140 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16s::m#0 ] ) always clobbers reg byte a -Statement [64] if((signed word) mul16s::a#3>=(signed byte) 0) goto mul16s::@1 [ mul16s::a#3 mul16s::b#3 mul16s::m#0 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 mul16s::a#3 mul16s::b#3 mul16s::m#0 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 mul16s::a#3 mul16s::b#3 mul16s::m#0 ] main:3::sin16s_gen2:6::mul16s:140 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16s::m#0 ] ) always clobbers reg byte a -Statement [65] (word~) mul16s::$9 ← > (dword) mul16s::m#0 [ mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$9 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$9 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$9 ] main:3::sin16s_gen2:6::mul16s:140 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$9 ] ) always clobbers reg byte a -Statement [66] (word~) mul16s::$16 ← (word~) mul16s::$9 - (word)(signed word) mul16s::b#3 [ mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$16 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$16 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$16 ] main:3::sin16s_gen2:6::mul16s:140 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$16 ] ) always clobbers reg byte a -Statement [67] (dword) mul16s::m#1 ← (dword) mul16s::m#0 hi= (word~) mul16s::$16 [ mul16s::a#3 mul16s::b#3 mul16s::m#1 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 mul16s::a#3 mul16s::b#3 mul16s::m#1 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 mul16s::a#3 mul16s::b#3 mul16s::m#1 ] main:3::sin16s_gen2:6::mul16s:140 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16s::m#1 ] ) always clobbers reg byte a -Statement [69] if((signed word) mul16s::b#3>=(signed byte) 0) goto mul16s::@2 [ mul16s::a#3 mul16s::m#5 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 mul16s::a#3 mul16s::m#5 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 mul16s::a#3 mul16s::m#5 ] main:3::sin16s_gen2:6::mul16s:140 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::m#5 ] ) always clobbers reg byte a -Statement [70] (word~) mul16s::$13 ← > (dword) mul16s::m#5 [ mul16s::a#3 mul16s::m#5 mul16s::$13 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 mul16s::a#3 mul16s::m#5 mul16s::$13 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 mul16s::a#3 mul16s::m#5 mul16s::$13 ] main:3::sin16s_gen2:6::mul16s:140 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::m#5 mul16s::$13 ] ) always clobbers reg byte a -Statement [71] (word~) mul16s::$17 ← (word~) mul16s::$13 - (word)(signed word) mul16s::a#3 [ mul16s::m#5 mul16s::$17 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 mul16s::m#5 mul16s::$17 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 mul16s::m#5 mul16s::$17 ] main:3::sin16s_gen2:6::mul16s:140 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::m#5 mul16s::$17 ] ) always clobbers reg byte a -Statement [72] (dword) mul16s::m#2 ← (dword) mul16s::m#5 hi= (word~) mul16s::$17 [ mul16s::m#2 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 mul16s::m#2 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 mul16s::m#2 ] main:3::sin16s_gen2:6::mul16s:140 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::m#2 ] ) always clobbers reg byte a -Statement [74] (signed dword) mul16s::return#0 ← (signed dword)(dword) mul16s::m#4 [ mul16s::return#0 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 mul16s::return#0 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 mul16s::return#0 ] main:3::sin16s_gen2:6::mul16s:140 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::return#0 ] ) always clobbers reg byte a -Statement [78] if((word) mul16u::a#3!=(byte) 0) goto mul16u::@2 [ mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] ( main:3::mul16s:21::mul16u:61 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 mul16s::a#3 mul16s::b#3 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::mul16s:32::mul16u:61 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 mul16s::a#3 mul16s::b#3 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::sin16s_gen2:6::mul16s:140::mul16u:61 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:160::mul16u:193 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:165::mul16u:193 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:169::mul16u:193 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:175::mul16u:193 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:180::mul16u:193 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] ) always clobbers reg byte a -Statement [80] (byte~) mul16u::$1 ← (word) mul16u::a#3 & (byte) 1 [ mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] ( main:3::mul16s:21::mul16u:61 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 mul16s::a#3 mul16s::b#3 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::mul16s:32::mul16u:61 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 mul16s::a#3 mul16s::b#3 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::sin16s_gen2:6::mul16s:140::mul16u:61 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:160::mul16u:193 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:165::mul16u:193 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:169::mul16u:193 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:175::mul16u:193 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:180::mul16u:193 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] ) always clobbers reg byte a -Statement [82] (dword) mul16u::res#1 ← (dword) mul16u::res#2 + (dword) mul16u::mb#2 [ mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] ( main:3::mul16s:21::mul16u:61 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 mul16s::a#3 mul16s::b#3 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::mul16s:32::mul16u:61 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 mul16s::a#3 mul16s::b#3 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::sin16s_gen2:6::mul16s:140::mul16u:61 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:160::mul16u:193 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:165::mul16u:193 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:169::mul16u:193 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:175::mul16u:193 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:180::mul16u:193 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] ) always clobbers reg byte a -Statement [87] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 [ ] ( main:3::init_irq:14 [ frame_cnt#0 ] ) always clobbers reg byte a -Statement [88] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 [ ] ( main:3::init_irq:14 [ frame_cnt#0 ] ) always clobbers reg byte a -Statement [89] *((const byte*) CIA1_INTERRUPT#0) ← (const byte) CIA_INTERRUPT_CLEAR#0 [ ] ( main:3::init_irq:14 [ frame_cnt#0 ] ) always clobbers reg byte a -Statement [90] *((const byte*) VIC_CONTROL#0) ← *((const byte*) VIC_CONTROL#0) | (byte) $80 [ ] ( main:3::init_irq:14 [ frame_cnt#0 ] ) always clobbers reg byte a -Statement [91] *((const byte*) RASTER#0) ← (byte) 0 [ ] ( main:3::init_irq:14 [ frame_cnt#0 ] ) always clobbers reg byte a -Statement [92] *((const byte*) IRQ_ENABLE#0) ← (const byte) IRQ_RASTER#0 [ ] ( main:3::init_irq:14 [ frame_cnt#0 ] ) always clobbers reg byte a -Statement [93] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_CLOBBER)(void()) irq() [ ] ( main:3::init_irq:14 [ frame_cnt#0 ] ) always clobbers reg byte a -Statement [102] (byte*) memset::end#0 ← (byte*)(void*) memset::str#2 + (word) memset::num#2 [ memset::str#2 memset::c#3 memset::end#0 ] ( main:3::bitmap_clear:10::memset:97 [ frame_cnt#0 memset::str#2 memset::c#3 memset::end#0 ] main:3::bitmap_clear:10::memset:99 [ frame_cnt#0 memset::str#2 memset::c#3 memset::end#0 ] ) always clobbers reg byte a -Statement [103] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#2 [ memset::c#3 memset::end#0 memset::dst#3 ] ( main:3::bitmap_clear:10::memset:97 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#3 ] main:3::bitmap_clear:10::memset:99 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#3 ] ) always clobbers reg byte a -Statement [105] *((byte*) memset::dst#2) ← (byte) memset::c#3 [ memset::c#3 memset::end#0 memset::dst#2 ] ( main:3::bitmap_clear:10::memset:97 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#2 ] main:3::bitmap_clear:10::memset:99 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#2 ] ) always clobbers reg byte a reg byte y -Statement [107] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@1 [ memset::c#3 memset::end#0 memset::dst#1 ] ( main:3::bitmap_clear:10::memset:97 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#1 ] main:3::bitmap_clear:10::memset:99 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#1 ] ) always clobbers reg byte a -Statement [119] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 [ bitmap_init::y#2 bitmap_init::yoffs#2 bitmap_init::$7 ] ( main:3::bitmap_init:8 [ frame_cnt#0 bitmap_init::y#2 bitmap_init::yoffs#2 bitmap_init::$7 ] ) always clobbers reg byte a -Statement [126] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 [ bitmap_init::y#2 bitmap_init::yoffs#1 ] ( main:3::bitmap_init:8 [ frame_cnt#0 bitmap_init::y#2 bitmap_init::yoffs#1 ] ) always clobbers reg byte a -Statement [133] (dword) div32u16u::return#2 ← (dword) div32u16u::return#0 [ div32u16u::return#2 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 div32u16u::return#2 ] ) always clobbers reg byte a -Statement [134] (dword) sin16s_gen2::step#0 ← (dword) div32u16u::return#2 [ sin16s_gen2::step#0 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 ] ) always clobbers reg byte a -Statement [136] (dword) sin16s::x#0 ← (dword) sin16s_gen2::x#2 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::x#0 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::x#0 ] ) always clobbers reg byte a -Statement [138] (signed word) sin16s::return#0 ← (signed word) sin16s::return#1 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::return#0 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::return#0 ] ) always clobbers reg byte a -Statement [139] (signed word) mul16s::a#0 ← (signed word) sin16s::return#0 [ mul16s::a#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 mul16s::a#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 ] ) always clobbers reg byte a -Statement [141] (signed dword) mul16s::return#2 ← (signed dword) mul16s::return#0 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::return#2 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::return#2 ] ) always clobbers reg byte a -Statement [142] (signed dword~) sin16s_gen2::$5 ← (signed dword) mul16s::return#2 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s_gen2::$5 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s_gen2::$5 ] ) always clobbers reg byte a -Statement [143] (word~) sin16s_gen2::$6 ← > (signed dword~) sin16s_gen2::$5 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s_gen2::$6 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s_gen2::$6 ] ) always clobbers reg byte a -Statement [144] *((signed word*) sin16s_gen2::sintab#2) ← (signed word)(word~) sin16s_gen2::$6 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 ] ) always clobbers reg byte a reg byte y -Statement [145] (signed word*) sin16s_gen2::sintab#0 ← (signed word*) sin16s_gen2::sintab#2 + (const byte) SIZEOF_SIGNED_WORD [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::i#2 sin16s_gen2::sintab#0 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::i#2 sin16s_gen2::sintab#0 ] ) always clobbers reg byte a -Statement [146] (dword) sin16s_gen2::x#1 ← (dword) sin16s_gen2::x#2 + (dword) sin16s_gen2::step#0 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#1 sin16s_gen2::sintab#0 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#1 sin16s_gen2::sintab#0 ] ) always clobbers reg byte a -Statement [148] if((word) sin16s_gen2::i#1<(const word) sin16s_gen2::wavelength#0) goto sin16s_gen2::@1 [ sin16s_gen2::step#0 sin16s_gen2::x#1 sin16s_gen2::sintab#0 sin16s_gen2::i#1 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#1 sin16s_gen2::sintab#0 sin16s_gen2::i#1 ] ) always clobbers reg byte a -Statement [150] if((dword) sin16s::x#0<(const dword) PI_u4f28#0) goto sin16s::@1 [ sin16s::x#0 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::x#0 ] ) always clobbers reg byte a -Statement [151] (dword) sin16s::x#1 ← (dword) sin16s::x#0 - (const dword) PI_u4f28#0 [ sin16s::x#1 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::x#1 ] ) always clobbers reg byte a -Statement [153] if((dword) sin16s::x#4<(const dword) PI_HALF_u4f28#0) goto sin16s::@2 [ sin16s::x#4 sin16s::isUpper#2 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::x#4 sin16s::isUpper#2 ] ) always clobbers reg byte a -Statement [154] (dword) sin16s::x#2 ← (const dword) PI_u4f28#0 - (dword) sin16s::x#4 [ sin16s::isUpper#2 sin16s::x#2 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x#2 ] ) always clobbers reg byte a -Statement [156] (dword~) sin16s::$4 ← (dword) sin16s::x#6 << (byte) 3 [ sin16s::isUpper#2 sin16s::$4 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::$4 ] ) always clobbers reg byte a reg byte y -Statement [157] (word) sin16s::x1#0 ← > (dword~) sin16s::$4 [ sin16s::isUpper#2 sin16s::x1#0 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 ] ) always clobbers reg byte a -Statement [158] (word) mulu16_sel::v1#0 ← (word) sin16s::x1#0 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#0 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#0 ] ) always clobbers reg byte a -Statement [159] (word) mulu16_sel::v2#0 ← (word) sin16s::x1#0 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#0 mulu16_sel::v2#0 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#0 mulu16_sel::v2#0 ] ) always clobbers reg byte a -Statement [161] (word) mulu16_sel::return#0 ← (word) mulu16_sel::return#12 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#0 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#0 ] ) always clobbers reg byte a -Statement [162] (word) sin16s::x2#0 ← (word) mulu16_sel::return#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x2#0 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x2#0 ] ) always clobbers reg byte a -Statement [163] (word) mulu16_sel::v1#1 ← (word) sin16s::x2#0 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#1 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#1 ] ) always clobbers reg byte a -Statement [164] (word) mulu16_sel::v2#1 ← (word) sin16s::x1#0 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#1 mulu16_sel::v2#1 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#1 mulu16_sel::v2#1 ] ) always clobbers reg byte a -Statement [166] (word) mulu16_sel::return#1 ← (word) mulu16_sel::return#12 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#1 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#1 ] ) always clobbers reg byte a -Statement [167] (word) sin16s::x3#0 ← (word) mulu16_sel::return#1 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 ] ) always clobbers reg byte a -Statement [168] (word) mulu16_sel::v1#2 ← (word) sin16s::x3#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::v1#2 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::v1#2 ] ) always clobbers reg byte a -Statement [170] (word) mulu16_sel::return#2 ← (word) mulu16_sel::return#12 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::return#2 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::return#2 ] ) always clobbers reg byte a -Statement [171] (word) sin16s::x3_6#0 ← (word) mulu16_sel::return#2 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 sin16s::x3_6#0 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 sin16s::x3_6#0 ] ) always clobbers reg byte a -Statement [172] (word) sin16s::usinx#0 ← (word) sin16s::x1#0 - (word) sin16s::x3_6#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 sin16s::usinx#0 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 sin16s::usinx#0 ] ) always clobbers reg byte a -Statement [173] (word) mulu16_sel::v1#3 ← (word) sin16s::x3#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#3 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#3 ] ) always clobbers reg byte a -Statement [174] (word) mulu16_sel::v2#3 ← (word) sin16s::x1#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#3 mulu16_sel::v2#3 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#3 mulu16_sel::v2#3 ] ) always clobbers reg byte a -Statement [176] (word) mulu16_sel::return#10 ← (word) mulu16_sel::return#12 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::return#10 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::return#10 ] ) always clobbers reg byte a -Statement [177] (word) sin16s::x4#0 ← (word) mulu16_sel::return#10 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 sin16s::x4#0 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 sin16s::x4#0 ] ) always clobbers reg byte a -Statement [178] (word) mulu16_sel::v1#4 ← (word) sin16s::x4#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#4 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#4 ] ) always clobbers reg byte a -Statement [179] (word) mulu16_sel::v2#4 ← (word) sin16s::x1#0 [ sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::v1#4 mulu16_sel::v2#4 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::v1#4 mulu16_sel::v2#4 ] ) always clobbers reg byte a -Statement [181] (word) mulu16_sel::return#11 ← (word) mulu16_sel::return#12 [ sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::return#11 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::return#11 ] ) always clobbers reg byte a -Statement [182] (word) sin16s::x5#0 ← (word) mulu16_sel::return#11 [ sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5#0 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5#0 ] ) always clobbers reg byte a -Statement [183] (word) sin16s::x5_128#0 ← (word) sin16s::x5#0 >> (byte) 4 [ sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5_128#0 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5_128#0 ] ) always clobbers reg byte a -Statement [184] (word) sin16s::usinx#1 ← (word) sin16s::usinx#0 + (word) sin16s::x5_128#0 [ sin16s::isUpper#2 sin16s::usinx#1 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#1 ] ) always clobbers reg byte a -Statement [186] (signed word) sin16s::sinx#1 ← - (signed word)(word) sin16s::usinx#1 [ sin16s::sinx#1 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::sinx#1 ] ) always clobbers reg byte a -Statement [189] (signed word~) sin16s::return#5 ← (signed word)(word) sin16s::usinx#1 [ sin16s::return#5 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::return#5 ] ) always clobbers reg byte a -Statement [191] (word) mul16u::a#2 ← (word) mulu16_sel::v1#5 [ mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] ( main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:160 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:165 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:169 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:175 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:180 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] ) always clobbers reg byte a -Statement [192] (word) mul16u::b#1 ← (word) mulu16_sel::v2#5 [ mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] ( main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:160 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:165 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:169 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:175 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:180 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] ) always clobbers reg byte a -Statement [194] (dword) mul16u::return#3 ← (dword) mul16u::res#2 [ mulu16_sel::select#5 mul16u::return#3 ] ( main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:160 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::return#3 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:165 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::return#3 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:169 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::return#3 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:175 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::return#3 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:180 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::return#3 ] ) always clobbers reg byte a -Statement [195] (dword~) mulu16_sel::$0 ← (dword) mul16u::return#3 [ mulu16_sel::select#5 mulu16_sel::$0 ] ( main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:160 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mulu16_sel::$0 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:165 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mulu16_sel::$0 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:169 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mulu16_sel::$0 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:175 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mulu16_sel::$0 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:180 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mulu16_sel::$0 ] ) always clobbers reg byte a -Statement [196] (dword~) mulu16_sel::$1 ← (dword~) mulu16_sel::$0 << (byte) mulu16_sel::select#5 [ mulu16_sel::$1 ] ( main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:160 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::$1 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:165 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::$1 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:169 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::$1 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:175 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::$1 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:180 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::$1 ] ) always clobbers reg byte a -Statement [197] (word) mulu16_sel::return#12 ← > (dword~) mulu16_sel::$1 [ mulu16_sel::return#12 ] ( main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:160 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#12 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:165 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#12 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:169 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::return#12 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:175 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::return#12 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:180 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::return#12 ] ) always clobbers reg byte a -Statement [201] (word) divr16u::return#2 ← (word) divr16u::return#0 [ divr16u::return#2 rem16u#1 ] ( main:3::sin16s_gen2:6::div32u16u:132 [ frame_cnt#0 divr16u::return#2 rem16u#1 ] ) always clobbers reg byte a -Statement [202] (word) div32u16u::quotient_hi#0 ← (word) divr16u::return#2 [ div32u16u::quotient_hi#0 rem16u#1 ] ( main:3::sin16s_gen2:6::div32u16u:132 [ frame_cnt#0 div32u16u::quotient_hi#0 rem16u#1 ] ) always clobbers reg byte a -Statement [203] (word) divr16u::rem#4 ← (word) rem16u#1 [ div32u16u::quotient_hi#0 divr16u::rem#4 ] ( main:3::sin16s_gen2:6::div32u16u:132 [ frame_cnt#0 div32u16u::quotient_hi#0 divr16u::rem#4 ] ) always clobbers reg byte a -Statement [205] (word) divr16u::return#3 ← (word) divr16u::return#0 [ div32u16u::quotient_hi#0 divr16u::return#3 ] ( main:3::sin16s_gen2:6::div32u16u:132 [ frame_cnt#0 div32u16u::quotient_hi#0 divr16u::return#3 ] ) always clobbers reg byte a -Statement [206] (word) div32u16u::quotient_lo#0 ← (word) divr16u::return#3 [ div32u16u::quotient_hi#0 div32u16u::quotient_lo#0 ] ( main:3::sin16s_gen2:6::div32u16u:132 [ frame_cnt#0 div32u16u::quotient_hi#0 div32u16u::quotient_lo#0 ] ) always clobbers reg byte a -Statement [207] (dword) div32u16u::return#0 ← (word) div32u16u::quotient_hi#0 dw= (word) div32u16u::quotient_lo#0 [ div32u16u::return#0 ] ( main:3::sin16s_gen2:6::div32u16u:132 [ frame_cnt#0 div32u16u::return#0 ] ) always clobbers reg byte a -Statement [212] (byte~) divr16u::$1 ← > (word) divr16u::dividend#3 [ divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#0 divr16u::$1 ] ( main:3::sin16s_gen2:6::div32u16u:132::divr16u:200 [ frame_cnt#0 divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#0 divr16u::$1 ] main:3::sin16s_gen2:6::div32u16u:132::divr16u:204 [ frame_cnt#0 div32u16u::quotient_hi#0 divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#0 divr16u::$1 ] ) always clobbers reg byte a -Statement [215] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 [ divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#1 ] ( main:3::sin16s_gen2:6::div32u16u:132::divr16u:200 [ frame_cnt#0 divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#1 ] main:3::sin16s_gen2:6::div32u16u:132::divr16u:204 [ frame_cnt#0 div32u16u::quotient_hi#0 divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#1 ] ) always clobbers reg byte a -Statement [219] if((word) divr16u::rem#6<(const word) sin16s_gen2::wavelength#0) goto divr16u::@3 [ divr16u::i#2 divr16u::dividend#0 divr16u::rem#6 divr16u::quotient#1 ] ( main:3::sin16s_gen2:6::div32u16u:132::divr16u:200 [ frame_cnt#0 divr16u::i#2 divr16u::dividend#0 divr16u::rem#6 divr16u::quotient#1 ] main:3::sin16s_gen2:6::div32u16u:132::divr16u:204 [ frame_cnt#0 div32u16u::quotient_hi#0 divr16u::i#2 divr16u::dividend#0 divr16u::rem#6 divr16u::quotient#1 ] ) always clobbers reg byte a -Statement [221] (word) divr16u::rem#2 ← (word) divr16u::rem#6 - (const word) sin16s_gen2::wavelength#0 [ divr16u::i#2 divr16u::dividend#0 divr16u::quotient#2 divr16u::rem#2 ] ( main:3::sin16s_gen2:6::div32u16u:132::divr16u:200 [ frame_cnt#0 divr16u::i#2 divr16u::dividend#0 divr16u::quotient#2 divr16u::rem#2 ] main:3::sin16s_gen2:6::div32u16u:132::divr16u:204 [ frame_cnt#0 div32u16u::quotient_hi#0 divr16u::i#2 divr16u::dividend#0 divr16u::quotient#2 divr16u::rem#2 ] ) always clobbers reg byte a -Statement [225] (word) rem16u#1 ← (word) divr16u::rem#11 [ divr16u::return#0 rem16u#1 ] ( main:3::sin16s_gen2:6::div32u16u:132::divr16u:200 [ frame_cnt#0 divr16u::return#0 rem16u#1 ] main:3::sin16s_gen2:6::div32u16u:132::divr16u:204 [ frame_cnt#0 div32u16u::quotient_hi#0 divr16u::return#0 rem16u#1 ] ) always clobbers reg byte a -Statement [227] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 [ frame_cnt#0 ] ( [ frame_cnt#0 ] ) always clobbers reg byte a -Statement [228] if((byte) 0==(byte) frame_cnt#0) goto irq::@1 [ frame_cnt#0 ] ( [ frame_cnt#0 ] ) always clobbers reg byte a -Statement [231] *((const byte*) BGCOL#0) ← (const byte) BLACK#0 [ ] ( [ ] ) always clobbers reg byte a -Statement [232] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 [ ] ( [ ] ) always clobbers reg byte a -Statement [233] return [ ] ( [ ] ) always clobbers reg byte a reg byte x reg byte y -Potential registers zp ZP_WORD:2 [ main::idx_x#3 main::idx_x#10 main::idx_x#1 ] : zp ZP_WORD:2 , +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 +Statement [17] (signed word*~) main::$34 ← (const signed word[$200]) SINUS#0 + (word~) main::$32 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 main::$34 ] ( main:3 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 main::$34 ] ) always clobbers reg byte a +Statement [18] (signed word) main::cos_x#0 ← *((signed word*~) main::$34) [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 main::cos_x#0 ] ( main:3 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 main::cos_x#0 ] ) always clobbers reg byte a reg byte y +Statement [19] (signed word) mul16s::a#1 ← (signed word) main::r#10 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 main::cos_x#0 mul16s::a#1 ] ( main:3 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 main::cos_x#0 mul16s::a#1 ] ) always clobbers reg byte a +Statement [20] (signed word) mul16s::b#1 ← (signed word) main::cos_x#0 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 mul16s::a#1 mul16s::b#1 ] ( main:3 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 mul16s::a#1 mul16s::b#1 ] ) always clobbers reg byte a +Statement [22] (signed dword) mul16s::return#3 ← (signed dword) mul16s::return#0 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 mul16s::return#3 ] ( main:3 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 mul16s::return#3 ] ) always clobbers reg byte a +Statement [23] (signed dword) main::xpos#0 ← (signed dword) mul16s::return#3 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 main::xpos#0 ] ( main:3 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 main::xpos#0 ] ) always clobbers reg byte a +Statement [24] (word~) main::$9 ← > (signed dword) main::xpos#0 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 main::$9 ] ( main:3 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 main::$9 ] ) always clobbers reg byte a +Statement [25] (signed word~) main::$11 ← (signed word)(word~) main::$9 >> (signed byte) 2 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 main::$11 ] ( main:3 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 main::$11 ] ) always clobbers reg byte a +Statement [26] (signed word) bitmap_plot::x#0 ← (signed word) $a0 + (signed word~) main::$11 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 bitmap_plot::x#0 ] ( main:3 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 bitmap_plot::x#0 ] ) always clobbers reg byte a +Statement [27] (word~) main::$33 ← (word) main::idx_y#3 << (byte) 1 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 bitmap_plot::x#0 main::$33 ] ( main:3 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 bitmap_plot::x#0 main::$33 ] ) always clobbers reg byte a +Statement [28] (signed word*~) main::$35 ← (const signed word[$200]) SINUS#0 + (word~) main::$33 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 bitmap_plot::x#0 main::$35 ] ( main:3 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 bitmap_plot::x#0 main::$35 ] ) always clobbers reg byte a +Statement [29] (signed word) main::sin_y#0 ← *((signed word*~) main::$35) [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 bitmap_plot::x#0 main::sin_y#0 ] ( main:3 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 bitmap_plot::x#0 main::sin_y#0 ] ) always clobbers reg byte a reg byte y +Statement [30] (signed word) mul16s::a#2 ← (signed word) main::r#10 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 bitmap_plot::x#0 main::sin_y#0 mul16s::a#2 ] ( main:3 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 bitmap_plot::x#0 main::sin_y#0 mul16s::a#2 ] ) always clobbers reg byte a +Statement [31] (signed word) mul16s::b#2 ← (signed word) main::sin_y#0 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 bitmap_plot::x#0 mul16s::a#2 mul16s::b#2 ] ( main:3 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 bitmap_plot::x#0 mul16s::a#2 mul16s::b#2 ] ) always clobbers reg byte a +Statement [33] (signed dword) mul16s::return#4 ← (signed dword) mul16s::return#0 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 bitmap_plot::x#0 mul16s::return#4 ] ( main:3 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 bitmap_plot::x#0 mul16s::return#4 ] ) always clobbers reg byte a +Statement [34] (signed dword) main::ypos#0 ← (signed dword) mul16s::return#4 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 bitmap_plot::x#0 main::ypos#0 ] ( main:3 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 bitmap_plot::x#0 main::ypos#0 ] ) always clobbers reg byte a +Statement [35] (word~) main::$15 ← > (signed dword) main::ypos#0 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 bitmap_plot::x#0 main::$15 ] ( main:3 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 bitmap_plot::x#0 main::$15 ] ) always clobbers reg byte a +Statement [36] (signed word~) main::$17 ← (signed word)(word~) main::$15 >> (signed byte) 2 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 bitmap_plot::x#0 main::$17 ] ( main:3 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 bitmap_plot::x#0 main::$17 ] ) always clobbers reg byte a +Statement [37] (signed word~) main::$18 ← (signed byte) $64 + (signed word~) main::$17 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 bitmap_plot::x#0 main::$18 ] ( main:3 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 bitmap_plot::x#0 main::$18 ] ) always clobbers reg byte a +Statement [38] (byte) bitmap_plot::y#0 ← (byte)(word)(signed word~) main::$18 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 bitmap_plot::x#0 bitmap_plot::y#0 ] ( main:3 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 bitmap_plot::x#0 bitmap_plot::y#0 ] ) always clobbers reg byte a +Statement [40] *((const byte[$100]) plots_per_frame#0 + (byte) frame_cnt#0) ← ++ *((const byte[$100]) plots_per_frame#0 + (byte) frame_cnt#0) [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 ] ( main:3 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 ] ) always clobbers reg byte x +Statement [41] (word) main::idx_x#1 ← (word) main::idx_x#11 + (byte) main::r_add#10 [ frame_cnt#0 main::r#10 main::idx_y#3 main::r_add#10 main::idx_x#1 ] ( main:3 [ frame_cnt#0 main::r#10 main::idx_y#3 main::r_add#10 main::idx_x#1 ] ) always clobbers reg byte a +Statement [42] if((word) main::idx_x#1<(word) $200) goto main::@16 [ frame_cnt#0 main::r#10 main::idx_y#3 main::r_add#10 main::idx_x#1 ] ( main:3 [ frame_cnt#0 main::r#10 main::idx_y#3 main::r_add#10 main::idx_x#1 ] ) always clobbers reg byte a +Statement [45] (word) main::idx_y#1 ← (word) main::idx_y#3 + (byte) main::r_add#10 [ frame_cnt#0 main::r#10 main::r_add#10 main::idx_x#10 main::idx_y#1 ] ( main:3 [ frame_cnt#0 main::r#10 main::r_add#10 main::idx_x#10 main::idx_y#1 ] ) always clobbers reg byte a +Statement [46] if((word) main::idx_y#1<(word) $200) goto main::@17 [ frame_cnt#0 main::r#10 main::r_add#10 main::idx_x#10 main::idx_y#1 ] ( main:3 [ frame_cnt#0 main::r#10 main::r_add#10 main::idx_x#10 main::idx_y#1 ] ) always clobbers reg byte a +Statement [49] (signed word) main::r#1 ← (signed word) main::r#10 + (byte) main::r_add#10 [ frame_cnt#0 main::r_add#10 main::idx_x#10 main::r#1 main::idx_y#10 ] ( main:3 [ frame_cnt#0 main::r_add#10 main::idx_x#10 main::r#1 main::idx_y#10 ] ) always clobbers reg byte a +Statement [50] if((word) main::idx_x#10!=(byte) 0) goto main::@5 [ frame_cnt#0 main::r_add#10 main::idx_x#10 main::r#1 main::idx_y#10 ] ( main:3 [ frame_cnt#0 main::r_add#10 main::idx_x#10 main::r#1 main::idx_y#10 ] ) always clobbers reg byte a +Statement [51] if((byte) main::r_add#10==(byte) 1) goto main::@5 [ frame_cnt#0 main::r_add#10 main::idx_x#10 main::r#1 main::idx_y#10 ] ( main:3 [ frame_cnt#0 main::r_add#10 main::idx_x#10 main::r#1 main::idx_y#10 ] ) always clobbers reg byte a +Statement [54] if((signed word) main::r#1>=(signed word)(number) $200*(number) $c+(number) $100) goto main::@7 [ frame_cnt#0 main::idx_x#10 main::r#1 main::idx_y#10 main::r_add#12 ] ( main:3 [ frame_cnt#0 main::idx_x#10 main::r#1 main::idx_y#10 main::r_add#12 ] ) always clobbers reg byte a +Statement [56] (word~) bitmap_plot::$3 ← *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_plot::y#0) w= *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_plot::y#0) [ bitmap_plot::x#0 bitmap_plot::$3 ] ( main:3::bitmap_plot:39 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 bitmap_plot::x#0 bitmap_plot::$3 ] ) always clobbers reg byte a +Statement [57] (word~) bitmap_plot::$1 ← (word)(signed word) bitmap_plot::x#0 & (word) $fff8 [ bitmap_plot::x#0 bitmap_plot::$3 bitmap_plot::$1 ] ( main:3::bitmap_plot:39 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 bitmap_plot::x#0 bitmap_plot::$3 bitmap_plot::$1 ] ) always clobbers reg byte a +Statement [58] (byte*) bitmap_plot::plotter#1 ← (byte*)(word~) bitmap_plot::$3 + (word~) bitmap_plot::$1 [ bitmap_plot::x#0 bitmap_plot::plotter#1 ] ( main:3::bitmap_plot:39 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 bitmap_plot::x#0 bitmap_plot::plotter#1 ] ) always clobbers reg byte a +Statement [59] (byte~) bitmap_plot::$2 ← < (word)(signed word) bitmap_plot::x#0 [ bitmap_plot::plotter#1 bitmap_plot::$2 ] ( main:3::bitmap_plot:39 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 bitmap_plot::plotter#1 bitmap_plot::$2 ] ) always clobbers reg byte a +Statement [60] *((byte*) bitmap_plot::plotter#1) ← *((byte*) bitmap_plot::plotter#1) | *((const byte[$100]) bitmap_plot_bit#0 + (byte~) bitmap_plot::$2) [ ] ( main:3::bitmap_plot:39 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 ] ) always clobbers reg byte a reg byte y +Statement [63] (dword~) mul16u::mb#6 ← (word)(signed word) mul16s::b#3 [ mul16s::a#3 mul16s::b#3 mul16u::mb#6 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 mul16s::a#3 mul16s::b#3 mul16u::mb#6 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 bitmap_plot::x#0 mul16s::a#3 mul16s::b#3 mul16u::mb#6 ] main:3::sin16s_gen2:6::mul16s:144 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16u::mb#6 ] ) always clobbers reg byte a +Statement [64] (word~) mul16u::a#8 ← (word)(signed word) mul16s::a#3 [ mul16s::a#3 mul16s::b#3 mul16u::mb#6 mul16u::a#8 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 mul16s::a#3 mul16s::b#3 mul16u::mb#6 mul16u::a#8 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 bitmap_plot::x#0 mul16s::a#3 mul16s::b#3 mul16u::mb#6 mul16u::a#8 ] main:3::sin16s_gen2:6::mul16s:144 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16u::mb#6 mul16u::a#8 ] ) always clobbers reg byte a +Statement [66] (dword) mul16u::return#2 ← (dword) mul16u::res#2 [ mul16s::a#3 mul16s::b#3 mul16u::return#2 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 mul16s::a#3 mul16s::b#3 mul16u::return#2 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 bitmap_plot::x#0 mul16s::a#3 mul16s::b#3 mul16u::return#2 ] main:3::sin16s_gen2:6::mul16s:144 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16u::return#2 ] ) always clobbers reg byte a +Statement [67] (dword) mul16s::m#0 ← (dword) mul16u::return#2 [ mul16s::a#3 mul16s::b#3 mul16s::m#0 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 mul16s::a#3 mul16s::b#3 mul16s::m#0 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 bitmap_plot::x#0 mul16s::a#3 mul16s::b#3 mul16s::m#0 ] main:3::sin16s_gen2:6::mul16s:144 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16s::m#0 ] ) always clobbers reg byte a +Statement [68] if((signed word) mul16s::a#3>=(signed byte) 0) goto mul16s::@1 [ mul16s::a#3 mul16s::b#3 mul16s::m#0 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 mul16s::a#3 mul16s::b#3 mul16s::m#0 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 bitmap_plot::x#0 mul16s::a#3 mul16s::b#3 mul16s::m#0 ] main:3::sin16s_gen2:6::mul16s:144 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16s::m#0 ] ) always clobbers reg byte a +Statement [69] (word~) mul16s::$9 ← > (dword) mul16s::m#0 [ mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$9 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$9 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 bitmap_plot::x#0 mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$9 ] main:3::sin16s_gen2:6::mul16s:144 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$9 ] ) always clobbers reg byte a +Statement [70] (word~) mul16s::$16 ← (word~) mul16s::$9 - (word)(signed word) mul16s::b#3 [ mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$16 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$16 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 bitmap_plot::x#0 mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$16 ] main:3::sin16s_gen2:6::mul16s:144 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$16 ] ) always clobbers reg byte a +Statement [71] (dword) mul16s::m#1 ← (dword) mul16s::m#0 hi= (word~) mul16s::$16 [ mul16s::a#3 mul16s::b#3 mul16s::m#1 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 mul16s::a#3 mul16s::b#3 mul16s::m#1 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 bitmap_plot::x#0 mul16s::a#3 mul16s::b#3 mul16s::m#1 ] main:3::sin16s_gen2:6::mul16s:144 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16s::m#1 ] ) always clobbers reg byte a +Statement [73] if((signed word) mul16s::b#3>=(signed byte) 0) goto mul16s::@2 [ mul16s::a#3 mul16s::m#5 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 mul16s::a#3 mul16s::m#5 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 bitmap_plot::x#0 mul16s::a#3 mul16s::m#5 ] main:3::sin16s_gen2:6::mul16s:144 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::m#5 ] ) always clobbers reg byte a +Statement [74] (word~) mul16s::$13 ← > (dword) mul16s::m#5 [ mul16s::a#3 mul16s::m#5 mul16s::$13 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 mul16s::a#3 mul16s::m#5 mul16s::$13 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 bitmap_plot::x#0 mul16s::a#3 mul16s::m#5 mul16s::$13 ] main:3::sin16s_gen2:6::mul16s:144 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::m#5 mul16s::$13 ] ) always clobbers reg byte a +Statement [75] (word~) mul16s::$17 ← (word~) mul16s::$13 - (word)(signed word) mul16s::a#3 [ mul16s::m#5 mul16s::$17 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 mul16s::m#5 mul16s::$17 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 bitmap_plot::x#0 mul16s::m#5 mul16s::$17 ] main:3::sin16s_gen2:6::mul16s:144 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::m#5 mul16s::$17 ] ) always clobbers reg byte a +Statement [76] (dword) mul16s::m#2 ← (dword) mul16s::m#5 hi= (word~) mul16s::$17 [ mul16s::m#2 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 mul16s::m#2 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 bitmap_plot::x#0 mul16s::m#2 ] main:3::sin16s_gen2:6::mul16s:144 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::m#2 ] ) always clobbers reg byte a +Statement [78] (signed dword) mul16s::return#0 ← (signed dword)(dword) mul16s::m#4 [ mul16s::return#0 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 mul16s::return#0 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 bitmap_plot::x#0 mul16s::return#0 ] main:3::sin16s_gen2:6::mul16s:144 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::return#0 ] ) always clobbers reg byte a +Statement [82] if((word) mul16u::a#3!=(byte) 0) goto mul16u::@2 [ mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] ( main:3::mul16s:21::mul16u:65 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 mul16s::a#3 mul16s::b#3 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::mul16s:32::mul16u:65 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 bitmap_plot::x#0 mul16s::a#3 mul16s::b#3 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::sin16s_gen2:6::mul16s:144::mul16u:65 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::sin16s_gen2:6::sin16s:141::mulu16_sel:164::mul16u:197 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::sin16s_gen2:6::sin16s:141::mulu16_sel:169::mul16u:197 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::sin16s_gen2:6::sin16s:141::mulu16_sel:173::mul16u:197 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::sin16s_gen2:6::sin16s:141::mulu16_sel:179::mul16u:197 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::sin16s_gen2:6::sin16s:141::mulu16_sel:184::mul16u:197 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] ) always clobbers reg byte a +Statement [84] (byte~) mul16u::$1 ← (word) mul16u::a#3 & (byte) 1 [ mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] ( main:3::mul16s:21::mul16u:65 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 mul16s::a#3 mul16s::b#3 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::mul16s:32::mul16u:65 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 bitmap_plot::x#0 mul16s::a#3 mul16s::b#3 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::sin16s_gen2:6::mul16s:144::mul16u:65 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::sin16s_gen2:6::sin16s:141::mulu16_sel:164::mul16u:197 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::sin16s_gen2:6::sin16s:141::mulu16_sel:169::mul16u:197 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::sin16s_gen2:6::sin16s:141::mulu16_sel:173::mul16u:197 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::sin16s_gen2:6::sin16s:141::mulu16_sel:179::mul16u:197 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::sin16s_gen2:6::sin16s:141::mulu16_sel:184::mul16u:197 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] ) always clobbers reg byte a +Statement [86] (dword) mul16u::res#1 ← (dword) mul16u::res#2 + (dword) mul16u::mb#2 [ mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] ( main:3::mul16s:21::mul16u:65 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 mul16s::a#3 mul16s::b#3 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::mul16s:32::mul16u:65 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 bitmap_plot::x#0 mul16s::a#3 mul16s::b#3 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::sin16s_gen2:6::mul16s:144::mul16u:65 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::sin16s_gen2:6::sin16s:141::mulu16_sel:164::mul16u:197 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::sin16s_gen2:6::sin16s:141::mulu16_sel:169::mul16u:197 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::sin16s_gen2:6::sin16s:141::mulu16_sel:173::mul16u:197 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::sin16s_gen2:6::sin16s:141::mulu16_sel:179::mul16u:197 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::sin16s_gen2:6::sin16s:141::mulu16_sel:184::mul16u:197 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] ) always clobbers reg byte a +Statement [91] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 [ ] ( main:3::init_irq:14 [ frame_cnt#0 ] ) always clobbers reg byte a +Statement [92] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 [ ] ( main:3::init_irq:14 [ frame_cnt#0 ] ) always clobbers reg byte a +Statement [93] *((const byte*) CIA1_INTERRUPT#0) ← (const byte) CIA_INTERRUPT_CLEAR#0 [ ] ( main:3::init_irq:14 [ frame_cnt#0 ] ) always clobbers reg byte a +Statement [94] *((const byte*) VIC_CONTROL#0) ← *((const byte*) VIC_CONTROL#0) | (byte) $80 [ ] ( main:3::init_irq:14 [ frame_cnt#0 ] ) always clobbers reg byte a +Statement [95] *((const byte*) RASTER#0) ← (byte) 0 [ ] ( main:3::init_irq:14 [ frame_cnt#0 ] ) always clobbers reg byte a +Statement [96] *((const byte*) IRQ_ENABLE#0) ← (const byte) IRQ_RASTER#0 [ ] ( main:3::init_irq:14 [ frame_cnt#0 ] ) always clobbers reg byte a +Statement [97] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_CLOBBER)(void()) irq() [ ] ( main:3::init_irq:14 [ frame_cnt#0 ] ) always clobbers reg byte a +Statement [106] (byte*) memset::end#0 ← (byte*)(void*) memset::str#2 + (word) memset::num#2 [ memset::str#2 memset::c#3 memset::end#0 ] ( main:3::bitmap_clear:10::memset:101 [ frame_cnt#0 memset::str#2 memset::c#3 memset::end#0 ] main:3::bitmap_clear:10::memset:103 [ frame_cnt#0 memset::str#2 memset::c#3 memset::end#0 ] ) always clobbers reg byte a +Statement [107] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#2 [ memset::c#3 memset::end#0 memset::dst#3 ] ( main:3::bitmap_clear:10::memset:101 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#3 ] main:3::bitmap_clear:10::memset:103 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#3 ] ) always clobbers reg byte a +Statement [109] *((byte*) memset::dst#2) ← (byte) memset::c#3 [ memset::c#3 memset::end#0 memset::dst#2 ] ( main:3::bitmap_clear:10::memset:101 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#2 ] main:3::bitmap_clear:10::memset:103 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#2 ] ) always clobbers reg byte a reg byte y +Statement [111] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@1 [ memset::c#3 memset::end#0 memset::dst#1 ] ( main:3::bitmap_clear:10::memset:101 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#1 ] main:3::bitmap_clear:10::memset:103 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#1 ] ) always clobbers reg byte a +Statement [123] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 [ bitmap_init::y#2 bitmap_init::yoffs#2 bitmap_init::$7 ] ( main:3::bitmap_init:8 [ frame_cnt#0 bitmap_init::y#2 bitmap_init::yoffs#2 bitmap_init::$7 ] ) always clobbers reg byte a +Statement [130] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 [ bitmap_init::y#2 bitmap_init::yoffs#1 ] ( main:3::bitmap_init:8 [ frame_cnt#0 bitmap_init::y#2 bitmap_init::yoffs#1 ] ) always clobbers reg byte a +Statement [137] (dword) div32u16u::return#2 ← (dword) div32u16u::return#0 [ div32u16u::return#2 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 div32u16u::return#2 ] ) always clobbers reg byte a +Statement [138] (dword) sin16s_gen2::step#0 ← (dword) div32u16u::return#2 [ sin16s_gen2::step#0 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 ] ) always clobbers reg byte a +Statement [140] (dword) sin16s::x#0 ← (dword) sin16s_gen2::x#2 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::x#0 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::x#0 ] ) always clobbers reg byte a +Statement [142] (signed word) sin16s::return#0 ← (signed word) sin16s::return#1 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::return#0 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::return#0 ] ) always clobbers reg byte a +Statement [143] (signed word) mul16s::a#0 ← (signed word) sin16s::return#0 [ mul16s::a#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 mul16s::a#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 ] ) always clobbers reg byte a +Statement [145] (signed dword) mul16s::return#2 ← (signed dword) mul16s::return#0 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::return#2 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::return#2 ] ) always clobbers reg byte a +Statement [146] (signed dword~) sin16s_gen2::$5 ← (signed dword) mul16s::return#2 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s_gen2::$5 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s_gen2::$5 ] ) always clobbers reg byte a +Statement [147] (word~) sin16s_gen2::$6 ← > (signed dword~) sin16s_gen2::$5 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s_gen2::$6 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s_gen2::$6 ] ) always clobbers reg byte a +Statement [148] *((signed word*) sin16s_gen2::sintab#2) ← (signed word)(word~) sin16s_gen2::$6 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 ] ) always clobbers reg byte a reg byte y +Statement [149] (signed word*) sin16s_gen2::sintab#0 ← (signed word*) sin16s_gen2::sintab#2 + (const byte) SIZEOF_SIGNED_WORD [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::i#2 sin16s_gen2::sintab#0 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::i#2 sin16s_gen2::sintab#0 ] ) always clobbers reg byte a +Statement [150] (dword) sin16s_gen2::x#1 ← (dword) sin16s_gen2::x#2 + (dword) sin16s_gen2::step#0 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#1 sin16s_gen2::sintab#0 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#1 sin16s_gen2::sintab#0 ] ) always clobbers reg byte a +Statement [152] if((word) sin16s_gen2::i#1<(const word) sin16s_gen2::wavelength#0) goto sin16s_gen2::@1 [ sin16s_gen2::step#0 sin16s_gen2::x#1 sin16s_gen2::sintab#0 sin16s_gen2::i#1 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#1 sin16s_gen2::sintab#0 sin16s_gen2::i#1 ] ) always clobbers reg byte a +Statement [154] if((dword) sin16s::x#0<(const dword) PI_u4f28#0) goto sin16s::@1 [ sin16s::x#0 ] ( main:3::sin16s_gen2:6::sin16s:141 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::x#0 ] ) always clobbers reg byte a +Statement [155] (dword) sin16s::x#1 ← (dword) sin16s::x#0 - (const dword) PI_u4f28#0 [ sin16s::x#1 ] ( main:3::sin16s_gen2:6::sin16s:141 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::x#1 ] ) always clobbers reg byte a +Statement [157] if((dword) sin16s::x#4<(const dword) PI_HALF_u4f28#0) goto sin16s::@2 [ sin16s::x#4 sin16s::isUpper#2 ] ( main:3::sin16s_gen2:6::sin16s:141 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::x#4 sin16s::isUpper#2 ] ) always clobbers reg byte a +Statement [158] (dword) sin16s::x#2 ← (const dword) PI_u4f28#0 - (dword) sin16s::x#4 [ sin16s::isUpper#2 sin16s::x#2 ] ( main:3::sin16s_gen2:6::sin16s:141 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x#2 ] ) always clobbers reg byte a +Statement [160] (dword~) sin16s::$4 ← (dword) sin16s::x#6 << (byte) 3 [ sin16s::isUpper#2 sin16s::$4 ] ( main:3::sin16s_gen2:6::sin16s:141 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::$4 ] ) always clobbers reg byte a reg byte y +Statement [161] (word) sin16s::x1#0 ← > (dword~) sin16s::$4 [ sin16s::isUpper#2 sin16s::x1#0 ] ( main:3::sin16s_gen2:6::sin16s:141 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 ] ) always clobbers reg byte a +Statement [162] (word) mulu16_sel::v1#0 ← (word) sin16s::x1#0 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#0 ] ( main:3::sin16s_gen2:6::sin16s:141 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#0 ] ) always clobbers reg byte a +Statement [163] (word) mulu16_sel::v2#0 ← (word) sin16s::x1#0 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#0 mulu16_sel::v2#0 ] ( main:3::sin16s_gen2:6::sin16s:141 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#0 mulu16_sel::v2#0 ] ) always clobbers reg byte a +Statement [165] (word) mulu16_sel::return#0 ← (word) mulu16_sel::return#12 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#0 ] ( main:3::sin16s_gen2:6::sin16s:141 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#0 ] ) always clobbers reg byte a +Statement [166] (word) sin16s::x2#0 ← (word) mulu16_sel::return#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x2#0 ] ( main:3::sin16s_gen2:6::sin16s:141 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x2#0 ] ) always clobbers reg byte a +Statement [167] (word) mulu16_sel::v1#1 ← (word) sin16s::x2#0 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#1 ] ( main:3::sin16s_gen2:6::sin16s:141 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#1 ] ) always clobbers reg byte a +Statement [168] (word) mulu16_sel::v2#1 ← (word) sin16s::x1#0 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#1 mulu16_sel::v2#1 ] ( main:3::sin16s_gen2:6::sin16s:141 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#1 mulu16_sel::v2#1 ] ) always clobbers reg byte a +Statement [170] (word) mulu16_sel::return#1 ← (word) mulu16_sel::return#12 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#1 ] ( main:3::sin16s_gen2:6::sin16s:141 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#1 ] ) always clobbers reg byte a +Statement [171] (word) sin16s::x3#0 ← (word) mulu16_sel::return#1 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 ] ( main:3::sin16s_gen2:6::sin16s:141 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 ] ) always clobbers reg byte a +Statement [172] (word) mulu16_sel::v1#2 ← (word) sin16s::x3#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::v1#2 ] ( main:3::sin16s_gen2:6::sin16s:141 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::v1#2 ] ) always clobbers reg byte a +Statement [174] (word) mulu16_sel::return#2 ← (word) mulu16_sel::return#12 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::return#2 ] ( main:3::sin16s_gen2:6::sin16s:141 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::return#2 ] ) always clobbers reg byte a +Statement [175] (word) sin16s::x3_6#0 ← (word) mulu16_sel::return#2 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 sin16s::x3_6#0 ] ( main:3::sin16s_gen2:6::sin16s:141 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 sin16s::x3_6#0 ] ) always clobbers reg byte a +Statement [176] (word) sin16s::usinx#0 ← (word) sin16s::x1#0 - (word) sin16s::x3_6#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 sin16s::usinx#0 ] ( main:3::sin16s_gen2:6::sin16s:141 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 sin16s::usinx#0 ] ) always clobbers reg byte a +Statement [177] (word) mulu16_sel::v1#3 ← (word) sin16s::x3#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#3 ] ( main:3::sin16s_gen2:6::sin16s:141 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#3 ] ) always clobbers reg byte a +Statement [178] (word) mulu16_sel::v2#3 ← (word) sin16s::x1#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#3 mulu16_sel::v2#3 ] ( main:3::sin16s_gen2:6::sin16s:141 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#3 mulu16_sel::v2#3 ] ) always clobbers reg byte a +Statement [180] (word) mulu16_sel::return#10 ← (word) mulu16_sel::return#12 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::return#10 ] ( main:3::sin16s_gen2:6::sin16s:141 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::return#10 ] ) always clobbers reg byte a +Statement [181] (word) sin16s::x4#0 ← (word) mulu16_sel::return#10 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 sin16s::x4#0 ] ( main:3::sin16s_gen2:6::sin16s:141 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 sin16s::x4#0 ] ) always clobbers reg byte a +Statement [182] (word) mulu16_sel::v1#4 ← (word) sin16s::x4#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#4 ] ( main:3::sin16s_gen2:6::sin16s:141 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#4 ] ) always clobbers reg byte a +Statement [183] (word) mulu16_sel::v2#4 ← (word) sin16s::x1#0 [ sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::v1#4 mulu16_sel::v2#4 ] ( main:3::sin16s_gen2:6::sin16s:141 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::v1#4 mulu16_sel::v2#4 ] ) always clobbers reg byte a +Statement [185] (word) mulu16_sel::return#11 ← (word) mulu16_sel::return#12 [ sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::return#11 ] ( main:3::sin16s_gen2:6::sin16s:141 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::return#11 ] ) always clobbers reg byte a +Statement [186] (word) sin16s::x5#0 ← (word) mulu16_sel::return#11 [ sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5#0 ] ( main:3::sin16s_gen2:6::sin16s:141 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5#0 ] ) always clobbers reg byte a +Statement [187] (word) sin16s::x5_128#0 ← (word) sin16s::x5#0 >> (byte) 4 [ sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5_128#0 ] ( main:3::sin16s_gen2:6::sin16s:141 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5_128#0 ] ) always clobbers reg byte a +Statement [188] (word) sin16s::usinx#1 ← (word) sin16s::usinx#0 + (word) sin16s::x5_128#0 [ sin16s::isUpper#2 sin16s::usinx#1 ] ( main:3::sin16s_gen2:6::sin16s:141 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#1 ] ) always clobbers reg byte a +Statement [190] (signed word) sin16s::sinx#1 ← - (signed word)(word) sin16s::usinx#1 [ sin16s::sinx#1 ] ( main:3::sin16s_gen2:6::sin16s:141 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::sinx#1 ] ) always clobbers reg byte a +Statement [193] (signed word~) sin16s::return#5 ← (signed word)(word) sin16s::usinx#1 [ sin16s::return#5 ] ( main:3::sin16s_gen2:6::sin16s:141 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::return#5 ] ) always clobbers reg byte a +Statement [195] (word) mul16u::a#2 ← (word) mulu16_sel::v1#5 [ mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] ( main:3::sin16s_gen2:6::sin16s:141::mulu16_sel:164 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:141::mulu16_sel:169 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:141::mulu16_sel:173 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:141::mulu16_sel:179 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:141::mulu16_sel:184 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] ) always clobbers reg byte a +Statement [196] (word) mul16u::b#1 ← (word) mulu16_sel::v2#5 [ mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] ( main:3::sin16s_gen2:6::sin16s:141::mulu16_sel:164 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:141::mulu16_sel:169 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:141::mulu16_sel:173 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:141::mulu16_sel:179 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:141::mulu16_sel:184 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] ) always clobbers reg byte a +Statement [198] (dword) mul16u::return#3 ← (dword) mul16u::res#2 [ mulu16_sel::select#5 mul16u::return#3 ] ( main:3::sin16s_gen2:6::sin16s:141::mulu16_sel:164 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::return#3 ] main:3::sin16s_gen2:6::sin16s:141::mulu16_sel:169 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::return#3 ] main:3::sin16s_gen2:6::sin16s:141::mulu16_sel:173 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::return#3 ] main:3::sin16s_gen2:6::sin16s:141::mulu16_sel:179 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::return#3 ] main:3::sin16s_gen2:6::sin16s:141::mulu16_sel:184 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::return#3 ] ) always clobbers reg byte a +Statement [199] (dword~) mulu16_sel::$0 ← (dword) mul16u::return#3 [ mulu16_sel::select#5 mulu16_sel::$0 ] ( main:3::sin16s_gen2:6::sin16s:141::mulu16_sel:164 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mulu16_sel::$0 ] main:3::sin16s_gen2:6::sin16s:141::mulu16_sel:169 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mulu16_sel::$0 ] main:3::sin16s_gen2:6::sin16s:141::mulu16_sel:173 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mulu16_sel::$0 ] main:3::sin16s_gen2:6::sin16s:141::mulu16_sel:179 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mulu16_sel::$0 ] main:3::sin16s_gen2:6::sin16s:141::mulu16_sel:184 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mulu16_sel::$0 ] ) always clobbers reg byte a +Statement [200] (dword~) mulu16_sel::$1 ← (dword~) mulu16_sel::$0 << (byte) mulu16_sel::select#5 [ mulu16_sel::$1 ] ( main:3::sin16s_gen2:6::sin16s:141::mulu16_sel:164 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::$1 ] main:3::sin16s_gen2:6::sin16s:141::mulu16_sel:169 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::$1 ] main:3::sin16s_gen2:6::sin16s:141::mulu16_sel:173 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::$1 ] main:3::sin16s_gen2:6::sin16s:141::mulu16_sel:179 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::$1 ] main:3::sin16s_gen2:6::sin16s:141::mulu16_sel:184 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::$1 ] ) always clobbers reg byte a +Statement [201] (word) mulu16_sel::return#12 ← > (dword~) mulu16_sel::$1 [ mulu16_sel::return#12 ] ( main:3::sin16s_gen2:6::sin16s:141::mulu16_sel:164 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#12 ] main:3::sin16s_gen2:6::sin16s:141::mulu16_sel:169 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#12 ] main:3::sin16s_gen2:6::sin16s:141::mulu16_sel:173 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::return#12 ] main:3::sin16s_gen2:6::sin16s:141::mulu16_sel:179 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::return#12 ] main:3::sin16s_gen2:6::sin16s:141::mulu16_sel:184 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::return#12 ] ) always clobbers reg byte a +Statement [205] (word) divr16u::return#2 ← (word) divr16u::return#0 [ divr16u::return#2 rem16u#1 ] ( main:3::sin16s_gen2:6::div32u16u:136 [ frame_cnt#0 divr16u::return#2 rem16u#1 ] ) always clobbers reg byte a +Statement [206] (word) div32u16u::quotient_hi#0 ← (word) divr16u::return#2 [ div32u16u::quotient_hi#0 rem16u#1 ] ( main:3::sin16s_gen2:6::div32u16u:136 [ frame_cnt#0 div32u16u::quotient_hi#0 rem16u#1 ] ) always clobbers reg byte a +Statement [207] (word) divr16u::rem#4 ← (word) rem16u#1 [ div32u16u::quotient_hi#0 divr16u::rem#4 ] ( main:3::sin16s_gen2:6::div32u16u:136 [ frame_cnt#0 div32u16u::quotient_hi#0 divr16u::rem#4 ] ) always clobbers reg byte a +Statement [209] (word) divr16u::return#3 ← (word) divr16u::return#0 [ div32u16u::quotient_hi#0 divr16u::return#3 ] ( main:3::sin16s_gen2:6::div32u16u:136 [ frame_cnt#0 div32u16u::quotient_hi#0 divr16u::return#3 ] ) always clobbers reg byte a +Statement [210] (word) div32u16u::quotient_lo#0 ← (word) divr16u::return#3 [ div32u16u::quotient_hi#0 div32u16u::quotient_lo#0 ] ( main:3::sin16s_gen2:6::div32u16u:136 [ frame_cnt#0 div32u16u::quotient_hi#0 div32u16u::quotient_lo#0 ] ) always clobbers reg byte a +Statement [211] (dword) div32u16u::return#0 ← (word) div32u16u::quotient_hi#0 dw= (word) div32u16u::quotient_lo#0 [ div32u16u::return#0 ] ( main:3::sin16s_gen2:6::div32u16u:136 [ frame_cnt#0 div32u16u::return#0 ] ) always clobbers reg byte a +Statement [216] (byte~) divr16u::$1 ← > (word) divr16u::dividend#3 [ divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#0 divr16u::$1 ] ( main:3::sin16s_gen2:6::div32u16u:136::divr16u:204 [ frame_cnt#0 divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#0 divr16u::$1 ] main:3::sin16s_gen2:6::div32u16u:136::divr16u:208 [ frame_cnt#0 div32u16u::quotient_hi#0 divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#0 divr16u::$1 ] ) always clobbers reg byte a +Statement [219] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 [ divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#1 ] ( main:3::sin16s_gen2:6::div32u16u:136::divr16u:204 [ frame_cnt#0 divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#1 ] main:3::sin16s_gen2:6::div32u16u:136::divr16u:208 [ frame_cnt#0 div32u16u::quotient_hi#0 divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#1 ] ) always clobbers reg byte a +Statement [223] if((word) divr16u::rem#6<(const word) sin16s_gen2::wavelength#0) goto divr16u::@3 [ divr16u::i#2 divr16u::dividend#0 divr16u::rem#6 divr16u::quotient#1 ] ( main:3::sin16s_gen2:6::div32u16u:136::divr16u:204 [ frame_cnt#0 divr16u::i#2 divr16u::dividend#0 divr16u::rem#6 divr16u::quotient#1 ] main:3::sin16s_gen2:6::div32u16u:136::divr16u:208 [ frame_cnt#0 div32u16u::quotient_hi#0 divr16u::i#2 divr16u::dividend#0 divr16u::rem#6 divr16u::quotient#1 ] ) always clobbers reg byte a +Statement [225] (word) divr16u::rem#2 ← (word) divr16u::rem#6 - (const word) sin16s_gen2::wavelength#0 [ divr16u::i#2 divr16u::dividend#0 divr16u::quotient#2 divr16u::rem#2 ] ( main:3::sin16s_gen2:6::div32u16u:136::divr16u:204 [ frame_cnt#0 divr16u::i#2 divr16u::dividend#0 divr16u::quotient#2 divr16u::rem#2 ] main:3::sin16s_gen2:6::div32u16u:136::divr16u:208 [ frame_cnt#0 div32u16u::quotient_hi#0 divr16u::i#2 divr16u::dividend#0 divr16u::quotient#2 divr16u::rem#2 ] ) always clobbers reg byte a +Statement [229] (word) rem16u#1 ← (word) divr16u::rem#11 [ divr16u::return#0 rem16u#1 ] ( main:3::sin16s_gen2:6::div32u16u:136::divr16u:204 [ frame_cnt#0 divr16u::return#0 rem16u#1 ] main:3::sin16s_gen2:6::div32u16u:136::divr16u:208 [ frame_cnt#0 div32u16u::quotient_hi#0 divr16u::return#0 rem16u#1 ] ) always clobbers reg byte a +Statement [231] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 [ frame_cnt#0 ] ( [ frame_cnt#0 ] ) always clobbers reg byte a +Statement [232] if((byte) 0==(byte) frame_cnt#0) goto irq::@1 [ frame_cnt#0 ] ( [ frame_cnt#0 ] ) always clobbers reg byte a +Statement [235] *((const byte*) BGCOL#0) ← (const byte) BLACK#0 [ ] ( [ ] ) always clobbers reg byte a +Statement [236] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 [ ] ( [ ] ) always clobbers reg byte a +Statement [237] return [ ] ( [ ] ) always clobbers reg byte a reg byte x reg byte y +Potential registers zp ZP_WORD:2 [ main::idx_x#11 main::idx_x#10 main::idx_x#1 ] : zp ZP_WORD:2 , Potential registers zp ZP_WORD:4 [ main::r#10 main::r#1 ] : zp ZP_WORD:4 , Potential registers zp ZP_WORD:6 [ main::idx_y#3 main::idx_y#10 main::idx_y#1 ] : zp ZP_WORD:6 , -Potential registers zp ZP_WORD:8 [ mul16s::a#3 mul16s::a#1 mul16s::a#2 mul16s::a#0 ] : zp ZP_WORD:8 , -Potential registers zp ZP_WORD:10 [ mul16s::b#3 mul16s::b#1 mul16s::b#2 ] : zp ZP_WORD:10 , -Potential registers zp ZP_DWORD:12 [ mul16s::m#4 mul16s::m#5 mul16s::m#1 mul16s::m#0 mul16s::m#2 ] : zp ZP_DWORD:12 , -Potential registers zp ZP_WORD:16 [ mul16u::b#1 ] : zp ZP_WORD:16 , -Potential registers zp ZP_WORD:18 [ mul16u::a#3 mul16u::a#6 mul16u::a#8 mul16u::a#2 mul16u::a#0 ] : zp ZP_WORD:18 , -Potential registers zp ZP_DWORD:20 [ mul16u::res#2 mul16u::res#6 mul16u::res#1 ] : zp ZP_DWORD:20 , -Potential registers zp ZP_DWORD:24 [ mul16u::mb#2 mul16u::mb#0 mul16u::mb#6 mul16u::mb#1 ] : zp ZP_DWORD:24 , -Potential registers zp ZP_WORD:28 [ memset::str#2 ] : zp ZP_WORD:28 , -Potential registers zp ZP_WORD:30 [ memset::num#2 ] : zp ZP_WORD:30 , -Potential registers zp ZP_BYTE:32 [ memset::c#3 ] : zp ZP_BYTE:32 , reg byte x , -Potential registers zp ZP_WORD:33 [ memset::dst#2 memset::dst#3 memset::dst#1 ] : zp ZP_WORD:33 , -Potential registers zp ZP_BYTE:35 [ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ] : zp ZP_BYTE:35 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:36 [ bitmap_init::x#2 bitmap_init::x#1 ] : zp ZP_BYTE:36 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:37 [ bitmap_init::y#2 bitmap_init::y#1 ] : zp ZP_BYTE:37 , reg byte x , reg byte y , -Potential registers zp ZP_WORD:38 [ bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 ] : zp ZP_WORD:38 , -Potential registers zp ZP_DWORD:40 [ sin16s_gen2::x#2 sin16s_gen2::x#1 ] : zp ZP_DWORD:40 , -Potential registers zp ZP_WORD:44 [ sin16s_gen2::sintab#2 sin16s_gen2::sintab#0 ] : zp ZP_WORD:44 , -Potential registers zp ZP_WORD:46 [ sin16s_gen2::i#2 sin16s_gen2::i#1 ] : zp ZP_WORD:46 , -Potential registers zp ZP_BYTE:48 [ sin16s::isUpper#2 ] : zp ZP_BYTE:48 , reg byte x , -Potential registers zp ZP_DWORD:49 [ sin16s::x#6 sin16s::x#4 sin16s::x#0 sin16s::x#1 sin16s::x#2 ] : zp ZP_DWORD:49 , -Potential registers zp ZP_WORD:53 [ sin16s::return#1 sin16s::return#5 sin16s::sinx#1 ] : zp ZP_WORD:53 , -Potential registers zp ZP_WORD:55 [ mulu16_sel::v1#5 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 ] : zp ZP_WORD:55 , -Potential registers zp ZP_WORD:57 [ mulu16_sel::v2#5 mulu16_sel::v2#3 mulu16_sel::v2#4 mulu16_sel::v2#0 mulu16_sel::v2#1 ] : zp ZP_WORD:57 , -Potential registers zp ZP_BYTE:59 [ mulu16_sel::select#5 ] : zp ZP_BYTE:59 , reg byte x , reg byte y , -Potential registers zp ZP_WORD:60 [ divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u::rem#11 divr16u::rem#6 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 ] : zp ZP_WORD:60 , -Potential registers zp ZP_WORD:62 [ divr16u::dividend#3 divr16u::dividend#5 divr16u::dividend#0 ] : zp ZP_WORD:62 , -Potential registers zp ZP_WORD:64 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 ] : zp ZP_WORD:64 , -Potential registers zp ZP_BYTE:66 [ divr16u::i#2 divr16u::i#1 ] : zp ZP_BYTE:66 , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:67 [ frame_cnt#2 frame_cnt#0 frame_cnt#1 ] : zp ZP_BYTE:67 , -Potential registers zp ZP_WORD:68 [ main::$28 ] : zp ZP_WORD:68 , -Potential registers zp ZP_WORD:70 [ main::$30 ] : zp ZP_WORD:70 , -Potential registers zp ZP_WORD:72 [ main::cos_x#0 ] : zp ZP_WORD:72 , -Potential registers zp ZP_DWORD:74 [ mul16s::return#3 ] : zp ZP_DWORD:74 , -Potential registers zp ZP_DWORD:78 [ main::xpos#0 ] : zp ZP_DWORD:78 , -Potential registers zp ZP_WORD:82 [ main::$9 ] : zp ZP_WORD:82 , -Potential registers zp ZP_WORD:84 [ main::$11 ] : zp ZP_WORD:84 , -Potential registers zp ZP_WORD:86 [ bitmap_plot::x#0 ] : zp ZP_WORD:86 , -Potential registers zp ZP_WORD:88 [ main::$29 ] : zp ZP_WORD:88 , -Potential registers zp ZP_WORD:90 [ main::$31 ] : zp ZP_WORD:90 , -Potential registers zp ZP_WORD:92 [ main::sin_y#0 ] : zp ZP_WORD:92 , -Potential registers zp ZP_DWORD:94 [ mul16s::return#4 ] : zp ZP_DWORD:94 , -Potential registers zp ZP_DWORD:98 [ main::ypos#0 ] : zp ZP_DWORD:98 , -Potential registers zp ZP_WORD:102 [ main::$15 ] : zp ZP_WORD:102 , -Potential registers zp ZP_WORD:104 [ main::$17 ] : zp ZP_WORD:104 , -Potential registers zp ZP_WORD:106 [ main::$18 ] : zp ZP_WORD:106 , -Potential registers zp ZP_BYTE:108 [ bitmap_plot::y#0 ] : zp ZP_BYTE:108 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_WORD:109 [ bitmap_plot::$3 ] : zp ZP_WORD:109 , -Potential registers zp ZP_WORD:111 [ bitmap_plot::$1 ] : zp ZP_WORD:111 , -Potential registers zp ZP_WORD:113 [ bitmap_plot::plotter#1 ] : zp ZP_WORD:113 , -Potential registers zp ZP_BYTE:115 [ bitmap_plot::$2 ] : zp ZP_BYTE:115 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_DWORD:116 [ mul16u::return#2 ] : zp ZP_DWORD:116 , -Potential registers zp ZP_WORD:120 [ mul16s::$9 ] : zp ZP_WORD:120 , -Potential registers zp ZP_WORD:122 [ mul16s::$16 ] : zp ZP_WORD:122 , -Potential registers zp ZP_WORD:124 [ mul16s::$13 ] : zp ZP_WORD:124 , -Potential registers zp ZP_WORD:126 [ mul16s::$17 ] : zp ZP_WORD:126 , -Potential registers zp ZP_DWORD:128 [ mul16s::return#0 ] : zp ZP_DWORD:128 , -Potential registers zp ZP_BYTE:132 [ mul16u::$1 ] : zp ZP_BYTE:132 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_WORD:133 [ memset::end#0 ] : zp ZP_WORD:133 , -Potential registers zp ZP_BYTE:135 [ bitmap_init::$7 ] : zp ZP_BYTE:135 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:136 [ bitmap_init::$4 ] : zp ZP_BYTE:136 , reg byte a , reg byte x , reg byte y , reg byte alu , -Potential registers zp ZP_BYTE:137 [ bitmap_init::$5 ] : zp ZP_BYTE:137 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:138 [ bitmap_init::$6 ] : zp ZP_BYTE:138 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_DWORD:139 [ div32u16u::return#2 ] : zp ZP_DWORD:139 , -Potential registers zp ZP_DWORD:143 [ sin16s_gen2::step#0 ] : zp ZP_DWORD:143 , -Potential registers zp ZP_WORD:147 [ sin16s::return#0 ] : zp ZP_WORD:147 , -Potential registers zp ZP_DWORD:149 [ mul16s::return#2 ] : zp ZP_DWORD:149 , -Potential registers zp ZP_DWORD:153 [ sin16s_gen2::$5 ] : zp ZP_DWORD:153 , -Potential registers zp ZP_WORD:157 [ sin16s_gen2::$6 ] : zp ZP_WORD:157 , -Potential registers zp ZP_DWORD:159 [ sin16s::$4 ] : zp ZP_DWORD:159 , -Potential registers zp ZP_WORD:163 [ sin16s::x1#0 ] : zp ZP_WORD:163 , -Potential registers zp ZP_WORD:165 [ mulu16_sel::return#0 ] : zp ZP_WORD:165 , -Potential registers zp ZP_WORD:167 [ sin16s::x2#0 ] : zp ZP_WORD:167 , -Potential registers zp ZP_WORD:169 [ mulu16_sel::return#1 ] : zp ZP_WORD:169 , -Potential registers zp ZP_WORD:171 [ sin16s::x3#0 ] : zp ZP_WORD:171 , -Potential registers zp ZP_WORD:173 [ mulu16_sel::return#2 ] : zp ZP_WORD:173 , -Potential registers zp ZP_WORD:175 [ sin16s::x3_6#0 ] : zp ZP_WORD:175 , -Potential registers zp ZP_WORD:177 [ sin16s::usinx#0 ] : zp ZP_WORD:177 , -Potential registers zp ZP_WORD:179 [ mulu16_sel::return#10 ] : zp ZP_WORD:179 , -Potential registers zp ZP_WORD:181 [ sin16s::x4#0 ] : zp ZP_WORD:181 , -Potential registers zp ZP_WORD:183 [ mulu16_sel::return#11 ] : zp ZP_WORD:183 , -Potential registers zp ZP_WORD:185 [ sin16s::x5#0 ] : zp ZP_WORD:185 , -Potential registers zp ZP_WORD:187 [ sin16s::x5_128#0 ] : zp ZP_WORD:187 , -Potential registers zp ZP_WORD:189 [ sin16s::usinx#1 ] : zp ZP_WORD:189 , -Potential registers zp ZP_DWORD:191 [ mul16u::return#3 ] : zp ZP_DWORD:191 , -Potential registers zp ZP_DWORD:195 [ mulu16_sel::$0 ] : zp ZP_DWORD:195 , -Potential registers zp ZP_DWORD:199 [ mulu16_sel::$1 ] : zp ZP_DWORD:199 , -Potential registers zp ZP_WORD:203 [ mulu16_sel::return#12 ] : zp ZP_WORD:203 , -Potential registers zp ZP_WORD:205 [ divr16u::return#2 ] : zp ZP_WORD:205 , -Potential registers zp ZP_WORD:207 [ div32u16u::quotient_hi#0 ] : zp ZP_WORD:207 , -Potential registers zp ZP_WORD:209 [ divr16u::return#3 ] : zp ZP_WORD:209 , -Potential registers zp ZP_WORD:211 [ div32u16u::quotient_lo#0 ] : zp ZP_WORD:211 , -Potential registers zp ZP_DWORD:213 [ div32u16u::return#0 ] : zp ZP_DWORD:213 , -Potential registers zp ZP_BYTE:217 [ divr16u::$1 ] : zp ZP_BYTE:217 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:218 [ divr16u::$2 ] : zp ZP_BYTE:218 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_WORD:219 [ rem16u#1 ] : zp ZP_WORD:219 , +Potential registers zp ZP_BYTE:8 [ main::r_add#10 main::r_add#12 main::r_add#1 ] : zp ZP_BYTE:8 , +Potential registers zp ZP_WORD:9 [ mul16s::a#3 mul16s::a#1 mul16s::a#2 mul16s::a#0 ] : zp ZP_WORD:9 , +Potential registers zp ZP_WORD:11 [ mul16s::b#3 mul16s::b#1 mul16s::b#2 ] : zp ZP_WORD:11 , +Potential registers zp ZP_DWORD:13 [ mul16s::m#4 mul16s::m#5 mul16s::m#1 mul16s::m#0 mul16s::m#2 ] : zp ZP_DWORD:13 , +Potential registers zp ZP_WORD:17 [ mul16u::b#1 ] : zp ZP_WORD:17 , +Potential registers zp ZP_WORD:19 [ mul16u::a#3 mul16u::a#6 mul16u::a#8 mul16u::a#2 mul16u::a#0 ] : zp ZP_WORD:19 , +Potential registers zp ZP_DWORD:21 [ mul16u::res#2 mul16u::res#6 mul16u::res#1 ] : zp ZP_DWORD:21 , +Potential registers zp ZP_DWORD:25 [ mul16u::mb#2 mul16u::mb#0 mul16u::mb#6 mul16u::mb#1 ] : zp ZP_DWORD:25 , +Potential registers zp ZP_WORD:29 [ memset::str#2 ] : zp ZP_WORD:29 , +Potential registers zp ZP_WORD:31 [ memset::num#2 ] : zp ZP_WORD:31 , +Potential registers zp ZP_BYTE:33 [ memset::c#3 ] : zp ZP_BYTE:33 , reg byte x , +Potential registers zp ZP_WORD:34 [ memset::dst#2 memset::dst#3 memset::dst#1 ] : zp ZP_WORD:34 , +Potential registers zp ZP_BYTE:36 [ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ] : zp ZP_BYTE:36 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:37 [ bitmap_init::x#2 bitmap_init::x#1 ] : zp ZP_BYTE:37 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:38 [ bitmap_init::y#2 bitmap_init::y#1 ] : zp ZP_BYTE:38 , reg byte x , reg byte y , +Potential registers zp ZP_WORD:39 [ bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 ] : zp ZP_WORD:39 , +Potential registers zp ZP_DWORD:41 [ sin16s_gen2::x#2 sin16s_gen2::x#1 ] : zp ZP_DWORD:41 , +Potential registers zp ZP_WORD:45 [ sin16s_gen2::sintab#2 sin16s_gen2::sintab#0 ] : zp ZP_WORD:45 , +Potential registers zp ZP_WORD:47 [ sin16s_gen2::i#2 sin16s_gen2::i#1 ] : zp ZP_WORD:47 , +Potential registers zp ZP_BYTE:49 [ sin16s::isUpper#2 ] : zp ZP_BYTE:49 , reg byte x , +Potential registers zp ZP_DWORD:50 [ sin16s::x#6 sin16s::x#4 sin16s::x#0 sin16s::x#1 sin16s::x#2 ] : zp ZP_DWORD:50 , +Potential registers zp ZP_WORD:54 [ sin16s::return#1 sin16s::return#5 sin16s::sinx#1 ] : zp ZP_WORD:54 , +Potential registers zp ZP_WORD:56 [ mulu16_sel::v1#5 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 ] : zp ZP_WORD:56 , +Potential registers zp ZP_WORD:58 [ mulu16_sel::v2#5 mulu16_sel::v2#3 mulu16_sel::v2#4 mulu16_sel::v2#0 mulu16_sel::v2#1 ] : zp ZP_WORD:58 , +Potential registers zp ZP_BYTE:60 [ mulu16_sel::select#5 ] : zp ZP_BYTE:60 , reg byte x , reg byte y , +Potential registers zp ZP_WORD:61 [ divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u::rem#11 divr16u::rem#6 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 ] : zp ZP_WORD:61 , +Potential registers zp ZP_WORD:63 [ divr16u::dividend#3 divr16u::dividend#5 divr16u::dividend#0 ] : zp ZP_WORD:63 , +Potential registers zp ZP_WORD:65 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 ] : zp ZP_WORD:65 , +Potential registers zp ZP_BYTE:67 [ divr16u::i#2 divr16u::i#1 ] : zp ZP_BYTE:67 , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:68 [ frame_cnt#2 frame_cnt#0 frame_cnt#1 ] : zp ZP_BYTE:68 , +Potential registers zp ZP_WORD:69 [ main::$32 ] : zp ZP_WORD:69 , +Potential registers zp ZP_WORD:71 [ main::$34 ] : zp ZP_WORD:71 , +Potential registers zp ZP_WORD:73 [ main::cos_x#0 ] : zp ZP_WORD:73 , +Potential registers zp ZP_DWORD:75 [ mul16s::return#3 ] : zp ZP_DWORD:75 , +Potential registers zp ZP_DWORD:79 [ main::xpos#0 ] : zp ZP_DWORD:79 , +Potential registers zp ZP_WORD:83 [ main::$9 ] : zp ZP_WORD:83 , +Potential registers zp ZP_WORD:85 [ main::$11 ] : zp ZP_WORD:85 , +Potential registers zp ZP_WORD:87 [ bitmap_plot::x#0 ] : zp ZP_WORD:87 , +Potential registers zp ZP_WORD:89 [ main::$33 ] : zp ZP_WORD:89 , +Potential registers zp ZP_WORD:91 [ main::$35 ] : zp ZP_WORD:91 , +Potential registers zp ZP_WORD:93 [ main::sin_y#0 ] : zp ZP_WORD:93 , +Potential registers zp ZP_DWORD:95 [ mul16s::return#4 ] : zp ZP_DWORD:95 , +Potential registers zp ZP_DWORD:99 [ main::ypos#0 ] : zp ZP_DWORD:99 , +Potential registers zp ZP_WORD:103 [ main::$15 ] : zp ZP_WORD:103 , +Potential registers zp ZP_WORD:105 [ main::$17 ] : zp ZP_WORD:105 , +Potential registers zp ZP_WORD:107 [ main::$18 ] : zp ZP_WORD:107 , +Potential registers zp ZP_BYTE:109 [ bitmap_plot::y#0 ] : zp ZP_BYTE:109 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_WORD:110 [ bitmap_plot::$3 ] : zp ZP_WORD:110 , +Potential registers zp ZP_WORD:112 [ bitmap_plot::$1 ] : zp ZP_WORD:112 , +Potential registers zp ZP_WORD:114 [ bitmap_plot::plotter#1 ] : zp ZP_WORD:114 , +Potential registers zp ZP_BYTE:116 [ bitmap_plot::$2 ] : zp ZP_BYTE:116 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_DWORD:117 [ mul16u::return#2 ] : zp ZP_DWORD:117 , +Potential registers zp ZP_WORD:121 [ mul16s::$9 ] : zp ZP_WORD:121 , +Potential registers zp ZP_WORD:123 [ mul16s::$16 ] : zp ZP_WORD:123 , +Potential registers zp ZP_WORD:125 [ mul16s::$13 ] : zp ZP_WORD:125 , +Potential registers zp ZP_WORD:127 [ mul16s::$17 ] : zp ZP_WORD:127 , +Potential registers zp ZP_DWORD:129 [ mul16s::return#0 ] : zp ZP_DWORD:129 , +Potential registers zp ZP_BYTE:133 [ mul16u::$1 ] : zp ZP_BYTE:133 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_WORD:134 [ memset::end#0 ] : zp ZP_WORD:134 , +Potential registers zp ZP_BYTE:136 [ bitmap_init::$7 ] : zp ZP_BYTE:136 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:137 [ bitmap_init::$4 ] : zp ZP_BYTE:137 , reg byte a , reg byte x , reg byte y , reg byte alu , +Potential registers zp ZP_BYTE:138 [ bitmap_init::$5 ] : zp ZP_BYTE:138 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:139 [ bitmap_init::$6 ] : zp ZP_BYTE:139 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_DWORD:140 [ div32u16u::return#2 ] : zp ZP_DWORD:140 , +Potential registers zp ZP_DWORD:144 [ sin16s_gen2::step#0 ] : zp ZP_DWORD:144 , +Potential registers zp ZP_WORD:148 [ sin16s::return#0 ] : zp ZP_WORD:148 , +Potential registers zp ZP_DWORD:150 [ mul16s::return#2 ] : zp ZP_DWORD:150 , +Potential registers zp ZP_DWORD:154 [ sin16s_gen2::$5 ] : zp ZP_DWORD:154 , +Potential registers zp ZP_WORD:158 [ sin16s_gen2::$6 ] : zp ZP_WORD:158 , +Potential registers zp ZP_DWORD:160 [ sin16s::$4 ] : zp ZP_DWORD:160 , +Potential registers zp ZP_WORD:164 [ sin16s::x1#0 ] : zp ZP_WORD:164 , +Potential registers zp ZP_WORD:166 [ mulu16_sel::return#0 ] : zp ZP_WORD:166 , +Potential registers zp ZP_WORD:168 [ sin16s::x2#0 ] : zp ZP_WORD:168 , +Potential registers zp ZP_WORD:170 [ mulu16_sel::return#1 ] : zp ZP_WORD:170 , +Potential registers zp ZP_WORD:172 [ sin16s::x3#0 ] : zp ZP_WORD:172 , +Potential registers zp ZP_WORD:174 [ mulu16_sel::return#2 ] : zp ZP_WORD:174 , +Potential registers zp ZP_WORD:176 [ sin16s::x3_6#0 ] : zp ZP_WORD:176 , +Potential registers zp ZP_WORD:178 [ sin16s::usinx#0 ] : zp ZP_WORD:178 , +Potential registers zp ZP_WORD:180 [ mulu16_sel::return#10 ] : zp ZP_WORD:180 , +Potential registers zp ZP_WORD:182 [ sin16s::x4#0 ] : zp ZP_WORD:182 , +Potential registers zp ZP_WORD:184 [ mulu16_sel::return#11 ] : zp ZP_WORD:184 , +Potential registers zp ZP_WORD:186 [ sin16s::x5#0 ] : zp ZP_WORD:186 , +Potential registers zp ZP_WORD:188 [ sin16s::x5_128#0 ] : zp ZP_WORD:188 , +Potential registers zp ZP_WORD:190 [ sin16s::usinx#1 ] : zp ZP_WORD:190 , +Potential registers zp ZP_DWORD:192 [ mul16u::return#3 ] : zp ZP_DWORD:192 , +Potential registers zp ZP_DWORD:196 [ mulu16_sel::$0 ] : zp ZP_DWORD:196 , +Potential registers zp ZP_DWORD:200 [ mulu16_sel::$1 ] : zp ZP_DWORD:200 , +Potential registers zp ZP_WORD:204 [ mulu16_sel::return#12 ] : zp ZP_WORD:204 , +Potential registers zp ZP_WORD:206 [ divr16u::return#2 ] : zp ZP_WORD:206 , +Potential registers zp ZP_WORD:208 [ div32u16u::quotient_hi#0 ] : zp ZP_WORD:208 , +Potential registers zp ZP_WORD:210 [ divr16u::return#3 ] : zp ZP_WORD:210 , +Potential registers zp ZP_WORD:212 [ div32u16u::quotient_lo#0 ] : zp ZP_WORD:212 , +Potential registers zp ZP_DWORD:214 [ div32u16u::return#0 ] : zp ZP_DWORD:214 , +Potential registers zp ZP_BYTE:218 [ divr16u::$1 ] : zp ZP_BYTE:218 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:219 [ divr16u::$2 ] : zp ZP_BYTE:219 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_WORD:220 [ rem16u#1 ] : zp ZP_WORD:220 , REGISTER UPLIFT SCOPES -Uplift Scope [mul16u] 346.86: zp ZP_DWORD:20 [ mul16u::res#2 mul16u::res#6 mul16u::res#1 ] 253.57: zp ZP_DWORD:24 [ mul16u::mb#2 mul16u::mb#0 mul16u::mb#6 mul16u::mb#1 ] 202: zp ZP_BYTE:132 [ mul16u::$1 ] 180.67: zp ZP_WORD:18 [ mul16u::a#3 mul16u::a#6 mul16u::a#8 mul16u::a#2 mul16u::a#0 ] 4: zp ZP_WORD:16 [ mul16u::b#1 ] 4: zp ZP_DWORD:116 [ mul16u::return#2 ] 4: zp ZP_DWORD:191 [ mul16u::return#3 ] -Uplift Scope [main] 22: zp ZP_WORD:68 [ main::$28 ] 22: zp ZP_WORD:70 [ main::$30 ] 22: zp ZP_DWORD:78 [ main::xpos#0 ] 22: zp ZP_WORD:84 [ main::$11 ] 22: zp ZP_WORD:88 [ main::$29 ] 22: zp ZP_WORD:90 [ main::$31 ] 22: zp ZP_DWORD:98 [ main::ypos#0 ] 22: zp ZP_WORD:104 [ main::$17 ] 19.43: zp ZP_WORD:6 [ main::idx_y#3 main::idx_y#10 main::idx_y#1 ] 17.79: zp ZP_WORD:4 [ main::r#10 main::r#1 ] 15.41: zp ZP_WORD:2 [ main::idx_x#3 main::idx_x#10 main::idx_x#1 ] 11: zp ZP_WORD:72 [ main::cos_x#0 ] 11: zp ZP_WORD:82 [ main::$9 ] 11: zp ZP_WORD:92 [ main::sin_y#0 ] 11: zp ZP_WORD:102 [ main::$15 ] 11: zp ZP_WORD:106 [ main::$18 ] -Uplift Scope [divr16u] 106.92: zp ZP_WORD:60 [ divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u::rem#11 divr16u::rem#6 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 ] 35.54: zp ZP_WORD:64 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 ] 22: zp ZP_BYTE:217 [ divr16u::$1 ] 22: zp ZP_BYTE:218 [ divr16u::$2 ] 18.19: zp ZP_BYTE:66 [ divr16u::i#2 divr16u::i#1 ] 9.75: zp ZP_WORD:62 [ divr16u::dividend#3 divr16u::dividend#5 divr16u::dividend#0 ] 4: zp ZP_WORD:205 [ divr16u::return#2 ] 4: zp ZP_WORD:209 [ divr16u::return#3 ] -Uplift Scope [mul16s] 46.69: zp ZP_WORD:8 [ mul16s::a#3 mul16s::a#1 mul16s::a#2 mul16s::a#0 ] 46.18: zp ZP_WORD:10 [ mul16s::b#3 mul16s::b#1 mul16s::b#2 ] 22: zp ZP_DWORD:74 [ mul16s::return#3 ] 22: zp ZP_DWORD:94 [ mul16s::return#4 ] 22: zp ZP_DWORD:149 [ mul16s::return#2 ] 16.5: zp ZP_DWORD:12 [ mul16s::m#4 mul16s::m#5 mul16s::m#1 mul16s::m#0 mul16s::m#2 ] 7: zp ZP_DWORD:128 [ mul16s::return#0 ] 4: zp ZP_WORD:120 [ mul16s::$9 ] 4: zp ZP_WORD:122 [ mul16s::$16 ] 4: zp ZP_WORD:124 [ mul16s::$13 ] 4: zp ZP_WORD:126 [ mul16s::$17 ] -Uplift Scope [bitmap_init] 39.88: zp ZP_WORD:38 [ bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 ] 34.83: zp ZP_BYTE:35 [ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ] 22: zp ZP_BYTE:36 [ bitmap_init::x#2 bitmap_init::x#1 ] 22: zp ZP_BYTE:37 [ bitmap_init::y#2 bitmap_init::y#1 ] 22: zp ZP_BYTE:136 [ bitmap_init::$4 ] 22: zp ZP_BYTE:137 [ bitmap_init::$5 ] 22: zp ZP_BYTE:138 [ bitmap_init::$6 ] 5.5: zp ZP_BYTE:135 [ bitmap_init::$7 ] -Uplift Scope [sin16s] 27.5: zp ZP_DWORD:49 [ sin16s::x#6 sin16s::x#4 sin16s::x#0 sin16s::x#1 sin16s::x#2 ] 22: zp ZP_WORD:147 [ sin16s::return#0 ] 13: zp ZP_WORD:53 [ sin16s::return#1 sin16s::return#5 sin16s::sinx#1 ] 4: zp ZP_DWORD:159 [ sin16s::$4 ] 4: zp ZP_WORD:167 [ sin16s::x2#0 ] 4: zp ZP_WORD:175 [ sin16s::x3_6#0 ] 4: zp ZP_WORD:181 [ sin16s::x4#0 ] 4: zp ZP_WORD:185 [ sin16s::x5#0 ] 4: zp ZP_WORD:187 [ sin16s::x5_128#0 ] 1: zp ZP_WORD:171 [ sin16s::x3#0 ] 1: zp ZP_WORD:189 [ sin16s::usinx#1 ] 0.64: zp ZP_WORD:163 [ sin16s::x1#0 ] 0.33: zp ZP_WORD:177 [ sin16s::usinx#0 ] 0.06: zp ZP_BYTE:48 [ sin16s::isUpper#2 ] -Uplift Scope [mulu16_sel] 24: zp ZP_WORD:55 [ mulu16_sel::v1#5 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 ] 21: zp ZP_WORD:57 [ mulu16_sel::v2#5 mulu16_sel::v2#3 mulu16_sel::v2#4 mulu16_sel::v2#0 mulu16_sel::v2#1 ] 4: zp ZP_WORD:165 [ mulu16_sel::return#0 ] 4: zp ZP_WORD:169 [ mulu16_sel::return#1 ] 4: zp ZP_WORD:173 [ mulu16_sel::return#2 ] 4: zp ZP_WORD:179 [ mulu16_sel::return#10 ] 4: zp ZP_WORD:183 [ mulu16_sel::return#11 ] 4: zp ZP_DWORD:195 [ mulu16_sel::$0 ] 4: zp ZP_DWORD:199 [ mulu16_sel::$1 ] 1.71: zp ZP_WORD:203 [ mulu16_sel::return#12 ] 0.33: zp ZP_BYTE:59 [ mulu16_sel::select#5 ] -Uplift Scope [sin16s_gen2] 22: zp ZP_DWORD:153 [ sin16s_gen2::$5 ] 18.33: zp ZP_WORD:46 [ sin16s_gen2::i#2 sin16s_gen2::i#1 ] 11: zp ZP_WORD:157 [ sin16s_gen2::$6 ] 10.33: zp ZP_DWORD:40 [ sin16s_gen2::x#2 sin16s_gen2::x#1 ] 8.8: zp ZP_WORD:44 [ sin16s_gen2::sintab#2 sin16s_gen2::sintab#0 ] 0.87: zp ZP_DWORD:143 [ sin16s_gen2::step#0 ] -Uplift Scope [] 44.6: zp ZP_BYTE:67 [ frame_cnt#2 frame_cnt#0 frame_cnt#1 ] 0.8: zp ZP_WORD:219 [ rem16u#1 ] -Uplift Scope [memset] 38: zp ZP_WORD:33 [ memset::dst#2 memset::dst#3 memset::dst#1 ] 2.17: zp ZP_WORD:133 [ memset::end#0 ] 2: zp ZP_WORD:30 [ memset::num#2 ] 1.57: zp ZP_BYTE:32 [ memset::c#3 ] 0: zp ZP_WORD:28 [ memset::str#2 ] -Uplift Scope [bitmap_plot] 15: zp ZP_BYTE:108 [ bitmap_plot::y#0 ] 4: zp ZP_WORD:111 [ bitmap_plot::$1 ] 4: zp ZP_BYTE:115 [ bitmap_plot::$2 ] 3: zp ZP_WORD:113 [ bitmap_plot::plotter#1 ] 1: zp ZP_WORD:109 [ bitmap_plot::$3 ] 0.69: zp ZP_WORD:86 [ bitmap_plot::x#0 ] -Uplift Scope [div32u16u] 4: zp ZP_DWORD:139 [ div32u16u::return#2 ] 4: zp ZP_WORD:211 [ div32u16u::quotient_lo#0 ] 1.33: zp ZP_DWORD:213 [ div32u16u::return#0 ] 0.8: zp ZP_WORD:207 [ div32u16u::quotient_hi#0 ] +Uplift Scope [mul16u] 346.86: zp ZP_DWORD:21 [ mul16u::res#2 mul16u::res#6 mul16u::res#1 ] 253.57: zp ZP_DWORD:25 [ mul16u::mb#2 mul16u::mb#0 mul16u::mb#6 mul16u::mb#1 ] 202: zp ZP_BYTE:133 [ mul16u::$1 ] 180.67: zp ZP_WORD:19 [ mul16u::a#3 mul16u::a#6 mul16u::a#8 mul16u::a#2 mul16u::a#0 ] 4: zp ZP_WORD:17 [ mul16u::b#1 ] 4: zp ZP_DWORD:117 [ mul16u::return#2 ] 4: zp ZP_DWORD:192 [ mul16u::return#3 ] +Uplift Scope [main] 40.58: zp ZP_BYTE:8 [ main::r_add#10 main::r_add#12 main::r_add#1 ] 22: zp ZP_WORD:69 [ main::$32 ] 22: zp ZP_WORD:71 [ main::$34 ] 22: zp ZP_DWORD:79 [ main::xpos#0 ] 22: zp ZP_WORD:85 [ main::$11 ] 22: zp ZP_WORD:89 [ main::$33 ] 22: zp ZP_WORD:91 [ main::$35 ] 22: zp ZP_DWORD:99 [ main::ypos#0 ] 22: zp ZP_WORD:105 [ main::$17 ] 15.27: zp ZP_WORD:2 [ main::idx_x#11 main::idx_x#10 main::idx_x#1 ] 15.24: zp ZP_WORD:6 [ main::idx_y#3 main::idx_y#10 main::idx_y#1 ] 11: zp ZP_WORD:73 [ main::cos_x#0 ] 11: zp ZP_WORD:83 [ main::$9 ] 11: zp ZP_WORD:93 [ main::sin_y#0 ] 11: zp ZP_WORD:103 [ main::$15 ] 11: zp ZP_WORD:107 [ main::$18 ] 6.79: zp ZP_WORD:4 [ main::r#10 main::r#1 ] +Uplift Scope [divr16u] 106.92: zp ZP_WORD:61 [ divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u::rem#11 divr16u::rem#6 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 ] 35.54: zp ZP_WORD:65 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 ] 22: zp ZP_BYTE:218 [ divr16u::$1 ] 22: zp ZP_BYTE:219 [ divr16u::$2 ] 18.19: zp ZP_BYTE:67 [ divr16u::i#2 divr16u::i#1 ] 9.75: zp ZP_WORD:63 [ divr16u::dividend#3 divr16u::dividend#5 divr16u::dividend#0 ] 4: zp ZP_WORD:206 [ divr16u::return#2 ] 4: zp ZP_WORD:210 [ divr16u::return#3 ] +Uplift Scope [mul16s] 46.69: zp ZP_WORD:9 [ mul16s::a#3 mul16s::a#1 mul16s::a#2 mul16s::a#0 ] 46.18: zp ZP_WORD:11 [ mul16s::b#3 mul16s::b#1 mul16s::b#2 ] 22: zp ZP_DWORD:75 [ mul16s::return#3 ] 22: zp ZP_DWORD:95 [ mul16s::return#4 ] 22: zp ZP_DWORD:150 [ mul16s::return#2 ] 16.5: zp ZP_DWORD:13 [ mul16s::m#4 mul16s::m#5 mul16s::m#1 mul16s::m#0 mul16s::m#2 ] 7: zp ZP_DWORD:129 [ mul16s::return#0 ] 4: zp ZP_WORD:121 [ mul16s::$9 ] 4: zp ZP_WORD:123 [ mul16s::$16 ] 4: zp ZP_WORD:125 [ mul16s::$13 ] 4: zp ZP_WORD:127 [ mul16s::$17 ] +Uplift Scope [bitmap_init] 39.88: zp ZP_WORD:39 [ bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 ] 34.83: zp ZP_BYTE:36 [ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ] 22: zp ZP_BYTE:37 [ bitmap_init::x#2 bitmap_init::x#1 ] 22: zp ZP_BYTE:38 [ bitmap_init::y#2 bitmap_init::y#1 ] 22: zp ZP_BYTE:137 [ bitmap_init::$4 ] 22: zp ZP_BYTE:138 [ bitmap_init::$5 ] 22: zp ZP_BYTE:139 [ bitmap_init::$6 ] 5.5: zp ZP_BYTE:136 [ bitmap_init::$7 ] +Uplift Scope [sin16s] 27.5: zp ZP_DWORD:50 [ sin16s::x#6 sin16s::x#4 sin16s::x#0 sin16s::x#1 sin16s::x#2 ] 22: zp ZP_WORD:148 [ sin16s::return#0 ] 13: zp ZP_WORD:54 [ sin16s::return#1 sin16s::return#5 sin16s::sinx#1 ] 4: zp ZP_DWORD:160 [ sin16s::$4 ] 4: zp ZP_WORD:168 [ sin16s::x2#0 ] 4: zp ZP_WORD:176 [ sin16s::x3_6#0 ] 4: zp ZP_WORD:182 [ sin16s::x4#0 ] 4: zp ZP_WORD:186 [ sin16s::x5#0 ] 4: zp ZP_WORD:188 [ sin16s::x5_128#0 ] 1: zp ZP_WORD:172 [ sin16s::x3#0 ] 1: zp ZP_WORD:190 [ sin16s::usinx#1 ] 0.64: zp ZP_WORD:164 [ sin16s::x1#0 ] 0.33: zp ZP_WORD:178 [ sin16s::usinx#0 ] 0.06: zp ZP_BYTE:49 [ sin16s::isUpper#2 ] +Uplift Scope [mulu16_sel] 24: zp ZP_WORD:56 [ mulu16_sel::v1#5 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 ] 21: zp ZP_WORD:58 [ mulu16_sel::v2#5 mulu16_sel::v2#3 mulu16_sel::v2#4 mulu16_sel::v2#0 mulu16_sel::v2#1 ] 4: zp ZP_WORD:166 [ mulu16_sel::return#0 ] 4: zp ZP_WORD:170 [ mulu16_sel::return#1 ] 4: zp ZP_WORD:174 [ mulu16_sel::return#2 ] 4: zp ZP_WORD:180 [ mulu16_sel::return#10 ] 4: zp ZP_WORD:184 [ mulu16_sel::return#11 ] 4: zp ZP_DWORD:196 [ mulu16_sel::$0 ] 4: zp ZP_DWORD:200 [ mulu16_sel::$1 ] 1.71: zp ZP_WORD:204 [ mulu16_sel::return#12 ] 0.33: zp ZP_BYTE:60 [ mulu16_sel::select#5 ] +Uplift Scope [sin16s_gen2] 22: zp ZP_DWORD:154 [ sin16s_gen2::$5 ] 18.33: zp ZP_WORD:47 [ sin16s_gen2::i#2 sin16s_gen2::i#1 ] 11: zp ZP_WORD:158 [ sin16s_gen2::$6 ] 10.33: zp ZP_DWORD:41 [ sin16s_gen2::x#2 sin16s_gen2::x#1 ] 8.8: zp ZP_WORD:45 [ sin16s_gen2::sintab#2 sin16s_gen2::sintab#0 ] 0.87: zp ZP_DWORD:144 [ sin16s_gen2::step#0 ] +Uplift Scope [] 44.56: zp ZP_BYTE:68 [ frame_cnt#2 frame_cnt#0 frame_cnt#1 ] 0.8: zp ZP_WORD:220 [ rem16u#1 ] +Uplift Scope [memset] 38: zp ZP_WORD:34 [ memset::dst#2 memset::dst#3 memset::dst#1 ] 2.17: zp ZP_WORD:134 [ memset::end#0 ] 2: zp ZP_WORD:31 [ memset::num#2 ] 1.57: zp ZP_BYTE:33 [ memset::c#3 ] 0: zp ZP_WORD:29 [ memset::str#2 ] +Uplift Scope [bitmap_plot] 15: zp ZP_BYTE:109 [ bitmap_plot::y#0 ] 4: zp ZP_WORD:112 [ bitmap_plot::$1 ] 4: zp ZP_BYTE:116 [ bitmap_plot::$2 ] 3: zp ZP_WORD:114 [ bitmap_plot::plotter#1 ] 1: zp ZP_WORD:110 [ bitmap_plot::$3 ] 0.69: zp ZP_WORD:87 [ bitmap_plot::x#0 ] +Uplift Scope [div32u16u] 4: zp ZP_DWORD:140 [ div32u16u::return#2 ] 4: zp ZP_WORD:212 [ div32u16u::quotient_lo#0 ] 1.33: zp ZP_DWORD:214 [ div32u16u::return#0 ] 0.8: zp ZP_WORD:208 [ div32u16u::quotient_hi#0 ] Uplift Scope [bitmap_clear] Uplift Scope [init_irq] Uplift Scope [irq] -Uplifting [mul16u] best 26843 combination zp ZP_DWORD:20 [ mul16u::res#2 mul16u::res#6 mul16u::res#1 ] zp ZP_DWORD:24 [ mul16u::mb#2 mul16u::mb#0 mul16u::mb#6 mul16u::mb#1 ] reg byte a [ mul16u::$1 ] zp ZP_WORD:18 [ mul16u::a#3 mul16u::a#6 mul16u::a#8 mul16u::a#2 mul16u::a#0 ] zp ZP_WORD:16 [ mul16u::b#1 ] zp ZP_DWORD:116 [ mul16u::return#2 ] zp ZP_DWORD:191 [ mul16u::return#3 ] -Uplifting [main] best 26843 combination zp ZP_WORD:68 [ main::$28 ] zp ZP_WORD:70 [ main::$30 ] zp ZP_DWORD:78 [ main::xpos#0 ] zp ZP_WORD:84 [ main::$11 ] zp ZP_WORD:88 [ main::$29 ] zp ZP_WORD:90 [ main::$31 ] zp ZP_DWORD:98 [ main::ypos#0 ] zp ZP_WORD:104 [ main::$17 ] zp ZP_WORD:6 [ main::idx_y#3 main::idx_y#10 main::idx_y#1 ] zp ZP_WORD:4 [ main::r#10 main::r#1 ] zp ZP_WORD:2 [ main::idx_x#3 main::idx_x#10 main::idx_x#1 ] zp ZP_WORD:72 [ main::cos_x#0 ] zp ZP_WORD:82 [ main::$9 ] zp ZP_WORD:92 [ main::sin_y#0 ] zp ZP_WORD:102 [ main::$15 ] zp ZP_WORD:106 [ main::$18 ] -Uplifting [divr16u] best 26633 combination zp ZP_WORD:60 [ divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u::rem#11 divr16u::rem#6 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 ] zp ZP_WORD:64 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 ] reg byte a [ divr16u::$1 ] reg byte a [ divr16u::$2 ] reg byte x [ divr16u::i#2 divr16u::i#1 ] zp ZP_WORD:62 [ divr16u::dividend#3 divr16u::dividend#5 divr16u::dividend#0 ] zp ZP_WORD:205 [ divr16u::return#2 ] zp ZP_WORD:209 [ divr16u::return#3 ] -Uplifting [mul16s] best 26633 combination zp ZP_WORD:8 [ mul16s::a#3 mul16s::a#1 mul16s::a#2 mul16s::a#0 ] zp ZP_WORD:10 [ mul16s::b#3 mul16s::b#1 mul16s::b#2 ] zp ZP_DWORD:74 [ mul16s::return#3 ] zp ZP_DWORD:94 [ mul16s::return#4 ] zp ZP_DWORD:149 [ mul16s::return#2 ] zp ZP_DWORD:12 [ mul16s::m#4 mul16s::m#5 mul16s::m#1 mul16s::m#0 mul16s::m#2 ] zp ZP_DWORD:128 [ mul16s::return#0 ] zp ZP_WORD:120 [ mul16s::$9 ] zp ZP_WORD:122 [ mul16s::$16 ] zp ZP_WORD:124 [ mul16s::$13 ] zp ZP_WORD:126 [ mul16s::$17 ] -Uplifting [bitmap_init] best 26123 combination zp ZP_WORD:38 [ bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 ] reg byte a [ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ] reg byte x [ bitmap_init::x#2 bitmap_init::x#1 ] reg byte x [ bitmap_init::y#2 bitmap_init::y#1 ] reg byte a [ bitmap_init::$4 ] zp ZP_BYTE:137 [ bitmap_init::$5 ] zp ZP_BYTE:138 [ bitmap_init::$6 ] zp ZP_BYTE:135 [ bitmap_init::$7 ] +Uplifting [mul16u] best 27113 combination zp ZP_DWORD:21 [ mul16u::res#2 mul16u::res#6 mul16u::res#1 ] zp ZP_DWORD:25 [ mul16u::mb#2 mul16u::mb#0 mul16u::mb#6 mul16u::mb#1 ] reg byte a [ mul16u::$1 ] zp ZP_WORD:19 [ mul16u::a#3 mul16u::a#6 mul16u::a#8 mul16u::a#2 mul16u::a#0 ] zp ZP_WORD:17 [ mul16u::b#1 ] zp ZP_DWORD:117 [ mul16u::return#2 ] zp ZP_DWORD:192 [ mul16u::return#3 ] +Uplifting [main] best 27113 combination zp ZP_BYTE:8 [ main::r_add#10 main::r_add#12 main::r_add#1 ] zp ZP_WORD:69 [ main::$32 ] zp ZP_WORD:71 [ main::$34 ] zp ZP_DWORD:79 [ main::xpos#0 ] zp ZP_WORD:85 [ main::$11 ] zp ZP_WORD:89 [ main::$33 ] zp ZP_WORD:91 [ main::$35 ] zp ZP_DWORD:99 [ main::ypos#0 ] zp ZP_WORD:105 [ main::$17 ] zp ZP_WORD:2 [ main::idx_x#11 main::idx_x#10 main::idx_x#1 ] zp ZP_WORD:6 [ main::idx_y#3 main::idx_y#10 main::idx_y#1 ] zp ZP_WORD:73 [ main::cos_x#0 ] zp ZP_WORD:83 [ main::$9 ] zp ZP_WORD:93 [ main::sin_y#0 ] zp ZP_WORD:103 [ main::$15 ] zp ZP_WORD:107 [ main::$18 ] zp ZP_WORD:4 [ main::r#10 main::r#1 ] +Uplifting [divr16u] best 26903 combination zp ZP_WORD:61 [ divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u::rem#11 divr16u::rem#6 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 ] zp ZP_WORD:65 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 ] reg byte a [ divr16u::$1 ] reg byte a [ divr16u::$2 ] reg byte x [ divr16u::i#2 divr16u::i#1 ] zp ZP_WORD:63 [ divr16u::dividend#3 divr16u::dividend#5 divr16u::dividend#0 ] zp ZP_WORD:206 [ divr16u::return#2 ] zp ZP_WORD:210 [ divr16u::return#3 ] +Uplifting [mul16s] best 26903 combination zp ZP_WORD:9 [ mul16s::a#3 mul16s::a#1 mul16s::a#2 mul16s::a#0 ] zp ZP_WORD:11 [ mul16s::b#3 mul16s::b#1 mul16s::b#2 ] zp ZP_DWORD:75 [ mul16s::return#3 ] zp ZP_DWORD:95 [ mul16s::return#4 ] zp ZP_DWORD:150 [ mul16s::return#2 ] zp ZP_DWORD:13 [ mul16s::m#4 mul16s::m#5 mul16s::m#1 mul16s::m#0 mul16s::m#2 ] zp ZP_DWORD:129 [ mul16s::return#0 ] zp ZP_WORD:121 [ mul16s::$9 ] zp ZP_WORD:123 [ mul16s::$16 ] zp ZP_WORD:125 [ mul16s::$13 ] zp ZP_WORD:127 [ mul16s::$17 ] +Uplifting [bitmap_init] best 26393 combination zp ZP_WORD:39 [ bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 ] reg byte a [ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ] reg byte x [ bitmap_init::x#2 bitmap_init::x#1 ] reg byte x [ bitmap_init::y#2 bitmap_init::y#1 ] reg byte a [ bitmap_init::$4 ] zp ZP_BYTE:138 [ bitmap_init::$5 ] zp ZP_BYTE:139 [ bitmap_init::$6 ] zp ZP_BYTE:136 [ bitmap_init::$7 ] Limited combination testing to 100 combinations of 15360 possible. -Uplifting [sin16s] best 26123 combination zp ZP_DWORD:49 [ sin16s::x#6 sin16s::x#4 sin16s::x#0 sin16s::x#1 sin16s::x#2 ] zp ZP_WORD:147 [ sin16s::return#0 ] zp ZP_WORD:53 [ sin16s::return#1 sin16s::return#5 sin16s::sinx#1 ] zp ZP_DWORD:159 [ sin16s::$4 ] zp ZP_WORD:167 [ sin16s::x2#0 ] zp ZP_WORD:175 [ sin16s::x3_6#0 ] zp ZP_WORD:181 [ sin16s::x4#0 ] zp ZP_WORD:185 [ sin16s::x5#0 ] zp ZP_WORD:187 [ sin16s::x5_128#0 ] zp ZP_WORD:171 [ sin16s::x3#0 ] zp ZP_WORD:189 [ sin16s::usinx#1 ] zp ZP_WORD:163 [ sin16s::x1#0 ] zp ZP_WORD:177 [ sin16s::usinx#0 ] zp ZP_BYTE:48 [ sin16s::isUpper#2 ] -Uplifting [mulu16_sel] best 26107 combination zp ZP_WORD:55 [ mulu16_sel::v1#5 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 ] zp ZP_WORD:57 [ mulu16_sel::v2#5 mulu16_sel::v2#3 mulu16_sel::v2#4 mulu16_sel::v2#0 mulu16_sel::v2#1 ] zp ZP_WORD:165 [ mulu16_sel::return#0 ] zp ZP_WORD:169 [ mulu16_sel::return#1 ] zp ZP_WORD:173 [ mulu16_sel::return#2 ] zp ZP_WORD:179 [ mulu16_sel::return#10 ] zp ZP_WORD:183 [ mulu16_sel::return#11 ] zp ZP_DWORD:195 [ mulu16_sel::$0 ] zp ZP_DWORD:199 [ mulu16_sel::$1 ] zp ZP_WORD:203 [ mulu16_sel::return#12 ] reg byte x [ mulu16_sel::select#5 ] -Uplifting [sin16s_gen2] best 26107 combination zp ZP_DWORD:153 [ sin16s_gen2::$5 ] zp ZP_WORD:46 [ sin16s_gen2::i#2 sin16s_gen2::i#1 ] zp ZP_WORD:157 [ sin16s_gen2::$6 ] zp ZP_DWORD:40 [ sin16s_gen2::x#2 sin16s_gen2::x#1 ] zp ZP_WORD:44 [ sin16s_gen2::sintab#2 sin16s_gen2::sintab#0 ] zp ZP_DWORD:143 [ sin16s_gen2::step#0 ] -Uplifting [] best 26107 combination zp ZP_BYTE:67 [ frame_cnt#2 frame_cnt#0 frame_cnt#1 ] zp ZP_WORD:219 [ rem16u#1 ] -Uplifting [memset] best 26091 combination zp ZP_WORD:33 [ memset::dst#2 memset::dst#3 memset::dst#1 ] zp ZP_WORD:133 [ memset::end#0 ] zp ZP_WORD:30 [ memset::num#2 ] reg byte x [ memset::c#3 ] zp ZP_WORD:28 [ memset::str#2 ] -Uplifting [bitmap_plot] best 26056 combination reg byte a [ bitmap_plot::y#0 ] zp ZP_WORD:111 [ bitmap_plot::$1 ] reg byte a [ bitmap_plot::$2 ] zp ZP_WORD:113 [ bitmap_plot::plotter#1 ] zp ZP_WORD:109 [ bitmap_plot::$3 ] zp ZP_WORD:86 [ bitmap_plot::x#0 ] -Uplifting [div32u16u] best 26056 combination zp ZP_DWORD:139 [ div32u16u::return#2 ] zp ZP_WORD:211 [ div32u16u::quotient_lo#0 ] zp ZP_DWORD:213 [ div32u16u::return#0 ] zp ZP_WORD:207 [ div32u16u::quotient_hi#0 ] -Uplifting [bitmap_clear] best 26056 combination -Uplifting [init_irq] best 26056 combination -Uplifting [irq] best 26056 combination -Attempting to uplift remaining variables inzp ZP_BYTE:67 [ frame_cnt#2 frame_cnt#0 frame_cnt#1 ] -Uplifting [] best 26056 combination zp ZP_BYTE:67 [ frame_cnt#2 frame_cnt#0 frame_cnt#1 ] -Attempting to uplift remaining variables inzp ZP_BYTE:137 [ bitmap_init::$5 ] -Uplifting [bitmap_init] best 25996 combination reg byte a [ bitmap_init::$5 ] -Attempting to uplift remaining variables inzp ZP_BYTE:138 [ bitmap_init::$6 ] -Uplifting [bitmap_init] best 25936 combination reg byte a [ bitmap_init::$6 ] -Attempting to uplift remaining variables inzp ZP_BYTE:135 [ bitmap_init::$7 ] -Uplifting [bitmap_init] best 25936 combination zp ZP_BYTE:135 [ bitmap_init::$7 ] -Attempting to uplift remaining variables inzp ZP_BYTE:48 [ sin16s::isUpper#2 ] -Uplifting [sin16s] best 25936 combination zp ZP_BYTE:48 [ sin16s::isUpper#2 ] -Coalescing zero page register with common assignment [ zp ZP_WORD:4 [ main::r#10 main::r#1 ] ] with [ zp ZP_WORD:8 [ mul16s::a#3 mul16s::a#1 mul16s::a#2 mul16s::a#0 ] ] - score: 2 -Coalescing zero page register with common assignment [ zp ZP_WORD:53 [ sin16s::return#1 sin16s::return#5 sin16s::sinx#1 ] ] with [ zp ZP_WORD:189 [ sin16s::usinx#1 ] ] - score: 2 -Coalescing zero page register with common assignment [ zp ZP_WORD:55 [ mulu16_sel::v1#5 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 ] ] with [ zp ZP_WORD:171 [ sin16s::x3#0 ] ] - score: 2 -Coalescing zero page register with common assignment [ zp ZP_WORD:60 [ divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u::rem#11 divr16u::rem#6 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 ] ] with [ zp ZP_WORD:219 [ rem16u#1 ] ] - score: 2 -Coalescing zero page register with common assignment [ zp ZP_WORD:10 [ mul16s::b#3 mul16s::b#1 mul16s::b#2 ] ] with [ zp ZP_WORD:72 [ main::cos_x#0 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:10 [ mul16s::b#3 mul16s::b#1 mul16s::b#2 main::cos_x#0 ] ] with [ zp ZP_WORD:92 [ main::sin_y#0 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_DWORD:12 [ mul16s::m#4 mul16s::m#5 mul16s::m#1 mul16s::m#0 mul16s::m#2 ] ] with [ zp ZP_DWORD:116 [ mul16u::return#2 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_DWORD:12 [ mul16s::m#4 mul16s::m#5 mul16s::m#1 mul16s::m#0 mul16s::m#2 mul16u::return#2 ] ] with [ zp ZP_DWORD:128 [ mul16s::return#0 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:16 [ mul16u::b#1 ] ] with [ zp ZP_WORD:57 [ mulu16_sel::v2#5 mulu16_sel::v2#3 mulu16_sel::v2#4 mulu16_sel::v2#0 mulu16_sel::v2#1 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_DWORD:20 [ mul16u::res#2 mul16u::res#6 mul16u::res#1 ] ] with [ zp ZP_DWORD:191 [ mul16u::return#3 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:28 [ memset::str#2 ] ] with [ zp ZP_WORD:33 [ memset::dst#2 memset::dst#3 memset::dst#1 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:30 [ memset::num#2 ] ] with [ zp ZP_WORD:133 [ memset::end#0 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_DWORD:49 [ sin16s::x#6 sin16s::x#4 sin16s::x#0 sin16s::x#1 sin16s::x#2 ] ] with [ zp ZP_DWORD:159 [ sin16s::$4 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:53 [ sin16s::return#1 sin16s::return#5 sin16s::sinx#1 sin16s::usinx#1 ] ] with [ zp ZP_WORD:147 [ sin16s::return#0 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:55 [ mulu16_sel::v1#5 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 sin16s::x3#0 ] ] with [ zp ZP_WORD:167 [ sin16s::x2#0 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:55 [ mulu16_sel::v1#5 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 sin16s::x3#0 sin16s::x2#0 ] ] with [ zp ZP_WORD:181 [ sin16s::x4#0 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:64 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 ] ] with [ zp ZP_WORD:205 [ divr16u::return#2 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:64 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 divr16u::return#2 ] ] with [ zp ZP_WORD:209 [ divr16u::return#3 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:68 [ main::$28 ] ] with [ zp ZP_WORD:70 [ main::$30 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_DWORD:74 [ mul16s::return#3 ] ] with [ zp ZP_DWORD:78 [ main::xpos#0 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:82 [ main::$9 ] ] with [ zp ZP_WORD:84 [ main::$11 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:88 [ main::$29 ] ] with [ zp ZP_WORD:90 [ main::$31 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_DWORD:94 [ mul16s::return#4 ] ] with [ zp ZP_DWORD:98 [ main::ypos#0 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:102 [ main::$15 ] ] with [ zp ZP_WORD:104 [ main::$17 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:109 [ bitmap_plot::$3 ] ] with [ zp ZP_WORD:113 [ bitmap_plot::plotter#1 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:120 [ mul16s::$9 ] ] with [ zp ZP_WORD:122 [ mul16s::$16 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:124 [ mul16s::$13 ] ] with [ zp ZP_WORD:126 [ mul16s::$17 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_DWORD:139 [ div32u16u::return#2 ] ] with [ zp ZP_DWORD:143 [ sin16s_gen2::step#0 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_DWORD:139 [ div32u16u::return#2 sin16s_gen2::step#0 ] ] with [ zp ZP_DWORD:213 [ div32u16u::return#0 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_DWORD:149 [ mul16s::return#2 ] ] with [ zp ZP_DWORD:153 [ sin16s_gen2::$5 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:165 [ mulu16_sel::return#0 ] ] with [ zp ZP_WORD:203 [ mulu16_sel::return#12 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:173 [ mulu16_sel::return#2 ] ] with [ zp ZP_WORD:175 [ sin16s::x3_6#0 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:183 [ mulu16_sel::return#11 ] ] with [ zp ZP_WORD:185 [ sin16s::x5#0 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_DWORD:195 [ mulu16_sel::$0 ] ] with [ zp ZP_DWORD:199 [ mulu16_sel::$1 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:4 [ main::r#10 main::r#1 mul16s::a#3 mul16s::a#1 mul16s::a#2 mul16s::a#0 ] ] with [ zp ZP_WORD:53 [ sin16s::return#1 sin16s::return#5 sin16s::sinx#1 sin16s::usinx#1 sin16s::return#0 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:10 [ mul16s::b#3 mul16s::b#1 mul16s::b#2 main::cos_x#0 main::sin_y#0 ] ] with [ zp ZP_WORD:68 [ main::$28 main::$30 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:10 [ mul16s::b#3 mul16s::b#1 mul16s::b#2 main::cos_x#0 main::sin_y#0 main::$28 main::$30 ] ] with [ zp ZP_WORD:88 [ main::$29 main::$31 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_DWORD:12 [ mul16s::m#4 mul16s::m#5 mul16s::m#1 mul16s::m#0 mul16s::m#2 mul16u::return#2 mul16s::return#0 ] ] with [ zp ZP_DWORD:20 [ mul16u::res#2 mul16u::res#6 mul16u::res#1 mul16u::return#3 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_DWORD:12 [ mul16s::m#4 mul16s::m#5 mul16s::m#1 mul16s::m#0 mul16s::m#2 mul16u::return#2 mul16s::return#0 mul16u::res#2 mul16u::res#6 mul16u::res#1 mul16u::return#3 ] ] with [ zp ZP_DWORD:74 [ mul16s::return#3 main::xpos#0 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_DWORD:12 [ mul16s::m#4 mul16s::m#5 mul16s::m#1 mul16s::m#0 mul16s::m#2 mul16u::return#2 mul16s::return#0 mul16u::res#2 mul16u::res#6 mul16u::res#1 mul16u::return#3 mul16s::return#3 main::xpos#0 ] ] with [ zp ZP_DWORD:94 [ mul16s::return#4 main::ypos#0 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_DWORD:12 [ mul16s::m#4 mul16s::m#5 mul16s::m#1 mul16s::m#0 mul16s::m#2 mul16u::return#2 mul16s::return#0 mul16u::res#2 mul16u::res#6 mul16u::res#1 mul16u::return#3 mul16s::return#3 main::xpos#0 mul16s::return#4 main::ypos#0 ] ] with [ zp ZP_DWORD:149 [ mul16s::return#2 sin16s_gen2::$5 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:55 [ mulu16_sel::v1#5 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 sin16s::x3#0 sin16s::x2#0 sin16s::x4#0 ] ] with [ zp ZP_WORD:169 [ mulu16_sel::return#1 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:55 [ mulu16_sel::v1#5 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 sin16s::x3#0 sin16s::x2#0 sin16s::x4#0 mulu16_sel::return#1 ] ] with [ zp ZP_WORD:179 [ mulu16_sel::return#10 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:64 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 divr16u::return#2 divr16u::return#3 ] ] with [ zp ZP_WORD:211 [ div32u16u::quotient_lo#0 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:82 [ main::$9 main::$11 ] ] with [ zp ZP_WORD:86 [ bitmap_plot::x#0 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:102 [ main::$15 main::$17 ] ] with [ zp ZP_WORD:106 [ main::$18 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:165 [ mulu16_sel::return#0 mulu16_sel::return#12 ] ] with [ zp ZP_WORD:173 [ mulu16_sel::return#2 sin16s::x3_6#0 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:165 [ mulu16_sel::return#0 mulu16_sel::return#12 mulu16_sel::return#2 sin16s::x3_6#0 ] ] with [ zp ZP_WORD:183 [ mulu16_sel::return#11 sin16s::x5#0 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:4 [ main::r#10 main::r#1 mul16s::a#3 mul16s::a#1 mul16s::a#2 mul16s::a#0 sin16s::return#1 sin16s::return#5 sin16s::sinx#1 sin16s::usinx#1 sin16s::return#0 ] ] with [ zp ZP_WORD:177 [ sin16s::usinx#0 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_DWORD:12 [ mul16s::m#4 mul16s::m#5 mul16s::m#1 mul16s::m#0 mul16s::m#2 mul16u::return#2 mul16s::return#0 mul16u::res#2 mul16u::res#6 mul16u::res#1 mul16u::return#3 mul16s::return#3 main::xpos#0 mul16s::return#4 main::ypos#0 mul16s::return#2 sin16s_gen2::$5 ] ] with [ zp ZP_DWORD:195 [ mulu16_sel::$0 mulu16_sel::$1 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:165 [ mulu16_sel::return#0 mulu16_sel::return#12 mulu16_sel::return#2 sin16s::x3_6#0 mulu16_sel::return#11 sin16s::x5#0 ] ] with [ zp ZP_WORD:187 [ sin16s::x5_128#0 ] ] - score: 1 -Allocated (was zp ZP_WORD:10) zp ZP_WORD:8 [ mul16s::b#3 mul16s::b#1 mul16s::b#2 main::cos_x#0 main::sin_y#0 main::$28 main::$30 main::$29 main::$31 ] -Allocated (was zp ZP_DWORD:12) zp ZP_DWORD:10 [ mul16s::m#4 mul16s::m#5 mul16s::m#1 mul16s::m#0 mul16s::m#2 mul16u::return#2 mul16s::return#0 mul16u::res#2 mul16u::res#6 mul16u::res#1 mul16u::return#3 mul16s::return#3 main::xpos#0 mul16s::return#4 main::ypos#0 mul16s::return#2 sin16s_gen2::$5 mulu16_sel::$0 mulu16_sel::$1 ] -Allocated (was zp ZP_WORD:16) zp ZP_WORD:14 [ mul16u::b#1 mulu16_sel::v2#5 mulu16_sel::v2#3 mulu16_sel::v2#4 mulu16_sel::v2#0 mulu16_sel::v2#1 ] -Allocated (was zp ZP_WORD:18) zp ZP_WORD:16 [ mul16u::a#3 mul16u::a#6 mul16u::a#8 mul16u::a#2 mul16u::a#0 ] -Allocated (was zp ZP_DWORD:24) zp ZP_DWORD:18 [ mul16u::mb#2 mul16u::mb#0 mul16u::mb#6 mul16u::mb#1 ] -Allocated (was zp ZP_WORD:28) zp ZP_WORD:22 [ memset::str#2 memset::dst#2 memset::dst#3 memset::dst#1 ] -Allocated (was zp ZP_WORD:30) zp ZP_WORD:24 [ memset::num#2 memset::end#0 ] -Allocated (was zp ZP_WORD:38) zp ZP_WORD:26 [ bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 ] -Allocated (was zp ZP_DWORD:40) zp ZP_DWORD:28 [ sin16s_gen2::x#2 sin16s_gen2::x#1 ] -Allocated (was zp ZP_WORD:44) zp ZP_WORD:32 [ sin16s_gen2::sintab#2 sin16s_gen2::sintab#0 ] -Allocated (was zp ZP_WORD:46) zp ZP_WORD:34 [ sin16s_gen2::i#2 sin16s_gen2::i#1 ] -Allocated (was zp ZP_BYTE:48) zp ZP_BYTE:36 [ sin16s::isUpper#2 ] -Allocated (was zp ZP_DWORD:49) zp ZP_DWORD:37 [ sin16s::x#6 sin16s::x#4 sin16s::x#0 sin16s::x#1 sin16s::x#2 sin16s::$4 ] -Allocated (was zp ZP_WORD:55) zp ZP_WORD:41 [ mulu16_sel::v1#5 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 sin16s::x3#0 sin16s::x2#0 sin16s::x4#0 mulu16_sel::return#1 mulu16_sel::return#10 ] -Allocated (was zp ZP_WORD:60) zp ZP_WORD:43 [ divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u::rem#11 divr16u::rem#6 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 rem16u#1 ] -Allocated (was zp ZP_WORD:62) zp ZP_WORD:45 [ divr16u::dividend#3 divr16u::dividend#5 divr16u::dividend#0 ] -Allocated (was zp ZP_WORD:64) zp ZP_WORD:47 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 divr16u::return#2 divr16u::return#3 div32u16u::quotient_lo#0 ] -Allocated (was zp ZP_BYTE:67) zp ZP_BYTE:49 [ frame_cnt#2 frame_cnt#0 frame_cnt#1 ] -Allocated (was zp ZP_WORD:82) zp ZP_WORD:50 [ main::$9 main::$11 bitmap_plot::x#0 ] -Allocated (was zp ZP_WORD:102) zp ZP_WORD:52 [ main::$15 main::$17 main::$18 ] -Allocated (was zp ZP_WORD:109) zp ZP_WORD:54 [ bitmap_plot::$3 bitmap_plot::plotter#1 ] -Allocated (was zp ZP_WORD:111) zp ZP_WORD:56 [ bitmap_plot::$1 ] -Allocated (was zp ZP_WORD:120) zp ZP_WORD:58 [ mul16s::$9 mul16s::$16 ] -Allocated (was zp ZP_WORD:124) zp ZP_WORD:60 [ mul16s::$13 mul16s::$17 ] -Allocated (was zp ZP_BYTE:135) zp ZP_BYTE:62 [ bitmap_init::$7 ] -Allocated (was zp ZP_DWORD:139) zp ZP_DWORD:63 [ div32u16u::return#2 sin16s_gen2::step#0 div32u16u::return#0 ] -Allocated (was zp ZP_WORD:157) zp ZP_WORD:67 [ sin16s_gen2::$6 ] -Allocated (was zp ZP_WORD:163) zp ZP_WORD:69 [ sin16s::x1#0 ] -Allocated (was zp ZP_WORD:165) zp ZP_WORD:71 [ mulu16_sel::return#0 mulu16_sel::return#12 mulu16_sel::return#2 sin16s::x3_6#0 mulu16_sel::return#11 sin16s::x5#0 sin16s::x5_128#0 ] -Allocated (was zp ZP_WORD:207) zp ZP_WORD:73 [ div32u16u::quotient_hi#0 ] +Uplifting [sin16s] best 26393 combination zp ZP_DWORD:50 [ sin16s::x#6 sin16s::x#4 sin16s::x#0 sin16s::x#1 sin16s::x#2 ] zp ZP_WORD:148 [ sin16s::return#0 ] zp ZP_WORD:54 [ sin16s::return#1 sin16s::return#5 sin16s::sinx#1 ] zp ZP_DWORD:160 [ sin16s::$4 ] zp ZP_WORD:168 [ sin16s::x2#0 ] zp ZP_WORD:176 [ sin16s::x3_6#0 ] zp ZP_WORD:182 [ sin16s::x4#0 ] zp ZP_WORD:186 [ sin16s::x5#0 ] zp ZP_WORD:188 [ sin16s::x5_128#0 ] zp ZP_WORD:172 [ sin16s::x3#0 ] zp ZP_WORD:190 [ sin16s::usinx#1 ] zp ZP_WORD:164 [ sin16s::x1#0 ] zp ZP_WORD:178 [ sin16s::usinx#0 ] zp ZP_BYTE:49 [ sin16s::isUpper#2 ] +Uplifting [mulu16_sel] best 26377 combination zp ZP_WORD:56 [ mulu16_sel::v1#5 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 ] zp ZP_WORD:58 [ mulu16_sel::v2#5 mulu16_sel::v2#3 mulu16_sel::v2#4 mulu16_sel::v2#0 mulu16_sel::v2#1 ] zp ZP_WORD:166 [ mulu16_sel::return#0 ] zp ZP_WORD:170 [ mulu16_sel::return#1 ] zp ZP_WORD:174 [ mulu16_sel::return#2 ] zp ZP_WORD:180 [ mulu16_sel::return#10 ] zp ZP_WORD:184 [ mulu16_sel::return#11 ] zp ZP_DWORD:196 [ mulu16_sel::$0 ] zp ZP_DWORD:200 [ mulu16_sel::$1 ] zp ZP_WORD:204 [ mulu16_sel::return#12 ] reg byte x [ mulu16_sel::select#5 ] +Uplifting [sin16s_gen2] best 26377 combination zp ZP_DWORD:154 [ sin16s_gen2::$5 ] zp ZP_WORD:47 [ sin16s_gen2::i#2 sin16s_gen2::i#1 ] zp ZP_WORD:158 [ sin16s_gen2::$6 ] zp ZP_DWORD:41 [ sin16s_gen2::x#2 sin16s_gen2::x#1 ] zp ZP_WORD:45 [ sin16s_gen2::sintab#2 sin16s_gen2::sintab#0 ] zp ZP_DWORD:144 [ sin16s_gen2::step#0 ] +Uplifting [] best 26377 combination zp ZP_BYTE:68 [ frame_cnt#2 frame_cnt#0 frame_cnt#1 ] zp ZP_WORD:220 [ rem16u#1 ] +Uplifting [memset] best 26361 combination zp ZP_WORD:34 [ memset::dst#2 memset::dst#3 memset::dst#1 ] zp ZP_WORD:134 [ memset::end#0 ] zp ZP_WORD:31 [ memset::num#2 ] reg byte x [ memset::c#3 ] zp ZP_WORD:29 [ memset::str#2 ] +Uplifting [bitmap_plot] best 26326 combination reg byte a [ bitmap_plot::y#0 ] zp ZP_WORD:112 [ bitmap_plot::$1 ] reg byte a [ bitmap_plot::$2 ] zp ZP_WORD:114 [ bitmap_plot::plotter#1 ] zp ZP_WORD:110 [ bitmap_plot::$3 ] zp ZP_WORD:87 [ bitmap_plot::x#0 ] +Uplifting [div32u16u] best 26326 combination zp ZP_DWORD:140 [ div32u16u::return#2 ] zp ZP_WORD:212 [ div32u16u::quotient_lo#0 ] zp ZP_DWORD:214 [ div32u16u::return#0 ] zp ZP_WORD:208 [ div32u16u::quotient_hi#0 ] +Uplifting [bitmap_clear] best 26326 combination +Uplifting [init_irq] best 26326 combination +Uplifting [irq] best 26326 combination +Attempting to uplift remaining variables inzp ZP_BYTE:68 [ frame_cnt#2 frame_cnt#0 frame_cnt#1 ] +Uplifting [] best 26326 combination zp ZP_BYTE:68 [ frame_cnt#2 frame_cnt#0 frame_cnt#1 ] +Attempting to uplift remaining variables inzp ZP_BYTE:8 [ main::r_add#10 main::r_add#12 main::r_add#1 ] +Uplifting [main] best 26326 combination zp ZP_BYTE:8 [ main::r_add#10 main::r_add#12 main::r_add#1 ] +Attempting to uplift remaining variables inzp ZP_BYTE:138 [ bitmap_init::$5 ] +Uplifting [bitmap_init] best 26266 combination reg byte a [ bitmap_init::$5 ] +Attempting to uplift remaining variables inzp ZP_BYTE:139 [ bitmap_init::$6 ] +Uplifting [bitmap_init] best 26206 combination reg byte a [ bitmap_init::$6 ] +Attempting to uplift remaining variables inzp ZP_BYTE:136 [ bitmap_init::$7 ] +Uplifting [bitmap_init] best 26206 combination zp ZP_BYTE:136 [ bitmap_init::$7 ] +Attempting to uplift remaining variables inzp ZP_BYTE:49 [ sin16s::isUpper#2 ] +Uplifting [sin16s] best 26206 combination zp ZP_BYTE:49 [ sin16s::isUpper#2 ] +Coalescing zero page register with common assignment [ zp ZP_WORD:4 [ main::r#10 main::r#1 ] ] with [ zp ZP_WORD:9 [ mul16s::a#3 mul16s::a#1 mul16s::a#2 mul16s::a#0 ] ] - score: 2 +Coalescing zero page register with common assignment [ zp ZP_WORD:54 [ sin16s::return#1 sin16s::return#5 sin16s::sinx#1 ] ] with [ zp ZP_WORD:190 [ sin16s::usinx#1 ] ] - score: 2 +Coalescing zero page register with common assignment [ zp ZP_WORD:56 [ mulu16_sel::v1#5 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 ] ] with [ zp ZP_WORD:172 [ sin16s::x3#0 ] ] - score: 2 +Coalescing zero page register with common assignment [ zp ZP_WORD:61 [ divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u::rem#11 divr16u::rem#6 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 ] ] with [ zp ZP_WORD:220 [ rem16u#1 ] ] - score: 2 +Coalescing zero page register with common assignment [ zp ZP_WORD:11 [ mul16s::b#3 mul16s::b#1 mul16s::b#2 ] ] with [ zp ZP_WORD:73 [ main::cos_x#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:11 [ mul16s::b#3 mul16s::b#1 mul16s::b#2 main::cos_x#0 ] ] with [ zp ZP_WORD:93 [ main::sin_y#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_DWORD:13 [ mul16s::m#4 mul16s::m#5 mul16s::m#1 mul16s::m#0 mul16s::m#2 ] ] with [ zp ZP_DWORD:117 [ mul16u::return#2 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_DWORD:13 [ mul16s::m#4 mul16s::m#5 mul16s::m#1 mul16s::m#0 mul16s::m#2 mul16u::return#2 ] ] with [ zp ZP_DWORD:129 [ mul16s::return#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:17 [ mul16u::b#1 ] ] with [ zp ZP_WORD:58 [ mulu16_sel::v2#5 mulu16_sel::v2#3 mulu16_sel::v2#4 mulu16_sel::v2#0 mulu16_sel::v2#1 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_DWORD:21 [ mul16u::res#2 mul16u::res#6 mul16u::res#1 ] ] with [ zp ZP_DWORD:192 [ mul16u::return#3 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:29 [ memset::str#2 ] ] with [ zp ZP_WORD:34 [ memset::dst#2 memset::dst#3 memset::dst#1 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:31 [ memset::num#2 ] ] with [ zp ZP_WORD:134 [ memset::end#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_DWORD:50 [ sin16s::x#6 sin16s::x#4 sin16s::x#0 sin16s::x#1 sin16s::x#2 ] ] with [ zp ZP_DWORD:160 [ sin16s::$4 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:54 [ sin16s::return#1 sin16s::return#5 sin16s::sinx#1 sin16s::usinx#1 ] ] with [ zp ZP_WORD:148 [ sin16s::return#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:56 [ mulu16_sel::v1#5 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 sin16s::x3#0 ] ] with [ zp ZP_WORD:168 [ sin16s::x2#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:56 [ mulu16_sel::v1#5 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 sin16s::x3#0 sin16s::x2#0 ] ] with [ zp ZP_WORD:182 [ sin16s::x4#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:65 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 ] ] with [ zp ZP_WORD:206 [ divr16u::return#2 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:65 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 divr16u::return#2 ] ] with [ zp ZP_WORD:210 [ divr16u::return#3 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:69 [ main::$32 ] ] with [ zp ZP_WORD:71 [ main::$34 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_DWORD:75 [ mul16s::return#3 ] ] with [ zp ZP_DWORD:79 [ main::xpos#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:83 [ main::$9 ] ] with [ zp ZP_WORD:85 [ main::$11 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:89 [ main::$33 ] ] with [ zp ZP_WORD:91 [ main::$35 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_DWORD:95 [ mul16s::return#4 ] ] with [ zp ZP_DWORD:99 [ main::ypos#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:103 [ main::$15 ] ] with [ zp ZP_WORD:105 [ main::$17 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:110 [ bitmap_plot::$3 ] ] with [ zp ZP_WORD:114 [ bitmap_plot::plotter#1 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:121 [ mul16s::$9 ] ] with [ zp ZP_WORD:123 [ mul16s::$16 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:125 [ mul16s::$13 ] ] with [ zp ZP_WORD:127 [ mul16s::$17 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_DWORD:140 [ div32u16u::return#2 ] ] with [ zp ZP_DWORD:144 [ sin16s_gen2::step#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_DWORD:140 [ div32u16u::return#2 sin16s_gen2::step#0 ] ] with [ zp ZP_DWORD:214 [ div32u16u::return#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_DWORD:150 [ mul16s::return#2 ] ] with [ zp ZP_DWORD:154 [ sin16s_gen2::$5 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:166 [ mulu16_sel::return#0 ] ] with [ zp ZP_WORD:204 [ mulu16_sel::return#12 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:174 [ mulu16_sel::return#2 ] ] with [ zp ZP_WORD:176 [ sin16s::x3_6#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:184 [ mulu16_sel::return#11 ] ] with [ zp ZP_WORD:186 [ sin16s::x5#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_DWORD:196 [ mulu16_sel::$0 ] ] with [ zp ZP_DWORD:200 [ mulu16_sel::$1 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:4 [ main::r#10 main::r#1 mul16s::a#3 mul16s::a#1 mul16s::a#2 mul16s::a#0 ] ] with [ zp ZP_WORD:54 [ sin16s::return#1 sin16s::return#5 sin16s::sinx#1 sin16s::usinx#1 sin16s::return#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:11 [ mul16s::b#3 mul16s::b#1 mul16s::b#2 main::cos_x#0 main::sin_y#0 ] ] with [ zp ZP_WORD:69 [ main::$32 main::$34 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:11 [ mul16s::b#3 mul16s::b#1 mul16s::b#2 main::cos_x#0 main::sin_y#0 main::$32 main::$34 ] ] with [ zp ZP_WORD:89 [ main::$33 main::$35 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_DWORD:13 [ mul16s::m#4 mul16s::m#5 mul16s::m#1 mul16s::m#0 mul16s::m#2 mul16u::return#2 mul16s::return#0 ] ] with [ zp ZP_DWORD:21 [ mul16u::res#2 mul16u::res#6 mul16u::res#1 mul16u::return#3 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_DWORD:13 [ mul16s::m#4 mul16s::m#5 mul16s::m#1 mul16s::m#0 mul16s::m#2 mul16u::return#2 mul16s::return#0 mul16u::res#2 mul16u::res#6 mul16u::res#1 mul16u::return#3 ] ] with [ zp ZP_DWORD:75 [ mul16s::return#3 main::xpos#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_DWORD:13 [ mul16s::m#4 mul16s::m#5 mul16s::m#1 mul16s::m#0 mul16s::m#2 mul16u::return#2 mul16s::return#0 mul16u::res#2 mul16u::res#6 mul16u::res#1 mul16u::return#3 mul16s::return#3 main::xpos#0 ] ] with [ zp ZP_DWORD:95 [ mul16s::return#4 main::ypos#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_DWORD:13 [ mul16s::m#4 mul16s::m#5 mul16s::m#1 mul16s::m#0 mul16s::m#2 mul16u::return#2 mul16s::return#0 mul16u::res#2 mul16u::res#6 mul16u::res#1 mul16u::return#3 mul16s::return#3 main::xpos#0 mul16s::return#4 main::ypos#0 ] ] with [ zp ZP_DWORD:150 [ mul16s::return#2 sin16s_gen2::$5 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:56 [ mulu16_sel::v1#5 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 sin16s::x3#0 sin16s::x2#0 sin16s::x4#0 ] ] with [ zp ZP_WORD:170 [ mulu16_sel::return#1 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:56 [ mulu16_sel::v1#5 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 sin16s::x3#0 sin16s::x2#0 sin16s::x4#0 mulu16_sel::return#1 ] ] with [ zp ZP_WORD:180 [ mulu16_sel::return#10 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:65 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 divr16u::return#2 divr16u::return#3 ] ] with [ zp ZP_WORD:212 [ div32u16u::quotient_lo#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:83 [ main::$9 main::$11 ] ] with [ zp ZP_WORD:87 [ bitmap_plot::x#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:103 [ main::$15 main::$17 ] ] with [ zp ZP_WORD:107 [ main::$18 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:166 [ mulu16_sel::return#0 mulu16_sel::return#12 ] ] with [ zp ZP_WORD:174 [ mulu16_sel::return#2 sin16s::x3_6#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:166 [ mulu16_sel::return#0 mulu16_sel::return#12 mulu16_sel::return#2 sin16s::x3_6#0 ] ] with [ zp ZP_WORD:184 [ mulu16_sel::return#11 sin16s::x5#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:4 [ main::r#10 main::r#1 mul16s::a#3 mul16s::a#1 mul16s::a#2 mul16s::a#0 sin16s::return#1 sin16s::return#5 sin16s::sinx#1 sin16s::usinx#1 sin16s::return#0 ] ] with [ zp ZP_WORD:178 [ sin16s::usinx#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_DWORD:13 [ mul16s::m#4 mul16s::m#5 mul16s::m#1 mul16s::m#0 mul16s::m#2 mul16u::return#2 mul16s::return#0 mul16u::res#2 mul16u::res#6 mul16u::res#1 mul16u::return#3 mul16s::return#3 main::xpos#0 mul16s::return#4 main::ypos#0 mul16s::return#2 sin16s_gen2::$5 ] ] with [ zp ZP_DWORD:196 [ mulu16_sel::$0 mulu16_sel::$1 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:166 [ mulu16_sel::return#0 mulu16_sel::return#12 mulu16_sel::return#2 sin16s::x3_6#0 mulu16_sel::return#11 sin16s::x5#0 ] ] with [ zp ZP_WORD:188 [ sin16s::x5_128#0 ] ] - score: 1 +Allocated (was zp ZP_WORD:11) zp ZP_WORD:9 [ mul16s::b#3 mul16s::b#1 mul16s::b#2 main::cos_x#0 main::sin_y#0 main::$32 main::$34 main::$33 main::$35 ] +Allocated (was zp ZP_DWORD:13) zp ZP_DWORD:11 [ mul16s::m#4 mul16s::m#5 mul16s::m#1 mul16s::m#0 mul16s::m#2 mul16u::return#2 mul16s::return#0 mul16u::res#2 mul16u::res#6 mul16u::res#1 mul16u::return#3 mul16s::return#3 main::xpos#0 mul16s::return#4 main::ypos#0 mul16s::return#2 sin16s_gen2::$5 mulu16_sel::$0 mulu16_sel::$1 ] +Allocated (was zp ZP_WORD:17) zp ZP_WORD:15 [ mul16u::b#1 mulu16_sel::v2#5 mulu16_sel::v2#3 mulu16_sel::v2#4 mulu16_sel::v2#0 mulu16_sel::v2#1 ] +Allocated (was zp ZP_WORD:19) zp ZP_WORD:17 [ mul16u::a#3 mul16u::a#6 mul16u::a#8 mul16u::a#2 mul16u::a#0 ] +Allocated (was zp ZP_DWORD:25) zp ZP_DWORD:19 [ mul16u::mb#2 mul16u::mb#0 mul16u::mb#6 mul16u::mb#1 ] +Allocated (was zp ZP_WORD:29) zp ZP_WORD:23 [ memset::str#2 memset::dst#2 memset::dst#3 memset::dst#1 ] +Allocated (was zp ZP_WORD:31) zp ZP_WORD:25 [ memset::num#2 memset::end#0 ] +Allocated (was zp ZP_WORD:39) zp ZP_WORD:27 [ bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 ] +Allocated (was zp ZP_DWORD:41) zp ZP_DWORD:29 [ sin16s_gen2::x#2 sin16s_gen2::x#1 ] +Allocated (was zp ZP_WORD:45) zp ZP_WORD:33 [ sin16s_gen2::sintab#2 sin16s_gen2::sintab#0 ] +Allocated (was zp ZP_WORD:47) zp ZP_WORD:35 [ sin16s_gen2::i#2 sin16s_gen2::i#1 ] +Allocated (was zp ZP_BYTE:49) zp ZP_BYTE:37 [ sin16s::isUpper#2 ] +Allocated (was zp ZP_DWORD:50) zp ZP_DWORD:38 [ sin16s::x#6 sin16s::x#4 sin16s::x#0 sin16s::x#1 sin16s::x#2 sin16s::$4 ] +Allocated (was zp ZP_WORD:56) zp ZP_WORD:42 [ mulu16_sel::v1#5 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 sin16s::x3#0 sin16s::x2#0 sin16s::x4#0 mulu16_sel::return#1 mulu16_sel::return#10 ] +Allocated (was zp ZP_WORD:61) zp ZP_WORD:44 [ divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u::rem#11 divr16u::rem#6 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 rem16u#1 ] +Allocated (was zp ZP_WORD:63) zp ZP_WORD:46 [ divr16u::dividend#3 divr16u::dividend#5 divr16u::dividend#0 ] +Allocated (was zp ZP_WORD:65) zp ZP_WORD:48 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 divr16u::return#2 divr16u::return#3 div32u16u::quotient_lo#0 ] +Allocated (was zp ZP_BYTE:68) zp ZP_BYTE:50 [ frame_cnt#2 frame_cnt#0 frame_cnt#1 ] +Allocated (was zp ZP_WORD:83) zp ZP_WORD:51 [ main::$9 main::$11 bitmap_plot::x#0 ] +Allocated (was zp ZP_WORD:103) zp ZP_WORD:53 [ main::$15 main::$17 main::$18 ] +Allocated (was zp ZP_WORD:110) zp ZP_WORD:55 [ bitmap_plot::$3 bitmap_plot::plotter#1 ] +Allocated (was zp ZP_WORD:112) zp ZP_WORD:57 [ bitmap_plot::$1 ] +Allocated (was zp ZP_WORD:121) zp ZP_WORD:59 [ mul16s::$9 mul16s::$16 ] +Allocated (was zp ZP_WORD:125) zp ZP_WORD:61 [ mul16s::$13 mul16s::$17 ] +Allocated (was zp ZP_BYTE:136) zp ZP_BYTE:63 [ bitmap_init::$7 ] +Allocated (was zp ZP_DWORD:140) zp ZP_DWORD:64 [ div32u16u::return#2 sin16s_gen2::step#0 div32u16u::return#0 ] +Allocated (was zp ZP_WORD:158) zp ZP_WORD:68 [ sin16s_gen2::$6 ] +Allocated (was zp ZP_WORD:164) zp ZP_WORD:70 [ sin16s::x1#0 ] +Allocated (was zp ZP_WORD:166) zp ZP_WORD:72 [ mulu16_sel::return#0 mulu16_sel::return#12 mulu16_sel::return#2 sin16s::x3_6#0 mulu16_sel::return#11 sin16s::x5#0 sin16s::x5_128#0 ] +Allocated (was zp ZP_WORD:208) zp ZP_WORD:74 [ div32u16u::quotient_hi#0 ] Interrupt procedure irq clobbers ACNZ -Removing interrupt register storage stx regx+1 in SEG424 entry interrupt(HARDWARE_CLOBBER) -Removing interrupt register storage sty regy+1 in SEG424 entry interrupt(HARDWARE_CLOBBER) -Removing interrupt register storage regx: in SEG435 [233] return - exit interrupt(HARDWARE_CLOBBER) -Removing interrupt register storage ldx #00 in SEG435 [233] return - exit interrupt(HARDWARE_CLOBBER) -Removing interrupt register storage regy: in SEG435 [233] return - exit interrupt(HARDWARE_CLOBBER) -Removing interrupt register storage ldy #00 in SEG435 [233] return - exit interrupt(HARDWARE_CLOBBER) +Removing interrupt register storage stx regx+1 in SEG435 entry interrupt(HARDWARE_CLOBBER) +Removing interrupt register storage sty regy+1 in SEG435 entry interrupt(HARDWARE_CLOBBER) +Removing interrupt register storage regx: in SEG446 [237] return - exit interrupt(HARDWARE_CLOBBER) +Removing interrupt register storage ldx #00 in SEG446 [237] return - exit interrupt(HARDWARE_CLOBBER) +Removing interrupt register storage regy: in SEG446 [237] return - exit interrupt(HARDWARE_CLOBBER) +Removing interrupt register storage ldy #00 in SEG446 [237] return - exit interrupt(HARDWARE_CLOBBER) ASSEMBLER BEFORE OPTIMIZATION //SEG0 File Comments @@ -6588,8 +6747,8 @@ ASSEMBLER BEFORE OPTIMIZATION .const PI_HALF_u4f28 = $1921fb54 .label BITMAP = $2000 .label SCREEN = $400 - .label rem16u = $2b - .label frame_cnt = $31 + .label rem16u = $2c + .label frame_cnt = $32 //SEG3 @begin bbegin: jmp b1 @@ -6615,104 +6774,107 @@ bend_from_b2: bend: //SEG12 main main: { - .const r_add = 4 .const toD0181_return = (>(SCREEN&$3fff)*4)|(>BITMAP)/4&$f - .label _9 = $32 - .label _11 = $32 - .label _15 = $34 - .label _17 = $34 - .label _18 = $34 - .label _28 = 8 - .label _29 = 8 - .label cos_x = 8 - .label xpos = $a - .label sin_y = 8 - .label ypos = $a + .label _9 = $33 + .label _11 = $33 + .label _15 = $35 + .label _17 = $35 + .label _18 = $35 + .label _32 = 9 + .label _33 = 9 + .label cos_x = 9 + .label xpos = $b + .label sin_y = 9 + .label ypos = $b .label idx_x = 2 .label idx_y = 6 .label r = 4 - .label _30 = 8 - .label _31 = 8 + .label r_add = 8 + .label _34 = 9 + .label _35 = 9 //SEG13 [6] call sin16s_gen2 - //SEG14 [131] phi from main to sin16s_gen2 [phi:main->sin16s_gen2] + //SEG14 [135] phi from main to sin16s_gen2 [phi:main->sin16s_gen2] sin16s_gen2_from_main: jsr sin16s_gen2 - //SEG15 [7] phi from main to main::@7 [phi:main->main::@7] - b7_from_main: - jmp b7 - //SEG16 main::@7 - b7: - //SEG17 [8] call bitmap_init - //SEG18 [109] phi from main::@7 to bitmap_init [phi:main::@7->bitmap_init] - bitmap_init_from_b7: - jsr bitmap_init - //SEG19 [9] phi from main::@7 to main::@8 [phi:main::@7->main::@8] - b8_from_b7: - jmp b8 - //SEG20 main::@8 - b8: - //SEG21 [10] call bitmap_clear - //SEG22 [96] phi from main::@8 to bitmap_clear [phi:main::@8->bitmap_clear] - bitmap_clear_from_b8: - jsr bitmap_clear + //SEG15 [7] phi from main to main::@9 [phi:main->main::@9] + b9_from_main: jmp b9 - //SEG23 main::@9 + //SEG16 main::@9 b9: + //SEG17 [8] call bitmap_init + //SEG18 [113] phi from main::@9 to bitmap_init [phi:main::@9->bitmap_init] + bitmap_init_from_b9: + jsr bitmap_init + //SEG19 [9] phi from main::@9 to main::@10 [phi:main::@9->main::@10] + b10_from_b9: + jmp b10 + //SEG20 main::@10 + b10: + //SEG21 [10] call bitmap_clear + //SEG22 [100] phi from main::@10 to bitmap_clear [phi:main::@10->bitmap_clear] + bitmap_clear_from_b10: + jsr bitmap_clear + jmp b11 + //SEG23 main::@11 + b11: //SEG24 [11] *((const byte*) D011#0) ← (const byte) VIC_BMM#0|(const byte) VIC_DEN#0|(const byte) VIC_RSEL#0|(byte) 3 -- _deref_pbuc1=vbuc2 lda #VIC_BMM|VIC_DEN|VIC_RSEL|3 sta D011 - //SEG25 [12] phi from main::@9 to main::toD0181 [phi:main::@9->main::toD0181] - toD0181_from_b9: + //SEG25 [12] phi from main::@11 to main::toD0181 [phi:main::@11->main::toD0181] + toD0181_from_b11: jmp toD0181 //SEG26 main::toD0181 toD0181: - jmp b6 - //SEG27 main::@6 - b6: + jmp b8 + //SEG27 main::@8 + b8: //SEG28 [13] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0 -- _deref_pbuc1=vbuc2 lda #toD0181_return sta D018 //SEG29 [14] call init_irq jsr init_irq - //SEG30 [15] phi from main::@6 to main::@1 [phi:main::@6->main::@1] - b1_from_b6: - //SEG31 [15] phi (word) main::idx_y#3 = (byte) $80 [phi:main::@6->main::@1#0] -- vwuz1=vbuc1 + //SEG30 [15] phi from main::@8 to main::@1 [phi:main::@8->main::@1] + b1_from_b8: + //SEG31 [15] phi (byte) main::r_add#10 = (byte) $20 [phi:main::@8->main::@1#0] -- vbuz1=vbuc1 + lda #$20 + sta r_add + //SEG32 [15] phi (word) main::idx_y#3 = (byte) $80 [phi:main::@8->main::@1#1] -- vwuz1=vbuc1 lda #$80 sta idx_y lda #0 sta idx_y+1 - //SEG32 [15] phi (signed word) main::r#10 = (signed byte) 0 [phi:main::@6->main::@1#1] -- vwsz1=vbsc1 + //SEG33 [15] phi (signed word) main::r#10 = (signed byte) 0 [phi:main::@8->main::@1#2] -- vwsz1=vbsc1 lda #0 sta r lda #0 sta r+1 - //SEG33 [15] phi (word) main::idx_x#3 = (byte) 0 [phi:main::@6->main::@1#2] -- vwuz1=vbuc1 + //SEG34 [15] phi (word) main::idx_x#11 = (byte) 0 [phi:main::@8->main::@1#3] -- vwuz1=vbuc1 lda #0 sta idx_x lda #0 sta idx_x+1 jmp b1 - //SEG34 main::@1 + //SEG35 main::@1 b1: jmp b2 - //SEG35 main::@2 + //SEG36 main::@2 b2: - //SEG36 [16] (word~) main::$28 ← (word) main::idx_x#3 << (byte) 1 -- vwuz1=vwuz2_rol_1 + //SEG37 [16] (word~) main::$32 ← (word) main::idx_x#11 << (byte) 1 -- vwuz1=vwuz2_rol_1 lda idx_x asl - sta _28 + sta _32 lda idx_x+1 rol - sta _28+1 - //SEG37 [17] (signed word*~) main::$30 ← (const signed word[$200]) SINUS#0 + (word~) main::$28 -- pwsz1=pwsc1_plus_vwuz1 + sta _32+1 + //SEG38 [17] (signed word*~) main::$34 ← (const signed word[$200]) SINUS#0 + (word~) main::$32 -- pwsz1=pwsc1_plus_vwuz1 clc - lda _30 + lda _34 adc #SINUS - sta _30+1 - //SEG38 [18] (signed word) main::cos_x#0 ← *((signed word*~) main::$30) -- vwsz1=_deref_pwsz1 + sta _34+1 + //SEG39 [18] (signed word) main::cos_x#0 ← *((signed word*~) main::$34) -- vwsz1=_deref_pwsz1 ldy #0 lda (cos_x),y tax @@ -6720,25 +6882,25 @@ main: { lda (cos_x),y stx cos_x sta cos_x+1 - //SEG39 [19] (signed word) mul16s::a#1 ← (signed word) main::r#10 - //SEG40 [20] (signed word) mul16s::b#1 ← (signed word) main::cos_x#0 - //SEG41 [21] call mul16s - //SEG42 [58] phi from main::@2 to mul16s [phi:main::@2->mul16s] + //SEG40 [19] (signed word) mul16s::a#1 ← (signed word) main::r#10 + //SEG41 [20] (signed word) mul16s::b#1 ← (signed word) main::cos_x#0 + //SEG42 [21] call mul16s + //SEG43 [62] phi from main::@2 to mul16s [phi:main::@2->mul16s] mul16s_from_b2: - //SEG43 [58] phi (signed word) mul16s::b#3 = (signed word) mul16s::b#1 [phi:main::@2->mul16s#0] -- register_copy - //SEG44 [58] phi (signed word) mul16s::a#3 = (signed word) mul16s::a#1 [phi:main::@2->mul16s#1] -- register_copy + //SEG44 [62] phi (signed word) mul16s::b#3 = (signed word) mul16s::b#1 [phi:main::@2->mul16s#0] -- register_copy + //SEG45 [62] phi (signed word) mul16s::a#3 = (signed word) mul16s::a#1 [phi:main::@2->mul16s#1] -- register_copy jsr mul16s - //SEG45 [22] (signed dword) mul16s::return#3 ← (signed dword) mul16s::return#0 - jmp b10 - //SEG46 main::@10 - b10: - //SEG47 [23] (signed dword) main::xpos#0 ← (signed dword) mul16s::return#3 - //SEG48 [24] (word~) main::$9 ← > (signed dword) main::xpos#0 -- vwuz1=_hi_vdsz2 + //SEG46 [22] (signed dword) mul16s::return#3 ← (signed dword) mul16s::return#0 + jmp b12 + //SEG47 main::@12 + b12: + //SEG48 [23] (signed dword) main::xpos#0 ← (signed dword) mul16s::return#3 + //SEG49 [24] (word~) main::$9 ← > (signed dword) main::xpos#0 -- vwuz1=_hi_vdsz2 lda xpos+2 sta _9 lda xpos+3 sta _9+1 - //SEG49 [25] (signed word~) main::$11 ← (signed word)(word~) main::$9 >> (signed byte) 2 -- vwsz1=vwsz1_ror_2 + //SEG50 [25] (signed word~) main::$11 ← (signed word)(word~) main::$9 >> (signed byte) 2 -- vwsz1=vwsz1_ror_2 lda _11+1 cmp #$80 ror _11+1 @@ -6747,7 +6909,7 @@ main: { cmp #$80 ror _11+1 ror _11 - //SEG50 [26] (signed word) bitmap_plot::x#0 ← (signed word) $a0 + (signed word~) main::$11 -- vwsz1=vwsc1_plus_vwsz1 + //SEG51 [26] (signed word) bitmap_plot::x#0 ← (signed word) $a0 + (signed word~) main::$11 -- vwsz1=vwsc1_plus_vwsz1 clc lda bitmap_plot.x adc #<$a0 @@ -6755,22 +6917,22 @@ main: { lda bitmap_plot.x+1 adc #>$a0 sta bitmap_plot.x+1 - //SEG51 [27] (word~) main::$29 ← (word) main::idx_y#3 << (byte) 1 -- vwuz1=vwuz2_rol_1 + //SEG52 [27] (word~) main::$33 ← (word) main::idx_y#3 << (byte) 1 -- vwuz1=vwuz2_rol_1 lda idx_y asl - sta _29 + sta _33 lda idx_y+1 rol - sta _29+1 - //SEG52 [28] (signed word*~) main::$31 ← (const signed word[$200]) SINUS#0 + (word~) main::$29 -- pwsz1=pwsc1_plus_vwuz1 + sta _33+1 + //SEG53 [28] (signed word*~) main::$35 ← (const signed word[$200]) SINUS#0 + (word~) main::$33 -- pwsz1=pwsc1_plus_vwuz1 clc - lda _31 + lda _35 adc #SINUS - sta _31+1 - //SEG53 [29] (signed word) main::sin_y#0 ← *((signed word*~) main::$31) -- vwsz1=_deref_pwsz1 + sta _35+1 + //SEG54 [29] (signed word) main::sin_y#0 ← *((signed word*~) main::$35) -- vwsz1=_deref_pwsz1 ldy #0 lda (sin_y),y tax @@ -6778,25 +6940,25 @@ main: { lda (sin_y),y stx sin_y sta sin_y+1 - //SEG54 [30] (signed word) mul16s::a#2 ← (signed word) main::r#10 - //SEG55 [31] (signed word) mul16s::b#2 ← (signed word) main::sin_y#0 - //SEG56 [32] call mul16s - //SEG57 [58] phi from main::@10 to mul16s [phi:main::@10->mul16s] - mul16s_from_b10: - //SEG58 [58] phi (signed word) mul16s::b#3 = (signed word) mul16s::b#2 [phi:main::@10->mul16s#0] -- register_copy - //SEG59 [58] phi (signed word) mul16s::a#3 = (signed word) mul16s::a#2 [phi:main::@10->mul16s#1] -- register_copy + //SEG55 [30] (signed word) mul16s::a#2 ← (signed word) main::r#10 + //SEG56 [31] (signed word) mul16s::b#2 ← (signed word) main::sin_y#0 + //SEG57 [32] call mul16s + //SEG58 [62] phi from main::@12 to mul16s [phi:main::@12->mul16s] + mul16s_from_b12: + //SEG59 [62] phi (signed word) mul16s::b#3 = (signed word) mul16s::b#2 [phi:main::@12->mul16s#0] -- register_copy + //SEG60 [62] phi (signed word) mul16s::a#3 = (signed word) mul16s::a#2 [phi:main::@12->mul16s#1] -- register_copy jsr mul16s - //SEG60 [33] (signed dword) mul16s::return#4 ← (signed dword) mul16s::return#0 - jmp b11 - //SEG61 main::@11 - b11: - //SEG62 [34] (signed dword) main::ypos#0 ← (signed dword) mul16s::return#4 - //SEG63 [35] (word~) main::$15 ← > (signed dword) main::ypos#0 -- vwuz1=_hi_vdsz2 + //SEG61 [33] (signed dword) mul16s::return#4 ← (signed dword) mul16s::return#0 + jmp b13 + //SEG62 main::@13 + b13: + //SEG63 [34] (signed dword) main::ypos#0 ← (signed dword) mul16s::return#4 + //SEG64 [35] (word~) main::$15 ← > (signed dword) main::ypos#0 -- vwuz1=_hi_vdsz2 lda ypos+2 sta _15 lda ypos+3 sta _15+1 - //SEG64 [36] (signed word~) main::$17 ← (signed word)(word~) main::$15 >> (signed byte) 2 -- vwsz1=vwsz1_ror_2 + //SEG65 [36] (signed word~) main::$17 ← (signed word)(word~) main::$15 >> (signed byte) 2 -- vwsz1=vwsz1_ror_2 lda _17+1 cmp #$80 ror _17+1 @@ -6805,7 +6967,7 @@ main: { cmp #$80 ror _17+1 ror _17 - //SEG65 [37] (signed word~) main::$18 ← (signed byte) $64 + (signed word~) main::$17 -- vwsz1=vbsc1_plus_vwsz1 + //SEG66 [37] (signed word~) main::$18 ← (signed byte) $64 + (signed word~) main::$17 -- vwsz1=vbsc1_plus_vwsz1 lda #$64 sta $fe ora #$7f @@ -6820,104 +6982,124 @@ main: { lda _18+1 adc $ff sta _18+1 - //SEG66 [38] (byte) bitmap_plot::y#0 ← (byte)(word)(signed word~) main::$18 -- vbuaa=_byte_vwuz1 + //SEG67 [38] (byte) bitmap_plot::y#0 ← (byte)(word)(signed word~) main::$18 -- vbuaa=_byte_vwuz1 lda _18 - //SEG67 [39] call bitmap_plot + //SEG68 [39] call bitmap_plot jsr bitmap_plot - jmp b12 - //SEG68 main::@12 - b12: - //SEG69 [40] *((const byte[$100]) plots_per_frame#0 + (byte) frame_cnt#0) ← ++ *((const byte[$100]) plots_per_frame#0 + (byte) frame_cnt#0) -- pbuc1_derefidx_vbuz1=_inc_pbuc1_derefidx_vbuz1 + jmp b14 + //SEG69 main::@14 + b14: + //SEG70 [40] *((const byte[$100]) plots_per_frame#0 + (byte) frame_cnt#0) ← ++ *((const byte[$100]) plots_per_frame#0 + (byte) frame_cnt#0) -- pbuc1_derefidx_vbuz1=_inc_pbuc1_derefidx_vbuz1 ldx frame_cnt inc plots_per_frame,x - //SEG70 [41] (word) main::idx_x#1 ← (word) main::idx_x#3 + (const byte) main::r_add#0 -- vwuz1=vwuz1_plus_vbuc1 - lda #r_add + //SEG71 [41] (word) main::idx_x#1 ← (word) main::idx_x#11 + (byte) main::r_add#10 -- vwuz1=vwuz1_plus_vbuz2 + lda r_add clc adc idx_x sta idx_x bcc !+ inc idx_x+1 !: - //SEG71 [42] if((word) main::idx_x#1<(word) $200) goto main::@13 -- vwuz1_lt_vwuc1_then_la1 + //SEG72 [42] if((word) main::idx_x#1<(word) $200) goto main::@16 -- vwuz1_lt_vwuc1_then_la1 lda idx_x+1 cmp #>$200 - bcc b13_from_b12 + bcc b16_from_b14 bne !+ lda idx_x cmp #<$200 - bcc b13_from_b12 + bcc b16_from_b14 !: - //SEG72 [44] phi from main::@12 to main::@3 [phi:main::@12->main::@3] - b3_from_b12: - //SEG73 [44] phi (word) main::idx_x#10 = (byte) 0 [phi:main::@12->main::@3#0] -- vwuz1=vbuc1 + //SEG73 [44] phi from main::@14 to main::@3 [phi:main::@14->main::@3] + b3_from_b14: + //SEG74 [44] phi (word) main::idx_x#10 = (byte) 0 [phi:main::@14->main::@3#0] -- vwuz1=vbuc1 lda #0 sta idx_x lda #0 sta idx_x+1 jmp b3 - //SEG74 [43] phi from main::@12 to main::@13 [phi:main::@12->main::@13] - b13_from_b12: - jmp b13 - //SEG75 main::@13 - b13: - //SEG76 [44] phi from main::@13 to main::@3 [phi:main::@13->main::@3] - b3_from_b13: - //SEG77 [44] phi (word) main::idx_x#10 = (word) main::idx_x#1 [phi:main::@13->main::@3#0] -- register_copy + //SEG75 [43] phi from main::@14 to main::@16 [phi:main::@14->main::@16] + b16_from_b14: + jmp b16 + //SEG76 main::@16 + b16: + //SEG77 [44] phi from main::@16 to main::@3 [phi:main::@16->main::@3] + b3_from_b16: + //SEG78 [44] phi (word) main::idx_x#10 = (word) main::idx_x#1 [phi:main::@16->main::@3#0] -- register_copy jmp b3 - //SEG78 main::@3 + //SEG79 main::@3 b3: - //SEG79 [45] (word) main::idx_y#1 ← (word) main::idx_y#3 + (const byte) main::r_add#0 -- vwuz1=vwuz1_plus_vbuc1 - lda #r_add + //SEG80 [45] (word) main::idx_y#1 ← (word) main::idx_y#3 + (byte) main::r_add#10 -- vwuz1=vwuz1_plus_vbuz2 + lda r_add clc adc idx_y sta idx_y bcc !+ inc idx_y+1 !: - //SEG80 [46] if((word) main::idx_y#1<(word) $200) goto main::@14 -- vwuz1_lt_vwuc1_then_la1 + //SEG81 [46] if((word) main::idx_y#1<(word) $200) goto main::@17 -- vwuz1_lt_vwuc1_then_la1 lda idx_y+1 cmp #>$200 - bcc b14_from_b3 + bcc b17_from_b3 bne !+ lda idx_y cmp #<$200 - bcc b14_from_b3 + bcc b17_from_b3 !: - //SEG81 [48] phi from main::@3 to main::@4 [phi:main::@3->main::@4] + //SEG82 [48] phi from main::@3 to main::@4 [phi:main::@3->main::@4] b4_from_b3: - //SEG82 [48] phi (word) main::idx_y#10 = (byte) 0 [phi:main::@3->main::@4#0] -- vwuz1=vbuc1 + //SEG83 [48] phi (word) main::idx_y#10 = (byte) 0 [phi:main::@3->main::@4#0] -- vwuz1=vbuc1 lda #0 sta idx_y lda #0 sta idx_y+1 jmp b4 - //SEG83 [47] phi from main::@3 to main::@14 [phi:main::@3->main::@14] - b14_from_b3: - jmp b14 - //SEG84 main::@14 - b14: - //SEG85 [48] phi from main::@14 to main::@4 [phi:main::@14->main::@4] - b4_from_b14: - //SEG86 [48] phi (word) main::idx_y#10 = (word) main::idx_y#1 [phi:main::@14->main::@4#0] -- register_copy + //SEG84 [47] phi from main::@3 to main::@17 [phi:main::@3->main::@17] + b17_from_b3: + jmp b17 + //SEG85 main::@17 + b17: + //SEG86 [48] phi from main::@17 to main::@4 [phi:main::@17->main::@4] + b4_from_b17: + //SEG87 [48] phi (word) main::idx_y#10 = (word) main::idx_y#1 [phi:main::@17->main::@4#0] -- register_copy jmp b4 - //SEG87 main::@4 + //SEG88 main::@4 b4: - //SEG88 [49] (signed word) main::r#1 ← (signed word) main::r#10 + (const byte) main::r_add#0 -- vwsz1=vwsz1_plus_vbsc1 - lda #r_add - sta $fe - ora #$7f - bmi !+ - lda #0 - !: - sta $ff + //SEG89 [49] (signed word) main::r#1 ← (signed word) main::r#10 + (byte) main::r_add#10 -- vwsz1=vwsz1_plus_vbuz2 clc lda r - adc $fe + adc r_add sta r lda r+1 - adc $ff + adc #0 sta r+1 - //SEG89 [50] if((signed word) main::r#1>=(signed word)(number) $200*(number) $c+(number) $100) goto main::@5 -- vwsz1_ge_vwsc1_then_la1 + //SEG90 [50] if((word) main::idx_x#10!=(byte) 0) goto main::@5 -- vwuz1_neq_0_then_la1 + lda idx_x + bne b5_from_b4 + lda idx_x+1 + bne b5_from_b4 + jmp b15 + //SEG91 main::@15 + b15: + //SEG92 [51] if((byte) main::r_add#10==(byte) 1) goto main::@5 -- vbuz1_eq_vbuc1_then_la1 + lda #1 + cmp r_add + beq b5_from_b15 + jmp b6 + //SEG93 main::@6 + b6: + //SEG94 [52] (byte) main::r_add#1 ← (byte) main::r_add#10 >> (byte) 1 -- vbuz1=vbuz1_ror_1 + lsr r_add + //SEG95 [53] phi from main::@4 main::@6 to main::@5 [phi:main::@4/main::@6->main::@5] + b5_from_b4: + b5_from_b6: + //SEG96 [53] phi (byte) main::r_add#12 = (byte) main::r_add#10 [phi:main::@4/main::@6->main::@5#0] -- register_copy + jmp b5 + //SEG97 [53] phi from main::@15 to main::@5 [phi:main::@15->main::@5] + b5_from_b15: + jmp b5 + //SEG98 main::@5 + b5: + //SEG99 [54] if((signed word) main::r#1>=(signed word)(number) $200*(number) $c+(number) $100) goto main::@7 -- vwsz1_ge_vwsc1_then_la1 lda r cmp #<$200*$c+$100 lda r+1 @@ -6925,41 +7107,42 @@ main: { bvc !+ eor #$80 !: - bpl b5 - //SEG90 [15] phi from main::@4 to main::@1 [phi:main::@4->main::@1] - b1_from_b4: - //SEG91 [15] phi (word) main::idx_y#3 = (word) main::idx_y#10 [phi:main::@4->main::@1#0] -- register_copy - //SEG92 [15] phi (signed word) main::r#10 = (signed word) main::r#1 [phi:main::@4->main::@1#1] -- register_copy - //SEG93 [15] phi (word) main::idx_x#3 = (word) main::idx_x#10 [phi:main::@4->main::@1#2] -- register_copy + bpl b7 + //SEG100 [15] phi from main::@5 to main::@1 [phi:main::@5->main::@1] + b1_from_b5: + //SEG101 [15] phi (byte) main::r_add#10 = (byte) main::r_add#12 [phi:main::@5->main::@1#0] -- register_copy + //SEG102 [15] phi (word) main::idx_y#3 = (word) main::idx_y#10 [phi:main::@5->main::@1#1] -- register_copy + //SEG103 [15] phi (signed word) main::r#10 = (signed word) main::r#1 [phi:main::@5->main::@1#2] -- register_copy + //SEG104 [15] phi (word) main::idx_x#11 = (word) main::idx_x#10 [phi:main::@5->main::@1#3] -- register_copy jmp b1 - //SEG94 main::@5 - b5: - //SEG95 [51] *((const byte*) BORDERCOL#0) ← ++ *((const byte*) BORDERCOL#0) -- _deref_pbuc1=_inc__deref_pbuc1 + //SEG105 main::@7 + b7: + //SEG106 [55] *((const byte*) BORDERCOL#0) ← ++ *((const byte*) BORDERCOL#0) -- _deref_pbuc1=_inc__deref_pbuc1 inc BORDERCOL - jmp b5 + jmp b7 } -//SEG96 bitmap_plot +//SEG107 bitmap_plot // Plot a single dot in the bitmap -// bitmap_plot(signed word zeropage($32) x, byte register(A) y) +// bitmap_plot(signed word zeropage($33) x, byte register(A) y) bitmap_plot: { - .label _1 = $38 - .label plotter = $36 - .label x = $32 - .label _3 = $36 - //SEG97 [52] (word~) bitmap_plot::$3 ← *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_plot::y#0) w= *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_plot::y#0) -- vwuz1=pbuc1_derefidx_vbuaa_word_pbuc2_derefidx_vbuaa + .label _1 = $39 + .label plotter = $37 + .label x = $33 + .label _3 = $37 + //SEG108 [56] (word~) bitmap_plot::$3 ← *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_plot::y#0) w= *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_plot::y#0) -- vwuz1=pbuc1_derefidx_vbuaa_word_pbuc2_derefidx_vbuaa tay lda bitmap_plot_yhi,y sta _3+1 lda bitmap_plot_ylo,y sta _3 - //SEG98 [53] (word~) bitmap_plot::$1 ← (word)(signed word) bitmap_plot::x#0 & (word) $fff8 -- vwuz1=vwuz2_band_vwuc1 + //SEG109 [57] (word~) bitmap_plot::$1 ← (word)(signed word) bitmap_plot::x#0 & (word) $fff8 -- vwuz1=vwuz2_band_vwuc1 lda x and #<$fff8 sta _1 lda x+1 and #>$fff8 sta _1+1 - //SEG99 [54] (byte*) bitmap_plot::plotter#1 ← (byte*)(word~) bitmap_plot::$3 + (word~) bitmap_plot::$1 -- pbuz1=pbuz1_plus_vwuz2 + //SEG110 [58] (byte*) bitmap_plot::plotter#1 ← (byte*)(word~) bitmap_plot::$3 + (word~) bitmap_plot::$1 -- pbuz1=pbuz1_plus_vwuz2 lda plotter clc adc _1 @@ -6967,9 +7150,9 @@ bitmap_plot: { lda plotter+1 adc _1+1 sta plotter+1 - //SEG100 [55] (byte~) bitmap_plot::$2 ← < (word)(signed word) bitmap_plot::x#0 -- vbuaa=_lo_vwuz1 + //SEG111 [59] (byte~) bitmap_plot::$2 ← < (word)(signed word) bitmap_plot::x#0 -- vbuaa=_lo_vwuz1 lda x - //SEG101 [56] *((byte*) bitmap_plot::plotter#1) ← *((byte*) bitmap_plot::plotter#1) | *((const byte[$100]) bitmap_plot_bit#0 + (byte~) bitmap_plot::$2) -- _deref_pbuz1=_deref_pbuz1_bor_pbuc1_derefidx_vbuaa + //SEG112 [60] *((byte*) bitmap_plot::plotter#1) ← *((byte*) bitmap_plot::plotter#1) | *((const byte[$100]) bitmap_plot_bit#0 + (byte~) bitmap_plot::$2) -- _deref_pbuz1=_deref_pbuz1_bor_pbuc1_derefidx_vbuaa tay lda bitmap_plot_bit,y ldy #0 @@ -6977,25 +7160,25 @@ bitmap_plot: { ldy #0 sta (plotter),y jmp breturn - //SEG102 bitmap_plot::@return + //SEG113 bitmap_plot::@return breturn: - //SEG103 [57] return + //SEG114 [61] return rts } -//SEG104 mul16s +//SEG115 mul16s // Multiply of two signed words to a signed double word // Fixes offsets introduced by using unsigned multiplication -// mul16s(signed word zeropage(4) a, signed word zeropage(8) b) +// mul16s(signed word zeropage(4) a, signed word zeropage(9) b) mul16s: { - .label _9 = $3a - .label _13 = $3c - .label _16 = $3a - .label _17 = $3c - .label m = $a - .label return = $a + .label _9 = $3b + .label _13 = $3d + .label _16 = $3b + .label _17 = $3d + .label m = $b + .label return = $b .label a = 4 - .label b = 8 - //SEG105 [59] (dword~) mul16u::mb#6 ← (word)(signed word) mul16s::b#3 -- vduz1=vwuz2 + .label b = 9 + //SEG116 [63] (dword~) mul16u::mb#6 ← (word)(signed word) mul16s::b#3 -- vduz1=vwuz2 lda b sta mul16u.mb lda b+1 @@ -7003,34 +7186,34 @@ mul16s: { lda #0 sta mul16u.mb+2 sta mul16u.mb+3 - //SEG106 [60] (word~) mul16u::a#8 ← (word)(signed word) mul16s::a#3 -- vwuz1=vwuz2 + //SEG117 [64] (word~) mul16u::a#8 ← (word)(signed word) mul16s::a#3 -- vwuz1=vwuz2 lda a sta mul16u.a lda a+1 sta mul16u.a+1 - //SEG107 [61] call mul16u - //SEG108 [76] phi from mul16s to mul16u [phi:mul16s->mul16u] + //SEG118 [65] call mul16u + //SEG119 [80] phi from mul16s to mul16u [phi:mul16s->mul16u] mul16u_from_mul16s: - //SEG109 [76] phi (word) mul16u::a#6 = (word~) mul16u::a#8 [phi:mul16s->mul16u#0] -- register_copy - //SEG110 [76] phi (dword) mul16u::mb#0 = (dword~) mul16u::mb#6 [phi:mul16s->mul16u#1] -- register_copy + //SEG120 [80] phi (word) mul16u::a#6 = (word~) mul16u::a#8 [phi:mul16s->mul16u#0] -- register_copy + //SEG121 [80] phi (dword) mul16u::mb#0 = (dword~) mul16u::mb#6 [phi:mul16s->mul16u#1] -- register_copy jsr mul16u - //SEG111 [62] (dword) mul16u::return#2 ← (dword) mul16u::res#2 + //SEG122 [66] (dword) mul16u::return#2 ← (dword) mul16u::res#2 jmp b5 - //SEG112 mul16s::@5 + //SEG123 mul16s::@5 b5: - //SEG113 [63] (dword) mul16s::m#0 ← (dword) mul16u::return#2 - //SEG114 [64] if((signed word) mul16s::a#3>=(signed byte) 0) goto mul16s::@1 -- vwsz1_ge_0_then_la1 + //SEG124 [67] (dword) mul16s::m#0 ← (dword) mul16u::return#2 + //SEG125 [68] if((signed word) mul16s::a#3>=(signed byte) 0) goto mul16s::@1 -- vwsz1_ge_0_then_la1 lda a+1 bpl b1_from_b5 jmp b3 - //SEG115 mul16s::@3 + //SEG126 mul16s::@3 b3: - //SEG116 [65] (word~) mul16s::$9 ← > (dword) mul16s::m#0 -- vwuz1=_hi_vduz2 + //SEG127 [69] (word~) mul16s::$9 ← > (dword) mul16s::m#0 -- vwuz1=_hi_vduz2 lda m+2 sta _9 lda m+3 sta _9+1 - //SEG117 [66] (word~) mul16s::$16 ← (word~) mul16s::$9 - (word)(signed word) mul16s::b#3 -- vwuz1=vwuz1_minus_vwuz2 + //SEG128 [70] (word~) mul16s::$16 ← (word~) mul16s::$9 - (word)(signed word) mul16s::b#3 -- vwuz1=vwuz1_minus_vwuz2 lda _16 sec sbc b @@ -7038,30 +7221,30 @@ mul16s: { lda _16+1 sbc b+1 sta _16+1 - //SEG118 [67] (dword) mul16s::m#1 ← (dword) mul16s::m#0 hi= (word~) mul16s::$16 -- vduz1=vduz1_sethi_vwuz2 + //SEG129 [71] (dword) mul16s::m#1 ← (dword) mul16s::m#0 hi= (word~) mul16s::$16 -- vduz1=vduz1_sethi_vwuz2 lda _16 sta m+2 lda _16+1 sta m+3 - //SEG119 [68] phi from mul16s::@3 mul16s::@5 to mul16s::@1 [phi:mul16s::@3/mul16s::@5->mul16s::@1] + //SEG130 [72] phi from mul16s::@3 mul16s::@5 to mul16s::@1 [phi:mul16s::@3/mul16s::@5->mul16s::@1] b1_from_b3: b1_from_b5: - //SEG120 [68] phi (dword) mul16s::m#5 = (dword) mul16s::m#1 [phi:mul16s::@3/mul16s::@5->mul16s::@1#0] -- register_copy + //SEG131 [72] phi (dword) mul16s::m#5 = (dword) mul16s::m#1 [phi:mul16s::@3/mul16s::@5->mul16s::@1#0] -- register_copy jmp b1 - //SEG121 mul16s::@1 + //SEG132 mul16s::@1 b1: - //SEG122 [69] if((signed word) mul16s::b#3>=(signed byte) 0) goto mul16s::@2 -- vwsz1_ge_0_then_la1 + //SEG133 [73] if((signed word) mul16s::b#3>=(signed byte) 0) goto mul16s::@2 -- vwsz1_ge_0_then_la1 lda b+1 bpl b2_from_b1 jmp b4 - //SEG123 mul16s::@4 + //SEG134 mul16s::@4 b4: - //SEG124 [70] (word~) mul16s::$13 ← > (dword) mul16s::m#5 -- vwuz1=_hi_vduz2 + //SEG135 [74] (word~) mul16s::$13 ← > (dword) mul16s::m#5 -- vwuz1=_hi_vduz2 lda m+2 sta _13 lda m+3 sta _13+1 - //SEG125 [71] (word~) mul16s::$17 ← (word~) mul16s::$13 - (word)(signed word) mul16s::a#3 -- vwuz1=vwuz1_minus_vwuz2 + //SEG136 [75] (word~) mul16s::$17 ← (word~) mul16s::$13 - (word)(signed word) mul16s::a#3 -- vwuz1=vwuz1_minus_vwuz2 lda _17 sec sbc a @@ -7069,70 +7252,70 @@ mul16s: { lda _17+1 sbc a+1 sta _17+1 - //SEG126 [72] (dword) mul16s::m#2 ← (dword) mul16s::m#5 hi= (word~) mul16s::$17 -- vduz1=vduz1_sethi_vwuz2 + //SEG137 [76] (dword) mul16s::m#2 ← (dword) mul16s::m#5 hi= (word~) mul16s::$17 -- vduz1=vduz1_sethi_vwuz2 lda _17 sta m+2 lda _17+1 sta m+3 - //SEG127 [73] phi from mul16s::@1 mul16s::@4 to mul16s::@2 [phi:mul16s::@1/mul16s::@4->mul16s::@2] + //SEG138 [77] phi from mul16s::@1 mul16s::@4 to mul16s::@2 [phi:mul16s::@1/mul16s::@4->mul16s::@2] b2_from_b1: b2_from_b4: - //SEG128 [73] phi (dword) mul16s::m#4 = (dword) mul16s::m#5 [phi:mul16s::@1/mul16s::@4->mul16s::@2#0] -- register_copy + //SEG139 [77] phi (dword) mul16s::m#4 = (dword) mul16s::m#5 [phi:mul16s::@1/mul16s::@4->mul16s::@2#0] -- register_copy jmp b2 - //SEG129 mul16s::@2 + //SEG140 mul16s::@2 b2: - //SEG130 [74] (signed dword) mul16s::return#0 ← (signed dword)(dword) mul16s::m#4 + //SEG141 [78] (signed dword) mul16s::return#0 ← (signed dword)(dword) mul16s::m#4 jmp breturn - //SEG131 mul16s::@return + //SEG142 mul16s::@return breturn: - //SEG132 [75] return + //SEG143 [79] return rts } -//SEG133 mul16u +//SEG144 mul16u // Perform binary multiplication of two unsigned 16-bit words into a 32-bit unsigned double word -// mul16u(word zeropage($10) a, word zeropage($e) b) +// mul16u(word zeropage($11) a, word zeropage($f) b) mul16u: { - .label mb = $12 - .label a = $10 - .label res = $a - .label return = $a - .label b = $e - //SEG134 [77] phi from mul16u to mul16u::@1 [phi:mul16u->mul16u::@1] + .label mb = $13 + .label a = $11 + .label res = $b + .label return = $b + .label b = $f + //SEG145 [81] phi from mul16u to mul16u::@1 [phi:mul16u->mul16u::@1] b1_from_mul16u: - //SEG135 [77] phi (dword) mul16u::mb#2 = (dword) mul16u::mb#0 [phi:mul16u->mul16u::@1#0] -- register_copy - //SEG136 [77] phi (dword) mul16u::res#2 = (byte) 0 [phi:mul16u->mul16u::@1#1] -- vduz1=vbuc1 + //SEG146 [81] phi (dword) mul16u::mb#2 = (dword) mul16u::mb#0 [phi:mul16u->mul16u::@1#0] -- register_copy + //SEG147 [81] phi (dword) mul16u::res#2 = (byte) 0 [phi:mul16u->mul16u::@1#1] -- vduz1=vbuc1 lda #0 sta res lda #0 sta res+1 sta res+2 sta res+3 - //SEG137 [77] phi (word) mul16u::a#3 = (word) mul16u::a#6 [phi:mul16u->mul16u::@1#2] -- register_copy + //SEG148 [81] phi (word) mul16u::a#3 = (word) mul16u::a#6 [phi:mul16u->mul16u::@1#2] -- register_copy jmp b1 - //SEG138 mul16u::@1 + //SEG149 mul16u::@1 b1: - //SEG139 [78] if((word) mul16u::a#3!=(byte) 0) goto mul16u::@2 -- vwuz1_neq_0_then_la1 + //SEG150 [82] if((word) mul16u::a#3!=(byte) 0) goto mul16u::@2 -- vwuz1_neq_0_then_la1 lda a bne b2 lda a+1 bne b2 jmp breturn - //SEG140 mul16u::@return + //SEG151 mul16u::@return breturn: - //SEG141 [79] return + //SEG152 [83] return rts - //SEG142 mul16u::@2 + //SEG153 mul16u::@2 b2: - //SEG143 [80] (byte~) mul16u::$1 ← (word) mul16u::a#3 & (byte) 1 -- vbuaa=vwuz1_band_vbuc1 + //SEG154 [84] (byte~) mul16u::$1 ← (word) mul16u::a#3 & (byte) 1 -- vbuaa=vwuz1_band_vbuc1 lda a and #1 - //SEG144 [81] if((byte~) mul16u::$1==(byte) 0) goto mul16u::@3 -- vbuaa_eq_0_then_la1 + //SEG155 [85] if((byte~) mul16u::$1==(byte) 0) goto mul16u::@3 -- vbuaa_eq_0_then_la1 cmp #0 beq b3_from_b2 jmp b4 - //SEG145 mul16u::@4 + //SEG156 mul16u::@4 b4: - //SEG146 [82] (dword) mul16u::res#1 ← (dword) mul16u::res#2 + (dword) mul16u::mb#2 -- vduz1=vduz1_plus_vduz2 + //SEG157 [86] (dword) mul16u::res#1 ← (dword) mul16u::res#2 + (dword) mul16u::mb#2 -- vduz1=vduz1_plus_vduz2 lda res clc adc mb @@ -7146,128 +7329,128 @@ mul16u: { lda res+3 adc mb+3 sta res+3 - //SEG147 [83] phi from mul16u::@2 mul16u::@4 to mul16u::@3 [phi:mul16u::@2/mul16u::@4->mul16u::@3] + //SEG158 [87] phi from mul16u::@2 mul16u::@4 to mul16u::@3 [phi:mul16u::@2/mul16u::@4->mul16u::@3] b3_from_b2: b3_from_b4: - //SEG148 [83] phi (dword) mul16u::res#6 = (dword) mul16u::res#2 [phi:mul16u::@2/mul16u::@4->mul16u::@3#0] -- register_copy + //SEG159 [87] phi (dword) mul16u::res#6 = (dword) mul16u::res#2 [phi:mul16u::@2/mul16u::@4->mul16u::@3#0] -- register_copy jmp b3 - //SEG149 mul16u::@3 + //SEG160 mul16u::@3 b3: - //SEG150 [84] (word) mul16u::a#0 ← (word) mul16u::a#3 >> (byte) 1 -- vwuz1=vwuz1_ror_1 + //SEG161 [88] (word) mul16u::a#0 ← (word) mul16u::a#3 >> (byte) 1 -- vwuz1=vwuz1_ror_1 lsr a+1 ror a - //SEG151 [85] (dword) mul16u::mb#1 ← (dword) mul16u::mb#2 << (byte) 1 -- vduz1=vduz1_rol_1 + //SEG162 [89] (dword) mul16u::mb#1 ← (dword) mul16u::mb#2 << (byte) 1 -- vduz1=vduz1_rol_1 asl mb rol mb+1 rol mb+2 rol mb+3 - //SEG152 [77] phi from mul16u::@3 to mul16u::@1 [phi:mul16u::@3->mul16u::@1] + //SEG163 [81] phi from mul16u::@3 to mul16u::@1 [phi:mul16u::@3->mul16u::@1] b1_from_b3: - //SEG153 [77] phi (dword) mul16u::mb#2 = (dword) mul16u::mb#1 [phi:mul16u::@3->mul16u::@1#0] -- register_copy - //SEG154 [77] phi (dword) mul16u::res#2 = (dword) mul16u::res#6 [phi:mul16u::@3->mul16u::@1#1] -- register_copy - //SEG155 [77] phi (word) mul16u::a#3 = (word) mul16u::a#0 [phi:mul16u::@3->mul16u::@1#2] -- register_copy + //SEG164 [81] phi (dword) mul16u::mb#2 = (dword) mul16u::mb#1 [phi:mul16u::@3->mul16u::@1#0] -- register_copy + //SEG165 [81] phi (dword) mul16u::res#2 = (dword) mul16u::res#6 [phi:mul16u::@3->mul16u::@1#1] -- register_copy + //SEG166 [81] phi (word) mul16u::a#3 = (word) mul16u::a#0 [phi:mul16u::@3->mul16u::@1#2] -- register_copy jmp b1 } -//SEG156 init_irq +//SEG167 init_irq // Setup the IRQ init_irq: { - //SEG157 asm { sei } + //SEG168 asm { sei } sei - //SEG158 [87] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 -- _deref_pbuc1=vbuc2 + //SEG169 [91] *((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 - //SEG159 [88] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 -- _deref_pbuc1=vbuc2 + //SEG170 [92] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 -- _deref_pbuc1=vbuc2 lda #PROCPORT_RAM_IO sta PROCPORT - //SEG160 [89] *((const byte*) CIA1_INTERRUPT#0) ← (const byte) CIA_INTERRUPT_CLEAR#0 -- _deref_pbuc1=vbuc2 + //SEG171 [93] *((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 - //SEG161 [90] *((const byte*) VIC_CONTROL#0) ← *((const byte*) VIC_CONTROL#0) | (byte) $80 -- _deref_pbuc1=_deref_pbuc1_bor_vbuc2 + //SEG172 [94] *((const byte*) VIC_CONTROL#0) ← *((const byte*) VIC_CONTROL#0) | (byte) $80 -- _deref_pbuc1=_deref_pbuc1_bor_vbuc2 // Set raster line to $100 lda #$80 ora VIC_CONTROL sta VIC_CONTROL - //SEG162 [91] *((const byte*) RASTER#0) ← (byte) 0 -- _deref_pbuc1=vbuc2 + //SEG173 [95] *((const byte*) RASTER#0) ← (byte) 0 -- _deref_pbuc1=vbuc2 lda #0 sta RASTER - //SEG163 [92] *((const byte*) IRQ_ENABLE#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 + //SEG174 [96] *((const byte*) IRQ_ENABLE#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 // Enable Raster Interrupt lda #IRQ_RASTER sta IRQ_ENABLE - //SEG164 [93] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_CLOBBER)(void()) irq() -- _deref_pptc1=pprc2 + //SEG175 [97] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_CLOBBER)(void()) irq() -- _deref_pptc1=pprc2 // Set the IRQ routine lda #irq sta HARDWARE_IRQ+1 - //SEG165 asm { cli } + //SEG176 asm { cli } cli jmp breturn - //SEG166 init_irq::@return + //SEG177 init_irq::@return breturn: - //SEG167 [95] return + //SEG178 [99] return rts } -//SEG168 bitmap_clear +//SEG179 bitmap_clear // Clear all graphics on the bitmap // bgcol - the background color to fill the screen with // fgcol - the foreground color to fill the screen with bitmap_clear: { .const col = WHITE*$10 - //SEG169 [97] call memset - //SEG170 [101] phi from bitmap_clear to memset [phi:bitmap_clear->memset] + //SEG180 [101] call memset + //SEG181 [105] phi from bitmap_clear to memset [phi:bitmap_clear->memset] memset_from_bitmap_clear: - //SEG171 [101] phi (byte) memset::c#3 = (const byte) bitmap_clear::col#0 [phi:bitmap_clear->memset#0] -- vbuxx=vbuc1 + //SEG182 [105] phi (byte) memset::c#3 = (const byte) bitmap_clear::col#0 [phi:bitmap_clear->memset#0] -- vbuxx=vbuc1 ldx #col - //SEG172 [101] phi (word) memset::num#2 = (word) $3e8 [phi:bitmap_clear->memset#1] -- vwuz1=vwuc1 + //SEG183 [105] phi (word) memset::num#2 = (word) $3e8 [phi:bitmap_clear->memset#1] -- vwuz1=vwuc1 lda #<$3e8 sta memset.num lda #>$3e8 sta memset.num+1 - //SEG173 [101] phi (void*) memset::str#2 = (void*)(const byte*) SCREEN#0 [phi:bitmap_clear->memset#2] -- pvoz1=pvoc1 + //SEG184 [105] phi (void*) memset::str#2 = (void*)(const byte*) SCREEN#0 [phi:bitmap_clear->memset#2] -- pvoz1=pvoc1 lda #SCREEN sta memset.str+1 jsr memset - //SEG174 [98] phi from bitmap_clear to bitmap_clear::@1 [phi:bitmap_clear->bitmap_clear::@1] + //SEG185 [102] phi from bitmap_clear to bitmap_clear::@1 [phi:bitmap_clear->bitmap_clear::@1] b1_from_bitmap_clear: jmp b1 - //SEG175 bitmap_clear::@1 + //SEG186 bitmap_clear::@1 b1: - //SEG176 [99] call memset - //SEG177 [101] phi from bitmap_clear::@1 to memset [phi:bitmap_clear::@1->memset] + //SEG187 [103] call memset + //SEG188 [105] phi from bitmap_clear::@1 to memset [phi:bitmap_clear::@1->memset] memset_from_b1: - //SEG178 [101] phi (byte) memset::c#3 = (byte) 0 [phi:bitmap_clear::@1->memset#0] -- vbuxx=vbuc1 + //SEG189 [105] phi (byte) memset::c#3 = (byte) 0 [phi:bitmap_clear::@1->memset#0] -- vbuxx=vbuc1 ldx #0 - //SEG179 [101] phi (word) memset::num#2 = (word) $1f40 [phi:bitmap_clear::@1->memset#1] -- vwuz1=vwuc1 + //SEG190 [105] phi (word) memset::num#2 = (word) $1f40 [phi:bitmap_clear::@1->memset#1] -- vwuz1=vwuc1 lda #<$1f40 sta memset.num lda #>$1f40 sta memset.num+1 - //SEG180 [101] phi (void*) memset::str#2 = (void*)(const byte*) BITMAP#0 [phi:bitmap_clear::@1->memset#2] -- pvoz1=pvoc1 + //SEG191 [105] phi (void*) memset::str#2 = (void*)(const byte*) BITMAP#0 [phi:bitmap_clear::@1->memset#2] -- pvoz1=pvoc1 lda #BITMAP sta memset.str+1 jsr memset jmp breturn - //SEG181 bitmap_clear::@return + //SEG192 bitmap_clear::@return breturn: - //SEG182 [100] return + //SEG193 [104] return rts } -//SEG183 memset +//SEG194 memset // Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str. -// memset(void* zeropage($16) str, byte register(X) c, word zeropage($18) num) +// memset(void* zeropage($17) str, byte register(X) c, word zeropage($19) num) memset: { - .label end = $18 - .label dst = $16 - .label str = $16 - .label num = $18 - //SEG184 [102] (byte*) memset::end#0 ← (byte*)(void*) memset::str#2 + (word) memset::num#2 -- pbuz1=pbuz2_plus_vwuz1 + .label end = $19 + .label dst = $17 + .label str = $17 + .label num = $19 + //SEG195 [106] (byte*) memset::end#0 ← (byte*)(void*) memset::str#2 + (word) memset::num#2 -- pbuz1=pbuz2_plus_vwuz1 lda end clc adc str @@ -7275,24 +7458,24 @@ memset: { lda end+1 adc str+1 sta end+1 - //SEG185 [103] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#2 - //SEG186 [104] phi from memset memset::@1 to memset::@1 [phi:memset/memset::@1->memset::@1] + //SEG196 [107] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#2 + //SEG197 [108] phi from memset memset::@1 to memset::@1 [phi:memset/memset::@1->memset::@1] b1_from_memset: b1_from_b1: - //SEG187 [104] phi (byte*) memset::dst#2 = (byte*~) memset::dst#3 [phi:memset/memset::@1->memset::@1#0] -- register_copy + //SEG198 [108] phi (byte*) memset::dst#2 = (byte*~) memset::dst#3 [phi:memset/memset::@1->memset::@1#0] -- register_copy jmp b1 - //SEG188 memset::@1 + //SEG199 memset::@1 b1: - //SEG189 [105] *((byte*) memset::dst#2) ← (byte) memset::c#3 -- _deref_pbuz1=vbuxx + //SEG200 [109] *((byte*) memset::dst#2) ← (byte) memset::c#3 -- _deref_pbuz1=vbuxx txa ldy #0 sta (dst),y - //SEG190 [106] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 -- pbuz1=_inc_pbuz1 + //SEG201 [110] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 -- pbuz1=_inc_pbuz1 inc dst bne !+ inc dst+1 !: - //SEG191 [107] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@1 -- pbuz1_neq_pbuz2_then_la1 + //SEG202 [111] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@1 -- pbuz1_neq_pbuz2_then_la1 lda dst+1 cmp end+1 bne b1_from_b1 @@ -7300,96 +7483,96 @@ memset: { cmp end bne b1_from_b1 jmp breturn - //SEG192 memset::@return + //SEG203 memset::@return breturn: - //SEG193 [108] return + //SEG204 [112] return rts } -//SEG194 bitmap_init +//SEG205 bitmap_init // Initialize bitmap plotting tables bitmap_init: { - .label _7 = $3e - .label yoffs = $1a - //SEG195 [110] phi from bitmap_init to bitmap_init::@1 [phi:bitmap_init->bitmap_init::@1] + .label _7 = $3f + .label yoffs = $1b + //SEG206 [114] phi from bitmap_init to bitmap_init::@1 [phi:bitmap_init->bitmap_init::@1] b1_from_bitmap_init: - //SEG196 [110] phi (byte) bitmap_init::x#2 = (byte) 0 [phi:bitmap_init->bitmap_init::@1#0] -- vbuxx=vbuc1 + //SEG207 [114] phi (byte) bitmap_init::x#2 = (byte) 0 [phi:bitmap_init->bitmap_init::@1#0] -- vbuxx=vbuc1 ldx #0 - //SEG197 [110] phi (byte) bitmap_init::bits#3 = (byte) $80 [phi:bitmap_init->bitmap_init::@1#1] -- vbuaa=vbuc1 + //SEG208 [114] phi (byte) bitmap_init::bits#3 = (byte) $80 [phi:bitmap_init->bitmap_init::@1#1] -- vbuaa=vbuc1 lda #$80 jmp b1 - //SEG198 [110] phi from bitmap_init::@2 to bitmap_init::@1 [phi:bitmap_init::@2->bitmap_init::@1] + //SEG209 [114] phi from bitmap_init::@2 to bitmap_init::@1 [phi:bitmap_init::@2->bitmap_init::@1] b1_from_b2: - //SEG199 [110] phi (byte) bitmap_init::x#2 = (byte) bitmap_init::x#1 [phi:bitmap_init::@2->bitmap_init::@1#0] -- register_copy - //SEG200 [110] phi (byte) bitmap_init::bits#3 = (byte) bitmap_init::bits#4 [phi:bitmap_init::@2->bitmap_init::@1#1] -- register_copy + //SEG210 [114] phi (byte) bitmap_init::x#2 = (byte) bitmap_init::x#1 [phi:bitmap_init::@2->bitmap_init::@1#0] -- register_copy + //SEG211 [114] phi (byte) bitmap_init::bits#3 = (byte) bitmap_init::bits#4 [phi:bitmap_init::@2->bitmap_init::@1#1] -- register_copy jmp b1 - //SEG201 bitmap_init::@1 + //SEG212 bitmap_init::@1 b1: - //SEG202 [111] *((const byte[$100]) bitmap_plot_bit#0 + (byte) bitmap_init::x#2) ← (byte) bitmap_init::bits#3 -- pbuc1_derefidx_vbuxx=vbuaa + //SEG213 [115] *((const byte[$100]) bitmap_plot_bit#0 + (byte) bitmap_init::x#2) ← (byte) bitmap_init::bits#3 -- pbuc1_derefidx_vbuxx=vbuaa sta bitmap_plot_bit,x - //SEG203 [112] (byte) bitmap_init::bits#1 ← (byte) bitmap_init::bits#3 >> (byte) 1 -- vbuaa=vbuaa_ror_1 + //SEG214 [116] (byte) bitmap_init::bits#1 ← (byte) bitmap_init::bits#3 >> (byte) 1 -- vbuaa=vbuaa_ror_1 lsr - //SEG204 [113] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@6 -- vbuaa_neq_0_then_la1 + //SEG215 [117] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@6 -- vbuaa_neq_0_then_la1 cmp #0 bne b6_from_b1 - //SEG205 [115] phi from bitmap_init::@1 to bitmap_init::@2 [phi:bitmap_init::@1->bitmap_init::@2] + //SEG216 [119] phi from bitmap_init::@1 to bitmap_init::@2 [phi:bitmap_init::@1->bitmap_init::@2] b2_from_b1: - //SEG206 [115] phi (byte) bitmap_init::bits#4 = (byte) $80 [phi:bitmap_init::@1->bitmap_init::@2#0] -- vbuaa=vbuc1 + //SEG217 [119] phi (byte) bitmap_init::bits#4 = (byte) $80 [phi:bitmap_init::@1->bitmap_init::@2#0] -- vbuaa=vbuc1 lda #$80 jmp b2 - //SEG207 [114] phi from bitmap_init::@1 to bitmap_init::@6 [phi:bitmap_init::@1->bitmap_init::@6] + //SEG218 [118] phi from bitmap_init::@1 to bitmap_init::@6 [phi:bitmap_init::@1->bitmap_init::@6] b6_from_b1: jmp b6 - //SEG208 bitmap_init::@6 + //SEG219 bitmap_init::@6 b6: - //SEG209 [115] phi from bitmap_init::@6 to bitmap_init::@2 [phi:bitmap_init::@6->bitmap_init::@2] + //SEG220 [119] phi from bitmap_init::@6 to bitmap_init::@2 [phi:bitmap_init::@6->bitmap_init::@2] b2_from_b6: - //SEG210 [115] phi (byte) bitmap_init::bits#4 = (byte) bitmap_init::bits#1 [phi:bitmap_init::@6->bitmap_init::@2#0] -- register_copy + //SEG221 [119] phi (byte) bitmap_init::bits#4 = (byte) bitmap_init::bits#1 [phi:bitmap_init::@6->bitmap_init::@2#0] -- register_copy jmp b2 - //SEG211 bitmap_init::@2 + //SEG222 bitmap_init::@2 b2: - //SEG212 [116] (byte) bitmap_init::x#1 ← ++ (byte) bitmap_init::x#2 -- vbuxx=_inc_vbuxx + //SEG223 [120] (byte) bitmap_init::x#1 ← ++ (byte) bitmap_init::x#2 -- vbuxx=_inc_vbuxx inx - //SEG213 [117] if((byte) bitmap_init::x#1!=(byte) 0) goto bitmap_init::@1 -- vbuxx_neq_0_then_la1 + //SEG224 [121] if((byte) bitmap_init::x#1!=(byte) 0) goto bitmap_init::@1 -- vbuxx_neq_0_then_la1 cpx #0 bne b1_from_b2 - //SEG214 [118] phi from bitmap_init::@2 to bitmap_init::@3 [phi:bitmap_init::@2->bitmap_init::@3] + //SEG225 [122] phi from bitmap_init::@2 to bitmap_init::@3 [phi:bitmap_init::@2->bitmap_init::@3] b3_from_b2: - //SEG215 [118] phi (byte*) bitmap_init::yoffs#2 = (const byte*) BITMAP#0 [phi:bitmap_init::@2->bitmap_init::@3#0] -- pbuz1=pbuc1 + //SEG226 [122] phi (byte*) bitmap_init::yoffs#2 = (const byte*) BITMAP#0 [phi:bitmap_init::@2->bitmap_init::@3#0] -- pbuz1=pbuc1 lda #BITMAP sta yoffs+1 - //SEG216 [118] phi (byte) bitmap_init::y#2 = (byte) 0 [phi:bitmap_init::@2->bitmap_init::@3#1] -- vbuxx=vbuc1 + //SEG227 [122] phi (byte) bitmap_init::y#2 = (byte) 0 [phi:bitmap_init::@2->bitmap_init::@3#1] -- vbuxx=vbuc1 ldx #0 jmp b3 - //SEG217 [118] phi from bitmap_init::@4 to bitmap_init::@3 [phi:bitmap_init::@4->bitmap_init::@3] + //SEG228 [122] phi from bitmap_init::@4 to bitmap_init::@3 [phi:bitmap_init::@4->bitmap_init::@3] b3_from_b4: - //SEG218 [118] phi (byte*) bitmap_init::yoffs#2 = (byte*) bitmap_init::yoffs#4 [phi:bitmap_init::@4->bitmap_init::@3#0] -- register_copy - //SEG219 [118] phi (byte) bitmap_init::y#2 = (byte) bitmap_init::y#1 [phi:bitmap_init::@4->bitmap_init::@3#1] -- register_copy + //SEG229 [122] phi (byte*) bitmap_init::yoffs#2 = (byte*) bitmap_init::yoffs#4 [phi:bitmap_init::@4->bitmap_init::@3#0] -- register_copy + //SEG230 [122] phi (byte) bitmap_init::y#2 = (byte) bitmap_init::y#1 [phi:bitmap_init::@4->bitmap_init::@3#1] -- register_copy jmp b3 - //SEG220 bitmap_init::@3 + //SEG231 bitmap_init::@3 b3: - //SEG221 [119] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 -- vbuz1=vbuxx_band_vbuc1 + //SEG232 [123] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 -- vbuz1=vbuxx_band_vbuc1 lda #7 sax _7 - //SEG222 [120] (byte~) bitmap_init::$4 ← < (byte*) bitmap_init::yoffs#2 -- vbuaa=_lo_pbuz1 + //SEG233 [124] (byte~) bitmap_init::$4 ← < (byte*) bitmap_init::yoffs#2 -- vbuaa=_lo_pbuz1 lda yoffs - //SEG223 [121] (byte~) bitmap_init::$5 ← (byte~) bitmap_init::$7 | (byte~) bitmap_init::$4 -- vbuaa=vbuz1_bor_vbuaa + //SEG234 [125] (byte~) bitmap_init::$5 ← (byte~) bitmap_init::$7 | (byte~) bitmap_init::$4 -- vbuaa=vbuz1_bor_vbuaa ora _7 - //SEG224 [122] *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$5 -- pbuc1_derefidx_vbuxx=vbuaa + //SEG235 [126] *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$5 -- pbuc1_derefidx_vbuxx=vbuaa sta bitmap_plot_ylo,x - //SEG225 [123] (byte~) bitmap_init::$6 ← > (byte*) bitmap_init::yoffs#2 -- vbuaa=_hi_pbuz1 + //SEG236 [127] (byte~) bitmap_init::$6 ← > (byte*) bitmap_init::yoffs#2 -- vbuaa=_hi_pbuz1 lda yoffs+1 - //SEG226 [124] *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$6 -- pbuc1_derefidx_vbuxx=vbuaa + //SEG237 [128] *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$6 -- pbuc1_derefidx_vbuxx=vbuaa sta bitmap_plot_yhi,x - //SEG227 [125] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@4 -- vbuz1_neq_vbuc1_then_la1 + //SEG238 [129] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@4 -- vbuz1_neq_vbuc1_then_la1 lda #7 cmp _7 bne b4_from_b3 jmp b5 - //SEG228 bitmap_init::@5 + //SEG239 bitmap_init::@5 b5: - //SEG229 [126] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 -- pbuz1=pbuz1_plus_vwuc1 + //SEG240 [130] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 -- pbuz1=pbuz1_plus_vwuc1 clc lda yoffs adc #<$28*8 @@ -7397,62 +7580,62 @@ bitmap_init: { lda yoffs+1 adc #>$28*8 sta yoffs+1 - //SEG230 [127] phi from bitmap_init::@3 bitmap_init::@5 to bitmap_init::@4 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4] + //SEG241 [131] phi from bitmap_init::@3 bitmap_init::@5 to bitmap_init::@4 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4] b4_from_b3: b4_from_b5: - //SEG231 [127] phi (byte*) bitmap_init::yoffs#4 = (byte*) bitmap_init::yoffs#2 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4#0] -- register_copy + //SEG242 [131] phi (byte*) bitmap_init::yoffs#4 = (byte*) bitmap_init::yoffs#2 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4#0] -- register_copy jmp b4 - //SEG232 bitmap_init::@4 + //SEG243 bitmap_init::@4 b4: - //SEG233 [128] (byte) bitmap_init::y#1 ← ++ (byte) bitmap_init::y#2 -- vbuxx=_inc_vbuxx + //SEG244 [132] (byte) bitmap_init::y#1 ← ++ (byte) bitmap_init::y#2 -- vbuxx=_inc_vbuxx inx - //SEG234 [129] if((byte) bitmap_init::y#1!=(byte) 0) goto bitmap_init::@3 -- vbuxx_neq_0_then_la1 + //SEG245 [133] if((byte) bitmap_init::y#1!=(byte) 0) goto bitmap_init::@3 -- vbuxx_neq_0_then_la1 cpx #0 bne b3_from_b4 jmp breturn - //SEG235 bitmap_init::@return + //SEG246 bitmap_init::@return breturn: - //SEG236 [130] return + //SEG247 [134] return rts } -//SEG237 sin16s_gen2 +//SEG248 sin16s_gen2 // Generate signed word sinus table - with values in the range min-max. // sintab - the table to generate into // wavelength - the number of sinus points in a total sinus wavelength (the size of the table) -// sin16s_gen2(signed word* zeropage($20) sintab) +// sin16s_gen2(signed word* zeropage($21) sintab) sin16s_gen2: { .label wavelength = $200 .const min = -$1001 .const max = $1001 .const ampl = max-min - .label _5 = $a - .label _6 = $43 - .label step = $3f - .label sintab = $20 - .label x = $1c - .label i = $22 - //SEG238 [132] call div32u16u - //SEG239 [199] phi from sin16s_gen2 to div32u16u [phi:sin16s_gen2->div32u16u] + .label _5 = $b + .label _6 = $44 + .label step = $40 + .label sintab = $21 + .label x = $1d + .label i = $23 + //SEG249 [136] call div32u16u + //SEG250 [203] phi from sin16s_gen2 to div32u16u [phi:sin16s_gen2->div32u16u] div32u16u_from_sin16s_gen2: jsr div32u16u - //SEG240 [133] (dword) div32u16u::return#2 ← (dword) div32u16u::return#0 + //SEG251 [137] (dword) div32u16u::return#2 ← (dword) div32u16u::return#0 jmp b2 - //SEG241 sin16s_gen2::@2 + //SEG252 sin16s_gen2::@2 b2: - //SEG242 [134] (dword) sin16s_gen2::step#0 ← (dword) div32u16u::return#2 - //SEG243 [135] phi from sin16s_gen2::@2 to sin16s_gen2::@1 [phi:sin16s_gen2::@2->sin16s_gen2::@1] + //SEG253 [138] (dword) sin16s_gen2::step#0 ← (dword) div32u16u::return#2 + //SEG254 [139] phi from sin16s_gen2::@2 to sin16s_gen2::@1 [phi:sin16s_gen2::@2->sin16s_gen2::@1] b1_from_b2: - //SEG244 [135] phi (word) sin16s_gen2::i#2 = (byte) 0 [phi:sin16s_gen2::@2->sin16s_gen2::@1#0] -- vwuz1=vbuc1 + //SEG255 [139] phi (word) sin16s_gen2::i#2 = (byte) 0 [phi:sin16s_gen2::@2->sin16s_gen2::@1#0] -- vwuz1=vbuc1 lda #0 sta i lda #0 sta i+1 - //SEG245 [135] phi (signed word*) sin16s_gen2::sintab#2 = (const signed word[$200]) SINUS#0 [phi:sin16s_gen2::@2->sin16s_gen2::@1#1] -- pwsz1=pwsc1 + //SEG256 [139] phi (signed word*) sin16s_gen2::sintab#2 = (const signed word[$200]) SINUS#0 [phi:sin16s_gen2::@2->sin16s_gen2::@1#1] -- pwsz1=pwsc1 lda #SINUS sta sintab+1 - //SEG246 [135] phi (dword) sin16s_gen2::x#2 = (byte) 0 [phi:sin16s_gen2::@2->sin16s_gen2::@1#2] -- vduz1=vbuc1 + //SEG257 [139] phi (dword) sin16s_gen2::x#2 = (byte) 0 [phi:sin16s_gen2::@2->sin16s_gen2::@1#2] -- vduz1=vbuc1 lda #0 sta x lda #0 @@ -7461,15 +7644,15 @@ sin16s_gen2: { sta x+3 jmp b1 // u[4.28] - //SEG247 [135] phi from sin16s_gen2::@4 to sin16s_gen2::@1 [phi:sin16s_gen2::@4->sin16s_gen2::@1] + //SEG258 [139] phi from sin16s_gen2::@4 to sin16s_gen2::@1 [phi:sin16s_gen2::@4->sin16s_gen2::@1] b1_from_b4: - //SEG248 [135] phi (word) sin16s_gen2::i#2 = (word) sin16s_gen2::i#1 [phi:sin16s_gen2::@4->sin16s_gen2::@1#0] -- register_copy - //SEG249 [135] phi (signed word*) sin16s_gen2::sintab#2 = (signed word*) sin16s_gen2::sintab#0 [phi:sin16s_gen2::@4->sin16s_gen2::@1#1] -- register_copy - //SEG250 [135] phi (dword) sin16s_gen2::x#2 = (dword) sin16s_gen2::x#1 [phi:sin16s_gen2::@4->sin16s_gen2::@1#2] -- register_copy + //SEG259 [139] phi (word) sin16s_gen2::i#2 = (word) sin16s_gen2::i#1 [phi:sin16s_gen2::@4->sin16s_gen2::@1#0] -- register_copy + //SEG260 [139] phi (signed word*) sin16s_gen2::sintab#2 = (signed word*) sin16s_gen2::sintab#0 [phi:sin16s_gen2::@4->sin16s_gen2::@1#1] -- register_copy + //SEG261 [139] phi (dword) sin16s_gen2::x#2 = (dword) sin16s_gen2::x#1 [phi:sin16s_gen2::@4->sin16s_gen2::@1#2] -- register_copy jmp b1 - //SEG251 sin16s_gen2::@1 + //SEG262 sin16s_gen2::@1 b1: - //SEG252 [136] (dword) sin16s::x#0 ← (dword) sin16s_gen2::x#2 -- vduz1=vduz2 + //SEG263 [140] (dword) sin16s::x#0 ← (dword) sin16s_gen2::x#2 -- vduz1=vduz2 lda x sta sin16s.x lda x+1 @@ -7478,41 +7661,41 @@ sin16s_gen2: { sta sin16s.x+2 lda x+3 sta sin16s.x+3 - //SEG253 [137] call sin16s + //SEG264 [141] call sin16s jsr sin16s - //SEG254 [138] (signed word) sin16s::return#0 ← (signed word) sin16s::return#1 + //SEG265 [142] (signed word) sin16s::return#0 ← (signed word) sin16s::return#1 jmp b3 - //SEG255 sin16s_gen2::@3 + //SEG266 sin16s_gen2::@3 b3: - //SEG256 [139] (signed word) mul16s::a#0 ← (signed word) sin16s::return#0 - //SEG257 [140] call mul16s - //SEG258 [58] phi from sin16s_gen2::@3 to mul16s [phi:sin16s_gen2::@3->mul16s] + //SEG267 [143] (signed word) mul16s::a#0 ← (signed word) sin16s::return#0 + //SEG268 [144] call mul16s + //SEG269 [62] phi from sin16s_gen2::@3 to mul16s [phi:sin16s_gen2::@3->mul16s] mul16s_from_b3: - //SEG259 [58] phi (signed word) mul16s::b#3 = (const signed word) sin16s_gen2::ampl#0 [phi:sin16s_gen2::@3->mul16s#0] -- vwsz1=vwsc1 + //SEG270 [62] phi (signed word) mul16s::b#3 = (const signed word) sin16s_gen2::ampl#0 [phi:sin16s_gen2::@3->mul16s#0] -- vwsz1=vwsc1 lda #ampl sta mul16s.b+1 - //SEG260 [58] phi (signed word) mul16s::a#3 = (signed word) mul16s::a#0 [phi:sin16s_gen2::@3->mul16s#1] -- register_copy + //SEG271 [62] phi (signed word) mul16s::a#3 = (signed word) mul16s::a#0 [phi:sin16s_gen2::@3->mul16s#1] -- register_copy jsr mul16s - //SEG261 [141] (signed dword) mul16s::return#2 ← (signed dword) mul16s::return#0 + //SEG272 [145] (signed dword) mul16s::return#2 ← (signed dword) mul16s::return#0 jmp b4 - //SEG262 sin16s_gen2::@4 + //SEG273 sin16s_gen2::@4 b4: - //SEG263 [142] (signed dword~) sin16s_gen2::$5 ← (signed dword) mul16s::return#2 - //SEG264 [143] (word~) sin16s_gen2::$6 ← > (signed dword~) sin16s_gen2::$5 -- vwuz1=_hi_vdsz2 + //SEG274 [146] (signed dword~) sin16s_gen2::$5 ← (signed dword) mul16s::return#2 + //SEG275 [147] (word~) sin16s_gen2::$6 ← > (signed dword~) sin16s_gen2::$5 -- vwuz1=_hi_vdsz2 lda _5+2 sta _6 lda _5+3 sta _6+1 - //SEG265 [144] *((signed word*) sin16s_gen2::sintab#2) ← (signed word)(word~) sin16s_gen2::$6 -- _deref_pwsz1=vwsz2 + //SEG276 [148] *((signed word*) sin16s_gen2::sintab#2) ← (signed word)(word~) sin16s_gen2::$6 -- _deref_pwsz1=vwsz2 ldy #0 lda _6 sta (sintab),y iny lda _6+1 sta (sintab),y - //SEG266 [145] (signed word*) sin16s_gen2::sintab#0 ← (signed word*) sin16s_gen2::sintab#2 + (const byte) SIZEOF_SIGNED_WORD -- pwsz1=pwsz1_plus_vbuc1 + //SEG277 [149] (signed word*) sin16s_gen2::sintab#0 ← (signed word*) sin16s_gen2::sintab#2 + (const byte) SIZEOF_SIGNED_WORD -- pwsz1=pwsz1_plus_vbuc1 lda #SIZEOF_SIGNED_WORD clc adc sintab @@ -7520,7 +7703,7 @@ sin16s_gen2: { bcc !+ inc sintab+1 !: - //SEG267 [146] (dword) sin16s_gen2::x#1 ← (dword) sin16s_gen2::x#2 + (dword) sin16s_gen2::step#0 -- vduz1=vduz1_plus_vduz2 + //SEG278 [150] (dword) sin16s_gen2::x#1 ← (dword) sin16s_gen2::x#2 + (dword) sin16s_gen2::step#0 -- vduz1=vduz1_plus_vduz2 lda x clc adc step @@ -7534,12 +7717,12 @@ sin16s_gen2: { lda x+3 adc step+3 sta x+3 - //SEG268 [147] (word) sin16s_gen2::i#1 ← ++ (word) sin16s_gen2::i#2 -- vwuz1=_inc_vwuz1 + //SEG279 [151] (word) sin16s_gen2::i#1 ← ++ (word) sin16s_gen2::i#2 -- vwuz1=_inc_vwuz1 inc i bne !+ inc i+1 !: - //SEG269 [148] if((word) sin16s_gen2::i#1<(const word) sin16s_gen2::wavelength#0) goto sin16s_gen2::@1 -- vwuz1_lt_vwuc1_then_la1 + //SEG280 [152] if((word) sin16s_gen2::i#1<(const word) sin16s_gen2::wavelength#0) goto sin16s_gen2::@1 -- vwuz1_lt_vwuc1_then_la1 lda i+1 cmp #>wavelength bcc b1_from_b4 @@ -7549,31 +7732,31 @@ sin16s_gen2: { bcc b1_from_b4 !: jmp breturn - //SEG270 sin16s_gen2::@return + //SEG281 sin16s_gen2::@return breturn: - //SEG271 [149] return + //SEG282 [153] return rts } -//SEG272 sin16s +//SEG283 sin16s // Calculate signed word sinus sin(x) // x: unsigned dword input u[4.28] in the interval $00000000 - PI2_u4f28 // result: signed word sin(x) s[0.15] - using the full range -$7fff - $7fff -// sin16s(dword zeropage($25) x) +// sin16s(dword zeropage($26) x) sin16s: { - .label _4 = $25 - .label x = $25 + .label _4 = $26 + .label x = $26 .label return = 4 - .label x1 = $45 - .label x2 = $29 - .label x3 = $29 - .label x3_6 = $47 + .label x1 = $46 + .label x2 = $2a + .label x3 = $2a + .label x3_6 = $48 .label usinx = 4 - .label x4 = $29 - .label x5 = $47 - .label x5_128 = $47 + .label x4 = $2a + .label x5 = $48 + .label x5_128 = $48 .label sinx = 4 - .label isUpper = $24 - //SEG273 [150] if((dword) sin16s::x#0<(const dword) PI_u4f28#0) goto sin16s::@1 -- vduz1_lt_vduc1_then_la1 + .label isUpper = $25 + //SEG284 [154] if((dword) sin16s::x#0<(const dword) PI_u4f28#0) goto sin16s::@1 -- vduz1_lt_vduc1_then_la1 lda x+3 cmp #>PI_u4f28>>$10 bcc b1_from_sin16s @@ -7591,9 +7774,9 @@ sin16s: { bcc b1_from_sin16s !: jmp b4 - //SEG274 sin16s::@4 + //SEG285 sin16s::@4 b4: - //SEG275 [151] (dword) sin16s::x#1 ← (dword) sin16s::x#0 - (const dword) PI_u4f28#0 -- vduz1=vduz1_minus_vduc1 + //SEG286 [155] (dword) sin16s::x#1 ← (dword) sin16s::x#0 - (const dword) PI_u4f28#0 -- vduz1=vduz1_minus_vduc1 lda x sec sbc #PI_u4f28>>$10 sta x+3 - //SEG276 [152] phi from sin16s::@4 to sin16s::@1 [phi:sin16s::@4->sin16s::@1] + //SEG287 [156] phi from sin16s::@4 to sin16s::@1 [phi:sin16s::@4->sin16s::@1] b1_from_b4: - //SEG277 [152] phi (byte) sin16s::isUpper#2 = (byte) 1 [phi:sin16s::@4->sin16s::@1#0] -- vbuz1=vbuc1 + //SEG288 [156] phi (byte) sin16s::isUpper#2 = (byte) 1 [phi:sin16s::@4->sin16s::@1#0] -- vbuz1=vbuc1 lda #1 sta isUpper - //SEG278 [152] phi (dword) sin16s::x#4 = (dword) sin16s::x#1 [phi:sin16s::@4->sin16s::@1#1] -- register_copy + //SEG289 [156] phi (dword) sin16s::x#4 = (dword) sin16s::x#1 [phi:sin16s::@4->sin16s::@1#1] -- register_copy jmp b1 - //SEG279 [152] phi from sin16s to sin16s::@1 [phi:sin16s->sin16s::@1] + //SEG290 [156] phi from sin16s to sin16s::@1 [phi:sin16s->sin16s::@1] b1_from_sin16s: - //SEG280 [152] phi (byte) sin16s::isUpper#2 = (byte) 0 [phi:sin16s->sin16s::@1#0] -- vbuz1=vbuc1 + //SEG291 [156] phi (byte) sin16s::isUpper#2 = (byte) 0 [phi:sin16s->sin16s::@1#0] -- vbuz1=vbuc1 lda #0 sta isUpper - //SEG281 [152] phi (dword) sin16s::x#4 = (dword) sin16s::x#0 [phi:sin16s->sin16s::@1#1] -- register_copy + //SEG292 [156] phi (dword) sin16s::x#4 = (dword) sin16s::x#0 [phi:sin16s->sin16s::@1#1] -- register_copy jmp b1 - //SEG282 sin16s::@1 + //SEG293 sin16s::@1 b1: - //SEG283 [153] if((dword) sin16s::x#4<(const dword) PI_HALF_u4f28#0) goto sin16s::@2 -- vduz1_lt_vduc1_then_la1 + //SEG294 [157] if((dword) sin16s::x#4<(const dword) PI_HALF_u4f28#0) goto sin16s::@2 -- vduz1_lt_vduc1_then_la1 lda x+3 cmp #>PI_HALF_u4f28>>$10 bcc b2_from_b1 @@ -7641,9 +7824,9 @@ sin16s: { bcc b2_from_b1 !: jmp b5 - //SEG284 sin16s::@5 + //SEG295 sin16s::@5 b5: - //SEG285 [154] (dword) sin16s::x#2 ← (const dword) PI_u4f28#0 - (dword) sin16s::x#4 -- vduz1=vduc1_minus_vduz1 + //SEG296 [158] (dword) sin16s::x#2 ← (const dword) PI_u4f28#0 - (dword) sin16s::x#4 -- vduz1=vduc1_minus_vduz1 lda #PI_u4f28>>$10 sbc x+3 sta x+3 - //SEG286 [155] phi from sin16s::@1 sin16s::@5 to sin16s::@2 [phi:sin16s::@1/sin16s::@5->sin16s::@2] + //SEG297 [159] phi from sin16s::@1 sin16s::@5 to sin16s::@2 [phi:sin16s::@1/sin16s::@5->sin16s::@2] b2_from_b1: b2_from_b5: - //SEG287 [155] phi (dword) sin16s::x#6 = (dword) sin16s::x#4 [phi:sin16s::@1/sin16s::@5->sin16s::@2#0] -- register_copy + //SEG298 [159] phi (dword) sin16s::x#6 = (dword) sin16s::x#4 [phi:sin16s::@1/sin16s::@5->sin16s::@2#0] -- register_copy jmp b2 - //SEG288 sin16s::@2 + //SEG299 sin16s::@2 b2: - //SEG289 [156] (dword~) sin16s::$4 ← (dword) sin16s::x#6 << (byte) 3 -- vduz1=vduz1_rol_3 + //SEG300 [160] (dword~) sin16s::$4 ← (dword) sin16s::x#6 << (byte) 3 -- vduz1=vduz1_rol_3 ldy #3 !: asl _4 @@ -7673,80 +7856,80 @@ sin16s: { rol _4+3 dey bne !- - //SEG290 [157] (word) sin16s::x1#0 ← > (dword~) sin16s::$4 -- vwuz1=_hi_vduz2 + //SEG301 [161] (word) sin16s::x1#0 ← > (dword~) sin16s::$4 -- vwuz1=_hi_vduz2 lda _4+2 sta x1 lda _4+3 sta x1+1 - //SEG291 [158] (word) mulu16_sel::v1#0 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 + //SEG302 [162] (word) mulu16_sel::v1#0 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 lda x1 sta mulu16_sel.v1 lda x1+1 sta mulu16_sel.v1+1 - //SEG292 [159] (word) mulu16_sel::v2#0 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 + //SEG303 [163] (word) mulu16_sel::v2#0 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 lda x1 sta mulu16_sel.v2 lda x1+1 sta mulu16_sel.v2+1 - //SEG293 [160] call mulu16_sel - //SEG294 [190] phi from sin16s::@2 to mulu16_sel [phi:sin16s::@2->mulu16_sel] + //SEG304 [164] call mulu16_sel + //SEG305 [194] phi from sin16s::@2 to mulu16_sel [phi:sin16s::@2->mulu16_sel] mulu16_sel_from_b2: - //SEG295 [190] phi (byte) mulu16_sel::select#5 = (byte) 0 [phi:sin16s::@2->mulu16_sel#0] -- vbuxx=vbuc1 + //SEG306 [194] phi (byte) mulu16_sel::select#5 = (byte) 0 [phi:sin16s::@2->mulu16_sel#0] -- vbuxx=vbuc1 ldx #0 - //SEG296 [190] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#0 [phi:sin16s::@2->mulu16_sel#1] -- register_copy - //SEG297 [190] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#0 [phi:sin16s::@2->mulu16_sel#2] -- register_copy + //SEG307 [194] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#0 [phi:sin16s::@2->mulu16_sel#1] -- register_copy + //SEG308 [194] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#0 [phi:sin16s::@2->mulu16_sel#2] -- register_copy jsr mulu16_sel - //SEG298 [161] (word) mulu16_sel::return#0 ← (word) mulu16_sel::return#12 + //SEG309 [165] (word) mulu16_sel::return#0 ← (word) mulu16_sel::return#12 jmp b7 - //SEG299 sin16s::@7 + //SEG310 sin16s::@7 b7: - //SEG300 [162] (word) sin16s::x2#0 ← (word) mulu16_sel::return#0 -- vwuz1=vwuz2 + //SEG311 [166] (word) sin16s::x2#0 ← (word) mulu16_sel::return#0 -- vwuz1=vwuz2 lda mulu16_sel.return sta x2 lda mulu16_sel.return+1 sta x2+1 - //SEG301 [163] (word) mulu16_sel::v1#1 ← (word) sin16s::x2#0 - //SEG302 [164] (word) mulu16_sel::v2#1 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 + //SEG312 [167] (word) mulu16_sel::v1#1 ← (word) sin16s::x2#0 + //SEG313 [168] (word) mulu16_sel::v2#1 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 lda x1 sta mulu16_sel.v2 lda x1+1 sta mulu16_sel.v2+1 - //SEG303 [165] call mulu16_sel - //SEG304 [190] phi from sin16s::@7 to mulu16_sel [phi:sin16s::@7->mulu16_sel] + //SEG314 [169] call mulu16_sel + //SEG315 [194] phi from sin16s::@7 to mulu16_sel [phi:sin16s::@7->mulu16_sel] mulu16_sel_from_b7: - //SEG305 [190] phi (byte) mulu16_sel::select#5 = (byte) 1 [phi:sin16s::@7->mulu16_sel#0] -- vbuxx=vbuc1 + //SEG316 [194] phi (byte) mulu16_sel::select#5 = (byte) 1 [phi:sin16s::@7->mulu16_sel#0] -- vbuxx=vbuc1 ldx #1 - //SEG306 [190] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#1 [phi:sin16s::@7->mulu16_sel#1] -- register_copy - //SEG307 [190] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#1 [phi:sin16s::@7->mulu16_sel#2] -- register_copy + //SEG317 [194] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#1 [phi:sin16s::@7->mulu16_sel#1] -- register_copy + //SEG318 [194] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#1 [phi:sin16s::@7->mulu16_sel#2] -- register_copy jsr mulu16_sel - //SEG308 [166] (word) mulu16_sel::return#1 ← (word) mulu16_sel::return#12 -- vwuz1=vwuz2 + //SEG319 [170] (word) mulu16_sel::return#1 ← (word) mulu16_sel::return#12 -- vwuz1=vwuz2 lda mulu16_sel.return sta mulu16_sel.return_1 lda mulu16_sel.return+1 sta mulu16_sel.return_1+1 jmp b8 - //SEG309 sin16s::@8 + //SEG320 sin16s::@8 b8: - //SEG310 [167] (word) sin16s::x3#0 ← (word) mulu16_sel::return#1 - //SEG311 [168] (word) mulu16_sel::v1#2 ← (word) sin16s::x3#0 - //SEG312 [169] call mulu16_sel - //SEG313 [190] phi from sin16s::@8 to mulu16_sel [phi:sin16s::@8->mulu16_sel] + //SEG321 [171] (word) sin16s::x3#0 ← (word) mulu16_sel::return#1 + //SEG322 [172] (word) mulu16_sel::v1#2 ← (word) sin16s::x3#0 + //SEG323 [173] call mulu16_sel + //SEG324 [194] phi from sin16s::@8 to mulu16_sel [phi:sin16s::@8->mulu16_sel] mulu16_sel_from_b8: - //SEG314 [190] phi (byte) mulu16_sel::select#5 = (byte) 1 [phi:sin16s::@8->mulu16_sel#0] -- vbuxx=vbuc1 + //SEG325 [194] phi (byte) mulu16_sel::select#5 = (byte) 1 [phi:sin16s::@8->mulu16_sel#0] -- vbuxx=vbuc1 ldx #1 - //SEG315 [190] phi (word) mulu16_sel::v2#5 = (word)(number) $10000/(number) 6 [phi:sin16s::@8->mulu16_sel#1] -- vwuz1=vwuc1 + //SEG326 [194] phi (word) mulu16_sel::v2#5 = (word)(number) $10000/(number) 6 [phi:sin16s::@8->mulu16_sel#1] -- vwuz1=vwuc1 lda #<$10000/6 sta mulu16_sel.v2 lda #>$10000/6 sta mulu16_sel.v2+1 - //SEG316 [190] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#2 [phi:sin16s::@8->mulu16_sel#2] -- register_copy + //SEG327 [194] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#2 [phi:sin16s::@8->mulu16_sel#2] -- register_copy jsr mulu16_sel - //SEG317 [170] (word) mulu16_sel::return#2 ← (word) mulu16_sel::return#12 + //SEG328 [174] (word) mulu16_sel::return#2 ← (word) mulu16_sel::return#12 jmp b9 - //SEG318 sin16s::@9 + //SEG329 sin16s::@9 b9: - //SEG319 [171] (word) sin16s::x3_6#0 ← (word) mulu16_sel::return#2 - //SEG320 [172] (word) sin16s::usinx#0 ← (word) sin16s::x1#0 - (word) sin16s::x3_6#0 -- vwuz1=vwuz2_minus_vwuz3 + //SEG330 [175] (word) sin16s::x3_6#0 ← (word) mulu16_sel::return#2 + //SEG331 [176] (word) sin16s::usinx#0 ← (word) sin16s::x1#0 - (word) sin16s::x3_6#0 -- vwuz1=vwuz2_minus_vwuz3 lda x1 sec sbc x3_6 @@ -7754,49 +7937,49 @@ sin16s: { lda x1+1 sbc x3_6+1 sta usinx+1 - //SEG321 [173] (word) mulu16_sel::v1#3 ← (word) sin16s::x3#0 - //SEG322 [174] (word) mulu16_sel::v2#3 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 + //SEG332 [177] (word) mulu16_sel::v1#3 ← (word) sin16s::x3#0 + //SEG333 [178] (word) mulu16_sel::v2#3 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 lda x1 sta mulu16_sel.v2 lda x1+1 sta mulu16_sel.v2+1 - //SEG323 [175] call mulu16_sel - //SEG324 [190] phi from sin16s::@9 to mulu16_sel [phi:sin16s::@9->mulu16_sel] + //SEG334 [179] call mulu16_sel + //SEG335 [194] phi from sin16s::@9 to mulu16_sel [phi:sin16s::@9->mulu16_sel] mulu16_sel_from_b9: - //SEG325 [190] phi (byte) mulu16_sel::select#5 = (byte) 0 [phi:sin16s::@9->mulu16_sel#0] -- vbuxx=vbuc1 + //SEG336 [194] phi (byte) mulu16_sel::select#5 = (byte) 0 [phi:sin16s::@9->mulu16_sel#0] -- vbuxx=vbuc1 ldx #0 - //SEG326 [190] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#3 [phi:sin16s::@9->mulu16_sel#1] -- register_copy - //SEG327 [190] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#3 [phi:sin16s::@9->mulu16_sel#2] -- register_copy + //SEG337 [194] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#3 [phi:sin16s::@9->mulu16_sel#1] -- register_copy + //SEG338 [194] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#3 [phi:sin16s::@9->mulu16_sel#2] -- register_copy jsr mulu16_sel - //SEG328 [176] (word) mulu16_sel::return#10 ← (word) mulu16_sel::return#12 -- vwuz1=vwuz2 + //SEG339 [180] (word) mulu16_sel::return#10 ← (word) mulu16_sel::return#12 -- vwuz1=vwuz2 lda mulu16_sel.return sta mulu16_sel.return_10 lda mulu16_sel.return+1 sta mulu16_sel.return_10+1 jmp b10 - //SEG329 sin16s::@10 + //SEG340 sin16s::@10 b10: - //SEG330 [177] (word) sin16s::x4#0 ← (word) mulu16_sel::return#10 - //SEG331 [178] (word) mulu16_sel::v1#4 ← (word) sin16s::x4#0 - //SEG332 [179] (word) mulu16_sel::v2#4 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 + //SEG341 [181] (word) sin16s::x4#0 ← (word) mulu16_sel::return#10 + //SEG342 [182] (word) mulu16_sel::v1#4 ← (word) sin16s::x4#0 + //SEG343 [183] (word) mulu16_sel::v2#4 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 lda x1 sta mulu16_sel.v2 lda x1+1 sta mulu16_sel.v2+1 - //SEG333 [180] call mulu16_sel - //SEG334 [190] phi from sin16s::@10 to mulu16_sel [phi:sin16s::@10->mulu16_sel] + //SEG344 [184] call mulu16_sel + //SEG345 [194] phi from sin16s::@10 to mulu16_sel [phi:sin16s::@10->mulu16_sel] mulu16_sel_from_b10: - //SEG335 [190] phi (byte) mulu16_sel::select#5 = (byte) 0 [phi:sin16s::@10->mulu16_sel#0] -- vbuxx=vbuc1 + //SEG346 [194] phi (byte) mulu16_sel::select#5 = (byte) 0 [phi:sin16s::@10->mulu16_sel#0] -- vbuxx=vbuc1 ldx #0 - //SEG336 [190] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#4 [phi:sin16s::@10->mulu16_sel#1] -- register_copy - //SEG337 [190] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#4 [phi:sin16s::@10->mulu16_sel#2] -- register_copy + //SEG347 [194] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#4 [phi:sin16s::@10->mulu16_sel#1] -- register_copy + //SEG348 [194] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#4 [phi:sin16s::@10->mulu16_sel#2] -- register_copy jsr mulu16_sel - //SEG338 [181] (word) mulu16_sel::return#11 ← (word) mulu16_sel::return#12 + //SEG349 [185] (word) mulu16_sel::return#11 ← (word) mulu16_sel::return#12 jmp b11 - //SEG339 sin16s::@11 + //SEG350 sin16s::@11 b11: - //SEG340 [182] (word) sin16s::x5#0 ← (word) mulu16_sel::return#11 - //SEG341 [183] (word) sin16s::x5_128#0 ← (word) sin16s::x5#0 >> (byte) 4 -- vwuz1=vwuz1_ror_4 + //SEG351 [186] (word) sin16s::x5#0 ← (word) mulu16_sel::return#11 + //SEG352 [187] (word) sin16s::x5_128#0 ← (word) sin16s::x5#0 >> (byte) 4 -- vwuz1=vwuz1_ror_4 lsr x5_128+1 ror x5_128 lsr x5_128+1 @@ -7805,7 +7988,7 @@ sin16s: { ror x5_128 lsr x5_128+1 ror x5_128 - //SEG342 [184] (word) sin16s::usinx#1 ← (word) sin16s::usinx#0 + (word) sin16s::x5_128#0 -- vwuz1=vwuz1_plus_vwuz2 + //SEG353 [188] (word) sin16s::usinx#1 ← (word) sin16s::usinx#0 + (word) sin16s::x5_128#0 -- vwuz1=vwuz1_plus_vwuz2 lda usinx clc adc x5_128 @@ -7813,14 +7996,14 @@ sin16s: { lda usinx+1 adc x5_128+1 sta usinx+1 - //SEG343 [185] if((byte) sin16s::isUpper#2==(byte) 0) goto sin16s::@12 -- vbuz1_eq_0_then_la1 + //SEG354 [189] if((byte) sin16s::isUpper#2==(byte) 0) goto sin16s::@12 -- vbuz1_eq_0_then_la1 lda isUpper cmp #0 beq b12 jmp b6 - //SEG344 sin16s::@6 + //SEG355 sin16s::@6 b6: - //SEG345 [186] (signed word) sin16s::sinx#1 ← - (signed word)(word) sin16s::usinx#1 -- vwsz1=_neg_vwsz1 + //SEG356 [190] (signed word) sin16s::sinx#1 ← - (signed word)(word) sin16s::usinx#1 -- vwsz1=_neg_vwsz1 sec lda #0 sbc sinx @@ -7828,46 +8011,46 @@ sin16s: { lda #0 sbc sinx+1 sta sinx+1 - //SEG346 [187] phi from sin16s::@12 sin16s::@6 to sin16s::@3 [phi:sin16s::@12/sin16s::@6->sin16s::@3] + //SEG357 [191] phi from sin16s::@12 sin16s::@6 to sin16s::@3 [phi:sin16s::@12/sin16s::@6->sin16s::@3] b3_from_b12: b3_from_b6: - //SEG347 [187] phi (signed word) sin16s::return#1 = (signed word~) sin16s::return#5 [phi:sin16s::@12/sin16s::@6->sin16s::@3#0] -- register_copy + //SEG358 [191] phi (signed word) sin16s::return#1 = (signed word~) sin16s::return#5 [phi:sin16s::@12/sin16s::@6->sin16s::@3#0] -- register_copy jmp b3 - //SEG348 sin16s::@3 + //SEG359 sin16s::@3 b3: jmp breturn - //SEG349 sin16s::@return + //SEG360 sin16s::@return breturn: - //SEG350 [188] return + //SEG361 [192] return rts - //SEG351 sin16s::@12 + //SEG362 sin16s::@12 b12: - //SEG352 [189] (signed word~) sin16s::return#5 ← (signed word)(word) sin16s::usinx#1 + //SEG363 [193] (signed word~) sin16s::return#5 ← (signed word)(word) sin16s::usinx#1 jmp b3_from_b12 } -//SEG353 mulu16_sel +//SEG364 mulu16_sel // Calculate val*val for two unsigned word values - the result is 16 selected bits of the 32-bit result. // The select parameter indicates how many of the highest bits of the 32-bit result to skip -// mulu16_sel(word zeropage($29) v1, word zeropage($e) v2, byte register(X) select) +// mulu16_sel(word zeropage($2a) v1, word zeropage($f) v2, byte register(X) select) mulu16_sel: { - .label _0 = $a - .label _1 = $a - .label v1 = $29 - .label v2 = $e - .label return = $47 - .label return_1 = $29 - .label return_10 = $29 - //SEG354 [191] (word) mul16u::a#2 ← (word) mulu16_sel::v1#5 -- vwuz1=vwuz2 + .label _0 = $b + .label _1 = $b + .label v1 = $2a + .label v2 = $f + .label return = $48 + .label return_1 = $2a + .label return_10 = $2a + //SEG365 [195] (word) mul16u::a#2 ← (word) mulu16_sel::v1#5 -- vwuz1=vwuz2 lda v1 sta mul16u.a lda v1+1 sta mul16u.a+1 - //SEG355 [192] (word) mul16u::b#1 ← (word) mulu16_sel::v2#5 - //SEG356 [193] call mul16u - //SEG357 [76] phi from mulu16_sel to mul16u [phi:mulu16_sel->mul16u] + //SEG366 [196] (word) mul16u::b#1 ← (word) mulu16_sel::v2#5 + //SEG367 [197] call mul16u + //SEG368 [80] phi from mulu16_sel to mul16u [phi:mulu16_sel->mul16u] mul16u_from_mulu16_sel: - //SEG358 [76] phi (word) mul16u::a#6 = (word) mul16u::a#2 [phi:mulu16_sel->mul16u#0] -- register_copy - //SEG359 [76] phi (dword) mul16u::mb#0 = (word) mul16u::b#1 [phi:mulu16_sel->mul16u#1] -- vduz1=vwuz2 + //SEG369 [80] phi (word) mul16u::a#6 = (word) mul16u::a#2 [phi:mulu16_sel->mul16u#0] -- register_copy + //SEG370 [80] phi (dword) mul16u::mb#0 = (word) mul16u::b#1 [phi:mulu16_sel->mul16u#1] -- vduz1=vwuz2 lda mul16u.b sta mul16u.mb lda mul16u.b+1 @@ -7876,12 +8059,12 @@ mulu16_sel: { sta mul16u.mb+2 sta mul16u.mb+3 jsr mul16u - //SEG360 [194] (dword) mul16u::return#3 ← (dword) mul16u::res#2 + //SEG371 [198] (dword) mul16u::return#3 ← (dword) mul16u::res#2 jmp b1 - //SEG361 mulu16_sel::@1 + //SEG372 mulu16_sel::@1 b1: - //SEG362 [195] (dword~) mulu16_sel::$0 ← (dword) mul16u::return#3 - //SEG363 [196] (dword~) mulu16_sel::$1 ← (dword~) mulu16_sel::$0 << (byte) mulu16_sel::select#5 -- vduz1=vduz1_rol_vbuxx + //SEG373 [199] (dword~) mulu16_sel::$0 ← (dword) mul16u::return#3 + //SEG374 [200] (dword~) mulu16_sel::$1 ← (dword~) mulu16_sel::$0 << (byte) mulu16_sel::select#5 -- vduz1=vduz1_rol_vbuxx cpx #0 beq !e+ !: @@ -7892,64 +8075,64 @@ mulu16_sel: { dex bne !- !e: - //SEG364 [197] (word) mulu16_sel::return#12 ← > (dword~) mulu16_sel::$1 -- vwuz1=_hi_vduz2 + //SEG375 [201] (word) mulu16_sel::return#12 ← > (dword~) mulu16_sel::$1 -- vwuz1=_hi_vduz2 lda _1+2 sta return lda _1+3 sta return+1 jmp breturn - //SEG365 mulu16_sel::@return + //SEG376 mulu16_sel::@return breturn: - //SEG366 [198] return + //SEG377 [202] return rts } -//SEG367 div32u16u +//SEG378 div32u16u // Divide unsigned 32-bit dword dividend with a 16-bit word divisor // The 16-bit word remainder can be found in rem16u after the division div32u16u: { - .label quotient_hi = $49 - .label quotient_lo = $2f - .label return = $3f - //SEG368 [200] call divr16u - //SEG369 [209] phi from div32u16u to divr16u [phi:div32u16u->divr16u] + .label quotient_hi = $4a + .label quotient_lo = $30 + .label return = $40 + //SEG379 [204] call divr16u + //SEG380 [213] phi from div32u16u to divr16u [phi:div32u16u->divr16u] divr16u_from_div32u16u: - //SEG370 [209] phi (word) divr16u::dividend#5 = >(const dword) PI2_u4f28#0 [phi:div32u16u->divr16u#0] -- vwuz1=vwuc1 + //SEG381 [213] phi (word) divr16u::dividend#5 = >(const dword) PI2_u4f28#0 [phi:div32u16u->divr16u#0] -- vwuz1=vwuc1 lda #>$10 sta divr16u.dividend lda #>PI2_u4f28>>$10 sta divr16u.dividend+1 - //SEG371 [209] phi (word) divr16u::rem#10 = (byte) 0 [phi:div32u16u->divr16u#1] -- vwuz1=vbuc1 + //SEG382 [213] phi (word) divr16u::rem#10 = (byte) 0 [phi:div32u16u->divr16u#1] -- vwuz1=vbuc1 lda #0 sta divr16u.rem lda #0 sta divr16u.rem+1 jsr divr16u - //SEG372 [201] (word) divr16u::return#2 ← (word) divr16u::return#0 + //SEG383 [205] (word) divr16u::return#2 ← (word) divr16u::return#0 jmp b1 - //SEG373 div32u16u::@1 + //SEG384 div32u16u::@1 b1: - //SEG374 [202] (word) div32u16u::quotient_hi#0 ← (word) divr16u::return#2 -- vwuz1=vwuz2 + //SEG385 [206] (word) div32u16u::quotient_hi#0 ← (word) divr16u::return#2 -- vwuz1=vwuz2 lda divr16u.return sta quotient_hi lda divr16u.return+1 sta quotient_hi+1 - //SEG375 [203] (word) divr16u::rem#4 ← (word) rem16u#1 - //SEG376 [204] call divr16u - //SEG377 [209] phi from div32u16u::@1 to divr16u [phi:div32u16u::@1->divr16u] + //SEG386 [207] (word) divr16u::rem#4 ← (word) rem16u#1 + //SEG387 [208] call divr16u + //SEG388 [213] phi from div32u16u::@1 to divr16u [phi:div32u16u::@1->divr16u] divr16u_from_b1: - //SEG378 [209] phi (word) divr16u::dividend#5 = <(const dword) PI2_u4f28#0 [phi:div32u16u::@1->divr16u#0] -- vwuz1=vwuc1 + //SEG389 [213] phi (word) divr16u::dividend#5 = <(const dword) PI2_u4f28#0 [phi:div32u16u::@1->divr16u#0] -- vwuz1=vwuc1 lda #PI2_u4f28&$ffff sta divr16u.dividend+1 - //SEG379 [209] phi (word) divr16u::rem#10 = (word) divr16u::rem#4 [phi:div32u16u::@1->divr16u#1] -- register_copy + //SEG390 [213] phi (word) divr16u::rem#10 = (word) divr16u::rem#4 [phi:div32u16u::@1->divr16u#1] -- register_copy jsr divr16u - //SEG380 [205] (word) divr16u::return#3 ← (word) divr16u::return#0 + //SEG391 [209] (word) divr16u::return#3 ← (word) divr16u::return#0 jmp b2 - //SEG381 div32u16u::@2 + //SEG392 div32u16u::@2 b2: - //SEG382 [206] (word) div32u16u::quotient_lo#0 ← (word) divr16u::return#3 - //SEG383 [207] (dword) div32u16u::return#0 ← (word) div32u16u::quotient_hi#0 dw= (word) div32u16u::quotient_lo#0 -- vduz1=vwuz2_dword_vwuz3 + //SEG393 [210] (word) div32u16u::quotient_lo#0 ← (word) divr16u::return#3 + //SEG394 [211] (dword) div32u16u::return#0 ← (word) div32u16u::quotient_hi#0 dw= (word) div32u16u::quotient_lo#0 -- vduz1=vwuz2_dword_vwuz3 lda quotient_hi sta return+2 lda quotient_hi+1 @@ -7959,74 +8142,74 @@ div32u16u: { lda quotient_lo+1 sta return+1 jmp breturn - //SEG384 div32u16u::@return + //SEG395 div32u16u::@return breturn: - //SEG385 [208] return + //SEG396 [212] return rts } -//SEG386 divr16u +//SEG397 divr16u // Performs division on two 16 bit unsigned words and an initial remainder // Returns the quotient dividend/divisor. // The final remainder will be set into the global variable rem16u // Implemented using simple binary division -// divr16u(word zeropage($2d) dividend, word zeropage($2b) rem) +// divr16u(word zeropage($2e) dividend, word zeropage($2c) rem) divr16u: { - .label rem = $2b - .label dividend = $2d - .label quotient = $2f - .label return = $2f - //SEG387 [210] phi from divr16u to divr16u::@1 [phi:divr16u->divr16u::@1] + .label rem = $2c + .label dividend = $2e + .label quotient = $30 + .label return = $30 + //SEG398 [214] phi from divr16u to divr16u::@1 [phi:divr16u->divr16u::@1] b1_from_divr16u: - //SEG388 [210] phi (byte) divr16u::i#2 = (byte) 0 [phi:divr16u->divr16u::@1#0] -- vbuxx=vbuc1 + //SEG399 [214] phi (byte) divr16u::i#2 = (byte) 0 [phi:divr16u->divr16u::@1#0] -- vbuxx=vbuc1 ldx #0 - //SEG389 [210] phi (word) divr16u::quotient#3 = (byte) 0 [phi:divr16u->divr16u::@1#1] -- vwuz1=vbuc1 + //SEG400 [214] phi (word) divr16u::quotient#3 = (byte) 0 [phi:divr16u->divr16u::@1#1] -- vwuz1=vbuc1 lda #0 sta quotient lda #0 sta quotient+1 - //SEG390 [210] phi (word) divr16u::dividend#3 = (word) divr16u::dividend#5 [phi:divr16u->divr16u::@1#2] -- register_copy - //SEG391 [210] phi (word) divr16u::rem#5 = (word) divr16u::rem#10 [phi:divr16u->divr16u::@1#3] -- register_copy + //SEG401 [214] phi (word) divr16u::dividend#3 = (word) divr16u::dividend#5 [phi:divr16u->divr16u::@1#2] -- register_copy + //SEG402 [214] phi (word) divr16u::rem#5 = (word) divr16u::rem#10 [phi:divr16u->divr16u::@1#3] -- register_copy jmp b1 - //SEG392 [210] phi from divr16u::@3 to divr16u::@1 [phi:divr16u::@3->divr16u::@1] + //SEG403 [214] phi from divr16u::@3 to divr16u::@1 [phi:divr16u::@3->divr16u::@1] b1_from_b3: - //SEG393 [210] phi (byte) divr16u::i#2 = (byte) divr16u::i#1 [phi:divr16u::@3->divr16u::@1#0] -- register_copy - //SEG394 [210] phi (word) divr16u::quotient#3 = (word) divr16u::return#0 [phi:divr16u::@3->divr16u::@1#1] -- register_copy - //SEG395 [210] phi (word) divr16u::dividend#3 = (word) divr16u::dividend#0 [phi:divr16u::@3->divr16u::@1#2] -- register_copy - //SEG396 [210] phi (word) divr16u::rem#5 = (word) divr16u::rem#11 [phi:divr16u::@3->divr16u::@1#3] -- register_copy + //SEG404 [214] phi (byte) divr16u::i#2 = (byte) divr16u::i#1 [phi:divr16u::@3->divr16u::@1#0] -- register_copy + //SEG405 [214] phi (word) divr16u::quotient#3 = (word) divr16u::return#0 [phi:divr16u::@3->divr16u::@1#1] -- register_copy + //SEG406 [214] phi (word) divr16u::dividend#3 = (word) divr16u::dividend#0 [phi:divr16u::@3->divr16u::@1#2] -- register_copy + //SEG407 [214] phi (word) divr16u::rem#5 = (word) divr16u::rem#11 [phi:divr16u::@3->divr16u::@1#3] -- register_copy jmp b1 - //SEG397 divr16u::@1 + //SEG408 divr16u::@1 b1: - //SEG398 [211] (word) divr16u::rem#0 ← (word) divr16u::rem#5 << (byte) 1 -- vwuz1=vwuz1_rol_1 + //SEG409 [215] (word) divr16u::rem#0 ← (word) divr16u::rem#5 << (byte) 1 -- vwuz1=vwuz1_rol_1 asl rem rol rem+1 - //SEG399 [212] (byte~) divr16u::$1 ← > (word) divr16u::dividend#3 -- vbuaa=_hi_vwuz1 + //SEG410 [216] (byte~) divr16u::$1 ← > (word) divr16u::dividend#3 -- vbuaa=_hi_vwuz1 lda dividend+1 - //SEG400 [213] (byte~) divr16u::$2 ← (byte~) divr16u::$1 & (byte) $80 -- vbuaa=vbuaa_band_vbuc1 + //SEG411 [217] (byte~) divr16u::$2 ← (byte~) divr16u::$1 & (byte) $80 -- vbuaa=vbuaa_band_vbuc1 and #$80 - //SEG401 [214] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 -- vbuaa_eq_0_then_la1 + //SEG412 [218] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 -- vbuaa_eq_0_then_la1 cmp #0 beq b2_from_b1 jmp b4 - //SEG402 divr16u::@4 + //SEG413 divr16u::@4 b4: - //SEG403 [215] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 -- vwuz1=vwuz1_bor_vbuc1 + //SEG414 [219] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 -- vwuz1=vwuz1_bor_vbuc1 lda #1 ora rem sta rem - //SEG404 [216] phi from divr16u::@1 divr16u::@4 to divr16u::@2 [phi:divr16u::@1/divr16u::@4->divr16u::@2] + //SEG415 [220] phi from divr16u::@1 divr16u::@4 to divr16u::@2 [phi:divr16u::@1/divr16u::@4->divr16u::@2] b2_from_b1: b2_from_b4: - //SEG405 [216] phi (word) divr16u::rem#6 = (word) divr16u::rem#0 [phi:divr16u::@1/divr16u::@4->divr16u::@2#0] -- register_copy + //SEG416 [220] phi (word) divr16u::rem#6 = (word) divr16u::rem#0 [phi:divr16u::@1/divr16u::@4->divr16u::@2#0] -- register_copy jmp b2 - //SEG406 divr16u::@2 + //SEG417 divr16u::@2 b2: - //SEG407 [217] (word) divr16u::dividend#0 ← (word) divr16u::dividend#3 << (byte) 1 -- vwuz1=vwuz1_rol_1 + //SEG418 [221] (word) divr16u::dividend#0 ← (word) divr16u::dividend#3 << (byte) 1 -- vwuz1=vwuz1_rol_1 asl dividend rol dividend+1 - //SEG408 [218] (word) divr16u::quotient#1 ← (word) divr16u::quotient#3 << (byte) 1 -- vwuz1=vwuz1_rol_1 + //SEG419 [222] (word) divr16u::quotient#1 ← (word) divr16u::quotient#3 << (byte) 1 -- vwuz1=vwuz1_rol_1 asl quotient rol quotient+1 - //SEG409 [219] if((word) divr16u::rem#6<(const word) sin16s_gen2::wavelength#0) goto divr16u::@3 -- vwuz1_lt_vwuc1_then_la1 + //SEG420 [223] if((word) divr16u::rem#6<(const word) sin16s_gen2::wavelength#0) goto divr16u::@3 -- vwuz1_lt_vwuc1_then_la1 lda rem+1 cmp #>sin16s_gen2.wavelength bcc b3_from_b2 @@ -8036,14 +8219,14 @@ divr16u: { bcc b3_from_b2 !: jmp b5 - //SEG410 divr16u::@5 + //SEG421 divr16u::@5 b5: - //SEG411 [220] (word) divr16u::quotient#2 ← ++ (word) divr16u::quotient#1 -- vwuz1=_inc_vwuz1 + //SEG422 [224] (word) divr16u::quotient#2 ← ++ (word) divr16u::quotient#1 -- vwuz1=_inc_vwuz1 inc quotient bne !+ inc quotient+1 !: - //SEG412 [221] (word) divr16u::rem#2 ← (word) divr16u::rem#6 - (const word) sin16s_gen2::wavelength#0 -- vwuz1=vwuz1_minus_vwuc1 + //SEG423 [225] (word) divr16u::rem#2 ← (word) divr16u::rem#6 - (const word) sin16s_gen2::wavelength#0 -- vwuz1=vwuz1_minus_vwuc1 lda rem sec sbc #sin16s_gen2.wavelength sta rem+1 - //SEG413 [222] phi from divr16u::@2 divr16u::@5 to divr16u::@3 [phi:divr16u::@2/divr16u::@5->divr16u::@3] + //SEG424 [226] phi from divr16u::@2 divr16u::@5 to divr16u::@3 [phi:divr16u::@2/divr16u::@5->divr16u::@3] b3_from_b2: b3_from_b5: - //SEG414 [222] phi (word) divr16u::return#0 = (word) divr16u::quotient#1 [phi:divr16u::@2/divr16u::@5->divr16u::@3#0] -- register_copy - //SEG415 [222] phi (word) divr16u::rem#11 = (word) divr16u::rem#6 [phi:divr16u::@2/divr16u::@5->divr16u::@3#1] -- register_copy + //SEG425 [226] phi (word) divr16u::return#0 = (word) divr16u::quotient#1 [phi:divr16u::@2/divr16u::@5->divr16u::@3#0] -- register_copy + //SEG426 [226] phi (word) divr16u::rem#11 = (word) divr16u::rem#6 [phi:divr16u::@2/divr16u::@5->divr16u::@3#1] -- register_copy jmp b3 - //SEG416 divr16u::@3 + //SEG427 divr16u::@3 b3: - //SEG417 [223] (byte) divr16u::i#1 ← ++ (byte) divr16u::i#2 -- vbuxx=_inc_vbuxx + //SEG428 [227] (byte) divr16u::i#1 ← ++ (byte) divr16u::i#2 -- vbuxx=_inc_vbuxx inx - //SEG418 [224] if((byte) divr16u::i#1!=(byte) $10) goto divr16u::@1 -- vbuxx_neq_vbuc1_then_la1 + //SEG429 [228] if((byte) divr16u::i#1!=(byte) $10) goto divr16u::@1 -- vbuxx_neq_vbuc1_then_la1 cpx #$10 bne b1_from_b3 jmp b6 - //SEG419 divr16u::@6 + //SEG430 divr16u::@6 b6: - //SEG420 [225] (word) rem16u#1 ← (word) divr16u::rem#11 + //SEG431 [229] (word) rem16u#1 ← (word) divr16u::rem#11 jmp breturn - //SEG421 divr16u::@return + //SEG432 divr16u::@return breturn: - //SEG422 [226] return + //SEG433 [230] return rts } -//SEG423 irq +//SEG434 irq // Interrupt Routine counting frames irq: { - //SEG424 entry interrupt(HARDWARE_CLOBBER) + //SEG435 entry interrupt(HARDWARE_CLOBBER) sta rega+1 - //SEG425 [227] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 -- _deref_pbuc1=vbuc2 + //SEG436 [231] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 -- _deref_pbuc1=vbuc2 lda #WHITE sta BGCOL - //SEG426 [228] if((byte) 0==(byte) frame_cnt#0) goto irq::@1 -- vbuc1_eq_vbuz1_then_la1 + //SEG437 [232] if((byte) 0==(byte) frame_cnt#0) goto irq::@1 -- vbuc1_eq_vbuz1_then_la1 lda #0 cmp frame_cnt beq b1_from_irq jmp b2 - //SEG427 irq::@2 + //SEG438 irq::@2 b2: - //SEG428 [229] (byte) frame_cnt#1 ← ++ (byte) frame_cnt#0 -- vbuz1=_inc_vbuz1 + //SEG439 [233] (byte) frame_cnt#1 ← ++ (byte) frame_cnt#0 -- vbuz1=_inc_vbuz1 inc frame_cnt - //SEG429 [230] phi from irq irq::@2 to irq::@1 [phi:irq/irq::@2->irq::@1] + //SEG440 [234] phi from irq irq::@2 to irq::@1 [phi:irq/irq::@2->irq::@1] b1_from_irq: b1_from_b2: - //SEG430 [230] phi (byte) frame_cnt#2 = (byte) frame_cnt#0 [phi:irq/irq::@2->irq::@1#0] -- register_copy + //SEG441 [234] phi (byte) frame_cnt#2 = (byte) frame_cnt#0 [phi:irq/irq::@2->irq::@1#0] -- register_copy jmp b1 - //SEG431 irq::@1 + //SEG442 irq::@1 b1: - //SEG432 [231] *((const byte*) BGCOL#0) ← (const byte) BLACK#0 -- _deref_pbuc1=vbuc2 + //SEG443 [235] *((const byte*) BGCOL#0) ← (const byte) BLACK#0 -- _deref_pbuc1=vbuc2 lda #BLACK sta BGCOL - //SEG433 [232] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 + //SEG444 [236] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 // Acknowledge the IRQ lda #IRQ_RASTER sta IRQ_STATUS jmp breturn - //SEG434 irq::@return + //SEG445 irq::@return breturn: - //SEG435 [233] return - exit interrupt(HARDWARE_CLOBBER) + //SEG446 [237] return - exit interrupt(HARDWARE_CLOBBER) rega: lda #00 rti } -//SEG436 File Data +//SEG447 File Data // Tables for the plotter - initialized by calling bitmap_init(); bitmap_plot_ylo: .fill $100, 0 bitmap_plot_yhi: .fill $100, 0 @@ -8126,20 +8309,23 @@ ASSEMBLER OPTIMIZATIONS Removing instruction jmp b1 Removing instruction jmp b2 Removing instruction jmp bend -Removing instruction jmp b7 -Removing instruction jmp b8 Removing instruction jmp b9 -Removing instruction jmp toD0181 -Removing instruction jmp b6 -Removing instruction jmp b1 -Removing instruction jmp b2 Removing instruction jmp b10 Removing instruction jmp b11 +Removing instruction jmp toD0181 +Removing instruction jmp b8 +Removing instruction jmp b1 +Removing instruction jmp b2 Removing instruction jmp b12 Removing instruction jmp b13 -Removing instruction jmp b3 Removing instruction jmp b14 +Removing instruction jmp b16 +Removing instruction jmp b3 +Removing instruction jmp b17 Removing instruction jmp b4 +Removing instruction jmp b15 +Removing instruction jmp b6 +Removing instruction jmp b5 Removing instruction jmp breturn Removing instruction jmp b5 Removing instruction jmp b3 @@ -8210,10 +8396,13 @@ Removing instruction lda #0 Replacing instruction lda #0 with TXA Removing instruction lda #0 Succesful ASM optimization Pass5UnnecesaryLoadElimination -Replacing label b13_from_b12 with b3 -Replacing label b13_from_b12 with b3 -Replacing label b14_from_b3 with b4 -Replacing label b14_from_b3 with b4 +Replacing label b16_from_b14 with b3 +Replacing label b16_from_b14 with b3 +Replacing label b17_from_b3 with b4 +Replacing label b17_from_b3 with b4 +Replacing label b5_from_b4 with b5_from_b6 +Replacing label b5_from_b4 with b5_from_b6 +Replacing label b5_from_b15 with b5 Replacing label b1 with b2 Replacing label b1_from_b5 with b1 Replacing label b2_from_b1 with b2 @@ -8240,19 +8429,21 @@ Removing instruction b1: Removing instruction b2_from_b1: Removing instruction main_from_b2: Removing instruction bend_from_b2: -Removing instruction b7_from_main: -Removing instruction bitmap_init_from_b7: -Removing instruction b8_from_b7: -Removing instruction bitmap_clear_from_b8: -Removing instruction toD0181_from_b9: +Removing instruction b9_from_main: +Removing instruction bitmap_init_from_b9: +Removing instruction b10_from_b9: +Removing instruction bitmap_clear_from_b10: +Removing instruction toD0181_from_b11: Removing instruction toD0181: Removing instruction b1: -Removing instruction b13_from_b12: -Removing instruction b13: -Removing instruction b3_from_b13: -Removing instruction b14_from_b3: -Removing instruction b14: -Removing instruction b4_from_b14: +Removing instruction b16_from_b14: +Removing instruction b16: +Removing instruction b3_from_b16: +Removing instruction b17_from_b3: +Removing instruction b17: +Removing instruction b4_from_b17: +Removing instruction b5_from_b4: +Removing instruction b5_from_b15: Removing instruction b1_from_b3: Removing instruction b1_from_b5: Removing instruction b2_from_b1: @@ -8293,19 +8484,21 @@ Succesful ASM optimization Pass5RedundantLabelElimination Removing instruction b2: Removing instruction bend: Removing instruction sin16s_gen2_from_main: -Removing instruction b7: -Removing instruction b8: Removing instruction b9: -Removing instruction b6: -Removing instruction b1_from_b6: -Removing instruction mul16s_from_b2: Removing instruction b10: -Removing instruction mul16s_from_b10: Removing instruction b11: +Removing instruction b8: +Removing instruction b1_from_b8: +Removing instruction mul16s_from_b2: Removing instruction b12: -Removing instruction b3_from_b12: +Removing instruction mul16s_from_b12: +Removing instruction b13: +Removing instruction b14: +Removing instruction b3_from_b14: Removing instruction b4_from_b3: -Removing instruction b1_from_b4: +Removing instruction b15: +Removing instruction b6: +Removing instruction b1_from_b5: Removing instruction breturn: Removing instruction mul16u_from_mul16s: Removing instruction b5: @@ -8357,21 +8550,27 @@ Removing instruction b5: Removing instruction b6: Removing instruction b2: Succesful ASM optimization Pass5UnusedLabelElimination +Skipping double jump to b5 in bne b5_from_b6 +Skipping double jump to b5 in bne b5_from_b6 Skipping double jump to b3 in beq b12 Replacing jump to rts with rts in jmp b3 Succesful ASM optimization Pass5DoubleJumpElimination +Relabelling long label b5_from_b6 to b1 Relabelling long label b1_from_sin16s to b4 Succesful ASM optimization Pass5RelabelLongLabels Adding RTS to root block Succesful ASM optimization Pass5AddMainRts Removing instruction jmp b3 Removing instruction jmp b4 +Removing instruction jmp b5 Removing instruction jmp b1 Removing instruction jmp b2 Removing instruction jmp b3 Removing instruction jmp b1 Removing instruction jmp b1 Succesful ASM optimization Pass5NextJumpElimination +Removing instruction b1: +Succesful ASM optimization Pass5RedundantLabelElimination Removing instruction b12: Succesful ASM optimization Pass5UnusedLabelElimination Removing unreachable instruction rts @@ -8449,7 +8648,7 @@ FINAL SYMBOL TABLE (byte~) bitmap_init::$4 reg byte a 22.0 (byte~) bitmap_init::$5 reg byte a 22.0 (byte~) bitmap_init::$6 reg byte a 22.0 -(byte~) bitmap_init::$7 $7 zp ZP_BYTE:62 5.5 +(byte~) bitmap_init::$7 $7 zp ZP_BYTE:63 5.5 (label) bitmap_init::@1 (label) bitmap_init::@2 (label) bitmap_init::@3 @@ -8470,18 +8669,18 @@ FINAL SYMBOL TABLE (byte) bitmap_init::y#1 reg byte x 16.5 (byte) bitmap_init::y#2 reg byte x 5.5 (byte*) bitmap_init::yoffs -(byte*) bitmap_init::yoffs#1 yoffs zp ZP_WORD:26 22.0 -(byte*) bitmap_init::yoffs#2 yoffs zp ZP_WORD:26 6.875 -(byte*) bitmap_init::yoffs#4 yoffs zp ZP_WORD:26 11.0 +(byte*) bitmap_init::yoffs#1 yoffs zp ZP_WORD:27 22.0 +(byte*) bitmap_init::yoffs#2 yoffs zp ZP_WORD:27 6.875 +(byte*) bitmap_init::yoffs#4 yoffs zp ZP_WORD:27 11.0 (void()) bitmap_plot((word) bitmap_plot::x , (byte) bitmap_plot::y) -(word~) bitmap_plot::$1 $1 zp ZP_WORD:56 4.0 +(word~) bitmap_plot::$1 $1 zp ZP_WORD:57 4.0 (byte~) bitmap_plot::$2 reg byte a 4.0 -(word~) bitmap_plot::$3 $3 zp ZP_WORD:54 1.0 +(word~) bitmap_plot::$3 $3 zp ZP_WORD:55 1.0 (label) bitmap_plot::@return (byte*) bitmap_plot::plotter -(byte*) bitmap_plot::plotter#1 plotter zp ZP_WORD:54 3.0 +(byte*) bitmap_plot::plotter#1 plotter zp ZP_WORD:55 3.0 (word) bitmap_plot::x -(signed word) bitmap_plot::x#0 x zp ZP_WORD:50 0.6875 +(signed word) bitmap_plot::x#0 x zp ZP_WORD:51 0.6875 (byte) bitmap_plot::y (byte) bitmap_plot::y#0 reg byte a 15.0 (byte[$100]) bitmap_plot_bit @@ -8499,12 +8698,12 @@ FINAL SYMBOL TABLE (word) div32u16u::divisor (dword) div32u16u::quotient (word) div32u16u::quotient_hi -(word) div32u16u::quotient_hi#0 quotient_hi zp ZP_WORD:73 0.8 +(word) div32u16u::quotient_hi#0 quotient_hi zp ZP_WORD:74 0.8 (word) div32u16u::quotient_lo -(word) div32u16u::quotient_lo#0 quotient_lo zp ZP_WORD:47 4.0 +(word) div32u16u::quotient_lo#0 quotient_lo zp ZP_WORD:48 4.0 (dword) div32u16u::return -(dword) div32u16u::return#0 return zp ZP_DWORD:63 1.3333333333333333 -(dword) div32u16u::return#2 return zp ZP_DWORD:63 4.0 +(dword) div32u16u::return#0 return zp ZP_DWORD:64 1.3333333333333333 +(dword) div32u16u::return#2 return zp ZP_DWORD:64 4.0 (word()) divr16u((word) divr16u::dividend , (word) divr16u::divisor , (word) divr16u::rem) (byte~) divr16u::$1 reg byte a 22.0 (byte~) divr16u::$2 reg byte a 22.0 @@ -8516,34 +8715,34 @@ FINAL SYMBOL TABLE (label) divr16u::@6 (label) divr16u::@return (word) divr16u::dividend -(word) divr16u::dividend#0 dividend zp ZP_WORD:45 2.75 -(word) divr16u::dividend#3 dividend zp ZP_WORD:45 5.0 -(word) divr16u::dividend#5 dividend zp ZP_WORD:45 2.0 +(word) divr16u::dividend#0 dividend zp ZP_WORD:46 2.75 +(word) divr16u::dividend#3 dividend zp ZP_WORD:46 5.0 +(word) divr16u::dividend#5 dividend zp ZP_WORD:46 2.0 (word) divr16u::divisor (byte) divr16u::i (byte) divr16u::i#1 reg byte x 16.5 (byte) divr16u::i#2 reg byte x 1.6923076923076923 (word) divr16u::quotient -(word) divr16u::quotient#1 quotient zp ZP_WORD:47 16.5 -(word) divr16u::quotient#2 quotient zp ZP_WORD:47 11.0 -(word) divr16u::quotient#3 quotient zp ZP_WORD:47 2.75 +(word) divr16u::quotient#1 quotient zp ZP_WORD:48 16.5 +(word) divr16u::quotient#2 quotient zp ZP_WORD:48 11.0 +(word) divr16u::quotient#3 quotient zp ZP_WORD:48 2.75 (word) divr16u::rem -(word) divr16u::rem#0 rem zp ZP_WORD:43 8.25 -(word) divr16u::rem#1 rem zp ZP_WORD:43 22.0 -(word) divr16u::rem#10 rem zp ZP_WORD:43 4.0 -(word) divr16u::rem#11 rem zp ZP_WORD:43 11.666666666666666 -(word) divr16u::rem#2 rem zp ZP_WORD:43 22.0 -(word) divr16u::rem#4 rem zp ZP_WORD:43 4.0 -(word) divr16u::rem#5 rem zp ZP_WORD:43 24.0 -(word) divr16u::rem#6 rem zp ZP_WORD:43 11.0 +(word) divr16u::rem#0 rem zp ZP_WORD:44 8.25 +(word) divr16u::rem#1 rem zp ZP_WORD:44 22.0 +(word) divr16u::rem#10 rem zp ZP_WORD:44 4.0 +(word) divr16u::rem#11 rem zp ZP_WORD:44 11.666666666666666 +(word) divr16u::rem#2 rem zp ZP_WORD:44 22.0 +(word) divr16u::rem#4 rem zp ZP_WORD:44 4.0 +(word) divr16u::rem#5 rem zp ZP_WORD:44 24.0 +(word) divr16u::rem#6 rem zp ZP_WORD:44 11.0 (word) divr16u::return -(word) divr16u::return#0 return zp ZP_WORD:47 5.285714285714286 -(word) divr16u::return#2 return zp ZP_WORD:47 4.0 -(word) divr16u::return#3 return zp ZP_WORD:47 4.0 +(word) divr16u::return#0 return zp ZP_WORD:48 5.285714285714286 +(word) divr16u::return#2 return zp ZP_WORD:48 4.0 +(word) divr16u::return#3 return zp ZP_WORD:48 4.0 (byte) frame_cnt -(byte) frame_cnt#0 frame_cnt zp ZP_BYTE:49 0.6000000000000001 -(byte) frame_cnt#1 frame_cnt zp ZP_BYTE:49 4.0 -(byte) frame_cnt#2 frame_cnt zp ZP_BYTE:49 40.0 +(byte) frame_cnt#0 frame_cnt zp ZP_BYTE:50 0.5555555555555556 +(byte) frame_cnt#1 frame_cnt zp ZP_BYTE:50 4.0 +(byte) frame_cnt#2 frame_cnt zp ZP_BYTE:50 40.0 (void()) init_irq() (label) init_irq::@return interrupt(HARDWARE_CLOBBER)(void()) irq() @@ -8551,21 +8750,24 @@ interrupt(HARDWARE_CLOBBER)(void()) irq() (label) irq::@2 (label) irq::@return (void()) main() -(signed word~) main::$11 $11 zp ZP_WORD:50 22.0 -(word~) main::$15 $15 zp ZP_WORD:52 11.0 -(signed word~) main::$17 $17 zp ZP_WORD:52 22.0 -(signed word~) main::$18 $18 zp ZP_WORD:52 11.0 -(word~) main::$28 $28 zp ZP_WORD:8 22.0 -(word~) main::$29 $29 zp ZP_WORD:8 22.0 -(signed word*~) main::$30 $30 zp ZP_WORD:8 22.0 -(signed word*~) main::$31 $31 zp ZP_WORD:8 22.0 -(word~) main::$9 $9 zp ZP_WORD:50 11.0 +(signed word~) main::$11 $11 zp ZP_WORD:51 22.0 +(word~) main::$15 $15 zp ZP_WORD:53 11.0 +(signed word~) main::$17 $17 zp ZP_WORD:53 22.0 +(signed word~) main::$18 $18 zp ZP_WORD:53 11.0 +(word~) main::$32 $32 zp ZP_WORD:9 22.0 +(word~) main::$33 $33 zp ZP_WORD:9 22.0 +(signed word*~) main::$34 $34 zp ZP_WORD:9 22.0 +(signed word*~) main::$35 $35 zp ZP_WORD:9 22.0 +(word~) main::$9 $9 zp ZP_WORD:51 11.0 (label) main::@1 (label) main::@10 (label) main::@11 (label) main::@12 (label) main::@13 (label) main::@14 +(label) main::@15 +(label) main::@16 +(label) main::@17 (label) main::@2 (label) main::@3 (label) main::@4 @@ -8575,22 +8777,24 @@ interrupt(HARDWARE_CLOBBER)(void()) irq() (label) main::@8 (label) main::@9 (signed word) main::cos_x -(signed word) main::cos_x#0 cos_x zp ZP_WORD:8 11.0 +(signed word) main::cos_x#0 cos_x zp ZP_WORD:9 11.0 (word) main::idx_x (word) main::idx_x#1 idx_x zp ZP_WORD:2 11.0 -(word) main::idx_x#10 idx_x zp ZP_WORD:2 3.142857142857143 -(word) main::idx_x#3 idx_x zp ZP_WORD:2 1.2692307692307692 +(word) main::idx_x#10 idx_x zp ZP_WORD:2 3.0 +(word) main::idx_x#11 idx_x zp ZP_WORD:2 1.2692307692307692 (word) main::idx_y (word) main::idx_y#1 idx_y zp ZP_WORD:6 11.0 -(word) main::idx_y#10 idx_y zp ZP_WORD:6 7.333333333333333 +(word) main::idx_y#10 idx_y zp ZP_WORD:6 3.142857142857143 (word) main::idx_y#3 idx_y zp ZP_WORD:6 1.0999999999999999 (signed word) main::r -(signed word) main::r#1 r zp ZP_WORD:4 16.5 +(signed word) main::r#1 r zp ZP_WORD:4 5.5 (signed word) main::r#10 r zp ZP_WORD:4 1.2941176470588236 (byte) main::r_add -(const byte) main::r_add#0 r_add = (byte) 4 +(byte) main::r_add#1 r_add zp ZP_BYTE:8 22.0 +(byte) main::r_add#10 r_add zp ZP_BYTE:8 2.081081081081081 +(byte) main::r_add#12 r_add zp ZP_BYTE:8 16.5 (signed word) main::sin_y -(signed word) main::sin_y#0 sin_y zp ZP_WORD:8 11.0 +(signed word) main::sin_y#0 sin_y zp ZP_WORD:9 11.0 (label) main::toD0181 (word~) main::toD0181_$0 (number~) main::toD0181_$1 @@ -8607,31 +8811,31 @@ interrupt(HARDWARE_CLOBBER)(void()) irq() (byte*) main::toD0181_screen (word) main::x (signed dword) main::xpos -(signed dword) main::xpos#0 xpos zp ZP_DWORD:10 22.0 +(signed dword) main::xpos#0 xpos zp ZP_DWORD:11 22.0 (word) main::y (signed dword) main::ypos -(signed dword) main::ypos#0 ypos zp ZP_DWORD:10 22.0 +(signed dword) main::ypos#0 ypos zp ZP_DWORD:11 22.0 (void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) (label) memset::@1 (label) memset::@return (byte) memset::c (byte) memset::c#3 reg byte x 1.5714285714285714 (byte*) memset::dst -(byte*) memset::dst#1 dst zp ZP_WORD:22 16.5 -(byte*) memset::dst#2 dst zp ZP_WORD:22 17.5 -(byte*~) memset::dst#3 dst zp ZP_WORD:22 4.0 +(byte*) memset::dst#1 dst zp ZP_WORD:23 16.5 +(byte*) memset::dst#2 dst zp ZP_WORD:23 17.5 +(byte*~) memset::dst#3 dst zp ZP_WORD:23 4.0 (byte*) memset::end -(byte*) memset::end#0 end zp ZP_WORD:24 2.1666666666666665 +(byte*) memset::end#0 end zp ZP_WORD:25 2.1666666666666665 (word) memset::num -(word) memset::num#2 num zp ZP_WORD:24 2.0 +(word) memset::num#2 num zp ZP_WORD:25 2.0 (void*) memset::return (void*) memset::str -(void*) memset::str#2 str zp ZP_WORD:22 +(void*) memset::str#2 str zp ZP_WORD:23 (signed dword()) mul16s((signed word) mul16s::a , (signed word) mul16s::b) -(word~) mul16s::$13 $13 zp ZP_WORD:60 4.0 -(word~) mul16s::$16 $16 zp ZP_WORD:58 4.0 -(word~) mul16s::$17 $17 zp ZP_WORD:60 4.0 -(word~) mul16s::$9 $9 zp ZP_WORD:58 4.0 +(word~) mul16s::$13 $13 zp ZP_WORD:61 4.0 +(word~) mul16s::$16 $16 zp ZP_WORD:59 4.0 +(word~) mul16s::$17 $17 zp ZP_WORD:61 4.0 +(word~) mul16s::$9 $9 zp ZP_WORD:59 4.0 (label) mul16s::@1 (label) mul16s::@2 (label) mul16s::@3 @@ -8644,20 +8848,20 @@ interrupt(HARDWARE_CLOBBER)(void()) irq() (signed word) mul16s::a#2 a zp ZP_WORD:4 11.0 (signed word) mul16s::a#3 a zp ZP_WORD:4 2.692307692307692 (signed word) mul16s::b -(signed word) mul16s::b#1 b zp ZP_WORD:8 22.0 -(signed word) mul16s::b#2 b zp ZP_WORD:8 22.0 -(signed word) mul16s::b#3 b zp ZP_WORD:8 2.1818181818181817 +(signed word) mul16s::b#1 b zp ZP_WORD:9 22.0 +(signed word) mul16s::b#2 b zp ZP_WORD:9 22.0 +(signed word) mul16s::b#3 b zp ZP_WORD:9 2.1818181818181817 (dword) mul16s::m -(dword) mul16s::m#0 m zp ZP_DWORD:10 2.0 -(dword) mul16s::m#1 m zp ZP_DWORD:10 4.0 -(dword) mul16s::m#2 m zp ZP_DWORD:10 4.0 -(dword) mul16s::m#4 m zp ZP_DWORD:10 4.0 -(dword) mul16s::m#5 m zp ZP_DWORD:10 2.5 +(dword) mul16s::m#0 m zp ZP_DWORD:11 2.0 +(dword) mul16s::m#1 m zp ZP_DWORD:11 4.0 +(dword) mul16s::m#2 m zp ZP_DWORD:11 4.0 +(dword) mul16s::m#4 m zp ZP_DWORD:11 4.0 +(dword) mul16s::m#5 m zp ZP_DWORD:11 2.5 (signed dword) mul16s::return -(signed dword) mul16s::return#0 return zp ZP_DWORD:10 7.000000000000001 -(signed dword) mul16s::return#2 return zp ZP_DWORD:10 22.0 -(signed dword) mul16s::return#3 return zp ZP_DWORD:10 22.0 -(signed dword) mul16s::return#4 return zp ZP_DWORD:10 22.0 +(signed dword) mul16s::return#0 return zp ZP_DWORD:11 7.000000000000001 +(signed dword) mul16s::return#2 return zp ZP_DWORD:11 22.0 +(signed dword) mul16s::return#3 return zp ZP_DWORD:11 22.0 +(signed dword) mul16s::return#4 return zp ZP_DWORD:11 22.0 (dword()) mul16u((word) mul16u::a , (word) mul16u::b) (byte~) mul16u::$1 reg byte a 202.0 (label) mul16u::@1 @@ -8666,58 +8870,58 @@ interrupt(HARDWARE_CLOBBER)(void()) irq() (label) mul16u::@4 (label) mul16u::@return (word) mul16u::a -(word) mul16u::a#0 a zp ZP_WORD:16 101.0 -(word) mul16u::a#2 a zp ZP_WORD:16 2.0 -(word) mul16u::a#3 a zp ZP_WORD:16 67.66666666666666 -(word) mul16u::a#6 a zp ZP_WORD:16 6.0 -(word~) mul16u::a#8 a zp ZP_WORD:16 4.0 +(word) mul16u::a#0 a zp ZP_WORD:17 101.0 +(word) mul16u::a#2 a zp ZP_WORD:17 2.0 +(word) mul16u::a#3 a zp ZP_WORD:17 67.66666666666666 +(word) mul16u::a#6 a zp ZP_WORD:17 6.0 +(word~) mul16u::a#8 a zp ZP_WORD:17 4.0 (word) mul16u::b -(word) mul16u::b#1 b zp ZP_WORD:14 4.0 +(word) mul16u::b#1 b zp ZP_WORD:15 4.0 (dword) mul16u::mb -(dword) mul16u::mb#0 mb zp ZP_DWORD:18 6.0 -(dword) mul16u::mb#1 mb zp ZP_DWORD:18 202.0 -(dword) mul16u::mb#2 mb zp ZP_DWORD:18 43.57142857142858 -(dword~) mul16u::mb#6 mb zp ZP_DWORD:18 2.0 +(dword) mul16u::mb#0 mb zp ZP_DWORD:19 6.0 +(dword) mul16u::mb#1 mb zp ZP_DWORD:19 202.0 +(dword) mul16u::mb#2 mb zp ZP_DWORD:19 43.57142857142858 +(dword~) mul16u::mb#6 mb zp ZP_DWORD:19 2.0 (dword) mul16u::res -(dword) mul16u::res#1 res zp ZP_DWORD:10 202.0 -(dword) mul16u::res#2 res zp ZP_DWORD:10 43.85714285714286 -(dword) mul16u::res#6 res zp ZP_DWORD:10 101.0 +(dword) mul16u::res#1 res zp ZP_DWORD:11 202.0 +(dword) mul16u::res#2 res zp ZP_DWORD:11 43.85714285714286 +(dword) mul16u::res#6 res zp ZP_DWORD:11 101.0 (dword) mul16u::return -(dword) mul16u::return#2 return zp ZP_DWORD:10 4.0 -(dword) mul16u::return#3 return zp ZP_DWORD:10 4.0 +(dword) mul16u::return#2 return zp ZP_DWORD:11 4.0 +(dword) mul16u::return#3 return zp ZP_DWORD:11 4.0 (word()) mulu16_sel((word) mulu16_sel::v1 , (word) mulu16_sel::v2 , (byte) mulu16_sel::select) -(dword~) mulu16_sel::$0 $0 zp ZP_DWORD:10 4.0 -(dword~) mulu16_sel::$1 $1 zp ZP_DWORD:10 4.0 +(dword~) mulu16_sel::$0 $0 zp ZP_DWORD:11 4.0 +(dword~) mulu16_sel::$1 $1 zp ZP_DWORD:11 4.0 (label) mulu16_sel::@1 (label) mulu16_sel::@return (word) mulu16_sel::return -(word) mulu16_sel::return#0 return zp ZP_WORD:71 4.0 -(word) mulu16_sel::return#1 return#1 zp ZP_WORD:41 4.0 -(word) mulu16_sel::return#10 return#10 zp ZP_WORD:41 4.0 -(word) mulu16_sel::return#11 return zp ZP_WORD:71 4.0 -(word) mulu16_sel::return#12 return zp ZP_WORD:71 1.714285714285714 -(word) mulu16_sel::return#2 return zp ZP_WORD:71 4.0 +(word) mulu16_sel::return#0 return zp ZP_WORD:72 4.0 +(word) mulu16_sel::return#1 return#1 zp ZP_WORD:42 4.0 +(word) mulu16_sel::return#10 return#10 zp ZP_WORD:42 4.0 +(word) mulu16_sel::return#11 return zp ZP_WORD:72 4.0 +(word) mulu16_sel::return#12 return zp ZP_WORD:72 1.714285714285714 +(word) mulu16_sel::return#2 return zp ZP_WORD:72 4.0 (byte) mulu16_sel::select (byte) mulu16_sel::select#5 reg byte x 0.3333333333333333 (word) mulu16_sel::v1 -(word) mulu16_sel::v1#0 v1 zp ZP_WORD:41 2.0 -(word) mulu16_sel::v1#1 v1 zp ZP_WORD:41 2.0 -(word) mulu16_sel::v1#2 v1 zp ZP_WORD:41 4.0 -(word) mulu16_sel::v1#3 v1 zp ZP_WORD:41 2.0 -(word) mulu16_sel::v1#4 v1 zp ZP_WORD:41 2.0 -(word) mulu16_sel::v1#5 v1 zp ZP_WORD:41 12.0 +(word) mulu16_sel::v1#0 v1 zp ZP_WORD:42 2.0 +(word) mulu16_sel::v1#1 v1 zp ZP_WORD:42 2.0 +(word) mulu16_sel::v1#2 v1 zp ZP_WORD:42 4.0 +(word) mulu16_sel::v1#3 v1 zp ZP_WORD:42 2.0 +(word) mulu16_sel::v1#4 v1 zp ZP_WORD:42 2.0 +(word) mulu16_sel::v1#5 v1 zp ZP_WORD:42 12.0 (word) mulu16_sel::v2 -(word) mulu16_sel::v2#0 v2 zp ZP_WORD:14 4.0 -(word) mulu16_sel::v2#1 v2 zp ZP_WORD:14 4.0 -(word) mulu16_sel::v2#3 v2 zp ZP_WORD:14 4.0 -(word) mulu16_sel::v2#4 v2 zp ZP_WORD:14 4.0 -(word) mulu16_sel::v2#5 v2 zp ZP_WORD:14 5.0 +(word) mulu16_sel::v2#0 v2 zp ZP_WORD:15 4.0 +(word) mulu16_sel::v2#1 v2 zp ZP_WORD:15 4.0 +(word) mulu16_sel::v2#3 v2 zp ZP_WORD:15 4.0 +(word) mulu16_sel::v2#4 v2 zp ZP_WORD:15 4.0 +(word) mulu16_sel::v2#5 v2 zp ZP_WORD:15 5.0 (byte[$100]) plots_per_frame (const byte[$100]) plots_per_frame#0 plots_per_frame = { fill( $100, 0) } (word) rem16u -(word) rem16u#1 rem16u zp ZP_WORD:43 0.8 +(word) rem16u#1 rem16u zp ZP_WORD:44 0.8 (signed word()) sin16s((dword) sin16s::x) -(dword~) sin16s::$4 $4 zp ZP_DWORD:37 4.0 +(dword~) sin16s::$4 $4 zp ZP_DWORD:38 4.0 (label) sin16s::@1 (label) sin16s::@10 (label) sin16s::@11 @@ -8732,7 +8936,7 @@ interrupt(HARDWARE_CLOBBER)(void()) irq() (label) sin16s::@9 (label) sin16s::@return (byte) sin16s::isUpper -(byte) sin16s::isUpper#2 isUpper zp ZP_BYTE:36 0.06060606060606061 +(byte) sin16s::isUpper#2 isUpper zp ZP_BYTE:37 0.06060606060606061 (signed word) sin16s::return (signed word) sin16s::return#0 return zp ZP_WORD:4 22.0 (signed word) sin16s::return#1 return zp ZP_WORD:4 5.0 @@ -8743,28 +8947,28 @@ interrupt(HARDWARE_CLOBBER)(void()) irq() (word) sin16s::usinx#0 usinx zp ZP_WORD:4 0.3333333333333333 (word) sin16s::usinx#1 usinx zp ZP_WORD:4 1.0 (dword) sin16s::x -(dword) sin16s::x#0 x zp ZP_DWORD:37 8.5 -(dword) sin16s::x#1 x zp ZP_DWORD:37 4.0 -(dword) sin16s::x#2 x zp ZP_DWORD:37 4.0 -(dword) sin16s::x#4 x zp ZP_DWORD:37 5.0 -(dword) sin16s::x#6 x zp ZP_DWORD:37 6.0 +(dword) sin16s::x#0 x zp ZP_DWORD:38 8.5 +(dword) sin16s::x#1 x zp ZP_DWORD:38 4.0 +(dword) sin16s::x#2 x zp ZP_DWORD:38 4.0 +(dword) sin16s::x#4 x zp ZP_DWORD:38 5.0 +(dword) sin16s::x#6 x zp ZP_DWORD:38 6.0 (word) sin16s::x1 -(word) sin16s::x1#0 x1 zp ZP_WORD:69 0.6363636363636365 +(word) sin16s::x1#0 x1 zp ZP_WORD:70 0.6363636363636365 (word) sin16s::x2 -(word) sin16s::x2#0 x2 zp ZP_WORD:41 4.0 +(word) sin16s::x2#0 x2 zp ZP_WORD:42 4.0 (word) sin16s::x3 -(word) sin16s::x3#0 x3 zp ZP_WORD:41 1.0 +(word) sin16s::x3#0 x3 zp ZP_WORD:42 1.0 (word) sin16s::x3_6 -(word) sin16s::x3_6#0 x3_6 zp ZP_WORD:71 4.0 +(word) sin16s::x3_6#0 x3_6 zp ZP_WORD:72 4.0 (word) sin16s::x4 -(word) sin16s::x4#0 x4 zp ZP_WORD:41 4.0 +(word) sin16s::x4#0 x4 zp ZP_WORD:42 4.0 (word) sin16s::x5 -(word) sin16s::x5#0 x5 zp ZP_WORD:71 4.0 +(word) sin16s::x5#0 x5 zp ZP_WORD:72 4.0 (word) sin16s::x5_128 -(word) sin16s::x5_128#0 x5_128 zp ZP_WORD:71 4.0 +(word) sin16s::x5_128#0 x5_128 zp ZP_WORD:72 4.0 (void()) sin16s_gen2((signed word*) sin16s_gen2::sintab , (word) sin16s_gen2::wavelength , (signed word) sin16s_gen2::min , (signed word) sin16s_gen2::max) -(signed dword~) sin16s_gen2::$5 $5 zp ZP_DWORD:10 22.0 -(word~) sin16s_gen2::$6 $6 zp ZP_WORD:67 11.0 +(signed dword~) sin16s_gen2::$5 $5 zp ZP_DWORD:11 22.0 +(word~) sin16s_gen2::$6 $6 zp ZP_WORD:68 11.0 (label) sin16s_gen2::@1 (label) sin16s_gen2::@2 (label) sin16s_gen2::@3 @@ -8773,75 +8977,76 @@ interrupt(HARDWARE_CLOBBER)(void()) irq() (signed word) sin16s_gen2::ampl (const signed word) sin16s_gen2::ampl#0 ampl = (const signed word) sin16s_gen2::max#0-(const signed word) sin16s_gen2::min#0 (word) sin16s_gen2::i -(word) sin16s_gen2::i#1 i zp ZP_WORD:34 16.5 -(word) sin16s_gen2::i#2 i zp ZP_WORD:34 1.8333333333333333 +(word) sin16s_gen2::i#1 i zp ZP_WORD:35 16.5 +(word) sin16s_gen2::i#2 i zp ZP_WORD:35 1.8333333333333333 (signed word) sin16s_gen2::max (const signed word) sin16s_gen2::max#0 max = (signed word) $1001 (signed word) sin16s_gen2::min (const signed word) sin16s_gen2::min#0 min = (signed word) -$1001 (signed word) sin16s_gen2::offs (signed word*) sin16s_gen2::sintab -(signed word*) sin16s_gen2::sintab#0 sintab zp ZP_WORD:32 5.5 -(signed word*) sin16s_gen2::sintab#2 sintab zp ZP_WORD:32 3.3000000000000003 +(signed word*) sin16s_gen2::sintab#0 sintab zp ZP_WORD:33 5.5 +(signed word*) sin16s_gen2::sintab#2 sintab zp ZP_WORD:33 3.3000000000000003 (dword) sin16s_gen2::step -(dword) sin16s_gen2::step#0 step zp ZP_DWORD:63 0.8666666666666666 +(dword) sin16s_gen2::step#0 step zp ZP_DWORD:64 0.8666666666666666 (word) sin16s_gen2::wavelength (const word) sin16s_gen2::wavelength#0 wavelength = (word) $200 (dword) sin16s_gen2::x -(dword) sin16s_gen2::x#1 x zp ZP_DWORD:28 7.333333333333333 -(dword) sin16s_gen2::x#2 x zp ZP_DWORD:28 3.0 +(dword) sin16s_gen2::x#1 x zp ZP_DWORD:29 7.333333333333333 +(dword) sin16s_gen2::x#2 x zp ZP_DWORD:29 3.0 -zp ZP_WORD:2 [ main::idx_x#3 main::idx_x#10 main::idx_x#1 ] +zp ZP_WORD:2 [ main::idx_x#11 main::idx_x#10 main::idx_x#1 ] zp ZP_WORD:4 [ main::r#10 main::r#1 mul16s::a#3 mul16s::a#1 mul16s::a#2 mul16s::a#0 sin16s::return#1 sin16s::return#5 sin16s::sinx#1 sin16s::usinx#1 sin16s::return#0 sin16s::usinx#0 ] zp ZP_WORD:6 [ main::idx_y#3 main::idx_y#10 main::idx_y#1 ] -zp ZP_WORD:8 [ mul16s::b#3 mul16s::b#1 mul16s::b#2 main::cos_x#0 main::sin_y#0 main::$28 main::$30 main::$29 main::$31 ] -zp ZP_DWORD:10 [ mul16s::m#4 mul16s::m#5 mul16s::m#1 mul16s::m#0 mul16s::m#2 mul16u::return#2 mul16s::return#0 mul16u::res#2 mul16u::res#6 mul16u::res#1 mul16u::return#3 mul16s::return#3 main::xpos#0 mul16s::return#4 main::ypos#0 mul16s::return#2 sin16s_gen2::$5 mulu16_sel::$0 mulu16_sel::$1 ] -zp ZP_WORD:14 [ mul16u::b#1 mulu16_sel::v2#5 mulu16_sel::v2#3 mulu16_sel::v2#4 mulu16_sel::v2#0 mulu16_sel::v2#1 ] -zp ZP_WORD:16 [ mul16u::a#3 mul16u::a#6 mul16u::a#8 mul16u::a#2 mul16u::a#0 ] -zp ZP_DWORD:18 [ mul16u::mb#2 mul16u::mb#0 mul16u::mb#6 mul16u::mb#1 ] -zp ZP_WORD:22 [ memset::str#2 memset::dst#2 memset::dst#3 memset::dst#1 ] -zp ZP_WORD:24 [ memset::num#2 memset::end#0 ] +zp ZP_BYTE:8 [ main::r_add#10 main::r_add#12 main::r_add#1 ] +zp ZP_WORD:9 [ mul16s::b#3 mul16s::b#1 mul16s::b#2 main::cos_x#0 main::sin_y#0 main::$32 main::$34 main::$33 main::$35 ] +zp ZP_DWORD:11 [ mul16s::m#4 mul16s::m#5 mul16s::m#1 mul16s::m#0 mul16s::m#2 mul16u::return#2 mul16s::return#0 mul16u::res#2 mul16u::res#6 mul16u::res#1 mul16u::return#3 mul16s::return#3 main::xpos#0 mul16s::return#4 main::ypos#0 mul16s::return#2 sin16s_gen2::$5 mulu16_sel::$0 mulu16_sel::$1 ] +zp ZP_WORD:15 [ mul16u::b#1 mulu16_sel::v2#5 mulu16_sel::v2#3 mulu16_sel::v2#4 mulu16_sel::v2#0 mulu16_sel::v2#1 ] +zp ZP_WORD:17 [ mul16u::a#3 mul16u::a#6 mul16u::a#8 mul16u::a#2 mul16u::a#0 ] +zp ZP_DWORD:19 [ mul16u::mb#2 mul16u::mb#0 mul16u::mb#6 mul16u::mb#1 ] +zp ZP_WORD:23 [ memset::str#2 memset::dst#2 memset::dst#3 memset::dst#1 ] +zp ZP_WORD:25 [ memset::num#2 memset::end#0 ] reg byte x [ memset::c#3 ] reg byte a [ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ] reg byte x [ bitmap_init::x#2 bitmap_init::x#1 ] reg byte x [ bitmap_init::y#2 bitmap_init::y#1 ] -zp ZP_WORD:26 [ bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 ] -zp ZP_DWORD:28 [ sin16s_gen2::x#2 sin16s_gen2::x#1 ] -zp ZP_WORD:32 [ sin16s_gen2::sintab#2 sin16s_gen2::sintab#0 ] -zp ZP_WORD:34 [ sin16s_gen2::i#2 sin16s_gen2::i#1 ] -zp ZP_BYTE:36 [ sin16s::isUpper#2 ] -zp ZP_DWORD:37 [ sin16s::x#6 sin16s::x#4 sin16s::x#0 sin16s::x#1 sin16s::x#2 sin16s::$4 ] -zp ZP_WORD:41 [ mulu16_sel::v1#5 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 sin16s::x3#0 sin16s::x2#0 sin16s::x4#0 mulu16_sel::return#1 mulu16_sel::return#10 ] +zp ZP_WORD:27 [ bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 ] +zp ZP_DWORD:29 [ sin16s_gen2::x#2 sin16s_gen2::x#1 ] +zp ZP_WORD:33 [ sin16s_gen2::sintab#2 sin16s_gen2::sintab#0 ] +zp ZP_WORD:35 [ sin16s_gen2::i#2 sin16s_gen2::i#1 ] +zp ZP_BYTE:37 [ sin16s::isUpper#2 ] +zp ZP_DWORD:38 [ sin16s::x#6 sin16s::x#4 sin16s::x#0 sin16s::x#1 sin16s::x#2 sin16s::$4 ] +zp ZP_WORD:42 [ mulu16_sel::v1#5 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 sin16s::x3#0 sin16s::x2#0 sin16s::x4#0 mulu16_sel::return#1 mulu16_sel::return#10 ] reg byte x [ mulu16_sel::select#5 ] -zp ZP_WORD:43 [ divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u::rem#11 divr16u::rem#6 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 rem16u#1 ] -zp ZP_WORD:45 [ divr16u::dividend#3 divr16u::dividend#5 divr16u::dividend#0 ] -zp ZP_WORD:47 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 divr16u::return#2 divr16u::return#3 div32u16u::quotient_lo#0 ] +zp ZP_WORD:44 [ divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u::rem#11 divr16u::rem#6 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 rem16u#1 ] +zp ZP_WORD:46 [ divr16u::dividend#3 divr16u::dividend#5 divr16u::dividend#0 ] +zp ZP_WORD:48 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 divr16u::return#2 divr16u::return#3 div32u16u::quotient_lo#0 ] reg byte x [ divr16u::i#2 divr16u::i#1 ] -zp ZP_BYTE:49 [ frame_cnt#2 frame_cnt#0 frame_cnt#1 ] -zp ZP_WORD:50 [ main::$9 main::$11 bitmap_plot::x#0 ] -zp ZP_WORD:52 [ main::$15 main::$17 main::$18 ] +zp ZP_BYTE:50 [ frame_cnt#2 frame_cnt#0 frame_cnt#1 ] +zp ZP_WORD:51 [ main::$9 main::$11 bitmap_plot::x#0 ] +zp ZP_WORD:53 [ main::$15 main::$17 main::$18 ] reg byte a [ bitmap_plot::y#0 ] -zp ZP_WORD:54 [ bitmap_plot::$3 bitmap_plot::plotter#1 ] -zp ZP_WORD:56 [ bitmap_plot::$1 ] +zp ZP_WORD:55 [ bitmap_plot::$3 bitmap_plot::plotter#1 ] +zp ZP_WORD:57 [ bitmap_plot::$1 ] reg byte a [ bitmap_plot::$2 ] -zp ZP_WORD:58 [ mul16s::$9 mul16s::$16 ] -zp ZP_WORD:60 [ mul16s::$13 mul16s::$17 ] +zp ZP_WORD:59 [ mul16s::$9 mul16s::$16 ] +zp ZP_WORD:61 [ mul16s::$13 mul16s::$17 ] reg byte a [ mul16u::$1 ] -zp ZP_BYTE:62 [ bitmap_init::$7 ] +zp ZP_BYTE:63 [ bitmap_init::$7 ] reg byte a [ bitmap_init::$4 ] reg byte a [ bitmap_init::$5 ] reg byte a [ bitmap_init::$6 ] -zp ZP_DWORD:63 [ div32u16u::return#2 sin16s_gen2::step#0 div32u16u::return#0 ] -zp ZP_WORD:67 [ sin16s_gen2::$6 ] -zp ZP_WORD:69 [ sin16s::x1#0 ] -zp ZP_WORD:71 [ mulu16_sel::return#0 mulu16_sel::return#12 mulu16_sel::return#2 sin16s::x3_6#0 mulu16_sel::return#11 sin16s::x5#0 sin16s::x5_128#0 ] -zp ZP_WORD:73 [ div32u16u::quotient_hi#0 ] +zp ZP_DWORD:64 [ div32u16u::return#2 sin16s_gen2::step#0 div32u16u::return#0 ] +zp ZP_WORD:68 [ sin16s_gen2::$6 ] +zp ZP_WORD:70 [ sin16s::x1#0 ] +zp ZP_WORD:72 [ mulu16_sel::return#0 mulu16_sel::return#12 mulu16_sel::return#2 sin16s::x3_6#0 mulu16_sel::return#11 sin16s::x5#0 sin16s::x5_128#0 ] +zp ZP_WORD:74 [ div32u16u::quotient_hi#0 ] reg byte a [ divr16u::$1 ] reg byte a [ divr16u::$2 ] FINAL ASSEMBLER -Score: 20390 +Score: 20540 //SEG0 File Comments // Tests the simple bitmap plotter - and counts plots per frame in an IRQ @@ -8892,8 +9097,8 @@ Score: 20390 .const PI_HALF_u4f28 = $1921fb54 .label BITMAP = $2000 .label SCREEN = $400 - .label rem16u = $2b - .label frame_cnt = $31 + .label rem16u = $2c + .label frame_cnt = $32 //SEG3 @begin bbegin: //SEG4 @1 @@ -8911,80 +9116,83 @@ bbegin: //SEG11 @end //SEG12 main main: { - .const r_add = 4 .const toD0181_return = (>(SCREEN&$3fff)*4)|(>BITMAP)/4&$f - .label _9 = $32 - .label _11 = $32 - .label _15 = $34 - .label _17 = $34 - .label _18 = $34 - .label _28 = 8 - .label _29 = 8 - .label cos_x = 8 - .label xpos = $a - .label sin_y = 8 - .label ypos = $a + .label _9 = $33 + .label _11 = $33 + .label _15 = $35 + .label _17 = $35 + .label _18 = $35 + .label _32 = 9 + .label _33 = 9 + .label cos_x = 9 + .label xpos = $b + .label sin_y = 9 + .label ypos = $b .label idx_x = 2 .label idx_y = 6 .label r = 4 - .label _30 = 8 - .label _31 = 8 + .label r_add = 8 + .label _34 = 9 + .label _35 = 9 //SEG13 [6] call sin16s_gen2 - //SEG14 [131] phi from main to sin16s_gen2 [phi:main->sin16s_gen2] + //SEG14 [135] phi from main to sin16s_gen2 [phi:main->sin16s_gen2] jsr sin16s_gen2 - //SEG15 [7] phi from main to main::@7 [phi:main->main::@7] - //SEG16 main::@7 + //SEG15 [7] phi from main to main::@9 [phi:main->main::@9] + //SEG16 main::@9 //SEG17 [8] call bitmap_init - //SEG18 [109] phi from main::@7 to bitmap_init [phi:main::@7->bitmap_init] + //SEG18 [113] phi from main::@9 to bitmap_init [phi:main::@9->bitmap_init] jsr bitmap_init - //SEG19 [9] phi from main::@7 to main::@8 [phi:main::@7->main::@8] - //SEG20 main::@8 + //SEG19 [9] phi from main::@9 to main::@10 [phi:main::@9->main::@10] + //SEG20 main::@10 //SEG21 [10] call bitmap_clear - //SEG22 [96] phi from main::@8 to bitmap_clear [phi:main::@8->bitmap_clear] + //SEG22 [100] phi from main::@10 to bitmap_clear [phi:main::@10->bitmap_clear] jsr bitmap_clear - //SEG23 main::@9 + //SEG23 main::@11 //SEG24 [11] *((const byte*) D011#0) ← (const byte) VIC_BMM#0|(const byte) VIC_DEN#0|(const byte) VIC_RSEL#0|(byte) 3 -- _deref_pbuc1=vbuc2 lda #VIC_BMM|VIC_DEN|VIC_RSEL|3 sta D011 - //SEG25 [12] phi from main::@9 to main::toD0181 [phi:main::@9->main::toD0181] + //SEG25 [12] phi from main::@11 to main::toD0181 [phi:main::@11->main::toD0181] //SEG26 main::toD0181 - //SEG27 main::@6 + //SEG27 main::@8 //SEG28 [13] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0 -- _deref_pbuc1=vbuc2 lda #toD0181_return sta D018 //SEG29 [14] call init_irq jsr init_irq - //SEG30 [15] phi from main::@6 to main::@1 [phi:main::@6->main::@1] - //SEG31 [15] phi (word) main::idx_y#3 = (byte) $80 [phi:main::@6->main::@1#0] -- vwuz1=vbuc1 + //SEG30 [15] phi from main::@8 to main::@1 [phi:main::@8->main::@1] + //SEG31 [15] phi (byte) main::r_add#10 = (byte) $20 [phi:main::@8->main::@1#0] -- vbuz1=vbuc1 + lda #$20 + sta r_add + //SEG32 [15] phi (word) main::idx_y#3 = (byte) $80 [phi:main::@8->main::@1#1] -- vwuz1=vbuc1 lda #$80 sta idx_y lda #0 sta idx_y+1 - //SEG32 [15] phi (signed word) main::r#10 = (signed byte) 0 [phi:main::@6->main::@1#1] -- vwsz1=vbsc1 + //SEG33 [15] phi (signed word) main::r#10 = (signed byte) 0 [phi:main::@8->main::@1#2] -- vwsz1=vbsc1 sta r sta r+1 - //SEG33 [15] phi (word) main::idx_x#3 = (byte) 0 [phi:main::@6->main::@1#2] -- vwuz1=vbuc1 + //SEG34 [15] phi (word) main::idx_x#11 = (byte) 0 [phi:main::@8->main::@1#3] -- vwuz1=vbuc1 sta idx_x sta idx_x+1 - //SEG34 main::@1 - //SEG35 main::@2 + //SEG35 main::@1 + //SEG36 main::@2 b2: - //SEG36 [16] (word~) main::$28 ← (word) main::idx_x#3 << (byte) 1 -- vwuz1=vwuz2_rol_1 + //SEG37 [16] (word~) main::$32 ← (word) main::idx_x#11 << (byte) 1 -- vwuz1=vwuz2_rol_1 lda idx_x asl - sta _28 + sta _32 lda idx_x+1 rol - sta _28+1 - //SEG37 [17] (signed word*~) main::$30 ← (const signed word[$200]) SINUS#0 + (word~) main::$28 -- pwsz1=pwsc1_plus_vwuz1 + sta _32+1 + //SEG38 [17] (signed word*~) main::$34 ← (const signed word[$200]) SINUS#0 + (word~) main::$32 -- pwsz1=pwsc1_plus_vwuz1 clc - lda _30 + lda _34 adc #SINUS - sta _30+1 - //SEG38 [18] (signed word) main::cos_x#0 ← *((signed word*~) main::$30) -- vwsz1=_deref_pwsz1 + sta _34+1 + //SEG39 [18] (signed word) main::cos_x#0 ← *((signed word*~) main::$34) -- vwsz1=_deref_pwsz1 ldy #0 lda (cos_x),y tax @@ -8992,22 +9200,22 @@ main: { lda (cos_x),y stx cos_x sta cos_x+1 - //SEG39 [19] (signed word) mul16s::a#1 ← (signed word) main::r#10 - //SEG40 [20] (signed word) mul16s::b#1 ← (signed word) main::cos_x#0 - //SEG41 [21] call mul16s - //SEG42 [58] phi from main::@2 to mul16s [phi:main::@2->mul16s] - //SEG43 [58] phi (signed word) mul16s::b#3 = (signed word) mul16s::b#1 [phi:main::@2->mul16s#0] -- register_copy - //SEG44 [58] phi (signed word) mul16s::a#3 = (signed word) mul16s::a#1 [phi:main::@2->mul16s#1] -- register_copy + //SEG40 [19] (signed word) mul16s::a#1 ← (signed word) main::r#10 + //SEG41 [20] (signed word) mul16s::b#1 ← (signed word) main::cos_x#0 + //SEG42 [21] call mul16s + //SEG43 [62] phi from main::@2 to mul16s [phi:main::@2->mul16s] + //SEG44 [62] phi (signed word) mul16s::b#3 = (signed word) mul16s::b#1 [phi:main::@2->mul16s#0] -- register_copy + //SEG45 [62] phi (signed word) mul16s::a#3 = (signed word) mul16s::a#1 [phi:main::@2->mul16s#1] -- register_copy jsr mul16s - //SEG45 [22] (signed dword) mul16s::return#3 ← (signed dword) mul16s::return#0 - //SEG46 main::@10 - //SEG47 [23] (signed dword) main::xpos#0 ← (signed dword) mul16s::return#3 - //SEG48 [24] (word~) main::$9 ← > (signed dword) main::xpos#0 -- vwuz1=_hi_vdsz2 + //SEG46 [22] (signed dword) mul16s::return#3 ← (signed dword) mul16s::return#0 + //SEG47 main::@12 + //SEG48 [23] (signed dword) main::xpos#0 ← (signed dword) mul16s::return#3 + //SEG49 [24] (word~) main::$9 ← > (signed dword) main::xpos#0 -- vwuz1=_hi_vdsz2 lda xpos+2 sta _9 lda xpos+3 sta _9+1 - //SEG49 [25] (signed word~) main::$11 ← (signed word)(word~) main::$9 >> (signed byte) 2 -- vwsz1=vwsz1_ror_2 + //SEG50 [25] (signed word~) main::$11 ← (signed word)(word~) main::$9 >> (signed byte) 2 -- vwsz1=vwsz1_ror_2 lda _11+1 cmp #$80 ror _11+1 @@ -9016,7 +9224,7 @@ main: { cmp #$80 ror _11+1 ror _11 - //SEG50 [26] (signed word) bitmap_plot::x#0 ← (signed word) $a0 + (signed word~) main::$11 -- vwsz1=vwsc1_plus_vwsz1 + //SEG51 [26] (signed word) bitmap_plot::x#0 ← (signed word) $a0 + (signed word~) main::$11 -- vwsz1=vwsc1_plus_vwsz1 clc lda bitmap_plot.x adc #<$a0 @@ -9024,22 +9232,22 @@ main: { lda bitmap_plot.x+1 adc #>$a0 sta bitmap_plot.x+1 - //SEG51 [27] (word~) main::$29 ← (word) main::idx_y#3 << (byte) 1 -- vwuz1=vwuz2_rol_1 + //SEG52 [27] (word~) main::$33 ← (word) main::idx_y#3 << (byte) 1 -- vwuz1=vwuz2_rol_1 lda idx_y asl - sta _29 + sta _33 lda idx_y+1 rol - sta _29+1 - //SEG52 [28] (signed word*~) main::$31 ← (const signed word[$200]) SINUS#0 + (word~) main::$29 -- pwsz1=pwsc1_plus_vwuz1 + sta _33+1 + //SEG53 [28] (signed word*~) main::$35 ← (const signed word[$200]) SINUS#0 + (word~) main::$33 -- pwsz1=pwsc1_plus_vwuz1 clc - lda _31 + lda _35 adc #SINUS - sta _31+1 - //SEG53 [29] (signed word) main::sin_y#0 ← *((signed word*~) main::$31) -- vwsz1=_deref_pwsz1 + sta _35+1 + //SEG54 [29] (signed word) main::sin_y#0 ← *((signed word*~) main::$35) -- vwsz1=_deref_pwsz1 ldy #0 lda (sin_y),y tax @@ -9047,22 +9255,22 @@ main: { lda (sin_y),y stx sin_y sta sin_y+1 - //SEG54 [30] (signed word) mul16s::a#2 ← (signed word) main::r#10 - //SEG55 [31] (signed word) mul16s::b#2 ← (signed word) main::sin_y#0 - //SEG56 [32] call mul16s - //SEG57 [58] phi from main::@10 to mul16s [phi:main::@10->mul16s] - //SEG58 [58] phi (signed word) mul16s::b#3 = (signed word) mul16s::b#2 [phi:main::@10->mul16s#0] -- register_copy - //SEG59 [58] phi (signed word) mul16s::a#3 = (signed word) mul16s::a#2 [phi:main::@10->mul16s#1] -- register_copy + //SEG55 [30] (signed word) mul16s::a#2 ← (signed word) main::r#10 + //SEG56 [31] (signed word) mul16s::b#2 ← (signed word) main::sin_y#0 + //SEG57 [32] call mul16s + //SEG58 [62] phi from main::@12 to mul16s [phi:main::@12->mul16s] + //SEG59 [62] phi (signed word) mul16s::b#3 = (signed word) mul16s::b#2 [phi:main::@12->mul16s#0] -- register_copy + //SEG60 [62] phi (signed word) mul16s::a#3 = (signed word) mul16s::a#2 [phi:main::@12->mul16s#1] -- register_copy jsr mul16s - //SEG60 [33] (signed dword) mul16s::return#4 ← (signed dword) mul16s::return#0 - //SEG61 main::@11 - //SEG62 [34] (signed dword) main::ypos#0 ← (signed dword) mul16s::return#4 - //SEG63 [35] (word~) main::$15 ← > (signed dword) main::ypos#0 -- vwuz1=_hi_vdsz2 + //SEG61 [33] (signed dword) mul16s::return#4 ← (signed dword) mul16s::return#0 + //SEG62 main::@13 + //SEG63 [34] (signed dword) main::ypos#0 ← (signed dword) mul16s::return#4 + //SEG64 [35] (word~) main::$15 ← > (signed dword) main::ypos#0 -- vwuz1=_hi_vdsz2 lda ypos+2 sta _15 lda ypos+3 sta _15+1 - //SEG64 [36] (signed word~) main::$17 ← (signed word)(word~) main::$15 >> (signed byte) 2 -- vwsz1=vwsz1_ror_2 + //SEG65 [36] (signed word~) main::$17 ← (signed word)(word~) main::$15 >> (signed byte) 2 -- vwsz1=vwsz1_ror_2 lda _17+1 cmp #$80 ror _17+1 @@ -9071,7 +9279,7 @@ main: { cmp #$80 ror _17+1 ror _17 - //SEG65 [37] (signed word~) main::$18 ← (signed byte) $64 + (signed word~) main::$17 -- vwsz1=vbsc1_plus_vwsz1 + //SEG66 [37] (signed word~) main::$18 ← (signed byte) $64 + (signed word~) main::$17 -- vwsz1=vbsc1_plus_vwsz1 lda #$64 sta $fe ora #$7f @@ -9086,23 +9294,23 @@ main: { lda _18+1 adc $ff sta _18+1 - //SEG66 [38] (byte) bitmap_plot::y#0 ← (byte)(word)(signed word~) main::$18 -- vbuaa=_byte_vwuz1 + //SEG67 [38] (byte) bitmap_plot::y#0 ← (byte)(word)(signed word~) main::$18 -- vbuaa=_byte_vwuz1 lda _18 - //SEG67 [39] call bitmap_plot + //SEG68 [39] call bitmap_plot jsr bitmap_plot - //SEG68 main::@12 - //SEG69 [40] *((const byte[$100]) plots_per_frame#0 + (byte) frame_cnt#0) ← ++ *((const byte[$100]) plots_per_frame#0 + (byte) frame_cnt#0) -- pbuc1_derefidx_vbuz1=_inc_pbuc1_derefidx_vbuz1 + //SEG69 main::@14 + //SEG70 [40] *((const byte[$100]) plots_per_frame#0 + (byte) frame_cnt#0) ← ++ *((const byte[$100]) plots_per_frame#0 + (byte) frame_cnt#0) -- pbuc1_derefidx_vbuz1=_inc_pbuc1_derefidx_vbuz1 ldx frame_cnt inc plots_per_frame,x - //SEG70 [41] (word) main::idx_x#1 ← (word) main::idx_x#3 + (const byte) main::r_add#0 -- vwuz1=vwuz1_plus_vbuc1 - lda #r_add + //SEG71 [41] (word) main::idx_x#1 ← (word) main::idx_x#11 + (byte) main::r_add#10 -- vwuz1=vwuz1_plus_vbuz2 + lda r_add clc adc idx_x sta idx_x bcc !+ inc idx_x+1 !: - //SEG71 [42] if((word) main::idx_x#1<(word) $200) goto main::@13 -- vwuz1_lt_vwuc1_then_la1 + //SEG72 [42] if((word) main::idx_x#1<(word) $200) goto main::@16 -- vwuz1_lt_vwuc1_then_la1 lda idx_x+1 cmp #>$200 bcc b3 @@ -9111,26 +9319,26 @@ main: { cmp #<$200 bcc b3 !: - //SEG72 [44] phi from main::@12 to main::@3 [phi:main::@12->main::@3] - //SEG73 [44] phi (word) main::idx_x#10 = (byte) 0 [phi:main::@12->main::@3#0] -- vwuz1=vbuc1 + //SEG73 [44] phi from main::@14 to main::@3 [phi:main::@14->main::@3] + //SEG74 [44] phi (word) main::idx_x#10 = (byte) 0 [phi:main::@14->main::@3#0] -- vwuz1=vbuc1 lda #0 sta idx_x sta idx_x+1 - //SEG74 [43] phi from main::@12 to main::@13 [phi:main::@12->main::@13] - //SEG75 main::@13 - //SEG76 [44] phi from main::@13 to main::@3 [phi:main::@13->main::@3] - //SEG77 [44] phi (word) main::idx_x#10 = (word) main::idx_x#1 [phi:main::@13->main::@3#0] -- register_copy - //SEG78 main::@3 + //SEG75 [43] phi from main::@14 to main::@16 [phi:main::@14->main::@16] + //SEG76 main::@16 + //SEG77 [44] phi from main::@16 to main::@3 [phi:main::@16->main::@3] + //SEG78 [44] phi (word) main::idx_x#10 = (word) main::idx_x#1 [phi:main::@16->main::@3#0] -- register_copy + //SEG79 main::@3 b3: - //SEG79 [45] (word) main::idx_y#1 ← (word) main::idx_y#3 + (const byte) main::r_add#0 -- vwuz1=vwuz1_plus_vbuc1 - lda #r_add + //SEG80 [45] (word) main::idx_y#1 ← (word) main::idx_y#3 + (byte) main::r_add#10 -- vwuz1=vwuz1_plus_vbuz2 + lda r_add clc adc idx_y sta idx_y bcc !+ inc idx_y+1 !: - //SEG80 [46] if((word) main::idx_y#1<(word) $200) goto main::@14 -- vwuz1_lt_vwuc1_then_la1 + //SEG81 [46] if((word) main::idx_y#1<(word) $200) goto main::@17 -- vwuz1_lt_vwuc1_then_la1 lda idx_y+1 cmp #>$200 bcc b4 @@ -9139,33 +9347,44 @@ main: { cmp #<$200 bcc b4 !: - //SEG81 [48] phi from main::@3 to main::@4 [phi:main::@3->main::@4] - //SEG82 [48] phi (word) main::idx_y#10 = (byte) 0 [phi:main::@3->main::@4#0] -- vwuz1=vbuc1 + //SEG82 [48] phi from main::@3 to main::@4 [phi:main::@3->main::@4] + //SEG83 [48] phi (word) main::idx_y#10 = (byte) 0 [phi:main::@3->main::@4#0] -- vwuz1=vbuc1 lda #0 sta idx_y sta idx_y+1 - //SEG83 [47] phi from main::@3 to main::@14 [phi:main::@3->main::@14] - //SEG84 main::@14 - //SEG85 [48] phi from main::@14 to main::@4 [phi:main::@14->main::@4] - //SEG86 [48] phi (word) main::idx_y#10 = (word) main::idx_y#1 [phi:main::@14->main::@4#0] -- register_copy - //SEG87 main::@4 + //SEG84 [47] phi from main::@3 to main::@17 [phi:main::@3->main::@17] + //SEG85 main::@17 + //SEG86 [48] phi from main::@17 to main::@4 [phi:main::@17->main::@4] + //SEG87 [48] phi (word) main::idx_y#10 = (word) main::idx_y#1 [phi:main::@17->main::@4#0] -- register_copy + //SEG88 main::@4 b4: - //SEG88 [49] (signed word) main::r#1 ← (signed word) main::r#10 + (const byte) main::r_add#0 -- vwsz1=vwsz1_plus_vbsc1 - lda #r_add - sta $fe - ora #$7f - bmi !+ - lda #0 - !: - sta $ff + //SEG89 [49] (signed word) main::r#1 ← (signed word) main::r#10 + (byte) main::r_add#10 -- vwsz1=vwsz1_plus_vbuz2 clc lda r - adc $fe + adc r_add sta r lda r+1 - adc $ff + adc #0 sta r+1 - //SEG89 [50] if((signed word) main::r#1>=(signed word)(number) $200*(number) $c+(number) $100) goto main::@5 -- vwsz1_ge_vwsc1_then_la1 + //SEG90 [50] if((word) main::idx_x#10!=(byte) 0) goto main::@5 -- vwuz1_neq_0_then_la1 + lda idx_x + bne b5 + lda idx_x+1 + bne b5 + //SEG91 main::@15 + //SEG92 [51] if((byte) main::r_add#10==(byte) 1) goto main::@5 -- vbuz1_eq_vbuc1_then_la1 + lda #1 + cmp r_add + beq b5 + //SEG93 main::@6 + //SEG94 [52] (byte) main::r_add#1 ← (byte) main::r_add#10 >> (byte) 1 -- vbuz1=vbuz1_ror_1 + lsr r_add + //SEG95 [53] phi from main::@4 main::@6 to main::@5 [phi:main::@4/main::@6->main::@5] + //SEG96 [53] phi (byte) main::r_add#12 = (byte) main::r_add#10 [phi:main::@4/main::@6->main::@5#0] -- register_copy + //SEG97 [53] phi from main::@15 to main::@5 [phi:main::@15->main::@5] + //SEG98 main::@5 + b5: + //SEG99 [54] if((signed word) main::r#1>=(signed word)(number) $200*(number) $c+(number) $100) goto main::@7 -- vwsz1_ge_vwsc1_then_la1 lda r cmp #<$200*$c+$100 lda r+1 @@ -9173,40 +9392,41 @@ main: { bvc !+ eor #$80 !: - bpl b5 - //SEG90 [15] phi from main::@4 to main::@1 [phi:main::@4->main::@1] - //SEG91 [15] phi (word) main::idx_y#3 = (word) main::idx_y#10 [phi:main::@4->main::@1#0] -- register_copy - //SEG92 [15] phi (signed word) main::r#10 = (signed word) main::r#1 [phi:main::@4->main::@1#1] -- register_copy - //SEG93 [15] phi (word) main::idx_x#3 = (word) main::idx_x#10 [phi:main::@4->main::@1#2] -- register_copy + bpl b7 + //SEG100 [15] phi from main::@5 to main::@1 [phi:main::@5->main::@1] + //SEG101 [15] phi (byte) main::r_add#10 = (byte) main::r_add#12 [phi:main::@5->main::@1#0] -- register_copy + //SEG102 [15] phi (word) main::idx_y#3 = (word) main::idx_y#10 [phi:main::@5->main::@1#1] -- register_copy + //SEG103 [15] phi (signed word) main::r#10 = (signed word) main::r#1 [phi:main::@5->main::@1#2] -- register_copy + //SEG104 [15] phi (word) main::idx_x#11 = (word) main::idx_x#10 [phi:main::@5->main::@1#3] -- register_copy jmp b2 - //SEG94 main::@5 - b5: - //SEG95 [51] *((const byte*) BORDERCOL#0) ← ++ *((const byte*) BORDERCOL#0) -- _deref_pbuc1=_inc__deref_pbuc1 + //SEG105 main::@7 + b7: + //SEG106 [55] *((const byte*) BORDERCOL#0) ← ++ *((const byte*) BORDERCOL#0) -- _deref_pbuc1=_inc__deref_pbuc1 inc BORDERCOL - jmp b5 + jmp b7 } -//SEG96 bitmap_plot +//SEG107 bitmap_plot // Plot a single dot in the bitmap -// bitmap_plot(signed word zeropage($32) x, byte register(A) y) +// bitmap_plot(signed word zeropage($33) x, byte register(A) y) bitmap_plot: { - .label _1 = $38 - .label plotter = $36 - .label x = $32 - .label _3 = $36 - //SEG97 [52] (word~) bitmap_plot::$3 ← *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_plot::y#0) w= *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_plot::y#0) -- vwuz1=pbuc1_derefidx_vbuaa_word_pbuc2_derefidx_vbuaa + .label _1 = $39 + .label plotter = $37 + .label x = $33 + .label _3 = $37 + //SEG108 [56] (word~) bitmap_plot::$3 ← *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_plot::y#0) w= *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_plot::y#0) -- vwuz1=pbuc1_derefidx_vbuaa_word_pbuc2_derefidx_vbuaa tay lda bitmap_plot_yhi,y sta _3+1 lda bitmap_plot_ylo,y sta _3 - //SEG98 [53] (word~) bitmap_plot::$1 ← (word)(signed word) bitmap_plot::x#0 & (word) $fff8 -- vwuz1=vwuz2_band_vwuc1 + //SEG109 [57] (word~) bitmap_plot::$1 ← (word)(signed word) bitmap_plot::x#0 & (word) $fff8 -- vwuz1=vwuz2_band_vwuc1 lda x and #<$fff8 sta _1 lda x+1 and #>$fff8 sta _1+1 - //SEG99 [54] (byte*) bitmap_plot::plotter#1 ← (byte*)(word~) bitmap_plot::$3 + (word~) bitmap_plot::$1 -- pbuz1=pbuz1_plus_vwuz2 + //SEG110 [58] (byte*) bitmap_plot::plotter#1 ← (byte*)(word~) bitmap_plot::$3 + (word~) bitmap_plot::$1 -- pbuz1=pbuz1_plus_vwuz2 lda plotter clc adc _1 @@ -9214,32 +9434,32 @@ bitmap_plot: { lda plotter+1 adc _1+1 sta plotter+1 - //SEG100 [55] (byte~) bitmap_plot::$2 ← < (word)(signed word) bitmap_plot::x#0 -- vbuaa=_lo_vwuz1 + //SEG111 [59] (byte~) bitmap_plot::$2 ← < (word)(signed word) bitmap_plot::x#0 -- vbuaa=_lo_vwuz1 lda x - //SEG101 [56] *((byte*) bitmap_plot::plotter#1) ← *((byte*) bitmap_plot::plotter#1) | *((const byte[$100]) bitmap_plot_bit#0 + (byte~) bitmap_plot::$2) -- _deref_pbuz1=_deref_pbuz1_bor_pbuc1_derefidx_vbuaa + //SEG112 [60] *((byte*) bitmap_plot::plotter#1) ← *((byte*) bitmap_plot::plotter#1) | *((const byte[$100]) bitmap_plot_bit#0 + (byte~) bitmap_plot::$2) -- _deref_pbuz1=_deref_pbuz1_bor_pbuc1_derefidx_vbuaa tay lda bitmap_plot_bit,y ldy #0 ora (plotter),y sta (plotter),y - //SEG102 bitmap_plot::@return - //SEG103 [57] return + //SEG113 bitmap_plot::@return + //SEG114 [61] return rts } -//SEG104 mul16s +//SEG115 mul16s // Multiply of two signed words to a signed double word // Fixes offsets introduced by using unsigned multiplication -// mul16s(signed word zeropage(4) a, signed word zeropage(8) b) +// mul16s(signed word zeropage(4) a, signed word zeropage(9) b) mul16s: { - .label _9 = $3a - .label _13 = $3c - .label _16 = $3a - .label _17 = $3c - .label m = $a - .label return = $a + .label _9 = $3b + .label _13 = $3d + .label _16 = $3b + .label _17 = $3d + .label m = $b + .label return = $b .label a = 4 - .label b = 8 - //SEG105 [59] (dword~) mul16u::mb#6 ← (word)(signed word) mul16s::b#3 -- vduz1=vwuz2 + .label b = 9 + //SEG116 [63] (dword~) mul16u::mb#6 ← (word)(signed word) mul16s::b#3 -- vduz1=vwuz2 lda b sta mul16u.mb lda b+1 @@ -9247,29 +9467,29 @@ mul16s: { lda #0 sta mul16u.mb+2 sta mul16u.mb+3 - //SEG106 [60] (word~) mul16u::a#8 ← (word)(signed word) mul16s::a#3 -- vwuz1=vwuz2 + //SEG117 [64] (word~) mul16u::a#8 ← (word)(signed word) mul16s::a#3 -- vwuz1=vwuz2 lda a sta mul16u.a lda a+1 sta mul16u.a+1 - //SEG107 [61] call mul16u - //SEG108 [76] phi from mul16s to mul16u [phi:mul16s->mul16u] - //SEG109 [76] phi (word) mul16u::a#6 = (word~) mul16u::a#8 [phi:mul16s->mul16u#0] -- register_copy - //SEG110 [76] phi (dword) mul16u::mb#0 = (dword~) mul16u::mb#6 [phi:mul16s->mul16u#1] -- register_copy + //SEG118 [65] call mul16u + //SEG119 [80] phi from mul16s to mul16u [phi:mul16s->mul16u] + //SEG120 [80] phi (word) mul16u::a#6 = (word~) mul16u::a#8 [phi:mul16s->mul16u#0] -- register_copy + //SEG121 [80] phi (dword) mul16u::mb#0 = (dword~) mul16u::mb#6 [phi:mul16s->mul16u#1] -- register_copy jsr mul16u - //SEG111 [62] (dword) mul16u::return#2 ← (dword) mul16u::res#2 - //SEG112 mul16s::@5 - //SEG113 [63] (dword) mul16s::m#0 ← (dword) mul16u::return#2 - //SEG114 [64] if((signed word) mul16s::a#3>=(signed byte) 0) goto mul16s::@1 -- vwsz1_ge_0_then_la1 + //SEG122 [66] (dword) mul16u::return#2 ← (dword) mul16u::res#2 + //SEG123 mul16s::@5 + //SEG124 [67] (dword) mul16s::m#0 ← (dword) mul16u::return#2 + //SEG125 [68] if((signed word) mul16s::a#3>=(signed byte) 0) goto mul16s::@1 -- vwsz1_ge_0_then_la1 lda a+1 bpl b1 - //SEG115 mul16s::@3 - //SEG116 [65] (word~) mul16s::$9 ← > (dword) mul16s::m#0 -- vwuz1=_hi_vduz2 + //SEG126 mul16s::@3 + //SEG127 [69] (word~) mul16s::$9 ← > (dword) mul16s::m#0 -- vwuz1=_hi_vduz2 lda m+2 sta _9 lda m+3 sta _9+1 - //SEG117 [66] (word~) mul16s::$16 ← (word~) mul16s::$9 - (word)(signed word) mul16s::b#3 -- vwuz1=vwuz1_minus_vwuz2 + //SEG128 [70] (word~) mul16s::$16 ← (word~) mul16s::$9 - (word)(signed word) mul16s::b#3 -- vwuz1=vwuz1_minus_vwuz2 lda _16 sec sbc b @@ -9277,25 +9497,25 @@ mul16s: { lda _16+1 sbc b+1 sta _16+1 - //SEG118 [67] (dword) mul16s::m#1 ← (dword) mul16s::m#0 hi= (word~) mul16s::$16 -- vduz1=vduz1_sethi_vwuz2 + //SEG129 [71] (dword) mul16s::m#1 ← (dword) mul16s::m#0 hi= (word~) mul16s::$16 -- vduz1=vduz1_sethi_vwuz2 lda _16 sta m+2 lda _16+1 sta m+3 - //SEG119 [68] phi from mul16s::@3 mul16s::@5 to mul16s::@1 [phi:mul16s::@3/mul16s::@5->mul16s::@1] - //SEG120 [68] phi (dword) mul16s::m#5 = (dword) mul16s::m#1 [phi:mul16s::@3/mul16s::@5->mul16s::@1#0] -- register_copy - //SEG121 mul16s::@1 + //SEG130 [72] phi from mul16s::@3 mul16s::@5 to mul16s::@1 [phi:mul16s::@3/mul16s::@5->mul16s::@1] + //SEG131 [72] phi (dword) mul16s::m#5 = (dword) mul16s::m#1 [phi:mul16s::@3/mul16s::@5->mul16s::@1#0] -- register_copy + //SEG132 mul16s::@1 b1: - //SEG122 [69] if((signed word) mul16s::b#3>=(signed byte) 0) goto mul16s::@2 -- vwsz1_ge_0_then_la1 + //SEG133 [73] if((signed word) mul16s::b#3>=(signed byte) 0) goto mul16s::@2 -- vwsz1_ge_0_then_la1 lda b+1 bpl b2 - //SEG123 mul16s::@4 - //SEG124 [70] (word~) mul16s::$13 ← > (dword) mul16s::m#5 -- vwuz1=_hi_vduz2 + //SEG134 mul16s::@4 + //SEG135 [74] (word~) mul16s::$13 ← > (dword) mul16s::m#5 -- vwuz1=_hi_vduz2 lda m+2 sta _13 lda m+3 sta _13+1 - //SEG125 [71] (word~) mul16s::$17 ← (word~) mul16s::$13 - (word)(signed word) mul16s::a#3 -- vwuz1=vwuz1_minus_vwuz2 + //SEG136 [75] (word~) mul16s::$17 ← (word~) mul16s::$13 - (word)(signed word) mul16s::a#3 -- vwuz1=vwuz1_minus_vwuz2 lda _17 sec sbc a @@ -9303,58 +9523,58 @@ mul16s: { lda _17+1 sbc a+1 sta _17+1 - //SEG126 [72] (dword) mul16s::m#2 ← (dword) mul16s::m#5 hi= (word~) mul16s::$17 -- vduz1=vduz1_sethi_vwuz2 + //SEG137 [76] (dword) mul16s::m#2 ← (dword) mul16s::m#5 hi= (word~) mul16s::$17 -- vduz1=vduz1_sethi_vwuz2 lda _17 sta m+2 lda _17+1 sta m+3 - //SEG127 [73] phi from mul16s::@1 mul16s::@4 to mul16s::@2 [phi:mul16s::@1/mul16s::@4->mul16s::@2] - //SEG128 [73] phi (dword) mul16s::m#4 = (dword) mul16s::m#5 [phi:mul16s::@1/mul16s::@4->mul16s::@2#0] -- register_copy - //SEG129 mul16s::@2 + //SEG138 [77] phi from mul16s::@1 mul16s::@4 to mul16s::@2 [phi:mul16s::@1/mul16s::@4->mul16s::@2] + //SEG139 [77] phi (dword) mul16s::m#4 = (dword) mul16s::m#5 [phi:mul16s::@1/mul16s::@4->mul16s::@2#0] -- register_copy + //SEG140 mul16s::@2 b2: - //SEG130 [74] (signed dword) mul16s::return#0 ← (signed dword)(dword) mul16s::m#4 - //SEG131 mul16s::@return - //SEG132 [75] return + //SEG141 [78] (signed dword) mul16s::return#0 ← (signed dword)(dword) mul16s::m#4 + //SEG142 mul16s::@return + //SEG143 [79] return rts } -//SEG133 mul16u +//SEG144 mul16u // Perform binary multiplication of two unsigned 16-bit words into a 32-bit unsigned double word -// mul16u(word zeropage($10) a, word zeropage($e) b) +// mul16u(word zeropage($11) a, word zeropage($f) b) mul16u: { - .label mb = $12 - .label a = $10 - .label res = $a - .label return = $a - .label b = $e - //SEG134 [77] phi from mul16u to mul16u::@1 [phi:mul16u->mul16u::@1] - //SEG135 [77] phi (dword) mul16u::mb#2 = (dword) mul16u::mb#0 [phi:mul16u->mul16u::@1#0] -- register_copy - //SEG136 [77] phi (dword) mul16u::res#2 = (byte) 0 [phi:mul16u->mul16u::@1#1] -- vduz1=vbuc1 + .label mb = $13 + .label a = $11 + .label res = $b + .label return = $b + .label b = $f + //SEG145 [81] phi from mul16u to mul16u::@1 [phi:mul16u->mul16u::@1] + //SEG146 [81] phi (dword) mul16u::mb#2 = (dword) mul16u::mb#0 [phi:mul16u->mul16u::@1#0] -- register_copy + //SEG147 [81] phi (dword) mul16u::res#2 = (byte) 0 [phi:mul16u->mul16u::@1#1] -- vduz1=vbuc1 lda #0 sta res sta res+1 sta res+2 sta res+3 - //SEG137 [77] phi (word) mul16u::a#3 = (word) mul16u::a#6 [phi:mul16u->mul16u::@1#2] -- register_copy - //SEG138 mul16u::@1 + //SEG148 [81] phi (word) mul16u::a#3 = (word) mul16u::a#6 [phi:mul16u->mul16u::@1#2] -- register_copy + //SEG149 mul16u::@1 b1: - //SEG139 [78] if((word) mul16u::a#3!=(byte) 0) goto mul16u::@2 -- vwuz1_neq_0_then_la1 + //SEG150 [82] if((word) mul16u::a#3!=(byte) 0) goto mul16u::@2 -- vwuz1_neq_0_then_la1 lda a bne b2 lda a+1 bne b2 - //SEG140 mul16u::@return - //SEG141 [79] return + //SEG151 mul16u::@return + //SEG152 [83] return rts - //SEG142 mul16u::@2 + //SEG153 mul16u::@2 b2: - //SEG143 [80] (byte~) mul16u::$1 ← (word) mul16u::a#3 & (byte) 1 -- vbuaa=vwuz1_band_vbuc1 + //SEG154 [84] (byte~) mul16u::$1 ← (word) mul16u::a#3 & (byte) 1 -- vbuaa=vwuz1_band_vbuc1 lda a and #1 - //SEG144 [81] if((byte~) mul16u::$1==(byte) 0) goto mul16u::@3 -- vbuaa_eq_0_then_la1 + //SEG155 [85] if((byte~) mul16u::$1==(byte) 0) goto mul16u::@3 -- vbuaa_eq_0_then_la1 cmp #0 beq b3 - //SEG145 mul16u::@4 - //SEG146 [82] (dword) mul16u::res#1 ← (dword) mul16u::res#2 + (dword) mul16u::mb#2 -- vduz1=vduz1_plus_vduz2 + //SEG156 mul16u::@4 + //SEG157 [86] (dword) mul16u::res#1 ← (dword) mul16u::res#2 + (dword) mul16u::mb#2 -- vduz1=vduz1_plus_vduz2 lda res clc adc mb @@ -9368,115 +9588,115 @@ mul16u: { lda res+3 adc mb+3 sta res+3 - //SEG147 [83] phi from mul16u::@2 mul16u::@4 to mul16u::@3 [phi:mul16u::@2/mul16u::@4->mul16u::@3] - //SEG148 [83] phi (dword) mul16u::res#6 = (dword) mul16u::res#2 [phi:mul16u::@2/mul16u::@4->mul16u::@3#0] -- register_copy - //SEG149 mul16u::@3 + //SEG158 [87] phi from mul16u::@2 mul16u::@4 to mul16u::@3 [phi:mul16u::@2/mul16u::@4->mul16u::@3] + //SEG159 [87] phi (dword) mul16u::res#6 = (dword) mul16u::res#2 [phi:mul16u::@2/mul16u::@4->mul16u::@3#0] -- register_copy + //SEG160 mul16u::@3 b3: - //SEG150 [84] (word) mul16u::a#0 ← (word) mul16u::a#3 >> (byte) 1 -- vwuz1=vwuz1_ror_1 + //SEG161 [88] (word) mul16u::a#0 ← (word) mul16u::a#3 >> (byte) 1 -- vwuz1=vwuz1_ror_1 lsr a+1 ror a - //SEG151 [85] (dword) mul16u::mb#1 ← (dword) mul16u::mb#2 << (byte) 1 -- vduz1=vduz1_rol_1 + //SEG162 [89] (dword) mul16u::mb#1 ← (dword) mul16u::mb#2 << (byte) 1 -- vduz1=vduz1_rol_1 asl mb rol mb+1 rol mb+2 rol mb+3 - //SEG152 [77] phi from mul16u::@3 to mul16u::@1 [phi:mul16u::@3->mul16u::@1] - //SEG153 [77] phi (dword) mul16u::mb#2 = (dword) mul16u::mb#1 [phi:mul16u::@3->mul16u::@1#0] -- register_copy - //SEG154 [77] phi (dword) mul16u::res#2 = (dword) mul16u::res#6 [phi:mul16u::@3->mul16u::@1#1] -- register_copy - //SEG155 [77] phi (word) mul16u::a#3 = (word) mul16u::a#0 [phi:mul16u::@3->mul16u::@1#2] -- register_copy + //SEG163 [81] phi from mul16u::@3 to mul16u::@1 [phi:mul16u::@3->mul16u::@1] + //SEG164 [81] phi (dword) mul16u::mb#2 = (dword) mul16u::mb#1 [phi:mul16u::@3->mul16u::@1#0] -- register_copy + //SEG165 [81] phi (dword) mul16u::res#2 = (dword) mul16u::res#6 [phi:mul16u::@3->mul16u::@1#1] -- register_copy + //SEG166 [81] phi (word) mul16u::a#3 = (word) mul16u::a#0 [phi:mul16u::@3->mul16u::@1#2] -- register_copy jmp b1 } -//SEG156 init_irq +//SEG167 init_irq // Setup the IRQ init_irq: { - //SEG157 asm { sei } + //SEG168 asm { sei } sei - //SEG158 [87] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 -- _deref_pbuc1=vbuc2 + //SEG169 [91] *((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 - //SEG159 [88] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 -- _deref_pbuc1=vbuc2 + //SEG170 [92] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 -- _deref_pbuc1=vbuc2 lda #PROCPORT_RAM_IO sta PROCPORT - //SEG160 [89] *((const byte*) CIA1_INTERRUPT#0) ← (const byte) CIA_INTERRUPT_CLEAR#0 -- _deref_pbuc1=vbuc2 + //SEG171 [93] *((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 - //SEG161 [90] *((const byte*) VIC_CONTROL#0) ← *((const byte*) VIC_CONTROL#0) | (byte) $80 -- _deref_pbuc1=_deref_pbuc1_bor_vbuc2 + //SEG172 [94] *((const byte*) VIC_CONTROL#0) ← *((const byte*) VIC_CONTROL#0) | (byte) $80 -- _deref_pbuc1=_deref_pbuc1_bor_vbuc2 // Set raster line to $100 lda #$80 ora VIC_CONTROL sta VIC_CONTROL - //SEG162 [91] *((const byte*) RASTER#0) ← (byte) 0 -- _deref_pbuc1=vbuc2 + //SEG173 [95] *((const byte*) RASTER#0) ← (byte) 0 -- _deref_pbuc1=vbuc2 lda #0 sta RASTER - //SEG163 [92] *((const byte*) IRQ_ENABLE#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 + //SEG174 [96] *((const byte*) IRQ_ENABLE#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 // Enable Raster Interrupt lda #IRQ_RASTER sta IRQ_ENABLE - //SEG164 [93] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_CLOBBER)(void()) irq() -- _deref_pptc1=pprc2 + //SEG175 [97] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_CLOBBER)(void()) irq() -- _deref_pptc1=pprc2 // Set the IRQ routine lda #irq sta HARDWARE_IRQ+1 - //SEG165 asm { cli } + //SEG176 asm { cli } cli - //SEG166 init_irq::@return - //SEG167 [95] return + //SEG177 init_irq::@return + //SEG178 [99] return rts } -//SEG168 bitmap_clear +//SEG179 bitmap_clear // Clear all graphics on the bitmap // bgcol - the background color to fill the screen with // fgcol - the foreground color to fill the screen with bitmap_clear: { .const col = WHITE*$10 - //SEG169 [97] call memset - //SEG170 [101] phi from bitmap_clear to memset [phi:bitmap_clear->memset] - //SEG171 [101] phi (byte) memset::c#3 = (const byte) bitmap_clear::col#0 [phi:bitmap_clear->memset#0] -- vbuxx=vbuc1 + //SEG180 [101] call memset + //SEG181 [105] phi from bitmap_clear to memset [phi:bitmap_clear->memset] + //SEG182 [105] phi (byte) memset::c#3 = (const byte) bitmap_clear::col#0 [phi:bitmap_clear->memset#0] -- vbuxx=vbuc1 ldx #col - //SEG172 [101] phi (word) memset::num#2 = (word) $3e8 [phi:bitmap_clear->memset#1] -- vwuz1=vwuc1 + //SEG183 [105] phi (word) memset::num#2 = (word) $3e8 [phi:bitmap_clear->memset#1] -- vwuz1=vwuc1 lda #<$3e8 sta memset.num lda #>$3e8 sta memset.num+1 - //SEG173 [101] phi (void*) memset::str#2 = (void*)(const byte*) SCREEN#0 [phi:bitmap_clear->memset#2] -- pvoz1=pvoc1 + //SEG184 [105] phi (void*) memset::str#2 = (void*)(const byte*) SCREEN#0 [phi:bitmap_clear->memset#2] -- pvoz1=pvoc1 lda #SCREEN sta memset.str+1 jsr memset - //SEG174 [98] phi from bitmap_clear to bitmap_clear::@1 [phi:bitmap_clear->bitmap_clear::@1] - //SEG175 bitmap_clear::@1 - //SEG176 [99] call memset - //SEG177 [101] phi from bitmap_clear::@1 to memset [phi:bitmap_clear::@1->memset] - //SEG178 [101] phi (byte) memset::c#3 = (byte) 0 [phi:bitmap_clear::@1->memset#0] -- vbuxx=vbuc1 + //SEG185 [102] phi from bitmap_clear to bitmap_clear::@1 [phi:bitmap_clear->bitmap_clear::@1] + //SEG186 bitmap_clear::@1 + //SEG187 [103] call memset + //SEG188 [105] phi from bitmap_clear::@1 to memset [phi:bitmap_clear::@1->memset] + //SEG189 [105] phi (byte) memset::c#3 = (byte) 0 [phi:bitmap_clear::@1->memset#0] -- vbuxx=vbuc1 ldx #0 - //SEG179 [101] phi (word) memset::num#2 = (word) $1f40 [phi:bitmap_clear::@1->memset#1] -- vwuz1=vwuc1 + //SEG190 [105] phi (word) memset::num#2 = (word) $1f40 [phi:bitmap_clear::@1->memset#1] -- vwuz1=vwuc1 lda #<$1f40 sta memset.num lda #>$1f40 sta memset.num+1 - //SEG180 [101] phi (void*) memset::str#2 = (void*)(const byte*) BITMAP#0 [phi:bitmap_clear::@1->memset#2] -- pvoz1=pvoc1 + //SEG191 [105] phi (void*) memset::str#2 = (void*)(const byte*) BITMAP#0 [phi:bitmap_clear::@1->memset#2] -- pvoz1=pvoc1 lda #BITMAP sta memset.str+1 jsr memset - //SEG181 bitmap_clear::@return - //SEG182 [100] return + //SEG192 bitmap_clear::@return + //SEG193 [104] return rts } -//SEG183 memset +//SEG194 memset // Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str. -// memset(void* zeropage($16) str, byte register(X) c, word zeropage($18) num) +// memset(void* zeropage($17) str, byte register(X) c, word zeropage($19) num) memset: { - .label end = $18 - .label dst = $16 - .label str = $16 - .label num = $18 - //SEG184 [102] (byte*) memset::end#0 ← (byte*)(void*) memset::str#2 + (word) memset::num#2 -- pbuz1=pbuz2_plus_vwuz1 + .label end = $19 + .label dst = $17 + .label str = $17 + .label num = $19 + //SEG195 [106] (byte*) memset::end#0 ← (byte*)(void*) memset::str#2 + (word) memset::num#2 -- pbuz1=pbuz2_plus_vwuz1 lda end clc adc str @@ -9484,99 +9704,99 @@ memset: { lda end+1 adc str+1 sta end+1 - //SEG185 [103] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#2 - //SEG186 [104] phi from memset memset::@1 to memset::@1 [phi:memset/memset::@1->memset::@1] - //SEG187 [104] phi (byte*) memset::dst#2 = (byte*~) memset::dst#3 [phi:memset/memset::@1->memset::@1#0] -- register_copy - //SEG188 memset::@1 + //SEG196 [107] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#2 + //SEG197 [108] phi from memset memset::@1 to memset::@1 [phi:memset/memset::@1->memset::@1] + //SEG198 [108] phi (byte*) memset::dst#2 = (byte*~) memset::dst#3 [phi:memset/memset::@1->memset::@1#0] -- register_copy + //SEG199 memset::@1 b1: - //SEG189 [105] *((byte*) memset::dst#2) ← (byte) memset::c#3 -- _deref_pbuz1=vbuxx + //SEG200 [109] *((byte*) memset::dst#2) ← (byte) memset::c#3 -- _deref_pbuz1=vbuxx txa ldy #0 sta (dst),y - //SEG190 [106] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 -- pbuz1=_inc_pbuz1 + //SEG201 [110] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 -- pbuz1=_inc_pbuz1 inc dst bne !+ inc dst+1 !: - //SEG191 [107] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@1 -- pbuz1_neq_pbuz2_then_la1 + //SEG202 [111] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@1 -- pbuz1_neq_pbuz2_then_la1 lda dst+1 cmp end+1 bne b1 lda dst cmp end bne b1 - //SEG192 memset::@return - //SEG193 [108] return + //SEG203 memset::@return + //SEG204 [112] return rts } -//SEG194 bitmap_init +//SEG205 bitmap_init // Initialize bitmap plotting tables bitmap_init: { - .label _7 = $3e - .label yoffs = $1a - //SEG195 [110] phi from bitmap_init to bitmap_init::@1 [phi:bitmap_init->bitmap_init::@1] - //SEG196 [110] phi (byte) bitmap_init::x#2 = (byte) 0 [phi:bitmap_init->bitmap_init::@1#0] -- vbuxx=vbuc1 + .label _7 = $3f + .label yoffs = $1b + //SEG206 [114] phi from bitmap_init to bitmap_init::@1 [phi:bitmap_init->bitmap_init::@1] + //SEG207 [114] phi (byte) bitmap_init::x#2 = (byte) 0 [phi:bitmap_init->bitmap_init::@1#0] -- vbuxx=vbuc1 ldx #0 - //SEG197 [110] phi (byte) bitmap_init::bits#3 = (byte) $80 [phi:bitmap_init->bitmap_init::@1#1] -- vbuaa=vbuc1 + //SEG208 [114] phi (byte) bitmap_init::bits#3 = (byte) $80 [phi:bitmap_init->bitmap_init::@1#1] -- vbuaa=vbuc1 lda #$80 - //SEG198 [110] phi from bitmap_init::@2 to bitmap_init::@1 [phi:bitmap_init::@2->bitmap_init::@1] - //SEG199 [110] phi (byte) bitmap_init::x#2 = (byte) bitmap_init::x#1 [phi:bitmap_init::@2->bitmap_init::@1#0] -- register_copy - //SEG200 [110] phi (byte) bitmap_init::bits#3 = (byte) bitmap_init::bits#4 [phi:bitmap_init::@2->bitmap_init::@1#1] -- register_copy - //SEG201 bitmap_init::@1 + //SEG209 [114] phi from bitmap_init::@2 to bitmap_init::@1 [phi:bitmap_init::@2->bitmap_init::@1] + //SEG210 [114] phi (byte) bitmap_init::x#2 = (byte) bitmap_init::x#1 [phi:bitmap_init::@2->bitmap_init::@1#0] -- register_copy + //SEG211 [114] phi (byte) bitmap_init::bits#3 = (byte) bitmap_init::bits#4 [phi:bitmap_init::@2->bitmap_init::@1#1] -- register_copy + //SEG212 bitmap_init::@1 b1: - //SEG202 [111] *((const byte[$100]) bitmap_plot_bit#0 + (byte) bitmap_init::x#2) ← (byte) bitmap_init::bits#3 -- pbuc1_derefidx_vbuxx=vbuaa + //SEG213 [115] *((const byte[$100]) bitmap_plot_bit#0 + (byte) bitmap_init::x#2) ← (byte) bitmap_init::bits#3 -- pbuc1_derefidx_vbuxx=vbuaa sta bitmap_plot_bit,x - //SEG203 [112] (byte) bitmap_init::bits#1 ← (byte) bitmap_init::bits#3 >> (byte) 1 -- vbuaa=vbuaa_ror_1 + //SEG214 [116] (byte) bitmap_init::bits#1 ← (byte) bitmap_init::bits#3 >> (byte) 1 -- vbuaa=vbuaa_ror_1 lsr - //SEG204 [113] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@6 -- vbuaa_neq_0_then_la1 + //SEG215 [117] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@6 -- vbuaa_neq_0_then_la1 cmp #0 bne b2 - //SEG205 [115] phi from bitmap_init::@1 to bitmap_init::@2 [phi:bitmap_init::@1->bitmap_init::@2] - //SEG206 [115] phi (byte) bitmap_init::bits#4 = (byte) $80 [phi:bitmap_init::@1->bitmap_init::@2#0] -- vbuaa=vbuc1 + //SEG216 [119] phi from bitmap_init::@1 to bitmap_init::@2 [phi:bitmap_init::@1->bitmap_init::@2] + //SEG217 [119] phi (byte) bitmap_init::bits#4 = (byte) $80 [phi:bitmap_init::@1->bitmap_init::@2#0] -- vbuaa=vbuc1 lda #$80 - //SEG207 [114] phi from bitmap_init::@1 to bitmap_init::@6 [phi:bitmap_init::@1->bitmap_init::@6] - //SEG208 bitmap_init::@6 - //SEG209 [115] phi from bitmap_init::@6 to bitmap_init::@2 [phi:bitmap_init::@6->bitmap_init::@2] - //SEG210 [115] phi (byte) bitmap_init::bits#4 = (byte) bitmap_init::bits#1 [phi:bitmap_init::@6->bitmap_init::@2#0] -- register_copy - //SEG211 bitmap_init::@2 + //SEG218 [118] phi from bitmap_init::@1 to bitmap_init::@6 [phi:bitmap_init::@1->bitmap_init::@6] + //SEG219 bitmap_init::@6 + //SEG220 [119] phi from bitmap_init::@6 to bitmap_init::@2 [phi:bitmap_init::@6->bitmap_init::@2] + //SEG221 [119] phi (byte) bitmap_init::bits#4 = (byte) bitmap_init::bits#1 [phi:bitmap_init::@6->bitmap_init::@2#0] -- register_copy + //SEG222 bitmap_init::@2 b2: - //SEG212 [116] (byte) bitmap_init::x#1 ← ++ (byte) bitmap_init::x#2 -- vbuxx=_inc_vbuxx + //SEG223 [120] (byte) bitmap_init::x#1 ← ++ (byte) bitmap_init::x#2 -- vbuxx=_inc_vbuxx inx - //SEG213 [117] if((byte) bitmap_init::x#1!=(byte) 0) goto bitmap_init::@1 -- vbuxx_neq_0_then_la1 + //SEG224 [121] if((byte) bitmap_init::x#1!=(byte) 0) goto bitmap_init::@1 -- vbuxx_neq_0_then_la1 cpx #0 bne b1 - //SEG214 [118] phi from bitmap_init::@2 to bitmap_init::@3 [phi:bitmap_init::@2->bitmap_init::@3] - //SEG215 [118] phi (byte*) bitmap_init::yoffs#2 = (const byte*) BITMAP#0 [phi:bitmap_init::@2->bitmap_init::@3#0] -- pbuz1=pbuc1 + //SEG225 [122] phi from bitmap_init::@2 to bitmap_init::@3 [phi:bitmap_init::@2->bitmap_init::@3] + //SEG226 [122] phi (byte*) bitmap_init::yoffs#2 = (const byte*) BITMAP#0 [phi:bitmap_init::@2->bitmap_init::@3#0] -- pbuz1=pbuc1 lda #BITMAP sta yoffs+1 - //SEG216 [118] phi (byte) bitmap_init::y#2 = (byte) 0 [phi:bitmap_init::@2->bitmap_init::@3#1] -- vbuxx=vbuc1 + //SEG227 [122] phi (byte) bitmap_init::y#2 = (byte) 0 [phi:bitmap_init::@2->bitmap_init::@3#1] -- vbuxx=vbuc1 ldx #0 - //SEG217 [118] phi from bitmap_init::@4 to bitmap_init::@3 [phi:bitmap_init::@4->bitmap_init::@3] - //SEG218 [118] phi (byte*) bitmap_init::yoffs#2 = (byte*) bitmap_init::yoffs#4 [phi:bitmap_init::@4->bitmap_init::@3#0] -- register_copy - //SEG219 [118] phi (byte) bitmap_init::y#2 = (byte) bitmap_init::y#1 [phi:bitmap_init::@4->bitmap_init::@3#1] -- register_copy - //SEG220 bitmap_init::@3 + //SEG228 [122] phi from bitmap_init::@4 to bitmap_init::@3 [phi:bitmap_init::@4->bitmap_init::@3] + //SEG229 [122] phi (byte*) bitmap_init::yoffs#2 = (byte*) bitmap_init::yoffs#4 [phi:bitmap_init::@4->bitmap_init::@3#0] -- register_copy + //SEG230 [122] phi (byte) bitmap_init::y#2 = (byte) bitmap_init::y#1 [phi:bitmap_init::@4->bitmap_init::@3#1] -- register_copy + //SEG231 bitmap_init::@3 b3: - //SEG221 [119] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 -- vbuz1=vbuxx_band_vbuc1 + //SEG232 [123] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 -- vbuz1=vbuxx_band_vbuc1 lda #7 sax _7 - //SEG222 [120] (byte~) bitmap_init::$4 ← < (byte*) bitmap_init::yoffs#2 -- vbuaa=_lo_pbuz1 + //SEG233 [124] (byte~) bitmap_init::$4 ← < (byte*) bitmap_init::yoffs#2 -- vbuaa=_lo_pbuz1 lda yoffs - //SEG223 [121] (byte~) bitmap_init::$5 ← (byte~) bitmap_init::$7 | (byte~) bitmap_init::$4 -- vbuaa=vbuz1_bor_vbuaa + //SEG234 [125] (byte~) bitmap_init::$5 ← (byte~) bitmap_init::$7 | (byte~) bitmap_init::$4 -- vbuaa=vbuz1_bor_vbuaa ora _7 - //SEG224 [122] *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$5 -- pbuc1_derefidx_vbuxx=vbuaa + //SEG235 [126] *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$5 -- pbuc1_derefidx_vbuxx=vbuaa sta bitmap_plot_ylo,x - //SEG225 [123] (byte~) bitmap_init::$6 ← > (byte*) bitmap_init::yoffs#2 -- vbuaa=_hi_pbuz1 + //SEG236 [127] (byte~) bitmap_init::$6 ← > (byte*) bitmap_init::yoffs#2 -- vbuaa=_hi_pbuz1 lda yoffs+1 - //SEG226 [124] *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$6 -- pbuc1_derefidx_vbuxx=vbuaa + //SEG237 [128] *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$6 -- pbuc1_derefidx_vbuxx=vbuaa sta bitmap_plot_yhi,x - //SEG227 [125] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@4 -- vbuz1_neq_vbuc1_then_la1 + //SEG238 [129] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@4 -- vbuz1_neq_vbuc1_then_la1 lda #7 cmp _7 bne b4 - //SEG228 bitmap_init::@5 - //SEG229 [126] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 -- pbuz1=pbuz1_plus_vwuc1 + //SEG239 bitmap_init::@5 + //SEG240 [130] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 -- pbuz1=pbuz1_plus_vwuc1 clc lda yoffs adc #<$28*8 @@ -9584,65 +9804,65 @@ bitmap_init: { lda yoffs+1 adc #>$28*8 sta yoffs+1 - //SEG230 [127] phi from bitmap_init::@3 bitmap_init::@5 to bitmap_init::@4 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4] - //SEG231 [127] phi (byte*) bitmap_init::yoffs#4 = (byte*) bitmap_init::yoffs#2 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4#0] -- register_copy - //SEG232 bitmap_init::@4 + //SEG241 [131] phi from bitmap_init::@3 bitmap_init::@5 to bitmap_init::@4 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4] + //SEG242 [131] phi (byte*) bitmap_init::yoffs#4 = (byte*) bitmap_init::yoffs#2 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4#0] -- register_copy + //SEG243 bitmap_init::@4 b4: - //SEG233 [128] (byte) bitmap_init::y#1 ← ++ (byte) bitmap_init::y#2 -- vbuxx=_inc_vbuxx + //SEG244 [132] (byte) bitmap_init::y#1 ← ++ (byte) bitmap_init::y#2 -- vbuxx=_inc_vbuxx inx - //SEG234 [129] if((byte) bitmap_init::y#1!=(byte) 0) goto bitmap_init::@3 -- vbuxx_neq_0_then_la1 + //SEG245 [133] if((byte) bitmap_init::y#1!=(byte) 0) goto bitmap_init::@3 -- vbuxx_neq_0_then_la1 cpx #0 bne b3 - //SEG235 bitmap_init::@return - //SEG236 [130] return + //SEG246 bitmap_init::@return + //SEG247 [134] return rts } -//SEG237 sin16s_gen2 +//SEG248 sin16s_gen2 // Generate signed word sinus table - with values in the range min-max. // sintab - the table to generate into // wavelength - the number of sinus points in a total sinus wavelength (the size of the table) -// sin16s_gen2(signed word* zeropage($20) sintab) +// sin16s_gen2(signed word* zeropage($21) sintab) sin16s_gen2: { .label wavelength = $200 .const min = -$1001 .const max = $1001 .const ampl = max-min - .label _5 = $a - .label _6 = $43 - .label step = $3f - .label sintab = $20 - .label x = $1c - .label i = $22 - //SEG238 [132] call div32u16u - //SEG239 [199] phi from sin16s_gen2 to div32u16u [phi:sin16s_gen2->div32u16u] + .label _5 = $b + .label _6 = $44 + .label step = $40 + .label sintab = $21 + .label x = $1d + .label i = $23 + //SEG249 [136] call div32u16u + //SEG250 [203] phi from sin16s_gen2 to div32u16u [phi:sin16s_gen2->div32u16u] jsr div32u16u - //SEG240 [133] (dword) div32u16u::return#2 ← (dword) div32u16u::return#0 - //SEG241 sin16s_gen2::@2 - //SEG242 [134] (dword) sin16s_gen2::step#0 ← (dword) div32u16u::return#2 - //SEG243 [135] phi from sin16s_gen2::@2 to sin16s_gen2::@1 [phi:sin16s_gen2::@2->sin16s_gen2::@1] - //SEG244 [135] phi (word) sin16s_gen2::i#2 = (byte) 0 [phi:sin16s_gen2::@2->sin16s_gen2::@1#0] -- vwuz1=vbuc1 + //SEG251 [137] (dword) div32u16u::return#2 ← (dword) div32u16u::return#0 + //SEG252 sin16s_gen2::@2 + //SEG253 [138] (dword) sin16s_gen2::step#0 ← (dword) div32u16u::return#2 + //SEG254 [139] phi from sin16s_gen2::@2 to sin16s_gen2::@1 [phi:sin16s_gen2::@2->sin16s_gen2::@1] + //SEG255 [139] phi (word) sin16s_gen2::i#2 = (byte) 0 [phi:sin16s_gen2::@2->sin16s_gen2::@1#0] -- vwuz1=vbuc1 lda #0 sta i sta i+1 - //SEG245 [135] phi (signed word*) sin16s_gen2::sintab#2 = (const signed word[$200]) SINUS#0 [phi:sin16s_gen2::@2->sin16s_gen2::@1#1] -- pwsz1=pwsc1 + //SEG256 [139] phi (signed word*) sin16s_gen2::sintab#2 = (const signed word[$200]) SINUS#0 [phi:sin16s_gen2::@2->sin16s_gen2::@1#1] -- pwsz1=pwsc1 lda #SINUS sta sintab+1 - //SEG246 [135] phi (dword) sin16s_gen2::x#2 = (byte) 0 [phi:sin16s_gen2::@2->sin16s_gen2::@1#2] -- vduz1=vbuc1 + //SEG257 [139] phi (dword) sin16s_gen2::x#2 = (byte) 0 [phi:sin16s_gen2::@2->sin16s_gen2::@1#2] -- vduz1=vbuc1 lda #0 sta x sta x+1 sta x+2 sta x+3 // u[4.28] - //SEG247 [135] phi from sin16s_gen2::@4 to sin16s_gen2::@1 [phi:sin16s_gen2::@4->sin16s_gen2::@1] - //SEG248 [135] phi (word) sin16s_gen2::i#2 = (word) sin16s_gen2::i#1 [phi:sin16s_gen2::@4->sin16s_gen2::@1#0] -- register_copy - //SEG249 [135] phi (signed word*) sin16s_gen2::sintab#2 = (signed word*) sin16s_gen2::sintab#0 [phi:sin16s_gen2::@4->sin16s_gen2::@1#1] -- register_copy - //SEG250 [135] phi (dword) sin16s_gen2::x#2 = (dword) sin16s_gen2::x#1 [phi:sin16s_gen2::@4->sin16s_gen2::@1#2] -- register_copy - //SEG251 sin16s_gen2::@1 + //SEG258 [139] phi from sin16s_gen2::@4 to sin16s_gen2::@1 [phi:sin16s_gen2::@4->sin16s_gen2::@1] + //SEG259 [139] phi (word) sin16s_gen2::i#2 = (word) sin16s_gen2::i#1 [phi:sin16s_gen2::@4->sin16s_gen2::@1#0] -- register_copy + //SEG260 [139] phi (signed word*) sin16s_gen2::sintab#2 = (signed word*) sin16s_gen2::sintab#0 [phi:sin16s_gen2::@4->sin16s_gen2::@1#1] -- register_copy + //SEG261 [139] phi (dword) sin16s_gen2::x#2 = (dword) sin16s_gen2::x#1 [phi:sin16s_gen2::@4->sin16s_gen2::@1#2] -- register_copy + //SEG262 sin16s_gen2::@1 b1: - //SEG252 [136] (dword) sin16s::x#0 ← (dword) sin16s_gen2::x#2 -- vduz1=vduz2 + //SEG263 [140] (dword) sin16s::x#0 ← (dword) sin16s_gen2::x#2 -- vduz1=vduz2 lda x sta sin16s.x lda x+1 @@ -9651,36 +9871,36 @@ sin16s_gen2: { sta sin16s.x+2 lda x+3 sta sin16s.x+3 - //SEG253 [137] call sin16s + //SEG264 [141] call sin16s jsr sin16s - //SEG254 [138] (signed word) sin16s::return#0 ← (signed word) sin16s::return#1 - //SEG255 sin16s_gen2::@3 - //SEG256 [139] (signed word) mul16s::a#0 ← (signed word) sin16s::return#0 - //SEG257 [140] call mul16s - //SEG258 [58] phi from sin16s_gen2::@3 to mul16s [phi:sin16s_gen2::@3->mul16s] - //SEG259 [58] phi (signed word) mul16s::b#3 = (const signed word) sin16s_gen2::ampl#0 [phi:sin16s_gen2::@3->mul16s#0] -- vwsz1=vwsc1 + //SEG265 [142] (signed word) sin16s::return#0 ← (signed word) sin16s::return#1 + //SEG266 sin16s_gen2::@3 + //SEG267 [143] (signed word) mul16s::a#0 ← (signed word) sin16s::return#0 + //SEG268 [144] call mul16s + //SEG269 [62] phi from sin16s_gen2::@3 to mul16s [phi:sin16s_gen2::@3->mul16s] + //SEG270 [62] phi (signed word) mul16s::b#3 = (const signed word) sin16s_gen2::ampl#0 [phi:sin16s_gen2::@3->mul16s#0] -- vwsz1=vwsc1 lda #ampl sta mul16s.b+1 - //SEG260 [58] phi (signed word) mul16s::a#3 = (signed word) mul16s::a#0 [phi:sin16s_gen2::@3->mul16s#1] -- register_copy + //SEG271 [62] phi (signed word) mul16s::a#3 = (signed word) mul16s::a#0 [phi:sin16s_gen2::@3->mul16s#1] -- register_copy jsr mul16s - //SEG261 [141] (signed dword) mul16s::return#2 ← (signed dword) mul16s::return#0 - //SEG262 sin16s_gen2::@4 - //SEG263 [142] (signed dword~) sin16s_gen2::$5 ← (signed dword) mul16s::return#2 - //SEG264 [143] (word~) sin16s_gen2::$6 ← > (signed dword~) sin16s_gen2::$5 -- vwuz1=_hi_vdsz2 + //SEG272 [145] (signed dword) mul16s::return#2 ← (signed dword) mul16s::return#0 + //SEG273 sin16s_gen2::@4 + //SEG274 [146] (signed dword~) sin16s_gen2::$5 ← (signed dword) mul16s::return#2 + //SEG275 [147] (word~) sin16s_gen2::$6 ← > (signed dword~) sin16s_gen2::$5 -- vwuz1=_hi_vdsz2 lda _5+2 sta _6 lda _5+3 sta _6+1 - //SEG265 [144] *((signed word*) sin16s_gen2::sintab#2) ← (signed word)(word~) sin16s_gen2::$6 -- _deref_pwsz1=vwsz2 + //SEG276 [148] *((signed word*) sin16s_gen2::sintab#2) ← (signed word)(word~) sin16s_gen2::$6 -- _deref_pwsz1=vwsz2 ldy #0 lda _6 sta (sintab),y iny lda _6+1 sta (sintab),y - //SEG266 [145] (signed word*) sin16s_gen2::sintab#0 ← (signed word*) sin16s_gen2::sintab#2 + (const byte) SIZEOF_SIGNED_WORD -- pwsz1=pwsz1_plus_vbuc1 + //SEG277 [149] (signed word*) sin16s_gen2::sintab#0 ← (signed word*) sin16s_gen2::sintab#2 + (const byte) SIZEOF_SIGNED_WORD -- pwsz1=pwsz1_plus_vbuc1 lda #SIZEOF_SIGNED_WORD clc adc sintab @@ -9688,7 +9908,7 @@ sin16s_gen2: { bcc !+ inc sintab+1 !: - //SEG267 [146] (dword) sin16s_gen2::x#1 ← (dword) sin16s_gen2::x#2 + (dword) sin16s_gen2::step#0 -- vduz1=vduz1_plus_vduz2 + //SEG278 [150] (dword) sin16s_gen2::x#1 ← (dword) sin16s_gen2::x#2 + (dword) sin16s_gen2::step#0 -- vduz1=vduz1_plus_vduz2 lda x clc adc step @@ -9702,12 +9922,12 @@ sin16s_gen2: { lda x+3 adc step+3 sta x+3 - //SEG268 [147] (word) sin16s_gen2::i#1 ← ++ (word) sin16s_gen2::i#2 -- vwuz1=_inc_vwuz1 + //SEG279 [151] (word) sin16s_gen2::i#1 ← ++ (word) sin16s_gen2::i#2 -- vwuz1=_inc_vwuz1 inc i bne !+ inc i+1 !: - //SEG269 [148] if((word) sin16s_gen2::i#1<(const word) sin16s_gen2::wavelength#0) goto sin16s_gen2::@1 -- vwuz1_lt_vwuc1_then_la1 + //SEG280 [152] if((word) sin16s_gen2::i#1<(const word) sin16s_gen2::wavelength#0) goto sin16s_gen2::@1 -- vwuz1_lt_vwuc1_then_la1 lda i+1 cmp #>wavelength bcc b1 @@ -9716,30 +9936,30 @@ sin16s_gen2: { cmp #PI_u4f28>>$10 bcc b4 @@ -9756,8 +9976,8 @@ sin16s: { cmp #PI_u4f28>>$10 sta x+3 - //SEG276 [152] phi from sin16s::@4 to sin16s::@1 [phi:sin16s::@4->sin16s::@1] - //SEG277 [152] phi (byte) sin16s::isUpper#2 = (byte) 1 [phi:sin16s::@4->sin16s::@1#0] -- vbuz1=vbuc1 + //SEG287 [156] phi from sin16s::@4 to sin16s::@1 [phi:sin16s::@4->sin16s::@1] + //SEG288 [156] phi (byte) sin16s::isUpper#2 = (byte) 1 [phi:sin16s::@4->sin16s::@1#0] -- vbuz1=vbuc1 lda #1 sta isUpper - //SEG278 [152] phi (dword) sin16s::x#4 = (dword) sin16s::x#1 [phi:sin16s::@4->sin16s::@1#1] -- register_copy + //SEG289 [156] phi (dword) sin16s::x#4 = (dword) sin16s::x#1 [phi:sin16s::@4->sin16s::@1#1] -- register_copy jmp b1 - //SEG279 [152] phi from sin16s to sin16s::@1 [phi:sin16s->sin16s::@1] + //SEG290 [156] phi from sin16s to sin16s::@1 [phi:sin16s->sin16s::@1] b4: - //SEG280 [152] phi (byte) sin16s::isUpper#2 = (byte) 0 [phi:sin16s->sin16s::@1#0] -- vbuz1=vbuc1 + //SEG291 [156] phi (byte) sin16s::isUpper#2 = (byte) 0 [phi:sin16s->sin16s::@1#0] -- vbuz1=vbuc1 lda #0 sta isUpper - //SEG281 [152] phi (dword) sin16s::x#4 = (dword) sin16s::x#0 [phi:sin16s->sin16s::@1#1] -- register_copy - //SEG282 sin16s::@1 + //SEG292 [156] phi (dword) sin16s::x#4 = (dword) sin16s::x#0 [phi:sin16s->sin16s::@1#1] -- register_copy + //SEG293 sin16s::@1 b1: - //SEG283 [153] if((dword) sin16s::x#4<(const dword) PI_HALF_u4f28#0) goto sin16s::@2 -- vduz1_lt_vduc1_then_la1 + //SEG294 [157] if((dword) sin16s::x#4<(const dword) PI_HALF_u4f28#0) goto sin16s::@2 -- vduz1_lt_vduc1_then_la1 lda x+3 cmp #>PI_HALF_u4f28>>$10 bcc b2 @@ -9802,8 +10022,8 @@ sin16s: { cmp #PI_u4f28>>$10 sbc x+3 sta x+3 - //SEG286 [155] phi from sin16s::@1 sin16s::@5 to sin16s::@2 [phi:sin16s::@1/sin16s::@5->sin16s::@2] - //SEG287 [155] phi (dword) sin16s::x#6 = (dword) sin16s::x#4 [phi:sin16s::@1/sin16s::@5->sin16s::@2#0] -- register_copy - //SEG288 sin16s::@2 + //SEG297 [159] phi from sin16s::@1 sin16s::@5 to sin16s::@2 [phi:sin16s::@1/sin16s::@5->sin16s::@2] + //SEG298 [159] phi (dword) sin16s::x#6 = (dword) sin16s::x#4 [phi:sin16s::@1/sin16s::@5->sin16s::@2#0] -- register_copy + //SEG299 sin16s::@2 b2: - //SEG289 [156] (dword~) sin16s::$4 ← (dword) sin16s::x#6 << (byte) 3 -- vduz1=vduz1_rol_3 + //SEG300 [160] (dword~) sin16s::$4 ← (dword) sin16s::x#6 << (byte) 3 -- vduz1=vduz1_rol_3 ldy #3 !: asl _4 @@ -9830,71 +10050,71 @@ sin16s: { rol _4+3 dey bne !- - //SEG290 [157] (word) sin16s::x1#0 ← > (dword~) sin16s::$4 -- vwuz1=_hi_vduz2 + //SEG301 [161] (word) sin16s::x1#0 ← > (dword~) sin16s::$4 -- vwuz1=_hi_vduz2 lda _4+2 sta x1 lda _4+3 sta x1+1 - //SEG291 [158] (word) mulu16_sel::v1#0 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 + //SEG302 [162] (word) mulu16_sel::v1#0 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 lda x1 sta mulu16_sel.v1 lda x1+1 sta mulu16_sel.v1+1 - //SEG292 [159] (word) mulu16_sel::v2#0 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 + //SEG303 [163] (word) mulu16_sel::v2#0 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 lda x1 sta mulu16_sel.v2 lda x1+1 sta mulu16_sel.v2+1 - //SEG293 [160] call mulu16_sel - //SEG294 [190] phi from sin16s::@2 to mulu16_sel [phi:sin16s::@2->mulu16_sel] - //SEG295 [190] phi (byte) mulu16_sel::select#5 = (byte) 0 [phi:sin16s::@2->mulu16_sel#0] -- vbuxx=vbuc1 + //SEG304 [164] call mulu16_sel + //SEG305 [194] phi from sin16s::@2 to mulu16_sel [phi:sin16s::@2->mulu16_sel] + //SEG306 [194] phi (byte) mulu16_sel::select#5 = (byte) 0 [phi:sin16s::@2->mulu16_sel#0] -- vbuxx=vbuc1 ldx #0 - //SEG296 [190] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#0 [phi:sin16s::@2->mulu16_sel#1] -- register_copy - //SEG297 [190] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#0 [phi:sin16s::@2->mulu16_sel#2] -- register_copy + //SEG307 [194] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#0 [phi:sin16s::@2->mulu16_sel#1] -- register_copy + //SEG308 [194] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#0 [phi:sin16s::@2->mulu16_sel#2] -- register_copy jsr mulu16_sel - //SEG298 [161] (word) mulu16_sel::return#0 ← (word) mulu16_sel::return#12 - //SEG299 sin16s::@7 - //SEG300 [162] (word) sin16s::x2#0 ← (word) mulu16_sel::return#0 -- vwuz1=vwuz2 + //SEG309 [165] (word) mulu16_sel::return#0 ← (word) mulu16_sel::return#12 + //SEG310 sin16s::@7 + //SEG311 [166] (word) sin16s::x2#0 ← (word) mulu16_sel::return#0 -- vwuz1=vwuz2 lda mulu16_sel.return sta x2 lda mulu16_sel.return+1 sta x2+1 - //SEG301 [163] (word) mulu16_sel::v1#1 ← (word) sin16s::x2#0 - //SEG302 [164] (word) mulu16_sel::v2#1 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 + //SEG312 [167] (word) mulu16_sel::v1#1 ← (word) sin16s::x2#0 + //SEG313 [168] (word) mulu16_sel::v2#1 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 lda x1 sta mulu16_sel.v2 lda x1+1 sta mulu16_sel.v2+1 - //SEG303 [165] call mulu16_sel - //SEG304 [190] phi from sin16s::@7 to mulu16_sel [phi:sin16s::@7->mulu16_sel] - //SEG305 [190] phi (byte) mulu16_sel::select#5 = (byte) 1 [phi:sin16s::@7->mulu16_sel#0] -- vbuxx=vbuc1 + //SEG314 [169] call mulu16_sel + //SEG315 [194] phi from sin16s::@7 to mulu16_sel [phi:sin16s::@7->mulu16_sel] + //SEG316 [194] phi (byte) mulu16_sel::select#5 = (byte) 1 [phi:sin16s::@7->mulu16_sel#0] -- vbuxx=vbuc1 ldx #1 - //SEG306 [190] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#1 [phi:sin16s::@7->mulu16_sel#1] -- register_copy - //SEG307 [190] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#1 [phi:sin16s::@7->mulu16_sel#2] -- register_copy + //SEG317 [194] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#1 [phi:sin16s::@7->mulu16_sel#1] -- register_copy + //SEG318 [194] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#1 [phi:sin16s::@7->mulu16_sel#2] -- register_copy jsr mulu16_sel - //SEG308 [166] (word) mulu16_sel::return#1 ← (word) mulu16_sel::return#12 -- vwuz1=vwuz2 + //SEG319 [170] (word) mulu16_sel::return#1 ← (word) mulu16_sel::return#12 -- vwuz1=vwuz2 lda mulu16_sel.return sta mulu16_sel.return_1 lda mulu16_sel.return+1 sta mulu16_sel.return_1+1 - //SEG309 sin16s::@8 - //SEG310 [167] (word) sin16s::x3#0 ← (word) mulu16_sel::return#1 - //SEG311 [168] (word) mulu16_sel::v1#2 ← (word) sin16s::x3#0 - //SEG312 [169] call mulu16_sel - //SEG313 [190] phi from sin16s::@8 to mulu16_sel [phi:sin16s::@8->mulu16_sel] - //SEG314 [190] phi (byte) mulu16_sel::select#5 = (byte) 1 [phi:sin16s::@8->mulu16_sel#0] -- vbuxx=vbuc1 + //SEG320 sin16s::@8 + //SEG321 [171] (word) sin16s::x3#0 ← (word) mulu16_sel::return#1 + //SEG322 [172] (word) mulu16_sel::v1#2 ← (word) sin16s::x3#0 + //SEG323 [173] call mulu16_sel + //SEG324 [194] phi from sin16s::@8 to mulu16_sel [phi:sin16s::@8->mulu16_sel] + //SEG325 [194] phi (byte) mulu16_sel::select#5 = (byte) 1 [phi:sin16s::@8->mulu16_sel#0] -- vbuxx=vbuc1 ldx #1 - //SEG315 [190] phi (word) mulu16_sel::v2#5 = (word)(number) $10000/(number) 6 [phi:sin16s::@8->mulu16_sel#1] -- vwuz1=vwuc1 + //SEG326 [194] phi (word) mulu16_sel::v2#5 = (word)(number) $10000/(number) 6 [phi:sin16s::@8->mulu16_sel#1] -- vwuz1=vwuc1 lda #<$10000/6 sta mulu16_sel.v2 lda #>$10000/6 sta mulu16_sel.v2+1 - //SEG316 [190] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#2 [phi:sin16s::@8->mulu16_sel#2] -- register_copy + //SEG327 [194] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#2 [phi:sin16s::@8->mulu16_sel#2] -- register_copy jsr mulu16_sel - //SEG317 [170] (word) mulu16_sel::return#2 ← (word) mulu16_sel::return#12 - //SEG318 sin16s::@9 - //SEG319 [171] (word) sin16s::x3_6#0 ← (word) mulu16_sel::return#2 - //SEG320 [172] (word) sin16s::usinx#0 ← (word) sin16s::x1#0 - (word) sin16s::x3_6#0 -- vwuz1=vwuz2_minus_vwuz3 + //SEG328 [174] (word) mulu16_sel::return#2 ← (word) mulu16_sel::return#12 + //SEG329 sin16s::@9 + //SEG330 [175] (word) sin16s::x3_6#0 ← (word) mulu16_sel::return#2 + //SEG331 [176] (word) sin16s::usinx#0 ← (word) sin16s::x1#0 - (word) sin16s::x3_6#0 -- vwuz1=vwuz2_minus_vwuz3 lda x1 sec sbc x3_6 @@ -9902,43 +10122,43 @@ sin16s: { lda x1+1 sbc x3_6+1 sta usinx+1 - //SEG321 [173] (word) mulu16_sel::v1#3 ← (word) sin16s::x3#0 - //SEG322 [174] (word) mulu16_sel::v2#3 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 + //SEG332 [177] (word) mulu16_sel::v1#3 ← (word) sin16s::x3#0 + //SEG333 [178] (word) mulu16_sel::v2#3 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 lda x1 sta mulu16_sel.v2 lda x1+1 sta mulu16_sel.v2+1 - //SEG323 [175] call mulu16_sel - //SEG324 [190] phi from sin16s::@9 to mulu16_sel [phi:sin16s::@9->mulu16_sel] - //SEG325 [190] phi (byte) mulu16_sel::select#5 = (byte) 0 [phi:sin16s::@9->mulu16_sel#0] -- vbuxx=vbuc1 + //SEG334 [179] call mulu16_sel + //SEG335 [194] phi from sin16s::@9 to mulu16_sel [phi:sin16s::@9->mulu16_sel] + //SEG336 [194] phi (byte) mulu16_sel::select#5 = (byte) 0 [phi:sin16s::@9->mulu16_sel#0] -- vbuxx=vbuc1 ldx #0 - //SEG326 [190] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#3 [phi:sin16s::@9->mulu16_sel#1] -- register_copy - //SEG327 [190] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#3 [phi:sin16s::@9->mulu16_sel#2] -- register_copy + //SEG337 [194] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#3 [phi:sin16s::@9->mulu16_sel#1] -- register_copy + //SEG338 [194] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#3 [phi:sin16s::@9->mulu16_sel#2] -- register_copy jsr mulu16_sel - //SEG328 [176] (word) mulu16_sel::return#10 ← (word) mulu16_sel::return#12 -- vwuz1=vwuz2 + //SEG339 [180] (word) mulu16_sel::return#10 ← (word) mulu16_sel::return#12 -- vwuz1=vwuz2 lda mulu16_sel.return sta mulu16_sel.return_10 lda mulu16_sel.return+1 sta mulu16_sel.return_10+1 - //SEG329 sin16s::@10 - //SEG330 [177] (word) sin16s::x4#0 ← (word) mulu16_sel::return#10 - //SEG331 [178] (word) mulu16_sel::v1#4 ← (word) sin16s::x4#0 - //SEG332 [179] (word) mulu16_sel::v2#4 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 + //SEG340 sin16s::@10 + //SEG341 [181] (word) sin16s::x4#0 ← (word) mulu16_sel::return#10 + //SEG342 [182] (word) mulu16_sel::v1#4 ← (word) sin16s::x4#0 + //SEG343 [183] (word) mulu16_sel::v2#4 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 lda x1 sta mulu16_sel.v2 lda x1+1 sta mulu16_sel.v2+1 - //SEG333 [180] call mulu16_sel - //SEG334 [190] phi from sin16s::@10 to mulu16_sel [phi:sin16s::@10->mulu16_sel] - //SEG335 [190] phi (byte) mulu16_sel::select#5 = (byte) 0 [phi:sin16s::@10->mulu16_sel#0] -- vbuxx=vbuc1 + //SEG344 [184] call mulu16_sel + //SEG345 [194] phi from sin16s::@10 to mulu16_sel [phi:sin16s::@10->mulu16_sel] + //SEG346 [194] phi (byte) mulu16_sel::select#5 = (byte) 0 [phi:sin16s::@10->mulu16_sel#0] -- vbuxx=vbuc1 ldx #0 - //SEG336 [190] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#4 [phi:sin16s::@10->mulu16_sel#1] -- register_copy - //SEG337 [190] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#4 [phi:sin16s::@10->mulu16_sel#2] -- register_copy + //SEG347 [194] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#4 [phi:sin16s::@10->mulu16_sel#1] -- register_copy + //SEG348 [194] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#4 [phi:sin16s::@10->mulu16_sel#2] -- register_copy jsr mulu16_sel - //SEG338 [181] (word) mulu16_sel::return#11 ← (word) mulu16_sel::return#12 - //SEG339 sin16s::@11 - //SEG340 [182] (word) sin16s::x5#0 ← (word) mulu16_sel::return#11 - //SEG341 [183] (word) sin16s::x5_128#0 ← (word) sin16s::x5#0 >> (byte) 4 -- vwuz1=vwuz1_ror_4 + //SEG349 [185] (word) mulu16_sel::return#11 ← (word) mulu16_sel::return#12 + //SEG350 sin16s::@11 + //SEG351 [186] (word) sin16s::x5#0 ← (word) mulu16_sel::return#11 + //SEG352 [187] (word) sin16s::x5_128#0 ← (word) sin16s::x5#0 >> (byte) 4 -- vwuz1=vwuz1_ror_4 lsr x5_128+1 ror x5_128 lsr x5_128+1 @@ -9947,7 +10167,7 @@ sin16s: { ror x5_128 lsr x5_128+1 ror x5_128 - //SEG342 [184] (word) sin16s::usinx#1 ← (word) sin16s::usinx#0 + (word) sin16s::x5_128#0 -- vwuz1=vwuz1_plus_vwuz2 + //SEG353 [188] (word) sin16s::usinx#1 ← (word) sin16s::usinx#0 + (word) sin16s::x5_128#0 -- vwuz1=vwuz1_plus_vwuz2 lda usinx clc adc x5_128 @@ -9955,12 +10175,12 @@ sin16s: { lda usinx+1 adc x5_128+1 sta usinx+1 - //SEG343 [185] if((byte) sin16s::isUpper#2==(byte) 0) goto sin16s::@12 -- vbuz1_eq_0_then_la1 + //SEG354 [189] if((byte) sin16s::isUpper#2==(byte) 0) goto sin16s::@12 -- vbuz1_eq_0_then_la1 lda isUpper cmp #0 beq b3 - //SEG344 sin16s::@6 - //SEG345 [186] (signed word) sin16s::sinx#1 ← - (signed word)(word) sin16s::usinx#1 -- vwsz1=_neg_vwsz1 + //SEG355 sin16s::@6 + //SEG356 [190] (signed word) sin16s::sinx#1 ← - (signed word)(word) sin16s::usinx#1 -- vwsz1=_neg_vwsz1 sec lda #0 sbc sinx @@ -9968,38 +10188,38 @@ sin16s: { lda #0 sbc sinx+1 sta sinx+1 - //SEG346 [187] phi from sin16s::@12 sin16s::@6 to sin16s::@3 [phi:sin16s::@12/sin16s::@6->sin16s::@3] - //SEG347 [187] phi (signed word) sin16s::return#1 = (signed word~) sin16s::return#5 [phi:sin16s::@12/sin16s::@6->sin16s::@3#0] -- register_copy - //SEG348 sin16s::@3 + //SEG357 [191] phi from sin16s::@12 sin16s::@6 to sin16s::@3 [phi:sin16s::@12/sin16s::@6->sin16s::@3] + //SEG358 [191] phi (signed word) sin16s::return#1 = (signed word~) sin16s::return#5 [phi:sin16s::@12/sin16s::@6->sin16s::@3#0] -- register_copy + //SEG359 sin16s::@3 b3: - //SEG349 sin16s::@return - //SEG350 [188] return + //SEG360 sin16s::@return + //SEG361 [192] return rts - //SEG351 sin16s::@12 - //SEG352 [189] (signed word~) sin16s::return#5 ← (signed word)(word) sin16s::usinx#1 + //SEG362 sin16s::@12 + //SEG363 [193] (signed word~) sin16s::return#5 ← (signed word)(word) sin16s::usinx#1 } -//SEG353 mulu16_sel +//SEG364 mulu16_sel // Calculate val*val for two unsigned word values - the result is 16 selected bits of the 32-bit result. // The select parameter indicates how many of the highest bits of the 32-bit result to skip -// mulu16_sel(word zeropage($29) v1, word zeropage($e) v2, byte register(X) select) +// mulu16_sel(word zeropage($2a) v1, word zeropage($f) v2, byte register(X) select) mulu16_sel: { - .label _0 = $a - .label _1 = $a - .label v1 = $29 - .label v2 = $e - .label return = $47 - .label return_1 = $29 - .label return_10 = $29 - //SEG354 [191] (word) mul16u::a#2 ← (word) mulu16_sel::v1#5 -- vwuz1=vwuz2 + .label _0 = $b + .label _1 = $b + .label v1 = $2a + .label v2 = $f + .label return = $48 + .label return_1 = $2a + .label return_10 = $2a + //SEG365 [195] (word) mul16u::a#2 ← (word) mulu16_sel::v1#5 -- vwuz1=vwuz2 lda v1 sta mul16u.a lda v1+1 sta mul16u.a+1 - //SEG355 [192] (word) mul16u::b#1 ← (word) mulu16_sel::v2#5 - //SEG356 [193] call mul16u - //SEG357 [76] phi from mulu16_sel to mul16u [phi:mulu16_sel->mul16u] - //SEG358 [76] phi (word) mul16u::a#6 = (word) mul16u::a#2 [phi:mulu16_sel->mul16u#0] -- register_copy - //SEG359 [76] phi (dword) mul16u::mb#0 = (word) mul16u::b#1 [phi:mulu16_sel->mul16u#1] -- vduz1=vwuz2 + //SEG366 [196] (word) mul16u::b#1 ← (word) mulu16_sel::v2#5 + //SEG367 [197] call mul16u + //SEG368 [80] phi from mulu16_sel to mul16u [phi:mulu16_sel->mul16u] + //SEG369 [80] phi (word) mul16u::a#6 = (word) mul16u::a#2 [phi:mulu16_sel->mul16u#0] -- register_copy + //SEG370 [80] phi (dword) mul16u::mb#0 = (word) mul16u::b#1 [phi:mulu16_sel->mul16u#1] -- vduz1=vwuz2 lda mul16u.b sta mul16u.mb lda mul16u.b+1 @@ -10008,10 +10228,10 @@ mulu16_sel: { sta mul16u.mb+2 sta mul16u.mb+3 jsr mul16u - //SEG360 [194] (dword) mul16u::return#3 ← (dword) mul16u::res#2 - //SEG361 mulu16_sel::@1 - //SEG362 [195] (dword~) mulu16_sel::$0 ← (dword) mul16u::return#3 - //SEG363 [196] (dword~) mulu16_sel::$1 ← (dword~) mulu16_sel::$0 << (byte) mulu16_sel::select#5 -- vduz1=vduz1_rol_vbuxx + //SEG371 [198] (dword) mul16u::return#3 ← (dword) mul16u::res#2 + //SEG372 mulu16_sel::@1 + //SEG373 [199] (dword~) mulu16_sel::$0 ← (dword) mul16u::return#3 + //SEG374 [200] (dword~) mulu16_sel::$1 ← (dword~) mulu16_sel::$0 << (byte) mulu16_sel::select#5 -- vduz1=vduz1_rol_vbuxx cpx #0 beq !e+ !: @@ -10022,55 +10242,55 @@ mulu16_sel: { dex bne !- !e: - //SEG364 [197] (word) mulu16_sel::return#12 ← > (dword~) mulu16_sel::$1 -- vwuz1=_hi_vduz2 + //SEG375 [201] (word) mulu16_sel::return#12 ← > (dword~) mulu16_sel::$1 -- vwuz1=_hi_vduz2 lda _1+2 sta return lda _1+3 sta return+1 - //SEG365 mulu16_sel::@return - //SEG366 [198] return + //SEG376 mulu16_sel::@return + //SEG377 [202] return rts } -//SEG367 div32u16u +//SEG378 div32u16u // Divide unsigned 32-bit dword dividend with a 16-bit word divisor // The 16-bit word remainder can be found in rem16u after the division div32u16u: { - .label quotient_hi = $49 - .label quotient_lo = $2f - .label return = $3f - //SEG368 [200] call divr16u - //SEG369 [209] phi from div32u16u to divr16u [phi:div32u16u->divr16u] - //SEG370 [209] phi (word) divr16u::dividend#5 = >(const dword) PI2_u4f28#0 [phi:div32u16u->divr16u#0] -- vwuz1=vwuc1 + .label quotient_hi = $4a + .label quotient_lo = $30 + .label return = $40 + //SEG379 [204] call divr16u + //SEG380 [213] phi from div32u16u to divr16u [phi:div32u16u->divr16u] + //SEG381 [213] phi (word) divr16u::dividend#5 = >(const dword) PI2_u4f28#0 [phi:div32u16u->divr16u#0] -- vwuz1=vwuc1 lda #>$10 sta divr16u.dividend lda #>PI2_u4f28>>$10 sta divr16u.dividend+1 - //SEG371 [209] phi (word) divr16u::rem#10 = (byte) 0 [phi:div32u16u->divr16u#1] -- vwuz1=vbuc1 + //SEG382 [213] phi (word) divr16u::rem#10 = (byte) 0 [phi:div32u16u->divr16u#1] -- vwuz1=vbuc1 lda #0 sta divr16u.rem sta divr16u.rem+1 jsr divr16u - //SEG372 [201] (word) divr16u::return#2 ← (word) divr16u::return#0 - //SEG373 div32u16u::@1 - //SEG374 [202] (word) div32u16u::quotient_hi#0 ← (word) divr16u::return#2 -- vwuz1=vwuz2 + //SEG383 [205] (word) divr16u::return#2 ← (word) divr16u::return#0 + //SEG384 div32u16u::@1 + //SEG385 [206] (word) div32u16u::quotient_hi#0 ← (word) divr16u::return#2 -- vwuz1=vwuz2 lda divr16u.return sta quotient_hi lda divr16u.return+1 sta quotient_hi+1 - //SEG375 [203] (word) divr16u::rem#4 ← (word) rem16u#1 - //SEG376 [204] call divr16u - //SEG377 [209] phi from div32u16u::@1 to divr16u [phi:div32u16u::@1->divr16u] - //SEG378 [209] phi (word) divr16u::dividend#5 = <(const dword) PI2_u4f28#0 [phi:div32u16u::@1->divr16u#0] -- vwuz1=vwuc1 + //SEG386 [207] (word) divr16u::rem#4 ← (word) rem16u#1 + //SEG387 [208] call divr16u + //SEG388 [213] phi from div32u16u::@1 to divr16u [phi:div32u16u::@1->divr16u] + //SEG389 [213] phi (word) divr16u::dividend#5 = <(const dword) PI2_u4f28#0 [phi:div32u16u::@1->divr16u#0] -- vwuz1=vwuc1 lda #PI2_u4f28&$ffff sta divr16u.dividend+1 - //SEG379 [209] phi (word) divr16u::rem#10 = (word) divr16u::rem#4 [phi:div32u16u::@1->divr16u#1] -- register_copy + //SEG390 [213] phi (word) divr16u::rem#10 = (word) divr16u::rem#4 [phi:div32u16u::@1->divr16u#1] -- register_copy jsr divr16u - //SEG380 [205] (word) divr16u::return#3 ← (word) divr16u::return#0 - //SEG381 div32u16u::@2 - //SEG382 [206] (word) div32u16u::quotient_lo#0 ← (word) divr16u::return#3 - //SEG383 [207] (dword) div32u16u::return#0 ← (word) div32u16u::quotient_hi#0 dw= (word) div32u16u::quotient_lo#0 -- vduz1=vwuz2_dword_vwuz3 + //SEG391 [209] (word) divr16u::return#3 ← (word) divr16u::return#0 + //SEG392 div32u16u::@2 + //SEG393 [210] (word) div32u16u::quotient_lo#0 ← (word) divr16u::return#3 + //SEG394 [211] (dword) div32u16u::return#0 ← (word) div32u16u::quotient_hi#0 dw= (word) div32u16u::quotient_lo#0 -- vduz1=vwuz2_dword_vwuz3 lda quotient_hi sta return+2 lda quotient_hi+1 @@ -10079,63 +10299,63 @@ div32u16u: { sta return lda quotient_lo+1 sta return+1 - //SEG384 div32u16u::@return - //SEG385 [208] return + //SEG395 div32u16u::@return + //SEG396 [212] return rts } -//SEG386 divr16u +//SEG397 divr16u // Performs division on two 16 bit unsigned words and an initial remainder // Returns the quotient dividend/divisor. // The final remainder will be set into the global variable rem16u // Implemented using simple binary division -// divr16u(word zeropage($2d) dividend, word zeropage($2b) rem) +// divr16u(word zeropage($2e) dividend, word zeropage($2c) rem) divr16u: { - .label rem = $2b - .label dividend = $2d - .label quotient = $2f - .label return = $2f - //SEG387 [210] phi from divr16u to divr16u::@1 [phi:divr16u->divr16u::@1] - //SEG388 [210] phi (byte) divr16u::i#2 = (byte) 0 [phi:divr16u->divr16u::@1#0] -- vbuxx=vbuc1 + .label rem = $2c + .label dividend = $2e + .label quotient = $30 + .label return = $30 + //SEG398 [214] phi from divr16u to divr16u::@1 [phi:divr16u->divr16u::@1] + //SEG399 [214] phi (byte) divr16u::i#2 = (byte) 0 [phi:divr16u->divr16u::@1#0] -- vbuxx=vbuc1 ldx #0 - //SEG389 [210] phi (word) divr16u::quotient#3 = (byte) 0 [phi:divr16u->divr16u::@1#1] -- vwuz1=vbuc1 + //SEG400 [214] phi (word) divr16u::quotient#3 = (byte) 0 [phi:divr16u->divr16u::@1#1] -- vwuz1=vbuc1 txa sta quotient sta quotient+1 - //SEG390 [210] phi (word) divr16u::dividend#3 = (word) divr16u::dividend#5 [phi:divr16u->divr16u::@1#2] -- register_copy - //SEG391 [210] phi (word) divr16u::rem#5 = (word) divr16u::rem#10 [phi:divr16u->divr16u::@1#3] -- register_copy - //SEG392 [210] phi from divr16u::@3 to divr16u::@1 [phi:divr16u::@3->divr16u::@1] - //SEG393 [210] phi (byte) divr16u::i#2 = (byte) divr16u::i#1 [phi:divr16u::@3->divr16u::@1#0] -- register_copy - //SEG394 [210] phi (word) divr16u::quotient#3 = (word) divr16u::return#0 [phi:divr16u::@3->divr16u::@1#1] -- register_copy - //SEG395 [210] phi (word) divr16u::dividend#3 = (word) divr16u::dividend#0 [phi:divr16u::@3->divr16u::@1#2] -- register_copy - //SEG396 [210] phi (word) divr16u::rem#5 = (word) divr16u::rem#11 [phi:divr16u::@3->divr16u::@1#3] -- register_copy - //SEG397 divr16u::@1 + //SEG401 [214] phi (word) divr16u::dividend#3 = (word) divr16u::dividend#5 [phi:divr16u->divr16u::@1#2] -- register_copy + //SEG402 [214] phi (word) divr16u::rem#5 = (word) divr16u::rem#10 [phi:divr16u->divr16u::@1#3] -- register_copy + //SEG403 [214] phi from divr16u::@3 to divr16u::@1 [phi:divr16u::@3->divr16u::@1] + //SEG404 [214] phi (byte) divr16u::i#2 = (byte) divr16u::i#1 [phi:divr16u::@3->divr16u::@1#0] -- register_copy + //SEG405 [214] phi (word) divr16u::quotient#3 = (word) divr16u::return#0 [phi:divr16u::@3->divr16u::@1#1] -- register_copy + //SEG406 [214] phi (word) divr16u::dividend#3 = (word) divr16u::dividend#0 [phi:divr16u::@3->divr16u::@1#2] -- register_copy + //SEG407 [214] phi (word) divr16u::rem#5 = (word) divr16u::rem#11 [phi:divr16u::@3->divr16u::@1#3] -- register_copy + //SEG408 divr16u::@1 b1: - //SEG398 [211] (word) divr16u::rem#0 ← (word) divr16u::rem#5 << (byte) 1 -- vwuz1=vwuz1_rol_1 + //SEG409 [215] (word) divr16u::rem#0 ← (word) divr16u::rem#5 << (byte) 1 -- vwuz1=vwuz1_rol_1 asl rem rol rem+1 - //SEG399 [212] (byte~) divr16u::$1 ← > (word) divr16u::dividend#3 -- vbuaa=_hi_vwuz1 + //SEG410 [216] (byte~) divr16u::$1 ← > (word) divr16u::dividend#3 -- vbuaa=_hi_vwuz1 lda dividend+1 - //SEG400 [213] (byte~) divr16u::$2 ← (byte~) divr16u::$1 & (byte) $80 -- vbuaa=vbuaa_band_vbuc1 + //SEG411 [217] (byte~) divr16u::$2 ← (byte~) divr16u::$1 & (byte) $80 -- vbuaa=vbuaa_band_vbuc1 and #$80 - //SEG401 [214] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 -- vbuaa_eq_0_then_la1 + //SEG412 [218] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 -- vbuaa_eq_0_then_la1 cmp #0 beq b2 - //SEG402 divr16u::@4 - //SEG403 [215] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 -- vwuz1=vwuz1_bor_vbuc1 + //SEG413 divr16u::@4 + //SEG414 [219] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 -- vwuz1=vwuz1_bor_vbuc1 lda #1 ora rem sta rem - //SEG404 [216] phi from divr16u::@1 divr16u::@4 to divr16u::@2 [phi:divr16u::@1/divr16u::@4->divr16u::@2] - //SEG405 [216] phi (word) divr16u::rem#6 = (word) divr16u::rem#0 [phi:divr16u::@1/divr16u::@4->divr16u::@2#0] -- register_copy - //SEG406 divr16u::@2 + //SEG415 [220] phi from divr16u::@1 divr16u::@4 to divr16u::@2 [phi:divr16u::@1/divr16u::@4->divr16u::@2] + //SEG416 [220] phi (word) divr16u::rem#6 = (word) divr16u::rem#0 [phi:divr16u::@1/divr16u::@4->divr16u::@2#0] -- register_copy + //SEG417 divr16u::@2 b2: - //SEG407 [217] (word) divr16u::dividend#0 ← (word) divr16u::dividend#3 << (byte) 1 -- vwuz1=vwuz1_rol_1 + //SEG418 [221] (word) divr16u::dividend#0 ← (word) divr16u::dividend#3 << (byte) 1 -- vwuz1=vwuz1_rol_1 asl dividend rol dividend+1 - //SEG408 [218] (word) divr16u::quotient#1 ← (word) divr16u::quotient#3 << (byte) 1 -- vwuz1=vwuz1_rol_1 + //SEG419 [222] (word) divr16u::quotient#1 ← (word) divr16u::quotient#3 << (byte) 1 -- vwuz1=vwuz1_rol_1 asl quotient rol quotient+1 - //SEG409 [219] if((word) divr16u::rem#6<(const word) sin16s_gen2::wavelength#0) goto divr16u::@3 -- vwuz1_lt_vwuc1_then_la1 + //SEG420 [223] if((word) divr16u::rem#6<(const word) sin16s_gen2::wavelength#0) goto divr16u::@3 -- vwuz1_lt_vwuc1_then_la1 lda rem+1 cmp #>sin16s_gen2.wavelength bcc b3 @@ -10144,13 +10364,13 @@ divr16u: { cmp #sin16s_gen2.wavelength sta rem+1 - //SEG413 [222] phi from divr16u::@2 divr16u::@5 to divr16u::@3 [phi:divr16u::@2/divr16u::@5->divr16u::@3] - //SEG414 [222] phi (word) divr16u::return#0 = (word) divr16u::quotient#1 [phi:divr16u::@2/divr16u::@5->divr16u::@3#0] -- register_copy - //SEG415 [222] phi (word) divr16u::rem#11 = (word) divr16u::rem#6 [phi:divr16u::@2/divr16u::@5->divr16u::@3#1] -- register_copy - //SEG416 divr16u::@3 + //SEG424 [226] phi from divr16u::@2 divr16u::@5 to divr16u::@3 [phi:divr16u::@2/divr16u::@5->divr16u::@3] + //SEG425 [226] phi (word) divr16u::return#0 = (word) divr16u::quotient#1 [phi:divr16u::@2/divr16u::@5->divr16u::@3#0] -- register_copy + //SEG426 [226] phi (word) divr16u::rem#11 = (word) divr16u::rem#6 [phi:divr16u::@2/divr16u::@5->divr16u::@3#1] -- register_copy + //SEG427 divr16u::@3 b3: - //SEG417 [223] (byte) divr16u::i#1 ← ++ (byte) divr16u::i#2 -- vbuxx=_inc_vbuxx + //SEG428 [227] (byte) divr16u::i#1 ← ++ (byte) divr16u::i#2 -- vbuxx=_inc_vbuxx inx - //SEG418 [224] if((byte) divr16u::i#1!=(byte) $10) goto divr16u::@1 -- vbuxx_neq_vbuc1_then_la1 + //SEG429 [228] if((byte) divr16u::i#1!=(byte) $10) goto divr16u::@1 -- vbuxx_neq_vbuc1_then_la1 cpx #$10 bne b1 - //SEG419 divr16u::@6 - //SEG420 [225] (word) rem16u#1 ← (word) divr16u::rem#11 - //SEG421 divr16u::@return - //SEG422 [226] return + //SEG430 divr16u::@6 + //SEG431 [229] (word) rem16u#1 ← (word) divr16u::rem#11 + //SEG432 divr16u::@return + //SEG433 [230] return rts } -//SEG423 irq +//SEG434 irq // Interrupt Routine counting frames irq: { - //SEG424 entry interrupt(HARDWARE_CLOBBER) + //SEG435 entry interrupt(HARDWARE_CLOBBER) sta rega+1 - //SEG425 [227] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 -- _deref_pbuc1=vbuc2 + //SEG436 [231] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 -- _deref_pbuc1=vbuc2 lda #WHITE sta BGCOL - //SEG426 [228] if((byte) 0==(byte) frame_cnt#0) goto irq::@1 -- vbuc1_eq_vbuz1_then_la1 + //SEG437 [232] if((byte) 0==(byte) frame_cnt#0) goto irq::@1 -- vbuc1_eq_vbuz1_then_la1 lda #0 cmp frame_cnt beq b1 - //SEG427 irq::@2 - //SEG428 [229] (byte) frame_cnt#1 ← ++ (byte) frame_cnt#0 -- vbuz1=_inc_vbuz1 + //SEG438 irq::@2 + //SEG439 [233] (byte) frame_cnt#1 ← ++ (byte) frame_cnt#0 -- vbuz1=_inc_vbuz1 inc frame_cnt - //SEG429 [230] phi from irq irq::@2 to irq::@1 [phi:irq/irq::@2->irq::@1] - //SEG430 [230] phi (byte) frame_cnt#2 = (byte) frame_cnt#0 [phi:irq/irq::@2->irq::@1#0] -- register_copy - //SEG431 irq::@1 + //SEG440 [234] phi from irq irq::@2 to irq::@1 [phi:irq/irq::@2->irq::@1] + //SEG441 [234] phi (byte) frame_cnt#2 = (byte) frame_cnt#0 [phi:irq/irq::@2->irq::@1#0] -- register_copy + //SEG442 irq::@1 b1: - //SEG432 [231] *((const byte*) BGCOL#0) ← (const byte) BLACK#0 -- _deref_pbuc1=vbuc2 + //SEG443 [235] *((const byte*) BGCOL#0) ← (const byte) BLACK#0 -- _deref_pbuc1=vbuc2 lda #BLACK sta BGCOL - //SEG433 [232] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 + //SEG444 [236] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 // Acknowledge the IRQ lda #IRQ_RASTER sta IRQ_STATUS - //SEG434 irq::@return - //SEG435 [233] return - exit interrupt(HARDWARE_CLOBBER) + //SEG445 irq::@return + //SEG446 [237] return - exit interrupt(HARDWARE_CLOBBER) rega: lda #00 rti } -//SEG436 File Data +//SEG447 File Data // Tables for the plotter - initialized by calling bitmap_init(); bitmap_plot_ylo: .fill $100, 0 bitmap_plot_yhi: .fill $100, 0 diff --git a/src/test/ref/bitmap-plot-2.sym b/src/test/ref/bitmap-plot-2.sym index 487afcc05..6b5291dd8 100644 --- a/src/test/ref/bitmap-plot-2.sym +++ b/src/test/ref/bitmap-plot-2.sym @@ -69,7 +69,7 @@ (byte~) bitmap_init::$4 reg byte a 22.0 (byte~) bitmap_init::$5 reg byte a 22.0 (byte~) bitmap_init::$6 reg byte a 22.0 -(byte~) bitmap_init::$7 $7 zp ZP_BYTE:62 5.5 +(byte~) bitmap_init::$7 $7 zp ZP_BYTE:63 5.5 (label) bitmap_init::@1 (label) bitmap_init::@2 (label) bitmap_init::@3 @@ -90,18 +90,18 @@ (byte) bitmap_init::y#1 reg byte x 16.5 (byte) bitmap_init::y#2 reg byte x 5.5 (byte*) bitmap_init::yoffs -(byte*) bitmap_init::yoffs#1 yoffs zp ZP_WORD:26 22.0 -(byte*) bitmap_init::yoffs#2 yoffs zp ZP_WORD:26 6.875 -(byte*) bitmap_init::yoffs#4 yoffs zp ZP_WORD:26 11.0 +(byte*) bitmap_init::yoffs#1 yoffs zp ZP_WORD:27 22.0 +(byte*) bitmap_init::yoffs#2 yoffs zp ZP_WORD:27 6.875 +(byte*) bitmap_init::yoffs#4 yoffs zp ZP_WORD:27 11.0 (void()) bitmap_plot((word) bitmap_plot::x , (byte) bitmap_plot::y) -(word~) bitmap_plot::$1 $1 zp ZP_WORD:56 4.0 +(word~) bitmap_plot::$1 $1 zp ZP_WORD:57 4.0 (byte~) bitmap_plot::$2 reg byte a 4.0 -(word~) bitmap_plot::$3 $3 zp ZP_WORD:54 1.0 +(word~) bitmap_plot::$3 $3 zp ZP_WORD:55 1.0 (label) bitmap_plot::@return (byte*) bitmap_plot::plotter -(byte*) bitmap_plot::plotter#1 plotter zp ZP_WORD:54 3.0 +(byte*) bitmap_plot::plotter#1 plotter zp ZP_WORD:55 3.0 (word) bitmap_plot::x -(signed word) bitmap_plot::x#0 x zp ZP_WORD:50 0.6875 +(signed word) bitmap_plot::x#0 x zp ZP_WORD:51 0.6875 (byte) bitmap_plot::y (byte) bitmap_plot::y#0 reg byte a 15.0 (byte[$100]) bitmap_plot_bit @@ -119,12 +119,12 @@ (word) div32u16u::divisor (dword) div32u16u::quotient (word) div32u16u::quotient_hi -(word) div32u16u::quotient_hi#0 quotient_hi zp ZP_WORD:73 0.8 +(word) div32u16u::quotient_hi#0 quotient_hi zp ZP_WORD:74 0.8 (word) div32u16u::quotient_lo -(word) div32u16u::quotient_lo#0 quotient_lo zp ZP_WORD:47 4.0 +(word) div32u16u::quotient_lo#0 quotient_lo zp ZP_WORD:48 4.0 (dword) div32u16u::return -(dword) div32u16u::return#0 return zp ZP_DWORD:63 1.3333333333333333 -(dword) div32u16u::return#2 return zp ZP_DWORD:63 4.0 +(dword) div32u16u::return#0 return zp ZP_DWORD:64 1.3333333333333333 +(dword) div32u16u::return#2 return zp ZP_DWORD:64 4.0 (word()) divr16u((word) divr16u::dividend , (word) divr16u::divisor , (word) divr16u::rem) (byte~) divr16u::$1 reg byte a 22.0 (byte~) divr16u::$2 reg byte a 22.0 @@ -136,34 +136,34 @@ (label) divr16u::@6 (label) divr16u::@return (word) divr16u::dividend -(word) divr16u::dividend#0 dividend zp ZP_WORD:45 2.75 -(word) divr16u::dividend#3 dividend zp ZP_WORD:45 5.0 -(word) divr16u::dividend#5 dividend zp ZP_WORD:45 2.0 +(word) divr16u::dividend#0 dividend zp ZP_WORD:46 2.75 +(word) divr16u::dividend#3 dividend zp ZP_WORD:46 5.0 +(word) divr16u::dividend#5 dividend zp ZP_WORD:46 2.0 (word) divr16u::divisor (byte) divr16u::i (byte) divr16u::i#1 reg byte x 16.5 (byte) divr16u::i#2 reg byte x 1.6923076923076923 (word) divr16u::quotient -(word) divr16u::quotient#1 quotient zp ZP_WORD:47 16.5 -(word) divr16u::quotient#2 quotient zp ZP_WORD:47 11.0 -(word) divr16u::quotient#3 quotient zp ZP_WORD:47 2.75 +(word) divr16u::quotient#1 quotient zp ZP_WORD:48 16.5 +(word) divr16u::quotient#2 quotient zp ZP_WORD:48 11.0 +(word) divr16u::quotient#3 quotient zp ZP_WORD:48 2.75 (word) divr16u::rem -(word) divr16u::rem#0 rem zp ZP_WORD:43 8.25 -(word) divr16u::rem#1 rem zp ZP_WORD:43 22.0 -(word) divr16u::rem#10 rem zp ZP_WORD:43 4.0 -(word) divr16u::rem#11 rem zp ZP_WORD:43 11.666666666666666 -(word) divr16u::rem#2 rem zp ZP_WORD:43 22.0 -(word) divr16u::rem#4 rem zp ZP_WORD:43 4.0 -(word) divr16u::rem#5 rem zp ZP_WORD:43 24.0 -(word) divr16u::rem#6 rem zp ZP_WORD:43 11.0 +(word) divr16u::rem#0 rem zp ZP_WORD:44 8.25 +(word) divr16u::rem#1 rem zp ZP_WORD:44 22.0 +(word) divr16u::rem#10 rem zp ZP_WORD:44 4.0 +(word) divr16u::rem#11 rem zp ZP_WORD:44 11.666666666666666 +(word) divr16u::rem#2 rem zp ZP_WORD:44 22.0 +(word) divr16u::rem#4 rem zp ZP_WORD:44 4.0 +(word) divr16u::rem#5 rem zp ZP_WORD:44 24.0 +(word) divr16u::rem#6 rem zp ZP_WORD:44 11.0 (word) divr16u::return -(word) divr16u::return#0 return zp ZP_WORD:47 5.285714285714286 -(word) divr16u::return#2 return zp ZP_WORD:47 4.0 -(word) divr16u::return#3 return zp ZP_WORD:47 4.0 +(word) divr16u::return#0 return zp ZP_WORD:48 5.285714285714286 +(word) divr16u::return#2 return zp ZP_WORD:48 4.0 +(word) divr16u::return#3 return zp ZP_WORD:48 4.0 (byte) frame_cnt -(byte) frame_cnt#0 frame_cnt zp ZP_BYTE:49 0.6000000000000001 -(byte) frame_cnt#1 frame_cnt zp ZP_BYTE:49 4.0 -(byte) frame_cnt#2 frame_cnt zp ZP_BYTE:49 40.0 +(byte) frame_cnt#0 frame_cnt zp ZP_BYTE:50 0.5555555555555556 +(byte) frame_cnt#1 frame_cnt zp ZP_BYTE:50 4.0 +(byte) frame_cnt#2 frame_cnt zp ZP_BYTE:50 40.0 (void()) init_irq() (label) init_irq::@return interrupt(HARDWARE_CLOBBER)(void()) irq() @@ -171,21 +171,24 @@ interrupt(HARDWARE_CLOBBER)(void()) irq() (label) irq::@2 (label) irq::@return (void()) main() -(signed word~) main::$11 $11 zp ZP_WORD:50 22.0 -(word~) main::$15 $15 zp ZP_WORD:52 11.0 -(signed word~) main::$17 $17 zp ZP_WORD:52 22.0 -(signed word~) main::$18 $18 zp ZP_WORD:52 11.0 -(word~) main::$28 $28 zp ZP_WORD:8 22.0 -(word~) main::$29 $29 zp ZP_WORD:8 22.0 -(signed word*~) main::$30 $30 zp ZP_WORD:8 22.0 -(signed word*~) main::$31 $31 zp ZP_WORD:8 22.0 -(word~) main::$9 $9 zp ZP_WORD:50 11.0 +(signed word~) main::$11 $11 zp ZP_WORD:51 22.0 +(word~) main::$15 $15 zp ZP_WORD:53 11.0 +(signed word~) main::$17 $17 zp ZP_WORD:53 22.0 +(signed word~) main::$18 $18 zp ZP_WORD:53 11.0 +(word~) main::$32 $32 zp ZP_WORD:9 22.0 +(word~) main::$33 $33 zp ZP_WORD:9 22.0 +(signed word*~) main::$34 $34 zp ZP_WORD:9 22.0 +(signed word*~) main::$35 $35 zp ZP_WORD:9 22.0 +(word~) main::$9 $9 zp ZP_WORD:51 11.0 (label) main::@1 (label) main::@10 (label) main::@11 (label) main::@12 (label) main::@13 (label) main::@14 +(label) main::@15 +(label) main::@16 +(label) main::@17 (label) main::@2 (label) main::@3 (label) main::@4 @@ -195,22 +198,24 @@ interrupt(HARDWARE_CLOBBER)(void()) irq() (label) main::@8 (label) main::@9 (signed word) main::cos_x -(signed word) main::cos_x#0 cos_x zp ZP_WORD:8 11.0 +(signed word) main::cos_x#0 cos_x zp ZP_WORD:9 11.0 (word) main::idx_x (word) main::idx_x#1 idx_x zp ZP_WORD:2 11.0 -(word) main::idx_x#10 idx_x zp ZP_WORD:2 3.142857142857143 -(word) main::idx_x#3 idx_x zp ZP_WORD:2 1.2692307692307692 +(word) main::idx_x#10 idx_x zp ZP_WORD:2 3.0 +(word) main::idx_x#11 idx_x zp ZP_WORD:2 1.2692307692307692 (word) main::idx_y (word) main::idx_y#1 idx_y zp ZP_WORD:6 11.0 -(word) main::idx_y#10 idx_y zp ZP_WORD:6 7.333333333333333 +(word) main::idx_y#10 idx_y zp ZP_WORD:6 3.142857142857143 (word) main::idx_y#3 idx_y zp ZP_WORD:6 1.0999999999999999 (signed word) main::r -(signed word) main::r#1 r zp ZP_WORD:4 16.5 +(signed word) main::r#1 r zp ZP_WORD:4 5.5 (signed word) main::r#10 r zp ZP_WORD:4 1.2941176470588236 (byte) main::r_add -(const byte) main::r_add#0 r_add = (byte) 4 +(byte) main::r_add#1 r_add zp ZP_BYTE:8 22.0 +(byte) main::r_add#10 r_add zp ZP_BYTE:8 2.081081081081081 +(byte) main::r_add#12 r_add zp ZP_BYTE:8 16.5 (signed word) main::sin_y -(signed word) main::sin_y#0 sin_y zp ZP_WORD:8 11.0 +(signed word) main::sin_y#0 sin_y zp ZP_WORD:9 11.0 (label) main::toD0181 (word~) main::toD0181_$0 (number~) main::toD0181_$1 @@ -227,31 +232,31 @@ interrupt(HARDWARE_CLOBBER)(void()) irq() (byte*) main::toD0181_screen (word) main::x (signed dword) main::xpos -(signed dword) main::xpos#0 xpos zp ZP_DWORD:10 22.0 +(signed dword) main::xpos#0 xpos zp ZP_DWORD:11 22.0 (word) main::y (signed dword) main::ypos -(signed dword) main::ypos#0 ypos zp ZP_DWORD:10 22.0 +(signed dword) main::ypos#0 ypos zp ZP_DWORD:11 22.0 (void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) (label) memset::@1 (label) memset::@return (byte) memset::c (byte) memset::c#3 reg byte x 1.5714285714285714 (byte*) memset::dst -(byte*) memset::dst#1 dst zp ZP_WORD:22 16.5 -(byte*) memset::dst#2 dst zp ZP_WORD:22 17.5 -(byte*~) memset::dst#3 dst zp ZP_WORD:22 4.0 +(byte*) memset::dst#1 dst zp ZP_WORD:23 16.5 +(byte*) memset::dst#2 dst zp ZP_WORD:23 17.5 +(byte*~) memset::dst#3 dst zp ZP_WORD:23 4.0 (byte*) memset::end -(byte*) memset::end#0 end zp ZP_WORD:24 2.1666666666666665 +(byte*) memset::end#0 end zp ZP_WORD:25 2.1666666666666665 (word) memset::num -(word) memset::num#2 num zp ZP_WORD:24 2.0 +(word) memset::num#2 num zp ZP_WORD:25 2.0 (void*) memset::return (void*) memset::str -(void*) memset::str#2 str zp ZP_WORD:22 +(void*) memset::str#2 str zp ZP_WORD:23 (signed dword()) mul16s((signed word) mul16s::a , (signed word) mul16s::b) -(word~) mul16s::$13 $13 zp ZP_WORD:60 4.0 -(word~) mul16s::$16 $16 zp ZP_WORD:58 4.0 -(word~) mul16s::$17 $17 zp ZP_WORD:60 4.0 -(word~) mul16s::$9 $9 zp ZP_WORD:58 4.0 +(word~) mul16s::$13 $13 zp ZP_WORD:61 4.0 +(word~) mul16s::$16 $16 zp ZP_WORD:59 4.0 +(word~) mul16s::$17 $17 zp ZP_WORD:61 4.0 +(word~) mul16s::$9 $9 zp ZP_WORD:59 4.0 (label) mul16s::@1 (label) mul16s::@2 (label) mul16s::@3 @@ -264,20 +269,20 @@ interrupt(HARDWARE_CLOBBER)(void()) irq() (signed word) mul16s::a#2 a zp ZP_WORD:4 11.0 (signed word) mul16s::a#3 a zp ZP_WORD:4 2.692307692307692 (signed word) mul16s::b -(signed word) mul16s::b#1 b zp ZP_WORD:8 22.0 -(signed word) mul16s::b#2 b zp ZP_WORD:8 22.0 -(signed word) mul16s::b#3 b zp ZP_WORD:8 2.1818181818181817 +(signed word) mul16s::b#1 b zp ZP_WORD:9 22.0 +(signed word) mul16s::b#2 b zp ZP_WORD:9 22.0 +(signed word) mul16s::b#3 b zp ZP_WORD:9 2.1818181818181817 (dword) mul16s::m -(dword) mul16s::m#0 m zp ZP_DWORD:10 2.0 -(dword) mul16s::m#1 m zp ZP_DWORD:10 4.0 -(dword) mul16s::m#2 m zp ZP_DWORD:10 4.0 -(dword) mul16s::m#4 m zp ZP_DWORD:10 4.0 -(dword) mul16s::m#5 m zp ZP_DWORD:10 2.5 +(dword) mul16s::m#0 m zp ZP_DWORD:11 2.0 +(dword) mul16s::m#1 m zp ZP_DWORD:11 4.0 +(dword) mul16s::m#2 m zp ZP_DWORD:11 4.0 +(dword) mul16s::m#4 m zp ZP_DWORD:11 4.0 +(dword) mul16s::m#5 m zp ZP_DWORD:11 2.5 (signed dword) mul16s::return -(signed dword) mul16s::return#0 return zp ZP_DWORD:10 7.000000000000001 -(signed dword) mul16s::return#2 return zp ZP_DWORD:10 22.0 -(signed dword) mul16s::return#3 return zp ZP_DWORD:10 22.0 -(signed dword) mul16s::return#4 return zp ZP_DWORD:10 22.0 +(signed dword) mul16s::return#0 return zp ZP_DWORD:11 7.000000000000001 +(signed dword) mul16s::return#2 return zp ZP_DWORD:11 22.0 +(signed dword) mul16s::return#3 return zp ZP_DWORD:11 22.0 +(signed dword) mul16s::return#4 return zp ZP_DWORD:11 22.0 (dword()) mul16u((word) mul16u::a , (word) mul16u::b) (byte~) mul16u::$1 reg byte a 202.0 (label) mul16u::@1 @@ -286,58 +291,58 @@ interrupt(HARDWARE_CLOBBER)(void()) irq() (label) mul16u::@4 (label) mul16u::@return (word) mul16u::a -(word) mul16u::a#0 a zp ZP_WORD:16 101.0 -(word) mul16u::a#2 a zp ZP_WORD:16 2.0 -(word) mul16u::a#3 a zp ZP_WORD:16 67.66666666666666 -(word) mul16u::a#6 a zp ZP_WORD:16 6.0 -(word~) mul16u::a#8 a zp ZP_WORD:16 4.0 +(word) mul16u::a#0 a zp ZP_WORD:17 101.0 +(word) mul16u::a#2 a zp ZP_WORD:17 2.0 +(word) mul16u::a#3 a zp ZP_WORD:17 67.66666666666666 +(word) mul16u::a#6 a zp ZP_WORD:17 6.0 +(word~) mul16u::a#8 a zp ZP_WORD:17 4.0 (word) mul16u::b -(word) mul16u::b#1 b zp ZP_WORD:14 4.0 +(word) mul16u::b#1 b zp ZP_WORD:15 4.0 (dword) mul16u::mb -(dword) mul16u::mb#0 mb zp ZP_DWORD:18 6.0 -(dword) mul16u::mb#1 mb zp ZP_DWORD:18 202.0 -(dword) mul16u::mb#2 mb zp ZP_DWORD:18 43.57142857142858 -(dword~) mul16u::mb#6 mb zp ZP_DWORD:18 2.0 +(dword) mul16u::mb#0 mb zp ZP_DWORD:19 6.0 +(dword) mul16u::mb#1 mb zp ZP_DWORD:19 202.0 +(dword) mul16u::mb#2 mb zp ZP_DWORD:19 43.57142857142858 +(dword~) mul16u::mb#6 mb zp ZP_DWORD:19 2.0 (dword) mul16u::res -(dword) mul16u::res#1 res zp ZP_DWORD:10 202.0 -(dword) mul16u::res#2 res zp ZP_DWORD:10 43.85714285714286 -(dword) mul16u::res#6 res zp ZP_DWORD:10 101.0 +(dword) mul16u::res#1 res zp ZP_DWORD:11 202.0 +(dword) mul16u::res#2 res zp ZP_DWORD:11 43.85714285714286 +(dword) mul16u::res#6 res zp ZP_DWORD:11 101.0 (dword) mul16u::return -(dword) mul16u::return#2 return zp ZP_DWORD:10 4.0 -(dword) mul16u::return#3 return zp ZP_DWORD:10 4.0 +(dword) mul16u::return#2 return zp ZP_DWORD:11 4.0 +(dword) mul16u::return#3 return zp ZP_DWORD:11 4.0 (word()) mulu16_sel((word) mulu16_sel::v1 , (word) mulu16_sel::v2 , (byte) mulu16_sel::select) -(dword~) mulu16_sel::$0 $0 zp ZP_DWORD:10 4.0 -(dword~) mulu16_sel::$1 $1 zp ZP_DWORD:10 4.0 +(dword~) mulu16_sel::$0 $0 zp ZP_DWORD:11 4.0 +(dword~) mulu16_sel::$1 $1 zp ZP_DWORD:11 4.0 (label) mulu16_sel::@1 (label) mulu16_sel::@return (word) mulu16_sel::return -(word) mulu16_sel::return#0 return zp ZP_WORD:71 4.0 -(word) mulu16_sel::return#1 return#1 zp ZP_WORD:41 4.0 -(word) mulu16_sel::return#10 return#10 zp ZP_WORD:41 4.0 -(word) mulu16_sel::return#11 return zp ZP_WORD:71 4.0 -(word) mulu16_sel::return#12 return zp ZP_WORD:71 1.714285714285714 -(word) mulu16_sel::return#2 return zp ZP_WORD:71 4.0 +(word) mulu16_sel::return#0 return zp ZP_WORD:72 4.0 +(word) mulu16_sel::return#1 return#1 zp ZP_WORD:42 4.0 +(word) mulu16_sel::return#10 return#10 zp ZP_WORD:42 4.0 +(word) mulu16_sel::return#11 return zp ZP_WORD:72 4.0 +(word) mulu16_sel::return#12 return zp ZP_WORD:72 1.714285714285714 +(word) mulu16_sel::return#2 return zp ZP_WORD:72 4.0 (byte) mulu16_sel::select (byte) mulu16_sel::select#5 reg byte x 0.3333333333333333 (word) mulu16_sel::v1 -(word) mulu16_sel::v1#0 v1 zp ZP_WORD:41 2.0 -(word) mulu16_sel::v1#1 v1 zp ZP_WORD:41 2.0 -(word) mulu16_sel::v1#2 v1 zp ZP_WORD:41 4.0 -(word) mulu16_sel::v1#3 v1 zp ZP_WORD:41 2.0 -(word) mulu16_sel::v1#4 v1 zp ZP_WORD:41 2.0 -(word) mulu16_sel::v1#5 v1 zp ZP_WORD:41 12.0 +(word) mulu16_sel::v1#0 v1 zp ZP_WORD:42 2.0 +(word) mulu16_sel::v1#1 v1 zp ZP_WORD:42 2.0 +(word) mulu16_sel::v1#2 v1 zp ZP_WORD:42 4.0 +(word) mulu16_sel::v1#3 v1 zp ZP_WORD:42 2.0 +(word) mulu16_sel::v1#4 v1 zp ZP_WORD:42 2.0 +(word) mulu16_sel::v1#5 v1 zp ZP_WORD:42 12.0 (word) mulu16_sel::v2 -(word) mulu16_sel::v2#0 v2 zp ZP_WORD:14 4.0 -(word) mulu16_sel::v2#1 v2 zp ZP_WORD:14 4.0 -(word) mulu16_sel::v2#3 v2 zp ZP_WORD:14 4.0 -(word) mulu16_sel::v2#4 v2 zp ZP_WORD:14 4.0 -(word) mulu16_sel::v2#5 v2 zp ZP_WORD:14 5.0 +(word) mulu16_sel::v2#0 v2 zp ZP_WORD:15 4.0 +(word) mulu16_sel::v2#1 v2 zp ZP_WORD:15 4.0 +(word) mulu16_sel::v2#3 v2 zp ZP_WORD:15 4.0 +(word) mulu16_sel::v2#4 v2 zp ZP_WORD:15 4.0 +(word) mulu16_sel::v2#5 v2 zp ZP_WORD:15 5.0 (byte[$100]) plots_per_frame (const byte[$100]) plots_per_frame#0 plots_per_frame = { fill( $100, 0) } (word) rem16u -(word) rem16u#1 rem16u zp ZP_WORD:43 0.8 +(word) rem16u#1 rem16u zp ZP_WORD:44 0.8 (signed word()) sin16s((dword) sin16s::x) -(dword~) sin16s::$4 $4 zp ZP_DWORD:37 4.0 +(dword~) sin16s::$4 $4 zp ZP_DWORD:38 4.0 (label) sin16s::@1 (label) sin16s::@10 (label) sin16s::@11 @@ -352,7 +357,7 @@ interrupt(HARDWARE_CLOBBER)(void()) irq() (label) sin16s::@9 (label) sin16s::@return (byte) sin16s::isUpper -(byte) sin16s::isUpper#2 isUpper zp ZP_BYTE:36 0.06060606060606061 +(byte) sin16s::isUpper#2 isUpper zp ZP_BYTE:37 0.06060606060606061 (signed word) sin16s::return (signed word) sin16s::return#0 return zp ZP_WORD:4 22.0 (signed word) sin16s::return#1 return zp ZP_WORD:4 5.0 @@ -363,28 +368,28 @@ interrupt(HARDWARE_CLOBBER)(void()) irq() (word) sin16s::usinx#0 usinx zp ZP_WORD:4 0.3333333333333333 (word) sin16s::usinx#1 usinx zp ZP_WORD:4 1.0 (dword) sin16s::x -(dword) sin16s::x#0 x zp ZP_DWORD:37 8.5 -(dword) sin16s::x#1 x zp ZP_DWORD:37 4.0 -(dword) sin16s::x#2 x zp ZP_DWORD:37 4.0 -(dword) sin16s::x#4 x zp ZP_DWORD:37 5.0 -(dword) sin16s::x#6 x zp ZP_DWORD:37 6.0 +(dword) sin16s::x#0 x zp ZP_DWORD:38 8.5 +(dword) sin16s::x#1 x zp ZP_DWORD:38 4.0 +(dword) sin16s::x#2 x zp ZP_DWORD:38 4.0 +(dword) sin16s::x#4 x zp ZP_DWORD:38 5.0 +(dword) sin16s::x#6 x zp ZP_DWORD:38 6.0 (word) sin16s::x1 -(word) sin16s::x1#0 x1 zp ZP_WORD:69 0.6363636363636365 +(word) sin16s::x1#0 x1 zp ZP_WORD:70 0.6363636363636365 (word) sin16s::x2 -(word) sin16s::x2#0 x2 zp ZP_WORD:41 4.0 +(word) sin16s::x2#0 x2 zp ZP_WORD:42 4.0 (word) sin16s::x3 -(word) sin16s::x3#0 x3 zp ZP_WORD:41 1.0 +(word) sin16s::x3#0 x3 zp ZP_WORD:42 1.0 (word) sin16s::x3_6 -(word) sin16s::x3_6#0 x3_6 zp ZP_WORD:71 4.0 +(word) sin16s::x3_6#0 x3_6 zp ZP_WORD:72 4.0 (word) sin16s::x4 -(word) sin16s::x4#0 x4 zp ZP_WORD:41 4.0 +(word) sin16s::x4#0 x4 zp ZP_WORD:42 4.0 (word) sin16s::x5 -(word) sin16s::x5#0 x5 zp ZP_WORD:71 4.0 +(word) sin16s::x5#0 x5 zp ZP_WORD:72 4.0 (word) sin16s::x5_128 -(word) sin16s::x5_128#0 x5_128 zp ZP_WORD:71 4.0 +(word) sin16s::x5_128#0 x5_128 zp ZP_WORD:72 4.0 (void()) sin16s_gen2((signed word*) sin16s_gen2::sintab , (word) sin16s_gen2::wavelength , (signed word) sin16s_gen2::min , (signed word) sin16s_gen2::max) -(signed dword~) sin16s_gen2::$5 $5 zp ZP_DWORD:10 22.0 -(word~) sin16s_gen2::$6 $6 zp ZP_WORD:67 11.0 +(signed dword~) sin16s_gen2::$5 $5 zp ZP_DWORD:11 22.0 +(word~) sin16s_gen2::$6 $6 zp ZP_WORD:68 11.0 (label) sin16s_gen2::@1 (label) sin16s_gen2::@2 (label) sin16s_gen2::@3 @@ -393,68 +398,69 @@ interrupt(HARDWARE_CLOBBER)(void()) irq() (signed word) sin16s_gen2::ampl (const signed word) sin16s_gen2::ampl#0 ampl = (const signed word) sin16s_gen2::max#0-(const signed word) sin16s_gen2::min#0 (word) sin16s_gen2::i -(word) sin16s_gen2::i#1 i zp ZP_WORD:34 16.5 -(word) sin16s_gen2::i#2 i zp ZP_WORD:34 1.8333333333333333 +(word) sin16s_gen2::i#1 i zp ZP_WORD:35 16.5 +(word) sin16s_gen2::i#2 i zp ZP_WORD:35 1.8333333333333333 (signed word) sin16s_gen2::max (const signed word) sin16s_gen2::max#0 max = (signed word) $1001 (signed word) sin16s_gen2::min (const signed word) sin16s_gen2::min#0 min = (signed word) -$1001 (signed word) sin16s_gen2::offs (signed word*) sin16s_gen2::sintab -(signed word*) sin16s_gen2::sintab#0 sintab zp ZP_WORD:32 5.5 -(signed word*) sin16s_gen2::sintab#2 sintab zp ZP_WORD:32 3.3000000000000003 +(signed word*) sin16s_gen2::sintab#0 sintab zp ZP_WORD:33 5.5 +(signed word*) sin16s_gen2::sintab#2 sintab zp ZP_WORD:33 3.3000000000000003 (dword) sin16s_gen2::step -(dword) sin16s_gen2::step#0 step zp ZP_DWORD:63 0.8666666666666666 +(dword) sin16s_gen2::step#0 step zp ZP_DWORD:64 0.8666666666666666 (word) sin16s_gen2::wavelength (const word) sin16s_gen2::wavelength#0 wavelength = (word) $200 (dword) sin16s_gen2::x -(dword) sin16s_gen2::x#1 x zp ZP_DWORD:28 7.333333333333333 -(dword) sin16s_gen2::x#2 x zp ZP_DWORD:28 3.0 +(dword) sin16s_gen2::x#1 x zp ZP_DWORD:29 7.333333333333333 +(dword) sin16s_gen2::x#2 x zp ZP_DWORD:29 3.0 -zp ZP_WORD:2 [ main::idx_x#3 main::idx_x#10 main::idx_x#1 ] +zp ZP_WORD:2 [ main::idx_x#11 main::idx_x#10 main::idx_x#1 ] zp ZP_WORD:4 [ main::r#10 main::r#1 mul16s::a#3 mul16s::a#1 mul16s::a#2 mul16s::a#0 sin16s::return#1 sin16s::return#5 sin16s::sinx#1 sin16s::usinx#1 sin16s::return#0 sin16s::usinx#0 ] zp ZP_WORD:6 [ main::idx_y#3 main::idx_y#10 main::idx_y#1 ] -zp ZP_WORD:8 [ mul16s::b#3 mul16s::b#1 mul16s::b#2 main::cos_x#0 main::sin_y#0 main::$28 main::$30 main::$29 main::$31 ] -zp ZP_DWORD:10 [ mul16s::m#4 mul16s::m#5 mul16s::m#1 mul16s::m#0 mul16s::m#2 mul16u::return#2 mul16s::return#0 mul16u::res#2 mul16u::res#6 mul16u::res#1 mul16u::return#3 mul16s::return#3 main::xpos#0 mul16s::return#4 main::ypos#0 mul16s::return#2 sin16s_gen2::$5 mulu16_sel::$0 mulu16_sel::$1 ] -zp ZP_WORD:14 [ mul16u::b#1 mulu16_sel::v2#5 mulu16_sel::v2#3 mulu16_sel::v2#4 mulu16_sel::v2#0 mulu16_sel::v2#1 ] -zp ZP_WORD:16 [ mul16u::a#3 mul16u::a#6 mul16u::a#8 mul16u::a#2 mul16u::a#0 ] -zp ZP_DWORD:18 [ mul16u::mb#2 mul16u::mb#0 mul16u::mb#6 mul16u::mb#1 ] -zp ZP_WORD:22 [ memset::str#2 memset::dst#2 memset::dst#3 memset::dst#1 ] -zp ZP_WORD:24 [ memset::num#2 memset::end#0 ] +zp ZP_BYTE:8 [ main::r_add#10 main::r_add#12 main::r_add#1 ] +zp ZP_WORD:9 [ mul16s::b#3 mul16s::b#1 mul16s::b#2 main::cos_x#0 main::sin_y#0 main::$32 main::$34 main::$33 main::$35 ] +zp ZP_DWORD:11 [ mul16s::m#4 mul16s::m#5 mul16s::m#1 mul16s::m#0 mul16s::m#2 mul16u::return#2 mul16s::return#0 mul16u::res#2 mul16u::res#6 mul16u::res#1 mul16u::return#3 mul16s::return#3 main::xpos#0 mul16s::return#4 main::ypos#0 mul16s::return#2 sin16s_gen2::$5 mulu16_sel::$0 mulu16_sel::$1 ] +zp ZP_WORD:15 [ mul16u::b#1 mulu16_sel::v2#5 mulu16_sel::v2#3 mulu16_sel::v2#4 mulu16_sel::v2#0 mulu16_sel::v2#1 ] +zp ZP_WORD:17 [ mul16u::a#3 mul16u::a#6 mul16u::a#8 mul16u::a#2 mul16u::a#0 ] +zp ZP_DWORD:19 [ mul16u::mb#2 mul16u::mb#0 mul16u::mb#6 mul16u::mb#1 ] +zp ZP_WORD:23 [ memset::str#2 memset::dst#2 memset::dst#3 memset::dst#1 ] +zp ZP_WORD:25 [ memset::num#2 memset::end#0 ] reg byte x [ memset::c#3 ] reg byte a [ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ] reg byte x [ bitmap_init::x#2 bitmap_init::x#1 ] reg byte x [ bitmap_init::y#2 bitmap_init::y#1 ] -zp ZP_WORD:26 [ bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 ] -zp ZP_DWORD:28 [ sin16s_gen2::x#2 sin16s_gen2::x#1 ] -zp ZP_WORD:32 [ sin16s_gen2::sintab#2 sin16s_gen2::sintab#0 ] -zp ZP_WORD:34 [ sin16s_gen2::i#2 sin16s_gen2::i#1 ] -zp ZP_BYTE:36 [ sin16s::isUpper#2 ] -zp ZP_DWORD:37 [ sin16s::x#6 sin16s::x#4 sin16s::x#0 sin16s::x#1 sin16s::x#2 sin16s::$4 ] -zp ZP_WORD:41 [ mulu16_sel::v1#5 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 sin16s::x3#0 sin16s::x2#0 sin16s::x4#0 mulu16_sel::return#1 mulu16_sel::return#10 ] +zp ZP_WORD:27 [ bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 ] +zp ZP_DWORD:29 [ sin16s_gen2::x#2 sin16s_gen2::x#1 ] +zp ZP_WORD:33 [ sin16s_gen2::sintab#2 sin16s_gen2::sintab#0 ] +zp ZP_WORD:35 [ sin16s_gen2::i#2 sin16s_gen2::i#1 ] +zp ZP_BYTE:37 [ sin16s::isUpper#2 ] +zp ZP_DWORD:38 [ sin16s::x#6 sin16s::x#4 sin16s::x#0 sin16s::x#1 sin16s::x#2 sin16s::$4 ] +zp ZP_WORD:42 [ mulu16_sel::v1#5 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 sin16s::x3#0 sin16s::x2#0 sin16s::x4#0 mulu16_sel::return#1 mulu16_sel::return#10 ] reg byte x [ mulu16_sel::select#5 ] -zp ZP_WORD:43 [ divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u::rem#11 divr16u::rem#6 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 rem16u#1 ] -zp ZP_WORD:45 [ divr16u::dividend#3 divr16u::dividend#5 divr16u::dividend#0 ] -zp ZP_WORD:47 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 divr16u::return#2 divr16u::return#3 div32u16u::quotient_lo#0 ] +zp ZP_WORD:44 [ divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u::rem#11 divr16u::rem#6 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 rem16u#1 ] +zp ZP_WORD:46 [ divr16u::dividend#3 divr16u::dividend#5 divr16u::dividend#0 ] +zp ZP_WORD:48 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 divr16u::return#2 divr16u::return#3 div32u16u::quotient_lo#0 ] reg byte x [ divr16u::i#2 divr16u::i#1 ] -zp ZP_BYTE:49 [ frame_cnt#2 frame_cnt#0 frame_cnt#1 ] -zp ZP_WORD:50 [ main::$9 main::$11 bitmap_plot::x#0 ] -zp ZP_WORD:52 [ main::$15 main::$17 main::$18 ] +zp ZP_BYTE:50 [ frame_cnt#2 frame_cnt#0 frame_cnt#1 ] +zp ZP_WORD:51 [ main::$9 main::$11 bitmap_plot::x#0 ] +zp ZP_WORD:53 [ main::$15 main::$17 main::$18 ] reg byte a [ bitmap_plot::y#0 ] -zp ZP_WORD:54 [ bitmap_plot::$3 bitmap_plot::plotter#1 ] -zp ZP_WORD:56 [ bitmap_plot::$1 ] +zp ZP_WORD:55 [ bitmap_plot::$3 bitmap_plot::plotter#1 ] +zp ZP_WORD:57 [ bitmap_plot::$1 ] reg byte a [ bitmap_plot::$2 ] -zp ZP_WORD:58 [ mul16s::$9 mul16s::$16 ] -zp ZP_WORD:60 [ mul16s::$13 mul16s::$17 ] +zp ZP_WORD:59 [ mul16s::$9 mul16s::$16 ] +zp ZP_WORD:61 [ mul16s::$13 mul16s::$17 ] reg byte a [ mul16u::$1 ] -zp ZP_BYTE:62 [ bitmap_init::$7 ] +zp ZP_BYTE:63 [ bitmap_init::$7 ] reg byte a [ bitmap_init::$4 ] reg byte a [ bitmap_init::$5 ] reg byte a [ bitmap_init::$6 ] -zp ZP_DWORD:63 [ div32u16u::return#2 sin16s_gen2::step#0 div32u16u::return#0 ] -zp ZP_WORD:67 [ sin16s_gen2::$6 ] -zp ZP_WORD:69 [ sin16s::x1#0 ] -zp ZP_WORD:71 [ mulu16_sel::return#0 mulu16_sel::return#12 mulu16_sel::return#2 sin16s::x3_6#0 mulu16_sel::return#11 sin16s::x5#0 sin16s::x5_128#0 ] -zp ZP_WORD:73 [ div32u16u::quotient_hi#0 ] +zp ZP_DWORD:64 [ div32u16u::return#2 sin16s_gen2::step#0 div32u16u::return#0 ] +zp ZP_WORD:68 [ sin16s_gen2::$6 ] +zp ZP_WORD:70 [ sin16s::x1#0 ] +zp ZP_WORD:72 [ mulu16_sel::return#0 mulu16_sel::return#12 mulu16_sel::return#2 sin16s::x3_6#0 mulu16_sel::return#11 sin16s::x5#0 sin16s::x5_128#0 ] +zp ZP_WORD:74 [ div32u16u::quotient_hi#0 ] reg byte a [ divr16u::$1 ] reg byte a [ divr16u::$2 ] diff --git a/src/test/ref/memcpy-0.asm b/src/test/ref/memcpy-0.asm new file mode 100644 index 000000000..31bfce512 --- /dev/null +++ b/src/test/ref/memcpy-0.asm @@ -0,0 +1,93 @@ +// Test memcpy - copy charset and screen +.pc = $801 "Basic" +:BasicUpstart(main) +.pc = $80d "Program" + // Processor Port Register controlling RAM/ROM configuration and the datasette + .label PROCPORT = 1 + // RAM in $A000, $E000 CHAR ROM in $D000 + .const PROCPORT_RAM_CHARROM = $31 + // BASIC in $A000, I/O in $D000, KERNEL in $E000 + .const PROCPORT_BASIC_KERNEL_IO = $37 + // The address of the CHARGEN character set + .label CHARGEN = $d000 + .label D018 = $d018 + .label CHARSET = $2000 + .label SCREEN = $400 + .label SCREEN_COPY = $2400 +main: { + .const toD0181_return = (>(SCREEN_COPY&$3fff)*4)|(>CHARSET)/4&$f + lda #toD0181_return + sta D018 + lda #<$400 + sta memcpy.num + lda #>$400 + sta memcpy.num+1 + lda #SCREEN_COPY + sta memcpy.destination+1 + lda #SCREEN + sta memcpy.source+1 + jsr memcpy + sei + lda #PROCPORT_RAM_CHARROM + sta PROCPORT + lda #<$800 + sta memcpy.num + lda #>$800 + sta memcpy.num+1 + lda #CHARSET + sta memcpy.destination+1 + lda #CHARGEN + sta memcpy.source+1 + jsr memcpy + lda #PROCPORT_BASIC_KERNEL_IO + sta PROCPORT + cli + rts +} +// Copy block of memory (forwards) +// Copies the values of num bytes from the location pointed to by source directly to the memory block pointed to by destination. +// memcpy(void* zeropage(4) destination, void* zeropage(2) source, word zeropage(6) num) +memcpy: { + .label dst = 4 + .label src = 2 + .label i = 8 + .label source = 2 + .label destination = 4 + .label num = 6 + lda #0 + sta i + sta i+1 + b1: + ldy #0 + lda (src),y + sta (dst),y + inc dst + bne !+ + inc dst+1 + !: + inc src + bne !+ + inc src+1 + !: + inc i + bne !+ + inc i+1 + !: + lda i+1 + cmp num+1 + bcc b1 + bne !+ + lda i + cmp num + bcc b1 + !: + rts +} diff --git a/src/test/ref/memcpy-0.cfg b/src/test/ref/memcpy-0.cfg new file mode 100644 index 000000000..fab0f386f --- /dev/null +++ b/src/test/ref/memcpy-0.cfg @@ -0,0 +1,51 @@ +@begin: scope:[] from + [0] phi() + to:@1 +@1: scope:[] from @begin + [1] phi() + [2] call main + to:@end +@end: scope:[] from @1 + [3] phi() +main: scope:[main] from @1 + [4] phi() + to:main::toD0181 +main::toD0181: scope:[main] from main + [5] phi() + to:main::@1 +main::@1: scope:[main] from main::toD0181 + [6] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0 + [7] call memcpy + to:main::@2 +main::@2: scope:[main] from main::@1 + asm { sei } + [9] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_CHARROM#0 + [10] call memcpy + to:main::@3 +main::@3: scope:[main] from main::@2 + [11] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_BASIC_KERNEL_IO#0 + asm { cli } + to:main::@return +main::@return: scope:[main] from main::@3 + [13] return + to:@return +memcpy: scope:[memcpy] from main::@1 main::@2 + [14] (word) memcpy::num#3 ← phi( main::@1/(word) $400 main::@2/(word) $800 ) + [14] (void*) memcpy::destination#2 ← phi( main::@1/(void*)(const byte*) SCREEN_COPY#0 main::@2/(void*)(const byte*) CHARSET#0 ) + [14] (void*) memcpy::source#2 ← phi( main::@1/(void*)(const byte*) SCREEN#0 main::@2/(void*)(const byte*) CHARGEN#0 ) + [15] (byte*~) memcpy::src#3 ← (byte*)(void*) memcpy::source#2 + [16] (byte*~) memcpy::dst#3 ← (byte*)(void*) memcpy::destination#2 + to:memcpy::@1 +memcpy::@1: scope:[memcpy] from memcpy memcpy::@1 + [17] (word) memcpy::i#2 ← phi( memcpy/(byte) 0 memcpy::@1/(word) memcpy::i#1 ) + [17] (byte*) memcpy::dst#2 ← phi( memcpy/(byte*~) memcpy::dst#3 memcpy::@1/(byte*) memcpy::dst#1 ) + [17] (byte*) memcpy::src#2 ← phi( memcpy/(byte*~) memcpy::src#3 memcpy::@1/(byte*) memcpy::src#1 ) + [18] *((byte*) memcpy::dst#2) ← *((byte*) memcpy::src#2) + [19] (byte*) memcpy::dst#1 ← ++ (byte*) memcpy::dst#2 + [20] (byte*) memcpy::src#1 ← ++ (byte*) memcpy::src#2 + [21] (word) memcpy::i#1 ← ++ (word) memcpy::i#2 + [22] if((word) memcpy::i#1<(word) memcpy::num#3) goto memcpy::@1 + to:memcpy::@return +memcpy::@return: scope:[memcpy] from memcpy::@1 + [23] return + to:@return diff --git a/src/test/ref/memcpy-0.log b/src/test/ref/memcpy-0.log new file mode 100644 index 000000000..682fa1192 --- /dev/null +++ b/src/test/ref/memcpy-0.log @@ -0,0 +1,1220 @@ +Adding pointer type conversion cast (byte*) PROCPORT_DDR in (byte*) PROCPORT_DDR ← (number) 0 +Adding pointer type conversion cast (byte*) PROCPORT in (byte*) PROCPORT ← (number) 1 +Adding pointer type conversion cast (byte*) CHARGEN in (byte*) CHARGEN ← (number) $d000 +Adding pointer type conversion cast (byte*) SPRITES_XPOS in (byte*) SPRITES_XPOS ← (number) $d000 +Adding pointer type conversion cast (byte*) SPRITES_YPOS in (byte*) SPRITES_YPOS ← (number) $d001 +Adding pointer type conversion cast (byte*) SPRITES_XMSB in (byte*) SPRITES_XMSB ← (number) $d010 +Adding pointer type conversion cast (byte*) RASTER in (byte*) RASTER ← (number) $d012 +Adding pointer type conversion cast (byte*) SPRITES_ENABLE in (byte*) SPRITES_ENABLE ← (number) $d015 +Adding pointer type conversion cast (byte*) SPRITES_EXPAND_Y in (byte*) SPRITES_EXPAND_Y ← (number) $d017 +Adding pointer type conversion cast (byte*) SPRITES_PRIORITY in (byte*) SPRITES_PRIORITY ← (number) $d01b +Adding pointer type conversion cast (byte*) SPRITES_MC in (byte*) SPRITES_MC ← (number) $d01c +Adding pointer type conversion cast (byte*) SPRITES_EXPAND_X in (byte*) SPRITES_EXPAND_X ← (number) $d01d +Adding pointer type conversion cast (byte*) BORDERCOL in (byte*) BORDERCOL ← (number) $d020 +Adding pointer type conversion cast (byte*) BGCOL in (byte*) BGCOL ← (number) $d021 +Adding pointer type conversion cast (byte*) BGCOL1 in (byte*) BGCOL1 ← (number) $d021 +Adding pointer type conversion cast (byte*) BGCOL2 in (byte*) BGCOL2 ← (number) $d022 +Adding pointer type conversion cast (byte*) BGCOL3 in (byte*) BGCOL3 ← (number) $d023 +Adding pointer type conversion cast (byte*) BGCOL4 in (byte*) BGCOL4 ← (number) $d024 +Adding pointer type conversion cast (byte*) SPRITES_MC1 in (byte*) SPRITES_MC1 ← (number) $d025 +Adding pointer type conversion cast (byte*) SPRITES_MC2 in (byte*) SPRITES_MC2 ← (number) $d026 +Adding pointer type conversion cast (byte*) SPRITES_COLS in (byte*) SPRITES_COLS ← (number) $d027 +Adding pointer type conversion cast (byte*) VIC_CONTROL in (byte*) VIC_CONTROL ← (number) $d011 +Adding pointer type conversion cast (byte*) D011 in (byte*) D011 ← (number) $d011 +Adding pointer type conversion cast (byte*) VIC_CONTROL2 in (byte*) VIC_CONTROL2 ← (number) $d016 +Adding pointer type conversion cast (byte*) D016 in (byte*) D016 ← (number) $d016 +Adding pointer type conversion cast (byte*) D018 in (byte*) D018 ← (number) $d018 +Adding pointer type conversion cast (byte*) VIC_MEMORY in (byte*) VIC_MEMORY ← (number) $d018 +Adding pointer type conversion cast (byte*) LIGHTPEN_X in (byte*) LIGHTPEN_X ← (number) $d013 +Adding pointer type conversion cast (byte*) LIGHTPEN_Y in (byte*) LIGHTPEN_Y ← (number) $d014 +Adding pointer type conversion cast (byte*) IRQ_STATUS in (byte*) IRQ_STATUS ← (number) $d019 +Adding pointer type conversion cast (byte*) IRQ_ENABLE in (byte*) IRQ_ENABLE ← (number) $d01a +Adding pointer type conversion cast (byte*) COLS in (byte*) COLS ← (number) $d800 +Adding pointer type conversion cast (byte*) CIA1_PORT_A in (byte*) CIA1_PORT_A ← (number) $dc00 +Adding pointer type conversion cast (byte*) CIA1_PORT_B in (byte*) CIA1_PORT_B ← (number) $dc01 +Adding pointer type conversion cast (byte*) CIA1_PORT_A_DDR in (byte*) CIA1_PORT_A_DDR ← (number) $dc02 +Adding pointer type conversion cast (byte*) CIA1_PORT_B_DDR in (byte*) CIA1_PORT_B_DDR ← (number) $dc03 +Adding pointer type conversion cast (byte*) CIA1_INTERRUPT in (byte*) CIA1_INTERRUPT ← (number) $dc0d +Adding pointer type conversion cast (byte*) CIA2_PORT_A in (byte*) CIA2_PORT_A ← (number) $dd00 +Adding pointer type conversion cast (byte*) CIA2_PORT_B in (byte*) CIA2_PORT_B ← (number) $dd01 +Adding pointer type conversion cast (byte*) CIA2_PORT_A_DDR in (byte*) CIA2_PORT_A_DDR ← (number) $dd02 +Adding pointer type conversion cast (byte*) CIA2_PORT_B_DDR in (byte*) CIA2_PORT_B_DDR ← (number) $dd03 +Adding pointer type conversion cast (byte*) CIA2_INTERRUPT in (byte*) CIA2_INTERRUPT ← (number) $dd0d +Adding pointer type conversion cast (void()**) KERNEL_IRQ in (void()**) KERNEL_IRQ ← (number) $314 +Adding pointer type conversion cast (void()**) HARDWARE_IRQ in (void()**) HARDWARE_IRQ ← (number) $fffe +Adding pointer type conversion cast to void pointer (byte*) memcpy::source in (byte*) memcpy::src ← (void*) memcpy::source +Adding pointer type conversion cast to void pointer (byte*) memcpy::destination in (byte*) memcpy::dst ← (void*) memcpy::destination +Adding pointer type conversion cast to void pointer (byte*) memset::str in (byte*) memset::dst ← (void*) memset::str +Adding pointer type conversion cast (byte*) CHARSET in (byte*) CHARSET ← (number) $2000 +Adding pointer type conversion cast (byte*) SCREEN in (byte*) SCREEN ← (number) $400 +Adding pointer type conversion cast (byte*) SCREEN_COPY in (byte*) SCREEN_COPY ← (number) $2400 +Adding void pointer type conversion cast (void*) SCREEN_COPY in (void*~) main::$1 ← call memcpy (byte*) SCREEN_COPY (byte*) SCREEN (number) $400 +Adding void pointer type conversion cast (void*) SCREEN in (void*~) main::$1 ← call memcpy (void*)(byte*) SCREEN_COPY (byte*) SCREEN (number) $400 +Adding void pointer type conversion cast (void*) CHARSET in (void*~) main::$2 ← call memcpy (byte*) CHARSET (byte*) CHARGEN (number) $800 +Adding void pointer type conversion cast (void*) CHARGEN in (void*~) main::$2 ← call memcpy (void*)(byte*) CHARSET (byte*) CHARGEN (number) $800 +Warning! Adding boolean cast to non-boolean condition *((byte*) strcpy::src) +Inlined call (byte~) vicSelectGfxBank::$0 ← call toDd00 (byte*) vicSelectGfxBank::gfx +Inlined call (byte~) main::$0 ← call toD018 (byte*) SCREEN_COPY (byte*) CHARSET +Culled Empty Block (label) @1 +Culled Empty Block (label) @2 +Culled Empty Block (label) @3 +Culled Empty Block (label) @4 +Culled Empty Block (label) memcpy::@3 +Culled Empty Block (label) @5 +Culled Empty Block (label) @6 +Culled Empty Block (label) @7 +Culled Empty Block (label) main::toD0181_@1 + +CONTROL FLOW GRAPH SSA +@begin: scope:[] from + (byte*) PROCPORT#0 ← ((byte*)) (number) 1 + (byte) PROCPORT_RAM_CHARROM#0 ← (number) $31 + (byte) PROCPORT_BASIC_KERNEL_IO#0 ← (number) $37 + (byte*) CHARGEN#0 ← ((byte*)) (number) $d000 + (byte*) D018#0 ← ((byte*)) (number) $d018 + to:@8 +memcpy: scope:[memcpy] from main::@1 main::@2 + (word) memcpy::num#3 ← phi( main::@1/(word) memcpy::num#0 main::@2/(word) memcpy::num#1 ) + (void*) memcpy::destination#2 ← phi( main::@1/(void*) memcpy::destination#0 main::@2/(void*) memcpy::destination#1 ) + (void*) memcpy::source#2 ← phi( main::@1/(void*) memcpy::source#0 main::@2/(void*) memcpy::source#1 ) + (byte*) memcpy::src#0 ← ((byte*)) (void*) memcpy::source#2 + (byte*) memcpy::dst#0 ← ((byte*)) (void*) memcpy::destination#2 + (word) memcpy::i#0 ← (number) 0 + to:memcpy::@1 +memcpy::@1: scope:[memcpy] from memcpy memcpy::@1 + (void*) memcpy::destination#4 ← phi( memcpy/(void*) memcpy::destination#2 memcpy::@1/(void*) memcpy::destination#4 ) + (word) memcpy::num#2 ← phi( memcpy/(word) memcpy::num#3 memcpy::@1/(word) memcpy::num#2 ) + (word) memcpy::i#2 ← phi( memcpy/(word) memcpy::i#0 memcpy::@1/(word) memcpy::i#1 ) + (byte*) memcpy::dst#2 ← phi( memcpy/(byte*) memcpy::dst#0 memcpy::@1/(byte*) memcpy::dst#1 ) + (byte*) memcpy::src#2 ← phi( memcpy/(byte*) memcpy::src#0 memcpy::@1/(byte*) memcpy::src#1 ) + *((byte*) memcpy::dst#2) ← *((byte*) memcpy::src#2) + (byte*) memcpy::dst#1 ← ++ (byte*) memcpy::dst#2 + (byte*) memcpy::src#1 ← ++ (byte*) memcpy::src#2 + (word) memcpy::i#1 ← ++ (word) memcpy::i#2 + (bool~) memcpy::$0 ← (word) memcpy::i#1 < (word) memcpy::num#2 + if((bool~) memcpy::$0) goto memcpy::@1 + to:memcpy::@2 +memcpy::@2: scope:[memcpy] from memcpy::@1 + (void*) memcpy::destination#3 ← phi( memcpy::@1/(void*) memcpy::destination#4 ) + (void*) memcpy::return#0 ← (void*) memcpy::destination#3 + to:memcpy::@return +memcpy::@return: scope:[memcpy] from memcpy::@2 + (void*) memcpy::return#4 ← phi( memcpy::@2/(void*) memcpy::return#0 ) + (void*) memcpy::return#1 ← (void*) memcpy::return#4 + return + to:@return +@8: scope:[] from @begin + (byte*) CHARSET#0 ← ((byte*)) (number) $2000 + (byte*) SCREEN#0 ← ((byte*)) (number) $400 + (byte*) SCREEN_COPY#0 ← ((byte*)) (number) $2400 + to:@9 +main: scope:[main] from @9 + (byte*) main::toD0181_screen#0 ← (byte*) SCREEN_COPY#0 + (byte*) main::toD0181_gfx#0 ← (byte*) CHARSET#0 + to:main::toD0181 +main::toD0181: scope:[main] from main + (byte*) main::toD0181_gfx#1 ← phi( main/(byte*) main::toD0181_gfx#0 ) + (byte*) main::toD0181_screen#1 ← phi( main/(byte*) main::toD0181_screen#0 ) + (word~) main::toD0181_$0#0 ← ((word)) (byte*) main::toD0181_screen#1 + (number~) main::toD0181_$1#0 ← (word~) main::toD0181_$0#0 & (number) $3fff + (number~) main::toD0181_$2#0 ← (number~) main::toD0181_$1#0 * (number) 4 + (number~) main::toD0181_$3#0 ← > (number~) main::toD0181_$2#0 + (word~) main::toD0181_$4#0 ← ((word)) (byte*) main::toD0181_gfx#1 + (byte~) main::toD0181_$5#0 ← > (word~) main::toD0181_$4#0 + (number~) main::toD0181_$6#0 ← (byte~) main::toD0181_$5#0 / (number) 4 + (number~) main::toD0181_$7#0 ← (number~) main::toD0181_$6#0 & (number) $f + (number~) main::toD0181_$8#0 ← (number~) main::toD0181_$3#0 | (number~) main::toD0181_$7#0 + (byte) main::toD0181_return#0 ← (number~) main::toD0181_$8#0 + to:main::toD0181_@return +main::toD0181_@return: scope:[main] from main::toD0181 + (byte) main::toD0181_return#2 ← phi( main::toD0181/(byte) main::toD0181_return#0 ) + (byte) main::toD0181_return#1 ← (byte) main::toD0181_return#2 + to:main::@1 +main::@1: scope:[main] from main::toD0181_@return + (byte) main::toD0181_return#3 ← phi( main::toD0181_@return/(byte) main::toD0181_return#1 ) + (byte~) main::$0 ← (byte) main::toD0181_return#3 + *((byte*) D018#0) ← (byte~) main::$0 + (void*) memcpy::destination#0 ← (void*)(byte*) SCREEN_COPY#0 + (void*) memcpy::source#0 ← (void*)(byte*) SCREEN#0 + (word) memcpy::num#0 ← (number) $400 + call memcpy + (void*) memcpy::return#2 ← (void*) memcpy::return#1 + to:main::@2 +main::@2: scope:[main] from main::@1 + asm { sei } + *((byte*) PROCPORT#0) ← (byte) PROCPORT_RAM_CHARROM#0 + (void*) memcpy::destination#1 ← (void*)(byte*) CHARSET#0 + (void*) memcpy::source#1 ← (void*)(byte*) CHARGEN#0 + (word) memcpy::num#1 ← (number) $800 + call memcpy + (void*) memcpy::return#3 ← (void*) memcpy::return#1 + to:main::@3 +main::@3: scope:[main] from main::@2 + *((byte*) PROCPORT#0) ← (byte) PROCPORT_BASIC_KERNEL_IO#0 + asm { cli } + to:main::@return +main::@return: scope:[main] from main::@3 + return + to:@return +@9: scope:[] from @8 + call main + to:@10 +@10: scope:[] from @9 + to:@end +@end: scope:[] from @10 + +SYMBOL TABLE SSA +(label) @10 +(label) @8 +(label) @9 +(label) @begin +(label) @end +(byte*) CHARGEN +(byte*) CHARGEN#0 +(byte*) CHARSET +(byte*) CHARSET#0 +(byte*) D018 +(byte*) D018#0 +(byte*) PROCPORT +(byte*) PROCPORT#0 +(byte) PROCPORT_BASIC_KERNEL_IO +(byte) PROCPORT_BASIC_KERNEL_IO#0 +(byte) PROCPORT_RAM_CHARROM +(byte) PROCPORT_RAM_CHARROM#0 +(byte*) SCREEN +(byte*) SCREEN#0 +(byte*) SCREEN_COPY +(byte*) SCREEN_COPY#0 +(void()) main() +(byte~) main::$0 +(label) main::@1 +(label) main::@2 +(label) main::@3 +(label) main::@return +(label) main::toD0181 +(word~) main::toD0181_$0 +(word~) main::toD0181_$0#0 +(number~) main::toD0181_$1 +(number~) main::toD0181_$1#0 +(number~) main::toD0181_$2 +(number~) main::toD0181_$2#0 +(number~) main::toD0181_$3 +(number~) main::toD0181_$3#0 +(word~) main::toD0181_$4 +(word~) main::toD0181_$4#0 +(byte~) main::toD0181_$5 +(byte~) main::toD0181_$5#0 +(number~) main::toD0181_$6 +(number~) main::toD0181_$6#0 +(number~) main::toD0181_$7 +(number~) main::toD0181_$7#0 +(number~) main::toD0181_$8 +(number~) main::toD0181_$8#0 +(label) main::toD0181_@return +(byte*) main::toD0181_gfx +(byte*) main::toD0181_gfx#0 +(byte*) main::toD0181_gfx#1 +(byte) main::toD0181_return +(byte) main::toD0181_return#0 +(byte) main::toD0181_return#1 +(byte) main::toD0181_return#2 +(byte) main::toD0181_return#3 +(byte*) main::toD0181_screen +(byte*) main::toD0181_screen#0 +(byte*) main::toD0181_screen#1 +(void*()) memcpy((void*) memcpy::destination , (void*) memcpy::source , (word) memcpy::num) +(bool~) memcpy::$0 +(label) memcpy::@1 +(label) memcpy::@2 +(label) memcpy::@return +(void*) memcpy::destination +(void*) memcpy::destination#0 +(void*) memcpy::destination#1 +(void*) memcpy::destination#2 +(void*) memcpy::destination#3 +(void*) memcpy::destination#4 +(byte*) memcpy::dst +(byte*) memcpy::dst#0 +(byte*) memcpy::dst#1 +(byte*) memcpy::dst#2 +(word) memcpy::i +(word) memcpy::i#0 +(word) memcpy::i#1 +(word) memcpy::i#2 +(word) memcpy::num +(word) memcpy::num#0 +(word) memcpy::num#1 +(word) memcpy::num#2 +(word) memcpy::num#3 +(void*) memcpy::return +(void*) memcpy::return#0 +(void*) memcpy::return#1 +(void*) memcpy::return#2 +(void*) memcpy::return#3 +(void*) memcpy::return#4 +(void*) memcpy::source +(void*) memcpy::source#0 +(void*) memcpy::source#1 +(void*) memcpy::source#2 +(byte*) memcpy::src +(byte*) memcpy::src#0 +(byte*) memcpy::src#1 +(byte*) memcpy::src#2 + +Adding number conversion cast (unumber) $31 in (byte) PROCPORT_RAM_CHARROM#0 ← (number) $31 +Adding number conversion cast (unumber) $37 in (byte) PROCPORT_BASIC_KERNEL_IO#0 ← (number) $37 +Adding number conversion cast (unumber) 0 in (word) memcpy::i#0 ← (number) 0 +Adding number conversion cast (unumber) $3fff in (number~) main::toD0181_$1#0 ← (word~) main::toD0181_$0#0 & (number) $3fff +Adding number conversion cast (unumber) main::toD0181_$1#0 in (number~) main::toD0181_$1#0 ← (word~) main::toD0181_$0#0 & (unumber)(number) $3fff +Adding number conversion cast (unumber) 4 in (number~) main::toD0181_$2#0 ← (unumber~) main::toD0181_$1#0 * (number) 4 +Adding number conversion cast (unumber) main::toD0181_$2#0 in (number~) main::toD0181_$2#0 ← (unumber~) main::toD0181_$1#0 * (unumber)(number) 4 +Adding number conversion cast (unumber) main::toD0181_$3#0 in (number~) main::toD0181_$3#0 ← > (unumber~) main::toD0181_$2#0 +Adding number conversion cast (unumber) 4 in (number~) main::toD0181_$6#0 ← (byte~) main::toD0181_$5#0 / (number) 4 +Adding number conversion cast (unumber) main::toD0181_$6#0 in (number~) main::toD0181_$6#0 ← (byte~) main::toD0181_$5#0 / (unumber)(number) 4 +Adding number conversion cast (unumber) $f in (number~) main::toD0181_$7#0 ← (unumber~) main::toD0181_$6#0 & (number) $f +Adding number conversion cast (unumber) main::toD0181_$7#0 in (number~) main::toD0181_$7#0 ← (unumber~) main::toD0181_$6#0 & (unumber)(number) $f +Adding number conversion cast (unumber) main::toD0181_$8#0 in (number~) main::toD0181_$8#0 ← (unumber~) main::toD0181_$3#0 | (unumber~) main::toD0181_$7#0 +Adding number conversion cast (unumber) $400 in (word) memcpy::num#0 ← (number) $400 +Adding number conversion cast (unumber) $800 in (word) memcpy::num#1 ← (number) $800 +Successful SSA optimization PassNAddNumberTypeConversions +Inlining cast (byte*) PROCPORT#0 ← (byte*)(number) 1 +Inlining cast (byte) PROCPORT_RAM_CHARROM#0 ← (unumber)(number) $31 +Inlining cast (byte) PROCPORT_BASIC_KERNEL_IO#0 ← (unumber)(number) $37 +Inlining cast (byte*) CHARGEN#0 ← (byte*)(number) $d000 +Inlining cast (byte*) D018#0 ← (byte*)(number) $d018 +Inlining cast (byte*) memcpy::src#0 ← (byte*)(void*) memcpy::source#2 +Inlining cast (byte*) memcpy::dst#0 ← (byte*)(void*) memcpy::destination#2 +Inlining cast (word) memcpy::i#0 ← (unumber)(number) 0 +Inlining cast (byte*) CHARSET#0 ← (byte*)(number) $2000 +Inlining cast (byte*) SCREEN#0 ← (byte*)(number) $400 +Inlining cast (byte*) SCREEN_COPY#0 ← (byte*)(number) $2400 +Inlining cast (word~) main::toD0181_$0#0 ← (word)(byte*) main::toD0181_screen#1 +Inlining cast (word~) main::toD0181_$4#0 ← (word)(byte*) main::toD0181_gfx#1 +Inlining cast (word) memcpy::num#0 ← (unumber)(number) $400 +Inlining cast (word) memcpy::num#1 ← (unumber)(number) $800 +Successful SSA optimization Pass2InlineCast +Simplifying constant pointer cast (byte*) 1 +Simplifying constant integer cast $31 +Simplifying constant integer cast $37 +Simplifying constant pointer cast (byte*) 53248 +Simplifying constant pointer cast (byte*) 53272 +Simplifying constant integer cast 0 +Simplifying constant pointer cast (byte*) 8192 +Simplifying constant pointer cast (byte*) 1024 +Simplifying constant pointer cast (byte*) 9216 +Simplifying constant integer cast $3fff +Simplifying constant integer cast 4 +Simplifying constant integer cast 4 +Simplifying constant integer cast $f +Simplifying constant integer cast $400 +Simplifying constant integer cast $800 +Successful SSA optimization PassNCastSimplification +Finalized unsigned number type (byte) $31 +Finalized unsigned number type (byte) $37 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (word) $3fff +Finalized unsigned number type (byte) 4 +Finalized unsigned number type (byte) 4 +Finalized unsigned number type (byte) $f +Finalized unsigned number type (word) $400 +Finalized unsigned number type (word) $800 +Successful SSA optimization PassNFinalizeNumberTypeConversions +Inferred type updated to word in (unumber~) main::toD0181_$1#0 ← (word~) main::toD0181_$0#0 & (word) $3fff +Inferred type updated to word in (unumber~) main::toD0181_$2#0 ← (word~) main::toD0181_$1#0 * (byte) 4 +Inferred type updated to byte in (unumber~) main::toD0181_$3#0 ← > (word~) main::toD0181_$2#0 +Inferred type updated to byte in (unumber~) main::toD0181_$6#0 ← (byte~) main::toD0181_$5#0 / (byte) 4 +Inferred type updated to byte in (unumber~) main::toD0181_$7#0 ← (byte~) main::toD0181_$6#0 & (byte) $f +Inferred type updated to byte in (unumber~) main::toD0181_$8#0 ← (byte~) main::toD0181_$3#0 | (byte~) main::toD0181_$7#0 +Alias (void*) memcpy::return#0 = (void*) memcpy::destination#3 (void*) memcpy::destination#4 (void*) memcpy::return#4 (void*) memcpy::return#1 +Alias (byte*) main::toD0181_screen#0 = (byte*) main::toD0181_screen#1 +Alias (byte*) main::toD0181_gfx#0 = (byte*) main::toD0181_gfx#1 +Alias (byte) main::toD0181_return#0 = (byte~) main::toD0181_$8#0 (byte) main::toD0181_return#2 (byte) main::toD0181_return#1 (byte) main::toD0181_return#3 (byte~) main::$0 +Successful SSA optimization Pass2AliasElimination +Self Phi Eliminated (word) memcpy::num#2 +Self Phi Eliminated (void*) memcpy::return#0 +Successful SSA optimization Pass2SelfPhiElimination +Identical Phi Values (word) memcpy::num#2 (word) memcpy::num#3 +Identical Phi Values (void*) memcpy::return#0 (void*) memcpy::destination#2 +Successful SSA optimization Pass2IdenticalPhiElimination +Simple Condition (bool~) memcpy::$0 [15] if((word) memcpy::i#1<(word) memcpy::num#3) goto memcpy::@1 +Successful SSA optimization Pass2ConditionalJumpSimplification +Constant (const byte*) PROCPORT#0 = (byte*) 1 +Constant (const byte) PROCPORT_RAM_CHARROM#0 = $31 +Constant (const byte) PROCPORT_BASIC_KERNEL_IO#0 = $37 +Constant (const byte*) CHARGEN#0 = (byte*) 53248 +Constant (const byte*) D018#0 = (byte*) 53272 +Constant (const word) memcpy::i#0 = 0 +Constant (const byte*) CHARSET#0 = (byte*) 8192 +Constant (const byte*) SCREEN#0 = (byte*) 1024 +Constant (const byte*) SCREEN_COPY#0 = (byte*) 9216 +Constant (const word) memcpy::num#0 = $400 +Constant (const word) memcpy::num#1 = $800 +Successful SSA optimization Pass2ConstantIdentification +Constant (const byte*) main::toD0181_screen#0 = SCREEN_COPY#0 +Constant (const byte*) main::toD0181_gfx#0 = CHARSET#0 +Successful SSA optimization Pass2ConstantIdentification +Constant value identified (word)main::toD0181_screen#0 in [27] (word~) main::toD0181_$0#0 ← (word)(const byte*) main::toD0181_screen#0 +Constant value identified (word)main::toD0181_gfx#0 in [31] (word~) main::toD0181_$4#0 ← (word)(const byte*) main::toD0181_gfx#0 +Constant value identified (void*)SCREEN_COPY#0 in [42] (void*) memcpy::destination#0 ← (void*)(const byte*) SCREEN_COPY#0 +Constant value identified (void*)SCREEN#0 in [43] (void*) memcpy::source#0 ← (void*)(const byte*) SCREEN#0 +Constant value identified (void*)CHARSET#0 in [49] (void*) memcpy::destination#1 ← (void*)(const byte*) CHARSET#0 +Constant value identified (void*)CHARGEN#0 in [50] (void*) memcpy::source#1 ← (void*)(const byte*) CHARGEN#0 +Successful SSA optimization Pass2ConstantValues +Eliminating unused variable (void*) memcpy::return#2 and assignment [23] (void*) memcpy::return#2 ← (void*) memcpy::destination#2 +Eliminating unused variable (void*) memcpy::return#3 and assignment [29] (void*) memcpy::return#3 ← (void*) memcpy::destination#2 +Successful SSA optimization PassNEliminateUnusedVars +Constant (const word) main::toD0181_$0#0 = (word)main::toD0181_screen#0 +Constant (const word) main::toD0181_$4#0 = (word)main::toD0181_gfx#0 +Constant (const void*) memcpy::destination#0 = (void*)SCREEN_COPY#0 +Constant (const void*) memcpy::source#0 = (void*)SCREEN#0 +Constant (const void*) memcpy::destination#1 = (void*)CHARSET#0 +Constant (const void*) memcpy::source#1 = (void*)CHARGEN#0 +Successful SSA optimization Pass2ConstantIdentification +Constant right-side identified [10] (word~) main::toD0181_$1#0 ← (const word) main::toD0181_$0#0 & (word) $3fff +Constant right-side identified [13] (byte~) main::toD0181_$5#0 ← > (const word) main::toD0181_$4#0 +Successful SSA optimization Pass2ConstantRValueConsolidation +Constant (const word) main::toD0181_$1#0 = main::toD0181_$0#0&$3fff +Constant (const byte) main::toD0181_$5#0 = >main::toD0181_$4#0 +Successful SSA optimization Pass2ConstantIdentification +Constant right-side identified [10] (word~) main::toD0181_$2#0 ← (const word) main::toD0181_$1#0 * (byte) 4 +Constant right-side identified [12] (byte~) main::toD0181_$6#0 ← (const byte) main::toD0181_$5#0 / (byte) 4 +Successful SSA optimization Pass2ConstantRValueConsolidation +Constant (const word) main::toD0181_$2#0 = main::toD0181_$1#0*4 +Constant (const byte) main::toD0181_$6#0 = main::toD0181_$5#0/4 +Successful SSA optimization Pass2ConstantIdentification +Constant right-side identified [10] (byte~) main::toD0181_$3#0 ← > (const word) main::toD0181_$2#0 +Constant right-side identified [11] (byte~) main::toD0181_$7#0 ← (const byte) main::toD0181_$6#0 & (byte) $f +Successful SSA optimization Pass2ConstantRValueConsolidation +Constant (const byte) main::toD0181_$3#0 = >main::toD0181_$2#0 +Constant (const byte) main::toD0181_$7#0 = main::toD0181_$6#0&$f +Successful SSA optimization Pass2ConstantIdentification +Constant right-side identified [10] (byte) main::toD0181_return#0 ← (const byte) main::toD0181_$3#0 | (const byte) main::toD0181_$7#0 +Successful SSA optimization Pass2ConstantRValueConsolidation +Constant (const byte) main::toD0181_return#0 = main::toD0181_$3#0|main::toD0181_$7#0 +Successful SSA optimization Pass2ConstantIdentification +Inlining Noop Cast [1] (byte*) memcpy::src#0 ← (byte*)(void*) memcpy::source#2 keeping memcpy::source#2 +Inlining Noop Cast [2] (byte*) memcpy::dst#0 ← (byte*)(void*) memcpy::destination#2 keeping memcpy::destination#2 +Successful SSA optimization Pass2NopCastInlining +Inlining constant with var siblings (const word) memcpy::i#0 +Inlining constant with var siblings (const word) memcpy::num#0 +Inlining constant with var siblings (const word) memcpy::num#1 +Inlining constant with var siblings (const void*) memcpy::destination#0 +Inlining constant with var siblings (const void*) memcpy::source#0 +Inlining constant with var siblings (const void*) memcpy::destination#1 +Inlining constant with var siblings (const void*) memcpy::source#1 +Constant inlined main::toD0181_screen#0 = (const byte*) SCREEN_COPY#0 +Constant inlined main::toD0181_gfx#0 = (const byte*) CHARSET#0 +Constant inlined main::toD0181_$0#0 = (word)(const byte*) SCREEN_COPY#0 +Constant inlined memcpy::destination#0 = (void*)(const byte*) SCREEN_COPY#0 +Constant inlined main::toD0181_$1#0 = (word)(const byte*) SCREEN_COPY#0&(word) $3fff +Constant inlined memcpy::destination#1 = (void*)(const byte*) CHARSET#0 +Constant inlined memcpy::source#0 = (void*)(const byte*) SCREEN#0 +Constant inlined memcpy::i#0 = (byte) 0 +Constant inlined main::toD0181_$6#0 = >(word)(const byte*) CHARSET#0/(byte) 4 +Constant inlined memcpy::num#1 = (word) $800 +Constant inlined main::toD0181_$7#0 = >(word)(const byte*) CHARSET#0/(byte) 4&(byte) $f +Constant inlined memcpy::num#0 = (word) $400 +Constant inlined memcpy::source#1 = (void*)(const byte*) CHARGEN#0 +Constant inlined main::toD0181_$2#0 = (word)(const byte*) SCREEN_COPY#0&(word) $3fff*(byte) 4 +Constant inlined main::toD0181_$3#0 = >(word)(const byte*) SCREEN_COPY#0&(word) $3fff*(byte) 4 +Constant inlined main::toD0181_$4#0 = (word)(const byte*) CHARSET#0 +Constant inlined main::toD0181_$5#0 = >(word)(const byte*) CHARSET#0 +Successful SSA optimization Pass2ConstantInlining +Added new block during phi lifting memcpy::@4(between memcpy::@1 and memcpy::@1) +Adding NOP phi() at start of @begin +Adding NOP phi() at start of @8 +Adding NOP phi() at start of @9 +Adding NOP phi() at start of @10 +Adding NOP phi() at start of @end +Adding NOP phi() at start of main +Adding NOP phi() at start of main::toD0181 +Adding NOP phi() at start of main::toD0181_@return +Adding NOP phi() at start of memcpy::@2 +CALL GRAPH +Calls in [] to main:3 +Calls in [main] to memcpy:10 memcpy:13 + +Created 6 initial phi equivalence classes +Coalesced [28] memcpy::src#4 ← memcpy::src#1 +Coalesced [29] memcpy::dst#4 ← memcpy::dst#1 +Coalesced [30] memcpy::i#3 ← memcpy::i#1 +Coalesced down to 6 phi equivalence classes +Culled Empty Block (label) @8 +Culled Empty Block (label) @10 +Culled Empty Block (label) main::toD0181_@return +Culled Empty Block (label) memcpy::@2 +Culled Empty Block (label) memcpy::@4 +Renumbering block @9 to @1 +Adding NOP phi() at start of @begin +Adding NOP phi() at start of @1 +Adding NOP phi() at start of @end +Adding NOP phi() at start of main +Adding NOP phi() at start of main::toD0181 + +FINAL CONTROL FLOW GRAPH +@begin: scope:[] from + [0] phi() + to:@1 +@1: scope:[] from @begin + [1] phi() + [2] call main + to:@end +@end: scope:[] from @1 + [3] phi() +main: scope:[main] from @1 + [4] phi() + to:main::toD0181 +main::toD0181: scope:[main] from main + [5] phi() + to:main::@1 +main::@1: scope:[main] from main::toD0181 + [6] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0 + [7] call memcpy + to:main::@2 +main::@2: scope:[main] from main::@1 + asm { sei } + [9] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_CHARROM#0 + [10] call memcpy + to:main::@3 +main::@3: scope:[main] from main::@2 + [11] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_BASIC_KERNEL_IO#0 + asm { cli } + to:main::@return +main::@return: scope:[main] from main::@3 + [13] return + to:@return +memcpy: scope:[memcpy] from main::@1 main::@2 + [14] (word) memcpy::num#3 ← phi( main::@1/(word) $400 main::@2/(word) $800 ) + [14] (void*) memcpy::destination#2 ← phi( main::@1/(void*)(const byte*) SCREEN_COPY#0 main::@2/(void*)(const byte*) CHARSET#0 ) + [14] (void*) memcpy::source#2 ← phi( main::@1/(void*)(const byte*) SCREEN#0 main::@2/(void*)(const byte*) CHARGEN#0 ) + [15] (byte*~) memcpy::src#3 ← (byte*)(void*) memcpy::source#2 + [16] (byte*~) memcpy::dst#3 ← (byte*)(void*) memcpy::destination#2 + to:memcpy::@1 +memcpy::@1: scope:[memcpy] from memcpy memcpy::@1 + [17] (word) memcpy::i#2 ← phi( memcpy/(byte) 0 memcpy::@1/(word) memcpy::i#1 ) + [17] (byte*) memcpy::dst#2 ← phi( memcpy/(byte*~) memcpy::dst#3 memcpy::@1/(byte*) memcpy::dst#1 ) + [17] (byte*) memcpy::src#2 ← phi( memcpy/(byte*~) memcpy::src#3 memcpy::@1/(byte*) memcpy::src#1 ) + [18] *((byte*) memcpy::dst#2) ← *((byte*) memcpy::src#2) + [19] (byte*) memcpy::dst#1 ← ++ (byte*) memcpy::dst#2 + [20] (byte*) memcpy::src#1 ← ++ (byte*) memcpy::src#2 + [21] (word) memcpy::i#1 ← ++ (word) memcpy::i#2 + [22] if((word) memcpy::i#1<(word) memcpy::num#3) goto memcpy::@1 + to:memcpy::@return +memcpy::@return: scope:[memcpy] from memcpy::@1 + [23] return + to:@return + + +VARIABLE REGISTER WEIGHTS +(byte*) CHARGEN +(byte*) CHARSET +(byte*) D018 +(byte*) PROCPORT +(byte) PROCPORT_BASIC_KERNEL_IO +(byte) PROCPORT_RAM_CHARROM +(byte*) SCREEN +(byte*) SCREEN_COPY +(void()) main() +(word~) main::toD0181_$0 +(number~) main::toD0181_$1 +(number~) main::toD0181_$2 +(number~) main::toD0181_$3 +(word~) main::toD0181_$4 +(byte~) main::toD0181_$5 +(number~) main::toD0181_$6 +(number~) main::toD0181_$7 +(number~) main::toD0181_$8 +(byte*) main::toD0181_gfx +(byte) main::toD0181_return +(byte*) main::toD0181_screen +(void*()) memcpy((void*) memcpy::destination , (void*) memcpy::source , (word) memcpy::num) +(void*) memcpy::destination +(void*) memcpy::destination#2 +(byte*) memcpy::dst +(byte*) memcpy::dst#1 5.5 +(byte*) memcpy::dst#2 17.5 +(byte*~) memcpy::dst#3 4.0 +(word) memcpy::i +(word) memcpy::i#1 16.5 +(word) memcpy::i#2 5.5 +(word) memcpy::num +(word) memcpy::num#3 1.2222222222222223 +(void*) memcpy::return +(void*) memcpy::source +(void*) memcpy::source#2 +(byte*) memcpy::src +(byte*) memcpy::src#1 7.333333333333333 +(byte*) memcpy::src#2 11.666666666666666 +(byte*~) memcpy::src#3 2.0 + +Initial phi equivalence classes +[ memcpy::source#2 ] +[ memcpy::destination#2 ] +[ memcpy::num#3 ] +[ memcpy::src#2 memcpy::src#3 memcpy::src#1 ] +[ memcpy::dst#2 memcpy::dst#3 memcpy::dst#1 ] +[ memcpy::i#2 memcpy::i#1 ] +Complete equivalence classes +[ memcpy::source#2 ] +[ memcpy::destination#2 ] +[ memcpy::num#3 ] +[ memcpy::src#2 memcpy::src#3 memcpy::src#1 ] +[ memcpy::dst#2 memcpy::dst#3 memcpy::dst#1 ] +[ memcpy::i#2 memcpy::i#1 ] +Allocated zp ZP_WORD:2 [ memcpy::source#2 ] +Allocated zp ZP_WORD:4 [ memcpy::destination#2 ] +Allocated zp ZP_WORD:6 [ memcpy::num#3 ] +Allocated zp ZP_WORD:8 [ memcpy::src#2 memcpy::src#3 memcpy::src#1 ] +Allocated zp ZP_WORD:10 [ memcpy::dst#2 memcpy::dst#3 memcpy::dst#1 ] +Allocated zp ZP_WORD:12 [ memcpy::i#2 memcpy::i#1 ] + +INITIAL ASM +//SEG0 File Comments +// Test memcpy - copy charset and screen +//SEG1 Basic Upstart +.pc = $801 "Basic" +:BasicUpstart(bbegin) +.pc = $80d "Program" +//SEG2 Global Constants & labels + // Processor Port Register controlling RAM/ROM configuration and the datasette + .label PROCPORT = 1 + // RAM in $A000, $E000 CHAR ROM in $D000 + .const PROCPORT_RAM_CHARROM = $31 + // BASIC in $A000, I/O in $D000, KERNEL in $E000 + .const PROCPORT_BASIC_KERNEL_IO = $37 + // The address of the CHARGEN character set + .label CHARGEN = $d000 + .label D018 = $d018 + .label CHARSET = $2000 + .label SCREEN = $400 + .label SCREEN_COPY = $2400 +//SEG3 @begin +bbegin: +//SEG4 [1] phi from @begin to @1 [phi:@begin->@1] +b1_from_bbegin: + jmp b1 +//SEG5 @1 +b1: +//SEG6 [2] call main +//SEG7 [4] phi from @1 to main [phi:@1->main] +main_from_b1: + jsr main +//SEG8 [3] phi from @1 to @end [phi:@1->@end] +bend_from_b1: + jmp bend +//SEG9 @end +bend: +//SEG10 main +main: { + .const toD0181_return = (>(SCREEN_COPY&$3fff)*4)|(>CHARSET)/4&$f + //SEG11 [5] phi from main to main::toD0181 [phi:main->main::toD0181] + toD0181_from_main: + jmp toD0181 + //SEG12 main::toD0181 + toD0181: + jmp b1 + //SEG13 main::@1 + b1: + //SEG14 [6] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0 -- _deref_pbuc1=vbuc2 + lda #toD0181_return + sta D018 + //SEG15 [7] call memcpy + //SEG16 [14] phi from main::@1 to memcpy [phi:main::@1->memcpy] + memcpy_from_b1: + //SEG17 [14] phi (word) memcpy::num#3 = (word) $400 [phi:main::@1->memcpy#0] -- vwuz1=vwuc1 + lda #<$400 + sta memcpy.num + lda #>$400 + sta memcpy.num+1 + //SEG18 [14] phi (void*) memcpy::destination#2 = (void*)(const byte*) SCREEN_COPY#0 [phi:main::@1->memcpy#1] -- pvoz1=pvoc1 + lda #SCREEN_COPY + sta memcpy.destination+1 + //SEG19 [14] phi (void*) memcpy::source#2 = (void*)(const byte*) SCREEN#0 [phi:main::@1->memcpy#2] -- pvoz1=pvoc1 + lda #SCREEN + sta memcpy.source+1 + jsr memcpy + jmp b2 + //SEG20 main::@2 + b2: + //SEG21 asm { sei } + sei + //SEG22 [9] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_CHARROM#0 -- _deref_pbuc1=vbuc2 + lda #PROCPORT_RAM_CHARROM + sta PROCPORT + //SEG23 [10] call memcpy + //SEG24 [14] phi from main::@2 to memcpy [phi:main::@2->memcpy] + memcpy_from_b2: + //SEG25 [14] phi (word) memcpy::num#3 = (word) $800 [phi:main::@2->memcpy#0] -- vwuz1=vwuc1 + lda #<$800 + sta memcpy.num + lda #>$800 + sta memcpy.num+1 + //SEG26 [14] phi (void*) memcpy::destination#2 = (void*)(const byte*) CHARSET#0 [phi:main::@2->memcpy#1] -- pvoz1=pvoc1 + lda #CHARSET + sta memcpy.destination+1 + //SEG27 [14] phi (void*) memcpy::source#2 = (void*)(const byte*) CHARGEN#0 [phi:main::@2->memcpy#2] -- pvoz1=pvoc1 + lda #CHARGEN + sta memcpy.source+1 + jsr memcpy + jmp b3 + //SEG28 main::@3 + b3: + //SEG29 [11] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_BASIC_KERNEL_IO#0 -- _deref_pbuc1=vbuc2 + lda #PROCPORT_BASIC_KERNEL_IO + sta PROCPORT + //SEG30 asm { cli } + cli + jmp breturn + //SEG31 main::@return + breturn: + //SEG32 [13] return + rts +} +//SEG33 memcpy +// Copy block of memory (forwards) +// Copies the values of num bytes from the location pointed to by source directly to the memory block pointed to by destination. +// memcpy(void* zeropage(4) destination, void* zeropage(2) source, word zeropage(6) num) +memcpy: { + .label dst = $a + .label src = 8 + .label i = $c + .label source = 2 + .label destination = 4 + .label num = 6 + //SEG34 [15] (byte*~) memcpy::src#3 ← (byte*)(void*) memcpy::source#2 -- pbuz1=pbuz2 + lda source + sta src + lda source+1 + sta src+1 + //SEG35 [16] (byte*~) memcpy::dst#3 ← (byte*)(void*) memcpy::destination#2 -- pbuz1=pbuz2 + lda destination + sta dst + lda destination+1 + sta dst+1 + //SEG36 [17] phi from memcpy to memcpy::@1 [phi:memcpy->memcpy::@1] + b1_from_memcpy: + //SEG37 [17] phi (word) memcpy::i#2 = (byte) 0 [phi:memcpy->memcpy::@1#0] -- vwuz1=vbuc1 + lda #0 + sta i + lda #0 + sta i+1 + //SEG38 [17] phi (byte*) memcpy::dst#2 = (byte*~) memcpy::dst#3 [phi:memcpy->memcpy::@1#1] -- register_copy + //SEG39 [17] phi (byte*) memcpy::src#2 = (byte*~) memcpy::src#3 [phi:memcpy->memcpy::@1#2] -- register_copy + jmp b1 + //SEG40 [17] phi from memcpy::@1 to memcpy::@1 [phi:memcpy::@1->memcpy::@1] + b1_from_b1: + //SEG41 [17] phi (word) memcpy::i#2 = (word) memcpy::i#1 [phi:memcpy::@1->memcpy::@1#0] -- register_copy + //SEG42 [17] phi (byte*) memcpy::dst#2 = (byte*) memcpy::dst#1 [phi:memcpy::@1->memcpy::@1#1] -- register_copy + //SEG43 [17] phi (byte*) memcpy::src#2 = (byte*) memcpy::src#1 [phi:memcpy::@1->memcpy::@1#2] -- register_copy + jmp b1 + //SEG44 memcpy::@1 + b1: + //SEG45 [18] *((byte*) memcpy::dst#2) ← *((byte*) memcpy::src#2) -- _deref_pbuz1=_deref_pbuz2 + ldy #0 + lda (src),y + ldy #0 + sta (dst),y + //SEG46 [19] (byte*) memcpy::dst#1 ← ++ (byte*) memcpy::dst#2 -- pbuz1=_inc_pbuz1 + inc dst + bne !+ + inc dst+1 + !: + //SEG47 [20] (byte*) memcpy::src#1 ← ++ (byte*) memcpy::src#2 -- pbuz1=_inc_pbuz1 + inc src + bne !+ + inc src+1 + !: + //SEG48 [21] (word) memcpy::i#1 ← ++ (word) memcpy::i#2 -- vwuz1=_inc_vwuz1 + inc i + bne !+ + inc i+1 + !: + //SEG49 [22] if((word) memcpy::i#1<(word) memcpy::num#3) goto memcpy::@1 -- vwuz1_lt_vwuz2_then_la1 + lda i+1 + cmp num+1 + bcc b1_from_b1 + bne !+ + lda i + cmp num + bcc b1_from_b1 + !: + jmp breturn + //SEG50 memcpy::@return + breturn: + //SEG51 [23] return + rts +} +//SEG52 File Data + +REGISTER UPLIFT POTENTIAL REGISTERS +Statement [6] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [9] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_CHARROM#0 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [11] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_BASIC_KERNEL_IO#0 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [15] (byte*~) memcpy::src#3 ← (byte*)(void*) memcpy::source#2 [ memcpy::destination#2 memcpy::num#3 memcpy::src#3 ] ( main:2::memcpy:7 [ memcpy::destination#2 memcpy::num#3 memcpy::src#3 ] main:2::memcpy:10 [ memcpy::destination#2 memcpy::num#3 memcpy::src#3 ] ) always clobbers reg byte a +Statement [16] (byte*~) memcpy::dst#3 ← (byte*)(void*) memcpy::destination#2 [ memcpy::num#3 memcpy::src#3 memcpy::dst#3 ] ( main:2::memcpy:7 [ memcpy::num#3 memcpy::src#3 memcpy::dst#3 ] main:2::memcpy:10 [ memcpy::num#3 memcpy::src#3 memcpy::dst#3 ] ) always clobbers reg byte a +Statement [18] *((byte*) memcpy::dst#2) ← *((byte*) memcpy::src#2) [ memcpy::num#3 memcpy::src#2 memcpy::dst#2 memcpy::i#2 ] ( main:2::memcpy:7 [ memcpy::num#3 memcpy::src#2 memcpy::dst#2 memcpy::i#2 ] main:2::memcpy:10 [ memcpy::num#3 memcpy::src#2 memcpy::dst#2 memcpy::i#2 ] ) always clobbers reg byte a reg byte y +Statement [22] if((word) memcpy::i#1<(word) memcpy::num#3) goto memcpy::@1 [ memcpy::num#3 memcpy::src#1 memcpy::dst#1 memcpy::i#1 ] ( main:2::memcpy:7 [ memcpy::num#3 memcpy::src#1 memcpy::dst#1 memcpy::i#1 ] main:2::memcpy:10 [ memcpy::num#3 memcpy::src#1 memcpy::dst#1 memcpy::i#1 ] ) always clobbers reg byte a +Potential registers zp ZP_WORD:2 [ memcpy::source#2 ] : zp ZP_WORD:2 , +Potential registers zp ZP_WORD:4 [ memcpy::destination#2 ] : zp ZP_WORD:4 , +Potential registers zp ZP_WORD:6 [ memcpy::num#3 ] : zp ZP_WORD:6 , +Potential registers zp ZP_WORD:8 [ memcpy::src#2 memcpy::src#3 memcpy::src#1 ] : zp ZP_WORD:8 , +Potential registers zp ZP_WORD:10 [ memcpy::dst#2 memcpy::dst#3 memcpy::dst#1 ] : zp ZP_WORD:10 , +Potential registers zp ZP_WORD:12 [ memcpy::i#2 memcpy::i#1 ] : zp ZP_WORD:12 , + +REGISTER UPLIFT SCOPES +Uplift Scope [memcpy] 27: zp ZP_WORD:10 [ memcpy::dst#2 memcpy::dst#3 memcpy::dst#1 ] 22: zp ZP_WORD:12 [ memcpy::i#2 memcpy::i#1 ] 21: zp ZP_WORD:8 [ memcpy::src#2 memcpy::src#3 memcpy::src#1 ] 1.22: zp ZP_WORD:6 [ memcpy::num#3 ] 0: zp ZP_WORD:2 [ memcpy::source#2 ] 0: zp ZP_WORD:4 [ memcpy::destination#2 ] +Uplift Scope [main] +Uplift Scope [] + +Uplifting [memcpy] best 1099 combination zp ZP_WORD:10 [ memcpy::dst#2 memcpy::dst#3 memcpy::dst#1 ] zp ZP_WORD:12 [ memcpy::i#2 memcpy::i#1 ] zp ZP_WORD:8 [ memcpy::src#2 memcpy::src#3 memcpy::src#1 ] zp ZP_WORD:6 [ memcpy::num#3 ] zp ZP_WORD:2 [ memcpy::source#2 ] zp ZP_WORD:4 [ memcpy::destination#2 ] +Uplifting [main] best 1099 combination +Uplifting [] best 1099 combination +Coalescing zero page register with common assignment [ zp ZP_WORD:2 [ memcpy::source#2 ] ] with [ zp ZP_WORD:8 [ memcpy::src#2 memcpy::src#3 memcpy::src#1 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:4 [ memcpy::destination#2 ] ] with [ zp ZP_WORD:10 [ memcpy::dst#2 memcpy::dst#3 memcpy::dst#1 ] ] - score: 1 +Allocated (was zp ZP_WORD:12) zp ZP_WORD:8 [ memcpy::i#2 memcpy::i#1 ] + +ASSEMBLER BEFORE OPTIMIZATION +//SEG0 File Comments +// Test memcpy - copy charset and screen +//SEG1 Basic Upstart +.pc = $801 "Basic" +:BasicUpstart(bbegin) +.pc = $80d "Program" +//SEG2 Global Constants & labels + // Processor Port Register controlling RAM/ROM configuration and the datasette + .label PROCPORT = 1 + // RAM in $A000, $E000 CHAR ROM in $D000 + .const PROCPORT_RAM_CHARROM = $31 + // BASIC in $A000, I/O in $D000, KERNEL in $E000 + .const PROCPORT_BASIC_KERNEL_IO = $37 + // The address of the CHARGEN character set + .label CHARGEN = $d000 + .label D018 = $d018 + .label CHARSET = $2000 + .label SCREEN = $400 + .label SCREEN_COPY = $2400 +//SEG3 @begin +bbegin: +//SEG4 [1] phi from @begin to @1 [phi:@begin->@1] +b1_from_bbegin: + jmp b1 +//SEG5 @1 +b1: +//SEG6 [2] call main +//SEG7 [4] phi from @1 to main [phi:@1->main] +main_from_b1: + jsr main +//SEG8 [3] phi from @1 to @end [phi:@1->@end] +bend_from_b1: + jmp bend +//SEG9 @end +bend: +//SEG10 main +main: { + .const toD0181_return = (>(SCREEN_COPY&$3fff)*4)|(>CHARSET)/4&$f + //SEG11 [5] phi from main to main::toD0181 [phi:main->main::toD0181] + toD0181_from_main: + jmp toD0181 + //SEG12 main::toD0181 + toD0181: + jmp b1 + //SEG13 main::@1 + b1: + //SEG14 [6] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0 -- _deref_pbuc1=vbuc2 + lda #toD0181_return + sta D018 + //SEG15 [7] call memcpy + //SEG16 [14] phi from main::@1 to memcpy [phi:main::@1->memcpy] + memcpy_from_b1: + //SEG17 [14] phi (word) memcpy::num#3 = (word) $400 [phi:main::@1->memcpy#0] -- vwuz1=vwuc1 + lda #<$400 + sta memcpy.num + lda #>$400 + sta memcpy.num+1 + //SEG18 [14] phi (void*) memcpy::destination#2 = (void*)(const byte*) SCREEN_COPY#0 [phi:main::@1->memcpy#1] -- pvoz1=pvoc1 + lda #SCREEN_COPY + sta memcpy.destination+1 + //SEG19 [14] phi (void*) memcpy::source#2 = (void*)(const byte*) SCREEN#0 [phi:main::@1->memcpy#2] -- pvoz1=pvoc1 + lda #SCREEN + sta memcpy.source+1 + jsr memcpy + jmp b2 + //SEG20 main::@2 + b2: + //SEG21 asm { sei } + sei + //SEG22 [9] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_CHARROM#0 -- _deref_pbuc1=vbuc2 + lda #PROCPORT_RAM_CHARROM + sta PROCPORT + //SEG23 [10] call memcpy + //SEG24 [14] phi from main::@2 to memcpy [phi:main::@2->memcpy] + memcpy_from_b2: + //SEG25 [14] phi (word) memcpy::num#3 = (word) $800 [phi:main::@2->memcpy#0] -- vwuz1=vwuc1 + lda #<$800 + sta memcpy.num + lda #>$800 + sta memcpy.num+1 + //SEG26 [14] phi (void*) memcpy::destination#2 = (void*)(const byte*) CHARSET#0 [phi:main::@2->memcpy#1] -- pvoz1=pvoc1 + lda #CHARSET + sta memcpy.destination+1 + //SEG27 [14] phi (void*) memcpy::source#2 = (void*)(const byte*) CHARGEN#0 [phi:main::@2->memcpy#2] -- pvoz1=pvoc1 + lda #CHARGEN + sta memcpy.source+1 + jsr memcpy + jmp b3 + //SEG28 main::@3 + b3: + //SEG29 [11] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_BASIC_KERNEL_IO#0 -- _deref_pbuc1=vbuc2 + lda #PROCPORT_BASIC_KERNEL_IO + sta PROCPORT + //SEG30 asm { cli } + cli + jmp breturn + //SEG31 main::@return + breturn: + //SEG32 [13] return + rts +} +//SEG33 memcpy +// Copy block of memory (forwards) +// Copies the values of num bytes from the location pointed to by source directly to the memory block pointed to by destination. +// memcpy(void* zeropage(4) destination, void* zeropage(2) source, word zeropage(6) num) +memcpy: { + .label dst = 4 + .label src = 2 + .label i = 8 + .label source = 2 + .label destination = 4 + .label num = 6 + //SEG34 [15] (byte*~) memcpy::src#3 ← (byte*)(void*) memcpy::source#2 + //SEG35 [16] (byte*~) memcpy::dst#3 ← (byte*)(void*) memcpy::destination#2 + //SEG36 [17] phi from memcpy to memcpy::@1 [phi:memcpy->memcpy::@1] + b1_from_memcpy: + //SEG37 [17] phi (word) memcpy::i#2 = (byte) 0 [phi:memcpy->memcpy::@1#0] -- vwuz1=vbuc1 + lda #0 + sta i + lda #0 + sta i+1 + //SEG38 [17] phi (byte*) memcpy::dst#2 = (byte*~) memcpy::dst#3 [phi:memcpy->memcpy::@1#1] -- register_copy + //SEG39 [17] phi (byte*) memcpy::src#2 = (byte*~) memcpy::src#3 [phi:memcpy->memcpy::@1#2] -- register_copy + jmp b1 + //SEG40 [17] phi from memcpy::@1 to memcpy::@1 [phi:memcpy::@1->memcpy::@1] + b1_from_b1: + //SEG41 [17] phi (word) memcpy::i#2 = (word) memcpy::i#1 [phi:memcpy::@1->memcpy::@1#0] -- register_copy + //SEG42 [17] phi (byte*) memcpy::dst#2 = (byte*) memcpy::dst#1 [phi:memcpy::@1->memcpy::@1#1] -- register_copy + //SEG43 [17] phi (byte*) memcpy::src#2 = (byte*) memcpy::src#1 [phi:memcpy::@1->memcpy::@1#2] -- register_copy + jmp b1 + //SEG44 memcpy::@1 + b1: + //SEG45 [18] *((byte*) memcpy::dst#2) ← *((byte*) memcpy::src#2) -- _deref_pbuz1=_deref_pbuz2 + ldy #0 + lda (src),y + ldy #0 + sta (dst),y + //SEG46 [19] (byte*) memcpy::dst#1 ← ++ (byte*) memcpy::dst#2 -- pbuz1=_inc_pbuz1 + inc dst + bne !+ + inc dst+1 + !: + //SEG47 [20] (byte*) memcpy::src#1 ← ++ (byte*) memcpy::src#2 -- pbuz1=_inc_pbuz1 + inc src + bne !+ + inc src+1 + !: + //SEG48 [21] (word) memcpy::i#1 ← ++ (word) memcpy::i#2 -- vwuz1=_inc_vwuz1 + inc i + bne !+ + inc i+1 + !: + //SEG49 [22] if((word) memcpy::i#1<(word) memcpy::num#3) goto memcpy::@1 -- vwuz1_lt_vwuz2_then_la1 + lda i+1 + cmp num+1 + bcc b1_from_b1 + bne !+ + lda i + cmp num + bcc b1_from_b1 + !: + jmp breturn + //SEG50 memcpy::@return + breturn: + //SEG51 [23] return + rts +} +//SEG52 File Data + +ASSEMBLER OPTIMIZATIONS +Removing instruction jmp b1 +Removing instruction jmp bend +Removing instruction jmp toD0181 +Removing instruction jmp b1 +Removing instruction jmp b2 +Removing instruction jmp b3 +Removing instruction jmp breturn +Removing instruction jmp b1 +Removing instruction jmp breturn +Succesful ASM optimization Pass5NextJumpElimination +Removing instruction lda #0 +Removing instruction ldy #0 +Succesful ASM optimization Pass5UnnecesaryLoadElimination +Replacing label b1_from_b1 with b1 +Replacing label b1_from_b1 with b1 +Removing instruction b1_from_bbegin: +Removing instruction b1: +Removing instruction main_from_b1: +Removing instruction bend_from_b1: +Removing instruction toD0181_from_main: +Removing instruction toD0181: +Removing instruction b1_from_b1: +Succesful ASM optimization Pass5RedundantLabelElimination +Removing instruction bend: +Removing instruction b1: +Removing instruction memcpy_from_b1: +Removing instruction b2: +Removing instruction memcpy_from_b2: +Removing instruction b3: +Removing instruction breturn: +Removing instruction b1_from_memcpy: +Removing instruction breturn: +Succesful ASM optimization Pass5UnusedLabelElimination +Updating BasicUpstart to call main directly +Removing instruction jsr main +Succesful ASM optimization Pass5SkipBegin +Removing instruction jmp b1 +Succesful ASM optimization Pass5NextJumpElimination +Removing instruction bbegin: +Succesful ASM optimization Pass5UnusedLabelElimination + +FINAL SYMBOL TABLE +(label) @1 +(label) @begin +(label) @end +(byte*) CHARGEN +(const byte*) CHARGEN#0 CHARGEN = (byte*) 53248 +(byte*) CHARSET +(const byte*) CHARSET#0 CHARSET = (byte*) 8192 +(byte*) D018 +(const byte*) D018#0 D018 = (byte*) 53272 +(byte*) PROCPORT +(const byte*) PROCPORT#0 PROCPORT = (byte*) 1 +(byte) PROCPORT_BASIC_KERNEL_IO +(const byte) PROCPORT_BASIC_KERNEL_IO#0 PROCPORT_BASIC_KERNEL_IO = (byte) $37 +(byte) PROCPORT_RAM_CHARROM +(const byte) PROCPORT_RAM_CHARROM#0 PROCPORT_RAM_CHARROM = (byte) $31 +(byte*) SCREEN +(const byte*) SCREEN#0 SCREEN = (byte*) 1024 +(byte*) SCREEN_COPY +(const byte*) SCREEN_COPY#0 SCREEN_COPY = (byte*) 9216 +(void()) main() +(label) main::@1 +(label) main::@2 +(label) main::@3 +(label) main::@return +(label) main::toD0181 +(word~) main::toD0181_$0 +(number~) main::toD0181_$1 +(number~) main::toD0181_$2 +(number~) main::toD0181_$3 +(word~) main::toD0181_$4 +(byte~) main::toD0181_$5 +(number~) main::toD0181_$6 +(number~) main::toD0181_$7 +(number~) main::toD0181_$8 +(byte*) main::toD0181_gfx +(byte) main::toD0181_return +(const byte) main::toD0181_return#0 toD0181_return = >(word)(const byte*) SCREEN_COPY#0&(word) $3fff*(byte) 4|>(word)(const byte*) CHARSET#0/(byte) 4&(byte) $f +(byte*) main::toD0181_screen +(void*()) memcpy((void*) memcpy::destination , (void*) memcpy::source , (word) memcpy::num) +(label) memcpy::@1 +(label) memcpy::@return +(void*) memcpy::destination +(void*) memcpy::destination#2 destination zp ZP_WORD:4 +(byte*) memcpy::dst +(byte*) memcpy::dst#1 dst zp ZP_WORD:4 5.5 +(byte*) memcpy::dst#2 dst zp ZP_WORD:4 17.5 +(byte*~) memcpy::dst#3 dst zp ZP_WORD:4 4.0 +(word) memcpy::i +(word) memcpy::i#1 i zp ZP_WORD:8 16.5 +(word) memcpy::i#2 i zp ZP_WORD:8 5.5 +(word) memcpy::num +(word) memcpy::num#3 num zp ZP_WORD:6 1.2222222222222223 +(void*) memcpy::return +(void*) memcpy::source +(void*) memcpy::source#2 source zp ZP_WORD:2 +(byte*) memcpy::src +(byte*) memcpy::src#1 src zp ZP_WORD:2 7.333333333333333 +(byte*) memcpy::src#2 src zp ZP_WORD:2 11.666666666666666 +(byte*~) memcpy::src#3 src zp ZP_WORD:2 2.0 + +zp ZP_WORD:2 [ memcpy::source#2 memcpy::src#2 memcpy::src#3 memcpy::src#1 ] +zp ZP_WORD:4 [ memcpy::destination#2 memcpy::dst#2 memcpy::dst#3 memcpy::dst#1 ] +zp ZP_WORD:6 [ memcpy::num#3 ] +zp ZP_WORD:8 [ memcpy::i#2 memcpy::i#1 ] + + +FINAL ASSEMBLER +Score: 891 + +//SEG0 File Comments +// Test memcpy - copy charset and screen +//SEG1 Basic Upstart +.pc = $801 "Basic" +:BasicUpstart(main) +.pc = $80d "Program" +//SEG2 Global Constants & labels + // Processor Port Register controlling RAM/ROM configuration and the datasette + .label PROCPORT = 1 + // RAM in $A000, $E000 CHAR ROM in $D000 + .const PROCPORT_RAM_CHARROM = $31 + // BASIC in $A000, I/O in $D000, KERNEL in $E000 + .const PROCPORT_BASIC_KERNEL_IO = $37 + // The address of the CHARGEN character set + .label CHARGEN = $d000 + .label D018 = $d018 + .label CHARSET = $2000 + .label SCREEN = $400 + .label SCREEN_COPY = $2400 +//SEG3 @begin +//SEG4 [1] phi from @begin to @1 [phi:@begin->@1] +//SEG5 @1 +//SEG6 [2] call main +//SEG7 [4] phi from @1 to main [phi:@1->main] +//SEG8 [3] phi from @1 to @end [phi:@1->@end] +//SEG9 @end +//SEG10 main +main: { + .const toD0181_return = (>(SCREEN_COPY&$3fff)*4)|(>CHARSET)/4&$f + //SEG11 [5] phi from main to main::toD0181 [phi:main->main::toD0181] + //SEG12 main::toD0181 + //SEG13 main::@1 + //SEG14 [6] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0 -- _deref_pbuc1=vbuc2 + lda #toD0181_return + sta D018 + //SEG15 [7] call memcpy + //SEG16 [14] phi from main::@1 to memcpy [phi:main::@1->memcpy] + //SEG17 [14] phi (word) memcpy::num#3 = (word) $400 [phi:main::@1->memcpy#0] -- vwuz1=vwuc1 + lda #<$400 + sta memcpy.num + lda #>$400 + sta memcpy.num+1 + //SEG18 [14] phi (void*) memcpy::destination#2 = (void*)(const byte*) SCREEN_COPY#0 [phi:main::@1->memcpy#1] -- pvoz1=pvoc1 + lda #SCREEN_COPY + sta memcpy.destination+1 + //SEG19 [14] phi (void*) memcpy::source#2 = (void*)(const byte*) SCREEN#0 [phi:main::@1->memcpy#2] -- pvoz1=pvoc1 + lda #SCREEN + sta memcpy.source+1 + jsr memcpy + //SEG20 main::@2 + //SEG21 asm { sei } + sei + //SEG22 [9] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_CHARROM#0 -- _deref_pbuc1=vbuc2 + lda #PROCPORT_RAM_CHARROM + sta PROCPORT + //SEG23 [10] call memcpy + //SEG24 [14] phi from main::@2 to memcpy [phi:main::@2->memcpy] + //SEG25 [14] phi (word) memcpy::num#3 = (word) $800 [phi:main::@2->memcpy#0] -- vwuz1=vwuc1 + lda #<$800 + sta memcpy.num + lda #>$800 + sta memcpy.num+1 + //SEG26 [14] phi (void*) memcpy::destination#2 = (void*)(const byte*) CHARSET#0 [phi:main::@2->memcpy#1] -- pvoz1=pvoc1 + lda #CHARSET + sta memcpy.destination+1 + //SEG27 [14] phi (void*) memcpy::source#2 = (void*)(const byte*) CHARGEN#0 [phi:main::@2->memcpy#2] -- pvoz1=pvoc1 + lda #CHARGEN + sta memcpy.source+1 + jsr memcpy + //SEG28 main::@3 + //SEG29 [11] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_BASIC_KERNEL_IO#0 -- _deref_pbuc1=vbuc2 + lda #PROCPORT_BASIC_KERNEL_IO + sta PROCPORT + //SEG30 asm { cli } + cli + //SEG31 main::@return + //SEG32 [13] return + rts +} +//SEG33 memcpy +// Copy block of memory (forwards) +// Copies the values of num bytes from the location pointed to by source directly to the memory block pointed to by destination. +// memcpy(void* zeropage(4) destination, void* zeropage(2) source, word zeropage(6) num) +memcpy: { + .label dst = 4 + .label src = 2 + .label i = 8 + .label source = 2 + .label destination = 4 + .label num = 6 + //SEG34 [15] (byte*~) memcpy::src#3 ← (byte*)(void*) memcpy::source#2 + //SEG35 [16] (byte*~) memcpy::dst#3 ← (byte*)(void*) memcpy::destination#2 + //SEG36 [17] phi from memcpy to memcpy::@1 [phi:memcpy->memcpy::@1] + //SEG37 [17] phi (word) memcpy::i#2 = (byte) 0 [phi:memcpy->memcpy::@1#0] -- vwuz1=vbuc1 + lda #0 + sta i + sta i+1 + //SEG38 [17] phi (byte*) memcpy::dst#2 = (byte*~) memcpy::dst#3 [phi:memcpy->memcpy::@1#1] -- register_copy + //SEG39 [17] phi (byte*) memcpy::src#2 = (byte*~) memcpy::src#3 [phi:memcpy->memcpy::@1#2] -- register_copy + //SEG40 [17] phi from memcpy::@1 to memcpy::@1 [phi:memcpy::@1->memcpy::@1] + //SEG41 [17] phi (word) memcpy::i#2 = (word) memcpy::i#1 [phi:memcpy::@1->memcpy::@1#0] -- register_copy + //SEG42 [17] phi (byte*) memcpy::dst#2 = (byte*) memcpy::dst#1 [phi:memcpy::@1->memcpy::@1#1] -- register_copy + //SEG43 [17] phi (byte*) memcpy::src#2 = (byte*) memcpy::src#1 [phi:memcpy::@1->memcpy::@1#2] -- register_copy + //SEG44 memcpy::@1 + b1: + //SEG45 [18] *((byte*) memcpy::dst#2) ← *((byte*) memcpy::src#2) -- _deref_pbuz1=_deref_pbuz2 + ldy #0 + lda (src),y + sta (dst),y + //SEG46 [19] (byte*) memcpy::dst#1 ← ++ (byte*) memcpy::dst#2 -- pbuz1=_inc_pbuz1 + inc dst + bne !+ + inc dst+1 + !: + //SEG47 [20] (byte*) memcpy::src#1 ← ++ (byte*) memcpy::src#2 -- pbuz1=_inc_pbuz1 + inc src + bne !+ + inc src+1 + !: + //SEG48 [21] (word) memcpy::i#1 ← ++ (word) memcpy::i#2 -- vwuz1=_inc_vwuz1 + inc i + bne !+ + inc i+1 + !: + //SEG49 [22] if((word) memcpy::i#1<(word) memcpy::num#3) goto memcpy::@1 -- vwuz1_lt_vwuz2_then_la1 + lda i+1 + cmp num+1 + bcc b1 + bne !+ + lda i + cmp num + bcc b1 + !: + //SEG50 memcpy::@return + //SEG51 [23] return + rts +} +//SEG52 File Data + diff --git a/src/test/ref/memcpy-0.sym b/src/test/ref/memcpy-0.sym new file mode 100644 index 000000000..c7f5252cb --- /dev/null +++ b/src/test/ref/memcpy-0.sym @@ -0,0 +1,64 @@ +(label) @1 +(label) @begin +(label) @end +(byte*) CHARGEN +(const byte*) CHARGEN#0 CHARGEN = (byte*) 53248 +(byte*) CHARSET +(const byte*) CHARSET#0 CHARSET = (byte*) 8192 +(byte*) D018 +(const byte*) D018#0 D018 = (byte*) 53272 +(byte*) PROCPORT +(const byte*) PROCPORT#0 PROCPORT = (byte*) 1 +(byte) PROCPORT_BASIC_KERNEL_IO +(const byte) PROCPORT_BASIC_KERNEL_IO#0 PROCPORT_BASIC_KERNEL_IO = (byte) $37 +(byte) PROCPORT_RAM_CHARROM +(const byte) PROCPORT_RAM_CHARROM#0 PROCPORT_RAM_CHARROM = (byte) $31 +(byte*) SCREEN +(const byte*) SCREEN#0 SCREEN = (byte*) 1024 +(byte*) SCREEN_COPY +(const byte*) SCREEN_COPY#0 SCREEN_COPY = (byte*) 9216 +(void()) main() +(label) main::@1 +(label) main::@2 +(label) main::@3 +(label) main::@return +(label) main::toD0181 +(word~) main::toD0181_$0 +(number~) main::toD0181_$1 +(number~) main::toD0181_$2 +(number~) main::toD0181_$3 +(word~) main::toD0181_$4 +(byte~) main::toD0181_$5 +(number~) main::toD0181_$6 +(number~) main::toD0181_$7 +(number~) main::toD0181_$8 +(byte*) main::toD0181_gfx +(byte) main::toD0181_return +(const byte) main::toD0181_return#0 toD0181_return = >(word)(const byte*) SCREEN_COPY#0&(word) $3fff*(byte) 4|>(word)(const byte*) CHARSET#0/(byte) 4&(byte) $f +(byte*) main::toD0181_screen +(void*()) memcpy((void*) memcpy::destination , (void*) memcpy::source , (word) memcpy::num) +(label) memcpy::@1 +(label) memcpy::@return +(void*) memcpy::destination +(void*) memcpy::destination#2 destination zp ZP_WORD:4 +(byte*) memcpy::dst +(byte*) memcpy::dst#1 dst zp ZP_WORD:4 5.5 +(byte*) memcpy::dst#2 dst zp ZP_WORD:4 17.5 +(byte*~) memcpy::dst#3 dst zp ZP_WORD:4 4.0 +(word) memcpy::i +(word) memcpy::i#1 i zp ZP_WORD:8 16.5 +(word) memcpy::i#2 i zp ZP_WORD:8 5.5 +(word) memcpy::num +(word) memcpy::num#3 num zp ZP_WORD:6 1.2222222222222223 +(void*) memcpy::return +(void*) memcpy::source +(void*) memcpy::source#2 source zp ZP_WORD:2 +(byte*) memcpy::src +(byte*) memcpy::src#1 src zp ZP_WORD:2 7.333333333333333 +(byte*) memcpy::src#2 src zp ZP_WORD:2 11.666666666666666 +(byte*~) memcpy::src#3 src zp ZP_WORD:2 2.0 + +zp ZP_WORD:2 [ memcpy::source#2 memcpy::src#2 memcpy::src#3 memcpy::src#1 ] +zp ZP_WORD:4 [ memcpy::destination#2 memcpy::dst#2 memcpy::dst#3 memcpy::dst#1 ] +zp ZP_WORD:6 [ memcpy::num#3 ] +zp ZP_WORD:8 [ memcpy::i#2 memcpy::i#1 ]