diff --git a/src/main/java/dk/camelot64/kickc/fragment/asm/zpptrby1=_ptrby_zpwo1.asm b/src/main/java/dk/camelot64/kickc/fragment/asm/zpptrby1=_ptrby_zpwo1.asm new file mode 100644 index 000000000..8b4746178 --- /dev/null +++ b/src/main/java/dk/camelot64/kickc/fragment/asm/zpptrby1=_ptrby_zpwo1.asm @@ -0,0 +1,4 @@ +lda {zpwo1} +sta {zpptrby1} +lda {zpwo1}+1 +sta {zpptrby1}+1 diff --git a/src/main/java/dk/camelot64/kickc/test/basic-floats.kc b/src/main/java/dk/camelot64/kickc/test/basic-floats.kc index 5f87c9be2..9f74d7ce2 100644 --- a/src/main/java/dk/camelot64/kickc/test/basic-floats.kc +++ b/src/main/java/dk/camelot64/kickc/test/basic-floats.kc @@ -2,13 +2,20 @@ // See https://www.c64-wiki.com/wiki/Floating_point_arithmetic // See http://www.pagetable.com/c64rom/c64rom_sc.html +// Zeropage addresses used to hold lo/hi-bytes of addresses of float numbers in MEM +const byte* memLo = $fe; +const byte* memHi = $ff; + +// Prepare MEM pointers for operations using MEM +void prepareMEM(byte* mem) { + *memLo = mem; +} + // FAC = word // Set the FAC (floating point accumulator) to the integer value of a 16bit word void setFAC(word w) { - const byte* lo = $fe; - const byte* hi = $ff; - *lo = w; + prepareMEM((byte*)w); // Load word register Y,A into FAC (floating point accumulator) asm { ldy $fe @@ -21,8 +28,6 @@ void setFAC(word w) { // Get the value of the FAC (floating point accumulator) as an integer 16bit word // Destroys the value in the FAC in the process word getFAC() { - const byte* lo = $fe; - const byte* hi = $ff; // Load FAC (floating point accumulator) integer part into word register Y,A asm { jsr $b1aa @@ -30,8 +35,8 @@ word getFAC() { sta $ff } word w = 0; - w = *hi; + w = *memHi; return w; } @@ -51,16 +56,6 @@ void setFACtoARG() { } } -// Zeropage addresses used to hold lo/hi-bytes of addresses of float numbers in MEM -const byte* memLo = $fe; -const byte* memHi = $ff; - -// Prepare MEM pointers for operations using MEM -void prepareMEM(byte* mem) { - *memLo = mem; -} - // MEM = FAC // Stores the value of the FAC to memory // Stores 5 bytes (means it is necessary to allocate 5 bytes to avoid clobbering other data using eg. byte[] mem = {0, 0, 0, 0, 0};) diff --git a/src/main/java/dk/camelot64/kickc/test/ref/sinus-basic.asm b/src/main/java/dk/camelot64/kickc/test/ref/sinus-basic.asm index 992686ee9..1483d7b54 100644 --- a/src/main/java/dk/camelot64/kickc/test/ref/sinus-basic.asm +++ b/src/main/java/dk/camelot64/kickc/test/ref/sinus-basic.asm @@ -134,18 +134,16 @@ print_char: { rts } getFAC: { - .const lo = $fe - .const hi = $ff .label w = 9 .label return = 9 jsr $b1aa sty $fe sta $ff - lda lo + lda memLo sta w lda #0 sta w+1 - lda hi + lda memHi sta return+1 rts } @@ -192,13 +190,13 @@ divMEMbyFAC: { rts } setFAC: { - .const lo = $fe - .const hi = $ff + .label _0 = 7 .label w = 9 lda w - sta lo + sta _0 lda w+1 - sta hi + sta _0+1 + jsr prepareMEM ldy $fe lda $ff jsr $b391 diff --git a/src/main/java/dk/camelot64/kickc/test/ref/sinus-basic.cfg b/src/main/java/dk/camelot64/kickc/test/ref/sinus-basic.cfg index 86051b6c1..f2138dd1a 100644 --- a/src/main/java/dk/camelot64/kickc/test/ref/sinus-basic.cfg +++ b/src/main/java/dk/camelot64/kickc/test/ref/sinus-basic.cfg @@ -127,8 +127,8 @@ print_char::@return: scope:[print_char] from print_char to:@return getFAC: scope:[getFAC] from main::@12 asm { jsr$b1aasty$festa$ff } - [65] (word) getFAC::w#1 ← (byte/signed byte/word/signed word) 0 lo= *((const byte*) getFAC::lo#0) [ getFAC::w#1 ] ( main:2::getFAC:27 [ main::i#10 char_cursor#32 line_cursor#13 getFAC::w#1 ] ) - [66] (word) getFAC::return#0 ← (word) getFAC::w#1 hi= *((const byte*) getFAC::hi#0) [ getFAC::return#0 ] ( main:2::getFAC:27 [ main::i#10 char_cursor#32 line_cursor#13 getFAC::return#0 ] ) + [65] (word) getFAC::w#1 ← (byte/signed byte/word/signed word) 0 lo= *((const byte*) memLo#0) [ getFAC::w#1 ] ( main:2::getFAC:27 [ main::i#10 char_cursor#32 line_cursor#13 getFAC::w#1 ] ) + [66] (word) getFAC::return#0 ← (word) getFAC::w#1 hi= *((const byte*) memHi#0) [ getFAC::return#0 ] ( main:2::getFAC:27 [ main::i#10 char_cursor#32 line_cursor#13 getFAC::return#0 ] ) to:getFAC::@return getFAC::@return: scope:[getFAC] from getFAC [67] return [ getFAC::return#0 ] ( main:2::getFAC:27 [ main::i#10 char_cursor#32 line_cursor#13 getFAC::return#0 ] ) @@ -143,19 +143,19 @@ addMEMtoFAC::@1: scope:[addMEMtoFAC] from addMEMtoFAC addMEMtoFAC::@return: scope:[addMEMtoFAC] from addMEMtoFAC::@1 [71] return [ ] ( main:2::addMEMtoFAC:25 [ main::i#10 char_cursor#32 line_cursor#13 ] ) to:@return -prepareMEM: scope:[prepareMEM] from addMEMtoFAC divMEMbyFAC mulFACbyMEM setMEMtoFAC - [72] (byte*) prepareMEM::mem#4 ← phi( addMEMtoFAC/(const byte[]) f_127#0 divMEMbyFAC/(const byte[]) f_i#0 mulFACbyMEM/(byte*) prepareMEM::mem#3 setMEMtoFAC/(byte*) prepareMEM::mem#0 ) [ prepareMEM::mem#4 ] ( main:2::addMEMtoFAC:25::prepareMEM:69 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 ] main:2::mulFACbyMEM:13::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 ] main:2::mulFACbyMEM:23::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 ] main:2::divMEMbyFAC:19::prepareMEM:86 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 ] main:2::setMEMtoFAC:7::prepareMEM:98 [ prepareMEM::mem#4 ] main:2::setMEMtoFAC:15::prepareMEM:98 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 ] ) - [73] (byte~) prepareMEM::$0 ← < (byte*) prepareMEM::mem#4 [ prepareMEM::mem#4 prepareMEM::$0 ] ( main:2::addMEMtoFAC:25::prepareMEM:69 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 prepareMEM::$0 ] main:2::mulFACbyMEM:13::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 prepareMEM::$0 ] main:2::mulFACbyMEM:23::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 prepareMEM::$0 ] main:2::divMEMbyFAC:19::prepareMEM:86 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 prepareMEM::$0 ] main:2::setMEMtoFAC:7::prepareMEM:98 [ prepareMEM::mem#4 prepareMEM::$0 ] main:2::setMEMtoFAC:15::prepareMEM:98 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 prepareMEM::$0 ] ) - [74] *((const byte*) memLo#0) ← (byte~) prepareMEM::$0 [ prepareMEM::mem#4 ] ( main:2::addMEMtoFAC:25::prepareMEM:69 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 ] main:2::mulFACbyMEM:13::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 ] main:2::mulFACbyMEM:23::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 ] main:2::divMEMbyFAC:19::prepareMEM:86 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 ] main:2::setMEMtoFAC:7::prepareMEM:98 [ prepareMEM::mem#4 ] main:2::setMEMtoFAC:15::prepareMEM:98 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 ] ) - [75] (byte~) prepareMEM::$1 ← > (byte*) prepareMEM::mem#4 [ prepareMEM::$1 ] ( main:2::addMEMtoFAC:25::prepareMEM:69 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] main:2::mulFACbyMEM:13::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] main:2::mulFACbyMEM:23::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] main:2::divMEMbyFAC:19::prepareMEM:86 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] main:2::setMEMtoFAC:7::prepareMEM:98 [ prepareMEM::$1 ] main:2::setMEMtoFAC:15::prepareMEM:98 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] ) - [76] *((const byte*) memHi#0) ← (byte~) prepareMEM::$1 [ ] ( main:2::addMEMtoFAC:25::prepareMEM:69 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::mulFACbyMEM:13::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::mulFACbyMEM:23::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::divMEMbyFAC:19::prepareMEM:86 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::setMEMtoFAC:7::prepareMEM:98 [ ] main:2::setMEMtoFAC:15::prepareMEM:98 [ main::i#10 char_cursor#32 line_cursor#13 ] ) +prepareMEM: scope:[prepareMEM] from addMEMtoFAC divMEMbyFAC mulFACbyMEM setFAC setMEMtoFAC + [72] (byte*) prepareMEM::mem#5 ← phi( addMEMtoFAC/(const byte[]) f_127#0 divMEMbyFAC/(const byte[]) f_i#0 mulFACbyMEM/(byte*) prepareMEM::mem#4 setFAC/(byte*) prepareMEM::mem#0 setMEMtoFAC/(byte*) prepareMEM::mem#1 ) [ prepareMEM::mem#5 ] ( main:2::addMEMtoFAC:25::prepareMEM:69 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] main:2::mulFACbyMEM:13::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] main:2::mulFACbyMEM:23::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] main:2::divMEMbyFAC:19::prepareMEM:86 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] main:2::setFAC:5::prepareMEM:92 [ prepareMEM::mem#5 ] main:2::setFAC:11::prepareMEM:92 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] main:2::setFAC:17::prepareMEM:92 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] main:2::setMEMtoFAC:7::prepareMEM:97 [ prepareMEM::mem#5 ] main:2::setMEMtoFAC:15::prepareMEM:97 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] ) + [73] (byte~) prepareMEM::$0 ← < (byte*) prepareMEM::mem#5 [ prepareMEM::mem#5 prepareMEM::$0 ] ( main:2::addMEMtoFAC:25::prepareMEM:69 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 prepareMEM::$0 ] main:2::mulFACbyMEM:13::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 prepareMEM::$0 ] main:2::mulFACbyMEM:23::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 prepareMEM::$0 ] main:2::divMEMbyFAC:19::prepareMEM:86 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 prepareMEM::$0 ] main:2::setFAC:5::prepareMEM:92 [ prepareMEM::mem#5 prepareMEM::$0 ] main:2::setFAC:11::prepareMEM:92 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 prepareMEM::$0 ] main:2::setFAC:17::prepareMEM:92 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 prepareMEM::$0 ] main:2::setMEMtoFAC:7::prepareMEM:97 [ prepareMEM::mem#5 prepareMEM::$0 ] main:2::setMEMtoFAC:15::prepareMEM:97 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 prepareMEM::$0 ] ) + [74] *((const byte*) memLo#0) ← (byte~) prepareMEM::$0 [ prepareMEM::mem#5 ] ( main:2::addMEMtoFAC:25::prepareMEM:69 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] main:2::mulFACbyMEM:13::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] main:2::mulFACbyMEM:23::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] main:2::divMEMbyFAC:19::prepareMEM:86 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] main:2::setFAC:5::prepareMEM:92 [ prepareMEM::mem#5 ] main:2::setFAC:11::prepareMEM:92 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] main:2::setFAC:17::prepareMEM:92 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] main:2::setMEMtoFAC:7::prepareMEM:97 [ prepareMEM::mem#5 ] main:2::setMEMtoFAC:15::prepareMEM:97 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] ) + [75] (byte~) prepareMEM::$1 ← > (byte*) prepareMEM::mem#5 [ prepareMEM::$1 ] ( main:2::addMEMtoFAC:25::prepareMEM:69 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] main:2::mulFACbyMEM:13::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] main:2::mulFACbyMEM:23::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] main:2::divMEMbyFAC:19::prepareMEM:86 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] main:2::setFAC:5::prepareMEM:92 [ prepareMEM::$1 ] main:2::setFAC:11::prepareMEM:92 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] main:2::setFAC:17::prepareMEM:92 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] main:2::setMEMtoFAC:7::prepareMEM:97 [ prepareMEM::$1 ] main:2::setMEMtoFAC:15::prepareMEM:97 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] ) + [76] *((const byte*) memHi#0) ← (byte~) prepareMEM::$1 [ ] ( main:2::addMEMtoFAC:25::prepareMEM:69 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::mulFACbyMEM:13::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::mulFACbyMEM:23::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::divMEMbyFAC:19::prepareMEM:86 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::setFAC:5::prepareMEM:92 [ ] main:2::setFAC:11::prepareMEM:92 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::setFAC:17::prepareMEM:92 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::setMEMtoFAC:7::prepareMEM:97 [ ] main:2::setMEMtoFAC:15::prepareMEM:97 [ main::i#10 char_cursor#32 line_cursor#13 ] ) to:prepareMEM::@return prepareMEM::@return: scope:[prepareMEM] from prepareMEM - [77] return [ ] ( main:2::addMEMtoFAC:25::prepareMEM:69 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::mulFACbyMEM:13::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::mulFACbyMEM:23::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::divMEMbyFAC:19::prepareMEM:86 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::setMEMtoFAC:7::prepareMEM:98 [ ] main:2::setMEMtoFAC:15::prepareMEM:98 [ main::i#10 char_cursor#32 line_cursor#13 ] ) + [77] return [ ] ( main:2::addMEMtoFAC:25::prepareMEM:69 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::mulFACbyMEM:13::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::mulFACbyMEM:23::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::divMEMbyFAC:19::prepareMEM:86 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::setFAC:5::prepareMEM:92 [ ] main:2::setFAC:11::prepareMEM:92 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::setFAC:17::prepareMEM:92 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::setMEMtoFAC:7::prepareMEM:97 [ ] main:2::setMEMtoFAC:15::prepareMEM:97 [ main::i#10 char_cursor#32 line_cursor#13 ] ) to:@return mulFACbyMEM: scope:[mulFACbyMEM] from main::@10 main::@5 [78] (byte*) mulFACbyMEM::mem#2 ← phi( main::@10/(const byte[]) f_127#0 main::@5/(const byte*) f_2pi#0 ) [ mulFACbyMEM::mem#2 ] ( main:2::mulFACbyMEM:13 [ main::i#10 char_cursor#32 line_cursor#13 mulFACbyMEM::mem#2 ] main:2::mulFACbyMEM:23 [ main::i#10 char_cursor#32 line_cursor#13 mulFACbyMEM::mem#2 ] ) - [79] (byte*) prepareMEM::mem#3 ← (byte*) mulFACbyMEM::mem#2 [ prepareMEM::mem#3 ] ( main:2::mulFACbyMEM:13 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#3 ] main:2::mulFACbyMEM:23 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#3 ] ) + [79] (byte*) prepareMEM::mem#4 ← (byte*) mulFACbyMEM::mem#2 [ prepareMEM::mem#4 ] ( main:2::mulFACbyMEM:13 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 ] main:2::mulFACbyMEM:23 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 ] ) [80] call prepareMEM param-assignment [ ] ( main:2::mulFACbyMEM:13 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::mulFACbyMEM:23 [ main::i#10 char_cursor#32 line_cursor#13 ] ) to:mulFACbyMEM::@1 mulFACbyMEM::@1: scope:[mulFACbyMEM] from mulFACbyMEM @@ -182,23 +182,24 @@ divMEMbyFAC::@return: scope:[divMEMbyFAC] from divMEMbyFAC::@1 to:@return setFAC: scope:[setFAC] from main main::@1 main::@7 [89] (word) setFAC::w#3 ← phi( main/(byte/signed byte/word/signed word) 127 main::@1/(word) setFAC::w#1 main::@7/(byte/signed byte/word/signed word) 25 ) [ setFAC::w#3 ] ( main:2::setFAC:5 [ setFAC::w#3 ] main:2::setFAC:11 [ main::i#10 char_cursor#32 line_cursor#13 setFAC::w#3 ] main:2::setFAC:17 [ main::i#10 char_cursor#32 line_cursor#13 setFAC::w#3 ] ) - [90] (byte~) setFAC::$0 ← < (word) setFAC::w#3 [ setFAC::w#3 setFAC::$0 ] ( main:2::setFAC:5 [ setFAC::w#3 setFAC::$0 ] main:2::setFAC:11 [ main::i#10 char_cursor#32 line_cursor#13 setFAC::w#3 setFAC::$0 ] main:2::setFAC:17 [ main::i#10 char_cursor#32 line_cursor#13 setFAC::w#3 setFAC::$0 ] ) - [91] *((const byte*) setFAC::lo#0) ← (byte~) setFAC::$0 [ setFAC::w#3 ] ( main:2::setFAC:5 [ setFAC::w#3 ] main:2::setFAC:11 [ main::i#10 char_cursor#32 line_cursor#13 setFAC::w#3 ] main:2::setFAC:17 [ main::i#10 char_cursor#32 line_cursor#13 setFAC::w#3 ] ) - [92] (byte~) setFAC::$1 ← > (word) setFAC::w#3 [ setFAC::$1 ] ( main:2::setFAC:5 [ setFAC::$1 ] main:2::setFAC:11 [ main::i#10 char_cursor#32 line_cursor#13 setFAC::$1 ] main:2::setFAC:17 [ main::i#10 char_cursor#32 line_cursor#13 setFAC::$1 ] ) - [93] *((const byte*) setFAC::hi#0) ← (byte~) setFAC::$1 [ ] ( main:2::setFAC:5 [ ] main:2::setFAC:11 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::setFAC:17 [ main::i#10 char_cursor#32 line_cursor#13 ] ) + [90] (byte*~) setFAC::$0 ← ((byte*)) (word) setFAC::w#3 [ setFAC::$0 ] ( main:2::setFAC:5 [ setFAC::$0 ] main:2::setFAC:11 [ main::i#10 char_cursor#32 line_cursor#13 setFAC::$0 ] main:2::setFAC:17 [ main::i#10 char_cursor#32 line_cursor#13 setFAC::$0 ] ) + [91] (byte*) prepareMEM::mem#0 ← (byte*~) setFAC::$0 [ prepareMEM::mem#0 ] ( main:2::setFAC:5 [ prepareMEM::mem#0 ] main:2::setFAC:11 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#0 ] main:2::setFAC:17 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#0 ] ) + [92] call prepareMEM param-assignment [ ] ( main:2::setFAC:5 [ ] main:2::setFAC:11 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::setFAC:17 [ main::i#10 char_cursor#32 line_cursor#13 ] ) + to:setFAC::@1 +setFAC::@1: scope:[setFAC] from setFAC asm { ldy$felda$ffjsr$b391 } to:setFAC::@return -setFAC::@return: scope:[setFAC] from setFAC - [95] return [ ] ( main:2::setFAC:5 [ ] main:2::setFAC:11 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::setFAC:17 [ main::i#10 char_cursor#32 line_cursor#13 ] ) +setFAC::@return: scope:[setFAC] from setFAC::@1 + [94] return [ ] ( main:2::setFAC:5 [ ] main:2::setFAC:11 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::setFAC:17 [ main::i#10 char_cursor#32 line_cursor#13 ] ) to:@return setMEMtoFAC: scope:[setMEMtoFAC] from main::@3 main::@6 - [96] (byte*) setMEMtoFAC::mem#2 ← phi( main::@3/(const byte[]) f_127#0 main::@6/(const byte[]) f_i#0 ) [ setMEMtoFAC::mem#2 ] ( main:2::setMEMtoFAC:7 [ setMEMtoFAC::mem#2 ] main:2::setMEMtoFAC:15 [ main::i#10 char_cursor#32 line_cursor#13 setMEMtoFAC::mem#2 ] ) - [97] (byte*) prepareMEM::mem#0 ← (byte*) setMEMtoFAC::mem#2 [ prepareMEM::mem#0 ] ( main:2::setMEMtoFAC:7 [ prepareMEM::mem#0 ] main:2::setMEMtoFAC:15 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#0 ] ) - [98] call prepareMEM param-assignment [ ] ( main:2::setMEMtoFAC:7 [ ] main:2::setMEMtoFAC:15 [ main::i#10 char_cursor#32 line_cursor#13 ] ) + [95] (byte*) setMEMtoFAC::mem#2 ← phi( main::@3/(const byte[]) f_127#0 main::@6/(const byte[]) f_i#0 ) [ setMEMtoFAC::mem#2 ] ( main:2::setMEMtoFAC:7 [ setMEMtoFAC::mem#2 ] main:2::setMEMtoFAC:15 [ main::i#10 char_cursor#32 line_cursor#13 setMEMtoFAC::mem#2 ] ) + [96] (byte*) prepareMEM::mem#1 ← (byte*) setMEMtoFAC::mem#2 [ prepareMEM::mem#1 ] ( main:2::setMEMtoFAC:7 [ prepareMEM::mem#1 ] main:2::setMEMtoFAC:15 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#1 ] ) + [97] call prepareMEM param-assignment [ ] ( main:2::setMEMtoFAC:7 [ ] main:2::setMEMtoFAC:15 [ main::i#10 char_cursor#32 line_cursor#13 ] ) to:setMEMtoFAC::@1 setMEMtoFAC::@1: scope:[setMEMtoFAC] from setMEMtoFAC asm { ldx$feldy$ffjsr$bbd4 } to:setMEMtoFAC::@return setMEMtoFAC::@return: scope:[setMEMtoFAC] from setMEMtoFAC::@1 - [100] return [ ] ( main:2::setMEMtoFAC:7 [ ] main:2::setMEMtoFAC:15 [ main::i#10 char_cursor#32 line_cursor#13 ] ) + [99] return [ ] ( main:2::setMEMtoFAC:7 [ ] main:2::setMEMtoFAC:15 [ main::i#10 char_cursor#32 line_cursor#13 ] ) to:@return diff --git a/src/main/java/dk/camelot64/kickc/test/ref/sinus-basic.log b/src/main/java/dk/camelot64/kickc/test/ref/sinus-basic.log index a09d81be7..81e8668a8 100644 --- a/src/main/java/dk/camelot64/kickc/test/ref/sinus-basic.log +++ b/src/main/java/dk/camelot64/kickc/test/ref/sinus-basic.log @@ -71,13 +71,20 @@ Importing basic-floats // See https://www.c64-wiki.com/wiki/Floating_point_arithmetic // See http://www.pagetable.com/c64rom/c64rom_sc.html +// Zeropage addresses used to hold lo/hi-bytes of addresses of float numbers in MEM +const byte* memLo = $fe; +const byte* memHi = $ff; + +// Prepare MEM pointers for operations using MEM +void prepareMEM(byte* mem) { + *memLo = mem; +} + // FAC = word // Set the FAC (floating point accumulator) to the integer value of a 16bit word void setFAC(word w) { - const byte* lo = $fe; - const byte* hi = $ff; - *lo = w; + prepareMEM((byte*)w); // Load word register Y,A into FAC (floating point accumulator) asm { ldy $fe @@ -90,8 +97,6 @@ void setFAC(word w) { // Get the value of the FAC (floating point accumulator) as an integer 16bit word // Destroys the value in the FAC in the process word getFAC() { - const byte* lo = $fe; - const byte* hi = $ff; // Load FAC (floating point accumulator) integer part into word register Y,A asm { jsr $b1aa @@ -99,8 +104,8 @@ word getFAC() { sta $ff } word w = 0; - w = *hi; + w = *memHi; return w; } @@ -120,16 +125,6 @@ void setFACtoARG() { } } -// Zeropage addresses used to hold lo/hi-bytes of addresses of float numbers in MEM -const byte* memLo = $fe; -const byte* memHi = $ff; - -// Prepare MEM pointers for operations using MEM -void prepareMEM(byte* mem) { - *memLo = mem; -} - // MEM = FAC // Stores the value of the FAC to memory // Stores 5 bytes (means it is necessary to allocate 5 bytes to avoid clobbering other data using eg. byte[] mem = {0, 0, 0, 0, 0};) @@ -335,8 +330,8 @@ void logFAC() { } } -Fixing lo/hi-lvalue lo=(getFAC::w) ← *(getFAC::lo) -Fixing lo/hi-lvalue hi=(getFAC::w) ← *(getFAC::hi) +Fixing lo/hi-lvalue lo=(getFAC::w) ← *(memLo) +Fixing lo/hi-lvalue hi=(getFAC::w) ← *(memHi) PROGRAM (byte*) line_cursor ← (word/signed word) 1024 (byte*) char_cursor ← (byte*) line_cursor @@ -389,24 +384,28 @@ proc (void()) print_char((byte) print_char::ch) print_char::@return: return endproc // print_char() + (byte*) memLo ← (byte/word/signed word) 254 + (byte*) memHi ← (byte/word/signed word) 255 +proc (void()) prepareMEM((byte*) prepareMEM::mem) + (byte~) prepareMEM::$0 ← < (byte*) prepareMEM::mem + *((byte*) memLo) ← (byte~) prepareMEM::$0 + (byte~) prepareMEM::$1 ← > (byte*) prepareMEM::mem + *((byte*) memHi) ← (byte~) prepareMEM::$1 +prepareMEM::@return: + return +endproc // prepareMEM() proc (void()) setFAC((word) setFAC::w) - (byte*) setFAC::lo ← (byte/word/signed word) 254 - (byte*) setFAC::hi ← (byte/word/signed word) 255 - (byte~) setFAC::$0 ← < (word) setFAC::w - *((byte*) setFAC::lo) ← (byte~) setFAC::$0 - (byte~) setFAC::$1 ← > (word) setFAC::w - *((byte*) setFAC::hi) ← (byte~) setFAC::$1 + (byte*~) setFAC::$0 ← ((byte*)) (word) setFAC::w + (void~) setFAC::$1 ← call prepareMEM (byte*~) setFAC::$0 asm { ldy$felda$ffjsr$b391 } setFAC::@return: return endproc // setFAC() proc (word()) getFAC() - (byte*) getFAC::lo ← (byte/word/signed word) 254 - (byte*) getFAC::hi ← (byte/word/signed word) 255 asm { jsr$b1aasty$festa$ff } (word) getFAC::w ← (byte/signed byte/word/signed word) 0 - (word) getFAC::w ← (word) getFAC::w lo= *((byte*) getFAC::lo) - (word) getFAC::w ← (word) getFAC::w hi= *((byte*) getFAC::hi) + (word) getFAC::w ← (word) getFAC::w lo= *((byte*) memLo) + (word) getFAC::w ← (word) getFAC::w hi= *((byte*) memHi) (word) getFAC::return ← (word) getFAC::w goto getFAC::@return getFAC::@return: @@ -423,16 +422,6 @@ proc (void()) setFACtoARG() setFACtoARG::@return: return endproc // setFACtoARG() - (byte*) memLo ← (byte/word/signed word) 254 - (byte*) memHi ← (byte/word/signed word) 255 -proc (void()) prepareMEM((byte*) prepareMEM::mem) - (byte~) prepareMEM::$0 ← < (byte*) prepareMEM::mem - *((byte*) memLo) ← (byte~) prepareMEM::$0 - (byte~) prepareMEM::$1 ← > (byte*) prepareMEM::mem - *((byte*) memHi) ← (byte~) prepareMEM::$1 -prepareMEM::@return: - return -endproc // prepareMEM() proc (void()) setMEMtoFAC((byte*) setMEMtoFAC::mem) (void~) setMEMtoFAC::$0 ← call prepareMEM (byte*) setMEMtoFAC::mem asm { ldx$feldy$ffjsr$bbd4 } @@ -592,8 +581,6 @@ SYMBOLS (byte[]) f_i (word()) getFAC() (label) getFAC::@return -(byte*) getFAC::hi -(byte*) getFAC::lo (word) getFAC::return (word) getFAC::w (byte[]) hextab @@ -674,11 +661,9 @@ SYMBOLS (label) setARGtoMEM::@return (byte*) setARGtoMEM::mem (void()) setFAC((word) setFAC::w) -(byte~) setFAC::$0 -(byte~) setFAC::$1 +(byte*~) setFAC::$0 +(void~) setFAC::$1 (label) setFAC::@return -(byte*) setFAC::hi -(byte*) setFAC::lo (word) setFAC::w (void()) setFACto2PI() (label) setFACto2PI::@return @@ -708,10 +693,6 @@ SYMBOLS (label) tanFAC::@return Promoting word/signed word to byte* in line_cursor ← ((byte*)) 1024 -Promoting byte/word/signed word to byte* in setFAC::lo ← ((byte*)) 254 -Promoting byte/word/signed word to byte* in setFAC::hi ← ((byte*)) 255 -Promoting byte/word/signed word to byte* in getFAC::lo ← ((byte*)) 254 -Promoting byte/word/signed word to byte* in getFAC::hi ← ((byte*)) 255 Promoting byte/word/signed word to byte* in memLo ← ((byte*)) 254 Promoting byte/word/signed word to byte* in memHi ← ((byte*)) 255 Promoting word to byte* in f_2pi ← ((byte*)) 58085 @@ -793,28 +774,35 @@ print_char::@return: scope:[print_char] from print_char return to:@return @5: scope:[] from @4 + (byte*) memLo ← ((byte*)) (byte/word/signed word) 254 + (byte*) memHi ← ((byte*)) (byte/word/signed word) 255 to:@6 +prepareMEM: scope:[prepareMEM] from + (byte~) prepareMEM::$0 ← < (byte*) prepareMEM::mem + *((byte*) memLo) ← (byte~) prepareMEM::$0 + (byte~) prepareMEM::$1 ← > (byte*) prepareMEM::mem + *((byte*) memHi) ← (byte~) prepareMEM::$1 + to:prepareMEM::@return +prepareMEM::@return: scope:[prepareMEM] from prepareMEM + return + to:@return +@6: scope:[] from @5 + to:@7 setFAC: scope:[setFAC] from - (byte*) setFAC::lo ← ((byte*)) (byte/word/signed word) 254 - (byte*) setFAC::hi ← ((byte*)) (byte/word/signed word) 255 - (byte~) setFAC::$0 ← < (word) setFAC::w - *((byte*) setFAC::lo) ← (byte~) setFAC::$0 - (byte~) setFAC::$1 ← > (word) setFAC::w - *((byte*) setFAC::hi) ← (byte~) setFAC::$1 + (byte*~) setFAC::$0 ← ((byte*)) (word) setFAC::w + (void~) setFAC::$1 ← call prepareMEM (byte*~) setFAC::$0 asm { ldy$felda$ffjsr$b391 } to:setFAC::@return setFAC::@return: scope:[setFAC] from setFAC return to:@return -@6: scope:[] from @5 - to:@7 +@7: scope:[] from @6 + to:@8 getFAC: scope:[getFAC] from - (byte*) getFAC::lo ← ((byte*)) (byte/word/signed word) 254 - (byte*) getFAC::hi ← ((byte*)) (byte/word/signed word) 255 asm { jsr$b1aasty$festa$ff } (word) getFAC::w ← (byte/signed byte/word/signed word) 0 - (word) getFAC::w ← (word) getFAC::w lo= *((byte*) getFAC::lo) - (word) getFAC::w ← (word) getFAC::w hi= *((byte*) getFAC::hi) + (word) getFAC::w ← (word) getFAC::w lo= *((byte*) memLo) + (word) getFAC::w ← (word) getFAC::w hi= *((byte*) memHi) (word) getFAC::return ← (word) getFAC::w to:getFAC::@return getFAC::@return: scope:[getFAC] from getFAC getFAC::@1 @@ -823,35 +811,22 @@ getFAC::@return: scope:[getFAC] from getFAC getFAC::@1 to:@return getFAC::@1: scope:[getFAC] from to:getFAC::@return -@7: scope:[] from @6 - to:@8 +@8: scope:[] from @7 + to:@9 setARGtoFAC: scope:[setARGtoFAC] from asm { jsr$bc0f } to:setARGtoFAC::@return setARGtoFAC::@return: scope:[setARGtoFAC] from setARGtoFAC return to:@return -@8: scope:[] from @7 - to:@9 +@9: scope:[] from @8 + to:@10 setFACtoARG: scope:[setFACtoARG] from asm { jsr$bbfc } to:setFACtoARG::@return setFACtoARG::@return: scope:[setFACtoARG] from setFACtoARG return to:@return -@9: scope:[] from @8 - (byte*) memLo ← ((byte*)) (byte/word/signed word) 254 - (byte*) memHi ← ((byte*)) (byte/word/signed word) 255 - to:@10 -prepareMEM: scope:[prepareMEM] from - (byte~) prepareMEM::$0 ← < (byte*) prepareMEM::mem - *((byte*) memLo) ← (byte~) prepareMEM::$0 - (byte~) prepareMEM::$1 ← > (byte*) prepareMEM::mem - *((byte*) memHi) ← (byte~) prepareMEM::$1 - to:prepareMEM::@return -prepareMEM::@return: scope:[prepareMEM] from prepareMEM - return - to:@return @10: scope:[] from @9 to:@11 setMEMtoFAC: scope:[setMEMtoFAC] from @@ -1079,6 +1054,7 @@ Eliminating unused variable - keeping the call (void~) print_word::$1 Eliminating unused variable - keeping the call (void~) print_word::$3 Eliminating unused variable - keeping the call (void~) print_byte::$2 Eliminating unused variable - keeping the call (void~) print_byte::$5 +Eliminating unused variable - keeping the call (void~) setFAC::$1 Eliminating unused variable - keeping the call (void~) setMEMtoFAC::$0 Eliminating unused variable - keeping the call (void~) addMEMtoFAC::$0 Eliminating unused variable - keeping the call (void~) divMEMbyFAC::$0 @@ -1098,11 +1074,11 @@ Eliminating unused variable - keeping the call (void~) main::$13 Removing empty block @1 Removing empty block @2 Removing empty block @4 -Removing empty block @5 Removing empty block @6 -Removing empty block getFAC::@1 Removing empty block @7 +Removing empty block getFAC::@1 Removing empty block @8 +Removing empty block @9 Removing empty block @10 Removing empty block @11 Removing empty block @12 @@ -1154,7 +1130,7 @@ print_word::@return: scope:[print_word] from print_word to:@return @3: scope:[] from @begin (byte[]) hextab ← { (byte) '0', (byte) '1', (byte) '2', (byte) '3', (byte) '4', (byte) '5', (byte) '6', (byte) '7', (byte) '8', (byte) '9', (byte) 'a', (byte) 'b', (byte) 'c', (byte) 'd', (byte) 'e', (byte) 'f' } - to:@9 + to:@5 print_byte: scope:[print_byte] from (byte~) print_byte::$0 ← (byte) print_byte::b >> (byte/signed byte/word/signed word) 4 (byte~) print_byte::$1 ← (byte[]) hextab *idx (byte~) print_byte::$0 @@ -1173,32 +1149,7 @@ print_char: scope:[print_char] from print_char::@return: scope:[print_char] from print_char return to:@return -setFAC: scope:[setFAC] from - (byte*) setFAC::lo ← ((byte*)) (byte/word/signed word) 254 - (byte*) setFAC::hi ← ((byte*)) (byte/word/signed word) 255 - (byte~) setFAC::$0 ← < (word) setFAC::w - *((byte*) setFAC::lo) ← (byte~) setFAC::$0 - (byte~) setFAC::$1 ← > (word) setFAC::w - *((byte*) setFAC::hi) ← (byte~) setFAC::$1 - asm { ldy$felda$ffjsr$b391 } - to:setFAC::@return -setFAC::@return: scope:[setFAC] from setFAC - return - to:@return -getFAC: scope:[getFAC] from - (byte*) getFAC::lo ← ((byte*)) (byte/word/signed word) 254 - (byte*) getFAC::hi ← ((byte*)) (byte/word/signed word) 255 - asm { jsr$b1aasty$festa$ff } - (word) getFAC::w ← (byte/signed byte/word/signed word) 0 - (word) getFAC::w ← (word) getFAC::w lo= *((byte*) getFAC::lo) - (word) getFAC::w ← (word) getFAC::w hi= *((byte*) getFAC::hi) - (word) getFAC::return ← (word) getFAC::w - to:getFAC::@return -getFAC::@return: scope:[getFAC] from getFAC - (word) getFAC::return ← (word) getFAC::return - return (word) getFAC::return - to:@return -@9: scope:[] from @3 +@5: scope:[] from @3 (byte*) memLo ← ((byte*)) (byte/word/signed word) 254 (byte*) memHi ← ((byte*)) (byte/word/signed word) 255 to:@30 @@ -1211,6 +1162,25 @@ prepareMEM: scope:[prepareMEM] from prepareMEM::@return: scope:[prepareMEM] from prepareMEM return to:@return +setFAC: scope:[setFAC] from + (byte*~) setFAC::$0 ← ((byte*)) (word) setFAC::w + call prepareMEM (byte*~) setFAC::$0 + asm { ldy$felda$ffjsr$b391 } + to:setFAC::@return +setFAC::@return: scope:[setFAC] from setFAC + return + to:@return +getFAC: scope:[getFAC] from + asm { jsr$b1aasty$festa$ff } + (word) getFAC::w ← (byte/signed byte/word/signed word) 0 + (word) getFAC::w ← (word) getFAC::w lo= *((byte*) memLo) + (word) getFAC::w ← (word) getFAC::w hi= *((byte*) memHi) + (word) getFAC::return ← (word) getFAC::w + to:getFAC::@return +getFAC::@return: scope:[getFAC] from getFAC + (word) getFAC::return ← (word) getFAC::return + return (word) getFAC::return + to:@return setMEMtoFAC: scope:[setMEMtoFAC] from call prepareMEM (byte*) setMEMtoFAC::mem asm { ldx$feldy$ffjsr$bbd4 } @@ -1245,7 +1215,7 @@ sinFAC: scope:[sinFAC] from sinFAC::@return: scope:[sinFAC] from sinFAC return to:@return -@30: scope:[] from @9 +@30: scope:[] from @5 (byte[]) f_i ← { (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0 } (byte[]) f_127 ← { (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0 } (byte*) f_2pi ← ((byte*)) (word) 58085 @@ -1330,7 +1300,7 @@ print_word::@return: scope:[print_word] from print_word::@2 to:@return @3: scope:[] from @begin (byte[]) hextab ← { (byte) '0', (byte) '1', (byte) '2', (byte) '3', (byte) '4', (byte) '5', (byte) '6', (byte) '7', (byte) '8', (byte) '9', (byte) 'a', (byte) 'b', (byte) 'c', (byte) 'd', (byte) 'e', (byte) 'f' } - to:@9 + to:@5 print_byte: scope:[print_byte] from print_word print_word::@1 (byte~) print_byte::$0 ← (byte) print_byte::b >> (byte/signed byte/word/signed word) 4 (byte~) print_byte::$1 ← (byte[]) hextab *idx (byte~) print_byte::$0 @@ -1359,36 +1329,11 @@ print_char::@return: scope:[print_char] from print_char (byte*) char_cursor ← (byte*) char_cursor return to:@return -setFAC: scope:[setFAC] from main main::@1 main::@7 - (byte*) setFAC::lo ← ((byte*)) (byte/word/signed word) 254 - (byte*) setFAC::hi ← ((byte*)) (byte/word/signed word) 255 - (byte~) setFAC::$0 ← < (word) setFAC::w - *((byte*) setFAC::lo) ← (byte~) setFAC::$0 - (byte~) setFAC::$1 ← > (word) setFAC::w - *((byte*) setFAC::hi) ← (byte~) setFAC::$1 - asm { ldy$felda$ffjsr$b391 } - to:setFAC::@return -setFAC::@return: scope:[setFAC] from setFAC - return - to:@return -getFAC: scope:[getFAC] from main::@12 - (byte*) getFAC::lo ← ((byte*)) (byte/word/signed word) 254 - (byte*) getFAC::hi ← ((byte*)) (byte/word/signed word) 255 - asm { jsr$b1aasty$festa$ff } - (word) getFAC::w ← (byte/signed byte/word/signed word) 0 - (word) getFAC::w ← (word) getFAC::w lo= *((byte*) getFAC::lo) - (word) getFAC::w ← (word) getFAC::w hi= *((byte*) getFAC::hi) - (word) getFAC::return ← (word) getFAC::w - to:getFAC::@return -getFAC::@return: scope:[getFAC] from getFAC - (word) getFAC::return ← (word) getFAC::return - return (word) getFAC::return - to:@return -@9: scope:[] from @3 +@5: scope:[] from @3 (byte*) memLo ← ((byte*)) (byte/word/signed word) 254 (byte*) memHi ← ((byte*)) (byte/word/signed word) 255 to:@30 -prepareMEM: scope:[prepareMEM] from addMEMtoFAC divMEMbyFAC mulFACbyMEM setMEMtoFAC +prepareMEM: scope:[prepareMEM] from addMEMtoFAC divMEMbyFAC mulFACbyMEM setFAC setMEMtoFAC (byte~) prepareMEM::$0 ← < (byte*) prepareMEM::mem *((byte*) memLo) ← (byte~) prepareMEM::$0 (byte~) prepareMEM::$1 ← > (byte*) prepareMEM::mem @@ -1397,6 +1342,28 @@ prepareMEM: scope:[prepareMEM] from addMEMtoFAC divMEMbyFAC mulFACbyMEM setMEMt prepareMEM::@return: scope:[prepareMEM] from prepareMEM return to:@return +setFAC: scope:[setFAC] from main main::@1 main::@7 + (byte*~) setFAC::$0 ← ((byte*)) (word) setFAC::w + (byte*) prepareMEM::mem ← (byte*~) setFAC::$0 + call prepareMEM param-assignment + to:setFAC::@1 +setFAC::@1: scope:[setFAC] from setFAC + asm { ldy$felda$ffjsr$b391 } + to:setFAC::@return +setFAC::@return: scope:[setFAC] from setFAC::@1 + return + to:@return +getFAC: scope:[getFAC] from main::@12 + asm { jsr$b1aasty$festa$ff } + (word) getFAC::w ← (byte/signed byte/word/signed word) 0 + (word) getFAC::w ← (word) getFAC::w lo= *((byte*) memLo) + (word) getFAC::w ← (word) getFAC::w hi= *((byte*) memHi) + (word) getFAC::return ← (word) getFAC::w + to:getFAC::@return +getFAC::@return: scope:[getFAC] from getFAC + (word) getFAC::return ← (word) getFAC::return + return (word) getFAC::return + to:@return setMEMtoFAC: scope:[setMEMtoFAC] from main::@3 main::@6 (byte*) prepareMEM::mem ← (byte*) setMEMtoFAC::mem call prepareMEM param-assignment @@ -1443,7 +1410,7 @@ sinFAC: scope:[sinFAC] from main::@9 sinFAC::@return: scope:[sinFAC] from sinFAC return to:@return -@30: scope:[] from @9 +@30: scope:[] from @5 (byte[]) f_i ← { (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0 } (byte[]) f_127 ← { (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0 } (byte*) f_2pi ← ((byte*)) (word) 58085 @@ -1600,7 +1567,7 @@ print_word::@return: scope:[print_word] from print_word::@2 (byte*) line_cursor#19 ← phi( @begin/(byte*) line_cursor#0 ) (byte*) char_cursor#38 ← phi( @begin/(byte*) char_cursor#0 ) (byte[]) hextab#0 ← { (byte) '0', (byte) '1', (byte) '2', (byte) '3', (byte) '4', (byte) '5', (byte) '6', (byte) '7', (byte) '8', (byte) '9', (byte) 'a', (byte) 'b', (byte) 'c', (byte) 'd', (byte) 'e', (byte) 'f' } - to:@9 + to:@5 print_byte: scope:[print_byte] from print_word print_word::@1 (byte*) char_cursor#31 ← phi( print_word/(byte*) char_cursor#30 print_word::@1/(byte*) char_cursor#3 ) (byte[]) hextab#1 ← phi( print_word/(byte[]) hextab#3 print_word::@1/(byte[]) hextab#4 ) @@ -1640,26 +1607,40 @@ print_char::@return: scope:[print_char] from print_char (byte*) char_cursor#10 ← (byte*) char_cursor#24 return to:@return +@5: scope:[] from @3 + (byte[]) hextab#22 ← phi( @3/(byte[]) hextab#0 ) + (byte*) line_cursor#17 ← phi( @3/(byte*) line_cursor#19 ) + (byte*) char_cursor#36 ← phi( @3/(byte*) char_cursor#38 ) + (byte*) memLo#0 ← ((byte*)) (byte/word/signed word) 254 + (byte*) memHi#0 ← ((byte*)) (byte/word/signed word) 255 + to:@30 +prepareMEM: scope:[prepareMEM] from addMEMtoFAC divMEMbyFAC mulFACbyMEM setFAC setMEMtoFAC + (byte*) prepareMEM::mem#5 ← phi( addMEMtoFAC/(byte*) prepareMEM::mem#2 divMEMbyFAC/(byte*) prepareMEM::mem#3 mulFACbyMEM/(byte*) prepareMEM::mem#4 setFAC/(byte*) prepareMEM::mem#0 setMEMtoFAC/(byte*) prepareMEM::mem#1 ) + (byte~) prepareMEM::$0 ← < (byte*) prepareMEM::mem#5 + *((byte*) memLo#0) ← (byte~) prepareMEM::$0 + (byte~) prepareMEM::$1 ← > (byte*) prepareMEM::mem#5 + *((byte*) memHi#0) ← (byte~) prepareMEM::$1 + to:prepareMEM::@return +prepareMEM::@return: scope:[prepareMEM] from prepareMEM + return + to:@return setFAC: scope:[setFAC] from main main::@1 main::@7 (word) setFAC::w#3 ← phi( main/(word) setFAC::w#0 main::@1/(word) setFAC::w#1 main::@7/(word) setFAC::w#2 ) - (byte*) setFAC::lo#0 ← ((byte*)) (byte/word/signed word) 254 - (byte*) setFAC::hi#0 ← ((byte*)) (byte/word/signed word) 255 - (byte~) setFAC::$0 ← < (word) setFAC::w#3 - *((byte*) setFAC::lo#0) ← (byte~) setFAC::$0 - (byte~) setFAC::$1 ← > (word) setFAC::w#3 - *((byte*) setFAC::hi#0) ← (byte~) setFAC::$1 + (byte*~) setFAC::$0 ← ((byte*)) (word) setFAC::w#3 + (byte*) prepareMEM::mem#0 ← (byte*~) setFAC::$0 + call prepareMEM param-assignment + to:setFAC::@1 +setFAC::@1: scope:[setFAC] from setFAC asm { ldy$felda$ffjsr$b391 } to:setFAC::@return -setFAC::@return: scope:[setFAC] from setFAC +setFAC::@return: scope:[setFAC] from setFAC::@1 return to:@return getFAC: scope:[getFAC] from main::@12 - (byte*) getFAC::lo#0 ← ((byte*)) (byte/word/signed word) 254 - (byte*) getFAC::hi#0 ← ((byte*)) (byte/word/signed word) 255 asm { jsr$b1aasty$festa$ff } (word) getFAC::w#0 ← (byte/signed byte/word/signed word) 0 - (word) getFAC::w#1 ← (word) getFAC::w#0 lo= *((byte*) getFAC::lo#0) - (word) getFAC::w#2 ← (word) getFAC::w#1 hi= *((byte*) getFAC::hi#0) + (word) getFAC::w#1 ← (word) getFAC::w#0 lo= *((byte*) memLo#0) + (word) getFAC::w#2 ← (word) getFAC::w#1 hi= *((byte*) memHi#0) (word) getFAC::return#0 ← (word) getFAC::w#2 to:getFAC::@return getFAC::@return: scope:[getFAC] from getFAC @@ -1667,26 +1648,9 @@ getFAC::@return: scope:[getFAC] from getFAC (word) getFAC::return#1 ← (word) getFAC::return#3 return (word) getFAC::return#1 to:@return -@9: scope:[] from @3 - (byte[]) hextab#22 ← phi( @3/(byte[]) hextab#0 ) - (byte*) line_cursor#17 ← phi( @3/(byte*) line_cursor#19 ) - (byte*) char_cursor#36 ← phi( @3/(byte*) char_cursor#38 ) - (byte*) memLo#0 ← ((byte*)) (byte/word/signed word) 254 - (byte*) memHi#0 ← ((byte*)) (byte/word/signed word) 255 - to:@30 -prepareMEM: scope:[prepareMEM] from addMEMtoFAC divMEMbyFAC mulFACbyMEM setMEMtoFAC - (byte*) prepareMEM::mem#4 ← phi( addMEMtoFAC/(byte*) prepareMEM::mem#1 divMEMbyFAC/(byte*) prepareMEM::mem#2 mulFACbyMEM/(byte*) prepareMEM::mem#3 setMEMtoFAC/(byte*) prepareMEM::mem#0 ) - (byte~) prepareMEM::$0 ← < (byte*) prepareMEM::mem#4 - *((byte*) memLo#0) ← (byte~) prepareMEM::$0 - (byte~) prepareMEM::$1 ← > (byte*) prepareMEM::mem#4 - *((byte*) memHi#0) ← (byte~) prepareMEM::$1 - to:prepareMEM::@return -prepareMEM::@return: scope:[prepareMEM] from prepareMEM - return - to:@return setMEMtoFAC: scope:[setMEMtoFAC] from main::@3 main::@6 (byte*) setMEMtoFAC::mem#2 ← phi( main::@3/(byte*) setMEMtoFAC::mem#0 main::@6/(byte*) setMEMtoFAC::mem#1 ) - (byte*) prepareMEM::mem#0 ← (byte*) setMEMtoFAC::mem#2 + (byte*) prepareMEM::mem#1 ← (byte*) setMEMtoFAC::mem#2 call prepareMEM param-assignment to:setMEMtoFAC::@1 setMEMtoFAC::@1: scope:[setMEMtoFAC] from setMEMtoFAC @@ -1697,7 +1661,7 @@ setMEMtoFAC::@return: scope:[setMEMtoFAC] from setMEMtoFAC::@1 to:@return addMEMtoFAC: scope:[addMEMtoFAC] from main::@11 (byte*) addMEMtoFAC::mem#1 ← phi( main::@11/(byte*) addMEMtoFAC::mem#0 ) - (byte*) prepareMEM::mem#1 ← (byte*) addMEMtoFAC::mem#1 + (byte*) prepareMEM::mem#2 ← (byte*) addMEMtoFAC::mem#1 call prepareMEM param-assignment to:addMEMtoFAC::@1 addMEMtoFAC::@1: scope:[addMEMtoFAC] from addMEMtoFAC @@ -1708,7 +1672,7 @@ addMEMtoFAC::@return: scope:[addMEMtoFAC] from addMEMtoFAC::@1 to:@return divMEMbyFAC: scope:[divMEMbyFAC] from main::@8 (byte*) divMEMbyFAC::mem#1 ← phi( main::@8/(byte*) divMEMbyFAC::mem#0 ) - (byte*) prepareMEM::mem#2 ← (byte*) divMEMbyFAC::mem#1 + (byte*) prepareMEM::mem#3 ← (byte*) divMEMbyFAC::mem#1 call prepareMEM param-assignment to:divMEMbyFAC::@1 divMEMbyFAC::@1: scope:[divMEMbyFAC] from divMEMbyFAC @@ -1719,7 +1683,7 @@ divMEMbyFAC::@return: scope:[divMEMbyFAC] from divMEMbyFAC::@1 to:@return mulFACbyMEM: scope:[mulFACbyMEM] from main::@10 main::@5 (byte*) mulFACbyMEM::mem#2 ← phi( main::@10/(byte*) mulFACbyMEM::mem#1 main::@5/(byte*) mulFACbyMEM::mem#0 ) - (byte*) prepareMEM::mem#3 ← (byte*) mulFACbyMEM::mem#2 + (byte*) prepareMEM::mem#4 ← (byte*) mulFACbyMEM::mem#2 call prepareMEM param-assignment to:mulFACbyMEM::@1 mulFACbyMEM::@1: scope:[mulFACbyMEM] from mulFACbyMEM @@ -1734,10 +1698,10 @@ sinFAC: scope:[sinFAC] from main::@9 sinFAC::@return: scope:[sinFAC] from sinFAC return to:@return -@30: scope:[] from @9 - (byte[]) hextab#21 ← phi( @9/(byte[]) hextab#22 ) - (byte*) line_cursor#16 ← phi( @9/(byte*) line_cursor#17 ) - (byte*) char_cursor#35 ← phi( @9/(byte*) char_cursor#36 ) +@30: scope:[] from @5 + (byte[]) hextab#21 ← phi( @5/(byte[]) hextab#22 ) + (byte*) line_cursor#16 ← phi( @5/(byte*) line_cursor#17 ) + (byte*) char_cursor#35 ← phi( @5/(byte*) char_cursor#36 ) (byte[]) f_i#0 ← { (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0 } (byte[]) f_127#0 ← { (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0 } (byte*) f_2pi#0 ← ((byte*)) (word) 58085 @@ -1989,7 +1953,7 @@ print_word::@return: scope:[print_word] from print_word::@2 (byte*) line_cursor#19 ← phi( @begin/(byte*) line_cursor#0 ) (byte*) char_cursor#38 ← phi( @begin/(byte*) char_cursor#0 ) (byte[]) hextab#0 ← { (byte) '0', (byte) '1', (byte) '2', (byte) '3', (byte) '4', (byte) '5', (byte) '6', (byte) '7', (byte) '8', (byte) '9', (byte) 'a', (byte) 'b', (byte) 'c', (byte) 'd', (byte) 'e', (byte) 'f' } - to:@9 + to:@5 print_byte: scope:[print_byte] from print_word print_word::@1 (byte*) char_cursor#31 ← phi( print_word/(byte*) char_cursor#30 print_word::@1/(byte*) char_cursor#3 ) (byte[]) hextab#1 ← phi( print_word/(byte[]) hextab#3 print_word::@1/(byte[]) hextab#4 ) @@ -2029,26 +1993,40 @@ print_char::@return: scope:[print_char] from print_char (byte*) char_cursor#10 ← (byte*) char_cursor#24 return to:@return +@5: scope:[] from @3 + (byte[]) hextab#22 ← phi( @3/(byte[]) hextab#0 ) + (byte*) line_cursor#17 ← phi( @3/(byte*) line_cursor#19 ) + (byte*) char_cursor#36 ← phi( @3/(byte*) char_cursor#38 ) + (byte*) memLo#0 ← ((byte*)) (byte/word/signed word) 254 + (byte*) memHi#0 ← ((byte*)) (byte/word/signed word) 255 + to:@30 +prepareMEM: scope:[prepareMEM] from addMEMtoFAC divMEMbyFAC mulFACbyMEM setFAC setMEMtoFAC + (byte*) prepareMEM::mem#5 ← phi( addMEMtoFAC/(byte*) prepareMEM::mem#2 divMEMbyFAC/(byte*) prepareMEM::mem#3 mulFACbyMEM/(byte*) prepareMEM::mem#4 setFAC/(byte*) prepareMEM::mem#0 setMEMtoFAC/(byte*) prepareMEM::mem#1 ) + (byte~) prepareMEM::$0 ← < (byte*) prepareMEM::mem#5 + *((byte*) memLo#0) ← (byte~) prepareMEM::$0 + (byte~) prepareMEM::$1 ← > (byte*) prepareMEM::mem#5 + *((byte*) memHi#0) ← (byte~) prepareMEM::$1 + to:prepareMEM::@return +prepareMEM::@return: scope:[prepareMEM] from prepareMEM + return + to:@return setFAC: scope:[setFAC] from main main::@1 main::@7 (word) setFAC::w#3 ← phi( main/(word) setFAC::w#0 main::@1/(word) setFAC::w#1 main::@7/(word) setFAC::w#2 ) - (byte*) setFAC::lo#0 ← ((byte*)) (byte/word/signed word) 254 - (byte*) setFAC::hi#0 ← ((byte*)) (byte/word/signed word) 255 - (byte~) setFAC::$0 ← < (word) setFAC::w#3 - *((byte*) setFAC::lo#0) ← (byte~) setFAC::$0 - (byte~) setFAC::$1 ← > (word) setFAC::w#3 - *((byte*) setFAC::hi#0) ← (byte~) setFAC::$1 + (byte*~) setFAC::$0 ← ((byte*)) (word) setFAC::w#3 + (byte*) prepareMEM::mem#0 ← (byte*~) setFAC::$0 + call prepareMEM param-assignment + to:setFAC::@1 +setFAC::@1: scope:[setFAC] from setFAC asm { ldy$felda$ffjsr$b391 } to:setFAC::@return -setFAC::@return: scope:[setFAC] from setFAC +setFAC::@return: scope:[setFAC] from setFAC::@1 return to:@return getFAC: scope:[getFAC] from main::@12 - (byte*) getFAC::lo#0 ← ((byte*)) (byte/word/signed word) 254 - (byte*) getFAC::hi#0 ← ((byte*)) (byte/word/signed word) 255 asm { jsr$b1aasty$festa$ff } (word) getFAC::w#0 ← (byte/signed byte/word/signed word) 0 - (word) getFAC::w#1 ← (word) getFAC::w#0 lo= *((byte*) getFAC::lo#0) - (word) getFAC::w#2 ← (word) getFAC::w#1 hi= *((byte*) getFAC::hi#0) + (word) getFAC::w#1 ← (word) getFAC::w#0 lo= *((byte*) memLo#0) + (word) getFAC::w#2 ← (word) getFAC::w#1 hi= *((byte*) memHi#0) (word) getFAC::return#0 ← (word) getFAC::w#2 to:getFAC::@return getFAC::@return: scope:[getFAC] from getFAC @@ -2056,26 +2034,9 @@ getFAC::@return: scope:[getFAC] from getFAC (word) getFAC::return#1 ← (word) getFAC::return#3 return to:@return -@9: scope:[] from @3 - (byte[]) hextab#22 ← phi( @3/(byte[]) hextab#0 ) - (byte*) line_cursor#17 ← phi( @3/(byte*) line_cursor#19 ) - (byte*) char_cursor#36 ← phi( @3/(byte*) char_cursor#38 ) - (byte*) memLo#0 ← ((byte*)) (byte/word/signed word) 254 - (byte*) memHi#0 ← ((byte*)) (byte/word/signed word) 255 - to:@30 -prepareMEM: scope:[prepareMEM] from addMEMtoFAC divMEMbyFAC mulFACbyMEM setMEMtoFAC - (byte*) prepareMEM::mem#4 ← phi( addMEMtoFAC/(byte*) prepareMEM::mem#1 divMEMbyFAC/(byte*) prepareMEM::mem#2 mulFACbyMEM/(byte*) prepareMEM::mem#3 setMEMtoFAC/(byte*) prepareMEM::mem#0 ) - (byte~) prepareMEM::$0 ← < (byte*) prepareMEM::mem#4 - *((byte*) memLo#0) ← (byte~) prepareMEM::$0 - (byte~) prepareMEM::$1 ← > (byte*) prepareMEM::mem#4 - *((byte*) memHi#0) ← (byte~) prepareMEM::$1 - to:prepareMEM::@return -prepareMEM::@return: scope:[prepareMEM] from prepareMEM - return - to:@return setMEMtoFAC: scope:[setMEMtoFAC] from main::@3 main::@6 (byte*) setMEMtoFAC::mem#2 ← phi( main::@3/(byte*) setMEMtoFAC::mem#0 main::@6/(byte*) setMEMtoFAC::mem#1 ) - (byte*) prepareMEM::mem#0 ← (byte*) setMEMtoFAC::mem#2 + (byte*) prepareMEM::mem#1 ← (byte*) setMEMtoFAC::mem#2 call prepareMEM param-assignment to:setMEMtoFAC::@1 setMEMtoFAC::@1: scope:[setMEMtoFAC] from setMEMtoFAC @@ -2086,7 +2047,7 @@ setMEMtoFAC::@return: scope:[setMEMtoFAC] from setMEMtoFAC::@1 to:@return addMEMtoFAC: scope:[addMEMtoFAC] from main::@11 (byte*) addMEMtoFAC::mem#1 ← phi( main::@11/(byte*) addMEMtoFAC::mem#0 ) - (byte*) prepareMEM::mem#1 ← (byte*) addMEMtoFAC::mem#1 + (byte*) prepareMEM::mem#2 ← (byte*) addMEMtoFAC::mem#1 call prepareMEM param-assignment to:addMEMtoFAC::@1 addMEMtoFAC::@1: scope:[addMEMtoFAC] from addMEMtoFAC @@ -2097,7 +2058,7 @@ addMEMtoFAC::@return: scope:[addMEMtoFAC] from addMEMtoFAC::@1 to:@return divMEMbyFAC: scope:[divMEMbyFAC] from main::@8 (byte*) divMEMbyFAC::mem#1 ← phi( main::@8/(byte*) divMEMbyFAC::mem#0 ) - (byte*) prepareMEM::mem#2 ← (byte*) divMEMbyFAC::mem#1 + (byte*) prepareMEM::mem#3 ← (byte*) divMEMbyFAC::mem#1 call prepareMEM param-assignment to:divMEMbyFAC::@1 divMEMbyFAC::@1: scope:[divMEMbyFAC] from divMEMbyFAC @@ -2108,7 +2069,7 @@ divMEMbyFAC::@return: scope:[divMEMbyFAC] from divMEMbyFAC::@1 to:@return mulFACbyMEM: scope:[mulFACbyMEM] from main::@10 main::@5 (byte*) mulFACbyMEM::mem#2 ← phi( main::@10/(byte*) mulFACbyMEM::mem#1 main::@5/(byte*) mulFACbyMEM::mem#0 ) - (byte*) prepareMEM::mem#3 ← (byte*) mulFACbyMEM::mem#2 + (byte*) prepareMEM::mem#4 ← (byte*) mulFACbyMEM::mem#2 call prepareMEM param-assignment to:mulFACbyMEM::@1 mulFACbyMEM::@1: scope:[mulFACbyMEM] from mulFACbyMEM @@ -2123,10 +2084,10 @@ sinFAC: scope:[sinFAC] from main::@9 sinFAC::@return: scope:[sinFAC] from sinFAC return to:@return -@30: scope:[] from @9 - (byte[]) hextab#21 ← phi( @9/(byte[]) hextab#22 ) - (byte*) line_cursor#16 ← phi( @9/(byte*) line_cursor#17 ) - (byte*) char_cursor#35 ← phi( @9/(byte*) char_cursor#36 ) +@30: scope:[] from @5 + (byte[]) hextab#21 ← phi( @5/(byte[]) hextab#22 ) + (byte*) line_cursor#16 ← phi( @5/(byte*) line_cursor#17 ) + (byte*) char_cursor#35 ← phi( @5/(byte*) char_cursor#36 ) (byte[]) f_i#0 ← { (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0 } (byte[]) f_127#0 ← { (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0 } (byte*) f_2pi#0 ← ((byte*)) (word) 58085 @@ -2326,7 +2287,7 @@ INITIAL SSA SYMBOL TABLE (label) @30 (label) @31 (label) @32 -(label) @9 +(label) @5 (label) @begin (label) @end (void()) addMEMtoFAC((byte*) addMEMtoFAC::mem) @@ -2447,10 +2408,6 @@ INITIAL SSA SYMBOL TABLE (byte[]) f_i#9 (word()) getFAC() (label) getFAC::@return -(byte*) getFAC::hi -(byte*) getFAC::hi#0 -(byte*) getFAC::lo -(byte*) getFAC::lo#0 (word) getFAC::return (word) getFAC::return#0 (word) getFAC::return#1 @@ -2572,6 +2529,7 @@ INITIAL SSA SYMBOL TABLE (byte*) prepareMEM::mem#2 (byte*) prepareMEM::mem#3 (byte*) prepareMEM::mem#4 +(byte*) prepareMEM::mem#5 (void()) print_byte((byte) print_byte::b) (byte~) print_byte::$0 (byte~) print_byte::$1 @@ -2608,13 +2566,9 @@ INITIAL SSA SYMBOL TABLE (word) print_word::w#1 (word) print_word::w#2 (void()) setFAC((word) setFAC::w) -(byte~) setFAC::$0 -(byte~) setFAC::$1 +(byte*~) setFAC::$0 +(label) setFAC::@1 (label) setFAC::@return -(byte*) setFAC::hi -(byte*) setFAC::hi#0 -(byte*) setFAC::lo -(byte*) setFAC::lo#0 (word) setFAC::w (word) setFAC::w#0 (word) setFAC::w#1 @@ -2649,16 +2603,17 @@ Not aliassing across scopes: print_char::ch#1 print_byte::$4 Not aliassing across scopes: char_cursor#21 char_cursor#10 Not aliassing across scopes: print_char::ch#2 print_char::ch#0 Not aliassing across scopes: char_cursor#23 char_cursor#31 +Not aliassing across scopes: prepareMEM::mem#5 prepareMEM::mem#2 Not aliassing across scopes: setFAC::w#3 setFAC::w#0 -Not aliassing across scopes: prepareMEM::mem#4 prepareMEM::mem#1 +Not aliassing across scopes: prepareMEM::mem#0 setFAC::$0 Not aliassing across scopes: setMEMtoFAC::mem#2 setMEMtoFAC::mem#0 -Not aliassing across scopes: prepareMEM::mem#0 setMEMtoFAC::mem#2 +Not aliassing across scopes: prepareMEM::mem#1 setMEMtoFAC::mem#2 Not aliassing across scopes: addMEMtoFAC::mem#1 addMEMtoFAC::mem#0 -Not aliassing across scopes: prepareMEM::mem#1 addMEMtoFAC::mem#1 +Not aliassing across scopes: prepareMEM::mem#2 addMEMtoFAC::mem#1 Not aliassing across scopes: divMEMbyFAC::mem#1 divMEMbyFAC::mem#0 -Not aliassing across scopes: prepareMEM::mem#2 divMEMbyFAC::mem#1 +Not aliassing across scopes: prepareMEM::mem#3 divMEMbyFAC::mem#1 Not aliassing across scopes: mulFACbyMEM::mem#2 mulFACbyMEM::mem#1 -Not aliassing across scopes: prepareMEM::mem#3 mulFACbyMEM::mem#2 +Not aliassing across scopes: prepareMEM::mem#4 mulFACbyMEM::mem#2 Not aliassing across scopes: f_127#4 f_127#6 Not aliassing across scopes: f_2pi#7 f_2pi#9 Not aliassing across scopes: f_i#10 f_i#12 @@ -2696,8 +2651,8 @@ Alias (byte[]) hextab#1 = (byte[]) hextab#2 Alias (byte*) char_cursor#20 = (byte*) char_cursor#6 Alias (byte*) char_cursor#21 = (byte*) char_cursor#7 (byte*) char_cursor#22 (byte*) char_cursor#8 Alias (byte*) char_cursor#10 = (byte*) char_cursor#24 (byte*) char_cursor#9 -Alias (word) getFAC::return#0 = (word) getFAC::w#2 (word) getFAC::return#3 (word) getFAC::return#1 Alias (byte[]) hextab#0 = (byte[]) hextab#22 (byte[]) hextab#21 (byte[]) hextab#20 +Alias (word) getFAC::return#0 = (word) getFAC::w#2 (word) getFAC::return#3 (word) getFAC::return#1 Alias (byte[]) f_127#1 = (byte[]) f_127#4 (byte[]) f_127#13 Alias (byte*) f_2pi#4 = (byte*) f_2pi#5 (byte*) f_2pi#7 Alias (byte[]) f_i#10 = (byte[]) f_i#8 (byte[]) f_i#7 @@ -2768,7 +2723,7 @@ print_word::@return: scope:[print_word] from print_word::@2 @3: scope:[] from @begin (byte*) line_cursor#19 ← phi( @begin/(byte*) line_cursor#0 ) (byte[]) hextab#0 ← { (byte) '0', (byte) '1', (byte) '2', (byte) '3', (byte) '4', (byte) '5', (byte) '6', (byte) '7', (byte) '8', (byte) '9', (byte) 'a', (byte) 'b', (byte) 'c', (byte) 'd', (byte) 'e', (byte) 'f' } - to:@9 + to:@5 print_byte: scope:[print_byte] from print_word print_word::@1 (byte*) char_cursor#31 ← phi( print_word/(byte*) char_cursor#30 print_word::@1/(byte*) char_cursor#17 ) (byte[]) hextab#1 ← phi( print_word/(byte[]) hextab#3 print_word::@1/(byte[]) hextab#3 ) @@ -2800,48 +2755,45 @@ print_char: scope:[print_char] from print_byte print_byte::@1 print_char::@return: scope:[print_char] from print_char return to:@return -setFAC: scope:[setFAC] from main main::@1 main::@7 - (word) setFAC::w#3 ← phi( main/(word) setFAC::w#0 main::@1/(word) setFAC::w#1 main::@7/(word) setFAC::w#2 ) - (byte*) setFAC::lo#0 ← ((byte*)) (byte/word/signed word) 254 - (byte*) setFAC::hi#0 ← ((byte*)) (byte/word/signed word) 255 - (byte~) setFAC::$0 ← < (word) setFAC::w#3 - *((byte*) setFAC::lo#0) ← (byte~) setFAC::$0 - (byte~) setFAC::$1 ← > (word) setFAC::w#3 - *((byte*) setFAC::hi#0) ← (byte~) setFAC::$1 - asm { ldy$felda$ffjsr$b391 } - to:setFAC::@return -setFAC::@return: scope:[setFAC] from setFAC - return - to:@return -getFAC: scope:[getFAC] from main::@12 - (byte*) getFAC::lo#0 ← ((byte*)) (byte/word/signed word) 254 - (byte*) getFAC::hi#0 ← ((byte*)) (byte/word/signed word) 255 - asm { jsr$b1aasty$festa$ff } - (word) getFAC::w#0 ← (byte/signed byte/word/signed word) 0 - (word) getFAC::w#1 ← (word) getFAC::w#0 lo= *((byte*) getFAC::lo#0) - (word) getFAC::return#0 ← (word) getFAC::w#1 hi= *((byte*) getFAC::hi#0) - to:getFAC::@return -getFAC::@return: scope:[getFAC] from getFAC - return - to:@return -@9: scope:[] from @3 +@5: scope:[] from @3 (byte*) line_cursor#17 ← phi( @3/(byte*) line_cursor#19 ) (byte*) memLo#0 ← ((byte*)) (byte/word/signed word) 254 (byte*) memHi#0 ← ((byte*)) (byte/word/signed word) 255 to:@30 -prepareMEM: scope:[prepareMEM] from addMEMtoFAC divMEMbyFAC mulFACbyMEM setMEMtoFAC - (byte*) prepareMEM::mem#4 ← phi( addMEMtoFAC/(byte*) prepareMEM::mem#1 divMEMbyFAC/(byte*) prepareMEM::mem#2 mulFACbyMEM/(byte*) prepareMEM::mem#3 setMEMtoFAC/(byte*) prepareMEM::mem#0 ) - (byte~) prepareMEM::$0 ← < (byte*) prepareMEM::mem#4 +prepareMEM: scope:[prepareMEM] from addMEMtoFAC divMEMbyFAC mulFACbyMEM setFAC setMEMtoFAC + (byte*) prepareMEM::mem#5 ← phi( addMEMtoFAC/(byte*) prepareMEM::mem#2 divMEMbyFAC/(byte*) prepareMEM::mem#3 mulFACbyMEM/(byte*) prepareMEM::mem#4 setFAC/(byte*) prepareMEM::mem#0 setMEMtoFAC/(byte*) prepareMEM::mem#1 ) + (byte~) prepareMEM::$0 ← < (byte*) prepareMEM::mem#5 *((byte*) memLo#0) ← (byte~) prepareMEM::$0 - (byte~) prepareMEM::$1 ← > (byte*) prepareMEM::mem#4 + (byte~) prepareMEM::$1 ← > (byte*) prepareMEM::mem#5 *((byte*) memHi#0) ← (byte~) prepareMEM::$1 to:prepareMEM::@return prepareMEM::@return: scope:[prepareMEM] from prepareMEM return to:@return +setFAC: scope:[setFAC] from main main::@1 main::@7 + (word) setFAC::w#3 ← phi( main/(word) setFAC::w#0 main::@1/(word) setFAC::w#1 main::@7/(word) setFAC::w#2 ) + (byte*~) setFAC::$0 ← ((byte*)) (word) setFAC::w#3 + (byte*) prepareMEM::mem#0 ← (byte*~) setFAC::$0 + call prepareMEM param-assignment + to:setFAC::@1 +setFAC::@1: scope:[setFAC] from setFAC + asm { ldy$felda$ffjsr$b391 } + to:setFAC::@return +setFAC::@return: scope:[setFAC] from setFAC::@1 + return + to:@return +getFAC: scope:[getFAC] from main::@12 + asm { jsr$b1aasty$festa$ff } + (word) getFAC::w#0 ← (byte/signed byte/word/signed word) 0 + (word) getFAC::w#1 ← (word) getFAC::w#0 lo= *((byte*) memLo#0) + (word) getFAC::return#0 ← (word) getFAC::w#1 hi= *((byte*) memHi#0) + to:getFAC::@return +getFAC::@return: scope:[getFAC] from getFAC + return + to:@return setMEMtoFAC: scope:[setMEMtoFAC] from main::@3 main::@6 (byte*) setMEMtoFAC::mem#2 ← phi( main::@3/(byte*) setMEMtoFAC::mem#0 main::@6/(byte*) setMEMtoFAC::mem#1 ) - (byte*) prepareMEM::mem#0 ← (byte*) setMEMtoFAC::mem#2 + (byte*) prepareMEM::mem#1 ← (byte*) setMEMtoFAC::mem#2 call prepareMEM param-assignment to:setMEMtoFAC::@1 setMEMtoFAC::@1: scope:[setMEMtoFAC] from setMEMtoFAC @@ -2852,7 +2804,7 @@ setMEMtoFAC::@return: scope:[setMEMtoFAC] from setMEMtoFAC::@1 to:@return addMEMtoFAC: scope:[addMEMtoFAC] from main::@11 (byte*) addMEMtoFAC::mem#1 ← phi( main::@11/(byte*) addMEMtoFAC::mem#0 ) - (byte*) prepareMEM::mem#1 ← (byte*) addMEMtoFAC::mem#1 + (byte*) prepareMEM::mem#2 ← (byte*) addMEMtoFAC::mem#1 call prepareMEM param-assignment to:addMEMtoFAC::@1 addMEMtoFAC::@1: scope:[addMEMtoFAC] from addMEMtoFAC @@ -2863,7 +2815,7 @@ addMEMtoFAC::@return: scope:[addMEMtoFAC] from addMEMtoFAC::@1 to:@return divMEMbyFAC: scope:[divMEMbyFAC] from main::@8 (byte*) divMEMbyFAC::mem#1 ← phi( main::@8/(byte*) divMEMbyFAC::mem#0 ) - (byte*) prepareMEM::mem#2 ← (byte*) divMEMbyFAC::mem#1 + (byte*) prepareMEM::mem#3 ← (byte*) divMEMbyFAC::mem#1 call prepareMEM param-assignment to:divMEMbyFAC::@1 divMEMbyFAC::@1: scope:[divMEMbyFAC] from divMEMbyFAC @@ -2874,7 +2826,7 @@ divMEMbyFAC::@return: scope:[divMEMbyFAC] from divMEMbyFAC::@1 to:@return mulFACbyMEM: scope:[mulFACbyMEM] from main::@10 main::@5 (byte*) mulFACbyMEM::mem#2 ← phi( main::@10/(byte*) mulFACbyMEM::mem#1 main::@5/(byte*) mulFACbyMEM::mem#0 ) - (byte*) prepareMEM::mem#3 ← (byte*) mulFACbyMEM::mem#2 + (byte*) prepareMEM::mem#4 ← (byte*) mulFACbyMEM::mem#2 call prepareMEM param-assignment to:mulFACbyMEM::@1 mulFACbyMEM::@1: scope:[mulFACbyMEM] from mulFACbyMEM @@ -2889,8 +2841,8 @@ sinFAC: scope:[sinFAC] from main::@9 sinFAC::@return: scope:[sinFAC] from sinFAC return to:@return -@30: scope:[] from @9 - (byte*) line_cursor#16 ← phi( @9/(byte*) line_cursor#17 ) +@30: scope:[] from @5 + (byte*) line_cursor#16 ← phi( @5/(byte*) line_cursor#17 ) (byte[]) f_i#0 ← { (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0 } (byte[]) f_127#0 ← { (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0 } (byte*) f_2pi#0 ← ((byte*)) (word) 58085 @@ -3003,16 +2955,17 @@ Not aliassing across scopes: print_char::ch#1 print_byte::$4 Not aliassing across scopes: char_cursor#21 char_cursor#10 Not aliassing across scopes: print_char::ch#2 print_char::ch#0 Not aliassing across scopes: char_cursor#23 char_cursor#31 +Not aliassing across scopes: prepareMEM::mem#5 prepareMEM::mem#2 Not aliassing across scopes: setFAC::w#3 setFAC::w#0 -Not aliassing across scopes: prepareMEM::mem#4 prepareMEM::mem#1 +Not aliassing across scopes: prepareMEM::mem#0 setFAC::$0 Not aliassing across scopes: setMEMtoFAC::mem#2 setMEMtoFAC::mem#0 -Not aliassing across scopes: prepareMEM::mem#0 setMEMtoFAC::mem#2 +Not aliassing across scopes: prepareMEM::mem#1 setMEMtoFAC::mem#2 Not aliassing across scopes: addMEMtoFAC::mem#1 addMEMtoFAC::mem#0 -Not aliassing across scopes: prepareMEM::mem#1 addMEMtoFAC::mem#1 +Not aliassing across scopes: prepareMEM::mem#2 addMEMtoFAC::mem#1 Not aliassing across scopes: divMEMbyFAC::mem#1 divMEMbyFAC::mem#0 -Not aliassing across scopes: prepareMEM::mem#2 divMEMbyFAC::mem#1 +Not aliassing across scopes: prepareMEM::mem#3 divMEMbyFAC::mem#1 Not aliassing across scopes: mulFACbyMEM::mem#2 mulFACbyMEM::mem#1 -Not aliassing across scopes: prepareMEM::mem#3 mulFACbyMEM::mem#2 +Not aliassing across scopes: prepareMEM::mem#4 mulFACbyMEM::mem#2 Not aliassing across scopes: f_127#1 f_127#0 Not aliassing across scopes: f_2pi#4 f_2pi#0 Not aliassing across scopes: f_i#10 f_i#0 @@ -3084,7 +3037,7 @@ print_word::@return: scope:[print_word] from print_word::@2 to:@return @3: scope:[] from @begin (byte[]) hextab#0 ← { (byte) '0', (byte) '1', (byte) '2', (byte) '3', (byte) '4', (byte) '5', (byte) '6', (byte) '7', (byte) '8', (byte) '9', (byte) 'a', (byte) 'b', (byte) 'c', (byte) 'd', (byte) 'e', (byte) 'f' } - to:@9 + to:@5 print_byte: scope:[print_byte] from print_word print_word::@1 (byte*) char_cursor#31 ← phi( print_word/(byte*) char_cursor#30 print_word::@1/(byte*) char_cursor#17 ) (byte[]) hextab#1 ← phi( print_word/(byte[]) hextab#3 print_word::@1/(byte[]) hextab#3 ) @@ -3116,47 +3069,44 @@ print_char: scope:[print_char] from print_byte print_byte::@1 print_char::@return: scope:[print_char] from print_char return to:@return -setFAC: scope:[setFAC] from main main::@1 main::@7 - (word) setFAC::w#3 ← phi( main/(word) setFAC::w#0 main::@1/(word) setFAC::w#1 main::@7/(word) setFAC::w#2 ) - (byte*) setFAC::lo#0 ← ((byte*)) (byte/word/signed word) 254 - (byte*) setFAC::hi#0 ← ((byte*)) (byte/word/signed word) 255 - (byte~) setFAC::$0 ← < (word) setFAC::w#3 - *((byte*) setFAC::lo#0) ← (byte~) setFAC::$0 - (byte~) setFAC::$1 ← > (word) setFAC::w#3 - *((byte*) setFAC::hi#0) ← (byte~) setFAC::$1 - asm { ldy$felda$ffjsr$b391 } - to:setFAC::@return -setFAC::@return: scope:[setFAC] from setFAC - return - to:@return -getFAC: scope:[getFAC] from main::@12 - (byte*) getFAC::lo#0 ← ((byte*)) (byte/word/signed word) 254 - (byte*) getFAC::hi#0 ← ((byte*)) (byte/word/signed word) 255 - asm { jsr$b1aasty$festa$ff } - (word) getFAC::w#0 ← (byte/signed byte/word/signed word) 0 - (word) getFAC::w#1 ← (word) getFAC::w#0 lo= *((byte*) getFAC::lo#0) - (word) getFAC::return#0 ← (word) getFAC::w#1 hi= *((byte*) getFAC::hi#0) - to:getFAC::@return -getFAC::@return: scope:[getFAC] from getFAC - return - to:@return -@9: scope:[] from @3 +@5: scope:[] from @3 (byte*) memLo#0 ← ((byte*)) (byte/word/signed word) 254 (byte*) memHi#0 ← ((byte*)) (byte/word/signed word) 255 to:@30 -prepareMEM: scope:[prepareMEM] from addMEMtoFAC divMEMbyFAC mulFACbyMEM setMEMtoFAC - (byte*) prepareMEM::mem#4 ← phi( addMEMtoFAC/(byte*) prepareMEM::mem#1 divMEMbyFAC/(byte*) prepareMEM::mem#2 mulFACbyMEM/(byte*) prepareMEM::mem#3 setMEMtoFAC/(byte*) prepareMEM::mem#0 ) - (byte~) prepareMEM::$0 ← < (byte*) prepareMEM::mem#4 +prepareMEM: scope:[prepareMEM] from addMEMtoFAC divMEMbyFAC mulFACbyMEM setFAC setMEMtoFAC + (byte*) prepareMEM::mem#5 ← phi( addMEMtoFAC/(byte*) prepareMEM::mem#2 divMEMbyFAC/(byte*) prepareMEM::mem#3 mulFACbyMEM/(byte*) prepareMEM::mem#4 setFAC/(byte*) prepareMEM::mem#0 setMEMtoFAC/(byte*) prepareMEM::mem#1 ) + (byte~) prepareMEM::$0 ← < (byte*) prepareMEM::mem#5 *((byte*) memLo#0) ← (byte~) prepareMEM::$0 - (byte~) prepareMEM::$1 ← > (byte*) prepareMEM::mem#4 + (byte~) prepareMEM::$1 ← > (byte*) prepareMEM::mem#5 *((byte*) memHi#0) ← (byte~) prepareMEM::$1 to:prepareMEM::@return prepareMEM::@return: scope:[prepareMEM] from prepareMEM return to:@return +setFAC: scope:[setFAC] from main main::@1 main::@7 + (word) setFAC::w#3 ← phi( main/(word) setFAC::w#0 main::@1/(word) setFAC::w#1 main::@7/(word) setFAC::w#2 ) + (byte*~) setFAC::$0 ← ((byte*)) (word) setFAC::w#3 + (byte*) prepareMEM::mem#0 ← (byte*~) setFAC::$0 + call prepareMEM param-assignment + to:setFAC::@1 +setFAC::@1: scope:[setFAC] from setFAC + asm { ldy$felda$ffjsr$b391 } + to:setFAC::@return +setFAC::@return: scope:[setFAC] from setFAC::@1 + return + to:@return +getFAC: scope:[getFAC] from main::@12 + asm { jsr$b1aasty$festa$ff } + (word) getFAC::w#0 ← (byte/signed byte/word/signed word) 0 + (word) getFAC::w#1 ← (word) getFAC::w#0 lo= *((byte*) memLo#0) + (word) getFAC::return#0 ← (word) getFAC::w#1 hi= *((byte*) memHi#0) + to:getFAC::@return +getFAC::@return: scope:[getFAC] from getFAC + return + to:@return setMEMtoFAC: scope:[setMEMtoFAC] from main::@3 main::@6 (byte*) setMEMtoFAC::mem#2 ← phi( main::@3/(byte*) setMEMtoFAC::mem#0 main::@6/(byte*) setMEMtoFAC::mem#1 ) - (byte*) prepareMEM::mem#0 ← (byte*) setMEMtoFAC::mem#2 + (byte*) prepareMEM::mem#1 ← (byte*) setMEMtoFAC::mem#2 call prepareMEM param-assignment to:setMEMtoFAC::@1 setMEMtoFAC::@1: scope:[setMEMtoFAC] from setMEMtoFAC @@ -3167,7 +3117,7 @@ setMEMtoFAC::@return: scope:[setMEMtoFAC] from setMEMtoFAC::@1 to:@return addMEMtoFAC: scope:[addMEMtoFAC] from main::@11 (byte*) addMEMtoFAC::mem#1 ← phi( main::@11/(byte*) addMEMtoFAC::mem#0 ) - (byte*) prepareMEM::mem#1 ← (byte*) addMEMtoFAC::mem#1 + (byte*) prepareMEM::mem#2 ← (byte*) addMEMtoFAC::mem#1 call prepareMEM param-assignment to:addMEMtoFAC::@1 addMEMtoFAC::@1: scope:[addMEMtoFAC] from addMEMtoFAC @@ -3178,7 +3128,7 @@ addMEMtoFAC::@return: scope:[addMEMtoFAC] from addMEMtoFAC::@1 to:@return divMEMbyFAC: scope:[divMEMbyFAC] from main::@8 (byte*) divMEMbyFAC::mem#1 ← phi( main::@8/(byte*) divMEMbyFAC::mem#0 ) - (byte*) prepareMEM::mem#2 ← (byte*) divMEMbyFAC::mem#1 + (byte*) prepareMEM::mem#3 ← (byte*) divMEMbyFAC::mem#1 call prepareMEM param-assignment to:divMEMbyFAC::@1 divMEMbyFAC::@1: scope:[divMEMbyFAC] from divMEMbyFAC @@ -3189,7 +3139,7 @@ divMEMbyFAC::@return: scope:[divMEMbyFAC] from divMEMbyFAC::@1 to:@return mulFACbyMEM: scope:[mulFACbyMEM] from main::@10 main::@5 (byte*) mulFACbyMEM::mem#2 ← phi( main::@10/(byte*) mulFACbyMEM::mem#1 main::@5/(byte*) mulFACbyMEM::mem#0 ) - (byte*) prepareMEM::mem#3 ← (byte*) mulFACbyMEM::mem#2 + (byte*) prepareMEM::mem#4 ← (byte*) mulFACbyMEM::mem#2 call prepareMEM param-assignment to:mulFACbyMEM::@1 mulFACbyMEM::@1: scope:[mulFACbyMEM] from mulFACbyMEM @@ -3204,7 +3154,7 @@ sinFAC: scope:[sinFAC] from main::@9 sinFAC::@return: scope:[sinFAC] from sinFAC return to:@return -@30: scope:[] from @9 +@30: scope:[] from @5 (byte[]) f_i#0 ← { (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0 } (byte[]) f_127#0 ← { (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0 } (byte*) f_2pi#0 ← ((byte*)) (word) 58085 @@ -3316,16 +3266,17 @@ Not aliassing across scopes: print_char::ch#1 print_byte::$4 Not aliassing across scopes: char_cursor#21 char_cursor#10 Not aliassing across scopes: print_char::ch#2 print_char::ch#0 Not aliassing across scopes: char_cursor#23 char_cursor#31 +Not aliassing across scopes: prepareMEM::mem#5 prepareMEM::mem#2 Not aliassing across scopes: setFAC::w#3 setFAC::w#0 -Not aliassing across scopes: prepareMEM::mem#4 prepareMEM::mem#1 +Not aliassing across scopes: prepareMEM::mem#0 setFAC::$0 Not aliassing across scopes: setMEMtoFAC::mem#2 setMEMtoFAC::mem#0 -Not aliassing across scopes: prepareMEM::mem#0 setMEMtoFAC::mem#2 +Not aliassing across scopes: prepareMEM::mem#1 setMEMtoFAC::mem#2 Not aliassing across scopes: addMEMtoFAC::mem#1 addMEMtoFAC::mem#0 -Not aliassing across scopes: prepareMEM::mem#1 addMEMtoFAC::mem#1 +Not aliassing across scopes: prepareMEM::mem#2 addMEMtoFAC::mem#1 Not aliassing across scopes: divMEMbyFAC::mem#1 divMEMbyFAC::mem#0 -Not aliassing across scopes: prepareMEM::mem#2 divMEMbyFAC::mem#1 +Not aliassing across scopes: prepareMEM::mem#3 divMEMbyFAC::mem#1 Not aliassing across scopes: mulFACbyMEM::mem#2 mulFACbyMEM::mem#1 -Not aliassing across scopes: prepareMEM::mem#3 mulFACbyMEM::mem#2 +Not aliassing across scopes: prepareMEM::mem#4 mulFACbyMEM::mem#2 Not aliassing across scopes: f_127#1 f_127#0 Not aliassing across scopes: f_2pi#4 f_2pi#0 Not aliassing across scopes: f_i#10 f_i#0 @@ -3400,7 +3351,7 @@ print_word::@return: scope:[print_word] from print_word::@2 to:@return @3: scope:[] from @begin (byte[]) hextab#0 ← { (byte) '0', (byte) '1', (byte) '2', (byte) '3', (byte) '4', (byte) '5', (byte) '6', (byte) '7', (byte) '8', (byte) '9', (byte) 'a', (byte) 'b', (byte) 'c', (byte) 'd', (byte) 'e', (byte) 'f' } - to:@9 + to:@5 print_byte: scope:[print_byte] from print_word print_word::@1 (byte*) char_cursor#31 ← phi( print_word/(byte*) char_cursor#30 print_word::@1/(byte*) char_cursor#17 ) (byte[]) hextab#1 ← phi( print_word/(byte[]) hextab#3 print_word::@1/(byte[]) hextab#3 ) @@ -3432,47 +3383,44 @@ print_char: scope:[print_char] from print_byte print_byte::@1 print_char::@return: scope:[print_char] from print_char return to:@return -setFAC: scope:[setFAC] from main main::@1 main::@7 - (word) setFAC::w#3 ← phi( main/(word) setFAC::w#0 main::@1/(word) setFAC::w#1 main::@7/(word) setFAC::w#2 ) - (byte*) setFAC::lo#0 ← ((byte*)) (byte/word/signed word) 254 - (byte*) setFAC::hi#0 ← ((byte*)) (byte/word/signed word) 255 - (byte~) setFAC::$0 ← < (word) setFAC::w#3 - *((byte*) setFAC::lo#0) ← (byte~) setFAC::$0 - (byte~) setFAC::$1 ← > (word) setFAC::w#3 - *((byte*) setFAC::hi#0) ← (byte~) setFAC::$1 - asm { ldy$felda$ffjsr$b391 } - to:setFAC::@return -setFAC::@return: scope:[setFAC] from setFAC - return - to:@return -getFAC: scope:[getFAC] from main::@12 - (byte*) getFAC::lo#0 ← ((byte*)) (byte/word/signed word) 254 - (byte*) getFAC::hi#0 ← ((byte*)) (byte/word/signed word) 255 - asm { jsr$b1aasty$festa$ff } - (word) getFAC::w#0 ← (byte/signed byte/word/signed word) 0 - (word) getFAC::w#1 ← (word) getFAC::w#0 lo= *((byte*) getFAC::lo#0) - (word) getFAC::return#0 ← (word) getFAC::w#1 hi= *((byte*) getFAC::hi#0) - to:getFAC::@return -getFAC::@return: scope:[getFAC] from getFAC - return - to:@return -@9: scope:[] from @3 +@5: scope:[] from @3 (byte*) memLo#0 ← ((byte*)) (byte/word/signed word) 254 (byte*) memHi#0 ← ((byte*)) (byte/word/signed word) 255 to:@30 -prepareMEM: scope:[prepareMEM] from addMEMtoFAC divMEMbyFAC mulFACbyMEM setMEMtoFAC - (byte*) prepareMEM::mem#4 ← phi( addMEMtoFAC/(byte*) prepareMEM::mem#1 divMEMbyFAC/(byte*) prepareMEM::mem#2 mulFACbyMEM/(byte*) prepareMEM::mem#3 setMEMtoFAC/(byte*) prepareMEM::mem#0 ) - (byte~) prepareMEM::$0 ← < (byte*) prepareMEM::mem#4 +prepareMEM: scope:[prepareMEM] from addMEMtoFAC divMEMbyFAC mulFACbyMEM setFAC setMEMtoFAC + (byte*) prepareMEM::mem#5 ← phi( addMEMtoFAC/(byte*) prepareMEM::mem#2 divMEMbyFAC/(byte*) prepareMEM::mem#3 mulFACbyMEM/(byte*) prepareMEM::mem#4 setFAC/(byte*) prepareMEM::mem#0 setMEMtoFAC/(byte*) prepareMEM::mem#1 ) + (byte~) prepareMEM::$0 ← < (byte*) prepareMEM::mem#5 *((byte*) memLo#0) ← (byte~) prepareMEM::$0 - (byte~) prepareMEM::$1 ← > (byte*) prepareMEM::mem#4 + (byte~) prepareMEM::$1 ← > (byte*) prepareMEM::mem#5 *((byte*) memHi#0) ← (byte~) prepareMEM::$1 to:prepareMEM::@return prepareMEM::@return: scope:[prepareMEM] from prepareMEM return to:@return +setFAC: scope:[setFAC] from main main::@1 main::@7 + (word) setFAC::w#3 ← phi( main/(word) setFAC::w#0 main::@1/(word) setFAC::w#1 main::@7/(word) setFAC::w#2 ) + (byte*~) setFAC::$0 ← ((byte*)) (word) setFAC::w#3 + (byte*) prepareMEM::mem#0 ← (byte*~) setFAC::$0 + call prepareMEM param-assignment + to:setFAC::@1 +setFAC::@1: scope:[setFAC] from setFAC + asm { ldy$felda$ffjsr$b391 } + to:setFAC::@return +setFAC::@return: scope:[setFAC] from setFAC::@1 + return + to:@return +getFAC: scope:[getFAC] from main::@12 + asm { jsr$b1aasty$festa$ff } + (word) getFAC::w#0 ← (byte/signed byte/word/signed word) 0 + (word) getFAC::w#1 ← (word) getFAC::w#0 lo= *((byte*) memLo#0) + (word) getFAC::return#0 ← (word) getFAC::w#1 hi= *((byte*) memHi#0) + to:getFAC::@return +getFAC::@return: scope:[getFAC] from getFAC + return + to:@return setMEMtoFAC: scope:[setMEMtoFAC] from main::@3 main::@6 (byte*) setMEMtoFAC::mem#2 ← phi( main::@3/(byte*) setMEMtoFAC::mem#0 main::@6/(byte*) setMEMtoFAC::mem#1 ) - (byte*) prepareMEM::mem#0 ← (byte*) setMEMtoFAC::mem#2 + (byte*) prepareMEM::mem#1 ← (byte*) setMEMtoFAC::mem#2 call prepareMEM param-assignment to:setMEMtoFAC::@1 setMEMtoFAC::@1: scope:[setMEMtoFAC] from setMEMtoFAC @@ -3483,7 +3431,7 @@ setMEMtoFAC::@return: scope:[setMEMtoFAC] from setMEMtoFAC::@1 to:@return addMEMtoFAC: scope:[addMEMtoFAC] from main::@11 (byte*) addMEMtoFAC::mem#1 ← phi( main::@11/(byte*) addMEMtoFAC::mem#0 ) - (byte*) prepareMEM::mem#1 ← (byte*) addMEMtoFAC::mem#1 + (byte*) prepareMEM::mem#2 ← (byte*) addMEMtoFAC::mem#1 call prepareMEM param-assignment to:addMEMtoFAC::@1 addMEMtoFAC::@1: scope:[addMEMtoFAC] from addMEMtoFAC @@ -3494,7 +3442,7 @@ addMEMtoFAC::@return: scope:[addMEMtoFAC] from addMEMtoFAC::@1 to:@return divMEMbyFAC: scope:[divMEMbyFAC] from main::@8 (byte*) divMEMbyFAC::mem#1 ← phi( main::@8/(byte*) divMEMbyFAC::mem#0 ) - (byte*) prepareMEM::mem#2 ← (byte*) divMEMbyFAC::mem#1 + (byte*) prepareMEM::mem#3 ← (byte*) divMEMbyFAC::mem#1 call prepareMEM param-assignment to:divMEMbyFAC::@1 divMEMbyFAC::@1: scope:[divMEMbyFAC] from divMEMbyFAC @@ -3505,7 +3453,7 @@ divMEMbyFAC::@return: scope:[divMEMbyFAC] from divMEMbyFAC::@1 to:@return mulFACbyMEM: scope:[mulFACbyMEM] from main::@10 main::@5 (byte*) mulFACbyMEM::mem#2 ← phi( main::@10/(byte*) mulFACbyMEM::mem#1 main::@5/(byte*) mulFACbyMEM::mem#0 ) - (byte*) prepareMEM::mem#3 ← (byte*) mulFACbyMEM::mem#2 + (byte*) prepareMEM::mem#4 ← (byte*) mulFACbyMEM::mem#2 call prepareMEM param-assignment to:mulFACbyMEM::@1 mulFACbyMEM::@1: scope:[mulFACbyMEM] from mulFACbyMEM @@ -3520,7 +3468,7 @@ sinFAC: scope:[sinFAC] from main::@9 sinFAC::@return: scope:[sinFAC] from sinFAC return to:@return -@30: scope:[] from @9 +@30: scope:[] from @5 (byte[]) f_i#0 ← { (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0 } (byte[]) f_127#0 ← { (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0 } (byte*) f_2pi#0 ← ((byte*)) (word) 58085 @@ -3677,7 +3625,7 @@ print_word::@return: scope:[print_word] from print_word::@2 to:@return @3: scope:[] from @begin (byte[]) hextab#0 ← { (byte) '0', (byte) '1', (byte) '2', (byte) '3', (byte) '4', (byte) '5', (byte) '6', (byte) '7', (byte) '8', (byte) '9', (byte) 'a', (byte) 'b', (byte) 'c', (byte) 'd', (byte) 'e', (byte) 'f' } - to:@9 + to:@5 print_byte: scope:[print_byte] from print_word print_word::@1 (byte*) char_cursor#31 ← phi( print_word/(byte*) char_cursor#32 print_word::@1/(byte*) char_cursor#10 ) (byte) print_byte::b#2 ← phi( print_word/(byte) print_byte::b#0 print_word::@1/(byte) print_byte::b#1 ) @@ -3706,47 +3654,44 @@ print_char: scope:[print_char] from print_byte print_byte::@1 print_char::@return: scope:[print_char] from print_char return to:@return -setFAC: scope:[setFAC] from main main::@1 main::@7 - (word) setFAC::w#3 ← phi( main/(word) setFAC::w#0 main::@1/(word) setFAC::w#1 main::@7/(word) setFAC::w#2 ) - (byte*) setFAC::lo#0 ← ((byte*)) (byte/word/signed word) 254 - (byte*) setFAC::hi#0 ← ((byte*)) (byte/word/signed word) 255 - (byte~) setFAC::$0 ← < (word) setFAC::w#3 - *((byte*) setFAC::lo#0) ← (byte~) setFAC::$0 - (byte~) setFAC::$1 ← > (word) setFAC::w#3 - *((byte*) setFAC::hi#0) ← (byte~) setFAC::$1 - asm { ldy$felda$ffjsr$b391 } - to:setFAC::@return -setFAC::@return: scope:[setFAC] from setFAC - return - to:@return -getFAC: scope:[getFAC] from main::@12 - (byte*) getFAC::lo#0 ← ((byte*)) (byte/word/signed word) 254 - (byte*) getFAC::hi#0 ← ((byte*)) (byte/word/signed word) 255 - asm { jsr$b1aasty$festa$ff } - (word) getFAC::w#0 ← (byte/signed byte/word/signed word) 0 - (word) getFAC::w#1 ← (word) getFAC::w#0 lo= *((byte*) getFAC::lo#0) - (word) getFAC::return#0 ← (word) getFAC::w#1 hi= *((byte*) getFAC::hi#0) - to:getFAC::@return -getFAC::@return: scope:[getFAC] from getFAC - return - to:@return -@9: scope:[] from @3 +@5: scope:[] from @3 (byte*) memLo#0 ← ((byte*)) (byte/word/signed word) 254 (byte*) memHi#0 ← ((byte*)) (byte/word/signed word) 255 to:@30 -prepareMEM: scope:[prepareMEM] from addMEMtoFAC divMEMbyFAC mulFACbyMEM setMEMtoFAC - (byte*) prepareMEM::mem#4 ← phi( addMEMtoFAC/(byte*) prepareMEM::mem#1 divMEMbyFAC/(byte*) prepareMEM::mem#2 mulFACbyMEM/(byte*) prepareMEM::mem#3 setMEMtoFAC/(byte*) prepareMEM::mem#0 ) - (byte~) prepareMEM::$0 ← < (byte*) prepareMEM::mem#4 +prepareMEM: scope:[prepareMEM] from addMEMtoFAC divMEMbyFAC mulFACbyMEM setFAC setMEMtoFAC + (byte*) prepareMEM::mem#5 ← phi( addMEMtoFAC/(byte*) prepareMEM::mem#2 divMEMbyFAC/(byte*) prepareMEM::mem#3 mulFACbyMEM/(byte*) prepareMEM::mem#4 setFAC/(byte*) prepareMEM::mem#0 setMEMtoFAC/(byte*) prepareMEM::mem#1 ) + (byte~) prepareMEM::$0 ← < (byte*) prepareMEM::mem#5 *((byte*) memLo#0) ← (byte~) prepareMEM::$0 - (byte~) prepareMEM::$1 ← > (byte*) prepareMEM::mem#4 + (byte~) prepareMEM::$1 ← > (byte*) prepareMEM::mem#5 *((byte*) memHi#0) ← (byte~) prepareMEM::$1 to:prepareMEM::@return prepareMEM::@return: scope:[prepareMEM] from prepareMEM return to:@return +setFAC: scope:[setFAC] from main main::@1 main::@7 + (word) setFAC::w#3 ← phi( main/(word) setFAC::w#0 main::@1/(word) setFAC::w#1 main::@7/(word) setFAC::w#2 ) + (byte*~) setFAC::$0 ← ((byte*)) (word) setFAC::w#3 + (byte*) prepareMEM::mem#0 ← (byte*~) setFAC::$0 + call prepareMEM param-assignment + to:setFAC::@1 +setFAC::@1: scope:[setFAC] from setFAC + asm { ldy$felda$ffjsr$b391 } + to:setFAC::@return +setFAC::@return: scope:[setFAC] from setFAC::@1 + return + to:@return +getFAC: scope:[getFAC] from main::@12 + asm { jsr$b1aasty$festa$ff } + (word) getFAC::w#0 ← (byte/signed byte/word/signed word) 0 + (word) getFAC::w#1 ← (word) getFAC::w#0 lo= *((byte*) memLo#0) + (word) getFAC::return#0 ← (word) getFAC::w#1 hi= *((byte*) memHi#0) + to:getFAC::@return +getFAC::@return: scope:[getFAC] from getFAC + return + to:@return setMEMtoFAC: scope:[setMEMtoFAC] from main::@3 main::@6 (byte*) setMEMtoFAC::mem#2 ← phi( main::@3/(byte*) setMEMtoFAC::mem#0 main::@6/(byte*) setMEMtoFAC::mem#1 ) - (byte*) prepareMEM::mem#0 ← (byte*) setMEMtoFAC::mem#2 + (byte*) prepareMEM::mem#1 ← (byte*) setMEMtoFAC::mem#2 call prepareMEM param-assignment to:setMEMtoFAC::@1 setMEMtoFAC::@1: scope:[setMEMtoFAC] from setMEMtoFAC @@ -3756,7 +3701,7 @@ setMEMtoFAC::@return: scope:[setMEMtoFAC] from setMEMtoFAC::@1 return to:@return addMEMtoFAC: scope:[addMEMtoFAC] from main::@11 - (byte*) prepareMEM::mem#1 ← (byte*) addMEMtoFAC::mem#0 + (byte*) prepareMEM::mem#2 ← (byte*) addMEMtoFAC::mem#0 call prepareMEM param-assignment to:addMEMtoFAC::@1 addMEMtoFAC::@1: scope:[addMEMtoFAC] from addMEMtoFAC @@ -3766,7 +3711,7 @@ addMEMtoFAC::@return: scope:[addMEMtoFAC] from addMEMtoFAC::@1 return to:@return divMEMbyFAC: scope:[divMEMbyFAC] from main::@8 - (byte*) prepareMEM::mem#2 ← (byte*) divMEMbyFAC::mem#0 + (byte*) prepareMEM::mem#3 ← (byte*) divMEMbyFAC::mem#0 call prepareMEM param-assignment to:divMEMbyFAC::@1 divMEMbyFAC::@1: scope:[divMEMbyFAC] from divMEMbyFAC @@ -3777,7 +3722,7 @@ divMEMbyFAC::@return: scope:[divMEMbyFAC] from divMEMbyFAC::@1 to:@return mulFACbyMEM: scope:[mulFACbyMEM] from main::@10 main::@5 (byte*) mulFACbyMEM::mem#2 ← phi( main::@10/(byte*) mulFACbyMEM::mem#1 main::@5/(byte*) mulFACbyMEM::mem#0 ) - (byte*) prepareMEM::mem#3 ← (byte*) mulFACbyMEM::mem#2 + (byte*) prepareMEM::mem#4 ← (byte*) mulFACbyMEM::mem#2 call prepareMEM param-assignment to:mulFACbyMEM::@1 mulFACbyMEM::@1: scope:[mulFACbyMEM] from mulFACbyMEM @@ -3792,7 +3737,7 @@ sinFAC: scope:[sinFAC] from main::@9 sinFAC::@return: scope:[sinFAC] from sinFAC return to:@return -@30: scope:[] from @9 +@30: scope:[] from @5 (byte[]) f_i#0 ← { (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0 } (byte[]) f_127#0 ← { (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0 } (byte*) f_2pi#0 ← ((byte*)) (word) 58085 @@ -3907,7 +3852,7 @@ print_word::@return: scope:[print_word] from print_word::@2 to:@return @3: scope:[] from @begin (byte[]) hextab#0 ← { (byte) '0', (byte) '1', (byte) '2', (byte) '3', (byte) '4', (byte) '5', (byte) '6', (byte) '7', (byte) '8', (byte) '9', (byte) 'a', (byte) 'b', (byte) 'c', (byte) 'd', (byte) 'e', (byte) 'f' } - to:@9 + to:@5 print_byte: scope:[print_byte] from print_word print_word::@1 (byte*) char_cursor#31 ← phi( print_word/(byte*) char_cursor#32 print_word::@1/(byte*) char_cursor#10 ) (byte) print_byte::b#2 ← phi( print_word/(byte) print_byte::b#0 print_word::@1/(byte) print_byte::b#1 ) @@ -3936,47 +3881,44 @@ print_char: scope:[print_char] from print_byte print_byte::@1 print_char::@return: scope:[print_char] from print_char return to:@return -setFAC: scope:[setFAC] from main main::@1 main::@7 - (word) setFAC::w#3 ← phi( main/(word) setFAC::w#0 main::@1/(word) setFAC::w#1 main::@7/(word) setFAC::w#2 ) - (byte*) setFAC::lo#0 ← ((byte*)) (byte/word/signed word) 254 - (byte*) setFAC::hi#0 ← ((byte*)) (byte/word/signed word) 255 - (byte~) setFAC::$0 ← < (word) setFAC::w#3 - *((byte*) setFAC::lo#0) ← (byte~) setFAC::$0 - (byte~) setFAC::$1 ← > (word) setFAC::w#3 - *((byte*) setFAC::hi#0) ← (byte~) setFAC::$1 - asm { ldy$felda$ffjsr$b391 } - to:setFAC::@return -setFAC::@return: scope:[setFAC] from setFAC - return - to:@return -getFAC: scope:[getFAC] from main::@12 - (byte*) getFAC::lo#0 ← ((byte*)) (byte/word/signed word) 254 - (byte*) getFAC::hi#0 ← ((byte*)) (byte/word/signed word) 255 - asm { jsr$b1aasty$festa$ff } - (word) getFAC::w#0 ← (byte/signed byte/word/signed word) 0 - (word) getFAC::w#1 ← (word) getFAC::w#0 lo= *((byte*) getFAC::lo#0) - (word) getFAC::return#0 ← (word) getFAC::w#1 hi= *((byte*) getFAC::hi#0) - to:getFAC::@return -getFAC::@return: scope:[getFAC] from getFAC - return - to:@return -@9: scope:[] from @3 +@5: scope:[] from @3 (byte*) memLo#0 ← ((byte*)) (byte/word/signed word) 254 (byte*) memHi#0 ← ((byte*)) (byte/word/signed word) 255 to:@30 -prepareMEM: scope:[prepareMEM] from addMEMtoFAC divMEMbyFAC mulFACbyMEM setMEMtoFAC - (byte*) prepareMEM::mem#4 ← phi( addMEMtoFAC/(byte*) prepareMEM::mem#1 divMEMbyFAC/(byte*) prepareMEM::mem#2 mulFACbyMEM/(byte*) prepareMEM::mem#3 setMEMtoFAC/(byte*) prepareMEM::mem#0 ) - (byte~) prepareMEM::$0 ← < (byte*) prepareMEM::mem#4 +prepareMEM: scope:[prepareMEM] from addMEMtoFAC divMEMbyFAC mulFACbyMEM setFAC setMEMtoFAC + (byte*) prepareMEM::mem#5 ← phi( addMEMtoFAC/(byte*) prepareMEM::mem#2 divMEMbyFAC/(byte*) prepareMEM::mem#3 mulFACbyMEM/(byte*) prepareMEM::mem#4 setFAC/(byte*) prepareMEM::mem#0 setMEMtoFAC/(byte*) prepareMEM::mem#1 ) + (byte~) prepareMEM::$0 ← < (byte*) prepareMEM::mem#5 *((byte*) memLo#0) ← (byte~) prepareMEM::$0 - (byte~) prepareMEM::$1 ← > (byte*) prepareMEM::mem#4 + (byte~) prepareMEM::$1 ← > (byte*) prepareMEM::mem#5 *((byte*) memHi#0) ← (byte~) prepareMEM::$1 to:prepareMEM::@return prepareMEM::@return: scope:[prepareMEM] from prepareMEM return to:@return +setFAC: scope:[setFAC] from main main::@1 main::@7 + (word) setFAC::w#3 ← phi( main/(word) setFAC::w#0 main::@1/(word) setFAC::w#1 main::@7/(word) setFAC::w#2 ) + (byte*~) setFAC::$0 ← ((byte*)) (word) setFAC::w#3 + (byte*) prepareMEM::mem#0 ← (byte*~) setFAC::$0 + call prepareMEM param-assignment + to:setFAC::@1 +setFAC::@1: scope:[setFAC] from setFAC + asm { ldy$felda$ffjsr$b391 } + to:setFAC::@return +setFAC::@return: scope:[setFAC] from setFAC::@1 + return + to:@return +getFAC: scope:[getFAC] from main::@12 + asm { jsr$b1aasty$festa$ff } + (word) getFAC::w#0 ← (byte/signed byte/word/signed word) 0 + (word) getFAC::w#1 ← (word) getFAC::w#0 lo= *((byte*) memLo#0) + (word) getFAC::return#0 ← (word) getFAC::w#1 hi= *((byte*) memHi#0) + to:getFAC::@return +getFAC::@return: scope:[getFAC] from getFAC + return + to:@return setMEMtoFAC: scope:[setMEMtoFAC] from main::@3 main::@6 (byte*) setMEMtoFAC::mem#2 ← phi( main::@3/(byte*) setMEMtoFAC::mem#0 main::@6/(byte*) setMEMtoFAC::mem#1 ) - (byte*) prepareMEM::mem#0 ← (byte*) setMEMtoFAC::mem#2 + (byte*) prepareMEM::mem#1 ← (byte*) setMEMtoFAC::mem#2 call prepareMEM param-assignment to:setMEMtoFAC::@1 setMEMtoFAC::@1: scope:[setMEMtoFAC] from setMEMtoFAC @@ -3986,7 +3928,7 @@ setMEMtoFAC::@return: scope:[setMEMtoFAC] from setMEMtoFAC::@1 return to:@return addMEMtoFAC: scope:[addMEMtoFAC] from main::@11 - (byte*) prepareMEM::mem#1 ← (byte*) addMEMtoFAC::mem#0 + (byte*) prepareMEM::mem#2 ← (byte*) addMEMtoFAC::mem#0 call prepareMEM param-assignment to:addMEMtoFAC::@1 addMEMtoFAC::@1: scope:[addMEMtoFAC] from addMEMtoFAC @@ -3996,7 +3938,7 @@ addMEMtoFAC::@return: scope:[addMEMtoFAC] from addMEMtoFAC::@1 return to:@return divMEMbyFAC: scope:[divMEMbyFAC] from main::@8 - (byte*) prepareMEM::mem#2 ← (byte*) divMEMbyFAC::mem#0 + (byte*) prepareMEM::mem#3 ← (byte*) divMEMbyFAC::mem#0 call prepareMEM param-assignment to:divMEMbyFAC::@1 divMEMbyFAC::@1: scope:[divMEMbyFAC] from divMEMbyFAC @@ -4007,7 +3949,7 @@ divMEMbyFAC::@return: scope:[divMEMbyFAC] from divMEMbyFAC::@1 to:@return mulFACbyMEM: scope:[mulFACbyMEM] from main::@10 main::@5 (byte*) mulFACbyMEM::mem#2 ← phi( main::@10/(byte*) mulFACbyMEM::mem#1 main::@5/(byte*) mulFACbyMEM::mem#0 ) - (byte*) prepareMEM::mem#3 ← (byte*) mulFACbyMEM::mem#2 + (byte*) prepareMEM::mem#4 ← (byte*) mulFACbyMEM::mem#2 call prepareMEM param-assignment to:mulFACbyMEM::@1 mulFACbyMEM::@1: scope:[mulFACbyMEM] from mulFACbyMEM @@ -4022,7 +3964,7 @@ sinFAC: scope:[sinFAC] from main::@9 sinFAC::@return: scope:[sinFAC] from sinFAC return to:@return -@30: scope:[] from @9 +@30: scope:[] from @5 (byte[]) f_i#0 ← { (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0 } (byte[]) f_127#0 ← { (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0 } (byte*) f_2pi#0 ← ((byte*)) (word) 58085 @@ -4101,13 +4043,9 @@ main::@return: scope:[main] from main::@15 Constant (const byte*) char_cursor#0 = ((byte*))1024 Constant (const byte[]) hextab#0 = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' } -Constant (const byte*) setFAC::lo#0 = ((byte*))254 -Constant (const byte*) setFAC::hi#0 = ((byte*))255 -Constant (const byte*) getFAC::lo#0 = ((byte*))254 -Constant (const byte*) getFAC::hi#0 = ((byte*))255 -Constant (const word) getFAC::w#0 = 0 Constant (const byte*) memLo#0 = ((byte*))254 Constant (const byte*) memHi#0 = ((byte*))255 +Constant (const word) getFAC::w#0 = 0 Constant (const byte[]) f_i#0 = { 0, 0, 0, 0, 0 } Constant (const byte[]) f_127#0 = { 0, 0, 0, 0, 0 } Constant (const byte*) f_2pi#0 = ((byte*))58085 @@ -4147,7 +4085,7 @@ print_word::@return: scope:[print_word] from print_word::@2 return to:@return @3: scope:[] from @begin - to:@9 + to:@5 print_byte: scope:[print_byte] from print_word print_word::@1 (byte*) char_cursor#31 ← phi( print_word/(byte*) char_cursor#32 print_word::@1/(byte*) char_cursor#10 ) (byte) print_byte::b#2 ← phi( print_word/(byte) print_byte::b#0 print_word::@1/(byte) print_byte::b#1 ) @@ -4176,40 +4114,41 @@ print_char: scope:[print_char] from print_byte print_byte::@1 print_char::@return: scope:[print_char] from print_char return to:@return -setFAC: scope:[setFAC] from main main::@1 main::@7 - (word) setFAC::w#3 ← phi( main/(const word) setFAC::w#0 main::@1/(word) setFAC::w#1 main::@7/(const word) setFAC::w#2 ) - (byte~) setFAC::$0 ← < (word) setFAC::w#3 - *((const byte*) setFAC::lo#0) ← (byte~) setFAC::$0 - (byte~) setFAC::$1 ← > (word) setFAC::w#3 - *((const byte*) setFAC::hi#0) ← (byte~) setFAC::$1 - asm { ldy$felda$ffjsr$b391 } - to:setFAC::@return -setFAC::@return: scope:[setFAC] from setFAC - return - to:@return -getFAC: scope:[getFAC] from main::@12 - asm { jsr$b1aasty$festa$ff } - (word) getFAC::w#1 ← (const word) getFAC::w#0 lo= *((const byte*) getFAC::lo#0) - (word) getFAC::return#0 ← (word) getFAC::w#1 hi= *((const byte*) getFAC::hi#0) - to:getFAC::@return -getFAC::@return: scope:[getFAC] from getFAC - return - to:@return -@9: scope:[] from @3 +@5: scope:[] from @3 to:@30 -prepareMEM: scope:[prepareMEM] from addMEMtoFAC divMEMbyFAC mulFACbyMEM setMEMtoFAC - (byte*) prepareMEM::mem#4 ← phi( addMEMtoFAC/(byte*) prepareMEM::mem#1 divMEMbyFAC/(byte*) prepareMEM::mem#2 mulFACbyMEM/(byte*) prepareMEM::mem#3 setMEMtoFAC/(byte*) prepareMEM::mem#0 ) - (byte~) prepareMEM::$0 ← < (byte*) prepareMEM::mem#4 +prepareMEM: scope:[prepareMEM] from addMEMtoFAC divMEMbyFAC mulFACbyMEM setFAC setMEMtoFAC + (byte*) prepareMEM::mem#5 ← phi( addMEMtoFAC/(byte*) prepareMEM::mem#2 divMEMbyFAC/(byte*) prepareMEM::mem#3 mulFACbyMEM/(byte*) prepareMEM::mem#4 setFAC/(byte*) prepareMEM::mem#0 setMEMtoFAC/(byte*) prepareMEM::mem#1 ) + (byte~) prepareMEM::$0 ← < (byte*) prepareMEM::mem#5 *((const byte*) memLo#0) ← (byte~) prepareMEM::$0 - (byte~) prepareMEM::$1 ← > (byte*) prepareMEM::mem#4 + (byte~) prepareMEM::$1 ← > (byte*) prepareMEM::mem#5 *((const byte*) memHi#0) ← (byte~) prepareMEM::$1 to:prepareMEM::@return prepareMEM::@return: scope:[prepareMEM] from prepareMEM return to:@return +setFAC: scope:[setFAC] from main main::@1 main::@7 + (word) setFAC::w#3 ← phi( main/(const word) setFAC::w#0 main::@1/(word) setFAC::w#1 main::@7/(const word) setFAC::w#2 ) + (byte*~) setFAC::$0 ← ((byte*)) (word) setFAC::w#3 + (byte*) prepareMEM::mem#0 ← (byte*~) setFAC::$0 + call prepareMEM param-assignment + to:setFAC::@1 +setFAC::@1: scope:[setFAC] from setFAC + asm { ldy$felda$ffjsr$b391 } + to:setFAC::@return +setFAC::@return: scope:[setFAC] from setFAC::@1 + return + to:@return +getFAC: scope:[getFAC] from main::@12 + asm { jsr$b1aasty$festa$ff } + (word) getFAC::w#1 ← (const word) getFAC::w#0 lo= *((const byte*) memLo#0) + (word) getFAC::return#0 ← (word) getFAC::w#1 hi= *((const byte*) memHi#0) + to:getFAC::@return +getFAC::@return: scope:[getFAC] from getFAC + return + to:@return setMEMtoFAC: scope:[setMEMtoFAC] from main::@3 main::@6 (byte*) setMEMtoFAC::mem#2 ← phi( main::@3/(byte*) setMEMtoFAC::mem#0 main::@6/(byte*) setMEMtoFAC::mem#1 ) - (byte*) prepareMEM::mem#0 ← (byte*) setMEMtoFAC::mem#2 + (byte*) prepareMEM::mem#1 ← (byte*) setMEMtoFAC::mem#2 call prepareMEM param-assignment to:setMEMtoFAC::@1 setMEMtoFAC::@1: scope:[setMEMtoFAC] from setMEMtoFAC @@ -4219,7 +4158,7 @@ setMEMtoFAC::@return: scope:[setMEMtoFAC] from setMEMtoFAC::@1 return to:@return addMEMtoFAC: scope:[addMEMtoFAC] from main::@11 - (byte*) prepareMEM::mem#1 ← (byte*) addMEMtoFAC::mem#0 + (byte*) prepareMEM::mem#2 ← (byte*) addMEMtoFAC::mem#0 call prepareMEM param-assignment to:addMEMtoFAC::@1 addMEMtoFAC::@1: scope:[addMEMtoFAC] from addMEMtoFAC @@ -4229,7 +4168,7 @@ addMEMtoFAC::@return: scope:[addMEMtoFAC] from addMEMtoFAC::@1 return to:@return divMEMbyFAC: scope:[divMEMbyFAC] from main::@8 - (byte*) prepareMEM::mem#2 ← (byte*) divMEMbyFAC::mem#0 + (byte*) prepareMEM::mem#3 ← (byte*) divMEMbyFAC::mem#0 call prepareMEM param-assignment to:divMEMbyFAC::@1 divMEMbyFAC::@1: scope:[divMEMbyFAC] from divMEMbyFAC @@ -4240,7 +4179,7 @@ divMEMbyFAC::@return: scope:[divMEMbyFAC] from divMEMbyFAC::@1 to:@return mulFACbyMEM: scope:[mulFACbyMEM] from main::@10 main::@5 (byte*) mulFACbyMEM::mem#2 ← phi( main::@10/(byte*) mulFACbyMEM::mem#1 main::@5/(byte*) mulFACbyMEM::mem#0 ) - (byte*) prepareMEM::mem#3 ← (byte*) mulFACbyMEM::mem#2 + (byte*) prepareMEM::mem#4 ← (byte*) mulFACbyMEM::mem#2 call prepareMEM param-assignment to:mulFACbyMEM::@1 mulFACbyMEM::@1: scope:[mulFACbyMEM] from mulFACbyMEM @@ -4255,7 +4194,7 @@ sinFAC: scope:[sinFAC] from main::@9 sinFAC::@return: scope:[sinFAC] from sinFAC return to:@return -@30: scope:[] from @9 +@30: scope:[] from @5 to:@31 main: scope:[main] from @31 call setFAC param-assignment @@ -4365,7 +4304,7 @@ print_word::@return: scope:[print_word] from print_word::@2 return to:@return @3: scope:[] from @begin - to:@9 + to:@5 print_byte: scope:[print_byte] from print_word print_word::@1 (byte*) char_cursor#31 ← phi( print_word/(byte*) char_cursor#32 print_word::@1/(byte*) char_cursor#10 ) (byte) print_byte::b#2 ← phi( print_word/(byte) print_byte::b#0 print_word::@1/(byte) print_byte::b#1 ) @@ -4394,40 +4333,41 @@ print_char: scope:[print_char] from print_byte print_byte::@1 print_char::@return: scope:[print_char] from print_char return to:@return -setFAC: scope:[setFAC] from main main::@1 main::@7 - (word) setFAC::w#3 ← phi( main/(const word) setFAC::w#0 main::@1/(word) setFAC::w#1 main::@7/(const word) setFAC::w#2 ) - (byte~) setFAC::$0 ← < (word) setFAC::w#3 - *((const byte*) setFAC::lo#0) ← (byte~) setFAC::$0 - (byte~) setFAC::$1 ← > (word) setFAC::w#3 - *((const byte*) setFAC::hi#0) ← (byte~) setFAC::$1 - asm { ldy$felda$ffjsr$b391 } - to:setFAC::@return -setFAC::@return: scope:[setFAC] from setFAC - return - to:@return -getFAC: scope:[getFAC] from main::@12 - asm { jsr$b1aasty$festa$ff } - (word) getFAC::w#1 ← (const word) getFAC::w#0 lo= *((const byte*) getFAC::lo#0) - (word) getFAC::return#0 ← (word) getFAC::w#1 hi= *((const byte*) getFAC::hi#0) - to:getFAC::@return -getFAC::@return: scope:[getFAC] from getFAC - return - to:@return -@9: scope:[] from @3 +@5: scope:[] from @3 to:@30 -prepareMEM: scope:[prepareMEM] from addMEMtoFAC divMEMbyFAC mulFACbyMEM setMEMtoFAC - (byte*) prepareMEM::mem#4 ← phi( addMEMtoFAC/(byte*) prepareMEM::mem#1 divMEMbyFAC/(byte*) prepareMEM::mem#2 mulFACbyMEM/(byte*) prepareMEM::mem#3 setMEMtoFAC/(byte*) prepareMEM::mem#0 ) - (byte~) prepareMEM::$0 ← < (byte*) prepareMEM::mem#4 +prepareMEM: scope:[prepareMEM] from addMEMtoFAC divMEMbyFAC mulFACbyMEM setFAC setMEMtoFAC + (byte*) prepareMEM::mem#5 ← phi( addMEMtoFAC/(byte*) prepareMEM::mem#2 divMEMbyFAC/(byte*) prepareMEM::mem#3 mulFACbyMEM/(byte*) prepareMEM::mem#4 setFAC/(byte*) prepareMEM::mem#0 setMEMtoFAC/(byte*) prepareMEM::mem#1 ) + (byte~) prepareMEM::$0 ← < (byte*) prepareMEM::mem#5 *((const byte*) memLo#0) ← (byte~) prepareMEM::$0 - (byte~) prepareMEM::$1 ← > (byte*) prepareMEM::mem#4 + (byte~) prepareMEM::$1 ← > (byte*) prepareMEM::mem#5 *((const byte*) memHi#0) ← (byte~) prepareMEM::$1 to:prepareMEM::@return prepareMEM::@return: scope:[prepareMEM] from prepareMEM return to:@return +setFAC: scope:[setFAC] from main main::@1 main::@7 + (word) setFAC::w#3 ← phi( main/(const word) setFAC::w#0 main::@1/(word) setFAC::w#1 main::@7/(const word) setFAC::w#2 ) + (byte*~) setFAC::$0 ← ((byte*)) (word) setFAC::w#3 + (byte*) prepareMEM::mem#0 ← (byte*~) setFAC::$0 + call prepareMEM param-assignment + to:setFAC::@1 +setFAC::@1: scope:[setFAC] from setFAC + asm { ldy$felda$ffjsr$b391 } + to:setFAC::@return +setFAC::@return: scope:[setFAC] from setFAC::@1 + return + to:@return +getFAC: scope:[getFAC] from main::@12 + asm { jsr$b1aasty$festa$ff } + (word) getFAC::w#1 ← (const word) getFAC::w#0 lo= *((const byte*) memLo#0) + (word) getFAC::return#0 ← (word) getFAC::w#1 hi= *((const byte*) memHi#0) + to:getFAC::@return +getFAC::@return: scope:[getFAC] from getFAC + return + to:@return setMEMtoFAC: scope:[setMEMtoFAC] from main::@3 main::@6 (byte*) setMEMtoFAC::mem#2 ← phi( main::@3/(const byte*) setMEMtoFAC::mem#0 main::@6/(const byte*) setMEMtoFAC::mem#1 ) - (byte*) prepareMEM::mem#0 ← (byte*) setMEMtoFAC::mem#2 + (byte*) prepareMEM::mem#1 ← (byte*) setMEMtoFAC::mem#2 call prepareMEM param-assignment to:setMEMtoFAC::@1 setMEMtoFAC::@1: scope:[setMEMtoFAC] from setMEMtoFAC @@ -4437,7 +4377,7 @@ setMEMtoFAC::@return: scope:[setMEMtoFAC] from setMEMtoFAC::@1 return to:@return addMEMtoFAC: scope:[addMEMtoFAC] from main::@11 - (byte*) prepareMEM::mem#1 ← (const byte*) addMEMtoFAC::mem#0 + (byte*) prepareMEM::mem#2 ← (const byte*) addMEMtoFAC::mem#0 call prepareMEM param-assignment to:addMEMtoFAC::@1 addMEMtoFAC::@1: scope:[addMEMtoFAC] from addMEMtoFAC @@ -4447,7 +4387,7 @@ addMEMtoFAC::@return: scope:[addMEMtoFAC] from addMEMtoFAC::@1 return to:@return divMEMbyFAC: scope:[divMEMbyFAC] from main::@8 - (byte*) prepareMEM::mem#2 ← (const byte*) divMEMbyFAC::mem#0 + (byte*) prepareMEM::mem#3 ← (const byte*) divMEMbyFAC::mem#0 call prepareMEM param-assignment to:divMEMbyFAC::@1 divMEMbyFAC::@1: scope:[divMEMbyFAC] from divMEMbyFAC @@ -4458,7 +4398,7 @@ divMEMbyFAC::@return: scope:[divMEMbyFAC] from divMEMbyFAC::@1 to:@return mulFACbyMEM: scope:[mulFACbyMEM] from main::@10 main::@5 (byte*) mulFACbyMEM::mem#2 ← phi( main::@10/(const byte*) mulFACbyMEM::mem#1 main::@5/(const byte*) mulFACbyMEM::mem#0 ) - (byte*) prepareMEM::mem#3 ← (byte*) mulFACbyMEM::mem#2 + (byte*) prepareMEM::mem#4 ← (byte*) mulFACbyMEM::mem#2 call prepareMEM param-assignment to:mulFACbyMEM::@1 mulFACbyMEM::@1: scope:[mulFACbyMEM] from mulFACbyMEM @@ -4473,7 +4413,7 @@ sinFAC: scope:[sinFAC] from main::@9 sinFAC::@return: scope:[sinFAC] from sinFAC return to:@return -@30: scope:[] from @9 +@30: scope:[] from @5 to:@31 main: scope:[main] from @31 call setFAC param-assignment @@ -4538,8 +4478,8 @@ main::@return: scope:[main] from main::@15 to:@end @end: scope:[] from @32 -Constant (const byte*) prepareMEM::mem#1 = addMEMtoFAC::mem#0 -Constant (const byte*) prepareMEM::mem#2 = divMEMbyFAC::mem#0 +Constant (const byte*) prepareMEM::mem#2 = addMEMtoFAC::mem#0 +Constant (const byte*) prepareMEM::mem#3 = divMEMbyFAC::mem#0 Succesful SSA optimization Pass2ConstantIdentification CONTROL FLOW GRAPH @begin: scope:[] from @@ -4573,7 +4513,7 @@ print_word::@return: scope:[print_word] from print_word::@2 return to:@return @3: scope:[] from @begin - to:@9 + to:@5 print_byte: scope:[print_byte] from print_word print_word::@1 (byte*) char_cursor#31 ← phi( print_word/(byte*) char_cursor#32 print_word::@1/(byte*) char_cursor#10 ) (byte) print_byte::b#2 ← phi( print_word/(byte) print_byte::b#0 print_word::@1/(byte) print_byte::b#1 ) @@ -4602,40 +4542,41 @@ print_char: scope:[print_char] from print_byte print_byte::@1 print_char::@return: scope:[print_char] from print_char return to:@return -setFAC: scope:[setFAC] from main main::@1 main::@7 - (word) setFAC::w#3 ← phi( main/(const word) setFAC::w#0 main::@1/(word) setFAC::w#1 main::@7/(const word) setFAC::w#2 ) - (byte~) setFAC::$0 ← < (word) setFAC::w#3 - *((const byte*) setFAC::lo#0) ← (byte~) setFAC::$0 - (byte~) setFAC::$1 ← > (word) setFAC::w#3 - *((const byte*) setFAC::hi#0) ← (byte~) setFAC::$1 - asm { ldy$felda$ffjsr$b391 } - to:setFAC::@return -setFAC::@return: scope:[setFAC] from setFAC - return - to:@return -getFAC: scope:[getFAC] from main::@12 - asm { jsr$b1aasty$festa$ff } - (word) getFAC::w#1 ← (const word) getFAC::w#0 lo= *((const byte*) getFAC::lo#0) - (word) getFAC::return#0 ← (word) getFAC::w#1 hi= *((const byte*) getFAC::hi#0) - to:getFAC::@return -getFAC::@return: scope:[getFAC] from getFAC - return - to:@return -@9: scope:[] from @3 +@5: scope:[] from @3 to:@30 -prepareMEM: scope:[prepareMEM] from addMEMtoFAC divMEMbyFAC mulFACbyMEM setMEMtoFAC - (byte*) prepareMEM::mem#4 ← phi( addMEMtoFAC/(const byte*) prepareMEM::mem#1 divMEMbyFAC/(const byte*) prepareMEM::mem#2 mulFACbyMEM/(byte*) prepareMEM::mem#3 setMEMtoFAC/(byte*) prepareMEM::mem#0 ) - (byte~) prepareMEM::$0 ← < (byte*) prepareMEM::mem#4 +prepareMEM: scope:[prepareMEM] from addMEMtoFAC divMEMbyFAC mulFACbyMEM setFAC setMEMtoFAC + (byte*) prepareMEM::mem#5 ← phi( addMEMtoFAC/(const byte*) prepareMEM::mem#2 divMEMbyFAC/(const byte*) prepareMEM::mem#3 mulFACbyMEM/(byte*) prepareMEM::mem#4 setFAC/(byte*) prepareMEM::mem#0 setMEMtoFAC/(byte*) prepareMEM::mem#1 ) + (byte~) prepareMEM::$0 ← < (byte*) prepareMEM::mem#5 *((const byte*) memLo#0) ← (byte~) prepareMEM::$0 - (byte~) prepareMEM::$1 ← > (byte*) prepareMEM::mem#4 + (byte~) prepareMEM::$1 ← > (byte*) prepareMEM::mem#5 *((const byte*) memHi#0) ← (byte~) prepareMEM::$1 to:prepareMEM::@return prepareMEM::@return: scope:[prepareMEM] from prepareMEM return to:@return +setFAC: scope:[setFAC] from main main::@1 main::@7 + (word) setFAC::w#3 ← phi( main/(const word) setFAC::w#0 main::@1/(word) setFAC::w#1 main::@7/(const word) setFAC::w#2 ) + (byte*~) setFAC::$0 ← ((byte*)) (word) setFAC::w#3 + (byte*) prepareMEM::mem#0 ← (byte*~) setFAC::$0 + call prepareMEM param-assignment + to:setFAC::@1 +setFAC::@1: scope:[setFAC] from setFAC + asm { ldy$felda$ffjsr$b391 } + to:setFAC::@return +setFAC::@return: scope:[setFAC] from setFAC::@1 + return + to:@return +getFAC: scope:[getFAC] from main::@12 + asm { jsr$b1aasty$festa$ff } + (word) getFAC::w#1 ← (const word) getFAC::w#0 lo= *((const byte*) memLo#0) + (word) getFAC::return#0 ← (word) getFAC::w#1 hi= *((const byte*) memHi#0) + to:getFAC::@return +getFAC::@return: scope:[getFAC] from getFAC + return + to:@return setMEMtoFAC: scope:[setMEMtoFAC] from main::@3 main::@6 (byte*) setMEMtoFAC::mem#2 ← phi( main::@3/(const byte*) setMEMtoFAC::mem#0 main::@6/(const byte*) setMEMtoFAC::mem#1 ) - (byte*) prepareMEM::mem#0 ← (byte*) setMEMtoFAC::mem#2 + (byte*) prepareMEM::mem#1 ← (byte*) setMEMtoFAC::mem#2 call prepareMEM param-assignment to:setMEMtoFAC::@1 setMEMtoFAC::@1: scope:[setMEMtoFAC] from setMEMtoFAC @@ -4664,7 +4605,7 @@ divMEMbyFAC::@return: scope:[divMEMbyFAC] from divMEMbyFAC::@1 to:@return mulFACbyMEM: scope:[mulFACbyMEM] from main::@10 main::@5 (byte*) mulFACbyMEM::mem#2 ← phi( main::@10/(const byte*) mulFACbyMEM::mem#1 main::@5/(const byte*) mulFACbyMEM::mem#0 ) - (byte*) prepareMEM::mem#3 ← (byte*) mulFACbyMEM::mem#2 + (byte*) prepareMEM::mem#4 ← (byte*) mulFACbyMEM::mem#2 call prepareMEM param-assignment to:mulFACbyMEM::@1 mulFACbyMEM::@1: scope:[mulFACbyMEM] from mulFACbyMEM @@ -4679,7 +4620,7 @@ sinFAC: scope:[sinFAC] from main::@9 sinFAC::@return: scope:[sinFAC] from sinFAC return to:@return -@30: scope:[] from @9 +@30: scope:[] from @5 to:@31 main: scope:[main] from @31 call setFAC param-assignment @@ -4748,7 +4689,7 @@ Culled Empty Block (label) print_ln::@2 Culled Empty Block (label) print_word::@2 Culled Empty Block (label) @3 Culled Empty Block (label) print_byte::@2 -Culled Empty Block (label) @9 +Culled Empty Block (label) @5 Culled Empty Block (label) @30 Culled Empty Block (label) main::@4 Culled Empty Block (label) @32 @@ -4806,38 +4747,39 @@ print_char: scope:[print_char] from print_byte print_byte::@1 print_char::@return: scope:[print_char] from print_char return to:@return -setFAC: scope:[setFAC] from main main::@1 main::@7 - (word) setFAC::w#3 ← phi( main/(const word) setFAC::w#0 main::@1/(word) setFAC::w#1 main::@7/(const word) setFAC::w#2 ) - (byte~) setFAC::$0 ← < (word) setFAC::w#3 - *((const byte*) setFAC::lo#0) ← (byte~) setFAC::$0 - (byte~) setFAC::$1 ← > (word) setFAC::w#3 - *((const byte*) setFAC::hi#0) ← (byte~) setFAC::$1 - asm { ldy$felda$ffjsr$b391 } - to:setFAC::@return -setFAC::@return: scope:[setFAC] from setFAC - return - to:@return -getFAC: scope:[getFAC] from main::@12 - asm { jsr$b1aasty$festa$ff } - (word) getFAC::w#1 ← (const word) getFAC::w#0 lo= *((const byte*) getFAC::lo#0) - (word) getFAC::return#0 ← (word) getFAC::w#1 hi= *((const byte*) getFAC::hi#0) - to:getFAC::@return -getFAC::@return: scope:[getFAC] from getFAC - return - to:@return -prepareMEM: scope:[prepareMEM] from addMEMtoFAC divMEMbyFAC mulFACbyMEM setMEMtoFAC - (byte*) prepareMEM::mem#4 ← phi( addMEMtoFAC/(const byte*) prepareMEM::mem#1 divMEMbyFAC/(const byte*) prepareMEM::mem#2 mulFACbyMEM/(byte*) prepareMEM::mem#3 setMEMtoFAC/(byte*) prepareMEM::mem#0 ) - (byte~) prepareMEM::$0 ← < (byte*) prepareMEM::mem#4 +prepareMEM: scope:[prepareMEM] from addMEMtoFAC divMEMbyFAC mulFACbyMEM setFAC setMEMtoFAC + (byte*) prepareMEM::mem#5 ← phi( addMEMtoFAC/(const byte*) prepareMEM::mem#2 divMEMbyFAC/(const byte*) prepareMEM::mem#3 mulFACbyMEM/(byte*) prepareMEM::mem#4 setFAC/(byte*) prepareMEM::mem#0 setMEMtoFAC/(byte*) prepareMEM::mem#1 ) + (byte~) prepareMEM::$0 ← < (byte*) prepareMEM::mem#5 *((const byte*) memLo#0) ← (byte~) prepareMEM::$0 - (byte~) prepareMEM::$1 ← > (byte*) prepareMEM::mem#4 + (byte~) prepareMEM::$1 ← > (byte*) prepareMEM::mem#5 *((const byte*) memHi#0) ← (byte~) prepareMEM::$1 to:prepareMEM::@return prepareMEM::@return: scope:[prepareMEM] from prepareMEM return to:@return +setFAC: scope:[setFAC] from main main::@1 main::@7 + (word) setFAC::w#3 ← phi( main/(const word) setFAC::w#0 main::@1/(word) setFAC::w#1 main::@7/(const word) setFAC::w#2 ) + (byte*~) setFAC::$0 ← ((byte*)) (word) setFAC::w#3 + (byte*) prepareMEM::mem#0 ← (byte*~) setFAC::$0 + call prepareMEM param-assignment + to:setFAC::@1 +setFAC::@1: scope:[setFAC] from setFAC + asm { ldy$felda$ffjsr$b391 } + to:setFAC::@return +setFAC::@return: scope:[setFAC] from setFAC::@1 + return + to:@return +getFAC: scope:[getFAC] from main::@12 + asm { jsr$b1aasty$festa$ff } + (word) getFAC::w#1 ← (const word) getFAC::w#0 lo= *((const byte*) memLo#0) + (word) getFAC::return#0 ← (word) getFAC::w#1 hi= *((const byte*) memHi#0) + to:getFAC::@return +getFAC::@return: scope:[getFAC] from getFAC + return + to:@return setMEMtoFAC: scope:[setMEMtoFAC] from main::@3 main::@6 (byte*) setMEMtoFAC::mem#2 ← phi( main::@3/(const byte*) setMEMtoFAC::mem#0 main::@6/(const byte*) setMEMtoFAC::mem#1 ) - (byte*) prepareMEM::mem#0 ← (byte*) setMEMtoFAC::mem#2 + (byte*) prepareMEM::mem#1 ← (byte*) setMEMtoFAC::mem#2 call prepareMEM param-assignment to:setMEMtoFAC::@1 setMEMtoFAC::@1: scope:[setMEMtoFAC] from setMEMtoFAC @@ -4866,7 +4808,7 @@ divMEMbyFAC::@return: scope:[divMEMbyFAC] from divMEMbyFAC::@1 to:@return mulFACbyMEM: scope:[mulFACbyMEM] from main::@10 main::@5 (byte*) mulFACbyMEM::mem#2 ← phi( main::@10/(const byte*) mulFACbyMEM::mem#1 main::@5/(const byte*) mulFACbyMEM::mem#0 ) - (byte*) prepareMEM::mem#3 ← (byte*) mulFACbyMEM::mem#2 + (byte*) prepareMEM::mem#4 ← (byte*) mulFACbyMEM::mem#2 call prepareMEM param-assignment to:mulFACbyMEM::@1 mulFACbyMEM::@1: scope:[mulFACbyMEM] from mulFACbyMEM @@ -4950,8 +4892,9 @@ Not aliassing across scopes: print_char::ch#0 print_byte::$1 Not aliassing across scopes: print_char::ch#1 print_byte::$4 Not aliassing across scopes: print_char::ch#2 print_char::ch#0 Not aliassing across scopes: char_cursor#23 char_cursor#31 -Not aliassing across scopes: prepareMEM::mem#0 setMEMtoFAC::mem#2 -Not aliassing across scopes: prepareMEM::mem#3 mulFACbyMEM::mem#2 +Not aliassing across scopes: prepareMEM::mem#0 setFAC::$0 +Not aliassing across scopes: prepareMEM::mem#1 setMEMtoFAC::mem#2 +Not aliassing across scopes: prepareMEM::mem#4 mulFACbyMEM::mem#2 Not aliassing across scopes: char_cursor#32 char_cursor#1 Not aliassing across scopes: line_cursor#13 char_cursor#1 Not aliassing across scopes: setFAC::w#1 main::$2 @@ -4968,14 +4911,23 @@ Not aliassing across scopes: print_char::ch#0 print_byte::$1 Not aliassing across scopes: print_char::ch#1 print_byte::$4 Not aliassing across scopes: print_char::ch#2 print_char::ch#0 Not aliassing across scopes: char_cursor#23 char_cursor#31 -Not aliassing across scopes: prepareMEM::mem#0 setMEMtoFAC::mem#2 -Not aliassing across scopes: prepareMEM::mem#3 mulFACbyMEM::mem#2 +Not aliassing across scopes: prepareMEM::mem#0 setFAC::$0 +Not aliassing across scopes: prepareMEM::mem#1 setMEMtoFAC::mem#2 +Not aliassing across scopes: prepareMEM::mem#4 mulFACbyMEM::mem#2 Not aliassing across scopes: char_cursor#32 char_cursor#1 Not aliassing across scopes: line_cursor#13 char_cursor#1 Not aliassing across scopes: setFAC::w#1 main::$2 Not aliassing across scopes: getFAC::return#2 getFAC::return#0 Not aliassing across scopes: main::$11 getFAC::return#2 Not aliassing across scopes: print_word::w#0 main::$11 +Inlining constant with var siblings (const byte*) prepareMEM::mem#2 +Inlining constant with var siblings (const byte*) prepareMEM::mem#2 +Inlining constant with var siblings (const byte*) prepareMEM::mem#2 +Inlining constant with var siblings (const byte*) prepareMEM::mem#2 +Inlining constant with var siblings (const byte*) prepareMEM::mem#3 +Inlining constant with var siblings (const byte*) prepareMEM::mem#3 +Inlining constant with var siblings (const byte*) prepareMEM::mem#3 +Inlining constant with var siblings (const byte*) prepareMEM::mem#3 Inlining constant with var siblings (const word) setFAC::w#0 Inlining constant with var siblings (const word) setFAC::w#0 Inlining constant with different constant siblings (const word) setFAC::w#0 @@ -4983,12 +4935,6 @@ Inlining constant with var siblings (const word) setFAC::w#2 Inlining constant with var siblings (const word) setFAC::w#2 Inlining constant with different constant siblings (const word) setFAC::w#2 Inlining constant with var siblings (const word) getFAC::w#0 -Inlining constant with var siblings (const byte*) prepareMEM::mem#1 -Inlining constant with var siblings (const byte*) prepareMEM::mem#1 -Inlining constant with var siblings (const byte*) prepareMEM::mem#1 -Inlining constant with var siblings (const byte*) prepareMEM::mem#2 -Inlining constant with var siblings (const byte*) prepareMEM::mem#2 -Inlining constant with var siblings (const byte*) prepareMEM::mem#2 Inlining constant with var siblings (const byte*) setMEMtoFAC::mem#0 Inlining constant with var siblings (const byte*) setMEMtoFAC::mem#1 Inlining constant with var siblings (const byte*) mulFACbyMEM::mem#0 @@ -5002,8 +4948,8 @@ Inlining constant with var siblings (const byte*) char_cursor#0 Inlining constant with var siblings (const byte*) char_cursor#0 Constant inlined addMEMtoFAC::mem#0 = (const byte[]) f_127#0 Constant inlined setFAC::w#2 = (byte/signed byte/word/signed word) 25 -Constant inlined prepareMEM::mem#1 = (const byte[]) f_127#0 -Constant inlined prepareMEM::mem#2 = (const byte[]) f_i#0 +Constant inlined prepareMEM::mem#2 = (const byte[]) f_127#0 +Constant inlined prepareMEM::mem#3 = (const byte[]) f_i#0 Constant inlined divMEMbyFAC::mem#0 = (const byte[]) f_i#0 Constant inlined main::i#0 = (byte/signed byte/word/signed word) 1 Constant inlined setMEMtoFAC::mem#1 = (const byte[]) f_i#0 @@ -5067,38 +5013,39 @@ print_char: scope:[print_char] from print_byte print_byte::@1 print_char::@return: scope:[print_char] from print_char return to:@return -setFAC: scope:[setFAC] from main main::@1 main::@7 - (word) setFAC::w#3 ← phi( main/(byte/signed byte/word/signed word) 127 main::@1/(word) setFAC::w#1 main::@7/(byte/signed byte/word/signed word) 25 ) - (byte~) setFAC::$0 ← < (word) setFAC::w#3 - *((const byte*) setFAC::lo#0) ← (byte~) setFAC::$0 - (byte~) setFAC::$1 ← > (word) setFAC::w#3 - *((const byte*) setFAC::hi#0) ← (byte~) setFAC::$1 - asm { ldy$felda$ffjsr$b391 } - to:setFAC::@return -setFAC::@return: scope:[setFAC] from setFAC - return - to:@return -getFAC: scope:[getFAC] from main::@12 - asm { jsr$b1aasty$festa$ff } - (word) getFAC::w#1 ← (byte/signed byte/word/signed word) 0 lo= *((const byte*) getFAC::lo#0) - (word) getFAC::return#0 ← (word) getFAC::w#1 hi= *((const byte*) getFAC::hi#0) - to:getFAC::@return -getFAC::@return: scope:[getFAC] from getFAC - return - to:@return -prepareMEM: scope:[prepareMEM] from addMEMtoFAC divMEMbyFAC mulFACbyMEM setMEMtoFAC - (byte*) prepareMEM::mem#4 ← phi( addMEMtoFAC/(const byte[]) f_127#0 divMEMbyFAC/(const byte[]) f_i#0 mulFACbyMEM/(byte*) prepareMEM::mem#3 setMEMtoFAC/(byte*) prepareMEM::mem#0 ) - (byte~) prepareMEM::$0 ← < (byte*) prepareMEM::mem#4 +prepareMEM: scope:[prepareMEM] from addMEMtoFAC divMEMbyFAC mulFACbyMEM setFAC setMEMtoFAC + (byte*) prepareMEM::mem#5 ← phi( addMEMtoFAC/(const byte[]) f_127#0 divMEMbyFAC/(const byte[]) f_i#0 mulFACbyMEM/(byte*) prepareMEM::mem#4 setFAC/(byte*) prepareMEM::mem#0 setMEMtoFAC/(byte*) prepareMEM::mem#1 ) + (byte~) prepareMEM::$0 ← < (byte*) prepareMEM::mem#5 *((const byte*) memLo#0) ← (byte~) prepareMEM::$0 - (byte~) prepareMEM::$1 ← > (byte*) prepareMEM::mem#4 + (byte~) prepareMEM::$1 ← > (byte*) prepareMEM::mem#5 *((const byte*) memHi#0) ← (byte~) prepareMEM::$1 to:prepareMEM::@return prepareMEM::@return: scope:[prepareMEM] from prepareMEM return to:@return +setFAC: scope:[setFAC] from main main::@1 main::@7 + (word) setFAC::w#3 ← phi( main/(byte/signed byte/word/signed word) 127 main::@1/(word) setFAC::w#1 main::@7/(byte/signed byte/word/signed word) 25 ) + (byte*~) setFAC::$0 ← ((byte*)) (word) setFAC::w#3 + (byte*) prepareMEM::mem#0 ← (byte*~) setFAC::$0 + call prepareMEM param-assignment + to:setFAC::@1 +setFAC::@1: scope:[setFAC] from setFAC + asm { ldy$felda$ffjsr$b391 } + to:setFAC::@return +setFAC::@return: scope:[setFAC] from setFAC::@1 + return + to:@return +getFAC: scope:[getFAC] from main::@12 + asm { jsr$b1aasty$festa$ff } + (word) getFAC::w#1 ← (byte/signed byte/word/signed word) 0 lo= *((const byte*) memLo#0) + (word) getFAC::return#0 ← (word) getFAC::w#1 hi= *((const byte*) memHi#0) + to:getFAC::@return +getFAC::@return: scope:[getFAC] from getFAC + return + to:@return setMEMtoFAC: scope:[setMEMtoFAC] from main::@3 main::@6 (byte*) setMEMtoFAC::mem#2 ← phi( main::@3/(const byte[]) f_127#0 main::@6/(const byte[]) f_i#0 ) - (byte*) prepareMEM::mem#0 ← (byte*) setMEMtoFAC::mem#2 + (byte*) prepareMEM::mem#1 ← (byte*) setMEMtoFAC::mem#2 call prepareMEM param-assignment to:setMEMtoFAC::@1 setMEMtoFAC::@1: scope:[setMEMtoFAC] from setMEMtoFAC @@ -5127,7 +5074,7 @@ divMEMbyFAC::@return: scope:[divMEMbyFAC] from divMEMbyFAC::@1 to:@return mulFACbyMEM: scope:[mulFACbyMEM] from main::@10 main::@5 (byte*) mulFACbyMEM::mem#2 ← phi( main::@10/(const byte[]) f_127#0 main::@5/(const byte*) f_2pi#0 ) - (byte*) prepareMEM::mem#3 ← (byte*) mulFACbyMEM::mem#2 + (byte*) prepareMEM::mem#4 ← (byte*) mulFACbyMEM::mem#2 call prepareMEM param-assignment to:mulFACbyMEM::@1 mulFACbyMEM::@1: scope:[mulFACbyMEM] from mulFACbyMEM @@ -5227,10 +5174,6 @@ FINAL SYMBOL TABLE (const byte[]) f_i#0 = { (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0 } (word()) getFAC() (label) getFAC::@return -(byte*) getFAC::hi -(const byte*) getFAC::hi#0 = ((byte*))(byte/word/signed word) 255 -(byte*) getFAC::lo -(const byte*) getFAC::lo#0 = ((byte*))(byte/word/signed word) 254 (word) getFAC::return (word) getFAC::return#0 (word) getFAC::return#2 @@ -5276,8 +5219,9 @@ FINAL SYMBOL TABLE (label) prepareMEM::@return (byte*) prepareMEM::mem (byte*) prepareMEM::mem#0 -(byte*) prepareMEM::mem#3 +(byte*) prepareMEM::mem#1 (byte*) prepareMEM::mem#4 +(byte*) prepareMEM::mem#5 (void()) print_byte((byte) print_byte::b) (byte~) print_byte::$0 (byte~) print_byte::$1 @@ -5307,13 +5251,9 @@ FINAL SYMBOL TABLE (word) print_word::w (word) print_word::w#0 (void()) setFAC((word) setFAC::w) -(byte~) setFAC::$0 -(byte~) setFAC::$1 +(byte*~) setFAC::$0 +(label) setFAC::@1 (label) setFAC::@return -(byte*) setFAC::hi -(const byte*) setFAC::hi#0 = ((byte*))(byte/word/signed word) 255 -(byte*) setFAC::lo -(const byte*) setFAC::lo#0 = ((byte*))(byte/word/signed word) 254 (word) setFAC::w (word) setFAC::w#1 (word) setFAC::w#3 @@ -5325,10 +5265,10 @@ FINAL SYMBOL TABLE (void()) sinFAC() (label) sinFAC::@return -Block Sequence Planned @begin @31 @end main main::@3 main::@1 main::@5 main::@6 main::@7 main::@8 main::@9 main::@10 main::@11 main::@12 main::@13 main::@14 main::@15 main::@return print_ln print_ln::@1 print_ln::@return print_word print_word::@1 print_word::@return print_byte print_byte::@1 print_byte::@return print_char print_char::@return getFAC getFAC::@return addMEMtoFAC addMEMtoFAC::@1 addMEMtoFAC::@return prepareMEM prepareMEM::@return mulFACbyMEM mulFACbyMEM::@1 mulFACbyMEM::@return sinFAC sinFAC::@return divMEMbyFAC divMEMbyFAC::@1 divMEMbyFAC::@return setFAC setFAC::@return setMEMtoFAC setMEMtoFAC::@1 setMEMtoFAC::@return +Block Sequence Planned @begin @31 @end main main::@3 main::@1 main::@5 main::@6 main::@7 main::@8 main::@9 main::@10 main::@11 main::@12 main::@13 main::@14 main::@15 main::@return print_ln print_ln::@1 print_ln::@return print_word print_word::@1 print_word::@return print_byte print_byte::@1 print_byte::@return print_char print_char::@return getFAC getFAC::@return addMEMtoFAC addMEMtoFAC::@1 addMEMtoFAC::@return prepareMEM prepareMEM::@return mulFACbyMEM mulFACbyMEM::@1 mulFACbyMEM::@return sinFAC sinFAC::@return divMEMbyFAC divMEMbyFAC::@1 divMEMbyFAC::@return setFAC setFAC::@1 setFAC::@return setMEMtoFAC setMEMtoFAC::@1 setMEMtoFAC::@return Added new block during phi lifting main::@16(between main::@15 and main::@1) Added new block during phi lifting print_ln::@3(between print_ln::@1 and print_ln::@1) -Block Sequence Planned @begin @31 @end main main::@3 main::@1 main::@5 main::@6 main::@7 main::@8 main::@9 main::@10 main::@11 main::@12 main::@13 main::@14 main::@15 main::@return main::@16 print_ln print_ln::@1 print_ln::@return print_ln::@3 print_word print_word::@1 print_word::@return print_byte print_byte::@1 print_byte::@return print_char print_char::@return getFAC getFAC::@return addMEMtoFAC addMEMtoFAC::@1 addMEMtoFAC::@return prepareMEM prepareMEM::@return mulFACbyMEM mulFACbyMEM::@1 mulFACbyMEM::@return sinFAC sinFAC::@return divMEMbyFAC divMEMbyFAC::@1 divMEMbyFAC::@return setFAC setFAC::@return setMEMtoFAC setMEMtoFAC::@1 setMEMtoFAC::@return +Block Sequence Planned @begin @31 @end main main::@3 main::@1 main::@5 main::@6 main::@7 main::@8 main::@9 main::@10 main::@11 main::@12 main::@13 main::@14 main::@15 main::@return main::@16 print_ln print_ln::@1 print_ln::@return print_ln::@3 print_word print_word::@1 print_word::@return print_byte print_byte::@1 print_byte::@return print_char print_char::@return getFAC getFAC::@return addMEMtoFAC addMEMtoFAC::@1 addMEMtoFAC::@return prepareMEM prepareMEM::@return mulFACbyMEM mulFACbyMEM::@1 mulFACbyMEM::@return sinFAC sinFAC::@return divMEMbyFAC divMEMbyFAC::@1 divMEMbyFAC::@return setFAC setFAC::@1 setFAC::@return setMEMtoFAC setMEMtoFAC::@1 setMEMtoFAC::@return CONTROL FLOW GRAPH - PHI LIFTED @begin: scope:[] from to:@31 @@ -5460,8 +5400,8 @@ print_char::@return: scope:[print_char] from print_char to:@return getFAC: scope:[getFAC] from main::@12 asm { jsr$b1aasty$festa$ff } - (word) getFAC::w#1 ← (byte/signed byte/word/signed word) 0 lo= *((const byte*) getFAC::lo#0) - (word) getFAC::return#0 ← (word) getFAC::w#1 hi= *((const byte*) getFAC::hi#0) + (word) getFAC::w#1 ← (byte/signed byte/word/signed word) 0 lo= *((const byte*) memLo#0) + (word) getFAC::return#0 ← (word) getFAC::w#1 hi= *((const byte*) memHi#0) to:getFAC::@return getFAC::@return: scope:[getFAC] from getFAC return @@ -5475,11 +5415,11 @@ addMEMtoFAC::@1: scope:[addMEMtoFAC] from addMEMtoFAC addMEMtoFAC::@return: scope:[addMEMtoFAC] from addMEMtoFAC::@1 return to:@return -prepareMEM: scope:[prepareMEM] from addMEMtoFAC divMEMbyFAC mulFACbyMEM setMEMtoFAC - (byte*) prepareMEM::mem#4 ← phi( addMEMtoFAC/(const byte[]) f_127#0 divMEMbyFAC/(const byte[]) f_i#0 mulFACbyMEM/(byte*~) prepareMEM::mem#5 setMEMtoFAC/(byte*~) prepareMEM::mem#6 ) - (byte~) prepareMEM::$0 ← < (byte*) prepareMEM::mem#4 +prepareMEM: scope:[prepareMEM] from addMEMtoFAC divMEMbyFAC mulFACbyMEM setFAC setMEMtoFAC + (byte*) prepareMEM::mem#5 ← phi( addMEMtoFAC/(const byte[]) f_127#0 divMEMbyFAC/(const byte[]) f_i#0 mulFACbyMEM/(byte*~) prepareMEM::mem#6 setFAC/(byte*~) prepareMEM::mem#7 setMEMtoFAC/(byte*~) prepareMEM::mem#8 ) + (byte~) prepareMEM::$0 ← < (byte*) prepareMEM::mem#5 *((const byte*) memLo#0) ← (byte~) prepareMEM::$0 - (byte~) prepareMEM::$1 ← > (byte*) prepareMEM::mem#4 + (byte~) prepareMEM::$1 ← > (byte*) prepareMEM::mem#5 *((const byte*) memHi#0) ← (byte~) prepareMEM::$1 to:prepareMEM::@return prepareMEM::@return: scope:[prepareMEM] from prepareMEM @@ -5487,8 +5427,8 @@ prepareMEM::@return: scope:[prepareMEM] from prepareMEM to:@return mulFACbyMEM: scope:[mulFACbyMEM] from main::@10 main::@5 (byte*) mulFACbyMEM::mem#2 ← phi( main::@10/(const byte[]) f_127#0 main::@5/(const byte*) f_2pi#0 ) - (byte*) prepareMEM::mem#3 ← (byte*) mulFACbyMEM::mem#2 - (byte*~) prepareMEM::mem#5 ← (byte*) prepareMEM::mem#3 + (byte*) prepareMEM::mem#4 ← (byte*) mulFACbyMEM::mem#2 + (byte*~) prepareMEM::mem#6 ← (byte*) prepareMEM::mem#4 call prepareMEM param-assignment to:mulFACbyMEM::@1 mulFACbyMEM::@1: scope:[mulFACbyMEM] from mulFACbyMEM @@ -5514,19 +5454,21 @@ divMEMbyFAC::@return: scope:[divMEMbyFAC] from divMEMbyFAC::@1 to:@return setFAC: scope:[setFAC] from main main::@1 main::@7 (word) setFAC::w#3 ← phi( main/(byte/signed byte/word/signed word) 127 main::@1/(word~) setFAC::w#4 main::@7/(byte/signed byte/word/signed word) 25 ) - (byte~) setFAC::$0 ← < (word) setFAC::w#3 - *((const byte*) setFAC::lo#0) ← (byte~) setFAC::$0 - (byte~) setFAC::$1 ← > (word) setFAC::w#3 - *((const byte*) setFAC::hi#0) ← (byte~) setFAC::$1 + (byte*~) setFAC::$0 ← ((byte*)) (word) setFAC::w#3 + (byte*) prepareMEM::mem#0 ← (byte*~) setFAC::$0 + (byte*~) prepareMEM::mem#7 ← (byte*) prepareMEM::mem#0 + call prepareMEM param-assignment + to:setFAC::@1 +setFAC::@1: scope:[setFAC] from setFAC asm { ldy$felda$ffjsr$b391 } to:setFAC::@return -setFAC::@return: scope:[setFAC] from setFAC +setFAC::@return: scope:[setFAC] from setFAC::@1 return to:@return setMEMtoFAC: scope:[setMEMtoFAC] from main::@3 main::@6 (byte*) setMEMtoFAC::mem#2 ← phi( main::@3/(const byte[]) f_127#0 main::@6/(const byte[]) f_i#0 ) - (byte*) prepareMEM::mem#0 ← (byte*) setMEMtoFAC::mem#2 - (byte*~) prepareMEM::mem#6 ← (byte*) prepareMEM::mem#0 + (byte*) prepareMEM::mem#1 ← (byte*) setMEMtoFAC::mem#2 + (byte*~) prepareMEM::mem#8 ← (byte*) prepareMEM::mem#1 call prepareMEM param-assignment to:setMEMtoFAC::@1 setMEMtoFAC::@1: scope:[setMEMtoFAC] from setMEMtoFAC @@ -5560,6 +5502,7 @@ Calls in [print_byte] to print_char:65 print_char:71 Calls in [addMEMtoFAC] to prepareMEM:82 Calls in [mulFACbyMEM] to prepareMEM:94 Calls in [divMEMbyFAC] to prepareMEM:100 +Calls in [setFAC] to prepareMEM:107 Calls in [setMEMtoFAC] to prepareMEM:113 Propagating live ranges... @@ -5735,8 +5678,8 @@ print_char::@return: scope:[print_char] from print_char to:@return getFAC: scope:[getFAC] from main::@12 asm { jsr$b1aasty$festa$ff } - [78] (word) getFAC::w#1 ← (byte/signed byte/word/signed word) 0 lo= *((const byte*) getFAC::lo#0) [ getFAC::w#1 ] - [79] (word) getFAC::return#0 ← (word) getFAC::w#1 hi= *((const byte*) getFAC::hi#0) [ getFAC::return#0 ] + [78] (word) getFAC::w#1 ← (byte/signed byte/word/signed word) 0 lo= *((const byte*) memLo#0) [ getFAC::w#1 ] + [79] (word) getFAC::return#0 ← (word) getFAC::w#1 hi= *((const byte*) memHi#0) [ getFAC::return#0 ] to:getFAC::@return getFAC::@return: scope:[getFAC] from getFAC [80] return [ getFAC::return#0 ] @@ -5751,11 +5694,11 @@ addMEMtoFAC::@1: scope:[addMEMtoFAC] from addMEMtoFAC addMEMtoFAC::@return: scope:[addMEMtoFAC] from addMEMtoFAC::@1 [84] return [ ] to:@return -prepareMEM: scope:[prepareMEM] from addMEMtoFAC divMEMbyFAC mulFACbyMEM setMEMtoFAC - [85] (byte*) prepareMEM::mem#4 ← phi( addMEMtoFAC/(const byte[]) f_127#0 divMEMbyFAC/(const byte[]) f_i#0 mulFACbyMEM/(byte*~) prepareMEM::mem#5 setMEMtoFAC/(byte*~) prepareMEM::mem#6 ) [ prepareMEM::mem#4 ] - [86] (byte~) prepareMEM::$0 ← < (byte*) prepareMEM::mem#4 [ prepareMEM::mem#4 prepareMEM::$0 ] - [87] *((const byte*) memLo#0) ← (byte~) prepareMEM::$0 [ prepareMEM::mem#4 ] - [88] (byte~) prepareMEM::$1 ← > (byte*) prepareMEM::mem#4 [ prepareMEM::$1 ] +prepareMEM: scope:[prepareMEM] from addMEMtoFAC divMEMbyFAC mulFACbyMEM setFAC setMEMtoFAC + [85] (byte*) prepareMEM::mem#5 ← phi( addMEMtoFAC/(const byte[]) f_127#0 divMEMbyFAC/(const byte[]) f_i#0 mulFACbyMEM/(byte*~) prepareMEM::mem#6 setFAC/(byte*~) prepareMEM::mem#7 setMEMtoFAC/(byte*~) prepareMEM::mem#8 ) [ prepareMEM::mem#5 ] + [86] (byte~) prepareMEM::$0 ← < (byte*) prepareMEM::mem#5 [ prepareMEM::mem#5 prepareMEM::$0 ] + [87] *((const byte*) memLo#0) ← (byte~) prepareMEM::$0 [ prepareMEM::mem#5 ] + [88] (byte~) prepareMEM::$1 ← > (byte*) prepareMEM::mem#5 [ prepareMEM::$1 ] [89] *((const byte*) memHi#0) ← (byte~) prepareMEM::$1 [ ] to:prepareMEM::@return prepareMEM::@return: scope:[prepareMEM] from prepareMEM @@ -5763,8 +5706,8 @@ prepareMEM::@return: scope:[prepareMEM] from prepareMEM to:@return mulFACbyMEM: scope:[mulFACbyMEM] from main::@10 main::@5 [91] (byte*) mulFACbyMEM::mem#2 ← phi( main::@10/(const byte[]) f_127#0 main::@5/(const byte*) f_2pi#0 ) [ mulFACbyMEM::mem#2 ] - [92] (byte*) prepareMEM::mem#3 ← (byte*) mulFACbyMEM::mem#2 [ prepareMEM::mem#3 ] - [93] (byte*~) prepareMEM::mem#5 ← (byte*) prepareMEM::mem#3 [ prepareMEM::mem#5 ] + [92] (byte*) prepareMEM::mem#4 ← (byte*) mulFACbyMEM::mem#2 [ prepareMEM::mem#4 ] + [93] (byte*~) prepareMEM::mem#6 ← (byte*) prepareMEM::mem#4 [ prepareMEM::mem#6 ] [94] call prepareMEM param-assignment [ ] to:mulFACbyMEM::@1 mulFACbyMEM::@1: scope:[mulFACbyMEM] from mulFACbyMEM @@ -5791,19 +5734,21 @@ divMEMbyFAC::@return: scope:[divMEMbyFAC] from divMEMbyFAC::@1 to:@return setFAC: scope:[setFAC] from main main::@1 main::@7 [103] (word) setFAC::w#3 ← phi( main/(byte/signed byte/word/signed word) 127 main::@1/(word~) setFAC::w#4 main::@7/(byte/signed byte/word/signed word) 25 ) [ setFAC::w#3 ] - [104] (byte~) setFAC::$0 ← < (word) setFAC::w#3 [ setFAC::w#3 setFAC::$0 ] - [105] *((const byte*) setFAC::lo#0) ← (byte~) setFAC::$0 [ setFAC::w#3 ] - [106] (byte~) setFAC::$1 ← > (word) setFAC::w#3 [ setFAC::$1 ] - [107] *((const byte*) setFAC::hi#0) ← (byte~) setFAC::$1 [ ] + [104] (byte*~) setFAC::$0 ← ((byte*)) (word) setFAC::w#3 [ setFAC::$0 ] + [105] (byte*) prepareMEM::mem#0 ← (byte*~) setFAC::$0 [ prepareMEM::mem#0 ] + [106] (byte*~) prepareMEM::mem#7 ← (byte*) prepareMEM::mem#0 [ prepareMEM::mem#7 ] + [107] call prepareMEM param-assignment [ ] + to:setFAC::@1 +setFAC::@1: scope:[setFAC] from setFAC asm { ldy$felda$ffjsr$b391 } to:setFAC::@return -setFAC::@return: scope:[setFAC] from setFAC +setFAC::@return: scope:[setFAC] from setFAC::@1 [109] return [ ] to:@return setMEMtoFAC: scope:[setMEMtoFAC] from main::@3 main::@6 [110] (byte*) setMEMtoFAC::mem#2 ← phi( main::@3/(const byte[]) f_127#0 main::@6/(const byte[]) f_i#0 ) [ setMEMtoFAC::mem#2 ] - [111] (byte*) prepareMEM::mem#0 ← (byte*) setMEMtoFAC::mem#2 [ prepareMEM::mem#0 ] - [112] (byte*~) prepareMEM::mem#6 ← (byte*) prepareMEM::mem#0 [ prepareMEM::mem#6 ] + [111] (byte*) prepareMEM::mem#1 ← (byte*) setMEMtoFAC::mem#2 [ prepareMEM::mem#1 ] + [112] (byte*~) prepareMEM::mem#8 ← (byte*) prepareMEM::mem#1 [ prepareMEM::mem#8 ] [113] call prepareMEM param-assignment [ ] to:setMEMtoFAC::@1 setMEMtoFAC::@1: scope:[setMEMtoFAC] from setMEMtoFAC @@ -5829,11 +5774,12 @@ Coalesced [63] print_char::ch#3 ← print_char::ch#0 Coalesced [64] char_cursor#54 ← char_cursor#31 Coalesced [69] print_char::ch#4 ← print_char::ch#1 Coalesced (already) [70] char_cursor#55 ← char_cursor#10 -Coalesced [93] prepareMEM::mem#5 ← prepareMEM::mem#3 -Coalesced [112] prepareMEM::mem#6 ← prepareMEM::mem#0 +Coalesced [93] prepareMEM::mem#6 ← prepareMEM::mem#4 +Coalesced [106] prepareMEM::mem#7 ← prepareMEM::mem#0 +Coalesced [112] prepareMEM::mem#8 ← prepareMEM::mem#1 Coalesced down to 9 phi equivalence classes Culled Empty Block (label) print_ln::@3 -Block Sequence Planned @begin @31 @end main main::@3 main::@1 main::@5 main::@6 main::@7 main::@8 main::@9 main::@10 main::@11 main::@12 main::@13 main::@14 main::@15 main::@return main::@16 print_ln print_ln::@1 print_ln::@return print_word print_word::@1 print_word::@return print_byte print_byte::@1 print_byte::@return print_char print_char::@return getFAC getFAC::@return addMEMtoFAC addMEMtoFAC::@1 addMEMtoFAC::@return prepareMEM prepareMEM::@return mulFACbyMEM mulFACbyMEM::@1 mulFACbyMEM::@return sinFAC sinFAC::@return divMEMbyFAC divMEMbyFAC::@1 divMEMbyFAC::@return setFAC setFAC::@return setMEMtoFAC setMEMtoFAC::@1 setMEMtoFAC::@return +Block Sequence Planned @begin @31 @end main main::@3 main::@1 main::@5 main::@6 main::@7 main::@8 main::@9 main::@10 main::@11 main::@12 main::@13 main::@14 main::@15 main::@return main::@16 print_ln print_ln::@1 print_ln::@return print_word print_word::@1 print_word::@return print_byte print_byte::@1 print_byte::@return print_char print_char::@return getFAC getFAC::@return addMEMtoFAC addMEMtoFAC::@1 addMEMtoFAC::@return prepareMEM prepareMEM::@return mulFACbyMEM mulFACbyMEM::@1 mulFACbyMEM::@return sinFAC sinFAC::@return divMEMbyFAC divMEMbyFAC::@1 divMEMbyFAC::@return setFAC setFAC::@1 setFAC::@return setMEMtoFAC setMEMtoFAC::@1 setMEMtoFAC::@return Adding NOP phi() at start of @begin Adding NOP phi() at start of @31 Adding NOP phi() at start of @end @@ -6008,8 +5954,8 @@ print_char::@return: scope:[print_char] from print_char to:@return getFAC: scope:[getFAC] from main::@12 asm { jsr$b1aasty$festa$ff } - [65] (word) getFAC::w#1 ← (byte/signed byte/word/signed word) 0 lo= *((const byte*) getFAC::lo#0) [ getFAC::w#1 ] - [66] (word) getFAC::return#0 ← (word) getFAC::w#1 hi= *((const byte*) getFAC::hi#0) [ getFAC::return#0 ] + [65] (word) getFAC::w#1 ← (byte/signed byte/word/signed word) 0 lo= *((const byte*) memLo#0) [ getFAC::w#1 ] + [66] (word) getFAC::return#0 ← (word) getFAC::w#1 hi= *((const byte*) memHi#0) [ getFAC::return#0 ] to:getFAC::@return getFAC::@return: scope:[getFAC] from getFAC [67] return [ getFAC::return#0 ] @@ -6024,11 +5970,11 @@ addMEMtoFAC::@1: scope:[addMEMtoFAC] from addMEMtoFAC addMEMtoFAC::@return: scope:[addMEMtoFAC] from addMEMtoFAC::@1 [71] return [ ] to:@return -prepareMEM: scope:[prepareMEM] from addMEMtoFAC divMEMbyFAC mulFACbyMEM setMEMtoFAC - [72] (byte*) prepareMEM::mem#4 ← phi( addMEMtoFAC/(const byte[]) f_127#0 divMEMbyFAC/(const byte[]) f_i#0 mulFACbyMEM/(byte*) prepareMEM::mem#3 setMEMtoFAC/(byte*) prepareMEM::mem#0 ) [ prepareMEM::mem#4 ] - [73] (byte~) prepareMEM::$0 ← < (byte*) prepareMEM::mem#4 [ prepareMEM::mem#4 prepareMEM::$0 ] - [74] *((const byte*) memLo#0) ← (byte~) prepareMEM::$0 [ prepareMEM::mem#4 ] - [75] (byte~) prepareMEM::$1 ← > (byte*) prepareMEM::mem#4 [ prepareMEM::$1 ] +prepareMEM: scope:[prepareMEM] from addMEMtoFAC divMEMbyFAC mulFACbyMEM setFAC setMEMtoFAC + [72] (byte*) prepareMEM::mem#5 ← phi( addMEMtoFAC/(const byte[]) f_127#0 divMEMbyFAC/(const byte[]) f_i#0 mulFACbyMEM/(byte*) prepareMEM::mem#4 setFAC/(byte*) prepareMEM::mem#0 setMEMtoFAC/(byte*) prepareMEM::mem#1 ) [ prepareMEM::mem#5 ] + [73] (byte~) prepareMEM::$0 ← < (byte*) prepareMEM::mem#5 [ prepareMEM::mem#5 prepareMEM::$0 ] + [74] *((const byte*) memLo#0) ← (byte~) prepareMEM::$0 [ prepareMEM::mem#5 ] + [75] (byte~) prepareMEM::$1 ← > (byte*) prepareMEM::mem#5 [ prepareMEM::$1 ] [76] *((const byte*) memHi#0) ← (byte~) prepareMEM::$1 [ ] to:prepareMEM::@return prepareMEM::@return: scope:[prepareMEM] from prepareMEM @@ -6036,7 +5982,7 @@ prepareMEM::@return: scope:[prepareMEM] from prepareMEM to:@return mulFACbyMEM: scope:[mulFACbyMEM] from main::@10 main::@5 [78] (byte*) mulFACbyMEM::mem#2 ← phi( main::@10/(const byte[]) f_127#0 main::@5/(const byte*) f_2pi#0 ) [ mulFACbyMEM::mem#2 ] - [79] (byte*) prepareMEM::mem#3 ← (byte*) mulFACbyMEM::mem#2 [ prepareMEM::mem#3 ] + [79] (byte*) prepareMEM::mem#4 ← (byte*) mulFACbyMEM::mem#2 [ prepareMEM::mem#4 ] [80] call prepareMEM param-assignment [ ] to:mulFACbyMEM::@1 mulFACbyMEM::@1: scope:[mulFACbyMEM] from mulFACbyMEM @@ -6063,25 +6009,26 @@ divMEMbyFAC::@return: scope:[divMEMbyFAC] from divMEMbyFAC::@1 to:@return setFAC: scope:[setFAC] from main main::@1 main::@7 [89] (word) setFAC::w#3 ← phi( main/(byte/signed byte/word/signed word) 127 main::@1/(word) setFAC::w#1 main::@7/(byte/signed byte/word/signed word) 25 ) [ setFAC::w#3 ] - [90] (byte~) setFAC::$0 ← < (word) setFAC::w#3 [ setFAC::w#3 setFAC::$0 ] - [91] *((const byte*) setFAC::lo#0) ← (byte~) setFAC::$0 [ setFAC::w#3 ] - [92] (byte~) setFAC::$1 ← > (word) setFAC::w#3 [ setFAC::$1 ] - [93] *((const byte*) setFAC::hi#0) ← (byte~) setFAC::$1 [ ] + [90] (byte*~) setFAC::$0 ← ((byte*)) (word) setFAC::w#3 [ setFAC::$0 ] + [91] (byte*) prepareMEM::mem#0 ← (byte*~) setFAC::$0 [ prepareMEM::mem#0 ] + [92] call prepareMEM param-assignment [ ] + to:setFAC::@1 +setFAC::@1: scope:[setFAC] from setFAC asm { ldy$felda$ffjsr$b391 } to:setFAC::@return -setFAC::@return: scope:[setFAC] from setFAC - [95] return [ ] +setFAC::@return: scope:[setFAC] from setFAC::@1 + [94] return [ ] to:@return setMEMtoFAC: scope:[setMEMtoFAC] from main::@3 main::@6 - [96] (byte*) setMEMtoFAC::mem#2 ← phi( main::@3/(const byte[]) f_127#0 main::@6/(const byte[]) f_i#0 ) [ setMEMtoFAC::mem#2 ] - [97] (byte*) prepareMEM::mem#0 ← (byte*) setMEMtoFAC::mem#2 [ prepareMEM::mem#0 ] - [98] call prepareMEM param-assignment [ ] + [95] (byte*) setMEMtoFAC::mem#2 ← phi( main::@3/(const byte[]) f_127#0 main::@6/(const byte[]) f_i#0 ) [ setMEMtoFAC::mem#2 ] + [96] (byte*) prepareMEM::mem#1 ← (byte*) setMEMtoFAC::mem#2 [ prepareMEM::mem#1 ] + [97] call prepareMEM param-assignment [ ] to:setMEMtoFAC::@1 setMEMtoFAC::@1: scope:[setMEMtoFAC] from setMEMtoFAC asm { ldx$feldy$ffjsr$bbd4 } to:setMEMtoFAC::@return setMEMtoFAC::@return: scope:[setMEMtoFAC] from setMEMtoFAC::@1 - [100] return [ ] + [99] return [ ] to:@return CONTROL FLOW GRAPH - PHI MEM COALESCED @@ -6214,8 +6161,8 @@ print_char::@return: scope:[print_char] from print_char to:@return getFAC: scope:[getFAC] from main::@12 asm { jsr$b1aasty$festa$ff } - [65] (word) getFAC::w#1 ← (byte/signed byte/word/signed word) 0 lo= *((const byte*) getFAC::lo#0) [ getFAC::w#1 ] ( main:2::getFAC:27 [ main::i#10 char_cursor#32 line_cursor#13 getFAC::w#1 ] ) - [66] (word) getFAC::return#0 ← (word) getFAC::w#1 hi= *((const byte*) getFAC::hi#0) [ getFAC::return#0 ] ( main:2::getFAC:27 [ main::i#10 char_cursor#32 line_cursor#13 getFAC::return#0 ] ) + [65] (word) getFAC::w#1 ← (byte/signed byte/word/signed word) 0 lo= *((const byte*) memLo#0) [ getFAC::w#1 ] ( main:2::getFAC:27 [ main::i#10 char_cursor#32 line_cursor#13 getFAC::w#1 ] ) + [66] (word) getFAC::return#0 ← (word) getFAC::w#1 hi= *((const byte*) memHi#0) [ getFAC::return#0 ] ( main:2::getFAC:27 [ main::i#10 char_cursor#32 line_cursor#13 getFAC::return#0 ] ) to:getFAC::@return getFAC::@return: scope:[getFAC] from getFAC [67] return [ getFAC::return#0 ] ( main:2::getFAC:27 [ main::i#10 char_cursor#32 line_cursor#13 getFAC::return#0 ] ) @@ -6230,19 +6177,19 @@ addMEMtoFAC::@1: scope:[addMEMtoFAC] from addMEMtoFAC addMEMtoFAC::@return: scope:[addMEMtoFAC] from addMEMtoFAC::@1 [71] return [ ] ( main:2::addMEMtoFAC:25 [ main::i#10 char_cursor#32 line_cursor#13 ] ) to:@return -prepareMEM: scope:[prepareMEM] from addMEMtoFAC divMEMbyFAC mulFACbyMEM setMEMtoFAC - [72] (byte*) prepareMEM::mem#4 ← phi( addMEMtoFAC/(const byte[]) f_127#0 divMEMbyFAC/(const byte[]) f_i#0 mulFACbyMEM/(byte*) prepareMEM::mem#3 setMEMtoFAC/(byte*) prepareMEM::mem#0 ) [ prepareMEM::mem#4 ] ( main:2::addMEMtoFAC:25::prepareMEM:69 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 ] main:2::mulFACbyMEM:13::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 ] main:2::mulFACbyMEM:23::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 ] main:2::divMEMbyFAC:19::prepareMEM:86 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 ] main:2::setMEMtoFAC:7::prepareMEM:98 [ prepareMEM::mem#4 ] main:2::setMEMtoFAC:15::prepareMEM:98 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 ] ) - [73] (byte~) prepareMEM::$0 ← < (byte*) prepareMEM::mem#4 [ prepareMEM::mem#4 prepareMEM::$0 ] ( main:2::addMEMtoFAC:25::prepareMEM:69 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 prepareMEM::$0 ] main:2::mulFACbyMEM:13::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 prepareMEM::$0 ] main:2::mulFACbyMEM:23::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 prepareMEM::$0 ] main:2::divMEMbyFAC:19::prepareMEM:86 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 prepareMEM::$0 ] main:2::setMEMtoFAC:7::prepareMEM:98 [ prepareMEM::mem#4 prepareMEM::$0 ] main:2::setMEMtoFAC:15::prepareMEM:98 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 prepareMEM::$0 ] ) - [74] *((const byte*) memLo#0) ← (byte~) prepareMEM::$0 [ prepareMEM::mem#4 ] ( main:2::addMEMtoFAC:25::prepareMEM:69 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 ] main:2::mulFACbyMEM:13::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 ] main:2::mulFACbyMEM:23::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 ] main:2::divMEMbyFAC:19::prepareMEM:86 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 ] main:2::setMEMtoFAC:7::prepareMEM:98 [ prepareMEM::mem#4 ] main:2::setMEMtoFAC:15::prepareMEM:98 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 ] ) - [75] (byte~) prepareMEM::$1 ← > (byte*) prepareMEM::mem#4 [ prepareMEM::$1 ] ( main:2::addMEMtoFAC:25::prepareMEM:69 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] main:2::mulFACbyMEM:13::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] main:2::mulFACbyMEM:23::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] main:2::divMEMbyFAC:19::prepareMEM:86 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] main:2::setMEMtoFAC:7::prepareMEM:98 [ prepareMEM::$1 ] main:2::setMEMtoFAC:15::prepareMEM:98 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] ) - [76] *((const byte*) memHi#0) ← (byte~) prepareMEM::$1 [ ] ( main:2::addMEMtoFAC:25::prepareMEM:69 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::mulFACbyMEM:13::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::mulFACbyMEM:23::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::divMEMbyFAC:19::prepareMEM:86 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::setMEMtoFAC:7::prepareMEM:98 [ ] main:2::setMEMtoFAC:15::prepareMEM:98 [ main::i#10 char_cursor#32 line_cursor#13 ] ) +prepareMEM: scope:[prepareMEM] from addMEMtoFAC divMEMbyFAC mulFACbyMEM setFAC setMEMtoFAC + [72] (byte*) prepareMEM::mem#5 ← phi( addMEMtoFAC/(const byte[]) f_127#0 divMEMbyFAC/(const byte[]) f_i#0 mulFACbyMEM/(byte*) prepareMEM::mem#4 setFAC/(byte*) prepareMEM::mem#0 setMEMtoFAC/(byte*) prepareMEM::mem#1 ) [ prepareMEM::mem#5 ] ( main:2::addMEMtoFAC:25::prepareMEM:69 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] main:2::mulFACbyMEM:13::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] main:2::mulFACbyMEM:23::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] main:2::divMEMbyFAC:19::prepareMEM:86 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] main:2::setFAC:5::prepareMEM:92 [ prepareMEM::mem#5 ] main:2::setFAC:11::prepareMEM:92 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] main:2::setFAC:17::prepareMEM:92 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] main:2::setMEMtoFAC:7::prepareMEM:97 [ prepareMEM::mem#5 ] main:2::setMEMtoFAC:15::prepareMEM:97 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] ) + [73] (byte~) prepareMEM::$0 ← < (byte*) prepareMEM::mem#5 [ prepareMEM::mem#5 prepareMEM::$0 ] ( main:2::addMEMtoFAC:25::prepareMEM:69 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 prepareMEM::$0 ] main:2::mulFACbyMEM:13::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 prepareMEM::$0 ] main:2::mulFACbyMEM:23::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 prepareMEM::$0 ] main:2::divMEMbyFAC:19::prepareMEM:86 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 prepareMEM::$0 ] main:2::setFAC:5::prepareMEM:92 [ prepareMEM::mem#5 prepareMEM::$0 ] main:2::setFAC:11::prepareMEM:92 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 prepareMEM::$0 ] main:2::setFAC:17::prepareMEM:92 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 prepareMEM::$0 ] main:2::setMEMtoFAC:7::prepareMEM:97 [ prepareMEM::mem#5 prepareMEM::$0 ] main:2::setMEMtoFAC:15::prepareMEM:97 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 prepareMEM::$0 ] ) + [74] *((const byte*) memLo#0) ← (byte~) prepareMEM::$0 [ prepareMEM::mem#5 ] ( main:2::addMEMtoFAC:25::prepareMEM:69 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] main:2::mulFACbyMEM:13::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] main:2::mulFACbyMEM:23::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] main:2::divMEMbyFAC:19::prepareMEM:86 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] main:2::setFAC:5::prepareMEM:92 [ prepareMEM::mem#5 ] main:2::setFAC:11::prepareMEM:92 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] main:2::setFAC:17::prepareMEM:92 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] main:2::setMEMtoFAC:7::prepareMEM:97 [ prepareMEM::mem#5 ] main:2::setMEMtoFAC:15::prepareMEM:97 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] ) + [75] (byte~) prepareMEM::$1 ← > (byte*) prepareMEM::mem#5 [ prepareMEM::$1 ] ( main:2::addMEMtoFAC:25::prepareMEM:69 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] main:2::mulFACbyMEM:13::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] main:2::mulFACbyMEM:23::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] main:2::divMEMbyFAC:19::prepareMEM:86 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] main:2::setFAC:5::prepareMEM:92 [ prepareMEM::$1 ] main:2::setFAC:11::prepareMEM:92 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] main:2::setFAC:17::prepareMEM:92 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] main:2::setMEMtoFAC:7::prepareMEM:97 [ prepareMEM::$1 ] main:2::setMEMtoFAC:15::prepareMEM:97 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] ) + [76] *((const byte*) memHi#0) ← (byte~) prepareMEM::$1 [ ] ( main:2::addMEMtoFAC:25::prepareMEM:69 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::mulFACbyMEM:13::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::mulFACbyMEM:23::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::divMEMbyFAC:19::prepareMEM:86 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::setFAC:5::prepareMEM:92 [ ] main:2::setFAC:11::prepareMEM:92 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::setFAC:17::prepareMEM:92 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::setMEMtoFAC:7::prepareMEM:97 [ ] main:2::setMEMtoFAC:15::prepareMEM:97 [ main::i#10 char_cursor#32 line_cursor#13 ] ) to:prepareMEM::@return prepareMEM::@return: scope:[prepareMEM] from prepareMEM - [77] return [ ] ( main:2::addMEMtoFAC:25::prepareMEM:69 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::mulFACbyMEM:13::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::mulFACbyMEM:23::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::divMEMbyFAC:19::prepareMEM:86 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::setMEMtoFAC:7::prepareMEM:98 [ ] main:2::setMEMtoFAC:15::prepareMEM:98 [ main::i#10 char_cursor#32 line_cursor#13 ] ) + [77] return [ ] ( main:2::addMEMtoFAC:25::prepareMEM:69 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::mulFACbyMEM:13::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::mulFACbyMEM:23::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::divMEMbyFAC:19::prepareMEM:86 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::setFAC:5::prepareMEM:92 [ ] main:2::setFAC:11::prepareMEM:92 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::setFAC:17::prepareMEM:92 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::setMEMtoFAC:7::prepareMEM:97 [ ] main:2::setMEMtoFAC:15::prepareMEM:97 [ main::i#10 char_cursor#32 line_cursor#13 ] ) to:@return mulFACbyMEM: scope:[mulFACbyMEM] from main::@10 main::@5 [78] (byte*) mulFACbyMEM::mem#2 ← phi( main::@10/(const byte[]) f_127#0 main::@5/(const byte*) f_2pi#0 ) [ mulFACbyMEM::mem#2 ] ( main:2::mulFACbyMEM:13 [ main::i#10 char_cursor#32 line_cursor#13 mulFACbyMEM::mem#2 ] main:2::mulFACbyMEM:23 [ main::i#10 char_cursor#32 line_cursor#13 mulFACbyMEM::mem#2 ] ) - [79] (byte*) prepareMEM::mem#3 ← (byte*) mulFACbyMEM::mem#2 [ prepareMEM::mem#3 ] ( main:2::mulFACbyMEM:13 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#3 ] main:2::mulFACbyMEM:23 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#3 ] ) + [79] (byte*) prepareMEM::mem#4 ← (byte*) mulFACbyMEM::mem#2 [ prepareMEM::mem#4 ] ( main:2::mulFACbyMEM:13 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 ] main:2::mulFACbyMEM:23 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 ] ) [80] call prepareMEM param-assignment [ ] ( main:2::mulFACbyMEM:13 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::mulFACbyMEM:23 [ main::i#10 char_cursor#32 line_cursor#13 ] ) to:mulFACbyMEM::@1 mulFACbyMEM::@1: scope:[mulFACbyMEM] from mulFACbyMEM @@ -6269,25 +6216,26 @@ divMEMbyFAC::@return: scope:[divMEMbyFAC] from divMEMbyFAC::@1 to:@return setFAC: scope:[setFAC] from main main::@1 main::@7 [89] (word) setFAC::w#3 ← phi( main/(byte/signed byte/word/signed word) 127 main::@1/(word) setFAC::w#1 main::@7/(byte/signed byte/word/signed word) 25 ) [ setFAC::w#3 ] ( main:2::setFAC:5 [ setFAC::w#3 ] main:2::setFAC:11 [ main::i#10 char_cursor#32 line_cursor#13 setFAC::w#3 ] main:2::setFAC:17 [ main::i#10 char_cursor#32 line_cursor#13 setFAC::w#3 ] ) - [90] (byte~) setFAC::$0 ← < (word) setFAC::w#3 [ setFAC::w#3 setFAC::$0 ] ( main:2::setFAC:5 [ setFAC::w#3 setFAC::$0 ] main:2::setFAC:11 [ main::i#10 char_cursor#32 line_cursor#13 setFAC::w#3 setFAC::$0 ] main:2::setFAC:17 [ main::i#10 char_cursor#32 line_cursor#13 setFAC::w#3 setFAC::$0 ] ) - [91] *((const byte*) setFAC::lo#0) ← (byte~) setFAC::$0 [ setFAC::w#3 ] ( main:2::setFAC:5 [ setFAC::w#3 ] main:2::setFAC:11 [ main::i#10 char_cursor#32 line_cursor#13 setFAC::w#3 ] main:2::setFAC:17 [ main::i#10 char_cursor#32 line_cursor#13 setFAC::w#3 ] ) - [92] (byte~) setFAC::$1 ← > (word) setFAC::w#3 [ setFAC::$1 ] ( main:2::setFAC:5 [ setFAC::$1 ] main:2::setFAC:11 [ main::i#10 char_cursor#32 line_cursor#13 setFAC::$1 ] main:2::setFAC:17 [ main::i#10 char_cursor#32 line_cursor#13 setFAC::$1 ] ) - [93] *((const byte*) setFAC::hi#0) ← (byte~) setFAC::$1 [ ] ( main:2::setFAC:5 [ ] main:2::setFAC:11 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::setFAC:17 [ main::i#10 char_cursor#32 line_cursor#13 ] ) + [90] (byte*~) setFAC::$0 ← ((byte*)) (word) setFAC::w#3 [ setFAC::$0 ] ( main:2::setFAC:5 [ setFAC::$0 ] main:2::setFAC:11 [ main::i#10 char_cursor#32 line_cursor#13 setFAC::$0 ] main:2::setFAC:17 [ main::i#10 char_cursor#32 line_cursor#13 setFAC::$0 ] ) + [91] (byte*) prepareMEM::mem#0 ← (byte*~) setFAC::$0 [ prepareMEM::mem#0 ] ( main:2::setFAC:5 [ prepareMEM::mem#0 ] main:2::setFAC:11 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#0 ] main:2::setFAC:17 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#0 ] ) + [92] call prepareMEM param-assignment [ ] ( main:2::setFAC:5 [ ] main:2::setFAC:11 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::setFAC:17 [ main::i#10 char_cursor#32 line_cursor#13 ] ) + to:setFAC::@1 +setFAC::@1: scope:[setFAC] from setFAC asm { ldy$felda$ffjsr$b391 } to:setFAC::@return -setFAC::@return: scope:[setFAC] from setFAC - [95] return [ ] ( main:2::setFAC:5 [ ] main:2::setFAC:11 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::setFAC:17 [ main::i#10 char_cursor#32 line_cursor#13 ] ) +setFAC::@return: scope:[setFAC] from setFAC::@1 + [94] return [ ] ( main:2::setFAC:5 [ ] main:2::setFAC:11 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::setFAC:17 [ main::i#10 char_cursor#32 line_cursor#13 ] ) to:@return setMEMtoFAC: scope:[setMEMtoFAC] from main::@3 main::@6 - [96] (byte*) setMEMtoFAC::mem#2 ← phi( main::@3/(const byte[]) f_127#0 main::@6/(const byte[]) f_i#0 ) [ setMEMtoFAC::mem#2 ] ( main:2::setMEMtoFAC:7 [ setMEMtoFAC::mem#2 ] main:2::setMEMtoFAC:15 [ main::i#10 char_cursor#32 line_cursor#13 setMEMtoFAC::mem#2 ] ) - [97] (byte*) prepareMEM::mem#0 ← (byte*) setMEMtoFAC::mem#2 [ prepareMEM::mem#0 ] ( main:2::setMEMtoFAC:7 [ prepareMEM::mem#0 ] main:2::setMEMtoFAC:15 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#0 ] ) - [98] call prepareMEM param-assignment [ ] ( main:2::setMEMtoFAC:7 [ ] main:2::setMEMtoFAC:15 [ main::i#10 char_cursor#32 line_cursor#13 ] ) + [95] (byte*) setMEMtoFAC::mem#2 ← phi( main::@3/(const byte[]) f_127#0 main::@6/(const byte[]) f_i#0 ) [ setMEMtoFAC::mem#2 ] ( main:2::setMEMtoFAC:7 [ setMEMtoFAC::mem#2 ] main:2::setMEMtoFAC:15 [ main::i#10 char_cursor#32 line_cursor#13 setMEMtoFAC::mem#2 ] ) + [96] (byte*) prepareMEM::mem#1 ← (byte*) setMEMtoFAC::mem#2 [ prepareMEM::mem#1 ] ( main:2::setMEMtoFAC:7 [ prepareMEM::mem#1 ] main:2::setMEMtoFAC:15 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#1 ] ) + [97] call prepareMEM param-assignment [ ] ( main:2::setMEMtoFAC:7 [ ] main:2::setMEMtoFAC:15 [ main::i#10 char_cursor#32 line_cursor#13 ] ) to:setMEMtoFAC::@1 setMEMtoFAC::@1: scope:[setMEMtoFAC] from setMEMtoFAC asm { ldx$feldy$ffjsr$bbd4 } to:setMEMtoFAC::@return setMEMtoFAC::@return: scope:[setMEMtoFAC] from setMEMtoFAC::@1 - [100] return [ ] ( main:2::setMEMtoFAC:7 [ ] main:2::setMEMtoFAC:15 [ main::i#10 char_cursor#32 line_cursor#13 ] ) + [99] return [ ] ( main:2::setMEMtoFAC:7 [ ] main:2::setMEMtoFAC:15 [ main::i#10 char_cursor#32 line_cursor#13 ] ) to:@return DOMINATORS @@ -6326,8 +6274,8 @@ getFAC::@return dominated by main::@9 main::@7 main::@8 main main::@1 main::@5 addMEMtoFAC dominated by main::@9 main::@7 main::@8 main main::@1 main::@5 main::@6 @31 main::@3 @begin addMEMtoFAC main::@11 main::@10 addMEMtoFAC::@1 dominated by main::@9 main::@7 main::@8 main main::@1 main::@5 main::@6 @31 main::@3 @begin addMEMtoFAC::@1 addMEMtoFAC main::@11 main::@10 addMEMtoFAC::@return dominated by main::@9 main::@7 main::@8 main main::@1 main::@5 main::@6 @31 main::@3 @begin addMEMtoFAC::@1 addMEMtoFAC main::@11 main::@10 addMEMtoFAC::@return -prepareMEM dominated by main @31 main::@3 @begin prepareMEM -prepareMEM::@return dominated by main @31 main::@3 @begin prepareMEM::@return prepareMEM +prepareMEM dominated by main @31 @begin prepareMEM +prepareMEM::@return dominated by main @31 @begin prepareMEM::@return prepareMEM mulFACbyMEM dominated by main mulFACbyMEM main::@1 main::@5 @31 main::@3 @begin mulFACbyMEM::@1 dominated by main mulFACbyMEM main::@1 main::@5 @31 main::@3 @begin mulFACbyMEM::@1 mulFACbyMEM::@return dominated by main mulFACbyMEM::@return mulFACbyMEM main::@1 main::@5 @31 main::@3 @begin mulFACbyMEM::@1 @@ -6337,7 +6285,8 @@ divMEMbyFAC dominated by main::@7 main::@8 main main::@1 main::@5 main::@6 @31 divMEMbyFAC::@1 dominated by main::@7 main::@8 main main::@1 main::@5 main::@6 @31 main::@3 @begin divMEMbyFAC::@1 divMEMbyFAC divMEMbyFAC::@return dominated by main::@7 main::@8 main main::@1 main::@5 main::@6 @31 main::@3 @begin divMEMbyFAC::@1 divMEMbyFAC divMEMbyFAC::@return setFAC dominated by main @31 @begin setFAC -setFAC::@return dominated by setFAC::@return main @31 @begin setFAC +setFAC::@1 dominated by main @31 @begin setFAC setFAC::@1 +setFAC::@return dominated by setFAC::@return main @31 @begin setFAC setFAC::@1 setMEMtoFAC dominated by main @31 main::@3 @begin setMEMtoFAC setMEMtoFAC::@1 dominated by main @31 main::@3 @begin setMEMtoFAC setMEMtoFAC::@1 setMEMtoFAC::@return dominated by main @31 main::@3 @begin setMEMtoFAC setMEMtoFAC::@1 setMEMtoFAC::@return @@ -6386,8 +6335,6 @@ VARIABLE REGISTER WEIGHTS (byte*) f_2pi (byte[]) f_i (word()) getFAC() -(byte*) getFAC::hi -(byte*) getFAC::lo (word) getFAC::return (word) getFAC::return#0 4.333333333333333 (word) getFAC::return#2 22.0 @@ -6413,8 +6360,9 @@ VARIABLE REGISTER WEIGHTS (byte~) prepareMEM::$1 4.0 (byte*) prepareMEM::mem (byte*) prepareMEM::mem#0 4.0 -(byte*) prepareMEM::mem#3 4.0 -(byte*) prepareMEM::mem#4 2.6666666666666665 +(byte*) prepareMEM::mem#1 4.0 +(byte*) prepareMEM::mem#4 4.0 +(byte*) prepareMEM::mem#5 3.333333333333333 (void()) print_byte((byte) print_byte::b) (byte~) print_byte::$0 4.0 (byte~) print_byte::$1 4.0 @@ -6437,13 +6385,10 @@ VARIABLE REGISTER WEIGHTS (word) print_word::w (word) print_word::w#0 3.75 (void()) setFAC((word) setFAC::w) -(byte~) setFAC::$0 4.0 -(byte~) setFAC::$1 4.0 -(byte*) setFAC::hi -(byte*) setFAC::lo +(byte*~) setFAC::$0 4.0 (word) setFAC::w (word) setFAC::w#1 22.0 -(word) setFAC::w#3 5.0 +(word) setFAC::w#3 13.0 (void()) setMEMtoFAC((byte*) setMEMtoFAC::mem) (byte*) setMEMtoFAC::mem (byte*) setMEMtoFAC::mem#2 2.0 @@ -6455,7 +6400,7 @@ Initial phi equivalence classes [ print_byte::b#2 print_byte::b#0 print_byte::b#1 ] [ print_char::ch#2 print_char::ch#0 print_char::ch#1 ] [ char_cursor#23 char_cursor#31 char_cursor#32 char_cursor#49 char_cursor#10 ] -[ prepareMEM::mem#4 prepareMEM::mem#3 prepareMEM::mem#0 ] +[ prepareMEM::mem#5 prepareMEM::mem#4 prepareMEM::mem#0 prepareMEM::mem#1 ] [ mulFACbyMEM::mem#2 ] [ setFAC::w#3 setFAC::w#1 ] [ setMEMtoFAC::mem#2 ] @@ -6474,14 +6419,13 @@ Added variable getFAC::return#0 to zero page equivalence class [ getFAC::return# Added variable prepareMEM::$0 to zero page equivalence class [ prepareMEM::$0 ] Added variable prepareMEM::$1 to zero page equivalence class [ prepareMEM::$1 ] Added variable setFAC::$0 to zero page equivalence class [ setFAC::$0 ] -Added variable setFAC::$1 to zero page equivalence class [ setFAC::$1 ] Complete equivalence classes [ main::i#10 main::i#1 ] [ line_cursor#6 line_cursor#13 print_ln::$0 ] [ print_byte::b#2 print_byte::b#0 print_byte::b#1 ] [ print_char::ch#2 print_char::ch#0 print_char::ch#1 ] [ char_cursor#23 char_cursor#31 char_cursor#32 char_cursor#49 char_cursor#10 ] -[ prepareMEM::mem#4 prepareMEM::mem#3 prepareMEM::mem#0 ] +[ prepareMEM::mem#5 prepareMEM::mem#4 prepareMEM::mem#0 prepareMEM::mem#1 ] [ mulFACbyMEM::mem#2 ] [ setFAC::w#3 setFAC::w#1 ] [ setMEMtoFAC::mem#2 ] @@ -6500,13 +6444,12 @@ Complete equivalence classes [ prepareMEM::$0 ] [ prepareMEM::$1 ] [ setFAC::$0 ] -[ setFAC::$1 ] Allocated zp ZP_BYTE:2 [ main::i#10 main::i#1 ] Allocated zp ZP_PTR_BYTE:3 [ line_cursor#6 line_cursor#13 print_ln::$0 ] Allocated zp ZP_BYTE:5 [ print_byte::b#2 print_byte::b#0 print_byte::b#1 ] Allocated zp ZP_BYTE:6 [ print_char::ch#2 print_char::ch#0 print_char::ch#1 ] Allocated zp ZP_PTR_BYTE:7 [ char_cursor#23 char_cursor#31 char_cursor#32 char_cursor#49 char_cursor#10 ] -Allocated zp ZP_PTR_BYTE:9 [ prepareMEM::mem#4 prepareMEM::mem#3 prepareMEM::mem#0 ] +Allocated zp ZP_PTR_BYTE:9 [ prepareMEM::mem#5 prepareMEM::mem#4 prepareMEM::mem#0 prepareMEM::mem#1 ] Allocated zp ZP_PTR_BYTE:11 [ mulFACbyMEM::mem#2 ] Allocated zp ZP_WORD:13 [ setFAC::w#3 setFAC::w#1 ] Allocated zp ZP_PTR_BYTE:15 [ setMEMtoFAC::mem#2 ] @@ -6524,8 +6467,7 @@ Allocated zp ZP_WORD:31 [ getFAC::w#1 ] Allocated zp ZP_WORD:33 [ getFAC::return#0 ] Allocated zp ZP_BYTE:35 [ prepareMEM::$0 ] Allocated zp ZP_BYTE:36 [ prepareMEM::$1 ] -Allocated zp ZP_BYTE:37 [ setFAC::$0 ] -Allocated zp ZP_BYTE:38 [ setFAC::$1 ] +Allocated zp ZP_PTR_BYTE:37 [ setFAC::$0 ] INITIAL ASM //SEG0 Basic Upstart .pc = $801 "Basic" @@ -6576,9 +6518,9 @@ main: { //SEG14 main::@3 b3: //SEG15 [7] call setMEMtoFAC param-assignment [ ] ( main:2 [ ] ) - //SEG16 [96] phi from main::@3 to setMEMtoFAC [phi:main::@3->setMEMtoFAC] + //SEG16 [95] phi from main::@3 to setMEMtoFAC [phi:main::@3->setMEMtoFAC] setMEMtoFAC_from_b3: - //SEG17 [96] phi (byte*) setMEMtoFAC::mem#2 = (const byte[]) f_127#0 [phi:main::@3->setMEMtoFAC#0] -- zpptrby1=cowo1 + //SEG17 [95] phi (byte*) setMEMtoFAC::mem#2 = (const byte[]) f_127#0 [phi:main::@3->setMEMtoFAC#0] -- zpptrby1=cowo1 lda #f_127 @@ -6637,9 +6579,9 @@ main: { //SEG34 main::@6 b6: //SEG35 [15] call setMEMtoFAC param-assignment [ main::i#10 char_cursor#32 line_cursor#13 ] ( main:2 [ main::i#10 char_cursor#32 line_cursor#13 ] ) - //SEG36 [96] phi from main::@6 to setMEMtoFAC [phi:main::@6->setMEMtoFAC] + //SEG36 [95] phi from main::@6 to setMEMtoFAC [phi:main::@6->setMEMtoFAC] setMEMtoFAC_from_b6: - //SEG37 [96] phi (byte*) setMEMtoFAC::mem#2 = (const byte[]) f_i#0 [phi:main::@6->setMEMtoFAC#0] -- zpptrby1=cowo1 + //SEG37 [95] phi (byte*) setMEMtoFAC::mem#2 = (const byte[]) f_i#0 [phi:main::@6->setMEMtoFAC#0] -- zpptrby1=cowo1 lda #f_i @@ -6906,8 +6848,6 @@ print_char: { } //SEG129 getFAC getFAC: { - .const lo = $fe - .const hi = $ff .label w = $1f .label return = $21 .label return_2 = $13 @@ -6915,13 +6855,13 @@ getFAC: { jsr $b1aa sty $fe sta $ff - //SEG131 [65] (word) getFAC::w#1 ← (byte/signed byte/word/signed word) 0 lo= *((const byte*) getFAC::lo#0) [ getFAC::w#1 ] ( main:2::getFAC:27 [ main::i#10 char_cursor#32 line_cursor#13 getFAC::w#1 ] ) -- zpwo1=coby1_setlo__deref_cowo2 - lda lo + //SEG131 [65] (word) getFAC::w#1 ← (byte/signed byte/word/signed word) 0 lo= *((const byte*) memLo#0) [ getFAC::w#1 ] ( main:2::getFAC:27 [ main::i#10 char_cursor#32 line_cursor#13 getFAC::w#1 ] ) -- zpwo1=coby1_setlo__deref_cowo2 + lda memLo sta w lda #0 sta w+1 - //SEG132 [66] (word) getFAC::return#0 ← (word) getFAC::w#1 hi= *((const byte*) getFAC::hi#0) [ getFAC::return#0 ] ( main:2::getFAC:27 [ main::i#10 char_cursor#32 line_cursor#13 getFAC::return#0 ] ) -- zpwo1=zpwo2_sethi__deref_cowo1 - lda hi + //SEG132 [66] (word) getFAC::return#0 ← (word) getFAC::w#1 hi= *((const byte*) memHi#0) [ getFAC::return#0 ] ( main:2::getFAC:27 [ main::i#10 char_cursor#32 line_cursor#13 getFAC::return#0 ] ) -- zpwo1=zpwo2_sethi__deref_cowo1 + lda memHi sta return+1 lda w sta return @@ -6936,7 +6876,7 @@ addMEMtoFAC: { //SEG136 [69] call prepareMEM param-assignment [ ] ( main:2::addMEMtoFAC:25 [ main::i#10 char_cursor#32 line_cursor#13 ] ) //SEG137 [72] phi from addMEMtoFAC to prepareMEM [phi:addMEMtoFAC->prepareMEM] prepareMEM_from_addMEMtoFAC: - //SEG138 [72] phi (byte*) prepareMEM::mem#4 = (const byte[]) f_127#0 [phi:addMEMtoFAC->prepareMEM#0] -- zpptrby1=cowo1 + //SEG138 [72] phi (byte*) prepareMEM::mem#5 = (const byte[]) f_127#0 [phi:addMEMtoFAC->prepareMEM#0] -- zpptrby1=cowo1 lda #f_127 @@ -6960,28 +6900,28 @@ prepareMEM: { .label _0 = $23 .label _1 = $24 .label mem = 9 - //SEG144 [73] (byte~) prepareMEM::$0 ← < (byte*) prepareMEM::mem#4 [ prepareMEM::mem#4 prepareMEM::$0 ] ( main:2::addMEMtoFAC:25::prepareMEM:69 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 prepareMEM::$0 ] main:2::mulFACbyMEM:13::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 prepareMEM::$0 ] main:2::mulFACbyMEM:23::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 prepareMEM::$0 ] main:2::divMEMbyFAC:19::prepareMEM:86 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 prepareMEM::$0 ] main:2::setMEMtoFAC:7::prepareMEM:98 [ prepareMEM::mem#4 prepareMEM::$0 ] main:2::setMEMtoFAC:15::prepareMEM:98 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 prepareMEM::$0 ] ) -- zpby1=_lo_zpptrby1 + //SEG144 [73] (byte~) prepareMEM::$0 ← < (byte*) prepareMEM::mem#5 [ prepareMEM::mem#5 prepareMEM::$0 ] ( main:2::addMEMtoFAC:25::prepareMEM:69 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 prepareMEM::$0 ] main:2::mulFACbyMEM:13::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 prepareMEM::$0 ] main:2::mulFACbyMEM:23::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 prepareMEM::$0 ] main:2::divMEMbyFAC:19::prepareMEM:86 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 prepareMEM::$0 ] main:2::setFAC:5::prepareMEM:92 [ prepareMEM::mem#5 prepareMEM::$0 ] main:2::setFAC:11::prepareMEM:92 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 prepareMEM::$0 ] main:2::setFAC:17::prepareMEM:92 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 prepareMEM::$0 ] main:2::setMEMtoFAC:7::prepareMEM:97 [ prepareMEM::mem#5 prepareMEM::$0 ] main:2::setMEMtoFAC:15::prepareMEM:97 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 prepareMEM::$0 ] ) -- zpby1=_lo_zpptrby1 lda mem sta _0 - //SEG145 [74] *((const byte*) memLo#0) ← (byte~) prepareMEM::$0 [ prepareMEM::mem#4 ] ( main:2::addMEMtoFAC:25::prepareMEM:69 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 ] main:2::mulFACbyMEM:13::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 ] main:2::mulFACbyMEM:23::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 ] main:2::divMEMbyFAC:19::prepareMEM:86 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 ] main:2::setMEMtoFAC:7::prepareMEM:98 [ prepareMEM::mem#4 ] main:2::setMEMtoFAC:15::prepareMEM:98 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 ] ) -- _deref_cowo1=zpby1 + //SEG145 [74] *((const byte*) memLo#0) ← (byte~) prepareMEM::$0 [ prepareMEM::mem#5 ] ( main:2::addMEMtoFAC:25::prepareMEM:69 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] main:2::mulFACbyMEM:13::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] main:2::mulFACbyMEM:23::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] main:2::divMEMbyFAC:19::prepareMEM:86 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] main:2::setFAC:5::prepareMEM:92 [ prepareMEM::mem#5 ] main:2::setFAC:11::prepareMEM:92 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] main:2::setFAC:17::prepareMEM:92 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] main:2::setMEMtoFAC:7::prepareMEM:97 [ prepareMEM::mem#5 ] main:2::setMEMtoFAC:15::prepareMEM:97 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] ) -- _deref_cowo1=zpby1 lda _0 sta memLo - //SEG146 [75] (byte~) prepareMEM::$1 ← > (byte*) prepareMEM::mem#4 [ prepareMEM::$1 ] ( main:2::addMEMtoFAC:25::prepareMEM:69 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] main:2::mulFACbyMEM:13::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] main:2::mulFACbyMEM:23::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] main:2::divMEMbyFAC:19::prepareMEM:86 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] main:2::setMEMtoFAC:7::prepareMEM:98 [ prepareMEM::$1 ] main:2::setMEMtoFAC:15::prepareMEM:98 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] ) -- zpby1=_hi_zpptrby1 + //SEG146 [75] (byte~) prepareMEM::$1 ← > (byte*) prepareMEM::mem#5 [ prepareMEM::$1 ] ( main:2::addMEMtoFAC:25::prepareMEM:69 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] main:2::mulFACbyMEM:13::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] main:2::mulFACbyMEM:23::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] main:2::divMEMbyFAC:19::prepareMEM:86 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] main:2::setFAC:5::prepareMEM:92 [ prepareMEM::$1 ] main:2::setFAC:11::prepareMEM:92 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] main:2::setFAC:17::prepareMEM:92 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] main:2::setMEMtoFAC:7::prepareMEM:97 [ prepareMEM::$1 ] main:2::setMEMtoFAC:15::prepareMEM:97 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] ) -- zpby1=_hi_zpptrby1 lda mem+1 sta _1 - //SEG147 [76] *((const byte*) memHi#0) ← (byte~) prepareMEM::$1 [ ] ( main:2::addMEMtoFAC:25::prepareMEM:69 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::mulFACbyMEM:13::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::mulFACbyMEM:23::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::divMEMbyFAC:19::prepareMEM:86 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::setMEMtoFAC:7::prepareMEM:98 [ ] main:2::setMEMtoFAC:15::prepareMEM:98 [ main::i#10 char_cursor#32 line_cursor#13 ] ) -- _deref_cowo1=zpby1 + //SEG147 [76] *((const byte*) memHi#0) ← (byte~) prepareMEM::$1 [ ] ( main:2::addMEMtoFAC:25::prepareMEM:69 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::mulFACbyMEM:13::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::mulFACbyMEM:23::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::divMEMbyFAC:19::prepareMEM:86 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::setFAC:5::prepareMEM:92 [ ] main:2::setFAC:11::prepareMEM:92 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::setFAC:17::prepareMEM:92 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::setMEMtoFAC:7::prepareMEM:97 [ ] main:2::setMEMtoFAC:15::prepareMEM:97 [ main::i#10 char_cursor#32 line_cursor#13 ] ) -- _deref_cowo1=zpby1 lda _1 sta memHi jmp breturn //SEG148 prepareMEM::@return breturn: - //SEG149 [77] return [ ] ( main:2::addMEMtoFAC:25::prepareMEM:69 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::mulFACbyMEM:13::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::mulFACbyMEM:23::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::divMEMbyFAC:19::prepareMEM:86 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::setMEMtoFAC:7::prepareMEM:98 [ ] main:2::setMEMtoFAC:15::prepareMEM:98 [ main::i#10 char_cursor#32 line_cursor#13 ] ) + //SEG149 [77] return [ ] ( main:2::addMEMtoFAC:25::prepareMEM:69 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::mulFACbyMEM:13::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::mulFACbyMEM:23::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::divMEMbyFAC:19::prepareMEM:86 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::setFAC:5::prepareMEM:92 [ ] main:2::setFAC:11::prepareMEM:92 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::setFAC:17::prepareMEM:92 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::setMEMtoFAC:7::prepareMEM:97 [ ] main:2::setMEMtoFAC:15::prepareMEM:97 [ main::i#10 char_cursor#32 line_cursor#13 ] ) rts } //SEG150 mulFACbyMEM mulFACbyMEM: { .label mem = $b - //SEG151 [79] (byte*) prepareMEM::mem#3 ← (byte*) mulFACbyMEM::mem#2 [ prepareMEM::mem#3 ] ( main:2::mulFACbyMEM:13 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#3 ] main:2::mulFACbyMEM:23 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#3 ] ) -- zpptrby1=zpptrby2 + //SEG151 [79] (byte*) prepareMEM::mem#4 ← (byte*) mulFACbyMEM::mem#2 [ prepareMEM::mem#4 ] ( main:2::mulFACbyMEM:13 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 ] main:2::mulFACbyMEM:23 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 ] ) -- zpptrby1=zpptrby2 lda mem sta prepareMEM.mem lda mem+1 @@ -6989,7 +6929,7 @@ mulFACbyMEM: { //SEG152 [80] call prepareMEM param-assignment [ ] ( main:2::mulFACbyMEM:13 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::mulFACbyMEM:23 [ main::i#10 char_cursor#32 line_cursor#13 ] ) //SEG153 [72] phi from mulFACbyMEM to prepareMEM [phi:mulFACbyMEM->prepareMEM] prepareMEM_from_mulFACbyMEM: - //SEG154 [72] phi (byte*) prepareMEM::mem#4 = (byte*) prepareMEM::mem#3 [phi:mulFACbyMEM->prepareMEM#0] -- register_copy + //SEG154 [72] phi (byte*) prepareMEM::mem#5 = (byte*) prepareMEM::mem#4 [phi:mulFACbyMEM->prepareMEM#0] -- register_copy jsr prepareMEM jmp b1 //SEG155 mulFACbyMEM::@1 @@ -7019,7 +6959,7 @@ divMEMbyFAC: { //SEG164 [86] call prepareMEM param-assignment [ ] ( main:2::divMEMbyFAC:19 [ main::i#10 char_cursor#32 line_cursor#13 ] ) //SEG165 [72] phi from divMEMbyFAC to prepareMEM [phi:divMEMbyFAC->prepareMEM] prepareMEM_from_divMEMbyFAC: - //SEG166 [72] phi (byte*) prepareMEM::mem#4 = (const byte[]) f_i#0 [phi:divMEMbyFAC->prepareMEM#0] -- zpptrby1=cowo1 + //SEG166 [72] phi (byte*) prepareMEM::mem#5 = (const byte[]) f_i#0 [phi:divMEMbyFAC->prepareMEM#0] -- zpptrby1=cowo1 lda #f_i @@ -7040,57 +6980,60 @@ divMEMbyFAC: { } //SEG171 setFAC setFAC: { - .const lo = $fe - .const hi = $ff .label _0 = $25 - .label _1 = $26 .label w = $d - //SEG172 [90] (byte~) setFAC::$0 ← < (word) setFAC::w#3 [ setFAC::w#3 setFAC::$0 ] ( main:2::setFAC:5 [ setFAC::w#3 setFAC::$0 ] main:2::setFAC:11 [ main::i#10 char_cursor#32 line_cursor#13 setFAC::w#3 setFAC::$0 ] main:2::setFAC:17 [ main::i#10 char_cursor#32 line_cursor#13 setFAC::w#3 setFAC::$0 ] ) -- zpby1=_lo_zpwo1 + //SEG172 [90] (byte*~) setFAC::$0 ← ((byte*)) (word) setFAC::w#3 [ setFAC::$0 ] ( main:2::setFAC:5 [ setFAC::$0 ] main:2::setFAC:11 [ main::i#10 char_cursor#32 line_cursor#13 setFAC::$0 ] main:2::setFAC:17 [ main::i#10 char_cursor#32 line_cursor#13 setFAC::$0 ] ) -- zpptrby1=_ptrby_zpwo1 lda w sta _0 - //SEG173 [91] *((const byte*) setFAC::lo#0) ← (byte~) setFAC::$0 [ setFAC::w#3 ] ( main:2::setFAC:5 [ setFAC::w#3 ] main:2::setFAC:11 [ main::i#10 char_cursor#32 line_cursor#13 setFAC::w#3 ] main:2::setFAC:17 [ main::i#10 char_cursor#32 line_cursor#13 setFAC::w#3 ] ) -- _deref_cowo1=zpby1 - lda _0 - sta lo - //SEG174 [92] (byte~) setFAC::$1 ← > (word) setFAC::w#3 [ setFAC::$1 ] ( main:2::setFAC:5 [ setFAC::$1 ] main:2::setFAC:11 [ main::i#10 char_cursor#32 line_cursor#13 setFAC::$1 ] main:2::setFAC:17 [ main::i#10 char_cursor#32 line_cursor#13 setFAC::$1 ] ) -- zpby1=_hi_zpwo1 lda w+1 - sta _1 - //SEG175 [93] *((const byte*) setFAC::hi#0) ← (byte~) setFAC::$1 [ ] ( main:2::setFAC:5 [ ] main:2::setFAC:11 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::setFAC:17 [ main::i#10 char_cursor#32 line_cursor#13 ] ) -- _deref_cowo1=zpby1 - lda _1 - sta hi - //SEG176 asm { ldy$felda$ffjsr$b391 } + sta _0+1 + //SEG173 [91] (byte*) prepareMEM::mem#0 ← (byte*~) setFAC::$0 [ prepareMEM::mem#0 ] ( main:2::setFAC:5 [ prepareMEM::mem#0 ] main:2::setFAC:11 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#0 ] main:2::setFAC:17 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#0 ] ) -- zpptrby1=zpptrby2 + lda _0 + sta prepareMEM.mem + lda _0+1 + sta prepareMEM.mem+1 + //SEG174 [92] call prepareMEM param-assignment [ ] ( main:2::setFAC:5 [ ] main:2::setFAC:11 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::setFAC:17 [ main::i#10 char_cursor#32 line_cursor#13 ] ) + //SEG175 [72] phi from setFAC to prepareMEM [phi:setFAC->prepareMEM] + prepareMEM_from_setFAC: + //SEG176 [72] phi (byte*) prepareMEM::mem#5 = (byte*) prepareMEM::mem#0 [phi:setFAC->prepareMEM#0] -- register_copy + jsr prepareMEM + jmp b1 + //SEG177 setFAC::@1 + b1: + //SEG178 asm { ldy$felda$ffjsr$b391 } ldy $fe lda $ff jsr $b391 jmp breturn - //SEG177 setFAC::@return + //SEG179 setFAC::@return breturn: - //SEG178 [95] return [ ] ( main:2::setFAC:5 [ ] main:2::setFAC:11 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::setFAC:17 [ main::i#10 char_cursor#32 line_cursor#13 ] ) + //SEG180 [94] return [ ] ( main:2::setFAC:5 [ ] main:2::setFAC:11 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::setFAC:17 [ main::i#10 char_cursor#32 line_cursor#13 ] ) rts } -//SEG179 setMEMtoFAC +//SEG181 setMEMtoFAC setMEMtoFAC: { .label mem = $f - //SEG180 [97] (byte*) prepareMEM::mem#0 ← (byte*) setMEMtoFAC::mem#2 [ prepareMEM::mem#0 ] ( main:2::setMEMtoFAC:7 [ prepareMEM::mem#0 ] main:2::setMEMtoFAC:15 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#0 ] ) -- zpptrby1=zpptrby2 + //SEG182 [96] (byte*) prepareMEM::mem#1 ← (byte*) setMEMtoFAC::mem#2 [ prepareMEM::mem#1 ] ( main:2::setMEMtoFAC:7 [ prepareMEM::mem#1 ] main:2::setMEMtoFAC:15 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#1 ] ) -- zpptrby1=zpptrby2 lda mem sta prepareMEM.mem lda mem+1 sta prepareMEM.mem+1 - //SEG181 [98] call prepareMEM param-assignment [ ] ( main:2::setMEMtoFAC:7 [ ] main:2::setMEMtoFAC:15 [ main::i#10 char_cursor#32 line_cursor#13 ] ) - //SEG182 [72] phi from setMEMtoFAC to prepareMEM [phi:setMEMtoFAC->prepareMEM] + //SEG183 [97] call prepareMEM param-assignment [ ] ( main:2::setMEMtoFAC:7 [ ] main:2::setMEMtoFAC:15 [ main::i#10 char_cursor#32 line_cursor#13 ] ) + //SEG184 [72] phi from setMEMtoFAC to prepareMEM [phi:setMEMtoFAC->prepareMEM] prepareMEM_from_setMEMtoFAC: - //SEG183 [72] phi (byte*) prepareMEM::mem#4 = (byte*) prepareMEM::mem#0 [phi:setMEMtoFAC->prepareMEM#0] -- register_copy + //SEG185 [72] phi (byte*) prepareMEM::mem#5 = (byte*) prepareMEM::mem#1 [phi:setMEMtoFAC->prepareMEM#0] -- register_copy jsr prepareMEM jmp b1 - //SEG184 setMEMtoFAC::@1 + //SEG186 setMEMtoFAC::@1 b1: - //SEG185 asm { ldx$feldy$ffjsr$bbd4 } + //SEG187 asm { ldx$feldy$ffjsr$bbd4 } ldx $fe ldy $ff jsr $bbd4 jmp breturn - //SEG186 setMEMtoFAC::@return + //SEG188 setMEMtoFAC::@return breturn: - //SEG187 [100] return [ ] ( main:2::setMEMtoFAC:7 [ ] main:2::setMEMtoFAC:15 [ main::i#10 char_cursor#32 line_cursor#13 ] ) + //SEG189 [99] return [ ] ( main:2::setMEMtoFAC:7 [ ] main:2::setMEMtoFAC:15 [ main::i#10 char_cursor#32 line_cursor#13 ] ) rts } @@ -7110,18 +7053,18 @@ Statement [55] (byte~) print_byte::$3 ← (byte) print_byte::b#2 & (byte/signed Statement [61] *((byte*) char_cursor#23) ← (byte) print_char::ch#2 [ char_cursor#23 ] ( main:2::print_word:31::print_byte:45::print_char:54 [ main::i#10 line_cursor#13 print_word::w#0 print_byte::b#2 char_cursor#23 ] main:2::print_word:31::print_byte:48::print_char:54 [ main::i#10 line_cursor#13 print_byte::b#2 char_cursor#23 ] main:2::print_word:31::print_byte:45::print_char:58 [ main::i#10 line_cursor#13 print_word::w#0 char_cursor#23 ] main:2::print_word:31::print_byte:48::print_char:58 [ main::i#10 line_cursor#13 char_cursor#23 ] ) always clobbers reg byte y Removing always clobbered register reg byte y as potential for zp ZP_BYTE:2 [ main::i#10 main::i#1 ] Removing always clobbered register reg byte y as potential for zp ZP_BYTE:5 [ print_byte::b#2 print_byte::b#0 print_byte::b#1 ] -Statement [65] (word) getFAC::w#1 ← (byte/signed byte/word/signed word) 0 lo= *((const byte*) getFAC::lo#0) [ getFAC::w#1 ] ( main:2::getFAC:27 [ main::i#10 char_cursor#32 line_cursor#13 getFAC::w#1 ] ) always clobbers reg byte a -Statement [66] (word) getFAC::return#0 ← (word) getFAC::w#1 hi= *((const byte*) getFAC::hi#0) [ getFAC::return#0 ] ( main:2::getFAC:27 [ main::i#10 char_cursor#32 line_cursor#13 getFAC::return#0 ] ) always clobbers reg byte a +Statement [65] (word) getFAC::w#1 ← (byte/signed byte/word/signed word) 0 lo= *((const byte*) memLo#0) [ getFAC::w#1 ] ( main:2::getFAC:27 [ main::i#10 char_cursor#32 line_cursor#13 getFAC::w#1 ] ) always clobbers reg byte a +Statement [66] (word) getFAC::return#0 ← (word) getFAC::w#1 hi= *((const byte*) memHi#0) [ getFAC::return#0 ] ( main:2::getFAC:27 [ main::i#10 char_cursor#32 line_cursor#13 getFAC::return#0 ] ) always clobbers reg byte a Statement asm { lda$feldy$ffjsr$b867 } always clobbers reg byte a reg byte y -Statement [73] (byte~) prepareMEM::$0 ← < (byte*) prepareMEM::mem#4 [ prepareMEM::mem#4 prepareMEM::$0 ] ( main:2::addMEMtoFAC:25::prepareMEM:69 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 prepareMEM::$0 ] main:2::mulFACbyMEM:13::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 prepareMEM::$0 ] main:2::mulFACbyMEM:23::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 prepareMEM::$0 ] main:2::divMEMbyFAC:19::prepareMEM:86 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 prepareMEM::$0 ] main:2::setMEMtoFAC:7::prepareMEM:98 [ prepareMEM::mem#4 prepareMEM::$0 ] main:2::setMEMtoFAC:15::prepareMEM:98 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 prepareMEM::$0 ] ) always clobbers reg byte a -Statement [75] (byte~) prepareMEM::$1 ← > (byte*) prepareMEM::mem#4 [ prepareMEM::$1 ] ( main:2::addMEMtoFAC:25::prepareMEM:69 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] main:2::mulFACbyMEM:13::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] main:2::mulFACbyMEM:23::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] main:2::divMEMbyFAC:19::prepareMEM:86 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] main:2::setMEMtoFAC:7::prepareMEM:98 [ prepareMEM::$1 ] main:2::setMEMtoFAC:15::prepareMEM:98 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] ) always clobbers reg byte a -Statement [79] (byte*) prepareMEM::mem#3 ← (byte*) mulFACbyMEM::mem#2 [ prepareMEM::mem#3 ] ( main:2::mulFACbyMEM:13 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#3 ] main:2::mulFACbyMEM:23 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#3 ] ) always clobbers reg byte a +Statement [73] (byte~) prepareMEM::$0 ← < (byte*) prepareMEM::mem#5 [ prepareMEM::mem#5 prepareMEM::$0 ] ( main:2::addMEMtoFAC:25::prepareMEM:69 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 prepareMEM::$0 ] main:2::mulFACbyMEM:13::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 prepareMEM::$0 ] main:2::mulFACbyMEM:23::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 prepareMEM::$0 ] main:2::divMEMbyFAC:19::prepareMEM:86 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 prepareMEM::$0 ] main:2::setFAC:5::prepareMEM:92 [ prepareMEM::mem#5 prepareMEM::$0 ] main:2::setFAC:11::prepareMEM:92 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 prepareMEM::$0 ] main:2::setFAC:17::prepareMEM:92 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 prepareMEM::$0 ] main:2::setMEMtoFAC:7::prepareMEM:97 [ prepareMEM::mem#5 prepareMEM::$0 ] main:2::setMEMtoFAC:15::prepareMEM:97 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 prepareMEM::$0 ] ) always clobbers reg byte a +Statement [75] (byte~) prepareMEM::$1 ← > (byte*) prepareMEM::mem#5 [ prepareMEM::$1 ] ( main:2::addMEMtoFAC:25::prepareMEM:69 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] main:2::mulFACbyMEM:13::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] main:2::mulFACbyMEM:23::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] main:2::divMEMbyFAC:19::prepareMEM:86 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] main:2::setFAC:5::prepareMEM:92 [ prepareMEM::$1 ] main:2::setFAC:11::prepareMEM:92 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] main:2::setFAC:17::prepareMEM:92 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] main:2::setMEMtoFAC:7::prepareMEM:97 [ prepareMEM::$1 ] main:2::setMEMtoFAC:15::prepareMEM:97 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] ) always clobbers reg byte a +Statement [79] (byte*) prepareMEM::mem#4 ← (byte*) mulFACbyMEM::mem#2 [ prepareMEM::mem#4 ] ( main:2::mulFACbyMEM:13 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 ] main:2::mulFACbyMEM:23 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 ] ) always clobbers reg byte a Statement asm { lda$feldy$ffjsr$ba28 } always clobbers reg byte a reg byte y Statement asm { lda$feldy$ffjsr$bb0f } always clobbers reg byte a reg byte y -Statement [90] (byte~) setFAC::$0 ← < (word) setFAC::w#3 [ setFAC::w#3 setFAC::$0 ] ( main:2::setFAC:5 [ setFAC::w#3 setFAC::$0 ] main:2::setFAC:11 [ main::i#10 char_cursor#32 line_cursor#13 setFAC::w#3 setFAC::$0 ] main:2::setFAC:17 [ main::i#10 char_cursor#32 line_cursor#13 setFAC::w#3 setFAC::$0 ] ) always clobbers reg byte a -Statement [92] (byte~) setFAC::$1 ← > (word) setFAC::w#3 [ setFAC::$1 ] ( main:2::setFAC:5 [ setFAC::$1 ] main:2::setFAC:11 [ main::i#10 char_cursor#32 line_cursor#13 setFAC::$1 ] main:2::setFAC:17 [ main::i#10 char_cursor#32 line_cursor#13 setFAC::$1 ] ) always clobbers reg byte a +Statement [90] (byte*~) setFAC::$0 ← ((byte*)) (word) setFAC::w#3 [ setFAC::$0 ] ( main:2::setFAC:5 [ setFAC::$0 ] main:2::setFAC:11 [ main::i#10 char_cursor#32 line_cursor#13 setFAC::$0 ] main:2::setFAC:17 [ main::i#10 char_cursor#32 line_cursor#13 setFAC::$0 ] ) always clobbers reg byte a +Statement [91] (byte*) prepareMEM::mem#0 ← (byte*~) setFAC::$0 [ prepareMEM::mem#0 ] ( main:2::setFAC:5 [ prepareMEM::mem#0 ] main:2::setFAC:11 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#0 ] main:2::setFAC:17 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#0 ] ) always clobbers reg byte a Statement asm { ldy$felda$ffjsr$b391 } always clobbers reg byte a reg byte y -Statement [97] (byte*) prepareMEM::mem#0 ← (byte*) setMEMtoFAC::mem#2 [ prepareMEM::mem#0 ] ( main:2::setMEMtoFAC:7 [ prepareMEM::mem#0 ] main:2::setMEMtoFAC:15 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#0 ] ) always clobbers reg byte a +Statement [96] (byte*) prepareMEM::mem#1 ← (byte*) setMEMtoFAC::mem#2 [ prepareMEM::mem#1 ] ( main:2::setMEMtoFAC:7 [ prepareMEM::mem#1 ] main:2::setMEMtoFAC:15 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#1 ] ) always clobbers reg byte a Statement asm { ldx$feldy$ffjsr$bbd4 } always clobbers reg byte x reg byte y Removing always clobbered register reg byte x as potential for zp ZP_BYTE:2 [ main::i#10 main::i#1 ] Statement [9] (word~) main::$2 ← ((word)) (byte) main::i#10 [ main::i#10 char_cursor#32 line_cursor#13 main::$2 ] ( main:2 [ main::i#10 char_cursor#32 line_cursor#13 main::$2 ] ) always clobbers reg byte a @@ -7137,25 +7080,25 @@ Statement [43] (byte~) print_word::$0 ← > (word) print_word::w#0 [ char_cursor Statement [46] (byte~) print_word::$2 ← < (word) print_word::w#0 [ char_cursor#10 print_word::$2 ] ( main:2::print_word:31 [ main::i#10 line_cursor#13 char_cursor#10 print_word::$2 ] ) always clobbers reg byte a Statement [55] (byte~) print_byte::$3 ← (byte) print_byte::b#2 & (byte/signed byte/word/signed word) 15 [ char_cursor#10 print_byte::$3 ] ( main:2::print_word:31::print_byte:45 [ main::i#10 line_cursor#13 print_word::w#0 char_cursor#10 print_byte::$3 ] main:2::print_word:31::print_byte:48 [ main::i#10 line_cursor#13 char_cursor#10 print_byte::$3 ] ) always clobbers reg byte a Statement [61] *((byte*) char_cursor#23) ← (byte) print_char::ch#2 [ char_cursor#23 ] ( main:2::print_word:31::print_byte:45::print_char:54 [ main::i#10 line_cursor#13 print_word::w#0 print_byte::b#2 char_cursor#23 ] main:2::print_word:31::print_byte:48::print_char:54 [ main::i#10 line_cursor#13 print_byte::b#2 char_cursor#23 ] main:2::print_word:31::print_byte:45::print_char:58 [ main::i#10 line_cursor#13 print_word::w#0 char_cursor#23 ] main:2::print_word:31::print_byte:48::print_char:58 [ main::i#10 line_cursor#13 char_cursor#23 ] ) always clobbers reg byte y -Statement [65] (word) getFAC::w#1 ← (byte/signed byte/word/signed word) 0 lo= *((const byte*) getFAC::lo#0) [ getFAC::w#1 ] ( main:2::getFAC:27 [ main::i#10 char_cursor#32 line_cursor#13 getFAC::w#1 ] ) always clobbers reg byte a -Statement [66] (word) getFAC::return#0 ← (word) getFAC::w#1 hi= *((const byte*) getFAC::hi#0) [ getFAC::return#0 ] ( main:2::getFAC:27 [ main::i#10 char_cursor#32 line_cursor#13 getFAC::return#0 ] ) always clobbers reg byte a +Statement [65] (word) getFAC::w#1 ← (byte/signed byte/word/signed word) 0 lo= *((const byte*) memLo#0) [ getFAC::w#1 ] ( main:2::getFAC:27 [ main::i#10 char_cursor#32 line_cursor#13 getFAC::w#1 ] ) always clobbers reg byte a +Statement [66] (word) getFAC::return#0 ← (word) getFAC::w#1 hi= *((const byte*) memHi#0) [ getFAC::return#0 ] ( main:2::getFAC:27 [ main::i#10 char_cursor#32 line_cursor#13 getFAC::return#0 ] ) always clobbers reg byte a Statement asm { lda$feldy$ffjsr$b867 } always clobbers reg byte a reg byte y -Statement [73] (byte~) prepareMEM::$0 ← < (byte*) prepareMEM::mem#4 [ prepareMEM::mem#4 prepareMEM::$0 ] ( main:2::addMEMtoFAC:25::prepareMEM:69 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 prepareMEM::$0 ] main:2::mulFACbyMEM:13::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 prepareMEM::$0 ] main:2::mulFACbyMEM:23::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 prepareMEM::$0 ] main:2::divMEMbyFAC:19::prepareMEM:86 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 prepareMEM::$0 ] main:2::setMEMtoFAC:7::prepareMEM:98 [ prepareMEM::mem#4 prepareMEM::$0 ] main:2::setMEMtoFAC:15::prepareMEM:98 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 prepareMEM::$0 ] ) always clobbers reg byte a -Statement [75] (byte~) prepareMEM::$1 ← > (byte*) prepareMEM::mem#4 [ prepareMEM::$1 ] ( main:2::addMEMtoFAC:25::prepareMEM:69 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] main:2::mulFACbyMEM:13::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] main:2::mulFACbyMEM:23::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] main:2::divMEMbyFAC:19::prepareMEM:86 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] main:2::setMEMtoFAC:7::prepareMEM:98 [ prepareMEM::$1 ] main:2::setMEMtoFAC:15::prepareMEM:98 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] ) always clobbers reg byte a -Statement [79] (byte*) prepareMEM::mem#3 ← (byte*) mulFACbyMEM::mem#2 [ prepareMEM::mem#3 ] ( main:2::mulFACbyMEM:13 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#3 ] main:2::mulFACbyMEM:23 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#3 ] ) always clobbers reg byte a +Statement [73] (byte~) prepareMEM::$0 ← < (byte*) prepareMEM::mem#5 [ prepareMEM::mem#5 prepareMEM::$0 ] ( main:2::addMEMtoFAC:25::prepareMEM:69 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 prepareMEM::$0 ] main:2::mulFACbyMEM:13::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 prepareMEM::$0 ] main:2::mulFACbyMEM:23::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 prepareMEM::$0 ] main:2::divMEMbyFAC:19::prepareMEM:86 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 prepareMEM::$0 ] main:2::setFAC:5::prepareMEM:92 [ prepareMEM::mem#5 prepareMEM::$0 ] main:2::setFAC:11::prepareMEM:92 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 prepareMEM::$0 ] main:2::setFAC:17::prepareMEM:92 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 prepareMEM::$0 ] main:2::setMEMtoFAC:7::prepareMEM:97 [ prepareMEM::mem#5 prepareMEM::$0 ] main:2::setMEMtoFAC:15::prepareMEM:97 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 prepareMEM::$0 ] ) always clobbers reg byte a +Statement [75] (byte~) prepareMEM::$1 ← > (byte*) prepareMEM::mem#5 [ prepareMEM::$1 ] ( main:2::addMEMtoFAC:25::prepareMEM:69 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] main:2::mulFACbyMEM:13::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] main:2::mulFACbyMEM:23::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] main:2::divMEMbyFAC:19::prepareMEM:86 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] main:2::setFAC:5::prepareMEM:92 [ prepareMEM::$1 ] main:2::setFAC:11::prepareMEM:92 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] main:2::setFAC:17::prepareMEM:92 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] main:2::setMEMtoFAC:7::prepareMEM:97 [ prepareMEM::$1 ] main:2::setMEMtoFAC:15::prepareMEM:97 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] ) always clobbers reg byte a +Statement [79] (byte*) prepareMEM::mem#4 ← (byte*) mulFACbyMEM::mem#2 [ prepareMEM::mem#4 ] ( main:2::mulFACbyMEM:13 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 ] main:2::mulFACbyMEM:23 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 ] ) always clobbers reg byte a Statement asm { lda$feldy$ffjsr$ba28 } always clobbers reg byte a reg byte y Statement asm { lda$feldy$ffjsr$bb0f } always clobbers reg byte a reg byte y -Statement [90] (byte~) setFAC::$0 ← < (word) setFAC::w#3 [ setFAC::w#3 setFAC::$0 ] ( main:2::setFAC:5 [ setFAC::w#3 setFAC::$0 ] main:2::setFAC:11 [ main::i#10 char_cursor#32 line_cursor#13 setFAC::w#3 setFAC::$0 ] main:2::setFAC:17 [ main::i#10 char_cursor#32 line_cursor#13 setFAC::w#3 setFAC::$0 ] ) always clobbers reg byte a -Statement [92] (byte~) setFAC::$1 ← > (word) setFAC::w#3 [ setFAC::$1 ] ( main:2::setFAC:5 [ setFAC::$1 ] main:2::setFAC:11 [ main::i#10 char_cursor#32 line_cursor#13 setFAC::$1 ] main:2::setFAC:17 [ main::i#10 char_cursor#32 line_cursor#13 setFAC::$1 ] ) always clobbers reg byte a +Statement [90] (byte*~) setFAC::$0 ← ((byte*)) (word) setFAC::w#3 [ setFAC::$0 ] ( main:2::setFAC:5 [ setFAC::$0 ] main:2::setFAC:11 [ main::i#10 char_cursor#32 line_cursor#13 setFAC::$0 ] main:2::setFAC:17 [ main::i#10 char_cursor#32 line_cursor#13 setFAC::$0 ] ) always clobbers reg byte a +Statement [91] (byte*) prepareMEM::mem#0 ← (byte*~) setFAC::$0 [ prepareMEM::mem#0 ] ( main:2::setFAC:5 [ prepareMEM::mem#0 ] main:2::setFAC:11 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#0 ] main:2::setFAC:17 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#0 ] ) always clobbers reg byte a Statement asm { ldy$felda$ffjsr$b391 } always clobbers reg byte a reg byte y -Statement [97] (byte*) prepareMEM::mem#0 ← (byte*) setMEMtoFAC::mem#2 [ prepareMEM::mem#0 ] ( main:2::setMEMtoFAC:7 [ prepareMEM::mem#0 ] main:2::setMEMtoFAC:15 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#0 ] ) always clobbers reg byte a +Statement [96] (byte*) prepareMEM::mem#1 ← (byte*) setMEMtoFAC::mem#2 [ prepareMEM::mem#1 ] ( main:2::setMEMtoFAC:7 [ prepareMEM::mem#1 ] main:2::setMEMtoFAC:15 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#1 ] ) always clobbers reg byte a Statement asm { ldx$feldy$ffjsr$bbd4 } always clobbers reg byte x reg byte y Potential registers zp ZP_BYTE:2 [ main::i#10 main::i#1 ] : zp ZP_BYTE:2 , Potential registers zp ZP_PTR_BYTE:3 [ line_cursor#6 line_cursor#13 print_ln::$0 ] : zp ZP_PTR_BYTE:3 , Potential registers zp ZP_BYTE:5 [ print_byte::b#2 print_byte::b#0 print_byte::b#1 ] : zp ZP_BYTE:5 , reg byte a , reg byte x , Potential registers zp ZP_BYTE:6 [ print_char::ch#2 print_char::ch#0 print_char::ch#1 ] : zp ZP_BYTE:6 , reg byte a , reg byte x , reg byte y , Potential registers zp ZP_PTR_BYTE:7 [ char_cursor#23 char_cursor#31 char_cursor#32 char_cursor#49 char_cursor#10 ] : zp ZP_PTR_BYTE:7 , -Potential registers zp ZP_PTR_BYTE:9 [ prepareMEM::mem#4 prepareMEM::mem#3 prepareMEM::mem#0 ] : zp ZP_PTR_BYTE:9 , +Potential registers zp ZP_PTR_BYTE:9 [ prepareMEM::mem#5 prepareMEM::mem#4 prepareMEM::mem#0 prepareMEM::mem#1 ] : zp ZP_PTR_BYTE:9 , Potential registers zp ZP_PTR_BYTE:11 [ mulFACbyMEM::mem#2 ] : zp ZP_PTR_BYTE:11 , Potential registers zp ZP_WORD:13 [ setFAC::w#3 setFAC::w#1 ] : zp ZP_WORD:13 , Potential registers zp ZP_PTR_BYTE:15 [ setMEMtoFAC::mem#2 ] : zp ZP_PTR_BYTE:15 , @@ -7173,16 +7116,15 @@ Potential registers zp ZP_WORD:31 [ getFAC::w#1 ] : zp ZP_WORD:31 , Potential registers zp ZP_WORD:33 [ getFAC::return#0 ] : zp ZP_WORD:33 , Potential registers zp ZP_BYTE:35 [ prepareMEM::$0 ] : zp ZP_BYTE:35 , reg byte a , reg byte x , reg byte y , Potential registers zp ZP_BYTE:36 [ prepareMEM::$1 ] : zp ZP_BYTE:36 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:37 [ setFAC::$0 ] : zp ZP_BYTE:37 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:38 [ setFAC::$1 ] : zp ZP_BYTE:38 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_PTR_BYTE:37 [ setFAC::$0 ] : zp ZP_PTR_BYTE:37 , REGISTER UPLIFT SCOPES Uplift Scope [] 250.93: zp ZP_PTR_BYTE:3 [ line_cursor#6 line_cursor#13 print_ln::$0 ] 33.65: zp ZP_PTR_BYTE:7 [ char_cursor#23 char_cursor#31 char_cursor#32 char_cursor#49 char_cursor#10 ] Uplift Scope [main] 22: zp ZP_WORD:17 [ main::$2 ] 22: zp ZP_WORD:21 [ main::$11 ] 12.27: zp ZP_BYTE:2 [ main::i#10 main::i#1 ] -Uplift Scope [setFAC] 27: zp ZP_WORD:13 [ setFAC::w#3 setFAC::w#1 ] 4: zp ZP_BYTE:37 [ setFAC::$0 ] 4: zp ZP_BYTE:38 [ setFAC::$1 ] +Uplift Scope [setFAC] 35: zp ZP_WORD:13 [ setFAC::w#3 setFAC::w#1 ] 4: zp ZP_PTR_BYTE:37 [ setFAC::$0 ] Uplift Scope [getFAC] 22: zp ZP_WORD:19 [ getFAC::return#2 ] 4.33: zp ZP_WORD:33 [ getFAC::return#0 ] 4: zp ZP_WORD:31 [ getFAC::w#1 ] Uplift Scope [print_byte] 9.6: zp ZP_BYTE:5 [ print_byte::b#2 print_byte::b#0 print_byte::b#1 ] 4: zp ZP_BYTE:27 [ print_byte::$0 ] 4: zp ZP_BYTE:28 [ print_byte::$1 ] 4: zp ZP_BYTE:29 [ print_byte::$3 ] 4: zp ZP_BYTE:30 [ print_byte::$4 ] -Uplift Scope [prepareMEM] 10.67: zp ZP_PTR_BYTE:9 [ prepareMEM::mem#4 prepareMEM::mem#3 prepareMEM::mem#0 ] 4: zp ZP_BYTE:35 [ prepareMEM::$0 ] 4: zp ZP_BYTE:36 [ prepareMEM::$1 ] +Uplift Scope [prepareMEM] 15.33: zp ZP_PTR_BYTE:9 [ prepareMEM::mem#5 prepareMEM::mem#4 prepareMEM::mem#0 prepareMEM::mem#1 ] 4: zp ZP_BYTE:35 [ prepareMEM::$0 ] 4: zp ZP_BYTE:36 [ prepareMEM::$1 ] Uplift Scope [print_char] 14: zp ZP_BYTE:6 [ print_char::ch#2 print_char::ch#0 print_char::ch#1 ] Uplift Scope [print_word] 4: zp ZP_BYTE:25 [ print_word::$0 ] 4: zp ZP_BYTE:26 [ print_word::$2 ] 3.75: zp ZP_WORD:23 [ print_word::w#0 ] Uplift Scope [setMEMtoFAC] 2: zp ZP_PTR_BYTE:15 [ setMEMtoFAC::mem#2 ] @@ -7192,24 +7134,25 @@ Uplift Scope [addMEMtoFAC] Uplift Scope [divMEMbyFAC] Uplift Scope [sinFAC] -Uplifting [] best 7030 combination zp ZP_PTR_BYTE:3 [ line_cursor#6 line_cursor#13 print_ln::$0 ] zp ZP_PTR_BYTE:7 [ char_cursor#23 char_cursor#31 char_cursor#32 char_cursor#49 char_cursor#10 ] -Uplifting [main] best 7030 combination zp ZP_WORD:17 [ main::$2 ] zp ZP_WORD:21 [ main::$11 ] zp ZP_BYTE:2 [ main::i#10 main::i#1 ] -Uplifting [setFAC] best 7018 combination zp ZP_WORD:13 [ setFAC::w#3 setFAC::w#1 ] reg byte a [ setFAC::$0 ] reg byte a [ setFAC::$1 ] -Uplifting [getFAC] best 7018 combination zp ZP_WORD:19 [ getFAC::return#2 ] zp ZP_WORD:33 [ getFAC::return#0 ] zp ZP_WORD:31 [ getFAC::w#1 ] -Uplifting [print_byte] best 6990 combination reg byte x [ print_byte::b#2 print_byte::b#0 print_byte::b#1 ] reg byte y [ print_byte::$0 ] reg byte a [ print_byte::$1 ] reg byte a [ print_byte::$3 ] reg byte a [ print_byte::$4 ] -Uplifting [prepareMEM] best 6978 combination zp ZP_PTR_BYTE:9 [ prepareMEM::mem#4 prepareMEM::mem#3 prepareMEM::mem#0 ] reg byte a [ prepareMEM::$0 ] reg byte a [ prepareMEM::$1 ] -Uplifting [print_char] best 6969 combination reg byte a [ print_char::ch#2 print_char::ch#0 print_char::ch#1 ] -Uplifting [print_word] best 6961 combination reg byte a [ print_word::$0 ] reg byte a [ print_word::$2 ] zp ZP_WORD:23 [ print_word::w#0 ] -Uplifting [setMEMtoFAC] best 6961 combination zp ZP_PTR_BYTE:15 [ setMEMtoFAC::mem#2 ] -Uplifting [mulFACbyMEM] best 6961 combination zp ZP_PTR_BYTE:11 [ mulFACbyMEM::mem#2 ] -Uplifting [print_ln] best 6961 combination -Uplifting [addMEMtoFAC] best 6961 combination -Uplifting [divMEMbyFAC] best 6961 combination -Uplifting [sinFAC] best 6961 combination +Uplifting [] best 7040 combination zp ZP_PTR_BYTE:3 [ line_cursor#6 line_cursor#13 print_ln::$0 ] zp ZP_PTR_BYTE:7 [ char_cursor#23 char_cursor#31 char_cursor#32 char_cursor#49 char_cursor#10 ] +Uplifting [main] best 7040 combination zp ZP_WORD:17 [ main::$2 ] zp ZP_WORD:21 [ main::$11 ] zp ZP_BYTE:2 [ main::i#10 main::i#1 ] +Uplifting [setFAC] best 7040 combination zp ZP_WORD:13 [ setFAC::w#3 setFAC::w#1 ] zp ZP_PTR_BYTE:37 [ setFAC::$0 ] +Uplifting [getFAC] best 7040 combination zp ZP_WORD:19 [ getFAC::return#2 ] zp ZP_WORD:33 [ getFAC::return#0 ] zp ZP_WORD:31 [ getFAC::w#1 ] +Uplifting [print_byte] best 7012 combination reg byte x [ print_byte::b#2 print_byte::b#0 print_byte::b#1 ] reg byte y [ print_byte::$0 ] reg byte a [ print_byte::$1 ] reg byte a [ print_byte::$3 ] reg byte a [ print_byte::$4 ] +Uplifting [prepareMEM] best 7000 combination zp ZP_PTR_BYTE:9 [ prepareMEM::mem#5 prepareMEM::mem#4 prepareMEM::mem#0 prepareMEM::mem#1 ] reg byte a [ prepareMEM::$0 ] reg byte a [ prepareMEM::$1 ] +Uplifting [print_char] best 6991 combination reg byte a [ print_char::ch#2 print_char::ch#0 print_char::ch#1 ] +Uplifting [print_word] best 6983 combination reg byte a [ print_word::$0 ] reg byte a [ print_word::$2 ] zp ZP_WORD:23 [ print_word::w#0 ] +Uplifting [setMEMtoFAC] best 6983 combination zp ZP_PTR_BYTE:15 [ setMEMtoFAC::mem#2 ] +Uplifting [mulFACbyMEM] best 6983 combination zp ZP_PTR_BYTE:11 [ mulFACbyMEM::mem#2 ] +Uplifting [print_ln] best 6983 combination +Uplifting [addMEMtoFAC] best 6983 combination +Uplifting [divMEMbyFAC] best 6983 combination +Uplifting [sinFAC] best 6983 combination Attempting to uplift remaining variables inzp ZP_BYTE:2 [ main::i#10 main::i#1 ] -Uplifting [main] best 6961 combination zp ZP_BYTE:2 [ main::i#10 main::i#1 ] -Coalescing zero page register [ zp ZP_PTR_BYTE:9 [ prepareMEM::mem#4 prepareMEM::mem#3 prepareMEM::mem#0 ] ] with [ zp ZP_PTR_BYTE:11 [ mulFACbyMEM::mem#2 ] ] -Coalescing zero page register [ zp ZP_PTR_BYTE:9 [ prepareMEM::mem#4 prepareMEM::mem#3 prepareMEM::mem#0 mulFACbyMEM::mem#2 ] ] with [ zp ZP_PTR_BYTE:15 [ setMEMtoFAC::mem#2 ] ] +Uplifting [main] best 6983 combination zp ZP_BYTE:2 [ main::i#10 main::i#1 ] +Coalescing zero page register [ zp ZP_PTR_BYTE:9 [ prepareMEM::mem#5 prepareMEM::mem#4 prepareMEM::mem#0 prepareMEM::mem#1 ] ] with [ zp ZP_PTR_BYTE:11 [ mulFACbyMEM::mem#2 ] ] +Coalescing zero page register [ zp ZP_PTR_BYTE:9 [ prepareMEM::mem#5 prepareMEM::mem#4 prepareMEM::mem#0 prepareMEM::mem#1 mulFACbyMEM::mem#2 ] ] with [ zp ZP_PTR_BYTE:15 [ setMEMtoFAC::mem#2 ] ] +Coalescing zero page register [ zp ZP_PTR_BYTE:9 [ prepareMEM::mem#5 prepareMEM::mem#4 prepareMEM::mem#0 prepareMEM::mem#1 mulFACbyMEM::mem#2 setMEMtoFAC::mem#2 ] ] with [ zp ZP_PTR_BYTE:37 [ setFAC::$0 ] ] Coalescing zero page register [ zp ZP_WORD:13 [ setFAC::w#3 setFAC::w#1 ] ] with [ zp ZP_WORD:17 [ main::$2 ] ] Coalescing zero page register [ zp ZP_WORD:13 [ setFAC::w#3 setFAC::w#1 main::$2 ] ] with [ zp ZP_WORD:19 [ getFAC::return#2 ] ] Coalescing zero page register [ zp ZP_WORD:13 [ setFAC::w#3 setFAC::w#1 main::$2 getFAC::return#2 ] ] with [ zp ZP_WORD:21 [ main::$11 ] ] @@ -7217,7 +7160,7 @@ Coalescing zero page register [ zp ZP_WORD:13 [ setFAC::w#3 setFAC::w#1 main::$2 Coalescing zero page register [ zp ZP_WORD:13 [ setFAC::w#3 setFAC::w#1 main::$2 getFAC::return#2 main::$11 print_word::w#0 ] ] with [ zp ZP_WORD:31 [ getFAC::w#1 ] ] Coalescing zero page register [ zp ZP_WORD:13 [ setFAC::w#3 setFAC::w#1 main::$2 getFAC::return#2 main::$11 print_word::w#0 getFAC::w#1 ] ] with [ zp ZP_WORD:33 [ getFAC::return#0 ] ] Allocated (was zp ZP_PTR_BYTE:7) zp ZP_PTR_BYTE:5 [ char_cursor#23 char_cursor#31 char_cursor#32 char_cursor#49 char_cursor#10 ] -Allocated (was zp ZP_PTR_BYTE:9) zp ZP_PTR_BYTE:7 [ prepareMEM::mem#4 prepareMEM::mem#3 prepareMEM::mem#0 mulFACbyMEM::mem#2 setMEMtoFAC::mem#2 ] +Allocated (was zp ZP_PTR_BYTE:9) zp ZP_PTR_BYTE:7 [ prepareMEM::mem#5 prepareMEM::mem#4 prepareMEM::mem#0 prepareMEM::mem#1 mulFACbyMEM::mem#2 setMEMtoFAC::mem#2 setFAC::$0 ] Allocated (was zp ZP_WORD:13) zp ZP_WORD:9 [ setFAC::w#3 setFAC::w#1 main::$2 getFAC::return#2 main::$11 print_word::w#0 getFAC::w#1 getFAC::return#0 ] Removing instruction jmp b31 Removing instruction jmp bend @@ -7251,6 +7194,7 @@ Removing instruction jmp breturn Removing instruction jmp breturn Removing instruction jmp b1 Removing instruction jmp breturn +Removing instruction jmp b1 Removing instruction jmp breturn Removing instruction jmp b1 Removing instruction jmp breturn @@ -7302,9 +7246,9 @@ main: { //SEG14 main::@3 b3: //SEG15 [7] call setMEMtoFAC param-assignment [ ] ( main:2 [ ] ) - //SEG16 [96] phi from main::@3 to setMEMtoFAC [phi:main::@3->setMEMtoFAC] + //SEG16 [95] phi from main::@3 to setMEMtoFAC [phi:main::@3->setMEMtoFAC] setMEMtoFAC_from_b3: - //SEG17 [96] phi (byte*) setMEMtoFAC::mem#2 = (const byte[]) f_127#0 [phi:main::@3->setMEMtoFAC#0] -- zpptrby1=cowo1 + //SEG17 [95] phi (byte*) setMEMtoFAC::mem#2 = (const byte[]) f_127#0 [phi:main::@3->setMEMtoFAC#0] -- zpptrby1=cowo1 lda #f_127 @@ -7357,9 +7301,9 @@ main: { //SEG34 main::@6 b6: //SEG35 [15] call setMEMtoFAC param-assignment [ main::i#10 char_cursor#32 line_cursor#13 ] ( main:2 [ main::i#10 char_cursor#32 line_cursor#13 ] ) - //SEG36 [96] phi from main::@6 to setMEMtoFAC [phi:main::@6->setMEMtoFAC] + //SEG36 [95] phi from main::@6 to setMEMtoFAC [phi:main::@6->setMEMtoFAC] setMEMtoFAC_from_b6: - //SEG37 [96] phi (byte*) setMEMtoFAC::mem#2 = (const byte[]) f_i#0 [phi:main::@6->setMEMtoFAC#0] -- zpptrby1=cowo1 + //SEG37 [95] phi (byte*) setMEMtoFAC::mem#2 = (const byte[]) f_i#0 [phi:main::@6->setMEMtoFAC#0] -- zpptrby1=cowo1 lda #f_i @@ -7581,21 +7525,19 @@ print_char: { } //SEG129 getFAC getFAC: { - .const lo = $fe - .const hi = $ff .label w = 9 .label return = 9 //SEG130 asm { jsr$b1aasty$festa$ff } jsr $b1aa sty $fe sta $ff - //SEG131 [65] (word) getFAC::w#1 ← (byte/signed byte/word/signed word) 0 lo= *((const byte*) getFAC::lo#0) [ getFAC::w#1 ] ( main:2::getFAC:27 [ main::i#10 char_cursor#32 line_cursor#13 getFAC::w#1 ] ) -- zpwo1=coby1_setlo__deref_cowo2 - lda lo + //SEG131 [65] (word) getFAC::w#1 ← (byte/signed byte/word/signed word) 0 lo= *((const byte*) memLo#0) [ getFAC::w#1 ] ( main:2::getFAC:27 [ main::i#10 char_cursor#32 line_cursor#13 getFAC::w#1 ] ) -- zpwo1=coby1_setlo__deref_cowo2 + lda memLo sta w lda #0 sta w+1 - //SEG132 [66] (word) getFAC::return#0 ← (word) getFAC::w#1 hi= *((const byte*) getFAC::hi#0) [ getFAC::return#0 ] ( main:2::getFAC:27 [ main::i#10 char_cursor#32 line_cursor#13 getFAC::return#0 ] ) -- zpwo1=zpwo1_sethi__deref_cowo1 - lda hi + //SEG132 [66] (word) getFAC::return#0 ← (word) getFAC::w#1 hi= *((const byte*) memHi#0) [ getFAC::return#0 ] ( main:2::getFAC:27 [ main::i#10 char_cursor#32 line_cursor#13 getFAC::return#0 ] ) -- zpwo1=zpwo1_sethi__deref_cowo1 + lda memHi sta return+1 //SEG133 getFAC::@return breturn: @@ -7607,7 +7549,7 @@ addMEMtoFAC: { //SEG136 [69] call prepareMEM param-assignment [ ] ( main:2::addMEMtoFAC:25 [ main::i#10 char_cursor#32 line_cursor#13 ] ) //SEG137 [72] phi from addMEMtoFAC to prepareMEM [phi:addMEMtoFAC->prepareMEM] prepareMEM_from_addMEMtoFAC: - //SEG138 [72] phi (byte*) prepareMEM::mem#4 = (const byte[]) f_127#0 [phi:addMEMtoFAC->prepareMEM#0] -- zpptrby1=cowo1 + //SEG138 [72] phi (byte*) prepareMEM::mem#5 = (const byte[]) f_127#0 [phi:addMEMtoFAC->prepareMEM#0] -- zpptrby1=cowo1 lda #f_127 @@ -7627,28 +7569,28 @@ addMEMtoFAC: { //SEG143 prepareMEM prepareMEM: { .label mem = 7 - //SEG144 [73] (byte~) prepareMEM::$0 ← < (byte*) prepareMEM::mem#4 [ prepareMEM::mem#4 prepareMEM::$0 ] ( main:2::addMEMtoFAC:25::prepareMEM:69 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 prepareMEM::$0 ] main:2::mulFACbyMEM:13::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 prepareMEM::$0 ] main:2::mulFACbyMEM:23::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 prepareMEM::$0 ] main:2::divMEMbyFAC:19::prepareMEM:86 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 prepareMEM::$0 ] main:2::setMEMtoFAC:7::prepareMEM:98 [ prepareMEM::mem#4 prepareMEM::$0 ] main:2::setMEMtoFAC:15::prepareMEM:98 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 prepareMEM::$0 ] ) -- aby=_lo_zpptrby1 + //SEG144 [73] (byte~) prepareMEM::$0 ← < (byte*) prepareMEM::mem#5 [ prepareMEM::mem#5 prepareMEM::$0 ] ( main:2::addMEMtoFAC:25::prepareMEM:69 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 prepareMEM::$0 ] main:2::mulFACbyMEM:13::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 prepareMEM::$0 ] main:2::mulFACbyMEM:23::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 prepareMEM::$0 ] main:2::divMEMbyFAC:19::prepareMEM:86 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 prepareMEM::$0 ] main:2::setFAC:5::prepareMEM:92 [ prepareMEM::mem#5 prepareMEM::$0 ] main:2::setFAC:11::prepareMEM:92 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 prepareMEM::$0 ] main:2::setFAC:17::prepareMEM:92 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 prepareMEM::$0 ] main:2::setMEMtoFAC:7::prepareMEM:97 [ prepareMEM::mem#5 prepareMEM::$0 ] main:2::setMEMtoFAC:15::prepareMEM:97 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 prepareMEM::$0 ] ) -- aby=_lo_zpptrby1 lda mem - //SEG145 [74] *((const byte*) memLo#0) ← (byte~) prepareMEM::$0 [ prepareMEM::mem#4 ] ( main:2::addMEMtoFAC:25::prepareMEM:69 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 ] main:2::mulFACbyMEM:13::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 ] main:2::mulFACbyMEM:23::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 ] main:2::divMEMbyFAC:19::prepareMEM:86 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 ] main:2::setMEMtoFAC:7::prepareMEM:98 [ prepareMEM::mem#4 ] main:2::setMEMtoFAC:15::prepareMEM:98 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 ] ) -- _deref_cowo1=aby + //SEG145 [74] *((const byte*) memLo#0) ← (byte~) prepareMEM::$0 [ prepareMEM::mem#5 ] ( main:2::addMEMtoFAC:25::prepareMEM:69 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] main:2::mulFACbyMEM:13::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] main:2::mulFACbyMEM:23::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] main:2::divMEMbyFAC:19::prepareMEM:86 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] main:2::setFAC:5::prepareMEM:92 [ prepareMEM::mem#5 ] main:2::setFAC:11::prepareMEM:92 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] main:2::setFAC:17::prepareMEM:92 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] main:2::setMEMtoFAC:7::prepareMEM:97 [ prepareMEM::mem#5 ] main:2::setMEMtoFAC:15::prepareMEM:97 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] ) -- _deref_cowo1=aby sta memLo - //SEG146 [75] (byte~) prepareMEM::$1 ← > (byte*) prepareMEM::mem#4 [ prepareMEM::$1 ] ( main:2::addMEMtoFAC:25::prepareMEM:69 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] main:2::mulFACbyMEM:13::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] main:2::mulFACbyMEM:23::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] main:2::divMEMbyFAC:19::prepareMEM:86 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] main:2::setMEMtoFAC:7::prepareMEM:98 [ prepareMEM::$1 ] main:2::setMEMtoFAC:15::prepareMEM:98 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] ) -- aby=_hi_zpptrby1 + //SEG146 [75] (byte~) prepareMEM::$1 ← > (byte*) prepareMEM::mem#5 [ prepareMEM::$1 ] ( main:2::addMEMtoFAC:25::prepareMEM:69 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] main:2::mulFACbyMEM:13::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] main:2::mulFACbyMEM:23::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] main:2::divMEMbyFAC:19::prepareMEM:86 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] main:2::setFAC:5::prepareMEM:92 [ prepareMEM::$1 ] main:2::setFAC:11::prepareMEM:92 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] main:2::setFAC:17::prepareMEM:92 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] main:2::setMEMtoFAC:7::prepareMEM:97 [ prepareMEM::$1 ] main:2::setMEMtoFAC:15::prepareMEM:97 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] ) -- aby=_hi_zpptrby1 lda mem+1 - //SEG147 [76] *((const byte*) memHi#0) ← (byte~) prepareMEM::$1 [ ] ( main:2::addMEMtoFAC:25::prepareMEM:69 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::mulFACbyMEM:13::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::mulFACbyMEM:23::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::divMEMbyFAC:19::prepareMEM:86 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::setMEMtoFAC:7::prepareMEM:98 [ ] main:2::setMEMtoFAC:15::prepareMEM:98 [ main::i#10 char_cursor#32 line_cursor#13 ] ) -- _deref_cowo1=aby + //SEG147 [76] *((const byte*) memHi#0) ← (byte~) prepareMEM::$1 [ ] ( main:2::addMEMtoFAC:25::prepareMEM:69 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::mulFACbyMEM:13::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::mulFACbyMEM:23::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::divMEMbyFAC:19::prepareMEM:86 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::setFAC:5::prepareMEM:92 [ ] main:2::setFAC:11::prepareMEM:92 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::setFAC:17::prepareMEM:92 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::setMEMtoFAC:7::prepareMEM:97 [ ] main:2::setMEMtoFAC:15::prepareMEM:97 [ main::i#10 char_cursor#32 line_cursor#13 ] ) -- _deref_cowo1=aby sta memHi //SEG148 prepareMEM::@return breturn: - //SEG149 [77] return [ ] ( main:2::addMEMtoFAC:25::prepareMEM:69 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::mulFACbyMEM:13::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::mulFACbyMEM:23::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::divMEMbyFAC:19::prepareMEM:86 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::setMEMtoFAC:7::prepareMEM:98 [ ] main:2::setMEMtoFAC:15::prepareMEM:98 [ main::i#10 char_cursor#32 line_cursor#13 ] ) + //SEG149 [77] return [ ] ( main:2::addMEMtoFAC:25::prepareMEM:69 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::mulFACbyMEM:13::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::mulFACbyMEM:23::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::divMEMbyFAC:19::prepareMEM:86 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::setFAC:5::prepareMEM:92 [ ] main:2::setFAC:11::prepareMEM:92 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::setFAC:17::prepareMEM:92 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::setMEMtoFAC:7::prepareMEM:97 [ ] main:2::setMEMtoFAC:15::prepareMEM:97 [ main::i#10 char_cursor#32 line_cursor#13 ] ) rts } //SEG150 mulFACbyMEM mulFACbyMEM: { .label mem = 7 - //SEG151 [79] (byte*) prepareMEM::mem#3 ← (byte*) mulFACbyMEM::mem#2 [ prepareMEM::mem#3 ] ( main:2::mulFACbyMEM:13 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#3 ] main:2::mulFACbyMEM:23 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#3 ] ) - // (byte*) prepareMEM::mem#3 = (byte*) mulFACbyMEM::mem#2 // register copy zp ZP_PTR_BYTE:7 + //SEG151 [79] (byte*) prepareMEM::mem#4 ← (byte*) mulFACbyMEM::mem#2 [ prepareMEM::mem#4 ] ( main:2::mulFACbyMEM:13 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 ] main:2::mulFACbyMEM:23 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 ] ) + // (byte*) prepareMEM::mem#4 = (byte*) mulFACbyMEM::mem#2 // register copy zp ZP_PTR_BYTE:7 //SEG152 [80] call prepareMEM param-assignment [ ] ( main:2::mulFACbyMEM:13 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::mulFACbyMEM:23 [ main::i#10 char_cursor#32 line_cursor#13 ] ) //SEG153 [72] phi from mulFACbyMEM to prepareMEM [phi:mulFACbyMEM->prepareMEM] prepareMEM_from_mulFACbyMEM: - //SEG154 [72] phi (byte*) prepareMEM::mem#4 = (byte*) prepareMEM::mem#3 [phi:mulFACbyMEM->prepareMEM#0] -- register_copy + //SEG154 [72] phi (byte*) prepareMEM::mem#5 = (byte*) prepareMEM::mem#4 [phi:mulFACbyMEM->prepareMEM#0] -- register_copy jsr prepareMEM //SEG155 mulFACbyMEM::@1 b1: @@ -7675,7 +7617,7 @@ divMEMbyFAC: { //SEG164 [86] call prepareMEM param-assignment [ ] ( main:2::divMEMbyFAC:19 [ main::i#10 char_cursor#32 line_cursor#13 ] ) //SEG165 [72] phi from divMEMbyFAC to prepareMEM [phi:divMEMbyFAC->prepareMEM] prepareMEM_from_divMEMbyFAC: - //SEG166 [72] phi (byte*) prepareMEM::mem#4 = (const byte[]) f_i#0 [phi:divMEMbyFAC->prepareMEM#0] -- zpptrby1=cowo1 + //SEG166 [72] phi (byte*) prepareMEM::mem#5 = (const byte[]) f_i#0 [phi:divMEMbyFAC->prepareMEM#0] -- zpptrby1=cowo1 lda #f_i @@ -7694,45 +7636,50 @@ divMEMbyFAC: { } //SEG171 setFAC setFAC: { - .const lo = $fe - .const hi = $ff + .label _0 = 7 .label w = 9 - //SEG172 [90] (byte~) setFAC::$0 ← < (word) setFAC::w#3 [ setFAC::w#3 setFAC::$0 ] ( main:2::setFAC:5 [ setFAC::w#3 setFAC::$0 ] main:2::setFAC:11 [ main::i#10 char_cursor#32 line_cursor#13 setFAC::w#3 setFAC::$0 ] main:2::setFAC:17 [ main::i#10 char_cursor#32 line_cursor#13 setFAC::w#3 setFAC::$0 ] ) -- aby=_lo_zpwo1 + //SEG172 [90] (byte*~) setFAC::$0 ← ((byte*)) (word) setFAC::w#3 [ setFAC::$0 ] ( main:2::setFAC:5 [ setFAC::$0 ] main:2::setFAC:11 [ main::i#10 char_cursor#32 line_cursor#13 setFAC::$0 ] main:2::setFAC:17 [ main::i#10 char_cursor#32 line_cursor#13 setFAC::$0 ] ) -- zpptrby1=_ptrby_zpwo1 lda w - //SEG173 [91] *((const byte*) setFAC::lo#0) ← (byte~) setFAC::$0 [ setFAC::w#3 ] ( main:2::setFAC:5 [ setFAC::w#3 ] main:2::setFAC:11 [ main::i#10 char_cursor#32 line_cursor#13 setFAC::w#3 ] main:2::setFAC:17 [ main::i#10 char_cursor#32 line_cursor#13 setFAC::w#3 ] ) -- _deref_cowo1=aby - sta lo - //SEG174 [92] (byte~) setFAC::$1 ← > (word) setFAC::w#3 [ setFAC::$1 ] ( main:2::setFAC:5 [ setFAC::$1 ] main:2::setFAC:11 [ main::i#10 char_cursor#32 line_cursor#13 setFAC::$1 ] main:2::setFAC:17 [ main::i#10 char_cursor#32 line_cursor#13 setFAC::$1 ] ) -- aby=_hi_zpwo1 + sta _0 lda w+1 - //SEG175 [93] *((const byte*) setFAC::hi#0) ← (byte~) setFAC::$1 [ ] ( main:2::setFAC:5 [ ] main:2::setFAC:11 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::setFAC:17 [ main::i#10 char_cursor#32 line_cursor#13 ] ) -- _deref_cowo1=aby - sta hi - //SEG176 asm { ldy$felda$ffjsr$b391 } + sta _0+1 + //SEG173 [91] (byte*) prepareMEM::mem#0 ← (byte*~) setFAC::$0 [ prepareMEM::mem#0 ] ( main:2::setFAC:5 [ prepareMEM::mem#0 ] main:2::setFAC:11 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#0 ] main:2::setFAC:17 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#0 ] ) + // (byte*) prepareMEM::mem#0 = (byte*~) setFAC::$0 // register copy zp ZP_PTR_BYTE:7 + //SEG174 [92] call prepareMEM param-assignment [ ] ( main:2::setFAC:5 [ ] main:2::setFAC:11 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::setFAC:17 [ main::i#10 char_cursor#32 line_cursor#13 ] ) + //SEG175 [72] phi from setFAC to prepareMEM [phi:setFAC->prepareMEM] + prepareMEM_from_setFAC: + //SEG176 [72] phi (byte*) prepareMEM::mem#5 = (byte*) prepareMEM::mem#0 [phi:setFAC->prepareMEM#0] -- register_copy + jsr prepareMEM + //SEG177 setFAC::@1 + b1: + //SEG178 asm { ldy$felda$ffjsr$b391 } ldy $fe lda $ff jsr $b391 - //SEG177 setFAC::@return + //SEG179 setFAC::@return breturn: - //SEG178 [95] return [ ] ( main:2::setFAC:5 [ ] main:2::setFAC:11 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::setFAC:17 [ main::i#10 char_cursor#32 line_cursor#13 ] ) + //SEG180 [94] return [ ] ( main:2::setFAC:5 [ ] main:2::setFAC:11 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::setFAC:17 [ main::i#10 char_cursor#32 line_cursor#13 ] ) rts } -//SEG179 setMEMtoFAC +//SEG181 setMEMtoFAC setMEMtoFAC: { .label mem = 7 - //SEG180 [97] (byte*) prepareMEM::mem#0 ← (byte*) setMEMtoFAC::mem#2 [ prepareMEM::mem#0 ] ( main:2::setMEMtoFAC:7 [ prepareMEM::mem#0 ] main:2::setMEMtoFAC:15 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#0 ] ) - // (byte*) prepareMEM::mem#0 = (byte*) setMEMtoFAC::mem#2 // register copy zp ZP_PTR_BYTE:7 - //SEG181 [98] call prepareMEM param-assignment [ ] ( main:2::setMEMtoFAC:7 [ ] main:2::setMEMtoFAC:15 [ main::i#10 char_cursor#32 line_cursor#13 ] ) - //SEG182 [72] phi from setMEMtoFAC to prepareMEM [phi:setMEMtoFAC->prepareMEM] + //SEG182 [96] (byte*) prepareMEM::mem#1 ← (byte*) setMEMtoFAC::mem#2 [ prepareMEM::mem#1 ] ( main:2::setMEMtoFAC:7 [ prepareMEM::mem#1 ] main:2::setMEMtoFAC:15 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#1 ] ) + // (byte*) prepareMEM::mem#1 = (byte*) setMEMtoFAC::mem#2 // register copy zp ZP_PTR_BYTE:7 + //SEG183 [97] call prepareMEM param-assignment [ ] ( main:2::setMEMtoFAC:7 [ ] main:2::setMEMtoFAC:15 [ main::i#10 char_cursor#32 line_cursor#13 ] ) + //SEG184 [72] phi from setMEMtoFAC to prepareMEM [phi:setMEMtoFAC->prepareMEM] prepareMEM_from_setMEMtoFAC: - //SEG183 [72] phi (byte*) prepareMEM::mem#4 = (byte*) prepareMEM::mem#0 [phi:setMEMtoFAC->prepareMEM#0] -- register_copy + //SEG185 [72] phi (byte*) prepareMEM::mem#5 = (byte*) prepareMEM::mem#1 [phi:setMEMtoFAC->prepareMEM#0] -- register_copy jsr prepareMEM - //SEG184 setMEMtoFAC::@1 + //SEG186 setMEMtoFAC::@1 b1: - //SEG185 asm { ldx$feldy$ffjsr$bbd4 } + //SEG187 asm { ldx$feldy$ffjsr$bbd4 } ldx $fe ldy $ff jsr $bbd4 - //SEG186 setMEMtoFAC::@return + //SEG188 setMEMtoFAC::@return breturn: - //SEG187 [100] return [ ] ( main:2::setMEMtoFAC:7 [ ] main:2::setMEMtoFAC:15 [ main::i#10 char_cursor#32 line_cursor#13 ] ) + //SEG189 [99] return [ ] ( main:2::setMEMtoFAC:7 [ ] main:2::setMEMtoFAC:15 [ main::i#10 char_cursor#32 line_cursor#13 ] ) rts } @@ -7805,8 +7752,8 @@ main: { //SEG14 main::@3 b3: //SEG15 [7] call setMEMtoFAC param-assignment [ ] ( main:2 [ ] ) - //SEG16 [96] phi from main::@3 to setMEMtoFAC [phi:main::@3->setMEMtoFAC] - //SEG17 [96] phi (byte*) setMEMtoFAC::mem#2 = (const byte[]) f_127#0 [phi:main::@3->setMEMtoFAC#0] -- zpptrby1=cowo1 + //SEG16 [95] phi from main::@3 to setMEMtoFAC [phi:main::@3->setMEMtoFAC] + //SEG17 [95] phi (byte*) setMEMtoFAC::mem#2 = (const byte[]) f_127#0 [phi:main::@3->setMEMtoFAC#0] -- zpptrby1=cowo1 lda #f_127 @@ -7856,8 +7803,8 @@ main: { //SEG34 main::@6 b6: //SEG35 [15] call setMEMtoFAC param-assignment [ main::i#10 char_cursor#32 line_cursor#13 ] ( main:2 [ main::i#10 char_cursor#32 line_cursor#13 ] ) - //SEG36 [96] phi from main::@6 to setMEMtoFAC [phi:main::@6->setMEMtoFAC] - //SEG37 [96] phi (byte*) setMEMtoFAC::mem#2 = (const byte[]) f_i#0 [phi:main::@6->setMEMtoFAC#0] -- zpptrby1=cowo1 + //SEG36 [95] phi from main::@6 to setMEMtoFAC [phi:main::@6->setMEMtoFAC] + //SEG37 [95] phi (byte*) setMEMtoFAC::mem#2 = (const byte[]) f_i#0 [phi:main::@6->setMEMtoFAC#0] -- zpptrby1=cowo1 lda #f_i @@ -8065,21 +8012,19 @@ print_char: { } //SEG129 getFAC getFAC: { - .const lo = $fe - .const hi = $ff .label w = 9 .label return = 9 //SEG130 asm { jsr$b1aasty$festa$ff } jsr $b1aa sty $fe sta $ff - //SEG131 [65] (word) getFAC::w#1 ← (byte/signed byte/word/signed word) 0 lo= *((const byte*) getFAC::lo#0) [ getFAC::w#1 ] ( main:2::getFAC:27 [ main::i#10 char_cursor#32 line_cursor#13 getFAC::w#1 ] ) -- zpwo1=coby1_setlo__deref_cowo2 - lda lo + //SEG131 [65] (word) getFAC::w#1 ← (byte/signed byte/word/signed word) 0 lo= *((const byte*) memLo#0) [ getFAC::w#1 ] ( main:2::getFAC:27 [ main::i#10 char_cursor#32 line_cursor#13 getFAC::w#1 ] ) -- zpwo1=coby1_setlo__deref_cowo2 + lda memLo sta w lda #0 sta w+1 - //SEG132 [66] (word) getFAC::return#0 ← (word) getFAC::w#1 hi= *((const byte*) getFAC::hi#0) [ getFAC::return#0 ] ( main:2::getFAC:27 [ main::i#10 char_cursor#32 line_cursor#13 getFAC::return#0 ] ) -- zpwo1=zpwo1_sethi__deref_cowo1 - lda hi + //SEG132 [66] (word) getFAC::return#0 ← (word) getFAC::w#1 hi= *((const byte*) memHi#0) [ getFAC::return#0 ] ( main:2::getFAC:27 [ main::i#10 char_cursor#32 line_cursor#13 getFAC::return#0 ] ) -- zpwo1=zpwo1_sethi__deref_cowo1 + lda memHi sta return+1 //SEG133 getFAC::@return breturn: @@ -8091,7 +8036,7 @@ addMEMtoFAC: { //SEG136 [69] call prepareMEM param-assignment [ ] ( main:2::addMEMtoFAC:25 [ main::i#10 char_cursor#32 line_cursor#13 ] ) //SEG137 [72] phi from addMEMtoFAC to prepareMEM [phi:addMEMtoFAC->prepareMEM] prepareMEM_from_addMEMtoFAC: - //SEG138 [72] phi (byte*) prepareMEM::mem#4 = (const byte[]) f_127#0 [phi:addMEMtoFAC->prepareMEM#0] -- zpptrby1=cowo1 + //SEG138 [72] phi (byte*) prepareMEM::mem#5 = (const byte[]) f_127#0 [phi:addMEMtoFAC->prepareMEM#0] -- zpptrby1=cowo1 lda #f_127 @@ -8111,28 +8056,28 @@ addMEMtoFAC: { //SEG143 prepareMEM prepareMEM: { .label mem = 7 - //SEG144 [73] (byte~) prepareMEM::$0 ← < (byte*) prepareMEM::mem#4 [ prepareMEM::mem#4 prepareMEM::$0 ] ( main:2::addMEMtoFAC:25::prepareMEM:69 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 prepareMEM::$0 ] main:2::mulFACbyMEM:13::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 prepareMEM::$0 ] main:2::mulFACbyMEM:23::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 prepareMEM::$0 ] main:2::divMEMbyFAC:19::prepareMEM:86 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 prepareMEM::$0 ] main:2::setMEMtoFAC:7::prepareMEM:98 [ prepareMEM::mem#4 prepareMEM::$0 ] main:2::setMEMtoFAC:15::prepareMEM:98 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 prepareMEM::$0 ] ) -- aby=_lo_zpptrby1 + //SEG144 [73] (byte~) prepareMEM::$0 ← < (byte*) prepareMEM::mem#5 [ prepareMEM::mem#5 prepareMEM::$0 ] ( main:2::addMEMtoFAC:25::prepareMEM:69 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 prepareMEM::$0 ] main:2::mulFACbyMEM:13::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 prepareMEM::$0 ] main:2::mulFACbyMEM:23::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 prepareMEM::$0 ] main:2::divMEMbyFAC:19::prepareMEM:86 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 prepareMEM::$0 ] main:2::setFAC:5::prepareMEM:92 [ prepareMEM::mem#5 prepareMEM::$0 ] main:2::setFAC:11::prepareMEM:92 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 prepareMEM::$0 ] main:2::setFAC:17::prepareMEM:92 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 prepareMEM::$0 ] main:2::setMEMtoFAC:7::prepareMEM:97 [ prepareMEM::mem#5 prepareMEM::$0 ] main:2::setMEMtoFAC:15::prepareMEM:97 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 prepareMEM::$0 ] ) -- aby=_lo_zpptrby1 lda mem - //SEG145 [74] *((const byte*) memLo#0) ← (byte~) prepareMEM::$0 [ prepareMEM::mem#4 ] ( main:2::addMEMtoFAC:25::prepareMEM:69 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 ] main:2::mulFACbyMEM:13::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 ] main:2::mulFACbyMEM:23::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 ] main:2::divMEMbyFAC:19::prepareMEM:86 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 ] main:2::setMEMtoFAC:7::prepareMEM:98 [ prepareMEM::mem#4 ] main:2::setMEMtoFAC:15::prepareMEM:98 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 ] ) -- _deref_cowo1=aby + //SEG145 [74] *((const byte*) memLo#0) ← (byte~) prepareMEM::$0 [ prepareMEM::mem#5 ] ( main:2::addMEMtoFAC:25::prepareMEM:69 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] main:2::mulFACbyMEM:13::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] main:2::mulFACbyMEM:23::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] main:2::divMEMbyFAC:19::prepareMEM:86 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] main:2::setFAC:5::prepareMEM:92 [ prepareMEM::mem#5 ] main:2::setFAC:11::prepareMEM:92 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] main:2::setFAC:17::prepareMEM:92 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] main:2::setMEMtoFAC:7::prepareMEM:97 [ prepareMEM::mem#5 ] main:2::setMEMtoFAC:15::prepareMEM:97 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] ) -- _deref_cowo1=aby sta memLo - //SEG146 [75] (byte~) prepareMEM::$1 ← > (byte*) prepareMEM::mem#4 [ prepareMEM::$1 ] ( main:2::addMEMtoFAC:25::prepareMEM:69 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] main:2::mulFACbyMEM:13::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] main:2::mulFACbyMEM:23::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] main:2::divMEMbyFAC:19::prepareMEM:86 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] main:2::setMEMtoFAC:7::prepareMEM:98 [ prepareMEM::$1 ] main:2::setMEMtoFAC:15::prepareMEM:98 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] ) -- aby=_hi_zpptrby1 + //SEG146 [75] (byte~) prepareMEM::$1 ← > (byte*) prepareMEM::mem#5 [ prepareMEM::$1 ] ( main:2::addMEMtoFAC:25::prepareMEM:69 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] main:2::mulFACbyMEM:13::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] main:2::mulFACbyMEM:23::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] main:2::divMEMbyFAC:19::prepareMEM:86 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] main:2::setFAC:5::prepareMEM:92 [ prepareMEM::$1 ] main:2::setFAC:11::prepareMEM:92 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] main:2::setFAC:17::prepareMEM:92 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] main:2::setMEMtoFAC:7::prepareMEM:97 [ prepareMEM::$1 ] main:2::setMEMtoFAC:15::prepareMEM:97 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] ) -- aby=_hi_zpptrby1 lda mem+1 - //SEG147 [76] *((const byte*) memHi#0) ← (byte~) prepareMEM::$1 [ ] ( main:2::addMEMtoFAC:25::prepareMEM:69 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::mulFACbyMEM:13::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::mulFACbyMEM:23::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::divMEMbyFAC:19::prepareMEM:86 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::setMEMtoFAC:7::prepareMEM:98 [ ] main:2::setMEMtoFAC:15::prepareMEM:98 [ main::i#10 char_cursor#32 line_cursor#13 ] ) -- _deref_cowo1=aby + //SEG147 [76] *((const byte*) memHi#0) ← (byte~) prepareMEM::$1 [ ] ( main:2::addMEMtoFAC:25::prepareMEM:69 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::mulFACbyMEM:13::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::mulFACbyMEM:23::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::divMEMbyFAC:19::prepareMEM:86 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::setFAC:5::prepareMEM:92 [ ] main:2::setFAC:11::prepareMEM:92 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::setFAC:17::prepareMEM:92 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::setMEMtoFAC:7::prepareMEM:97 [ ] main:2::setMEMtoFAC:15::prepareMEM:97 [ main::i#10 char_cursor#32 line_cursor#13 ] ) -- _deref_cowo1=aby sta memHi //SEG148 prepareMEM::@return breturn: - //SEG149 [77] return [ ] ( main:2::addMEMtoFAC:25::prepareMEM:69 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::mulFACbyMEM:13::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::mulFACbyMEM:23::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::divMEMbyFAC:19::prepareMEM:86 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::setMEMtoFAC:7::prepareMEM:98 [ ] main:2::setMEMtoFAC:15::prepareMEM:98 [ main::i#10 char_cursor#32 line_cursor#13 ] ) + //SEG149 [77] return [ ] ( main:2::addMEMtoFAC:25::prepareMEM:69 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::mulFACbyMEM:13::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::mulFACbyMEM:23::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::divMEMbyFAC:19::prepareMEM:86 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::setFAC:5::prepareMEM:92 [ ] main:2::setFAC:11::prepareMEM:92 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::setFAC:17::prepareMEM:92 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::setMEMtoFAC:7::prepareMEM:97 [ ] main:2::setMEMtoFAC:15::prepareMEM:97 [ main::i#10 char_cursor#32 line_cursor#13 ] ) rts } //SEG150 mulFACbyMEM mulFACbyMEM: { .label mem = 7 - //SEG151 [79] (byte*) prepareMEM::mem#3 ← (byte*) mulFACbyMEM::mem#2 [ prepareMEM::mem#3 ] ( main:2::mulFACbyMEM:13 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#3 ] main:2::mulFACbyMEM:23 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#3 ] ) - // (byte*) prepareMEM::mem#3 = (byte*) mulFACbyMEM::mem#2 // register copy zp ZP_PTR_BYTE:7 + //SEG151 [79] (byte*) prepareMEM::mem#4 ← (byte*) mulFACbyMEM::mem#2 [ prepareMEM::mem#4 ] ( main:2::mulFACbyMEM:13 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 ] main:2::mulFACbyMEM:23 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 ] ) + // (byte*) prepareMEM::mem#4 = (byte*) mulFACbyMEM::mem#2 // register copy zp ZP_PTR_BYTE:7 //SEG152 [80] call prepareMEM param-assignment [ ] ( main:2::mulFACbyMEM:13 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::mulFACbyMEM:23 [ main::i#10 char_cursor#32 line_cursor#13 ] ) //SEG153 [72] phi from mulFACbyMEM to prepareMEM [phi:mulFACbyMEM->prepareMEM] prepareMEM_from_mulFACbyMEM: - //SEG154 [72] phi (byte*) prepareMEM::mem#4 = (byte*) prepareMEM::mem#3 [phi:mulFACbyMEM->prepareMEM#0] -- register_copy + //SEG154 [72] phi (byte*) prepareMEM::mem#5 = (byte*) prepareMEM::mem#4 [phi:mulFACbyMEM->prepareMEM#0] -- register_copy jsr prepareMEM //SEG155 mulFACbyMEM::@1 b1: @@ -8159,7 +8104,7 @@ divMEMbyFAC: { //SEG164 [86] call prepareMEM param-assignment [ ] ( main:2::divMEMbyFAC:19 [ main::i#10 char_cursor#32 line_cursor#13 ] ) //SEG165 [72] phi from divMEMbyFAC to prepareMEM [phi:divMEMbyFAC->prepareMEM] prepareMEM_from_divMEMbyFAC: - //SEG166 [72] phi (byte*) prepareMEM::mem#4 = (const byte[]) f_i#0 [phi:divMEMbyFAC->prepareMEM#0] -- zpptrby1=cowo1 + //SEG166 [72] phi (byte*) prepareMEM::mem#5 = (const byte[]) f_i#0 [phi:divMEMbyFAC->prepareMEM#0] -- zpptrby1=cowo1 lda #f_i @@ -8178,45 +8123,50 @@ divMEMbyFAC: { } //SEG171 setFAC setFAC: { - .const lo = $fe - .const hi = $ff + .label _0 = 7 .label w = 9 - //SEG172 [90] (byte~) setFAC::$0 ← < (word) setFAC::w#3 [ setFAC::w#3 setFAC::$0 ] ( main:2::setFAC:5 [ setFAC::w#3 setFAC::$0 ] main:2::setFAC:11 [ main::i#10 char_cursor#32 line_cursor#13 setFAC::w#3 setFAC::$0 ] main:2::setFAC:17 [ main::i#10 char_cursor#32 line_cursor#13 setFAC::w#3 setFAC::$0 ] ) -- aby=_lo_zpwo1 + //SEG172 [90] (byte*~) setFAC::$0 ← ((byte*)) (word) setFAC::w#3 [ setFAC::$0 ] ( main:2::setFAC:5 [ setFAC::$0 ] main:2::setFAC:11 [ main::i#10 char_cursor#32 line_cursor#13 setFAC::$0 ] main:2::setFAC:17 [ main::i#10 char_cursor#32 line_cursor#13 setFAC::$0 ] ) -- zpptrby1=_ptrby_zpwo1 lda w - //SEG173 [91] *((const byte*) setFAC::lo#0) ← (byte~) setFAC::$0 [ setFAC::w#3 ] ( main:2::setFAC:5 [ setFAC::w#3 ] main:2::setFAC:11 [ main::i#10 char_cursor#32 line_cursor#13 setFAC::w#3 ] main:2::setFAC:17 [ main::i#10 char_cursor#32 line_cursor#13 setFAC::w#3 ] ) -- _deref_cowo1=aby - sta lo - //SEG174 [92] (byte~) setFAC::$1 ← > (word) setFAC::w#3 [ setFAC::$1 ] ( main:2::setFAC:5 [ setFAC::$1 ] main:2::setFAC:11 [ main::i#10 char_cursor#32 line_cursor#13 setFAC::$1 ] main:2::setFAC:17 [ main::i#10 char_cursor#32 line_cursor#13 setFAC::$1 ] ) -- aby=_hi_zpwo1 + sta _0 lda w+1 - //SEG175 [93] *((const byte*) setFAC::hi#0) ← (byte~) setFAC::$1 [ ] ( main:2::setFAC:5 [ ] main:2::setFAC:11 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::setFAC:17 [ main::i#10 char_cursor#32 line_cursor#13 ] ) -- _deref_cowo1=aby - sta hi - //SEG176 asm { ldy$felda$ffjsr$b391 } + sta _0+1 + //SEG173 [91] (byte*) prepareMEM::mem#0 ← (byte*~) setFAC::$0 [ prepareMEM::mem#0 ] ( main:2::setFAC:5 [ prepareMEM::mem#0 ] main:2::setFAC:11 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#0 ] main:2::setFAC:17 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#0 ] ) + // (byte*) prepareMEM::mem#0 = (byte*~) setFAC::$0 // register copy zp ZP_PTR_BYTE:7 + //SEG174 [92] call prepareMEM param-assignment [ ] ( main:2::setFAC:5 [ ] main:2::setFAC:11 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::setFAC:17 [ main::i#10 char_cursor#32 line_cursor#13 ] ) + //SEG175 [72] phi from setFAC to prepareMEM [phi:setFAC->prepareMEM] + prepareMEM_from_setFAC: + //SEG176 [72] phi (byte*) prepareMEM::mem#5 = (byte*) prepareMEM::mem#0 [phi:setFAC->prepareMEM#0] -- register_copy + jsr prepareMEM + //SEG177 setFAC::@1 + b1: + //SEG178 asm { ldy$felda$ffjsr$b391 } ldy $fe lda $ff jsr $b391 - //SEG177 setFAC::@return + //SEG179 setFAC::@return breturn: - //SEG178 [95] return [ ] ( main:2::setFAC:5 [ ] main:2::setFAC:11 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::setFAC:17 [ main::i#10 char_cursor#32 line_cursor#13 ] ) + //SEG180 [94] return [ ] ( main:2::setFAC:5 [ ] main:2::setFAC:11 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::setFAC:17 [ main::i#10 char_cursor#32 line_cursor#13 ] ) rts } -//SEG179 setMEMtoFAC +//SEG181 setMEMtoFAC setMEMtoFAC: { .label mem = 7 - //SEG180 [97] (byte*) prepareMEM::mem#0 ← (byte*) setMEMtoFAC::mem#2 [ prepareMEM::mem#0 ] ( main:2::setMEMtoFAC:7 [ prepareMEM::mem#0 ] main:2::setMEMtoFAC:15 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#0 ] ) - // (byte*) prepareMEM::mem#0 = (byte*) setMEMtoFAC::mem#2 // register copy zp ZP_PTR_BYTE:7 - //SEG181 [98] call prepareMEM param-assignment [ ] ( main:2::setMEMtoFAC:7 [ ] main:2::setMEMtoFAC:15 [ main::i#10 char_cursor#32 line_cursor#13 ] ) - //SEG182 [72] phi from setMEMtoFAC to prepareMEM [phi:setMEMtoFAC->prepareMEM] + //SEG182 [96] (byte*) prepareMEM::mem#1 ← (byte*) setMEMtoFAC::mem#2 [ prepareMEM::mem#1 ] ( main:2::setMEMtoFAC:7 [ prepareMEM::mem#1 ] main:2::setMEMtoFAC:15 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#1 ] ) + // (byte*) prepareMEM::mem#1 = (byte*) setMEMtoFAC::mem#2 // register copy zp ZP_PTR_BYTE:7 + //SEG183 [97] call prepareMEM param-assignment [ ] ( main:2::setMEMtoFAC:7 [ ] main:2::setMEMtoFAC:15 [ main::i#10 char_cursor#32 line_cursor#13 ] ) + //SEG184 [72] phi from setMEMtoFAC to prepareMEM [phi:setMEMtoFAC->prepareMEM] prepareMEM_from_setMEMtoFAC: - //SEG183 [72] phi (byte*) prepareMEM::mem#4 = (byte*) prepareMEM::mem#0 [phi:setMEMtoFAC->prepareMEM#0] -- register_copy + //SEG185 [72] phi (byte*) prepareMEM::mem#5 = (byte*) prepareMEM::mem#1 [phi:setMEMtoFAC->prepareMEM#0] -- register_copy jsr prepareMEM - //SEG184 setMEMtoFAC::@1 + //SEG186 setMEMtoFAC::@1 b1: - //SEG185 asm { ldx$feldy$ffjsr$bbd4 } + //SEG187 asm { ldx$feldy$ffjsr$bbd4 } ldx $fe ldy $ff jsr $bbd4 - //SEG186 setMEMtoFAC::@return + //SEG188 setMEMtoFAC::@return breturn: - //SEG187 [100] return [ ] ( main:2::setMEMtoFAC:7 [ ] main:2::setMEMtoFAC:15 [ main::i#10 char_cursor#32 line_cursor#13 ] ) + //SEG189 [99] return [ ] ( main:2::setMEMtoFAC:7 [ ] main:2::setMEMtoFAC:15 [ main::i#10 char_cursor#32 line_cursor#13 ] ) rts } @@ -8261,6 +8211,8 @@ Removing instruction breturn: Removing instruction prepareMEM_from_divMEMbyFAC: Removing instruction b1: Removing instruction breturn: +Removing instruction prepareMEM_from_setFAC: +Removing instruction b1: Removing instruction breturn: Removing instruction prepareMEM_from_setMEMtoFAC: Removing instruction b1: @@ -8304,8 +8256,8 @@ main: { //SEG13 [6] phi from main to main::@3 [phi:main->main::@3] //SEG14 main::@3 //SEG15 [7] call setMEMtoFAC param-assignment [ ] ( main:2 [ ] ) - //SEG16 [96] phi from main::@3 to setMEMtoFAC [phi:main::@3->setMEMtoFAC] - //SEG17 [96] phi (byte*) setMEMtoFAC::mem#2 = (const byte[]) f_127#0 [phi:main::@3->setMEMtoFAC#0] -- zpptrby1=cowo1 + //SEG16 [95] phi from main::@3 to setMEMtoFAC [phi:main::@3->setMEMtoFAC] + //SEG17 [95] phi (byte*) setMEMtoFAC::mem#2 = (const byte[]) f_127#0 [phi:main::@3->setMEMtoFAC#0] -- zpptrby1=cowo1 lda #f_127 @@ -8351,8 +8303,8 @@ main: { //SEG33 [14] phi from main::@5 to main::@6 [phi:main::@5->main::@6] //SEG34 main::@6 //SEG35 [15] call setMEMtoFAC param-assignment [ main::i#10 char_cursor#32 line_cursor#13 ] ( main:2 [ main::i#10 char_cursor#32 line_cursor#13 ] ) - //SEG36 [96] phi from main::@6 to setMEMtoFAC [phi:main::@6->setMEMtoFAC] - //SEG37 [96] phi (byte*) setMEMtoFAC::mem#2 = (const byte[]) f_i#0 [phi:main::@6->setMEMtoFAC#0] -- zpptrby1=cowo1 + //SEG36 [95] phi from main::@6 to setMEMtoFAC [phi:main::@6->setMEMtoFAC] + //SEG37 [95] phi (byte*) setMEMtoFAC::mem#2 = (const byte[]) f_i#0 [phi:main::@6->setMEMtoFAC#0] -- zpptrby1=cowo1 lda #f_i @@ -8539,21 +8491,19 @@ print_char: { } //SEG129 getFAC getFAC: { - .const lo = $fe - .const hi = $ff .label w = 9 .label return = 9 //SEG130 asm { jsr$b1aasty$festa$ff } jsr $b1aa sty $fe sta $ff - //SEG131 [65] (word) getFAC::w#1 ← (byte/signed byte/word/signed word) 0 lo= *((const byte*) getFAC::lo#0) [ getFAC::w#1 ] ( main:2::getFAC:27 [ main::i#10 char_cursor#32 line_cursor#13 getFAC::w#1 ] ) -- zpwo1=coby1_setlo__deref_cowo2 - lda lo + //SEG131 [65] (word) getFAC::w#1 ← (byte/signed byte/word/signed word) 0 lo= *((const byte*) memLo#0) [ getFAC::w#1 ] ( main:2::getFAC:27 [ main::i#10 char_cursor#32 line_cursor#13 getFAC::w#1 ] ) -- zpwo1=coby1_setlo__deref_cowo2 + lda memLo sta w lda #0 sta w+1 - //SEG132 [66] (word) getFAC::return#0 ← (word) getFAC::w#1 hi= *((const byte*) getFAC::hi#0) [ getFAC::return#0 ] ( main:2::getFAC:27 [ main::i#10 char_cursor#32 line_cursor#13 getFAC::return#0 ] ) -- zpwo1=zpwo1_sethi__deref_cowo1 - lda hi + //SEG132 [66] (word) getFAC::return#0 ← (word) getFAC::w#1 hi= *((const byte*) memHi#0) [ getFAC::return#0 ] ( main:2::getFAC:27 [ main::i#10 char_cursor#32 line_cursor#13 getFAC::return#0 ] ) -- zpwo1=zpwo1_sethi__deref_cowo1 + lda memHi sta return+1 //SEG133 getFAC::@return //SEG134 [67] return [ getFAC::return#0 ] ( main:2::getFAC:27 [ main::i#10 char_cursor#32 line_cursor#13 getFAC::return#0 ] ) @@ -8563,7 +8513,7 @@ getFAC: { addMEMtoFAC: { //SEG136 [69] call prepareMEM param-assignment [ ] ( main:2::addMEMtoFAC:25 [ main::i#10 char_cursor#32 line_cursor#13 ] ) //SEG137 [72] phi from addMEMtoFAC to prepareMEM [phi:addMEMtoFAC->prepareMEM] - //SEG138 [72] phi (byte*) prepareMEM::mem#4 = (const byte[]) f_127#0 [phi:addMEMtoFAC->prepareMEM#0] -- zpptrby1=cowo1 + //SEG138 [72] phi (byte*) prepareMEM::mem#5 = (const byte[]) f_127#0 [phi:addMEMtoFAC->prepareMEM#0] -- zpptrby1=cowo1 lda #f_127 @@ -8581,26 +8531,26 @@ addMEMtoFAC: { //SEG143 prepareMEM prepareMEM: { .label mem = 7 - //SEG144 [73] (byte~) prepareMEM::$0 ← < (byte*) prepareMEM::mem#4 [ prepareMEM::mem#4 prepareMEM::$0 ] ( main:2::addMEMtoFAC:25::prepareMEM:69 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 prepareMEM::$0 ] main:2::mulFACbyMEM:13::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 prepareMEM::$0 ] main:2::mulFACbyMEM:23::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 prepareMEM::$0 ] main:2::divMEMbyFAC:19::prepareMEM:86 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 prepareMEM::$0 ] main:2::setMEMtoFAC:7::prepareMEM:98 [ prepareMEM::mem#4 prepareMEM::$0 ] main:2::setMEMtoFAC:15::prepareMEM:98 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 prepareMEM::$0 ] ) -- aby=_lo_zpptrby1 + //SEG144 [73] (byte~) prepareMEM::$0 ← < (byte*) prepareMEM::mem#5 [ prepareMEM::mem#5 prepareMEM::$0 ] ( main:2::addMEMtoFAC:25::prepareMEM:69 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 prepareMEM::$0 ] main:2::mulFACbyMEM:13::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 prepareMEM::$0 ] main:2::mulFACbyMEM:23::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 prepareMEM::$0 ] main:2::divMEMbyFAC:19::prepareMEM:86 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 prepareMEM::$0 ] main:2::setFAC:5::prepareMEM:92 [ prepareMEM::mem#5 prepareMEM::$0 ] main:2::setFAC:11::prepareMEM:92 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 prepareMEM::$0 ] main:2::setFAC:17::prepareMEM:92 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 prepareMEM::$0 ] main:2::setMEMtoFAC:7::prepareMEM:97 [ prepareMEM::mem#5 prepareMEM::$0 ] main:2::setMEMtoFAC:15::prepareMEM:97 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 prepareMEM::$0 ] ) -- aby=_lo_zpptrby1 lda mem - //SEG145 [74] *((const byte*) memLo#0) ← (byte~) prepareMEM::$0 [ prepareMEM::mem#4 ] ( main:2::addMEMtoFAC:25::prepareMEM:69 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 ] main:2::mulFACbyMEM:13::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 ] main:2::mulFACbyMEM:23::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 ] main:2::divMEMbyFAC:19::prepareMEM:86 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 ] main:2::setMEMtoFAC:7::prepareMEM:98 [ prepareMEM::mem#4 ] main:2::setMEMtoFAC:15::prepareMEM:98 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 ] ) -- _deref_cowo1=aby + //SEG145 [74] *((const byte*) memLo#0) ← (byte~) prepareMEM::$0 [ prepareMEM::mem#5 ] ( main:2::addMEMtoFAC:25::prepareMEM:69 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] main:2::mulFACbyMEM:13::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] main:2::mulFACbyMEM:23::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] main:2::divMEMbyFAC:19::prepareMEM:86 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] main:2::setFAC:5::prepareMEM:92 [ prepareMEM::mem#5 ] main:2::setFAC:11::prepareMEM:92 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] main:2::setFAC:17::prepareMEM:92 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] main:2::setMEMtoFAC:7::prepareMEM:97 [ prepareMEM::mem#5 ] main:2::setMEMtoFAC:15::prepareMEM:97 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] ) -- _deref_cowo1=aby sta memLo - //SEG146 [75] (byte~) prepareMEM::$1 ← > (byte*) prepareMEM::mem#4 [ prepareMEM::$1 ] ( main:2::addMEMtoFAC:25::prepareMEM:69 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] main:2::mulFACbyMEM:13::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] main:2::mulFACbyMEM:23::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] main:2::divMEMbyFAC:19::prepareMEM:86 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] main:2::setMEMtoFAC:7::prepareMEM:98 [ prepareMEM::$1 ] main:2::setMEMtoFAC:15::prepareMEM:98 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] ) -- aby=_hi_zpptrby1 + //SEG146 [75] (byte~) prepareMEM::$1 ← > (byte*) prepareMEM::mem#5 [ prepareMEM::$1 ] ( main:2::addMEMtoFAC:25::prepareMEM:69 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] main:2::mulFACbyMEM:13::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] main:2::mulFACbyMEM:23::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] main:2::divMEMbyFAC:19::prepareMEM:86 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] main:2::setFAC:5::prepareMEM:92 [ prepareMEM::$1 ] main:2::setFAC:11::prepareMEM:92 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] main:2::setFAC:17::prepareMEM:92 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] main:2::setMEMtoFAC:7::prepareMEM:97 [ prepareMEM::$1 ] main:2::setMEMtoFAC:15::prepareMEM:97 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] ) -- aby=_hi_zpptrby1 lda mem+1 - //SEG147 [76] *((const byte*) memHi#0) ← (byte~) prepareMEM::$1 [ ] ( main:2::addMEMtoFAC:25::prepareMEM:69 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::mulFACbyMEM:13::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::mulFACbyMEM:23::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::divMEMbyFAC:19::prepareMEM:86 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::setMEMtoFAC:7::prepareMEM:98 [ ] main:2::setMEMtoFAC:15::prepareMEM:98 [ main::i#10 char_cursor#32 line_cursor#13 ] ) -- _deref_cowo1=aby + //SEG147 [76] *((const byte*) memHi#0) ← (byte~) prepareMEM::$1 [ ] ( main:2::addMEMtoFAC:25::prepareMEM:69 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::mulFACbyMEM:13::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::mulFACbyMEM:23::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::divMEMbyFAC:19::prepareMEM:86 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::setFAC:5::prepareMEM:92 [ ] main:2::setFAC:11::prepareMEM:92 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::setFAC:17::prepareMEM:92 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::setMEMtoFAC:7::prepareMEM:97 [ ] main:2::setMEMtoFAC:15::prepareMEM:97 [ main::i#10 char_cursor#32 line_cursor#13 ] ) -- _deref_cowo1=aby sta memHi //SEG148 prepareMEM::@return - //SEG149 [77] return [ ] ( main:2::addMEMtoFAC:25::prepareMEM:69 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::mulFACbyMEM:13::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::mulFACbyMEM:23::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::divMEMbyFAC:19::prepareMEM:86 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::setMEMtoFAC:7::prepareMEM:98 [ ] main:2::setMEMtoFAC:15::prepareMEM:98 [ main::i#10 char_cursor#32 line_cursor#13 ] ) + //SEG149 [77] return [ ] ( main:2::addMEMtoFAC:25::prepareMEM:69 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::mulFACbyMEM:13::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::mulFACbyMEM:23::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::divMEMbyFAC:19::prepareMEM:86 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::setFAC:5::prepareMEM:92 [ ] main:2::setFAC:11::prepareMEM:92 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::setFAC:17::prepareMEM:92 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::setMEMtoFAC:7::prepareMEM:97 [ ] main:2::setMEMtoFAC:15::prepareMEM:97 [ main::i#10 char_cursor#32 line_cursor#13 ] ) rts } //SEG150 mulFACbyMEM mulFACbyMEM: { .label mem = 7 - //SEG151 [79] (byte*) prepareMEM::mem#3 ← (byte*) mulFACbyMEM::mem#2 [ prepareMEM::mem#3 ] ( main:2::mulFACbyMEM:13 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#3 ] main:2::mulFACbyMEM:23 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#3 ] ) - // (byte*) prepareMEM::mem#3 = (byte*) mulFACbyMEM::mem#2 // register copy zp ZP_PTR_BYTE:7 + //SEG151 [79] (byte*) prepareMEM::mem#4 ← (byte*) mulFACbyMEM::mem#2 [ prepareMEM::mem#4 ] ( main:2::mulFACbyMEM:13 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 ] main:2::mulFACbyMEM:23 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 ] ) + // (byte*) prepareMEM::mem#4 = (byte*) mulFACbyMEM::mem#2 // register copy zp ZP_PTR_BYTE:7 //SEG152 [80] call prepareMEM param-assignment [ ] ( main:2::mulFACbyMEM:13 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::mulFACbyMEM:23 [ main::i#10 char_cursor#32 line_cursor#13 ] ) //SEG153 [72] phi from mulFACbyMEM to prepareMEM [phi:mulFACbyMEM->prepareMEM] - //SEG154 [72] phi (byte*) prepareMEM::mem#4 = (byte*) prepareMEM::mem#3 [phi:mulFACbyMEM->prepareMEM#0] -- register_copy + //SEG154 [72] phi (byte*) prepareMEM::mem#5 = (byte*) prepareMEM::mem#4 [phi:mulFACbyMEM->prepareMEM#0] -- register_copy jsr prepareMEM //SEG155 mulFACbyMEM::@1 //SEG156 asm { lda$feldy$ffjsr$ba28 } @@ -8623,7 +8573,7 @@ sinFAC: { divMEMbyFAC: { //SEG164 [86] call prepareMEM param-assignment [ ] ( main:2::divMEMbyFAC:19 [ main::i#10 char_cursor#32 line_cursor#13 ] ) //SEG165 [72] phi from divMEMbyFAC to prepareMEM [phi:divMEMbyFAC->prepareMEM] - //SEG166 [72] phi (byte*) prepareMEM::mem#4 = (const byte[]) f_i#0 [phi:divMEMbyFAC->prepareMEM#0] -- zpptrby1=cowo1 + //SEG166 [72] phi (byte*) prepareMEM::mem#5 = (const byte[]) f_i#0 [phi:divMEMbyFAC->prepareMEM#0] -- zpptrby1=cowo1 lda #f_i @@ -8640,41 +8590,44 @@ divMEMbyFAC: { } //SEG171 setFAC setFAC: { - .const lo = $fe - .const hi = $ff + .label _0 = 7 .label w = 9 - //SEG172 [90] (byte~) setFAC::$0 ← < (word) setFAC::w#3 [ setFAC::w#3 setFAC::$0 ] ( main:2::setFAC:5 [ setFAC::w#3 setFAC::$0 ] main:2::setFAC:11 [ main::i#10 char_cursor#32 line_cursor#13 setFAC::w#3 setFAC::$0 ] main:2::setFAC:17 [ main::i#10 char_cursor#32 line_cursor#13 setFAC::w#3 setFAC::$0 ] ) -- aby=_lo_zpwo1 + //SEG172 [90] (byte*~) setFAC::$0 ← ((byte*)) (word) setFAC::w#3 [ setFAC::$0 ] ( main:2::setFAC:5 [ setFAC::$0 ] main:2::setFAC:11 [ main::i#10 char_cursor#32 line_cursor#13 setFAC::$0 ] main:2::setFAC:17 [ main::i#10 char_cursor#32 line_cursor#13 setFAC::$0 ] ) -- zpptrby1=_ptrby_zpwo1 lda w - //SEG173 [91] *((const byte*) setFAC::lo#0) ← (byte~) setFAC::$0 [ setFAC::w#3 ] ( main:2::setFAC:5 [ setFAC::w#3 ] main:2::setFAC:11 [ main::i#10 char_cursor#32 line_cursor#13 setFAC::w#3 ] main:2::setFAC:17 [ main::i#10 char_cursor#32 line_cursor#13 setFAC::w#3 ] ) -- _deref_cowo1=aby - sta lo - //SEG174 [92] (byte~) setFAC::$1 ← > (word) setFAC::w#3 [ setFAC::$1 ] ( main:2::setFAC:5 [ setFAC::$1 ] main:2::setFAC:11 [ main::i#10 char_cursor#32 line_cursor#13 setFAC::$1 ] main:2::setFAC:17 [ main::i#10 char_cursor#32 line_cursor#13 setFAC::$1 ] ) -- aby=_hi_zpwo1 + sta _0 lda w+1 - //SEG175 [93] *((const byte*) setFAC::hi#0) ← (byte~) setFAC::$1 [ ] ( main:2::setFAC:5 [ ] main:2::setFAC:11 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::setFAC:17 [ main::i#10 char_cursor#32 line_cursor#13 ] ) -- _deref_cowo1=aby - sta hi - //SEG176 asm { ldy$felda$ffjsr$b391 } + sta _0+1 + //SEG173 [91] (byte*) prepareMEM::mem#0 ← (byte*~) setFAC::$0 [ prepareMEM::mem#0 ] ( main:2::setFAC:5 [ prepareMEM::mem#0 ] main:2::setFAC:11 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#0 ] main:2::setFAC:17 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#0 ] ) + // (byte*) prepareMEM::mem#0 = (byte*~) setFAC::$0 // register copy zp ZP_PTR_BYTE:7 + //SEG174 [92] call prepareMEM param-assignment [ ] ( main:2::setFAC:5 [ ] main:2::setFAC:11 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::setFAC:17 [ main::i#10 char_cursor#32 line_cursor#13 ] ) + //SEG175 [72] phi from setFAC to prepareMEM [phi:setFAC->prepareMEM] + //SEG176 [72] phi (byte*) prepareMEM::mem#5 = (byte*) prepareMEM::mem#0 [phi:setFAC->prepareMEM#0] -- register_copy + jsr prepareMEM + //SEG177 setFAC::@1 + //SEG178 asm { ldy$felda$ffjsr$b391 } ldy $fe lda $ff jsr $b391 - //SEG177 setFAC::@return - //SEG178 [95] return [ ] ( main:2::setFAC:5 [ ] main:2::setFAC:11 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::setFAC:17 [ main::i#10 char_cursor#32 line_cursor#13 ] ) + //SEG179 setFAC::@return + //SEG180 [94] return [ ] ( main:2::setFAC:5 [ ] main:2::setFAC:11 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::setFAC:17 [ main::i#10 char_cursor#32 line_cursor#13 ] ) rts } -//SEG179 setMEMtoFAC +//SEG181 setMEMtoFAC setMEMtoFAC: { .label mem = 7 - //SEG180 [97] (byte*) prepareMEM::mem#0 ← (byte*) setMEMtoFAC::mem#2 [ prepareMEM::mem#0 ] ( main:2::setMEMtoFAC:7 [ prepareMEM::mem#0 ] main:2::setMEMtoFAC:15 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#0 ] ) - // (byte*) prepareMEM::mem#0 = (byte*) setMEMtoFAC::mem#2 // register copy zp ZP_PTR_BYTE:7 - //SEG181 [98] call prepareMEM param-assignment [ ] ( main:2::setMEMtoFAC:7 [ ] main:2::setMEMtoFAC:15 [ main::i#10 char_cursor#32 line_cursor#13 ] ) - //SEG182 [72] phi from setMEMtoFAC to prepareMEM [phi:setMEMtoFAC->prepareMEM] - //SEG183 [72] phi (byte*) prepareMEM::mem#4 = (byte*) prepareMEM::mem#0 [phi:setMEMtoFAC->prepareMEM#0] -- register_copy + //SEG182 [96] (byte*) prepareMEM::mem#1 ← (byte*) setMEMtoFAC::mem#2 [ prepareMEM::mem#1 ] ( main:2::setMEMtoFAC:7 [ prepareMEM::mem#1 ] main:2::setMEMtoFAC:15 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#1 ] ) + // (byte*) prepareMEM::mem#1 = (byte*) setMEMtoFAC::mem#2 // register copy zp ZP_PTR_BYTE:7 + //SEG183 [97] call prepareMEM param-assignment [ ] ( main:2::setMEMtoFAC:7 [ ] main:2::setMEMtoFAC:15 [ main::i#10 char_cursor#32 line_cursor#13 ] ) + //SEG184 [72] phi from setMEMtoFAC to prepareMEM [phi:setMEMtoFAC->prepareMEM] + //SEG185 [72] phi (byte*) prepareMEM::mem#5 = (byte*) prepareMEM::mem#1 [phi:setMEMtoFAC->prepareMEM#0] -- register_copy jsr prepareMEM - //SEG184 setMEMtoFAC::@1 - //SEG185 asm { ldx$feldy$ffjsr$bbd4 } + //SEG186 setMEMtoFAC::@1 + //SEG187 asm { ldx$feldy$ffjsr$bbd4 } ldx $fe ldy $ff jsr $bbd4 - //SEG186 setMEMtoFAC::@return - //SEG187 [100] return [ ] ( main:2::setMEMtoFAC:7 [ ] main:2::setMEMtoFAC:15 [ main::i#10 char_cursor#32 line_cursor#13 ] ) + //SEG188 setMEMtoFAC::@return + //SEG189 [99] return [ ] ( main:2::setMEMtoFAC:7 [ ] main:2::setMEMtoFAC:15 [ main::i#10 char_cursor#32 line_cursor#13 ] ) rts } @@ -8704,10 +8657,6 @@ FINAL SYMBOL TABLE (const byte[]) f_i#0 f_i = { (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0 } (word()) getFAC() (label) getFAC::@return -(byte*) getFAC::hi -(const byte*) getFAC::hi#0 hi = ((byte*))(byte/word/signed word) 255 -(byte*) getFAC::lo -(const byte*) getFAC::lo#0 lo = ((byte*))(byte/word/signed word) 254 (word) getFAC::return (word) getFAC::return#0 return zp ZP_WORD:9 4.333333333333333 (word) getFAC::return#2 return zp ZP_WORD:9 22.0 @@ -8754,8 +8703,9 @@ FINAL SYMBOL TABLE (label) prepareMEM::@return (byte*) prepareMEM::mem (byte*) prepareMEM::mem#0 mem zp ZP_PTR_BYTE:7 4.0 -(byte*) prepareMEM::mem#3 mem zp ZP_PTR_BYTE:7 4.0 -(byte*) prepareMEM::mem#4 mem zp ZP_PTR_BYTE:7 2.6666666666666665 +(byte*) prepareMEM::mem#1 mem zp ZP_PTR_BYTE:7 4.0 +(byte*) prepareMEM::mem#4 mem zp ZP_PTR_BYTE:7 4.0 +(byte*) prepareMEM::mem#5 mem zp ZP_PTR_BYTE:7 3.333333333333333 (void()) print_byte((byte) print_byte::b) (byte~) print_byte::$0 reg byte y 4.0 (byte~) print_byte::$1 reg byte a 4.0 @@ -8785,16 +8735,12 @@ FINAL SYMBOL TABLE (word) print_word::w (word) print_word::w#0 w zp ZP_WORD:9 3.75 (void()) setFAC((word) setFAC::w) -(byte~) setFAC::$0 reg byte a 4.0 -(byte~) setFAC::$1 reg byte a 4.0 +(byte*~) setFAC::$0 $0 zp ZP_PTR_BYTE:7 4.0 +(label) setFAC::@1 (label) setFAC::@return -(byte*) setFAC::hi -(const byte*) setFAC::hi#0 hi = ((byte*))(byte/word/signed word) 255 -(byte*) setFAC::lo -(const byte*) setFAC::lo#0 lo = ((byte*))(byte/word/signed word) 254 (word) setFAC::w (word) setFAC::w#1 w zp ZP_WORD:9 22.0 -(word) setFAC::w#3 w zp ZP_WORD:9 5.0 +(word) setFAC::w#3 w zp ZP_WORD:9 13.0 (void()) setMEMtoFAC((byte*) setMEMtoFAC::mem) (label) setMEMtoFAC::@1 (label) setMEMtoFAC::@return @@ -8808,7 +8754,7 @@ zp ZP_PTR_BYTE:3 [ line_cursor#6 line_cursor#13 print_ln::$0 ] reg byte x [ print_byte::b#2 print_byte::b#0 print_byte::b#1 ] reg byte a [ print_char::ch#2 print_char::ch#0 print_char::ch#1 ] zp ZP_PTR_BYTE:5 [ char_cursor#23 char_cursor#31 char_cursor#32 char_cursor#49 char_cursor#10 ] -zp ZP_PTR_BYTE:7 [ prepareMEM::mem#4 prepareMEM::mem#3 prepareMEM::mem#0 mulFACbyMEM::mem#2 setMEMtoFAC::mem#2 ] +zp ZP_PTR_BYTE:7 [ prepareMEM::mem#5 prepareMEM::mem#4 prepareMEM::mem#0 prepareMEM::mem#1 mulFACbyMEM::mem#2 setMEMtoFAC::mem#2 setFAC::$0 ] zp ZP_WORD:9 [ setFAC::w#3 setFAC::w#1 main::$2 getFAC::return#2 main::$11 print_word::w#0 getFAC::w#1 getFAC::return#0 ] reg byte a [ print_word::$0 ] reg byte a [ print_word::$2 ] @@ -8818,8 +8764,6 @@ reg byte a [ print_byte::$3 ] reg byte a [ print_byte::$4 ] reg byte a [ prepareMEM::$0 ] reg byte a [ prepareMEM::$1 ] -reg byte a [ setFAC::$0 ] -reg byte a [ setFAC::$1 ] FINAL CODE //SEG0 Basic Upstart @@ -8859,8 +8803,8 @@ main: { //SEG13 [6] phi from main to main::@3 [phi:main->main::@3] //SEG14 main::@3 //SEG15 [7] call setMEMtoFAC param-assignment [ ] ( main:2 [ ] ) - //SEG16 [96] phi from main::@3 to setMEMtoFAC [phi:main::@3->setMEMtoFAC] - //SEG17 [96] phi (byte*) setMEMtoFAC::mem#2 = (const byte[]) f_127#0 [phi:main::@3->setMEMtoFAC#0] -- zpptrby1=cowo1 + //SEG16 [95] phi from main::@3 to setMEMtoFAC [phi:main::@3->setMEMtoFAC] + //SEG17 [95] phi (byte*) setMEMtoFAC::mem#2 = (const byte[]) f_127#0 [phi:main::@3->setMEMtoFAC#0] -- zpptrby1=cowo1 lda #f_127 @@ -8906,8 +8850,8 @@ main: { //SEG33 [14] phi from main::@5 to main::@6 [phi:main::@5->main::@6] //SEG34 main::@6 //SEG35 [15] call setMEMtoFAC param-assignment [ main::i#10 char_cursor#32 line_cursor#13 ] ( main:2 [ main::i#10 char_cursor#32 line_cursor#13 ] ) - //SEG36 [96] phi from main::@6 to setMEMtoFAC [phi:main::@6->setMEMtoFAC] - //SEG37 [96] phi (byte*) setMEMtoFAC::mem#2 = (const byte[]) f_i#0 [phi:main::@6->setMEMtoFAC#0] -- zpptrby1=cowo1 + //SEG36 [95] phi from main::@6 to setMEMtoFAC [phi:main::@6->setMEMtoFAC] + //SEG37 [95] phi (byte*) setMEMtoFAC::mem#2 = (const byte[]) f_i#0 [phi:main::@6->setMEMtoFAC#0] -- zpptrby1=cowo1 lda #f_i @@ -9094,21 +9038,19 @@ print_char: { } //SEG129 getFAC getFAC: { - .const lo = $fe - .const hi = $ff .label w = 9 .label return = 9 //SEG130 asm { jsr$b1aasty$festa$ff } jsr $b1aa sty $fe sta $ff - //SEG131 [65] (word) getFAC::w#1 ← (byte/signed byte/word/signed word) 0 lo= *((const byte*) getFAC::lo#0) [ getFAC::w#1 ] ( main:2::getFAC:27 [ main::i#10 char_cursor#32 line_cursor#13 getFAC::w#1 ] ) -- zpwo1=coby1_setlo__deref_cowo2 - lda lo + //SEG131 [65] (word) getFAC::w#1 ← (byte/signed byte/word/signed word) 0 lo= *((const byte*) memLo#0) [ getFAC::w#1 ] ( main:2::getFAC:27 [ main::i#10 char_cursor#32 line_cursor#13 getFAC::w#1 ] ) -- zpwo1=coby1_setlo__deref_cowo2 + lda memLo sta w lda #0 sta w+1 - //SEG132 [66] (word) getFAC::return#0 ← (word) getFAC::w#1 hi= *((const byte*) getFAC::hi#0) [ getFAC::return#0 ] ( main:2::getFAC:27 [ main::i#10 char_cursor#32 line_cursor#13 getFAC::return#0 ] ) -- zpwo1=zpwo1_sethi__deref_cowo1 - lda hi + //SEG132 [66] (word) getFAC::return#0 ← (word) getFAC::w#1 hi= *((const byte*) memHi#0) [ getFAC::return#0 ] ( main:2::getFAC:27 [ main::i#10 char_cursor#32 line_cursor#13 getFAC::return#0 ] ) -- zpwo1=zpwo1_sethi__deref_cowo1 + lda memHi sta return+1 //SEG133 getFAC::@return //SEG134 [67] return [ getFAC::return#0 ] ( main:2::getFAC:27 [ main::i#10 char_cursor#32 line_cursor#13 getFAC::return#0 ] ) @@ -9118,7 +9060,7 @@ getFAC: { addMEMtoFAC: { //SEG136 [69] call prepareMEM param-assignment [ ] ( main:2::addMEMtoFAC:25 [ main::i#10 char_cursor#32 line_cursor#13 ] ) //SEG137 [72] phi from addMEMtoFAC to prepareMEM [phi:addMEMtoFAC->prepareMEM] - //SEG138 [72] phi (byte*) prepareMEM::mem#4 = (const byte[]) f_127#0 [phi:addMEMtoFAC->prepareMEM#0] -- zpptrby1=cowo1 + //SEG138 [72] phi (byte*) prepareMEM::mem#5 = (const byte[]) f_127#0 [phi:addMEMtoFAC->prepareMEM#0] -- zpptrby1=cowo1 lda #f_127 @@ -9136,26 +9078,26 @@ addMEMtoFAC: { //SEG143 prepareMEM prepareMEM: { .label mem = 7 - //SEG144 [73] (byte~) prepareMEM::$0 ← < (byte*) prepareMEM::mem#4 [ prepareMEM::mem#4 prepareMEM::$0 ] ( main:2::addMEMtoFAC:25::prepareMEM:69 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 prepareMEM::$0 ] main:2::mulFACbyMEM:13::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 prepareMEM::$0 ] main:2::mulFACbyMEM:23::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 prepareMEM::$0 ] main:2::divMEMbyFAC:19::prepareMEM:86 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 prepareMEM::$0 ] main:2::setMEMtoFAC:7::prepareMEM:98 [ prepareMEM::mem#4 prepareMEM::$0 ] main:2::setMEMtoFAC:15::prepareMEM:98 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 prepareMEM::$0 ] ) -- aby=_lo_zpptrby1 + //SEG144 [73] (byte~) prepareMEM::$0 ← < (byte*) prepareMEM::mem#5 [ prepareMEM::mem#5 prepareMEM::$0 ] ( main:2::addMEMtoFAC:25::prepareMEM:69 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 prepareMEM::$0 ] main:2::mulFACbyMEM:13::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 prepareMEM::$0 ] main:2::mulFACbyMEM:23::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 prepareMEM::$0 ] main:2::divMEMbyFAC:19::prepareMEM:86 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 prepareMEM::$0 ] main:2::setFAC:5::prepareMEM:92 [ prepareMEM::mem#5 prepareMEM::$0 ] main:2::setFAC:11::prepareMEM:92 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 prepareMEM::$0 ] main:2::setFAC:17::prepareMEM:92 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 prepareMEM::$0 ] main:2::setMEMtoFAC:7::prepareMEM:97 [ prepareMEM::mem#5 prepareMEM::$0 ] main:2::setMEMtoFAC:15::prepareMEM:97 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 prepareMEM::$0 ] ) -- aby=_lo_zpptrby1 lda mem - //SEG145 [74] *((const byte*) memLo#0) ← (byte~) prepareMEM::$0 [ prepareMEM::mem#4 ] ( main:2::addMEMtoFAC:25::prepareMEM:69 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 ] main:2::mulFACbyMEM:13::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 ] main:2::mulFACbyMEM:23::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 ] main:2::divMEMbyFAC:19::prepareMEM:86 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 ] main:2::setMEMtoFAC:7::prepareMEM:98 [ prepareMEM::mem#4 ] main:2::setMEMtoFAC:15::prepareMEM:98 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 ] ) -- _deref_cowo1=aby + //SEG145 [74] *((const byte*) memLo#0) ← (byte~) prepareMEM::$0 [ prepareMEM::mem#5 ] ( main:2::addMEMtoFAC:25::prepareMEM:69 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] main:2::mulFACbyMEM:13::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] main:2::mulFACbyMEM:23::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] main:2::divMEMbyFAC:19::prepareMEM:86 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] main:2::setFAC:5::prepareMEM:92 [ prepareMEM::mem#5 ] main:2::setFAC:11::prepareMEM:92 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] main:2::setFAC:17::prepareMEM:92 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] main:2::setMEMtoFAC:7::prepareMEM:97 [ prepareMEM::mem#5 ] main:2::setMEMtoFAC:15::prepareMEM:97 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] ) -- _deref_cowo1=aby sta memLo - //SEG146 [75] (byte~) prepareMEM::$1 ← > (byte*) prepareMEM::mem#4 [ prepareMEM::$1 ] ( main:2::addMEMtoFAC:25::prepareMEM:69 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] main:2::mulFACbyMEM:13::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] main:2::mulFACbyMEM:23::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] main:2::divMEMbyFAC:19::prepareMEM:86 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] main:2::setMEMtoFAC:7::prepareMEM:98 [ prepareMEM::$1 ] main:2::setMEMtoFAC:15::prepareMEM:98 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] ) -- aby=_hi_zpptrby1 + //SEG146 [75] (byte~) prepareMEM::$1 ← > (byte*) prepareMEM::mem#5 [ prepareMEM::$1 ] ( main:2::addMEMtoFAC:25::prepareMEM:69 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] main:2::mulFACbyMEM:13::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] main:2::mulFACbyMEM:23::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] main:2::divMEMbyFAC:19::prepareMEM:86 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] main:2::setFAC:5::prepareMEM:92 [ prepareMEM::$1 ] main:2::setFAC:11::prepareMEM:92 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] main:2::setFAC:17::prepareMEM:92 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] main:2::setMEMtoFAC:7::prepareMEM:97 [ prepareMEM::$1 ] main:2::setMEMtoFAC:15::prepareMEM:97 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] ) -- aby=_hi_zpptrby1 lda mem+1 - //SEG147 [76] *((const byte*) memHi#0) ← (byte~) prepareMEM::$1 [ ] ( main:2::addMEMtoFAC:25::prepareMEM:69 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::mulFACbyMEM:13::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::mulFACbyMEM:23::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::divMEMbyFAC:19::prepareMEM:86 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::setMEMtoFAC:7::prepareMEM:98 [ ] main:2::setMEMtoFAC:15::prepareMEM:98 [ main::i#10 char_cursor#32 line_cursor#13 ] ) -- _deref_cowo1=aby + //SEG147 [76] *((const byte*) memHi#0) ← (byte~) prepareMEM::$1 [ ] ( main:2::addMEMtoFAC:25::prepareMEM:69 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::mulFACbyMEM:13::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::mulFACbyMEM:23::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::divMEMbyFAC:19::prepareMEM:86 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::setFAC:5::prepareMEM:92 [ ] main:2::setFAC:11::prepareMEM:92 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::setFAC:17::prepareMEM:92 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::setMEMtoFAC:7::prepareMEM:97 [ ] main:2::setMEMtoFAC:15::prepareMEM:97 [ main::i#10 char_cursor#32 line_cursor#13 ] ) -- _deref_cowo1=aby sta memHi //SEG148 prepareMEM::@return - //SEG149 [77] return [ ] ( main:2::addMEMtoFAC:25::prepareMEM:69 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::mulFACbyMEM:13::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::mulFACbyMEM:23::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::divMEMbyFAC:19::prepareMEM:86 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::setMEMtoFAC:7::prepareMEM:98 [ ] main:2::setMEMtoFAC:15::prepareMEM:98 [ main::i#10 char_cursor#32 line_cursor#13 ] ) + //SEG149 [77] return [ ] ( main:2::addMEMtoFAC:25::prepareMEM:69 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::mulFACbyMEM:13::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::mulFACbyMEM:23::prepareMEM:80 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::divMEMbyFAC:19::prepareMEM:86 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::setFAC:5::prepareMEM:92 [ ] main:2::setFAC:11::prepareMEM:92 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::setFAC:17::prepareMEM:92 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::setMEMtoFAC:7::prepareMEM:97 [ ] main:2::setMEMtoFAC:15::prepareMEM:97 [ main::i#10 char_cursor#32 line_cursor#13 ] ) rts } //SEG150 mulFACbyMEM mulFACbyMEM: { .label mem = 7 - //SEG151 [79] (byte*) prepareMEM::mem#3 ← (byte*) mulFACbyMEM::mem#2 [ prepareMEM::mem#3 ] ( main:2::mulFACbyMEM:13 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#3 ] main:2::mulFACbyMEM:23 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#3 ] ) - // (byte*) prepareMEM::mem#3 = (byte*) mulFACbyMEM::mem#2 // register copy zp ZP_PTR_BYTE:7 + //SEG151 [79] (byte*) prepareMEM::mem#4 ← (byte*) mulFACbyMEM::mem#2 [ prepareMEM::mem#4 ] ( main:2::mulFACbyMEM:13 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 ] main:2::mulFACbyMEM:23 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 ] ) + // (byte*) prepareMEM::mem#4 = (byte*) mulFACbyMEM::mem#2 // register copy zp ZP_PTR_BYTE:7 //SEG152 [80] call prepareMEM param-assignment [ ] ( main:2::mulFACbyMEM:13 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::mulFACbyMEM:23 [ main::i#10 char_cursor#32 line_cursor#13 ] ) //SEG153 [72] phi from mulFACbyMEM to prepareMEM [phi:mulFACbyMEM->prepareMEM] - //SEG154 [72] phi (byte*) prepareMEM::mem#4 = (byte*) prepareMEM::mem#3 [phi:mulFACbyMEM->prepareMEM#0] -- register_copy + //SEG154 [72] phi (byte*) prepareMEM::mem#5 = (byte*) prepareMEM::mem#4 [phi:mulFACbyMEM->prepareMEM#0] -- register_copy jsr prepareMEM //SEG155 mulFACbyMEM::@1 //SEG156 asm { lda$feldy$ffjsr$ba28 } @@ -9178,7 +9120,7 @@ sinFAC: { divMEMbyFAC: { //SEG164 [86] call prepareMEM param-assignment [ ] ( main:2::divMEMbyFAC:19 [ main::i#10 char_cursor#32 line_cursor#13 ] ) //SEG165 [72] phi from divMEMbyFAC to prepareMEM [phi:divMEMbyFAC->prepareMEM] - //SEG166 [72] phi (byte*) prepareMEM::mem#4 = (const byte[]) f_i#0 [phi:divMEMbyFAC->prepareMEM#0] -- zpptrby1=cowo1 + //SEG166 [72] phi (byte*) prepareMEM::mem#5 = (const byte[]) f_i#0 [phi:divMEMbyFAC->prepareMEM#0] -- zpptrby1=cowo1 lda #f_i @@ -9195,41 +9137,44 @@ divMEMbyFAC: { } //SEG171 setFAC setFAC: { - .const lo = $fe - .const hi = $ff + .label _0 = 7 .label w = 9 - //SEG172 [90] (byte~) setFAC::$0 ← < (word) setFAC::w#3 [ setFAC::w#3 setFAC::$0 ] ( main:2::setFAC:5 [ setFAC::w#3 setFAC::$0 ] main:2::setFAC:11 [ main::i#10 char_cursor#32 line_cursor#13 setFAC::w#3 setFAC::$0 ] main:2::setFAC:17 [ main::i#10 char_cursor#32 line_cursor#13 setFAC::w#3 setFAC::$0 ] ) -- aby=_lo_zpwo1 + //SEG172 [90] (byte*~) setFAC::$0 ← ((byte*)) (word) setFAC::w#3 [ setFAC::$0 ] ( main:2::setFAC:5 [ setFAC::$0 ] main:2::setFAC:11 [ main::i#10 char_cursor#32 line_cursor#13 setFAC::$0 ] main:2::setFAC:17 [ main::i#10 char_cursor#32 line_cursor#13 setFAC::$0 ] ) -- zpptrby1=_ptrby_zpwo1 lda w - //SEG173 [91] *((const byte*) setFAC::lo#0) ← (byte~) setFAC::$0 [ setFAC::w#3 ] ( main:2::setFAC:5 [ setFAC::w#3 ] main:2::setFAC:11 [ main::i#10 char_cursor#32 line_cursor#13 setFAC::w#3 ] main:2::setFAC:17 [ main::i#10 char_cursor#32 line_cursor#13 setFAC::w#3 ] ) -- _deref_cowo1=aby - sta lo - //SEG174 [92] (byte~) setFAC::$1 ← > (word) setFAC::w#3 [ setFAC::$1 ] ( main:2::setFAC:5 [ setFAC::$1 ] main:2::setFAC:11 [ main::i#10 char_cursor#32 line_cursor#13 setFAC::$1 ] main:2::setFAC:17 [ main::i#10 char_cursor#32 line_cursor#13 setFAC::$1 ] ) -- aby=_hi_zpwo1 + sta _0 lda w+1 - //SEG175 [93] *((const byte*) setFAC::hi#0) ← (byte~) setFAC::$1 [ ] ( main:2::setFAC:5 [ ] main:2::setFAC:11 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::setFAC:17 [ main::i#10 char_cursor#32 line_cursor#13 ] ) -- _deref_cowo1=aby - sta hi - //SEG176 asm { ldy$felda$ffjsr$b391 } + sta _0+1 + //SEG173 [91] (byte*) prepareMEM::mem#0 ← (byte*~) setFAC::$0 [ prepareMEM::mem#0 ] ( main:2::setFAC:5 [ prepareMEM::mem#0 ] main:2::setFAC:11 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#0 ] main:2::setFAC:17 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#0 ] ) + // (byte*) prepareMEM::mem#0 = (byte*~) setFAC::$0 // register copy zp ZP_PTR_BYTE:7 + //SEG174 [92] call prepareMEM param-assignment [ ] ( main:2::setFAC:5 [ ] main:2::setFAC:11 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::setFAC:17 [ main::i#10 char_cursor#32 line_cursor#13 ] ) + //SEG175 [72] phi from setFAC to prepareMEM [phi:setFAC->prepareMEM] + //SEG176 [72] phi (byte*) prepareMEM::mem#5 = (byte*) prepareMEM::mem#0 [phi:setFAC->prepareMEM#0] -- register_copy + jsr prepareMEM + //SEG177 setFAC::@1 + //SEG178 asm { ldy$felda$ffjsr$b391 } ldy $fe lda $ff jsr $b391 - //SEG177 setFAC::@return - //SEG178 [95] return [ ] ( main:2::setFAC:5 [ ] main:2::setFAC:11 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::setFAC:17 [ main::i#10 char_cursor#32 line_cursor#13 ] ) + //SEG179 setFAC::@return + //SEG180 [94] return [ ] ( main:2::setFAC:5 [ ] main:2::setFAC:11 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::setFAC:17 [ main::i#10 char_cursor#32 line_cursor#13 ] ) rts } -//SEG179 setMEMtoFAC +//SEG181 setMEMtoFAC setMEMtoFAC: { .label mem = 7 - //SEG180 [97] (byte*) prepareMEM::mem#0 ← (byte*) setMEMtoFAC::mem#2 [ prepareMEM::mem#0 ] ( main:2::setMEMtoFAC:7 [ prepareMEM::mem#0 ] main:2::setMEMtoFAC:15 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#0 ] ) - // (byte*) prepareMEM::mem#0 = (byte*) setMEMtoFAC::mem#2 // register copy zp ZP_PTR_BYTE:7 - //SEG181 [98] call prepareMEM param-assignment [ ] ( main:2::setMEMtoFAC:7 [ ] main:2::setMEMtoFAC:15 [ main::i#10 char_cursor#32 line_cursor#13 ] ) - //SEG182 [72] phi from setMEMtoFAC to prepareMEM [phi:setMEMtoFAC->prepareMEM] - //SEG183 [72] phi (byte*) prepareMEM::mem#4 = (byte*) prepareMEM::mem#0 [phi:setMEMtoFAC->prepareMEM#0] -- register_copy + //SEG182 [96] (byte*) prepareMEM::mem#1 ← (byte*) setMEMtoFAC::mem#2 [ prepareMEM::mem#1 ] ( main:2::setMEMtoFAC:7 [ prepareMEM::mem#1 ] main:2::setMEMtoFAC:15 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#1 ] ) + // (byte*) prepareMEM::mem#1 = (byte*) setMEMtoFAC::mem#2 // register copy zp ZP_PTR_BYTE:7 + //SEG183 [97] call prepareMEM param-assignment [ ] ( main:2::setMEMtoFAC:7 [ ] main:2::setMEMtoFAC:15 [ main::i#10 char_cursor#32 line_cursor#13 ] ) + //SEG184 [72] phi from setMEMtoFAC to prepareMEM [phi:setMEMtoFAC->prepareMEM] + //SEG185 [72] phi (byte*) prepareMEM::mem#5 = (byte*) prepareMEM::mem#1 [phi:setMEMtoFAC->prepareMEM#0] -- register_copy jsr prepareMEM - //SEG184 setMEMtoFAC::@1 - //SEG185 asm { ldx$feldy$ffjsr$bbd4 } + //SEG186 setMEMtoFAC::@1 + //SEG187 asm { ldx$feldy$ffjsr$bbd4 } ldx $fe ldy $ff jsr $bbd4 - //SEG186 setMEMtoFAC::@return - //SEG187 [100] return [ ] ( main:2::setMEMtoFAC:7 [ ] main:2::setMEMtoFAC:15 [ main::i#10 char_cursor#32 line_cursor#13 ] ) + //SEG188 setMEMtoFAC::@return + //SEG189 [99] return [ ] ( main:2::setMEMtoFAC:7 [ ] main:2::setMEMtoFAC:15 [ main::i#10 char_cursor#32 line_cursor#13 ] ) rts } diff --git a/src/main/java/dk/camelot64/kickc/test/ref/sinus-basic.sym b/src/main/java/dk/camelot64/kickc/test/ref/sinus-basic.sym index f7fe3ebb1..460d7429d 100644 --- a/src/main/java/dk/camelot64/kickc/test/ref/sinus-basic.sym +++ b/src/main/java/dk/camelot64/kickc/test/ref/sinus-basic.sym @@ -23,10 +23,6 @@ (const byte[]) f_i#0 f_i = { (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0 } (word()) getFAC() (label) getFAC::@return -(byte*) getFAC::hi -(const byte*) getFAC::hi#0 hi = ((byte*))(byte/word/signed word) 255 -(byte*) getFAC::lo -(const byte*) getFAC::lo#0 lo = ((byte*))(byte/word/signed word) 254 (word) getFAC::return (word) getFAC::return#0 return zp ZP_WORD:9 4.333333333333333 (word) getFAC::return#2 return zp ZP_WORD:9 22.0 @@ -73,8 +69,9 @@ (label) prepareMEM::@return (byte*) prepareMEM::mem (byte*) prepareMEM::mem#0 mem zp ZP_PTR_BYTE:7 4.0 -(byte*) prepareMEM::mem#3 mem zp ZP_PTR_BYTE:7 4.0 -(byte*) prepareMEM::mem#4 mem zp ZP_PTR_BYTE:7 2.6666666666666665 +(byte*) prepareMEM::mem#1 mem zp ZP_PTR_BYTE:7 4.0 +(byte*) prepareMEM::mem#4 mem zp ZP_PTR_BYTE:7 4.0 +(byte*) prepareMEM::mem#5 mem zp ZP_PTR_BYTE:7 3.333333333333333 (void()) print_byte((byte) print_byte::b) (byte~) print_byte::$0 reg byte y 4.0 (byte~) print_byte::$1 reg byte a 4.0 @@ -104,16 +101,12 @@ (word) print_word::w (word) print_word::w#0 w zp ZP_WORD:9 3.75 (void()) setFAC((word) setFAC::w) -(byte~) setFAC::$0 reg byte a 4.0 -(byte~) setFAC::$1 reg byte a 4.0 +(byte*~) setFAC::$0 $0 zp ZP_PTR_BYTE:7 4.0 +(label) setFAC::@1 (label) setFAC::@return -(byte*) setFAC::hi -(const byte*) setFAC::hi#0 hi = ((byte*))(byte/word/signed word) 255 -(byte*) setFAC::lo -(const byte*) setFAC::lo#0 lo = ((byte*))(byte/word/signed word) 254 (word) setFAC::w (word) setFAC::w#1 w zp ZP_WORD:9 22.0 -(word) setFAC::w#3 w zp ZP_WORD:9 5.0 +(word) setFAC::w#3 w zp ZP_WORD:9 13.0 (void()) setMEMtoFAC((byte*) setMEMtoFAC::mem) (label) setMEMtoFAC::@1 (label) setMEMtoFAC::@return @@ -127,7 +120,7 @@ zp ZP_PTR_BYTE:3 [ line_cursor#6 line_cursor#13 print_ln::$0 ] reg byte x [ print_byte::b#2 print_byte::b#0 print_byte::b#1 ] reg byte a [ print_char::ch#2 print_char::ch#0 print_char::ch#1 ] zp ZP_PTR_BYTE:5 [ char_cursor#23 char_cursor#31 char_cursor#32 char_cursor#49 char_cursor#10 ] -zp ZP_PTR_BYTE:7 [ prepareMEM::mem#4 prepareMEM::mem#3 prepareMEM::mem#0 mulFACbyMEM::mem#2 setMEMtoFAC::mem#2 ] +zp ZP_PTR_BYTE:7 [ prepareMEM::mem#5 prepareMEM::mem#4 prepareMEM::mem#0 prepareMEM::mem#1 mulFACbyMEM::mem#2 setMEMtoFAC::mem#2 setFAC::$0 ] zp ZP_WORD:9 [ setFAC::w#3 setFAC::w#1 main::$2 getFAC::return#2 main::$11 print_word::w#0 getFAC::w#1 getFAC::return#0 ] reg byte a [ print_word::$0 ] reg byte a [ print_word::$2 ] @@ -137,5 +130,3 @@ reg byte a [ print_byte::$3 ] reg byte a [ print_byte::$4 ] reg byte a [ prepareMEM::$0 ] reg byte a [ prepareMEM::$1 ] -reg byte a [ setFAC::$0 ] -reg byte a [ setFAC::$1 ]