diff --git a/src/test/kc/examples/fire/fire.kc b/src/test/kc/examples/fire/fire.kc index 5994af911..3f5f25834 100644 --- a/src/test/kc/examples/fire/fire.kc +++ b/src/test/kc/examples/fire/fire.kc @@ -31,7 +31,7 @@ void main() { } } -// Animate the fire on the passe screen. Uses BUFFER to store the current values. +// Animate the fire on the passed screen. Uses BUFFER to store the current values. void fire(unsigned char* screenbase) { // Average characters from below the current character (24 lines) @@ -49,8 +49,8 @@ void fire(unsigned char* screenbase) { // Add one new random line at the bottom screen = (screenbase + (24 * 40)); buffer = (BUFFER + (24 * 40)); - while(buffer != (BUFFER+(25*40))) { - *screen++ = *buffer++ = 0x30 + (sid_rnd())/$10; + for(; buffer != (BUFFER+(25*40)); ++screen, ++buffer) { + *screen = *buffer = 0x30 + (sid_rnd())/$10; } } @@ -62,8 +62,7 @@ void makecharset(byte* charset) { for (unsigned char *font = (charset+(64*8)); font != (charset+(256*8)); ++font) *font = 0xff; for (unsigned char c = 0; c < 0x40; ++c) { - unsigned char bc = 0; - for (unsigned char i = 0; i < 8; i++){ + for (unsigned char bc = 0, i = 0; i < 8; i++){ unsigned char b = 0; for (unsigned char ii = 0; ii < 8; ii++) { bc += c; diff --git a/src/test/ref/examples/fire/fire.asm b/src/test/ref/examples/fire/fire.asm index c8a9f74a4..7d188c9f9 100644 --- a/src/test/ref/examples/fire/fire.asm +++ b/src/test/ref/examples/fire/fire.asm @@ -73,17 +73,17 @@ main: { sta D018 jmp b1 } -// Animate the fire on the passe screen. Uses BUFFER to store the current values. +// Animate the fire on the passed screen. Uses BUFFER to store the current values. fire: { .label screen = 2 .label screen_2 = 6 .label buffer = 4 .label screen_4 = 6 - .label screen_11 = 6 + .label screen_10 = 6 lda screen - sta screen_11 + sta screen_10 lda screen+1 - sta screen_11+1 + sta screen_10+1 lda #BUFFER @@ -107,14 +107,6 @@ fire: { lda #>BUFFER+$18*$28 sta buffer+1 b6: - lda buffer+1 - cmp #>BUFFER+$19*$28 - bne b7 - lda buffer - cmp #BUFFER+$19*$28 + bne b6 + lda buffer + cmp #> (byte/signed byte/word/signed word/dword/signed dword) 4 - [38] (byte/signed word/word/dword/signed dword~) fire::$20 ← (byte/signed byte/word/signed word/dword/signed dword) $30 + (byte~) fire::$19 - [39] *((byte*) fire::buffer#10) ← (byte/signed word/word/dword/signed dword~) fire::$20 - [40] *((byte*) fire::screen#10) ← *((byte*) fire::buffer#10) - [41] (byte*) fire::screen#3 ← ++ (byte*) fire::screen#10 - [42] (byte*) fire::buffer#3 ← ++ (byte*) fire::buffer#10 - to:fire::@6 + [33] (byte~) fire::$15 ← (byte) sid_rnd::return#2 + [34] (byte~) fire::$16 ← (byte~) fire::$15 >> (byte/signed byte/word/signed word/dword/signed dword) 4 + [35] (byte/signed word/word/dword/signed dword~) fire::$17 ← (byte/signed byte/word/signed word/dword/signed dword) $30 + (byte~) fire::$16 + [36] *((byte*) fire::buffer#7) ← (byte/signed word/word/dword/signed dword~) fire::$17 + [37] *((byte*) fire::screen#5) ← *((byte*) fire::buffer#7) + [38] (byte*) fire::screen#3 ← ++ (byte*) fire::screen#5 + [39] (byte*) fire::buffer#3 ← ++ (byte*) fire::buffer#7 + [40] if((byte*) fire::buffer#3!=(const byte*) BUFFER#0+(byte/signed byte/word/signed word/dword/signed dword) $19*(byte/signed byte/word/signed word/dword/signed dword) $28) goto fire::@6 + to:fire::@return +fire::@return: scope:[fire] from fire::@7 + [41] return + to:@return fire::@2: scope:[fire] from fire::@1 - [43] (byte~) fire::$9 ← *((byte*) fire::buffer#4 + (byte/signed byte/word/signed word/dword/signed dword) $28-(byte/signed byte/word/signed word/dword/signed dword) 1) + *((byte*) fire::buffer#4 + (byte/signed byte/word/signed word/dword/signed dword) $28-(byte/signed byte/word/signed word/dword/signed dword) 1) - [44] (byte~) fire::$10 ← (byte~) fire::$9 + *((byte*) fire::buffer#4 + (byte/signed byte/word/signed word/dword/signed dword) $28) - [45] (byte~) fire::$11 ← (byte~) fire::$10 + *((byte*) fire::buffer#4 + (byte/signed byte/word/signed word/dword/signed dword) $29) - [46] (byte) fire::c#0 ← (byte~) fire::$11 >> (byte/signed byte/word/signed word/dword/signed dword) 2 - [47] if((byte) fire::c#0<(byte/signed byte/word/signed word/dword/signed dword) 2+(byte/signed byte/word/signed word/dword/signed dword) 1) goto fire::@4 + [42] (byte~) fire::$9 ← *((byte*) fire::buffer#4 + (byte/signed byte/word/signed word/dword/signed dword) $28-(byte/signed byte/word/signed word/dword/signed dword) 1) + *((byte*) fire::buffer#4 + (byte/signed byte/word/signed word/dword/signed dword) $28-(byte/signed byte/word/signed word/dword/signed dword) 1) + [43] (byte~) fire::$10 ← (byte~) fire::$9 + *((byte*) fire::buffer#4 + (byte/signed byte/word/signed word/dword/signed dword) $28) + [44] (byte~) fire::$11 ← (byte~) fire::$10 + *((byte*) fire::buffer#4 + (byte/signed byte/word/signed word/dword/signed dword) $29) + [45] (byte) fire::c#0 ← (byte~) fire::$11 >> (byte/signed byte/word/signed word/dword/signed dword) 2 + [46] if((byte) fire::c#0<(byte/signed byte/word/signed word/dword/signed dword) 2+(byte/signed byte/word/signed word/dword/signed dword) 1) goto fire::@4 to:fire::@5 fire::@5: scope:[fire] from fire::@2 - [48] (byte) fire::c#1 ← (byte) fire::c#0 - (byte/signed byte/word/signed word/dword/signed dword) 3 + [47] (byte) fire::c#1 ← (byte) fire::c#0 - (byte/signed byte/word/signed word/dword/signed dword) 3 to:fire::@4 fire::@4: scope:[fire] from fire::@2 fire::@5 - [49] (byte) fire::c#2 ← phi( fire::@2/(byte) fire::c#0 fire::@5/(byte) fire::c#1 ) - [50] *((byte*) fire::buffer#4) ← (byte) fire::c#2 - [51] *((byte*) fire::screen#4) ← *((byte*) fire::buffer#4) - [52] (byte*) fire::screen#2 ← ++ (byte*) fire::screen#4 - [53] (byte*) fire::buffer#2 ← ++ (byte*) fire::buffer#4 + [48] (byte) fire::c#2 ← phi( fire::@2/(byte) fire::c#0 fire::@5/(byte) fire::c#1 ) + [49] *((byte*) fire::buffer#4) ← (byte) fire::c#2 + [50] *((byte*) fire::screen#4) ← *((byte*) fire::buffer#4) + [51] (byte*) fire::screen#2 ← ++ (byte*) fire::screen#4 + [52] (byte*) fire::buffer#2 ← ++ (byte*) fire::buffer#4 to:fire::@1 -sid_rnd: scope:[sid_rnd] from fire::@7 - [54] (byte) sid_rnd::return#0 ← *((const byte*) SID_VOICE3_OSC#0) +sid_rnd: scope:[sid_rnd] from fire::@6 + [53] (byte) sid_rnd::return#0 ← *((const byte*) SID_VOICE3_OSC#0) to:sid_rnd::@return sid_rnd::@return: scope:[sid_rnd] from sid_rnd - [55] return + [54] return to:@return makecharset: scope:[makecharset] from main::@8 - [56] phi() + [55] phi() to:makecharset::@1 makecharset::@1: scope:[makecharset] from makecharset makecharset::@1 - [57] (byte*) makecharset::font#2 ← phi( makecharset/(const byte*) CHARSET#0 makecharset::@1/(byte*) makecharset::font#1 ) - [58] *((byte*) makecharset::font#2) ← (byte/signed byte/word/signed word/dword/signed dword) 0 - [59] (byte*) makecharset::font#1 ← ++ (byte*) makecharset::font#2 - [60] if((byte*) makecharset::font#1!=(const byte*) CHARSET#0+(byte/signed byte/word/signed word/dword/signed dword) 1*(byte/signed byte/word/signed word/dword/signed dword) 8) goto makecharset::@1 + [56] (byte*) makecharset::font#2 ← phi( makecharset/(const byte*) CHARSET#0 makecharset::@1/(byte*) makecharset::font#1 ) + [57] *((byte*) makecharset::font#2) ← (byte/signed byte/word/signed word/dword/signed dword) 0 + [58] (byte*) makecharset::font#1 ← ++ (byte*) makecharset::font#2 + [59] if((byte*) makecharset::font#1!=(const byte*) CHARSET#0+(byte/signed byte/word/signed word/dword/signed dword) 1*(byte/signed byte/word/signed word/dword/signed dword) 8) goto makecharset::@1 to:makecharset::@2 makecharset::@2: scope:[makecharset] from makecharset::@1 makecharset::@2 - [61] (byte*) makecharset::font1#2 ← phi( makecharset::@1/(const byte*) CHARSET#0+(byte/signed byte/word/signed word/dword/signed dword) $40*(byte/signed byte/word/signed word/dword/signed dword) 8 makecharset::@2/(byte*) makecharset::font1#1 ) - [62] *((byte*) makecharset::font1#2) ← (byte/word/signed word/dword/signed dword) $ff - [63] (byte*) makecharset::font1#1 ← ++ (byte*) makecharset::font1#2 - [64] if((byte*) makecharset::font1#1!=(const byte*) CHARSET#0+(word/signed word/dword/signed dword) $100*(byte/signed byte/word/signed word/dword/signed dword) 8) goto makecharset::@2 + [60] (byte*) makecharset::font1#2 ← phi( makecharset::@1/(const byte*) CHARSET#0+(byte/signed byte/word/signed word/dword/signed dword) $40*(byte/signed byte/word/signed word/dword/signed dword) 8 makecharset::@2/(byte*) makecharset::font1#1 ) + [61] *((byte*) makecharset::font1#2) ← (byte/word/signed word/dword/signed dword) $ff + [62] (byte*) makecharset::font1#1 ← ++ (byte*) makecharset::font1#2 + [63] if((byte*) makecharset::font1#1!=(const byte*) CHARSET#0+(word/signed word/dword/signed dword) $100*(byte/signed byte/word/signed word/dword/signed dword) 8) goto makecharset::@2 to:makecharset::@3 makecharset::@3: scope:[makecharset] from makecharset::@2 makecharset::@9 - [65] (byte) makecharset::c#7 ← phi( makecharset::@9/(byte) makecharset::c#1 makecharset::@2/(byte/signed byte/word/signed word/dword/signed dword) 0 ) + [64] (byte) makecharset::c#7 ← phi( makecharset::@9/(byte) makecharset::c#1 makecharset::@2/(byte/signed byte/word/signed word/dword/signed dword) 0 ) to:makecharset::@4 makecharset::@4: scope:[makecharset] from makecharset::@3 makecharset::@8 - [66] (byte) makecharset::i#6 ← phi( makecharset::@8/(byte) makecharset::i#1 makecharset::@3/(byte/signed byte/word/signed word/dword/signed dword) 0 ) - [66] (byte) makecharset::bc#5 ← phi( makecharset::@8/(byte) makecharset::bc#6 makecharset::@3/(byte/signed byte/word/signed word/dword/signed dword) 0 ) + [65] (byte) makecharset::i#6 ← phi( makecharset::@8/(byte) makecharset::i#1 makecharset::@3/(byte/signed byte/word/signed word/dword/signed dword) 0 ) + [65] (byte) makecharset::bc#5 ← phi( makecharset::@8/(byte) makecharset::bc#6 makecharset::@3/(byte/signed byte/word/signed word/dword/signed dword) 0 ) to:makecharset::@5 makecharset::@5: scope:[makecharset] from makecharset::@4 makecharset::@6 - [67] (byte) makecharset::b#2 ← phi( makecharset::@4/(byte/signed byte/word/signed word/dword/signed dword) 0 makecharset::@6/(byte) makecharset::b#3 ) - [67] (byte) makecharset::ii#2 ← phi( makecharset::@4/(byte/signed byte/word/signed word/dword/signed dword) 0 makecharset::@6/(byte) makecharset::ii#1 ) - [67] (byte) makecharset::bc#3 ← phi( makecharset::@4/(byte) makecharset::bc#5 makecharset::@6/(byte) makecharset::bc#6 ) - [68] (byte) makecharset::bc#1 ← (byte) makecharset::bc#3 + (byte) makecharset::c#7 - [69] if((byte) makecharset::bc#1<(byte/signed byte/word/signed word/dword/signed dword) $3f+(byte/signed byte/word/signed word/dword/signed dword) 1) goto makecharset::@6 + [66] (byte) makecharset::b#2 ← phi( makecharset::@4/(byte/signed byte/word/signed word/dword/signed dword) 0 makecharset::@6/(byte) makecharset::b#3 ) + [66] (byte) makecharset::ii#2 ← phi( makecharset::@4/(byte/signed byte/word/signed word/dword/signed dword) 0 makecharset::@6/(byte) makecharset::ii#1 ) + [66] (byte) makecharset::bc#3 ← phi( makecharset::@4/(byte) makecharset::bc#5 makecharset::@6/(byte) makecharset::bc#6 ) + [67] (byte) makecharset::bc#1 ← (byte) makecharset::bc#3 + (byte) makecharset::c#7 + [68] if((byte) makecharset::bc#1<(byte/signed byte/word/signed word/dword/signed dword) $3f+(byte/signed byte/word/signed word/dword/signed dword) 1) goto makecharset::@6 to:makecharset::@7 makecharset::@7: scope:[makecharset] from makecharset::@5 - [70] (byte) makecharset::bc#2 ← (byte) makecharset::bc#1 - (byte/signed byte/word/signed word/dword/signed dword) $40 - [71] (byte~) makecharset::$11 ← (byte) makecharset::i#6 & (byte/signed byte/word/signed word/dword/signed dword) 1 - [72] (byte~) makecharset::$12 ← (byte) makecharset::ii#2 + (byte~) makecharset::$11 - [73] (byte~) makecharset::$13 ← (byte~) makecharset::$12 & (byte/signed byte/word/signed word/dword/signed dword) 7 - [74] (byte) makecharset::b#1 ← (byte) makecharset::b#2 + *((const byte[8]) makecharset::bittab#0 + (byte~) makecharset::$13) + [69] (byte) makecharset::bc#2 ← (byte) makecharset::bc#1 - (byte/signed byte/word/signed word/dword/signed dword) $40 + [70] (byte~) makecharset::$11 ← (byte) makecharset::i#6 & (byte/signed byte/word/signed word/dword/signed dword) 1 + [71] (byte~) makecharset::$12 ← (byte) makecharset::ii#2 + (byte~) makecharset::$11 + [72] (byte~) makecharset::$13 ← (byte~) makecharset::$12 & (byte/signed byte/word/signed word/dword/signed dword) 7 + [73] (byte) makecharset::b#1 ← (byte) makecharset::b#2 + *((const byte[8]) makecharset::bittab#0 + (byte~) makecharset::$13) to:makecharset::@6 makecharset::@6: scope:[makecharset] from makecharset::@5 makecharset::@7 - [75] (byte) makecharset::b#3 ← phi( makecharset::@5/(byte) makecharset::b#2 makecharset::@7/(byte) makecharset::b#1 ) - [75] (byte) makecharset::bc#6 ← phi( makecharset::@5/(byte) makecharset::bc#1 makecharset::@7/(byte) makecharset::bc#2 ) - [76] (byte) makecharset::ii#1 ← ++ (byte) makecharset::ii#2 - [77] if((byte) makecharset::ii#1<(byte/signed byte/word/signed word/dword/signed dword) 8) goto makecharset::@5 + [74] (byte) makecharset::b#3 ← phi( makecharset::@5/(byte) makecharset::b#2 makecharset::@7/(byte) makecharset::b#1 ) + [74] (byte) makecharset::bc#6 ← phi( makecharset::@5/(byte) makecharset::bc#1 makecharset::@7/(byte) makecharset::bc#2 ) + [75] (byte) makecharset::ii#1 ← ++ (byte) makecharset::ii#2 + [76] if((byte) makecharset::ii#1<(byte/signed byte/word/signed word/dword/signed dword) 8) goto makecharset::@5 to:makecharset::@8 makecharset::@8: scope:[makecharset] from makecharset::@6 - [78] (word~) makecharset::$17 ← ((word)) (byte) makecharset::c#7 - [79] (word~) makecharset::$18 ← (word~) makecharset::$17 << (byte/signed byte/word/signed word/dword/signed dword) 3 - [80] (word~) makecharset::$19 ← (word~) makecharset::$18 + (byte) makecharset::i#6 - [81] *((const byte*) CHARSET#0+(byte/signed byte/word/signed word/dword/signed dword) 1*(byte/signed byte/word/signed word/dword/signed dword) 8 + (word~) makecharset::$19) ← (byte) makecharset::b#3 - [82] (byte) makecharset::i#1 ← ++ (byte) makecharset::i#6 - [83] if((byte) makecharset::i#1<(byte/signed byte/word/signed word/dword/signed dword) 8) goto makecharset::@4 + [77] (word~) makecharset::$17 ← ((word)) (byte) makecharset::c#7 + [78] (word~) makecharset::$18 ← (word~) makecharset::$17 << (byte/signed byte/word/signed word/dword/signed dword) 3 + [79] (word~) makecharset::$19 ← (word~) makecharset::$18 + (byte) makecharset::i#6 + [80] *((const byte*) CHARSET#0+(byte/signed byte/word/signed word/dword/signed dword) 1*(byte/signed byte/word/signed word/dword/signed dword) 8 + (word~) makecharset::$19) ← (byte) makecharset::b#3 + [81] (byte) makecharset::i#1 ← ++ (byte) makecharset::i#6 + [82] if((byte) makecharset::i#1<(byte/signed byte/word/signed word/dword/signed dword) 8) goto makecharset::@4 to:makecharset::@9 makecharset::@9: scope:[makecharset] from makecharset::@8 - [84] (byte) makecharset::c#1 ← ++ (byte) makecharset::c#7 - [85] if((byte) makecharset::c#1<(byte/signed byte/word/signed word/dword/signed dword) $40) goto makecharset::@3 + [83] (byte) makecharset::c#1 ← ++ (byte) makecharset::c#7 + [84] if((byte) makecharset::c#1<(byte/signed byte/word/signed word/dword/signed dword) $40) goto makecharset::@3 to:makecharset::@return makecharset::@return: scope:[makecharset] from makecharset::@9 - [86] return + [85] return to:@return sid_rnd_init: scope:[sid_rnd_init] from main::@7 - [87] *((const word*) SID_VOICE3_FREQ#0) ← (word/dword/signed dword) $ffff - [88] *((const byte*) SID_VOICE3_CONTROL#0) ← (const byte) SID_CONTROL_NOISE#0 + [86] *((const word*) SID_VOICE3_FREQ#0) ← (word/dword/signed dword) $ffff + [87] *((const byte*) SID_VOICE3_CONTROL#0) ← (const byte) SID_CONTROL_NOISE#0 to:sid_rnd_init::@return sid_rnd_init::@return: scope:[sid_rnd_init] from sid_rnd_init - [89] return + [88] return to:@return fillscreen: scope:[fillscreen] from main main::@4 main::@5 main::@6 - [90] (byte*) fillscreen::screen#6 ← phi( main/(const byte*) BUFFER#0 main::@5/(const byte*) SCREEN2#0 main::@6/(const byte*) COLS#0 main::@4/(const byte*) SCREEN1#0 ) - [90] (byte) fillscreen::fill#5 ← phi( main/(byte/signed byte/word/signed word/dword/signed dword) 0 main::@5/(byte/signed byte/word/signed word/dword/signed dword) 0 main::@6/(const byte) YELLOW#0 main::@4/(byte/signed byte/word/signed word/dword/signed dword) 0 ) + [89] (byte*) fillscreen::screen#6 ← phi( main/(const byte*) BUFFER#0 main::@5/(const byte*) SCREEN2#0 main::@6/(const byte*) COLS#0 main::@4/(const byte*) SCREEN1#0 ) + [89] (byte) fillscreen::fill#5 ← phi( main/(byte/signed byte/word/signed word/dword/signed dword) 0 main::@5/(byte/signed byte/word/signed word/dword/signed dword) 0 main::@6/(const byte) YELLOW#0 main::@4/(byte/signed byte/word/signed word/dword/signed dword) 0 ) to:fillscreen::@1 fillscreen::@1: scope:[fillscreen] from fillscreen fillscreen::@1 - [91] (word) fillscreen::i#2 ← phi( fillscreen/(byte/signed byte/word/signed word/dword/signed dword) 0 fillscreen::@1/(word) fillscreen::i#1 ) - [91] (byte*) fillscreen::screen#5 ← phi( fillscreen/(byte*) fillscreen::screen#6 fillscreen::@1/(byte*) fillscreen::screen#4 ) - [92] *((byte*) fillscreen::screen#5) ← (byte) fillscreen::fill#5 - [93] (byte*) fillscreen::screen#4 ← ++ (byte*) fillscreen::screen#5 - [94] (word) fillscreen::i#1 ← ++ (word) fillscreen::i#2 - [95] if((word) fillscreen::i#1!=(word/signed word/dword/signed dword) $3e8) goto fillscreen::@1 + [90] (word) fillscreen::i#2 ← phi( fillscreen/(byte/signed byte/word/signed word/dword/signed dword) 0 fillscreen::@1/(word) fillscreen::i#1 ) + [90] (byte*) fillscreen::screen#5 ← phi( fillscreen/(byte*) fillscreen::screen#6 fillscreen::@1/(byte*) fillscreen::screen#4 ) + [91] *((byte*) fillscreen::screen#5) ← (byte) fillscreen::fill#5 + [92] (byte*) fillscreen::screen#4 ← ++ (byte*) fillscreen::screen#5 + [93] (word) fillscreen::i#1 ← ++ (word) fillscreen::i#2 + [94] if((word) fillscreen::i#1!=(word/signed word/dword/signed dword) $3e8) goto fillscreen::@1 to:fillscreen::@return fillscreen::@return: scope:[fillscreen] from fillscreen::@1 - [96] return + [95] return to:@return diff --git a/src/test/ref/examples/fire/fire.log b/src/test/ref/examples/fire/fire.log index 3436e61f9..95ebffa1c 100644 --- a/src/test/ref/examples/fire/fire.log +++ b/src/test/ref/examples/fire/fire.log @@ -28,7 +28,7 @@ sid_rnd_init: scope:[sid_rnd_init] from main::@12 sid_rnd_init::@return: scope:[sid_rnd_init] from sid_rnd_init return to:@return -sid_rnd: scope:[sid_rnd] from fire::@10 +sid_rnd: scope:[sid_rnd] from fire::@9 (byte) sid_rnd::return#0 ← *((byte*) SID_VOICE3_OSC#0) to:sid_rnd::@return sid_rnd::@return: scope:[sid_rnd] from sid_rnd @@ -181,7 +181,7 @@ fire::@3: scope:[fire] from fire::@1 fire::@4: scope:[fire] from fire::@2 fire::@7 (byte*) fire::screenbase#5 ← phi( fire::@2/(byte*) fire::screenbase#6 fire::@7/(byte*) fire::screenbase#7 ) (byte*) fire::screen#4 ← phi( fire::@2/(byte*) fire::screen#6 fire::@7/(byte*) fire::screen#7 ) - (byte*) fire::buffer#6 ← phi( fire::@2/(byte*) fire::buffer#5 fire::@7/(byte*) fire::buffer#9 ) + (byte*) fire::buffer#6 ← phi( fire::@2/(byte*) fire::buffer#5 fire::@7/(byte*) fire::buffer#8 ) (byte) fire::c#2 ← phi( fire::@2/(byte) fire::c#0 fire::@7/(byte) fire::c#1 ) *((byte*) fire::buffer#6) ← (byte) fire::c#2 *((byte*) fire::screen#4) ← *((byte*) fire::buffer#6) @@ -191,37 +191,33 @@ fire::@4: scope:[fire] from fire::@2 fire::@7 fire::@7: scope:[fire] from fire::@2 (byte*) fire::screenbase#7 ← phi( fire::@2/(byte*) fire::screenbase#6 ) (byte*) fire::screen#7 ← phi( fire::@2/(byte*) fire::screen#6 ) - (byte*) fire::buffer#9 ← phi( fire::@2/(byte*) fire::buffer#5 ) + (byte*) fire::buffer#8 ← phi( fire::@2/(byte*) fire::buffer#5 ) (byte) fire::c#3 ← phi( fire::@2/(byte) fire::c#0 ) (byte) fire::c#1 ← (byte) fire::c#3 - (byte/signed byte/word/signed word/dword/signed dword) 3 to:fire::@4 -fire::@9: scope:[fire] from fire::@15 fire::@3 - (byte*) fire::screen#10 ← phi( fire::@15/(byte*) fire::screen#3 fire::@3/(byte*) fire::screen#1 ) - (byte*) fire::buffer#7 ← phi( fire::@15/(byte*) fire::buffer#3 fire::@3/(byte*) fire::buffer#1 ) - (word/signed word/dword/signed dword~) fire::$15 ← (byte/signed byte/word/signed word/dword/signed dword) $19 * (byte/signed byte/word/signed word/dword/signed dword) $28 - (byte*~) fire::$16 ← (byte*) BUFFER#0 + (word/signed word/dword/signed dword~) fire::$15 - (bool~) fire::$17 ← (byte*) fire::buffer#7 != (byte*~) fire::$16 - if((bool~) fire::$17) goto fire::@10 - to:fire::@return -fire::@10: scope:[fire] from fire::@9 - (byte*) fire::screen#8 ← phi( fire::@9/(byte*) fire::screen#10 ) - (byte*) fire::buffer#10 ← phi( fire::@9/(byte*) fire::buffer#7 ) +fire::@9: scope:[fire] from fire::@11 fire::@3 + (byte*) fire::screen#8 ← phi( fire::@11/(byte*) fire::screen#3 fire::@3/(byte*) fire::screen#1 ) + (byte*) fire::buffer#9 ← phi( fire::@11/(byte*) fire::buffer#3 fire::@3/(byte*) fire::buffer#1 ) call sid_rnd (byte) sid_rnd::return#2 ← (byte) sid_rnd::return#1 - to:fire::@15 -fire::@15: scope:[fire] from fire::@10 - (byte*) fire::screen#5 ← phi( fire::@10/(byte*) fire::screen#8 ) - (byte*) fire::buffer#8 ← phi( fire::@10/(byte*) fire::buffer#10 ) - (byte) sid_rnd::return#4 ← phi( fire::@10/(byte) sid_rnd::return#2 ) - (byte~) fire::$18 ← (byte) sid_rnd::return#4 - (byte/signed word/word/dword/signed dword~) fire::$19 ← (byte~) fire::$18 / (byte/signed byte/word/signed word/dword/signed dword) $10 - (byte/signed word/word/dword/signed dword~) fire::$20 ← (byte/signed byte/word/signed word/dword/signed dword) $30 + (byte/signed word/word/dword/signed dword~) fire::$19 - *((byte*) fire::buffer#8) ← (byte/signed word/word/dword/signed dword~) fire::$20 - *((byte*) fire::screen#5) ← *((byte*) fire::buffer#8) + to:fire::@11 +fire::@11: scope:[fire] from fire::@9 + (byte*) fire::screen#5 ← phi( fire::@9/(byte*) fire::screen#8 ) + (byte*) fire::buffer#7 ← phi( fire::@9/(byte*) fire::buffer#9 ) + (byte) sid_rnd::return#4 ← phi( fire::@9/(byte) sid_rnd::return#2 ) + (byte~) fire::$15 ← (byte) sid_rnd::return#4 + (byte/signed word/word/dword/signed dword~) fire::$16 ← (byte~) fire::$15 / (byte/signed byte/word/signed word/dword/signed dword) $10 + (byte/signed word/word/dword/signed dword~) fire::$17 ← (byte/signed byte/word/signed word/dword/signed dword) $30 + (byte/signed word/word/dword/signed dword~) fire::$16 + *((byte*) fire::buffer#7) ← (byte/signed word/word/dword/signed dword~) fire::$17 + *((byte*) fire::screen#5) ← *((byte*) fire::buffer#7) (byte*) fire::screen#3 ← ++ (byte*) fire::screen#5 - (byte*) fire::buffer#3 ← ++ (byte*) fire::buffer#8 - to:fire::@9 -fire::@return: scope:[fire] from fire::@9 + (byte*) fire::buffer#3 ← ++ (byte*) fire::buffer#7 + (word/signed word/dword/signed dword~) fire::$18 ← (byte/signed byte/word/signed word/dword/signed dword) $19 * (byte/signed byte/word/signed word/dword/signed dword) $28 + (byte*~) fire::$19 ← (byte*) BUFFER#0 + (word/signed word/dword/signed dword~) fire::$18 + (bool~) fire::$20 ← (byte*) fire::buffer#3 != (byte*~) fire::$19 + if((bool~) fire::$20) goto fire::@9 + to:fire::@return +fire::@return: scope:[fire] from fire::@11 return to:@return makecharset: scope:[makecharset] from main::@13 @@ -427,13 +423,13 @@ SYMBOL TABLE SSA (byte/signed word/word/dword/signed dword~) fire::$12 (bool~) fire::$13 (bool~) fire::$14 -(word/signed word/dword/signed dword~) fire::$15 -(byte*~) fire::$16 -(bool~) fire::$17 -(byte~) fire::$18 -(byte/signed word/word/dword/signed dword~) fire::$19 +(byte~) fire::$15 +(byte/signed word/word/dword/signed dword~) fire::$16 +(byte/signed word/word/dword/signed dword~) fire::$17 +(word/signed word/dword/signed dword~) fire::$18 +(byte*~) fire::$19 (word/signed word/dword/signed dword~) fire::$2 -(byte/signed word/word/dword/signed dword~) fire::$20 +(bool~) fire::$20 (byte*~) fire::$3 (word/signed word/dword/signed dword~) fire::$4 (byte*~) fire::$5 @@ -442,8 +438,7 @@ SYMBOL TABLE SSA (byte/signed byte/word/signed word/dword/signed dword~) fire::$8 (byte~) fire::$9 (label) fire::@1 -(label) fire::@10 -(label) fire::@15 +(label) fire::@11 (label) fire::@2 (label) fire::@3 (label) fire::@4 @@ -453,7 +448,6 @@ SYMBOL TABLE SSA (byte*) fire::buffer (byte*) fire::buffer#0 (byte*) fire::buffer#1 -(byte*) fire::buffer#10 (byte*) fire::buffer#2 (byte*) fire::buffer#3 (byte*) fire::buffer#4 @@ -470,7 +464,6 @@ SYMBOL TABLE SSA (byte*) fire::screen (byte*) fire::screen#0 (byte*) fire::screen#1 -(byte*) fire::screen#10 (byte*) fire::screen#2 (byte*) fire::screen#3 (byte*) fire::screen#4 @@ -680,7 +673,7 @@ Culled Empty Block (label) main::@14 Culled Empty Block (label) @11 Successful SSA optimization Pass2CullEmptyBlocks Inversing boolean not [98] (bool~) fire::$14 ← (byte) fire::c#0 <= (byte/signed byte/word/signed word/dword/signed dword) 2 from [97] (bool~) fire::$13 ← (byte) fire::c#0 > (byte/signed byte/word/signed word/dword/signed dword) 2 -Inversing boolean not [163] (bool~) makecharset::$9 ← (byte) makecharset::bc#1 <= (byte/signed byte/word/signed word/dword/signed dword) $3f from [162] (bool~) makecharset::$8 ← (byte) makecharset::bc#1 > (byte/signed byte/word/signed word/dword/signed dword) $3f +Inversing boolean not [162] (bool~) makecharset::$9 ← (byte) makecharset::bc#1 <= (byte/signed byte/word/signed word/dword/signed dword) $3f from [161] (bool~) makecharset::$8 ← (byte) makecharset::bc#1 > (byte/signed byte/word/signed word/dword/signed dword) $3f Successful SSA optimization Pass2UnaryNotSimplification Alias (byte) sid_rnd::return#0 = (byte) sid_rnd::return#3 (byte) sid_rnd::return#1 Alias (byte*) main::toD0181_screen#0 = (byte*) main::toD0181_screen#1 @@ -690,15 +683,15 @@ Alias (byte*) main::toD0182_screen#0 = (byte*) main::toD0182_screen#1 Alias (byte*) main::toD0182_gfx#0 = (byte*) main::toD0182_gfx#1 Alias (byte) main::toD0182_return#0 = (byte/word/dword) main::toD0182_$8#0 (byte) main::toD0182_return#2 (byte) main::toD0182_return#1 (byte) main::toD0182_return#3 (byte~) main::$9 Alias (byte*) fire::screen#0 = (byte*) fire::screenbase#2 -Alias (byte*) fire::buffer#4 = (byte*) fire::buffer#5 (byte*) fire::buffer#9 +Alias (byte*) fire::buffer#4 = (byte*) fire::buffer#5 (byte*) fire::buffer#8 Alias (byte*) fire::screen#6 = (byte*) fire::screen#9 (byte*) fire::screen#7 Alias (byte*) fire::screenbase#3 = (byte*) fire::screenbase#6 (byte*) fire::screenbase#4 (byte*) fire::screenbase#7 Alias (byte) fire::c#0 = (byte/signed word/word/dword/signed dword~) fire::$12 (byte) fire::c#3 Alias (byte*) fire::screen#1 = (byte*~) fire::$1 Alias (byte*) fire::buffer#1 = (byte*~) fire::$3 -Alias (byte*) fire::buffer#10 = (byte*) fire::buffer#7 (byte*) fire::buffer#8 -Alias (byte*) fire::screen#10 = (byte*) fire::screen#8 (byte*) fire::screen#5 Alias (byte) sid_rnd::return#2 = (byte) sid_rnd::return#4 +Alias (byte*) fire::buffer#7 = (byte*) fire::buffer#9 +Alias (byte*) fire::screen#5 = (byte*) fire::screen#8 Alias (byte*) makecharset::font#0 = (byte*) makecharset::charset#1 Alias (byte*) makecharset::charset#2 = (byte*) makecharset::charset#3 Alias (byte*) makecharset::font1#0 = (byte*~) makecharset::$4 @@ -743,14 +736,14 @@ Redundant Phi (byte) fillscreen::fill#4 (byte) fillscreen::fill#5 Successful SSA optimization Pass2RedundantPhiElimination Simple Condition (bool~) fire::$6 [88] if((byte*) fire::buffer#4!=(byte*~) fire::$5) goto fire::@2 Simple Condition (bool~) fire::$14 [99] if((byte) fire::c#0<=(byte/signed byte/word/signed word/dword/signed dword) 2) goto fire::@4 -Simple Condition (bool~) fire::$17 [118] if((byte*) fire::buffer#10!=(byte*~) fire::$16) goto fire::@10 -Simple Condition (bool~) makecharset::$2 [140] if((byte*) makecharset::font#1!=(byte*~) makecharset::$1) goto makecharset::@1 -Simple Condition (bool~) makecharset::$7 [151] if((byte*) makecharset::font1#1!=(byte*~) makecharset::$6) goto makecharset::@3 -Simple Condition (bool~) makecharset::$9 [164] if((byte) makecharset::bc#1<=(byte/signed byte/word/signed word/dword/signed dword) $3f) goto makecharset::@8 -Simple Condition (bool~) makecharset::$14 [168] if((byte) makecharset::ii#1<(byte/signed byte/word/signed word/dword/signed dword) 8) goto makecharset::@7 -Simple Condition (bool~) makecharset::$20 [185] if((byte) makecharset::i#1<(byte/signed byte/word/signed word/dword/signed dword) 8) goto makecharset::@6 -Simple Condition (bool~) makecharset::$21 [189] if((byte) makecharset::c#1<(byte/signed byte/word/signed word/dword/signed dword) $40) goto makecharset::@5 -Simple Condition (bool~) fillscreen::$0 [198] if((word) fillscreen::i#1!=rangelast(0,$3e7)) goto fillscreen::@1 +Simple Condition (bool~) fire::$20 [128] if((byte*) fire::buffer#3!=(byte*~) fire::$19) goto fire::@9 +Simple Condition (bool~) makecharset::$2 [139] if((byte*) makecharset::font#1!=(byte*~) makecharset::$1) goto makecharset::@1 +Simple Condition (bool~) makecharset::$7 [150] if((byte*) makecharset::font1#1!=(byte*~) makecharset::$6) goto makecharset::@3 +Simple Condition (bool~) makecharset::$9 [163] if((byte) makecharset::bc#1<=(byte/signed byte/word/signed word/dword/signed dword) $3f) goto makecharset::@8 +Simple Condition (bool~) makecharset::$14 [167] if((byte) makecharset::ii#1<(byte/signed byte/word/signed word/dword/signed dword) 8) goto makecharset::@7 +Simple Condition (bool~) makecharset::$20 [184] if((byte) makecharset::i#1<(byte/signed byte/word/signed word/dword/signed dword) 8) goto makecharset::@6 +Simple Condition (bool~) makecharset::$21 [188] if((byte) makecharset::c#1<(byte/signed byte/word/signed word/dword/signed dword) $40) goto makecharset::@5 +Simple Condition (bool~) fillscreen::$0 [197] if((word) fillscreen::i#1!=rangelast(0,$3e7)) goto fillscreen::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) BORDERCOL#0 = ((byte*))$d020 Constant (const byte*) BGCOL#0 = ((byte*))$d021 @@ -774,7 +767,7 @@ Constant (const byte/signed byte/word/signed word/dword/signed dword) fire::$7 = Constant (const byte/signed byte/word/signed word/dword/signed dword) fire::$8 = $28-1 Constant (const word/signed word/dword/signed dword) fire::$0 = $18*$28 Constant (const word/signed word/dword/signed dword) fire::$2 = $18*$28 -Constant (const word/signed word/dword/signed dword) fire::$15 = $19*$28 +Constant (const word/signed word/dword/signed dword) fire::$18 = $19*$28 Constant (const byte[8]) makecharset::bittab#0 = { 1, 2, 4, 8, $10, $20, $40, $80 } Constant (const byte/signed byte/word/signed word/dword/signed dword) makecharset::$0 = 1*8 Constant (const word/signed word/dword/signed dword) makecharset::$3 = $40*8 @@ -802,7 +795,7 @@ Constant (const byte*) main::toD0182_gfx#0 = CHARSET#0 Constant (const byte*) fire::buffer#0 = BUFFER#0 Constant (const byte*) fire::$5 = BUFFER#0+fire::$4 Constant (const byte*) fire::buffer#1 = BUFFER#0+fire::$2 -Constant (const byte*) fire::$16 = BUFFER#0+fire::$15 +Constant (const byte*) fire::$19 = BUFFER#0+fire::$18 Successful SSA optimization Pass2ConstantIdentification Constant (const word) main::toD0181_$0#0 = ((word))main::toD0181_screen#0 Constant (const word) main::toD0181_$4#0 = ((word))main::toD0181_gfx#0 @@ -839,7 +832,7 @@ Resolved ranged comparison value if(fillscreen::i#1!=rangelast(0,$3e7)) goto fil Rewriting conditional comparison if((byte) fire::c#0<=(byte/signed byte/word/signed word/dword/signed dword) 2) goto fire::@4 Rewriting conditional comparison if((byte) makecharset::bc#1<=(byte/signed byte/word/signed word/dword/signed dword) $3f) goto makecharset::@8 Rewriting division to use shift (byte) fire::c#0 ← (byte~) fire::$11 / (byte/signed byte/word/signed word/dword/signed dword) 4 -Rewriting division to use shift (byte/signed word/word/dword/signed dword~) fire::$19 ← (byte~) fire::$18 / (byte/signed byte/word/signed word/dword/signed dword) $10 +Rewriting division to use shift (byte/signed word/word/dword/signed dword~) fire::$16 ← (byte~) fire::$15 / (byte/signed byte/word/signed word/dword/signed dword) $10 Successful SSA optimization Pass2MultiplyToShiftRewriting Culled Empty Block (label) @4 Culled Empty Block (label) @6 @@ -857,7 +850,7 @@ Successful SSA optimization Pass2SelfPhiElimination Redundant Phi (byte) makecharset::c#5 (byte) makecharset::c#7 Redundant Phi (byte*) makecharset::charset#9 (byte*) makecharset::charset#10 Successful SSA optimization Pass2RedundantPhiElimination -Inferred type updated to byte in [38] (byte/signed word/word/dword/signed dword~) fire::$19 ← (byte~) fire::$18 >> (byte/signed byte/word/signed word/dword/signed dword) 4 +Inferred type updated to byte in [37] (byte/signed word/word/dword/signed dword~) fire::$16 ← (byte~) fire::$15 >> (byte/signed byte/word/signed word/dword/signed dword) 4 Self Phi Eliminated (byte*) makecharset::charset#10 Successful SSA optimization Pass2SelfPhiElimination Redundant Phi (byte*) makecharset::charset#10 (const byte*) makecharset::charset#0 @@ -908,10 +901,10 @@ Constant inlined fillscreen::screen#3 = (const byte*) COLS#0 Constant inlined fillscreen::screen#2 = (const byte*) SCREEN2#0 Constant inlined fillscreen::screen#1 = (const byte*) SCREEN1#0 Constant inlined fillscreen::screen#0 = (const byte*) BUFFER#0 -Constant inlined fire::$16 = (const byte*) BUFFER#0+(byte/signed byte/word/signed word/dword/signed dword) $19*(byte/signed byte/word/signed word/dword/signed dword) $28 -Constant inlined fire::$15 = (byte/signed byte/word/signed word/dword/signed dword) $19*(byte/signed byte/word/signed word/dword/signed dword) $28 Constant inlined fire::$0 = (byte/signed byte/word/signed word/dword/signed dword) $18*(byte/signed byte/word/signed word/dword/signed dword) $28 Constant inlined fire::$2 = (byte/signed byte/word/signed word/dword/signed dword) $18*(byte/signed byte/word/signed word/dword/signed dword) $28 +Constant inlined fire::$19 = (const byte*) BUFFER#0+(byte/signed byte/word/signed word/dword/signed dword) $19*(byte/signed byte/word/signed word/dword/signed dword) $28 +Constant inlined fire::$18 = (byte/signed byte/word/signed word/dword/signed dword) $19*(byte/signed byte/word/signed word/dword/signed dword) $28 Constant inlined fire::$5 = (const byte*) BUFFER#0+(byte/signed byte/word/signed word/dword/signed dword) $18*(byte/signed byte/word/signed word/dword/signed dword) $28 Constant inlined fire::screenbase#1 = (const byte*) SCREEN2#0 Constant inlined fire::$4 = (byte/signed byte/word/signed word/dword/signed dword) $18*(byte/signed byte/word/signed word/dword/signed dword) $28 @@ -937,7 +930,8 @@ Constant inlined fire::buffer#1 = (const byte*) BUFFER#0+(byte/signed byte/word/ Constant inlined fire::buffer#0 = (const byte*) BUFFER#0 Constant inlined makecharset::$6 = (const byte*) CHARSET#0+(word/signed word/dword/signed dword) $100*(byte/signed byte/word/signed word/dword/signed dword) 8 Successful SSA optimization Pass2ConstantInlining -Added new block during phi lifting fire::@16(between fire::@2 and fire::@4) +Added new block during phi lifting fire::@12(between fire::@11 and fire::@9) +Added new block during phi lifting fire::@13(between fire::@2 and fire::@4) Added new block during phi lifting makecharset::@13(between makecharset::@1 and makecharset::@1) Added new block during phi lifting makecharset::@14(between makecharset::@3 and makecharset::@3) Added new block during phi lifting makecharset::@15(between makecharset::@11 and makecharset::@5) @@ -956,40 +950,40 @@ Adding NOP phi() at start of main::@13 Adding NOP phi() at start of main::@2 Adding NOP phi() at start of main::toD0181 Adding NOP phi() at start of main::toD0182 -Adding NOP phi() at start of fire::@10 Adding NOP phi() at start of makecharset CALL GRAPH Calls in [] to main:2 Calls in [main] to fillscreen:7 fillscreen:9 fillscreen:11 fillscreen:13 sid_rnd_init:15 makecharset:17 fire:19 fire:22 -Calls in [fire] to sid_rnd:35 +Calls in [fire] to sid_rnd:32 Created 20 initial phi equivalence classes -Not coalescing [26] fire::screen#11 ← fire::screen#0 -Coalesced [30] fire::screen#14 ← fire::screen#1 -Coalesced [44] fire::buffer#12 ← fire::buffer#3 -Coalesced [45] fire::screen#13 ← fire::screen#3 -Coalesced [52] fire::c#5 ← fire::c#1 -Coalesced [58] fire::buffer#11 ← fire::buffer#2 -Coalesced [59] fire::screen#12 ← fire::screen#2 -Coalesced [60] fire::c#4 ← fire::c#0 -Coalesced [74] makecharset::bc#9 ← makecharset::bc#5 -Coalesced [83] makecharset::bc#12 ← makecharset::bc#2 -Coalesced [84] makecharset::b#8 ← makecharset::b#1 -Coalesced [97] makecharset::c#9 ← makecharset::c#1 -Coalesced [98] makecharset::bc#8 ← makecharset::bc#6 -Coalesced [99] makecharset::i#7 ← makecharset::i#1 -Coalesced (already) [100] makecharset::bc#10 ← makecharset::bc#6 -Coalesced [101] makecharset::ii#5 ← makecharset::ii#1 -Coalesced [102] makecharset::b#6 ← makecharset::b#3 -Coalesced [103] makecharset::bc#11 ← makecharset::bc#1 -Coalesced (already) [104] makecharset::b#7 ← makecharset::b#2 -Coalesced [105] makecharset::font1#3 ← makecharset::font1#1 -Coalesced [106] makecharset::font#3 ← makecharset::font#1 -Coalesced [111] fillscreen::screen#7 ← fillscreen::screen#6 -Coalesced [118] fillscreen::screen#8 ← fillscreen::screen#4 -Coalesced [119] fillscreen::i#3 ← fillscreen::i#1 +Not coalescing [26] fire::screen#10 ← fire::screen#0 +Coalesced [30] fire::screen#13 ← fire::screen#1 +Coalesced [43] fire::buffer#11 ← fire::buffer#3 +Coalesced [44] fire::screen#12 ← fire::screen#3 +Coalesced [51] fire::c#5 ← fire::c#1 +Coalesced [57] fire::buffer#10 ← fire::buffer#2 +Coalesced [58] fire::screen#11 ← fire::screen#2 +Coalesced [59] fire::c#4 ← fire::c#0 +Coalesced [73] makecharset::bc#9 ← makecharset::bc#5 +Coalesced [82] makecharset::bc#12 ← makecharset::bc#2 +Coalesced [83] makecharset::b#8 ← makecharset::b#1 +Coalesced [96] makecharset::c#9 ← makecharset::c#1 +Coalesced [97] makecharset::bc#8 ← makecharset::bc#6 +Coalesced [98] makecharset::i#7 ← makecharset::i#1 +Coalesced (already) [99] makecharset::bc#10 ← makecharset::bc#6 +Coalesced [100] makecharset::ii#5 ← makecharset::ii#1 +Coalesced [101] makecharset::b#6 ← makecharset::b#3 +Coalesced [102] makecharset::bc#11 ← makecharset::bc#1 +Coalesced (already) [103] makecharset::b#7 ← makecharset::b#2 +Coalesced [104] makecharset::font1#3 ← makecharset::font1#1 +Coalesced [105] makecharset::font#3 ← makecharset::font#1 +Coalesced [110] fillscreen::screen#7 ← fillscreen::screen#6 +Coalesced [117] fillscreen::screen#8 ← fillscreen::screen#4 +Coalesced [118] fillscreen::i#3 ← fillscreen::i#1 Coalesced down to 16 phi equivalence classes -Culled Empty Block (label) fire::@16 +Culled Empty Block (label) fire::@12 +Culled Empty Block (label) fire::@13 Culled Empty Block (label) makecharset::@15 Culled Empty Block (label) makecharset::@16 Culled Empty Block (label) makecharset::@17 @@ -1008,8 +1002,7 @@ Renumbering block main::@12 to main::@7 Renumbering block main::@13 to main::@8 Renumbering block fire::@7 to fire::@5 Renumbering block fire::@9 to fire::@6 -Renumbering block fire::@10 to fire::@7 -Renumbering block fire::@15 to fire::@8 +Renumbering block fire::@11 to fire::@7 Renumbering block makecharset::@3 to makecharset::@2 Renumbering block makecharset::@5 to makecharset::@3 Renumbering block makecharset::@6 to makecharset::@4 @@ -1029,7 +1022,6 @@ Adding NOP phi() at start of main::@8 Adding NOP phi() at start of main::@1 Adding NOP phi() at start of main::toD0181 Adding NOP phi() at start of main::toD0182 -Adding NOP phi() at start of fire::@7 Adding NOP phi() at start of makecharset FINAL CONTROL FLOW GRAPH @@ -1087,139 +1079,136 @@ main::@3: scope:[main] from main::toD0182 to:main::@1 fire: scope:[fire] from main::@1 main::@2 [25] (byte*) fire::screen#0 ← phi( main::@1/(const byte*) SCREEN1#0 main::@2/(const byte*) SCREEN2#0 ) - [26] (byte*~) fire::screen#11 ← (byte*) fire::screen#0 + [26] (byte*~) fire::screen#10 ← (byte*) fire::screen#0 to:fire::@1 fire::@1: scope:[fire] from fire fire::@4 - [27] (byte*) fire::screen#4 ← phi( fire/(byte*~) fire::screen#11 fire::@4/(byte*) fire::screen#2 ) + [27] (byte*) fire::screen#4 ← phi( fire/(byte*~) fire::screen#10 fire::@4/(byte*) fire::screen#2 ) [27] (byte*) fire::buffer#4 ← phi( fire/(const byte*) BUFFER#0 fire::@4/(byte*) fire::buffer#2 ) [28] if((byte*) fire::buffer#4!=(const byte*) BUFFER#0+(byte/signed byte/word/signed word/dword/signed dword) $18*(byte/signed byte/word/signed word/dword/signed dword) $28) goto fire::@2 to:fire::@3 fire::@3: scope:[fire] from fire::@1 [29] (byte*) fire::screen#1 ← (byte*) fire::screen#0 + (byte/signed byte/word/signed word/dword/signed dword) $18*(byte/signed byte/word/signed word/dword/signed dword) $28 to:fire::@6 -fire::@6: scope:[fire] from fire::@3 fire::@8 - [30] (byte*) fire::screen#10 ← phi( fire::@8/(byte*) fire::screen#3 fire::@3/(byte*) fire::screen#1 ) - [30] (byte*) fire::buffer#10 ← phi( fire::@8/(byte*) fire::buffer#3 fire::@3/(const byte*) BUFFER#0+(byte/signed byte/word/signed word/dword/signed dword) $18*(byte/signed byte/word/signed word/dword/signed dword) $28 ) - [31] if((byte*) fire::buffer#10!=(const byte*) BUFFER#0+(byte/signed byte/word/signed word/dword/signed dword) $19*(byte/signed byte/word/signed word/dword/signed dword) $28) goto fire::@7 - to:fire::@return -fire::@return: scope:[fire] from fire::@6 - [32] return - to:@return +fire::@6: scope:[fire] from fire::@3 fire::@7 + [30] (byte*) fire::screen#5 ← phi( fire::@7/(byte*) fire::screen#3 fire::@3/(byte*) fire::screen#1 ) + [30] (byte*) fire::buffer#7 ← phi( fire::@7/(byte*) fire::buffer#3 fire::@3/(const byte*) BUFFER#0+(byte/signed byte/word/signed word/dword/signed dword) $18*(byte/signed byte/word/signed word/dword/signed dword) $28 ) + [31] call sid_rnd + [32] (byte) sid_rnd::return#2 ← (byte) sid_rnd::return#0 + to:fire::@7 fire::@7: scope:[fire] from fire::@6 - [33] phi() - [34] call sid_rnd - [35] (byte) sid_rnd::return#2 ← (byte) sid_rnd::return#0 - to:fire::@8 -fire::@8: scope:[fire] from fire::@7 - [36] (byte~) fire::$18 ← (byte) sid_rnd::return#2 - [37] (byte~) fire::$19 ← (byte~) fire::$18 >> (byte/signed byte/word/signed word/dword/signed dword) 4 - [38] (byte/signed word/word/dword/signed dword~) fire::$20 ← (byte/signed byte/word/signed word/dword/signed dword) $30 + (byte~) fire::$19 - [39] *((byte*) fire::buffer#10) ← (byte/signed word/word/dword/signed dword~) fire::$20 - [40] *((byte*) fire::screen#10) ← *((byte*) fire::buffer#10) - [41] (byte*) fire::screen#3 ← ++ (byte*) fire::screen#10 - [42] (byte*) fire::buffer#3 ← ++ (byte*) fire::buffer#10 - to:fire::@6 + [33] (byte~) fire::$15 ← (byte) sid_rnd::return#2 + [34] (byte~) fire::$16 ← (byte~) fire::$15 >> (byte/signed byte/word/signed word/dword/signed dword) 4 + [35] (byte/signed word/word/dword/signed dword~) fire::$17 ← (byte/signed byte/word/signed word/dword/signed dword) $30 + (byte~) fire::$16 + [36] *((byte*) fire::buffer#7) ← (byte/signed word/word/dword/signed dword~) fire::$17 + [37] *((byte*) fire::screen#5) ← *((byte*) fire::buffer#7) + [38] (byte*) fire::screen#3 ← ++ (byte*) fire::screen#5 + [39] (byte*) fire::buffer#3 ← ++ (byte*) fire::buffer#7 + [40] if((byte*) fire::buffer#3!=(const byte*) BUFFER#0+(byte/signed byte/word/signed word/dword/signed dword) $19*(byte/signed byte/word/signed word/dword/signed dword) $28) goto fire::@6 + to:fire::@return +fire::@return: scope:[fire] from fire::@7 + [41] return + to:@return fire::@2: scope:[fire] from fire::@1 - [43] (byte~) fire::$9 ← *((byte*) fire::buffer#4 + (byte/signed byte/word/signed word/dword/signed dword) $28-(byte/signed byte/word/signed word/dword/signed dword) 1) + *((byte*) fire::buffer#4 + (byte/signed byte/word/signed word/dword/signed dword) $28-(byte/signed byte/word/signed word/dword/signed dword) 1) - [44] (byte~) fire::$10 ← (byte~) fire::$9 + *((byte*) fire::buffer#4 + (byte/signed byte/word/signed word/dword/signed dword) $28) - [45] (byte~) fire::$11 ← (byte~) fire::$10 + *((byte*) fire::buffer#4 + (byte/signed byte/word/signed word/dword/signed dword) $29) - [46] (byte) fire::c#0 ← (byte~) fire::$11 >> (byte/signed byte/word/signed word/dword/signed dword) 2 - [47] if((byte) fire::c#0<(byte/signed byte/word/signed word/dword/signed dword) 2+(byte/signed byte/word/signed word/dword/signed dword) 1) goto fire::@4 + [42] (byte~) fire::$9 ← *((byte*) fire::buffer#4 + (byte/signed byte/word/signed word/dword/signed dword) $28-(byte/signed byte/word/signed word/dword/signed dword) 1) + *((byte*) fire::buffer#4 + (byte/signed byte/word/signed word/dword/signed dword) $28-(byte/signed byte/word/signed word/dword/signed dword) 1) + [43] (byte~) fire::$10 ← (byte~) fire::$9 + *((byte*) fire::buffer#4 + (byte/signed byte/word/signed word/dword/signed dword) $28) + [44] (byte~) fire::$11 ← (byte~) fire::$10 + *((byte*) fire::buffer#4 + (byte/signed byte/word/signed word/dword/signed dword) $29) + [45] (byte) fire::c#0 ← (byte~) fire::$11 >> (byte/signed byte/word/signed word/dword/signed dword) 2 + [46] if((byte) fire::c#0<(byte/signed byte/word/signed word/dword/signed dword) 2+(byte/signed byte/word/signed word/dword/signed dword) 1) goto fire::@4 to:fire::@5 fire::@5: scope:[fire] from fire::@2 - [48] (byte) fire::c#1 ← (byte) fire::c#0 - (byte/signed byte/word/signed word/dword/signed dword) 3 + [47] (byte) fire::c#1 ← (byte) fire::c#0 - (byte/signed byte/word/signed word/dword/signed dword) 3 to:fire::@4 fire::@4: scope:[fire] from fire::@2 fire::@5 - [49] (byte) fire::c#2 ← phi( fire::@2/(byte) fire::c#0 fire::@5/(byte) fire::c#1 ) - [50] *((byte*) fire::buffer#4) ← (byte) fire::c#2 - [51] *((byte*) fire::screen#4) ← *((byte*) fire::buffer#4) - [52] (byte*) fire::screen#2 ← ++ (byte*) fire::screen#4 - [53] (byte*) fire::buffer#2 ← ++ (byte*) fire::buffer#4 + [48] (byte) fire::c#2 ← phi( fire::@2/(byte) fire::c#0 fire::@5/(byte) fire::c#1 ) + [49] *((byte*) fire::buffer#4) ← (byte) fire::c#2 + [50] *((byte*) fire::screen#4) ← *((byte*) fire::buffer#4) + [51] (byte*) fire::screen#2 ← ++ (byte*) fire::screen#4 + [52] (byte*) fire::buffer#2 ← ++ (byte*) fire::buffer#4 to:fire::@1 -sid_rnd: scope:[sid_rnd] from fire::@7 - [54] (byte) sid_rnd::return#0 ← *((const byte*) SID_VOICE3_OSC#0) +sid_rnd: scope:[sid_rnd] from fire::@6 + [53] (byte) sid_rnd::return#0 ← *((const byte*) SID_VOICE3_OSC#0) to:sid_rnd::@return sid_rnd::@return: scope:[sid_rnd] from sid_rnd - [55] return + [54] return to:@return makecharset: scope:[makecharset] from main::@8 - [56] phi() + [55] phi() to:makecharset::@1 makecharset::@1: scope:[makecharset] from makecharset makecharset::@1 - [57] (byte*) makecharset::font#2 ← phi( makecharset/(const byte*) CHARSET#0 makecharset::@1/(byte*) makecharset::font#1 ) - [58] *((byte*) makecharset::font#2) ← (byte/signed byte/word/signed word/dword/signed dword) 0 - [59] (byte*) makecharset::font#1 ← ++ (byte*) makecharset::font#2 - [60] if((byte*) makecharset::font#1!=(const byte*) CHARSET#0+(byte/signed byte/word/signed word/dword/signed dword) 1*(byte/signed byte/word/signed word/dword/signed dword) 8) goto makecharset::@1 + [56] (byte*) makecharset::font#2 ← phi( makecharset/(const byte*) CHARSET#0 makecharset::@1/(byte*) makecharset::font#1 ) + [57] *((byte*) makecharset::font#2) ← (byte/signed byte/word/signed word/dword/signed dword) 0 + [58] (byte*) makecharset::font#1 ← ++ (byte*) makecharset::font#2 + [59] if((byte*) makecharset::font#1!=(const byte*) CHARSET#0+(byte/signed byte/word/signed word/dword/signed dword) 1*(byte/signed byte/word/signed word/dword/signed dword) 8) goto makecharset::@1 to:makecharset::@2 makecharset::@2: scope:[makecharset] from makecharset::@1 makecharset::@2 - [61] (byte*) makecharset::font1#2 ← phi( makecharset::@1/(const byte*) CHARSET#0+(byte/signed byte/word/signed word/dword/signed dword) $40*(byte/signed byte/word/signed word/dword/signed dword) 8 makecharset::@2/(byte*) makecharset::font1#1 ) - [62] *((byte*) makecharset::font1#2) ← (byte/word/signed word/dword/signed dword) $ff - [63] (byte*) makecharset::font1#1 ← ++ (byte*) makecharset::font1#2 - [64] if((byte*) makecharset::font1#1!=(const byte*) CHARSET#0+(word/signed word/dword/signed dword) $100*(byte/signed byte/word/signed word/dword/signed dword) 8) goto makecharset::@2 + [60] (byte*) makecharset::font1#2 ← phi( makecharset::@1/(const byte*) CHARSET#0+(byte/signed byte/word/signed word/dword/signed dword) $40*(byte/signed byte/word/signed word/dword/signed dword) 8 makecharset::@2/(byte*) makecharset::font1#1 ) + [61] *((byte*) makecharset::font1#2) ← (byte/word/signed word/dword/signed dword) $ff + [62] (byte*) makecharset::font1#1 ← ++ (byte*) makecharset::font1#2 + [63] if((byte*) makecharset::font1#1!=(const byte*) CHARSET#0+(word/signed word/dword/signed dword) $100*(byte/signed byte/word/signed word/dword/signed dword) 8) goto makecharset::@2 to:makecharset::@3 makecharset::@3: scope:[makecharset] from makecharset::@2 makecharset::@9 - [65] (byte) makecharset::c#7 ← phi( makecharset::@9/(byte) makecharset::c#1 makecharset::@2/(byte/signed byte/word/signed word/dword/signed dword) 0 ) + [64] (byte) makecharset::c#7 ← phi( makecharset::@9/(byte) makecharset::c#1 makecharset::@2/(byte/signed byte/word/signed word/dword/signed dword) 0 ) to:makecharset::@4 makecharset::@4: scope:[makecharset] from makecharset::@3 makecharset::@8 - [66] (byte) makecharset::i#6 ← phi( makecharset::@8/(byte) makecharset::i#1 makecharset::@3/(byte/signed byte/word/signed word/dword/signed dword) 0 ) - [66] (byte) makecharset::bc#5 ← phi( makecharset::@8/(byte) makecharset::bc#6 makecharset::@3/(byte/signed byte/word/signed word/dword/signed dword) 0 ) + [65] (byte) makecharset::i#6 ← phi( makecharset::@8/(byte) makecharset::i#1 makecharset::@3/(byte/signed byte/word/signed word/dword/signed dword) 0 ) + [65] (byte) makecharset::bc#5 ← phi( makecharset::@8/(byte) makecharset::bc#6 makecharset::@3/(byte/signed byte/word/signed word/dword/signed dword) 0 ) to:makecharset::@5 makecharset::@5: scope:[makecharset] from makecharset::@4 makecharset::@6 - [67] (byte) makecharset::b#2 ← phi( makecharset::@4/(byte/signed byte/word/signed word/dword/signed dword) 0 makecharset::@6/(byte) makecharset::b#3 ) - [67] (byte) makecharset::ii#2 ← phi( makecharset::@4/(byte/signed byte/word/signed word/dword/signed dword) 0 makecharset::@6/(byte) makecharset::ii#1 ) - [67] (byte) makecharset::bc#3 ← phi( makecharset::@4/(byte) makecharset::bc#5 makecharset::@6/(byte) makecharset::bc#6 ) - [68] (byte) makecharset::bc#1 ← (byte) makecharset::bc#3 + (byte) makecharset::c#7 - [69] if((byte) makecharset::bc#1<(byte/signed byte/word/signed word/dword/signed dword) $3f+(byte/signed byte/word/signed word/dword/signed dword) 1) goto makecharset::@6 + [66] (byte) makecharset::b#2 ← phi( makecharset::@4/(byte/signed byte/word/signed word/dword/signed dword) 0 makecharset::@6/(byte) makecharset::b#3 ) + [66] (byte) makecharset::ii#2 ← phi( makecharset::@4/(byte/signed byte/word/signed word/dword/signed dword) 0 makecharset::@6/(byte) makecharset::ii#1 ) + [66] (byte) makecharset::bc#3 ← phi( makecharset::@4/(byte) makecharset::bc#5 makecharset::@6/(byte) makecharset::bc#6 ) + [67] (byte) makecharset::bc#1 ← (byte) makecharset::bc#3 + (byte) makecharset::c#7 + [68] if((byte) makecharset::bc#1<(byte/signed byte/word/signed word/dword/signed dword) $3f+(byte/signed byte/word/signed word/dword/signed dword) 1) goto makecharset::@6 to:makecharset::@7 makecharset::@7: scope:[makecharset] from makecharset::@5 - [70] (byte) makecharset::bc#2 ← (byte) makecharset::bc#1 - (byte/signed byte/word/signed word/dword/signed dword) $40 - [71] (byte~) makecharset::$11 ← (byte) makecharset::i#6 & (byte/signed byte/word/signed word/dword/signed dword) 1 - [72] (byte~) makecharset::$12 ← (byte) makecharset::ii#2 + (byte~) makecharset::$11 - [73] (byte~) makecharset::$13 ← (byte~) makecharset::$12 & (byte/signed byte/word/signed word/dword/signed dword) 7 - [74] (byte) makecharset::b#1 ← (byte) makecharset::b#2 + *((const byte[8]) makecharset::bittab#0 + (byte~) makecharset::$13) + [69] (byte) makecharset::bc#2 ← (byte) makecharset::bc#1 - (byte/signed byte/word/signed word/dword/signed dword) $40 + [70] (byte~) makecharset::$11 ← (byte) makecharset::i#6 & (byte/signed byte/word/signed word/dword/signed dword) 1 + [71] (byte~) makecharset::$12 ← (byte) makecharset::ii#2 + (byte~) makecharset::$11 + [72] (byte~) makecharset::$13 ← (byte~) makecharset::$12 & (byte/signed byte/word/signed word/dword/signed dword) 7 + [73] (byte) makecharset::b#1 ← (byte) makecharset::b#2 + *((const byte[8]) makecharset::bittab#0 + (byte~) makecharset::$13) to:makecharset::@6 makecharset::@6: scope:[makecharset] from makecharset::@5 makecharset::@7 - [75] (byte) makecharset::b#3 ← phi( makecharset::@5/(byte) makecharset::b#2 makecharset::@7/(byte) makecharset::b#1 ) - [75] (byte) makecharset::bc#6 ← phi( makecharset::@5/(byte) makecharset::bc#1 makecharset::@7/(byte) makecharset::bc#2 ) - [76] (byte) makecharset::ii#1 ← ++ (byte) makecharset::ii#2 - [77] if((byte) makecharset::ii#1<(byte/signed byte/word/signed word/dword/signed dword) 8) goto makecharset::@5 + [74] (byte) makecharset::b#3 ← phi( makecharset::@5/(byte) makecharset::b#2 makecharset::@7/(byte) makecharset::b#1 ) + [74] (byte) makecharset::bc#6 ← phi( makecharset::@5/(byte) makecharset::bc#1 makecharset::@7/(byte) makecharset::bc#2 ) + [75] (byte) makecharset::ii#1 ← ++ (byte) makecharset::ii#2 + [76] if((byte) makecharset::ii#1<(byte/signed byte/word/signed word/dword/signed dword) 8) goto makecharset::@5 to:makecharset::@8 makecharset::@8: scope:[makecharset] from makecharset::@6 - [78] (word~) makecharset::$17 ← ((word)) (byte) makecharset::c#7 - [79] (word~) makecharset::$18 ← (word~) makecharset::$17 << (byte/signed byte/word/signed word/dword/signed dword) 3 - [80] (word~) makecharset::$19 ← (word~) makecharset::$18 + (byte) makecharset::i#6 - [81] *((const byte*) CHARSET#0+(byte/signed byte/word/signed word/dword/signed dword) 1*(byte/signed byte/word/signed word/dword/signed dword) 8 + (word~) makecharset::$19) ← (byte) makecharset::b#3 - [82] (byte) makecharset::i#1 ← ++ (byte) makecharset::i#6 - [83] if((byte) makecharset::i#1<(byte/signed byte/word/signed word/dword/signed dword) 8) goto makecharset::@4 + [77] (word~) makecharset::$17 ← ((word)) (byte) makecharset::c#7 + [78] (word~) makecharset::$18 ← (word~) makecharset::$17 << (byte/signed byte/word/signed word/dword/signed dword) 3 + [79] (word~) makecharset::$19 ← (word~) makecharset::$18 + (byte) makecharset::i#6 + [80] *((const byte*) CHARSET#0+(byte/signed byte/word/signed word/dword/signed dword) 1*(byte/signed byte/word/signed word/dword/signed dword) 8 + (word~) makecharset::$19) ← (byte) makecharset::b#3 + [81] (byte) makecharset::i#1 ← ++ (byte) makecharset::i#6 + [82] if((byte) makecharset::i#1<(byte/signed byte/word/signed word/dword/signed dword) 8) goto makecharset::@4 to:makecharset::@9 makecharset::@9: scope:[makecharset] from makecharset::@8 - [84] (byte) makecharset::c#1 ← ++ (byte) makecharset::c#7 - [85] if((byte) makecharset::c#1<(byte/signed byte/word/signed word/dword/signed dword) $40) goto makecharset::@3 + [83] (byte) makecharset::c#1 ← ++ (byte) makecharset::c#7 + [84] if((byte) makecharset::c#1<(byte/signed byte/word/signed word/dword/signed dword) $40) goto makecharset::@3 to:makecharset::@return makecharset::@return: scope:[makecharset] from makecharset::@9 - [86] return + [85] return to:@return sid_rnd_init: scope:[sid_rnd_init] from main::@7 - [87] *((const word*) SID_VOICE3_FREQ#0) ← (word/dword/signed dword) $ffff - [88] *((const byte*) SID_VOICE3_CONTROL#0) ← (const byte) SID_CONTROL_NOISE#0 + [86] *((const word*) SID_VOICE3_FREQ#0) ← (word/dword/signed dword) $ffff + [87] *((const byte*) SID_VOICE3_CONTROL#0) ← (const byte) SID_CONTROL_NOISE#0 to:sid_rnd_init::@return sid_rnd_init::@return: scope:[sid_rnd_init] from sid_rnd_init - [89] return + [88] return to:@return fillscreen: scope:[fillscreen] from main main::@4 main::@5 main::@6 - [90] (byte*) fillscreen::screen#6 ← phi( main/(const byte*) BUFFER#0 main::@5/(const byte*) SCREEN2#0 main::@6/(const byte*) COLS#0 main::@4/(const byte*) SCREEN1#0 ) - [90] (byte) fillscreen::fill#5 ← phi( main/(byte/signed byte/word/signed word/dword/signed dword) 0 main::@5/(byte/signed byte/word/signed word/dword/signed dword) 0 main::@6/(const byte) YELLOW#0 main::@4/(byte/signed byte/word/signed word/dword/signed dword) 0 ) + [89] (byte*) fillscreen::screen#6 ← phi( main/(const byte*) BUFFER#0 main::@5/(const byte*) SCREEN2#0 main::@6/(const byte*) COLS#0 main::@4/(const byte*) SCREEN1#0 ) + [89] (byte) fillscreen::fill#5 ← phi( main/(byte/signed byte/word/signed word/dword/signed dword) 0 main::@5/(byte/signed byte/word/signed word/dword/signed dword) 0 main::@6/(const byte) YELLOW#0 main::@4/(byte/signed byte/word/signed word/dword/signed dword) 0 ) to:fillscreen::@1 fillscreen::@1: scope:[fillscreen] from fillscreen fillscreen::@1 - [91] (word) fillscreen::i#2 ← phi( fillscreen/(byte/signed byte/word/signed word/dword/signed dword) 0 fillscreen::@1/(word) fillscreen::i#1 ) - [91] (byte*) fillscreen::screen#5 ← phi( fillscreen/(byte*) fillscreen::screen#6 fillscreen::@1/(byte*) fillscreen::screen#4 ) - [92] *((byte*) fillscreen::screen#5) ← (byte) fillscreen::fill#5 - [93] (byte*) fillscreen::screen#4 ← ++ (byte*) fillscreen::screen#5 - [94] (word) fillscreen::i#1 ← ++ (word) fillscreen::i#2 - [95] if((word) fillscreen::i#1!=(word/signed word/dword/signed dword) $3e8) goto fillscreen::@1 + [90] (word) fillscreen::i#2 ← phi( fillscreen/(byte/signed byte/word/signed word/dword/signed dword) 0 fillscreen::@1/(word) fillscreen::i#1 ) + [90] (byte*) fillscreen::screen#5 ← phi( fillscreen/(byte*) fillscreen::screen#6 fillscreen::@1/(byte*) fillscreen::screen#4 ) + [91] *((byte*) fillscreen::screen#5) ← (byte) fillscreen::fill#5 + [92] (byte*) fillscreen::screen#4 ← ++ (byte*) fillscreen::screen#5 + [93] (word) fillscreen::i#1 ← ++ (word) fillscreen::i#2 + [94] if((word) fillscreen::i#1!=(word/signed word/dword/signed dword) $3e8) goto fillscreen::@1 to:fillscreen::@return fillscreen::@return: scope:[fillscreen] from fillscreen::@1 - [96] return + [95] return to:@return @@ -1251,15 +1240,15 @@ VARIABLE REGISTER WEIGHTS (void()) fire((byte*) fire::screenbase) (byte~) fire::$10 202.0 (byte~) fire::$11 202.0 -(byte~) fire::$18 202.0 -(byte~) fire::$19 202.0 -(byte/signed word/word/dword/signed dword~) fire::$20 202.0 +(byte~) fire::$15 202.0 +(byte~) fire::$16 202.0 +(byte/signed word/word/dword/signed dword~) fire::$17 202.0 (byte~) fire::$9 202.0 (byte*) fire::buffer -(byte*) fire::buffer#10 45.90909090909091 (byte*) fire::buffer#2 202.0 -(byte*) fire::buffer#3 202.0 +(byte*) fire::buffer#3 151.5 (byte*) fire::buffer#4 75.75 +(byte*) fire::buffer#7 44.888888888888886 (byte) fire::c (byte) fire::c#0 202.0 (byte) fire::c#1 202.0 @@ -1267,11 +1256,11 @@ VARIABLE REGISTER WEIGHTS (byte*) fire::screen (byte*) fire::screen#0 0.26666666666666666 (byte*) fire::screen#1 4.0 -(byte*) fire::screen#10 30.5 -(byte*~) fire::screen#11 4.0 +(byte*~) fire::screen#10 4.0 (byte*) fire::screen#2 101.0 -(byte*) fire::screen#3 101.0 +(byte*) fire::screen#3 67.33333333333333 (byte*) fire::screen#4 27.727272727272727 +(byte*) fire::screen#5 38.125 (byte*) fire::screenbase (void()) main() (word~) main::toD0181_$0 @@ -1341,9 +1330,9 @@ VARIABLE REGISTER WEIGHTS Initial phi equivalence classes [ fire::screen#0 ] [ fire::buffer#4 fire::buffer#2 ] -[ fire::screen#4 fire::screen#11 fire::screen#2 ] -[ fire::buffer#10 fire::buffer#3 ] -[ fire::screen#10 fire::screen#3 fire::screen#1 ] +[ fire::screen#4 fire::screen#10 fire::screen#2 ] +[ fire::buffer#7 fire::buffer#3 ] +[ fire::screen#5 fire::screen#3 fire::screen#1 ] [ fire::c#2 fire::c#0 fire::c#1 ] [ makecharset::font#2 makecharset::font#1 ] [ makecharset::font1#2 makecharset::font1#1 ] @@ -1356,9 +1345,9 @@ Initial phi equivalence classes [ fillscreen::screen#5 fillscreen::screen#6 fillscreen::screen#4 ] [ fillscreen::i#2 fillscreen::i#1 ] Added variable sid_rnd::return#2 to zero page equivalence class [ sid_rnd::return#2 ] -Added variable fire::$18 to zero page equivalence class [ fire::$18 ] -Added variable fire::$19 to zero page equivalence class [ fire::$19 ] -Added variable fire::$20 to zero page equivalence class [ fire::$20 ] +Added variable fire::$15 to zero page equivalence class [ fire::$15 ] +Added variable fire::$16 to zero page equivalence class [ fire::$16 ] +Added variable fire::$17 to zero page equivalence class [ fire::$17 ] Added variable fire::$9 to zero page equivalence class [ fire::$9 ] Added variable fire::$10 to zero page equivalence class [ fire::$10 ] Added variable fire::$11 to zero page equivalence class [ fire::$11 ] @@ -1372,9 +1361,9 @@ Added variable makecharset::$19 to zero page equivalence class [ makecharset::$1 Complete equivalence classes [ fire::screen#0 ] [ fire::buffer#4 fire::buffer#2 ] -[ fire::screen#4 fire::screen#11 fire::screen#2 ] -[ fire::buffer#10 fire::buffer#3 ] -[ fire::screen#10 fire::screen#3 fire::screen#1 ] +[ fire::screen#4 fire::screen#10 fire::screen#2 ] +[ fire::buffer#7 fire::buffer#3 ] +[ fire::screen#5 fire::screen#3 fire::screen#1 ] [ fire::c#2 fire::c#0 fire::c#1 ] [ makecharset::font#2 makecharset::font#1 ] [ makecharset::font1#2 makecharset::font1#1 ] @@ -1387,9 +1376,9 @@ Complete equivalence classes [ fillscreen::screen#5 fillscreen::screen#6 fillscreen::screen#4 ] [ fillscreen::i#2 fillscreen::i#1 ] [ sid_rnd::return#2 ] -[ fire::$18 ] -[ fire::$19 ] -[ fire::$20 ] +[ fire::$15 ] +[ fire::$16 ] +[ fire::$17 ] [ fire::$9 ] [ fire::$10 ] [ fire::$11 ] @@ -1402,9 +1391,9 @@ Complete equivalence classes [ makecharset::$19 ] Allocated zp ZP_WORD:2 [ fire::screen#0 ] Allocated zp ZP_WORD:4 [ fire::buffer#4 fire::buffer#2 ] -Allocated zp ZP_WORD:6 [ fire::screen#4 fire::screen#11 fire::screen#2 ] -Allocated zp ZP_WORD:8 [ fire::buffer#10 fire::buffer#3 ] -Allocated zp ZP_WORD:10 [ fire::screen#10 fire::screen#3 fire::screen#1 ] +Allocated zp ZP_WORD:6 [ fire::screen#4 fire::screen#10 fire::screen#2 ] +Allocated zp ZP_WORD:8 [ fire::buffer#7 fire::buffer#3 ] +Allocated zp ZP_WORD:10 [ fire::screen#5 fire::screen#3 fire::screen#1 ] Allocated zp ZP_BYTE:12 [ fire::c#2 fire::c#0 fire::c#1 ] Allocated zp ZP_WORD:13 [ makecharset::font#2 makecharset::font#1 ] Allocated zp ZP_WORD:15 [ makecharset::font1#2 makecharset::font1#1 ] @@ -1417,9 +1406,9 @@ Allocated zp ZP_BYTE:22 [ fillscreen::fill#5 ] Allocated zp ZP_WORD:23 [ fillscreen::screen#5 fillscreen::screen#6 fillscreen::screen#4 ] Allocated zp ZP_WORD:25 [ fillscreen::i#2 fillscreen::i#1 ] Allocated zp ZP_BYTE:27 [ sid_rnd::return#2 ] -Allocated zp ZP_BYTE:28 [ fire::$18 ] -Allocated zp ZP_BYTE:29 [ fire::$19 ] -Allocated zp ZP_BYTE:30 [ fire::$20 ] +Allocated zp ZP_BYTE:28 [ fire::$15 ] +Allocated zp ZP_BYTE:29 [ fire::$16 ] +Allocated zp ZP_BYTE:30 [ fire::$17 ] Allocated zp ZP_BYTE:31 [ fire::$9 ] Allocated zp ZP_BYTE:32 [ fire::$10 ] Allocated zp ZP_BYTE:33 [ fire::$11 ] @@ -1487,14 +1476,14 @@ main: { lda #BLACK sta BGCOL //SEG13 [7] call fillscreen - //SEG14 [90] phi from main to fillscreen [phi:main->fillscreen] + //SEG14 [89] phi from main to fillscreen [phi:main->fillscreen] fillscreen_from_main: - //SEG15 [90] phi (byte*) fillscreen::screen#6 = (const byte*) BUFFER#0 [phi:main->fillscreen#0] -- pbuz1=pbuc1 + //SEG15 [89] phi (byte*) fillscreen::screen#6 = (const byte*) BUFFER#0 [phi:main->fillscreen#0] -- pbuz1=pbuc1 lda #BUFFER sta fillscreen.screen+1 - //SEG16 [90] phi (byte) fillscreen::fill#5 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main->fillscreen#1] -- vbuz1=vbuc1 + //SEG16 [89] phi (byte) fillscreen::fill#5 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main->fillscreen#1] -- vbuz1=vbuc1 lda #0 sta fillscreen.fill jsr fillscreen @@ -1504,14 +1493,14 @@ main: { //SEG18 main::@4 b4: //SEG19 [9] call fillscreen - //SEG20 [90] phi from main::@4 to fillscreen [phi:main::@4->fillscreen] + //SEG20 [89] phi from main::@4 to fillscreen [phi:main::@4->fillscreen] fillscreen_from_b4: - //SEG21 [90] phi (byte*) fillscreen::screen#6 = (const byte*) SCREEN1#0 [phi:main::@4->fillscreen#0] -- pbuz1=pbuc1 + //SEG21 [89] phi (byte*) fillscreen::screen#6 = (const byte*) SCREEN1#0 [phi:main::@4->fillscreen#0] -- pbuz1=pbuc1 lda #SCREEN1 sta fillscreen.screen+1 - //SEG22 [90] phi (byte) fillscreen::fill#5 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@4->fillscreen#1] -- vbuz1=vbuc1 + //SEG22 [89] phi (byte) fillscreen::fill#5 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@4->fillscreen#1] -- vbuz1=vbuc1 lda #0 sta fillscreen.fill jsr fillscreen @@ -1521,14 +1510,14 @@ main: { //SEG24 main::@5 b5: //SEG25 [11] call fillscreen - //SEG26 [90] phi from main::@5 to fillscreen [phi:main::@5->fillscreen] + //SEG26 [89] phi from main::@5 to fillscreen [phi:main::@5->fillscreen] fillscreen_from_b5: - //SEG27 [90] phi (byte*) fillscreen::screen#6 = (const byte*) SCREEN2#0 [phi:main::@5->fillscreen#0] -- pbuz1=pbuc1 + //SEG27 [89] phi (byte*) fillscreen::screen#6 = (const byte*) SCREEN2#0 [phi:main::@5->fillscreen#0] -- pbuz1=pbuc1 lda #SCREEN2 sta fillscreen.screen+1 - //SEG28 [90] phi (byte) fillscreen::fill#5 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@5->fillscreen#1] -- vbuz1=vbuc1 + //SEG28 [89] phi (byte) fillscreen::fill#5 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@5->fillscreen#1] -- vbuz1=vbuc1 lda #0 sta fillscreen.fill jsr fillscreen @@ -1538,14 +1527,14 @@ main: { //SEG30 main::@6 b6: //SEG31 [13] call fillscreen - //SEG32 [90] phi from main::@6 to fillscreen [phi:main::@6->fillscreen] + //SEG32 [89] phi from main::@6 to fillscreen [phi:main::@6->fillscreen] fillscreen_from_b6: - //SEG33 [90] phi (byte*) fillscreen::screen#6 = (const byte*) COLS#0 [phi:main::@6->fillscreen#0] -- pbuz1=pbuc1 + //SEG33 [89] phi (byte*) fillscreen::screen#6 = (const byte*) COLS#0 [phi:main::@6->fillscreen#0] -- pbuz1=pbuc1 lda #COLS sta fillscreen.screen+1 - //SEG34 [90] phi (byte) fillscreen::fill#5 = (const byte) YELLOW#0 [phi:main::@6->fillscreen#1] -- vbuz1=vbuc1 + //SEG34 [89] phi (byte) fillscreen::fill#5 = (const byte) YELLOW#0 [phi:main::@6->fillscreen#1] -- vbuz1=vbuc1 lda #YELLOW sta fillscreen.fill jsr fillscreen @@ -1562,7 +1551,7 @@ main: { //SEG39 main::@8 b8: //SEG40 [17] call makecharset - //SEG41 [56] phi from main::@8 to makecharset [phi:main::@8->makecharset] + //SEG41 [55] phi from main::@8 to makecharset [phi:main::@8->makecharset] makecharset_from_b8: jsr makecharset //SEG42 [18] phi from main::@3 main::@8 to main::@1 [phi:main::@3/main::@8->main::@1] @@ -1614,14 +1603,14 @@ main: { jmp b1_from_b3 } //SEG58 fire -// Animate the fire on the passe screen. Uses BUFFER to store the current values. +// Animate the fire on the passed screen. Uses BUFFER to store the current values. fire: { .label _9 = $1f .label _10 = $20 .label _11 = $21 - .label _18 = $1c - .label _19 = $1d - .label _20 = $1e + .label _15 = $1c + .label _16 = $1d + .label _17 = $1e .label screen = 2 .label c = $c .label screen_1 = $a @@ -1630,17 +1619,17 @@ fire: { .label screen_3 = $a .label buffer_3 = 8 .label screen_4 = 6 - .label buffer_10 = 8 - .label screen_10 = $a - .label screen_11 = 6 - //SEG59 [26] (byte*~) fire::screen#11 ← (byte*) fire::screen#0 -- pbuz1=pbuz2 + .label buffer_7 = 8 + .label screen_5 = $a + .label screen_10 = 6 + //SEG59 [26] (byte*~) fire::screen#10 ← (byte*) fire::screen#0 -- pbuz1=pbuz2 lda screen - sta screen_11 + sta screen_10 lda screen+1 - sta screen_11+1 + sta screen_10+1 //SEG60 [27] phi from fire to fire::@1 [phi:fire->fire::@1] b1_from_fire: - //SEG61 [27] phi (byte*) fire::screen#4 = (byte*~) fire::screen#11 [phi:fire->fire::@1#0] -- register_copy + //SEG61 [27] phi (byte*) fire::screen#4 = (byte*~) fire::screen#10 [phi:fire->fire::@1#0] -- register_copy //SEG62 [27] phi (byte*) fire::buffer#4 = (const byte*) BUFFER#0 [phi:fire->fire::@1#1] -- pbuz1=pbuc1 lda #fire::@6] b6_from_b3: - //SEG68 [30] phi (byte*) fire::screen#10 = (byte*) fire::screen#1 [phi:fire::@3->fire::@6#0] -- register_copy - //SEG69 [30] phi (byte*) fire::buffer#10 = (const byte*) BUFFER#0+(byte/signed byte/word/signed word/dword/signed dword) $18*(byte/signed byte/word/signed word/dword/signed dword) $28 [phi:fire::@3->fire::@6#1] -- pbuz1=pbuc1 + //SEG68 [30] phi (byte*) fire::screen#5 = (byte*) fire::screen#1 [phi:fire::@3->fire::@6#0] -- register_copy + //SEG69 [30] phi (byte*) fire::buffer#7 = (const byte*) BUFFER#0+(byte/signed byte/word/signed word/dword/signed dword) $18*(byte/signed byte/word/signed word/dword/signed dword) $28 [phi:fire::@3->fire::@6#1] -- pbuz1=pbuc1 lda #BUFFER+$18*$28 - sta buffer_10+1 + sta buffer_7+1 jmp b6 - //SEG70 fire::@6 + //SEG70 [30] phi from fire::@7 to fire::@6 [phi:fire::@7->fire::@6] + b6_from_b7: + //SEG71 [30] phi (byte*) fire::screen#5 = (byte*) fire::screen#3 [phi:fire::@7->fire::@6#0] -- register_copy + //SEG72 [30] phi (byte*) fire::buffer#7 = (byte*) fire::buffer#3 [phi:fire::@7->fire::@6#1] -- register_copy + jmp b6 + //SEG73 fire::@6 b6: - //SEG71 [31] if((byte*) fire::buffer#10!=(const byte*) BUFFER#0+(byte/signed byte/word/signed word/dword/signed dword) $19*(byte/signed byte/word/signed word/dword/signed dword) $28) goto fire::@7 -- pbuz1_neq_pbuc1_then_la1 - lda buffer_10+1 - cmp #>BUFFER+$19*$28 - bne b7_from_b6 - lda buffer_10 - cmp #fire::@7] - b7_from_b6: - jmp b7 - //SEG75 fire::@7 - b7: - //SEG76 [34] call sid_rnd + //SEG74 [31] call sid_rnd jsr sid_rnd - //SEG77 [35] (byte) sid_rnd::return#2 ← (byte) sid_rnd::return#0 -- vbuz1=vbuz2 + //SEG75 [32] (byte) sid_rnd::return#2 ← (byte) sid_rnd::return#0 -- vbuz1=vbuz2 lda sid_rnd.return sta sid_rnd.return_2 - jmp b8 - //SEG78 fire::@8 - b8: - //SEG79 [36] (byte~) fire::$18 ← (byte) sid_rnd::return#2 -- vbuz1=vbuz2 + jmp b7 + //SEG76 fire::@7 + b7: + //SEG77 [33] (byte~) fire::$15 ← (byte) sid_rnd::return#2 -- vbuz1=vbuz2 lda sid_rnd.return_2 - sta _18 - //SEG80 [37] (byte~) fire::$19 ← (byte~) fire::$18 >> (byte/signed byte/word/signed word/dword/signed dword) 4 -- vbuz1=vbuz2_ror_4 - lda _18 + sta _15 + //SEG78 [34] (byte~) fire::$16 ← (byte~) fire::$15 >> (byte/signed byte/word/signed word/dword/signed dword) 4 -- vbuz1=vbuz2_ror_4 + lda _15 lsr lsr lsr lsr - sta _19 - //SEG81 [38] (byte/signed word/word/dword/signed dword~) fire::$20 ← (byte/signed byte/word/signed word/dword/signed dword) $30 + (byte~) fire::$19 -- vbuz1=vbuc1_plus_vbuz2 - lax _19 + sta _16 + //SEG79 [35] (byte/signed word/word/dword/signed dword~) fire::$17 ← (byte/signed byte/word/signed word/dword/signed dword) $30 + (byte~) fire::$16 -- vbuz1=vbuc1_plus_vbuz2 + lax _16 axs #-[$30] - stx _20 - //SEG82 [39] *((byte*) fire::buffer#10) ← (byte/signed word/word/dword/signed dword~) fire::$20 -- _deref_pbuz1=vbuz2 - lda _20 + stx _17 + //SEG80 [36] *((byte*) fire::buffer#7) ← (byte/signed word/word/dword/signed dword~) fire::$17 -- _deref_pbuz1=vbuz2 + lda _17 ldy #0 - sta (buffer_10),y - //SEG83 [40] *((byte*) fire::screen#10) ← *((byte*) fire::buffer#10) -- _deref_pbuz1=_deref_pbuz2 + sta (buffer_7),y + //SEG81 [37] *((byte*) fire::screen#5) ← *((byte*) fire::buffer#7) -- _deref_pbuz1=_deref_pbuz2 ldy #0 - lda (buffer_10),y + lda (buffer_7),y ldy #0 - sta (screen_10),y - //SEG84 [41] (byte*) fire::screen#3 ← ++ (byte*) fire::screen#10 -- pbuz1=_inc_pbuz1 + sta (screen_5),y + //SEG82 [38] (byte*) fire::screen#3 ← ++ (byte*) fire::screen#5 -- pbuz1=_inc_pbuz1 inc screen_3 bne !+ inc screen_3+1 !: - //SEG85 [42] (byte*) fire::buffer#3 ← ++ (byte*) fire::buffer#10 -- pbuz1=_inc_pbuz1 + //SEG83 [39] (byte*) fire::buffer#3 ← ++ (byte*) fire::buffer#7 -- pbuz1=_inc_pbuz1 inc buffer_3 bne !+ inc buffer_3+1 !: - //SEG86 [30] phi from fire::@8 to fire::@6 [phi:fire::@8->fire::@6] - b6_from_b8: - //SEG87 [30] phi (byte*) fire::screen#10 = (byte*) fire::screen#3 [phi:fire::@8->fire::@6#0] -- register_copy - //SEG88 [30] phi (byte*) fire::buffer#10 = (byte*) fire::buffer#3 [phi:fire::@8->fire::@6#1] -- register_copy - jmp b6 - //SEG89 fire::@2 + //SEG84 [40] if((byte*) fire::buffer#3!=(const byte*) BUFFER#0+(byte/signed byte/word/signed word/dword/signed dword) $19*(byte/signed byte/word/signed word/dword/signed dword) $28) goto fire::@6 -- pbuz1_neq_pbuc1_then_la1 + lda buffer_3+1 + cmp #>BUFFER+$19*$28 + bne b6_from_b7 + lda buffer_3 + cmp #> (byte/signed byte/word/signed word/dword/signed dword) 2 -- vbuz1=vbuz2_ror_2 + //SEG91 [45] (byte) fire::c#0 ← (byte~) fire::$11 >> (byte/signed byte/word/signed word/dword/signed dword) 2 -- vbuz1=vbuz2_ror_2 lda _11 lsr lsr sta c - //SEG94 [47] if((byte) fire::c#0<(byte/signed byte/word/signed word/dword/signed dword) 2+(byte/signed byte/word/signed word/dword/signed dword) 1) goto fire::@4 -- vbuz1_lt_vbuc1_then_la1 + //SEG92 [46] if((byte) fire::c#0<(byte/signed byte/word/signed word/dword/signed dword) 2+(byte/signed byte/word/signed word/dword/signed dword) 1) goto fire::@4 -- vbuz1_lt_vbuc1_then_la1 lda c cmp #2+1 bcc b4_from_b2 jmp b5 - //SEG95 fire::@5 + //SEG93 fire::@5 b5: - //SEG96 [48] (byte) fire::c#1 ← (byte) fire::c#0 - (byte/signed byte/word/signed word/dword/signed dword) 3 -- vbuz1=vbuz1_minus_vbuc1 + //SEG94 [47] (byte) fire::c#1 ← (byte) fire::c#0 - (byte/signed byte/word/signed word/dword/signed dword) 3 -- vbuz1=vbuz1_minus_vbuc1 lax c axs #3 stx c - //SEG97 [49] phi from fire::@2 fire::@5 to fire::@4 [phi:fire::@2/fire::@5->fire::@4] + //SEG95 [48] phi from fire::@2 fire::@5 to fire::@4 [phi:fire::@2/fire::@5->fire::@4] b4_from_b2: b4_from_b5: - //SEG98 [49] phi (byte) fire::c#2 = (byte) fire::c#0 [phi:fire::@2/fire::@5->fire::@4#0] -- register_copy + //SEG96 [48] phi (byte) fire::c#2 = (byte) fire::c#0 [phi:fire::@2/fire::@5->fire::@4#0] -- register_copy jmp b4 - //SEG99 fire::@4 + //SEG97 fire::@4 b4: - //SEG100 [50] *((byte*) fire::buffer#4) ← (byte) fire::c#2 -- _deref_pbuz1=vbuz2 + //SEG98 [49] *((byte*) fire::buffer#4) ← (byte) fire::c#2 -- _deref_pbuz1=vbuz2 lda c ldy #0 sta (buffer),y - //SEG101 [51] *((byte*) fire::screen#4) ← *((byte*) fire::buffer#4) -- _deref_pbuz1=_deref_pbuz2 + //SEG99 [50] *((byte*) fire::screen#4) ← *((byte*) fire::buffer#4) -- _deref_pbuz1=_deref_pbuz2 ldy #0 lda (buffer),y ldy #0 sta (screen_4),y - //SEG102 [52] (byte*) fire::screen#2 ← ++ (byte*) fire::screen#4 -- pbuz1=_inc_pbuz1 + //SEG100 [51] (byte*) fire::screen#2 ← ++ (byte*) fire::screen#4 -- pbuz1=_inc_pbuz1 inc screen_2 bne !+ inc screen_2+1 !: - //SEG103 [53] (byte*) fire::buffer#2 ← ++ (byte*) fire::buffer#4 -- pbuz1=_inc_pbuz1 + //SEG101 [52] (byte*) fire::buffer#2 ← ++ (byte*) fire::buffer#4 -- pbuz1=_inc_pbuz1 inc buffer bne !+ inc buffer+1 !: - //SEG104 [27] phi from fire::@4 to fire::@1 [phi:fire::@4->fire::@1] + //SEG102 [27] phi from fire::@4 to fire::@1 [phi:fire::@4->fire::@1] b1_from_b4: - //SEG105 [27] phi (byte*) fire::screen#4 = (byte*) fire::screen#2 [phi:fire::@4->fire::@1#0] -- register_copy - //SEG106 [27] phi (byte*) fire::buffer#4 = (byte*) fire::buffer#2 [phi:fire::@4->fire::@1#1] -- register_copy + //SEG103 [27] phi (byte*) fire::screen#4 = (byte*) fire::screen#2 [phi:fire::@4->fire::@1#0] -- register_copy + //SEG104 [27] phi (byte*) fire::buffer#4 = (byte*) fire::buffer#2 [phi:fire::@4->fire::@1#1] -- register_copy jmp b1 } -//SEG107 sid_rnd +//SEG105 sid_rnd // Get a random number from the SID voice 3, // Must be initialized with sid_rnd_init() sid_rnd: { .label return = $22 .label return_2 = $1b - //SEG108 [54] (byte) sid_rnd::return#0 ← *((const byte*) SID_VOICE3_OSC#0) -- vbuz1=_deref_pbuc1 + //SEG106 [53] (byte) sid_rnd::return#0 ← *((const byte*) SID_VOICE3_OSC#0) -- vbuz1=_deref_pbuc1 lda SID_VOICE3_OSC sta return jmp breturn - //SEG109 sid_rnd::@return + //SEG107 sid_rnd::@return breturn: - //SEG110 [55] return + //SEG108 [54] return rts } -//SEG111 makecharset +//SEG109 makecharset // Make a fire-friendly charset in chars $00-$3f of the passed charset makecharset: { .label _11 = $23 @@ -1841,170 +1825,170 @@ makecharset: { .label b = $15 .label i = $12 .label c = $11 - //SEG112 [57] phi from makecharset to makecharset::@1 [phi:makecharset->makecharset::@1] + //SEG110 [56] phi from makecharset to makecharset::@1 [phi:makecharset->makecharset::@1] b1_from_makecharset: - //SEG113 [57] phi (byte*) makecharset::font#2 = (const byte*) CHARSET#0 [phi:makecharset->makecharset::@1#0] -- pbuz1=pbuc1 + //SEG111 [56] phi (byte*) makecharset::font#2 = (const byte*) CHARSET#0 [phi:makecharset->makecharset::@1#0] -- pbuz1=pbuc1 lda #CHARSET sta font+1 jmp b1 - //SEG114 [57] phi from makecharset::@1 to makecharset::@1 [phi:makecharset::@1->makecharset::@1] + //SEG112 [56] phi from makecharset::@1 to makecharset::@1 [phi:makecharset::@1->makecharset::@1] b1_from_b1: - //SEG115 [57] phi (byte*) makecharset::font#2 = (byte*) makecharset::font#1 [phi:makecharset::@1->makecharset::@1#0] -- register_copy + //SEG113 [56] phi (byte*) makecharset::font#2 = (byte*) makecharset::font#1 [phi:makecharset::@1->makecharset::@1#0] -- register_copy jmp b1 - //SEG116 makecharset::@1 + //SEG114 makecharset::@1 b1: - //SEG117 [58] *((byte*) makecharset::font#2) ← (byte/signed byte/word/signed word/dword/signed dword) 0 -- _deref_pbuz1=vbuc1 + //SEG115 [57] *((byte*) makecharset::font#2) ← (byte/signed byte/word/signed word/dword/signed dword) 0 -- _deref_pbuz1=vbuc1 lda #0 ldy #0 sta (font),y - //SEG118 [59] (byte*) makecharset::font#1 ← ++ (byte*) makecharset::font#2 -- pbuz1=_inc_pbuz1 + //SEG116 [58] (byte*) makecharset::font#1 ← ++ (byte*) makecharset::font#2 -- pbuz1=_inc_pbuz1 inc font bne !+ inc font+1 !: - //SEG119 [60] if((byte*) makecharset::font#1!=(const byte*) CHARSET#0+(byte/signed byte/word/signed word/dword/signed dword) 1*(byte/signed byte/word/signed word/dword/signed dword) 8) goto makecharset::@1 -- pbuz1_neq_pbuc1_then_la1 + //SEG117 [59] if((byte*) makecharset::font#1!=(const byte*) CHARSET#0+(byte/signed byte/word/signed word/dword/signed dword) 1*(byte/signed byte/word/signed word/dword/signed dword) 8) goto makecharset::@1 -- pbuz1_neq_pbuc1_then_la1 lda font+1 cmp #>CHARSET+1*8 bne b1_from_b1 lda font cmp #makecharset::@2] + //SEG118 [60] phi from makecharset::@1 to makecharset::@2 [phi:makecharset::@1->makecharset::@2] b2_from_b1: - //SEG121 [61] phi (byte*) makecharset::font1#2 = (const byte*) CHARSET#0+(byte/signed byte/word/signed word/dword/signed dword) $40*(byte/signed byte/word/signed word/dword/signed dword) 8 [phi:makecharset::@1->makecharset::@2#0] -- pbuz1=pbuc1 + //SEG119 [60] phi (byte*) makecharset::font1#2 = (const byte*) CHARSET#0+(byte/signed byte/word/signed word/dword/signed dword) $40*(byte/signed byte/word/signed word/dword/signed dword) 8 [phi:makecharset::@1->makecharset::@2#0] -- pbuz1=pbuc1 lda #CHARSET+$40*8 sta font1+1 jmp b2 - //SEG122 [61] phi from makecharset::@2 to makecharset::@2 [phi:makecharset::@2->makecharset::@2] + //SEG120 [60] phi from makecharset::@2 to makecharset::@2 [phi:makecharset::@2->makecharset::@2] b2_from_b2: - //SEG123 [61] phi (byte*) makecharset::font1#2 = (byte*) makecharset::font1#1 [phi:makecharset::@2->makecharset::@2#0] -- register_copy + //SEG121 [60] phi (byte*) makecharset::font1#2 = (byte*) makecharset::font1#1 [phi:makecharset::@2->makecharset::@2#0] -- register_copy jmp b2 - //SEG124 makecharset::@2 + //SEG122 makecharset::@2 b2: - //SEG125 [62] *((byte*) makecharset::font1#2) ← (byte/word/signed word/dword/signed dword) $ff -- _deref_pbuz1=vbuc1 + //SEG123 [61] *((byte*) makecharset::font1#2) ← (byte/word/signed word/dword/signed dword) $ff -- _deref_pbuz1=vbuc1 lda #$ff ldy #0 sta (font1),y - //SEG126 [63] (byte*) makecharset::font1#1 ← ++ (byte*) makecharset::font1#2 -- pbuz1=_inc_pbuz1 + //SEG124 [62] (byte*) makecharset::font1#1 ← ++ (byte*) makecharset::font1#2 -- pbuz1=_inc_pbuz1 inc font1 bne !+ inc font1+1 !: - //SEG127 [64] if((byte*) makecharset::font1#1!=(const byte*) CHARSET#0+(word/signed word/dword/signed dword) $100*(byte/signed byte/word/signed word/dword/signed dword) 8) goto makecharset::@2 -- pbuz1_neq_pbuc1_then_la1 + //SEG125 [63] if((byte*) makecharset::font1#1!=(const byte*) CHARSET#0+(word/signed word/dword/signed dword) $100*(byte/signed byte/word/signed word/dword/signed dword) 8) goto makecharset::@2 -- pbuz1_neq_pbuc1_then_la1 lda font1+1 cmp #>CHARSET+$100*8 bne b2_from_b2 lda font1 cmp #makecharset::@3] + //SEG126 [64] phi from makecharset::@2 to makecharset::@3 [phi:makecharset::@2->makecharset::@3] b3_from_b2: - //SEG129 [65] phi (byte) makecharset::c#7 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:makecharset::@2->makecharset::@3#0] -- vbuz1=vbuc1 + //SEG127 [64] phi (byte) makecharset::c#7 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:makecharset::@2->makecharset::@3#0] -- vbuz1=vbuc1 lda #0 sta c jmp b3 - //SEG130 [65] phi from makecharset::@9 to makecharset::@3 [phi:makecharset::@9->makecharset::@3] + //SEG128 [64] phi from makecharset::@9 to makecharset::@3 [phi:makecharset::@9->makecharset::@3] b3_from_b9: - //SEG131 [65] phi (byte) makecharset::c#7 = (byte) makecharset::c#1 [phi:makecharset::@9->makecharset::@3#0] -- register_copy + //SEG129 [64] phi (byte) makecharset::c#7 = (byte) makecharset::c#1 [phi:makecharset::@9->makecharset::@3#0] -- register_copy jmp b3 - //SEG132 makecharset::@3 + //SEG130 makecharset::@3 b3: - //SEG133 [66] phi from makecharset::@3 to makecharset::@4 [phi:makecharset::@3->makecharset::@4] + //SEG131 [65] phi from makecharset::@3 to makecharset::@4 [phi:makecharset::@3->makecharset::@4] b4_from_b3: - //SEG134 [66] phi (byte) makecharset::i#6 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:makecharset::@3->makecharset::@4#0] -- vbuz1=vbuc1 + //SEG132 [65] phi (byte) makecharset::i#6 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:makecharset::@3->makecharset::@4#0] -- vbuz1=vbuc1 lda #0 sta i - //SEG135 [66] phi (byte) makecharset::bc#5 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:makecharset::@3->makecharset::@4#1] -- vbuz1=vbuc1 + //SEG133 [65] phi (byte) makecharset::bc#5 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:makecharset::@3->makecharset::@4#1] -- vbuz1=vbuc1 lda #0 sta bc jmp b4 - //SEG136 [66] phi from makecharset::@8 to makecharset::@4 [phi:makecharset::@8->makecharset::@4] + //SEG134 [65] phi from makecharset::@8 to makecharset::@4 [phi:makecharset::@8->makecharset::@4] b4_from_b8: - //SEG137 [66] phi (byte) makecharset::i#6 = (byte) makecharset::i#1 [phi:makecharset::@8->makecharset::@4#0] -- register_copy - //SEG138 [66] phi (byte) makecharset::bc#5 = (byte) makecharset::bc#6 [phi:makecharset::@8->makecharset::@4#1] -- register_copy + //SEG135 [65] phi (byte) makecharset::i#6 = (byte) makecharset::i#1 [phi:makecharset::@8->makecharset::@4#0] -- register_copy + //SEG136 [65] phi (byte) makecharset::bc#5 = (byte) makecharset::bc#6 [phi:makecharset::@8->makecharset::@4#1] -- register_copy jmp b4 - //SEG139 makecharset::@4 + //SEG137 makecharset::@4 b4: - //SEG140 [67] phi from makecharset::@4 to makecharset::@5 [phi:makecharset::@4->makecharset::@5] + //SEG138 [66] phi from makecharset::@4 to makecharset::@5 [phi:makecharset::@4->makecharset::@5] b5_from_b4: - //SEG141 [67] phi (byte) makecharset::b#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:makecharset::@4->makecharset::@5#0] -- vbuz1=vbuc1 + //SEG139 [66] phi (byte) makecharset::b#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:makecharset::@4->makecharset::@5#0] -- vbuz1=vbuc1 lda #0 sta b - //SEG142 [67] phi (byte) makecharset::ii#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:makecharset::@4->makecharset::@5#1] -- vbuz1=vbuc1 + //SEG140 [66] phi (byte) makecharset::ii#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:makecharset::@4->makecharset::@5#1] -- vbuz1=vbuc1 lda #0 sta ii - //SEG143 [67] phi (byte) makecharset::bc#3 = (byte) makecharset::bc#5 [phi:makecharset::@4->makecharset::@5#2] -- register_copy + //SEG141 [66] phi (byte) makecharset::bc#3 = (byte) makecharset::bc#5 [phi:makecharset::@4->makecharset::@5#2] -- register_copy jmp b5 - //SEG144 [67] phi from makecharset::@6 to makecharset::@5 [phi:makecharset::@6->makecharset::@5] + //SEG142 [66] phi from makecharset::@6 to makecharset::@5 [phi:makecharset::@6->makecharset::@5] b5_from_b6: - //SEG145 [67] phi (byte) makecharset::b#2 = (byte) makecharset::b#3 [phi:makecharset::@6->makecharset::@5#0] -- register_copy - //SEG146 [67] phi (byte) makecharset::ii#2 = (byte) makecharset::ii#1 [phi:makecharset::@6->makecharset::@5#1] -- register_copy - //SEG147 [67] phi (byte) makecharset::bc#3 = (byte) makecharset::bc#6 [phi:makecharset::@6->makecharset::@5#2] -- register_copy + //SEG143 [66] phi (byte) makecharset::b#2 = (byte) makecharset::b#3 [phi:makecharset::@6->makecharset::@5#0] -- register_copy + //SEG144 [66] phi (byte) makecharset::ii#2 = (byte) makecharset::ii#1 [phi:makecharset::@6->makecharset::@5#1] -- register_copy + //SEG145 [66] phi (byte) makecharset::bc#3 = (byte) makecharset::bc#6 [phi:makecharset::@6->makecharset::@5#2] -- register_copy jmp b5 - //SEG148 makecharset::@5 + //SEG146 makecharset::@5 b5: - //SEG149 [68] (byte) makecharset::bc#1 ← (byte) makecharset::bc#3 + (byte) makecharset::c#7 -- vbuz1=vbuz1_plus_vbuz2 + //SEG147 [67] (byte) makecharset::bc#1 ← (byte) makecharset::bc#3 + (byte) makecharset::c#7 -- vbuz1=vbuz1_plus_vbuz2 lda bc clc adc c sta bc - //SEG150 [69] if((byte) makecharset::bc#1<(byte/signed byte/word/signed word/dword/signed dword) $3f+(byte/signed byte/word/signed word/dword/signed dword) 1) goto makecharset::@6 -- vbuz1_lt_vbuc1_then_la1 + //SEG148 [68] if((byte) makecharset::bc#1<(byte/signed byte/word/signed word/dword/signed dword) $3f+(byte/signed byte/word/signed word/dword/signed dword) 1) goto makecharset::@6 -- vbuz1_lt_vbuc1_then_la1 lda bc cmp #$3f+1 bcc b6_from_b5 jmp b7 - //SEG151 makecharset::@7 + //SEG149 makecharset::@7 b7: - //SEG152 [70] (byte) makecharset::bc#2 ← (byte) makecharset::bc#1 - (byte/signed byte/word/signed word/dword/signed dword) $40 -- vbuz1=vbuz1_minus_vbuc1 + //SEG150 [69] (byte) makecharset::bc#2 ← (byte) makecharset::bc#1 - (byte/signed byte/word/signed word/dword/signed dword) $40 -- vbuz1=vbuz1_minus_vbuc1 lax bc axs #$40 stx bc - //SEG153 [71] (byte~) makecharset::$11 ← (byte) makecharset::i#6 & (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuz1=vbuz2_band_vbuc1 + //SEG151 [70] (byte~) makecharset::$11 ← (byte) makecharset::i#6 & (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuz1=vbuz2_band_vbuc1 lda #1 and i sta _11 - //SEG154 [72] (byte~) makecharset::$12 ← (byte) makecharset::ii#2 + (byte~) makecharset::$11 -- vbuz1=vbuz2_plus_vbuz3 + //SEG152 [71] (byte~) makecharset::$12 ← (byte) makecharset::ii#2 + (byte~) makecharset::$11 -- vbuz1=vbuz2_plus_vbuz3 lda ii clc adc _11 sta _12 - //SEG155 [73] (byte~) makecharset::$13 ← (byte~) makecharset::$12 & (byte/signed byte/word/signed word/dword/signed dword) 7 -- vbuz1=vbuz2_band_vbuc1 + //SEG153 [72] (byte~) makecharset::$13 ← (byte~) makecharset::$12 & (byte/signed byte/word/signed word/dword/signed dword) 7 -- vbuz1=vbuz2_band_vbuc1 lda #7 and _12 sta _13 - //SEG156 [74] (byte) makecharset::b#1 ← (byte) makecharset::b#2 + *((const byte[8]) makecharset::bittab#0 + (byte~) makecharset::$13) -- vbuz1=vbuz1_plus_pbuc1_derefidx_vbuz2 + //SEG154 [73] (byte) makecharset::b#1 ← (byte) makecharset::b#2 + *((const byte[8]) makecharset::bittab#0 + (byte~) makecharset::$13) -- vbuz1=vbuz1_plus_pbuc1_derefidx_vbuz2 lda b ldy _13 clc adc bittab,y sta b - //SEG157 [75] phi from makecharset::@5 makecharset::@7 to makecharset::@6 [phi:makecharset::@5/makecharset::@7->makecharset::@6] + //SEG155 [74] phi from makecharset::@5 makecharset::@7 to makecharset::@6 [phi:makecharset::@5/makecharset::@7->makecharset::@6] b6_from_b5: b6_from_b7: - //SEG158 [75] phi (byte) makecharset::b#3 = (byte) makecharset::b#2 [phi:makecharset::@5/makecharset::@7->makecharset::@6#0] -- register_copy - //SEG159 [75] phi (byte) makecharset::bc#6 = (byte) makecharset::bc#1 [phi:makecharset::@5/makecharset::@7->makecharset::@6#1] -- register_copy + //SEG156 [74] phi (byte) makecharset::b#3 = (byte) makecharset::b#2 [phi:makecharset::@5/makecharset::@7->makecharset::@6#0] -- register_copy + //SEG157 [74] phi (byte) makecharset::bc#6 = (byte) makecharset::bc#1 [phi:makecharset::@5/makecharset::@7->makecharset::@6#1] -- register_copy jmp b6 - //SEG160 makecharset::@6 + //SEG158 makecharset::@6 b6: - //SEG161 [76] (byte) makecharset::ii#1 ← ++ (byte) makecharset::ii#2 -- vbuz1=_inc_vbuz1 + //SEG159 [75] (byte) makecharset::ii#1 ← ++ (byte) makecharset::ii#2 -- vbuz1=_inc_vbuz1 inc ii - //SEG162 [77] if((byte) makecharset::ii#1<(byte/signed byte/word/signed word/dword/signed dword) 8) goto makecharset::@5 -- vbuz1_lt_vbuc1_then_la1 + //SEG160 [76] if((byte) makecharset::ii#1<(byte/signed byte/word/signed word/dword/signed dword) 8) goto makecharset::@5 -- vbuz1_lt_vbuc1_then_la1 lda ii cmp #8 bcc b5_from_b6 jmp b8 - //SEG163 makecharset::@8 + //SEG161 makecharset::@8 b8: - //SEG164 [78] (word~) makecharset::$17 ← ((word)) (byte) makecharset::c#7 -- vwuz1=_word_vbuz2 + //SEG162 [77] (word~) makecharset::$17 ← ((word)) (byte) makecharset::c#7 -- vwuz1=_word_vbuz2 lda c sta _17 lda #0 sta _17+1 - //SEG165 [79] (word~) makecharset::$18 ← (word~) makecharset::$17 << (byte/signed byte/word/signed word/dword/signed dword) 3 -- vwuz1=vwuz2_rol_3 + //SEG163 [78] (word~) makecharset::$18 ← (word~) makecharset::$17 << (byte/signed byte/word/signed word/dword/signed dword) 3 -- vwuz1=vwuz2_rol_3 lda _17 asl sta _18 @@ -2015,7 +1999,7 @@ makecharset: { rol _18+1 asl _18 rol _18+1 - //SEG166 [80] (word~) makecharset::$19 ← (word~) makecharset::$18 + (byte) makecharset::i#6 -- vwuz1=vwuz2_plus_vbuz3 + //SEG164 [79] (word~) makecharset::$19 ← (word~) makecharset::$18 + (byte) makecharset::i#6 -- vwuz1=vwuz2_plus_vbuz3 lda i clc adc _18 @@ -2023,7 +2007,7 @@ makecharset: { lda #0 adc _18+1 sta _19+1 - //SEG167 [81] *((const byte*) CHARSET#0+(byte/signed byte/word/signed word/dword/signed dword) 1*(byte/signed byte/word/signed word/dword/signed dword) 8 + (word~) makecharset::$19) ← (byte) makecharset::b#3 -- pbuc1_derefidx_vwuz1=vbuz2 + //SEG165 [80] *((const byte*) CHARSET#0+(byte/signed byte/word/signed word/dword/signed dword) 1*(byte/signed byte/word/signed word/dword/signed dword) 8 + (word~) makecharset::$19) ← (byte) makecharset::b#3 -- pbuc1_derefidx_vwuz1=vbuz2 lda b sta !v++1 lda #$ffff sta SID_VOICE3_FREQ+1 - //SEG177 [88] *((const byte*) SID_VOICE3_CONTROL#0) ← (const byte) SID_CONTROL_NOISE#0 -- _deref_pbuc1=vbuc2 + //SEG175 [87] *((const byte*) SID_VOICE3_CONTROL#0) ← (const byte) SID_CONTROL_NOISE#0 -- _deref_pbuc1=vbuc2 lda #SID_CONTROL_NOISE sta SID_VOICE3_CONTROL jmp breturn - //SEG178 sid_rnd_init::@return + //SEG176 sid_rnd_init::@return breturn: - //SEG179 [89] return + //SEG177 [88] return rts } -//SEG180 fillscreen +//SEG178 fillscreen // Fill a screen (1000 bytes) with a specific byte // fillscreen(byte* zeropage($17) screen, byte zeropage($16) fill) fillscreen: { .label screen = $17 .label i = $19 .label fill = $16 - //SEG181 [91] phi from fillscreen to fillscreen::@1 [phi:fillscreen->fillscreen::@1] + //SEG179 [90] phi from fillscreen to fillscreen::@1 [phi:fillscreen->fillscreen::@1] b1_from_fillscreen: - //SEG182 [91] phi (word) fillscreen::i#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:fillscreen->fillscreen::@1#0] -- vwuz1=vbuc1 + //SEG180 [90] phi (word) fillscreen::i#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:fillscreen->fillscreen::@1#0] -- vwuz1=vbuc1 lda #0 sta i lda #0 sta i+1 - //SEG183 [91] phi (byte*) fillscreen::screen#5 = (byte*) fillscreen::screen#6 [phi:fillscreen->fillscreen::@1#1] -- register_copy + //SEG181 [90] phi (byte*) fillscreen::screen#5 = (byte*) fillscreen::screen#6 [phi:fillscreen->fillscreen::@1#1] -- register_copy jmp b1 - //SEG184 [91] phi from fillscreen::@1 to fillscreen::@1 [phi:fillscreen::@1->fillscreen::@1] + //SEG182 [90] phi from fillscreen::@1 to fillscreen::@1 [phi:fillscreen::@1->fillscreen::@1] b1_from_b1: - //SEG185 [91] phi (word) fillscreen::i#2 = (word) fillscreen::i#1 [phi:fillscreen::@1->fillscreen::@1#0] -- register_copy - //SEG186 [91] phi (byte*) fillscreen::screen#5 = (byte*) fillscreen::screen#4 [phi:fillscreen::@1->fillscreen::@1#1] -- register_copy + //SEG183 [90] phi (word) fillscreen::i#2 = (word) fillscreen::i#1 [phi:fillscreen::@1->fillscreen::@1#0] -- register_copy + //SEG184 [90] phi (byte*) fillscreen::screen#5 = (byte*) fillscreen::screen#4 [phi:fillscreen::@1->fillscreen::@1#1] -- register_copy jmp b1 - //SEG187 fillscreen::@1 + //SEG185 fillscreen::@1 b1: - //SEG188 [92] *((byte*) fillscreen::screen#5) ← (byte) fillscreen::fill#5 -- _deref_pbuz1=vbuz2 + //SEG186 [91] *((byte*) fillscreen::screen#5) ← (byte) fillscreen::fill#5 -- _deref_pbuz1=vbuz2 lda fill ldy #0 sta (screen),y - //SEG189 [93] (byte*) fillscreen::screen#4 ← ++ (byte*) fillscreen::screen#5 -- pbuz1=_inc_pbuz1 + //SEG187 [92] (byte*) fillscreen::screen#4 ← ++ (byte*) fillscreen::screen#5 -- pbuz1=_inc_pbuz1 inc screen bne !+ inc screen+1 !: - //SEG190 [94] (word) fillscreen::i#1 ← ++ (word) fillscreen::i#2 -- vwuz1=_inc_vwuz1 + //SEG188 [93] (word) fillscreen::i#1 ← ++ (word) fillscreen::i#2 -- vwuz1=_inc_vwuz1 inc i bne !+ inc i+1 !: - //SEG191 [95] if((word) fillscreen::i#1!=(word/signed word/dword/signed dword) $3e8) goto fillscreen::@1 -- vwuz1_neq_vwuc1_then_la1 + //SEG189 [94] if((word) fillscreen::i#1!=(word/signed word/dword/signed dword) $3e8) goto fillscreen::@1 -- vwuz1_neq_vwuc1_then_la1 lda i+1 cmp #>$3e8 bne b1_from_b1 @@ -2121,9 +2105,9 @@ fillscreen: { cmp #<$3e8 bne b1_from_b1 jmp breturn - //SEG192 fillscreen::@return + //SEG190 fillscreen::@return breturn: - //SEG193 [96] return + //SEG191 [95] return rts } @@ -2132,84 +2116,84 @@ Statement [5] *((const byte*) BORDERCOL#0) ← (const byte) BLACK#0 [ ] ( main:2 Statement [6] *((const byte*) BGCOL#0) ← (const byte) BLACK#0 [ ] ( main:2 [ ] ) always clobbers reg byte a Statement [21] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0 [ ] ( main:2 [ ] ) always clobbers reg byte a Statement [24] *((const byte*) D018#0) ← (const byte) main::toD0182_return#0 [ ] ( main:2 [ ] ) always clobbers reg byte a -Statement [26] (byte*~) fire::screen#11 ← (byte*) fire::screen#0 [ fire::screen#0 fire::screen#11 ] ( main:2::fire:19 [ fire::screen#0 fire::screen#11 ] main:2::fire:22 [ fire::screen#0 fire::screen#11 ] ) always clobbers reg byte a +Statement [26] (byte*~) fire::screen#10 ← (byte*) fire::screen#0 [ fire::screen#0 fire::screen#10 ] ( main:2::fire:19 [ fire::screen#0 fire::screen#10 ] main:2::fire:22 [ fire::screen#0 fire::screen#10 ] ) always clobbers reg byte a Statement [28] if((byte*) fire::buffer#4!=(const byte*) BUFFER#0+(byte/signed byte/word/signed word/dword/signed dword) $18*(byte/signed byte/word/signed word/dword/signed dword) $28) goto fire::@2 [ fire::screen#0 fire::buffer#4 fire::screen#4 ] ( main:2::fire:19 [ fire::screen#0 fire::buffer#4 fire::screen#4 ] main:2::fire:22 [ fire::screen#0 fire::buffer#4 fire::screen#4 ] ) always clobbers reg byte a Statement [29] (byte*) fire::screen#1 ← (byte*) fire::screen#0 + (byte/signed byte/word/signed word/dword/signed dword) $18*(byte/signed byte/word/signed word/dword/signed dword) $28 [ fire::screen#1 ] ( main:2::fire:19 [ fire::screen#1 ] main:2::fire:22 [ fire::screen#1 ] ) always clobbers reg byte a -Statement [31] if((byte*) fire::buffer#10!=(const byte*) BUFFER#0+(byte/signed byte/word/signed word/dword/signed dword) $19*(byte/signed byte/word/signed word/dword/signed dword) $28) goto fire::@7 [ fire::buffer#10 fire::screen#10 ] ( main:2::fire:19 [ fire::buffer#10 fire::screen#10 ] main:2::fire:22 [ fire::buffer#10 fire::screen#10 ] ) always clobbers reg byte a -Statement [37] (byte~) fire::$19 ← (byte~) fire::$18 >> (byte/signed byte/word/signed word/dword/signed dword) 4 [ fire::buffer#10 fire::screen#10 fire::$19 ] ( main:2::fire:19 [ fire::buffer#10 fire::screen#10 fire::$19 ] main:2::fire:22 [ fire::buffer#10 fire::screen#10 fire::$19 ] ) always clobbers reg byte a -Statement [39] *((byte*) fire::buffer#10) ← (byte/signed word/word/dword/signed dword~) fire::$20 [ fire::buffer#10 fire::screen#10 ] ( main:2::fire:19 [ fire::buffer#10 fire::screen#10 ] main:2::fire:22 [ fire::buffer#10 fire::screen#10 ] ) always clobbers reg byte y -Statement [40] *((byte*) fire::screen#10) ← *((byte*) fire::buffer#10) [ fire::buffer#10 fire::screen#10 ] ( main:2::fire:19 [ fire::buffer#10 fire::screen#10 ] main:2::fire:22 [ fire::buffer#10 fire::screen#10 ] ) always clobbers reg byte a reg byte y -Statement [43] (byte~) fire::$9 ← *((byte*) fire::buffer#4 + (byte/signed byte/word/signed word/dword/signed dword) $28-(byte/signed byte/word/signed word/dword/signed dword) 1) + *((byte*) fire::buffer#4 + (byte/signed byte/word/signed word/dword/signed dword) $28-(byte/signed byte/word/signed word/dword/signed dword) 1) [ fire::screen#0 fire::buffer#4 fire::screen#4 fire::$9 ] ( main:2::fire:19 [ fire::screen#0 fire::buffer#4 fire::screen#4 fire::$9 ] main:2::fire:22 [ fire::screen#0 fire::buffer#4 fire::screen#4 fire::$9 ] ) always clobbers reg byte a reg byte y -Statement [44] (byte~) fire::$10 ← (byte~) fire::$9 + *((byte*) fire::buffer#4 + (byte/signed byte/word/signed word/dword/signed dword) $28) [ fire::screen#0 fire::buffer#4 fire::screen#4 fire::$10 ] ( main:2::fire:19 [ fire::screen#0 fire::buffer#4 fire::screen#4 fire::$10 ] main:2::fire:22 [ fire::screen#0 fire::buffer#4 fire::screen#4 fire::$10 ] ) always clobbers reg byte a reg byte y -Statement [45] (byte~) fire::$11 ← (byte~) fire::$10 + *((byte*) fire::buffer#4 + (byte/signed byte/word/signed word/dword/signed dword) $29) [ fire::screen#0 fire::buffer#4 fire::screen#4 fire::$11 ] ( main:2::fire:19 [ fire::screen#0 fire::buffer#4 fire::screen#4 fire::$11 ] main:2::fire:22 [ fire::screen#0 fire::buffer#4 fire::screen#4 fire::$11 ] ) always clobbers reg byte a reg byte y -Statement [46] (byte) fire::c#0 ← (byte~) fire::$11 >> (byte/signed byte/word/signed word/dword/signed dword) 2 [ fire::screen#0 fire::buffer#4 fire::screen#4 fire::c#0 ] ( main:2::fire:19 [ fire::screen#0 fire::buffer#4 fire::screen#4 fire::c#0 ] main:2::fire:22 [ fire::screen#0 fire::buffer#4 fire::screen#4 fire::c#0 ] ) always clobbers reg byte a -Statement [48] (byte) fire::c#1 ← (byte) fire::c#0 - (byte/signed byte/word/signed word/dword/signed dword) 3 [ fire::screen#0 fire::buffer#4 fire::screen#4 fire::c#1 ] ( main:2::fire:19 [ fire::screen#0 fire::buffer#4 fire::screen#4 fire::c#1 ] main:2::fire:22 [ fire::screen#0 fire::buffer#4 fire::screen#4 fire::c#1 ] ) always clobbers reg byte a -Statement [50] *((byte*) fire::buffer#4) ← (byte) fire::c#2 [ fire::screen#0 fire::buffer#4 fire::screen#4 ] ( main:2::fire:19 [ fire::screen#0 fire::buffer#4 fire::screen#4 ] main:2::fire:22 [ fire::screen#0 fire::buffer#4 fire::screen#4 ] ) always clobbers reg byte y -Statement [51] *((byte*) fire::screen#4) ← *((byte*) fire::buffer#4) [ fire::screen#0 fire::buffer#4 fire::screen#4 ] ( main:2::fire:19 [ fire::screen#0 fire::buffer#4 fire::screen#4 ] main:2::fire:22 [ fire::screen#0 fire::buffer#4 fire::screen#4 ] ) always clobbers reg byte a reg byte y -Statement [58] *((byte*) makecharset::font#2) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ makecharset::font#2 ] ( main:2::makecharset:17 [ makecharset::font#2 ] ) always clobbers reg byte a reg byte y -Statement [60] if((byte*) makecharset::font#1!=(const byte*) CHARSET#0+(byte/signed byte/word/signed word/dword/signed dword) 1*(byte/signed byte/word/signed word/dword/signed dword) 8) goto makecharset::@1 [ makecharset::font#1 ] ( main:2::makecharset:17 [ makecharset::font#1 ] ) always clobbers reg byte a -Statement [62] *((byte*) makecharset::font1#2) ← (byte/word/signed word/dword/signed dword) $ff [ makecharset::font1#2 ] ( main:2::makecharset:17 [ makecharset::font1#2 ] ) always clobbers reg byte a reg byte y -Statement [64] if((byte*) makecharset::font1#1!=(const byte*) CHARSET#0+(word/signed word/dword/signed dword) $100*(byte/signed byte/word/signed word/dword/signed dword) 8) goto makecharset::@2 [ makecharset::font1#1 ] ( main:2::makecharset:17 [ makecharset::font1#1 ] ) always clobbers reg byte a -Statement [68] (byte) makecharset::bc#1 ← (byte) makecharset::bc#3 + (byte) makecharset::c#7 [ makecharset::c#7 makecharset::i#6 makecharset::ii#2 makecharset::b#2 makecharset::bc#1 ] ( main:2::makecharset:17 [ makecharset::c#7 makecharset::i#6 makecharset::ii#2 makecharset::b#2 makecharset::bc#1 ] ) always clobbers reg byte a +Statement [34] (byte~) fire::$16 ← (byte~) fire::$15 >> (byte/signed byte/word/signed word/dword/signed dword) 4 [ fire::buffer#7 fire::screen#5 fire::$16 ] ( main:2::fire:19 [ fire::buffer#7 fire::screen#5 fire::$16 ] main:2::fire:22 [ fire::buffer#7 fire::screen#5 fire::$16 ] ) always clobbers reg byte a +Statement [36] *((byte*) fire::buffer#7) ← (byte/signed word/word/dword/signed dword~) fire::$17 [ fire::buffer#7 fire::screen#5 ] ( main:2::fire:19 [ fire::buffer#7 fire::screen#5 ] main:2::fire:22 [ fire::buffer#7 fire::screen#5 ] ) always clobbers reg byte y +Statement [37] *((byte*) fire::screen#5) ← *((byte*) fire::buffer#7) [ fire::buffer#7 fire::screen#5 ] ( main:2::fire:19 [ fire::buffer#7 fire::screen#5 ] main:2::fire:22 [ fire::buffer#7 fire::screen#5 ] ) always clobbers reg byte a reg byte y +Statement [40] if((byte*) fire::buffer#3!=(const byte*) BUFFER#0+(byte/signed byte/word/signed word/dword/signed dword) $19*(byte/signed byte/word/signed word/dword/signed dword) $28) goto fire::@6 [ fire::buffer#3 fire::screen#3 ] ( main:2::fire:19 [ fire::buffer#3 fire::screen#3 ] main:2::fire:22 [ fire::buffer#3 fire::screen#3 ] ) always clobbers reg byte a +Statement [42] (byte~) fire::$9 ← *((byte*) fire::buffer#4 + (byte/signed byte/word/signed word/dword/signed dword) $28-(byte/signed byte/word/signed word/dword/signed dword) 1) + *((byte*) fire::buffer#4 + (byte/signed byte/word/signed word/dword/signed dword) $28-(byte/signed byte/word/signed word/dword/signed dword) 1) [ fire::screen#0 fire::buffer#4 fire::screen#4 fire::$9 ] ( main:2::fire:19 [ fire::screen#0 fire::buffer#4 fire::screen#4 fire::$9 ] main:2::fire:22 [ fire::screen#0 fire::buffer#4 fire::screen#4 fire::$9 ] ) always clobbers reg byte a reg byte y +Statement [43] (byte~) fire::$10 ← (byte~) fire::$9 + *((byte*) fire::buffer#4 + (byte/signed byte/word/signed word/dword/signed dword) $28) [ fire::screen#0 fire::buffer#4 fire::screen#4 fire::$10 ] ( main:2::fire:19 [ fire::screen#0 fire::buffer#4 fire::screen#4 fire::$10 ] main:2::fire:22 [ fire::screen#0 fire::buffer#4 fire::screen#4 fire::$10 ] ) always clobbers reg byte a reg byte y +Statement [44] (byte~) fire::$11 ← (byte~) fire::$10 + *((byte*) fire::buffer#4 + (byte/signed byte/word/signed word/dword/signed dword) $29) [ fire::screen#0 fire::buffer#4 fire::screen#4 fire::$11 ] ( main:2::fire:19 [ fire::screen#0 fire::buffer#4 fire::screen#4 fire::$11 ] main:2::fire:22 [ fire::screen#0 fire::buffer#4 fire::screen#4 fire::$11 ] ) always clobbers reg byte a reg byte y +Statement [45] (byte) fire::c#0 ← (byte~) fire::$11 >> (byte/signed byte/word/signed word/dword/signed dword) 2 [ fire::screen#0 fire::buffer#4 fire::screen#4 fire::c#0 ] ( main:2::fire:19 [ fire::screen#0 fire::buffer#4 fire::screen#4 fire::c#0 ] main:2::fire:22 [ fire::screen#0 fire::buffer#4 fire::screen#4 fire::c#0 ] ) always clobbers reg byte a +Statement [47] (byte) fire::c#1 ← (byte) fire::c#0 - (byte/signed byte/word/signed word/dword/signed dword) 3 [ fire::screen#0 fire::buffer#4 fire::screen#4 fire::c#1 ] ( main:2::fire:19 [ fire::screen#0 fire::buffer#4 fire::screen#4 fire::c#1 ] main:2::fire:22 [ fire::screen#0 fire::buffer#4 fire::screen#4 fire::c#1 ] ) always clobbers reg byte a +Statement [49] *((byte*) fire::buffer#4) ← (byte) fire::c#2 [ fire::screen#0 fire::buffer#4 fire::screen#4 ] ( main:2::fire:19 [ fire::screen#0 fire::buffer#4 fire::screen#4 ] main:2::fire:22 [ fire::screen#0 fire::buffer#4 fire::screen#4 ] ) always clobbers reg byte y +Statement [50] *((byte*) fire::screen#4) ← *((byte*) fire::buffer#4) [ fire::screen#0 fire::buffer#4 fire::screen#4 ] ( main:2::fire:19 [ fire::screen#0 fire::buffer#4 fire::screen#4 ] main:2::fire:22 [ fire::screen#0 fire::buffer#4 fire::screen#4 ] ) always clobbers reg byte a reg byte y +Statement [57] *((byte*) makecharset::font#2) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ makecharset::font#2 ] ( main:2::makecharset:17 [ makecharset::font#2 ] ) always clobbers reg byte a reg byte y +Statement [59] if((byte*) makecharset::font#1!=(const byte*) CHARSET#0+(byte/signed byte/word/signed word/dword/signed dword) 1*(byte/signed byte/word/signed word/dword/signed dword) 8) goto makecharset::@1 [ makecharset::font#1 ] ( main:2::makecharset:17 [ makecharset::font#1 ] ) always clobbers reg byte a +Statement [61] *((byte*) makecharset::font1#2) ← (byte/word/signed word/dword/signed dword) $ff [ makecharset::font1#2 ] ( main:2::makecharset:17 [ makecharset::font1#2 ] ) always clobbers reg byte a reg byte y +Statement [63] if((byte*) makecharset::font1#1!=(const byte*) CHARSET#0+(word/signed word/dword/signed dword) $100*(byte/signed byte/word/signed word/dword/signed dword) 8) goto makecharset::@2 [ makecharset::font1#1 ] ( main:2::makecharset:17 [ makecharset::font1#1 ] ) always clobbers reg byte a +Statement [67] (byte) makecharset::bc#1 ← (byte) makecharset::bc#3 + (byte) makecharset::c#7 [ makecharset::c#7 makecharset::i#6 makecharset::ii#2 makecharset::b#2 makecharset::bc#1 ] ( main:2::makecharset:17 [ makecharset::c#7 makecharset::i#6 makecharset::ii#2 makecharset::b#2 makecharset::bc#1 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp ZP_BYTE:17 [ makecharset::c#7 makecharset::c#1 ] Removing always clobbered register reg byte a as potential for zp ZP_BYTE:18 [ makecharset::i#6 makecharset::i#1 ] Removing always clobbered register reg byte a as potential for zp ZP_BYTE:20 [ makecharset::ii#2 makecharset::ii#1 ] Removing always clobbered register reg byte a as potential for zp ZP_BYTE:21 [ makecharset::b#2 makecharset::b#3 makecharset::b#1 ] -Statement [70] (byte) makecharset::bc#2 ← (byte) makecharset::bc#1 - (byte/signed byte/word/signed word/dword/signed dword) $40 [ makecharset::c#7 makecharset::i#6 makecharset::ii#2 makecharset::b#2 makecharset::bc#2 ] ( main:2::makecharset:17 [ makecharset::c#7 makecharset::i#6 makecharset::ii#2 makecharset::b#2 makecharset::bc#2 ] ) always clobbers reg byte a -Statement [71] (byte~) makecharset::$11 ← (byte) makecharset::i#6 & (byte/signed byte/word/signed word/dword/signed dword) 1 [ makecharset::c#7 makecharset::i#6 makecharset::ii#2 makecharset::b#2 makecharset::bc#2 makecharset::$11 ] ( main:2::makecharset:17 [ makecharset::c#7 makecharset::i#6 makecharset::ii#2 makecharset::b#2 makecharset::bc#2 makecharset::$11 ] ) always clobbers reg byte a +Statement [69] (byte) makecharset::bc#2 ← (byte) makecharset::bc#1 - (byte/signed byte/word/signed word/dword/signed dword) $40 [ makecharset::c#7 makecharset::i#6 makecharset::ii#2 makecharset::b#2 makecharset::bc#2 ] ( main:2::makecharset:17 [ makecharset::c#7 makecharset::i#6 makecharset::ii#2 makecharset::b#2 makecharset::bc#2 ] ) always clobbers reg byte a +Statement [70] (byte~) makecharset::$11 ← (byte) makecharset::i#6 & (byte/signed byte/word/signed word/dword/signed dword) 1 [ makecharset::c#7 makecharset::i#6 makecharset::ii#2 makecharset::b#2 makecharset::bc#2 makecharset::$11 ] ( main:2::makecharset:17 [ makecharset::c#7 makecharset::i#6 makecharset::ii#2 makecharset::b#2 makecharset::bc#2 makecharset::$11 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp ZP_BYTE:19 [ makecharset::bc#3 makecharset::bc#5 makecharset::bc#6 makecharset::bc#1 makecharset::bc#2 ] -Statement [72] (byte~) makecharset::$12 ← (byte) makecharset::ii#2 + (byte~) makecharset::$11 [ makecharset::c#7 makecharset::i#6 makecharset::ii#2 makecharset::b#2 makecharset::bc#2 makecharset::$12 ] ( main:2::makecharset:17 [ makecharset::c#7 makecharset::i#6 makecharset::ii#2 makecharset::b#2 makecharset::bc#2 makecharset::$12 ] ) always clobbers reg byte a -Statement [74] (byte) makecharset::b#1 ← (byte) makecharset::b#2 + *((const byte[8]) makecharset::bittab#0 + (byte~) makecharset::$13) [ makecharset::c#7 makecharset::i#6 makecharset::ii#2 makecharset::bc#2 makecharset::b#1 ] ( main:2::makecharset:17 [ makecharset::c#7 makecharset::i#6 makecharset::ii#2 makecharset::bc#2 makecharset::b#1 ] ) always clobbers reg byte a -Statement [78] (word~) makecharset::$17 ← ((word)) (byte) makecharset::c#7 [ makecharset::c#7 makecharset::i#6 makecharset::bc#6 makecharset::b#3 makecharset::$17 ] ( main:2::makecharset:17 [ makecharset::c#7 makecharset::i#6 makecharset::bc#6 makecharset::b#3 makecharset::$17 ] ) always clobbers reg byte a -Statement [79] (word~) makecharset::$18 ← (word~) makecharset::$17 << (byte/signed byte/word/signed word/dword/signed dword) 3 [ makecharset::c#7 makecharset::i#6 makecharset::bc#6 makecharset::b#3 makecharset::$18 ] ( main:2::makecharset:17 [ makecharset::c#7 makecharset::i#6 makecharset::bc#6 makecharset::b#3 makecharset::$18 ] ) always clobbers reg byte a -Statement [80] (word~) makecharset::$19 ← (word~) makecharset::$18 + (byte) makecharset::i#6 [ makecharset::c#7 makecharset::i#6 makecharset::bc#6 makecharset::b#3 makecharset::$19 ] ( main:2::makecharset:17 [ makecharset::c#7 makecharset::i#6 makecharset::bc#6 makecharset::b#3 makecharset::$19 ] ) always clobbers reg byte a -Statement [81] *((const byte*) CHARSET#0+(byte/signed byte/word/signed word/dword/signed dword) 1*(byte/signed byte/word/signed word/dword/signed dword) 8 + (word~) makecharset::$19) ← (byte) makecharset::b#3 [ makecharset::c#7 makecharset::i#6 makecharset::bc#6 ] ( main:2::makecharset:17 [ makecharset::c#7 makecharset::i#6 makecharset::bc#6 ] ) always clobbers reg byte a -Statement [87] *((const word*) SID_VOICE3_FREQ#0) ← (word/dword/signed dword) $ffff [ ] ( main:2::sid_rnd_init:15 [ ] ) always clobbers reg byte a -Statement [88] *((const byte*) SID_VOICE3_CONTROL#0) ← (const byte) SID_CONTROL_NOISE#0 [ ] ( main:2::sid_rnd_init:15 [ ] ) always clobbers reg byte a -Statement [92] *((byte*) fillscreen::screen#5) ← (byte) fillscreen::fill#5 [ fillscreen::fill#5 fillscreen::screen#5 fillscreen::i#2 ] ( main:2::fillscreen:7 [ fillscreen::fill#5 fillscreen::screen#5 fillscreen::i#2 ] main:2::fillscreen:9 [ fillscreen::fill#5 fillscreen::screen#5 fillscreen::i#2 ] main:2::fillscreen:11 [ fillscreen::fill#5 fillscreen::screen#5 fillscreen::i#2 ] main:2::fillscreen:13 [ fillscreen::fill#5 fillscreen::screen#5 fillscreen::i#2 ] ) always clobbers reg byte y +Statement [71] (byte~) makecharset::$12 ← (byte) makecharset::ii#2 + (byte~) makecharset::$11 [ makecharset::c#7 makecharset::i#6 makecharset::ii#2 makecharset::b#2 makecharset::bc#2 makecharset::$12 ] ( main:2::makecharset:17 [ makecharset::c#7 makecharset::i#6 makecharset::ii#2 makecharset::b#2 makecharset::bc#2 makecharset::$12 ] ) always clobbers reg byte a +Statement [73] (byte) makecharset::b#1 ← (byte) makecharset::b#2 + *((const byte[8]) makecharset::bittab#0 + (byte~) makecharset::$13) [ makecharset::c#7 makecharset::i#6 makecharset::ii#2 makecharset::bc#2 makecharset::b#1 ] ( main:2::makecharset:17 [ makecharset::c#7 makecharset::i#6 makecharset::ii#2 makecharset::bc#2 makecharset::b#1 ] ) always clobbers reg byte a +Statement [77] (word~) makecharset::$17 ← ((word)) (byte) makecharset::c#7 [ makecharset::c#7 makecharset::i#6 makecharset::bc#6 makecharset::b#3 makecharset::$17 ] ( main:2::makecharset:17 [ makecharset::c#7 makecharset::i#6 makecharset::bc#6 makecharset::b#3 makecharset::$17 ] ) always clobbers reg byte a +Statement [78] (word~) makecharset::$18 ← (word~) makecharset::$17 << (byte/signed byte/word/signed word/dword/signed dword) 3 [ makecharset::c#7 makecharset::i#6 makecharset::bc#6 makecharset::b#3 makecharset::$18 ] ( main:2::makecharset:17 [ makecharset::c#7 makecharset::i#6 makecharset::bc#6 makecharset::b#3 makecharset::$18 ] ) always clobbers reg byte a +Statement [79] (word~) makecharset::$19 ← (word~) makecharset::$18 + (byte) makecharset::i#6 [ makecharset::c#7 makecharset::i#6 makecharset::bc#6 makecharset::b#3 makecharset::$19 ] ( main:2::makecharset:17 [ makecharset::c#7 makecharset::i#6 makecharset::bc#6 makecharset::b#3 makecharset::$19 ] ) always clobbers reg byte a +Statement [80] *((const byte*) CHARSET#0+(byte/signed byte/word/signed word/dword/signed dword) 1*(byte/signed byte/word/signed word/dword/signed dword) 8 + (word~) makecharset::$19) ← (byte) makecharset::b#3 [ makecharset::c#7 makecharset::i#6 makecharset::bc#6 ] ( main:2::makecharset:17 [ makecharset::c#7 makecharset::i#6 makecharset::bc#6 ] ) always clobbers reg byte a +Statement [86] *((const word*) SID_VOICE3_FREQ#0) ← (word/dword/signed dword) $ffff [ ] ( main:2::sid_rnd_init:15 [ ] ) always clobbers reg byte a +Statement [87] *((const byte*) SID_VOICE3_CONTROL#0) ← (const byte) SID_CONTROL_NOISE#0 [ ] ( main:2::sid_rnd_init:15 [ ] ) always clobbers reg byte a +Statement [91] *((byte*) fillscreen::screen#5) ← (byte) fillscreen::fill#5 [ fillscreen::fill#5 fillscreen::screen#5 fillscreen::i#2 ] ( main:2::fillscreen:7 [ fillscreen::fill#5 fillscreen::screen#5 fillscreen::i#2 ] main:2::fillscreen:9 [ fillscreen::fill#5 fillscreen::screen#5 fillscreen::i#2 ] main:2::fillscreen:11 [ fillscreen::fill#5 fillscreen::screen#5 fillscreen::i#2 ] main:2::fillscreen:13 [ fillscreen::fill#5 fillscreen::screen#5 fillscreen::i#2 ] ) always clobbers reg byte y Removing always clobbered register reg byte y as potential for zp ZP_BYTE:22 [ fillscreen::fill#5 ] -Statement [95] if((word) fillscreen::i#1!=(word/signed word/dword/signed dword) $3e8) goto fillscreen::@1 [ fillscreen::fill#5 fillscreen::screen#4 fillscreen::i#1 ] ( main:2::fillscreen:7 [ fillscreen::fill#5 fillscreen::screen#4 fillscreen::i#1 ] main:2::fillscreen:9 [ fillscreen::fill#5 fillscreen::screen#4 fillscreen::i#1 ] main:2::fillscreen:11 [ fillscreen::fill#5 fillscreen::screen#4 fillscreen::i#1 ] main:2::fillscreen:13 [ fillscreen::fill#5 fillscreen::screen#4 fillscreen::i#1 ] ) always clobbers reg byte a +Statement [94] if((word) fillscreen::i#1!=(word/signed word/dword/signed dword) $3e8) goto fillscreen::@1 [ fillscreen::fill#5 fillscreen::screen#4 fillscreen::i#1 ] ( main:2::fillscreen:7 [ fillscreen::fill#5 fillscreen::screen#4 fillscreen::i#1 ] main:2::fillscreen:9 [ fillscreen::fill#5 fillscreen::screen#4 fillscreen::i#1 ] main:2::fillscreen:11 [ fillscreen::fill#5 fillscreen::screen#4 fillscreen::i#1 ] main:2::fillscreen:13 [ fillscreen::fill#5 fillscreen::screen#4 fillscreen::i#1 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp ZP_BYTE:22 [ fillscreen::fill#5 ] Statement [5] *((const byte*) BORDERCOL#0) ← (const byte) BLACK#0 [ ] ( main:2 [ ] ) always clobbers reg byte a Statement [6] *((const byte*) BGCOL#0) ← (const byte) BLACK#0 [ ] ( main:2 [ ] ) always clobbers reg byte a Statement [21] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0 [ ] ( main:2 [ ] ) always clobbers reg byte a Statement [24] *((const byte*) D018#0) ← (const byte) main::toD0182_return#0 [ ] ( main:2 [ ] ) always clobbers reg byte a -Statement [26] (byte*~) fire::screen#11 ← (byte*) fire::screen#0 [ fire::screen#0 fire::screen#11 ] ( main:2::fire:19 [ fire::screen#0 fire::screen#11 ] main:2::fire:22 [ fire::screen#0 fire::screen#11 ] ) always clobbers reg byte a +Statement [26] (byte*~) fire::screen#10 ← (byte*) fire::screen#0 [ fire::screen#0 fire::screen#10 ] ( main:2::fire:19 [ fire::screen#0 fire::screen#10 ] main:2::fire:22 [ fire::screen#0 fire::screen#10 ] ) always clobbers reg byte a Statement [28] if((byte*) fire::buffer#4!=(const byte*) BUFFER#0+(byte/signed byte/word/signed word/dword/signed dword) $18*(byte/signed byte/word/signed word/dword/signed dword) $28) goto fire::@2 [ fire::screen#0 fire::buffer#4 fire::screen#4 ] ( main:2::fire:19 [ fire::screen#0 fire::buffer#4 fire::screen#4 ] main:2::fire:22 [ fire::screen#0 fire::buffer#4 fire::screen#4 ] ) always clobbers reg byte a Statement [29] (byte*) fire::screen#1 ← (byte*) fire::screen#0 + (byte/signed byte/word/signed word/dword/signed dword) $18*(byte/signed byte/word/signed word/dword/signed dword) $28 [ fire::screen#1 ] ( main:2::fire:19 [ fire::screen#1 ] main:2::fire:22 [ fire::screen#1 ] ) always clobbers reg byte a -Statement [31] if((byte*) fire::buffer#10!=(const byte*) BUFFER#0+(byte/signed byte/word/signed word/dword/signed dword) $19*(byte/signed byte/word/signed word/dword/signed dword) $28) goto fire::@7 [ fire::buffer#10 fire::screen#10 ] ( main:2::fire:19 [ fire::buffer#10 fire::screen#10 ] main:2::fire:22 [ fire::buffer#10 fire::screen#10 ] ) always clobbers reg byte a -Statement [37] (byte~) fire::$19 ← (byte~) fire::$18 >> (byte/signed byte/word/signed word/dword/signed dword) 4 [ fire::buffer#10 fire::screen#10 fire::$19 ] ( main:2::fire:19 [ fire::buffer#10 fire::screen#10 fire::$19 ] main:2::fire:22 [ fire::buffer#10 fire::screen#10 fire::$19 ] ) always clobbers reg byte a -Statement [39] *((byte*) fire::buffer#10) ← (byte/signed word/word/dword/signed dword~) fire::$20 [ fire::buffer#10 fire::screen#10 ] ( main:2::fire:19 [ fire::buffer#10 fire::screen#10 ] main:2::fire:22 [ fire::buffer#10 fire::screen#10 ] ) always clobbers reg byte y -Statement [40] *((byte*) fire::screen#10) ← *((byte*) fire::buffer#10) [ fire::buffer#10 fire::screen#10 ] ( main:2::fire:19 [ fire::buffer#10 fire::screen#10 ] main:2::fire:22 [ fire::buffer#10 fire::screen#10 ] ) always clobbers reg byte a reg byte y -Statement [43] (byte~) fire::$9 ← *((byte*) fire::buffer#4 + (byte/signed byte/word/signed word/dword/signed dword) $28-(byte/signed byte/word/signed word/dword/signed dword) 1) + *((byte*) fire::buffer#4 + (byte/signed byte/word/signed word/dword/signed dword) $28-(byte/signed byte/word/signed word/dword/signed dword) 1) [ fire::screen#0 fire::buffer#4 fire::screen#4 fire::$9 ] ( main:2::fire:19 [ fire::screen#0 fire::buffer#4 fire::screen#4 fire::$9 ] main:2::fire:22 [ fire::screen#0 fire::buffer#4 fire::screen#4 fire::$9 ] ) always clobbers reg byte a reg byte y -Statement [44] (byte~) fire::$10 ← (byte~) fire::$9 + *((byte*) fire::buffer#4 + (byte/signed byte/word/signed word/dword/signed dword) $28) [ fire::screen#0 fire::buffer#4 fire::screen#4 fire::$10 ] ( main:2::fire:19 [ fire::screen#0 fire::buffer#4 fire::screen#4 fire::$10 ] main:2::fire:22 [ fire::screen#0 fire::buffer#4 fire::screen#4 fire::$10 ] ) always clobbers reg byte a reg byte y -Statement [45] (byte~) fire::$11 ← (byte~) fire::$10 + *((byte*) fire::buffer#4 + (byte/signed byte/word/signed word/dword/signed dword) $29) [ fire::screen#0 fire::buffer#4 fire::screen#4 fire::$11 ] ( main:2::fire:19 [ fire::screen#0 fire::buffer#4 fire::screen#4 fire::$11 ] main:2::fire:22 [ fire::screen#0 fire::buffer#4 fire::screen#4 fire::$11 ] ) always clobbers reg byte a reg byte y -Statement [46] (byte) fire::c#0 ← (byte~) fire::$11 >> (byte/signed byte/word/signed word/dword/signed dword) 2 [ fire::screen#0 fire::buffer#4 fire::screen#4 fire::c#0 ] ( main:2::fire:19 [ fire::screen#0 fire::buffer#4 fire::screen#4 fire::c#0 ] main:2::fire:22 [ fire::screen#0 fire::buffer#4 fire::screen#4 fire::c#0 ] ) always clobbers reg byte a -Statement [48] (byte) fire::c#1 ← (byte) fire::c#0 - (byte/signed byte/word/signed word/dword/signed dword) 3 [ fire::screen#0 fire::buffer#4 fire::screen#4 fire::c#1 ] ( main:2::fire:19 [ fire::screen#0 fire::buffer#4 fire::screen#4 fire::c#1 ] main:2::fire:22 [ fire::screen#0 fire::buffer#4 fire::screen#4 fire::c#1 ] ) always clobbers reg byte a -Statement [50] *((byte*) fire::buffer#4) ← (byte) fire::c#2 [ fire::screen#0 fire::buffer#4 fire::screen#4 ] ( main:2::fire:19 [ fire::screen#0 fire::buffer#4 fire::screen#4 ] main:2::fire:22 [ fire::screen#0 fire::buffer#4 fire::screen#4 ] ) always clobbers reg byte y -Statement [51] *((byte*) fire::screen#4) ← *((byte*) fire::buffer#4) [ fire::screen#0 fire::buffer#4 fire::screen#4 ] ( main:2::fire:19 [ fire::screen#0 fire::buffer#4 fire::screen#4 ] main:2::fire:22 [ fire::screen#0 fire::buffer#4 fire::screen#4 ] ) always clobbers reg byte a reg byte y -Statement [58] *((byte*) makecharset::font#2) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ makecharset::font#2 ] ( main:2::makecharset:17 [ makecharset::font#2 ] ) always clobbers reg byte a reg byte y -Statement [60] if((byte*) makecharset::font#1!=(const byte*) CHARSET#0+(byte/signed byte/word/signed word/dword/signed dword) 1*(byte/signed byte/word/signed word/dword/signed dword) 8) goto makecharset::@1 [ makecharset::font#1 ] ( main:2::makecharset:17 [ makecharset::font#1 ] ) always clobbers reg byte a -Statement [62] *((byte*) makecharset::font1#2) ← (byte/word/signed word/dword/signed dword) $ff [ makecharset::font1#2 ] ( main:2::makecharset:17 [ makecharset::font1#2 ] ) always clobbers reg byte a reg byte y -Statement [64] if((byte*) makecharset::font1#1!=(const byte*) CHARSET#0+(word/signed word/dword/signed dword) $100*(byte/signed byte/word/signed word/dword/signed dword) 8) goto makecharset::@2 [ makecharset::font1#1 ] ( main:2::makecharset:17 [ makecharset::font1#1 ] ) always clobbers reg byte a -Statement [68] (byte) makecharset::bc#1 ← (byte) makecharset::bc#3 + (byte) makecharset::c#7 [ makecharset::c#7 makecharset::i#6 makecharset::ii#2 makecharset::b#2 makecharset::bc#1 ] ( main:2::makecharset:17 [ makecharset::c#7 makecharset::i#6 makecharset::ii#2 makecharset::b#2 makecharset::bc#1 ] ) always clobbers reg byte a -Statement [70] (byte) makecharset::bc#2 ← (byte) makecharset::bc#1 - (byte/signed byte/word/signed word/dword/signed dword) $40 [ makecharset::c#7 makecharset::i#6 makecharset::ii#2 makecharset::b#2 makecharset::bc#2 ] ( main:2::makecharset:17 [ makecharset::c#7 makecharset::i#6 makecharset::ii#2 makecharset::b#2 makecharset::bc#2 ] ) always clobbers reg byte a -Statement [71] (byte~) makecharset::$11 ← (byte) makecharset::i#6 & (byte/signed byte/word/signed word/dword/signed dword) 1 [ makecharset::c#7 makecharset::i#6 makecharset::ii#2 makecharset::b#2 makecharset::bc#2 makecharset::$11 ] ( main:2::makecharset:17 [ makecharset::c#7 makecharset::i#6 makecharset::ii#2 makecharset::b#2 makecharset::bc#2 makecharset::$11 ] ) always clobbers reg byte a -Statement [72] (byte~) makecharset::$12 ← (byte) makecharset::ii#2 + (byte~) makecharset::$11 [ makecharset::c#7 makecharset::i#6 makecharset::ii#2 makecharset::b#2 makecharset::bc#2 makecharset::$12 ] ( main:2::makecharset:17 [ makecharset::c#7 makecharset::i#6 makecharset::ii#2 makecharset::b#2 makecharset::bc#2 makecharset::$12 ] ) always clobbers reg byte a -Statement [74] (byte) makecharset::b#1 ← (byte) makecharset::b#2 + *((const byte[8]) makecharset::bittab#0 + (byte~) makecharset::$13) [ makecharset::c#7 makecharset::i#6 makecharset::ii#2 makecharset::bc#2 makecharset::b#1 ] ( main:2::makecharset:17 [ makecharset::c#7 makecharset::i#6 makecharset::ii#2 makecharset::bc#2 makecharset::b#1 ] ) always clobbers reg byte a -Statement [78] (word~) makecharset::$17 ← ((word)) (byte) makecharset::c#7 [ makecharset::c#7 makecharset::i#6 makecharset::bc#6 makecharset::b#3 makecharset::$17 ] ( main:2::makecharset:17 [ makecharset::c#7 makecharset::i#6 makecharset::bc#6 makecharset::b#3 makecharset::$17 ] ) always clobbers reg byte a -Statement [79] (word~) makecharset::$18 ← (word~) makecharset::$17 << (byte/signed byte/word/signed word/dword/signed dword) 3 [ makecharset::c#7 makecharset::i#6 makecharset::bc#6 makecharset::b#3 makecharset::$18 ] ( main:2::makecharset:17 [ makecharset::c#7 makecharset::i#6 makecharset::bc#6 makecharset::b#3 makecharset::$18 ] ) always clobbers reg byte a -Statement [80] (word~) makecharset::$19 ← (word~) makecharset::$18 + (byte) makecharset::i#6 [ makecharset::c#7 makecharset::i#6 makecharset::bc#6 makecharset::b#3 makecharset::$19 ] ( main:2::makecharset:17 [ makecharset::c#7 makecharset::i#6 makecharset::bc#6 makecharset::b#3 makecharset::$19 ] ) always clobbers reg byte a -Statement [81] *((const byte*) CHARSET#0+(byte/signed byte/word/signed word/dword/signed dword) 1*(byte/signed byte/word/signed word/dword/signed dword) 8 + (word~) makecharset::$19) ← (byte) makecharset::b#3 [ makecharset::c#7 makecharset::i#6 makecharset::bc#6 ] ( main:2::makecharset:17 [ makecharset::c#7 makecharset::i#6 makecharset::bc#6 ] ) always clobbers reg byte a -Statement [87] *((const word*) SID_VOICE3_FREQ#0) ← (word/dword/signed dword) $ffff [ ] ( main:2::sid_rnd_init:15 [ ] ) always clobbers reg byte a -Statement [88] *((const byte*) SID_VOICE3_CONTROL#0) ← (const byte) SID_CONTROL_NOISE#0 [ ] ( main:2::sid_rnd_init:15 [ ] ) always clobbers reg byte a -Statement [92] *((byte*) fillscreen::screen#5) ← (byte) fillscreen::fill#5 [ fillscreen::fill#5 fillscreen::screen#5 fillscreen::i#2 ] ( main:2::fillscreen:7 [ fillscreen::fill#5 fillscreen::screen#5 fillscreen::i#2 ] main:2::fillscreen:9 [ fillscreen::fill#5 fillscreen::screen#5 fillscreen::i#2 ] main:2::fillscreen:11 [ fillscreen::fill#5 fillscreen::screen#5 fillscreen::i#2 ] main:2::fillscreen:13 [ fillscreen::fill#5 fillscreen::screen#5 fillscreen::i#2 ] ) always clobbers reg byte a reg byte y -Statement [95] if((word) fillscreen::i#1!=(word/signed word/dword/signed dword) $3e8) goto fillscreen::@1 [ fillscreen::fill#5 fillscreen::screen#4 fillscreen::i#1 ] ( main:2::fillscreen:7 [ fillscreen::fill#5 fillscreen::screen#4 fillscreen::i#1 ] main:2::fillscreen:9 [ fillscreen::fill#5 fillscreen::screen#4 fillscreen::i#1 ] main:2::fillscreen:11 [ fillscreen::fill#5 fillscreen::screen#4 fillscreen::i#1 ] main:2::fillscreen:13 [ fillscreen::fill#5 fillscreen::screen#4 fillscreen::i#1 ] ) always clobbers reg byte a +Statement [34] (byte~) fire::$16 ← (byte~) fire::$15 >> (byte/signed byte/word/signed word/dword/signed dword) 4 [ fire::buffer#7 fire::screen#5 fire::$16 ] ( main:2::fire:19 [ fire::buffer#7 fire::screen#5 fire::$16 ] main:2::fire:22 [ fire::buffer#7 fire::screen#5 fire::$16 ] ) always clobbers reg byte a +Statement [36] *((byte*) fire::buffer#7) ← (byte/signed word/word/dword/signed dword~) fire::$17 [ fire::buffer#7 fire::screen#5 ] ( main:2::fire:19 [ fire::buffer#7 fire::screen#5 ] main:2::fire:22 [ fire::buffer#7 fire::screen#5 ] ) always clobbers reg byte y +Statement [37] *((byte*) fire::screen#5) ← *((byte*) fire::buffer#7) [ fire::buffer#7 fire::screen#5 ] ( main:2::fire:19 [ fire::buffer#7 fire::screen#5 ] main:2::fire:22 [ fire::buffer#7 fire::screen#5 ] ) always clobbers reg byte a reg byte y +Statement [40] if((byte*) fire::buffer#3!=(const byte*) BUFFER#0+(byte/signed byte/word/signed word/dword/signed dword) $19*(byte/signed byte/word/signed word/dword/signed dword) $28) goto fire::@6 [ fire::buffer#3 fire::screen#3 ] ( main:2::fire:19 [ fire::buffer#3 fire::screen#3 ] main:2::fire:22 [ fire::buffer#3 fire::screen#3 ] ) always clobbers reg byte a +Statement [42] (byte~) fire::$9 ← *((byte*) fire::buffer#4 + (byte/signed byte/word/signed word/dword/signed dword) $28-(byte/signed byte/word/signed word/dword/signed dword) 1) + *((byte*) fire::buffer#4 + (byte/signed byte/word/signed word/dword/signed dword) $28-(byte/signed byte/word/signed word/dword/signed dword) 1) [ fire::screen#0 fire::buffer#4 fire::screen#4 fire::$9 ] ( main:2::fire:19 [ fire::screen#0 fire::buffer#4 fire::screen#4 fire::$9 ] main:2::fire:22 [ fire::screen#0 fire::buffer#4 fire::screen#4 fire::$9 ] ) always clobbers reg byte a reg byte y +Statement [43] (byte~) fire::$10 ← (byte~) fire::$9 + *((byte*) fire::buffer#4 + (byte/signed byte/word/signed word/dword/signed dword) $28) [ fire::screen#0 fire::buffer#4 fire::screen#4 fire::$10 ] ( main:2::fire:19 [ fire::screen#0 fire::buffer#4 fire::screen#4 fire::$10 ] main:2::fire:22 [ fire::screen#0 fire::buffer#4 fire::screen#4 fire::$10 ] ) always clobbers reg byte a reg byte y +Statement [44] (byte~) fire::$11 ← (byte~) fire::$10 + *((byte*) fire::buffer#4 + (byte/signed byte/word/signed word/dword/signed dword) $29) [ fire::screen#0 fire::buffer#4 fire::screen#4 fire::$11 ] ( main:2::fire:19 [ fire::screen#0 fire::buffer#4 fire::screen#4 fire::$11 ] main:2::fire:22 [ fire::screen#0 fire::buffer#4 fire::screen#4 fire::$11 ] ) always clobbers reg byte a reg byte y +Statement [45] (byte) fire::c#0 ← (byte~) fire::$11 >> (byte/signed byte/word/signed word/dword/signed dword) 2 [ fire::screen#0 fire::buffer#4 fire::screen#4 fire::c#0 ] ( main:2::fire:19 [ fire::screen#0 fire::buffer#4 fire::screen#4 fire::c#0 ] main:2::fire:22 [ fire::screen#0 fire::buffer#4 fire::screen#4 fire::c#0 ] ) always clobbers reg byte a +Statement [47] (byte) fire::c#1 ← (byte) fire::c#0 - (byte/signed byte/word/signed word/dword/signed dword) 3 [ fire::screen#0 fire::buffer#4 fire::screen#4 fire::c#1 ] ( main:2::fire:19 [ fire::screen#0 fire::buffer#4 fire::screen#4 fire::c#1 ] main:2::fire:22 [ fire::screen#0 fire::buffer#4 fire::screen#4 fire::c#1 ] ) always clobbers reg byte a +Statement [49] *((byte*) fire::buffer#4) ← (byte) fire::c#2 [ fire::screen#0 fire::buffer#4 fire::screen#4 ] ( main:2::fire:19 [ fire::screen#0 fire::buffer#4 fire::screen#4 ] main:2::fire:22 [ fire::screen#0 fire::buffer#4 fire::screen#4 ] ) always clobbers reg byte y +Statement [50] *((byte*) fire::screen#4) ← *((byte*) fire::buffer#4) [ fire::screen#0 fire::buffer#4 fire::screen#4 ] ( main:2::fire:19 [ fire::screen#0 fire::buffer#4 fire::screen#4 ] main:2::fire:22 [ fire::screen#0 fire::buffer#4 fire::screen#4 ] ) always clobbers reg byte a reg byte y +Statement [57] *((byte*) makecharset::font#2) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ makecharset::font#2 ] ( main:2::makecharset:17 [ makecharset::font#2 ] ) always clobbers reg byte a reg byte y +Statement [59] if((byte*) makecharset::font#1!=(const byte*) CHARSET#0+(byte/signed byte/word/signed word/dword/signed dword) 1*(byte/signed byte/word/signed word/dword/signed dword) 8) goto makecharset::@1 [ makecharset::font#1 ] ( main:2::makecharset:17 [ makecharset::font#1 ] ) always clobbers reg byte a +Statement [61] *((byte*) makecharset::font1#2) ← (byte/word/signed word/dword/signed dword) $ff [ makecharset::font1#2 ] ( main:2::makecharset:17 [ makecharset::font1#2 ] ) always clobbers reg byte a reg byte y +Statement [63] if((byte*) makecharset::font1#1!=(const byte*) CHARSET#0+(word/signed word/dword/signed dword) $100*(byte/signed byte/word/signed word/dword/signed dword) 8) goto makecharset::@2 [ makecharset::font1#1 ] ( main:2::makecharset:17 [ makecharset::font1#1 ] ) always clobbers reg byte a +Statement [67] (byte) makecharset::bc#1 ← (byte) makecharset::bc#3 + (byte) makecharset::c#7 [ makecharset::c#7 makecharset::i#6 makecharset::ii#2 makecharset::b#2 makecharset::bc#1 ] ( main:2::makecharset:17 [ makecharset::c#7 makecharset::i#6 makecharset::ii#2 makecharset::b#2 makecharset::bc#1 ] ) always clobbers reg byte a +Statement [69] (byte) makecharset::bc#2 ← (byte) makecharset::bc#1 - (byte/signed byte/word/signed word/dword/signed dword) $40 [ makecharset::c#7 makecharset::i#6 makecharset::ii#2 makecharset::b#2 makecharset::bc#2 ] ( main:2::makecharset:17 [ makecharset::c#7 makecharset::i#6 makecharset::ii#2 makecharset::b#2 makecharset::bc#2 ] ) always clobbers reg byte a +Statement [70] (byte~) makecharset::$11 ← (byte) makecharset::i#6 & (byte/signed byte/word/signed word/dword/signed dword) 1 [ makecharset::c#7 makecharset::i#6 makecharset::ii#2 makecharset::b#2 makecharset::bc#2 makecharset::$11 ] ( main:2::makecharset:17 [ makecharset::c#7 makecharset::i#6 makecharset::ii#2 makecharset::b#2 makecharset::bc#2 makecharset::$11 ] ) always clobbers reg byte a +Statement [71] (byte~) makecharset::$12 ← (byte) makecharset::ii#2 + (byte~) makecharset::$11 [ makecharset::c#7 makecharset::i#6 makecharset::ii#2 makecharset::b#2 makecharset::bc#2 makecharset::$12 ] ( main:2::makecharset:17 [ makecharset::c#7 makecharset::i#6 makecharset::ii#2 makecharset::b#2 makecharset::bc#2 makecharset::$12 ] ) always clobbers reg byte a +Statement [73] (byte) makecharset::b#1 ← (byte) makecharset::b#2 + *((const byte[8]) makecharset::bittab#0 + (byte~) makecharset::$13) [ makecharset::c#7 makecharset::i#6 makecharset::ii#2 makecharset::bc#2 makecharset::b#1 ] ( main:2::makecharset:17 [ makecharset::c#7 makecharset::i#6 makecharset::ii#2 makecharset::bc#2 makecharset::b#1 ] ) always clobbers reg byte a +Statement [77] (word~) makecharset::$17 ← ((word)) (byte) makecharset::c#7 [ makecharset::c#7 makecharset::i#6 makecharset::bc#6 makecharset::b#3 makecharset::$17 ] ( main:2::makecharset:17 [ makecharset::c#7 makecharset::i#6 makecharset::bc#6 makecharset::b#3 makecharset::$17 ] ) always clobbers reg byte a +Statement [78] (word~) makecharset::$18 ← (word~) makecharset::$17 << (byte/signed byte/word/signed word/dword/signed dword) 3 [ makecharset::c#7 makecharset::i#6 makecharset::bc#6 makecharset::b#3 makecharset::$18 ] ( main:2::makecharset:17 [ makecharset::c#7 makecharset::i#6 makecharset::bc#6 makecharset::b#3 makecharset::$18 ] ) always clobbers reg byte a +Statement [79] (word~) makecharset::$19 ← (word~) makecharset::$18 + (byte) makecharset::i#6 [ makecharset::c#7 makecharset::i#6 makecharset::bc#6 makecharset::b#3 makecharset::$19 ] ( main:2::makecharset:17 [ makecharset::c#7 makecharset::i#6 makecharset::bc#6 makecharset::b#3 makecharset::$19 ] ) always clobbers reg byte a +Statement [80] *((const byte*) CHARSET#0+(byte/signed byte/word/signed word/dword/signed dword) 1*(byte/signed byte/word/signed word/dword/signed dword) 8 + (word~) makecharset::$19) ← (byte) makecharset::b#3 [ makecharset::c#7 makecharset::i#6 makecharset::bc#6 ] ( main:2::makecharset:17 [ makecharset::c#7 makecharset::i#6 makecharset::bc#6 ] ) always clobbers reg byte a +Statement [86] *((const word*) SID_VOICE3_FREQ#0) ← (word/dword/signed dword) $ffff [ ] ( main:2::sid_rnd_init:15 [ ] ) always clobbers reg byte a +Statement [87] *((const byte*) SID_VOICE3_CONTROL#0) ← (const byte) SID_CONTROL_NOISE#0 [ ] ( main:2::sid_rnd_init:15 [ ] ) always clobbers reg byte a +Statement [91] *((byte*) fillscreen::screen#5) ← (byte) fillscreen::fill#5 [ fillscreen::fill#5 fillscreen::screen#5 fillscreen::i#2 ] ( main:2::fillscreen:7 [ fillscreen::fill#5 fillscreen::screen#5 fillscreen::i#2 ] main:2::fillscreen:9 [ fillscreen::fill#5 fillscreen::screen#5 fillscreen::i#2 ] main:2::fillscreen:11 [ fillscreen::fill#5 fillscreen::screen#5 fillscreen::i#2 ] main:2::fillscreen:13 [ fillscreen::fill#5 fillscreen::screen#5 fillscreen::i#2 ] ) always clobbers reg byte a reg byte y +Statement [94] if((word) fillscreen::i#1!=(word/signed word/dword/signed dword) $3e8) goto fillscreen::@1 [ fillscreen::fill#5 fillscreen::screen#4 fillscreen::i#1 ] ( main:2::fillscreen:7 [ fillscreen::fill#5 fillscreen::screen#4 fillscreen::i#1 ] main:2::fillscreen:9 [ fillscreen::fill#5 fillscreen::screen#4 fillscreen::i#1 ] main:2::fillscreen:11 [ fillscreen::fill#5 fillscreen::screen#4 fillscreen::i#1 ] main:2::fillscreen:13 [ fillscreen::fill#5 fillscreen::screen#4 fillscreen::i#1 ] ) always clobbers reg byte a Potential registers zp ZP_WORD:2 [ fire::screen#0 ] : zp ZP_WORD:2 , Potential registers zp ZP_WORD:4 [ fire::buffer#4 fire::buffer#2 ] : zp ZP_WORD:4 , -Potential registers zp ZP_WORD:6 [ fire::screen#4 fire::screen#11 fire::screen#2 ] : zp ZP_WORD:6 , -Potential registers zp ZP_WORD:8 [ fire::buffer#10 fire::buffer#3 ] : zp ZP_WORD:8 , -Potential registers zp ZP_WORD:10 [ fire::screen#10 fire::screen#3 fire::screen#1 ] : zp ZP_WORD:10 , +Potential registers zp ZP_WORD:6 [ fire::screen#4 fire::screen#10 fire::screen#2 ] : zp ZP_WORD:6 , +Potential registers zp ZP_WORD:8 [ fire::buffer#7 fire::buffer#3 ] : zp ZP_WORD:8 , +Potential registers zp ZP_WORD:10 [ fire::screen#5 fire::screen#3 fire::screen#1 ] : zp ZP_WORD:10 , Potential registers zp ZP_BYTE:12 [ fire::c#2 fire::c#0 fire::c#1 ] : zp ZP_BYTE:12 , reg byte a , reg byte x , reg byte y , Potential registers zp ZP_WORD:13 [ makecharset::font#2 makecharset::font#1 ] : zp ZP_WORD:13 , Potential registers zp ZP_WORD:15 [ makecharset::font1#2 makecharset::font1#1 ] : zp ZP_WORD:15 , @@ -2222,9 +2206,9 @@ Potential registers zp ZP_BYTE:22 [ fillscreen::fill#5 ] : zp ZP_BYTE:22 , reg b Potential registers zp ZP_WORD:23 [ fillscreen::screen#5 fillscreen::screen#6 fillscreen::screen#4 ] : zp ZP_WORD:23 , Potential registers zp ZP_WORD:25 [ fillscreen::i#2 fillscreen::i#1 ] : zp ZP_WORD:25 , Potential registers zp ZP_BYTE:27 [ sid_rnd::return#2 ] : zp ZP_BYTE:27 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:28 [ fire::$18 ] : zp ZP_BYTE:28 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:29 [ fire::$19 ] : zp ZP_BYTE:29 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:30 [ fire::$20 ] : zp ZP_BYTE:30 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:28 [ fire::$15 ] : zp ZP_BYTE:28 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:29 [ fire::$16 ] : zp ZP_BYTE:29 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:30 [ fire::$17 ] : zp ZP_BYTE:30 , reg byte a , reg byte x , reg byte y , Potential registers zp ZP_BYTE:31 [ fire::$9 ] : zp ZP_BYTE:31 , reg byte a , reg byte x , reg byte y , Potential registers zp ZP_BYTE:32 [ fire::$10 ] : zp ZP_BYTE:32 , reg byte a , reg byte x , reg byte y , Potential registers zp ZP_BYTE:33 [ fire::$11 ] : zp ZP_BYTE:33 , reg byte a , reg byte x , reg byte y , @@ -2238,45 +2222,45 @@ Potential registers zp ZP_WORD:42 [ makecharset::$19 ] : zp ZP_WORD:42 , REGISTER UPLIFT SCOPES Uplift Scope [makecharset] 5,052.29: zp ZP_BYTE:19 [ makecharset::bc#3 makecharset::bc#5 makecharset::bc#6 makecharset::bc#1 makecharset::bc#2 ] 2,948.33: zp ZP_BYTE:21 [ makecharset::b#2 makecharset::b#3 makecharset::b#1 ] 2,002: zp ZP_BYTE:35 [ makecharset::$11 ] 2,002: zp ZP_BYTE:36 [ makecharset::$12 ] 2,002: zp ZP_BYTE:37 [ makecharset::$13 ] 1,835.17: zp ZP_BYTE:20 [ makecharset::ii#2 makecharset::ii#1 ] 233: zp ZP_BYTE:18 [ makecharset::i#6 makecharset::i#1 ] 202: zp ZP_WORD:38 [ makecharset::$17 ] 202: zp ZP_WORD:40 [ makecharset::$18 ] 202: zp ZP_WORD:42 [ makecharset::$19 ] 75.66: zp ZP_BYTE:17 [ makecharset::c#7 makecharset::c#1 ] 33: zp ZP_WORD:13 [ makecharset::font#2 makecharset::font#1 ] 33: zp ZP_WORD:15 [ makecharset::font1#2 makecharset::font1#1 ] -Uplift Scope [fire] 707: zp ZP_BYTE:12 [ fire::c#2 fire::c#0 fire::c#1 ] 277.75: zp ZP_WORD:4 [ fire::buffer#4 fire::buffer#2 ] 247.91: zp ZP_WORD:8 [ fire::buffer#10 fire::buffer#3 ] 202: zp ZP_BYTE:28 [ fire::$18 ] 202: zp ZP_BYTE:29 [ fire::$19 ] 202: zp ZP_BYTE:30 [ fire::$20 ] 202: zp ZP_BYTE:31 [ fire::$9 ] 202: zp ZP_BYTE:32 [ fire::$10 ] 202: zp ZP_BYTE:33 [ fire::$11 ] 135.5: zp ZP_WORD:10 [ fire::screen#10 fire::screen#3 fire::screen#1 ] 132.73: zp ZP_WORD:6 [ fire::screen#4 fire::screen#11 fire::screen#2 ] 0.27: zp ZP_WORD:2 [ fire::screen#0 ] +Uplift Scope [fire] 707: zp ZP_BYTE:12 [ fire::c#2 fire::c#0 fire::c#1 ] 277.75: zp ZP_WORD:4 [ fire::buffer#4 fire::buffer#2 ] 202: zp ZP_BYTE:28 [ fire::$15 ] 202: zp ZP_BYTE:29 [ fire::$16 ] 202: zp ZP_BYTE:30 [ fire::$17 ] 202: zp ZP_BYTE:31 [ fire::$9 ] 202: zp ZP_BYTE:32 [ fire::$10 ] 202: zp ZP_BYTE:33 [ fire::$11 ] 196.39: zp ZP_WORD:8 [ fire::buffer#7 fire::buffer#3 ] 132.73: zp ZP_WORD:6 [ fire::screen#4 fire::screen#10 fire::screen#2 ] 109.46: zp ZP_WORD:10 [ fire::screen#5 fire::screen#3 fire::screen#1 ] 0.27: zp ZP_WORD:2 [ fire::screen#0 ] Uplift Scope [sid_rnd] 202: zp ZP_BYTE:27 [ sid_rnd::return#2 ] 34.33: zp ZP_BYTE:34 [ sid_rnd::return#0 ] Uplift Scope [fillscreen] 26.83: zp ZP_WORD:23 [ fillscreen::screen#5 fillscreen::screen#6 fillscreen::screen#4 ] 23.83: zp ZP_WORD:25 [ fillscreen::i#2 fillscreen::i#1 ] 1.83: zp ZP_BYTE:22 [ fillscreen::fill#5 ] Uplift Scope [sid_rnd_init] Uplift Scope [main] Uplift Scope [] -Uplifting [makecharset] best 125695 combination reg byte x [ makecharset::bc#3 makecharset::bc#5 makecharset::bc#6 makecharset::bc#1 makecharset::bc#2 ] reg byte y [ makecharset::b#2 makecharset::b#3 makecharset::b#1 ] reg byte a [ makecharset::$11 ] reg byte a [ makecharset::$12 ] zp ZP_BYTE:37 [ makecharset::$13 ] zp ZP_BYTE:20 [ makecharset::ii#2 makecharset::ii#1 ] zp ZP_BYTE:18 [ makecharset::i#6 makecharset::i#1 ] zp ZP_WORD:38 [ makecharset::$17 ] zp ZP_WORD:40 [ makecharset::$18 ] zp ZP_WORD:42 [ makecharset::$19 ] zp ZP_BYTE:17 [ makecharset::c#7 makecharset::c#1 ] zp ZP_WORD:13 [ makecharset::font#2 makecharset::font#1 ] zp ZP_WORD:15 [ makecharset::font1#2 makecharset::font1#1 ] +Uplifting [makecharset] best 125395 combination reg byte x [ makecharset::bc#3 makecharset::bc#5 makecharset::bc#6 makecharset::bc#1 makecharset::bc#2 ] reg byte y [ makecharset::b#2 makecharset::b#3 makecharset::b#1 ] reg byte a [ makecharset::$11 ] reg byte a [ makecharset::$12 ] zp ZP_BYTE:37 [ makecharset::$13 ] zp ZP_BYTE:20 [ makecharset::ii#2 makecharset::ii#1 ] zp ZP_BYTE:18 [ makecharset::i#6 makecharset::i#1 ] zp ZP_WORD:38 [ makecharset::$17 ] zp ZP_WORD:40 [ makecharset::$18 ] zp ZP_WORD:42 [ makecharset::$19 ] zp ZP_BYTE:17 [ makecharset::c#7 makecharset::c#1 ] zp ZP_WORD:13 [ makecharset::font#2 makecharset::font#1 ] zp ZP_WORD:15 [ makecharset::font1#2 makecharset::font1#1 ] Limited combination testing to 100 combinations of 15552 possible. -Uplifting [fire] best 122795 combination reg byte a [ fire::c#2 fire::c#0 fire::c#1 ] zp ZP_WORD:4 [ fire::buffer#4 fire::buffer#2 ] zp ZP_WORD:8 [ fire::buffer#10 fire::buffer#3 ] reg byte a [ fire::$18 ] reg byte a [ fire::$19 ] reg byte a [ fire::$20 ] zp ZP_BYTE:31 [ fire::$9 ] zp ZP_BYTE:32 [ fire::$10 ] zp ZP_BYTE:33 [ fire::$11 ] zp ZP_WORD:10 [ fire::screen#10 fire::screen#3 fire::screen#1 ] zp ZP_WORD:6 [ fire::screen#4 fire::screen#11 fire::screen#2 ] zp ZP_WORD:2 [ fire::screen#0 ] +Uplifting [fire] best 122495 combination reg byte a [ fire::c#2 fire::c#0 fire::c#1 ] zp ZP_WORD:4 [ fire::buffer#4 fire::buffer#2 ] reg byte a [ fire::$15 ] reg byte a [ fire::$16 ] reg byte a [ fire::$17 ] zp ZP_BYTE:31 [ fire::$9 ] zp ZP_BYTE:32 [ fire::$10 ] zp ZP_BYTE:33 [ fire::$11 ] zp ZP_WORD:8 [ fire::buffer#7 fire::buffer#3 ] zp ZP_WORD:6 [ fire::screen#4 fire::screen#10 fire::screen#2 ] zp ZP_WORD:10 [ fire::screen#5 fire::screen#3 fire::screen#1 ] zp ZP_WORD:2 [ fire::screen#0 ] Limited combination testing to 100 combinations of 16384 possible. -Uplifting [sid_rnd] best 121892 combination reg byte a [ sid_rnd::return#2 ] reg byte a [ sid_rnd::return#0 ] -Uplifting [fillscreen] best 121870 combination zp ZP_WORD:23 [ fillscreen::screen#5 fillscreen::screen#6 fillscreen::screen#4 ] zp ZP_WORD:25 [ fillscreen::i#2 fillscreen::i#1 ] reg byte x [ fillscreen::fill#5 ] -Uplifting [sid_rnd_init] best 121870 combination -Uplifting [main] best 121870 combination -Uplifting [] best 121870 combination +Uplifting [sid_rnd] best 121592 combination reg byte a [ sid_rnd::return#2 ] reg byte a [ sid_rnd::return#0 ] +Uplifting [fillscreen] best 121570 combination zp ZP_WORD:23 [ fillscreen::screen#5 fillscreen::screen#6 fillscreen::screen#4 ] zp ZP_WORD:25 [ fillscreen::i#2 fillscreen::i#1 ] reg byte x [ fillscreen::fill#5 ] +Uplifting [sid_rnd_init] best 121570 combination +Uplifting [main] best 121570 combination +Uplifting [] best 121570 combination Attempting to uplift remaining variables inzp ZP_BYTE:37 [ makecharset::$13 ] -Uplifting [makecharset] best 121870 combination zp ZP_BYTE:37 [ makecharset::$13 ] +Uplifting [makecharset] best 121570 combination zp ZP_BYTE:37 [ makecharset::$13 ] Attempting to uplift remaining variables inzp ZP_BYTE:20 [ makecharset::ii#2 makecharset::ii#1 ] -Uplifting [makecharset] best 121870 combination zp ZP_BYTE:20 [ makecharset::ii#2 makecharset::ii#1 ] +Uplifting [makecharset] best 121570 combination zp ZP_BYTE:20 [ makecharset::ii#2 makecharset::ii#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:18 [ makecharset::i#6 makecharset::i#1 ] -Uplifting [makecharset] best 121870 combination zp ZP_BYTE:18 [ makecharset::i#6 makecharset::i#1 ] +Uplifting [makecharset] best 121570 combination zp ZP_BYTE:18 [ makecharset::i#6 makecharset::i#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:31 [ fire::$9 ] -Uplifting [fire] best 121270 combination reg byte a [ fire::$9 ] +Uplifting [fire] best 120970 combination reg byte a [ fire::$9 ] Attempting to uplift remaining variables inzp ZP_BYTE:32 [ fire::$10 ] -Uplifting [fire] best 120670 combination reg byte a [ fire::$10 ] +Uplifting [fire] best 120370 combination reg byte a [ fire::$10 ] Attempting to uplift remaining variables inzp ZP_BYTE:33 [ fire::$11 ] -Uplifting [fire] best 120070 combination reg byte a [ fire::$11 ] +Uplifting [fire] best 119770 combination reg byte a [ fire::$11 ] Attempting to uplift remaining variables inzp ZP_BYTE:17 [ makecharset::c#7 makecharset::c#1 ] -Uplifting [makecharset] best 120070 combination zp ZP_BYTE:17 [ makecharset::c#7 makecharset::c#1 ] -Coalescing zero page register with common assignment [ zp ZP_WORD:2 [ fire::screen#0 ] ] with [ zp ZP_WORD:10 [ fire::screen#10 fire::screen#3 fire::screen#1 ] ] - score: 1 +Uplifting [makecharset] best 119770 combination zp ZP_BYTE:17 [ makecharset::c#7 makecharset::c#1 ] +Coalescing zero page register with common assignment [ zp ZP_WORD:2 [ fire::screen#0 ] ] with [ zp ZP_WORD:10 [ fire::screen#5 fire::screen#3 fire::screen#1 ] ] - score: 1 Coalescing zero page register with common assignment [ zp ZP_WORD:38 [ makecharset::$17 ] ] with [ zp ZP_WORD:40 [ makecharset::$18 ] ] - score: 1 Coalescing zero page register with common assignment [ zp ZP_WORD:38 [ makecharset::$17 makecharset::$18 ] ] with [ zp ZP_WORD:42 [ makecharset::$19 ] ] - score: 1 -Coalescing zero page register [ zp ZP_WORD:2 [ fire::screen#0 fire::screen#10 fire::screen#3 fire::screen#1 ] ] with [ zp ZP_WORD:13 [ makecharset::font#2 makecharset::font#1 ] ] -Coalescing zero page register [ zp ZP_WORD:2 [ fire::screen#0 fire::screen#10 fire::screen#3 fire::screen#1 makecharset::font#2 makecharset::font#1 ] ] with [ zp ZP_WORD:15 [ makecharset::font1#2 makecharset::font1#1 ] ] -Coalescing zero page register [ zp ZP_WORD:2 [ fire::screen#0 fire::screen#10 fire::screen#3 fire::screen#1 makecharset::font#2 makecharset::font#1 makecharset::font1#2 makecharset::font1#1 ] ] with [ zp ZP_WORD:23 [ fillscreen::screen#5 fillscreen::screen#6 fillscreen::screen#4 ] ] -Coalescing zero page register [ zp ZP_WORD:2 [ fire::screen#0 fire::screen#10 fire::screen#3 fire::screen#1 makecharset::font#2 makecharset::font#1 makecharset::font1#2 makecharset::font1#1 fillscreen::screen#5 fillscreen::screen#6 fillscreen::screen#4 ] ] with [ zp ZP_WORD:38 [ makecharset::$17 makecharset::$18 makecharset::$19 ] ] -Coalescing zero page register [ zp ZP_WORD:4 [ fire::buffer#4 fire::buffer#2 ] ] with [ zp ZP_WORD:8 [ fire::buffer#10 fire::buffer#3 ] ] -Coalescing zero page register [ zp ZP_WORD:4 [ fire::buffer#4 fire::buffer#2 fire::buffer#10 fire::buffer#3 ] ] with [ zp ZP_WORD:25 [ fillscreen::i#2 fillscreen::i#1 ] ] +Coalescing zero page register [ zp ZP_WORD:2 [ fire::screen#0 fire::screen#5 fire::screen#3 fire::screen#1 ] ] with [ zp ZP_WORD:13 [ makecharset::font#2 makecharset::font#1 ] ] +Coalescing zero page register [ zp ZP_WORD:2 [ fire::screen#0 fire::screen#5 fire::screen#3 fire::screen#1 makecharset::font#2 makecharset::font#1 ] ] with [ zp ZP_WORD:15 [ makecharset::font1#2 makecharset::font1#1 ] ] +Coalescing zero page register [ zp ZP_WORD:2 [ fire::screen#0 fire::screen#5 fire::screen#3 fire::screen#1 makecharset::font#2 makecharset::font#1 makecharset::font1#2 makecharset::font1#1 ] ] with [ zp ZP_WORD:23 [ fillscreen::screen#5 fillscreen::screen#6 fillscreen::screen#4 ] ] +Coalescing zero page register [ zp ZP_WORD:2 [ fire::screen#0 fire::screen#5 fire::screen#3 fire::screen#1 makecharset::font#2 makecharset::font#1 makecharset::font1#2 makecharset::font1#1 fillscreen::screen#5 fillscreen::screen#6 fillscreen::screen#4 ] ] with [ zp ZP_WORD:38 [ makecharset::$17 makecharset::$18 makecharset::$19 ] ] +Coalescing zero page register [ zp ZP_WORD:4 [ fire::buffer#4 fire::buffer#2 ] ] with [ zp ZP_WORD:8 [ fire::buffer#7 fire::buffer#3 ] ] +Coalescing zero page register [ zp ZP_WORD:4 [ fire::buffer#4 fire::buffer#2 fire::buffer#7 fire::buffer#3 ] ] with [ zp ZP_WORD:25 [ fillscreen::i#2 fillscreen::i#1 ] ] Allocated (was zp ZP_BYTE:17) zp ZP_BYTE:8 [ makecharset::c#7 makecharset::c#1 ] Allocated (was zp ZP_BYTE:18) zp ZP_BYTE:9 [ makecharset::i#6 makecharset::i#1 ] Allocated (was zp ZP_BYTE:20) zp ZP_BYTE:10 [ makecharset::ii#2 makecharset::ii#1 ] @@ -2338,14 +2322,14 @@ main: { lda #BLACK sta BGCOL //SEG13 [7] call fillscreen - //SEG14 [90] phi from main to fillscreen [phi:main->fillscreen] + //SEG14 [89] phi from main to fillscreen [phi:main->fillscreen] fillscreen_from_main: - //SEG15 [90] phi (byte*) fillscreen::screen#6 = (const byte*) BUFFER#0 [phi:main->fillscreen#0] -- pbuz1=pbuc1 + //SEG15 [89] phi (byte*) fillscreen::screen#6 = (const byte*) BUFFER#0 [phi:main->fillscreen#0] -- pbuz1=pbuc1 lda #BUFFER sta fillscreen.screen+1 - //SEG16 [90] phi (byte) fillscreen::fill#5 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main->fillscreen#1] -- vbuxx=vbuc1 + //SEG16 [89] phi (byte) fillscreen::fill#5 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main->fillscreen#1] -- vbuxx=vbuc1 ldx #0 jsr fillscreen //SEG17 [8] phi from main to main::@4 [phi:main->main::@4] @@ -2354,14 +2338,14 @@ main: { //SEG18 main::@4 b4: //SEG19 [9] call fillscreen - //SEG20 [90] phi from main::@4 to fillscreen [phi:main::@4->fillscreen] + //SEG20 [89] phi from main::@4 to fillscreen [phi:main::@4->fillscreen] fillscreen_from_b4: - //SEG21 [90] phi (byte*) fillscreen::screen#6 = (const byte*) SCREEN1#0 [phi:main::@4->fillscreen#0] -- pbuz1=pbuc1 + //SEG21 [89] phi (byte*) fillscreen::screen#6 = (const byte*) SCREEN1#0 [phi:main::@4->fillscreen#0] -- pbuz1=pbuc1 lda #SCREEN1 sta fillscreen.screen+1 - //SEG22 [90] phi (byte) fillscreen::fill#5 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@4->fillscreen#1] -- vbuxx=vbuc1 + //SEG22 [89] phi (byte) fillscreen::fill#5 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@4->fillscreen#1] -- vbuxx=vbuc1 ldx #0 jsr fillscreen //SEG23 [10] phi from main::@4 to main::@5 [phi:main::@4->main::@5] @@ -2370,14 +2354,14 @@ main: { //SEG24 main::@5 b5: //SEG25 [11] call fillscreen - //SEG26 [90] phi from main::@5 to fillscreen [phi:main::@5->fillscreen] + //SEG26 [89] phi from main::@5 to fillscreen [phi:main::@5->fillscreen] fillscreen_from_b5: - //SEG27 [90] phi (byte*) fillscreen::screen#6 = (const byte*) SCREEN2#0 [phi:main::@5->fillscreen#0] -- pbuz1=pbuc1 + //SEG27 [89] phi (byte*) fillscreen::screen#6 = (const byte*) SCREEN2#0 [phi:main::@5->fillscreen#0] -- pbuz1=pbuc1 lda #SCREEN2 sta fillscreen.screen+1 - //SEG28 [90] phi (byte) fillscreen::fill#5 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@5->fillscreen#1] -- vbuxx=vbuc1 + //SEG28 [89] phi (byte) fillscreen::fill#5 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@5->fillscreen#1] -- vbuxx=vbuc1 ldx #0 jsr fillscreen //SEG29 [12] phi from main::@5 to main::@6 [phi:main::@5->main::@6] @@ -2386,14 +2370,14 @@ main: { //SEG30 main::@6 b6: //SEG31 [13] call fillscreen - //SEG32 [90] phi from main::@6 to fillscreen [phi:main::@6->fillscreen] + //SEG32 [89] phi from main::@6 to fillscreen [phi:main::@6->fillscreen] fillscreen_from_b6: - //SEG33 [90] phi (byte*) fillscreen::screen#6 = (const byte*) COLS#0 [phi:main::@6->fillscreen#0] -- pbuz1=pbuc1 + //SEG33 [89] phi (byte*) fillscreen::screen#6 = (const byte*) COLS#0 [phi:main::@6->fillscreen#0] -- pbuz1=pbuc1 lda #COLS sta fillscreen.screen+1 - //SEG34 [90] phi (byte) fillscreen::fill#5 = (const byte) YELLOW#0 [phi:main::@6->fillscreen#1] -- vbuxx=vbuc1 + //SEG34 [89] phi (byte) fillscreen::fill#5 = (const byte) YELLOW#0 [phi:main::@6->fillscreen#1] -- vbuxx=vbuc1 ldx #YELLOW jsr fillscreen //SEG35 [14] phi from main::@6 to main::@7 [phi:main::@6->main::@7] @@ -2409,7 +2393,7 @@ main: { //SEG39 main::@8 b8: //SEG40 [17] call makecharset - //SEG41 [56] phi from main::@8 to makecharset [phi:main::@8->makecharset] + //SEG41 [55] phi from main::@8 to makecharset [phi:main::@8->makecharset] makecharset_from_b8: jsr makecharset //SEG42 [18] phi from main::@3 main::@8 to main::@1 [phi:main::@3/main::@8->main::@1] @@ -2461,21 +2445,21 @@ main: { jmp b1_from_b3 } //SEG58 fire -// Animate the fire on the passe screen. Uses BUFFER to store the current values. +// Animate the fire on the passed screen. Uses BUFFER to store the current values. fire: { .label screen = 2 .label screen_2 = 6 .label buffer = 4 .label screen_4 = 6 - .label screen_11 = 6 - //SEG59 [26] (byte*~) fire::screen#11 ← (byte*) fire::screen#0 -- pbuz1=pbuz2 + .label screen_10 = 6 + //SEG59 [26] (byte*~) fire::screen#10 ← (byte*) fire::screen#0 -- pbuz1=pbuz2 lda screen - sta screen_11 + sta screen_10 lda screen+1 - sta screen_11+1 + sta screen_10+1 //SEG60 [27] phi from fire to fire::@1 [phi:fire->fire::@1] b1_from_fire: - //SEG61 [27] phi (byte*) fire::screen#4 = (byte*~) fire::screen#11 [phi:fire->fire::@1#0] -- register_copy + //SEG61 [27] phi (byte*) fire::screen#4 = (byte*~) fire::screen#10 [phi:fire->fire::@1#0] -- register_copy //SEG62 [27] phi (byte*) fire::buffer#4 = (const byte*) BUFFER#0 [phi:fire->fire::@1#1] -- pbuz1=pbuc1 lda #fire::@6] b6_from_b3: - //SEG68 [30] phi (byte*) fire::screen#10 = (byte*) fire::screen#1 [phi:fire::@3->fire::@6#0] -- register_copy - //SEG69 [30] phi (byte*) fire::buffer#10 = (const byte*) BUFFER#0+(byte/signed byte/word/signed word/dword/signed dword) $18*(byte/signed byte/word/signed word/dword/signed dword) $28 [phi:fire::@3->fire::@6#1] -- pbuz1=pbuc1 + //SEG68 [30] phi (byte*) fire::screen#5 = (byte*) fire::screen#1 [phi:fire::@3->fire::@6#0] -- register_copy + //SEG69 [30] phi (byte*) fire::buffer#7 = (const byte*) BUFFER#0+(byte/signed byte/word/signed word/dword/signed dword) $18*(byte/signed byte/word/signed word/dword/signed dword) $28 [phi:fire::@3->fire::@6#1] -- pbuz1=pbuc1 lda #BUFFER+$18*$28 sta buffer+1 jmp b6 - //SEG70 fire::@6 + //SEG70 [30] phi from fire::@7 to fire::@6 [phi:fire::@7->fire::@6] + b6_from_b7: + //SEG71 [30] phi (byte*) fire::screen#5 = (byte*) fire::screen#3 [phi:fire::@7->fire::@6#0] -- register_copy + //SEG72 [30] phi (byte*) fire::buffer#7 = (byte*) fire::buffer#3 [phi:fire::@7->fire::@6#1] -- register_copy + jmp b6 + //SEG73 fire::@6 b6: - //SEG71 [31] if((byte*) fire::buffer#10!=(const byte*) BUFFER#0+(byte/signed byte/word/signed word/dword/signed dword) $19*(byte/signed byte/word/signed word/dword/signed dword) $28) goto fire::@7 -- pbuz1_neq_pbuc1_then_la1 - lda buffer+1 - cmp #>BUFFER+$19*$28 - bne b7_from_b6 - lda buffer - cmp #fire::@7] - b7_from_b6: - jmp b7 - //SEG75 fire::@7 - b7: - //SEG76 [34] call sid_rnd + //SEG74 [31] call sid_rnd jsr sid_rnd - //SEG77 [35] (byte) sid_rnd::return#2 ← (byte) sid_rnd::return#0 - jmp b8 - //SEG78 fire::@8 - b8: - //SEG79 [36] (byte~) fire::$18 ← (byte) sid_rnd::return#2 - //SEG80 [37] (byte~) fire::$19 ← (byte~) fire::$18 >> (byte/signed byte/word/signed word/dword/signed dword) 4 -- vbuaa=vbuaa_ror_4 + //SEG75 [32] (byte) sid_rnd::return#2 ← (byte) sid_rnd::return#0 + jmp b7 + //SEG76 fire::@7 + b7: + //SEG77 [33] (byte~) fire::$15 ← (byte) sid_rnd::return#2 + //SEG78 [34] (byte~) fire::$16 ← (byte~) fire::$15 >> (byte/signed byte/word/signed word/dword/signed dword) 4 -- vbuaa=vbuaa_ror_4 lsr lsr lsr lsr - //SEG81 [38] (byte/signed word/word/dword/signed dword~) fire::$20 ← (byte/signed byte/word/signed word/dword/signed dword) $30 + (byte~) fire::$19 -- vbuaa=vbuc1_plus_vbuaa + //SEG79 [35] (byte/signed word/word/dword/signed dword~) fire::$17 ← (byte/signed byte/word/signed word/dword/signed dword) $30 + (byte~) fire::$16 -- vbuaa=vbuc1_plus_vbuaa clc adc #$30 - //SEG82 [39] *((byte*) fire::buffer#10) ← (byte/signed word/word/dword/signed dword~) fire::$20 -- _deref_pbuz1=vbuaa + //SEG80 [36] *((byte*) fire::buffer#7) ← (byte/signed word/word/dword/signed dword~) fire::$17 -- _deref_pbuz1=vbuaa ldy #0 sta (buffer),y - //SEG83 [40] *((byte*) fire::screen#10) ← *((byte*) fire::buffer#10) -- _deref_pbuz1=_deref_pbuz2 + //SEG81 [37] *((byte*) fire::screen#5) ← *((byte*) fire::buffer#7) -- _deref_pbuz1=_deref_pbuz2 ldy #0 lda (buffer),y ldy #0 sta (screen),y - //SEG84 [41] (byte*) fire::screen#3 ← ++ (byte*) fire::screen#10 -- pbuz1=_inc_pbuz1 + //SEG82 [38] (byte*) fire::screen#3 ← ++ (byte*) fire::screen#5 -- pbuz1=_inc_pbuz1 inc screen bne !+ inc screen+1 !: - //SEG85 [42] (byte*) fire::buffer#3 ← ++ (byte*) fire::buffer#10 -- pbuz1=_inc_pbuz1 + //SEG83 [39] (byte*) fire::buffer#3 ← ++ (byte*) fire::buffer#7 -- pbuz1=_inc_pbuz1 inc buffer bne !+ inc buffer+1 !: - //SEG86 [30] phi from fire::@8 to fire::@6 [phi:fire::@8->fire::@6] - b6_from_b8: - //SEG87 [30] phi (byte*) fire::screen#10 = (byte*) fire::screen#3 [phi:fire::@8->fire::@6#0] -- register_copy - //SEG88 [30] phi (byte*) fire::buffer#10 = (byte*) fire::buffer#3 [phi:fire::@8->fire::@6#1] -- register_copy - jmp b6 - //SEG89 fire::@2 + //SEG84 [40] if((byte*) fire::buffer#3!=(const byte*) BUFFER#0+(byte/signed byte/word/signed word/dword/signed dword) $19*(byte/signed byte/word/signed word/dword/signed dword) $28) goto fire::@6 -- pbuz1_neq_pbuc1_then_la1 + lda buffer+1 + cmp #>BUFFER+$19*$28 + bne b6_from_b7 + lda buffer + cmp #> (byte/signed byte/word/signed word/dword/signed dword) 2 -- vbuaa=vbuaa_ror_2 + //SEG91 [45] (byte) fire::c#0 ← (byte~) fire::$11 >> (byte/signed byte/word/signed word/dword/signed dword) 2 -- vbuaa=vbuaa_ror_2 lsr lsr - //SEG94 [47] if((byte) fire::c#0<(byte/signed byte/word/signed word/dword/signed dword) 2+(byte/signed byte/word/signed word/dword/signed dword) 1) goto fire::@4 -- vbuaa_lt_vbuc1_then_la1 + //SEG92 [46] if((byte) fire::c#0<(byte/signed byte/word/signed word/dword/signed dword) 2+(byte/signed byte/word/signed word/dword/signed dword) 1) goto fire::@4 -- vbuaa_lt_vbuc1_then_la1 cmp #2+1 bcc b4_from_b2 jmp b5 - //SEG95 fire::@5 + //SEG93 fire::@5 b5: - //SEG96 [48] (byte) fire::c#1 ← (byte) fire::c#0 - (byte/signed byte/word/signed word/dword/signed dword) 3 -- vbuaa=vbuaa_minus_vbuc1 + //SEG94 [47] (byte) fire::c#1 ← (byte) fire::c#0 - (byte/signed byte/word/signed word/dword/signed dword) 3 -- vbuaa=vbuaa_minus_vbuc1 sec sbc #3 - //SEG97 [49] phi from fire::@2 fire::@5 to fire::@4 [phi:fire::@2/fire::@5->fire::@4] + //SEG95 [48] phi from fire::@2 fire::@5 to fire::@4 [phi:fire::@2/fire::@5->fire::@4] b4_from_b2: b4_from_b5: - //SEG98 [49] phi (byte) fire::c#2 = (byte) fire::c#0 [phi:fire::@2/fire::@5->fire::@4#0] -- register_copy + //SEG96 [48] phi (byte) fire::c#2 = (byte) fire::c#0 [phi:fire::@2/fire::@5->fire::@4#0] -- register_copy jmp b4 - //SEG99 fire::@4 + //SEG97 fire::@4 b4: - //SEG100 [50] *((byte*) fire::buffer#4) ← (byte) fire::c#2 -- _deref_pbuz1=vbuaa + //SEG98 [49] *((byte*) fire::buffer#4) ← (byte) fire::c#2 -- _deref_pbuz1=vbuaa ldy #0 sta (buffer),y - //SEG101 [51] *((byte*) fire::screen#4) ← *((byte*) fire::buffer#4) -- _deref_pbuz1=_deref_pbuz2 + //SEG99 [50] *((byte*) fire::screen#4) ← *((byte*) fire::buffer#4) -- _deref_pbuz1=_deref_pbuz2 ldy #0 lda (buffer),y ldy #0 sta (screen_4),y - //SEG102 [52] (byte*) fire::screen#2 ← ++ (byte*) fire::screen#4 -- pbuz1=_inc_pbuz1 + //SEG100 [51] (byte*) fire::screen#2 ← ++ (byte*) fire::screen#4 -- pbuz1=_inc_pbuz1 inc screen_2 bne !+ inc screen_2+1 !: - //SEG103 [53] (byte*) fire::buffer#2 ← ++ (byte*) fire::buffer#4 -- pbuz1=_inc_pbuz1 + //SEG101 [52] (byte*) fire::buffer#2 ← ++ (byte*) fire::buffer#4 -- pbuz1=_inc_pbuz1 inc buffer bne !+ inc buffer+1 !: - //SEG104 [27] phi from fire::@4 to fire::@1 [phi:fire::@4->fire::@1] + //SEG102 [27] phi from fire::@4 to fire::@1 [phi:fire::@4->fire::@1] b1_from_b4: - //SEG105 [27] phi (byte*) fire::screen#4 = (byte*) fire::screen#2 [phi:fire::@4->fire::@1#0] -- register_copy - //SEG106 [27] phi (byte*) fire::buffer#4 = (byte*) fire::buffer#2 [phi:fire::@4->fire::@1#1] -- register_copy + //SEG103 [27] phi (byte*) fire::screen#4 = (byte*) fire::screen#2 [phi:fire::@4->fire::@1#0] -- register_copy + //SEG104 [27] phi (byte*) fire::buffer#4 = (byte*) fire::buffer#2 [phi:fire::@4->fire::@1#1] -- register_copy jmp b1 } -//SEG107 sid_rnd +//SEG105 sid_rnd // Get a random number from the SID voice 3, // Must be initialized with sid_rnd_init() sid_rnd: { - //SEG108 [54] (byte) sid_rnd::return#0 ← *((const byte*) SID_VOICE3_OSC#0) -- vbuaa=_deref_pbuc1 + //SEG106 [53] (byte) sid_rnd::return#0 ← *((const byte*) SID_VOICE3_OSC#0) -- vbuaa=_deref_pbuc1 lda SID_VOICE3_OSC jmp breturn - //SEG109 sid_rnd::@return + //SEG107 sid_rnd::@return breturn: - //SEG110 [55] return + //SEG108 [54] return rts } -//SEG111 makecharset +//SEG109 makecharset // Make a fire-friendly charset in chars $00-$3f of the passed charset makecharset: { .label _13 = $b @@ -2651,169 +2630,169 @@ makecharset: { .label ii = $a .label i = 9 .label c = 8 - //SEG112 [57] phi from makecharset to makecharset::@1 [phi:makecharset->makecharset::@1] + //SEG110 [56] phi from makecharset to makecharset::@1 [phi:makecharset->makecharset::@1] b1_from_makecharset: - //SEG113 [57] phi (byte*) makecharset::font#2 = (const byte*) CHARSET#0 [phi:makecharset->makecharset::@1#0] -- pbuz1=pbuc1 + //SEG111 [56] phi (byte*) makecharset::font#2 = (const byte*) CHARSET#0 [phi:makecharset->makecharset::@1#0] -- pbuz1=pbuc1 lda #CHARSET sta font+1 jmp b1 - //SEG114 [57] phi from makecharset::@1 to makecharset::@1 [phi:makecharset::@1->makecharset::@1] + //SEG112 [56] phi from makecharset::@1 to makecharset::@1 [phi:makecharset::@1->makecharset::@1] b1_from_b1: - //SEG115 [57] phi (byte*) makecharset::font#2 = (byte*) makecharset::font#1 [phi:makecharset::@1->makecharset::@1#0] -- register_copy + //SEG113 [56] phi (byte*) makecharset::font#2 = (byte*) makecharset::font#1 [phi:makecharset::@1->makecharset::@1#0] -- register_copy jmp b1 - //SEG116 makecharset::@1 + //SEG114 makecharset::@1 b1: - //SEG117 [58] *((byte*) makecharset::font#2) ← (byte/signed byte/word/signed word/dword/signed dword) 0 -- _deref_pbuz1=vbuc1 + //SEG115 [57] *((byte*) makecharset::font#2) ← (byte/signed byte/word/signed word/dword/signed dword) 0 -- _deref_pbuz1=vbuc1 lda #0 ldy #0 sta (font),y - //SEG118 [59] (byte*) makecharset::font#1 ← ++ (byte*) makecharset::font#2 -- pbuz1=_inc_pbuz1 + //SEG116 [58] (byte*) makecharset::font#1 ← ++ (byte*) makecharset::font#2 -- pbuz1=_inc_pbuz1 inc font bne !+ inc font+1 !: - //SEG119 [60] if((byte*) makecharset::font#1!=(const byte*) CHARSET#0+(byte/signed byte/word/signed word/dword/signed dword) 1*(byte/signed byte/word/signed word/dword/signed dword) 8) goto makecharset::@1 -- pbuz1_neq_pbuc1_then_la1 + //SEG117 [59] if((byte*) makecharset::font#1!=(const byte*) CHARSET#0+(byte/signed byte/word/signed word/dword/signed dword) 1*(byte/signed byte/word/signed word/dword/signed dword) 8) goto makecharset::@1 -- pbuz1_neq_pbuc1_then_la1 lda font+1 cmp #>CHARSET+1*8 bne b1_from_b1 lda font cmp #makecharset::@2] + //SEG118 [60] phi from makecharset::@1 to makecharset::@2 [phi:makecharset::@1->makecharset::@2] b2_from_b1: - //SEG121 [61] phi (byte*) makecharset::font1#2 = (const byte*) CHARSET#0+(byte/signed byte/word/signed word/dword/signed dword) $40*(byte/signed byte/word/signed word/dword/signed dword) 8 [phi:makecharset::@1->makecharset::@2#0] -- pbuz1=pbuc1 + //SEG119 [60] phi (byte*) makecharset::font1#2 = (const byte*) CHARSET#0+(byte/signed byte/word/signed word/dword/signed dword) $40*(byte/signed byte/word/signed word/dword/signed dword) 8 [phi:makecharset::@1->makecharset::@2#0] -- pbuz1=pbuc1 lda #CHARSET+$40*8 sta font1+1 jmp b2 - //SEG122 [61] phi from makecharset::@2 to makecharset::@2 [phi:makecharset::@2->makecharset::@2] + //SEG120 [60] phi from makecharset::@2 to makecharset::@2 [phi:makecharset::@2->makecharset::@2] b2_from_b2: - //SEG123 [61] phi (byte*) makecharset::font1#2 = (byte*) makecharset::font1#1 [phi:makecharset::@2->makecharset::@2#0] -- register_copy + //SEG121 [60] phi (byte*) makecharset::font1#2 = (byte*) makecharset::font1#1 [phi:makecharset::@2->makecharset::@2#0] -- register_copy jmp b2 - //SEG124 makecharset::@2 + //SEG122 makecharset::@2 b2: - //SEG125 [62] *((byte*) makecharset::font1#2) ← (byte/word/signed word/dword/signed dword) $ff -- _deref_pbuz1=vbuc1 + //SEG123 [61] *((byte*) makecharset::font1#2) ← (byte/word/signed word/dword/signed dword) $ff -- _deref_pbuz1=vbuc1 lda #$ff ldy #0 sta (font1),y - //SEG126 [63] (byte*) makecharset::font1#1 ← ++ (byte*) makecharset::font1#2 -- pbuz1=_inc_pbuz1 + //SEG124 [62] (byte*) makecharset::font1#1 ← ++ (byte*) makecharset::font1#2 -- pbuz1=_inc_pbuz1 inc font1 bne !+ inc font1+1 !: - //SEG127 [64] if((byte*) makecharset::font1#1!=(const byte*) CHARSET#0+(word/signed word/dword/signed dword) $100*(byte/signed byte/word/signed word/dword/signed dword) 8) goto makecharset::@2 -- pbuz1_neq_pbuc1_then_la1 + //SEG125 [63] if((byte*) makecharset::font1#1!=(const byte*) CHARSET#0+(word/signed word/dword/signed dword) $100*(byte/signed byte/word/signed word/dword/signed dword) 8) goto makecharset::@2 -- pbuz1_neq_pbuc1_then_la1 lda font1+1 cmp #>CHARSET+$100*8 bne b2_from_b2 lda font1 cmp #makecharset::@3] + //SEG126 [64] phi from makecharset::@2 to makecharset::@3 [phi:makecharset::@2->makecharset::@3] b3_from_b2: - //SEG129 [65] phi (byte) makecharset::c#7 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:makecharset::@2->makecharset::@3#0] -- vbuz1=vbuc1 + //SEG127 [64] phi (byte) makecharset::c#7 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:makecharset::@2->makecharset::@3#0] -- vbuz1=vbuc1 lda #0 sta c jmp b3 - //SEG130 [65] phi from makecharset::@9 to makecharset::@3 [phi:makecharset::@9->makecharset::@3] + //SEG128 [64] phi from makecharset::@9 to makecharset::@3 [phi:makecharset::@9->makecharset::@3] b3_from_b9: - //SEG131 [65] phi (byte) makecharset::c#7 = (byte) makecharset::c#1 [phi:makecharset::@9->makecharset::@3#0] -- register_copy + //SEG129 [64] phi (byte) makecharset::c#7 = (byte) makecharset::c#1 [phi:makecharset::@9->makecharset::@3#0] -- register_copy jmp b3 - //SEG132 makecharset::@3 + //SEG130 makecharset::@3 b3: - //SEG133 [66] phi from makecharset::@3 to makecharset::@4 [phi:makecharset::@3->makecharset::@4] + //SEG131 [65] phi from makecharset::@3 to makecharset::@4 [phi:makecharset::@3->makecharset::@4] b4_from_b3: - //SEG134 [66] phi (byte) makecharset::i#6 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:makecharset::@3->makecharset::@4#0] -- vbuz1=vbuc1 + //SEG132 [65] phi (byte) makecharset::i#6 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:makecharset::@3->makecharset::@4#0] -- vbuz1=vbuc1 lda #0 sta i - //SEG135 [66] phi (byte) makecharset::bc#5 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:makecharset::@3->makecharset::@4#1] -- vbuxx=vbuc1 + //SEG133 [65] phi (byte) makecharset::bc#5 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:makecharset::@3->makecharset::@4#1] -- vbuxx=vbuc1 ldx #0 jmp b4 - //SEG136 [66] phi from makecharset::@8 to makecharset::@4 [phi:makecharset::@8->makecharset::@4] + //SEG134 [65] phi from makecharset::@8 to makecharset::@4 [phi:makecharset::@8->makecharset::@4] b4_from_b8: - //SEG137 [66] phi (byte) makecharset::i#6 = (byte) makecharset::i#1 [phi:makecharset::@8->makecharset::@4#0] -- register_copy - //SEG138 [66] phi (byte) makecharset::bc#5 = (byte) makecharset::bc#6 [phi:makecharset::@8->makecharset::@4#1] -- register_copy + //SEG135 [65] phi (byte) makecharset::i#6 = (byte) makecharset::i#1 [phi:makecharset::@8->makecharset::@4#0] -- register_copy + //SEG136 [65] phi (byte) makecharset::bc#5 = (byte) makecharset::bc#6 [phi:makecharset::@8->makecharset::@4#1] -- register_copy jmp b4 - //SEG139 makecharset::@4 + //SEG137 makecharset::@4 b4: - //SEG140 [67] phi from makecharset::@4 to makecharset::@5 [phi:makecharset::@4->makecharset::@5] + //SEG138 [66] phi from makecharset::@4 to makecharset::@5 [phi:makecharset::@4->makecharset::@5] b5_from_b4: - //SEG141 [67] phi (byte) makecharset::b#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:makecharset::@4->makecharset::@5#0] -- vbuyy=vbuc1 + //SEG139 [66] phi (byte) makecharset::b#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:makecharset::@4->makecharset::@5#0] -- vbuyy=vbuc1 ldy #0 - //SEG142 [67] phi (byte) makecharset::ii#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:makecharset::@4->makecharset::@5#1] -- vbuz1=vbuc1 + //SEG140 [66] phi (byte) makecharset::ii#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:makecharset::@4->makecharset::@5#1] -- vbuz1=vbuc1 lda #0 sta ii - //SEG143 [67] phi (byte) makecharset::bc#3 = (byte) makecharset::bc#5 [phi:makecharset::@4->makecharset::@5#2] -- register_copy + //SEG141 [66] phi (byte) makecharset::bc#3 = (byte) makecharset::bc#5 [phi:makecharset::@4->makecharset::@5#2] -- register_copy jmp b5 - //SEG144 [67] phi from makecharset::@6 to makecharset::@5 [phi:makecharset::@6->makecharset::@5] + //SEG142 [66] phi from makecharset::@6 to makecharset::@5 [phi:makecharset::@6->makecharset::@5] b5_from_b6: - //SEG145 [67] phi (byte) makecharset::b#2 = (byte) makecharset::b#3 [phi:makecharset::@6->makecharset::@5#0] -- register_copy - //SEG146 [67] phi (byte) makecharset::ii#2 = (byte) makecharset::ii#1 [phi:makecharset::@6->makecharset::@5#1] -- register_copy - //SEG147 [67] phi (byte) makecharset::bc#3 = (byte) makecharset::bc#6 [phi:makecharset::@6->makecharset::@5#2] -- register_copy + //SEG143 [66] phi (byte) makecharset::b#2 = (byte) makecharset::b#3 [phi:makecharset::@6->makecharset::@5#0] -- register_copy + //SEG144 [66] phi (byte) makecharset::ii#2 = (byte) makecharset::ii#1 [phi:makecharset::@6->makecharset::@5#1] -- register_copy + //SEG145 [66] phi (byte) makecharset::bc#3 = (byte) makecharset::bc#6 [phi:makecharset::@6->makecharset::@5#2] -- register_copy jmp b5 - //SEG148 makecharset::@5 + //SEG146 makecharset::@5 b5: - //SEG149 [68] (byte) makecharset::bc#1 ← (byte) makecharset::bc#3 + (byte) makecharset::c#7 -- vbuxx=vbuxx_plus_vbuz1 + //SEG147 [67] (byte) makecharset::bc#1 ← (byte) makecharset::bc#3 + (byte) makecharset::c#7 -- vbuxx=vbuxx_plus_vbuz1 txa clc adc c tax - //SEG150 [69] if((byte) makecharset::bc#1<(byte/signed byte/word/signed word/dword/signed dword) $3f+(byte/signed byte/word/signed word/dword/signed dword) 1) goto makecharset::@6 -- vbuxx_lt_vbuc1_then_la1 + //SEG148 [68] if((byte) makecharset::bc#1<(byte/signed byte/word/signed word/dword/signed dword) $3f+(byte/signed byte/word/signed word/dword/signed dword) 1) goto makecharset::@6 -- vbuxx_lt_vbuc1_then_la1 cpx #$3f+1 bcc b6_from_b5 jmp b7 - //SEG151 makecharset::@7 + //SEG149 makecharset::@7 b7: - //SEG152 [70] (byte) makecharset::bc#2 ← (byte) makecharset::bc#1 - (byte/signed byte/word/signed word/dword/signed dword) $40 -- vbuxx=vbuxx_minus_vbuc1 + //SEG150 [69] (byte) makecharset::bc#2 ← (byte) makecharset::bc#1 - (byte/signed byte/word/signed word/dword/signed dword) $40 -- vbuxx=vbuxx_minus_vbuc1 txa axs #$40 - //SEG153 [71] (byte~) makecharset::$11 ← (byte) makecharset::i#6 & (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuaa=vbuz1_band_vbuc1 + //SEG151 [70] (byte~) makecharset::$11 ← (byte) makecharset::i#6 & (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuaa=vbuz1_band_vbuc1 lda #1 and i - //SEG154 [72] (byte~) makecharset::$12 ← (byte) makecharset::ii#2 + (byte~) makecharset::$11 -- vbuaa=vbuz1_plus_vbuaa + //SEG152 [71] (byte~) makecharset::$12 ← (byte) makecharset::ii#2 + (byte~) makecharset::$11 -- vbuaa=vbuz1_plus_vbuaa clc adc ii - //SEG155 [73] (byte~) makecharset::$13 ← (byte~) makecharset::$12 & (byte/signed byte/word/signed word/dword/signed dword) 7 -- vbuz1=vbuaa_band_vbuc1 + //SEG153 [72] (byte~) makecharset::$13 ← (byte~) makecharset::$12 & (byte/signed byte/word/signed word/dword/signed dword) 7 -- vbuz1=vbuaa_band_vbuc1 and #7 sta _13 - //SEG156 [74] (byte) makecharset::b#1 ← (byte) makecharset::b#2 + *((const byte[8]) makecharset::bittab#0 + (byte~) makecharset::$13) -- vbuyy=vbuyy_plus_pbuc1_derefidx_vbuz1 + //SEG154 [73] (byte) makecharset::b#1 ← (byte) makecharset::b#2 + *((const byte[8]) makecharset::bittab#0 + (byte~) makecharset::$13) -- vbuyy=vbuyy_plus_pbuc1_derefidx_vbuz1 tya ldy _13 clc adc bittab,y tay - //SEG157 [75] phi from makecharset::@5 makecharset::@7 to makecharset::@6 [phi:makecharset::@5/makecharset::@7->makecharset::@6] + //SEG155 [74] phi from makecharset::@5 makecharset::@7 to makecharset::@6 [phi:makecharset::@5/makecharset::@7->makecharset::@6] b6_from_b5: b6_from_b7: - //SEG158 [75] phi (byte) makecharset::b#3 = (byte) makecharset::b#2 [phi:makecharset::@5/makecharset::@7->makecharset::@6#0] -- register_copy - //SEG159 [75] phi (byte) makecharset::bc#6 = (byte) makecharset::bc#1 [phi:makecharset::@5/makecharset::@7->makecharset::@6#1] -- register_copy + //SEG156 [74] phi (byte) makecharset::b#3 = (byte) makecharset::b#2 [phi:makecharset::@5/makecharset::@7->makecharset::@6#0] -- register_copy + //SEG157 [74] phi (byte) makecharset::bc#6 = (byte) makecharset::bc#1 [phi:makecharset::@5/makecharset::@7->makecharset::@6#1] -- register_copy jmp b6 - //SEG160 makecharset::@6 + //SEG158 makecharset::@6 b6: - //SEG161 [76] (byte) makecharset::ii#1 ← ++ (byte) makecharset::ii#2 -- vbuz1=_inc_vbuz1 + //SEG159 [75] (byte) makecharset::ii#1 ← ++ (byte) makecharset::ii#2 -- vbuz1=_inc_vbuz1 inc ii - //SEG162 [77] if((byte) makecharset::ii#1<(byte/signed byte/word/signed word/dword/signed dword) 8) goto makecharset::@5 -- vbuz1_lt_vbuc1_then_la1 + //SEG160 [76] if((byte) makecharset::ii#1<(byte/signed byte/word/signed word/dword/signed dword) 8) goto makecharset::@5 -- vbuz1_lt_vbuc1_then_la1 lda ii cmp #8 bcc b5_from_b6 jmp b8 - //SEG163 makecharset::@8 + //SEG161 makecharset::@8 b8: - //SEG164 [78] (word~) makecharset::$17 ← ((word)) (byte) makecharset::c#7 -- vwuz1=_word_vbuz2 + //SEG162 [77] (word~) makecharset::$17 ← ((word)) (byte) makecharset::c#7 -- vwuz1=_word_vbuz2 lda c sta _17 lda #0 sta _17+1 - //SEG165 [79] (word~) makecharset::$18 ← (word~) makecharset::$17 << (byte/signed byte/word/signed word/dword/signed dword) 3 -- vwuz1=vwuz1_rol_3 + //SEG163 [78] (word~) makecharset::$18 ← (word~) makecharset::$17 << (byte/signed byte/word/signed word/dword/signed dword) 3 -- vwuz1=vwuz1_rol_3 asl _18 rol _18+1 asl _18 rol _18+1 asl _18 rol _18+1 - //SEG166 [80] (word~) makecharset::$19 ← (word~) makecharset::$18 + (byte) makecharset::i#6 -- vwuz1=vwuz1_plus_vbuz2 + //SEG164 [79] (word~) makecharset::$19 ← (word~) makecharset::$18 + (byte) makecharset::i#6 -- vwuz1=vwuz1_plus_vbuz2 lda i clc adc _19 @@ -2821,7 +2800,7 @@ makecharset: { bcc !+ inc _19+1 !: - //SEG167 [81] *((const byte*) CHARSET#0+(byte/signed byte/word/signed word/dword/signed dword) 1*(byte/signed byte/word/signed word/dword/signed dword) 8 + (word~) makecharset::$19) ← (byte) makecharset::b#3 -- pbuc1_derefidx_vwuz1=vbuyy + //SEG165 [80] *((const byte*) CHARSET#0+(byte/signed byte/word/signed word/dword/signed dword) 1*(byte/signed byte/word/signed word/dword/signed dword) 8 + (word~) makecharset::$19) ← (byte) makecharset::b#3 -- pbuc1_derefidx_vwuz1=vbuyy tya sta !v++1 lda #$ffff sta SID_VOICE3_FREQ+1 - //SEG177 [88] *((const byte*) SID_VOICE3_CONTROL#0) ← (const byte) SID_CONTROL_NOISE#0 -- _deref_pbuc1=vbuc2 + //SEG175 [87] *((const byte*) SID_VOICE3_CONTROL#0) ← (const byte) SID_CONTROL_NOISE#0 -- _deref_pbuc1=vbuc2 lda #SID_CONTROL_NOISE sta SID_VOICE3_CONTROL jmp breturn - //SEG178 sid_rnd_init::@return + //SEG176 sid_rnd_init::@return breturn: - //SEG179 [89] return + //SEG177 [88] return rts } -//SEG180 fillscreen +//SEG178 fillscreen // Fill a screen (1000 bytes) with a specific byte // fillscreen(byte* zeropage(2) screen, byte register(X) fill) fillscreen: { .label screen = 2 .label i = 4 - //SEG181 [91] phi from fillscreen to fillscreen::@1 [phi:fillscreen->fillscreen::@1] + //SEG179 [90] phi from fillscreen to fillscreen::@1 [phi:fillscreen->fillscreen::@1] b1_from_fillscreen: - //SEG182 [91] phi (word) fillscreen::i#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:fillscreen->fillscreen::@1#0] -- vwuz1=vbuc1 + //SEG180 [90] phi (word) fillscreen::i#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:fillscreen->fillscreen::@1#0] -- vwuz1=vbuc1 lda #0 sta i lda #0 sta i+1 - //SEG183 [91] phi (byte*) fillscreen::screen#5 = (byte*) fillscreen::screen#6 [phi:fillscreen->fillscreen::@1#1] -- register_copy + //SEG181 [90] phi (byte*) fillscreen::screen#5 = (byte*) fillscreen::screen#6 [phi:fillscreen->fillscreen::@1#1] -- register_copy jmp b1 - //SEG184 [91] phi from fillscreen::@1 to fillscreen::@1 [phi:fillscreen::@1->fillscreen::@1] + //SEG182 [90] phi from fillscreen::@1 to fillscreen::@1 [phi:fillscreen::@1->fillscreen::@1] b1_from_b1: - //SEG185 [91] phi (word) fillscreen::i#2 = (word) fillscreen::i#1 [phi:fillscreen::@1->fillscreen::@1#0] -- register_copy - //SEG186 [91] phi (byte*) fillscreen::screen#5 = (byte*) fillscreen::screen#4 [phi:fillscreen::@1->fillscreen::@1#1] -- register_copy + //SEG183 [90] phi (word) fillscreen::i#2 = (word) fillscreen::i#1 [phi:fillscreen::@1->fillscreen::@1#0] -- register_copy + //SEG184 [90] phi (byte*) fillscreen::screen#5 = (byte*) fillscreen::screen#4 [phi:fillscreen::@1->fillscreen::@1#1] -- register_copy jmp b1 - //SEG187 fillscreen::@1 + //SEG185 fillscreen::@1 b1: - //SEG188 [92] *((byte*) fillscreen::screen#5) ← (byte) fillscreen::fill#5 -- _deref_pbuz1=vbuxx + //SEG186 [91] *((byte*) fillscreen::screen#5) ← (byte) fillscreen::fill#5 -- _deref_pbuz1=vbuxx txa ldy #0 sta (screen),y - //SEG189 [93] (byte*) fillscreen::screen#4 ← ++ (byte*) fillscreen::screen#5 -- pbuz1=_inc_pbuz1 + //SEG187 [92] (byte*) fillscreen::screen#4 ← ++ (byte*) fillscreen::screen#5 -- pbuz1=_inc_pbuz1 inc screen bne !+ inc screen+1 !: - //SEG190 [94] (word) fillscreen::i#1 ← ++ (word) fillscreen::i#2 -- vwuz1=_inc_vwuz1 + //SEG188 [93] (word) fillscreen::i#1 ← ++ (word) fillscreen::i#2 -- vwuz1=_inc_vwuz1 inc i bne !+ inc i+1 !: - //SEG191 [95] if((word) fillscreen::i#1!=(word/signed word/dword/signed dword) $3e8) goto fillscreen::@1 -- vwuz1_neq_vwuc1_then_la1 + //SEG189 [94] if((word) fillscreen::i#1!=(word/signed word/dword/signed dword) $3e8) goto fillscreen::@1 -- vwuz1_neq_vwuc1_then_la1 lda i+1 cmp #>$3e8 bne b1_from_b1 @@ -2918,9 +2897,9 @@ fillscreen: { cmp #<$3e8 bne b1_from_b1 jmp breturn - //SEG192 fillscreen::@return + //SEG190 fillscreen::@return breturn: - //SEG193 [96] return + //SEG191 [95] return rts } @@ -2940,9 +2919,8 @@ Removing instruction jmp b3 Removing instruction jmp b1 Removing instruction jmp b3 Removing instruction jmp b6 -Removing instruction jmp breturn Removing instruction jmp b7 -Removing instruction jmp b8 +Removing instruction jmp breturn Removing instruction jmp b5 Removing instruction jmp b4 Removing instruction jmp breturn @@ -2972,8 +2950,8 @@ Replacing instruction lda #0 with TYA Removing instruction lda #0 Succesful ASM optimization Pass5UnnecesaryLoadElimination Replacing label b1_from_b3 with b1 -Replacing label b7_from_b6 with b7 -Replacing label b7_from_b6 with b7 +Replacing label b6_from_b7 with b6 +Replacing label b6_from_b7 with b6 Replacing label b4_from_b2 with b4 Replacing label b1_from_b1 with b1 Replacing label b1_from_b1 with b1 @@ -3004,7 +2982,7 @@ Removing instruction toD0181_from_b1: Removing instruction toD0181: Removing instruction toD0182_from_b2: Removing instruction toD0182: -Removing instruction b7_from_b6: +Removing instruction b6_from_b7: Removing instruction b4_from_b2: Removing instruction b4_from_b5: Removing instruction b1_from_b1: @@ -3031,9 +3009,8 @@ Removing instruction b3: Removing instruction b1_from_fire: Removing instruction b3: Removing instruction b6_from_b3: +Removing instruction b7: Removing instruction breturn: -Removing instruction b8: -Removing instruction b6_from_b8: Removing instruction b5: Removing instruction b1_from_b4: Removing instruction breturn: @@ -3051,6 +3028,7 @@ Succesful ASM optimization Pass5UnusedLabelElimination Updating BasicUpstart to call main directly Removing instruction jsr main Succesful ASM optimization Pass5SkipBegin +Removing instruction jmp b6 Removing instruction jmp b1 Removing instruction jmp b2 Removing instruction jmp b3 @@ -3108,9 +3086,9 @@ FINAL SYMBOL TABLE (void()) fire((byte*) fire::screenbase) (byte~) fire::$10 reg byte a 202.0 (byte~) fire::$11 reg byte a 202.0 -(byte~) fire::$18 reg byte a 202.0 -(byte~) fire::$19 reg byte a 202.0 -(byte/signed word/word/dword/signed dword~) fire::$20 reg byte a 202.0 +(byte~) fire::$15 reg byte a 202.0 +(byte~) fire::$16 reg byte a 202.0 +(byte/signed word/word/dword/signed dword~) fire::$17 reg byte a 202.0 (byte~) fire::$9 reg byte a 202.0 (label) fire::@1 (label) fire::@2 @@ -3119,13 +3097,12 @@ FINAL SYMBOL TABLE (label) fire::@5 (label) fire::@6 (label) fire::@7 -(label) fire::@8 (label) fire::@return (byte*) fire::buffer -(byte*) fire::buffer#10 buffer zp ZP_WORD:4 45.90909090909091 (byte*) fire::buffer#2 buffer zp ZP_WORD:4 202.0 -(byte*) fire::buffer#3 buffer zp ZP_WORD:4 202.0 +(byte*) fire::buffer#3 buffer zp ZP_WORD:4 151.5 (byte*) fire::buffer#4 buffer zp ZP_WORD:4 75.75 +(byte*) fire::buffer#7 buffer zp ZP_WORD:4 44.888888888888886 (byte) fire::c (byte) fire::c#0 reg byte a 202.0 (byte) fire::c#1 reg byte a 202.0 @@ -3133,11 +3110,11 @@ FINAL SYMBOL TABLE (byte*) fire::screen (byte*) fire::screen#0 screen zp ZP_WORD:2 0.26666666666666666 (byte*) fire::screen#1 screen zp ZP_WORD:2 4.0 -(byte*) fire::screen#10 screen zp ZP_WORD:2 30.5 -(byte*~) fire::screen#11 screen#11 zp ZP_WORD:6 4.0 +(byte*~) fire::screen#10 screen#10 zp ZP_WORD:6 4.0 (byte*) fire::screen#2 screen#2 zp ZP_WORD:6 101.0 -(byte*) fire::screen#3 screen zp ZP_WORD:2 101.0 +(byte*) fire::screen#3 screen zp ZP_WORD:2 67.33333333333333 (byte*) fire::screen#4 screen#4 zp ZP_WORD:6 27.727272727272727 +(byte*) fire::screen#5 screen zp ZP_WORD:2 38.125 (byte*) fire::screenbase (void()) main() (label) main::@1 @@ -3229,9 +3206,9 @@ FINAL SYMBOL TABLE (void()) sid_rnd_init() (label) sid_rnd_init::@return -zp ZP_WORD:2 [ fire::screen#0 fire::screen#10 fire::screen#3 fire::screen#1 makecharset::font#2 makecharset::font#1 makecharset::font1#2 makecharset::font1#1 fillscreen::screen#5 fillscreen::screen#6 fillscreen::screen#4 makecharset::$17 makecharset::$18 makecharset::$19 ] -zp ZP_WORD:4 [ fire::buffer#4 fire::buffer#2 fire::buffer#10 fire::buffer#3 fillscreen::i#2 fillscreen::i#1 ] -zp ZP_WORD:6 [ fire::screen#4 fire::screen#11 fire::screen#2 ] +zp ZP_WORD:2 [ fire::screen#0 fire::screen#5 fire::screen#3 fire::screen#1 makecharset::font#2 makecharset::font#1 makecharset::font1#2 makecharset::font1#1 fillscreen::screen#5 fillscreen::screen#6 fillscreen::screen#4 makecharset::$17 makecharset::$18 makecharset::$19 ] +zp ZP_WORD:4 [ fire::buffer#4 fire::buffer#2 fire::buffer#7 fire::buffer#3 fillscreen::i#2 fillscreen::i#1 ] +zp ZP_WORD:6 [ fire::screen#4 fire::screen#10 fire::screen#2 ] reg byte a [ fire::c#2 fire::c#0 fire::c#1 ] zp ZP_BYTE:8 [ makecharset::c#7 makecharset::c#1 ] zp ZP_BYTE:9 [ makecharset::i#6 makecharset::i#1 ] @@ -3240,9 +3217,9 @@ zp ZP_BYTE:10 [ makecharset::ii#2 makecharset::ii#1 ] reg byte y [ makecharset::b#2 makecharset::b#3 makecharset::b#1 ] reg byte x [ fillscreen::fill#5 ] reg byte a [ sid_rnd::return#2 ] -reg byte a [ fire::$18 ] -reg byte a [ fire::$19 ] -reg byte a [ fire::$20 ] +reg byte a [ fire::$15 ] +reg byte a [ fire::$16 ] +reg byte a [ fire::$17 ] reg byte a [ fire::$9 ] reg byte a [ fire::$10 ] reg byte a [ fire::$11 ] @@ -3253,7 +3230,7 @@ zp ZP_BYTE:11 [ makecharset::$13 ] FINAL ASSEMBLER -Score: 99615 +Score: 99315 //SEG0 File Comments // A KickC version of the fire routine from the CC65 samples @@ -3301,49 +3278,49 @@ main: { //SEG12 [6] *((const byte*) BGCOL#0) ← (const byte) BLACK#0 -- _deref_pbuc1=vbuc2 sta BGCOL //SEG13 [7] call fillscreen - //SEG14 [90] phi from main to fillscreen [phi:main->fillscreen] - //SEG15 [90] phi (byte*) fillscreen::screen#6 = (const byte*) BUFFER#0 [phi:main->fillscreen#0] -- pbuz1=pbuc1 + //SEG14 [89] phi from main to fillscreen [phi:main->fillscreen] + //SEG15 [89] phi (byte*) fillscreen::screen#6 = (const byte*) BUFFER#0 [phi:main->fillscreen#0] -- pbuz1=pbuc1 lda #BUFFER sta fillscreen.screen+1 - //SEG16 [90] phi (byte) fillscreen::fill#5 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main->fillscreen#1] -- vbuxx=vbuc1 + //SEG16 [89] phi (byte) fillscreen::fill#5 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main->fillscreen#1] -- vbuxx=vbuc1 ldx #0 jsr fillscreen //SEG17 [8] phi from main to main::@4 [phi:main->main::@4] //SEG18 main::@4 //SEG19 [9] call fillscreen - //SEG20 [90] phi from main::@4 to fillscreen [phi:main::@4->fillscreen] - //SEG21 [90] phi (byte*) fillscreen::screen#6 = (const byte*) SCREEN1#0 [phi:main::@4->fillscreen#0] -- pbuz1=pbuc1 + //SEG20 [89] phi from main::@4 to fillscreen [phi:main::@4->fillscreen] + //SEG21 [89] phi (byte*) fillscreen::screen#6 = (const byte*) SCREEN1#0 [phi:main::@4->fillscreen#0] -- pbuz1=pbuc1 lda #SCREEN1 sta fillscreen.screen+1 - //SEG22 [90] phi (byte) fillscreen::fill#5 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@4->fillscreen#1] -- vbuxx=vbuc1 + //SEG22 [89] phi (byte) fillscreen::fill#5 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@4->fillscreen#1] -- vbuxx=vbuc1 ldx #0 jsr fillscreen //SEG23 [10] phi from main::@4 to main::@5 [phi:main::@4->main::@5] //SEG24 main::@5 //SEG25 [11] call fillscreen - //SEG26 [90] phi from main::@5 to fillscreen [phi:main::@5->fillscreen] - //SEG27 [90] phi (byte*) fillscreen::screen#6 = (const byte*) SCREEN2#0 [phi:main::@5->fillscreen#0] -- pbuz1=pbuc1 + //SEG26 [89] phi from main::@5 to fillscreen [phi:main::@5->fillscreen] + //SEG27 [89] phi (byte*) fillscreen::screen#6 = (const byte*) SCREEN2#0 [phi:main::@5->fillscreen#0] -- pbuz1=pbuc1 lda #SCREEN2 sta fillscreen.screen+1 - //SEG28 [90] phi (byte) fillscreen::fill#5 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@5->fillscreen#1] -- vbuxx=vbuc1 + //SEG28 [89] phi (byte) fillscreen::fill#5 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@5->fillscreen#1] -- vbuxx=vbuc1 ldx #0 jsr fillscreen //SEG29 [12] phi from main::@5 to main::@6 [phi:main::@5->main::@6] //SEG30 main::@6 //SEG31 [13] call fillscreen - //SEG32 [90] phi from main::@6 to fillscreen [phi:main::@6->fillscreen] - //SEG33 [90] phi (byte*) fillscreen::screen#6 = (const byte*) COLS#0 [phi:main::@6->fillscreen#0] -- pbuz1=pbuc1 + //SEG32 [89] phi from main::@6 to fillscreen [phi:main::@6->fillscreen] + //SEG33 [89] phi (byte*) fillscreen::screen#6 = (const byte*) COLS#0 [phi:main::@6->fillscreen#0] -- pbuz1=pbuc1 lda #COLS sta fillscreen.screen+1 - //SEG34 [90] phi (byte) fillscreen::fill#5 = (const byte) YELLOW#0 [phi:main::@6->fillscreen#1] -- vbuxx=vbuc1 + //SEG34 [89] phi (byte) fillscreen::fill#5 = (const byte) YELLOW#0 [phi:main::@6->fillscreen#1] -- vbuxx=vbuc1 ldx #YELLOW jsr fillscreen //SEG35 [14] phi from main::@6 to main::@7 [phi:main::@6->main::@7] @@ -3353,7 +3330,7 @@ main: { //SEG38 [16] phi from main::@7 to main::@8 [phi:main::@7->main::@8] //SEG39 main::@8 //SEG40 [17] call makecharset - //SEG41 [56] phi from main::@8 to makecharset [phi:main::@8->makecharset] + //SEG41 [55] phi from main::@8 to makecharset [phi:main::@8->makecharset] jsr makecharset //SEG42 [18] phi from main::@3 main::@8 to main::@1 [phi:main::@3/main::@8->main::@1] //SEG43 main::@1 @@ -3389,20 +3366,20 @@ main: { jmp b1 } //SEG58 fire -// Animate the fire on the passe screen. Uses BUFFER to store the current values. +// Animate the fire on the passed screen. Uses BUFFER to store the current values. fire: { .label screen = 2 .label screen_2 = 6 .label buffer = 4 .label screen_4 = 6 - .label screen_11 = 6 - //SEG59 [26] (byte*~) fire::screen#11 ← (byte*) fire::screen#0 -- pbuz1=pbuz2 + .label screen_10 = 6 + //SEG59 [26] (byte*~) fire::screen#10 ← (byte*) fire::screen#0 -- pbuz1=pbuz2 lda screen - sta screen_11 + sta screen_10 lda screen+1 - sta screen_11+1 + sta screen_10+1 //SEG60 [27] phi from fire to fire::@1 [phi:fire->fire::@1] - //SEG61 [27] phi (byte*) fire::screen#4 = (byte*~) fire::screen#11 [phi:fire->fire::@1#0] -- register_copy + //SEG61 [27] phi (byte*) fire::screen#4 = (byte*~) fire::screen#10 [phi:fire->fire::@1#0] -- register_copy //SEG62 [27] phi (byte*) fire::buffer#4 = (const byte*) BUFFER#0 [phi:fire->fire::@1#1] -- pbuz1=pbuc1 lda #$18*$28 sta screen+1 //SEG67 [30] phi from fire::@3 to fire::@6 [phi:fire::@3->fire::@6] - //SEG68 [30] phi (byte*) fire::screen#10 = (byte*) fire::screen#1 [phi:fire::@3->fire::@6#0] -- register_copy - //SEG69 [30] phi (byte*) fire::buffer#10 = (const byte*) BUFFER#0+(byte/signed byte/word/signed word/dword/signed dword) $18*(byte/signed byte/word/signed word/dword/signed dword) $28 [phi:fire::@3->fire::@6#1] -- pbuz1=pbuc1 + //SEG68 [30] phi (byte*) fire::screen#5 = (byte*) fire::screen#1 [phi:fire::@3->fire::@6#0] -- register_copy + //SEG69 [30] phi (byte*) fire::buffer#7 = (const byte*) BUFFER#0+(byte/signed byte/word/signed word/dword/signed dword) $18*(byte/signed byte/word/signed word/dword/signed dword) $28 [phi:fire::@3->fire::@6#1] -- pbuz1=pbuc1 lda #BUFFER+$18*$28 sta buffer+1 - //SEG70 fire::@6 + //SEG70 [30] phi from fire::@7 to fire::@6 [phi:fire::@7->fire::@6] + //SEG71 [30] phi (byte*) fire::screen#5 = (byte*) fire::screen#3 [phi:fire::@7->fire::@6#0] -- register_copy + //SEG72 [30] phi (byte*) fire::buffer#7 = (byte*) fire::buffer#3 [phi:fire::@7->fire::@6#1] -- register_copy + //SEG73 fire::@6 b6: - //SEG71 [31] if((byte*) fire::buffer#10!=(const byte*) BUFFER#0+(byte/signed byte/word/signed word/dword/signed dword) $19*(byte/signed byte/word/signed word/dword/signed dword) $28) goto fire::@7 -- pbuz1_neq_pbuc1_then_la1 - lda buffer+1 - cmp #>BUFFER+$19*$28 - bne b7 - lda buffer - cmp #fire::@7] - //SEG75 fire::@7 - b7: - //SEG76 [34] call sid_rnd + //SEG74 [31] call sid_rnd jsr sid_rnd - //SEG77 [35] (byte) sid_rnd::return#2 ← (byte) sid_rnd::return#0 - //SEG78 fire::@8 - //SEG79 [36] (byte~) fire::$18 ← (byte) sid_rnd::return#2 - //SEG80 [37] (byte~) fire::$19 ← (byte~) fire::$18 >> (byte/signed byte/word/signed word/dword/signed dword) 4 -- vbuaa=vbuaa_ror_4 + //SEG75 [32] (byte) sid_rnd::return#2 ← (byte) sid_rnd::return#0 + //SEG76 fire::@7 + //SEG77 [33] (byte~) fire::$15 ← (byte) sid_rnd::return#2 + //SEG78 [34] (byte~) fire::$16 ← (byte~) fire::$15 >> (byte/signed byte/word/signed word/dword/signed dword) 4 -- vbuaa=vbuaa_ror_4 lsr lsr lsr lsr - //SEG81 [38] (byte/signed word/word/dword/signed dword~) fire::$20 ← (byte/signed byte/word/signed word/dword/signed dword) $30 + (byte~) fire::$19 -- vbuaa=vbuc1_plus_vbuaa + //SEG79 [35] (byte/signed word/word/dword/signed dword~) fire::$17 ← (byte/signed byte/word/signed word/dword/signed dword) $30 + (byte~) fire::$16 -- vbuaa=vbuc1_plus_vbuaa clc adc #$30 - //SEG82 [39] *((byte*) fire::buffer#10) ← (byte/signed word/word/dword/signed dword~) fire::$20 -- _deref_pbuz1=vbuaa + //SEG80 [36] *((byte*) fire::buffer#7) ← (byte/signed word/word/dword/signed dword~) fire::$17 -- _deref_pbuz1=vbuaa ldy #0 sta (buffer),y - //SEG83 [40] *((byte*) fire::screen#10) ← *((byte*) fire::buffer#10) -- _deref_pbuz1=_deref_pbuz2 + //SEG81 [37] *((byte*) fire::screen#5) ← *((byte*) fire::buffer#7) -- _deref_pbuz1=_deref_pbuz2 lda (buffer),y sta (screen),y - //SEG84 [41] (byte*) fire::screen#3 ← ++ (byte*) fire::screen#10 -- pbuz1=_inc_pbuz1 + //SEG82 [38] (byte*) fire::screen#3 ← ++ (byte*) fire::screen#5 -- pbuz1=_inc_pbuz1 inc screen bne !+ inc screen+1 !: - //SEG85 [42] (byte*) fire::buffer#3 ← ++ (byte*) fire::buffer#10 -- pbuz1=_inc_pbuz1 + //SEG83 [39] (byte*) fire::buffer#3 ← ++ (byte*) fire::buffer#7 -- pbuz1=_inc_pbuz1 inc buffer bne !+ inc buffer+1 !: - //SEG86 [30] phi from fire::@8 to fire::@6 [phi:fire::@8->fire::@6] - //SEG87 [30] phi (byte*) fire::screen#10 = (byte*) fire::screen#3 [phi:fire::@8->fire::@6#0] -- register_copy - //SEG88 [30] phi (byte*) fire::buffer#10 = (byte*) fire::buffer#3 [phi:fire::@8->fire::@6#1] -- register_copy - jmp b6 - //SEG89 fire::@2 + //SEG84 [40] if((byte*) fire::buffer#3!=(const byte*) BUFFER#0+(byte/signed byte/word/signed word/dword/signed dword) $19*(byte/signed byte/word/signed word/dword/signed dword) $28) goto fire::@6 -- pbuz1_neq_pbuc1_then_la1 + lda buffer+1 + cmp #>BUFFER+$19*$28 + bne b6 + lda buffer + cmp #> (byte/signed byte/word/signed word/dword/signed dword) 2 -- vbuaa=vbuaa_ror_2 + //SEG91 [45] (byte) fire::c#0 ← (byte~) fire::$11 >> (byte/signed byte/word/signed word/dword/signed dword) 2 -- vbuaa=vbuaa_ror_2 lsr lsr - //SEG94 [47] if((byte) fire::c#0<(byte/signed byte/word/signed word/dword/signed dword) 2+(byte/signed byte/word/signed word/dword/signed dword) 1) goto fire::@4 -- vbuaa_lt_vbuc1_then_la1 + //SEG92 [46] if((byte) fire::c#0<(byte/signed byte/word/signed word/dword/signed dword) 2+(byte/signed byte/word/signed word/dword/signed dword) 1) goto fire::@4 -- vbuaa_lt_vbuc1_then_la1 cmp #2+1 bcc b4 - //SEG95 fire::@5 - //SEG96 [48] (byte) fire::c#1 ← (byte) fire::c#0 - (byte/signed byte/word/signed word/dword/signed dword) 3 -- vbuaa=vbuaa_minus_vbuc1 + //SEG93 fire::@5 + //SEG94 [47] (byte) fire::c#1 ← (byte) fire::c#0 - (byte/signed byte/word/signed word/dword/signed dword) 3 -- vbuaa=vbuaa_minus_vbuc1 sec sbc #3 - //SEG97 [49] phi from fire::@2 fire::@5 to fire::@4 [phi:fire::@2/fire::@5->fire::@4] - //SEG98 [49] phi (byte) fire::c#2 = (byte) fire::c#0 [phi:fire::@2/fire::@5->fire::@4#0] -- register_copy - //SEG99 fire::@4 + //SEG95 [48] phi from fire::@2 fire::@5 to fire::@4 [phi:fire::@2/fire::@5->fire::@4] + //SEG96 [48] phi (byte) fire::c#2 = (byte) fire::c#0 [phi:fire::@2/fire::@5->fire::@4#0] -- register_copy + //SEG97 fire::@4 b4: - //SEG100 [50] *((byte*) fire::buffer#4) ← (byte) fire::c#2 -- _deref_pbuz1=vbuaa + //SEG98 [49] *((byte*) fire::buffer#4) ← (byte) fire::c#2 -- _deref_pbuz1=vbuaa ldy #0 sta (buffer),y - //SEG101 [51] *((byte*) fire::screen#4) ← *((byte*) fire::buffer#4) -- _deref_pbuz1=_deref_pbuz2 + //SEG99 [50] *((byte*) fire::screen#4) ← *((byte*) fire::buffer#4) -- _deref_pbuz1=_deref_pbuz2 lda (buffer),y sta (screen_4),y - //SEG102 [52] (byte*) fire::screen#2 ← ++ (byte*) fire::screen#4 -- pbuz1=_inc_pbuz1 + //SEG100 [51] (byte*) fire::screen#2 ← ++ (byte*) fire::screen#4 -- pbuz1=_inc_pbuz1 inc screen_2 bne !+ inc screen_2+1 !: - //SEG103 [53] (byte*) fire::buffer#2 ← ++ (byte*) fire::buffer#4 -- pbuz1=_inc_pbuz1 + //SEG101 [52] (byte*) fire::buffer#2 ← ++ (byte*) fire::buffer#4 -- pbuz1=_inc_pbuz1 inc buffer bne !+ inc buffer+1 !: - //SEG104 [27] phi from fire::@4 to fire::@1 [phi:fire::@4->fire::@1] - //SEG105 [27] phi (byte*) fire::screen#4 = (byte*) fire::screen#2 [phi:fire::@4->fire::@1#0] -- register_copy - //SEG106 [27] phi (byte*) fire::buffer#4 = (byte*) fire::buffer#2 [phi:fire::@4->fire::@1#1] -- register_copy + //SEG102 [27] phi from fire::@4 to fire::@1 [phi:fire::@4->fire::@1] + //SEG103 [27] phi (byte*) fire::screen#4 = (byte*) fire::screen#2 [phi:fire::@4->fire::@1#0] -- register_copy + //SEG104 [27] phi (byte*) fire::buffer#4 = (byte*) fire::buffer#2 [phi:fire::@4->fire::@1#1] -- register_copy jmp b1 } -//SEG107 sid_rnd +//SEG105 sid_rnd // Get a random number from the SID voice 3, // Must be initialized with sid_rnd_init() sid_rnd: { - //SEG108 [54] (byte) sid_rnd::return#0 ← *((const byte*) SID_VOICE3_OSC#0) -- vbuaa=_deref_pbuc1 + //SEG106 [53] (byte) sid_rnd::return#0 ← *((const byte*) SID_VOICE3_OSC#0) -- vbuaa=_deref_pbuc1 lda SID_VOICE3_OSC - //SEG109 sid_rnd::@return - //SEG110 [55] return + //SEG107 sid_rnd::@return + //SEG108 [54] return rts } -//SEG111 makecharset +//SEG109 makecharset // Make a fire-friendly charset in chars $00-$3f of the passed charset makecharset: { .label _13 = $b @@ -3553,142 +3526,142 @@ makecharset: { .label ii = $a .label i = 9 .label c = 8 - //SEG112 [57] phi from makecharset to makecharset::@1 [phi:makecharset->makecharset::@1] - //SEG113 [57] phi (byte*) makecharset::font#2 = (const byte*) CHARSET#0 [phi:makecharset->makecharset::@1#0] -- pbuz1=pbuc1 + //SEG110 [56] phi from makecharset to makecharset::@1 [phi:makecharset->makecharset::@1] + //SEG111 [56] phi (byte*) makecharset::font#2 = (const byte*) CHARSET#0 [phi:makecharset->makecharset::@1#0] -- pbuz1=pbuc1 lda #CHARSET sta font+1 - //SEG114 [57] phi from makecharset::@1 to makecharset::@1 [phi:makecharset::@1->makecharset::@1] - //SEG115 [57] phi (byte*) makecharset::font#2 = (byte*) makecharset::font#1 [phi:makecharset::@1->makecharset::@1#0] -- register_copy - //SEG116 makecharset::@1 + //SEG112 [56] phi from makecharset::@1 to makecharset::@1 [phi:makecharset::@1->makecharset::@1] + //SEG113 [56] phi (byte*) makecharset::font#2 = (byte*) makecharset::font#1 [phi:makecharset::@1->makecharset::@1#0] -- register_copy + //SEG114 makecharset::@1 b1: - //SEG117 [58] *((byte*) makecharset::font#2) ← (byte/signed byte/word/signed word/dword/signed dword) 0 -- _deref_pbuz1=vbuc1 + //SEG115 [57] *((byte*) makecharset::font#2) ← (byte/signed byte/word/signed word/dword/signed dword) 0 -- _deref_pbuz1=vbuc1 lda #0 tay sta (font),y - //SEG118 [59] (byte*) makecharset::font#1 ← ++ (byte*) makecharset::font#2 -- pbuz1=_inc_pbuz1 + //SEG116 [58] (byte*) makecharset::font#1 ← ++ (byte*) makecharset::font#2 -- pbuz1=_inc_pbuz1 inc font bne !+ inc font+1 !: - //SEG119 [60] if((byte*) makecharset::font#1!=(const byte*) CHARSET#0+(byte/signed byte/word/signed word/dword/signed dword) 1*(byte/signed byte/word/signed word/dword/signed dword) 8) goto makecharset::@1 -- pbuz1_neq_pbuc1_then_la1 + //SEG117 [59] if((byte*) makecharset::font#1!=(const byte*) CHARSET#0+(byte/signed byte/word/signed word/dword/signed dword) 1*(byte/signed byte/word/signed word/dword/signed dword) 8) goto makecharset::@1 -- pbuz1_neq_pbuc1_then_la1 lda font+1 cmp #>CHARSET+1*8 bne b1 lda font cmp #makecharset::@2] - //SEG121 [61] phi (byte*) makecharset::font1#2 = (const byte*) CHARSET#0+(byte/signed byte/word/signed word/dword/signed dword) $40*(byte/signed byte/word/signed word/dword/signed dword) 8 [phi:makecharset::@1->makecharset::@2#0] -- pbuz1=pbuc1 + //SEG118 [60] phi from makecharset::@1 to makecharset::@2 [phi:makecharset::@1->makecharset::@2] + //SEG119 [60] phi (byte*) makecharset::font1#2 = (const byte*) CHARSET#0+(byte/signed byte/word/signed word/dword/signed dword) $40*(byte/signed byte/word/signed word/dword/signed dword) 8 [phi:makecharset::@1->makecharset::@2#0] -- pbuz1=pbuc1 lda #CHARSET+$40*8 sta font1+1 - //SEG122 [61] phi from makecharset::@2 to makecharset::@2 [phi:makecharset::@2->makecharset::@2] - //SEG123 [61] phi (byte*) makecharset::font1#2 = (byte*) makecharset::font1#1 [phi:makecharset::@2->makecharset::@2#0] -- register_copy - //SEG124 makecharset::@2 + //SEG120 [60] phi from makecharset::@2 to makecharset::@2 [phi:makecharset::@2->makecharset::@2] + //SEG121 [60] phi (byte*) makecharset::font1#2 = (byte*) makecharset::font1#1 [phi:makecharset::@2->makecharset::@2#0] -- register_copy + //SEG122 makecharset::@2 b2: - //SEG125 [62] *((byte*) makecharset::font1#2) ← (byte/word/signed word/dword/signed dword) $ff -- _deref_pbuz1=vbuc1 + //SEG123 [61] *((byte*) makecharset::font1#2) ← (byte/word/signed word/dword/signed dword) $ff -- _deref_pbuz1=vbuc1 lda #$ff ldy #0 sta (font1),y - //SEG126 [63] (byte*) makecharset::font1#1 ← ++ (byte*) makecharset::font1#2 -- pbuz1=_inc_pbuz1 + //SEG124 [62] (byte*) makecharset::font1#1 ← ++ (byte*) makecharset::font1#2 -- pbuz1=_inc_pbuz1 inc font1 bne !+ inc font1+1 !: - //SEG127 [64] if((byte*) makecharset::font1#1!=(const byte*) CHARSET#0+(word/signed word/dword/signed dword) $100*(byte/signed byte/word/signed word/dword/signed dword) 8) goto makecharset::@2 -- pbuz1_neq_pbuc1_then_la1 + //SEG125 [63] if((byte*) makecharset::font1#1!=(const byte*) CHARSET#0+(word/signed word/dword/signed dword) $100*(byte/signed byte/word/signed word/dword/signed dword) 8) goto makecharset::@2 -- pbuz1_neq_pbuc1_then_la1 lda font1+1 cmp #>CHARSET+$100*8 bne b2 lda font1 cmp #makecharset::@3] - //SEG129 [65] phi (byte) makecharset::c#7 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:makecharset::@2->makecharset::@3#0] -- vbuz1=vbuc1 + //SEG126 [64] phi from makecharset::@2 to makecharset::@3 [phi:makecharset::@2->makecharset::@3] + //SEG127 [64] phi (byte) makecharset::c#7 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:makecharset::@2->makecharset::@3#0] -- vbuz1=vbuc1 lda #0 sta c - //SEG130 [65] phi from makecharset::@9 to makecharset::@3 [phi:makecharset::@9->makecharset::@3] - //SEG131 [65] phi (byte) makecharset::c#7 = (byte) makecharset::c#1 [phi:makecharset::@9->makecharset::@3#0] -- register_copy - //SEG132 makecharset::@3 + //SEG128 [64] phi from makecharset::@9 to makecharset::@3 [phi:makecharset::@9->makecharset::@3] + //SEG129 [64] phi (byte) makecharset::c#7 = (byte) makecharset::c#1 [phi:makecharset::@9->makecharset::@3#0] -- register_copy + //SEG130 makecharset::@3 b3: - //SEG133 [66] phi from makecharset::@3 to makecharset::@4 [phi:makecharset::@3->makecharset::@4] - //SEG134 [66] phi (byte) makecharset::i#6 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:makecharset::@3->makecharset::@4#0] -- vbuz1=vbuc1 + //SEG131 [65] phi from makecharset::@3 to makecharset::@4 [phi:makecharset::@3->makecharset::@4] + //SEG132 [65] phi (byte) makecharset::i#6 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:makecharset::@3->makecharset::@4#0] -- vbuz1=vbuc1 lda #0 sta i - //SEG135 [66] phi (byte) makecharset::bc#5 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:makecharset::@3->makecharset::@4#1] -- vbuxx=vbuc1 + //SEG133 [65] phi (byte) makecharset::bc#5 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:makecharset::@3->makecharset::@4#1] -- vbuxx=vbuc1 tax - //SEG136 [66] phi from makecharset::@8 to makecharset::@4 [phi:makecharset::@8->makecharset::@4] - //SEG137 [66] phi (byte) makecharset::i#6 = (byte) makecharset::i#1 [phi:makecharset::@8->makecharset::@4#0] -- register_copy - //SEG138 [66] phi (byte) makecharset::bc#5 = (byte) makecharset::bc#6 [phi:makecharset::@8->makecharset::@4#1] -- register_copy - //SEG139 makecharset::@4 + //SEG134 [65] phi from makecharset::@8 to makecharset::@4 [phi:makecharset::@8->makecharset::@4] + //SEG135 [65] phi (byte) makecharset::i#6 = (byte) makecharset::i#1 [phi:makecharset::@8->makecharset::@4#0] -- register_copy + //SEG136 [65] phi (byte) makecharset::bc#5 = (byte) makecharset::bc#6 [phi:makecharset::@8->makecharset::@4#1] -- register_copy + //SEG137 makecharset::@4 b4: - //SEG140 [67] phi from makecharset::@4 to makecharset::@5 [phi:makecharset::@4->makecharset::@5] - //SEG141 [67] phi (byte) makecharset::b#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:makecharset::@4->makecharset::@5#0] -- vbuyy=vbuc1 + //SEG138 [66] phi from makecharset::@4 to makecharset::@5 [phi:makecharset::@4->makecharset::@5] + //SEG139 [66] phi (byte) makecharset::b#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:makecharset::@4->makecharset::@5#0] -- vbuyy=vbuc1 ldy #0 - //SEG142 [67] phi (byte) makecharset::ii#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:makecharset::@4->makecharset::@5#1] -- vbuz1=vbuc1 + //SEG140 [66] phi (byte) makecharset::ii#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:makecharset::@4->makecharset::@5#1] -- vbuz1=vbuc1 tya sta ii - //SEG143 [67] phi (byte) makecharset::bc#3 = (byte) makecharset::bc#5 [phi:makecharset::@4->makecharset::@5#2] -- register_copy - //SEG144 [67] phi from makecharset::@6 to makecharset::@5 [phi:makecharset::@6->makecharset::@5] - //SEG145 [67] phi (byte) makecharset::b#2 = (byte) makecharset::b#3 [phi:makecharset::@6->makecharset::@5#0] -- register_copy - //SEG146 [67] phi (byte) makecharset::ii#2 = (byte) makecharset::ii#1 [phi:makecharset::@6->makecharset::@5#1] -- register_copy - //SEG147 [67] phi (byte) makecharset::bc#3 = (byte) makecharset::bc#6 [phi:makecharset::@6->makecharset::@5#2] -- register_copy - //SEG148 makecharset::@5 + //SEG141 [66] phi (byte) makecharset::bc#3 = (byte) makecharset::bc#5 [phi:makecharset::@4->makecharset::@5#2] -- register_copy + //SEG142 [66] phi from makecharset::@6 to makecharset::@5 [phi:makecharset::@6->makecharset::@5] + //SEG143 [66] phi (byte) makecharset::b#2 = (byte) makecharset::b#3 [phi:makecharset::@6->makecharset::@5#0] -- register_copy + //SEG144 [66] phi (byte) makecharset::ii#2 = (byte) makecharset::ii#1 [phi:makecharset::@6->makecharset::@5#1] -- register_copy + //SEG145 [66] phi (byte) makecharset::bc#3 = (byte) makecharset::bc#6 [phi:makecharset::@6->makecharset::@5#2] -- register_copy + //SEG146 makecharset::@5 b5: - //SEG149 [68] (byte) makecharset::bc#1 ← (byte) makecharset::bc#3 + (byte) makecharset::c#7 -- vbuxx=vbuxx_plus_vbuz1 + //SEG147 [67] (byte) makecharset::bc#1 ← (byte) makecharset::bc#3 + (byte) makecharset::c#7 -- vbuxx=vbuxx_plus_vbuz1 txa clc adc c tax - //SEG150 [69] if((byte) makecharset::bc#1<(byte/signed byte/word/signed word/dword/signed dword) $3f+(byte/signed byte/word/signed word/dword/signed dword) 1) goto makecharset::@6 -- vbuxx_lt_vbuc1_then_la1 + //SEG148 [68] if((byte) makecharset::bc#1<(byte/signed byte/word/signed word/dword/signed dword) $3f+(byte/signed byte/word/signed word/dword/signed dword) 1) goto makecharset::@6 -- vbuxx_lt_vbuc1_then_la1 cpx #$3f+1 bcc b6 - //SEG151 makecharset::@7 - //SEG152 [70] (byte) makecharset::bc#2 ← (byte) makecharset::bc#1 - (byte/signed byte/word/signed word/dword/signed dword) $40 -- vbuxx=vbuxx_minus_vbuc1 + //SEG149 makecharset::@7 + //SEG150 [69] (byte) makecharset::bc#2 ← (byte) makecharset::bc#1 - (byte/signed byte/word/signed word/dword/signed dword) $40 -- vbuxx=vbuxx_minus_vbuc1 txa axs #$40 - //SEG153 [71] (byte~) makecharset::$11 ← (byte) makecharset::i#6 & (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuaa=vbuz1_band_vbuc1 + //SEG151 [70] (byte~) makecharset::$11 ← (byte) makecharset::i#6 & (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuaa=vbuz1_band_vbuc1 lda #1 and i - //SEG154 [72] (byte~) makecharset::$12 ← (byte) makecharset::ii#2 + (byte~) makecharset::$11 -- vbuaa=vbuz1_plus_vbuaa + //SEG152 [71] (byte~) makecharset::$12 ← (byte) makecharset::ii#2 + (byte~) makecharset::$11 -- vbuaa=vbuz1_plus_vbuaa clc adc ii - //SEG155 [73] (byte~) makecharset::$13 ← (byte~) makecharset::$12 & (byte/signed byte/word/signed word/dword/signed dword) 7 -- vbuz1=vbuaa_band_vbuc1 + //SEG153 [72] (byte~) makecharset::$13 ← (byte~) makecharset::$12 & (byte/signed byte/word/signed word/dword/signed dword) 7 -- vbuz1=vbuaa_band_vbuc1 and #7 sta _13 - //SEG156 [74] (byte) makecharset::b#1 ← (byte) makecharset::b#2 + *((const byte[8]) makecharset::bittab#0 + (byte~) makecharset::$13) -- vbuyy=vbuyy_plus_pbuc1_derefidx_vbuz1 + //SEG154 [73] (byte) makecharset::b#1 ← (byte) makecharset::b#2 + *((const byte[8]) makecharset::bittab#0 + (byte~) makecharset::$13) -- vbuyy=vbuyy_plus_pbuc1_derefidx_vbuz1 tya ldy _13 clc adc bittab,y tay - //SEG157 [75] phi from makecharset::@5 makecharset::@7 to makecharset::@6 [phi:makecharset::@5/makecharset::@7->makecharset::@6] - //SEG158 [75] phi (byte) makecharset::b#3 = (byte) makecharset::b#2 [phi:makecharset::@5/makecharset::@7->makecharset::@6#0] -- register_copy - //SEG159 [75] phi (byte) makecharset::bc#6 = (byte) makecharset::bc#1 [phi:makecharset::@5/makecharset::@7->makecharset::@6#1] -- register_copy - //SEG160 makecharset::@6 + //SEG155 [74] phi from makecharset::@5 makecharset::@7 to makecharset::@6 [phi:makecharset::@5/makecharset::@7->makecharset::@6] + //SEG156 [74] phi (byte) makecharset::b#3 = (byte) makecharset::b#2 [phi:makecharset::@5/makecharset::@7->makecharset::@6#0] -- register_copy + //SEG157 [74] phi (byte) makecharset::bc#6 = (byte) makecharset::bc#1 [phi:makecharset::@5/makecharset::@7->makecharset::@6#1] -- register_copy + //SEG158 makecharset::@6 b6: - //SEG161 [76] (byte) makecharset::ii#1 ← ++ (byte) makecharset::ii#2 -- vbuz1=_inc_vbuz1 + //SEG159 [75] (byte) makecharset::ii#1 ← ++ (byte) makecharset::ii#2 -- vbuz1=_inc_vbuz1 inc ii - //SEG162 [77] if((byte) makecharset::ii#1<(byte/signed byte/word/signed word/dword/signed dword) 8) goto makecharset::@5 -- vbuz1_lt_vbuc1_then_la1 + //SEG160 [76] if((byte) makecharset::ii#1<(byte/signed byte/word/signed word/dword/signed dword) 8) goto makecharset::@5 -- vbuz1_lt_vbuc1_then_la1 lda ii cmp #8 bcc b5 - //SEG163 makecharset::@8 - //SEG164 [78] (word~) makecharset::$17 ← ((word)) (byte) makecharset::c#7 -- vwuz1=_word_vbuz2 + //SEG161 makecharset::@8 + //SEG162 [77] (word~) makecharset::$17 ← ((word)) (byte) makecharset::c#7 -- vwuz1=_word_vbuz2 lda c sta _17 lda #0 sta _17+1 - //SEG165 [79] (word~) makecharset::$18 ← (word~) makecharset::$17 << (byte/signed byte/word/signed word/dword/signed dword) 3 -- vwuz1=vwuz1_rol_3 + //SEG163 [78] (word~) makecharset::$18 ← (word~) makecharset::$17 << (byte/signed byte/word/signed word/dword/signed dword) 3 -- vwuz1=vwuz1_rol_3 asl _18 rol _18+1 asl _18 rol _18+1 asl _18 rol _18+1 - //SEG166 [80] (word~) makecharset::$19 ← (word~) makecharset::$18 + (byte) makecharset::i#6 -- vwuz1=vwuz1_plus_vbuz2 + //SEG164 [79] (word~) makecharset::$19 ← (word~) makecharset::$18 + (byte) makecharset::i#6 -- vwuz1=vwuz1_plus_vbuz2 lda i clc adc _19 @@ -3696,7 +3669,7 @@ makecharset: { bcc !+ inc _19+1 !: - //SEG167 [81] *((const byte*) CHARSET#0+(byte/signed byte/word/signed word/dword/signed dword) 1*(byte/signed byte/word/signed word/dword/signed dword) 8 + (word~) makecharset::$19) ← (byte) makecharset::b#3 -- pbuc1_derefidx_vwuz1=vbuyy + //SEG165 [80] *((const byte*) CHARSET#0+(byte/signed byte/word/signed word/dword/signed dword) 1*(byte/signed byte/word/signed word/dword/signed dword) 8 + (word~) makecharset::$19) ← (byte) makecharset::b#3 -- pbuc1_derefidx_vwuz1=vbuyy tya sta !v++1 lda #$ffff sta SID_VOICE3_FREQ+1 - //SEG177 [88] *((const byte*) SID_VOICE3_CONTROL#0) ← (const byte) SID_CONTROL_NOISE#0 -- _deref_pbuc1=vbuc2 + //SEG175 [87] *((const byte*) SID_VOICE3_CONTROL#0) ← (const byte) SID_CONTROL_NOISE#0 -- _deref_pbuc1=vbuc2 lda #SID_CONTROL_NOISE sta SID_VOICE3_CONTROL - //SEG178 sid_rnd_init::@return - //SEG179 [89] return + //SEG176 sid_rnd_init::@return + //SEG177 [88] return rts } -//SEG180 fillscreen +//SEG178 fillscreen // Fill a screen (1000 bytes) with a specific byte // fillscreen(byte* zeropage(2) screen, byte register(X) fill) fillscreen: { .label screen = 2 .label i = 4 - //SEG181 [91] phi from fillscreen to fillscreen::@1 [phi:fillscreen->fillscreen::@1] - //SEG182 [91] phi (word) fillscreen::i#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:fillscreen->fillscreen::@1#0] -- vwuz1=vbuc1 + //SEG179 [90] phi from fillscreen to fillscreen::@1 [phi:fillscreen->fillscreen::@1] + //SEG180 [90] phi (word) fillscreen::i#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:fillscreen->fillscreen::@1#0] -- vwuz1=vbuc1 lda #0 sta i sta i+1 - //SEG183 [91] phi (byte*) fillscreen::screen#5 = (byte*) fillscreen::screen#6 [phi:fillscreen->fillscreen::@1#1] -- register_copy - //SEG184 [91] phi from fillscreen::@1 to fillscreen::@1 [phi:fillscreen::@1->fillscreen::@1] - //SEG185 [91] phi (word) fillscreen::i#2 = (word) fillscreen::i#1 [phi:fillscreen::@1->fillscreen::@1#0] -- register_copy - //SEG186 [91] phi (byte*) fillscreen::screen#5 = (byte*) fillscreen::screen#4 [phi:fillscreen::@1->fillscreen::@1#1] -- register_copy - //SEG187 fillscreen::@1 + //SEG181 [90] phi (byte*) fillscreen::screen#5 = (byte*) fillscreen::screen#6 [phi:fillscreen->fillscreen::@1#1] -- register_copy + //SEG182 [90] phi from fillscreen::@1 to fillscreen::@1 [phi:fillscreen::@1->fillscreen::@1] + //SEG183 [90] phi (word) fillscreen::i#2 = (word) fillscreen::i#1 [phi:fillscreen::@1->fillscreen::@1#0] -- register_copy + //SEG184 [90] phi (byte*) fillscreen::screen#5 = (byte*) fillscreen::screen#4 [phi:fillscreen::@1->fillscreen::@1#1] -- register_copy + //SEG185 fillscreen::@1 b1: - //SEG188 [92] *((byte*) fillscreen::screen#5) ← (byte) fillscreen::fill#5 -- _deref_pbuz1=vbuxx + //SEG186 [91] *((byte*) fillscreen::screen#5) ← (byte) fillscreen::fill#5 -- _deref_pbuz1=vbuxx txa ldy #0 sta (screen),y - //SEG189 [93] (byte*) fillscreen::screen#4 ← ++ (byte*) fillscreen::screen#5 -- pbuz1=_inc_pbuz1 + //SEG187 [92] (byte*) fillscreen::screen#4 ← ++ (byte*) fillscreen::screen#5 -- pbuz1=_inc_pbuz1 inc screen bne !+ inc screen+1 !: - //SEG190 [94] (word) fillscreen::i#1 ← ++ (word) fillscreen::i#2 -- vwuz1=_inc_vwuz1 + //SEG188 [93] (word) fillscreen::i#1 ← ++ (word) fillscreen::i#2 -- vwuz1=_inc_vwuz1 inc i bne !+ inc i+1 !: - //SEG191 [95] if((word) fillscreen::i#1!=(word/signed word/dword/signed dword) $3e8) goto fillscreen::@1 -- vwuz1_neq_vwuc1_then_la1 + //SEG189 [94] if((word) fillscreen::i#1!=(word/signed word/dword/signed dword) $3e8) goto fillscreen::@1 -- vwuz1_neq_vwuc1_then_la1 lda i+1 cmp #>$3e8 bne b1 lda i cmp #<$3e8 bne b1 - //SEG192 fillscreen::@return - //SEG193 [96] return + //SEG190 fillscreen::@return + //SEG191 [95] return rts } diff --git a/src/test/ref/examples/fire/fire.sym b/src/test/ref/examples/fire/fire.sym index 54169b196..4ad87f55f 100644 --- a/src/test/ref/examples/fire/fire.sym +++ b/src/test/ref/examples/fire/fire.sym @@ -44,9 +44,9 @@ (void()) fire((byte*) fire::screenbase) (byte~) fire::$10 reg byte a 202.0 (byte~) fire::$11 reg byte a 202.0 -(byte~) fire::$18 reg byte a 202.0 -(byte~) fire::$19 reg byte a 202.0 -(byte/signed word/word/dword/signed dword~) fire::$20 reg byte a 202.0 +(byte~) fire::$15 reg byte a 202.0 +(byte~) fire::$16 reg byte a 202.0 +(byte/signed word/word/dword/signed dword~) fire::$17 reg byte a 202.0 (byte~) fire::$9 reg byte a 202.0 (label) fire::@1 (label) fire::@2 @@ -55,13 +55,12 @@ (label) fire::@5 (label) fire::@6 (label) fire::@7 -(label) fire::@8 (label) fire::@return (byte*) fire::buffer -(byte*) fire::buffer#10 buffer zp ZP_WORD:4 45.90909090909091 (byte*) fire::buffer#2 buffer zp ZP_WORD:4 202.0 -(byte*) fire::buffer#3 buffer zp ZP_WORD:4 202.0 +(byte*) fire::buffer#3 buffer zp ZP_WORD:4 151.5 (byte*) fire::buffer#4 buffer zp ZP_WORD:4 75.75 +(byte*) fire::buffer#7 buffer zp ZP_WORD:4 44.888888888888886 (byte) fire::c (byte) fire::c#0 reg byte a 202.0 (byte) fire::c#1 reg byte a 202.0 @@ -69,11 +68,11 @@ (byte*) fire::screen (byte*) fire::screen#0 screen zp ZP_WORD:2 0.26666666666666666 (byte*) fire::screen#1 screen zp ZP_WORD:2 4.0 -(byte*) fire::screen#10 screen zp ZP_WORD:2 30.5 -(byte*~) fire::screen#11 screen#11 zp ZP_WORD:6 4.0 +(byte*~) fire::screen#10 screen#10 zp ZP_WORD:6 4.0 (byte*) fire::screen#2 screen#2 zp ZP_WORD:6 101.0 -(byte*) fire::screen#3 screen zp ZP_WORD:2 101.0 +(byte*) fire::screen#3 screen zp ZP_WORD:2 67.33333333333333 (byte*) fire::screen#4 screen#4 zp ZP_WORD:6 27.727272727272727 +(byte*) fire::screen#5 screen zp ZP_WORD:2 38.125 (byte*) fire::screenbase (void()) main() (label) main::@1 @@ -165,9 +164,9 @@ (void()) sid_rnd_init() (label) sid_rnd_init::@return -zp ZP_WORD:2 [ fire::screen#0 fire::screen#10 fire::screen#3 fire::screen#1 makecharset::font#2 makecharset::font#1 makecharset::font1#2 makecharset::font1#1 fillscreen::screen#5 fillscreen::screen#6 fillscreen::screen#4 makecharset::$17 makecharset::$18 makecharset::$19 ] -zp ZP_WORD:4 [ fire::buffer#4 fire::buffer#2 fire::buffer#10 fire::buffer#3 fillscreen::i#2 fillscreen::i#1 ] -zp ZP_WORD:6 [ fire::screen#4 fire::screen#11 fire::screen#2 ] +zp ZP_WORD:2 [ fire::screen#0 fire::screen#5 fire::screen#3 fire::screen#1 makecharset::font#2 makecharset::font#1 makecharset::font1#2 makecharset::font1#1 fillscreen::screen#5 fillscreen::screen#6 fillscreen::screen#4 makecharset::$17 makecharset::$18 makecharset::$19 ] +zp ZP_WORD:4 [ fire::buffer#4 fire::buffer#2 fire::buffer#7 fire::buffer#3 fillscreen::i#2 fillscreen::i#1 ] +zp ZP_WORD:6 [ fire::screen#4 fire::screen#10 fire::screen#2 ] reg byte a [ fire::c#2 fire::c#0 fire::c#1 ] zp ZP_BYTE:8 [ makecharset::c#7 makecharset::c#1 ] zp ZP_BYTE:9 [ makecharset::i#6 makecharset::i#1 ] @@ -176,9 +175,9 @@ zp ZP_BYTE:10 [ makecharset::ii#2 makecharset::ii#1 ] reg byte y [ makecharset::b#2 makecharset::b#3 makecharset::b#1 ] reg byte x [ fillscreen::fill#5 ] reg byte a [ sid_rnd::return#2 ] -reg byte a [ fire::$18 ] -reg byte a [ fire::$19 ] -reg byte a [ fire::$20 ] +reg byte a [ fire::$15 ] +reg byte a [ fire::$16 ] +reg byte a [ fire::$17 ] reg byte a [ fire::$9 ] reg byte a [ fire::$10 ] reg byte a [ fire::$11 ]