1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2024-11-25 20:32:25 +00:00

Added memcmp() to <string.h>. Closes #699

This commit is contained in:
jespergravgaard 2021-08-08 00:50:34 +02:00
parent 912f93b93b
commit 6cd1b4928e
7 changed files with 3833 additions and 2198 deletions

View File

@ -15,6 +15,15 @@ void* memmove( void* destination, void* source, size_t num );
/// Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str.
void *memset(void *str, char c, size_t num);
/// Compares the first n bytes of memory area str1 and memory area str2.
/// @param str1 This is the pointer to a block of memory.
/// @param str2 This is the pointer to a block of memory.
/// @param n This is the number of bytes to be compared.
/// @return if Return value < 0 then it indicates str1 is less than str2.
/// if Return value > 0 then it indicates str2 is less than str1.
/// if Return value = 0 then it indicates str1 is equal to str2.
int memcmp(const void *str1, const void *str2, size_t n);
/// Copies the C string pointed by source into the array pointed by destination, including the terminating null character (and stopping at that point).
char* strcpy( char* destination, char* source );

View File

@ -96,6 +96,22 @@ void *memchr(const void *str, char c, size_t n) {
return (void*)0;
}
/// Compares the first n bytes of memory area str1 and memory area str2.
/// @param str1 This is the pointer to a block of memory.
/// @param str2 This is the pointer to a block of memory.
/// @param n This is the number of bytes to be compared.
/// @return if Return value < 0 then it indicates str1 is less than str2.
/// if Return value > 0 then it indicates str2 is less than str1.
/// if Return value = 0 then it indicates str1 is equal to str2.
int memcmp(const void *str1, const void *str2, size_t n) {
for(char *s1 = str1, *s2 = str2; n!=0; n--,s1++,s2++) {
if(*s1!=*s2)
return (int)(signed char)(*s1-*s2);
}
return 0;
}
/// compares the string pointed to, by str1 to the string pointed to by str2.
/// @param str1 This is the first string to be compared.
/// @param str2 This is the second string to be compared.

View File

