1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2024-09-29 03:56:15 +00:00
kickc/src/test/ref/prng-xorshift.sym
2021-04-30 17:26:46 +02:00

361 lines
17 KiB
Plaintext

constant byte* const COLORRAM = (byte*) 55296
constant byte* const DEFAULT_SCREEN = (byte*) 1024
constant byte* DIGITS[] = "0123456789abcdef"z
constant const byte LIGHT_BLUE = $e
constant byte OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS = 1
constant byte RADIX::BINARY = 2
constant byte RADIX::DECIMAL = $a
constant byte RADIX::HEXADECIMAL = $10
constant byte RADIX::OCTAL = 8
constant word* RADIX_DECIMAL_VALUES[] = { $2710, $3e8, $64, $a }
constant dword* RADIX_DECIMAL_VALUES_LONG[] = { $3b9aca00, $5f5e100, $989680, $f4240, $186a0, $2710, $3e8, $64, $a }
constant byte SIZEOF_STRUCT_PRINTF_BUFFER_NUMBER = $c
constant const byte WHITE = 1
void __start()
word _rand()
word~ _rand::$0 zp[2]:39 2002.0
word~ _rand::$1 zp[2]:47 2002.0
word~ _rand::$2 zp[2]:45 2002.0
word _rand::return
word _rand::return#0 return zp[2]:31 22.0
word _rand::return#1 return_1 zp[2]:8 202.0
word _rand::return#2 return_1 zp[2]:8 278.25
word _rand_state
word _rand_state#13 _rand_state zp[2]:10 1051.5
word _rand_state#14 _rand_state zp[2]:10 77.88888888888889
word _rand_state#3 _rand_state zp[2]:10 1501.5
word _rand_state#4 _rand_state zp[2]:10 1501.5
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]:22 1001.0
byte* clrscr::line_cols#5 line_cols zp[2]:22 1500.375
byte* clrscr::line_text
byte* clrscr::line_text#1 line_text zp[2]:17 667.3333333333334
byte* clrscr::line_text#5 line_text zp[2]:17 1714.7142857142858
void conio_c64_init()
constant byte* const conio_c64_init::BASIC_CURSOR_LINE = (byte*) 214
byte conio_c64_init::line
byte conio_c64_init::line#0 reg byte a 11.0
byte conio_c64_init::line#2 reg byte a 22.0
byte conio_cursor_x loadstore zp[1]:24 1.5151526363636363E7
byte conio_cursor_y loadstore zp[1]:25 2.8070176411403507E8
byte* conio_line_color loadstore zp[2]:28 2.1250001066346154E8
byte* conio_line_text loadstore zp[2]:26 2.0654206643925232E8
byte conio_textcolor loadstore zp[1]:30 7.26619432086331E7
void cputc(byte cputc::c)
byte cputc::c
byte cputc::c#0 reg byte a 2.0000002E7
byte cputc::c#1 reg byte a 2.0000002E7
byte cputc::c#2 reg byte a 20002.0
byte cputc::c#3 reg byte a 1.100050025E8
void cputln()
void cputs(const byte* cputs::s)
byte cputs::c
byte cputs::c#1 reg byte a 1.0000001E7
const byte* cputs::s
const byte* cputs::s#0 s zp[2]:17 5000000.5
const byte* cputs::s#4 s zp[2]:17 1.5050002E7
const byte* cputs::s#5 s zp[2]:17 100001.0
void cscroll()
void gotoxy(byte gotoxy::x , byte gotoxy::y)
byte*~ gotoxy::$5 zp[2]:37 2002.0
byte*~ gotoxy::$6 zp[2]:33 2002.0
word~ gotoxy::$7 zp[2]:33 1501.5
word~ gotoxy::$8 zp[2]:35 2002.0
word~ gotoxy::$9 zp[2]:33 2002.0
word gotoxy::line_offset
word gotoxy::line_offset#0 line_offset zp[2]:33 1001.0
byte gotoxy::x
byte gotoxy::x#3 reg byte x 101.0
byte gotoxy::x#5 reg byte x 350.5
byte gotoxy::x#6 reg byte x 2002.0
byte gotoxy::y
byte gotoxy::y#2 reg byte a 22.0
byte gotoxy::y#3 reg byte a 202.0
byte gotoxy::y#5 reg byte a 704.6666666666667
byte gotoxy::y#6 reg byte a 333.6666666666667
void main()
byte~ main::$17 reg byte a 202.0
dword main::cnt
dword main::cnt#1 cnt zp[4]:2 9.681818181818182
dword main::cnt#2 cnt zp[4]:2 202.0
byte main::col
byte main::col#1 col zp[1]:6 101.0
byte main::col#3 col zp[1]:6 45.90909090909091
byte main::col#7 col zp[1]:6 80.8
word main::first
word main::first#0 first zp[2]:31 5.590909090909091
word main::rnd
word main::rnd#1 rnd zp[2]:8 151.5
word main::rnd#2 rnd zp[2]:8 30.42857142857143
word main::rnd#5 rnd zp[2]:8 22.0
byte main::row
byte main::row#1 row zp[1]:7 151.5
byte main::row#3 row zp[1]:7 44.888888888888886
byte main::row#7 row zp[1]:7 60.599999999999994
constant byte* main::s[$1d] = "generating unique randoms..."
constant byte* main::s1[7] = "found "
void* memcpy(void* memcpy::destination , void* memcpy::source , word memcpy::num)
void* memcpy::destination
void* memcpy::destination#2 destination zp[2]:39
byte* memcpy::dst
byte* memcpy::dst#1 dst zp[2]:39 1.00000000000001E14
byte* memcpy::dst#2 dst zp[2]:39 1.0003333333333467E14
byte* memcpy::dst#4 dst zp[2]:39 2.00000000002E11
word memcpy::num
void* memcpy::return
void* memcpy::source
void* memcpy::source#2 source zp[2]:22
byte* memcpy::src
byte* memcpy::src#1 src zp[2]:22 2.00000000000002E14
byte* memcpy::src#2 src zp[2]:22 1.0002500000000125E14
byte* memcpy::src#4 src zp[2]:22 1.00000000001E11
byte* memcpy::src_end
byte* memcpy::src_end#0 src_end zp[2]:45 1.251250000000025E13
void* memset(void* memset::str , byte memset::c , word memset::num)
byte memset::c
byte memset::c#1 reg byte x 2.0000000002E10
byte memset::c#4 reg byte x 1.4287142857143143E13
byte* memset::dst
byte* memset::dst#1 dst zp[2]:39 2.00000000000002E14
byte* memset::dst#2 dst zp[2]:39 1.3336666666666834E14
byte* memset::dst#4 dst zp[2]:39 2.00000000002E11
byte* memset::end
byte* memset::end#0 end zp[2]:47 1.6683333333333668E13
word memset::num
void* memset::return
void* memset::str
void* memset::str#3 str zp[2]:39
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]:39 10001.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]:13 202.0
byte printf_number_buffer::buffer_sign#1 buffer_sign zp[1]:13 2002.0
byte printf_number_buffer::buffer_sign#10 buffer_sign zp[1]:13 1555.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]:12 645.2258064516129
byte printf_number_buffer::format_min_length
byte printf_number_buffer::format_min_length#2 reg byte x 1000.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]:14 384.65384615384613
byte printf_number_buffer::format_zero_padding
byte printf_number_buffer::format_zero_padding#10 format_zero_padding zp[1]:16 937.59375
signed byte printf_number_buffer::len
signed byte printf_number_buffer::len#0 reg byte y 15001.5
signed byte printf_number_buffer::len#1 reg byte y 20002.0
signed byte printf_number_buffer::len#2 reg byte y 30003.0
signed byte printf_number_buffer::padding
signed byte printf_number_buffer::padding#1 padding zp[1]:15 10001.0
signed byte printf_number_buffer::padding#10 padding zp[1]:15 1904.952380952381
void printf_padding(byte printf_padding::pad , byte printf_padding::length)
byte printf_padding::i
byte printf_padding::i#1 i zp[1]:21 2.0000002E7
byte printf_padding::i#2 i zp[1]:21 7500000.75
byte printf_padding::length
byte printf_padding::length#0 length zp[1]:19 20002.0
byte printf_padding::length#1 length zp[1]:19 20002.0
byte printf_padding::length#2 length zp[1]:19 20002.0
byte printf_padding::length#4 length zp[1]:19 1671667.3333333333
byte printf_padding::pad
byte printf_padding::pad#5 pad zp[1]:20 1666666.8333333333
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
constant byte printf_uint::format_justify_left#0 format_justify_left = 0
byte printf_uint::format_min_length
constant byte printf_uint::format_min_length#0 format_min_length = 5
byte printf_uint::format_radix
byte printf_uint::format_sign_always
byte printf_uint::format_upper_case
constant byte printf_uint::format_upper_case#0 format_upper_case = 0
byte printf_uint::format_zero_padding
constant byte printf_uint::format_zero_padding#0 format_zero_padding = 0
word printf_uint::uvalue
word printf_uint::uvalue#0 uvalue zp[2]:8 367.33333333333337
void printf_ulong(dword printf_ulong::uvalue , byte printf_ulong::format_min_length , byte printf_ulong::format_justify_left , byte printf_ulong::format_sign_always , byte printf_ulong::format_zero_padding , byte printf_ulong::format_upper_case , byte printf_ulong::format_radix)
struct printf_format_number printf_ulong::format
byte printf_ulong::format_justify_left
constant byte printf_ulong::format_justify_left#0 format_justify_left = 0
byte printf_ulong::format_min_length
constant byte printf_ulong::format_min_length#0 format_min_length = 0
byte printf_ulong::format_radix
byte printf_ulong::format_sign_always
byte printf_ulong::format_upper_case
constant byte printf_ulong::format_upper_case#0 format_upper_case = 0
byte printf_ulong::format_zero_padding
constant byte printf_ulong::format_zero_padding#0 format_zero_padding = 0
dword printf_ulong::uvalue
dword printf_ulong::uvalue#0 uvalue zp[4]:2 37.33333333333333
word strlen(byte* strlen::str)
word strlen::len
word strlen::len#1 len zp[2]:39 1.0000001E7
word strlen::len#2 len zp[2]:39 5002500.75
word strlen::return
word strlen::return#2 return zp[2]:39 20002.0
byte* strlen::str
byte* strlen::str#0 str zp[2]:17 2.0000002E7
byte* strlen::str#2 str zp[2]:17 1.0000001E7
byte* strupr(byte* strupr::str)
byte~ strupr::$0 reg byte a 2.0000002E7
byte* strupr::return
byte* strupr::src
byte* strupr::src#1 src zp[2]:22 2.0000002E7
byte* strupr::src#2 src zp[2]:22 7142857.857142856
byte* strupr::str
constant byte* strupr::str#0 str = (byte*)&printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS
byte textcolor(byte textcolor::color)
byte textcolor::color
byte textcolor::color#2 reg byte a 101.0
byte textcolor::old
byte textcolor::return
byte toupper(byte toupper::ch)
byte toupper::ch
byte toupper::ch#0 reg byte a 1.70000002E8
byte toupper::return
byte toupper::return#0 reg byte a 2.00000002E8
byte toupper::return#2 reg byte a 1.0333333466666667E8
byte toupper::return#3 reg byte a 2.0000002E7
void ultoa(dword ultoa::value , byte* ultoa::buffer , byte ultoa::radix)
byte~ ultoa::$10 reg byte a 20002.0
byte~ ultoa::$11 reg byte a 2002.0
byte* ultoa::buffer
byte* ultoa::buffer#11 buffer zp[2]:17 3000.4285714285716
byte* ultoa::buffer#14 buffer zp[2]:17 15001.5
byte* ultoa::buffer#3 buffer zp[2]:17 2002.0
byte* ultoa::buffer#4 buffer zp[2]:17 20002.0
byte ultoa::digit
byte ultoa::digit#1 digit zp[1]:16 20002.0
byte ultoa::digit#2 digit zp[1]:16 2857.4285714285716
dword ultoa::digit_value
dword ultoa::digit_value#0 digit_value zp[4]:41 6000.6
dword* ultoa::digit_values
byte ultoa::max_digits
constant byte ultoa::max_digits#1 max_digits = $a
byte ultoa::radix
byte ultoa::started
byte ultoa::started#2 reg byte x 5000.5
byte ultoa::started#4 reg byte x 10001.0
dword ultoa::value
dword ultoa::value#0 value zp[4]:2 10001.0
dword ultoa::value#1 value zp[4]:2 551.0
dword ultoa::value#2 value zp[4]:2 5857.857142857143
dword ultoa::value#6 value zp[4]:2 15001.5
dword ultoa_append(byte* ultoa_append::buffer , dword ultoa_append::value , dword ultoa_append::sub)
byte* ultoa_append::buffer
byte* ultoa_append::buffer#0 buffer zp[2]:17 13750.25
byte ultoa_append::digit
byte ultoa_append::digit#1 reg byte x 1.0000001E7
byte ultoa_append::digit#2 reg byte x 1.00500015E7
dword ultoa_append::return
dword ultoa_append::return#0 return zp[4]:2 20002.0
dword ultoa_append::sub
dword ultoa_append::sub#0 sub zp[4]:41 3335000.5
dword ultoa_append::value
dword ultoa_append::value#0 value zp[4]:2 36667.33333333333
dword ultoa_append::value#1 value zp[4]:2 2.0000002E7
dword ultoa_append::value#2 value zp[4]:2 5018334.166666666
void utoa(word utoa::value , byte* utoa::buffer , byte utoa::radix)
byte~ utoa::$10 reg byte a 2000002.0
byte~ utoa::$11 reg byte a 20002.0
byte* utoa::buffer
byte* utoa::buffer#11 buffer zp[2]:22 287143.2857142857
byte* utoa::buffer#14 buffer zp[2]:22 1500001.5
byte* utoa::buffer#3 buffer zp[2]:22 20002.0
byte* utoa::buffer#4 buffer zp[2]:22 2000002.0
byte utoa::digit
byte utoa::digit#1 digit zp[1]:12 2000002.0
byte utoa::digit#2 digit zp[1]:12 285714.5714285714
word utoa::digit_value
word utoa::digit_value#0 digit_value zp[2]:47 600000.6000000001
word* utoa::digit_values
byte utoa::max_digits
constant byte utoa::max_digits#1 max_digits = 5
byte utoa::radix
byte utoa::started
byte utoa::started#2 reg byte x 500000.5
byte utoa::started#4 reg byte x 1000001.0
word utoa::value
word utoa::value#0 value zp[2]:8 1000001.0
word utoa::value#1 value zp[2]:8 5501.0
word utoa::value#2 value zp[2]:8 572857.857142857
word utoa::value#6 value zp[2]:8 1500001.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]:22 1375000.25
byte utoa_append::digit
byte utoa_append::digit#1 reg byte x 1.0000000001E10
byte utoa_append::digit#2 reg byte x 1.00050000015E10
word utoa_append::return
word utoa_append::return#0 return zp[2]:8 2000002.0
word utoa_append::sub
word utoa_append::sub#0 sub zp[2]:47 3.3335000005E9
word utoa_append::value
word utoa_append::value#0 value zp[2]:8 3666667.333333333
word utoa_append::value#1 value zp[2]:8 2.0000000002E10
word utoa_append::value#2 value zp[2]:8 5.001833334166666E9
reg byte a [ conio_c64_init::line#2 conio_c64_init::line#0 ]
zp[4]:2 [ main::cnt#2 main::cnt#1 printf_ulong::uvalue#0 ultoa::value#2 ultoa::value#6 ultoa::value#1 ultoa::value#0 ultoa_append::value#2 ultoa_append::value#0 ultoa_append::value#1 ultoa_append::return#0 ]
zp[1]:6 [ main::col#3 main::col#7 main::col#1 ]
zp[1]:7 [ main::row#3 main::row#7 main::row#1 ]
zp[2]:8 [ main::rnd#2 main::rnd#5 main::rnd#1 printf_uint::uvalue#0 _rand::return#1 utoa::value#2 utoa::value#6 utoa::value#1 utoa::value#0 utoa_append::value#2 utoa_append::value#0 utoa_append::value#1 utoa_append::return#0 _rand::return#2 ]
reg byte a [ gotoxy::y#6 gotoxy::y#5 gotoxy::y#2 gotoxy::y#3 ]
reg byte x [ gotoxy::x#6 gotoxy::x#5 gotoxy::x#3 ]
reg byte x [ clrscr::l#2 clrscr::l#1 ]
reg byte y [ clrscr::c#2 clrscr::c#1 ]
reg byte a [ textcolor::color#2 ]
zp[2]:10 [ _rand_state#13 _rand_state#14 _rand_state#3 _rand_state#4 ]
reg byte a [ cputc::c#3 cputc::c#0 cputc::c#2 cputc::c#1 ]
reg byte x [ utoa::started#2 utoa::started#4 ]
reg byte x [ printf_number_buffer::format_min_length#2 ]
zp[1]:12 [ printf_number_buffer::format_justify_left#10 utoa::digit#2 utoa::digit#1 ]
zp[1]:13 [ printf_number_buffer::buffer_sign#10 printf_number_buffer::buffer_sign#1 printf_number_buffer::buffer_sign#0 ]
zp[1]:14 [ printf_number_buffer::format_upper_case#10 ]
reg byte y [ printf_number_buffer::len#2 printf_number_buffer::len#0 printf_number_buffer::len#1 ]
zp[1]:15 [ printf_number_buffer::padding#10 printf_number_buffer::padding#1 ]
zp[1]:16 [ ultoa::digit#2 ultoa::digit#1 printf_number_buffer::format_zero_padding#10 ]
reg byte x [ ultoa::started#2 ultoa::started#4 ]
reg byte x [ utoa_append::digit#2 utoa_append::digit#1 ]
zp[2]:17 [ strlen::str#2 strlen::str#0 ultoa::buffer#11 ultoa::buffer#14 ultoa::buffer#4 ultoa::buffer#3 ultoa_append::buffer#0 cputs::s#4 cputs::s#5 cputs::s#0 clrscr::line_text#5 clrscr::line_text#1 ]
zp[1]:19 [ printf_padding::length#4 printf_padding::length#1 printf_padding::length#2 printf_padding::length#0 ]
zp[1]:20 [ printf_padding::pad#5 ]
zp[1]:21 [ printf_padding::i#2 printf_padding::i#1 ]
reg byte x [ ultoa_append::digit#2 ultoa_append::digit#1 ]
reg byte a [ toupper::return#2 toupper::return#0 toupper::ch#0 ]
zp[2]:22 [ memcpy::source#2 memcpy::src#2 memcpy::src#4 memcpy::src#1 strupr::src#2 strupr::src#1 utoa::buffer#11 utoa::buffer#14 utoa::buffer#4 utoa::buffer#3 utoa_append::buffer#0 clrscr::line_cols#5 clrscr::line_cols#1 ]
reg byte x [ memset::c#4 memset::c#1 ]
zp[1]:24 [ conio_cursor_x ]
zp[1]:25 [ conio_cursor_y ]
zp[2]:26 [ conio_line_text ]
zp[2]:28 [ conio_line_color ]
zp[1]:30 [ conio_textcolor ]
zp[2]:31 [ _rand::return#0 main::first#0 ]
reg byte a [ main::$17 ]
zp[2]:33 [ gotoxy::$7 gotoxy::$9 gotoxy::line_offset#0 gotoxy::$6 ]
zp[2]:35 [ gotoxy::$8 ]
zp[2]:37 [ gotoxy::$5 ]
reg byte a [ cputs::c#1 ]
zp[2]:39 [ _rand::$0 strlen::len#2 strlen::len#1 strlen::return#2 printf_number_buffer::$19 memset::str#3 memset::dst#2 memset::dst#4 memset::dst#1 memcpy::destination#2 memcpy::dst#2 memcpy::dst#4 memcpy::dst#1 ]
reg byte a [ utoa::$11 ]
reg byte a [ utoa::$10 ]
reg byte a [ ultoa::$11 ]
reg byte a [ ultoa::$10 ]
zp[4]:41 [ ultoa::digit_value#0 ultoa_append::sub#0 ]
reg byte a [ toupper::return#3 ]
reg byte a [ strupr::$0 ]
zp[2]:45 [ memcpy::src_end#0 _rand::$2 ]
zp[2]:47 [ memset::end#0 utoa::digit_value#0 utoa_append::sub#0 _rand::$1 ]
mem[12] [ printf_buffer ]