mirror of
https://gitlab.com/camelot/kickc.git
synced 2024-11-16 21:07:56 +00:00
319 lines
15 KiB
Plaintext
319 lines
15 KiB
Plaintext
const byte BINARY = 2
|
|
const nomodify byte* COLORRAM = (byte*) 55296
|
|
const byte DECIMAL = $a
|
|
const nomodify byte* DEFAULT_SCREEN = (byte*) 1024
|
|
const byte* DIGITS[] = "0123456789abcdef"z
|
|
const byte HEXADECIMAL = $10
|
|
const nomodify byte LIGHT_BLUE = $e
|
|
const byte OCTAL = 8
|
|
const byte OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS = 1
|
|
const byte RADIX::BINARY = 2
|
|
const byte RADIX::DECIMAL = $a
|
|
const byte RADIX::HEXADECIMAL = $10
|
|
const byte RADIX::OCTAL = 8
|
|
const byte* RADIX_BINARY_VALUES_CHAR[] = { $80, $40, $20, $10, 8, 4, 2 }
|
|
const byte* RADIX_DECIMAL_VALUES_CHAR[] = { $64, $a }
|
|
const word* RADIX_HEXADECIMAL_VALUES[] = { $1000, $100, $10 }
|
|
const byte* RADIX_HEXADECIMAL_VALUES_CHAR[] = { $10 }
|
|
const byte* RADIX_OCTAL_VALUES_CHAR[] = { $40, 8 }
|
|
const byte SIZEOF_STRUCT_PRINTF_BUFFER_NUMBER = $c
|
|
void __start()
|
|
void clrscr()
|
|
byte clrscr::c
|
|
byte clrscr::c#1 reg byte y 20002.0
|
|
byte clrscr::c#2 reg byte y 12501.25
|
|
byte clrscr::l
|
|
byte clrscr::l#1 reg byte x 2002.0
|
|
byte clrscr::l#2 reg byte x 333.6666666666667
|
|
byte* clrscr::line_cols
|
|
byte* clrscr::line_cols#1 line_cols zp[2]:6 1001.0
|
|
byte* clrscr::line_cols#5 line_cols zp[2]:6 1500.375
|
|
byte* clrscr::line_text
|
|
byte* clrscr::line_text#1 line_text zp[2]:11 667.3333333333334
|
|
byte* clrscr::line_text#5 line_text zp[2]:11 1714.7142857142858
|
|
void conio_c64_init()
|
|
const nomodify byte* conio_c64_init::BASIC_CURSOR_LINE = (byte*) 214
|
|
byte conio_c64_init::line
|
|
byte conio_c64_init::line#0 reg byte x 11.0
|
|
byte conio_c64_init::line#2 reg byte x 22.0
|
|
byte conio_cursor_x loadstore zp[1]:15 164837.4725274725
|
|
byte conio_cursor_y loadstore zp[1]:16 2689077.3865546216
|
|
byte* conio_line_color loadstore zp[2]:19 1888890.675213675
|
|
byte* conio_line_text loadstore zp[2]:17 1872883.127118644
|
|
void cputc(byte cputc::c)
|
|
byte cputc::c
|
|
byte cputc::c#0 reg byte a 200002.0
|
|
byte cputc::c#1 reg byte a 200002.0
|
|
byte cputc::c#2 reg byte a 2002.0
|
|
byte cputc::c#3 reg byte a 1100502.5
|
|
void cputln()
|
|
void cputs(to_nomodify byte* cputs::s)
|
|
byte cputs::c
|
|
byte cputs::c#1 reg byte a 100001.0
|
|
to_nomodify byte* cputs::s
|
|
to_nomodify byte* cputs::s#0 s zp[2]:11 50000.5
|
|
to_nomodify byte* cputs::s#2 s zp[2]:11 150001.5
|
|
void cscroll()
|
|
void gotoxy(byte gotoxy::x , byte gotoxy::y)
|
|
byte*~ gotoxy::$5 zp[2]:25 202.0
|
|
byte*~ gotoxy::$6 zp[2]:21 202.0
|
|
word~ gotoxy::$7 zp[2]:21 151.5
|
|
word~ gotoxy::$8 zp[2]:23 202.0
|
|
word~ gotoxy::$9 zp[2]:21 202.0
|
|
word gotoxy::line_offset
|
|
word gotoxy::line_offset#0 line_offset zp[2]:21 101.0
|
|
byte gotoxy::x
|
|
const byte gotoxy::x#2 x = 0
|
|
byte gotoxy::y
|
|
byte gotoxy::y#2 reg byte x 71.0
|
|
byte gotoxy::y#4 reg byte x 67.33333333333333
|
|
void main()
|
|
void* memcpy(void* memcpy::destination , void* memcpy::source , word memcpy::num)
|
|
void* memcpy::destination
|
|
void* memcpy::destination#2 destination zp[2]:28
|
|
byte* memcpy::dst
|
|
byte* memcpy::dst#1 dst zp[2]:28 1.00000000001E11
|
|
byte* memcpy::dst#2 dst zp[2]:28 1.0033333333466667E11
|
|
byte* memcpy::dst#4 dst zp[2]:28 2.000000002E9
|
|
word memcpy::num
|
|
void* memcpy::return
|
|
void* memcpy::source
|
|
void* memcpy::source#2 source zp[2]:13
|
|
byte* memcpy::src
|
|
byte* memcpy::src#1 src zp[2]:13 2.00000000002E11
|
|
byte* memcpy::src#2 src zp[2]:13 1.0025000000125E11
|
|
byte* memcpy::src#4 src zp[2]:13 1.000000001E9
|
|
byte* memcpy::src_end
|
|
byte* memcpy::src_end#0 src_end zp[2]:30 1.262500000025E10
|
|
void* memset(void* memset::str , byte memset::c , word memset::num)
|
|
byte memset::c
|
|
byte memset::c#4 reg byte x 1.4285714285857143E10
|
|
byte* memset::dst
|
|
byte* memset::dst#1 dst zp[2]:13 2.00000000002E11
|
|
byte* memset::dst#2 dst zp[2]:13 1.3366666666833334E11
|
|
byte* memset::dst#4 dst zp[2]:13 2.000000002E9
|
|
byte* memset::end
|
|
byte* memset::end#0 end zp[2]:30 1.6833333333666668E10
|
|
word memset::num
|
|
void* memset::return
|
|
void* memset::str
|
|
void* memset::str#3 str zp[2]:13
|
|
struct printf_buffer_number printf_buffer loadstore mem[12] = {}
|
|
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)
|
|
word~ printf_number_buffer::$19 zp[2]:6 1001.0
|
|
struct printf_buffer_number printf_number_buffer::buffer
|
|
byte* printf_number_buffer::buffer_digits
|
|
byte printf_number_buffer::buffer_sign
|
|
byte printf_number_buffer::buffer_sign#0 buffer_sign zp[1]:3 202.0
|
|
byte printf_number_buffer::buffer_sign#1 buffer_sign zp[1]:3 101.0
|
|
byte printf_number_buffer::buffer_sign#10 buffer_sign zp[1]:3 160.25
|
|
struct printf_format_number printf_number_buffer::format
|
|
byte printf_number_buffer::format_justify_left
|
|
byte printf_number_buffer::format_justify_left#10 format_justify_left zp[1]:5 64.58064516129032
|
|
byte printf_number_buffer::format_min_length
|
|
byte printf_number_buffer::format_min_length#2 reg byte x 100.1
|
|
byte printf_number_buffer::format_radix
|
|
byte printf_number_buffer::format_sign_always
|
|
byte printf_number_buffer::format_upper_case
|
|
byte printf_number_buffer::format_upper_case#10 format_upper_case zp[1]:4 38.5
|
|
byte printf_number_buffer::format_zero_padding
|
|
byte printf_number_buffer::format_zero_padding#1 format_zero_padding zp[1]:2 202.0
|
|
byte printf_number_buffer::format_zero_padding#10 format_zero_padding zp[1]:2 97.0
|
|
signed byte printf_number_buffer::len
|
|
signed byte printf_number_buffer::len#0 reg byte y 1501.5
|
|
signed byte printf_number_buffer::len#1 reg byte y 2002.0
|
|
signed byte printf_number_buffer::len#2 reg byte y 3003.0
|
|
signed byte printf_number_buffer::padding
|
|
signed byte printf_number_buffer::padding#1 padding zp[1]:27 1001.0
|
|
signed byte printf_number_buffer::padding#10 padding zp[1]:27 190.66666666666666
|
|
void printf_padding(byte printf_padding::pad , byte printf_padding::length)
|
|
byte printf_padding::i
|
|
byte printf_padding::i#1 i zp[1]:10 200002.0
|
|
byte printf_padding::i#2 i zp[1]:10 75000.75
|
|
byte printf_padding::length
|
|
byte printf_padding::length#0 length zp[1]:8 2002.0
|
|
byte printf_padding::length#1 length zp[1]:8 2002.0
|
|
byte printf_padding::length#2 length zp[1]:8 2002.0
|
|
byte printf_padding::length#4 length zp[1]:8 17167.333333333332
|
|
byte printf_padding::pad
|
|
byte printf_padding::pad#5 pad zp[1]:9 16666.833333333332
|
|
void printf_schar(signed byte printf_schar::value , byte printf_schar::format_min_length , byte printf_schar::format_justify_left , byte printf_schar::format_sign_always , byte printf_schar::format_zero_padding , byte printf_schar::format_upper_case , byte printf_schar::format_radix)
|
|
struct printf_format_number printf_schar::format
|
|
byte printf_schar::format_justify_left
|
|
byte printf_schar::format_min_length
|
|
byte printf_schar::format_radix
|
|
byte printf_schar::format_radix#2 reg byte y 11.222222222222221
|
|
byte printf_schar::format_sign_always
|
|
byte printf_schar::format_sign_always#2 format_sign_always zp[1]:5 33.666666666666664
|
|
byte printf_schar::format_upper_case
|
|
byte printf_schar::format_zero_padding
|
|
byte printf_schar::format_zero_padding#2 format_zero_padding zp[1]:2 8.416666666666666
|
|
byte printf_schar::uvalue
|
|
signed byte printf_schar::value
|
|
signed byte printf_schar::value#0 reg byte x 101.0
|
|
signed byte printf_schar::value#3 reg byte x 80.8
|
|
signed byte printf_schar::value#5 reg byte x 303.0
|
|
void printf_uint(word printf_uint::uvalue , byte printf_uint::format_min_length , byte printf_uint::format_justify_left , byte printf_uint::format_sign_always , byte printf_uint::format_zero_padding , byte printf_uint::format_upper_case , byte printf_uint::format_radix)
|
|
struct printf_format_number printf_uint::format
|
|
byte printf_uint::format_justify_left
|
|
const byte printf_uint::format_justify_left#0 format_justify_left = 1
|
|
byte printf_uint::format_min_length
|
|
const byte printf_uint::format_min_length#0 format_min_length = $a
|
|
byte printf_uint::format_radix
|
|
byte printf_uint::format_sign_always
|
|
byte printf_uint::format_upper_case
|
|
const byte printf_uint::format_upper_case#0 format_upper_case = 1
|
|
byte printf_uint::format_zero_padding
|
|
const byte printf_uint::format_zero_padding#0 format_zero_padding = 0
|
|
word printf_uint::uvalue
|
|
const word printf_uint::uvalue#0 uvalue = $d80
|
|
word strlen(byte* strlen::str)
|
|
word strlen::len
|
|
word strlen::len#1 len zp[2]:6 100001.0
|
|
word strlen::len#2 len zp[2]:6 50250.75
|
|
word strlen::return
|
|
word strlen::return#2 return zp[2]:6 2002.0
|
|
byte* strlen::str
|
|
byte* strlen::str#0 str zp[2]:11 200002.0
|
|
byte* strlen::str#2 str zp[2]:11 100001.0
|
|
byte* strupr(byte* strupr::str)
|
|
byte~ strupr::$0 reg byte a 200002.0
|
|
byte* strupr::return
|
|
byte* strupr::src
|
|
byte* strupr::src#1 src zp[2]:11 200002.0
|
|
byte* strupr::src#2 src zp[2]:11 71429.28571428571
|
|
byte* strupr::str
|
|
const byte* strupr::str#0 str = (byte*)&printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS
|
|
byte toupper(byte toupper::ch)
|
|
byte toupper::ch
|
|
byte toupper::ch#0 reg byte a 1700002.0000000002
|
|
byte toupper::return
|
|
byte toupper::return#0 reg byte a 2000002.0
|
|
byte toupper::return#2 reg byte a 1033334.6666666667
|
|
byte toupper::return#3 reg byte a 200002.0
|
|
void uctoa(byte uctoa::value , byte* uctoa::buffer , byte uctoa::radix)
|
|
byte~ uctoa::$4 reg byte a 20002.0
|
|
byte* uctoa::buffer
|
|
byte* uctoa::buffer#11 buffer zp[2]:6 3231.230769230769
|
|
byte* uctoa::buffer#14 buffer zp[2]:6 15001.5
|
|
byte* uctoa::buffer#3 buffer zp[2]:6 2002.0
|
|
byte* uctoa::buffer#4 buffer zp[2]:6 20002.0
|
|
byte uctoa::digit
|
|
byte uctoa::digit#1 digit zp[1]:3 20002.0
|
|
byte uctoa::digit#2 digit zp[1]:3 2857.4285714285716
|
|
byte uctoa::digit_value
|
|
byte uctoa::digit_value#0 reg byte y 6000.6
|
|
byte* uctoa::digit_values
|
|
byte* uctoa::digit_values#8 digit_values zp[2]:11 625.0625
|
|
byte uctoa::max_digits
|
|
byte uctoa::max_digits#7 max_digits zp[1]:5 625.0625
|
|
byte uctoa::radix
|
|
byte uctoa::radix#0 reg byte y 1026.25
|
|
byte uctoa::started
|
|
byte uctoa::started#2 started zp[1]:4 5000.5
|
|
byte uctoa::started#4 started zp[1]:4 10001.0
|
|
byte uctoa::value
|
|
byte uctoa::value#0 reg byte x 10001.0
|
|
byte uctoa::value#1 reg byte x 157.42857142857142
|
|
byte uctoa::value#2 reg byte x 6000.857142857143
|
|
byte uctoa::value#6 reg byte x 15001.5
|
|
byte uctoa_append(byte* uctoa_append::buffer , byte uctoa_append::value , byte uctoa_append::sub)
|
|
byte* uctoa_append::buffer
|
|
byte* uctoa_append::buffer#0 buffer zp[2]:6 13750.25
|
|
byte uctoa_append::digit
|
|
byte uctoa_append::digit#1 reg byte y 1.0000001E7
|
|
byte uctoa_append::digit#2 reg byte y 1.00500015E7
|
|
byte uctoa_append::return
|
|
byte uctoa_append::return#0 reg byte x 20002.0
|
|
byte uctoa_append::sub
|
|
byte uctoa_append::sub#0 sub zp[1]:27 3335000.5
|
|
byte uctoa_append::value
|
|
byte uctoa_append::value#0 reg byte x 36667.33333333333
|
|
byte uctoa_append::value#1 reg byte x 2.0000002E7
|
|
byte uctoa_append::value#2 reg byte x 5018334.166666666
|
|
void utoa(word utoa::value , byte* utoa::buffer , byte utoa::radix)
|
|
byte~ utoa::$10 reg byte a 20002.0
|
|
byte~ utoa::$11 reg byte a 2002.0
|
|
byte* utoa::buffer
|
|
byte* utoa::buffer#11 buffer zp[2]:6 3000.4285714285716
|
|
byte* utoa::buffer#14 buffer zp[2]:6 15001.5
|
|
byte* utoa::buffer#3 buffer zp[2]:6 2002.0
|
|
byte* utoa::buffer#4 buffer zp[2]:6 20002.0
|
|
byte utoa::digit
|
|
byte utoa::digit#1 digit zp[1]:5 20002.0
|
|
byte utoa::digit#2 digit zp[1]:5 2857.4285714285716
|
|
word utoa::digit_value
|
|
word utoa::digit_value#0 digit_value zp[2]:28 6000.6
|
|
word* utoa::digit_values
|
|
byte utoa::max_digits
|
|
const byte utoa::max_digits#2 max_digits = 4
|
|
byte utoa::radix
|
|
byte utoa::started
|
|
byte utoa::started#2 reg byte x 5000.5
|
|
byte utoa::started#4 reg byte x 10001.0
|
|
word utoa::value
|
|
word utoa::value#0 value zp[2]:11 10001.0
|
|
word utoa::value#2 value zp[2]:11 5714.857142857143
|
|
word utoa::value#6 value zp[2]:11 15001.5
|
|
word utoa_append(byte* utoa_append::buffer , word utoa_append::value , word utoa_append::sub)
|
|
byte* utoa_append::buffer
|
|
byte* utoa_append::buffer#0 buffer zp[2]:6 13750.25
|
|
byte utoa_append::digit
|
|
byte utoa_append::digit#1 reg byte x 1.0000001E7
|
|
byte utoa_append::digit#2 reg byte x 1.00500015E7
|
|
word utoa_append::return
|
|
word utoa_append::return#0 return zp[2]:11 20002.0
|
|
word utoa_append::sub
|
|
word utoa_append::sub#0 sub zp[2]:28 3335000.5
|
|
word utoa_append::value
|
|
word utoa_append::value#0 value zp[2]:11 36667.33333333333
|
|
word utoa_append::value#1 value zp[2]:11 2.0000002E7
|
|
word utoa_append::value#2 value zp[2]:11 5018334.166666666
|
|
|
|
reg byte x [ conio_c64_init::line#2 conio_c64_init::line#0 ]
|
|
reg byte x [ gotoxy::y#4 gotoxy::y#2 ]
|
|
reg byte x [ clrscr::l#2 clrscr::l#1 ]
|
|
reg byte y [ clrscr::c#2 clrscr::c#1 ]
|
|
reg byte y [ printf_schar::format_radix#2 ]
|
|
zp[1]:2 [ printf_schar::format_zero_padding#2 printf_number_buffer::format_zero_padding#10 printf_number_buffer::format_zero_padding#1 ]
|
|
reg byte x [ printf_schar::value#5 printf_schar::value#0 printf_schar::value#3 ]
|
|
reg byte x [ uctoa::value#2 uctoa::value#6 uctoa::value#1 uctoa::value#0 ]
|
|
reg byte x [ printf_number_buffer::format_min_length#2 ]
|
|
zp[1]:3 [ printf_number_buffer::buffer_sign#10 printf_number_buffer::buffer_sign#1 printf_number_buffer::buffer_sign#0 uctoa::digit#2 uctoa::digit#1 ]
|
|
zp[1]:4 [ printf_number_buffer::format_upper_case#10 uctoa::started#2 uctoa::started#4 ]
|
|
reg byte y [ printf_number_buffer::len#2 printf_number_buffer::len#0 printf_number_buffer::len#1 ]
|
|
zp[1]:5 [ utoa::digit#2 utoa::digit#1 printf_schar::format_sign_always#2 printf_number_buffer::format_justify_left#10 uctoa::max_digits#7 ]
|
|
reg byte x [ utoa::started#2 utoa::started#4 ]
|
|
reg byte x [ uctoa_append::value#2 uctoa_append::value#0 uctoa_append::value#1 ]
|
|
reg byte y [ uctoa_append::digit#2 uctoa_append::digit#1 ]
|
|
zp[2]:6 [ strlen::len#2 strlen::len#1 strlen::return#2 printf_number_buffer::$19 utoa::buffer#11 utoa::buffer#14 utoa::buffer#4 utoa::buffer#3 utoa_append::buffer#0 uctoa::buffer#11 uctoa::buffer#14 uctoa::buffer#4 uctoa::buffer#3 uctoa_append::buffer#0 clrscr::line_cols#5 clrscr::line_cols#1 ]
|
|
zp[1]:8 [ printf_padding::length#4 printf_padding::length#1 printf_padding::length#2 printf_padding::length#0 ]
|
|
zp[1]:9 [ printf_padding::pad#5 ]
|
|
zp[1]:10 [ printf_padding::i#2 printf_padding::i#1 ]
|
|
reg byte a [ cputc::c#3 cputc::c#0 cputc::c#2 cputc::c#1 ]
|
|
zp[2]:11 [ cputs::s#2 cputs::s#0 strupr::src#2 strupr::src#1 strlen::str#2 strlen::str#0 utoa::value#2 utoa::value#6 utoa::value#0 utoa_append::value#2 utoa_append::value#0 utoa_append::value#1 utoa_append::return#0 uctoa::digit_values#8 clrscr::line_text#5 clrscr::line_text#1 ]
|
|
zp[2]:13 [ memset::str#3 memset::dst#2 memset::dst#4 memset::dst#1 memcpy::source#2 memcpy::src#2 memcpy::src#4 memcpy::src#1 ]
|
|
reg byte x [ memset::c#4 ]
|
|
reg byte x [ utoa_append::digit#2 utoa_append::digit#1 ]
|
|
reg byte a [ toupper::return#2 toupper::return#0 toupper::ch#0 ]
|
|
zp[1]:15 [ conio_cursor_x ]
|
|
zp[1]:16 [ conio_cursor_y ]
|
|
zp[2]:17 [ conio_line_text ]
|
|
zp[2]:19 [ conio_line_color ]
|
|
zp[2]:21 [ gotoxy::$7 gotoxy::$9 gotoxy::line_offset#0 gotoxy::$6 ]
|
|
zp[2]:23 [ gotoxy::$8 ]
|
|
zp[2]:25 [ gotoxy::$5 ]
|
|
reg byte y [ uctoa::radix#0 ]
|
|
reg byte a [ uctoa::$4 ]
|
|
reg byte y [ uctoa::digit_value#0 ]
|
|
zp[1]:27 [ uctoa_append::sub#0 printf_number_buffer::padding#10 printf_number_buffer::padding#1 ]
|
|
reg byte x [ uctoa_append::return#0 ]
|
|
reg byte a [ utoa::$11 ]
|
|
reg byte a [ utoa::$10 ]
|
|
zp[2]:28 [ utoa::digit_value#0 utoa_append::sub#0 memcpy::destination#2 memcpy::dst#2 memcpy::dst#4 memcpy::dst#1 ]
|
|
reg byte a [ toupper::return#3 ]
|
|
reg byte a [ strupr::$0 ]
|
|
reg byte a [ cputs::c#1 ]
|
|
zp[2]:30 [ memset::end#0 memcpy::src_end#0 ]
|
|
mem[12] [ printf_buffer ]
|