1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2024-12-24 04:31:02 +00:00

Minor refactoring improving sine example.

This commit is contained in:
jespergravgaard 2017-12-03 23:17:13 +01:00
parent c769aabc0a
commit 9ea1d4f2c1
6 changed files with 3132 additions and 2768 deletions

View File

@ -260,3 +260,19 @@ void logFAC() {
jsr $b9ea
}
}
// FAC = FAC/10
// Set FAC to FAC divided by 10
void divFACby10() {
asm {
jsr $bafe
}
}
// FAC = FAC*10
// Set FAC to FAC multiplied by 10
void mulFACby10() {
asm {
jsr $bae2
}
}

View File

@ -11,14 +11,15 @@
f_127: .byte 0, 0, 0, 0, 0
jsr main
main: {
.label _2 = 9
.label _11 = 9
.label _3 = 9
.label _12 = 9
.label i = 2
lda #$7f
lda #<$4fb
sta setFAC.w
lda #0
lda #>$4fb
sta setFAC.w+1
jsr setFAC
jsr divFACby10
lda #<f_127
sta setMEMtoFAC.mem
lda #>f_127
@ -36,9 +37,9 @@ main: {
sta i
b1:
lda i
sta _2
sta _3
lda #0
sta _2+1
sta _3+1
jsr setFAC
lda #<f_2pi
sta mulFACbyMEM.mem
@ -69,9 +70,9 @@ main: {
inc i
lda i
cmp #$1a
bne b16
bne b17
rts
b16:
b17:
lda print_ln._0
sta char_cursor
lda print_ln._0+1
@ -210,3 +211,7 @@ setMEMtoFAC: {
jsr $bbd4
rts
}
divFACby10: {
jsr $bafe
rts
}

View File

@ -1,205 +1,215 @@
@begin: scope:[] from
[0] phi() [ ] ( )
to:@31
@31: scope:[] from @begin
to:@33
@33: scope:[] from @begin
[1] phi() [ ] ( )
[2] call main param-assignment [ ] ( )
to:@end
@end: scope:[] from @31
@end: scope:[] from @33
[3] phi() [ ] ( )
main: scope:[main] from @31
main: scope:[main] from @33
[4] phi() [ ] ( main:2 [ ] )
[5] call setFAC param-assignment [ ] ( main:2 [ ] )
to:main::@3
main::@3: scope:[main] from main
[6] phi() [ ] ( main:2 [ ] )
[7] call setMEMtoFAC param-assignment [ ] ( main:2 [ ] )
[7] call divFACby10 param-assignment [ ] ( main:2 [ ] )
to:main::@4
main::@4: scope:[main] from main::@3
[8] phi() [ ] ( main:2 [ ] )
[9] call setMEMtoFAC param-assignment [ ] ( main:2 [ ] )
to:main::@1
main::@1: scope:[main] from main::@16 main::@3
[8] (byte*) line_cursor#13 ← phi( main::@16/(byte*~) print_ln::$0 main::@3/((byte*))(word/signed word) 1024 ) [ main::i#10 char_cursor#32 line_cursor#13 ] ( main:2 [ main::i#10 char_cursor#32 line_cursor#13 ] )
[8] (byte*) char_cursor#32 ← phi( main::@16/(byte*~) char_cursor#49 main::@3/((byte*))(word/signed word) 1024 ) [ main::i#10 char_cursor#32 line_cursor#13 ] ( main:2 [ main::i#10 char_cursor#32 line_cursor#13 ] )
[8] (byte) main::i#10 ← phi( main::@16/(byte) main::i#1 main::@3/(byte/signed byte/word/signed word) 1 ) [ main::i#10 char_cursor#32 line_cursor#13 ] ( main:2 [ main::i#10 char_cursor#32 line_cursor#13 ] )
[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 ] )
[10] (word) setFAC::w#1 ← (word~) main::$2 [ main::i#10 char_cursor#32 line_cursor#13 setFAC::w#1 ] ( main:2 [ main::i#10 char_cursor#32 line_cursor#13 setFAC::w#1 ] )
[11] call setFAC param-assignment [ main::i#10 char_cursor#32 line_cursor#13 ] ( main:2 [ main::i#10 char_cursor#32 line_cursor#13 ] )
to:main::@5
main::@5: scope:[main] from main::@1
[12] phi() [ main::i#10 char_cursor#32 line_cursor#13 ] ( main:2 [ main::i#10 char_cursor#32 line_cursor#13 ] )
[13] call mulFACbyMEM param-assignment [ main::i#10 char_cursor#32 line_cursor#13 ] ( main:2 [ main::i#10 char_cursor#32 line_cursor#13 ] )
main::@1: scope:[main] from main::@17 main::@4
[10] (byte*) line_cursor#13 ← phi( main::@17/(byte*~) print_ln::$0 main::@4/((byte*))(word/signed word) 1024 ) [ main::i#10 char_cursor#32 line_cursor#13 ] ( main:2 [ main::i#10 char_cursor#32 line_cursor#13 ] )
[10] (byte*) char_cursor#32 ← phi( main::@17/(byte*~) char_cursor#50 main::@4/((byte*))(word/signed word) 1024 ) [ main::i#10 char_cursor#32 line_cursor#13 ] ( main:2 [ main::i#10 char_cursor#32 line_cursor#13 ] )
[10] (byte) main::i#10 ← phi( main::@17/(byte) main::i#1 main::@4/(byte/signed byte/word/signed word) 1 ) [ main::i#10 char_cursor#32 line_cursor#13 ] ( main:2 [ main::i#10 char_cursor#32 line_cursor#13 ] )
[11] (word~) main::$3 ← ((word)) (byte) main::i#10 [ main::i#10 char_cursor#32 line_cursor#13 main::$3 ] ( main:2 [ main::i#10 char_cursor#32 line_cursor#13 main::$3 ] )
[12] (word) setFAC::w#1 ← (word~) main::$3 [ main::i#10 char_cursor#32 line_cursor#13 setFAC::w#1 ] ( main:2 [ main::i#10 char_cursor#32 line_cursor#13 setFAC::w#1 ] )
[13] call setFAC param-assignment [ main::i#10 char_cursor#32 line_cursor#13 ] ( main:2 [ main::i#10 char_cursor#32 line_cursor#13 ] )
to:main::@6
main::@6: scope:[main] from main::@5
main::@6: scope:[main] from main::@1
[14] phi() [ main::i#10 char_cursor#32 line_cursor#13 ] ( main:2 [ main::i#10 char_cursor#32 line_cursor#13 ] )
[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 ] )
[15] call mulFACbyMEM param-assignment [ main::i#10 char_cursor#32 line_cursor#13 ] ( main:2 [ main::i#10 char_cursor#32 line_cursor#13 ] )
to:main::@7
main::@7: scope:[main] from main::@6
[16] phi() [ main::i#10 char_cursor#32 line_cursor#13 ] ( main:2 [ main::i#10 char_cursor#32 line_cursor#13 ] )
[17] call setFAC param-assignment [ main::i#10 char_cursor#32 line_cursor#13 ] ( main:2 [ main::i#10 char_cursor#32 line_cursor#13 ] )
[17] call setMEMtoFAC param-assignment [ main::i#10 char_cursor#32 line_cursor#13 ] ( main:2 [ main::i#10 char_cursor#32 line_cursor#13 ] )
to:main::@8
main::@8: scope:[main] from main::@7
[18] phi() [ main::i#10 char_cursor#32 line_cursor#13 ] ( main:2 [ main::i#10 char_cursor#32 line_cursor#13 ] )
[19] call divMEMbyFAC param-assignment [ main::i#10 char_cursor#32 line_cursor#13 ] ( main:2 [ main::i#10 char_cursor#32 line_cursor#13 ] )
[19] call setFAC param-assignment [ main::i#10 char_cursor#32 line_cursor#13 ] ( main:2 [ main::i#10 char_cursor#32 line_cursor#13 ] )
to:main::@9
main::@9: scope:[main] from main::@8
[20] phi() [ main::i#10 char_cursor#32 line_cursor#13 ] ( main:2 [ main::i#10 char_cursor#32 line_cursor#13 ] )
[21] call sinFAC param-assignment [ main::i#10 char_cursor#32 line_cursor#13 ] ( main:2 [ main::i#10 char_cursor#32 line_cursor#13 ] )
[21] call divMEMbyFAC param-assignment [ main::i#10 char_cursor#32 line_cursor#13 ] ( main:2 [ main::i#10 char_cursor#32 line_cursor#13 ] )
to:main::@10
main::@10: scope:[main] from main::@9
[22] phi() [ main::i#10 char_cursor#32 line_cursor#13 ] ( main:2 [ main::i#10 char_cursor#32 line_cursor#13 ] )
[23] call mulFACbyMEM param-assignment [ main::i#10 char_cursor#32 line_cursor#13 ] ( main:2 [ main::i#10 char_cursor#32 line_cursor#13 ] )
[23] call sinFAC param-assignment [ main::i#10 char_cursor#32 line_cursor#13 ] ( main:2 [ main::i#10 char_cursor#32 line_cursor#13 ] )
to:main::@11
main::@11: scope:[main] from main::@10
[24] phi() [ main::i#10 char_cursor#32 line_cursor#13 ] ( main:2 [ main::i#10 char_cursor#32 line_cursor#13 ] )
[25] call addMEMtoFAC param-assignment [ main::i#10 char_cursor#32 line_cursor#13 ] ( main:2 [ main::i#10 char_cursor#32 line_cursor#13 ] )
[25] call mulFACbyMEM param-assignment [ main::i#10 char_cursor#32 line_cursor#13 ] ( main:2 [ main::i#10 char_cursor#32 line_cursor#13 ] )
to:main::@12
main::@12: scope:[main] from main::@11
[26] phi() [ main::i#10 char_cursor#32 line_cursor#13 ] ( main:2 [ main::i#10 char_cursor#32 line_cursor#13 ] )
[27] call getFAC param-assignment [ main::i#10 char_cursor#32 line_cursor#13 getFAC::return#0 ] ( main:2 [ main::i#10 char_cursor#32 line_cursor#13 getFAC::return#0 ] )
[28] (word) getFAC::return#2 ← (word) getFAC::return#0 [ main::i#10 char_cursor#32 line_cursor#13 getFAC::return#2 ] ( main:2 [ main::i#10 char_cursor#32 line_cursor#13 getFAC::return#2 ] )
[27] call addMEMtoFAC param-assignment [ main::i#10 char_cursor#32 line_cursor#13 ] ( main:2 [ main::i#10 char_cursor#32 line_cursor#13 ] )
to:main::@13
main::@13: scope:[main] from main::@12
[29] (word~) main::$11 ← (word) getFAC::return#2 [ main::i#10 char_cursor#32 line_cursor#13 main::$11 ] ( main:2 [ main::i#10 char_cursor#32 line_cursor#13 main::$11 ] )
[30] (word) print_word::w#0 ← (word~) main::$11 [ main::i#10 char_cursor#32 line_cursor#13 print_word::w#0 ] ( main:2 [ main::i#10 char_cursor#32 line_cursor#13 print_word::w#0 ] )
[31] call print_word param-assignment [ main::i#10 line_cursor#13 char_cursor#10 ] ( main:2 [ main::i#10 line_cursor#13 char_cursor#10 ] )
[28] phi() [ main::i#10 char_cursor#32 line_cursor#13 ] ( main:2 [ main::i#10 char_cursor#32 line_cursor#13 ] )
[29] call getFAC param-assignment [ main::i#10 char_cursor#32 line_cursor#13 getFAC::return#0 ] ( main:2 [ main::i#10 char_cursor#32 line_cursor#13 getFAC::return#0 ] )
[30] (word) getFAC::return#2 ← (word) getFAC::return#0 [ main::i#10 char_cursor#32 line_cursor#13 getFAC::return#2 ] ( main:2 [ main::i#10 char_cursor#32 line_cursor#13 getFAC::return#2 ] )
to:main::@14
main::@14: scope:[main] from main::@13
[32] phi() [ main::i#10 line_cursor#13 char_cursor#10 ] ( main:2 [ main::i#10 line_cursor#13 char_cursor#10 ] )
[33] call print_ln param-assignment [ main::i#10 print_ln::$0 ] ( main:2 [ main::i#10 print_ln::$0 ] )
[31] (word~) main::$12 ← (word) getFAC::return#2 [ main::i#10 char_cursor#32 line_cursor#13 main::$12 ] ( main:2 [ main::i#10 char_cursor#32 line_cursor#13 main::$12 ] )
[32] (word) print_word::w#0 ← (word~) main::$12 [ main::i#10 char_cursor#32 line_cursor#13 print_word::w#0 ] ( main:2 [ main::i#10 char_cursor#32 line_cursor#13 print_word::w#0 ] )
[33] call print_word param-assignment [ main::i#10 line_cursor#13 char_cursor#10 ] ( main:2 [ main::i#10 line_cursor#13 char_cursor#10 ] )
to:main::@15
main::@15: scope:[main] from main::@14
[34] (byte) main::i#1 ← ++ (byte) main::i#10 [ main::i#1 print_ln::$0 ] ( main:2 [ main::i#1 print_ln::$0 ] )
[35] if((byte) main::i#1!=(byte/signed byte/word/signed word) 26) goto main::@16 [ main::i#1 print_ln::$0 ] ( main:2 [ main::i#1 print_ln::$0 ] )
to:main::@return
main::@return: scope:[main] from main::@15
[36] return [ ] ( main:2 [ ] )
to:@return
[34] phi() [ main::i#10 line_cursor#13 char_cursor#10 ] ( main:2 [ main::i#10 line_cursor#13 char_cursor#10 ] )
[35] call print_ln param-assignment [ main::i#10 print_ln::$0 ] ( main:2 [ main::i#10 print_ln::$0 ] )
to:main::@16
main::@16: scope:[main] from main::@15
[37] (byte*~) char_cursor#49 ← (byte*~) print_ln::$0 [ main::i#1 char_cursor#49 print_ln::$0 ] ( main:2 [ main::i#1 char_cursor#49 print_ln::$0 ] )
[36] (byte) main::i#1 ← ++ (byte) main::i#10 [ main::i#1 print_ln::$0 ] ( main:2 [ main::i#1 print_ln::$0 ] )
[37] if((byte) main::i#1!=(byte/signed byte/word/signed word) 26) goto main::@17 [ main::i#1 print_ln::$0 ] ( main:2 [ main::i#1 print_ln::$0 ] )
to:main::@return
main::@return: scope:[main] from main::@16
[38] return [ ] ( main:2 [ ] )
to:@return
main::@17: scope:[main] from main::@16
[39] (byte*~) char_cursor#50 ← (byte*~) print_ln::$0 [ main::i#1 char_cursor#50 print_ln::$0 ] ( main:2 [ main::i#1 char_cursor#50 print_ln::$0 ] )
to:main::@1
print_ln: scope:[print_ln] from main::@14
[38] phi() [ line_cursor#13 char_cursor#10 ] ( main:2::print_ln:33 [ main::i#10 line_cursor#13 char_cursor#10 ] )
print_ln: scope:[print_ln] from main::@15
[40] phi() [ line_cursor#13 char_cursor#10 ] ( main:2::print_ln:35 [ main::i#10 line_cursor#13 char_cursor#10 ] )
to:print_ln::@1
print_ln::@1: scope:[print_ln] from print_ln print_ln::@1
[39] (byte*) line_cursor#6 ← phi( print_ln/(byte*) line_cursor#13 print_ln::@1/(byte*~) print_ln::$0 ) [ line_cursor#6 char_cursor#10 ] ( main:2::print_ln:33 [ main::i#10 line_cursor#6 char_cursor#10 ] )
[40] (byte*~) print_ln::$0 ← (byte*) line_cursor#6 + (byte/signed byte/word/signed word) 40 [ print_ln::$0 char_cursor#10 ] ( main:2::print_ln:33 [ main::i#10 print_ln::$0 char_cursor#10 ] )
[41] if((byte*~) print_ln::$0<(byte*) char_cursor#10) goto print_ln::@1 [ print_ln::$0 char_cursor#10 ] ( main:2::print_ln:33 [ main::i#10 print_ln::$0 char_cursor#10 ] )
[41] (byte*) line_cursor#6 ← phi( print_ln/(byte*) line_cursor#13 print_ln::@1/(byte*~) print_ln::$0 ) [ line_cursor#6 char_cursor#10 ] ( main:2::print_ln:35 [ main::i#10 line_cursor#6 char_cursor#10 ] )
[42] (byte*~) print_ln::$0 ← (byte*) line_cursor#6 + (byte/signed byte/word/signed word) 40 [ print_ln::$0 char_cursor#10 ] ( main:2::print_ln:35 [ main::i#10 print_ln::$0 char_cursor#10 ] )
[43] if((byte*~) print_ln::$0<(byte*) char_cursor#10) goto print_ln::@1 [ print_ln::$0 char_cursor#10 ] ( main:2::print_ln:35 [ main::i#10 print_ln::$0 char_cursor#10 ] )
to:print_ln::@return
print_ln::@return: scope:[print_ln] from print_ln::@1
[42] return [ print_ln::$0 ] ( main:2::print_ln:33 [ main::i#10 print_ln::$0 ] )
[44] return [ print_ln::$0 ] ( main:2::print_ln:35 [ main::i#10 print_ln::$0 ] )
to:@return
print_word: scope:[print_word] from main::@13
[43] (byte~) print_word::$0 ← > (word) print_word::w#0 [ char_cursor#32 print_word::w#0 print_word::$0 ] ( main:2::print_word:31 [ main::i#10 line_cursor#13 char_cursor#32 print_word::w#0 print_word::$0 ] )
[44] (byte) print_byte::b#0 ← (byte~) print_word::$0 [ char_cursor#32 print_word::w#0 print_byte::b#0 ] ( main:2::print_word:31 [ main::i#10 line_cursor#13 char_cursor#32 print_word::w#0 print_byte::b#0 ] )
[45] call print_byte param-assignment [ print_word::w#0 char_cursor#10 ] ( main:2::print_word:31 [ main::i#10 line_cursor#13 print_word::w#0 char_cursor#10 ] )
print_word: scope:[print_word] from main::@14
[45] (byte~) print_word::$0 ← > (word) print_word::w#0 [ char_cursor#32 print_word::w#0 print_word::$0 ] ( main:2::print_word:33 [ main::i#10 line_cursor#13 char_cursor#32 print_word::w#0 print_word::$0 ] )
[46] (byte) print_byte::b#0 ← (byte~) print_word::$0 [ char_cursor#32 print_word::w#0 print_byte::b#0 ] ( main:2::print_word:33 [ main::i#10 line_cursor#13 char_cursor#32 print_word::w#0 print_byte::b#0 ] )
[47] call print_byte param-assignment [ print_word::w#0 char_cursor#10 ] ( main:2::print_word:33 [ main::i#10 line_cursor#13 print_word::w#0 char_cursor#10 ] )
to:print_word::@1
print_word::@1: scope:[print_word] from print_word
[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 ] )
[47] (byte) print_byte::b#1 ← (byte~) print_word::$2 [ char_cursor#10 print_byte::b#1 ] ( main:2::print_word:31 [ main::i#10 line_cursor#13 char_cursor#10 print_byte::b#1 ] )
[48] call print_byte param-assignment [ char_cursor#10 ] ( main:2::print_word:31 [ main::i#10 line_cursor#13 char_cursor#10 ] )
[48] (byte~) print_word::$2 ← < (word) print_word::w#0 [ char_cursor#10 print_word::$2 ] ( main:2::print_word:33 [ main::i#10 line_cursor#13 char_cursor#10 print_word::$2 ] )
[49] (byte) print_byte::b#1 ← (byte~) print_word::$2 [ char_cursor#10 print_byte::b#1 ] ( main:2::print_word:33 [ main::i#10 line_cursor#13 char_cursor#10 print_byte::b#1 ] )
[50] call print_byte param-assignment [ char_cursor#10 ] ( main:2::print_word:33 [ main::i#10 line_cursor#13 char_cursor#10 ] )
to:print_word::@return
print_word::@return: scope:[print_word] from print_word::@1
[49] return [ char_cursor#10 ] ( main:2::print_word:31 [ main::i#10 line_cursor#13 char_cursor#10 ] )
[51] return [ char_cursor#10 ] ( main:2::print_word:33 [ main::i#10 line_cursor#13 char_cursor#10 ] )
to:@return
print_byte: scope:[print_byte] from print_word print_word::@1
[50] (byte*) char_cursor#31 ← phi( print_word/(byte*) char_cursor#32 print_word::@1/(byte*) char_cursor#10 ) [ print_byte::b#2 char_cursor#31 ] ( main:2::print_word:31::print_byte:45 [ main::i#10 line_cursor#13 print_word::w#0 print_byte::b#2 char_cursor#31 ] main:2::print_word:31::print_byte:48 [ main::i#10 line_cursor#13 print_byte::b#2 char_cursor#31 ] )
[50] (byte) print_byte::b#2 ← phi( print_word/(byte) print_byte::b#0 print_word::@1/(byte) print_byte::b#1 ) [ print_byte::b#2 char_cursor#31 ] ( main:2::print_word:31::print_byte:45 [ main::i#10 line_cursor#13 print_word::w#0 print_byte::b#2 char_cursor#31 ] main:2::print_word:31::print_byte:48 [ main::i#10 line_cursor#13 print_byte::b#2 char_cursor#31 ] )
[51] (byte~) print_byte::$0 ← (byte) print_byte::b#2 >> (byte/signed byte/word/signed word) 4 [ print_byte::b#2 char_cursor#31 print_byte::$0 ] ( main:2::print_word:31::print_byte:45 [ main::i#10 line_cursor#13 print_word::w#0 print_byte::b#2 char_cursor#31 print_byte::$0 ] main:2::print_word:31::print_byte:48 [ main::i#10 line_cursor#13 print_byte::b#2 char_cursor#31 print_byte::$0 ] )
[52] (byte~) print_byte::$1 ← (const byte[]) hextab#0 *idx (byte~) print_byte::$0 [ print_byte::b#2 char_cursor#31 print_byte::$1 ] ( main:2::print_word:31::print_byte:45 [ main::i#10 line_cursor#13 print_word::w#0 print_byte::b#2 char_cursor#31 print_byte::$1 ] main:2::print_word:31::print_byte:48 [ main::i#10 line_cursor#13 print_byte::b#2 char_cursor#31 print_byte::$1 ] )
[53] (byte) print_char::ch#0 ← (byte~) print_byte::$1 [ print_byte::b#2 char_cursor#31 print_char::ch#0 ] ( main:2::print_word:31::print_byte:45 [ main::i#10 line_cursor#13 print_word::w#0 print_byte::b#2 char_cursor#31 print_char::ch#0 ] main:2::print_word:31::print_byte:48 [ main::i#10 line_cursor#13 print_byte::b#2 char_cursor#31 print_char::ch#0 ] )
[54] call print_char param-assignment [ char_cursor#10 print_byte::b#2 ] ( main:2::print_word:31::print_byte:45 [ main::i#10 line_cursor#13 print_word::w#0 char_cursor#10 print_byte::b#2 ] main:2::print_word:31::print_byte:48 [ main::i#10 line_cursor#13 char_cursor#10 print_byte::b#2 ] )
[52] (byte*) char_cursor#31 ← phi( print_word/(byte*) char_cursor#32 print_word::@1/(byte*) char_cursor#10 ) [ print_byte::b#2 char_cursor#31 ] ( main:2::print_word:33::print_byte:47 [ main::i#10 line_cursor#13 print_word::w#0 print_byte::b#2 char_cursor#31 ] main:2::print_word:33::print_byte:50 [ main::i#10 line_cursor#13 print_byte::b#2 char_cursor#31 ] )
[52] (byte) print_byte::b#2 ← phi( print_word/(byte) print_byte::b#0 print_word::@1/(byte) print_byte::b#1 ) [ print_byte::b#2 char_cursor#31 ] ( main:2::print_word:33::print_byte:47 [ main::i#10 line_cursor#13 print_word::w#0 print_byte::b#2 char_cursor#31 ] main:2::print_word:33::print_byte:50 [ main::i#10 line_cursor#13 print_byte::b#2 char_cursor#31 ] )
[53] (byte~) print_byte::$0 ← (byte) print_byte::b#2 >> (byte/signed byte/word/signed word) 4 [ print_byte::b#2 char_cursor#31 print_byte::$0 ] ( main:2::print_word:33::print_byte:47 [ main::i#10 line_cursor#13 print_word::w#0 print_byte::b#2 char_cursor#31 print_byte::$0 ] main:2::print_word:33::print_byte:50 [ main::i#10 line_cursor#13 print_byte::b#2 char_cursor#31 print_byte::$0 ] )
[54] (byte~) print_byte::$1 ← (const byte[]) hextab#0 *idx (byte~) print_byte::$0 [ print_byte::b#2 char_cursor#31 print_byte::$1 ] ( main:2::print_word:33::print_byte:47 [ main::i#10 line_cursor#13 print_word::w#0 print_byte::b#2 char_cursor#31 print_byte::$1 ] main:2::print_word:33::print_byte:50 [ main::i#10 line_cursor#13 print_byte::b#2 char_cursor#31 print_byte::$1 ] )
[55] (byte) print_char::ch#0 ← (byte~) print_byte::$1 [ print_byte::b#2 char_cursor#31 print_char::ch#0 ] ( main:2::print_word:33::print_byte:47 [ main::i#10 line_cursor#13 print_word::w#0 print_byte::b#2 char_cursor#31 print_char::ch#0 ] main:2::print_word:33::print_byte:50 [ main::i#10 line_cursor#13 print_byte::b#2 char_cursor#31 print_char::ch#0 ] )
[56] call print_char param-assignment [ char_cursor#10 print_byte::b#2 ] ( main:2::print_word:33::print_byte:47 [ main::i#10 line_cursor#13 print_word::w#0 char_cursor#10 print_byte::b#2 ] main:2::print_word:33::print_byte:50 [ main::i#10 line_cursor#13 char_cursor#10 print_byte::b#2 ] )
to:print_byte::@1
print_byte::@1: scope:[print_byte] from print_byte
[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 ] )
[56] (byte~) print_byte::$4 ← (const byte[]) hextab#0 *idx (byte~) print_byte::$3 [ char_cursor#10 print_byte::$4 ] ( main:2::print_word:31::print_byte:45 [ main::i#10 line_cursor#13 print_word::w#0 char_cursor#10 print_byte::$4 ] main:2::print_word:31::print_byte:48 [ main::i#10 line_cursor#13 char_cursor#10 print_byte::$4 ] )
[57] (byte) print_char::ch#1 ← (byte~) print_byte::$4 [ char_cursor#10 print_char::ch#1 ] ( main:2::print_word:31::print_byte:45 [ main::i#10 line_cursor#13 print_word::w#0 char_cursor#10 print_char::ch#1 ] main:2::print_word:31::print_byte:48 [ main::i#10 line_cursor#13 char_cursor#10 print_char::ch#1 ] )
[58] call print_char param-assignment [ char_cursor#10 ] ( main:2::print_word:31::print_byte:45 [ main::i#10 line_cursor#13 print_word::w#0 char_cursor#10 ] main:2::print_word:31::print_byte:48 [ main::i#10 line_cursor#13 char_cursor#10 ] )
[57] (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:33::print_byte:47 [ main::i#10 line_cursor#13 print_word::w#0 char_cursor#10 print_byte::$3 ] main:2::print_word:33::print_byte:50 [ main::i#10 line_cursor#13 char_cursor#10 print_byte::$3 ] )
[58] (byte~) print_byte::$4 ← (const byte[]) hextab#0 *idx (byte~) print_byte::$3 [ char_cursor#10 print_byte::$4 ] ( main:2::print_word:33::print_byte:47 [ main::i#10 line_cursor#13 print_word::w#0 char_cursor#10 print_byte::$4 ] main:2::print_word:33::print_byte:50 [ main::i#10 line_cursor#13 char_cursor#10 print_byte::$4 ] )
[59] (byte) print_char::ch#1 ← (byte~) print_byte::$4 [ char_cursor#10 print_char::ch#1 ] ( main:2::print_word:33::print_byte:47 [ main::i#10 line_cursor#13 print_word::w#0 char_cursor#10 print_char::ch#1 ] main:2::print_word:33::print_byte:50 [ main::i#10 line_cursor#13 char_cursor#10 print_char::ch#1 ] )
[60] call print_char param-assignment [ char_cursor#10 ] ( main:2::print_word:33::print_byte:47 [ main::i#10 line_cursor#13 print_word::w#0 char_cursor#10 ] main:2::print_word:33::print_byte:50 [ main::i#10 line_cursor#13 char_cursor#10 ] )
to:print_byte::@return
print_byte::@return: scope:[print_byte] from print_byte::@1
[59] return [ char_cursor#10 ] ( main:2::print_word:31::print_byte:45 [ main::i#10 line_cursor#13 print_word::w#0 char_cursor#10 ] main:2::print_word:31::print_byte:48 [ main::i#10 line_cursor#13 char_cursor#10 ] )
[61] return [ char_cursor#10 ] ( main:2::print_word:33::print_byte:47 [ main::i#10 line_cursor#13 print_word::w#0 char_cursor#10 ] main:2::print_word:33::print_byte:50 [ main::i#10 line_cursor#13 char_cursor#10 ] )
to:@return
print_char: scope:[print_char] from print_byte print_byte::@1
[60] (byte*) char_cursor#23 ← phi( print_byte/(byte*) char_cursor#31 print_byte::@1/(byte*) char_cursor#10 ) [ 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 print_char::ch#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 print_char::ch#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 print_char::ch#2 char_cursor#23 ] main:2::print_word:31::print_byte:48::print_char:58 [ main::i#10 line_cursor#13 print_char::ch#2 char_cursor#23 ] )
[60] (byte) print_char::ch#2 ← phi( print_byte/(byte) print_char::ch#0 print_byte::@1/(byte) print_char::ch#1 ) [ 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 print_char::ch#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 print_char::ch#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 print_char::ch#2 char_cursor#23 ] main:2::print_word:31::print_byte:48::print_char:58 [ main::i#10 line_cursor#13 print_char::ch#2 char_cursor#23 ] )
[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 ] )
[62] (byte*) char_cursor#10 ← ++ (byte*) char_cursor#23 [ char_cursor#10 ] ( 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#10 ] main:2::print_word:31::print_byte:48::print_char:54 [ main::i#10 line_cursor#13 print_byte::b#2 char_cursor#10 ] main:2::print_word:31::print_byte:45::print_char:58 [ main::i#10 line_cursor#13 print_word::w#0 char_cursor#10 ] main:2::print_word:31::print_byte:48::print_char:58 [ main::i#10 line_cursor#13 char_cursor#10 ] )
[62] (byte*) char_cursor#23 ← phi( print_byte/(byte*) char_cursor#31 print_byte::@1/(byte*) char_cursor#10 ) [ print_char::ch#2 char_cursor#23 ] ( main:2::print_word:33::print_byte:47::print_char:56 [ main::i#10 line_cursor#13 print_word::w#0 print_byte::b#2 print_char::ch#2 char_cursor#23 ] main:2::print_word:33::print_byte:50::print_char:56 [ main::i#10 line_cursor#13 print_byte::b#2 print_char::ch#2 char_cursor#23 ] main:2::print_word:33::print_byte:47::print_char:60 [ main::i#10 line_cursor#13 print_word::w#0 print_char::ch#2 char_cursor#23 ] main:2::print_word:33::print_byte:50::print_char:60 [ main::i#10 line_cursor#13 print_char::ch#2 char_cursor#23 ] )
[62] (byte) print_char::ch#2 ← phi( print_byte/(byte) print_char::ch#0 print_byte::@1/(byte) print_char::ch#1 ) [ print_char::ch#2 char_cursor#23 ] ( main:2::print_word:33::print_byte:47::print_char:56 [ main::i#10 line_cursor#13 print_word::w#0 print_byte::b#2 print_char::ch#2 char_cursor#23 ] main:2::print_word:33::print_byte:50::print_char:56 [ main::i#10 line_cursor#13 print_byte::b#2 print_char::ch#2 char_cursor#23 ] main:2::print_word:33::print_byte:47::print_char:60 [ main::i#10 line_cursor#13 print_word::w#0 print_char::ch#2 char_cursor#23 ] main:2::print_word:33::print_byte:50::print_char:60 [ main::i#10 line_cursor#13 print_char::ch#2 char_cursor#23 ] )
[63] *((byte*) char_cursor#23) ← (byte) print_char::ch#2 [ char_cursor#23 ] ( main:2::print_word:33::print_byte:47::print_char:56 [ main::i#10 line_cursor#13 print_word::w#0 print_byte::b#2 char_cursor#23 ] main:2::print_word:33::print_byte:50::print_char:56 [ main::i#10 line_cursor#13 print_byte::b#2 char_cursor#23 ] main:2::print_word:33::print_byte:47::print_char:60 [ main::i#10 line_cursor#13 print_word::w#0 char_cursor#23 ] main:2::print_word:33::print_byte:50::print_char:60 [ main::i#10 line_cursor#13 char_cursor#23 ] )
[64] (byte*) char_cursor#10 ← ++ (byte*) char_cursor#23 [ char_cursor#10 ] ( main:2::print_word:33::print_byte:47::print_char:56 [ main::i#10 line_cursor#13 print_word::w#0 print_byte::b#2 char_cursor#10 ] main:2::print_word:33::print_byte:50::print_char:56 [ main::i#10 line_cursor#13 print_byte::b#2 char_cursor#10 ] main:2::print_word:33::print_byte:47::print_char:60 [ main::i#10 line_cursor#13 print_word::w#0 char_cursor#10 ] main:2::print_word:33::print_byte:50::print_char:60 [ main::i#10 line_cursor#13 char_cursor#10 ] )
to:print_char::@return
print_char::@return: scope:[print_char] from print_char
[63] return [ char_cursor#10 ] ( 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#10 ] main:2::print_word:31::print_byte:48::print_char:54 [ main::i#10 line_cursor#13 print_byte::b#2 char_cursor#10 ] main:2::print_word:31::print_byte:45::print_char:58 [ main::i#10 line_cursor#13 print_word::w#0 char_cursor#10 ] main:2::print_word:31::print_byte:48::print_char:58 [ main::i#10 line_cursor#13 char_cursor#10 ] )
[65] return [ char_cursor#10 ] ( main:2::print_word:33::print_byte:47::print_char:56 [ main::i#10 line_cursor#13 print_word::w#0 print_byte::b#2 char_cursor#10 ] main:2::print_word:33::print_byte:50::print_char:56 [ main::i#10 line_cursor#13 print_byte::b#2 char_cursor#10 ] main:2::print_word:33::print_byte:47::print_char:60 [ main::i#10 line_cursor#13 print_word::w#0 char_cursor#10 ] main:2::print_word:33::print_byte:50::print_char:60 [ main::i#10 line_cursor#13 char_cursor#10 ] )
to:@return
getFAC: scope:[getFAC] from main::@12
getFAC: scope:[getFAC] from main::@13
asm { jsr$b1aasty$festa$ff }
[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 ] )
[67] (word) getFAC::w#1 ← (byte/signed byte/word/signed word) 0 lo= *((const byte*) memLo#0) [ getFAC::w#1 ] ( main:2::getFAC:29 [ main::i#10 char_cursor#32 line_cursor#13 getFAC::w#1 ] )
[68] (word) getFAC::return#0 ← (word) getFAC::w#1 hi= *((const byte*) memHi#0) [ getFAC::return#0 ] ( main:2::getFAC:29 [ 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 ] )
[69] return [ getFAC::return#0 ] ( main:2::getFAC:29 [ main::i#10 char_cursor#32 line_cursor#13 getFAC::return#0 ] )
to:@return
addMEMtoFAC: scope:[addMEMtoFAC] from main::@11
[68] phi() [ ] ( main:2::addMEMtoFAC:25 [ main::i#10 char_cursor#32 line_cursor#13 ] )
[69] call prepareMEM param-assignment [ ] ( main:2::addMEMtoFAC:25 [ main::i#10 char_cursor#32 line_cursor#13 ] )
addMEMtoFAC: scope:[addMEMtoFAC] from main::@12
[70] phi() [ ] ( main:2::addMEMtoFAC:27 [ main::i#10 char_cursor#32 line_cursor#13 ] )
[71] call prepareMEM param-assignment [ ] ( main:2::addMEMtoFAC:27 [ main::i#10 char_cursor#32 line_cursor#13 ] )
to:addMEMtoFAC::@1
addMEMtoFAC::@1: scope:[addMEMtoFAC] from addMEMtoFAC
asm { lda$feldy$ffjsr$b867 }
to:addMEMtoFAC::@return
addMEMtoFAC::@return: scope:[addMEMtoFAC] from addMEMtoFAC::@1
[71] return [ ] ( main:2::addMEMtoFAC:25 [ main::i#10 char_cursor#32 line_cursor#13 ] )
[73] return [ ] ( main:2::addMEMtoFAC:27 [ main::i#10 char_cursor#32 line_cursor#13 ] )
to:@return
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 ] )
[74] (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:27::prepareMEM:71 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] main:2::mulFACbyMEM:15::prepareMEM:82 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] main:2::mulFACbyMEM:25::prepareMEM:82 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] main:2::divMEMbyFAC:21::prepareMEM:88 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] main:2::setFAC:5::prepareMEM:94 [ prepareMEM::mem#5 ] main:2::setFAC:13::prepareMEM:94 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] main:2::setFAC:19::prepareMEM:94 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] main:2::setMEMtoFAC:9::prepareMEM:99 [ prepareMEM::mem#5 ] main:2::setMEMtoFAC:17::prepareMEM:99 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] )
[75] (byte~) prepareMEM::$0 ← < (byte*) prepareMEM::mem#5 [ prepareMEM::mem#5 prepareMEM::$0 ] ( main:2::addMEMtoFAC:27::prepareMEM:71 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 prepareMEM::$0 ] main:2::mulFACbyMEM:15::prepareMEM:82 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 prepareMEM::$0 ] main:2::mulFACbyMEM:25::prepareMEM:82 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 prepareMEM::$0 ] main:2::divMEMbyFAC:21::prepareMEM:88 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 prepareMEM::$0 ] main:2::setFAC:5::prepareMEM:94 [ prepareMEM::mem#5 prepareMEM::$0 ] main:2::setFAC:13::prepareMEM:94 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 prepareMEM::$0 ] main:2::setFAC:19::prepareMEM:94 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 prepareMEM::$0 ] main:2::setMEMtoFAC:9::prepareMEM:99 [ prepareMEM::mem#5 prepareMEM::$0 ] main:2::setMEMtoFAC:17::prepareMEM:99 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 prepareMEM::$0 ] )
[76] *((const byte*) memLo#0) ← (byte~) prepareMEM::$0 [ prepareMEM::mem#5 ] ( main:2::addMEMtoFAC:27::prepareMEM:71 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] main:2::mulFACbyMEM:15::prepareMEM:82 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] main:2::mulFACbyMEM:25::prepareMEM:82 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] main:2::divMEMbyFAC:21::prepareMEM:88 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] main:2::setFAC:5::prepareMEM:94 [ prepareMEM::mem#5 ] main:2::setFAC:13::prepareMEM:94 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] main:2::setFAC:19::prepareMEM:94 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] main:2::setMEMtoFAC:9::prepareMEM:99 [ prepareMEM::mem#5 ] main:2::setMEMtoFAC:17::prepareMEM:99 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] )
[77] (byte~) prepareMEM::$1 ← > (byte*) prepareMEM::mem#5 [ prepareMEM::$1 ] ( main:2::addMEMtoFAC:27::prepareMEM:71 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] main:2::mulFACbyMEM:15::prepareMEM:82 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] main:2::mulFACbyMEM:25::prepareMEM:82 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] main:2::divMEMbyFAC:21::prepareMEM:88 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] main:2::setFAC:5::prepareMEM:94 [ prepareMEM::$1 ] main:2::setFAC:13::prepareMEM:94 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] main:2::setFAC:19::prepareMEM:94 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] main:2::setMEMtoFAC:9::prepareMEM:99 [ prepareMEM::$1 ] main:2::setMEMtoFAC:17::prepareMEM:99 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] )
[78] *((const byte*) memHi#0) ← (byte~) prepareMEM::$1 [ ] ( main:2::addMEMtoFAC:27::prepareMEM:71 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::mulFACbyMEM:15::prepareMEM:82 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::mulFACbyMEM:25::prepareMEM:82 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::divMEMbyFAC:21::prepareMEM:88 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::setFAC:5::prepareMEM:94 [ ] main:2::setFAC:13::prepareMEM:94 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::setFAC:19::prepareMEM:94 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::setMEMtoFAC:9::prepareMEM:99 [ ] main:2::setMEMtoFAC:17::prepareMEM:99 [ 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::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 ] )
[79] return [ ] ( main:2::addMEMtoFAC:27::prepareMEM:71 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::mulFACbyMEM:15::prepareMEM:82 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::mulFACbyMEM:25::prepareMEM:82 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::divMEMbyFAC:21::prepareMEM:88 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::setFAC:5::prepareMEM:94 [ ] main:2::setFAC:13::prepareMEM:94 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::setFAC:19::prepareMEM:94 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::setMEMtoFAC:9::prepareMEM:99 [ ] main:2::setMEMtoFAC:17::prepareMEM:99 [ 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#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 ] )
mulFACbyMEM: scope:[mulFACbyMEM] from main::@11 main::@6
[80] (byte*) mulFACbyMEM::mem#2 ← phi( main::@11/(const byte[]) f_127#0 main::@6/(const byte*) f_2pi#0 ) [ mulFACbyMEM::mem#2 ] ( main:2::mulFACbyMEM:15 [ main::i#10 char_cursor#32 line_cursor#13 mulFACbyMEM::mem#2 ] main:2::mulFACbyMEM:25 [ main::i#10 char_cursor#32 line_cursor#13 mulFACbyMEM::mem#2 ] )
[81] (byte*) prepareMEM::mem#4 ← (byte*) mulFACbyMEM::mem#2 [ prepareMEM::mem#4 ] ( main:2::mulFACbyMEM:15 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 ] main:2::mulFACbyMEM:25 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 ] )
[82] call prepareMEM param-assignment [ ] ( main:2::mulFACbyMEM:15 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::mulFACbyMEM:25 [ main::i#10 char_cursor#32 line_cursor#13 ] )
to:mulFACbyMEM::@1
mulFACbyMEM::@1: scope:[mulFACbyMEM] from mulFACbyMEM
asm { lda$feldy$ffjsr$ba28 }
to:mulFACbyMEM::@return
mulFACbyMEM::@return: scope:[mulFACbyMEM] from mulFACbyMEM::@1
[82] return [ ] ( 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 ] )
[84] return [ ] ( main:2::mulFACbyMEM:15 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::mulFACbyMEM:25 [ main::i#10 char_cursor#32 line_cursor#13 ] )
to:@return
sinFAC: scope:[sinFAC] from main::@9
sinFAC: scope:[sinFAC] from main::@10
asm { jsr$e26b }
to:sinFAC::@return
sinFAC::@return: scope:[sinFAC] from sinFAC
[84] return [ ] ( main:2::sinFAC:21 [ main::i#10 char_cursor#32 line_cursor#13 ] )
[86] return [ ] ( main:2::sinFAC:23 [ main::i#10 char_cursor#32 line_cursor#13 ] )
to:@return
divMEMbyFAC: scope:[divMEMbyFAC] from main::@8
[85] phi() [ ] ( main:2::divMEMbyFAC:19 [ main::i#10 char_cursor#32 line_cursor#13 ] )
[86] call prepareMEM param-assignment [ ] ( main:2::divMEMbyFAC:19 [ main::i#10 char_cursor#32 line_cursor#13 ] )
divMEMbyFAC: scope:[divMEMbyFAC] from main::@9
[87] phi() [ ] ( main:2::divMEMbyFAC:21 [ main::i#10 char_cursor#32 line_cursor#13 ] )
[88] call prepareMEM param-assignment [ ] ( main:2::divMEMbyFAC:21 [ main::i#10 char_cursor#32 line_cursor#13 ] )
to:divMEMbyFAC::@1
divMEMbyFAC::@1: scope:[divMEMbyFAC] from divMEMbyFAC
asm { lda$feldy$ffjsr$bb0f }
to:divMEMbyFAC::@return
divMEMbyFAC::@return: scope:[divMEMbyFAC] from divMEMbyFAC::@1
[88] return [ ] ( main:2::divMEMbyFAC:19 [ main::i#10 char_cursor#32 line_cursor#13 ] )
[90] return [ ] ( main:2::divMEMbyFAC:21 [ main::i#10 char_cursor#32 line_cursor#13 ] )
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 ← ((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 ] )
setFAC: scope:[setFAC] from main main::@1 main::@8
[91] (word) setFAC::w#3 ← phi( main/(word/signed word) 1275 main::@1/(word) setFAC::w#1 main::@8/(byte/signed byte/word/signed word) 25 ) [ setFAC::w#3 ] ( main:2::setFAC:5 [ setFAC::w#3 ] main:2::setFAC:13 [ main::i#10 char_cursor#32 line_cursor#13 setFAC::w#3 ] main:2::setFAC:19 [ main::i#10 char_cursor#32 line_cursor#13 setFAC::w#3 ] )
[92] (byte*~) setFAC::$0 ← ((byte*)) (word) setFAC::w#3 [ setFAC::$0 ] ( main:2::setFAC:5 [ setFAC::$0 ] main:2::setFAC:13 [ main::i#10 char_cursor#32 line_cursor#13 setFAC::$0 ] main:2::setFAC:19 [ main::i#10 char_cursor#32 line_cursor#13 setFAC::$0 ] )
[93] (byte*) prepareMEM::mem#0 ← (byte*~) setFAC::$0 [ prepareMEM::mem#0 ] ( main:2::setFAC:5 [ prepareMEM::mem#0 ] main:2::setFAC:13 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#0 ] main:2::setFAC:19 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#0 ] )
[94] call prepareMEM param-assignment [ ] ( main:2::setFAC:5 [ ] main:2::setFAC:13 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::setFAC:19 [ 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::@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 ] )
[96] return [ ] ( main:2::setFAC:5 [ ] main:2::setFAC:13 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::setFAC:19 [ main::i#10 char_cursor#32 line_cursor#13 ] )
to:@return
setMEMtoFAC: scope:[setMEMtoFAC] from main::@3 main::@6
[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 ] )
setMEMtoFAC: scope:[setMEMtoFAC] from main::@4 main::@7
[97] (byte*) setMEMtoFAC::mem#2 ← phi( main::@4/(const byte[]) f_127#0 main::@7/(const byte[]) f_i#0 ) [ setMEMtoFAC::mem#2 ] ( main:2::setMEMtoFAC:9 [ setMEMtoFAC::mem#2 ] main:2::setMEMtoFAC:17 [ main::i#10 char_cursor#32 line_cursor#13 setMEMtoFAC::mem#2 ] )
[98] (byte*) prepareMEM::mem#1 ← (byte*) setMEMtoFAC::mem#2 [ prepareMEM::mem#1 ] ( main:2::setMEMtoFAC:9 [ prepareMEM::mem#1 ] main:2::setMEMtoFAC:17 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#1 ] )
[99] call prepareMEM param-assignment [ ] ( main:2::setMEMtoFAC:9 [ ] main:2::setMEMtoFAC:17 [ 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
[99] return [ ] ( main:2::setMEMtoFAC:7 [ ] main:2::setMEMtoFAC:15 [ main::i#10 char_cursor#32 line_cursor#13 ] )
[101] return [ ] ( main:2::setMEMtoFAC:9 [ ] main:2::setMEMtoFAC:17 [ main::i#10 char_cursor#32 line_cursor#13 ] )
to:@return
divFACby10: scope:[divFACby10] from main::@3
asm { jsr$bafe }
to:divFACby10::@return
divFACby10::@return: scope:[divFACby10] from divFACby10
[103] return [ ] ( main:2::divFACby10:7 [ ] )
to:@return

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,4 @@
(label) @31
(label) @33
(label) @begin
(label) @end
(void()) addMEMtoFAC((byte*) addMEMtoFAC::mem)
@ -10,7 +10,9 @@
(byte*) char_cursor#23 char_cursor zp ZP_PTR_BYTE:5 4.0
(byte*) char_cursor#31 char_cursor zp ZP_PTR_BYTE:5 1.5
(byte*) char_cursor#32 char_cursor zp ZP_PTR_BYTE:5 0.52
(byte*~) char_cursor#49 char_cursor zp ZP_PTR_BYTE:5 22.0
(byte*~) char_cursor#50 char_cursor zp ZP_PTR_BYTE:5 22.0
(void()) divFACby10()
(label) divFACby10::@return
(void()) divMEMbyFAC((byte*) divMEMbyFAC::mem)
(label) divMEMbyFAC::@1
(label) divMEMbyFAC::@return
@ -34,8 +36,8 @@
(byte*) line_cursor#13 line_cursor zp ZP_PTR_BYTE:3 0.5
(byte*) line_cursor#6 line_cursor zp ZP_PTR_BYTE:3 204.0
(void()) main()
(word~) main::$11 $11 zp ZP_WORD:9 22.0
(word~) main::$2 $2 zp ZP_WORD:9 22.0
(word~) main::$12 $12 zp ZP_WORD:9 22.0
(word~) main::$3 $3 zp ZP_WORD:9 22.0
(label) main::@1
(label) main::@10
(label) main::@11
@ -44,8 +46,9 @@
(label) main::@14
(label) main::@15
(label) main::@16
(label) main::@17
(label) main::@3
(label) main::@5
(label) main::@4
(label) main::@6
(label) main::@7
(label) main::@8
@ -119,9 +122,9 @@ zp ZP_BYTE:2 [ main::i#10 main::i#1 ]
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:5 [ char_cursor#23 char_cursor#31 char_cursor#32 char_cursor#50 char_cursor#10 ]
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 ]
zp ZP_WORD:9 [ setFAC::w#3 setFAC::w#1 main::$3 getFAC::return#2 main::$12 print_word::w#0 getFAC::w#1 getFAC::return#0 ]
reg byte a [ print_word::$0 ]
reg byte a [ print_word::$2 ]
reg byte y [ print_byte::$0 ]

View File

@ -6,7 +6,8 @@ byte[] f_127 = {0, 0, 0, 0, 0};
byte* f_2pi = $e2e5;
void main() {
setFAC(127);
setFAC(1275);
divFACby10();
setMEMtoFAC(f_127);
for(byte i : 1..25) {
setFAC((word)i);