mirror of
https://gitlab.com/camelot/kickc.git
synced 2025-08-09 20:25:17 +00:00
317 lines
15 KiB
INI
317 lines
15 KiB
INI
|
|
(void()) __start()
|
|
__start: scope:[__start] from
|
|
[0] phi()
|
|
to:__start::__init1
|
|
__start::__init1: scope:[__start] from __start
|
|
[1] (byte) conio_cursor_x ← (byte) 0
|
|
[2] (byte) conio_cursor_y ← (byte) 0
|
|
[3] (byte*) conio_line_text ← (const nomodify byte*) DEFAULT_SCREEN
|
|
[4] (byte*) conio_line_color ← (const nomodify byte*) COLORRAM
|
|
to:__start::@1
|
|
__start::@1: scope:[__start] from __start::__init1
|
|
[5] phi()
|
|
[6] call main
|
|
to:__start::@return
|
|
__start::@return: scope:[__start] from __start::@1
|
|
[7] return
|
|
to:@return
|
|
|
|
(void()) main()
|
|
main: scope:[main] from __start::@1
|
|
[8] phi()
|
|
[9] call clrscr
|
|
to:main::@1
|
|
main::@1: scope:[main] from main main::@2
|
|
[10] (signed byte) main::signed_char_value#2 ← phi( main/(signed byte) -5 main::@2/(signed byte) main::signed_char_value#1 )
|
|
[11] if((signed byte) main::signed_char_value#2!=(signed byte) 0) goto main::@2
|
|
to:main::@return
|
|
main::@return: scope:[main] from main::@1
|
|
[12] return
|
|
to:@return
|
|
main::@2: scope:[main] from main::@1
|
|
[13] (signed byte) main::signed_char_value#1 ← ++ (signed byte) main::signed_char_value#2
|
|
[14] (signed word) test_casting::signed_short_value#0 ← (signed byte) main::signed_char_value#1
|
|
[15] call test_casting
|
|
to:main::@1
|
|
|
|
(void()) clrscr()
|
|
clrscr: scope:[clrscr] from main
|
|
[16] phi()
|
|
to:clrscr::@1
|
|
clrscr::@1: scope:[clrscr] from clrscr clrscr::@5
|
|
[17] (byte*) clrscr::line_cols#5 ← phi( clrscr/(const nomodify byte*) COLORRAM clrscr::@5/(byte*) clrscr::line_cols#1 )
|
|
[17] (byte*) clrscr::line_text#5 ← phi( clrscr/(const nomodify byte*) DEFAULT_SCREEN clrscr::@5/(byte*) clrscr::line_text#1 )
|
|
[17] (byte) clrscr::l#2 ← phi( clrscr/(byte) 0 clrscr::@5/(byte) clrscr::l#1 )
|
|
[18] if((byte) clrscr::l#2<(byte) $19) goto clrscr::@3
|
|
to:clrscr::@2
|
|
clrscr::@2: scope:[clrscr] from clrscr::@1
|
|
[19] (byte) conio_cursor_x ← (byte) 0
|
|
[20] (byte) conio_cursor_y ← (byte) 0
|
|
[21] (byte*) conio_line_text ← (const nomodify byte*) DEFAULT_SCREEN
|
|
[22] (byte*) conio_line_color ← (const nomodify byte*) COLORRAM
|
|
to:clrscr::@return
|
|
clrscr::@return: scope:[clrscr] from clrscr::@2
|
|
[23] return
|
|
to:@return
|
|
clrscr::@3: scope:[clrscr] from clrscr::@1 clrscr::@4
|
|
[24] (byte) clrscr::c#2 ← phi( clrscr::@1/(byte) 0 clrscr::@4/(byte) clrscr::c#1 )
|
|
[25] if((byte) clrscr::c#2<(byte) $28) goto clrscr::@4
|
|
to:clrscr::@5
|
|
clrscr::@5: scope:[clrscr] from clrscr::@3
|
|
[26] (byte*) clrscr::line_text#1 ← (byte*) clrscr::line_text#5 + (byte) $28
|
|
[27] (byte*) clrscr::line_cols#1 ← (byte*) clrscr::line_cols#5 + (byte) $28
|
|
[28] (byte) clrscr::l#1 ← ++ (byte) clrscr::l#2
|
|
to:clrscr::@1
|
|
clrscr::@4: scope:[clrscr] from clrscr::@3
|
|
[29] *((byte*) clrscr::line_text#5 + (byte) clrscr::c#2) ← (byte) ' '
|
|
[30] *((byte*) clrscr::line_cols#5 + (byte) clrscr::c#2) ← (const nomodify byte) LIGHT_BLUE
|
|
[31] (byte) clrscr::c#1 ← ++ (byte) clrscr::c#2
|
|
to:clrscr::@3
|
|
|
|
(void()) test_casting((signed word) test_casting::signed_short_value)
|
|
test_casting: scope:[test_casting] from main::@2
|
|
[32] (signed word) printf_sint::value#1 ← (signed word) test_casting::signed_short_value#0
|
|
[33] call printf_sint
|
|
to:test_casting::@1
|
|
test_casting::@1: scope:[test_casting] from test_casting
|
|
[34] phi()
|
|
[35] call cputs
|
|
to:test_casting::@return
|
|
test_casting::@return: scope:[test_casting] from test_casting::@1
|
|
[36] return
|
|
to:@return
|
|
|
|
(void()) printf_sint((signed word) printf_sint::value , (byte) printf_sint::format_min_length , (byte) printf_sint::format_justify_left , (byte) printf_sint::format_sign_always , (byte) printf_sint::format_zero_padding , (byte) printf_sint::format_upper_case , (byte) printf_sint::format_radix)
|
|
printf_sint: scope:[printf_sint] from test_casting
|
|
[37] *((byte*)&(struct printf_buffer_number) printf_buffer) ← (byte) 0
|
|
[38] if((signed word) printf_sint::value#1<(signed byte) 0) goto printf_sint::@1
|
|
to:printf_sint::@2
|
|
printf_sint::@1: scope:[printf_sint] from printf_sint
|
|
[39] (signed word) printf_sint::value#0 ← - (signed word) printf_sint::value#1
|
|
[40] *((byte*)&(struct printf_buffer_number) printf_buffer) ← (byte) '-'
|
|
to:printf_sint::@2
|
|
printf_sint::@2: scope:[printf_sint] from printf_sint printf_sint::@1
|
|
[41] (signed word) printf_sint::value#4 ← phi( printf_sint::@1/(signed word) printf_sint::value#0 printf_sint/(signed word) printf_sint::value#1 )
|
|
[42] (word) utoa::value#1 ← (word)(signed word) printf_sint::value#4
|
|
[43] call utoa
|
|
to:printf_sint::@3
|
|
printf_sint::@3: scope:[printf_sint] from printf_sint::@2
|
|
[44] (byte) printf_number_buffer::buffer_sign#0 ← *((byte*)&(struct printf_buffer_number) printf_buffer)
|
|
[45] call printf_number_buffer
|
|
to:printf_sint::@return
|
|
printf_sint::@return: scope:[printf_sint] from printf_sint::@3
|
|
[46] return
|
|
to:@return
|
|
|
|
(void()) cputs((to_nomodify byte*) cputs::s)
|
|
cputs: scope:[cputs] from printf_number_buffer::@2 test_casting::@1
|
|
[47] (to_nomodify byte*) cputs::s#4 ← phi( printf_number_buffer::@2/(const byte*) printf_number_buffer::buffer_digits#0 test_casting::@1/(const byte*) test_casting::s )
|
|
to:cputs::@1
|
|
cputs::@1: scope:[cputs] from cputs cputs::@2
|
|
[48] (to_nomodify byte*) cputs::s#3 ← phi( cputs/(to_nomodify byte*) cputs::s#4 cputs::@2/(to_nomodify byte*) cputs::s#0 )
|
|
[49] (byte) cputs::c#1 ← *((to_nomodify byte*) cputs::s#3)
|
|
[50] (to_nomodify byte*) cputs::s#0 ← ++ (to_nomodify byte*) cputs::s#3
|
|
[51] if((byte) 0!=(byte) cputs::c#1) goto cputs::@2
|
|
to:cputs::@return
|
|
cputs::@return: scope:[cputs] from cputs::@1
|
|
[52] return
|
|
to:@return
|
|
cputs::@2: scope:[cputs] from cputs::@1
|
|
[53] (byte) cputc::c#0 ← (byte) cputs::c#1
|
|
[54] call cputc
|
|
to:cputs::@1
|
|
|
|
(void()) utoa((word) utoa::value , (byte*) utoa::buffer , (byte) utoa::radix)
|
|
utoa: scope:[utoa] from printf_sint::@2
|
|
[55] phi()
|
|
to:utoa::@1
|
|
utoa::@1: scope:[utoa] from utoa utoa::@4
|
|
[56] (byte*) utoa::buffer#11 ← phi( utoa::@4/(byte*) utoa::buffer#14 utoa/(byte*)&(struct printf_buffer_number) printf_buffer+(const byte) OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS )
|
|
[56] (byte) utoa::started#2 ← phi( utoa::@4/(byte) utoa::started#4 utoa/(byte) 0 )
|
|
[56] (word) utoa::value#2 ← phi( utoa::@4/(word) utoa::value#6 utoa/(word) utoa::value#1 )
|
|
[56] (byte) utoa::digit#2 ← phi( utoa::@4/(byte) utoa::digit#1 utoa/(byte) 0 )
|
|
[57] if((byte) utoa::digit#2<(const byte) utoa::max_digits#1-(byte) 1) goto utoa::@2
|
|
to:utoa::@3
|
|
utoa::@3: scope:[utoa] from utoa::@1
|
|
[58] (byte~) utoa::$11 ← (byte)(word) utoa::value#2
|
|
[59] *((byte*) utoa::buffer#11) ← *((const byte*) DIGITS + (byte~) utoa::$11)
|
|
[60] (byte*) utoa::buffer#3 ← ++ (byte*) utoa::buffer#11
|
|
[61] *((byte*) utoa::buffer#3) ← (byte) 0
|
|
to:utoa::@return
|
|
utoa::@return: scope:[utoa] from utoa::@3
|
|
[62] return
|
|
to:@return
|
|
utoa::@2: scope:[utoa] from utoa::@1
|
|
[63] (byte~) utoa::$10 ← (byte) utoa::digit#2 << (byte) 1
|
|
[64] (word) utoa::digit_value#0 ← *((const word*) RADIX_DECIMAL_VALUES + (byte~) utoa::$10)
|
|
[65] if((byte) 0!=(byte) utoa::started#2) goto utoa::@5
|
|
to:utoa::@7
|
|
utoa::@7: scope:[utoa] from utoa::@2
|
|
[66] if((word) utoa::value#2>=(word) utoa::digit_value#0) goto utoa::@5
|
|
to:utoa::@4
|
|
utoa::@4: scope:[utoa] from utoa::@6 utoa::@7
|
|
[67] (byte*) utoa::buffer#14 ← phi( utoa::@7/(byte*) utoa::buffer#11 utoa::@6/(byte*) utoa::buffer#4 )
|
|
[67] (byte) utoa::started#4 ← phi( utoa::@7/(byte) utoa::started#2 utoa::@6/(byte) 1 )
|
|
[67] (word) utoa::value#6 ← phi( utoa::@7/(word) utoa::value#2 utoa::@6/(word) utoa::value#0 )
|
|
[68] (byte) utoa::digit#1 ← ++ (byte) utoa::digit#2
|
|
to:utoa::@1
|
|
utoa::@5: scope:[utoa] from utoa::@2 utoa::@7
|
|
[69] (byte*) utoa_append::buffer#0 ← (byte*) utoa::buffer#11
|
|
[70] (word) utoa_append::value#0 ← (word) utoa::value#2
|
|
[71] (word) utoa_append::sub#0 ← (word) utoa::digit_value#0
|
|
[72] call utoa_append
|
|
[73] (word) utoa_append::return#0 ← (word) utoa_append::value#2
|
|
to:utoa::@6
|
|
utoa::@6: scope:[utoa] from utoa::@5
|
|
[74] (word) utoa::value#0 ← (word) utoa_append::return#0
|
|
[75] (byte*) utoa::buffer#4 ← ++ (byte*) utoa::buffer#11
|
|
to:utoa::@4
|
|
|
|
(void()) printf_number_buffer((byte) printf_number_buffer::buffer_sign , (byte*) printf_number_buffer::buffer_digits , (byte) printf_number_buffer::format_min_length , (byte) printf_number_buffer::format_justify_left , (byte) printf_number_buffer::format_sign_always , (byte) printf_number_buffer::format_zero_padding , (byte) printf_number_buffer::format_upper_case , (byte) printf_number_buffer::format_radix)
|
|
printf_number_buffer: scope:[printf_number_buffer] from printf_sint::@3
|
|
[76] phi()
|
|
to:printf_number_buffer::@1
|
|
printf_number_buffer::@1: scope:[printf_number_buffer] from printf_number_buffer
|
|
[77] if((byte) 0==(byte) printf_number_buffer::buffer_sign#0) goto printf_number_buffer::@2
|
|
to:printf_number_buffer::@3
|
|
printf_number_buffer::@3: scope:[printf_number_buffer] from printf_number_buffer::@1
|
|
[78] (byte) cputc::c#2 ← (byte) printf_number_buffer::buffer_sign#0
|
|
[79] call cputc
|
|
to:printf_number_buffer::@2
|
|
printf_number_buffer::@2: scope:[printf_number_buffer] from printf_number_buffer::@1 printf_number_buffer::@3
|
|
[80] phi()
|
|
[81] call cputs
|
|
to:printf_number_buffer::@return
|
|
printf_number_buffer::@return: scope:[printf_number_buffer] from printf_number_buffer::@2
|
|
[82] return
|
|
to:@return
|
|
|
|
(void()) cputc((byte) cputc::c)
|
|
cputc: scope:[cputc] from cputs::@2 printf_number_buffer::@3
|
|
[83] (byte) cputc::c#3 ← phi( cputs::@2/(byte) cputc::c#0 printf_number_buffer::@3/(byte) cputc::c#2 )
|
|
[84] if((byte) cputc::c#3==(byte) '
|
|
') goto cputc::@1
|
|
to:cputc::@2
|
|
cputc::@2: scope:[cputc] from cputc
|
|
[85] *((byte*) conio_line_text + (byte) conio_cursor_x) ← (byte) cputc::c#3
|
|
[86] *((byte*) conio_line_color + (byte) conio_cursor_x) ← (const nomodify byte) LIGHT_BLUE
|
|
[87] (byte) conio_cursor_x ← ++ (byte) conio_cursor_x
|
|
[88] if((byte) conio_cursor_x!=(byte) $28) goto cputc::@return
|
|
to:cputc::@3
|
|
cputc::@3: scope:[cputc] from cputc::@2
|
|
[89] phi()
|
|
[90] call cputln
|
|
to:cputc::@return
|
|
cputc::@return: scope:[cputc] from cputc::@1 cputc::@2 cputc::@3
|
|
[91] return
|
|
to:@return
|
|
cputc::@1: scope:[cputc] from cputc
|
|
[92] phi()
|
|
[93] call cputln
|
|
to:cputc::@return
|
|
|
|
(word()) utoa_append((byte*) utoa_append::buffer , (word) utoa_append::value , (word) utoa_append::sub)
|
|
utoa_append: scope:[utoa_append] from utoa::@5
|
|
[94] phi()
|
|
to:utoa_append::@1
|
|
utoa_append::@1: scope:[utoa_append] from utoa_append utoa_append::@2
|
|
[95] (byte) utoa_append::digit#2 ← phi( utoa_append/(byte) 0 utoa_append::@2/(byte) utoa_append::digit#1 )
|
|
[95] (word) utoa_append::value#2 ← phi( utoa_append/(word) utoa_append::value#0 utoa_append::@2/(word) utoa_append::value#1 )
|
|
[96] if((word) utoa_append::value#2>=(word) utoa_append::sub#0) goto utoa_append::@2
|
|
to:utoa_append::@3
|
|
utoa_append::@3: scope:[utoa_append] from utoa_append::@1
|
|
[97] *((byte*) utoa_append::buffer#0) ← *((const byte*) DIGITS + (byte) utoa_append::digit#2)
|
|
to:utoa_append::@return
|
|
utoa_append::@return: scope:[utoa_append] from utoa_append::@3
|
|
[98] return
|
|
to:@return
|
|
utoa_append::@2: scope:[utoa_append] from utoa_append::@1
|
|
[99] (byte) utoa_append::digit#1 ← ++ (byte) utoa_append::digit#2
|
|
[100] (word) utoa_append::value#1 ← (word) utoa_append::value#2 - (word) utoa_append::sub#0
|
|
to:utoa_append::@1
|
|
|
|
(void()) cputln()
|
|
cputln: scope:[cputln] from cputc::@1 cputc::@3
|
|
[101] (byte*) conio_line_text ← (byte*) conio_line_text + (byte) $28
|
|
[102] (byte*) conio_line_color ← (byte*) conio_line_color + (byte) $28
|
|
[103] (byte) conio_cursor_x ← (byte) 0
|
|
[104] (byte) conio_cursor_y ← ++ (byte) conio_cursor_y
|
|
[105] call cscroll
|
|
to:cputln::@return
|
|
cputln::@return: scope:[cputln] from cputln
|
|
[106] return
|
|
to:@return
|
|
|
|
(void()) cscroll()
|
|
cscroll: scope:[cscroll] from cputln
|
|
[107] if((byte) conio_cursor_y!=(byte) $19) goto cscroll::@return
|
|
to:cscroll::@1
|
|
cscroll::@1: scope:[cscroll] from cscroll
|
|
[108] phi()
|
|
[109] call memcpy
|
|
to:cscroll::@2
|
|
cscroll::@2: scope:[cscroll] from cscroll::@1
|
|
[110] phi()
|
|
[111] call memcpy
|
|
to:cscroll::@3
|
|
cscroll::@3: scope:[cscroll] from cscroll::@2
|
|
[112] phi()
|
|
[113] call memset
|
|
to:cscroll::@4
|
|
cscroll::@4: scope:[cscroll] from cscroll::@3
|
|
[114] phi()
|
|
[115] call memset
|
|
to:cscroll::@5
|
|
cscroll::@5: scope:[cscroll] from cscroll::@4
|
|
[116] (byte*) conio_line_text ← (byte*) conio_line_text - (byte) $28
|
|
[117] (byte*) conio_line_color ← (byte*) conio_line_color - (byte) $28
|
|
[118] (byte) conio_cursor_y ← -- (byte) conio_cursor_y
|
|
to:cscroll::@return
|
|
cscroll::@return: scope:[cscroll] from cscroll cscroll::@5
|
|
[119] return
|
|
to:@return
|
|
|
|
(void*()) memcpy((void*) memcpy::destination , (void*) memcpy::source , (word) memcpy::num)
|
|
memcpy: scope:[memcpy] from cscroll::@1 cscroll::@2
|
|
[120] (void*) memcpy::destination#2 ← phi( cscroll::@1/(void*)(const nomodify byte*) DEFAULT_SCREEN cscroll::@2/(void*)(const nomodify byte*) COLORRAM )
|
|
[120] (void*) memcpy::source#2 ← phi( cscroll::@1/(void*)(const nomodify byte*) DEFAULT_SCREEN+(byte) $28 cscroll::@2/(void*)(const nomodify byte*) COLORRAM+(byte) $28 )
|
|
[121] (byte*) memcpy::src_end#0 ← (byte*)(void*) memcpy::source#2 + (word)(number) $19*(number) $28-(number) $28
|
|
[122] (byte*) memcpy::src#4 ← (byte*)(void*) memcpy::source#2
|
|
[123] (byte*) memcpy::dst#4 ← (byte*)(void*) memcpy::destination#2
|
|
to:memcpy::@1
|
|
memcpy::@1: scope:[memcpy] from memcpy memcpy::@2
|
|
[124] (byte*) memcpy::dst#2 ← phi( memcpy/(byte*) memcpy::dst#4 memcpy::@2/(byte*) memcpy::dst#1 )
|
|
[124] (byte*) memcpy::src#2 ← phi( memcpy/(byte*) memcpy::src#4 memcpy::@2/(byte*) memcpy::src#1 )
|
|
[125] if((byte*) memcpy::src#2!=(byte*) memcpy::src_end#0) goto memcpy::@2
|
|
to:memcpy::@return
|
|
memcpy::@return: scope:[memcpy] from memcpy::@1
|
|
[126] return
|
|
to:@return
|
|
memcpy::@2: scope:[memcpy] from memcpy::@1
|
|
[127] *((byte*) memcpy::dst#2) ← *((byte*) memcpy::src#2)
|
|
[128] (byte*) memcpy::dst#1 ← ++ (byte*) memcpy::dst#2
|
|
[129] (byte*) memcpy::src#1 ← ++ (byte*) memcpy::src#2
|
|
to:memcpy::@1
|
|
|
|
(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num)
|
|
memset: scope:[memset] from cscroll::@3 cscroll::@4
|
|
[130] (byte) memset::c#4 ← phi( cscroll::@3/(byte) ' ' cscroll::@4/(const nomodify byte) LIGHT_BLUE )
|
|
[130] (void*) memset::str#3 ← phi( cscroll::@3/(void*)(const nomodify byte*) DEFAULT_SCREEN+(word)(number) $19*(number) $28-(byte) $28 cscroll::@4/(void*)(const nomodify byte*) COLORRAM+(word)(number) $19*(number) $28-(byte) $28 )
|
|
to:memset::@1
|
|
memset::@1: scope:[memset] from memset
|
|
[131] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (byte) $28
|
|
[132] (byte*) memset::dst#4 ← (byte*)(void*) memset::str#3
|
|
to:memset::@2
|
|
memset::@2: scope:[memset] from memset::@1 memset::@3
|
|
[133] (byte*) memset::dst#2 ← phi( memset::@1/(byte*) memset::dst#4 memset::@3/(byte*) memset::dst#1 )
|
|
[134] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@3
|
|
to:memset::@return
|
|
memset::@return: scope:[memset] from memset::@2
|
|
[135] return
|
|
to:@return
|
|
memset::@3: scope:[memset] from memset::@2
|
|
[136] *((byte*) memset::dst#2) ← (byte) memset::c#4
|
|
[137] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2
|
|
to:memset::@2
|