1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2024-09-29 03:56:15 +00:00
kickc/src/test/ref/printf-1.cfg

345 lines
12 KiB
INI
Raw Normal View History

2020-06-27 19:18:00 +00:00
2020-10-05 20:58:02 +00:00
void __start()
__start: scope:[__start] from
[0] phi()
to:__start::__init1
__start::__init1: scope:[__start] from __start
2020-10-05 20:58:02 +00:00
[1] conio_cursor_x = 0
[2] conio_cursor_y = 0
[3] conio_line_text = DEFAULT_SCREEN
[4] conio_line_color = COLORRAM
[5] call conio_c64_init
to:__start::@1
__start::@1: scope:[__start] from __start::__init1
[6] phi()
[7] call main
to:__start::@return
__start::@return: scope:[__start] from __start::@1
[8] return
to:@return
void conio_c64_init()
conio_c64_init: scope:[conio_c64_init] from __start::__init1
[9] conio_c64_init::line#0 = *conio_c64_init::BASIC_CURSOR_LINE
[10] if(conio_c64_init::line#0<$19) goto conio_c64_init::@2
to:conio_c64_init::@1
conio_c64_init::@2: scope:[conio_c64_init] from conio_c64_init
[11] phi()
to:conio_c64_init::@1
conio_c64_init::@1: scope:[conio_c64_init] from conio_c64_init conio_c64_init::@2
[12] conio_c64_init::line#2 = phi( conio_c64_init::@2/conio_c64_init::line#0, conio_c64_init/$19-1 )
[13] gotoxy::y#2 = conio_c64_init::line#2
[14] call gotoxy
to:conio_c64_init::@return
conio_c64_init::@return: scope:[conio_c64_init] from conio_c64_init::@1
[15] return
2020-06-27 19:18:00 +00:00
to:@return
2020-10-05 20:58:02 +00:00
void main()
main: scope:[main] from __start::@1
[16] phi()
[17] call clrscr
to:main::@1
main::@1: scope:[main] from main
[18] phi()
[19] call printf_string
to:main::@2
main::@2: scope:[main] from main::@1
[20] phi()
[21] call cputln
to:main::@3
main::@3: scope:[main] from main::@2
[22] phi()
[23] call printf_string
to:main::@4
main::@4: scope:[main] from main::@3
[24] phi()
[25] call cputln
to:main::@5
main::@5: scope:[main] from main::@4
[26] phi()
[27] call printf_string
to:main::@6
main::@6: scope:[main] from main::@5
[28] phi()
[29] call cputln
to:main::@7
main::@7: scope:[main] from main::@6
[30] phi()
[31] call printf_string
to:main::@return
main::@return: scope:[main] from main::@7
[32] return
to:@return
void gotoxy(byte gotoxy::x , byte gotoxy::y)
gotoxy: scope:[gotoxy] from conio_c64_init::@1
[33] if(gotoxy::y#2<$19+1) goto gotoxy::@3
to:gotoxy::@1
gotoxy::@3: scope:[gotoxy] from gotoxy
[34] phi()
to:gotoxy::@1
gotoxy::@1: scope:[gotoxy] from gotoxy gotoxy::@3
[35] gotoxy::y#4 = phi( gotoxy::@3/gotoxy::y#2, gotoxy/0 )
to:gotoxy::@2
gotoxy::@2: scope:[gotoxy] from gotoxy::@1
[36] conio_cursor_x = gotoxy::x#2
[37] conio_cursor_y = gotoxy::y#4
[38] gotoxy::$7 = (word)gotoxy::y#4
[39] gotoxy::$8 = gotoxy::$7 << 2
[40] gotoxy::$9 = gotoxy::$8 + gotoxy::$7
[41] gotoxy::line_offset#0 = gotoxy::$9 << 3
[42] gotoxy::$5 = DEFAULT_SCREEN + gotoxy::line_offset#0
[43] conio_line_text = gotoxy::$5
[44] gotoxy::$6 = COLORRAM + gotoxy::line_offset#0
[45] conio_line_color = gotoxy::$6
to:gotoxy::@return
gotoxy::@return: scope:[gotoxy] from gotoxy::@2
[46] return
to:@return
2020-10-05 20:58:02 +00:00
void clrscr()
clrscr: scope:[clrscr] from main
[47] phi()
to:clrscr::@1
clrscr::@1: scope:[clrscr] from clrscr clrscr::@5
[48] clrscr::line_cols#5 = phi( clrscr/COLORRAM, clrscr::@5/clrscr::line_cols#1 )
[48] clrscr::line_text#5 = phi( clrscr/DEFAULT_SCREEN, clrscr::@5/clrscr::line_text#1 )
[48] clrscr::l#2 = phi( clrscr/0, clrscr::@5/clrscr::l#1 )
[49] if(clrscr::l#2<$19) goto clrscr::@3
to:clrscr::@2
clrscr::@2: scope:[clrscr] from clrscr::@1
[50] conio_cursor_x = 0
[51] conio_cursor_y = 0
[52] conio_line_text = DEFAULT_SCREEN
[53] conio_line_color = COLORRAM
to:clrscr::@return
clrscr::@return: scope:[clrscr] from clrscr::@2
[54] return
to:@return
clrscr::@3: scope:[clrscr] from clrscr::@1 clrscr::@4
[55] clrscr::c#2 = phi( clrscr::@1/0, clrscr::@4/clrscr::c#1 )
[56] if(clrscr::c#2<$28) goto clrscr::@4
to:clrscr::@5
clrscr::@5: scope:[clrscr] from clrscr::@3
[57] clrscr::line_text#1 = clrscr::line_text#5 + $28
[58] clrscr::line_cols#1 = clrscr::line_cols#5 + $28
[59] clrscr::l#1 = ++ clrscr::l#2
to:clrscr::@1
clrscr::@4: scope:[clrscr] from clrscr::@3
[60] clrscr::line_text#5[clrscr::c#2] = ' '
[61] clrscr::line_cols#5[clrscr::c#2] = LIGHT_BLUE
[62] clrscr::c#1 = ++ clrscr::c#2
to:clrscr::@3
2020-10-05 20:58:02 +00:00
void printf_string(byte* printf_string::str , byte printf_string::format_min_length , byte printf_string::format_justify_left)
printf_string: scope:[printf_string] from main::@1 main::@3 main::@5 main::@7
[63] printf_string::str#10 = phi( main::@1/main::str, main::@3/main::str1, main::@5/main::str, main::@7/main::str1 )
[63] printf_string::format_justify_left#10 = phi( main::@1/0, main::@3/0, main::@5/1, main::@7/1 )
to:printf_string::@3
printf_string::@3: scope:[printf_string] from printf_string
[64] strlen::str#1 = printf_string::str#10
[65] call strlen
[66] strlen::return#2 = strlen::len#2
to:printf_string::@6
printf_string::@6: scope:[printf_string] from printf_string::@3
[67] printf_string::$9 = strlen::return#2
[68] printf_string::len#0 = (signed byte)printf_string::$9
[69] printf_string::padding#1 = $a - printf_string::len#0
[70] if(printf_string::padding#1>=0) goto printf_string::@10
to:printf_string::@1
printf_string::@10: scope:[printf_string] from printf_string::@6
[71] phi()
to:printf_string::@1
printf_string::@1: scope:[printf_string] from printf_string::@10 printf_string::@6
[72] printf_string::padding#3 = phi( printf_string::@6/0, printf_string::@10/printf_string::padding#1 )
[73] if(0!=printf_string::format_justify_left#10) goto printf_string::@2
to:printf_string::@8
printf_string::@8: scope:[printf_string] from printf_string::@1
[74] if(0!=printf_string::padding#3) goto printf_string::@4
to:printf_string::@2
printf_string::@4: scope:[printf_string] from printf_string::@8
[75] printf_padding::length#0 = (byte)printf_string::padding#3
[76] call printf_padding
to:printf_string::@2
printf_string::@2: scope:[printf_string] from printf_string::@1 printf_string::@4 printf_string::@8
[77] cputs::s#1 = printf_string::str#10
[78] call cputs
to:printf_string::@7
printf_string::@7: scope:[printf_string] from printf_string::@2
[79] if(0==printf_string::format_justify_left#10) goto printf_string::@return
to:printf_string::@9
printf_string::@9: scope:[printf_string] from printf_string::@7
[80] if(0!=printf_string::padding#3) goto printf_string::@5
to:printf_string::@return
printf_string::@5: scope:[printf_string] from printf_string::@9
[81] printf_padding::length#1 = (byte)printf_string::padding#3
[82] call printf_padding
to:printf_string::@return
printf_string::@return: scope:[printf_string] from printf_string::@5 printf_string::@7 printf_string::@9
[83] return
to:@return
2020-10-05 20:58:02 +00:00
void cputln()
cputln: scope:[cputln] from cputc::@1 cputc::@3 main::@2 main::@4 main::@6
[84] conio_line_text = conio_line_text + $28
[85] conio_line_color = conio_line_color + $28
[86] conio_cursor_x = 0
[87] conio_cursor_y = ++ conio_cursor_y
[88] call cscroll
to:cputln::@return
cputln::@return: scope:[cputln] from cputln
[89] return
to:@return
2020-10-05 20:58:02 +00:00
word strlen(byte* strlen::str)
strlen: scope:[strlen] from printf_string::@3
[90] phi()
to:strlen::@1
strlen::@1: scope:[strlen] from strlen strlen::@2
[91] strlen::len#2 = phi( strlen/0, strlen::@2/strlen::len#1 )
[91] strlen::str#2 = phi( strlen/strlen::str#1, strlen::@2/strlen::str#0 )
[92] if(0!=*strlen::str#2) goto strlen::@2
to:strlen::@return
strlen::@return: scope:[strlen] from strlen::@1
[93] return
to:@return
strlen::@2: scope:[strlen] from strlen::@1
[94] strlen::len#1 = ++ strlen::len#2
[95] strlen::str#0 = ++ strlen::str#2
to:strlen::@1
2020-10-05 20:58:02 +00:00
void printf_padding(byte printf_padding::pad , byte printf_padding::length)
printf_padding: scope:[printf_padding] from printf_string::@4 printf_string::@5
[96] printf_padding::pad#4 = phi( printf_string::@4/' ', printf_string::@5/' ' )
[96] printf_padding::length#3 = phi( printf_string::@4/printf_padding::length#0, printf_string::@5/printf_padding::length#1 )
to:printf_padding::@1
printf_padding::@1: scope:[printf_padding] from printf_padding printf_padding::@3
[97] printf_padding::i#2 = phi( printf_padding/0, printf_padding::@3/printf_padding::i#1 )
[98] if(printf_padding::i#2<printf_padding::length#3) goto printf_padding::@2
to:printf_padding::@return
printf_padding::@return: scope:[printf_padding] from printf_padding::@1
[99] return
to:@return
printf_padding::@2: scope:[printf_padding] from printf_padding::@1
[100] cputc::c#1 = printf_padding::pad#4
[101] call cputc
to:printf_padding::@3
printf_padding::@3: scope:[printf_padding] from printf_padding::@2
[102] printf_padding::i#1 = ++ printf_padding::i#2
to:printf_padding::@1
void cputs(const byte* cputs::s)
cputs: scope:[cputs] from printf_string::@2
[103] phi()
to:cputs::@1
cputs::@1: scope:[cputs] from cputs cputs::@2
[104] cputs::s#2 = phi( cputs/cputs::s#1, cputs::@2/cputs::s#0 )
[105] cputs::c#1 = *cputs::s#2
[106] cputs::s#0 = ++ cputs::s#2
[107] if(0!=cputs::c#1) goto cputs::@2
to:cputs::@return
cputs::@return: scope:[cputs] from cputs::@1
[108] return
to:@return
cputs::@2: scope:[cputs] from cputs::@1
[109] cputc::c#0 = cputs::c#1
[110] call cputc
to:cputs::@1
2020-10-05 20:58:02 +00:00
void cscroll()
cscroll: scope:[cscroll] from cputln
[111] if(conio_cursor_y!=$19) goto cscroll::@return
to:cscroll::@1
cscroll::@1: scope:[cscroll] from cscroll
[112] phi()
[113] call memcpy
to:cscroll::@2
cscroll::@2: scope:[cscroll] from cscroll::@1
[114] phi()
[115] call memcpy
to:cscroll::@3
cscroll::@3: scope:[cscroll] from cscroll::@2
[116] phi()
[117] call memset
to:cscroll::@4
cscroll::@4: scope:[cscroll] from cscroll::@3
[118] phi()
[119] call memset
to:cscroll::@5
cscroll::@5: scope:[cscroll] from cscroll::@4
[120] conio_line_text = conio_line_text - $28
[121] conio_line_color = conio_line_color - $28
[122] conio_cursor_y = -- conio_cursor_y
to:cscroll::@return
cscroll::@return: scope:[cscroll] from cscroll cscroll::@5
[123] return
to:@return
2020-10-05 20:58:02 +00:00
void cputc(byte cputc::c)
cputc: scope:[cputc] from cputs::@2 printf_padding::@2
[124] cputc::c#2 = phi( cputs::@2/cputc::c#0, printf_padding::@2/cputc::c#1 )
[125] if(cputc::c#2=='
') goto cputc::@1
to:cputc::@2
cputc::@2: scope:[cputc] from cputc
[126] conio_line_text[conio_cursor_x] = cputc::c#2
[127] conio_line_color[conio_cursor_x] = LIGHT_BLUE
[128] conio_cursor_x = ++ conio_cursor_x
[129] if(conio_cursor_x!=$28) goto cputc::@return
to:cputc::@3
cputc::@3: scope:[cputc] from cputc::@2
[130] phi()
[131] call cputln
to:cputc::@return
cputc::@return: scope:[cputc] from cputc::@1 cputc::@2 cputc::@3
[132] return
to:@return
cputc::@1: scope:[cputc] from cputc
[133] phi()
[134] call cputln
to:cputc::@return
2020-10-05 20:58:02 +00:00
void* memcpy(void* memcpy::destination , void* memcpy::source , word memcpy::num)
memcpy: scope:[memcpy] from cscroll::@1 cscroll::@2
[135] memcpy::destination#2 = phi( cscroll::@1/(void*)DEFAULT_SCREEN, cscroll::@2/(void*)COLORRAM )
[135] memcpy::source#2 = phi( cscroll::@1/(void*)DEFAULT_SCREEN+$28, cscroll::@2/(void*)COLORRAM+$28 )
[136] memcpy::src_end#0 = (byte*)memcpy::source#2 + (word)$19*$28-$28
[137] memcpy::src#4 = (byte*)memcpy::source#2
[138] memcpy::dst#4 = (byte*)memcpy::destination#2
to:memcpy::@1
memcpy::@1: scope:[memcpy] from memcpy memcpy::@2
[139] memcpy::dst#2 = phi( memcpy/memcpy::dst#4, memcpy::@2/memcpy::dst#1 )
[139] memcpy::src#2 = phi( memcpy/memcpy::src#4, memcpy::@2/memcpy::src#1 )
[140] if(memcpy::src#2!=memcpy::src_end#0) goto memcpy::@2
to:memcpy::@return
memcpy::@return: scope:[memcpy] from memcpy::@1
[141] return
to:@return
memcpy::@2: scope:[memcpy] from memcpy::@1
[142] *memcpy::dst#2 = *memcpy::src#2
[143] memcpy::dst#1 = ++ memcpy::dst#2
[144] memcpy::src#1 = ++ memcpy::src#2
to:memcpy::@1
2020-10-05 20:58:02 +00:00
void* memset(void* memset::str , byte memset::c , word memset::num)
memset: scope:[memset] from cscroll::@3 cscroll::@4
[145] memset::c#4 = phi( cscroll::@3/' ', cscroll::@4/LIGHT_BLUE )
[145] memset::str#3 = phi( cscroll::@3/(void*)DEFAULT_SCREEN+(word)$19*$28-$28, cscroll::@4/(void*)COLORRAM+(word)$19*$28-$28 )
to:memset::@1
memset::@1: scope:[memset] from memset
[146] memset::end#0 = (byte*)memset::str#3 + $28
[147] memset::dst#4 = (byte*)memset::str#3
to:memset::@2
memset::@2: scope:[memset] from memset::@1 memset::@3
[148] memset::dst#2 = phi( memset::@1/memset::dst#4, memset::@3/memset::dst#1 )
[149] if(memset::dst#2!=memset::end#0) goto memset::@3
to:memset::@return
memset::@return: scope:[memset] from memset::@2
[150] return
to:@return
memset::@3: scope:[memset] from memset::@2
[151] *memset::dst#2 = memset::c#4
[152] memset::dst#1 = ++ memset::dst#2
to:memset::@2