@ -13,29 +13,33 @@ void assert_cmp(signed char expect, signed char actual, char* message);
void main() {
assert_cmp(LESS_THAN, strcmp("a","b"), "a<b");
assert_cmp(LESS_THAN, strcmp("aaa","aab"), "aaa<aab");
assert_cmp(LESS_THAN, strcmp("aa","aaa"), "aa<aaa");
assert_cmp(EQUAL, strcmp("x","x"), "x=x");
assert_cmp(EQUAL, strcmp("qwez","qwez"), "qwez=qwez");
assert_cmp(GREATER_THAN, strcmp("q","k"), "q>k");
assert_cmp(GREATER_THAN, strcmp("kkkq","kkkp"), "kkkq>kkkp");
assert_cmp(GREATER_THAN, strcmp("kkkq","kkk"), "kkkq>kkk");
assert_cmp(LESS_THAN, strcmp("a","b"), "a<b strcmp()");
assert_cmp(LESS_THAN, strcmp("aaa","aab"), "aaa<aab strcmp()");
assert_cmp(LESS_THAN, strcmp("aa","aaa"), "aa<aaa strcmp()");
assert_cmp(EQUAL, strcmp("x","x"), "x=x strcmp()");
assert_cmp(EQUAL, strcmp("qwez","qwez"), "qwez=qwez strcmp()");
assert_cmp(GREATER_THAN, strcmp("q","k"), "q>k strcmp()");
assert_cmp(GREATER_THAN, strcmp("kkkq","kkkp"), "kkkq>kkkp strcmp()");
assert_cmp(GREATER_THAN, strcmp("kkkq","kkk"), "kkkq>kkk strcmp()");
assert_cmp(LESS_THAN, strncmp("aaax","aabx", 3), "aaax<aabx (3)");
assert_cmp(GREATER_THAN, strncmp("qwe","qee", 3), "qwe>qee (2)");
assert_cmp(EQUAL, strncmp("aab","aac", 2), "aab=aac (2)");
assert_cmp(EQUAL, strncmp("qwex","qwea", 3), "qwex=qwea (3)");
assert_cmp(LESS_THAN, strncmp("aaax","aabx", 3), "aaax<aabx strncmp(3)");
assert_cmp(GREATER_THAN, strncmp("qwe","qee", 3), "qwe>qee strncmp(2)");
assert_cmp(EQUAL, strncmp("aab","aac", 2), "aab=aac strncmp(2)");
assert_cmp(EQUAL, strncmp("qwex","qwea", 3), "qwex=qwea strncmp(3)");
assert_cmp(LESS_THAN, strncmp("aa","aacx", 3), "aa<aacx strncmp(3)");
assert_cmp(LESS_THAN, memcmp("aa","aba", 2), "aa<ab memcmp(2)");
assert_cmp(EQUAL, memcmp("x","x", 2), "x=x memcmp(2)");
assert_cmp(EQUAL, memcmp("xy","xz", 1), "xy=xz memcmp(1)");
assert_cmp(GREATER_THAN, memcmp("qwez","qwex",4), "qwez>qwex memcmp(4)");
for(;;) ;
}
void assert_cmp(signed char expect, signed char actual, char* message) {
char ok = 0;
switch(expect) {
case LESS_THAN:
BREAK();
ok = (char)(actual<0);
break;
case EQUAL:

View File

@ -80,7 +80,7 @@ main: {
sta.z strcmp.s1+1
jsr strcmp
// strcmp("a","b")
// assert_cmp(LESS_THAN, strcmp("a","b"), "a<b")
// assert_cmp(LESS_THAN, strcmp("a","b"), "a<b strcmp()")
lda.z strcmp.return
sta.z assert_cmp.actual
lda #<message
@ -101,7 +101,7 @@ main: {
sta.z strcmp.s1+1
jsr strcmp
// strcmp("aaa","aab")
// assert_cmp(LESS_THAN, strcmp("aaa","aab"), "aaa<aab")
// assert_cmp(LESS_THAN, strcmp("aaa","aab"), "aaa<aab strcmp()")
lda.z strcmp.return
sta.z assert_cmp.actual
lda #<message1
@ -122,7 +122,7 @@ main: {
sta.z strcmp.s1+1
jsr strcmp
// strcmp("aa","aaa")
// assert_cmp(LESS_THAN, strcmp("aa","aaa"), "aa<aaa")
// assert_cmp(LESS_THAN, strcmp("aa","aaa"), "aa<aaa strcmp()")
lda.z strcmp.return
sta.z assert_cmp.actual
lda #<message2
@ -143,7 +143,7 @@ main: {
sta.z strcmp.s1+1
jsr strcmp
// strcmp("x","x")
// assert_cmp(EQUAL, strcmp("x","x"), "x=x")
// assert_cmp(EQUAL, strcmp("x","x"), "x=x strcmp()")
lda.z strcmp.return
sta.z assert_cmp.actual
lda #<message3
@ -164,7 +164,7 @@ main: {
sta.z strcmp.s1+1
jsr strcmp
// strcmp("qwez","qwez")
// assert_cmp(EQUAL, strcmp("qwez","qwez"), "qwez=qwez")
// assert_cmp(EQUAL, strcmp("qwez","qwez"), "qwez=qwez strcmp()")
lda.z strcmp.return
sta.z assert_cmp.actual
lda #<message4
@ -185,7 +185,7 @@ main: {
sta.z strcmp.s1+1
jsr strcmp
// strcmp("q","k")
// assert_cmp(GREATER_THAN, strcmp("q","k"), "q>k")
// assert_cmp(GREATER_THAN, strcmp("q","k"), "q>k strcmp()")
lda.z strcmp.return
sta.z assert_cmp.actual
lda #<message5
@ -206,7 +206,7 @@ main: {
sta.z strcmp.s1+1
jsr strcmp
// strcmp("kkkq","kkkp")
// assert_cmp(GREATER_THAN, strcmp("kkkq","kkkp"), "kkkq>kkkp")
// assert_cmp(GREATER_THAN, strcmp("kkkq","kkkp"), "kkkq>kkkp strcmp()")
lda.z strcmp.return
sta.z assert_cmp.actual
lda #<message6
@ -227,7 +227,7 @@ main: {
sta.z strcmp.s1+1
jsr strcmp
// strcmp("kkkq","kkk")
// assert_cmp(GREATER_THAN, strcmp("kkkq","kkk"), "kkkq>kkk")
// assert_cmp(GREATER_THAN, strcmp("kkkq","kkk"), "kkkq>kkk strcmp()")
lda.z strcmp.return
sta.z assert_cmp.actual
lda #<message7
@ -252,7 +252,7 @@ main: {
sta.z strncmp.s1+1
jsr strncmp
// strncmp("aaax","aabx", 3)
// assert_cmp(LESS_THAN, strncmp("aaax","aabx", 3), "aaax<aabx (3)")
// assert_cmp(LESS_THAN, strncmp("aaax","aabx", 3), "aaax<aabx strncmp(3)")
lda.z strncmp.return
sta.z assert_cmp.actual
lda #<message8
@ -277,7 +277,7 @@ main: {
sta.z strncmp.s1+1
jsr strncmp
// strncmp("qwe","qee", 3)
// assert_cmp(GREATER_THAN, strncmp("qwe","qee", 3), "qwe>qee (2)")
// assert_cmp(GREATER_THAN, strncmp("qwe","qee", 3), "qwe>qee strncmp(2)")
lda.z strncmp.return
sta.z assert_cmp.actual
lda #<message9
@ -302,7 +302,7 @@ main: {
sta.z strncmp.s1+1
jsr strncmp
// strncmp("aab","aac", 2)
// assert_cmp(EQUAL, strncmp("aab","aac", 2), "aab=aac (2)")
// assert_cmp(EQUAL, strncmp("aab","aac", 2), "aab=aac strncmp(2)")
lda.z strncmp.return
sta.z assert_cmp.actual
lda #<message10
@ -327,7 +327,7 @@ main: {
sta.z strncmp.s1+1
jsr strncmp
// strncmp("qwex","qwea", 3)
// assert_cmp(EQUAL, strncmp("qwex","qwea", 3), "qwex=qwea (3)")
// assert_cmp(EQUAL, strncmp("qwex","qwea", 3), "qwex=qwea strncmp(3)")
lda.z strncmp.return
sta.z assert_cmp.actual
lda #<message11
@ -337,6 +337,131 @@ main: {
lda #0
sta.z assert_cmp.expect
jsr assert_cmp
// strncmp("aa","aacx", 3)
lda #<3
sta.z strncmp.n
lda #>3
sta.z strncmp.n+1
lda #<str212
sta.z strncmp.s2
lda #>str212
sta.z strncmp.s2+1
lda #<str12
sta.z strncmp.s1
lda #>str12
sta.z strncmp.s1+1
jsr strncmp
// strncmp("aa","aacx", 3)
// assert_cmp(LESS_THAN, strncmp("aa","aacx", 3), "aa<aacx strncmp(3)")
lda.z strncmp.return
sta.z assert_cmp.actual
lda #<message12
sta.z assert_cmp.message
lda #>message12
sta.z assert_cmp.message+1
lda #-1
sta.z assert_cmp.expect
jsr assert_cmp
// memcmp("aa","aba", 2)
lda #<2
sta.z memcmp.n
lda #>2
sta.z memcmp.n+1
lda #<__35
sta.z memcmp.str2
lda #>__35
sta.z memcmp.str2+1
lda #<str12
sta.z memcmp.str1
lda #>str12
sta.z memcmp.str1+1
jsr memcmp
// memcmp("aa","aba", 2)
// assert_cmp(LESS_THAN, memcmp("aa","aba", 2), "aa<ab memcmp(2)")
lda.z memcmp.return
sta.z assert_cmp.actual
lda #<message13
sta.z assert_cmp.message
lda #>message13
sta.z assert_cmp.message+1
lda #-1
sta.z assert_cmp.expect
jsr assert_cmp
// memcmp("x","x", 2)
lda #<2
sta.z memcmp.n
lda #>2
sta.z memcmp.n+1
lda #<str13
sta.z memcmp.str2
lda #>str13
sta.z memcmp.str2+1
lda #<str13
sta.z memcmp.str1
lda #>str13
sta.z memcmp.str1+1
jsr memcmp
// memcmp("x","x", 2)
// assert_cmp(EQUAL, memcmp("x","x", 2), "x=x memcmp(2)")
lda.z memcmp.return
sta.z assert_cmp.actual
lda #<message14
sta.z assert_cmp.message
lda #>message14
sta.z assert_cmp.message+1
lda #0
sta.z assert_cmp.expect
jsr assert_cmp
// memcmp("xy","xz", 1)
lda #<1
sta.z memcmp.n
lda #>1
sta.z memcmp.n+1
lda #<__39
sta.z memcmp.str2
lda #>__39
sta.z memcmp.str2+1
lda #<__38
sta.z memcmp.str1
lda #>__38
sta.z memcmp.str1+1
jsr memcmp
// memcmp("xy","xz", 1)
// assert_cmp(EQUAL, memcmp("xy","xz", 1), "xy=xz memcmp(1)")
lda.z memcmp.return
sta.z assert_cmp.actual
lda #<message15
sta.z assert_cmp.message
lda #>message15
sta.z assert_cmp.message+1
lda #0
sta.z assert_cmp.expect
jsr assert_cmp
// memcmp("qwez","qwex",4)
lda #<4
sta.z memcmp.n
lda #>4
sta.z memcmp.n+1
lda #<str111
sta.z memcmp.str2
lda #>str111
sta.z memcmp.str2+1
lda #<str14
sta.z memcmp.str1
lda #>str14
sta.z memcmp.str1+1
jsr memcmp
// memcmp("qwez","qwex",4)
// assert_cmp(GREATER_THAN, memcmp("qwez","qwex",4), "qwez>qwex memcmp(4)")
lda.z memcmp.return
sta.z assert_cmp.actual
lda #<message16
sta.z assert_cmp.message
lda #>message16
sta.z assert_cmp.message+1
lda #1
sta.z assert_cmp.expect
jsr assert_cmp
__b1:
jmp __b1
.segment Data
@ -344,63 +469,81 @@ main: {
.byte 0
str2: .text "b"
.byte 0
message: .text "a<b"
message: .text "a<b strcmp()"
.byte 0
str11: .text "aaa"
.byte 0
str21: .text "aab"
.byte 0
message1: .text "aaa<aab"
message1: .text "aaa<aab strcmp()"
.byte 0
str12: .text "aa"
.byte 0
message2: .text "aa<aaa"
message2: .text "aa<aaa strcmp()"
.byte 0
str13: .text "x"
.byte 0
message3: .text "x=x"
message3: .text "x=x strcmp()"
.byte 0
str14: .text "qwez"
.byte 0
message4: .text "qwez=qwez"
message4: .text "qwez=qwez strcmp()"
.byte 0
str15: .text "q"
.byte 0
str25: .text "k"
.byte 0
message5: .text "q>k"
message5: .text "q>k strcmp()"
.byte 0
str16: .text "kkkq"
.byte 0
str26: .text "kkkp"
.byte 0
message6: .text "kkkq>kkkp"
message6: .text "kkkq>kkkp strcmp()"
.byte 0
str27: .text "kkk"
.byte 0
message7: .text "kkkq>kkk"
message7: .text "kkkq>kkk strcmp()"
.byte 0
str18: .text "aaax"
.byte 0
str28: .text "aabx"
.byte 0
message8: .text "aaax<aabx (3)"
message8: .text "aaax<aabx strncmp(3)"
.byte 0
str19: .text "qwe"
.byte 0
str29: .text "qee"
.byte 0
message9: .text "qwe>qee (2)"
message9: .text "qwe>qee strncmp(2)"
.byte 0
str210: .text "aac"
.byte 0
message10: .text "aab=aac (2)"
message10: .text "aab=aac strncmp(2)"
.byte 0
str111: .text "qwex"
.byte 0
str211: .text "qwea"
.byte 0
message11: .text "qwex=qwea (3)"
message11: .text "qwex=qwea strncmp(3)"
.byte 0
str212: .text "aacx"
.byte 0
message12: .text "aa<aacx strncmp(3)"
.byte 0
__35: .text "aba"
.byte 0
message13: .text "aa<ab memcmp(2)"
.byte 0
message14: .text "x=x memcmp(2)"
.byte 0
__38: .text "xy"
.byte 0
__39: .text "xz"
.byte 0
message15: .text "xy=xz memcmp(1)"
.byte 0
message16: .text "qwez>qwex memcmp(4)"
.byte 0
}
.segment Code
@ -487,7 +630,7 @@ gotoxy: {
/// if Return value = 0 then it indicates str1 is equal to str2.
strcmp: {
.label s1 = 4
.label s2 = $a
.label s2 = 6
.label return = $1a
__b1:
// while(*s1==*s2)
@ -537,20 +680,19 @@ assert_cmp: {
.label expect = 2
.label message = 4
// case LESS_THAN:
// BREAK();
// ok = (char)(actual<0);
// break;
lda #-1
cmp.z expect
bne !BREAK1+
jmp BREAK1
!BREAK1:
bne !__b4+
jmp __b4
!__b4:
// case EQUAL:
// ok = (char)(actual==0);
// break;
lda.z expect
cmp #0
beq __b4
beq __b5
// case GREATER_THAN:
// ok = (char)(actual>0);
// break;
@ -570,10 +712,10 @@ assert_cmp: {
rol
!a:
// ok = (char)(actual>0)
jmp __b6
jmp __b7
__b3:
lda #0
__b6:
__b7:
// if(ok)
cmp #0
bne __b1
@ -633,7 +775,7 @@ assert_cmp: {
sta.z cputs.s+1
jsr cputs
rts
__b4:
__b5:
// actual==0
lda.z actual
eor #0
@ -642,10 +784,8 @@ assert_cmp: {
!:
eor #1
// ok = (char)(actual==0)
jmp __b6
BREAK1:
// kickasm
.break
jmp __b7
__b4:
// actual<0
lda.z actual
sec
@ -657,7 +797,7 @@ assert_cmp: {
lda #0
rol
// ok = (char)(actual<0)
jmp __b6
jmp __b7
.segment Data
s: .text "ok! "
.byte 0
@ -678,12 +818,12 @@ assert_cmp: {
/// @return if Return value < 0 then it indicates str1 is less than str2.
/// if Return value > 0 then it indicates str2 is less than str1.
/// if Return value = 0 then it indicates str1 is equal to str2.
// strncmp(word zp(6) n)
// strncmp(word zp(4) n)
strncmp: {
.label s1 = $a
.label s1 = 6
.label s2 = $1a
.label n = 6
.label return = $1c
.label n = 4
.label return = $a
__b1:
// while(*s1==*s2)
ldy #0
@ -735,6 +875,66 @@ strncmp: {
!:
jmp __b1
}
/// Compares the first n bytes of memory area str1 and memory area str2.
/// @param str1 This is the pointer to a block of memory.
/// @param str2 This is the pointer to a block of memory.
/// @param n This is the number of bytes to be compared.
/// @return if Return value < 0 then it indicates str1 is less than str2.
/// if Return value > 0 then it indicates str2 is less than str1.
/// if Return value = 0 then it indicates str1 is equal to str2.
// memcmp(const void* zp(4) str1, const void* zp($a) str2, word zp(6) n)
memcmp: {
.label n = 6
.label s1 = 4
.label s2 = $a
.label return = $1a
.label str1 = 4
.label str2 = $a
__b1:
// for(char *s1 = str1, *s2 = str2; n!=0; n--,s1++,s2++)
lda.z n
ora.z n+1
bne __b2
lda #<0
sta.z return
sta.z return+1
// }
rts
__b2:
// if(*s1!=*s2)
ldy #0
lda (s1),y
cmp (s2),y
beq __b3
// *s1-*s2
lda (s1),y
sec
sbc (s2),y
// return (int)(signed char)(*s1-*s2);
sta.z return
ora #$7f
bmi !+
tya
!:
sta.z return+1
rts
__b3:
// for(char *s1 = str1, *s2 = str2; n!=0; n--,s1++,s2++)
lda.z n
bne !+
dec.z n+1
!:
dec.z n
inc.z s1
bne !+
inc.z s1+1
!:
inc.z s2
bne !+
inc.z s2+1
!:
jmp __b1
}
// Set the color for text output. The old color setting is returned.
// textcolor(byte register(A) color)
textcolor: {
@ -842,10 +1042,10 @@ cputc: {
// - value : The number to be converted to RADIX
// - buffer : receives the string representing the number and zero-termination.
// - radix : The radix to convert the number to (from the enum RADIX)
// uctoa(byte register(X) value, byte* zp($1c) buffer)
// uctoa(byte register(X) value, byte* zp($1a) buffer)
uctoa: {
.label digit_value = $19
.label buffer = $1c
.label buffer = $1a
.label digit = 8
.label started = 9
lda #<printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS
@ -959,9 +1159,9 @@ cputln: {
// - sub : the value of a '1' in the digit. Subtracted continually while the digit is increased.
// (For decimal the subs used are 10000, 1000, 100, 10, 1)
// returns : the value reduced by sub * digit so that it is less than sub.
// uctoa_append(byte* zp($1c) buffer, byte register(X) value, byte zp($19) sub)
// uctoa_append(byte* zp($1a) buffer, byte register(X) value, byte zp($19) sub)
uctoa_append: {
.label buffer = $1c
.label buffer = $1a
.label sub = $19
ldy #0
__b1:

View File

@ -121,451 +121,524 @@ main::@18: scope:[main] from main::@17
main::@19: scope:[main] from main::@18
[62] phi()
[63] call strncmp
[64] strncmp::return#4 = strncmp::return#2
[64] strncmp::return#10 = strncmp::return#2
to:main::@20
main::@20: scope:[main] from main::@19
[65] assert_cmp::actual#9 = strncmp::return#4
[65] assert_cmp::actual#9 = strncmp::return#10
[66] call assert_cmp
to:main::@21
main::@21: scope:[main] from main::@20
[67] phi()
[68] call strncmp
[69] strncmp::return#10 = strncmp::return#2
[69] strncmp::return#11 = strncmp::return#2
to:main::@22
main::@22: scope:[main] from main::@21
[70] assert_cmp::actual#10 = strncmp::return#10
[70] assert_cmp::actual#10 = strncmp::return#11
[71] call assert_cmp
to:main::@23
main::@23: scope:[main] from main::@22
[72] phi()
[73] call strncmp
[74] strncmp::return#11 = strncmp::return#2
[74] strncmp::return#12 = strncmp::return#2
to:main::@24
main::@24: scope:[main] from main::@23
[75] assert_cmp::actual#11 = strncmp::return#11
[75] assert_cmp::actual#11 = strncmp::return#12
[76] call assert_cmp
to:main::@1
main::@1: scope:[main] from main::@1 main::@24
to:main::@25
main::@25: scope:[main] from main::@24
[77] phi()
[78] call strncmp
[79] strncmp::return#13 = strncmp::return#2
to:main::@26
main::@26: scope:[main] from main::@25
[80] assert_cmp::actual#12 = strncmp::return#13
[81] call assert_cmp
to:main::@27
main::@27: scope:[main] from main::@26
[82] phi()
[83] call memcmp
[84] memcmp::return#3 = memcmp::return#2
to:main::@28
main::@28: scope:[main] from main::@27
[85] assert_cmp::actual#13 = memcmp::return#3
[86] call assert_cmp
to:main::@29
main::@29: scope:[main] from main::@28
[87] phi()
[88] call memcmp
[89] memcmp::return#4 = memcmp::return#2
to:main::@30
main::@30: scope:[main] from main::@29
[90] assert_cmp::actual#14 = memcmp::return#4
[91] call assert_cmp
to:main::@31
main::@31: scope:[main] from main::@30
[92] phi()
[93] call memcmp
[94] memcmp::return#10 = memcmp::return#2
to:main::@32
main::@32: scope:[main] from main::@31
[95] assert_cmp::actual#15 = memcmp::return#10
[96] call assert_cmp
to:main::@33
main::@33: scope:[main] from main::@32
[97] phi()
[98] call memcmp
[99] memcmp::return#11 = memcmp::return#2
to:main::@34
main::@34: scope:[main] from main::@33
[100] assert_cmp::actual#16 = memcmp::return#11
[101] call assert_cmp
to:main::@1
main::@1: scope:[main] from main::@1 main::@34
[102] phi()
to:main::@1
void gotoxy(byte gotoxy::x , byte gotoxy::y)
gotoxy: scope:[gotoxy] from conio_c64_init::@1
[78] if(gotoxy::y#2<$19+1) goto gotoxy::@3
[103] if(gotoxy::y#2<$19+1) goto gotoxy::@3
to:gotoxy::@1
gotoxy::@3: scope:[gotoxy] from gotoxy
[79] phi()
[104] phi()
to:gotoxy::@1
gotoxy::@1: scope:[gotoxy] from gotoxy gotoxy::@3
[80] gotoxy::y#4 = phi( gotoxy::@3/gotoxy::y#2, gotoxy/0 )
[105] gotoxy::y#4 = phi( gotoxy::@3/gotoxy::y#2, gotoxy/0 )
to:gotoxy::@2
gotoxy::@2: scope:[gotoxy] from gotoxy::@1
[81] conio_cursor_x = gotoxy::x#2
[82] conio_cursor_y = gotoxy::y#4
[83] gotoxy::$7 = (word)gotoxy::y#4
[84] gotoxy::$8 = gotoxy::$7 << 2
[85] gotoxy::$9 = gotoxy::$8 + gotoxy::$7
[86] gotoxy::line_offset#0 = gotoxy::$9 << 3
[87] gotoxy::$5 = DEFAULT_SCREEN + gotoxy::line_offset#0
[88] conio_line_text = gotoxy::$5
[89] gotoxy::$6 = COLORRAM + gotoxy::line_offset#0
[90] conio_line_color = gotoxy::$6
[106] conio_cursor_x = gotoxy::x#2
[107] conio_cursor_y = gotoxy::y#4
[108] gotoxy::$7 = (word)gotoxy::y#4
[109] gotoxy::$8 = gotoxy::$7 << 2
[110] gotoxy::$9 = gotoxy::$8 + gotoxy::$7
[111] gotoxy::line_offset#0 = gotoxy::$9 << 3
[112] gotoxy::$5 = DEFAULT_SCREEN + gotoxy::line_offset#0
[113] conio_line_text = gotoxy::$5
[114] gotoxy::$6 = COLORRAM + gotoxy::line_offset#0
[115] conio_line_color = gotoxy::$6
to:gotoxy::@return
gotoxy::@return: scope:[gotoxy] from gotoxy::@2
[91] return
[116] return
to:@return
signed word strcmp(const byte* strcmp::str1 , const byte* strcmp::str2)
strcmp: scope:[strcmp] from main main::@11 main::@13 main::@15 main::@3 main::@5 main::@7 main::@9
[92] strcmp::s2#0 = phi( main/main::str2, main::@11/main::str25, main::@13/main::str26, main::@15/main::str27, main::@3/main::str21, main::@5/main::str11, main::@7/main::str13, main::@9/main::str14 )
[92] strcmp::s1#0 = phi( main/main::str1, main::@11/main::str15, main::@13/main::str16, main::@15/main::str16, main::@3/main::str11, main::@5/main::str12, main::@7/main::str13, main::@9/main::str14 )
[117] strcmp::s2#0 = phi( main/main::str2, main::@11/main::str25, main::@13/main::str26, main::@15/main::str27, main::@3/main::str21, main::@5/main::str11, main::@7/main::str13, main::@9/main::str14 )
[117] strcmp::s1#0 = phi( main/main::str1, main::@11/main::str15, main::@13/main::str16, main::@15/main::str16, main::@3/main::str11, main::@5/main::str12, main::@7/main::str13, main::@9/main::str14 )
to:strcmp::@1
strcmp::@1: scope:[strcmp] from strcmp strcmp::@4
[93] strcmp::s2#2 = phi( strcmp/strcmp::s2#0, strcmp::@4/strcmp::s2#1 )
[93] strcmp::s1#2 = phi( strcmp/strcmp::s1#0, strcmp::@4/strcmp::s1#1 )
[94] if(*strcmp::s1#2==*strcmp::s2#2) goto strcmp::@2
[118] strcmp::s2#2 = phi( strcmp/strcmp::s2#0, strcmp::@4/strcmp::s2#1 )
[118] strcmp::s1#2 = phi( strcmp/strcmp::s1#0, strcmp::@4/strcmp::s1#1 )
[119] if(*strcmp::s1#2==*strcmp::s2#2) goto strcmp::@2
to:strcmp::@3
strcmp::@3: scope:[strcmp] from strcmp::@1
[95] strcmp::$0 = *strcmp::s1#2 - *strcmp::s2#2
[96] strcmp::return#0 = (signed word)(signed byte)strcmp::$0
[120] strcmp::$0 = *strcmp::s1#2 - *strcmp::s2#2
[121] strcmp::return#0 = (signed word)(signed byte)strcmp::$0
to:strcmp::@return
strcmp::@return: scope:[strcmp] from strcmp::@2 strcmp::@3
[97] strcmp::return#11 = phi( strcmp::@3/strcmp::return#0, strcmp::@2/0 )
[98] return
[122] strcmp::return#11 = phi( strcmp::@3/strcmp::return#0, strcmp::@2/0 )
[123] return
to:@return
strcmp::@2: scope:[strcmp] from strcmp::@1
[99] if(*strcmp::s1#2!=0) goto strcmp::@4
[124] if(*strcmp::s1#2!=0) goto strcmp::@4
to:strcmp::@return
strcmp::@4: scope:[strcmp] from strcmp::@2
[100] strcmp::s1#1 = ++ strcmp::s1#2
[101] strcmp::s2#1 = ++ strcmp::s2#2
[125] strcmp::s1#1 = ++ strcmp::s1#2
[126] strcmp::s2#1 = ++ strcmp::s2#2
to:strcmp::@1
void assert_cmp(signed byte assert_cmp::expect , signed byte assert_cmp::actual , byte* assert_cmp::message)
assert_cmp: scope:[assert_cmp] from main::@10 main::@12 main::@14 main::@16 main::@18 main::@2 main::@20 main::@22 main::@24 main::@4 main::@6 main::@8
[102] assert_cmp::message#12 = phi( main::@10/main::message4, main::@12/main::message5, main::@14/main::message6, main::@16/main::message7, main::@18/main::message8, main::@2/main::message, main::@20/main::message9, main::@22/main::message10, main::@24/main::message11, main::@4/main::message1, main::@6/main::message2, main::@8/main::message3 )
[102] assert_cmp::actual#12 = phi( main::@10/assert_cmp::actual#4, main::@12/assert_cmp::actual#5, main::@14/assert_cmp::actual#6, main::@16/assert_cmp::actual#7, main::@18/assert_cmp::actual#8, main::@2/assert_cmp::actual#0, main::@20/assert_cmp::actual#9, main::@22/assert_cmp::actual#10, main::@24/assert_cmp::actual#11, main::@4/assert_cmp::actual#1, main::@6/assert_cmp::actual#2, main::@8/assert_cmp::actual#3 )
[102] assert_cmp::expect#12 = phi( main::@10/0, main::@12/1, main::@14/1, main::@16/1, main::@18/-1, main::@2/-1, main::@20/1, main::@22/0, main::@24/0, main::@4/-1, main::@6/-1, main::@8/0 )
[103] if(assert_cmp::expect#12==-1) goto assert_cmp::BREAK1
assert_cmp: scope:[assert_cmp] from main::@10 main::@12 main::@14 main::@16 main::@18 main::@2 main::@20 main::@22 main::@24 main::@26 main::@28 main::@30 main::@32 main::@34 main::@4 main::@6 main::@8
[127] assert_cmp::message#17 = phi( main::@10/main::message4, main::@12/main::message5, main::@14/main::message6, main::@16/main::message7, main::@18/main::message8, main::@2/main::message, main::@20/main::message9, main::@22/main::message10, main::@24/main::message11, main::@26/main::message12, main::@28/main::message13, main::@30/main::message14, main::@32/main::message15, main::@34/main::message16, main::@4/main::message1, main::@6/main::message2, main::@8/main::message3 )
[127] assert_cmp::actual#17 = phi( main::@10/assert_cmp::actual#4, main::@12/assert_cmp::actual#5, main::@14/assert_cmp::actual#6, main::@16/assert_cmp::actual#7, main::@18/assert_cmp::actual#8, main::@2/assert_cmp::actual#0, main::@20/assert_cmp::actual#9, main::@22/assert_cmp::actual#10, main::@24/assert_cmp::actual#11, main::@26/assert_cmp::actual#12, main::@28/assert_cmp::actual#13, main::@30/assert_cmp::actual#14, main::@32/assert_cmp::actual#15, main::@34/assert_cmp::actual#16, main::@4/assert_cmp::actual#1, main::@6/assert_cmp::actual#2, main::@8/assert_cmp::actual#3 )
[127] assert_cmp::expect#17 = phi( main::@10/0, main::@12/1, main::@14/1, main::@16/1, main::@18/-1, main::@2/-1, main::@20/1, main::@22/0, main::@24/0, main::@26/-1, main::@28/-1, main::@30/0, main::@32/0, main::@34/1, main::@4/-1, main::@6/-1, main::@8/0 )
[128] if(assert_cmp::expect#17==-1) goto assert_cmp::@4
to:assert_cmp::@2
assert_cmp::@2: scope:[assert_cmp] from assert_cmp
[104] if(assert_cmp::expect#12==0) goto assert_cmp::@4
[129] if(assert_cmp::expect#17==0) goto assert_cmp::@5
to:assert_cmp::@3
assert_cmp::@3: scope:[assert_cmp] from assert_cmp::@2
[105] if(assert_cmp::expect#12!=1) goto assert_cmp::@6
to:assert_cmp::@5
assert_cmp::@5: scope:[assert_cmp] from assert_cmp::@3
[106] assert_cmp::$3 = assert_cmp::actual#12 > 0
[107] assert_cmp::ok#3 = (byte)assert_cmp::$3
[130] if(assert_cmp::expect#17!=1) goto assert_cmp::@7
to:assert_cmp::@6
assert_cmp::@6: scope:[assert_cmp] from assert_cmp::@3 assert_cmp::@4 assert_cmp::@5 assert_cmp::@8
[108] assert_cmp::ok#4 = phi( assert_cmp::@3/0, assert_cmp::@4/assert_cmp::ok#2, assert_cmp::@5/assert_cmp::ok#3, assert_cmp::@8/assert_cmp::ok#1 )
[109] if(0!=assert_cmp::ok#4) goto assert_cmp::@1
assert_cmp::@6: scope:[assert_cmp] from assert_cmp::@3
[131] assert_cmp::$2 = assert_cmp::actual#17 > 0
[132] assert_cmp::ok#3 = (byte)assert_cmp::$2
to:assert_cmp::@7
assert_cmp::@7: scope:[assert_cmp] from assert_cmp::@6
[110] phi()
[111] call textcolor
assert_cmp::@7: scope:[assert_cmp] from assert_cmp::@3 assert_cmp::@4 assert_cmp::@5 assert_cmp::@6
[133] assert_cmp::ok#4 = phi( assert_cmp::@3/0, assert_cmp::@4/assert_cmp::ok#1, assert_cmp::@5/assert_cmp::ok#2, assert_cmp::@6/assert_cmp::ok#3 )
[134] if(0!=assert_cmp::ok#4) goto assert_cmp::@1
to:assert_cmp::@8
assert_cmp::@8: scope:[assert_cmp] from assert_cmp::@7
[135] phi()
[136] call textcolor
to:assert_cmp::@12
assert_cmp::@12: scope:[assert_cmp] from assert_cmp::@7
[112] phi()
[113] call cputs
assert_cmp::@12: scope:[assert_cmp] from assert_cmp::@8
[137] phi()
[138] call cputs
to:assert_cmp::@13
assert_cmp::@13: scope:[assert_cmp] from assert_cmp::@12
[114] printf_schar::value#1 = assert_cmp::expect#12
[115] call printf_schar
[139] printf_schar::value#1 = assert_cmp::expect#17
[140] call printf_schar
to:assert_cmp::@14
assert_cmp::@14: scope:[assert_cmp] from assert_cmp::@13
[116] phi()
[117] call cputs
[141] phi()
[142] call cputs
to:assert_cmp::@15
assert_cmp::@15: scope:[assert_cmp] from assert_cmp::@14
[118] printf_schar::value#2 = assert_cmp::actual#12
[119] call printf_schar
[143] printf_schar::value#2 = assert_cmp::actual#17
[144] call printf_schar
to:assert_cmp::@16
assert_cmp::@16: scope:[assert_cmp] from assert_cmp::@15
[120] phi()
[121] call cputs
[145] phi()
[146] call cputs
to:assert_cmp::@17
assert_cmp::@17: scope:[assert_cmp] from assert_cmp::@16
[122] printf_string::str#1 = assert_cmp::message#12
[123] call printf_string
[147] printf_string::str#1 = assert_cmp::message#17
[148] call printf_string
to:assert_cmp::@18
assert_cmp::@18: scope:[assert_cmp] from assert_cmp::@17
[124] phi()
[125] call cputs
[149] phi()
[150] call cputs
to:assert_cmp::@return
assert_cmp::@return: scope:[assert_cmp] from assert_cmp::@11 assert_cmp::@18
[126] return
[151] return
to:@return
assert_cmp::@1: scope:[assert_cmp] from assert_cmp::@6
[127] phi()
[128] call textcolor
assert_cmp::@1: scope:[assert_cmp] from assert_cmp::@7
[152] phi()
[153] call textcolor
to:assert_cmp::@9
assert_cmp::@9: scope:[assert_cmp] from assert_cmp::@1
[129] phi()
[130] call cputs
[154] phi()
[155] call cputs
to:assert_cmp::@10
assert_cmp::@10: scope:[assert_cmp] from assert_cmp::@9
[131] printf_string::str#0 = assert_cmp::message#12
[132] call printf_string
[156] printf_string::str#0 = assert_cmp::message#17
[157] call printf_string
to:assert_cmp::@11
assert_cmp::@11: scope:[assert_cmp] from assert_cmp::@10
[133] phi()
[134] call cputs
[158] phi()
[159] call cputs
to:assert_cmp::@return
assert_cmp::@4: scope:[assert_cmp] from assert_cmp::@2
[135] assert_cmp::$2 = assert_cmp::actual#12 == 0
[136] assert_cmp::ok#2 = (byte)assert_cmp::$2
to:assert_cmp::@6
assert_cmp::BREAK1: scope:[assert_cmp] from assert_cmp
kickasm() {{ .break }}
to:assert_cmp::@8
assert_cmp::@8: scope:[assert_cmp] from assert_cmp::BREAK1
[138] assert_cmp::$1 = assert_cmp::actual#12 < 0
[139] assert_cmp::ok#1 = (byte)assert_cmp::$1
to:assert_cmp::@6
assert_cmp::@5: scope:[assert_cmp] from assert_cmp::@2
[160] assert_cmp::$1 = assert_cmp::actual#17 == 0
[161] assert_cmp::ok#2 = (byte)assert_cmp::$1
to:assert_cmp::@7
assert_cmp::@4: scope:[assert_cmp] from assert_cmp
[162] assert_cmp::$0 = assert_cmp::actual#17 < 0
[163] assert_cmp::ok#1 = (byte)assert_cmp::$0
to:assert_cmp::@7
signed word strncmp(const byte* strncmp::str1 , const byte* strncmp::str2 , word strncmp::n)
strncmp: scope:[strncmp] from main::@17 main::@19 main::@21 main::@23
[140] strncmp::n#7 = phi( main::@17/3, main::@19/3, main::@21/2, main::@23/3 )
[140] strncmp::s2#0 = phi( main::@17/main::str28, main::@19/main::str29, main::@21/main::str210, main::@23/main::str211 )
[140] strncmp::s1#0 = phi( main::@17/main::str18, main::@19/main::str19, main::@21/main::str21, main::@23/main::str111 )
strncmp: scope:[strncmp] from main::@17 main::@19 main::@21 main::@23 main::@25
[164] strncmp::n#8 = phi( main::@17/3, main::@19/3, main::@21/2, main::@23/3, main::@25/3 )
[164] strncmp::s2#0 = phi( main::@17/main::str28, main::@19/main::str29, main::@21/main::str210, main::@23/main::str211, main::@25/main::str212 )
[164] strncmp::s1#0 = phi( main::@17/main::str18, main::@19/main::str19, main::@21/main::str21, main::@23/main::str111, main::@25/main::str12 )
to:strncmp::@1
strncmp::@1: scope:[strncmp] from strncmp strncmp::@4
[141] strncmp::n#5 = phi( strncmp/strncmp::n#7, strncmp::@4/strncmp::n#0 )
[141] strncmp::s2#2 = phi( strncmp/strncmp::s2#0, strncmp::@4/strncmp::s2#1 )
[141] strncmp::s1#2 = phi( strncmp/strncmp::s1#0, strncmp::@4/strncmp::s1#1 )
[142] if(*strncmp::s1#2==*strncmp::s2#2) goto strncmp::@2
[165] strncmp::n#6 = phi( strncmp/strncmp::n#8, strncmp::@4/strncmp::n#0 )
[165] strncmp::s2#2 = phi( strncmp/strncmp::s2#0, strncmp::@4/strncmp::s2#1 )
[165] strncmp::s1#2 = phi( strncmp/strncmp::s1#0, strncmp::@4/strncmp::s1#1 )
[166] if(*strncmp::s1#2==*strncmp::s2#2) goto strncmp::@2
to:strncmp::@3
strncmp::@3: scope:[strncmp] from strncmp::@1
[143] strncmp::$0 = *strncmp::s1#2 - *strncmp::s2#2
[144] strncmp::return#0 = (signed word)(signed byte)strncmp::$0
[167] strncmp::$0 = *strncmp::s1#2 - *strncmp::s2#2
[168] strncmp::return#0 = (signed word)(signed byte)strncmp::$0
to:strncmp::@return
strncmp::@return: scope:[strncmp] from strncmp::@2 strncmp::@3 strncmp::@5
[145] strncmp::return#2 = phi( strncmp::@3/strncmp::return#0, strncmp::@2/0, strncmp::@5/0 )
[146] return
[169] strncmp::return#2 = phi( strncmp::@3/strncmp::return#0, strncmp::@2/0, strncmp::@5/0 )
[170] return
to:@return
strncmp::@2: scope:[strncmp] from strncmp::@1
[147] strncmp::n#0 = -- strncmp::n#5
[148] if(*strncmp::s1#2==0) goto strncmp::@return
[171] strncmp::n#0 = -- strncmp::n#6
[172] if(*strncmp::s1#2==0) goto strncmp::@return
to:strncmp::@5
strncmp::@5: scope:[strncmp] from strncmp::@2
[149] if(strncmp::n#0==0) goto strncmp::@return
[173] if(strncmp::n#0==0) goto strncmp::@return
to:strncmp::@4
strncmp::@4: scope:[strncmp] from strncmp::@5
[150] strncmp::s1#1 = ++ strncmp::s1#2
[151] strncmp::s2#1 = ++ strncmp::s2#2
[174] strncmp::s1#1 = ++ strncmp::s1#2
[175] strncmp::s2#1 = ++ strncmp::s2#2
to:strncmp::@1
signed word memcmp(const void* memcmp::str1 , const void* memcmp::str2 , word memcmp::n)
memcmp: scope:[memcmp] from main::@27 main::@29 main::@31 main::@33
[176] memcmp::n#7 = phi( main::@27/2, main::@29/2, main::@31/1, main::@33/4 )
[176] memcmp::str2#4 = phi( main::@27/(const void*)main::$35, main::@29/(const void*)main::str13, main::@31/(const void*)main::$39, main::@33/(const void*)main::str111 )
[176] memcmp::str1#4 = phi( main::@27/(const void*)main::str12, main::@29/(const void*)main::str13, main::@31/(const void*)main::$38, main::@33/(const void*)main::str14 )
[177] memcmp::s1#6 = (byte*)memcmp::str1#4
[178] memcmp::s2#6 = (byte*)memcmp::str2#4
to:memcmp::@1
memcmp::@1: scope:[memcmp] from memcmp memcmp::@3
[179] memcmp::s2#2 = phi( memcmp/memcmp::s2#6, memcmp::@3/memcmp::s2#1 )
[179] memcmp::s1#2 = phi( memcmp/memcmp::s1#6, memcmp::@3/memcmp::s1#1 )
[179] memcmp::n#5 = phi( memcmp/memcmp::n#7, memcmp::@3/memcmp::n#0 )
[180] if(memcmp::n#5!=0) goto memcmp::@2
to:memcmp::@return
memcmp::@return: scope:[memcmp] from memcmp::@1 memcmp::@4
[181] memcmp::return#2 = phi( memcmp::@1/0, memcmp::@4/memcmp::return#1 )
[182] return
to:@return
memcmp::@2: scope:[memcmp] from memcmp::@1
[183] if(*memcmp::s1#2==*memcmp::s2#2) goto memcmp::@3
to:memcmp::@4
memcmp::@4: scope:[memcmp] from memcmp::@2
[184] memcmp::$3 = *memcmp::s1#2 - *memcmp::s2#2
[185] memcmp::return#1 = (signed word)(signed byte)memcmp::$3
to:memcmp::@return
memcmp::@3: scope:[memcmp] from memcmp::@2
[186] memcmp::n#0 = -- memcmp::n#5
[187] memcmp::s1#1 = ++ memcmp::s1#2
[188] memcmp::s2#1 = ++ memcmp::s2#2
to:memcmp::@1
byte textcolor(byte textcolor::color)
textcolor: scope:[textcolor] from assert_cmp::@1 assert_cmp::@7
[152] textcolor::color#2 = phi( assert_cmp::@1/GREEN, assert_cmp::@7/RED )
[153] conio_textcolor = textcolor::color#2
textcolor: scope:[textcolor] from assert_cmp::@1 assert_cmp::@8
[189] textcolor::color#2 = phi( assert_cmp::@1/GREEN, assert_cmp::@8/RED )
[190] conio_textcolor = textcolor::color#2
to:textcolor::@return
textcolor::@return: scope:[textcolor] from textcolor
[154] return
[191] return
to:@return
void cputs(const byte* cputs::s)
cputs: scope:[cputs] from assert_cmp::@11 assert_cmp::@12 assert_cmp::@14 assert_cmp::@16 assert_cmp::@18 assert_cmp::@9 printf_number_buffer::@2 printf_string::@1
[155] cputs::s#10 = phi( assert_cmp::@11/assert_cmp::s1, assert_cmp::@12/assert_cmp::s2, assert_cmp::@14/assert_cmp::s3, assert_cmp::@16/assert_cmp::s4, assert_cmp::@18/assert_cmp::s1, assert_cmp::@9/assert_cmp::s, printf_number_buffer::@2/printf_number_buffer::buffer_digits#0, printf_string::@1/cputs::s#2 )
[192] cputs::s#10 = phi( assert_cmp::@11/assert_cmp::s1, assert_cmp::@12/assert_cmp::s2, assert_cmp::@14/assert_cmp::s3, assert_cmp::@16/assert_cmp::s4, assert_cmp::@18/assert_cmp::s1, assert_cmp::@9/assert_cmp::s, printf_number_buffer::@2/printf_number_buffer::buffer_digits#0, printf_string::@1/cputs::s#2 )
to:cputs::@1
cputs::@1: scope:[cputs] from cputs cputs::@2
[156] cputs::s#9 = phi( cputs/cputs::s#10, cputs::@2/cputs::s#0 )
[157] cputs::c#1 = *cputs::s#9
[158] cputs::s#0 = ++ cputs::s#9
[159] if(0!=cputs::c#1) goto cputs::@2
[193] cputs::s#9 = phi( cputs/cputs::s#10, cputs::@2/cputs::s#0 )
[194] cputs::c#1 = *cputs::s#9
[195] cputs::s#0 = ++ cputs::s#9
[196] if(0!=cputs::c#1) goto cputs::@2
to:cputs::@return
cputs::@return: scope:[cputs] from cputs::@1
[160] return
[197] return
to:@return
cputs::@2: scope:[cputs] from cputs::@1
[161] cputc::c#0 = cputs::c#1
[162] call cputc
[198] cputc::c#0 = cputs::c#1
[199] call cputc
to:cputs::@1
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)
printf_schar: scope:[printf_schar] from assert_cmp::@13 assert_cmp::@15
[163] printf_schar::value#3 = phi( assert_cmp::@13/printf_schar::value#1, assert_cmp::@15/printf_schar::value#2 )
[164] *((byte*)&printf_buffer) = 0
[165] if(printf_schar::value#3<0) goto printf_schar::@1
[200] printf_schar::value#3 = phi( assert_cmp::@13/printf_schar::value#1, assert_cmp::@15/printf_schar::value#2 )
[201] *((byte*)&printf_buffer) = 0
[202] if(printf_schar::value#3<0) goto printf_schar::@1
to:printf_schar::@2
printf_schar::@1: scope:[printf_schar] from printf_schar
[166] printf_schar::value#0 = - printf_schar::value#3
[167] *((byte*)&printf_buffer) = '-'
[203] printf_schar::value#0 = - printf_schar::value#3
[204] *((byte*)&printf_buffer) = '-'
to:printf_schar::@2
printf_schar::@2: scope:[printf_schar] from printf_schar printf_schar::@1
[168] printf_schar::value#5 = phi( printf_schar::@1/printf_schar::value#0, printf_schar/printf_schar::value#3 )
[169] uctoa::value#1 = (byte)printf_schar::value#5
[170] call uctoa
[205] printf_schar::value#5 = phi( printf_schar::@1/printf_schar::value#0, printf_schar/printf_schar::value#3 )
[206] uctoa::value#1 = (byte)printf_schar::value#5
[207] call uctoa
to:printf_schar::@3
printf_schar::@3: scope:[printf_schar] from printf_schar::@2
[171] printf_number_buffer::buffer_sign#0 = *((byte*)&printf_buffer)
[172] call printf_number_buffer
[208] printf_number_buffer::buffer_sign#0 = *((byte*)&printf_buffer)
[209] call printf_number_buffer
to:printf_schar::@return
printf_schar::@return: scope:[printf_schar] from printf_schar::@3
[173] return
[210] return
to:@return
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 assert_cmp::@10 assert_cmp::@17
[174] printf_string::str#2 = phi( assert_cmp::@10/printf_string::str#0, assert_cmp::@17/printf_string::str#1 )
[211] printf_string::str#2 = phi( assert_cmp::@10/printf_string::str#0, assert_cmp::@17/printf_string::str#1 )
to:printf_string::@1
printf_string::@1: scope:[printf_string] from printf_string
[175] cputs::s#2 = printf_string::str#2
[176] call cputs
[212] cputs::s#2 = printf_string::str#2
[213] call cputs
to:printf_string::@return
printf_string::@return: scope:[printf_string] from printf_string::@1
[177] return
[214] return
to:@return
void cputc(byte cputc::c)
cputc: scope:[cputc] from cputs::@2 printf_number_buffer::@3
[178] cputc::c#3 = phi( cputs::@2/cputc::c#0, printf_number_buffer::@3/cputc::c#2 )
[179] if(cputc::c#3=='
[215] cputc::c#3 = phi( cputs::@2/cputc::c#0, printf_number_buffer::@3/cputc::c#2 )
[216] if(cputc::c#3=='
') goto cputc::@1
to:cputc::@2
cputc::@2: scope:[cputc] from cputc
[180] conio_line_text[conio_cursor_x] = cputc::c#3
[181] conio_line_color[conio_cursor_x] = conio_textcolor
[182] conio_cursor_x = ++ conio_cursor_x
[183] if(conio_cursor_x!=$28) goto cputc::@return
[217] conio_line_text[conio_cursor_x] = cputc::c#3
[218] conio_line_color[conio_cursor_x] = conio_textcolor
[219] conio_cursor_x = ++ conio_cursor_x
[220] if(conio_cursor_x!=$28) goto cputc::@return
to:cputc::@3
cputc::@3: scope:[cputc] from cputc::@2
[184] phi()
[185] call cputln
[221] phi()
[222] call cputln
to:cputc::@return
cputc::@return: scope:[cputc] from cputc::@1 cputc::@2 cputc::@3
[186] return
[223] return
to:@return
cputc::@1: scope:[cputc] from cputc
[187] phi()
[188] call cputln
[224] phi()
[225] call cputln
to:cputc::@return
void uctoa(byte uctoa::value , byte* uctoa::buffer , byte uctoa::radix)
uctoa: scope:[uctoa] from printf_schar::@2
[189] phi()
[226] phi()
to:uctoa::@1
uctoa::@1: scope:[uctoa] from uctoa uctoa::@4
[190] uctoa::buffer#11 = phi( uctoa::@4/uctoa::buffer#14, uctoa/(byte*)&printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS )
[190] uctoa::started#2 = phi( uctoa::@4/uctoa::started#4, uctoa/0 )
[190] uctoa::value#2 = phi( uctoa::@4/uctoa::value#6, uctoa/uctoa::value#1 )
[190] uctoa::digit#2 = phi( uctoa::@4/uctoa::digit#1, uctoa/0 )
[191] if(uctoa::digit#2<3-1) goto uctoa::@2
[227] uctoa::buffer#11 = phi( uctoa::@4/uctoa::buffer#14, uctoa/(byte*)&printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS )
[227] uctoa::started#2 = phi( uctoa::@4/uctoa::started#4, uctoa/0 )
[227] uctoa::value#2 = phi( uctoa::@4/uctoa::value#6, uctoa/uctoa::value#1 )
[227] uctoa::digit#2 = phi( uctoa::@4/uctoa::digit#1, uctoa/0 )
[228] if(uctoa::digit#2<3-1) goto uctoa::@2
to:uctoa::@3
uctoa::@3: scope:[uctoa] from uctoa::@1
[192] *uctoa::buffer#11 = DIGITS[uctoa::value#2]
[193] uctoa::buffer#3 = ++ uctoa::buffer#11
[194] *uctoa::buffer#3 = 0
[229] *uctoa::buffer#11 = DIGITS[uctoa::value#2]
[230] uctoa::buffer#3 = ++ uctoa::buffer#11
[231] *uctoa::buffer#3 = 0
to:uctoa::@return
uctoa::@return: scope:[uctoa] from uctoa::@3
[195] return
[232] return
to:@return
uctoa::@2: scope:[uctoa] from uctoa::@1
[196] uctoa::digit_value#0 = RADIX_DECIMAL_VALUES_CHAR[uctoa::digit#2]
[197] if(0!=uctoa::started#2) goto uctoa::@5
[233] uctoa::digit_value#0 = RADIX_DECIMAL_VALUES_CHAR[uctoa::digit#2]
[234] if(0!=uctoa::started#2) goto uctoa::@5
to:uctoa::@7
uctoa::@7: scope:[uctoa] from uctoa::@2
[198] if(uctoa::value#2>=uctoa::digit_value#0) goto uctoa::@5
[235] if(uctoa::value#2>=uctoa::digit_value#0) goto uctoa::@5
to:uctoa::@4
uctoa::@4: scope:[uctoa] from uctoa::@6 uctoa::@7
[199] uctoa::buffer#14 = phi( uctoa::@7/uctoa::buffer#11, uctoa::@6/uctoa::buffer#4 )
[199] uctoa::started#4 = phi( uctoa::@7/uctoa::started#2, uctoa::@6/1 )
[199] uctoa::value#6 = phi( uctoa::@7/uctoa::value#2, uctoa::@6/uctoa::value#0 )
[200] uctoa::digit#1 = ++ uctoa::digit#2
[236] uctoa::buffer#14 = phi( uctoa::@7/uctoa::buffer#11, uctoa::@6/uctoa::buffer#4 )
[236] uctoa::started#4 = phi( uctoa::@7/uctoa::started#2, uctoa::@6/1 )
[236] uctoa::value#6 = phi( uctoa::@7/uctoa::value#2, uctoa::@6/uctoa::value#0 )
[237] uctoa::digit#1 = ++ uctoa::digit#2
to:uctoa::@1
uctoa::@5: scope:[uctoa] from uctoa::@2 uctoa::@7
[201] uctoa_append::buffer#0 = uctoa::buffer#11
[202] uctoa_append::value#0 = uctoa::value#2
[203] uctoa_append::sub#0 = uctoa::digit_value#0
[204] call uctoa_append
[205] uctoa_append::return#0 = uctoa_append::value#2
[238] uctoa_append::buffer#0 = uctoa::buffer#11
[239] uctoa_append::value#0 = uctoa::value#2
[240] uctoa_append::sub#0 = uctoa::digit_value#0
[241] call uctoa_append
[242] uctoa_append::return#0 = uctoa_append::value#2
to:uctoa::@6
uctoa::@6: scope:[uctoa] from uctoa::@5
[206] uctoa::value#0 = uctoa_append::return#0
[207] uctoa::buffer#4 = ++ uctoa::buffer#11
[243] uctoa::value#0 = uctoa_append::return#0
[244] uctoa::buffer#4 = ++ uctoa::buffer#11
to:uctoa::@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_schar::@3
[208] phi()
[245] phi()
to:printf_number_buffer::@1
printf_number_buffer::@1: scope:[printf_number_buffer] from printf_number_buffer
[209] if(0==printf_number_buffer::buffer_sign#0) goto printf_number_buffer::@2
[246] if(0==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
[210] cputc::c#2 = printf_number_buffer::buffer_sign#0
[211] call cputc
[247] cputc::c#2 = printf_number_buffer::buffer_sign#0
[248] call cputc
to:printf_number_buffer::@2
printf_number_buffer::@2: scope:[printf_number_buffer] from printf_number_buffer::@1 printf_number_buffer::@3
[212] phi()
[213] call cputs
[249] phi()
[250] call cputs
to:printf_number_buffer::@return
printf_number_buffer::@return: scope:[printf_number_buffer] from printf_number_buffer::@2
[214] return
[251] return
to:@return
void cputln()
cputln: scope:[cputln] from cputc::@1 cputc::@3
[215] conio_line_text = conio_line_text + $28
[216] conio_line_color = conio_line_color + $28
[217] conio_cursor_x = 0
[218] conio_cursor_y = ++ conio_cursor_y
[219] call cscroll
[252] conio_line_text = conio_line_text + $28
[253] conio_line_color = conio_line_color + $28
[254] conio_cursor_x = 0
[255] conio_cursor_y = ++ conio_cursor_y
[256] call cscroll
to:cputln::@return
cputln::@return: scope:[cputln] from cputln
[220] return
[257] return
to:@return
byte uctoa_append(byte* uctoa_append::buffer , byte uctoa_append::value , byte uctoa_append::sub)
uctoa_append: scope:[uctoa_append] from uctoa::@5
[221] phi()
[258] phi()
to:uctoa_append::@1
uctoa_append::@1: scope:[uctoa_append] from uctoa_append uctoa_append::@2
[222] uctoa_append::digit#2 = phi( uctoa_append/0, uctoa_append::@2/uctoa_append::digit#1 )
[222] uctoa_append::value#2 = phi( uctoa_append/uctoa_append::value#0, uctoa_append::@2/uctoa_append::value#1 )
[223] if(uctoa_append::value#2>=uctoa_append::sub#0) goto uctoa_append::@2
[259] uctoa_append::digit#2 = phi( uctoa_append/0, uctoa_append::@2/uctoa_append::digit#1 )
[259] uctoa_append::value#2 = phi( uctoa_append/uctoa_append::value#0, uctoa_append::@2/uctoa_append::value#1 )
[260] if(uctoa_append::value#2>=uctoa_append::sub#0) goto uctoa_append::@2
to:uctoa_append::@3
uctoa_append::@3: scope:[uctoa_append] from uctoa_append::@1
[224] *uctoa_append::buffer#0 = DIGITS[uctoa_append::digit#2]
[261] *uctoa_append::buffer#0 = DIGITS[uctoa_append::digit#2]
to:uctoa_append::@return
uctoa_append::@return: scope:[uctoa_append] from uctoa_append::@3
[225] return
[262] return
to:@return
uctoa_append::@2: scope:[uctoa_append] from uctoa_append::@1
[226] uctoa_append::digit#1 = ++ uctoa_append::digit#2
[227] uctoa_append::value#1 = uctoa_append::value#2 - uctoa_append::sub#0
[263] uctoa_append::digit#1 = ++ uctoa_append::digit#2
[264] uctoa_append::value#1 = uctoa_append::value#2 - uctoa_append::sub#0
to:uctoa_append::@1
void cscroll()
cscroll: scope:[cscroll] from cputln
[228] if(conio_cursor_y!=$19) goto cscroll::@return
[265] if(conio_cursor_y!=$19) goto cscroll::@return
to:cscroll::@1
cscroll::@1: scope:[cscroll] from cscroll
[229] phi()
[230] call memcpy
[266] phi()
[267] call memcpy
to:cscroll::@2
cscroll::@2: scope:[cscroll] from cscroll::@1
[231] phi()
[232] call memcpy
[268] phi()
[269] call memcpy
to:cscroll::@3
cscroll::@3: scope:[cscroll] from cscroll::@2
[233] phi()
[234] call memset
[270] phi()
[271] call memset
to:cscroll::@4
cscroll::@4: scope:[cscroll] from cscroll::@3
[235] memset::c#1 = conio_textcolor
[236] call memset
[272] memset::c#1 = conio_textcolor
[273] call memset
to:cscroll::@5
cscroll::@5: scope:[cscroll] from cscroll::@4
[237] conio_line_text = conio_line_text - $28
[238] conio_line_color = conio_line_color - $28
[239] conio_cursor_y = -- conio_cursor_y
[274] conio_line_text = conio_line_text - $28
[275] conio_line_color = conio_line_color - $28
[276] conio_cursor_y = -- conio_cursor_y
to:cscroll::@return
cscroll::@return: scope:[cscroll] from cscroll cscroll::@5
[240] return
[277] return
to:@return
void* memcpy(void* memcpy::destination , void* memcpy::source , word memcpy::num)
memcpy: scope:[memcpy] from cscroll::@1 cscroll::@2
[241] memcpy::destination#2 = phi( cscroll::@1/(void*)DEFAULT_SCREEN, cscroll::@2/(void*)COLORRAM )
[241] memcpy::source#2 = phi( cscroll::@1/(void*)DEFAULT_SCREEN+$28, cscroll::@2/(void*)COLORRAM+$28 )
[242] memcpy::src_end#0 = (byte*)memcpy::source#2 + (word)$19*$28-$28
[243] memcpy::src#4 = (byte*)memcpy::source#2
[244] memcpy::dst#4 = (byte*)memcpy::destination#2
[278] memcpy::destination#2 = phi( cscroll::@1/(void*)DEFAULT_SCREEN, cscroll::@2/(void*)COLORRAM )
[278] memcpy::source#2 = phi( cscroll::@1/(void*)DEFAULT_SCREEN+$28, cscroll::@2/(void*)COLORRAM+$28 )
[279] memcpy::src_end#0 = (byte*)memcpy::source#2 + (word)$19*$28-$28
[280] memcpy::src#4 = (byte*)memcpy::source#2
[281] memcpy::dst#4 = (byte*)memcpy::destination#2
to:memcpy::@1
memcpy::@1: scope:[memcpy] from memcpy memcpy::@2
[245] memcpy::dst#2 = phi( memcpy/memcpy::dst#4, memcpy::@2/memcpy::dst#1 )
[245] memcpy::src#2 = phi( memcpy/memcpy::src#4, memcpy::@2/memcpy::src#1 )
[246] if(memcpy::src#2!=memcpy::src_end#0) goto memcpy::@2
[282] memcpy::dst#2 = phi( memcpy/memcpy::dst#4, memcpy::@2/memcpy::dst#1 )
[282] memcpy::src#2 = phi( memcpy/memcpy::src#4, memcpy::@2/memcpy::src#1 )
[283] if(memcpy::src#2!=memcpy::src_end#0) goto memcpy::@2
to:memcpy::@return
memcpy::@return: scope:[memcpy] from memcpy::@1
[247] return
[284] return
to:@return
memcpy::@2: scope:[memcpy] from memcpy::@1
[248] *memcpy::dst#2 = *memcpy::src#2
[249] memcpy::dst#1 = ++ memcpy::dst#2
[250] memcpy::src#1 = ++ memcpy::src#2
[285] *memcpy::dst#2 = *memcpy::src#2
[286] memcpy::dst#1 = ++ memcpy::dst#2
[287] memcpy::src#1 = ++ 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
[251] memset::c#4 = phi( cscroll::@3/' ', cscroll::@4/memset::c#1 )
[251] memset::str#3 = phi( cscroll::@3/(void*)DEFAULT_SCREEN+(word)$19*$28-$28, cscroll::@4/(void*)COLORRAM+(word)$19*$28-$28 )
[288] memset::c#4 = phi( cscroll::@3/' ', cscroll::@4/memset::c#1 )
[288] 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
[252] memset::end#0 = (byte*)memset::str#3 + $28
[253] memset::dst#4 = (byte*)memset::str#3
[289] memset::end#0 = (byte*)memset::str#3 + $28
[290] memset::dst#4 = (byte*)memset::str#3
to:memset::@2
memset::@2: scope:[memset] from memset::@1 memset::@3
[254] memset::dst#2 = phi( memset::@1/memset::dst#4, memset::@3/memset::dst#1 )
[255] if(memset::dst#2!=memset::end#0) goto memset::@3
[291] memset::dst#2 = phi( memset::@1/memset::dst#4, memset::@3/memset::dst#1 )
[292] if(memset::dst#2!=memset::end#0) goto memset::@3
to:memset::@return
memset::@return: scope:[memset] from memset::@2
[256] return
[293] return
to:@return
memset::@3: scope:[memset] from memset::@2
[257] *memset::dst#2 = memset::c#4
[258] memset::dst#1 = ++ memset::dst#2
[294] *memset::dst#2 = memset::c#4
[295] memset::dst#1 = ++ memset::dst#2
to:memset::@2

File diff suppressed because one or more lines are too long

View File

@ -13,15 +13,20 @@ constant const byte RED = 2
constant byte SIZEOF_STRUCT_PRINTF_BUFFER_NUMBER = $c
void __start()
void assert_cmp(signed byte assert_cmp::expect , signed byte assert_cmp::actual , byte* assert_cmp::message)
bool~ assert_cmp::$0 reg byte a 101.0
bool~ assert_cmp::$1 reg byte a 101.0
bool~ assert_cmp::$2 reg byte a 101.0
bool~ assert_cmp::$3 reg byte a 101.0
signed byte assert_cmp::actual
signed byte assert_cmp::actual#0 actual zp[1]:3 22.0
signed byte assert_cmp::actual#1 actual zp[1]:3 22.0
signed byte assert_cmp::actual#10 actual zp[1]:3 22.0
signed byte assert_cmp::actual#11 actual zp[1]:3 22.0
signed byte assert_cmp::actual#12 actual zp[1]:3 25.523809523809526
signed byte assert_cmp::actual#12 actual zp[1]:3 22.0
signed byte assert_cmp::actual#13 actual zp[1]:3 22.0
signed byte assert_cmp::actual#14 actual zp[1]:3 22.0
signed byte assert_cmp::actual#15 actual zp[1]:3 22.0
signed byte assert_cmp::actual#16 actual zp[1]:3 22.0
signed byte assert_cmp::actual#17 actual zp[1]:3 29.55
signed byte assert_cmp::actual#2 actual zp[1]:3 22.0
signed byte assert_cmp::actual#3 actual zp[1]:3 22.0
signed byte assert_cmp::actual#4 actual zp[1]:3 22.0
@ -31,9 +36,9 @@ signed byte assert_cmp::actual#7 actual zp[1]:3 22.0
signed byte assert_cmp::actual#8 actual zp[1]:3 22.0
signed byte assert_cmp::actual#9 actual zp[1]:3 22.0
signed byte assert_cmp::expect
signed byte assert_cmp::expect#12 expect zp[1]:2 23.764705882352942
signed byte assert_cmp::expect#17 expect zp[1]:2 25.25
byte* assert_cmp::message
byte* assert_cmp::message#12 message zp[2]:4 6.9655172413793105
byte* assert_cmp::message#17 message zp[2]:4 7.214285714285714
byte assert_cmp::ok
byte assert_cmp::ok#1 reg byte a 202.0
byte assert_cmp::ok#2 reg byte a 202.0
@ -50,10 +55,10 @@ constant byte* const 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]:12 967742.6387096774
byte conio_cursor_y loadstore zp[1]:13 1.8713450923976608E7
byte* conio_line_color loadstore zp[2]:16 1.3558282871165644E7
byte* conio_line_text loadstore zp[2]:14 1.3393940048484847E7
byte conio_cursor_x loadstore zp[1]:12 837989.43575419
byte conio_cursor_y loadstore zp[1]:13 1.6410256964102566E7
byte* conio_line_color loadstore zp[2]:16 1.1818182395721925E7
byte* conio_line_text loadstore zp[2]:14 1.1693122264550265E7
byte conio_textcolor loadstore zp[1]:18 1.2317085426829267E7
void cputc(byte cputc::c)
byte cputc::c
@ -84,18 +89,26 @@ byte gotoxy::y
byte gotoxy::y#2 reg byte x 71.0
byte gotoxy::y#4 reg byte x 67.33333333333333
void main()
constant byte* main::message[4] = "a<b"
constant byte* main::message1[8] = "aaa<aab"
constant byte* main::message10[$c] = "aab=aac (2)"
constant byte* main::message11[$e] = "qwex=qwea (3)"
constant byte* main::message2[7] = "aa<aaa"
constant byte* main::message3[4] = "x=x"
constant byte* main::message4[$a] = "qwez=qwez"
constant byte* main::message5[4] = "q>k"
constant byte* main::message6[$a] = "kkkq>kkkp"
constant byte* main::message7[9] = "kkkq>kkk"
constant byte* main::message8[$e] = "aaax<aabx (3)"
constant byte* main::message9[$c] = "qwe>qee (2)"
constant byte* main::$35[4] = "aba"
constant byte* main::$38[3] = "xy"
constant byte* main::$39[3] = "xz"
constant byte* main::message[$d] = "a<b strcmp()"
constant byte* main::message1[$11] = "aaa<aab strcmp()"
constant byte* main::message10[$13] = "aab=aac strncmp(2)"
constant byte* main::message11[$15] = "qwex=qwea strncmp(3)"
constant byte* main::message12[$13] = "aa<aacx strncmp(3)"
constant byte* main::message13[$10] = "aa<ab memcmp(2)"
constant byte* main::message14[$e] = "x=x memcmp(2)"
constant byte* main::message15[$10] = "xy=xz memcmp(1)"
constant byte* main::message16[$14] = "qwez>qwex memcmp(4)"
constant byte* main::message2[$10] = "aa<aaa strcmp()"
constant byte* main::message3[$d] = "x=x strcmp()"
constant byte* main::message4[$13] = "qwez=qwez strcmp()"
constant byte* main::message5[$d] = "q>k strcmp()"
constant byte* main::message6[$13] = "kkkq>kkkp strcmp()"
constant byte* main::message7[$12] = "kkkq>kkk strcmp()"
constant byte* main::message8[$15] = "aaax<aabx strncmp(3)"
constant byte* main::message9[$13] = "qwe>qee strncmp(2)"
constant byte* main::str1[2] = "a"
constant byte* main::str11[4] = "aaa"
constant byte* main::str111[5] = "qwex"
@ -110,11 +123,37 @@ constant byte* main::str2[2] = "b"
constant byte* main::str21[4] = "aab"
constant byte* main::str210[4] = "aac"
constant byte* main::str211[5] = "qwea"
constant byte* main::str212[5] = "aacx"
constant byte* main::str25[2] = "k"
constant byte* main::str26[5] = "kkkp"
constant byte* main::str27[4] = "kkk"
constant byte* main::str28[5] = "aabx"
constant byte* main::str29[4] = "qee"
signed word memcmp(const void* memcmp::str1 , const void* memcmp::str2 , word memcmp::n)
byte~ memcmp::$3 reg byte a 101.0
word memcmp::n
word memcmp::n#0 n zp[2]:6 667.3333333333334
word memcmp::n#5 n zp[2]:6 1034.6666666666667
word memcmp::n#7 n zp[2]:6 33.666666666666664
signed word memcmp::return
signed word memcmp::return#1 return zp[2]:26 202.0
signed word memcmp::return#10 return zp[2]:26 22.0
signed word memcmp::return#11 return zp[2]:26 22.0
signed word memcmp::return#2 return zp[2]:26 24.166666666666664
signed word memcmp::return#3 return zp[2]:26 22.0
signed word memcmp::return#4 return zp[2]:26 22.0
byte* memcmp::s1
byte* memcmp::s1#1 s1 zp[2]:4 1001.0
byte* memcmp::s1#2 s1 zp[2]:4 801.25
byte* memcmp::s1#6 s1 zp[2]:4 101.0
byte* memcmp::s2
byte* memcmp::s2#1 s2 zp[2]:10 2002.0
byte* memcmp::s2#2 s2 zp[2]:10 641.0
byte* memcmp::s2#6 s2 zp[2]:10 202.0
const void* memcmp::str1
const void* memcmp::str1#4 str1 zp[2]:4
const void* memcmp::str2
const void* memcmp::str2#4 str2 zp[2]:10
void* memcpy(void* memcpy::destination , void* memcpy::source , word memcpy::num)
void* memcpy::destination
void* memcpy::destination#2 destination zp[2]:28
@ -205,28 +244,29 @@ byte* strcmp::s1#0 s1 zp[2]:4 101.0
byte* strcmp::s1#1 s1 zp[2]:4 1001.0
byte* strcmp::s1#2 s1 zp[2]:4 1402.0
byte* strcmp::s2
byte* strcmp::s2#0 s2 zp[2]:10 101.0
byte* strcmp::s2#1 s2 zp[2]:10 2002.0
byte* strcmp::s2#2 s2 zp[2]:10 801.25
byte* strcmp::s2#0 s2 zp[2]:6 101.0
byte* strcmp::s2#1 s2 zp[2]:6 2002.0
byte* strcmp::s2#2 s2 zp[2]:6 801.25
const byte* strcmp::str1
const byte* strcmp::str2
signed word strncmp(const byte* strncmp::str1 , const byte* strncmp::str2 , word strncmp::n)
byte~ strncmp::$0 reg byte a 101.0
word strncmp::n
word strncmp::n#0 n zp[2]:6 600.5999999999999
word strncmp::n#5 n zp[2]:6 1051.5
word strncmp::n#7 n zp[2]:6 101.0
word strncmp::n#0 n zp[2]:4 600.5999999999999
word strncmp::n#6 n zp[2]:4 1051.5
word strncmp::n#8 n zp[2]:4 101.0
signed word strncmp::return
signed word strncmp::return#0 return zp[2]:28 202.0
signed word strncmp::return#10 return zp[2]:28 22.0
signed word strncmp::return#11 return zp[2]:28 22.0
signed word strncmp::return#2 return zp[2]:28 24.166666666666664
signed word strncmp::return#3 return zp[2]:28 22.0
signed word strncmp::return#4 return zp[2]:28 22.0
signed word strncmp::return#0 return zp[2]:10 202.0
signed word strncmp::return#10 return zp[2]:10 22.0
signed word strncmp::return#11 return zp[2]:10 22.0
signed word strncmp::return#12 return zp[2]:10 22.0
signed word strncmp::return#13 return zp[2]:10 22.0
signed word strncmp::return#2 return zp[2]:10 22.285714285714285
signed word strncmp::return#3 return zp[2]:10 22.0
byte* strncmp::s1
byte* strncmp::s1#0 s1 zp[2]:10 101.0
byte* strncmp::s1#1 s1 zp[2]:10 1001.0
byte* strncmp::s1#2 s1 zp[2]:10 841.2
byte* strncmp::s1#0 s1 zp[2]:6 101.0
byte* strncmp::s1#1 s1 zp[2]:6 1001.0
byte* strncmp::s1#2 s1 zp[2]:6 841.2
byte* strncmp::s2
byte* strncmp::s2#0 s2 zp[2]:26 101.0
byte* strncmp::s2#1 s2 zp[2]:26 2002.0
@ -240,10 +280,10 @@ byte textcolor::old
byte textcolor::return
void uctoa(byte uctoa::value , byte* uctoa::buffer , byte uctoa::radix)
byte* uctoa::buffer
byte* uctoa::buffer#11 buffer zp[2]:28 35000.49999999999
byte* uctoa::buffer#14 buffer zp[2]:28 150001.5
byte* uctoa::buffer#3 buffer zp[2]:28 20002.0
byte* uctoa::buffer#4 buffer zp[2]:28 200002.0
byte* uctoa::buffer#11 buffer zp[2]:26 35000.49999999999
byte* uctoa::buffer#14 buffer zp[2]:26 150001.5
byte* uctoa::buffer#3 buffer zp[2]:26 20002.0
byte* uctoa::buffer#4 buffer zp[2]:26 200002.0
byte uctoa::digit
byte uctoa::digit#1 digit zp[1]:8 200002.0
byte uctoa::digit#2 digit zp[1]:8 30769.53846153846
@ -262,7 +302,7 @@ byte uctoa::value#2 reg byte x 70000.99999999999
byte uctoa::value#6 reg byte x 150001.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]:28 137500.25
byte* uctoa_append::buffer#0 buffer zp[2]:26 137500.25
byte uctoa_append::digit
byte uctoa_append::digit#1 reg byte y 1.00000001E8
byte uctoa_append::digit#2 reg byte y 1.005000015E8
@ -277,12 +317,12 @@ byte uctoa_append::value#2 reg byte x 5.018333416666667E7
reg byte x [ conio_c64_init::line#2 conio_c64_init::line#0 ]
reg byte x [ gotoxy::y#4 gotoxy::y#2 ]
zp[1]:2 [ assert_cmp::expect#12 ]
zp[1]:3 [ assert_cmp::actual#12 assert_cmp::actual#4 assert_cmp::actual#5 assert_cmp::actual#6 assert_cmp::actual#7 assert_cmp::actual#8 assert_cmp::actual#0 assert_cmp::actual#9 assert_cmp::actual#10 assert_cmp::actual#11 assert_cmp::actual#1 assert_cmp::actual#2 assert_cmp::actual#3 ]
zp[2]:4 [ assert_cmp::message#12 printf_string::str#2 printf_string::str#0 printf_string::str#1 strcmp::s1#2 strcmp::s1#0 strcmp::s1#1 ]
reg byte a [ assert_cmp::ok#4 assert_cmp::ok#2 assert_cmp::ok#3 assert_cmp::ok#1 ]
zp[1]:2 [ assert_cmp::expect#17 ]
zp[1]:3 [ assert_cmp::actual#17 assert_cmp::actual#4 assert_cmp::actual#5 assert_cmp::actual#6 assert_cmp::actual#7 assert_cmp::actual#8 assert_cmp::actual#0 assert_cmp::actual#9 assert_cmp::actual#10 assert_cmp::actual#11 assert_cmp::actual#12 assert_cmp::actual#13 assert_cmp::actual#14 assert_cmp::actual#15 assert_cmp::actual#16 assert_cmp::actual#1 assert_cmp::actual#2 assert_cmp::actual#3 ]
reg byte a [ assert_cmp::ok#4 assert_cmp::ok#1 assert_cmp::ok#2 assert_cmp::ok#3 ]
zp[2]:4 [ memcmp::str1#4 memcmp::s1#2 memcmp::s1#6 memcmp::s1#1 strncmp::n#6 strncmp::n#8 strncmp::n#0 assert_cmp::message#17 printf_string::str#2 printf_string::str#0 printf_string::str#1 strcmp::s1#2 strcmp::s1#0 strcmp::s1#1 ]
reg byte a [ textcolor::color#2 ]
zp[2]:6 [ cputs::s#9 cputs::s#10 cputs::s#2 cputs::s#0 strncmp::n#5 strncmp::n#7 strncmp::n#0 ]
zp[2]:6 [ cputs::s#9 cputs::s#10 cputs::s#2 cputs::s#0 memcmp::n#5 memcmp::n#7 memcmp::n#0 strncmp::s1#2 strncmp::s1#0 strncmp::s1#1 strcmp::s2#2 strcmp::s2#0 strcmp::s2#1 ]
reg byte x [ printf_schar::value#5 printf_schar::value#0 printf_schar::value#3 printf_schar::value#1 printf_schar::value#2 ]
reg byte a [ cputc::c#3 cputc::c#0 cputc::c#2 ]
zp[1]:8 [ uctoa::digit#2 uctoa::digit#1 ]
@ -290,7 +330,7 @@ reg byte x [ uctoa::value#2 uctoa::value#6 uctoa::value#1 uctoa::value#0 ]
zp[1]:9 [ uctoa::started#2 uctoa::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]:10 [ memset::str#3 memset::dst#2 memset::dst#4 memset::dst#1 memcpy::source#2 memcpy::src#2 memcpy::src#4 memcpy::src#1 strncmp::s1#2 strncmp::s1#0 strncmp::s1#1 strcmp::s2#2 strcmp::s2#0 strcmp::s2#1 ]
zp[2]:10 [ memset::str#3 memset::dst#2 memset::dst#4 memset::dst#1 memcpy::source#2 memcpy::src#2 memcpy::src#4 memcpy::src#1 memcmp::str2#4 memcmp::s2#2 memcmp::s2#6 memcmp::s2#1 strncmp::return#2 strncmp::return#0 strncmp::return#3 strncmp::return#10 strncmp::return#11 strncmp::return#12 strncmp::return#13 ]
reg byte x [ memset::c#4 memset::c#1 ]
zp[1]:12 [ conio_cursor_x ]
zp[1]:13 [ conio_cursor_y ]
@ -301,14 +341,15 @@ zp[2]:19 [ gotoxy::$7 gotoxy::$9 gotoxy::line_offset#0 gotoxy::$6 ]
zp[2]:21 [ gotoxy::$8 ]
zp[2]:23 [ gotoxy::$5 ]
reg byte a [ strcmp::$0 ]
reg byte a [ assert_cmp::$3 ]
reg byte a [ assert_cmp::$2 ]
reg byte a [ assert_cmp::$1 ]
reg byte a [ assert_cmp::$0 ]
reg byte a [ strncmp::$0 ]
reg byte a [ memcmp::$3 ]
reg byte a [ cputs::c#1 ]
reg byte a [ printf_number_buffer::buffer_sign#0 ]
zp[1]:25 [ uctoa::digit_value#0 uctoa_append::sub#0 ]
reg byte x [ uctoa_append::return#0 ]
zp[2]:26 [ memcpy::src_end#0 strncmp::s2#2 strncmp::s2#0 strncmp::s2#1 strcmp::return#11 strcmp::return#0 strcmp::return#12 strcmp::return#13 strcmp::return#14 strcmp::return#15 strcmp::return#16 strcmp::return#17 strcmp::return#18 strcmp::return#10 ]
zp[2]:28 [ memset::end#0 memcpy::destination#2 memcpy::dst#2 memcpy::dst#4 memcpy::dst#1 uctoa::buffer#11 uctoa::buffer#14 uctoa::buffer#4 uctoa::buffer#3 uctoa_append::buffer#0 strncmp::return#2 strncmp::return#0 strncmp::return#3 strncmp::return#4 strncmp::return#10 strncmp::return#11 ]
zp[2]:26 [ memcpy::src_end#0 uctoa::buffer#11 uctoa::buffer#14 uctoa::buffer#4 uctoa::buffer#3 uctoa_append::buffer#0 memcmp::return#2 memcmp::return#1 memcmp::return#3 memcmp::return#4 memcmp::return#10 memcmp::return#11 strncmp::s2#2 strncmp::s2#0 strncmp::s2#1 strcmp::return#11 strcmp::return#0 strcmp::return#12 strcmp::return#13 strcmp::return#14 strcmp::return#15 strcmp::return#16 strcmp::return#17 strcmp::return#18 strcmp::return#10 ]
zp[2]:28 [ memset::end#0 memcpy::destination#2 memcpy::dst#2 memcpy::dst#4 memcpy::dst#1 ]
mem[12] [ printf_buffer ]