1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2025-04-05 07:40:39 +00:00

Implemented 8 queen problem recursive solution.

This commit is contained in:
jespergravgaard 2020-04-25 23:28:38 +02:00
parent 0da4300069
commit 9ddcb9790a
43 changed files with 27566 additions and 12602 deletions

View File

@ -0,0 +1,9 @@
ldy #0
lda ({z1}),y
cmp {m2}
bne !+
iny
lda ({z1}),y
cmp {m2}+1
beq {la1}
!:

View File

@ -0,0 +1,11 @@
ldy #0
lda ({z1}),y
sec
sbc {m2}
pha
iny
lda ({z1}),y
sbc {m2}+1
sta {z1}+1
pla
sta {z1}

View File

@ -179,6 +179,12 @@ public class CompileLog {
this.verboseSequencePlan = verboseSequencePlan;
}
public CompileLog verboseSequencePlan() {
setVerboseSequencePlan(true);
return this;
}
public CompileLog verboseParse() {
setVerboseParse(true);
return this;

View File

@ -37,7 +37,7 @@ public class PassNBlockSequencePlanner extends Pass2SsaOptimization {
}
sequence.add(block.getLabel());
if(block.getCallSuccessor() != null) {
pushTodo(getGraph().getCallSuccessor(block));
pushCallTodo(getGraph().getCallSuccessor(block));
}
ControlFlowBlock conditionalSuccessor = getGraph().getConditionalSuccessor(block);
ControlFlowBlock defaultSuccessor = getGraph().getDefaultSuccessor(block);
@ -91,6 +91,26 @@ public class PassNBlockSequencePlanner extends Pass2SsaOptimization {
newScopeTodo.addTodo(block);
}
void pushCallTodo(ControlFlowBlock block) {
LabelRef blockRef = block.getLabel();
Scope blockScope = getScope().getSymbol(blockRef).getScope();
for(ScopeTodo todoScope : todoScopes) {
if(todoScope.scope.equals(blockScope)) {
todoScope.addTodo(block);
return;
}
}
ScopeTodo newScopeTodo = new ScopeTodo(blockScope);
ScopeTodo top = null;
if(todoScopes.size() > 0)
top = todoScopes.pop();
todoScopes.push(newScopeTodo);
newScopeTodo.addTodo(block);
if(top != null)
todoScopes.push(top);
}
boolean hasTodo() {
return !todoScopes.isEmpty();
}

View File

@ -37,12 +37,7 @@ void printf_char(char ch) {
if(++printf_cursor_x==PRINTF_SCREEN_WIDTH) {
printf_cursor_x = 0;
++printf_cursor_y;
if(printf_cursor_y==PRINTF_SCREEN_HEIGHT) {
memcpy(PRINTF_SCREEN_ADDRESS, PRINTF_SCREEN_ADDRESS+PRINTF_SCREEN_WIDTH, PRINTF_SCREEN_BYTES-PRINTF_SCREEN_WIDTH);
memset(PRINTF_SCREEN_ADDRESS+PRINTF_SCREEN_BYTES-PRINTF_SCREEN_WIDTH, ' ', PRINTF_SCREEN_WIDTH);
printf_cursor_ptr = printf_cursor_ptr-PRINTF_SCREEN_WIDTH;
printf_cursor_y--;
}
printf_scroll();
}
}
@ -51,6 +46,17 @@ void printf_ln() {
printf_cursor_ptr = printf_cursor_ptr - printf_cursor_x + PRINTF_SCREEN_WIDTH;
printf_cursor_x = 0;
printf_cursor_y++;
printf_scroll();
}
// Scroll the entire screen if the cursor is on the last line
void printf_scroll() {
if(printf_cursor_y==PRINTF_SCREEN_HEIGHT) {
memcpy(PRINTF_SCREEN_ADDRESS, PRINTF_SCREEN_ADDRESS+PRINTF_SCREEN_WIDTH, PRINTF_SCREEN_BYTES-PRINTF_SCREEN_WIDTH);
memset(PRINTF_SCREEN_ADDRESS+PRINTF_SCREEN_BYTES-PRINTF_SCREEN_WIDTH, ' ', PRINTF_SCREEN_WIDTH);
printf_cursor_ptr = printf_cursor_ptr-PRINTF_SCREEN_WIDTH;
printf_cursor_y--;
}
}
// Print a padding char a number of times

View File

@ -40,6 +40,11 @@ public class TestPrograms {
public TestPrograms() {
}
@Test
public void testEightQueens() throws IOException, URISyntaxException {
compileAndCompare("examples/eightqueens/eightqueens.c");
}
@Test
public void testAtoi() throws IOException, URISyntaxException {
compileAndCompare("atoi-1.c");

View File

@ -0,0 +1,90 @@
// N Queens Problem in C Using Backtracking
//
// N Queens Problem is a famous puzzle in which n-queens are to be placed on a nxn chess board such that no two queens are in the same row, column or diagonal.
// In this tutorial I am sharing the C program to find solution for N Queens problem using backtracking. Below animation shows the solution for 8 queens problem using backtracking.
//
// Author: Neeraj Mishra
// Source: https://www.thecrazyprogrammer.com/2015/03/c-program-for-n-queens-problem-using-backtracking.html
#include<stdio.h>
char board[20],count;
#define N 8
void main() {
printf_cls();
printf(" - N Queens Problem Using Backtracking -");
printf("\n\nNumber of Queens:%u",N);
queen(1);
}
// Function to check for proper positioning of queen
__stackcall void queen(char row) {
__ma char r = row;
for(__ma char column=1;column<=N;++column) {
if(place(r,column)) {
board[r]=column; //no conflicts so place queen
if(r==N) //dead end
print(); //printing the board configuration
else {
// Push the local vars on the stack (waiting for proper recursion support)
asm {
lda column
pha
lda r
pha
}
//try queen with next position
queen(r+1);
// Pop the local vars on the stack (waiting for proper recursion support)
asm {
pla
sta r
pla
sta column
}
}
}
}
}
// function to check conflicts
// If no conflict for desired postion returns 1 otherwise returns 0
char place(char row,char column) {
char i;
for(i=1;i<=row-1;++i) {
//checking column and digonal conflicts
if(board[i]==column)
return 0;
else
if(diff(board[i],column)==diff(i,row))
return 0;
}
return 1; //no conflicts
}
// Find the absolute difference between two unsigned chars
char diff(char a, char b) {
if(a<b)
return b-a;
else
return a-b;
}
//function for printing the solution
void print() {
printf("\nSolution %u:\n ",++count);
for(char i=1;i<=N;++i)
printf("%u",i);
for(char i=1;i<=N;++i) {
printf("\n%u",i);
for(char j=1;j<=N;++j) {
//for nxn board
if(board[i]==j)
printf("Q"); //queen at i,j position
else
printf("-"); //empty slot
}
}
}

View File

@ -121,32 +121,14 @@ printf_ln: {
sta.z printf_cursor_x
// printf_cursor_y++;
inc.z printf_cursor_y
// printf_scroll()
jsr printf_scroll
// }
rts
}
// Print a single char
// If the end of the screen is reached scroll it up one char and place the cursor at the
// printf_char(byte register(A) ch)
printf_char: {
.label __6 = 9
// *(printf_cursor_ptr++) = ch
ldy #0
sta (printf_cursor_ptr),y
// *(printf_cursor_ptr++) = ch;
inc.z printf_cursor_ptr
bne !+
inc.z printf_cursor_ptr+1
!:
// if(++printf_cursor_x==PRINTF_SCREEN_WIDTH)
inc.z printf_cursor_x
lda #$28
cmp.z printf_cursor_x
bne __breturn
// printf_cursor_x = 0
lda #0
sta.z printf_cursor_x
// ++printf_cursor_y;
inc.z printf_cursor_y
// Scroll the entire screen if the cursor is on the last line
printf_scroll: {
.label __4 = 9
// if(printf_cursor_y==PRINTF_SCREEN_HEIGHT)
lda #$19
cmp.z printf_cursor_y
@ -165,13 +147,13 @@ printf_char: {
sta.z memset.num+1
jsr memset
// printf_cursor_ptr-PRINTF_SCREEN_WIDTH
lda.z __6
lda.z __4
sec
sbc #<$28
sta.z __6
lda.z __6+1
sta.z __4
lda.z __4+1
sbc #>$28
sta.z __6+1
sta.z __4+1
// printf_cursor_ptr = printf_cursor_ptr-PRINTF_SCREEN_WIDTH
// printf_cursor_y--;
dec.z printf_cursor_y
@ -266,6 +248,34 @@ memcpy: {
!:
jmp __b1
}
// Print a single char
// If the end of the screen is reached scroll it up one char and place the cursor at the
// printf_char(byte register(A) ch)
printf_char: {
// *(printf_cursor_ptr++) = ch
ldy #0
sta (printf_cursor_ptr),y
// *(printf_cursor_ptr++) = ch;
inc.z printf_cursor_ptr
bne !+
inc.z printf_cursor_ptr+1
!:
// if(++printf_cursor_x==PRINTF_SCREEN_WIDTH)
inc.z printf_cursor_x
lda #$28
cmp.z printf_cursor_x
bne __breturn
// printf_cursor_x = 0
lda #0
sta.z printf_cursor_x
// ++printf_cursor_y;
inc.z printf_cursor_y
// printf_scroll()
jsr printf_scroll
__breturn:
// }
rts
}
// Print a signed integer using a specific format
// printf_sint(signed word zp(2) value)
printf_sint: {

View File

@ -83,233 +83,242 @@ printf_ln: scope:[printf_ln] from printf_str::@4
[37] (byte*) printf_cursor_ptr ← (byte*~) printf_ln::$1
[38] (byte) printf_cursor_x ← (byte) 0
[39] (byte) printf_cursor_y ← ++ (byte) printf_cursor_y
[40] call printf_scroll
to:printf_ln::@return
printf_ln::@return: scope:[printf_ln] from printf_ln
[40] return
[41] return
to:@return
(void()) printf_char((byte) printf_char::ch)
printf_char: scope:[printf_char] from printf_number_buffer::@3 printf_str::@5
[41] (byte) printf_char::ch#3 ← phi( printf_number_buffer::@3/(byte) printf_char::ch#2 printf_str::@5/(byte) printf_char::ch#1 )
[42] *((byte*) printf_cursor_ptr) ← (byte) printf_char::ch#3
[43] (byte*) printf_cursor_ptr ← ++ (byte*) printf_cursor_ptr
[44] (byte) printf_cursor_x ← ++ (byte) printf_cursor_x
[45] if((byte) printf_cursor_x!=(byte) $28) goto printf_char::@return
to:printf_char::@1
printf_char::@1: scope:[printf_char] from printf_char
[46] (byte) printf_cursor_x ← (byte) 0
[47] (byte) printf_cursor_y ← ++ (byte) printf_cursor_y
[48] if((byte) printf_cursor_y!=(byte) $19) goto printf_char::@return
to:printf_char::@2
printf_char::@2: scope:[printf_char] from printf_char::@1
[49] phi()
[50] call memcpy
to:printf_char::@3
printf_char::@3: scope:[printf_char] from printf_char::@2
[51] phi()
[52] call memset
to:printf_char::@4
printf_char::@4: scope:[printf_char] from printf_char::@3
[53] (byte*~) printf_char::$6 ← (byte*) printf_cursor_ptr - (byte) $28
[54] (byte*) printf_cursor_ptr ← (byte*~) printf_char::$6
[55] (byte) printf_cursor_y ← -- (byte) printf_cursor_y
to:printf_char::@return
printf_char::@return: scope:[printf_char] from printf_char printf_char::@1 printf_char::@4
[56] return
(void()) printf_scroll()
printf_scroll: scope:[printf_scroll] from printf_char::@1 printf_ln
[42] if((byte) printf_cursor_y!=(byte) $19) goto printf_scroll::@return
to:printf_scroll::@1
printf_scroll::@1: scope:[printf_scroll] from printf_scroll
[43] phi()
[44] call memcpy
to:printf_scroll::@2
printf_scroll::@2: scope:[printf_scroll] from printf_scroll::@1
[45] phi()
[46] call memset
to:printf_scroll::@3
printf_scroll::@3: scope:[printf_scroll] from printf_scroll::@2
[47] (byte*~) printf_scroll::$4 ← (byte*) printf_cursor_ptr - (byte) $28
[48] (byte*) printf_cursor_ptr ← (byte*~) printf_scroll::$4
[49] (byte) printf_cursor_y ← -- (byte) printf_cursor_y
to:printf_scroll::@return
printf_scroll::@return: scope:[printf_scroll] from printf_scroll printf_scroll::@3
[50] return
to:@return
(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num)
memset: scope:[memset] from printf_char::@3 printf_cls
[57] (byte) memset::c#4 ← phi( printf_char::@3/(byte) ' ' printf_cls/(byte) ' ' )
[57] (void*) memset::str#3 ← phi( printf_char::@3/(void*)(number) $400+(number) $28*(number) $19-(number) $28 printf_cls/(void*) 1024 )
[57] (word) memset::num#2 ← phi( printf_char::@3/(byte) $28 printf_cls/(word)(number) $28*(number) $19 )
[58] if((word) memset::num#2<=(byte) 0) goto memset::@return
memset: scope:[memset] from printf_cls printf_scroll::@2
[51] (byte) memset::c#4 ← phi( printf_cls/(byte) ' ' printf_scroll::@2/(byte) ' ' )
[51] (void*) memset::str#3 ← phi( printf_cls/(void*) 1024 printf_scroll::@2/(void*)(number) $400+(number) $28*(number) $19-(number) $28 )
[51] (word) memset::num#2 ← phi( printf_cls/(word)(number) $28*(number) $19 printf_scroll::@2/(byte) $28 )
[52] if((word) memset::num#2<=(byte) 0) goto memset::@return
to:memset::@1
memset::@1: scope:[memset] from memset
[59] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) memset::num#2
[60] (byte*) memset::dst#4 ← (byte*)(void*) memset::str#3
[53] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) memset::num#2
[54] (byte*) memset::dst#4 ← (byte*)(void*) memset::str#3
to:memset::@2
memset::@2: scope:[memset] from memset::@1 memset::@3
[61] (byte*) memset::dst#2 ← phi( memset::@1/(byte*) memset::dst#4 memset::@3/(byte*) memset::dst#1 )
[62] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@3
[55] (byte*) memset::dst#2 ← phi( memset::@1/(byte*) memset::dst#4 memset::@3/(byte*) memset::dst#1 )
[56] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@3
to:memset::@return
memset::@return: scope:[memset] from memset memset::@2
[63] return
[57] return
to:@return
memset::@3: scope:[memset] from memset::@2
[64] *((byte*) memset::dst#2) ← (byte) memset::c#4
[65] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2
[58] *((byte*) memset::dst#2) ← (byte) memset::c#4
[59] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2
to:memset::@2
(void*()) memcpy((void*) memcpy::destination , (void*) memcpy::source , (word) memcpy::num)
memcpy: scope:[memcpy] from printf_char::@2
[66] phi()
memcpy: scope:[memcpy] from printf_scroll::@1
[60] phi()
to:memcpy::@1
memcpy::@1: scope:[memcpy] from memcpy memcpy::@2
[67] (byte*) memcpy::dst#2 ← phi( memcpy/(byte*)(const void*) memcpy::destination#0 memcpy::@2/(byte*) memcpy::dst#1 )
[67] (byte*) memcpy::src#2 ← phi( memcpy/(byte*)(const void*) memcpy::source#0 memcpy::@2/(byte*) memcpy::src#1 )
[68] if((byte*) memcpy::src#2!=(const byte*) memcpy::src_end#0) goto memcpy::@2
[61] (byte*) memcpy::dst#2 ← phi( memcpy/(byte*)(const void*) memcpy::destination#0 memcpy::@2/(byte*) memcpy::dst#1 )
[61] (byte*) memcpy::src#2 ← phi( memcpy/(byte*)(const void*) memcpy::source#0 memcpy::@2/(byte*) memcpy::src#1 )
[62] if((byte*) memcpy::src#2!=(const byte*) memcpy::src_end#0) goto memcpy::@2
to:memcpy::@return
memcpy::@return: scope:[memcpy] from memcpy::@1
[69] return
[63] return
to:@return
memcpy::@2: scope:[memcpy] from memcpy::@1
[70] *((byte*) memcpy::dst#2) ← *((byte*) memcpy::src#2)
[71] (byte*) memcpy::dst#1 ← ++ (byte*) memcpy::dst#2
[72] (byte*) memcpy::src#1 ← ++ (byte*) memcpy::src#2
[64] *((byte*) memcpy::dst#2) ← *((byte*) memcpy::src#2)
[65] (byte*) memcpy::dst#1 ← ++ (byte*) memcpy::dst#2
[66] (byte*) memcpy::src#1 ← ++ (byte*) memcpy::src#2
to:memcpy::@1
(void()) printf_char((byte) printf_char::ch)
printf_char: scope:[printf_char] from printf_number_buffer::@3 printf_str::@5
[67] (byte) printf_char::ch#3 ← phi( printf_number_buffer::@3/(byte) printf_char::ch#2 printf_str::@5/(byte) printf_char::ch#1 )
[68] *((byte*) printf_cursor_ptr) ← (byte) printf_char::ch#3
[69] (byte*) printf_cursor_ptr ← ++ (byte*) printf_cursor_ptr
[70] (byte) printf_cursor_x ← ++ (byte) printf_cursor_x
[71] if((byte) printf_cursor_x!=(byte) $28) goto printf_char::@return
to:printf_char::@1
printf_char::@1: scope:[printf_char] from printf_char
[72] (byte) printf_cursor_x ← (byte) 0
[73] (byte) printf_cursor_y ← ++ (byte) printf_cursor_y
[74] call printf_scroll
to:printf_char::@return
printf_char::@return: scope:[printf_char] from printf_char printf_char::@1
[75] return
to:@return
(void()) printf_sint((signed word) printf_sint::value , (byte) printf_sint::format_min_length , (byte) printf_sint::format_justify_left , (byte) printf_sint::format_sign_always , (byte) printf_sint::format_zero_padding , (byte) printf_sint::format_upper_case , (byte) printf_sint::format_radix)
printf_sint: scope:[printf_sint] from main::@2 main::@5
[73] (signed word) printf_sint::value#3 ← phi( main::@2/(signed word) printf_sint::value#1 main::@5/(signed word) printf_sint::value#2 )
[74] *((byte*)&(struct printf_buffer_number) printf_buffer) ← (byte) 0
[75] if((signed word) printf_sint::value#3<(signed byte) 0) goto printf_sint::@1
[76] (signed word) printf_sint::value#3 ← phi( main::@2/(signed word) printf_sint::value#1 main::@5/(signed word) printf_sint::value#2 )
[77] *((byte*)&(struct printf_buffer_number) printf_buffer) ← (byte) 0
[78] if((signed word) printf_sint::value#3<(signed byte) 0) goto printf_sint::@1
to:printf_sint::@2
printf_sint::@1: scope:[printf_sint] from printf_sint
[76] (signed word) printf_sint::value#0 ← - (signed word) printf_sint::value#3
[77] *((byte*)&(struct printf_buffer_number) printf_buffer) ← (byte) '-'
[79] (signed word) printf_sint::value#0 ← - (signed word) printf_sint::value#3
[80] *((byte*)&(struct printf_buffer_number) printf_buffer) ← (byte) '-'
to:printf_sint::@2
printf_sint::@2: scope:[printf_sint] from printf_sint printf_sint::@1
[78] (signed word) printf_sint::value#5 ← phi( printf_sint::@1/(signed word) printf_sint::value#0 printf_sint/(signed word) printf_sint::value#3 )
[79] (word) utoa::value#1 ← (word)(signed word) printf_sint::value#5
[80] call utoa
[81] (signed word) printf_sint::value#5 ← phi( printf_sint::@1/(signed word) printf_sint::value#0 printf_sint/(signed word) printf_sint::value#3 )
[82] (word) utoa::value#1 ← (word)(signed word) printf_sint::value#5
[83] call utoa
to:printf_sint::@3
printf_sint::@3: scope:[printf_sint] from printf_sint::@2
[81] (byte) printf_number_buffer::buffer_sign#0 ← *((byte*)&(struct printf_buffer_number) printf_buffer)
[82] call printf_number_buffer
[84] (byte) printf_number_buffer::buffer_sign#0 ← *((byte*)&(struct printf_buffer_number) printf_buffer)
[85] call printf_number_buffer
to:printf_sint::@return
printf_sint::@return: scope:[printf_sint] from printf_sint::@3
[83] return
[86] return
to:@return
(void()) printf_number_buffer((byte) printf_number_buffer::buffer_sign , (byte*) printf_number_buffer::buffer_digits , (byte) printf_number_buffer::format_min_length , (byte) printf_number_buffer::format_justify_left , (byte) printf_number_buffer::format_sign_always , (byte) printf_number_buffer::format_zero_padding , (byte) printf_number_buffer::format_upper_case , (byte) printf_number_buffer::format_radix)
printf_number_buffer: scope:[printf_number_buffer] from printf_sint::@3
[84] phi()
[87] phi()
to:printf_number_buffer::@1
printf_number_buffer::@1: scope:[printf_number_buffer] from printf_number_buffer
[85] if((byte) 0==(byte) printf_number_buffer::buffer_sign#0) goto printf_number_buffer::@2
[88] if((byte) 0==(byte) printf_number_buffer::buffer_sign#0) goto printf_number_buffer::@2
to:printf_number_buffer::@3
printf_number_buffer::@3: scope:[printf_number_buffer] from printf_number_buffer::@1
[86] (byte) printf_char::ch#2 ← (byte) printf_number_buffer::buffer_sign#0
[87] call printf_char
[89] (byte) printf_char::ch#2 ← (byte) printf_number_buffer::buffer_sign#0
[90] call printf_char
to:printf_number_buffer::@2
printf_number_buffer::@2: scope:[printf_number_buffer] from printf_number_buffer::@1 printf_number_buffer::@3
[88] phi()
[89] call printf_str
[91] phi()
[92] call printf_str
to:printf_number_buffer::@return
printf_number_buffer::@return: scope:[printf_number_buffer] from printf_number_buffer::@2
[90] return
[93] return
to:@return
(void()) utoa((word) utoa::value , (byte*) utoa::buffer , (byte) utoa::radix)
utoa: scope:[utoa] from printf_sint::@2
[91] phi()
[94] phi()
to:utoa::@1
utoa::@1: scope:[utoa] from utoa utoa::@4
[92] (byte*) utoa::buffer#11 ← phi( utoa::@4/(byte*) utoa::buffer#14 utoa/(byte*)&(struct printf_buffer_number) printf_buffer+(const byte) OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS )
[92] (byte) utoa::started#2 ← phi( utoa::@4/(byte) utoa::started#4 utoa/(byte) 0 )
[92] (word) utoa::value#2 ← phi( utoa::@4/(word) utoa::value#6 utoa/(word) utoa::value#1 )
[92] (byte) utoa::digit#2 ← phi( utoa::@4/(byte) utoa::digit#1 utoa/(byte) 0 )
[93] if((byte) utoa::digit#2<(byte) 5-(byte) 1) goto utoa::@2
[95] (byte*) utoa::buffer#11 ← phi( utoa::@4/(byte*) utoa::buffer#14 utoa/(byte*)&(struct printf_buffer_number) printf_buffer+(const byte) OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS )
[95] (byte) utoa::started#2 ← phi( utoa::@4/(byte) utoa::started#4 utoa/(byte) 0 )
[95] (word) utoa::value#2 ← phi( utoa::@4/(word) utoa::value#6 utoa/(word) utoa::value#1 )
[95] (byte) utoa::digit#2 ← phi( utoa::@4/(byte) utoa::digit#1 utoa/(byte) 0 )
[96] if((byte) utoa::digit#2<(byte) 5-(byte) 1) goto utoa::@2
to:utoa::@3
utoa::@3: scope:[utoa] from utoa::@1
[94] (byte~) utoa::$11 ← (byte)(word) utoa::value#2
[95] *((byte*) utoa::buffer#11) ← *((const byte*) DIGITS + (byte~) utoa::$11)
[96] (byte*) utoa::buffer#3 ← ++ (byte*) utoa::buffer#11
[97] *((byte*) utoa::buffer#3) ← (byte) 0
[97] (byte~) utoa::$11 ← (byte)(word) utoa::value#2
[98] *((byte*) utoa::buffer#11) ← *((const byte*) DIGITS + (byte~) utoa::$11)
[99] (byte*) utoa::buffer#3 ← ++ (byte*) utoa::buffer#11
[100] *((byte*) utoa::buffer#3) ← (byte) 0
to:utoa::@return
utoa::@return: scope:[utoa] from utoa::@3
[98] return
[101] return
to:@return
utoa::@2: scope:[utoa] from utoa::@1
[99] (byte~) utoa::$10 ← (byte) utoa::digit#2 << (byte) 1
[100] (word) utoa::digit_value#0 ← *((const word*) RADIX_DECIMAL_VALUES + (byte~) utoa::$10)
[101] if((byte) 0!=(byte) utoa::started#2) goto utoa::@5
[102] (byte~) utoa::$10 ← (byte) utoa::digit#2 << (byte) 1
[103] (word) utoa::digit_value#0 ← *((const word*) RADIX_DECIMAL_VALUES + (byte~) utoa::$10)
[104] if((byte) 0!=(byte) utoa::started#2) goto utoa::@5
to:utoa::@7
utoa::@7: scope:[utoa] from utoa::@2
[102] if((word) utoa::value#2>=(word) utoa::digit_value#0) goto utoa::@5
[105] if((word) utoa::value#2>=(word) utoa::digit_value#0) goto utoa::@5
to:utoa::@4
utoa::@4: scope:[utoa] from utoa::@6 utoa::@7
[103] (byte*) utoa::buffer#14 ← phi( utoa::@7/(byte*) utoa::buffer#11 utoa::@6/(byte*) utoa::buffer#4 )
[103] (byte) utoa::started#4 ← phi( utoa::@7/(byte) utoa::started#2 utoa::@6/(byte) 1 )
[103] (word) utoa::value#6 ← phi( utoa::@7/(word) utoa::value#2 utoa::@6/(word) utoa::value#0 )
[104] (byte) utoa::digit#1 ← ++ (byte) utoa::digit#2
[106] (byte*) utoa::buffer#14 ← phi( utoa::@7/(byte*) utoa::buffer#11 utoa::@6/(byte*) utoa::buffer#4 )
[106] (byte) utoa::started#4 ← phi( utoa::@7/(byte) utoa::started#2 utoa::@6/(byte) 1 )
[106] (word) utoa::value#6 ← phi( utoa::@7/(word) utoa::value#2 utoa::@6/(word) utoa::value#0 )
[107] (byte) utoa::digit#1 ← ++ (byte) utoa::digit#2
to:utoa::@1
utoa::@5: scope:[utoa] from utoa::@2 utoa::@7
[105] (byte*) utoa_append::buffer#0 ← (byte*) utoa::buffer#11
[106] (word) utoa_append::value#0 ← (word) utoa::value#2
[107] (word) utoa_append::sub#0 ← (word) utoa::digit_value#0
[108] call utoa_append
[109] (word) utoa_append::return#0 ← (word) utoa_append::value#2
[108] (byte*) utoa_append::buffer#0 ← (byte*) utoa::buffer#11
[109] (word) utoa_append::value#0 ← (word) utoa::value#2
[110] (word) utoa_append::sub#0 ← (word) utoa::digit_value#0
[111] call utoa_append
[112] (word) utoa_append::return#0 ← (word) utoa_append::value#2
to:utoa::@6
utoa::@6: scope:[utoa] from utoa::@5
[110] (word) utoa::value#0 ← (word) utoa_append::return#0
[111] (byte*) utoa::buffer#4 ← ++ (byte*) utoa::buffer#11
[113] (word) utoa::value#0 ← (word) utoa_append::return#0
[114] (byte*) utoa::buffer#4 ← ++ (byte*) utoa::buffer#11
to:utoa::@4
(word()) utoa_append((byte*) utoa_append::buffer , (word) utoa_append::value , (word) utoa_append::sub)
utoa_append: scope:[utoa_append] from utoa::@5
[112] phi()
[115] phi()
to:utoa_append::@1
utoa_append::@1: scope:[utoa_append] from utoa_append utoa_append::@2
[113] (byte) utoa_append::digit#2 ← phi( utoa_append/(byte) 0 utoa_append::@2/(byte) utoa_append::digit#1 )
[113] (word) utoa_append::value#2 ← phi( utoa_append/(word) utoa_append::value#0 utoa_append::@2/(word) utoa_append::value#1 )
[114] if((word) utoa_append::value#2>=(word) utoa_append::sub#0) goto utoa_append::@2
[116] (byte) utoa_append::digit#2 ← phi( utoa_append/(byte) 0 utoa_append::@2/(byte) utoa_append::digit#1 )
[116] (word) utoa_append::value#2 ← phi( utoa_append/(word) utoa_append::value#0 utoa_append::@2/(word) utoa_append::value#1 )
[117] if((word) utoa_append::value#2>=(word) utoa_append::sub#0) goto utoa_append::@2
to:utoa_append::@3
utoa_append::@3: scope:[utoa_append] from utoa_append::@1
[115] *((byte*) utoa_append::buffer#0) ← *((const byte*) DIGITS + (byte) utoa_append::digit#2)
[118] *((byte*) utoa_append::buffer#0) ← *((const byte*) DIGITS + (byte) utoa_append::digit#2)
to:utoa_append::@return
utoa_append::@return: scope:[utoa_append] from utoa_append::@3
[116] return
[119] return
to:@return
utoa_append::@2: scope:[utoa_append] from utoa_append::@1
[117] (byte) utoa_append::digit#1 ← ++ (byte) utoa_append::digit#2
[118] (word) utoa_append::value#1 ← (word) utoa_append::value#2 - (word) utoa_append::sub#0
[120] (byte) utoa_append::digit#1 ← ++ (byte) utoa_append::digit#2
[121] (word) utoa_append::value#1 ← (word) utoa_append::value#2 - (word) utoa_append::sub#0
to:utoa_append::@1
(signed word()) atoi((to_nomodify byte*) atoi::str)
atoi: scope:[atoi] from main::@1 main::@4
[119] (to_nomodify byte*) atoi::str#2 ← phi( main::@1/(const byte*) main::str main::@4/(const byte*) main::str2 )
[120] if(*((to_nomodify byte*) atoi::str#2)!=(byte) '-') goto atoi::@3
[122] (to_nomodify byte*) atoi::str#2 ← phi( main::@1/(const byte*) main::str main::@4/(const byte*) main::str2 )
[123] if(*((to_nomodify byte*) atoi::str#2)!=(byte) '-') goto atoi::@3
to:atoi::@2
atoi::@2: scope:[atoi] from atoi
[121] phi()
[124] phi()
to:atoi::@3
atoi::@3: scope:[atoi] from atoi atoi::@2 atoi::@4
[122] (byte) atoi::negative#2 ← phi( atoi/(byte) 0 atoi::@2/(byte) 1 atoi::@4/(byte) atoi::negative#2 )
[122] (signed word) atoi::res#2 ← phi( atoi/(signed word) 0 atoi::@2/(signed word) 0 atoi::@4/(signed word) atoi::res#1 )
[122] (byte) atoi::i#4 ← phi( atoi/(byte) 0 atoi::@2/(byte) 1 atoi::@4/(byte) atoi::i#2 )
[123] if((byte) 0!=*((to_nomodify byte*) atoi::str#2 + (byte) atoi::i#4)) goto atoi::@4
[125] (byte) atoi::negative#2 ← phi( atoi/(byte) 0 atoi::@2/(byte) 1 atoi::@4/(byte) atoi::negative#2 )
[125] (signed word) atoi::res#2 ← phi( atoi/(signed word) 0 atoi::@2/(signed word) 0 atoi::@4/(signed word) atoi::res#1 )
[125] (byte) atoi::i#4 ← phi( atoi/(byte) 0 atoi::@2/(byte) 1 atoi::@4/(byte) atoi::i#2 )
[126] if((byte) 0!=*((to_nomodify byte*) atoi::str#2 + (byte) atoi::i#4)) goto atoi::@4
to:atoi::@5
atoi::@5: scope:[atoi] from atoi::@3
[124] if((byte) 0!=(byte) atoi::negative#2) goto atoi::@1
[127] if((byte) 0!=(byte) atoi::negative#2) goto atoi::@1
to:atoi::@return
atoi::@1: scope:[atoi] from atoi::@5
[125] (signed word) atoi::return#0 ← - (signed word) atoi::res#2
[128] (signed word) atoi::return#0 ← - (signed word) atoi::res#2
to:atoi::@return
atoi::@return: scope:[atoi] from atoi::@1 atoi::@5
[126] (signed word) atoi::return#2 ← phi( atoi::@1/(signed word) atoi::return#0 atoi::@5/(signed word) atoi::res#2 )
[127] return
[129] (signed word) atoi::return#2 ← phi( atoi::@1/(signed word) atoi::return#0 atoi::@5/(signed word) atoi::res#2 )
[130] return
to:@return
atoi::@4: scope:[atoi] from atoi::@3
[128] (signed word~) atoi::$8 ← (signed word) atoi::res#2 << (byte) 2
[129] (signed word~) atoi::$9 ← (signed word~) atoi::$8 + (signed word) atoi::res#2
[130] (signed word~) atoi::$3 ← (signed word~) atoi::$9 << (byte) 1
[131] (signed word~) atoi::$4 ← (signed word~) atoi::$3 + *((to_nomodify byte*) atoi::str#2 + (byte) atoi::i#4)
[132] (signed word) atoi::res#1 ← (signed word~) atoi::$4 - (byte) '0'
[133] (byte) atoi::i#2 ← ++ (byte) atoi::i#4
[131] (signed word~) atoi::$8 ← (signed word) atoi::res#2 << (byte) 2
[132] (signed word~) atoi::$9 ← (signed word~) atoi::$8 + (signed word) atoi::res#2
[133] (signed word~) atoi::$3 ← (signed word~) atoi::$9 << (byte) 1
[134] (signed word~) atoi::$4 ← (signed word~) atoi::$3 + *((to_nomodify byte*) atoi::str#2 + (byte) atoi::i#4)
[135] (signed word) atoi::res#1 ← (signed word~) atoi::$4 - (byte) '0'
[136] (byte) atoi::i#2 ← ++ (byte) atoi::i#4
to:atoi::@3
(void()) printf_cls()
printf_cls: scope:[printf_cls] from main
[134] phi()
[135] call memset
[137] phi()
[138] call memset
to:printf_cls::@1
printf_cls::@1: scope:[printf_cls] from printf_cls
[136] (byte*) printf_cursor_ptr ← (byte*) 1024
[137] (byte) printf_cursor_x ← (byte) 0
[138] (byte) printf_cursor_y ← (byte) 0
[139] (byte*) printf_cursor_ptr ← (byte*) 1024
[140] (byte) printf_cursor_x ← (byte) 0
[141] (byte) printf_cursor_y ← (byte) 0
to:printf_cls::@return
printf_cls::@return: scope:[printf_cls] from printf_cls::@1
[139] return
[142] return
to:@return

File diff suppressed because it is too large Load Diff

View File

@ -55,16 +55,16 @@
(void*) memcpy::destination
(const void*) memcpy::destination#0 destination = (void*) 1024
(byte*) memcpy::dst
(byte*) memcpy::dst#1 dst zp[2]:11 1.000000001E9
(byte*) memcpy::dst#2 dst zp[2]:11 1.000000001E9
(byte*) memcpy::dst#1 dst zp[2]:11 1.0000000001E10
(byte*) memcpy::dst#2 dst zp[2]:11 1.0000000001E10
(word) memcpy::num
(const word) memcpy::num#0 num = (word)(number) $28*(number) $19-(number) $28
(void*) memcpy::return
(void*) memcpy::source
(const void*) memcpy::source#0 source = (void*)(number) $400+(number) $28
(byte*) memcpy::src
(byte*) memcpy::src#1 src zp[2]:5 2.000000002E9
(byte*) memcpy::src#2 src zp[2]:5 1.000000001E9
(byte*) memcpy::src#1 src zp[2]:5 2.0000000002E10
(byte*) memcpy::src#2 src zp[2]:5 1.0000000001E10
(byte*) memcpy::src_end
(const byte*) memcpy::src_end#0 src_end = (byte*)(const void*) memcpy::source#0+(const word) memcpy::num#0
(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num)
@ -73,15 +73,15 @@
(label) memset::@3
(label) memset::@return
(byte) memset::c
(byte) memset::c#4 reg byte x 1.25000000125E8
(byte) memset::c#4 reg byte x 1.250000000125E9
(byte*) memset::dst
(byte*) memset::dst#1 dst zp[2]:11 2.000000002E9
(byte*) memset::dst#2 dst zp[2]:11 1.3366666683333335E9
(byte*) memset::dst#4 dst zp[2]:11 2.0000002E7
(byte*) memset::dst#1 dst zp[2]:11 2.0000000002E10
(byte*) memset::dst#2 dst zp[2]:11 1.3366666668333332E10
(byte*) memset::dst#4 dst zp[2]:11 2.00000002E8
(byte*) memset::end
(byte*) memset::end#0 end zp[2]:5 1.683333336666667E8
(byte*) memset::end#0 end zp[2]:5 1.6833333336666665E9
(word) memset::num
(word) memset::num#2 num zp[2]:5 1.0000001E7
(word) memset::num#2 num zp[2]:5 1.00000001E8
(void*) memset::return
(void*) memset::str
(void*) memset::str#3 str zp[2]:11
@ -89,11 +89,7 @@
(const byte*) printf_buffer_number::digits[(number) $b] = { fill( $b, 0) }
(byte) printf_buffer_number::sign
(void()) printf_char((byte) printf_char::ch)
(byte*~) printf_char::$6 zp[2]:9 2000002.0
(label) printf_char::@1
(label) printf_char::@2
(label) printf_char::@3
(label) printf_char::@4
(label) printf_char::@return
(byte) printf_char::ch
(byte) printf_char::ch#1 reg byte a 200002.0
@ -102,9 +98,9 @@
(void()) printf_cls()
(label) printf_cls::@1
(label) printf_cls::@return
(byte*) printf_cursor_ptr loadstore zp[2]:9 106062.27272727274
(byte) printf_cursor_x loadstore zp[1]:7 92309.36923076924
(byte) printf_cursor_y loadstore zp[1]:8 104479.25373134328
(byte*) printf_cursor_ptr loadstore zp[2]:9 362320.4347826087
(byte) printf_cursor_x loadstore zp[1]:7 101696.76271186439
(byte) printf_cursor_y loadstore zp[1]:8 485715.85714285716
(byte) printf_format_number::justify_left
(byte) printf_format_number::min_length
(byte) printf_format_number::radix
@ -136,6 +132,12 @@
(byte) printf_number_buffer::format_zero_padding
(signed byte) printf_number_buffer::len
(signed byte) printf_number_buffer::padding
(void()) printf_scroll()
(byte*~) printf_scroll::$4 zp[2]:9 2.0000002E7
(label) printf_scroll::@1
(label) printf_scroll::@2
(label) printf_scroll::@3
(label) printf_scroll::@return
(void()) printf_sint((signed word) printf_sint::value , (byte) printf_sint::format_min_length , (byte) printf_sint::format_justify_left , (byte) printf_sint::format_sign_always , (byte) printf_sint::format_zero_padding , (byte) printf_sint::format_upper_case , (byte) printf_sint::format_radix)
(label) printf_sint::@1
(label) printf_sint::@2
@ -219,8 +221,8 @@
(word) utoa_append::value#1 value zp[2]:2 2.0000002E7
(word) utoa_append::value#2 value zp[2]:2 5018334.166666666
reg byte a [ printf_char::ch#3 printf_char::ch#2 printf_char::ch#1 ]
reg byte x [ memset::c#4 ]
reg byte a [ printf_char::ch#3 printf_char::ch#2 printf_char::ch#1 ]
zp[2]:2 [ printf_sint::value#5 printf_sint::value#0 printf_sint::value#3 printf_sint::value#1 printf_sint::value#2 utoa::value#2 utoa::value#6 utoa::value#1 utoa::value#0 atoi::return#3 atoi::return#4 utoa_append::value#2 utoa_append::value#0 utoa_append::value#1 utoa_append::return#0 atoi::return#2 atoi::return#0 atoi::res#2 atoi::res#1 atoi::$9 atoi::$4 atoi::$3 printf_str::str#4 printf_str::str#6 printf_str::str#0 ]
zp[1]:4 [ utoa::digit#2 utoa::digit#1 ]
reg byte x [ utoa::started#2 utoa::started#4 ]
@ -230,7 +232,7 @@ reg byte y [ atoi::i#4 atoi::i#2 ]
reg byte x [ atoi::negative#2 ]
zp[1]:7 [ printf_cursor_x ]
zp[1]:8 [ printf_cursor_y ]
zp[2]:9 [ printf_cursor_ptr printf_char::$6 printf_ln::$0 printf_ln::$1 ]
zp[2]:9 [ printf_cursor_ptr printf_scroll::$4 printf_ln::$0 printf_ln::$1 ]
reg byte a [ printf_str::ch#0 ]
reg byte a [ printf_number_buffer::buffer_sign#0 ]
reg byte a [ utoa::$11 ]

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,661 @@
@begin: scope:[] from
[0] phi()
to:@1
@1: scope:[] from @begin
[1] (byte) printf_cursor_x ← (byte) 0
[2] (byte) printf_cursor_y ← (byte) 0
[3] (byte*) printf_cursor_ptr ← (byte*) 1024
to:@2
@2: scope:[] from @1
[4] (byte) count ← (byte) 0
to:@3
@3: scope:[] from @2
[5] phi()
[6] call main
to:@end
@end: scope:[] from @3
[7] phi()
(void()) main()
main: scope:[main] from @3
[8] phi()
[9] call printf_cls
to:main::@1
main::@1: scope:[main] from main
[10] phi()
[11] call printf_str
to:main::@2
main::@2: scope:[main] from main::@1
[12] phi()
[13] call printf_str
to:main::@3
main::@3: scope:[main] from main::@2
[14] phi()
[15] call printf_uint
to:main::@4
main::@4: scope:[main] from main::@3
[16] stackpush(byte) ← (byte) 1
[17] callexecute queen
sideeffect stackpullbytes((number) 1)
to:main::@return
main::@return: scope:[main] from main::@4
[19] return
to:@return
(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)
printf_uint: scope:[printf_uint] from main::@3
[20] phi()
to:printf_uint::@1
printf_uint::@1: scope:[printf_uint] from printf_uint
[21] *((byte*)&(struct printf_buffer_number) printf_buffer) ← (byte) 0
[22] call utoa
to:printf_uint::@2
printf_uint::@2: scope:[printf_uint] from printf_uint::@1
[23] (byte) printf_number_buffer::buffer_sign#0 ← *((byte*)&(struct printf_buffer_number) printf_buffer)
[24] call printf_number_buffer
to:printf_uint::@return
printf_uint::@return: scope:[printf_uint] from printf_uint::@2
[25] return
to:@return
(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_uchar::@2 printf_uint::@2
[26] (byte) printf_number_buffer::format_upper_case#10 ← phi( printf_uchar::@2/(byte) 0 printf_uint::@2/(const byte) printf_uint::format_upper_case#0 )
[26] (byte) printf_number_buffer::buffer_sign#10 ← phi( printf_uchar::@2/(byte) printf_number_buffer::buffer_sign#1 printf_uint::@2/(byte) printf_number_buffer::buffer_sign#0 )
[26] (byte*) printf_number_buffer::buffer_digits#10 ← phi( printf_uchar::@2/(byte*)&(struct printf_buffer_number) printf_buffer+(const byte) OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS printf_uint::@2/(byte*)&(struct printf_buffer_number) printf_buffer+(const byte) OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS )
[26] (byte) printf_number_buffer::format_zero_padding#10 ← phi( printf_uchar::@2/(byte) 0 printf_uint::@2/(const byte) printf_uint::format_zero_padding#0 )
[26] (byte) printf_number_buffer::format_justify_left#10 ← phi( printf_uchar::@2/(byte) 0 printf_uint::@2/(const byte) printf_uint::format_justify_left#0 )
[26] (byte) printf_number_buffer::format_min_length#2 ← phi( printf_uchar::@2/(byte) 0 printf_uint::@2/(const byte) printf_uint::format_min_length#0 )
[27] if((byte) 0==(byte) printf_number_buffer::format_min_length#2) goto printf_number_buffer::@1
to:printf_number_buffer::@6
printf_number_buffer::@6: scope:[printf_number_buffer] from printf_number_buffer
[28] (byte*) strlen::str#1 ← (byte*) printf_number_buffer::buffer_digits#10
[29] call strlen
[30] (word) strlen::return#2 ← (word) strlen::len#2
to:printf_number_buffer::@14
printf_number_buffer::@14: scope:[printf_number_buffer] from printf_number_buffer::@6
[31] (word~) printf_number_buffer::$19 ← (word) strlen::return#2
[32] (signed byte) printf_number_buffer::len#0 ← (signed byte)(word~) printf_number_buffer::$19
[33] if((byte) 0==(byte) printf_number_buffer::buffer_sign#10) goto printf_number_buffer::@13
to:printf_number_buffer::@7
printf_number_buffer::@7: scope:[printf_number_buffer] from printf_number_buffer::@14
[34] (signed byte) printf_number_buffer::len#1 ← ++ (signed byte) printf_number_buffer::len#0
to:printf_number_buffer::@13
printf_number_buffer::@13: scope:[printf_number_buffer] from printf_number_buffer::@14 printf_number_buffer::@7
[35] (signed byte) printf_number_buffer::len#2 ← phi( printf_number_buffer::@14/(signed byte) printf_number_buffer::len#0 printf_number_buffer::@7/(signed byte) printf_number_buffer::len#1 )
[36] (signed byte) printf_number_buffer::padding#1 ← (signed byte)(byte) printf_number_buffer::format_min_length#2 - (signed byte) printf_number_buffer::len#2
[37] if((signed byte) printf_number_buffer::padding#1>=(signed byte) 0) goto printf_number_buffer::@21
to:printf_number_buffer::@1
printf_number_buffer::@21: scope:[printf_number_buffer] from printf_number_buffer::@13
[38] phi()
to:printf_number_buffer::@1
printf_number_buffer::@1: scope:[printf_number_buffer] from printf_number_buffer printf_number_buffer::@13 printf_number_buffer::@21
[39] (signed byte) printf_number_buffer::padding#10 ← phi( printf_number_buffer/(signed byte) 0 printf_number_buffer::@21/(signed byte) printf_number_buffer::padding#1 printf_number_buffer::@13/(signed byte) 0 )
[40] if((byte) 0!=(byte) printf_number_buffer::format_justify_left#10) goto printf_number_buffer::@2
to:printf_number_buffer::@17
printf_number_buffer::@17: scope:[printf_number_buffer] from printf_number_buffer::@1
[41] if((byte) 0!=(byte) printf_number_buffer::format_zero_padding#10) goto printf_number_buffer::@2
to:printf_number_buffer::@16
printf_number_buffer::@16: scope:[printf_number_buffer] from printf_number_buffer::@17
[42] if((signed byte) 0!=(signed byte) printf_number_buffer::padding#10) goto printf_number_buffer::@8
to:printf_number_buffer::@2
printf_number_buffer::@8: scope:[printf_number_buffer] from printf_number_buffer::@16
[43] (byte) printf_padding::length#0 ← (byte)(signed byte) printf_number_buffer::padding#10
[44] call printf_padding
to:printf_number_buffer::@2
printf_number_buffer::@2: scope:[printf_number_buffer] from printf_number_buffer::@1 printf_number_buffer::@16 printf_number_buffer::@17 printf_number_buffer::@8
[45] if((byte) 0==(byte) printf_number_buffer::buffer_sign#10) goto printf_number_buffer::@3
to:printf_number_buffer::@9
printf_number_buffer::@9: scope:[printf_number_buffer] from printf_number_buffer::@2
[46] (byte) printf_char::ch#2 ← (byte) printf_number_buffer::buffer_sign#10
[47] call printf_char
to:printf_number_buffer::@3
printf_number_buffer::@3: scope:[printf_number_buffer] from printf_number_buffer::@2 printf_number_buffer::@9
[48] if((byte) 0==(byte) printf_number_buffer::format_zero_padding#10) goto printf_number_buffer::@4
to:printf_number_buffer::@18
printf_number_buffer::@18: scope:[printf_number_buffer] from printf_number_buffer::@3
[49] if((signed byte) 0!=(signed byte) printf_number_buffer::padding#10) goto printf_number_buffer::@10
to:printf_number_buffer::@4
printf_number_buffer::@10: scope:[printf_number_buffer] from printf_number_buffer::@18
[50] (byte) printf_padding::length#1 ← (byte)(signed byte) printf_number_buffer::padding#10
[51] call printf_padding
to:printf_number_buffer::@4
printf_number_buffer::@4: scope:[printf_number_buffer] from printf_number_buffer::@10 printf_number_buffer::@18 printf_number_buffer::@3
[52] if((byte) 0==(byte) printf_number_buffer::format_upper_case#10) goto printf_number_buffer::@5
to:printf_number_buffer::@11
printf_number_buffer::@11: scope:[printf_number_buffer] from printf_number_buffer::@4
[53] (byte*) strupr::str#0 ← (byte*) printf_number_buffer::buffer_digits#10
[54] call strupr
to:printf_number_buffer::@5
printf_number_buffer::@5: scope:[printf_number_buffer] from printf_number_buffer::@11 printf_number_buffer::@4
[55] (byte*) printf_str::str#1 ← (byte*) printf_number_buffer::buffer_digits#10
[56] call printf_str
to:printf_number_buffer::@15
printf_number_buffer::@15: scope:[printf_number_buffer] from printf_number_buffer::@5
[57] if((byte) 0==(byte) printf_number_buffer::format_justify_left#10) goto printf_number_buffer::@return
to:printf_number_buffer::@20
printf_number_buffer::@20: scope:[printf_number_buffer] from printf_number_buffer::@15
[58] if((byte) 0!=(byte) printf_number_buffer::format_zero_padding#10) goto printf_number_buffer::@return
to:printf_number_buffer::@19
printf_number_buffer::@19: scope:[printf_number_buffer] from printf_number_buffer::@20
[59] if((signed byte) 0!=(signed byte) printf_number_buffer::padding#10) goto printf_number_buffer::@12
to:printf_number_buffer::@return
printf_number_buffer::@12: scope:[printf_number_buffer] from printf_number_buffer::@19
[60] (byte) printf_padding::length#2 ← (byte)(signed byte) printf_number_buffer::padding#10
[61] call printf_padding
to:printf_number_buffer::@return
printf_number_buffer::@return: scope:[printf_number_buffer] from printf_number_buffer::@12 printf_number_buffer::@15 printf_number_buffer::@19 printf_number_buffer::@20
[62] return
to:@return
(void()) printf_padding((byte) printf_padding::pad , (byte) printf_padding::length)
printf_padding: scope:[printf_padding] from printf_number_buffer::@10 printf_number_buffer::@12 printf_number_buffer::@8
[63] (byte) printf_padding::pad#5 ← phi( printf_number_buffer::@10/(byte) '0' printf_number_buffer::@12/(byte) ' ' printf_number_buffer::@8/(byte) ' ' )
[63] (byte) printf_padding::length#4 ← phi( printf_number_buffer::@10/(byte) printf_padding::length#1 printf_number_buffer::@12/(byte) printf_padding::length#2 printf_number_buffer::@8/(byte) printf_padding::length#0 )
to:printf_padding::@1
printf_padding::@1: scope:[printf_padding] from printf_padding printf_padding::@3
[64] (byte) printf_padding::i#2 ← phi( printf_padding/(byte) 0 printf_padding::@3/(byte) printf_padding::i#1 )
[65] if((byte) printf_padding::i#2<(byte) printf_padding::length#4) goto printf_padding::@2
to:printf_padding::@return
printf_padding::@return: scope:[printf_padding] from printf_padding::@1
[66] return
to:@return
printf_padding::@2: scope:[printf_padding] from printf_padding::@1
[67] (byte) printf_char::ch#0 ← (byte) printf_padding::pad#5
[68] call printf_char
to:printf_padding::@3
printf_padding::@3: scope:[printf_padding] from printf_padding::@2
[69] (byte) printf_padding::i#1 ← ++ (byte) printf_padding::i#2
to:printf_padding::@1
(void()) printf_char((byte) printf_char::ch)
printf_char: scope:[printf_char] from printf_number_buffer::@9 printf_padding::@2 printf_str::@5
[70] (byte) printf_char::ch#3 ← phi( printf_number_buffer::@9/(byte) printf_char::ch#2 printf_padding::@2/(byte) printf_char::ch#0 printf_str::@5/(byte) printf_char::ch#1 )
[71] *((byte*) printf_cursor_ptr) ← (byte) printf_char::ch#3
[72] (byte*) printf_cursor_ptr ← ++ (byte*) printf_cursor_ptr
[73] (byte) printf_cursor_x ← ++ (byte) printf_cursor_x
[74] if((byte) printf_cursor_x!=(byte) $28) goto printf_char::@return
to:printf_char::@1
printf_char::@1: scope:[printf_char] from printf_char
[75] (byte) printf_cursor_x ← (byte) 0
[76] (byte) printf_cursor_y ← ++ (byte) printf_cursor_y
[77] call printf_scroll
to:printf_char::@return
printf_char::@return: scope:[printf_char] from printf_char printf_char::@1
[78] return
to:@return
(void()) printf_scroll()
printf_scroll: scope:[printf_scroll] from printf_char::@1 printf_ln
[79] if((byte) printf_cursor_y!=(byte) $19) goto printf_scroll::@return
to:printf_scroll::@1
printf_scroll::@1: scope:[printf_scroll] from printf_scroll
[80] phi()
[81] call memcpy
to:printf_scroll::@2
printf_scroll::@2: scope:[printf_scroll] from printf_scroll::@1
[82] phi()
[83] call memset
to:printf_scroll::@3
printf_scroll::@3: scope:[printf_scroll] from printf_scroll::@2
[84] (byte*~) printf_scroll::$4 ← (byte*) printf_cursor_ptr - (byte) $28
[85] (byte*) printf_cursor_ptr ← (byte*~) printf_scroll::$4
[86] (byte) printf_cursor_y ← -- (byte) printf_cursor_y
to:printf_scroll::@return
printf_scroll::@return: scope:[printf_scroll] from printf_scroll printf_scroll::@3
[87] return
to:@return
(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num)
memset: scope:[memset] from printf_cls printf_scroll::@2
[88] (byte) memset::c#4 ← phi( printf_cls/(byte) ' ' printf_scroll::@2/(byte) ' ' )
[88] (void*) memset::str#3 ← phi( printf_cls/(void*) 1024 printf_scroll::@2/(void*)(number) $400+(number) $28*(number) $19-(number) $28 )
[88] (word) memset::num#2 ← phi( printf_cls/(word)(number) $28*(number) $19 printf_scroll::@2/(byte) $28 )
[89] if((word) memset::num#2<=(byte) 0) goto memset::@return
to:memset::@1
memset::@1: scope:[memset] from memset
[90] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) memset::num#2
[91] (byte*) memset::dst#4 ← (byte*)(void*) memset::str#3
to:memset::@2
memset::@2: scope:[memset] from memset::@1 memset::@3
[92] (byte*) memset::dst#2 ← phi( memset::@1/(byte*) memset::dst#4 memset::@3/(byte*) memset::dst#1 )
[93] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@3
to:memset::@return
memset::@return: scope:[memset] from memset memset::@2
[94] return
to:@return
memset::@3: scope:[memset] from memset::@2
[95] *((byte*) memset::dst#2) ← (byte) memset::c#4
[96] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2
to:memset::@2
(void*()) memcpy((void*) memcpy::destination , (void*) memcpy::source , (word) memcpy::num)
memcpy: scope:[memcpy] from printf_scroll::@1
[97] phi()
to:memcpy::@1
memcpy::@1: scope:[memcpy] from memcpy memcpy::@2
[98] (byte*) memcpy::dst#2 ← phi( memcpy/(byte*)(const void*) memcpy::destination#0 memcpy::@2/(byte*) memcpy::dst#1 )
[98] (byte*) memcpy::src#2 ← phi( memcpy/(byte*)(const void*) memcpy::source#0 memcpy::@2/(byte*) memcpy::src#1 )
[99] if((byte*) memcpy::src#2!=(const byte*) memcpy::src_end#0) goto memcpy::@2
to:memcpy::@return
memcpy::@return: scope:[memcpy] from memcpy::@1
[100] return
to:@return
memcpy::@2: scope:[memcpy] from memcpy::@1
[101] *((byte*) memcpy::dst#2) ← *((byte*) memcpy::src#2)
[102] (byte*) memcpy::dst#1 ← ++ (byte*) memcpy::dst#2
[103] (byte*) memcpy::src#1 ← ++ (byte*) memcpy::src#2
to:memcpy::@1
(void()) printf_str((byte*) printf_str::str)
printf_str: scope:[printf_str] from main::@1 main::@2 print print::@10 print::@12 print::@4 print::@8 printf_number_buffer::@5
[104] (byte*) printf_str::str#11 ← phi( main::@1/(const byte*) main::str main::@2/(const byte*) main::str1 print/(const byte*) print::str print::@10/(const byte*) print::str4 print::@12/(const byte*) print::str1 print::@4/(const byte*) print::str2 print::@8/(const byte*) print::str3 printf_number_buffer::@5/(byte*) printf_str::str#1 )
to:printf_str::@1
printf_str::@1: scope:[printf_str] from printf_str printf_str::@4 printf_str::@5
[105] (byte*) printf_str::str#10 ← phi( printf_str/(byte*) printf_str::str#11 printf_str::@4/(byte*) printf_str::str#0 printf_str::@5/(byte*) printf_str::str#0 )
to:printf_str::@2
printf_str::@2: scope:[printf_str] from printf_str::@1
[106] (byte) printf_str::ch#0 ← *((byte*) printf_str::str#10)
[107] (byte*) printf_str::str#0 ← ++ (byte*) printf_str::str#10
[108] if((byte) printf_str::ch#0!=(byte) 0) goto printf_str::@3
to:printf_str::@return
printf_str::@return: scope:[printf_str] from printf_str::@2
[109] return
to:@return
printf_str::@3: scope:[printf_str] from printf_str::@2
[110] if((byte) printf_str::ch#0==(byte) '
') goto printf_str::@4
to:printf_str::@5
printf_str::@5: scope:[printf_str] from printf_str::@3
[111] (byte) printf_char::ch#1 ← (byte) printf_str::ch#0
[112] call printf_char
to:printf_str::@1
printf_str::@4: scope:[printf_str] from printf_str::@3
[113] phi()
[114] call printf_ln
to:printf_str::@1
(void()) printf_ln()
printf_ln: scope:[printf_ln] from printf_str::@4
[115] (byte*~) printf_ln::$0 ← (byte*) printf_cursor_ptr - (byte) printf_cursor_x
[116] (byte*~) printf_ln::$1 ← (byte*~) printf_ln::$0 + (byte) $28
[117] (byte*) printf_cursor_ptr ← (byte*~) printf_ln::$1
[118] (byte) printf_cursor_x ← (byte) 0
[119] (byte) printf_cursor_y ← ++ (byte) printf_cursor_y
[120] call printf_scroll
to:printf_ln::@return
printf_ln::@return: scope:[printf_ln] from printf_ln
[121] return
to:@return
(byte*()) strupr((byte*) strupr::str)
strupr: scope:[strupr] from printf_number_buffer::@11
[122] phi()
to:strupr::@1
strupr::@1: scope:[strupr] from strupr strupr::@3
[123] (byte*) strupr::src#2 ← phi( strupr/(byte*) strupr::str#0 strupr::@3/(byte*) strupr::src#1 )
[124] if((byte) 0!=*((byte*) strupr::src#2)) goto strupr::@2
to:strupr::@return
strupr::@return: scope:[strupr] from strupr::@1
[125] return
to:@return
strupr::@2: scope:[strupr] from strupr::@1
[126] (byte) toupper::ch#0 ← *((byte*) strupr::src#2)
[127] call toupper
[128] (byte) toupper::return#3 ← (byte) toupper::return#2
to:strupr::@3
strupr::@3: scope:[strupr] from strupr::@2
[129] (byte~) strupr::$0 ← (byte) toupper::return#3
[130] *((byte*) strupr::src#2) ← (byte~) strupr::$0
[131] (byte*) strupr::src#1 ← ++ (byte*) strupr::src#2
to:strupr::@1
(byte()) toupper((byte) toupper::ch)
toupper: scope:[toupper] from strupr::@2
[132] if((byte) toupper::ch#0<(byte) 'a') goto toupper::@return
to:toupper::@2
toupper::@2: scope:[toupper] from toupper
[133] if((byte) toupper::ch#0<=(byte) 'z') goto toupper::@1
to:toupper::@return
toupper::@1: scope:[toupper] from toupper::@2
[134] (byte) toupper::return#0 ← (byte) toupper::ch#0 + (byte) 'A'-(byte) 'a'
to:toupper::@return
toupper::@return: scope:[toupper] from toupper toupper::@1 toupper::@2
[135] (byte) toupper::return#2 ← phi( toupper::@1/(byte) toupper::return#0 toupper/(byte) toupper::ch#0 toupper::@2/(byte) toupper::ch#0 )
[136] return
to:@return
(word()) strlen((byte*) strlen::str)
strlen: scope:[strlen] from printf_number_buffer::@6
[137] phi()
to:strlen::@1
strlen::@1: scope:[strlen] from strlen strlen::@2
[138] (word) strlen::len#2 ← phi( strlen/(word) 0 strlen::@2/(word) strlen::len#1 )
[138] (byte*) strlen::str#2 ← phi( strlen/(byte*) strlen::str#1 strlen::@2/(byte*) strlen::str#0 )
[139] if((byte) 0!=*((byte*) strlen::str#2)) goto strlen::@2
to:strlen::@return
strlen::@return: scope:[strlen] from strlen::@1
[140] return
to:@return
strlen::@2: scope:[strlen] from strlen::@1
[141] (word) strlen::len#1 ← ++ (word) strlen::len#2
[142] (byte*) strlen::str#0 ← ++ (byte*) strlen::str#2
to:strlen::@1
(void()) utoa((word) utoa::value , (byte*) utoa::buffer , (byte) utoa::radix)
utoa: scope:[utoa] from printf_uint::@1
[143] phi()
to:utoa::@1
utoa::@1: scope:[utoa] from utoa utoa::@4
[144] (byte*) utoa::buffer#11 ← phi( utoa::@4/(byte*) utoa::buffer#14 utoa/(byte*)&(struct printf_buffer_number) printf_buffer+(const byte) OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS )
[144] (byte) utoa::started#2 ← phi( utoa::@4/(byte) utoa::started#4 utoa/(byte) 0 )
[144] (word) utoa::value#2 ← phi( utoa::@4/(word) utoa::value#6 utoa/(const word) printf_uint::uvalue#0 )
[144] (byte) utoa::digit#2 ← phi( utoa::@4/(byte) utoa::digit#1 utoa/(byte) 0 )
[145] if((byte) utoa::digit#2<(const byte) utoa::max_digits#1-(byte) 1) goto utoa::@2
to:utoa::@3
utoa::@3: scope:[utoa] from utoa::@1
[146] (byte~) utoa::$11 ← (byte)(word) utoa::value#2
[147] *((byte*) utoa::buffer#11) ← *((const byte*) DIGITS + (byte~) utoa::$11)
[148] (byte*) utoa::buffer#3 ← ++ (byte*) utoa::buffer#11
[149] *((byte*) utoa::buffer#3) ← (byte) 0
to:utoa::@return
utoa::@return: scope:[utoa] from utoa::@3
[150] return
to:@return
utoa::@2: scope:[utoa] from utoa::@1
[151] (byte~) utoa::$10 ← (byte) utoa::digit#2 << (byte) 1
[152] (word) utoa::digit_value#0 ← *((const word*) RADIX_DECIMAL_VALUES + (byte~) utoa::$10)
[153] if((byte) 0!=(byte) utoa::started#2) goto utoa::@5
to:utoa::@7
utoa::@7: scope:[utoa] from utoa::@2
[154] if((word) utoa::value#2>=(word) utoa::digit_value#0) goto utoa::@5
to:utoa::@4
utoa::@4: scope:[utoa] from utoa::@6 utoa::@7
[155] (byte*) utoa::buffer#14 ← phi( utoa::@7/(byte*) utoa::buffer#11 utoa::@6/(byte*) utoa::buffer#4 )
[155] (byte) utoa::started#4 ← phi( utoa::@7/(byte) utoa::started#2 utoa::@6/(byte) 1 )
[155] (word) utoa::value#6 ← phi( utoa::@7/(word) utoa::value#2 utoa::@6/(word) utoa::value#0 )
[156] (byte) utoa::digit#1 ← ++ (byte) utoa::digit#2
to:utoa::@1
utoa::@5: scope:[utoa] from utoa::@2 utoa::@7
[157] (byte*) utoa_append::buffer#0 ← (byte*) utoa::buffer#11
[158] (word) utoa_append::value#0 ← (word) utoa::value#2
[159] (word) utoa_append::sub#0 ← (word) utoa::digit_value#0
[160] call utoa_append
[161] (word) utoa_append::return#0 ← (word) utoa_append::value#2
to:utoa::@6
utoa::@6: scope:[utoa] from utoa::@5
[162] (word) utoa::value#0 ← (word) utoa_append::return#0
[163] (byte*) utoa::buffer#4 ← ++ (byte*) utoa::buffer#11
to:utoa::@4
(word()) utoa_append((byte*) utoa_append::buffer , (word) utoa_append::value , (word) utoa_append::sub)
utoa_append: scope:[utoa_append] from utoa::@5
[164] phi()
to:utoa_append::@1
utoa_append::@1: scope:[utoa_append] from utoa_append utoa_append::@2
[165] (byte) utoa_append::digit#2 ← phi( utoa_append/(byte) 0 utoa_append::@2/(byte) utoa_append::digit#1 )
[165] (word) utoa_append::value#2 ← phi( utoa_append/(word) utoa_append::value#0 utoa_append::@2/(word) utoa_append::value#1 )
[166] if((word) utoa_append::value#2>=(word) utoa_append::sub#0) goto utoa_append::@2
to:utoa_append::@3
utoa_append::@3: scope:[utoa_append] from utoa_append::@1
[167] *((byte*) utoa_append::buffer#0) ← *((const byte*) DIGITS + (byte) utoa_append::digit#2)
to:utoa_append::@return
utoa_append::@return: scope:[utoa_append] from utoa_append::@3
[168] return
to:@return
utoa_append::@2: scope:[utoa_append] from utoa_append::@1
[169] (byte) utoa_append::digit#1 ← ++ (byte) utoa_append::digit#2
[170] (word) utoa_append::value#1 ← (word) utoa_append::value#2 - (word) utoa_append::sub#0
to:utoa_append::@1
(void()) printf_cls()
printf_cls: scope:[printf_cls] from main
[171] phi()
[172] call memset
to:printf_cls::@1
printf_cls::@1: scope:[printf_cls] from printf_cls
[173] (byte*) printf_cursor_ptr ← (byte*) 1024
[174] (byte) printf_cursor_x ← (byte) 0
[175] (byte) printf_cursor_y ← (byte) 0
to:printf_cls::@return
printf_cls::@return: scope:[printf_cls] from printf_cls::@1
[176] return
to:@return
__stackcall (void()) queen((byte) queen::row)
queen: scope:[queen] from
[177] (byte) queen::row#0 ← stackidx(byte,(const byte) queen::OFFSET_STACK_ROW)
[178] (byte) queen::r ← (byte) queen::row#0
[179] (byte) queen::column ← (byte) 1
to:queen::@1
queen::@1: scope:[queen] from queen queen::@3
[180] if((byte) queen::column<(byte) 8+(byte) 1) goto queen::@2
to:queen::@return
queen::@return: scope:[queen] from queen::@1
[181] return
to:@return
queen::@2: scope:[queen] from queen::@1
[182] (byte) place::row#0 ← (byte) queen::r
[183] (byte) place::column#0 ← (byte) queen::column
[184] call place
[185] (byte) place::return#0 ← (byte) place::return#4
to:queen::@7
queen::@7: scope:[queen] from queen::@2
[186] (byte~) queen::$1 ← (byte) place::return#0
[187] if((byte) 0==(byte~) queen::$1) goto queen::@3
to:queen::@5
queen::@5: scope:[queen] from queen::@7
[188] *((const byte*) board + (byte) queen::r) ← (byte) queen::column
[189] if((byte) queen::r==(byte) 8) goto queen::@4
to:queen::@6
queen::@6: scope:[queen] from queen::@5
asm { ldacolumn pha ldar pha }
[191] (byte~) queen::$4 ← (byte) queen::r + (byte) 1
[192] stackpush(byte) ← (byte~) queen::$4
[193] callexecute queen
sideeffect stackpullbytes((number) 1)
asm { pla star pla stacolumn }
to:queen::@3
queen::@3: scope:[queen] from queen::@4 queen::@6 queen::@7
[196] (byte) queen::column ← ++ (byte) queen::column
to:queen::@1
queen::@4: scope:[queen] from queen::@5
[197] phi()
[198] call print
to:queen::@3
(void()) print()
print: scope:[print] from queen::@4
[199] (byte) count ← ++ (byte) count
[200] call printf_str
to:print::@11
print::@11: scope:[print] from print
[201] (byte) printf_uchar::uvalue#0 ← (byte) count
[202] call printf_uchar
to:print::@12
print::@12: scope:[print] from print::@11
[203] phi()
[204] call printf_str
to:print::@1
print::@1: scope:[print] from print::@12 print::@13
[205] (byte) print::i#2 ← phi( print::@12/(byte) 1 print::@13/(byte) print::i#1 )
[206] if((byte) print::i#2<(byte) 8+(byte) 1) goto print::@2
to:print::@3
print::@3: scope:[print] from print::@1 print::@7
[207] (byte) print::i1#2 ← phi( print::@1/(byte) 1 print::@7/(byte) print::i1#1 )
[208] if((byte) print::i1#2<(byte) 8+(byte) 1) goto print::@4
to:print::@return
print::@return: scope:[print] from print::@3
[209] return
to:@return
print::@4: scope:[print] from print::@3
[210] phi()
[211] call printf_str
to:print::@14
print::@14: scope:[print] from print::@4
[212] (byte) printf_uchar::uvalue#2 ← (byte) print::i1#2
[213] call printf_uchar
to:print::@5
print::@5: scope:[print] from print::@14 print::@9
[214] (byte) print::j#2 ← phi( print::@9/(byte) print::j#1 print::@14/(byte) 1 )
[215] if((byte) print::j#2<(byte) 8+(byte) 1) goto print::@6
to:print::@7
print::@7: scope:[print] from print::@5
[216] (byte) print::i1#1 ← ++ (byte) print::i1#2
to:print::@3
print::@6: scope:[print] from print::@5
[217] if(*((const byte*) board + (byte) print::i1#2)==(byte) print::j#2) goto print::@8
to:print::@10
print::@10: scope:[print] from print::@6
[218] phi()
[219] call printf_str
to:print::@9
print::@9: scope:[print] from print::@10 print::@8
[220] (byte) print::j#1 ← ++ (byte) print::j#2
to:print::@5
print::@8: scope:[print] from print::@6
[221] phi()
[222] call printf_str
to:print::@9
print::@2: scope:[print] from print::@1
[223] (byte) printf_uchar::uvalue#1 ← (byte) print::i#2
[224] call printf_uchar
to:print::@13
print::@13: scope:[print] from print::@2
[225] (byte) print::i#1 ← ++ (byte) print::i#2
to:print::@1
(void()) printf_uchar((byte) printf_uchar::uvalue , (byte) printf_uchar::format_min_length , (byte) printf_uchar::format_justify_left , (byte) printf_uchar::format_sign_always , (byte) printf_uchar::format_zero_padding , (byte) printf_uchar::format_upper_case , (byte) printf_uchar::format_radix)
printf_uchar: scope:[printf_uchar] from print::@11 print::@14 print::@2
[226] (byte) printf_uchar::uvalue#3 ← phi( print::@11/(byte) printf_uchar::uvalue#0 print::@14/(byte) printf_uchar::uvalue#2 print::@2/(byte) printf_uchar::uvalue#1 )
to:printf_uchar::@1
printf_uchar::@1: scope:[printf_uchar] from printf_uchar
[227] *((byte*)&(struct printf_buffer_number) printf_buffer) ← (byte) 0
[228] (byte) uctoa::value#1 ← (byte) printf_uchar::uvalue#3
[229] call uctoa
to:printf_uchar::@2
printf_uchar::@2: scope:[printf_uchar] from printf_uchar::@1
[230] (byte) printf_number_buffer::buffer_sign#1 ← *((byte*)&(struct printf_buffer_number) printf_buffer)
[231] call printf_number_buffer
to:printf_uchar::@return
printf_uchar::@return: scope:[printf_uchar] from printf_uchar::@2
[232] return
to:@return
(void()) uctoa((byte) uctoa::value , (byte*) uctoa::buffer , (byte) uctoa::radix)
uctoa: scope:[uctoa] from printf_uchar::@1
[233] phi()
to:uctoa::@1
uctoa::@1: scope:[uctoa] from uctoa uctoa::@4
[234] (byte*) uctoa::buffer#11 ← phi( uctoa::@4/(byte*) uctoa::buffer#14 uctoa/(byte*)&(struct printf_buffer_number) printf_buffer+(const byte) OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS )
[234] (byte) uctoa::started#2 ← phi( uctoa::@4/(byte) uctoa::started#4 uctoa/(byte) 0 )
[234] (byte) uctoa::value#2 ← phi( uctoa::@4/(byte) uctoa::value#6 uctoa/(byte) uctoa::value#1 )
[234] (byte) uctoa::digit#2 ← phi( uctoa::@4/(byte) uctoa::digit#1 uctoa/(byte) 0 )
[235] if((byte) uctoa::digit#2<(byte) 3-(byte) 1) goto uctoa::@2
to:uctoa::@3
uctoa::@3: scope:[uctoa] from uctoa::@1
[236] *((byte*) uctoa::buffer#11) ← *((const byte*) DIGITS + (byte) uctoa::value#2)
[237] (byte*) uctoa::buffer#3 ← ++ (byte*) uctoa::buffer#11
[238] *((byte*) uctoa::buffer#3) ← (byte) 0
to:uctoa::@return
uctoa::@return: scope:[uctoa] from uctoa::@3
[239] return
to:@return
uctoa::@2: scope:[uctoa] from uctoa::@1
[240] (byte) uctoa::digit_value#0 ← *((const byte*) RADIX_DECIMAL_VALUES_CHAR + (byte) uctoa::digit#2)
[241] if((byte) 0!=(byte) uctoa::started#2) goto uctoa::@5
to:uctoa::@7
uctoa::@7: scope:[uctoa] from uctoa::@2
[242] if((byte) uctoa::value#2>=(byte) uctoa::digit_value#0) goto uctoa::@5
to:uctoa::@4
uctoa::@4: scope:[uctoa] from uctoa::@6 uctoa::@7
[243] (byte*) uctoa::buffer#14 ← phi( uctoa::@7/(byte*) uctoa::buffer#11 uctoa::@6/(byte*) uctoa::buffer#4 )
[243] (byte) uctoa::started#4 ← phi( uctoa::@7/(byte) uctoa::started#2 uctoa::@6/(byte) 1 )
[243] (byte) uctoa::value#6 ← phi( uctoa::@7/(byte) uctoa::value#2 uctoa::@6/(byte) uctoa::value#0 )
[244] (byte) uctoa::digit#1 ← ++ (byte) uctoa::digit#2
to:uctoa::@1
uctoa::@5: scope:[uctoa] from uctoa::@2 uctoa::@7
[245] (byte*) uctoa_append::buffer#0 ← (byte*) uctoa::buffer#11
[246] (byte) uctoa_append::value#0 ← (byte) uctoa::value#2
[247] (byte) uctoa_append::sub#0 ← (byte) uctoa::digit_value#0
[248] call uctoa_append
[249] (byte) uctoa_append::return#0 ← (byte) uctoa_append::value#2
to:uctoa::@6
uctoa::@6: scope:[uctoa] from uctoa::@5
[250] (byte) uctoa::value#0 ← (byte) uctoa_append::return#0
[251] (byte*) uctoa::buffer#4 ← ++ (byte*) uctoa::buffer#11
to:uctoa::@4
(byte()) uctoa_append((byte*) uctoa_append::buffer , (byte) uctoa_append::value , (byte) uctoa_append::sub)
uctoa_append: scope:[uctoa_append] from uctoa::@5
[252] phi()
to:uctoa_append::@1
uctoa_append::@1: scope:[uctoa_append] from uctoa_append uctoa_append::@2
[253] (byte) uctoa_append::digit#2 ← phi( uctoa_append/(byte) 0 uctoa_append::@2/(byte) uctoa_append::digit#1 )
[253] (byte) uctoa_append::value#2 ← phi( uctoa_append/(byte) uctoa_append::value#0 uctoa_append::@2/(byte) uctoa_append::value#1 )
[254] if((byte) uctoa_append::value#2>=(byte) uctoa_append::sub#0) goto uctoa_append::@2
to:uctoa_append::@3
uctoa_append::@3: scope:[uctoa_append] from uctoa_append::@1
[255] *((byte*) uctoa_append::buffer#0) ← *((const byte*) DIGITS + (byte) uctoa_append::digit#2)
to:uctoa_append::@return
uctoa_append::@return: scope:[uctoa_append] from uctoa_append::@3
[256] return
to:@return
uctoa_append::@2: scope:[uctoa_append] from uctoa_append::@1
[257] (byte) uctoa_append::digit#1 ← ++ (byte) uctoa_append::digit#2
[258] (byte) uctoa_append::value#1 ← (byte) uctoa_append::value#2 - (byte) uctoa_append::sub#0
to:uctoa_append::@1
(byte()) place((byte) place::row , (byte) place::column)
place: scope:[place] from queen::@2
[259] phi()
to:place::@1
place::@1: scope:[place] from place place::@3
[260] (byte) place::i#3 ← phi( place/(byte) 1 place::@3/(byte) place::i#2 )
[261] (byte~) place::$0 ← (byte) place::row#0 - (byte) 1
[262] if((byte) place::i#3<=(byte~) place::$0) goto place::@2
to:place::@return
place::@return: scope:[place] from place::@1 place::@2 place::@6
[263] (byte) place::return#4 ← phi( place::@1/(byte) 1 place::@2/(byte) 0 place::@6/(byte) 0 )
[264] return
to:@return
place::@2: scope:[place] from place::@1
[265] if(*((const byte*) board + (byte) place::i#3)==(byte) place::column#0) goto place::@return
to:place::@4
place::@4: scope:[place] from place::@2
[266] (byte) diff::a#0 ← *((const byte*) board + (byte) place::i#3)
[267] (byte) diff::b#0 ← (byte) place::column#0
[268] call diff
[269] (byte) diff::return#0 ← (byte) diff::return#4
to:place::@5
place::@5: scope:[place] from place::@4
[270] (byte~) place::$3 ← (byte) diff::return#0
[271] (byte) diff::a#1 ← (byte) place::i#3
[272] (byte) diff::b#1 ← (byte) place::row#0
[273] call diff
[274] (byte) diff::return#1 ← (byte) diff::return#4
to:place::@6
place::@6: scope:[place] from place::@5
[275] (byte~) place::$4 ← (byte) diff::return#1
[276] if((byte~) place::$3!=(byte~) place::$4) goto place::@3
to:place::@return
place::@3: scope:[place] from place::@6
[277] (byte) place::i#2 ← ++ (byte) place::i#3
to:place::@1
(byte()) diff((byte) diff::a , (byte) diff::b)
diff: scope:[diff] from place::@4 place::@5
[278] (byte) diff::b#2 ← phi( place::@4/(byte) diff::b#0 place::@5/(byte) diff::b#1 )
[278] (byte) diff::a#2 ← phi( place::@4/(byte) diff::a#0 place::@5/(byte) diff::a#1 )
[279] if((byte) diff::a#2<(byte) diff::b#2) goto diff::@1
to:diff::@2
diff::@2: scope:[diff] from diff
[280] (byte) diff::return#3 ← (byte) diff::a#2 - (byte) diff::b#2
to:diff::@return
diff::@return: scope:[diff] from diff::@1 diff::@2
[281] (byte) diff::return#4 ← phi( diff::@1/(byte) diff::return#2 diff::@2/(byte) diff::return#3 )
[282] return
to:@return
diff::@1: scope:[diff] from diff
[283] (byte) diff::return#2 ← (byte) diff::b#2 - (byte) diff::a#2
to:diff::@return

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,452 @@
(label) @1
(label) @2
(label) @3
(label) @begin
(label) @end
(const byte*) DIGITS[] = (byte*) "0123456789abcdef"z
(const byte) OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS = (byte) 1
(const byte) RADIX::BINARY = (number) 2
(const byte) RADIX::DECIMAL = (number) $a
(const byte) RADIX::HEXADECIMAL = (number) $10
(const byte) RADIX::OCTAL = (number) 8
(const word*) RADIX_DECIMAL_VALUES[] = { (word) $2710, (word) $3e8, (word) $64, (word) $a }
(const byte*) RADIX_DECIMAL_VALUES_CHAR[] = { (byte) $64, (byte) $a }
(const byte) SIZEOF_STRUCT_PRINTF_BUFFER_NUMBER = (byte) $c
(const word) STACK_BASE = (word) $103
(const byte*) board[(number) $14] = { fill( $14, 0) }
(byte) count loadstore zp[1]:16 0.5833333333333333
(byte()) diff((byte) diff::a , (byte) diff::b)
(label) diff::@1
(label) diff::@2
(label) diff::@return
(byte) diff::a
(byte) diff::a#0 a zp[1]:17 1.000000000001E12
(byte) diff::a#1 a zp[1]:17 1.000000000001E12
(byte) diff::a#2 a zp[1]:17 1.60000000000025E13
(byte) diff::b
(byte) diff::b#0 b zp[1]:18 2.000000000002E12
(byte) diff::b#1 b zp[1]:18 2.000000000002E12
(byte) diff::b#2 b zp[1]:18 1.60000000000025E13
(byte) diff::return
(byte) diff::return#0 return zp[1]:24 2.000000000002E12
(byte) diff::return#1 return_1 zp[1]:17 2.000000000002E12
(byte) diff::return#2 return_1 zp[1]:17 2.0000000000002E13
(byte) diff::return#3 return_1 zp[1]:17 2.0000000000002E13
(byte) diff::return#4 return_1 zp[1]:17 5.500000000001E12
(void()) main()
(label) main::@1
(label) main::@2
(label) main::@3
(label) main::@4
(label) main::@return
(const byte*) main::str[(byte) $29] = (byte*) " - N Queens Problem Using Backtracking -"
(const byte*) main::str1[(byte) $14] = (byte*) "
Number of Queens:"
(void*()) memcpy((void*) memcpy::destination , (void*) memcpy::source , (word) memcpy::num)
(label) memcpy::@1
(label) memcpy::@2
(label) memcpy::@return
(void*) memcpy::destination
(const void*) memcpy::destination#0 destination = (void*) 1024
(byte*) memcpy::dst
(byte*) memcpy::dst#1 dst zp[2]:4 1.0E43
(byte*) memcpy::dst#2 dst zp[2]:4 1.0E43
(word) memcpy::num
(const word) memcpy::num#0 num = (word)(number) $28*(number) $19-(number) $28
(void*) memcpy::return
(void*) memcpy::source
(const void*) memcpy::source#0 source = (void*)(number) $400+(number) $28
(byte*) memcpy::src
(byte*) memcpy::src#1 src zp[2]:19 2.0E43
(byte*) memcpy::src#2 src zp[2]:19 1.0E43
(byte*) memcpy::src_end
(const byte*) memcpy::src_end#0 src_end = (byte*)(const void*) memcpy::source#0+(const word) memcpy::num#0
(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num)
(label) memset::@1
(label) memset::@2
(label) memset::@3
(label) memset::@return
(byte) memset::c
(byte) memset::c#4 c zp[1]:10 1.25E42
(byte*) memset::dst
(byte*) memset::dst#1 dst zp[2]:4 2.0E43
(byte*) memset::dst#2 dst zp[2]:4 1.3333333333333668E43
(byte*) memset::dst#4 dst zp[2]:4 2.0E30
(byte*) memset::end
(byte*) memset::end#0 end zp[2]:19 1.6666666666668335E42
(word) memset::num
(word) memset::num#2 num zp[2]:19 1.0E30
(void*) memset::return
(void*) memset::str
(void*) memset::str#3 str zp[2]:4
(byte()) place((byte) place::row , (byte) place::column)
(byte~) place::$0 zp[1]:23 2.000000000002E12
(byte~) place::$3 zp[1]:24 3.333333333336667E11
(byte~) place::$4 zp[1]:17 2.000000000002E12
(label) place::@1
(label) place::@2
(label) place::@3
(label) place::@4
(label) place::@5
(label) place::@6
(label) place::@return
(byte) place::column
(byte) place::column#0 column zp[1]:22 1.1666666666683334E11
(byte) place::i
(byte) place::i#2 i zp[1]:10 2.000000000002E12
(byte) place::i#3 i zp[1]:10 4.0000000000039996E11
(byte) place::return
(byte) place::return#0 return zp[1]:11 2.00000000002E11
(byte) place::return#4 return zp[1]:11 3.3333333333666668E10
(byte) place::row
(byte) place::row#0 row zp[1]:21 1.1052631578963158E11
(void()) print()
(label) print::@1
(label) print::@10
(label) print::@11
(label) print::@12
(label) print::@13
(label) print::@14
(label) print::@2
(label) print::@3
(label) print::@4
(label) print::@5
(label) print::@6
(label) print::@7
(label) print::@8
(label) print::@9
(label) print::@return
(byte) print::i
(byte) print::i#1 i zp[1]:11 2.000000000002E12
(byte) print::i#2 i zp[1]:11 1.000000000001E12
(byte) print::i1
(byte) print::i1#1 i1 zp[1]:11 2.000000000002E12
(byte) print::i1#2 i1 zp[1]:11 1.0000000000003572E12
(byte) print::j
(byte) print::j#1 j zp[1]:18 2.0000000000002E13
(byte) print::j#2 j zp[1]:18 5.714285714286286E12
(const byte*) print::str[(byte) $b] = (byte*) "
Solution "
(const byte*) print::str1[(byte) 4] = (byte*) ":
"
(const byte*) print::str2[(byte) 2] = (byte*) "
"
(const byte*) print::str3[(byte) 2] = (byte*) "Q"
(const byte*) print::str4[(byte) 2] = (byte*) "-"
(struct printf_buffer_number) printf_buffer loadstore mem[12] = {}
(const byte*) printf_buffer_number::digits[(number) $b] = { fill( $b, 0) }
(byte) printf_buffer_number::sign
(void()) printf_char((byte) printf_char::ch)
(label) printf_char::@1
(label) printf_char::@return
(byte) printf_char::ch
(byte) printf_char::ch#0 ch zp[1]:8 2.0E27
(byte) printf_char::ch#1 ch zp[1]:8 2.0E26
(byte) printf_char::ch#2 ch zp[1]:8 2.00000000000002E14
(byte) printf_char::ch#3 ch zp[1]:8 1.11000000000001E28
(void()) printf_cls()
(label) printf_cls::@1
(label) printf_cls::@return
(byte*) printf_cursor_ptr loadstore zp[2]:14 1.5364238410596024E27
(byte) printf_cursor_x loadstore zp[1]:12 2.9787234042553192E26
(byte) printf_cursor_y loadstore zp[1]:13 2.1184210526315788E27
(byte) printf_format_number::justify_left
(byte) printf_format_number::min_length
(byte) printf_format_number::radix
(byte) printf_format_number::sign_always
(byte) printf_format_number::upper_case
(byte) printf_format_number::zero_padding
(byte) printf_format_string::justify_left
(byte) printf_format_string::min_length
(void()) printf_ln()
(byte*~) printf_ln::$0 zp[2]:14 2.0E27
(byte*~) printf_ln::$1 zp[2]:14 2.0E27
(label) printf_ln::@return
(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]:4 1.00000000000001E14
(label) printf_number_buffer::@1
(label) printf_number_buffer::@10
(label) printf_number_buffer::@11
(label) printf_number_buffer::@12
(label) printf_number_buffer::@13
(label) printf_number_buffer::@14
(label) printf_number_buffer::@15
(label) printf_number_buffer::@16
(label) printf_number_buffer::@17
(label) printf_number_buffer::@18
(label) printf_number_buffer::@19
(label) printf_number_buffer::@2
(label) printf_number_buffer::@20
(label) printf_number_buffer::@21
(label) printf_number_buffer::@3
(label) printf_number_buffer::@4
(label) printf_number_buffer::@5
(label) printf_number_buffer::@6
(label) printf_number_buffer::@7
(label) printf_number_buffer::@8
(label) printf_number_buffer::@9
(label) printf_number_buffer::@return
(struct printf_buffer_number) printf_number_buffer::buffer
(byte*) printf_number_buffer::buffer_digits
(byte*) printf_number_buffer::buffer_digits#10 buffer_digits zp[2]:2 1.0344827586207E13
(byte) printf_number_buffer::buffer_sign
(byte) printf_number_buffer::buffer_sign#0 buffer_sign zp[1]:18 202.0
(byte) printf_number_buffer::buffer_sign#1 buffer_sign zp[1]:18 2.0000000000002E13
(byte) printf_number_buffer::buffer_sign#10 buffer_sign zp[1]:18 1.550000000000525E13
(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]:24 6.451612903225871E12
(byte) printf_number_buffer::format_min_length
(byte) printf_number_buffer::format_min_length#2 format_min_length zp[1]:23 1.00000000000001E13
(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]:6 3.846153846153885E12
(byte) printf_number_buffer::format_zero_padding
(byte) printf_number_buffer::format_zero_padding#10 format_zero_padding zp[1]:17 9.375000000000094E12
(signed byte) printf_number_buffer::len
(signed byte) printf_number_buffer::len#0 len zp[1]:7 1.500000000000015E14
(signed byte) printf_number_buffer::len#1 len zp[1]:7 2.00000000000002E14
(signed byte) printf_number_buffer::len#2 len zp[1]:7 3.00000000000003E14
(signed byte) printf_number_buffer::padding
(signed byte) printf_number_buffer::padding#1 padding zp[1]:23 1.00000000000001E14
(signed byte) printf_number_buffer::padding#10 padding zp[1]:23 1.904761904761924E13
(void()) printf_padding((byte) printf_padding::pad , (byte) printf_padding::length)
(label) printf_padding::@1
(label) printf_padding::@2
(label) printf_padding::@3
(label) printf_padding::@return
(byte) printf_padding::i
(byte) printf_padding::i#1 i zp[1]:9 2.0E27
(byte) printf_padding::i#2 i zp[1]:9 7.500000000000001E26
(byte) printf_padding::length
(byte) printf_padding::length#0 length zp[1]:7 2.00000000000002E14
(byte) printf_padding::length#1 length zp[1]:7 2.00000000000002E14
(byte) printf_padding::length#2 length zp[1]:7 2.00000000000002E14
(byte) printf_padding::length#4 length zp[1]:7 1.6666666666671665E26
(byte) printf_padding::pad
(byte) printf_padding::pad#5 pad zp[1]:8 1.6666666666666666E26
(void()) printf_scroll()
(byte*~) printf_scroll::$4 zp[2]:14 2.0E29
(label) printf_scroll::@1
(label) printf_scroll::@2
(label) printf_scroll::@3
(label) printf_scroll::@return
(void()) printf_str((byte*) printf_str::str)
(label) printf_str::@1
(label) printf_str::@2
(label) printf_str::@3
(label) printf_str::@4
(label) printf_str::@5
(label) printf_str::@return
(byte) printf_str::ch
(byte) printf_str::ch#0 ch zp[1]:8 1.0E26
(byte*) printf_str::str
(byte*) printf_str::str#0 str zp[2]:2 4.285714285714285E25
(byte*) printf_str::str#1 str zp[2]:2 2.00000000000002E14
(byte*) printf_str::str#10 str zp[2]:2 2.000000000005E26
(byte*) printf_str::str#11 str zp[2]:2 1.100000000000002E15
(void()) printf_uchar((byte) printf_uchar::uvalue , (byte) printf_uchar::format_min_length , (byte) printf_uchar::format_justify_left , (byte) printf_uchar::format_sign_always , (byte) printf_uchar::format_zero_padding , (byte) printf_uchar::format_upper_case , (byte) printf_uchar::format_radix)
(label) printf_uchar::@1
(label) printf_uchar::@2
(label) printf_uchar::@return
(struct printf_format_number) printf_uchar::format
(byte) printf_uchar::format_justify_left
(byte) printf_uchar::format_min_length
(byte) printf_uchar::format_radix
(byte) printf_uchar::format_sign_always
(byte) printf_uchar::format_upper_case
(byte) printf_uchar::format_zero_padding
(byte) printf_uchar::uvalue
(byte) printf_uchar::uvalue#0 uvalue zp[1]:11 22.0
(byte) printf_uchar::uvalue#1 uvalue zp[1]:11 2.000000000002E12
(byte) printf_uchar::uvalue#2 uvalue zp[1]:11 2.000000000002E12
(byte) printf_uchar::uvalue#3 uvalue zp[1]:11 6.000000000007E12
(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)
(label) printf_uint::@1
(label) printf_uint::@2
(label) printf_uint::@return
(struct printf_format_number) printf_uint::format
(byte) printf_uint::format_justify_left
(const byte) printf_uint::format_justify_left#0 format_justify_left = (byte) 0
(byte) printf_uint::format_min_length
(const byte) printf_uint::format_min_length#0 format_min_length = (byte) 0
(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 = (byte) 0
(byte) printf_uint::format_zero_padding
(const byte) printf_uint::format_zero_padding#0 format_zero_padding = (byte) 0
(word) printf_uint::uvalue
(const word) printf_uint::uvalue#0 uvalue = (byte) 8
__stackcall (void()) queen((byte) queen::row)
(byte~) queen::$1 zp[1]:11 2.00000000002E11
(byte~) queen::$4 zp[1]:21 2.00000000002E11
(label) queen::@1
(label) queen::@2
(label) queen::@3
(label) queen::@4
(label) queen::@5
(label) queen::@6
(label) queen::@7
(label) queen::@return
(const byte) queen::OFFSET_STACK_ROW = (byte) 0
(byte) queen::column loadstore zp[1]:22 2.9411764706823532E10
(byte) queen::r loadstore zp[1]:21 2.1052631579736843E10
(byte) queen::row
(byte) queen::row#0 row zp[1]:21 22.0
(word()) strlen((byte*) strlen::str)
(label) strlen::@1
(label) strlen::@2
(label) strlen::@return
(word) strlen::len
(word) strlen::len#1 len zp[2]:4 1.0E27
(word) strlen::len#2 len zp[2]:4 5.00000000000025E26
(word) strlen::return
(word) strlen::return#2 return zp[2]:4 2.00000000000002E14
(byte*) strlen::str
(byte*) strlen::str#0 str zp[2]:19 2.0E27
(byte*) strlen::str#1 str zp[2]:19 5.50000000000001E14
(byte*) strlen::str#2 str zp[2]:19 1.0000000000003332E27
(byte*()) strupr((byte*) strupr::str)
(byte~) strupr::$0 zp[1]:7 2.0E27
(label) strupr::@1
(label) strupr::@2
(label) strupr::@3
(label) strupr::@return
(byte*) strupr::return
(byte*) strupr::src
(byte*) strupr::src#1 src zp[2]:19 2.0E27
(byte*) strupr::src#2 src zp[2]:19 7.142857142858572E26
(byte*) strupr::str
(byte*) strupr::str#0 str zp[2]:19 5.50000000000001E14
(byte()) toupper((byte) toupper::ch)
(label) toupper::@1
(label) toupper::@2
(label) toupper::@return
(byte) toupper::ch
(byte) toupper::ch#0 ch zp[1]:7 1.6999999999999998E28
(byte) toupper::return
(byte) toupper::return#0 return zp[1]:7 2.0E28
(byte) toupper::return#2 return zp[1]:7 1.0333333333333333E28
(byte) toupper::return#3 return zp[1]:7 2.0E27
(void()) uctoa((byte) uctoa::value , (byte*) uctoa::buffer , (byte) uctoa::radix)
(label) uctoa::@1
(label) uctoa::@2
(label) uctoa::@3
(label) uctoa::@4
(label) uctoa::@5
(label) uctoa::@6
(label) uctoa::@7
(label) uctoa::@return
(byte*) uctoa::buffer
(byte*) uctoa::buffer#11 buffer zp[2]:19 3.3333333333350004E25
(byte*) uctoa::buffer#14 buffer zp[2]:19 1.5000000000000002E26
(byte*) uctoa::buffer#3 buffer zp[2]:19 2.00000000000002E14
(byte*) uctoa::buffer#4 buffer zp[2]:19 2.0E26
(byte) uctoa::digit
(byte) uctoa::digit#1 digit zp[1]:6 2.0E26
(byte) uctoa::digit#2 digit zp[1]:6 3.076923076923077E25
(byte) uctoa::digit_value
(byte) uctoa::digit_value#0 digit_value zp[1]:23 6.000000000000001E25
(byte*) uctoa::digit_values
(byte) uctoa::max_digits
(byte) uctoa::radix
(byte) uctoa::started
(byte) uctoa::started#2 started zp[1]:8 6.000000000000001E25
(byte) uctoa::started#4 started zp[1]:8 1.0E26
(byte) uctoa::value
(byte) uctoa::value#0 value zp[1]:7 1.0E26
(byte) uctoa::value#1 value zp[1]:7 5.5000000000001E13
(byte) uctoa::value#2 value zp[1]:7 6.666666666670001E25
(byte) uctoa::value#6 value zp[1]:7 1.5000000000000002E26
(byte()) uctoa_append((byte*) uctoa_append::buffer , (byte) uctoa_append::value , (byte) uctoa_append::sub)
(label) uctoa_append::@1
(label) uctoa_append::@2
(label) uctoa_append::@3
(label) uctoa_append::@return
(byte*) uctoa_append::buffer
(byte*) uctoa_append::buffer#0 buffer zp[2]:19 1.3750000000000001E26
(byte) uctoa_append::digit
(byte) uctoa_append::digit#1 digit zp[1]:9 1.0E40
(byte) uctoa_append::digit#2 digit zp[1]:9 1.00000000000005E40
(byte) uctoa_append::return
(byte) uctoa_append::return#0 return zp[1]:7 2.0E26
(byte) uctoa_append::sub
(byte) uctoa_append::sub#0 sub zp[1]:23 3.33333333333335E39
(byte) uctoa_append::value
(byte) uctoa_append::value#0 value zp[1]:7 3.666666666666667E26
(byte) uctoa_append::value#1 value zp[1]:7 2.0E40
(byte) uctoa_append::value#2 value zp[1]:7 5.0000000000001833E39
(void()) utoa((word) utoa::value , (byte*) utoa::buffer , (byte) utoa::radix)
(byte~) utoa::$10 zp[1]:18 20002.0
(byte~) utoa::$11 zp[1]:17 2002.0
(label) utoa::@1
(label) utoa::@2
(label) utoa::@3
(label) utoa::@4
(label) utoa::@5
(label) utoa::@6
(label) utoa::@7
(label) utoa::@return
(byte*) utoa::buffer
(byte*) utoa::buffer#11 buffer zp[2]:4 3000.4285714285716
(byte*) utoa::buffer#14 buffer zp[2]:4 15001.5
(byte*) utoa::buffer#3 buffer zp[2]:4 2002.0
(byte*) utoa::buffer#4 buffer zp[2]:4 20002.0
(byte) utoa::digit
(byte) utoa::digit#1 digit zp[1]:23 20002.0
(byte) utoa::digit#2 digit zp[1]:23 2857.4285714285716
(word) utoa::digit_value
(word) utoa::digit_value#0 digit_value zp[2]:19 6000.6
(word*) utoa::digit_values
(byte) utoa::max_digits
(const byte) utoa::max_digits#1 max_digits = (byte) 5
(byte) utoa::radix
(byte) utoa::started
(byte) utoa::started#2 started zp[1]:24 5000.5
(byte) utoa::started#4 started zp[1]:24 10001.0
(word) utoa::value
(word) utoa::value#0 value zp[2]:2 10001.0
(word) utoa::value#2 value zp[2]:2 5714.857142857143
(word) utoa::value#6 value zp[2]:2 15001.5
(word()) utoa_append((byte*) utoa_append::buffer , (word) utoa_append::value , (word) utoa_append::sub)
(label) utoa_append::@1
(label) utoa_append::@2
(label) utoa_append::@3
(label) utoa_append::@return
(byte*) utoa_append::buffer
(byte*) utoa_append::buffer#0 buffer zp[2]:4 13750.25
(byte) utoa_append::digit
(byte) utoa_append::digit#1 digit zp[1]:17 1.0000001E7
(byte) utoa_append::digit#2 digit zp[1]:17 1.00500015E7
(word) utoa_append::return
(word) utoa_append::return#0 return zp[2]:2 20002.0
(word) utoa_append::sub
(word) utoa_append::sub#0 sub zp[2]:19 3335000.5
(word) utoa_append::value
(word) utoa_append::value#0 value zp[2]:2 36667.33333333333
(word) utoa_append::value#1 value zp[2]:2 2.0000002E7
(word) utoa_append::value#2 value zp[2]:2 5018334.166666666
zp[2]:2 [ 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 printf_number_buffer::buffer_digits#10 printf_str::str#10 printf_str::str#11 printf_str::str#1 printf_str::str#0 ]
zp[2]:4 [ utoa::buffer#11 utoa::buffer#14 utoa::buffer#4 utoa::buffer#3 utoa_append::buffer#0 strlen::len#2 strlen::len#1 strlen::return#2 printf_number_buffer::$19 memcpy::dst#2 memcpy::dst#1 memset::str#3 memset::dst#2 memset::dst#4 memset::dst#1 ]
zp[1]:6 [ uctoa::digit#2 uctoa::digit#1 printf_number_buffer::format_upper_case#10 ]
zp[1]:7 [ uctoa::value#2 uctoa::value#6 uctoa::value#1 uctoa::value#0 uctoa_append::value#2 uctoa_append::value#0 uctoa_append::value#1 uctoa_append::return#0 printf_number_buffer::len#2 printf_number_buffer::len#0 printf_number_buffer::len#1 toupper::return#2 toupper::return#0 toupper::ch#0 toupper::return#3 strupr::$0 printf_padding::length#4 printf_padding::length#1 printf_padding::length#2 printf_padding::length#0 ]
zp[1]:8 [ uctoa::started#2 uctoa::started#4 printf_padding::pad#5 printf_char::ch#3 printf_char::ch#2 printf_char::ch#0 printf_char::ch#1 printf_str::ch#0 ]
zp[1]:9 [ uctoa_append::digit#2 uctoa_append::digit#1 printf_padding::i#2 printf_padding::i#1 ]
zp[1]:10 [ place::i#3 place::i#2 memset::c#4 ]
zp[1]:11 [ place::return#4 place::return#0 queen::$1 print::i#2 print::i#1 printf_uchar::uvalue#3 printf_uchar::uvalue#0 printf_uchar::uvalue#2 printf_uchar::uvalue#1 print::i1#2 print::i1#1 ]
zp[1]:12 [ printf_cursor_x ]
zp[1]:13 [ printf_cursor_y ]
zp[2]:14 [ printf_cursor_ptr printf_scroll::$4 printf_ln::$0 printf_ln::$1 ]
zp[1]:16 [ count ]
zp[1]:17 [ utoa::$11 diff::a#2 diff::a#0 diff::a#1 diff::return#4 diff::return#2 diff::return#3 diff::return#1 place::$4 utoa_append::digit#2 utoa_append::digit#1 printf_number_buffer::format_zero_padding#10 ]
zp[1]:18 [ utoa::$10 diff::b#2 diff::b#0 diff::b#1 print::j#2 print::j#1 printf_number_buffer::buffer_sign#10 printf_number_buffer::buffer_sign#1 printf_number_buffer::buffer_sign#0 ]
zp[2]:19 [ utoa::digit_value#0 utoa_append::sub#0 uctoa::buffer#11 uctoa::buffer#14 uctoa::buffer#4 uctoa::buffer#3 uctoa_append::buffer#0 strlen::str#2 strlen::str#1 strlen::str#0 strupr::src#2 strupr::str#0 strupr::src#1 memcpy::src#2 memcpy::src#1 memset::num#2 memset::end#0 ]
zp[1]:21 [ queen::row#0 queen::r place::row#0 queen::$4 ]
zp[1]:22 [ queen::column place::column#0 ]
zp[1]:23 [ place::$0 uctoa::digit_value#0 uctoa_append::sub#0 utoa::digit#2 utoa::digit#1 printf_number_buffer::format_min_length#2 printf_number_buffer::padding#10 printf_number_buffer::padding#1 ]
zp[1]:24 [ diff::return#0 place::$3 utoa::started#2 utoa::started#4 printf_number_buffer::format_justify_left#10 ]
mem[12] [ printf_buffer ]

View File

@ -160,7 +160,6 @@ printf_padding: {
// If the end of the screen is reached scroll it up one char and place the cursor at the
// printf_char(byte register(A) ch)
printf_char: {
.label __6 = $f
// *(printf_cursor_ptr++) = ch
ldy #0
sta (printf_cursor_ptr),y
@ -179,6 +178,15 @@ printf_char: {
sta.z printf_cursor_x
// ++printf_cursor_y;
inc.z printf_cursor_y
// printf_scroll()
jsr printf_scroll
__breturn:
// }
rts
}
// Scroll the entire screen if the cursor is on the last line
printf_scroll: {
.label __4 = $f
// if(printf_cursor_y==PRINTF_SCREEN_HEIGHT)
lda #$19
cmp.z printf_cursor_y
@ -197,13 +205,13 @@ printf_char: {
sta.z memset.num+1
jsr memset
// printf_cursor_ptr-PRINTF_SCREEN_WIDTH
lda.z __6
lda.z __4
sec
sbc #<$28
sta.z __6
lda.z __6+1
sta.z __4
lda.z __4+1
sbc #>$28
sta.z __6+1
sta.z __4+1
// printf_cursor_ptr = printf_cursor_ptr-PRINTF_SCREEN_WIDTH
// printf_cursor_y--;
dec.z printf_cursor_y
@ -354,6 +362,8 @@ printf_ln: {
sta.z printf_cursor_x
// printf_cursor_y++;
inc.z printf_cursor_y
// printf_scroll()
jsr printf_scroll
// }
rts
}

View File

@ -129,133 +129,142 @@ printf_char: scope:[printf_char] from printf_padding::@2 printf_str::@5
printf_char::@1: scope:[printf_char] from printf_char
[57] (byte) printf_cursor_x ← (byte) 0
[58] (byte) printf_cursor_y ← ++ (byte) printf_cursor_y
[59] if((byte) printf_cursor_y!=(byte) $19) goto printf_char::@return
to:printf_char::@2
printf_char::@2: scope:[printf_char] from printf_char::@1
[60] phi()
[61] call memcpy
to:printf_char::@3
printf_char::@3: scope:[printf_char] from printf_char::@2
[62] phi()
[63] call memset
to:printf_char::@4
printf_char::@4: scope:[printf_char] from printf_char::@3
[64] (byte*~) printf_char::$6 ← (byte*) printf_cursor_ptr - (byte) $28
[65] (byte*) printf_cursor_ptr ← (byte*~) printf_char::$6
[66] (byte) printf_cursor_y ← -- (byte) printf_cursor_y
[59] call printf_scroll
to:printf_char::@return
printf_char::@return: scope:[printf_char] from printf_char printf_char::@1 printf_char::@4
[67] return
printf_char::@return: scope:[printf_char] from printf_char printf_char::@1
[60] return
to:@return
(void()) printf_scroll()
printf_scroll: scope:[printf_scroll] from printf_char::@1 printf_ln
[61] if((byte) printf_cursor_y!=(byte) $19) goto printf_scroll::@return
to:printf_scroll::@1
printf_scroll::@1: scope:[printf_scroll] from printf_scroll
[62] phi()
[63] call memcpy
to:printf_scroll::@2
printf_scroll::@2: scope:[printf_scroll] from printf_scroll::@1
[64] phi()
[65] call memset
to:printf_scroll::@3
printf_scroll::@3: scope:[printf_scroll] from printf_scroll::@2
[66] (byte*~) printf_scroll::$4 ← (byte*) printf_cursor_ptr - (byte) $28
[67] (byte*) printf_cursor_ptr ← (byte*~) printf_scroll::$4
[68] (byte) printf_cursor_y ← -- (byte) printf_cursor_y
to:printf_scroll::@return
printf_scroll::@return: scope:[printf_scroll] from printf_scroll printf_scroll::@3
[69] return
to:@return
(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num)
memset: scope:[memset] from printf_char::@3 printf_cls
[68] (byte) memset::c#4 ← phi( printf_char::@3/(byte) ' ' printf_cls/(byte) ' ' )
[68] (void*) memset::str#3 ← phi( printf_char::@3/(void*)(number) $400+(number) $28*(number) $19-(number) $28 printf_cls/(void*) 1024 )
[68] (word) memset::num#2 ← phi( printf_char::@3/(byte) $28 printf_cls/(word)(number) $28*(number) $19 )
[69] if((word) memset::num#2<=(byte) 0) goto memset::@return
memset: scope:[memset] from printf_cls printf_scroll::@2
[70] (byte) memset::c#4 ← phi( printf_cls/(byte) ' ' printf_scroll::@2/(byte) ' ' )
[70] (void*) memset::str#3 ← phi( printf_cls/(void*) 1024 printf_scroll::@2/(void*)(number) $400+(number) $28*(number) $19-(number) $28 )
[70] (word) memset::num#2 ← phi( printf_cls/(word)(number) $28*(number) $19 printf_scroll::@2/(byte) $28 )
[71] if((word) memset::num#2<=(byte) 0) goto memset::@return
to:memset::@1
memset::@1: scope:[memset] from memset
[70] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) memset::num#2
[71] (byte*) memset::dst#4 ← (byte*)(void*) memset::str#3
[72] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) memset::num#2
[73] (byte*) memset::dst#4 ← (byte*)(void*) memset::str#3
to:memset::@2
memset::@2: scope:[memset] from memset::@1 memset::@3
[72] (byte*) memset::dst#2 ← phi( memset::@1/(byte*) memset::dst#4 memset::@3/(byte*) memset::dst#1 )
[73] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@3
[74] (byte*) memset::dst#2 ← phi( memset::@1/(byte*) memset::dst#4 memset::@3/(byte*) memset::dst#1 )
[75] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@3
to:memset::@return
memset::@return: scope:[memset] from memset memset::@2
[74] return
[76] return
to:@return
memset::@3: scope:[memset] from memset::@2
[75] *((byte*) memset::dst#2) ← (byte) memset::c#4
[76] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2
[77] *((byte*) memset::dst#2) ← (byte) memset::c#4
[78] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2
to:memset::@2
(void*()) memcpy((void*) memcpy::destination , (void*) memcpy::source , (word) memcpy::num)
memcpy: scope:[memcpy] from printf_char::@2
[77] phi()
memcpy: scope:[memcpy] from printf_scroll::@1
[79] phi()
to:memcpy::@1
memcpy::@1: scope:[memcpy] from memcpy memcpy::@2
[78] (byte*) memcpy::dst#2 ← phi( memcpy/(byte*)(const void*) memcpy::destination#0 memcpy::@2/(byte*) memcpy::dst#1 )
[78] (byte*) memcpy::src#2 ← phi( memcpy/(byte*)(const void*) memcpy::source#0 memcpy::@2/(byte*) memcpy::src#1 )
[79] if((byte*) memcpy::src#2!=(const byte*) memcpy::src_end#0) goto memcpy::@2
[80] (byte*) memcpy::dst#2 ← phi( memcpy/(byte*)(const void*) memcpy::destination#0 memcpy::@2/(byte*) memcpy::dst#1 )
[80] (byte*) memcpy::src#2 ← phi( memcpy/(byte*)(const void*) memcpy::source#0 memcpy::@2/(byte*) memcpy::src#1 )
[81] if((byte*) memcpy::src#2!=(const byte*) memcpy::src_end#0) goto memcpy::@2
to:memcpy::@return
memcpy::@return: scope:[memcpy] from memcpy::@1
[80] return
[82] return
to:@return
memcpy::@2: scope:[memcpy] from memcpy::@1
[81] *((byte*) memcpy::dst#2) ← *((byte*) memcpy::src#2)
[82] (byte*) memcpy::dst#1 ← ++ (byte*) memcpy::dst#2
[83] (byte*) memcpy::src#1 ← ++ (byte*) memcpy::src#2
[83] *((byte*) memcpy::dst#2) ← *((byte*) memcpy::src#2)
[84] (byte*) memcpy::dst#1 ← ++ (byte*) memcpy::dst#2
[85] (byte*) memcpy::src#1 ← ++ (byte*) memcpy::src#2
to:memcpy::@1
(void()) printf_str((byte*) printf_str::str)
printf_str: scope:[printf_str] from printf_string::@2
[84] phi()
[86] phi()
to:printf_str::@1
printf_str::@1: scope:[printf_str] from printf_str printf_str::@4 printf_str::@5
[85] (byte*) printf_str::str#2 ← phi( printf_str/(byte*) printf_str::str#1 printf_str::@4/(byte*) printf_str::str#0 printf_str::@5/(byte*) printf_str::str#0 )
[87] (byte*) printf_str::str#2 ← phi( printf_str/(byte*) printf_str::str#1 printf_str::@4/(byte*) printf_str::str#0 printf_str::@5/(byte*) printf_str::str#0 )
to:printf_str::@2
printf_str::@2: scope:[printf_str] from printf_str::@1
[86] (byte) printf_str::ch#0 ← *((byte*) printf_str::str#2)
[87] (byte*) printf_str::str#0 ← ++ (byte*) printf_str::str#2
[88] if((byte) printf_str::ch#0!=(byte) 0) goto printf_str::@3
[88] (byte) printf_str::ch#0 ← *((byte*) printf_str::str#2)
[89] (byte*) printf_str::str#0 ← ++ (byte*) printf_str::str#2
[90] if((byte) printf_str::ch#0!=(byte) 0) goto printf_str::@3
to:printf_str::@return
printf_str::@return: scope:[printf_str] from printf_str::@2
[89] return
[91] return
to:@return
printf_str::@3: scope:[printf_str] from printf_str::@2
[90] if((byte) printf_str::ch#0==(byte) '
[92] if((byte) printf_str::ch#0==(byte) '
') goto printf_str::@4
to:printf_str::@5
printf_str::@5: scope:[printf_str] from printf_str::@3
[91] (byte) printf_char::ch#1 ← (byte) printf_str::ch#0
[92] call printf_char
[93] (byte) printf_char::ch#1 ← (byte) printf_str::ch#0
[94] call printf_char
to:printf_str::@1
printf_str::@4: scope:[printf_str] from printf_str::@3
[93] phi()
[94] call printf_ln
[95] phi()
[96] call printf_ln
to:printf_str::@1
(void()) printf_ln()
printf_ln: scope:[printf_ln] from main::@2 main::@4 main::@6 printf_str::@4
[95] (byte*~) printf_ln::$0 ← (byte*) printf_cursor_ptr - (byte) printf_cursor_x
[96] (byte*~) printf_ln::$1 ← (byte*~) printf_ln::$0 + (byte) $28
[97] (byte*) printf_cursor_ptr ← (byte*~) printf_ln::$1
[98] (byte) printf_cursor_x ← (byte) 0
[99] (byte) printf_cursor_y ← ++ (byte) printf_cursor_y
[97] (byte*~) printf_ln::$0 ← (byte*) printf_cursor_ptr - (byte) printf_cursor_x
[98] (byte*~) printf_ln::$1 ← (byte*~) printf_ln::$0 + (byte) $28
[99] (byte*) printf_cursor_ptr ← (byte*~) printf_ln::$1
[100] (byte) printf_cursor_x ← (byte) 0
[101] (byte) printf_cursor_y ← ++ (byte) printf_cursor_y
[102] call printf_scroll
to:printf_ln::@return
printf_ln::@return: scope:[printf_ln] from printf_ln
[100] return
[103] return
to:@return
(word()) strlen((byte*) strlen::str)
strlen: scope:[strlen] from printf_string::@3
[101] phi()
[104] phi()
to:strlen::@1
strlen::@1: scope:[strlen] from strlen strlen::@2
[102] (word) strlen::len#2 ← phi( strlen/(word) 0 strlen::@2/(word) strlen::len#1 )
[102] (byte*) strlen::str#2 ← phi( strlen/(byte*) strlen::str#1 strlen::@2/(byte*) strlen::str#0 )
[103] if((byte) 0!=*((byte*) strlen::str#2)) goto strlen::@2
[105] (word) strlen::len#2 ← phi( strlen/(word) 0 strlen::@2/(word) strlen::len#1 )
[105] (byte*) strlen::str#2 ← phi( strlen/(byte*) strlen::str#1 strlen::@2/(byte*) strlen::str#0 )
[106] if((byte) 0!=*((byte*) strlen::str#2)) goto strlen::@2
to:strlen::@return
strlen::@return: scope:[strlen] from strlen::@1
[104] return
[107] return
to:@return
strlen::@2: scope:[strlen] from strlen::@1
[105] (word) strlen::len#1 ← ++ (word) strlen::len#2
[106] (byte*) strlen::str#0 ← ++ (byte*) strlen::str#2
[108] (word) strlen::len#1 ← ++ (word) strlen::len#2
[109] (byte*) strlen::str#0 ← ++ (byte*) strlen::str#2
to:strlen::@1
(void()) printf_cls()
printf_cls: scope:[printf_cls] from main
[107] phi()
[108] call memset
[110] phi()
[111] call memset
to:printf_cls::@1
printf_cls::@1: scope:[printf_cls] from printf_cls
[109] (byte*) printf_cursor_ptr ← (byte*) 1024
[110] (byte) printf_cursor_x ← (byte) 0
[111] (byte) printf_cursor_y ← (byte) 0
[112] (byte*) printf_cursor_ptr ← (byte*) 1024
[113] (byte) printf_cursor_x ← (byte) 0
[114] (byte) printf_cursor_y ← (byte) 0
to:printf_cls::@return
printf_cls::@return: scope:[printf_cls] from printf_cls::@1
[112] return
[115] return
to:@return

File diff suppressed because one or more lines are too long

View File

@ -24,16 +24,16 @@
(void*) memcpy::destination
(const void*) memcpy::destination#0 destination = (void*) 1024
(byte*) memcpy::dst
(byte*) memcpy::dst#1 dst zp[2]:11 1.00000001E8
(byte*) memcpy::dst#2 dst zp[2]:11 1.00000001E8
(byte*) memcpy::dst#1 dst zp[2]:11 1.000000001E9
(byte*) memcpy::dst#2 dst zp[2]:11 1.000000001E9
(word) memcpy::num
(const word) memcpy::num#0 num = (word)(number) $28*(number) $19-(number) $28
(void*) memcpy::return
(void*) memcpy::source
(const void*) memcpy::source#0 source = (void*)(number) $400+(number) $28
(byte*) memcpy::src
(byte*) memcpy::src#1 src zp[2]:9 2.00000002E8
(byte*) memcpy::src#2 src zp[2]:9 1.00000001E8
(byte*) memcpy::src#1 src zp[2]:9 2.000000002E9
(byte*) memcpy::src#2 src zp[2]:9 1.000000001E9
(byte*) memcpy::src_end
(const byte*) memcpy::src_end#0 src_end = (byte*)(const void*) memcpy::source#0+(const word) memcpy::num#0
(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num)
@ -42,26 +42,22 @@
(label) memset::@3
(label) memset::@return
(byte) memset::c
(byte) memset::c#4 reg byte x 1250000.125
(byte) memset::c#4 reg byte x 1.2500000125E7
(byte*) memset::dst
(byte*) memset::dst#1 dst zp[2]:11 2.0000002E7
(byte*) memset::dst#2 dst zp[2]:11 1.3666668333333332E7
(byte*) memset::dst#4 dst zp[2]:11 2000002.0
(byte*) memset::dst#1 dst zp[2]:11 2.00000002E8
(byte*) memset::dst#2 dst zp[2]:11 1.3666666833333334E8
(byte*) memset::dst#4 dst zp[2]:11 2.0000002E7
(byte*) memset::end
(byte*) memset::end#0 end zp[2]:9 1833333.6666666665
(byte*) memset::end#0 end zp[2]:9 1.8333333666666668E7
(word) memset::num
(word) memset::num#2 num zp[2]:9 1000001.0
(word) memset::num#2 num zp[2]:9 1.0000001E7
(void*) memset::return
(void*) memset::str
(void*) memset::str#3 str zp[2]:11
(const byte*) printf_buffer_number::digits[(number) $b] = { fill( $b, 0) }
(byte) printf_buffer_number::sign
(void()) printf_char((byte) printf_char::ch)
(byte*~) printf_char::$6 zp[2]:15 200002.0
(label) printf_char::@1
(label) printf_char::@2
(label) printf_char::@3
(label) printf_char::@4
(label) printf_char::@return
(byte) printf_char::ch
(byte) printf_char::ch#0 reg byte a 20002.0
@ -70,9 +66,9 @@
(void()) printf_cls()
(label) printf_cls::@1
(label) printf_cls::@return
(byte*) printf_cursor_ptr loadstore zp[2]:15 9211.973684210527
(byte) printf_cursor_x loadstore zp[1]:13 8001.453333333332
(byte) printf_cursor_y loadstore zp[1]:14 9092.337662337664
(byte*) printf_cursor_ptr loadstore zp[2]:15 31646.96202531645
(byte) printf_cursor_x loadstore zp[1]:13 8697.231884057972
(byte) printf_cursor_y loadstore zp[1]:14 42501.37499999999
(byte) printf_format_number::justify_left
(byte) printf_format_number::min_length
(byte) printf_format_number::radix
@ -99,6 +95,12 @@
(byte) printf_padding::length#3 length zp[1]:6 1700.5
(byte) printf_padding::pad
(byte) printf_padding::pad#4 pad zp[1]:7 1666.8333333333333
(void()) printf_scroll()
(byte*~) printf_scroll::$4 zp[2]:15 2000002.0
(label) printf_scroll::@1
(label) printf_scroll::@2
(label) printf_scroll::@3
(label) printf_scroll::@return
(void()) printf_str((byte*) printf_str::str)
(label) printf_str::@1
(label) printf_str::@2
@ -162,6 +164,6 @@ zp[2]:9 [ strlen::str#2 strlen::str#1 strlen::str#0 memcpy::src#2 memcpy::src#1
zp[2]:11 [ strlen::len#2 strlen::len#1 strlen::return#2 printf_string::$9 memcpy::dst#2 memcpy::dst#1 memset::str#3 memset::dst#2 memset::dst#4 memset::dst#1 ]
zp[1]:13 [ printf_cursor_x ]
zp[1]:14 [ printf_cursor_y ]
zp[2]:15 [ printf_cursor_ptr printf_char::$6 printf_ln::$0 printf_ln::$1 ]
zp[2]:15 [ printf_cursor_ptr printf_scroll::$4 printf_ln::$0 printf_ln::$1 ]
reg byte a [ printf_string::len#0 ]
reg byte a [ printf_str::ch#0 ]

View File

@ -258,32 +258,14 @@ printf_ln: {
sta.z printf_cursor_x
// printf_cursor_y++;
inc.z printf_cursor_y
// printf_scroll()
jsr printf_scroll
// }
rts
}
// Print a single char
// If the end of the screen is reached scroll it up one char and place the cursor at the
// printf_char(byte register(A) ch)
printf_char: {
.label __6 = $15
// *(printf_cursor_ptr++) = ch
ldy #0
sta (printf_cursor_ptr),y
// *(printf_cursor_ptr++) = ch;
inc.z printf_cursor_ptr
bne !+
inc.z printf_cursor_ptr+1
!:
// if(++printf_cursor_x==PRINTF_SCREEN_WIDTH)
inc.z printf_cursor_x
lda #$28
cmp.z printf_cursor_x
bne __breturn
// printf_cursor_x = 0
lda #0
sta.z printf_cursor_x
// ++printf_cursor_y;
inc.z printf_cursor_y
// Scroll the entire screen if the cursor is on the last line
printf_scroll: {
.label __4 = $15
// if(printf_cursor_y==PRINTF_SCREEN_HEIGHT)
lda #$19
cmp.z printf_cursor_y
@ -302,13 +284,13 @@ printf_char: {
sta.z memset.num+1
jsr memset
// printf_cursor_ptr-PRINTF_SCREEN_WIDTH
lda.z __6
lda.z __4
sec
sbc #<$28
sta.z __6
lda.z __6+1
sta.z __4
lda.z __4+1
sbc #>$28
sta.z __6+1
sta.z __4+1
// printf_cursor_ptr = printf_cursor_ptr-PRINTF_SCREEN_WIDTH
// printf_cursor_y--;
dec.z printf_cursor_y
@ -403,6 +385,34 @@ memcpy: {
!:
jmp __b1
}
// Print a single char
// If the end of the screen is reached scroll it up one char and place the cursor at the
// printf_char(byte register(A) ch)
printf_char: {
// *(printf_cursor_ptr++) = ch
ldy #0
sta (printf_cursor_ptr),y
// *(printf_cursor_ptr++) = ch;
inc.z printf_cursor_ptr
bne !+
inc.z printf_cursor_ptr+1
!:
// if(++printf_cursor_x==PRINTF_SCREEN_WIDTH)
inc.z printf_cursor_x
lda #$28
cmp.z printf_cursor_x
bne __breturn
// printf_cursor_x = 0
lda #0
sta.z printf_cursor_x
// ++printf_cursor_y;
inc.z printf_cursor_y
// printf_scroll()
jsr printf_scroll
__breturn:
// }
rts
}
// Print an unsigned int using a specific format
printf_ulong: {
.const format_min_length = 0

View File

@ -165,588 +165,597 @@ printf_ln: scope:[printf_ln] from printf_str::@4
[77] (byte*) printf_cursor_ptr ← (byte*~) printf_ln::$1
[78] (byte) printf_cursor_x ← (byte) 0
[79] (byte) printf_cursor_y ← ++ (byte) printf_cursor_y
[80] call printf_scroll
to:printf_ln::@return
printf_ln::@return: scope:[printf_ln] from printf_ln
[80] return
[81] return
to:@return
(void()) printf_char((byte) printf_char::ch)
printf_char: scope:[printf_char] from main::@2 main::@8 printf_number_buffer::@9 printf_padding::@2 printf_str::@5
[81] (byte) printf_char::ch#5 ← phi( main::@2/(byte) printf_char::ch#3 main::@8/(byte) '%' printf_number_buffer::@9/(byte) printf_char::ch#2 printf_padding::@2/(byte) printf_char::ch#0 printf_str::@5/(byte) printf_char::ch#1 )
[82] *((byte*) printf_cursor_ptr) ← (byte) printf_char::ch#5
[83] (byte*) printf_cursor_ptr ← ++ (byte*) printf_cursor_ptr
[84] (byte) printf_cursor_x ← ++ (byte) printf_cursor_x
[85] if((byte) printf_cursor_x!=(byte) $28) goto printf_char::@return
to:printf_char::@1
printf_char::@1: scope:[printf_char] from printf_char
[86] (byte) printf_cursor_x ← (byte) 0
[87] (byte) printf_cursor_y ← ++ (byte) printf_cursor_y
[88] if((byte) printf_cursor_y!=(byte) $19) goto printf_char::@return
to:printf_char::@2
printf_char::@2: scope:[printf_char] from printf_char::@1
[89] phi()
[90] call memcpy
to:printf_char::@3
printf_char::@3: scope:[printf_char] from printf_char::@2
[91] phi()
[92] call memset
to:printf_char::@4
printf_char::@4: scope:[printf_char] from printf_char::@3
[93] (byte*~) printf_char::$6 ← (byte*) printf_cursor_ptr - (byte) $28
[94] (byte*) printf_cursor_ptr ← (byte*~) printf_char::$6
[95] (byte) printf_cursor_y ← -- (byte) printf_cursor_y
to:printf_char::@return
printf_char::@return: scope:[printf_char] from printf_char printf_char::@1 printf_char::@4
[96] return
(void()) printf_scroll()
printf_scroll: scope:[printf_scroll] from printf_char::@1 printf_ln
[82] if((byte) printf_cursor_y!=(byte) $19) goto printf_scroll::@return
to:printf_scroll::@1
printf_scroll::@1: scope:[printf_scroll] from printf_scroll
[83] phi()
[84] call memcpy
to:printf_scroll::@2
printf_scroll::@2: scope:[printf_scroll] from printf_scroll::@1
[85] phi()
[86] call memset
to:printf_scroll::@3
printf_scroll::@3: scope:[printf_scroll] from printf_scroll::@2
[87] (byte*~) printf_scroll::$4 ← (byte*) printf_cursor_ptr - (byte) $28
[88] (byte*) printf_cursor_ptr ← (byte*~) printf_scroll::$4
[89] (byte) printf_cursor_y ← -- (byte) printf_cursor_y
to:printf_scroll::@return
printf_scroll::@return: scope:[printf_scroll] from printf_scroll printf_scroll::@3
[90] return
to:@return
(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num)
memset: scope:[memset] from printf_char::@3 printf_cls
[97] (byte) memset::c#4 ← phi( printf_char::@3/(byte) ' ' printf_cls/(byte) ' ' )
[97] (void*) memset::str#3 ← phi( printf_char::@3/(void*)(number) $400+(number) $28*(number) $19-(number) $28 printf_cls/(void*) 1024 )
[97] (word) memset::num#2 ← phi( printf_char::@3/(byte) $28 printf_cls/(word)(number) $28*(number) $19 )
[98] if((word) memset::num#2<=(byte) 0) goto memset::@return
memset: scope:[memset] from printf_cls printf_scroll::@2
[91] (byte) memset::c#4 ← phi( printf_cls/(byte) ' ' printf_scroll::@2/(byte) ' ' )
[91] (void*) memset::str#3 ← phi( printf_cls/(void*) 1024 printf_scroll::@2/(void*)(number) $400+(number) $28*(number) $19-(number) $28 )
[91] (word) memset::num#2 ← phi( printf_cls/(word)(number) $28*(number) $19 printf_scroll::@2/(byte) $28 )
[92] if((word) memset::num#2<=(byte) 0) goto memset::@return
to:memset::@1
memset::@1: scope:[memset] from memset
[99] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) memset::num#2
[100] (byte*) memset::dst#4 ← (byte*)(void*) memset::str#3
[93] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) memset::num#2
[94] (byte*) memset::dst#4 ← (byte*)(void*) memset::str#3
to:memset::@2
memset::@2: scope:[memset] from memset::@1 memset::@3
[101] (byte*) memset::dst#2 ← phi( memset::@1/(byte*) memset::dst#4 memset::@3/(byte*) memset::dst#1 )
[102] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@3
[95] (byte*) memset::dst#2 ← phi( memset::@1/(byte*) memset::dst#4 memset::@3/(byte*) memset::dst#1 )
[96] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@3
to:memset::@return
memset::@return: scope:[memset] from memset memset::@2
[103] return
[97] return
to:@return
memset::@3: scope:[memset] from memset::@2
[104] *((byte*) memset::dst#2) ← (byte) memset::c#4
[105] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2
[98] *((byte*) memset::dst#2) ← (byte) memset::c#4
[99] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2
to:memset::@2
(void*()) memcpy((void*) memcpy::destination , (void*) memcpy::source , (word) memcpy::num)
memcpy: scope:[memcpy] from printf_char::@2
[106] phi()
memcpy: scope:[memcpy] from printf_scroll::@1
[100] phi()
to:memcpy::@1
memcpy::@1: scope:[memcpy] from memcpy memcpy::@2
[107] (byte*) memcpy::dst#2 ← phi( memcpy/(byte*)(const void*) memcpy::destination#0 memcpy::@2/(byte*) memcpy::dst#1 )
[107] (byte*) memcpy::src#2 ← phi( memcpy/(byte*)(const void*) memcpy::source#0 memcpy::@2/(byte*) memcpy::src#1 )
[108] if((byte*) memcpy::src#2!=(const byte*) memcpy::src_end#0) goto memcpy::@2
[101] (byte*) memcpy::dst#2 ← phi( memcpy/(byte*)(const void*) memcpy::destination#0 memcpy::@2/(byte*) memcpy::dst#1 )
[101] (byte*) memcpy::src#2 ← phi( memcpy/(byte*)(const void*) memcpy::source#0 memcpy::@2/(byte*) memcpy::src#1 )
[102] if((byte*) memcpy::src#2!=(const byte*) memcpy::src_end#0) goto memcpy::@2
to:memcpy::@return
memcpy::@return: scope:[memcpy] from memcpy::@1
[109] return
[103] return
to:@return
memcpy::@2: scope:[memcpy] from memcpy::@1
[110] *((byte*) memcpy::dst#2) ← *((byte*) memcpy::src#2)
[111] (byte*) memcpy::dst#1 ← ++ (byte*) memcpy::dst#2
[112] (byte*) memcpy::src#1 ← ++ (byte*) memcpy::src#2
[104] *((byte*) memcpy::dst#2) ← *((byte*) memcpy::src#2)
[105] (byte*) memcpy::dst#1 ← ++ (byte*) memcpy::dst#2
[106] (byte*) memcpy::src#1 ← ++ (byte*) memcpy::src#2
to:memcpy::@1
(void()) printf_char((byte) printf_char::ch)
printf_char: scope:[printf_char] from main::@2 main::@8 printf_number_buffer::@9 printf_padding::@2 printf_str::@5
[107] (byte) printf_char::ch#5 ← phi( main::@2/(byte) printf_char::ch#3 main::@8/(byte) '%' printf_number_buffer::@9/(byte) printf_char::ch#2 printf_padding::@2/(byte) printf_char::ch#0 printf_str::@5/(byte) printf_char::ch#1 )
[108] *((byte*) printf_cursor_ptr) ← (byte) printf_char::ch#5
[109] (byte*) printf_cursor_ptr ← ++ (byte*) printf_cursor_ptr
[110] (byte) printf_cursor_x ← ++ (byte) printf_cursor_x
[111] if((byte) printf_cursor_x!=(byte) $28) goto printf_char::@return
to:printf_char::@1
printf_char::@1: scope:[printf_char] from printf_char
[112] (byte) printf_cursor_x ← (byte) 0
[113] (byte) printf_cursor_y ← ++ (byte) printf_cursor_y
[114] call printf_scroll
to:printf_char::@return
printf_char::@return: scope:[printf_char] from printf_char printf_char::@1
[115] return
to:@return
(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)
printf_ulong: scope:[printf_ulong] from main::@26
[113] phi()
[116] phi()
to:printf_ulong::@1
printf_ulong::@1: scope:[printf_ulong] from printf_ulong
[114] *((byte*)&(struct printf_buffer_number) printf_buffer) ← (byte) 0
[115] call ultoa
[117] *((byte*)&(struct printf_buffer_number) printf_buffer) ← (byte) 0
[118] call ultoa
to:printf_ulong::@2
printf_ulong::@2: scope:[printf_ulong] from printf_ulong::@1
[116] (byte) printf_number_buffer::buffer_sign#1 ← *((byte*)&(struct printf_buffer_number) printf_buffer)
[117] call printf_number_buffer
[119] (byte) printf_number_buffer::buffer_sign#1 ← *((byte*)&(struct printf_buffer_number) printf_buffer)
[120] call printf_number_buffer
to:printf_ulong::@return
printf_ulong::@return: scope:[printf_ulong] from printf_ulong::@2
[118] return
[121] return
to:@return
(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 printf_sint::@3 printf_slong::@3 printf_uchar::@2 printf_uint::@2 printf_ulong::@2
[119] (byte) printf_number_buffer::format_upper_case#10 ← phi( printf_schar::@3/(const byte) printf_schar::format_upper_case#0 printf_sint::@3/(const byte) printf_sint::format_upper_case#0 printf_slong::@3/(const byte) printf_slong::format_upper_case#0 printf_uchar::@2/(const byte) printf_uchar::format_upper_case#0 printf_uint::@2/(byte) 0 printf_ulong::@2/(const byte) printf_ulong::format_upper_case#0 )
[119] (byte) printf_number_buffer::buffer_sign#10 ← phi( printf_schar::@3/(byte) printf_number_buffer::buffer_sign#4 printf_sint::@3/(byte) printf_number_buffer::buffer_sign#2 printf_slong::@3/(byte) printf_number_buffer::buffer_sign#0 printf_uchar::@2/(byte) printf_number_buffer::buffer_sign#5 printf_uint::@2/(byte) printf_number_buffer::buffer_sign#3 printf_ulong::@2/(byte) printf_number_buffer::buffer_sign#1 )
[119] (byte*) printf_number_buffer::buffer_digits#10 ← phi( printf_schar::@3/(byte*)&(struct printf_buffer_number) printf_buffer+(const byte) OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS printf_sint::@3/(byte*)&(struct printf_buffer_number) printf_buffer+(const byte) OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS printf_slong::@3/(byte*)&(struct printf_buffer_number) printf_buffer+(const byte) OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS printf_uchar::@2/(byte*)&(struct printf_buffer_number) printf_buffer+(const byte) OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS printf_uint::@2/(byte*)&(struct printf_buffer_number) printf_buffer+(const byte) OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS printf_ulong::@2/(byte*)&(struct printf_buffer_number) printf_buffer+(const byte) OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS )
[119] (byte) printf_number_buffer::format_zero_padding#10 ← phi( printf_schar::@3/(const byte) printf_schar::format_zero_padding#0 printf_sint::@3/(const byte) printf_sint::format_zero_padding#0 printf_slong::@3/(const byte) printf_slong::format_zero_padding#0 printf_uchar::@2/(const byte) printf_uchar::format_zero_padding#0 printf_uint::@2/(byte) 0 printf_ulong::@2/(const byte) printf_ulong::format_zero_padding#0 )
[119] (byte) printf_number_buffer::format_justify_left#10 ← phi( printf_schar::@3/(const byte) printf_schar::format_justify_left#0 printf_sint::@3/(const byte) printf_sint::format_justify_left#0 printf_slong::@3/(const byte) printf_slong::format_justify_left#0 printf_uchar::@2/(const byte) printf_uchar::format_justify_left#0 printf_uint::@2/(byte) 0 printf_ulong::@2/(const byte) printf_ulong::format_justify_left#0 )
[119] (byte) printf_number_buffer::format_min_length#10 ← phi( printf_schar::@3/(const byte) printf_schar::format_min_length#0 printf_sint::@3/(const byte) printf_sint::format_min_length#0 printf_slong::@3/(const byte) printf_slong::format_min_length#0 printf_uchar::@2/(const byte) printf_uchar::format_min_length#0 printf_uint::@2/(byte) 0 printf_ulong::@2/(const byte) printf_ulong::format_min_length#0 )
[120] if((byte) 0==(byte) printf_number_buffer::format_min_length#10) goto printf_number_buffer::@1
[122] (byte) printf_number_buffer::format_upper_case#10 ← phi( printf_schar::@3/(const byte) printf_schar::format_upper_case#0 printf_sint::@3/(const byte) printf_sint::format_upper_case#0 printf_slong::@3/(const byte) printf_slong::format_upper_case#0 printf_uchar::@2/(const byte) printf_uchar::format_upper_case#0 printf_uint::@2/(byte) 0 printf_ulong::@2/(const byte) printf_ulong::format_upper_case#0 )
[122] (byte) printf_number_buffer::buffer_sign#10 ← phi( printf_schar::@3/(byte) printf_number_buffer::buffer_sign#4 printf_sint::@3/(byte) printf_number_buffer::buffer_sign#2 printf_slong::@3/(byte) printf_number_buffer::buffer_sign#0 printf_uchar::@2/(byte) printf_number_buffer::buffer_sign#5 printf_uint::@2/(byte) printf_number_buffer::buffer_sign#3 printf_ulong::@2/(byte) printf_number_buffer::buffer_sign#1 )
[122] (byte*) printf_number_buffer::buffer_digits#10 ← phi( printf_schar::@3/(byte*)&(struct printf_buffer_number) printf_buffer+(const byte) OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS printf_sint::@3/(byte*)&(struct printf_buffer_number) printf_buffer+(const byte) OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS printf_slong::@3/(byte*)&(struct printf_buffer_number) printf_buffer+(const byte) OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS printf_uchar::@2/(byte*)&(struct printf_buffer_number) printf_buffer+(const byte) OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS printf_uint::@2/(byte*)&(struct printf_buffer_number) printf_buffer+(const byte) OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS printf_ulong::@2/(byte*)&(struct printf_buffer_number) printf_buffer+(const byte) OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS )
[122] (byte) printf_number_buffer::format_zero_padding#10 ← phi( printf_schar::@3/(const byte) printf_schar::format_zero_padding#0 printf_sint::@3/(const byte) printf_sint::format_zero_padding#0 printf_slong::@3/(const byte) printf_slong::format_zero_padding#0 printf_uchar::@2/(const byte) printf_uchar::format_zero_padding#0 printf_uint::@2/(byte) 0 printf_ulong::@2/(const byte) printf_ulong::format_zero_padding#0 )
[122] (byte) printf_number_buffer::format_justify_left#10 ← phi( printf_schar::@3/(const byte) printf_schar::format_justify_left#0 printf_sint::@3/(const byte) printf_sint::format_justify_left#0 printf_slong::@3/(const byte) printf_slong::format_justify_left#0 printf_uchar::@2/(const byte) printf_uchar::format_justify_left#0 printf_uint::@2/(byte) 0 printf_ulong::@2/(const byte) printf_ulong::format_justify_left#0 )
[122] (byte) printf_number_buffer::format_min_length#10 ← phi( printf_schar::@3/(const byte) printf_schar::format_min_length#0 printf_sint::@3/(const byte) printf_sint::format_min_length#0 printf_slong::@3/(const byte) printf_slong::format_min_length#0 printf_uchar::@2/(const byte) printf_uchar::format_min_length#0 printf_uint::@2/(byte) 0 printf_ulong::@2/(const byte) printf_ulong::format_min_length#0 )
[123] if((byte) 0==(byte) printf_number_buffer::format_min_length#10) goto printf_number_buffer::@1
to:printf_number_buffer::@6
printf_number_buffer::@6: scope:[printf_number_buffer] from printf_number_buffer
[121] (byte*) strlen::str#1 ← (byte*) printf_number_buffer::buffer_digits#10
[122] call strlen
[123] (word) strlen::return#2 ← (word) strlen::len#2
[124] (byte*) strlen::str#1 ← (byte*) printf_number_buffer::buffer_digits#10
[125] call strlen
[126] (word) strlen::return#2 ← (word) strlen::len#2
to:printf_number_buffer::@14
printf_number_buffer::@14: scope:[printf_number_buffer] from printf_number_buffer::@6
[124] (word~) printf_number_buffer::$19 ← (word) strlen::return#2
[125] (signed byte) printf_number_buffer::len#0 ← (signed byte)(word~) printf_number_buffer::$19
[126] if((byte) 0==(byte) printf_number_buffer::buffer_sign#10) goto printf_number_buffer::@13
[127] (word~) printf_number_buffer::$19 ← (word) strlen::return#2
[128] (signed byte) printf_number_buffer::len#0 ← (signed byte)(word~) printf_number_buffer::$19
[129] if((byte) 0==(byte) printf_number_buffer::buffer_sign#10) goto printf_number_buffer::@13
to:printf_number_buffer::@7
printf_number_buffer::@7: scope:[printf_number_buffer] from printf_number_buffer::@14
[127] (signed byte) printf_number_buffer::len#1 ← ++ (signed byte) printf_number_buffer::len#0
[130] (signed byte) printf_number_buffer::len#1 ← ++ (signed byte) printf_number_buffer::len#0
to:printf_number_buffer::@13
printf_number_buffer::@13: scope:[printf_number_buffer] from printf_number_buffer::@14 printf_number_buffer::@7
[128] (signed byte) printf_number_buffer::len#2 ← phi( printf_number_buffer::@14/(signed byte) printf_number_buffer::len#0 printf_number_buffer::@7/(signed byte) printf_number_buffer::len#1 )
[129] (signed byte) printf_number_buffer::padding#1 ← (signed byte)(byte) printf_number_buffer::format_min_length#10 - (signed byte) printf_number_buffer::len#2
[130] if((signed byte) printf_number_buffer::padding#1>=(signed byte) 0) goto printf_number_buffer::@21
[131] (signed byte) printf_number_buffer::len#2 ← phi( printf_number_buffer::@14/(signed byte) printf_number_buffer::len#0 printf_number_buffer::@7/(signed byte) printf_number_buffer::len#1 )
[132] (signed byte) printf_number_buffer::padding#1 ← (signed byte)(byte) printf_number_buffer::format_min_length#10 - (signed byte) printf_number_buffer::len#2
[133] if((signed byte) printf_number_buffer::padding#1>=(signed byte) 0) goto printf_number_buffer::@21
to:printf_number_buffer::@1
printf_number_buffer::@21: scope:[printf_number_buffer] from printf_number_buffer::@13
[131] phi()
[134] phi()
to:printf_number_buffer::@1
printf_number_buffer::@1: scope:[printf_number_buffer] from printf_number_buffer printf_number_buffer::@13 printf_number_buffer::@21
[132] (signed byte) printf_number_buffer::padding#10 ← phi( printf_number_buffer/(signed byte) 0 printf_number_buffer::@21/(signed byte) printf_number_buffer::padding#1 printf_number_buffer::@13/(signed byte) 0 )
[133] if((byte) 0!=(byte) printf_number_buffer::format_justify_left#10) goto printf_number_buffer::@2
[135] (signed byte) printf_number_buffer::padding#10 ← phi( printf_number_buffer/(signed byte) 0 printf_number_buffer::@21/(signed byte) printf_number_buffer::padding#1 printf_number_buffer::@13/(signed byte) 0 )
[136] if((byte) 0!=(byte) printf_number_buffer::format_justify_left#10) goto printf_number_buffer::@2
to:printf_number_buffer::@17
printf_number_buffer::@17: scope:[printf_number_buffer] from printf_number_buffer::@1
[134] if((byte) 0!=(byte) printf_number_buffer::format_zero_padding#10) goto printf_number_buffer::@2
[137] if((byte) 0!=(byte) printf_number_buffer::format_zero_padding#10) goto printf_number_buffer::@2
to:printf_number_buffer::@16
printf_number_buffer::@16: scope:[printf_number_buffer] from printf_number_buffer::@17
[135] if((signed byte) 0!=(signed byte) printf_number_buffer::padding#10) goto printf_number_buffer::@8
[138] if((signed byte) 0!=(signed byte) printf_number_buffer::padding#10) goto printf_number_buffer::@8
to:printf_number_buffer::@2
printf_number_buffer::@8: scope:[printf_number_buffer] from printf_number_buffer::@16
[136] (byte) printf_padding::length#0 ← (byte)(signed byte) printf_number_buffer::padding#10
[137] call printf_padding
[139] (byte) printf_padding::length#0 ← (byte)(signed byte) printf_number_buffer::padding#10
[140] call printf_padding
to:printf_number_buffer::@2
printf_number_buffer::@2: scope:[printf_number_buffer] from printf_number_buffer::@1 printf_number_buffer::@16 printf_number_buffer::@17 printf_number_buffer::@8
[138] if((byte) 0==(byte) printf_number_buffer::buffer_sign#10) goto printf_number_buffer::@3
[141] if((byte) 0==(byte) printf_number_buffer::buffer_sign#10) goto printf_number_buffer::@3
to:printf_number_buffer::@9
printf_number_buffer::@9: scope:[printf_number_buffer] from printf_number_buffer::@2
[139] (byte) printf_char::ch#2 ← (byte) printf_number_buffer::buffer_sign#10
[140] call printf_char
[142] (byte) printf_char::ch#2 ← (byte) printf_number_buffer::buffer_sign#10
[143] call printf_char
to:printf_number_buffer::@3
printf_number_buffer::@3: scope:[printf_number_buffer] from printf_number_buffer::@2 printf_number_buffer::@9
[141] if((byte) 0==(byte) printf_number_buffer::format_zero_padding#10) goto printf_number_buffer::@4
[144] if((byte) 0==(byte) printf_number_buffer::format_zero_padding#10) goto printf_number_buffer::@4
to:printf_number_buffer::@18
printf_number_buffer::@18: scope:[printf_number_buffer] from printf_number_buffer::@3
[142] if((signed byte) 0!=(signed byte) printf_number_buffer::padding#10) goto printf_number_buffer::@10
[145] if((signed byte) 0!=(signed byte) printf_number_buffer::padding#10) goto printf_number_buffer::@10
to:printf_number_buffer::@4
printf_number_buffer::@10: scope:[printf_number_buffer] from printf_number_buffer::@18
[143] (byte) printf_padding::length#1 ← (byte)(signed byte) printf_number_buffer::padding#10
[144] call printf_padding
[146] (byte) printf_padding::length#1 ← (byte)(signed byte) printf_number_buffer::padding#10
[147] call printf_padding
to:printf_number_buffer::@4
printf_number_buffer::@4: scope:[printf_number_buffer] from printf_number_buffer::@10 printf_number_buffer::@18 printf_number_buffer::@3
[145] if((byte) 0==(byte) printf_number_buffer::format_upper_case#10) goto printf_number_buffer::@5
[148] if((byte) 0==(byte) printf_number_buffer::format_upper_case#10) goto printf_number_buffer::@5
to:printf_number_buffer::@11
printf_number_buffer::@11: scope:[printf_number_buffer] from printf_number_buffer::@4
[146] (byte*) strupr::str#0 ← (byte*) printf_number_buffer::buffer_digits#10
[147] call strupr
[149] (byte*) strupr::str#0 ← (byte*) printf_number_buffer::buffer_digits#10
[150] call strupr
to:printf_number_buffer::@5
printf_number_buffer::@5: scope:[printf_number_buffer] from printf_number_buffer::@11 printf_number_buffer::@4
[148] (byte*) printf_str::str#1 ← (byte*) printf_number_buffer::buffer_digits#10
[149] call printf_str
[151] (byte*) printf_str::str#1 ← (byte*) printf_number_buffer::buffer_digits#10
[152] call printf_str
to:printf_number_buffer::@15
printf_number_buffer::@15: scope:[printf_number_buffer] from printf_number_buffer::@5
[150] if((byte) 0==(byte) printf_number_buffer::format_justify_left#10) goto printf_number_buffer::@return
[153] if((byte) 0==(byte) printf_number_buffer::format_justify_left#10) goto printf_number_buffer::@return
to:printf_number_buffer::@20
printf_number_buffer::@20: scope:[printf_number_buffer] from printf_number_buffer::@15
[151] if((byte) 0!=(byte) printf_number_buffer::format_zero_padding#10) goto printf_number_buffer::@return
[154] if((byte) 0!=(byte) printf_number_buffer::format_zero_padding#10) goto printf_number_buffer::@return
to:printf_number_buffer::@19
printf_number_buffer::@19: scope:[printf_number_buffer] from printf_number_buffer::@20
[152] if((signed byte) 0!=(signed byte) printf_number_buffer::padding#10) goto printf_number_buffer::@12
[155] if((signed byte) 0!=(signed byte) printf_number_buffer::padding#10) goto printf_number_buffer::@12
to:printf_number_buffer::@return
printf_number_buffer::@12: scope:[printf_number_buffer] from printf_number_buffer::@19
[153] (byte) printf_padding::length#2 ← (byte)(signed byte) printf_number_buffer::padding#10
[154] call printf_padding
[156] (byte) printf_padding::length#2 ← (byte)(signed byte) printf_number_buffer::padding#10
[157] call printf_padding
to:printf_number_buffer::@return
printf_number_buffer::@return: scope:[printf_number_buffer] from printf_number_buffer::@12 printf_number_buffer::@15 printf_number_buffer::@19 printf_number_buffer::@20
[155] return
[158] return
to:@return
(void()) printf_padding((byte) printf_padding::pad , (byte) printf_padding::length)
printf_padding: scope:[printf_padding] from printf_number_buffer::@10 printf_number_buffer::@12 printf_number_buffer::@8
[156] (byte) printf_padding::pad#5 ← phi( printf_number_buffer::@10/(byte) '0' printf_number_buffer::@12/(byte) ' ' printf_number_buffer::@8/(byte) ' ' )
[156] (byte) printf_padding::length#4 ← phi( printf_number_buffer::@10/(byte) printf_padding::length#1 printf_number_buffer::@12/(byte) printf_padding::length#2 printf_number_buffer::@8/(byte) printf_padding::length#0 )
[159] (byte) printf_padding::pad#5 ← phi( printf_number_buffer::@10/(byte) '0' printf_number_buffer::@12/(byte) ' ' printf_number_buffer::@8/(byte) ' ' )
[159] (byte) printf_padding::length#4 ← phi( printf_number_buffer::@10/(byte) printf_padding::length#1 printf_number_buffer::@12/(byte) printf_padding::length#2 printf_number_buffer::@8/(byte) printf_padding::length#0 )
to:printf_padding::@1
printf_padding::@1: scope:[printf_padding] from printf_padding printf_padding::@3
[157] (byte) printf_padding::i#2 ← phi( printf_padding/(byte) 0 printf_padding::@3/(byte) printf_padding::i#1 )
[158] if((byte) printf_padding::i#2<(byte) printf_padding::length#4) goto printf_padding::@2
[160] (byte) printf_padding::i#2 ← phi( printf_padding/(byte) 0 printf_padding::@3/(byte) printf_padding::i#1 )
[161] if((byte) printf_padding::i#2<(byte) printf_padding::length#4) goto printf_padding::@2
to:printf_padding::@return
printf_padding::@return: scope:[printf_padding] from printf_padding::@1
[159] return
[162] return
to:@return
printf_padding::@2: scope:[printf_padding] from printf_padding::@1
[160] (byte) printf_char::ch#0 ← (byte) printf_padding::pad#5
[161] call printf_char
[163] (byte) printf_char::ch#0 ← (byte) printf_padding::pad#5
[164] call printf_char
to:printf_padding::@3
printf_padding::@3: scope:[printf_padding] from printf_padding::@2
[162] (byte) printf_padding::i#1 ← ++ (byte) printf_padding::i#2
[165] (byte) printf_padding::i#1 ← ++ (byte) printf_padding::i#2
to:printf_padding::@1
(byte*()) strupr((byte*) strupr::str)
strupr: scope:[strupr] from printf_number_buffer::@11
[163] phi()
[166] phi()
to:strupr::@1
strupr::@1: scope:[strupr] from strupr strupr::@3
[164] (byte*) strupr::src#2 ← phi( strupr/(byte*) strupr::str#0 strupr::@3/(byte*) strupr::src#1 )
[165] if((byte) 0!=*((byte*) strupr::src#2)) goto strupr::@2
[167] (byte*) strupr::src#2 ← phi( strupr/(byte*) strupr::str#0 strupr::@3/(byte*) strupr::src#1 )
[168] if((byte) 0!=*((byte*) strupr::src#2)) goto strupr::@2
to:strupr::@return
strupr::@return: scope:[strupr] from strupr::@1
[166] return
[169] return
to:@return
strupr::@2: scope:[strupr] from strupr::@1
[167] (byte) toupper::ch#0 ← *((byte*) strupr::src#2)
[168] call toupper
[169] (byte) toupper::return#3 ← (byte) toupper::return#2
[170] (byte) toupper::ch#0 ← *((byte*) strupr::src#2)
[171] call toupper
[172] (byte) toupper::return#3 ← (byte) toupper::return#2
to:strupr::@3
strupr::@3: scope:[strupr] from strupr::@2
[170] (byte~) strupr::$0 ← (byte) toupper::return#3
[171] *((byte*) strupr::src#2) ← (byte~) strupr::$0
[172] (byte*) strupr::src#1 ← ++ (byte*) strupr::src#2
[173] (byte~) strupr::$0 ← (byte) toupper::return#3
[174] *((byte*) strupr::src#2) ← (byte~) strupr::$0
[175] (byte*) strupr::src#1 ← ++ (byte*) strupr::src#2
to:strupr::@1
(byte()) toupper((byte) toupper::ch)
toupper: scope:[toupper] from strupr::@2
[173] if((byte) toupper::ch#0<(byte) 'a') goto toupper::@return
[176] if((byte) toupper::ch#0<(byte) 'a') goto toupper::@return
to:toupper::@2
toupper::@2: scope:[toupper] from toupper
[174] if((byte) toupper::ch#0<=(byte) 'z') goto toupper::@1
[177] if((byte) toupper::ch#0<=(byte) 'z') goto toupper::@1
to:toupper::@return
toupper::@1: scope:[toupper] from toupper::@2
[175] (byte) toupper::return#0 ← (byte) toupper::ch#0 + (byte) 'A'-(byte) 'a'
[178] (byte) toupper::return#0 ← (byte) toupper::ch#0 + (byte) 'A'-(byte) 'a'
to:toupper::@return
toupper::@return: scope:[toupper] from toupper toupper::@1 toupper::@2
[176] (byte) toupper::return#2 ← phi( toupper::@1/(byte) toupper::return#0 toupper/(byte) toupper::ch#0 toupper::@2/(byte) toupper::ch#0 )
[177] return
[179] (byte) toupper::return#2 ← phi( toupper::@1/(byte) toupper::return#0 toupper/(byte) toupper::ch#0 toupper::@2/(byte) toupper::ch#0 )
[180] return
to:@return
(word()) strlen((byte*) strlen::str)
strlen: scope:[strlen] from printf_number_buffer::@6
[178] phi()
[181] phi()
to:strlen::@1
strlen::@1: scope:[strlen] from strlen strlen::@2
[179] (word) strlen::len#2 ← phi( strlen/(word) 0 strlen::@2/(word) strlen::len#1 )
[179] (byte*) strlen::str#2 ← phi( strlen/(byte*) strlen::str#1 strlen::@2/(byte*) strlen::str#0 )
[180] if((byte) 0!=*((byte*) strlen::str#2)) goto strlen::@2
[182] (word) strlen::len#2 ← phi( strlen/(word) 0 strlen::@2/(word) strlen::len#1 )
[182] (byte*) strlen::str#2 ← phi( strlen/(byte*) strlen::str#1 strlen::@2/(byte*) strlen::str#0 )
[183] if((byte) 0!=*((byte*) strlen::str#2)) goto strlen::@2
to:strlen::@return
strlen::@return: scope:[strlen] from strlen::@1
[181] return
[184] return
to:@return
strlen::@2: scope:[strlen] from strlen::@1
[182] (word) strlen::len#1 ← ++ (word) strlen::len#2
[183] (byte*) strlen::str#0 ← ++ (byte*) strlen::str#2
[185] (word) strlen::len#1 ← ++ (word) strlen::len#2
[186] (byte*) strlen::str#0 ← ++ (byte*) strlen::str#2
to:strlen::@1
(void()) ultoa((dword) ultoa::value , (byte*) ultoa::buffer , (byte) ultoa::radix)
ultoa: scope:[ultoa] from printf_slong::@2 printf_ulong::@1
[184] (byte*) ultoa::buffer#11 ← phi( printf_slong::@2/(byte*)&(struct printf_buffer_number) printf_buffer+(const byte) OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS printf_ulong::@1/(byte*)&(struct printf_buffer_number) printf_buffer+(const byte) OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS )
[184] (dword) ultoa::value#10 ← phi( printf_slong::@2/(const dword) printf_slong::uvalue#0 printf_ulong::@1/(const dword) main::ul )
[187] (byte*) ultoa::buffer#11 ← phi( printf_slong::@2/(byte*)&(struct printf_buffer_number) printf_buffer+(const byte) OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS printf_ulong::@1/(byte*)&(struct printf_buffer_number) printf_buffer+(const byte) OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS )
[187] (dword) ultoa::value#10 ← phi( printf_slong::@2/(const dword) printf_slong::uvalue#0 printf_ulong::@1/(const dword) main::ul )
to:ultoa::@1
ultoa::@1: scope:[ultoa] from ultoa ultoa::@4
[185] (byte*) ultoa::buffer#10 ← phi( ultoa::@4/(byte*) ultoa::buffer#15 ultoa/(byte*) ultoa::buffer#11 )
[185] (byte) ultoa::started#2 ← phi( ultoa::@4/(byte) ultoa::started#4 ultoa/(byte) 0 )
[185] (dword) ultoa::value#3 ← phi( ultoa::@4/(dword) ultoa::value#7 ultoa/(dword) ultoa::value#10 )
[185] (byte) ultoa::digit#2 ← phi( ultoa::@4/(byte) ultoa::digit#1 ultoa/(byte) 0 )
[186] if((byte) ultoa::digit#2<(byte) $a-(byte) 1) goto ultoa::@2
[188] (byte*) ultoa::buffer#10 ← phi( ultoa::@4/(byte*) ultoa::buffer#15 ultoa/(byte*) ultoa::buffer#11 )
[188] (byte) ultoa::started#2 ← phi( ultoa::@4/(byte) ultoa::started#4 ultoa/(byte) 0 )
[188] (dword) ultoa::value#3 ← phi( ultoa::@4/(dword) ultoa::value#7 ultoa/(dword) ultoa::value#10 )
[188] (byte) ultoa::digit#2 ← phi( ultoa::@4/(byte) ultoa::digit#1 ultoa/(byte) 0 )
[189] if((byte) ultoa::digit#2<(byte) $a-(byte) 1) goto ultoa::@2
to:ultoa::@3
ultoa::@3: scope:[ultoa] from ultoa::@1
[187] (byte~) ultoa::$11 ← (byte)(dword) ultoa::value#3
[188] *((byte*) ultoa::buffer#10) ← *((const byte*) DIGITS + (byte~) ultoa::$11)
[189] (byte*) ultoa::buffer#3 ← ++ (byte*) ultoa::buffer#10
[190] *((byte*) ultoa::buffer#3) ← (byte) 0
[190] (byte~) ultoa::$11 ← (byte)(dword) ultoa::value#3
[191] *((byte*) ultoa::buffer#10) ← *((const byte*) DIGITS + (byte~) ultoa::$11)
[192] (byte*) ultoa::buffer#3 ← ++ (byte*) ultoa::buffer#10
[193] *((byte*) ultoa::buffer#3) ← (byte) 0
to:ultoa::@return
ultoa::@return: scope:[ultoa] from ultoa::@3
[191] return
[194] return
to:@return
ultoa::@2: scope:[ultoa] from ultoa::@1
[192] (byte~) ultoa::$10 ← (byte) ultoa::digit#2 << (byte) 2
[193] (dword) ultoa::digit_value#0 ← *((const dword*) RADIX_DECIMAL_VALUES_LONG + (byte~) ultoa::$10)
[194] if((byte) 0!=(byte) ultoa::started#2) goto ultoa::@5
[195] (byte~) ultoa::$10 ← (byte) ultoa::digit#2 << (byte) 2
[196] (dword) ultoa::digit_value#0 ← *((const dword*) RADIX_DECIMAL_VALUES_LONG + (byte~) ultoa::$10)
[197] if((byte) 0!=(byte) ultoa::started#2) goto ultoa::@5
to:ultoa::@7
ultoa::@7: scope:[ultoa] from ultoa::@2
[195] if((dword) ultoa::value#3>=(dword) ultoa::digit_value#0) goto ultoa::@5
[198] if((dword) ultoa::value#3>=(dword) ultoa::digit_value#0) goto ultoa::@5
to:ultoa::@4
ultoa::@4: scope:[ultoa] from ultoa::@6 ultoa::@7
[196] (byte*) ultoa::buffer#15 ← phi( ultoa::@7/(byte*) ultoa::buffer#10 ultoa::@6/(byte*) ultoa::buffer#4 )
[196] (byte) ultoa::started#4 ← phi( ultoa::@7/(byte) ultoa::started#2 ultoa::@6/(byte) 1 )
[196] (dword) ultoa::value#7 ← phi( ultoa::@7/(dword) ultoa::value#3 ultoa::@6/(dword) ultoa::value#0 )
[197] (byte) ultoa::digit#1 ← ++ (byte) ultoa::digit#2
[199] (byte*) ultoa::buffer#15 ← phi( ultoa::@7/(byte*) ultoa::buffer#10 ultoa::@6/(byte*) ultoa::buffer#4 )
[199] (byte) ultoa::started#4 ← phi( ultoa::@7/(byte) ultoa::started#2 ultoa::@6/(byte) 1 )
[199] (dword) ultoa::value#7 ← phi( ultoa::@7/(dword) ultoa::value#3 ultoa::@6/(dword) ultoa::value#0 )
[200] (byte) ultoa::digit#1 ← ++ (byte) ultoa::digit#2
to:ultoa::@1
ultoa::@5: scope:[ultoa] from ultoa::@2 ultoa::@7
[198] (byte*) ultoa_append::buffer#0 ← (byte*) ultoa::buffer#10
[199] (dword) ultoa_append::value#0 ← (dword) ultoa::value#3
[200] (dword) ultoa_append::sub#0 ← (dword) ultoa::digit_value#0
[201] call ultoa_append
[202] (dword) ultoa_append::return#0 ← (dword) ultoa_append::value#2
[201] (byte*) ultoa_append::buffer#0 ← (byte*) ultoa::buffer#10
[202] (dword) ultoa_append::value#0 ← (dword) ultoa::value#3
[203] (dword) ultoa_append::sub#0 ← (dword) ultoa::digit_value#0
[204] call ultoa_append
[205] (dword) ultoa_append::return#0 ← (dword) ultoa_append::value#2
to:ultoa::@6
ultoa::@6: scope:[ultoa] from ultoa::@5
[203] (dword) ultoa::value#0 ← (dword) ultoa_append::return#0
[204] (byte*) ultoa::buffer#4 ← ++ (byte*) ultoa::buffer#10
[206] (dword) ultoa::value#0 ← (dword) ultoa_append::return#0
[207] (byte*) ultoa::buffer#4 ← ++ (byte*) ultoa::buffer#10
to:ultoa::@4
(dword()) ultoa_append((byte*) ultoa_append::buffer , (dword) ultoa_append::value , (dword) ultoa_append::sub)
ultoa_append: scope:[ultoa_append] from ultoa::@5
[205] phi()
[208] phi()
to:ultoa_append::@1
ultoa_append::@1: scope:[ultoa_append] from ultoa_append ultoa_append::@2
[206] (byte) ultoa_append::digit#2 ← phi( ultoa_append/(byte) 0 ultoa_append::@2/(byte) ultoa_append::digit#1 )
[206] (dword) ultoa_append::value#2 ← phi( ultoa_append/(dword) ultoa_append::value#0 ultoa_append::@2/(dword) ultoa_append::value#1 )
[207] if((dword) ultoa_append::value#2>=(dword) ultoa_append::sub#0) goto ultoa_append::@2
[209] (byte) ultoa_append::digit#2 ← phi( ultoa_append/(byte) 0 ultoa_append::@2/(byte) ultoa_append::digit#1 )
[209] (dword) ultoa_append::value#2 ← phi( ultoa_append/(dword) ultoa_append::value#0 ultoa_append::@2/(dword) ultoa_append::value#1 )
[210] if((dword) ultoa_append::value#2>=(dword) ultoa_append::sub#0) goto ultoa_append::@2
to:ultoa_append::@3
ultoa_append::@3: scope:[ultoa_append] from ultoa_append::@1
[208] *((byte*) ultoa_append::buffer#0) ← *((const byte*) DIGITS + (byte) ultoa_append::digit#2)
[211] *((byte*) ultoa_append::buffer#0) ← *((const byte*) DIGITS + (byte) ultoa_append::digit#2)
to:ultoa_append::@return
ultoa_append::@return: scope:[ultoa_append] from ultoa_append::@3
[209] return
[212] return
to:@return
ultoa_append::@2: scope:[ultoa_append] from ultoa_append::@1
[210] (byte) ultoa_append::digit#1 ← ++ (byte) ultoa_append::digit#2
[211] (dword) ultoa_append::value#1 ← (dword) ultoa_append::value#2 - (dword) ultoa_append::sub#0
[213] (byte) ultoa_append::digit#1 ← ++ (byte) ultoa_append::digit#2
[214] (dword) ultoa_append::value#1 ← (dword) ultoa_append::value#2 - (dword) ultoa_append::sub#0
to:ultoa_append::@1
(void()) printf_slong((signed dword) printf_slong::value , (byte) printf_slong::format_min_length , (byte) printf_slong::format_justify_left , (byte) printf_slong::format_sign_always , (byte) printf_slong::format_zero_padding , (byte) printf_slong::format_upper_case , (byte) printf_slong::format_radix)
printf_slong: scope:[printf_slong] from main::@23
[212] *((byte*)&(struct printf_buffer_number) printf_buffer) ← (byte) 0
[215] *((byte*)&(struct printf_buffer_number) printf_buffer) ← (byte) 0
to:printf_slong::@1
printf_slong::@1: scope:[printf_slong] from printf_slong
[213] *((byte*)&(struct printf_buffer_number) printf_buffer) ← (byte) '-'
[216] *((byte*)&(struct printf_buffer_number) printf_buffer) ← (byte) '-'
to:printf_slong::@2
printf_slong::@2: scope:[printf_slong] from printf_slong::@1
[214] phi()
[215] call ultoa
[217] phi()
[218] call ultoa
to:printf_slong::@3
printf_slong::@3: scope:[printf_slong] from printf_slong::@2
[216] (byte) printf_number_buffer::buffer_sign#0 ← *((byte*)&(struct printf_buffer_number) printf_buffer)
[217] call printf_number_buffer
[219] (byte) printf_number_buffer::buffer_sign#0 ← *((byte*)&(struct printf_buffer_number) printf_buffer)
[220] call printf_number_buffer
to:printf_slong::@return
printf_slong::@return: scope:[printf_slong] from printf_slong::@3
[218] return
[221] return
to:@return
(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)
printf_uint: scope:[printf_uint] from main::@20 main::@5
[219] (byte) printf_uint::format_radix#2 ← phi( main::@20/(const byte) DECIMAL main::@5/(const byte) HEXADECIMAL )
[219] (word) printf_uint::uvalue#2 ← phi( main::@20/(const word) main::ui main::@5/(word)&(volatile byte) main::c )
[222] (byte) printf_uint::format_radix#2 ← phi( main::@20/(const byte) DECIMAL main::@5/(const byte) HEXADECIMAL )
[222] (word) printf_uint::uvalue#2 ← phi( main::@20/(const word) main::ui main::@5/(word)&(volatile byte) main::c )
to:printf_uint::@1
printf_uint::@1: scope:[printf_uint] from printf_uint
[220] *((byte*)&(struct printf_buffer_number) printf_buffer) ← (byte) 0
[221] (word) utoa::value#2 ← (word) printf_uint::uvalue#2
[222] (byte) utoa::radix#1 ← (byte) printf_uint::format_radix#2
[223] call utoa
[223] *((byte*)&(struct printf_buffer_number) printf_buffer) ← (byte) 0
[224] (word) utoa::value#2 ← (word) printf_uint::uvalue#2
[225] (byte) utoa::radix#1 ← (byte) printf_uint::format_radix#2
[226] call utoa
to:printf_uint::@2
printf_uint::@2: scope:[printf_uint] from printf_uint::@1
[224] (byte) printf_number_buffer::buffer_sign#3 ← *((byte*)&(struct printf_buffer_number) printf_buffer)
[225] call printf_number_buffer
[227] (byte) printf_number_buffer::buffer_sign#3 ← *((byte*)&(struct printf_buffer_number) printf_buffer)
[228] call printf_number_buffer
to:printf_uint::@return
printf_uint::@return: scope:[printf_uint] from printf_uint::@2
[226] return
[229] return
to:@return
(void()) utoa((word) utoa::value , (byte*) utoa::buffer , (byte) utoa::radix)
utoa: scope:[utoa] from printf_sint::@2 printf_uint::@1
[227] (byte*) utoa::buffer#11 ← phi( printf_sint::@2/(byte*)&(struct printf_buffer_number) printf_buffer+(const byte) OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS printf_uint::@1/(byte*)&(struct printf_buffer_number) printf_buffer+(const byte) OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS )
[227] (word) utoa::value#10 ← phi( printf_sint::@2/(const word) printf_sint::uvalue#0 printf_uint::@1/(word) utoa::value#2 )
[227] (byte) utoa::radix#2 ← phi( printf_sint::@2/(const byte) DECIMAL printf_uint::@1/(byte) utoa::radix#1 )
[228] if((byte) utoa::radix#2==(const byte) DECIMAL) goto utoa::@1
[230] (byte*) utoa::buffer#11 ← phi( printf_sint::@2/(byte*)&(struct printf_buffer_number) printf_buffer+(const byte) OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS printf_uint::@1/(byte*)&(struct printf_buffer_number) printf_buffer+(const byte) OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS )
[230] (word) utoa::value#10 ← phi( printf_sint::@2/(const word) printf_sint::uvalue#0 printf_uint::@1/(word) utoa::value#2 )
[230] (byte) utoa::radix#2 ← phi( printf_sint::@2/(const byte) DECIMAL printf_uint::@1/(byte) utoa::radix#1 )
[231] if((byte) utoa::radix#2==(const byte) DECIMAL) goto utoa::@1
to:utoa::@2
utoa::@2: scope:[utoa] from utoa
[229] if((byte) utoa::radix#2==(const byte) HEXADECIMAL) goto utoa::@1
[232] if((byte) utoa::radix#2==(const byte) HEXADECIMAL) goto utoa::@1
to:utoa::@3
utoa::@3: scope:[utoa] from utoa::@2
[230] if((byte) utoa::radix#2==(const byte) OCTAL) goto utoa::@1
[233] if((byte) utoa::radix#2==(const byte) OCTAL) goto utoa::@1
to:utoa::@4
utoa::@4: scope:[utoa] from utoa::@3
[231] if((byte) utoa::radix#2==(const byte) BINARY) goto utoa::@1
[234] if((byte) utoa::radix#2==(const byte) BINARY) goto utoa::@1
to:utoa::@5
utoa::@5: scope:[utoa] from utoa::@4
[232] *((byte*) utoa::buffer#11) ← (byte) 'e'
[233] (byte*) utoa::buffer#0 ← ++ (byte*) utoa::buffer#11
[234] *((byte*) utoa::buffer#0) ← (byte) 'r'
[235] (byte*) utoa::buffer#1 ← ++ (byte*) utoa::buffer#0
[236] *((byte*) utoa::buffer#1) ← (byte) 'r'
[237] (byte*) utoa::buffer#2 ← ++ (byte*) utoa::buffer#1
[238] *((byte*) utoa::buffer#2) ← (byte) 0
[235] *((byte*) utoa::buffer#11) ← (byte) 'e'
[236] (byte*) utoa::buffer#0 ← ++ (byte*) utoa::buffer#11
[237] *((byte*) utoa::buffer#0) ← (byte) 'r'
[238] (byte*) utoa::buffer#1 ← ++ (byte*) utoa::buffer#0
[239] *((byte*) utoa::buffer#1) ← (byte) 'r'
[240] (byte*) utoa::buffer#2 ← ++ (byte*) utoa::buffer#1
[241] *((byte*) utoa::buffer#2) ← (byte) 0
to:utoa::@return
utoa::@return: scope:[utoa] from utoa::@5 utoa::@8
[239] return
[242] return
to:@return
utoa::@1: scope:[utoa] from utoa utoa::@2 utoa::@3 utoa::@4
[240] (word*) utoa::digit_values#8 ← phi( utoa/(const word*) RADIX_DECIMAL_VALUES utoa::@2/(const word*) RADIX_HEXADECIMAL_VALUES utoa::@3/(const word*) RADIX_OCTAL_VALUES utoa::@4/(const word*) RADIX_BINARY_VALUES )
[240] (byte) utoa::max_digits#7 ← phi( utoa/(byte) 5 utoa::@2/(byte) 4 utoa::@3/(byte) 6 utoa::@4/(byte) $10 )
[243] (word*) utoa::digit_values#8 ← phi( utoa/(const word*) RADIX_DECIMAL_VALUES utoa::@2/(const word*) RADIX_HEXADECIMAL_VALUES utoa::@3/(const word*) RADIX_OCTAL_VALUES utoa::@4/(const word*) RADIX_BINARY_VALUES )
[243] (byte) utoa::max_digits#7 ← phi( utoa/(byte) 5 utoa::@2/(byte) 4 utoa::@3/(byte) 6 utoa::@4/(byte) $10 )
to:utoa::@6
utoa::@6: scope:[utoa] from utoa::@1 utoa::@9
[241] (byte*) utoa::buffer#10 ← phi( utoa::@9/(byte*) utoa::buffer#15 utoa::@1/(byte*) utoa::buffer#11 )
[241] (byte) utoa::started#2 ← phi( utoa::@9/(byte) utoa::started#4 utoa::@1/(byte) 0 )
[241] (word) utoa::value#3 ← phi( utoa::@9/(word) utoa::value#7 utoa::@1/(word) utoa::value#10 )
[241] (byte) utoa::digit#2 ← phi( utoa::@9/(byte) utoa::digit#1 utoa::@1/(byte) 0 )
[242] (byte~) utoa::$4 ← (byte) utoa::max_digits#7 - (byte) 1
[243] if((byte) utoa::digit#2<(byte~) utoa::$4) goto utoa::@7
[244] (byte*) utoa::buffer#10 ← phi( utoa::@9/(byte*) utoa::buffer#15 utoa::@1/(byte*) utoa::buffer#11 )
[244] (byte) utoa::started#2 ← phi( utoa::@9/(byte) utoa::started#4 utoa::@1/(byte) 0 )
[244] (word) utoa::value#3 ← phi( utoa::@9/(word) utoa::value#7 utoa::@1/(word) utoa::value#10 )
[244] (byte) utoa::digit#2 ← phi( utoa::@9/(byte) utoa::digit#1 utoa::@1/(byte) 0 )
[245] (byte~) utoa::$4 ← (byte) utoa::max_digits#7 - (byte) 1
[246] if((byte) utoa::digit#2<(byte~) utoa::$4) goto utoa::@7
to:utoa::@8
utoa::@8: scope:[utoa] from utoa::@6
[244] (byte~) utoa::$11 ← (byte)(word) utoa::value#3
[245] *((byte*) utoa::buffer#10) ← *((const byte*) DIGITS + (byte~) utoa::$11)
[246] (byte*) utoa::buffer#3 ← ++ (byte*) utoa::buffer#10
[247] *((byte*) utoa::buffer#3) ← (byte) 0
[247] (byte~) utoa::$11 ← (byte)(word) utoa::value#3
[248] *((byte*) utoa::buffer#10) ← *((const byte*) DIGITS + (byte~) utoa::$11)
[249] (byte*) utoa::buffer#3 ← ++ (byte*) utoa::buffer#10
[250] *((byte*) utoa::buffer#3) ← (byte) 0
to:utoa::@return
utoa::@7: scope:[utoa] from utoa::@6
[248] (byte~) utoa::$10 ← (byte) utoa::digit#2 << (byte) 1
[249] (word) utoa::digit_value#0 ← *((word*) utoa::digit_values#8 + (byte~) utoa::$10)
[250] if((byte) 0!=(byte) utoa::started#2) goto utoa::@10
[251] (byte~) utoa::$10 ← (byte) utoa::digit#2 << (byte) 1
[252] (word) utoa::digit_value#0 ← *((word*) utoa::digit_values#8 + (byte~) utoa::$10)
[253] if((byte) 0!=(byte) utoa::started#2) goto utoa::@10
to:utoa::@12
utoa::@12: scope:[utoa] from utoa::@7
[251] if((word) utoa::value#3>=(word) utoa::digit_value#0) goto utoa::@10
[254] if((word) utoa::value#3>=(word) utoa::digit_value#0) goto utoa::@10
to:utoa::@9
utoa::@9: scope:[utoa] from utoa::@11 utoa::@12
[252] (byte*) utoa::buffer#15 ← phi( utoa::@12/(byte*) utoa::buffer#10 utoa::@11/(byte*) utoa::buffer#4 )
[252] (byte) utoa::started#4 ← phi( utoa::@12/(byte) utoa::started#2 utoa::@11/(byte) 1 )
[252] (word) utoa::value#7 ← phi( utoa::@12/(word) utoa::value#3 utoa::@11/(word) utoa::value#0 )
[253] (byte) utoa::digit#1 ← ++ (byte) utoa::digit#2
[255] (byte*) utoa::buffer#15 ← phi( utoa::@12/(byte*) utoa::buffer#10 utoa::@11/(byte*) utoa::buffer#4 )
[255] (byte) utoa::started#4 ← phi( utoa::@12/(byte) utoa::started#2 utoa::@11/(byte) 1 )
[255] (word) utoa::value#7 ← phi( utoa::@12/(word) utoa::value#3 utoa::@11/(word) utoa::value#0 )
[256] (byte) utoa::digit#1 ← ++ (byte) utoa::digit#2
to:utoa::@6
utoa::@10: scope:[utoa] from utoa::@12 utoa::@7
[254] (byte*) utoa_append::buffer#0 ← (byte*) utoa::buffer#10
[255] (word) utoa_append::value#0 ← (word) utoa::value#3
[256] (word) utoa_append::sub#0 ← (word) utoa::digit_value#0
[257] call utoa_append
[258] (word) utoa_append::return#0 ← (word) utoa_append::value#2
[257] (byte*) utoa_append::buffer#0 ← (byte*) utoa::buffer#10
[258] (word) utoa_append::value#0 ← (word) utoa::value#3
[259] (word) utoa_append::sub#0 ← (word) utoa::digit_value#0
[260] call utoa_append
[261] (word) utoa_append::return#0 ← (word) utoa_append::value#2
to:utoa::@11
utoa::@11: scope:[utoa] from utoa::@10
[259] (word) utoa::value#0 ← (word) utoa_append::return#0
[260] (byte*) utoa::buffer#4 ← ++ (byte*) utoa::buffer#10
[262] (word) utoa::value#0 ← (word) utoa_append::return#0
[263] (byte*) utoa::buffer#4 ← ++ (byte*) utoa::buffer#10
to:utoa::@9
(word()) utoa_append((byte*) utoa_append::buffer , (word) utoa_append::value , (word) utoa_append::sub)
utoa_append: scope:[utoa_append] from utoa::@10
[261] phi()
[264] phi()
to:utoa_append::@1
utoa_append::@1: scope:[utoa_append] from utoa_append utoa_append::@2
[262] (byte) utoa_append::digit#2 ← phi( utoa_append/(byte) 0 utoa_append::@2/(byte) utoa_append::digit#1 )
[262] (word) utoa_append::value#2 ← phi( utoa_append/(word) utoa_append::value#0 utoa_append::@2/(word) utoa_append::value#1 )
[263] if((word) utoa_append::value#2>=(word) utoa_append::sub#0) goto utoa_append::@2
[265] (byte) utoa_append::digit#2 ← phi( utoa_append/(byte) 0 utoa_append::@2/(byte) utoa_append::digit#1 )
[265] (word) utoa_append::value#2 ← phi( utoa_append/(word) utoa_append::value#0 utoa_append::@2/(word) utoa_append::value#1 )
[266] if((word) utoa_append::value#2>=(word) utoa_append::sub#0) goto utoa_append::@2
to:utoa_append::@3
utoa_append::@3: scope:[utoa_append] from utoa_append::@1
[264] *((byte*) utoa_append::buffer#0) ← *((const byte*) DIGITS + (byte) utoa_append::digit#2)
[267] *((byte*) utoa_append::buffer#0) ← *((const byte*) DIGITS + (byte) utoa_append::digit#2)
to:utoa_append::@return
utoa_append::@return: scope:[utoa_append] from utoa_append::@3
[265] return
[268] return
to:@return
utoa_append::@2: scope:[utoa_append] from utoa_append::@1
[266] (byte) utoa_append::digit#1 ← ++ (byte) utoa_append::digit#2
[267] (word) utoa_append::value#1 ← (word) utoa_append::value#2 - (word) utoa_append::sub#0
[269] (byte) utoa_append::digit#1 ← ++ (byte) utoa_append::digit#2
[270] (word) utoa_append::value#1 ← (word) utoa_append::value#2 - (word) utoa_append::sub#0
to:utoa_append::@1
(void()) printf_sint((signed word) printf_sint::value , (byte) printf_sint::format_min_length , (byte) printf_sint::format_justify_left , (byte) printf_sint::format_sign_always , (byte) printf_sint::format_zero_padding , (byte) printf_sint::format_upper_case , (byte) printf_sint::format_radix)
printf_sint: scope:[printf_sint] from main::@17
[268] *((byte*)&(struct printf_buffer_number) printf_buffer) ← (byte) 0
[271] *((byte*)&(struct printf_buffer_number) printf_buffer) ← (byte) 0
to:printf_sint::@1
printf_sint::@1: scope:[printf_sint] from printf_sint
[269] *((byte*)&(struct printf_buffer_number) printf_buffer) ← (byte) '-'
[272] *((byte*)&(struct printf_buffer_number) printf_buffer) ← (byte) '-'
to:printf_sint::@2
printf_sint::@2: scope:[printf_sint] from printf_sint::@1
[270] phi()
[271] call utoa
[273] phi()
[274] call utoa
to:printf_sint::@3
printf_sint::@3: scope:[printf_sint] from printf_sint::@2
[272] (byte) printf_number_buffer::buffer_sign#2 ← *((byte*)&(struct printf_buffer_number) printf_buffer)
[273] call printf_number_buffer
[275] (byte) printf_number_buffer::buffer_sign#2 ← *((byte*)&(struct printf_buffer_number) printf_buffer)
[276] call printf_number_buffer
to:printf_sint::@return
printf_sint::@return: scope:[printf_sint] from printf_sint::@3
[274] return
[277] return
to:@return
(void()) printf_uchar((byte) printf_uchar::uvalue , (byte) printf_uchar::format_min_length , (byte) printf_uchar::format_justify_left , (byte) printf_uchar::format_sign_always , (byte) printf_uchar::format_zero_padding , (byte) printf_uchar::format_upper_case , (byte) printf_uchar::format_radix)
printf_uchar: scope:[printf_uchar] from main::@14
[275] phi()
[278] phi()
to:printf_uchar::@1
printf_uchar::@1: scope:[printf_uchar] from printf_uchar
[276] *((byte*)&(struct printf_buffer_number) printf_buffer) ← (byte) 0
[277] call uctoa
[279] *((byte*)&(struct printf_buffer_number) printf_buffer) ← (byte) 0
[280] call uctoa
to:printf_uchar::@2
printf_uchar::@2: scope:[printf_uchar] from printf_uchar::@1
[278] (byte) printf_number_buffer::buffer_sign#5 ← *((byte*)&(struct printf_buffer_number) printf_buffer)
[279] call printf_number_buffer
[281] (byte) printf_number_buffer::buffer_sign#5 ← *((byte*)&(struct printf_buffer_number) printf_buffer)
[282] call printf_number_buffer
to:printf_uchar::@return
printf_uchar::@return: scope:[printf_uchar] from printf_uchar::@2
[280] return
[283] return
to:@return
(void()) uctoa((byte) uctoa::value , (byte*) uctoa::buffer , (byte) uctoa::radix)
uctoa: scope:[uctoa] from printf_schar::@2 printf_uchar::@1
[281] (byte*) uctoa::buffer#11 ← phi( printf_schar::@2/(byte*)&(struct printf_buffer_number) printf_buffer+(const byte) OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS printf_uchar::@1/(byte*)&(struct printf_buffer_number) printf_buffer+(const byte) OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS )
[281] (byte) uctoa::value#10 ← phi( printf_schar::@2/(const byte) printf_schar::uvalue#0 printf_uchar::@1/(const byte) main::uc )
[284] (byte*) uctoa::buffer#11 ← phi( printf_schar::@2/(byte*)&(struct printf_buffer_number) printf_buffer+(const byte) OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS printf_uchar::@1/(byte*)&(struct printf_buffer_number) printf_buffer+(const byte) OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS )
[284] (byte) uctoa::value#10 ← phi( printf_schar::@2/(const byte) printf_schar::uvalue#0 printf_uchar::@1/(const byte) main::uc )
to:uctoa::@1
uctoa::@1: scope:[uctoa] from uctoa uctoa::@4
[282] (byte*) uctoa::buffer#10 ← phi( uctoa::@4/(byte*) uctoa::buffer#15 uctoa/(byte*) uctoa::buffer#11 )
[282] (byte) uctoa::started#2 ← phi( uctoa::@4/(byte) uctoa::started#4 uctoa/(byte) 0 )
[282] (byte) uctoa::value#3 ← phi( uctoa::@4/(byte) uctoa::value#7 uctoa/(byte) uctoa::value#10 )
[282] (byte) uctoa::digit#2 ← phi( uctoa::@4/(byte) uctoa::digit#1 uctoa/(byte) 0 )
[283] if((byte) uctoa::digit#2<(byte) 3-(byte) 1) goto uctoa::@2
[285] (byte*) uctoa::buffer#10 ← phi( uctoa::@4/(byte*) uctoa::buffer#15 uctoa/(byte*) uctoa::buffer#11 )
[285] (byte) uctoa::started#2 ← phi( uctoa::@4/(byte) uctoa::started#4 uctoa/(byte) 0 )
[285] (byte) uctoa::value#3 ← phi( uctoa::@4/(byte) uctoa::value#7 uctoa/(byte) uctoa::value#10 )
[285] (byte) uctoa::digit#2 ← phi( uctoa::@4/(byte) uctoa::digit#1 uctoa/(byte) 0 )
[286] if((byte) uctoa::digit#2<(byte) 3-(byte) 1) goto uctoa::@2
to:uctoa::@3
uctoa::@3: scope:[uctoa] from uctoa::@1
[284] *((byte*) uctoa::buffer#10) ← *((const byte*) DIGITS + (byte) uctoa::value#3)
[285] (byte*) uctoa::buffer#3 ← ++ (byte*) uctoa::buffer#10
[286] *((byte*) uctoa::buffer#3) ← (byte) 0
[287] *((byte*) uctoa::buffer#10) ← *((const byte*) DIGITS + (byte) uctoa::value#3)
[288] (byte*) uctoa::buffer#3 ← ++ (byte*) uctoa::buffer#10
[289] *((byte*) uctoa::buffer#3) ← (byte) 0
to:uctoa::@return
uctoa::@return: scope:[uctoa] from uctoa::@3
[287] return
[290] return
to:@return
uctoa::@2: scope:[uctoa] from uctoa::@1
[288] (byte) uctoa::digit_value#0 ← *((const byte*) RADIX_DECIMAL_VALUES_CHAR + (byte) uctoa::digit#2)
[289] if((byte) 0!=(byte) uctoa::started#2) goto uctoa::@5
[291] (byte) uctoa::digit_value#0 ← *((const byte*) RADIX_DECIMAL_VALUES_CHAR + (byte) uctoa::digit#2)
[292] if((byte) 0!=(byte) uctoa::started#2) goto uctoa::@5
to:uctoa::@7
uctoa::@7: scope:[uctoa] from uctoa::@2
[290] if((byte) uctoa::value#3>=(byte) uctoa::digit_value#0) goto uctoa::@5
[293] if((byte) uctoa::value#3>=(byte) uctoa::digit_value#0) goto uctoa::@5
to:uctoa::@4
uctoa::@4: scope:[uctoa] from uctoa::@6 uctoa::@7
[291] (byte*) uctoa::buffer#15 ← phi( uctoa::@7/(byte*) uctoa::buffer#10 uctoa::@6/(byte*) uctoa::buffer#4 )
[291] (byte) uctoa::started#4 ← phi( uctoa::@7/(byte) uctoa::started#2 uctoa::@6/(byte) 1 )
[291] (byte) uctoa::value#7 ← phi( uctoa::@7/(byte) uctoa::value#3 uctoa::@6/(byte) uctoa::value#0 )
[292] (byte) uctoa::digit#1 ← ++ (byte) uctoa::digit#2
[294] (byte*) uctoa::buffer#15 ← phi( uctoa::@7/(byte*) uctoa::buffer#10 uctoa::@6/(byte*) uctoa::buffer#4 )
[294] (byte) uctoa::started#4 ← phi( uctoa::@7/(byte) uctoa::started#2 uctoa::@6/(byte) 1 )
[294] (byte) uctoa::value#7 ← phi( uctoa::@7/(byte) uctoa::value#3 uctoa::@6/(byte) uctoa::value#0 )
[295] (byte) uctoa::digit#1 ← ++ (byte) uctoa::digit#2
to:uctoa::@1
uctoa::@5: scope:[uctoa] from uctoa::@2 uctoa::@7
[293] (byte*) uctoa_append::buffer#0 ← (byte*) uctoa::buffer#10
[294] (byte) uctoa_append::value#0 ← (byte) uctoa::value#3
[295] (byte) uctoa_append::sub#0 ← (byte) uctoa::digit_value#0
[296] call uctoa_append
[297] (byte) uctoa_append::return#0 ← (byte) uctoa_append::value#2
[296] (byte*) uctoa_append::buffer#0 ← (byte*) uctoa::buffer#10
[297] (byte) uctoa_append::value#0 ← (byte) uctoa::value#3
[298] (byte) uctoa_append::sub#0 ← (byte) uctoa::digit_value#0
[299] call uctoa_append
[300] (byte) uctoa_append::return#0 ← (byte) uctoa_append::value#2
to:uctoa::@6
uctoa::@6: scope:[uctoa] from uctoa::@5
[298] (byte) uctoa::value#0 ← (byte) uctoa_append::return#0
[299] (byte*) uctoa::buffer#4 ← ++ (byte*) uctoa::buffer#10
[301] (byte) uctoa::value#0 ← (byte) uctoa_append::return#0
[302] (byte*) uctoa::buffer#4 ← ++ (byte*) uctoa::buffer#10
to:uctoa::@4
(byte()) uctoa_append((byte*) uctoa_append::buffer , (byte) uctoa_append::value , (byte) uctoa_append::sub)
uctoa_append: scope:[uctoa_append] from uctoa::@5
[300] phi()
[303] phi()
to:uctoa_append::@1
uctoa_append::@1: scope:[uctoa_append] from uctoa_append uctoa_append::@2
[301] (byte) uctoa_append::digit#2 ← phi( uctoa_append/(byte) 0 uctoa_append::@2/(byte) uctoa_append::digit#1 )
[301] (byte) uctoa_append::value#2 ← phi( uctoa_append/(byte) uctoa_append::value#0 uctoa_append::@2/(byte) uctoa_append::value#1 )
[302] if((byte) uctoa_append::value#2>=(byte) uctoa_append::sub#0) goto uctoa_append::@2
[304] (byte) uctoa_append::digit#2 ← phi( uctoa_append/(byte) 0 uctoa_append::@2/(byte) uctoa_append::digit#1 )
[304] (byte) uctoa_append::value#2 ← phi( uctoa_append/(byte) uctoa_append::value#0 uctoa_append::@2/(byte) uctoa_append::value#1 )
[305] if((byte) uctoa_append::value#2>=(byte) uctoa_append::sub#0) goto uctoa_append::@2
to:uctoa_append::@3
uctoa_append::@3: scope:[uctoa_append] from uctoa_append::@1
[303] *((byte*) uctoa_append::buffer#0) ← *((const byte*) DIGITS + (byte) uctoa_append::digit#2)
[306] *((byte*) uctoa_append::buffer#0) ← *((const byte*) DIGITS + (byte) uctoa_append::digit#2)
to:uctoa_append::@return
uctoa_append::@return: scope:[uctoa_append] from uctoa_append::@3
[304] return
[307] return
to:@return
uctoa_append::@2: scope:[uctoa_append] from uctoa_append::@1
[305] (byte) uctoa_append::digit#1 ← ++ (byte) uctoa_append::digit#2
[306] (byte) uctoa_append::value#1 ← (byte) uctoa_append::value#2 - (byte) uctoa_append::sub#0
[308] (byte) uctoa_append::digit#1 ← ++ (byte) uctoa_append::digit#2
[309] (byte) uctoa_append::value#1 ← (byte) uctoa_append::value#2 - (byte) uctoa_append::sub#0
to:uctoa_append::@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 main::@11
[307] *((byte*)&(struct printf_buffer_number) printf_buffer) ← (byte) 0
[310] *((byte*)&(struct printf_buffer_number) printf_buffer) ← (byte) 0
to:printf_schar::@1
printf_schar::@1: scope:[printf_schar] from printf_schar
[308] *((byte*)&(struct printf_buffer_number) printf_buffer) ← (byte) '-'
[311] *((byte*)&(struct printf_buffer_number) printf_buffer) ← (byte) '-'
to:printf_schar::@2
printf_schar::@2: scope:[printf_schar] from printf_schar::@1
[309] phi()
[310] call uctoa
[312] phi()
[313] call uctoa
to:printf_schar::@3
printf_schar::@3: scope:[printf_schar] from printf_schar::@2
[311] (byte) printf_number_buffer::buffer_sign#4 ← *((byte*)&(struct printf_buffer_number) printf_buffer)
[312] call printf_number_buffer
[314] (byte) printf_number_buffer::buffer_sign#4 ← *((byte*)&(struct printf_buffer_number) printf_buffer)
[315] call printf_number_buffer
to:printf_schar::@return
printf_schar::@return: scope:[printf_schar] from printf_schar::@3
[313] return
[316] return
to:@return
(void()) printf_cls()
printf_cls: scope:[printf_cls] from main
[314] phi()
[315] call memset
[317] phi()
[318] call memset
to:printf_cls::@1
printf_cls::@1: scope:[printf_cls] from printf_cls
[316] (byte*) printf_cursor_ptr ← (byte*) 1024
[317] (byte) printf_cursor_x ← (byte) 0
[318] (byte) printf_cursor_y ← (byte) 0
[319] (byte*) printf_cursor_ptr ← (byte*) 1024
[320] (byte) printf_cursor_x ← (byte) 0
[321] (byte) printf_cursor_y ← (byte) 0
to:printf_cls::@return
printf_cls::@return: scope:[printf_cls] from printf_cls::@1
[319] return
[322] return
to:@return

File diff suppressed because one or more lines are too long

View File

@ -73,16 +73,16 @@
(void*) memcpy::destination
(const void*) memcpy::destination#0 destination = (void*) 1024
(byte*) memcpy::dst
(byte*) memcpy::dst#1 dst zp[2]:9 1.000000001E9
(byte*) memcpy::dst#2 dst zp[2]:9 1.000000001E9
(byte*) memcpy::dst#1 dst zp[2]:9 1.0000000001E10
(byte*) memcpy::dst#2 dst zp[2]:9 1.0000000001E10
(word) memcpy::num
(const word) memcpy::num#0 num = (word)(number) $28*(number) $19-(number) $28
(void*) memcpy::return
(void*) memcpy::source
(const void*) memcpy::source#0 source = (void*)(number) $400+(number) $28
(byte*) memcpy::src
(byte*) memcpy::src#1 src zp[2]:17 2.000000002E9
(byte*) memcpy::src#2 src zp[2]:17 1.000000001E9
(byte*) memcpy::src#1 src zp[2]:17 2.0000000002E10
(byte*) memcpy::src#2 src zp[2]:17 1.0000000001E10
(byte*) memcpy::src_end
(const byte*) memcpy::src_end#0 src_end = (byte*)(const void*) memcpy::source#0+(const word) memcpy::num#0
(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num)
@ -91,15 +91,15 @@
(label) memset::@3
(label) memset::@return
(byte) memset::c
(byte) memset::c#4 reg byte x 1.25000000125E8
(byte) memset::c#4 reg byte x 1.250000000125E9
(byte*) memset::dst
(byte*) memset::dst#1 dst zp[2]:9 2.000000002E9
(byte*) memset::dst#2 dst zp[2]:9 1.3366666683333335E9
(byte*) memset::dst#4 dst zp[2]:9 2.0000002E7
(byte*) memset::dst#1 dst zp[2]:9 2.0000000002E10
(byte*) memset::dst#2 dst zp[2]:9 1.3366666668333332E10
(byte*) memset::dst#4 dst zp[2]:9 2.00000002E8
(byte*) memset::end
(byte*) memset::end#0 end zp[2]:17 1.683333336666667E8
(byte*) memset::end#0 end zp[2]:17 1.6833333336666665E9
(word) memset::num
(word) memset::num#2 num zp[2]:17 1.0000001E7
(word) memset::num#2 num zp[2]:17 1.00000001E8
(void*) memset::return
(void*) memset::str
(void*) memset::str#3 str zp[2]:9
@ -107,11 +107,7 @@
(const byte*) printf_buffer_number::digits[(number) $b] = { fill( $b, 0) }
(byte) printf_buffer_number::sign
(void()) printf_char((byte) printf_char::ch)
(byte*~) printf_char::$6 zp[2]:21 2000002.0
(label) printf_char::@1
(label) printf_char::@2
(label) printf_char::@3
(label) printf_char::@4
(label) printf_char::@return
(byte) printf_char::ch
(byte) printf_char::ch#0 reg byte a 200002.0
@ -122,9 +118,9 @@
(void()) printf_cls()
(label) printf_cls::@1
(label) printf_cls::@return
(byte*) printf_cursor_ptr loadstore zp[2]:21 40463.06358381502
(byte) printf_cursor_x loadstore zp[1]:19 34884.354651162794
(byte) printf_cursor_y loadstore zp[1]:20 40230.517241379304
(byte*) printf_cursor_ptr loadstore zp[2]:21 142046.07954545453
(byte) printf_cursor_x loadstore zp[1]:19 36145.23493975904
(byte) printf_cursor_y loadstore zp[1]:20 192091.01694915254
(byte) printf_format_number::justify_left
(byte) printf_format_number::min_length
(byte) printf_format_number::radix
@ -225,6 +221,12 @@
(const byte) printf_schar::uvalue#0 uvalue = (byte)(const signed byte) printf_schar::value#0
(signed byte) printf_schar::value
(const signed byte) printf_schar::value#0 value = -(const signed byte) main::sc
(void()) printf_scroll()
(byte*~) printf_scroll::$4 zp[2]:21 2.0000002E7
(label) printf_scroll::@1
(label) printf_scroll::@2
(label) printf_scroll::@3
(label) printf_scroll::@return
(void()) printf_sint((signed word) printf_sint::value , (byte) printf_sint::format_min_length , (byte) printf_sint::format_justify_left , (byte) printf_sint::format_sign_always , (byte) printf_sint::format_zero_padding , (byte) printf_sint::format_upper_case , (byte) printf_sint::format_radix)
(label) printf_sint::@1
(label) printf_sint::@2
@ -526,8 +528,8 @@
(word) utoa_append::value#1 value zp[2]:9 2.0000002E7
(word) utoa_append::value#2 value zp[2]:9 5018334.166666666
reg byte a [ printf_char::ch#5 printf_char::ch#3 printf_char::ch#2 printf_char::ch#0 printf_char::ch#1 ]
reg byte x [ memset::c#4 ]
reg byte a [ printf_char::ch#5 printf_char::ch#3 printf_char::ch#2 printf_char::ch#0 printf_char::ch#1 ]
reg byte x [ printf_number_buffer::format_min_length#10 ]
reg byte y [ printf_number_buffer::len#2 printf_number_buffer::len#0 printf_number_buffer::len#1 ]
zp[1]:2 [ printf_padding::pad#5 ]
@ -553,7 +555,7 @@ 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[1]:19 [ printf_cursor_x ]
zp[1]:20 [ printf_cursor_y ]
zp[2]:21 [ printf_cursor_ptr printf_char::$6 printf_ln::$0 printf_ln::$1 ]
zp[2]:21 [ printf_cursor_ptr printf_scroll::$4 printf_ln::$0 printf_ln::$1 ]
zp[1]:23 [ main::c ]
reg byte a [ printf_str::ch#0 ]
reg byte a [ toupper::return#3 ]

View File

@ -755,32 +755,14 @@ printf_ln: {
sta.z printf_cursor_x
// printf_cursor_y++;
inc.z printf_cursor_y
// printf_scroll()
jsr printf_scroll
// }
rts
}
// Print a single char
// If the end of the screen is reached scroll it up one char and place the cursor at the
// printf_char(byte register(A) ch)
printf_char: {
.label __6 = $12
// *(printf_cursor_ptr++) = ch
ldy #0
sta (printf_cursor_ptr),y
// *(printf_cursor_ptr++) = ch;
inc.z printf_cursor_ptr
bne !+
inc.z printf_cursor_ptr+1
!:
// if(++printf_cursor_x==PRINTF_SCREEN_WIDTH)
inc.z printf_cursor_x
lda #$28
cmp.z printf_cursor_x
bne __breturn
// printf_cursor_x = 0
lda #0
sta.z printf_cursor_x
// ++printf_cursor_y;
inc.z printf_cursor_y
// Scroll the entire screen if the cursor is on the last line
printf_scroll: {
.label __4 = $12
// if(printf_cursor_y==PRINTF_SCREEN_HEIGHT)
lda #$19
cmp.z printf_cursor_y
@ -799,13 +781,13 @@ printf_char: {
sta.z memset.num+1
jsr memset
// printf_cursor_ptr-PRINTF_SCREEN_WIDTH
lda.z __6
lda.z __4
sec
sbc #<$28
sta.z __6
lda.z __6+1
sta.z __4
lda.z __4+1
sbc #>$28
sta.z __6+1
sta.z __4+1
// printf_cursor_ptr = printf_cursor_ptr-PRINTF_SCREEN_WIDTH
// printf_cursor_y--;
dec.z printf_cursor_y
@ -900,6 +882,34 @@ memcpy: {
!:
jmp __b1
}
// Print a single char
// If the end of the screen is reached scroll it up one char and place the cursor at the
// printf_char(byte register(A) ch)
printf_char: {
// *(printf_cursor_ptr++) = ch
ldy #0
sta (printf_cursor_ptr),y
// *(printf_cursor_ptr++) = ch;
inc.z printf_cursor_ptr
bne !+
inc.z printf_cursor_ptr+1
!:
// if(++printf_cursor_x==PRINTF_SCREEN_WIDTH)
inc.z printf_cursor_x
lda #$28
cmp.z printf_cursor_x
bne __breturn
// printf_cursor_x = 0
lda #0
sta.z printf_cursor_x
// ++printf_cursor_y;
inc.z printf_cursor_y
// printf_scroll()
jsr printf_scroll
__breturn:
// }
rts
}
// Print an unsigned int using a specific format
// printf_uint(word zp(2) uvalue, byte zp($e) format_upper_case, byte register(X) format_radix)
printf_uint: {

View File

@ -417,451 +417,460 @@ printf_ln: scope:[printf_ln] from printf_str::@4
[203] (byte*) printf_cursor_ptr ← (byte*~) printf_ln::$1
[204] (byte) printf_cursor_x ← (byte) 0
[205] (byte) printf_cursor_y ← ++ (byte) printf_cursor_y
[206] call printf_scroll
to:printf_ln::@return
printf_ln::@return: scope:[printf_ln] from printf_ln
[206] return
[207] return
to:@return
(void()) printf_char((byte) printf_char::ch)
printf_char: scope:[printf_char] from main::@1 main::@11 main::@21 main::@31 main::@41 main::@51 main::@61 main::@71 main::@81 printf_number_buffer::@9 printf_padding::@2 printf_str::@5
[207] (byte) printf_char::ch#12 ← phi( main::@1/(byte) '%' main::@11/(byte) '%' main::@21/(byte) '%' main::@31/(byte) '%' main::@41/(byte) '%' main::@51/(byte) '%' main::@61/(byte) '%' main::@71/(byte) '%' main::@81/(byte) '%' printf_number_buffer::@9/(byte) printf_char::ch#2 printf_padding::@2/(byte) printf_char::ch#0 printf_str::@5/(byte) printf_char::ch#1 )
[208] *((byte*) printf_cursor_ptr) ← (byte) printf_char::ch#12
[209] (byte*) printf_cursor_ptr ← ++ (byte*) printf_cursor_ptr
[210] (byte) printf_cursor_x ← ++ (byte) printf_cursor_x
[211] if((byte) printf_cursor_x!=(byte) $28) goto printf_char::@return
to:printf_char::@1
printf_char::@1: scope:[printf_char] from printf_char
[212] (byte) printf_cursor_x ← (byte) 0
[213] (byte) printf_cursor_y ← ++ (byte) printf_cursor_y
[214] if((byte) printf_cursor_y!=(byte) $19) goto printf_char::@return
to:printf_char::@2
printf_char::@2: scope:[printf_char] from printf_char::@1
[215] phi()
[216] call memcpy
to:printf_char::@3
printf_char::@3: scope:[printf_char] from printf_char::@2
[217] phi()
[218] call memset
to:printf_char::@4
printf_char::@4: scope:[printf_char] from printf_char::@3
[219] (byte*~) printf_char::$6 ← (byte*) printf_cursor_ptr - (byte) $28
[220] (byte*) printf_cursor_ptr ← (byte*~) printf_char::$6
[221] (byte) printf_cursor_y ← -- (byte) printf_cursor_y
to:printf_char::@return
printf_char::@return: scope:[printf_char] from printf_char printf_char::@1 printf_char::@4
[222] return
(void()) printf_scroll()
printf_scroll: scope:[printf_scroll] from printf_char::@1 printf_ln
[208] if((byte) printf_cursor_y!=(byte) $19) goto printf_scroll::@return
to:printf_scroll::@1
printf_scroll::@1: scope:[printf_scroll] from printf_scroll
[209] phi()
[210] call memcpy
to:printf_scroll::@2
printf_scroll::@2: scope:[printf_scroll] from printf_scroll::@1
[211] phi()
[212] call memset
to:printf_scroll::@3
printf_scroll::@3: scope:[printf_scroll] from printf_scroll::@2
[213] (byte*~) printf_scroll::$4 ← (byte*) printf_cursor_ptr - (byte) $28
[214] (byte*) printf_cursor_ptr ← (byte*~) printf_scroll::$4
[215] (byte) printf_cursor_y ← -- (byte) printf_cursor_y
to:printf_scroll::@return
printf_scroll::@return: scope:[printf_scroll] from printf_scroll printf_scroll::@3
[216] return
to:@return
(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num)
memset: scope:[memset] from printf_char::@3 printf_cls
[223] (byte) memset::c#4 ← phi( printf_char::@3/(byte) ' ' printf_cls/(byte) ' ' )
[223] (void*) memset::str#3 ← phi( printf_char::@3/(void*)(number) $400+(number) $28*(number) $19-(number) $28 printf_cls/(void*) 1024 )
[223] (word) memset::num#2 ← phi( printf_char::@3/(byte) $28 printf_cls/(word)(number) $28*(number) $19 )
[224] if((word) memset::num#2<=(byte) 0) goto memset::@return
memset: scope:[memset] from printf_cls printf_scroll::@2
[217] (byte) memset::c#4 ← phi( printf_cls/(byte) ' ' printf_scroll::@2/(byte) ' ' )
[217] (void*) memset::str#3 ← phi( printf_cls/(void*) 1024 printf_scroll::@2/(void*)(number) $400+(number) $28*(number) $19-(number) $28 )
[217] (word) memset::num#2 ← phi( printf_cls/(word)(number) $28*(number) $19 printf_scroll::@2/(byte) $28 )
[218] if((word) memset::num#2<=(byte) 0) goto memset::@return
to:memset::@1
memset::@1: scope:[memset] from memset
[225] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) memset::num#2
[226] (byte*) memset::dst#4 ← (byte*)(void*) memset::str#3
[219] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) memset::num#2
[220] (byte*) memset::dst#4 ← (byte*)(void*) memset::str#3
to:memset::@2
memset::@2: scope:[memset] from memset::@1 memset::@3
[227] (byte*) memset::dst#2 ← phi( memset::@1/(byte*) memset::dst#4 memset::@3/(byte*) memset::dst#1 )
[228] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@3
[221] (byte*) memset::dst#2 ← phi( memset::@1/(byte*) memset::dst#4 memset::@3/(byte*) memset::dst#1 )
[222] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@3
to:memset::@return
memset::@return: scope:[memset] from memset memset::@2
[229] return
[223] return
to:@return
memset::@3: scope:[memset] from memset::@2
[230] *((byte*) memset::dst#2) ← (byte) memset::c#4
[231] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2
[224] *((byte*) memset::dst#2) ← (byte) memset::c#4
[225] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2
to:memset::@2
(void*()) memcpy((void*) memcpy::destination , (void*) memcpy::source , (word) memcpy::num)
memcpy: scope:[memcpy] from printf_char::@2
[232] phi()
memcpy: scope:[memcpy] from printf_scroll::@1
[226] phi()
to:memcpy::@1
memcpy::@1: scope:[memcpy] from memcpy memcpy::@2
[233] (byte*) memcpy::dst#2 ← phi( memcpy/(byte*)(const void*) memcpy::destination#0 memcpy::@2/(byte*) memcpy::dst#1 )
[233] (byte*) memcpy::src#2 ← phi( memcpy/(byte*)(const void*) memcpy::source#0 memcpy::@2/(byte*) memcpy::src#1 )
[234] if((byte*) memcpy::src#2!=(const byte*) memcpy::src_end#0) goto memcpy::@2
[227] (byte*) memcpy::dst#2 ← phi( memcpy/(byte*)(const void*) memcpy::destination#0 memcpy::@2/(byte*) memcpy::dst#1 )
[227] (byte*) memcpy::src#2 ← phi( memcpy/(byte*)(const void*) memcpy::source#0 memcpy::@2/(byte*) memcpy::src#1 )
[228] if((byte*) memcpy::src#2!=(const byte*) memcpy::src_end#0) goto memcpy::@2
to:memcpy::@return
memcpy::@return: scope:[memcpy] from memcpy::@1
[235] return
[229] return
to:@return
memcpy::@2: scope:[memcpy] from memcpy::@1
[236] *((byte*) memcpy::dst#2) ← *((byte*) memcpy::src#2)
[237] (byte*) memcpy::dst#1 ← ++ (byte*) memcpy::dst#2
[238] (byte*) memcpy::src#1 ← ++ (byte*) memcpy::src#2
[230] *((byte*) memcpy::dst#2) ← *((byte*) memcpy::src#2)
[231] (byte*) memcpy::dst#1 ← ++ (byte*) memcpy::dst#2
[232] (byte*) memcpy::src#1 ← ++ (byte*) memcpy::src#2
to:memcpy::@1
(void()) printf_char((byte) printf_char::ch)
printf_char: scope:[printf_char] from main::@1 main::@11 main::@21 main::@31 main::@41 main::@51 main::@61 main::@71 main::@81 printf_number_buffer::@9 printf_padding::@2 printf_str::@5
[233] (byte) printf_char::ch#12 ← phi( main::@1/(byte) '%' main::@11/(byte) '%' main::@21/(byte) '%' main::@31/(byte) '%' main::@41/(byte) '%' main::@51/(byte) '%' main::@61/(byte) '%' main::@71/(byte) '%' main::@81/(byte) '%' printf_number_buffer::@9/(byte) printf_char::ch#2 printf_padding::@2/(byte) printf_char::ch#0 printf_str::@5/(byte) printf_char::ch#1 )
[234] *((byte*) printf_cursor_ptr) ← (byte) printf_char::ch#12
[235] (byte*) printf_cursor_ptr ← ++ (byte*) printf_cursor_ptr
[236] (byte) printf_cursor_x ← ++ (byte) printf_cursor_x
[237] if((byte) printf_cursor_x!=(byte) $28) goto printf_char::@return
to:printf_char::@1
printf_char::@1: scope:[printf_char] from printf_char
[238] (byte) printf_cursor_x ← (byte) 0
[239] (byte) printf_cursor_y ← ++ (byte) printf_cursor_y
[240] call printf_scroll
to:printf_char::@return
printf_char::@return: scope:[printf_char] from printf_char printf_char::@1
[241] return
to:@return
(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)
printf_uint: scope:[printf_uint] from main::@63 main::@65 main::@67 main::@69 main::@73 main::@75 main::@77 main::@79 main::@83 main::@85 main::@87 main::@89
[239] (byte) printf_uint::format_upper_case#12 ← phi( main::@63/(byte) 0 main::@65/(byte) 0 main::@67/(byte) 0 main::@69/(byte) 0 main::@73/(byte) 0 main::@75/(byte) 0 main::@77/(byte) 0 main::@79/(byte) 0 main::@83/(byte) 1 main::@85/(byte) 1 main::@87/(byte) 1 main::@89/(byte) 1 )
[239] (byte) printf_uint::format_radix#12 ← phi( main::@63/(const byte) OCTAL main::@65/(const byte) OCTAL main::@67/(const byte) OCTAL main::@69/(const byte) OCTAL main::@73/(const byte) HEXADECIMAL main::@75/(const byte) HEXADECIMAL main::@77/(const byte) HEXADECIMAL main::@79/(const byte) HEXADECIMAL main::@83/(const byte) HEXADECIMAL main::@85/(const byte) HEXADECIMAL main::@87/(const byte) HEXADECIMAL main::@89/(const byte) HEXADECIMAL )
[239] (word) printf_uint::uvalue#12 ← phi( main::@63/(byte) 1 main::@65/(byte) $b main::@67/(byte) $6f main::@69/(word) $457 main::@73/(byte) 1 main::@75/(byte) $b main::@77/(byte) $6f main::@79/(word) $457 main::@83/(byte) 1 main::@85/(byte) $b main::@87/(byte) $6f main::@89/(word) $457 )
[242] (byte) printf_uint::format_upper_case#12 ← phi( main::@63/(byte) 0 main::@65/(byte) 0 main::@67/(byte) 0 main::@69/(byte) 0 main::@73/(byte) 0 main::@75/(byte) 0 main::@77/(byte) 0 main::@79/(byte) 0 main::@83/(byte) 1 main::@85/(byte) 1 main::@87/(byte) 1 main::@89/(byte) 1 )
[242] (byte) printf_uint::format_radix#12 ← phi( main::@63/(const byte) OCTAL main::@65/(const byte) OCTAL main::@67/(const byte) OCTAL main::@69/(const byte) OCTAL main::@73/(const byte) HEXADECIMAL main::@75/(const byte) HEXADECIMAL main::@77/(const byte) HEXADECIMAL main::@79/(const byte) HEXADECIMAL main::@83/(const byte) HEXADECIMAL main::@85/(const byte) HEXADECIMAL main::@87/(const byte) HEXADECIMAL main::@89/(const byte) HEXADECIMAL )
[242] (word) printf_uint::uvalue#12 ← phi( main::@63/(byte) 1 main::@65/(byte) $b main::@67/(byte) $6f main::@69/(word) $457 main::@73/(byte) 1 main::@75/(byte) $b main::@77/(byte) $6f main::@79/(word) $457 main::@83/(byte) 1 main::@85/(byte) $b main::@87/(byte) $6f main::@89/(word) $457 )
to:printf_uint::@1
printf_uint::@1: scope:[printf_uint] from printf_uint
[240] *((byte*)&(struct printf_buffer_number) printf_buffer) ← (byte) 0
[241] (word) utoa::value#2 ← (word) printf_uint::uvalue#12
[242] (byte) utoa::radix#1 ← (byte) printf_uint::format_radix#12
[243] call utoa
[243] *((byte*)&(struct printf_buffer_number) printf_buffer) ← (byte) 0
[244] (word) utoa::value#2 ← (word) printf_uint::uvalue#12
[245] (byte) utoa::radix#1 ← (byte) printf_uint::format_radix#12
[246] call utoa
to:printf_uint::@2
printf_uint::@2: scope:[printf_uint] from printf_uint::@1
[244] (byte) printf_number_buffer::buffer_sign#1 ← *((byte*)&(struct printf_buffer_number) printf_buffer)
[245] (byte) printf_number_buffer::format_upper_case#1 ← (byte) printf_uint::format_upper_case#12
[246] call printf_number_buffer
[247] (byte) printf_number_buffer::buffer_sign#1 ← *((byte*)&(struct printf_buffer_number) printf_buffer)
[248] (byte) printf_number_buffer::format_upper_case#1 ← (byte) printf_uint::format_upper_case#12
[249] call printf_number_buffer
to:printf_uint::@return
printf_uint::@return: scope:[printf_uint] from printf_uint::@2
[247] return
[250] return
to:@return
(void()) printf_number_buffer((byte) printf_number_buffer::buffer_sign , (byte*) printf_number_buffer::buffer_digits , (byte) printf_number_buffer::format_min_length , (byte) printf_number_buffer::format_justify_left , (byte) printf_number_buffer::format_sign_always , (byte) printf_number_buffer::format_zero_padding , (byte) printf_number_buffer::format_upper_case , (byte) printf_number_buffer::format_radix)
printf_number_buffer: scope:[printf_number_buffer] from printf_sint::@5 printf_uint::@2
[248] (byte) printf_number_buffer::format_upper_case#10 ← phi( printf_sint::@5/(byte) 0 printf_uint::@2/(byte) printf_number_buffer::format_upper_case#1 )
[248] (byte) printf_number_buffer::buffer_sign#10 ← phi( printf_sint::@5/(byte) printf_number_buffer::buffer_sign#0 printf_uint::@2/(byte) printf_number_buffer::buffer_sign#1 )
[248] (byte*) printf_number_buffer::buffer_digits#10 ← phi( printf_sint::@5/(byte*)&(struct printf_buffer_number) printf_buffer+(const byte) OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS printf_uint::@2/(byte*)&(struct printf_buffer_number) printf_buffer+(const byte) OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS )
[248] (byte) printf_number_buffer::format_zero_padding#10 ← phi( printf_sint::@5/(byte) printf_number_buffer::format_zero_padding#0 printf_uint::@2/(byte) 0 )
[248] (byte) printf_number_buffer::format_justify_left#10 ← phi( printf_sint::@5/(byte) printf_number_buffer::format_justify_left#0 printf_uint::@2/(byte) 0 )
[248] (byte) printf_number_buffer::format_min_length#2 ← phi( printf_sint::@5/(byte) 3 printf_uint::@2/(byte) 0 )
[249] if((byte) 0==(byte) printf_number_buffer::format_min_length#2) goto printf_number_buffer::@1
[251] (byte) printf_number_buffer::format_upper_case#10 ← phi( printf_sint::@5/(byte) 0 printf_uint::@2/(byte) printf_number_buffer::format_upper_case#1 )
[251] (byte) printf_number_buffer::buffer_sign#10 ← phi( printf_sint::@5/(byte) printf_number_buffer::buffer_sign#0 printf_uint::@2/(byte) printf_number_buffer::buffer_sign#1 )
[251] (byte*) printf_number_buffer::buffer_digits#10 ← phi( printf_sint::@5/(byte*)&(struct printf_buffer_number) printf_buffer+(const byte) OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS printf_uint::@2/(byte*)&(struct printf_buffer_number) printf_buffer+(const byte) OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS )
[251] (byte) printf_number_buffer::format_zero_padding#10 ← phi( printf_sint::@5/(byte) printf_number_buffer::format_zero_padding#0 printf_uint::@2/(byte) 0 )
[251] (byte) printf_number_buffer::format_justify_left#10 ← phi( printf_sint::@5/(byte) printf_number_buffer::format_justify_left#0 printf_uint::@2/(byte) 0 )
[251] (byte) printf_number_buffer::format_min_length#2 ← phi( printf_sint::@5/(byte) 3 printf_uint::@2/(byte) 0 )
[252] if((byte) 0==(byte) printf_number_buffer::format_min_length#2) goto printf_number_buffer::@1
to:printf_number_buffer::@6
printf_number_buffer::@6: scope:[printf_number_buffer] from printf_number_buffer
[250] (byte*) strlen::str#1 ← (byte*) printf_number_buffer::buffer_digits#10
[251] call strlen
[252] (word) strlen::return#2 ← (word) strlen::len#2
[253] (byte*) strlen::str#1 ← (byte*) printf_number_buffer::buffer_digits#10
[254] call strlen
[255] (word) strlen::return#2 ← (word) strlen::len#2
to:printf_number_buffer::@14
printf_number_buffer::@14: scope:[printf_number_buffer] from printf_number_buffer::@6
[253] (word~) printf_number_buffer::$19 ← (word) strlen::return#2
[254] (signed byte) printf_number_buffer::len#0 ← (signed byte)(word~) printf_number_buffer::$19
[255] if((byte) 0==(byte) printf_number_buffer::buffer_sign#10) goto printf_number_buffer::@13
[256] (word~) printf_number_buffer::$19 ← (word) strlen::return#2
[257] (signed byte) printf_number_buffer::len#0 ← (signed byte)(word~) printf_number_buffer::$19
[258] if((byte) 0==(byte) printf_number_buffer::buffer_sign#10) goto printf_number_buffer::@13
to:printf_number_buffer::@7
printf_number_buffer::@7: scope:[printf_number_buffer] from printf_number_buffer::@14
[256] (signed byte) printf_number_buffer::len#1 ← ++ (signed byte) printf_number_buffer::len#0
[259] (signed byte) printf_number_buffer::len#1 ← ++ (signed byte) printf_number_buffer::len#0
to:printf_number_buffer::@13
printf_number_buffer::@13: scope:[printf_number_buffer] from printf_number_buffer::@14 printf_number_buffer::@7
[257] (signed byte) printf_number_buffer::len#2 ← phi( printf_number_buffer::@14/(signed byte) printf_number_buffer::len#0 printf_number_buffer::@7/(signed byte) printf_number_buffer::len#1 )
[258] (signed byte) printf_number_buffer::padding#1 ← (signed byte)(byte) printf_number_buffer::format_min_length#2 - (signed byte) printf_number_buffer::len#2
[259] if((signed byte) printf_number_buffer::padding#1>=(signed byte) 0) goto printf_number_buffer::@21
[260] (signed byte) printf_number_buffer::len#2 ← phi( printf_number_buffer::@14/(signed byte) printf_number_buffer::len#0 printf_number_buffer::@7/(signed byte) printf_number_buffer::len#1 )
[261] (signed byte) printf_number_buffer::padding#1 ← (signed byte)(byte) printf_number_buffer::format_min_length#2 - (signed byte) printf_number_buffer::len#2
[262] if((signed byte) printf_number_buffer::padding#1>=(signed byte) 0) goto printf_number_buffer::@21
to:printf_number_buffer::@1
printf_number_buffer::@21: scope:[printf_number_buffer] from printf_number_buffer::@13
[260] phi()
[263] phi()
to:printf_number_buffer::@1
printf_number_buffer::@1: scope:[printf_number_buffer] from printf_number_buffer printf_number_buffer::@13 printf_number_buffer::@21
[261] (signed byte) printf_number_buffer::padding#10 ← phi( printf_number_buffer/(signed byte) 0 printf_number_buffer::@21/(signed byte) printf_number_buffer::padding#1 printf_number_buffer::@13/(signed byte) 0 )
[262] if((byte) 0!=(byte) printf_number_buffer::format_justify_left#10) goto printf_number_buffer::@2
[264] (signed byte) printf_number_buffer::padding#10 ← phi( printf_number_buffer/(signed byte) 0 printf_number_buffer::@21/(signed byte) printf_number_buffer::padding#1 printf_number_buffer::@13/(signed byte) 0 )
[265] if((byte) 0!=(byte) printf_number_buffer::format_justify_left#10) goto printf_number_buffer::@2
to:printf_number_buffer::@17
printf_number_buffer::@17: scope:[printf_number_buffer] from printf_number_buffer::@1
[263] if((byte) 0!=(byte) printf_number_buffer::format_zero_padding#10) goto printf_number_buffer::@2
[266] if((byte) 0!=(byte) printf_number_buffer::format_zero_padding#10) goto printf_number_buffer::@2
to:printf_number_buffer::@16
printf_number_buffer::@16: scope:[printf_number_buffer] from printf_number_buffer::@17
[264] if((signed byte) 0!=(signed byte) printf_number_buffer::padding#10) goto printf_number_buffer::@8
[267] if((signed byte) 0!=(signed byte) printf_number_buffer::padding#10) goto printf_number_buffer::@8
to:printf_number_buffer::@2
printf_number_buffer::@8: scope:[printf_number_buffer] from printf_number_buffer::@16
[265] (byte) printf_padding::length#0 ← (byte)(signed byte) printf_number_buffer::padding#10
[266] call printf_padding
[268] (byte) printf_padding::length#0 ← (byte)(signed byte) printf_number_buffer::padding#10
[269] call printf_padding
to:printf_number_buffer::@2
printf_number_buffer::@2: scope:[printf_number_buffer] from printf_number_buffer::@1 printf_number_buffer::@16 printf_number_buffer::@17 printf_number_buffer::@8
[267] if((byte) 0==(byte) printf_number_buffer::buffer_sign#10) goto printf_number_buffer::@3
[270] if((byte) 0==(byte) printf_number_buffer::buffer_sign#10) goto printf_number_buffer::@3
to:printf_number_buffer::@9
printf_number_buffer::@9: scope:[printf_number_buffer] from printf_number_buffer::@2
[268] (byte) printf_char::ch#2 ← (byte) printf_number_buffer::buffer_sign#10
[269] call printf_char
[271] (byte) printf_char::ch#2 ← (byte) printf_number_buffer::buffer_sign#10
[272] call printf_char
to:printf_number_buffer::@3
printf_number_buffer::@3: scope:[printf_number_buffer] from printf_number_buffer::@2 printf_number_buffer::@9
[270] if((byte) 0==(byte) printf_number_buffer::format_zero_padding#10) goto printf_number_buffer::@4
[273] if((byte) 0==(byte) printf_number_buffer::format_zero_padding#10) goto printf_number_buffer::@4
to:printf_number_buffer::@18
printf_number_buffer::@18: scope:[printf_number_buffer] from printf_number_buffer::@3
[271] if((signed byte) 0!=(signed byte) printf_number_buffer::padding#10) goto printf_number_buffer::@10
[274] if((signed byte) 0!=(signed byte) printf_number_buffer::padding#10) goto printf_number_buffer::@10
to:printf_number_buffer::@4
printf_number_buffer::@10: scope:[printf_number_buffer] from printf_number_buffer::@18
[272] (byte) printf_padding::length#1 ← (byte)(signed byte) printf_number_buffer::padding#10
[273] call printf_padding
[275] (byte) printf_padding::length#1 ← (byte)(signed byte) printf_number_buffer::padding#10
[276] call printf_padding
to:printf_number_buffer::@4
printf_number_buffer::@4: scope:[printf_number_buffer] from printf_number_buffer::@10 printf_number_buffer::@18 printf_number_buffer::@3
[274] if((byte) 0==(byte) printf_number_buffer::format_upper_case#10) goto printf_number_buffer::@5
[277] if((byte) 0==(byte) printf_number_buffer::format_upper_case#10) goto printf_number_buffer::@5
to:printf_number_buffer::@11
printf_number_buffer::@11: scope:[printf_number_buffer] from printf_number_buffer::@4
[275] (byte*) strupr::str#0 ← (byte*) printf_number_buffer::buffer_digits#10
[276] call strupr
[278] (byte*) strupr::str#0 ← (byte*) printf_number_buffer::buffer_digits#10
[279] call strupr
to:printf_number_buffer::@5
printf_number_buffer::@5: scope:[printf_number_buffer] from printf_number_buffer::@11 printf_number_buffer::@4
[277] (byte*) printf_str::str#1 ← (byte*) printf_number_buffer::buffer_digits#10
[278] call printf_str
[280] (byte*) printf_str::str#1 ← (byte*) printf_number_buffer::buffer_digits#10
[281] call printf_str
to:printf_number_buffer::@15
printf_number_buffer::@15: scope:[printf_number_buffer] from printf_number_buffer::@5
[279] if((byte) 0==(byte) printf_number_buffer::format_justify_left#10) goto printf_number_buffer::@return
[282] if((byte) 0==(byte) printf_number_buffer::format_justify_left#10) goto printf_number_buffer::@return
to:printf_number_buffer::@20
printf_number_buffer::@20: scope:[printf_number_buffer] from printf_number_buffer::@15
[280] if((byte) 0!=(byte) printf_number_buffer::format_zero_padding#10) goto printf_number_buffer::@return
[283] if((byte) 0!=(byte) printf_number_buffer::format_zero_padding#10) goto printf_number_buffer::@return
to:printf_number_buffer::@19
printf_number_buffer::@19: scope:[printf_number_buffer] from printf_number_buffer::@20
[281] if((signed byte) 0!=(signed byte) printf_number_buffer::padding#10) goto printf_number_buffer::@12
[284] if((signed byte) 0!=(signed byte) printf_number_buffer::padding#10) goto printf_number_buffer::@12
to:printf_number_buffer::@return
printf_number_buffer::@12: scope:[printf_number_buffer] from printf_number_buffer::@19
[282] (byte) printf_padding::length#2 ← (byte)(signed byte) printf_number_buffer::padding#10
[283] call printf_padding
[285] (byte) printf_padding::length#2 ← (byte)(signed byte) printf_number_buffer::padding#10
[286] call printf_padding
to:printf_number_buffer::@return
printf_number_buffer::@return: scope:[printf_number_buffer] from printf_number_buffer::@12 printf_number_buffer::@15 printf_number_buffer::@19 printf_number_buffer::@20
[284] return
[287] return
to:@return
(void()) printf_padding((byte) printf_padding::pad , (byte) printf_padding::length)
printf_padding: scope:[printf_padding] from printf_number_buffer::@10 printf_number_buffer::@12 printf_number_buffer::@8 printf_string::@4 printf_string::@5
[285] (byte) printf_padding::pad#7 ← phi( printf_number_buffer::@10/(byte) '0' printf_number_buffer::@12/(byte) ' ' printf_number_buffer::@8/(byte) ' ' printf_string::@4/(byte) ' ' printf_string::@5/(byte) ' ' )
[285] (byte) printf_padding::length#6 ← phi( printf_number_buffer::@10/(byte) printf_padding::length#1 printf_number_buffer::@12/(byte) printf_padding::length#2 printf_number_buffer::@8/(byte) printf_padding::length#0 printf_string::@4/(byte) printf_padding::length#3 printf_string::@5/(byte) printf_padding::length#4 )
[288] (byte) printf_padding::pad#7 ← phi( printf_number_buffer::@10/(byte) '0' printf_number_buffer::@12/(byte) ' ' printf_number_buffer::@8/(byte) ' ' printf_string::@4/(byte) ' ' printf_string::@5/(byte) ' ' )
[288] (byte) printf_padding::length#6 ← phi( printf_number_buffer::@10/(byte) printf_padding::length#1 printf_number_buffer::@12/(byte) printf_padding::length#2 printf_number_buffer::@8/(byte) printf_padding::length#0 printf_string::@4/(byte) printf_padding::length#3 printf_string::@5/(byte) printf_padding::length#4 )
to:printf_padding::@1
printf_padding::@1: scope:[printf_padding] from printf_padding printf_padding::@3
[286] (byte) printf_padding::i#2 ← phi( printf_padding/(byte) 0 printf_padding::@3/(byte) printf_padding::i#1 )
[287] if((byte) printf_padding::i#2<(byte) printf_padding::length#6) goto printf_padding::@2
[289] (byte) printf_padding::i#2 ← phi( printf_padding/(byte) 0 printf_padding::@3/(byte) printf_padding::i#1 )
[290] if((byte) printf_padding::i#2<(byte) printf_padding::length#6) goto printf_padding::@2
to:printf_padding::@return
printf_padding::@return: scope:[printf_padding] from printf_padding::@1
[288] return
[291] return
to:@return
printf_padding::@2: scope:[printf_padding] from printf_padding::@1
[289] (byte) printf_char::ch#0 ← (byte) printf_padding::pad#7
[290] call printf_char
[292] (byte) printf_char::ch#0 ← (byte) printf_padding::pad#7
[293] call printf_char
to:printf_padding::@3
printf_padding::@3: scope:[printf_padding] from printf_padding::@2
[291] (byte) printf_padding::i#1 ← ++ (byte) printf_padding::i#2
[294] (byte) printf_padding::i#1 ← ++ (byte) printf_padding::i#2
to:printf_padding::@1
(byte*()) strupr((byte*) strupr::str)
strupr: scope:[strupr] from printf_number_buffer::@11
[292] phi()
[295] phi()
to:strupr::@1
strupr::@1: scope:[strupr] from strupr strupr::@3
[293] (byte*) strupr::src#2 ← phi( strupr/(byte*) strupr::str#0 strupr::@3/(byte*) strupr::src#1 )
[294] if((byte) 0!=*((byte*) strupr::src#2)) goto strupr::@2
[296] (byte*) strupr::src#2 ← phi( strupr/(byte*) strupr::str#0 strupr::@3/(byte*) strupr::src#1 )
[297] if((byte) 0!=*((byte*) strupr::src#2)) goto strupr::@2
to:strupr::@return
strupr::@return: scope:[strupr] from strupr::@1
[295] return
[298] return
to:@return
strupr::@2: scope:[strupr] from strupr::@1
[296] (byte) toupper::ch#0 ← *((byte*) strupr::src#2)
[297] call toupper
[298] (byte) toupper::return#3 ← (byte) toupper::return#2
[299] (byte) toupper::ch#0 ← *((byte*) strupr::src#2)
[300] call toupper
[301] (byte) toupper::return#3 ← (byte) toupper::return#2
to:strupr::@3
strupr::@3: scope:[strupr] from strupr::@2
[299] (byte~) strupr::$0 ← (byte) toupper::return#3
[300] *((byte*) strupr::src#2) ← (byte~) strupr::$0
[301] (byte*) strupr::src#1 ← ++ (byte*) strupr::src#2
[302] (byte~) strupr::$0 ← (byte) toupper::return#3
[303] *((byte*) strupr::src#2) ← (byte~) strupr::$0
[304] (byte*) strupr::src#1 ← ++ (byte*) strupr::src#2
to:strupr::@1
(byte()) toupper((byte) toupper::ch)
toupper: scope:[toupper] from strupr::@2
[302] if((byte) toupper::ch#0<(byte) 'a') goto toupper::@return
[305] if((byte) toupper::ch#0<(byte) 'a') goto toupper::@return
to:toupper::@2
toupper::@2: scope:[toupper] from toupper
[303] if((byte) toupper::ch#0<=(byte) 'z') goto toupper::@1
[306] if((byte) toupper::ch#0<=(byte) 'z') goto toupper::@1
to:toupper::@return
toupper::@1: scope:[toupper] from toupper::@2
[304] (byte) toupper::return#0 ← (byte) toupper::ch#0 + (byte) 'A'-(byte) 'a'
[307] (byte) toupper::return#0 ← (byte) toupper::ch#0 + (byte) 'A'-(byte) 'a'
to:toupper::@return
toupper::@return: scope:[toupper] from toupper toupper::@1 toupper::@2
[305] (byte) toupper::return#2 ← phi( toupper::@1/(byte) toupper::return#0 toupper/(byte) toupper::ch#0 toupper::@2/(byte) toupper::ch#0 )
[306] return
[308] (byte) toupper::return#2 ← phi( toupper::@1/(byte) toupper::return#0 toupper/(byte) toupper::ch#0 toupper::@2/(byte) toupper::ch#0 )
[309] return
to:@return
(word()) strlen((byte*) strlen::str)
strlen: scope:[strlen] from printf_number_buffer::@6 printf_string::@3
[307] (byte*) strlen::str#5 ← phi( printf_number_buffer::@6/(byte*) strlen::str#1 printf_string::@3/(byte*) strlen::str#2 )
[310] (byte*) strlen::str#5 ← phi( printf_number_buffer::@6/(byte*) strlen::str#1 printf_string::@3/(byte*) strlen::str#2 )
to:strlen::@1
strlen::@1: scope:[strlen] from strlen strlen::@2
[308] (word) strlen::len#2 ← phi( strlen/(word) 0 strlen::@2/(word) strlen::len#1 )
[308] (byte*) strlen::str#3 ← phi( strlen/(byte*) strlen::str#5 strlen::@2/(byte*) strlen::str#0 )
[309] if((byte) 0!=*((byte*) strlen::str#3)) goto strlen::@2
[311] (word) strlen::len#2 ← phi( strlen/(word) 0 strlen::@2/(word) strlen::len#1 )
[311] (byte*) strlen::str#3 ← phi( strlen/(byte*) strlen::str#5 strlen::@2/(byte*) strlen::str#0 )
[312] if((byte) 0!=*((byte*) strlen::str#3)) goto strlen::@2
to:strlen::@return
strlen::@return: scope:[strlen] from strlen::@1
[310] return
[313] return
to:@return
strlen::@2: scope:[strlen] from strlen::@1
[311] (word) strlen::len#1 ← ++ (word) strlen::len#2
[312] (byte*) strlen::str#0 ← ++ (byte*) strlen::str#3
[314] (word) strlen::len#1 ← ++ (word) strlen::len#2
[315] (byte*) strlen::str#0 ← ++ (byte*) strlen::str#3
to:strlen::@1
(void()) utoa((word) utoa::value , (byte*) utoa::buffer , (byte) utoa::radix)
utoa: scope:[utoa] from printf_sint::@2 printf_uint::@1
[313] (byte*) utoa::buffer#11 ← phi( printf_sint::@2/(byte*)&(struct printf_buffer_number) printf_buffer+(const byte) OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS printf_uint::@1/(byte*)&(struct printf_buffer_number) printf_buffer+(const byte) OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS )
[313] (word) utoa::value#10 ← phi( printf_sint::@2/(word) utoa::value#1 printf_uint::@1/(word) utoa::value#2 )
[313] (byte) utoa::radix#2 ← phi( printf_sint::@2/(const byte) DECIMAL printf_uint::@1/(byte) utoa::radix#1 )
[314] if((byte) utoa::radix#2==(const byte) DECIMAL) goto utoa::@1
[316] (byte*) utoa::buffer#11 ← phi( printf_sint::@2/(byte*)&(struct printf_buffer_number) printf_buffer+(const byte) OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS printf_uint::@1/(byte*)&(struct printf_buffer_number) printf_buffer+(const byte) OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS )
[316] (word) utoa::value#10 ← phi( printf_sint::@2/(word) utoa::value#1 printf_uint::@1/(word) utoa::value#2 )
[316] (byte) utoa::radix#2 ← phi( printf_sint::@2/(const byte) DECIMAL printf_uint::@1/(byte) utoa::radix#1 )
[317] if((byte) utoa::radix#2==(const byte) DECIMAL) goto utoa::@1
to:utoa::@2
utoa::@2: scope:[utoa] from utoa
[315] if((byte) utoa::radix#2==(const byte) HEXADECIMAL) goto utoa::@1
[318] if((byte) utoa::radix#2==(const byte) HEXADECIMAL) goto utoa::@1
to:utoa::@3
utoa::@3: scope:[utoa] from utoa::@2
[316] if((byte) utoa::radix#2==(const byte) OCTAL) goto utoa::@1
[319] if((byte) utoa::radix#2==(const byte) OCTAL) goto utoa::@1
to:utoa::@4
utoa::@4: scope:[utoa] from utoa::@3
[317] if((byte) utoa::radix#2==(const byte) BINARY) goto utoa::@1
[320] if((byte) utoa::radix#2==(const byte) BINARY) goto utoa::@1
to:utoa::@5
utoa::@5: scope:[utoa] from utoa::@4
[318] *((byte*) utoa::buffer#11) ← (byte) 'e'
[319] (byte*) utoa::buffer#0 ← ++ (byte*) utoa::buffer#11
[320] *((byte*) utoa::buffer#0) ← (byte) 'r'
[321] (byte*) utoa::buffer#1 ← ++ (byte*) utoa::buffer#0
[322] *((byte*) utoa::buffer#1) ← (byte) 'r'
[323] (byte*) utoa::buffer#2 ← ++ (byte*) utoa::buffer#1
[324] *((byte*) utoa::buffer#2) ← (byte) 0
[321] *((byte*) utoa::buffer#11) ← (byte) 'e'
[322] (byte*) utoa::buffer#0 ← ++ (byte*) utoa::buffer#11
[323] *((byte*) utoa::buffer#0) ← (byte) 'r'
[324] (byte*) utoa::buffer#1 ← ++ (byte*) utoa::buffer#0
[325] *((byte*) utoa::buffer#1) ← (byte) 'r'
[326] (byte*) utoa::buffer#2 ← ++ (byte*) utoa::buffer#1
[327] *((byte*) utoa::buffer#2) ← (byte) 0
to:utoa::@return
utoa::@return: scope:[utoa] from utoa::@5 utoa::@8
[325] return
[328] return
to:@return
utoa::@1: scope:[utoa] from utoa utoa::@2 utoa::@3 utoa::@4
[326] (word*) utoa::digit_values#8 ← phi( utoa/(const word*) RADIX_DECIMAL_VALUES utoa::@2/(const word*) RADIX_HEXADECIMAL_VALUES utoa::@3/(const word*) RADIX_OCTAL_VALUES utoa::@4/(const word*) RADIX_BINARY_VALUES )
[326] (byte) utoa::max_digits#7 ← phi( utoa/(byte) 5 utoa::@2/(byte) 4 utoa::@3/(byte) 6 utoa::@4/(byte) $10 )
[329] (word*) utoa::digit_values#8 ← phi( utoa/(const word*) RADIX_DECIMAL_VALUES utoa::@2/(const word*) RADIX_HEXADECIMAL_VALUES utoa::@3/(const word*) RADIX_OCTAL_VALUES utoa::@4/(const word*) RADIX_BINARY_VALUES )
[329] (byte) utoa::max_digits#7 ← phi( utoa/(byte) 5 utoa::@2/(byte) 4 utoa::@3/(byte) 6 utoa::@4/(byte) $10 )
to:utoa::@6
utoa::@6: scope:[utoa] from utoa::@1 utoa::@9
[327] (byte*) utoa::buffer#10 ← phi( utoa::@9/(byte*) utoa::buffer#15 utoa::@1/(byte*) utoa::buffer#11 )
[327] (byte) utoa::started#2 ← phi( utoa::@9/(byte) utoa::started#4 utoa::@1/(byte) 0 )
[327] (word) utoa::value#3 ← phi( utoa::@9/(word) utoa::value#7 utoa::@1/(word) utoa::value#10 )
[327] (byte) utoa::digit#2 ← phi( utoa::@9/(byte) utoa::digit#1 utoa::@1/(byte) 0 )
[328] (byte~) utoa::$4 ← (byte) utoa::max_digits#7 - (byte) 1
[329] if((byte) utoa::digit#2<(byte~) utoa::$4) goto utoa::@7
[330] (byte*) utoa::buffer#10 ← phi( utoa::@9/(byte*) utoa::buffer#15 utoa::@1/(byte*) utoa::buffer#11 )
[330] (byte) utoa::started#2 ← phi( utoa::@9/(byte) utoa::started#4 utoa::@1/(byte) 0 )
[330] (word) utoa::value#3 ← phi( utoa::@9/(word) utoa::value#7 utoa::@1/(word) utoa::value#10 )
[330] (byte) utoa::digit#2 ← phi( utoa::@9/(byte) utoa::digit#1 utoa::@1/(byte) 0 )
[331] (byte~) utoa::$4 ← (byte) utoa::max_digits#7 - (byte) 1
[332] if((byte) utoa::digit#2<(byte~) utoa::$4) goto utoa::@7
to:utoa::@8
utoa::@8: scope:[utoa] from utoa::@6
[330] (byte~) utoa::$11 ← (byte)(word) utoa::value#3
[331] *((byte*) utoa::buffer#10) ← *((const byte*) DIGITS + (byte~) utoa::$11)
[332] (byte*) utoa::buffer#3 ← ++ (byte*) utoa::buffer#10
[333] *((byte*) utoa::buffer#3) ← (byte) 0
[333] (byte~) utoa::$11 ← (byte)(word) utoa::value#3
[334] *((byte*) utoa::buffer#10) ← *((const byte*) DIGITS + (byte~) utoa::$11)
[335] (byte*) utoa::buffer#3 ← ++ (byte*) utoa::buffer#10
[336] *((byte*) utoa::buffer#3) ← (byte) 0
to:utoa::@return
utoa::@7: scope:[utoa] from utoa::@6
[334] (byte~) utoa::$10 ← (byte) utoa::digit#2 << (byte) 1
[335] (word) utoa::digit_value#0 ← *((word*) utoa::digit_values#8 + (byte~) utoa::$10)
[336] if((byte) 0!=(byte) utoa::started#2) goto utoa::@10
[337] (byte~) utoa::$10 ← (byte) utoa::digit#2 << (byte) 1
[338] (word) utoa::digit_value#0 ← *((word*) utoa::digit_values#8 + (byte~) utoa::$10)
[339] if((byte) 0!=(byte) utoa::started#2) goto utoa::@10
to:utoa::@12
utoa::@12: scope:[utoa] from utoa::@7
[337] if((word) utoa::value#3>=(word) utoa::digit_value#0) goto utoa::@10
[340] if((word) utoa::value#3>=(word) utoa::digit_value#0) goto utoa::@10
to:utoa::@9
utoa::@9: scope:[utoa] from utoa::@11 utoa::@12
[338] (byte*) utoa::buffer#15 ← phi( utoa::@12/(byte*) utoa::buffer#10 utoa::@11/(byte*) utoa::buffer#4 )
[338] (byte) utoa::started#4 ← phi( utoa::@12/(byte) utoa::started#2 utoa::@11/(byte) 1 )
[338] (word) utoa::value#7 ← phi( utoa::@12/(word) utoa::value#3 utoa::@11/(word) utoa::value#0 )
[339] (byte) utoa::digit#1 ← ++ (byte) utoa::digit#2
[341] (byte*) utoa::buffer#15 ← phi( utoa::@12/(byte*) utoa::buffer#10 utoa::@11/(byte*) utoa::buffer#4 )
[341] (byte) utoa::started#4 ← phi( utoa::@12/(byte) utoa::started#2 utoa::@11/(byte) 1 )
[341] (word) utoa::value#7 ← phi( utoa::@12/(word) utoa::value#3 utoa::@11/(word) utoa::value#0 )
[342] (byte) utoa::digit#1 ← ++ (byte) utoa::digit#2
to:utoa::@6
utoa::@10: scope:[utoa] from utoa::@12 utoa::@7
[340] (byte*) utoa_append::buffer#0 ← (byte*) utoa::buffer#10
[341] (word) utoa_append::value#0 ← (word) utoa::value#3
[342] (word) utoa_append::sub#0 ← (word) utoa::digit_value#0
[343] call utoa_append
[344] (word) utoa_append::return#0 ← (word) utoa_append::value#2
[343] (byte*) utoa_append::buffer#0 ← (byte*) utoa::buffer#10
[344] (word) utoa_append::value#0 ← (word) utoa::value#3
[345] (word) utoa_append::sub#0 ← (word) utoa::digit_value#0
[346] call utoa_append
[347] (word) utoa_append::return#0 ← (word) utoa_append::value#2
to:utoa::@11
utoa::@11: scope:[utoa] from utoa::@10
[345] (word) utoa::value#0 ← (word) utoa_append::return#0
[346] (byte*) utoa::buffer#4 ← ++ (byte*) utoa::buffer#10
[348] (word) utoa::value#0 ← (word) utoa_append::return#0
[349] (byte*) utoa::buffer#4 ← ++ (byte*) utoa::buffer#10
to:utoa::@9
(word()) utoa_append((byte*) utoa_append::buffer , (word) utoa_append::value , (word) utoa_append::sub)
utoa_append: scope:[utoa_append] from utoa::@10
[347] phi()
[350] phi()
to:utoa_append::@1
utoa_append::@1: scope:[utoa_append] from utoa_append utoa_append::@2
[348] (byte) utoa_append::digit#2 ← phi( utoa_append/(byte) 0 utoa_append::@2/(byte) utoa_append::digit#1 )
[348] (word) utoa_append::value#2 ← phi( utoa_append/(word) utoa_append::value#0 utoa_append::@2/(word) utoa_append::value#1 )
[349] if((word) utoa_append::value#2>=(word) utoa_append::sub#0) goto utoa_append::@2
[351] (byte) utoa_append::digit#2 ← phi( utoa_append/(byte) 0 utoa_append::@2/(byte) utoa_append::digit#1 )
[351] (word) utoa_append::value#2 ← phi( utoa_append/(word) utoa_append::value#0 utoa_append::@2/(word) utoa_append::value#1 )
[352] if((word) utoa_append::value#2>=(word) utoa_append::sub#0) goto utoa_append::@2
to:utoa_append::@3
utoa_append::@3: scope:[utoa_append] from utoa_append::@1
[350] *((byte*) utoa_append::buffer#0) ← *((const byte*) DIGITS + (byte) utoa_append::digit#2)
[353] *((byte*) utoa_append::buffer#0) ← *((const byte*) DIGITS + (byte) utoa_append::digit#2)
to:utoa_append::@return
utoa_append::@return: scope:[utoa_append] from utoa_append::@3
[351] return
[354] return
to:@return
utoa_append::@2: scope:[utoa_append] from utoa_append::@1
[352] (byte) utoa_append::digit#1 ← ++ (byte) utoa_append::digit#2
[353] (word) utoa_append::value#1 ← (word) utoa_append::value#2 - (word) utoa_append::sub#0
[355] (byte) utoa_append::digit#1 ← ++ (byte) utoa_append::digit#2
[356] (word) utoa_append::value#1 ← (word) utoa_append::value#2 - (word) utoa_append::sub#0
to:utoa_append::@1
(void()) printf_sint((signed word) printf_sint::value , (byte) printf_sint::format_min_length , (byte) printf_sint::format_justify_left , (byte) printf_sint::format_sign_always , (byte) printf_sint::format_zero_padding , (byte) printf_sint::format_upper_case , (byte) printf_sint::format_radix)
printf_sint: scope:[printf_sint] from main::@23 main::@25 main::@27 main::@29 main::@33 main::@35 main::@37 main::@39 main::@43 main::@45 main::@47 main::@49 main::@53 main::@55 main::@57 main::@59
[354] (byte) printf_sint::format_zero_padding#16 ← phi( main::@23/(byte) 0 main::@25/(byte) 0 main::@27/(byte) 0 main::@29/(byte) 0 main::@33/(byte) 0 main::@35/(byte) 0 main::@37/(byte) 0 main::@39/(byte) 0 main::@43/(byte) 0 main::@45/(byte) 0 main::@47/(byte) 0 main::@49/(byte) 0 main::@53/(byte) 1 main::@55/(byte) 1 main::@57/(byte) 1 main::@59/(byte) 0 )
[354] (byte) printf_sint::format_justify_left#16 ← phi( main::@23/(byte) 0 main::@25/(byte) 0 main::@27/(byte) 0 main::@29/(byte) 0 main::@33/(byte) 1 main::@35/(byte) 1 main::@37/(byte) 1 main::@39/(byte) 1 main::@43/(byte) 0 main::@45/(byte) 0 main::@47/(byte) 0 main::@49/(byte) 0 main::@53/(byte) 0 main::@55/(byte) 0 main::@57/(byte) 0 main::@59/(byte) 0 )
[354] (byte) printf_sint::format_sign_always#16 ← phi( main::@23/(byte) 0 main::@25/(byte) 0 main::@27/(byte) 0 main::@29/(byte) 0 main::@33/(byte) 0 main::@35/(byte) 0 main::@37/(byte) 0 main::@39/(byte) 0 main::@43/(byte) 1 main::@45/(byte) 1 main::@47/(byte) 1 main::@49/(byte) 1 main::@53/(byte) 0 main::@55/(byte) 0 main::@57/(byte) 0 main::@59/(byte) 0 )
[354] (signed word) printf_sint::value#17 ← phi( main::@23/(signed byte) 1 main::@25/(signed byte) $b main::@27/(signed byte) $6f main::@29/(signed word) $457 main::@33/(signed byte) -2 main::@35/(signed byte) -$16 main::@37/(signed word) -$de main::@39/(signed word) -$8ae main::@43/(signed byte) 3 main::@45/(signed byte) -$2c main::@47/(signed word) $22b main::@49/(signed word) -$1a0a main::@53/(signed byte) 1 main::@55/(signed byte) $b main::@57/(signed byte) $6f main::@59/(signed word) $457 )
[355] *((byte*)&(struct printf_buffer_number) printf_buffer) ← (byte) 0
[356] if((signed word) printf_sint::value#17<(signed byte) 0) goto printf_sint::@1
[357] (byte) printf_sint::format_zero_padding#16 ← phi( main::@23/(byte) 0 main::@25/(byte) 0 main::@27/(byte) 0 main::@29/(byte) 0 main::@33/(byte) 0 main::@35/(byte) 0 main::@37/(byte) 0 main::@39/(byte) 0 main::@43/(byte) 0 main::@45/(byte) 0 main::@47/(byte) 0 main::@49/(byte) 0 main::@53/(byte) 1 main::@55/(byte) 1 main::@57/(byte) 1 main::@59/(byte) 0 )
[357] (byte) printf_sint::format_justify_left#16 ← phi( main::@23/(byte) 0 main::@25/(byte) 0 main::@27/(byte) 0 main::@29/(byte) 0 main::@33/(byte) 1 main::@35/(byte) 1 main::@37/(byte) 1 main::@39/(byte) 1 main::@43/(byte) 0 main::@45/(byte) 0 main::@47/(byte) 0 main::@49/(byte) 0 main::@53/(byte) 0 main::@55/(byte) 0 main::@57/(byte) 0 main::@59/(byte) 0 )
[357] (byte) printf_sint::format_sign_always#16 ← phi( main::@23/(byte) 0 main::@25/(byte) 0 main::@27/(byte) 0 main::@29/(byte) 0 main::@33/(byte) 0 main::@35/(byte) 0 main::@37/(byte) 0 main::@39/(byte) 0 main::@43/(byte) 1 main::@45/(byte) 1 main::@47/(byte) 1 main::@49/(byte) 1 main::@53/(byte) 0 main::@55/(byte) 0 main::@57/(byte) 0 main::@59/(byte) 0 )
[357] (signed word) printf_sint::value#17 ← phi( main::@23/(signed byte) 1 main::@25/(signed byte) $b main::@27/(signed byte) $6f main::@29/(signed word) $457 main::@33/(signed byte) -2 main::@35/(signed byte) -$16 main::@37/(signed word) -$de main::@39/(signed word) -$8ae main::@43/(signed byte) 3 main::@45/(signed byte) -$2c main::@47/(signed word) $22b main::@49/(signed word) -$1a0a main::@53/(signed byte) 1 main::@55/(signed byte) $b main::@57/(signed byte) $6f main::@59/(signed word) $457 )
[358] *((byte*)&(struct printf_buffer_number) printf_buffer) ← (byte) 0
[359] if((signed word) printf_sint::value#17<(signed byte) 0) goto printf_sint::@1
to:printf_sint::@3
printf_sint::@3: scope:[printf_sint] from printf_sint
[357] if((byte) 0==(byte) printf_sint::format_sign_always#16) goto printf_sint::@2
[360] if((byte) 0==(byte) printf_sint::format_sign_always#16) goto printf_sint::@2
to:printf_sint::@4
printf_sint::@4: scope:[printf_sint] from printf_sint::@3
[358] *((byte*)&(struct printf_buffer_number) printf_buffer) ← (byte) '+'
[361] *((byte*)&(struct printf_buffer_number) printf_buffer) ← (byte) '+'
to:printf_sint::@2
printf_sint::@2: scope:[printf_sint] from printf_sint::@1 printf_sint::@3 printf_sint::@4
[359] (signed word) printf_sint::value#19 ← phi( printf_sint::@1/(signed word) printf_sint::value#0 printf_sint::@3/(signed word) printf_sint::value#17 printf_sint::@4/(signed word) printf_sint::value#17 )
[360] (word) utoa::value#1 ← (word)(signed word) printf_sint::value#19
[361] call utoa
[362] (signed word) printf_sint::value#19 ← phi( printf_sint::@1/(signed word) printf_sint::value#0 printf_sint::@3/(signed word) printf_sint::value#17 printf_sint::@4/(signed word) printf_sint::value#17 )
[363] (word) utoa::value#1 ← (word)(signed word) printf_sint::value#19
[364] call utoa
to:printf_sint::@5
printf_sint::@5: scope:[printf_sint] from printf_sint::@2
[362] (byte) printf_number_buffer::buffer_sign#0 ← *((byte*)&(struct printf_buffer_number) printf_buffer)
[363] (byte) printf_number_buffer::format_justify_left#0 ← (byte) printf_sint::format_justify_left#16
[364] (byte) printf_number_buffer::format_zero_padding#0 ← (byte) printf_sint::format_zero_padding#16
[365] call printf_number_buffer
[365] (byte) printf_number_buffer::buffer_sign#0 ← *((byte*)&(struct printf_buffer_number) printf_buffer)
[366] (byte) printf_number_buffer::format_justify_left#0 ← (byte) printf_sint::format_justify_left#16
[367] (byte) printf_number_buffer::format_zero_padding#0 ← (byte) printf_sint::format_zero_padding#16
[368] call printf_number_buffer
to:printf_sint::@return
printf_sint::@return: scope:[printf_sint] from printf_sint::@5
[366] return
[369] return
to:@return
printf_sint::@1: scope:[printf_sint] from printf_sint
[367] (signed word) printf_sint::value#0 ← - (signed word) printf_sint::value#17
[368] *((byte*)&(struct printf_buffer_number) printf_buffer) ← (byte) '-'
[370] (signed word) printf_sint::value#0 ← - (signed word) printf_sint::value#17
[371] *((byte*)&(struct printf_buffer_number) printf_buffer) ← (byte) '-'
to:printf_sint::@2
(void()) printf_string((byte*) printf_string::str , (byte) printf_string::format_min_length , (byte) printf_string::format_justify_left)
printf_string: scope:[printf_string] from main::@13 main::@15 main::@17 main::@19 main::@3 main::@5 main::@7 main::@9
[369] (byte*) printf_string::str#10 ← phi( main::@13/(const byte*) main::str1 main::@15/(const byte*) main::str3 main::@17/(const byte*) main::str5 main::@19/(const byte*) main::str7 main::@3/(const byte*) main::str1 main::@5/(const byte*) main::str3 main::@7/(const byte*) main::str5 main::@9/(const byte*) main::str7 )
[369] (byte) printf_string::format_justify_left#10 ← phi( main::@13/(byte) 1 main::@15/(byte) 1 main::@17/(byte) 1 main::@19/(byte) 1 main::@3/(byte) 0 main::@5/(byte) 0 main::@7/(byte) 0 main::@9/(byte) 0 )
[372] (byte*) printf_string::str#10 ← phi( main::@13/(const byte*) main::str1 main::@15/(const byte*) main::str3 main::@17/(const byte*) main::str5 main::@19/(const byte*) main::str7 main::@3/(const byte*) main::str1 main::@5/(const byte*) main::str3 main::@7/(const byte*) main::str5 main::@9/(const byte*) main::str7 )
[372] (byte) printf_string::format_justify_left#10 ← phi( main::@13/(byte) 1 main::@15/(byte) 1 main::@17/(byte) 1 main::@19/(byte) 1 main::@3/(byte) 0 main::@5/(byte) 0 main::@7/(byte) 0 main::@9/(byte) 0 )
to:printf_string::@3
printf_string::@3: scope:[printf_string] from printf_string
[370] (byte*) strlen::str#2 ← (byte*) printf_string::str#10
[371] call strlen
[372] (word) strlen::return#3 ← (word) strlen::len#2
[373] (byte*) strlen::str#2 ← (byte*) printf_string::str#10
[374] call strlen
[375] (word) strlen::return#3 ← (word) strlen::len#2
to:printf_string::@6
printf_string::@6: scope:[printf_string] from printf_string::@3
[373] (word~) printf_string::$9 ← (word) strlen::return#3
[374] (signed byte) printf_string::len#0 ← (signed byte)(word~) printf_string::$9
[375] (signed byte) printf_string::padding#1 ← (signed byte) 3 - (signed byte) printf_string::len#0
[376] if((signed byte) printf_string::padding#1>=(signed byte) 0) goto printf_string::@10
[376] (word~) printf_string::$9 ← (word) strlen::return#3
[377] (signed byte) printf_string::len#0 ← (signed byte)(word~) printf_string::$9
[378] (signed byte) printf_string::padding#1 ← (signed byte) 3 - (signed byte) printf_string::len#0
[379] if((signed byte) printf_string::padding#1>=(signed byte) 0) goto printf_string::@10
to:printf_string::@1
printf_string::@10: scope:[printf_string] from printf_string::@6
[377] phi()
[380] phi()
to:printf_string::@1
printf_string::@1: scope:[printf_string] from printf_string::@10 printf_string::@6
[378] (signed byte) printf_string::padding#3 ← phi( printf_string::@6/(signed byte) 0 printf_string::@10/(signed byte) printf_string::padding#1 )
[379] if((byte) 0!=(byte) printf_string::format_justify_left#10) goto printf_string::@2
[381] (signed byte) printf_string::padding#3 ← phi( printf_string::@6/(signed byte) 0 printf_string::@10/(signed byte) printf_string::padding#1 )
[382] if((byte) 0!=(byte) printf_string::format_justify_left#10) goto printf_string::@2
to:printf_string::@8
printf_string::@8: scope:[printf_string] from printf_string::@1
[380] if((signed byte) 0!=(signed byte) printf_string::padding#3) goto printf_string::@4
[383] if((signed byte) 0!=(signed byte) printf_string::padding#3) goto printf_string::@4
to:printf_string::@2
printf_string::@4: scope:[printf_string] from printf_string::@8
[381] (byte) printf_padding::length#3 ← (byte)(signed byte) printf_string::padding#3
[382] call printf_padding
[384] (byte) printf_padding::length#3 ← (byte)(signed byte) printf_string::padding#3
[385] call printf_padding
to:printf_string::@2
printf_string::@2: scope:[printf_string] from printf_string::@1 printf_string::@4 printf_string::@8
[383] (byte*) printf_str::str#2 ← (byte*) printf_string::str#10
[384] call printf_str
[386] (byte*) printf_str::str#2 ← (byte*) printf_string::str#10
[387] call printf_str
to:printf_string::@7
printf_string::@7: scope:[printf_string] from printf_string::@2
[385] if((byte) 0==(byte) printf_string::format_justify_left#10) goto printf_string::@return
[388] if((byte) 0==(byte) printf_string::format_justify_left#10) goto printf_string::@return
to:printf_string::@9
printf_string::@9: scope:[printf_string] from printf_string::@7
[386] if((signed byte) 0!=(signed byte) printf_string::padding#3) goto printf_string::@5
[389] if((signed byte) 0!=(signed byte) printf_string::padding#3) goto printf_string::@5
to:printf_string::@return
printf_string::@5: scope:[printf_string] from printf_string::@9
[387] (byte) printf_padding::length#4 ← (byte)(signed byte) printf_string::padding#3
[388] call printf_padding
[390] (byte) printf_padding::length#4 ← (byte)(signed byte) printf_string::padding#3
[391] call printf_padding
to:printf_string::@return
printf_string::@return: scope:[printf_string] from printf_string::@5 printf_string::@7 printf_string::@9
[389] return
[392] return
to:@return
(void()) printf_cls()
printf_cls: scope:[printf_cls] from main
[390] phi()
[391] call memset
[393] phi()
[394] call memset
to:printf_cls::@1
printf_cls::@1: scope:[printf_cls] from printf_cls
[392] (byte*) printf_cursor_ptr ← (byte*) 1024
[393] (byte) printf_cursor_x ← (byte) 0
[394] (byte) printf_cursor_y ← (byte) 0
[395] (byte*) printf_cursor_ptr ← (byte*) 1024
[396] (byte) printf_cursor_x ← (byte) 0
[397] (byte) printf_cursor_y ← (byte) 0
to:printf_cls::@return
printf_cls::@return: scope:[printf_cls] from printf_cls::@1
[395] return
[398] return
to:@return

File diff suppressed because one or more lines are too long

View File

@ -132,16 +132,16 @@
(void*) memcpy::destination
(const void*) memcpy::destination#0 destination = (void*) 1024
(byte*) memcpy::dst
(byte*) memcpy::dst#1 dst zp[2]:9 1.000000001E9
(byte*) memcpy::dst#2 dst zp[2]:9 1.000000001E9
(byte*) memcpy::dst#1 dst zp[2]:9 1.0000000001E10
(byte*) memcpy::dst#2 dst zp[2]:9 1.0000000001E10
(word) memcpy::num
(const word) memcpy::num#0 num = (word)(number) $28*(number) $19-(number) $28
(void*) memcpy::return
(void*) memcpy::source
(const void*) memcpy::source#0 source = (void*)(number) $400+(number) $28
(byte*) memcpy::src
(byte*) memcpy::src#1 src zp[2]:12 2.000000002E9
(byte*) memcpy::src#2 src zp[2]:12 1.000000001E9
(byte*) memcpy::src#1 src zp[2]:12 2.0000000002E10
(byte*) memcpy::src#2 src zp[2]:12 1.0000000001E10
(byte*) memcpy::src_end
(const byte*) memcpy::src_end#0 src_end = (byte*)(const void*) memcpy::source#0+(const word) memcpy::num#0
(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num)
@ -150,15 +150,15 @@
(label) memset::@3
(label) memset::@return
(byte) memset::c
(byte) memset::c#4 reg byte x 1.25000000125E8
(byte) memset::c#4 reg byte x 1.250000000125E9
(byte*) memset::dst
(byte*) memset::dst#1 dst zp[2]:9 2.000000002E9
(byte*) memset::dst#2 dst zp[2]:9 1.3366666683333335E9
(byte*) memset::dst#4 dst zp[2]:9 2.0000002E7
(byte*) memset::dst#1 dst zp[2]:9 2.0000000002E10
(byte*) memset::dst#2 dst zp[2]:9 1.3366666668333332E10
(byte*) memset::dst#4 dst zp[2]:9 2.00000002E8
(byte*) memset::end
(byte*) memset::end#0 end zp[2]:12 1.683333336666667E8
(byte*) memset::end#0 end zp[2]:12 1.6833333336666665E9
(word) memset::num
(word) memset::num#2 num zp[2]:12 1.0000001E7
(word) memset::num#2 num zp[2]:12 1.00000001E8
(void*) memset::return
(void*) memset::str
(void*) memset::str#3 str zp[2]:9
@ -166,11 +166,7 @@
(const byte*) printf_buffer_number::digits[(number) $b] = { fill( $b, 0) }
(byte) printf_buffer_number::sign
(void()) printf_char((byte) printf_char::ch)
(byte*~) printf_char::$6 zp[2]:18 2000002.0
(label) printf_char::@1
(label) printf_char::@2
(label) printf_char::@3
(label) printf_char::@4
(label) printf_char::@return
(byte) printf_char::ch
(byte) printf_char::ch#0 reg byte a 200002.0
@ -180,9 +176,9 @@
(void()) printf_cls()
(label) printf_cls::@1
(label) printf_cls::@return
(byte*) printf_cursor_ptr loadstore zp[2]:18 23102.67326732673
(byte) printf_cursor_x loadstore zp[1]:16 19867.910596026493
(byte) printf_cursor_y loadstore zp[1]:17 23026.677631578947
(byte*) printf_cursor_ptr loadstore zp[2]:18 81699.70588235292
(byte) printf_cursor_x loadstore zp[1]:16 20270.638513513513
(byte) printf_cursor_y loadstore zp[1]:17 110749.54397394137
(byte) printf_format_number::justify_left
(byte) printf_format_number::min_length
(byte) printf_format_number::radix
@ -264,6 +260,12 @@
(byte) printf_padding::length#6 length zp[1]:5 17201.0
(byte) printf_padding::pad
(byte) printf_padding::pad#7 pad zp[1]:6 16666.833333333332
(void()) printf_scroll()
(byte*~) printf_scroll::$4 zp[2]:18 2.0000002E7
(label) printf_scroll::@1
(label) printf_scroll::@2
(label) printf_scroll::@3
(label) printf_scroll::@return
(void()) printf_sint((signed word) printf_sint::value , (byte) printf_sint::format_min_length , (byte) printf_sint::format_justify_left , (byte) printf_sint::format_sign_always , (byte) printf_sint::format_zero_padding , (byte) printf_sint::format_upper_case , (byte) printf_sint::format_radix)
(label) printf_sint::@1
(label) printf_sint::@2
@ -445,8 +447,8 @@
(word) utoa_append::value#1 value zp[2]:2 2.0000002E7
(word) utoa_append::value#2 value zp[2]:2 5018334.166666666
reg byte a [ printf_char::ch#12 printf_char::ch#2 printf_char::ch#0 printf_char::ch#1 ]
reg byte x [ memset::c#4 ]
reg byte a [ printf_char::ch#12 printf_char::ch#2 printf_char::ch#0 printf_char::ch#1 ]
zp[2]:2 [ printf_uint::uvalue#12 utoa::value#3 utoa::value#7 utoa::value#10 utoa::value#1 utoa::value#2 utoa::value#0 utoa_append::value#2 utoa_append::value#0 utoa_append::value#1 utoa_append::return#0 printf_sint::value#19 printf_sint::value#0 printf_sint::value#17 printf_str::str#48 printf_str::str#50 printf_str::str#1 printf_str::str#2 printf_str::str#0 printf_number_buffer::buffer_digits#10 printf_string::str#10 ]
reg byte x [ printf_uint::format_radix#12 ]
zp[1]:4 [ printf_number_buffer::format_zero_padding#10 printf_number_buffer::format_zero_padding#0 printf_sint::format_zero_padding#16 ]
@ -467,7 +469,7 @@ zp[1]:14 [ printf_string::format_justify_left#10 printf_uint::format_upper_case#
zp[1]:15 [ printf_string::padding#3 printf_string::padding#1 printf_number_buffer::format_justify_left#10 printf_number_buffer::format_justify_left#0 printf_sint::format_justify_left#16 ]
zp[1]:16 [ printf_cursor_x ]
zp[1]:17 [ printf_cursor_y ]
zp[2]:18 [ printf_cursor_ptr printf_char::$6 printf_ln::$0 printf_ln::$1 ]
zp[2]:18 [ printf_cursor_ptr printf_scroll::$4 printf_ln::$0 printf_ln::$1 ]
reg byte a [ printf_str::ch#0 ]
reg byte a [ toupper::return#3 ]
reg byte a [ strupr::$0 ]

View File

@ -125,32 +125,14 @@ printf_ln: {
sta.z printf_cursor_x
// printf_cursor_y++;
inc.z printf_cursor_y
// printf_scroll()
jsr printf_scroll
// }
rts
}
// Print a single char
// If the end of the screen is reached scroll it up one char and place the cursor at the
// printf_char(byte register(A) ch)
printf_char: {
.label __6 = $c
// *(printf_cursor_ptr++) = ch
ldy #0
sta (printf_cursor_ptr),y
// *(printf_cursor_ptr++) = ch;
inc.z printf_cursor_ptr
bne !+
inc.z printf_cursor_ptr+1
!:
// if(++printf_cursor_x==PRINTF_SCREEN_WIDTH)
inc.z printf_cursor_x
lda #$28
cmp.z printf_cursor_x
bne __breturn
// printf_cursor_x = 0
lda #0
sta.z printf_cursor_x
// ++printf_cursor_y;
inc.z printf_cursor_y
// Scroll the entire screen if the cursor is on the last line
printf_scroll: {
.label __4 = $c
// if(printf_cursor_y==PRINTF_SCREEN_HEIGHT)
lda #$19
cmp.z printf_cursor_y
@ -169,13 +151,13 @@ printf_char: {
sta.z memset.num+1
jsr memset
// printf_cursor_ptr-PRINTF_SCREEN_WIDTH
lda.z __6
lda.z __4
sec
sbc #<$28
sta.z __6
lda.z __6+1
sta.z __4
lda.z __4+1
sbc #>$28
sta.z __6+1
sta.z __4+1
// printf_cursor_ptr = printf_cursor_ptr-PRINTF_SCREEN_WIDTH
// printf_cursor_y--;
dec.z printf_cursor_y
@ -270,6 +252,34 @@ memcpy: {
!:
jmp __b1
}
// Print a single char
// If the end of the screen is reached scroll it up one char and place the cursor at the
// printf_char(byte register(A) ch)
printf_char: {
// *(printf_cursor_ptr++) = ch
ldy #0
sta (printf_cursor_ptr),y
// *(printf_cursor_ptr++) = ch;
inc.z printf_cursor_ptr
bne !+
inc.z printf_cursor_ptr+1
!:
// if(++printf_cursor_x==PRINTF_SCREEN_WIDTH)
inc.z printf_cursor_x
lda #$28
cmp.z printf_cursor_x
bne __breturn
// printf_cursor_x = 0
lda #0
sta.z printf_cursor_x
// ++printf_cursor_y;
inc.z printf_cursor_y
// printf_scroll()
jsr printf_scroll
__breturn:
// }
rts
}
// Converts unsigned number value to a string representing it in RADIX format.
// If the leading digits are zero they are not included in the string.
// - value : The number to be converted to RADIX

View File

@ -96,156 +96,165 @@ printf_ln: scope:[printf_ln] from printf_str::@4
[38] (byte*) printf_cursor_ptr ← (byte*~) printf_ln::$1
[39] (byte) printf_cursor_x ← (byte) 0
[40] (byte) printf_cursor_y ← ++ (byte) printf_cursor_y
[41] call printf_scroll
to:printf_ln::@return
printf_ln::@return: scope:[printf_ln] from printf_ln
[41] return
[42] return
to:@return
(void()) printf_char((byte) printf_char::ch)
printf_char: scope:[printf_char] from printf_number_buffer::@3 printf_str::@5
[42] (byte) printf_char::ch#3 ← phi( printf_number_buffer::@3/(byte) printf_char::ch#2 printf_str::@5/(byte) printf_char::ch#1 )
[43] *((byte*) printf_cursor_ptr) ← (byte) printf_char::ch#3
[44] (byte*) printf_cursor_ptr ← ++ (byte*) printf_cursor_ptr
[45] (byte) printf_cursor_x ← ++ (byte) printf_cursor_x
[46] if((byte) printf_cursor_x!=(byte) $28) goto printf_char::@return
to:printf_char::@1
printf_char::@1: scope:[printf_char] from printf_char
[47] (byte) printf_cursor_x ← (byte) 0
[48] (byte) printf_cursor_y ← ++ (byte) printf_cursor_y
[49] if((byte) printf_cursor_y!=(byte) $19) goto printf_char::@return
to:printf_char::@2
printf_char::@2: scope:[printf_char] from printf_char::@1
[50] phi()
[51] call memcpy
to:printf_char::@3
printf_char::@3: scope:[printf_char] from printf_char::@2
[52] phi()
[53] call memset
to:printf_char::@4
printf_char::@4: scope:[printf_char] from printf_char::@3
[54] (byte*~) printf_char::$6 ← (byte*) printf_cursor_ptr - (byte) $28
[55] (byte*) printf_cursor_ptr ← (byte*~) printf_char::$6
[56] (byte) printf_cursor_y ← -- (byte) printf_cursor_y
to:printf_char::@return
printf_char::@return: scope:[printf_char] from printf_char printf_char::@1 printf_char::@4
[57] return
(void()) printf_scroll()
printf_scroll: scope:[printf_scroll] from printf_char::@1 printf_ln
[43] if((byte) printf_cursor_y!=(byte) $19) goto printf_scroll::@return
to:printf_scroll::@1
printf_scroll::@1: scope:[printf_scroll] from printf_scroll
[44] phi()
[45] call memcpy
to:printf_scroll::@2
printf_scroll::@2: scope:[printf_scroll] from printf_scroll::@1
[46] phi()
[47] call memset
to:printf_scroll::@3
printf_scroll::@3: scope:[printf_scroll] from printf_scroll::@2
[48] (byte*~) printf_scroll::$4 ← (byte*) printf_cursor_ptr - (byte) $28
[49] (byte*) printf_cursor_ptr ← (byte*~) printf_scroll::$4
[50] (byte) printf_cursor_y ← -- (byte) printf_cursor_y
to:printf_scroll::@return
printf_scroll::@return: scope:[printf_scroll] from printf_scroll printf_scroll::@3
[51] return
to:@return
(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num)
memset: scope:[memset] from printf_char::@3 printf_cls
[58] (byte) memset::c#4 ← phi( printf_char::@3/(byte) ' ' printf_cls/(byte) ' ' )
[58] (void*) memset::str#3 ← phi( printf_char::@3/(void*)(number) $400+(number) $28*(number) $19-(number) $28 printf_cls/(void*) 1024 )
[58] (word) memset::num#2 ← phi( printf_char::@3/(byte) $28 printf_cls/(word)(number) $28*(number) $19 )
[59] if((word) memset::num#2<=(byte) 0) goto memset::@return
memset: scope:[memset] from printf_cls printf_scroll::@2
[52] (byte) memset::c#4 ← phi( printf_cls/(byte) ' ' printf_scroll::@2/(byte) ' ' )
[52] (void*) memset::str#3 ← phi( printf_cls/(void*) 1024 printf_scroll::@2/(void*)(number) $400+(number) $28*(number) $19-(number) $28 )
[52] (word) memset::num#2 ← phi( printf_cls/(word)(number) $28*(number) $19 printf_scroll::@2/(byte) $28 )
[53] if((word) memset::num#2<=(byte) 0) goto memset::@return
to:memset::@1
memset::@1: scope:[memset] from memset
[60] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) memset::num#2
[61] (byte*) memset::dst#4 ← (byte*)(void*) memset::str#3
[54] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) memset::num#2
[55] (byte*) memset::dst#4 ← (byte*)(void*) memset::str#3
to:memset::@2
memset::@2: scope:[memset] from memset::@1 memset::@3
[62] (byte*) memset::dst#2 ← phi( memset::@1/(byte*) memset::dst#4 memset::@3/(byte*) memset::dst#1 )
[63] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@3
[56] (byte*) memset::dst#2 ← phi( memset::@1/(byte*) memset::dst#4 memset::@3/(byte*) memset::dst#1 )
[57] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@3
to:memset::@return
memset::@return: scope:[memset] from memset memset::@2
[64] return
[58] return
to:@return
memset::@3: scope:[memset] from memset::@2
[65] *((byte*) memset::dst#2) ← (byte) memset::c#4
[66] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2
[59] *((byte*) memset::dst#2) ← (byte) memset::c#4
[60] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2
to:memset::@2
(void*()) memcpy((void*) memcpy::destination , (void*) memcpy::source , (word) memcpy::num)
memcpy: scope:[memcpy] from printf_char::@2
[67] phi()
memcpy: scope:[memcpy] from printf_scroll::@1
[61] phi()
to:memcpy::@1
memcpy::@1: scope:[memcpy] from memcpy memcpy::@2
[68] (byte*) memcpy::dst#2 ← phi( memcpy/(byte*)(const void*) memcpy::destination#0 memcpy::@2/(byte*) memcpy::dst#1 )
[68] (byte*) memcpy::src#2 ← phi( memcpy/(byte*)(const void*) memcpy::source#0 memcpy::@2/(byte*) memcpy::src#1 )
[69] if((byte*) memcpy::src#2!=(const byte*) memcpy::src_end#0) goto memcpy::@2
[62] (byte*) memcpy::dst#2 ← phi( memcpy/(byte*)(const void*) memcpy::destination#0 memcpy::@2/(byte*) memcpy::dst#1 )
[62] (byte*) memcpy::src#2 ← phi( memcpy/(byte*)(const void*) memcpy::source#0 memcpy::@2/(byte*) memcpy::src#1 )
[63] if((byte*) memcpy::src#2!=(const byte*) memcpy::src_end#0) goto memcpy::@2
to:memcpy::@return
memcpy::@return: scope:[memcpy] from memcpy::@1
[70] return
[64] return
to:@return
memcpy::@2: scope:[memcpy] from memcpy::@1
[71] *((byte*) memcpy::dst#2) ← *((byte*) memcpy::src#2)
[72] (byte*) memcpy::dst#1 ← ++ (byte*) memcpy::dst#2
[73] (byte*) memcpy::src#1 ← ++ (byte*) memcpy::src#2
[65] *((byte*) memcpy::dst#2) ← *((byte*) memcpy::src#2)
[66] (byte*) memcpy::dst#1 ← ++ (byte*) memcpy::dst#2
[67] (byte*) memcpy::src#1 ← ++ (byte*) memcpy::src#2
to:memcpy::@1
(void()) printf_char((byte) printf_char::ch)
printf_char: scope:[printf_char] from printf_number_buffer::@3 printf_str::@5
[68] (byte) printf_char::ch#3 ← phi( printf_number_buffer::@3/(byte) printf_char::ch#2 printf_str::@5/(byte) printf_char::ch#1 )
[69] *((byte*) printf_cursor_ptr) ← (byte) printf_char::ch#3
[70] (byte*) printf_cursor_ptr ← ++ (byte*) printf_cursor_ptr
[71] (byte) printf_cursor_x ← ++ (byte) printf_cursor_x
[72] if((byte) printf_cursor_x!=(byte) $28) goto printf_char::@return
to:printf_char::@1
printf_char::@1: scope:[printf_char] from printf_char
[73] (byte) printf_cursor_x ← (byte) 0
[74] (byte) printf_cursor_y ← ++ (byte) printf_cursor_y
[75] call printf_scroll
to:printf_char::@return
printf_char::@return: scope:[printf_char] from printf_char printf_char::@1
[76] return
to:@return
(void()) uctoa((byte) uctoa::value , (byte*) uctoa::buffer , (byte) uctoa::radix)
uctoa: scope:[uctoa] from printf_uchar::@1
[74] phi()
[77] phi()
to:uctoa::@1
uctoa::@1: scope:[uctoa] from uctoa uctoa::@4
[75] (byte*) uctoa::buffer#11 ← phi( uctoa::@4/(byte*) uctoa::buffer#14 uctoa/(byte*)&(struct printf_buffer_number) printf_buffer+(const byte) OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS )
[75] (byte) uctoa::started#2 ← phi( uctoa::@4/(byte) uctoa::started#4 uctoa/(byte) 0 )
[75] (byte) uctoa::value#2 ← phi( uctoa::@4/(byte) uctoa::value#6 uctoa/(const byte) main::c )
[75] (byte) uctoa::digit#2 ← phi( uctoa::@4/(byte) uctoa::digit#1 uctoa/(byte) 0 )
[76] if((byte) uctoa::digit#2<(const byte) uctoa::max_digits#1-(byte) 1) goto uctoa::@2
[78] (byte*) uctoa::buffer#11 ← phi( uctoa::@4/(byte*) uctoa::buffer#14 uctoa/(byte*)&(struct printf_buffer_number) printf_buffer+(const byte) OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS )
[78] (byte) uctoa::started#2 ← phi( uctoa::@4/(byte) uctoa::started#4 uctoa/(byte) 0 )
[78] (byte) uctoa::value#2 ← phi( uctoa::@4/(byte) uctoa::value#6 uctoa/(const byte) main::c )
[78] (byte) uctoa::digit#2 ← phi( uctoa::@4/(byte) uctoa::digit#1 uctoa/(byte) 0 )
[79] if((byte) uctoa::digit#2<(const byte) uctoa::max_digits#1-(byte) 1) goto uctoa::@2
to:uctoa::@3
uctoa::@3: scope:[uctoa] from uctoa::@1
[77] *((byte*) uctoa::buffer#11) ← *((const byte*) DIGITS + (byte) uctoa::value#2)
[78] (byte*) uctoa::buffer#3 ← ++ (byte*) uctoa::buffer#11
[79] *((byte*) uctoa::buffer#3) ← (byte) 0
[80] *((byte*) uctoa::buffer#11) ← *((const byte*) DIGITS + (byte) uctoa::value#2)
[81] (byte*) uctoa::buffer#3 ← ++ (byte*) uctoa::buffer#11
[82] *((byte*) uctoa::buffer#3) ← (byte) 0
to:uctoa::@return
uctoa::@return: scope:[uctoa] from uctoa::@3
[80] return
[83] return
to:@return
uctoa::@2: scope:[uctoa] from uctoa::@1
[81] (byte) uctoa::digit_value#0 ← *((const byte*) RADIX_DECIMAL_VALUES_CHAR + (byte) uctoa::digit#2)
[82] if((byte) 0!=(byte) uctoa::started#2) goto uctoa::@5
[84] (byte) uctoa::digit_value#0 ← *((const byte*) RADIX_DECIMAL_VALUES_CHAR + (byte) uctoa::digit#2)
[85] if((byte) 0!=(byte) uctoa::started#2) goto uctoa::@5
to:uctoa::@7
uctoa::@7: scope:[uctoa] from uctoa::@2
[83] if((byte) uctoa::value#2>=(byte) uctoa::digit_value#0) goto uctoa::@5
[86] if((byte) uctoa::value#2>=(byte) uctoa::digit_value#0) goto uctoa::@5
to:uctoa::@4
uctoa::@4: scope:[uctoa] from uctoa::@6 uctoa::@7
[84] (byte*) uctoa::buffer#14 ← phi( uctoa::@7/(byte*) uctoa::buffer#11 uctoa::@6/(byte*) uctoa::buffer#4 )
[84] (byte) uctoa::started#4 ← phi( uctoa::@7/(byte) uctoa::started#2 uctoa::@6/(byte) 1 )
[84] (byte) uctoa::value#6 ← phi( uctoa::@7/(byte) uctoa::value#2 uctoa::@6/(byte) uctoa::value#0 )
[85] (byte) uctoa::digit#1 ← ++ (byte) uctoa::digit#2
[87] (byte*) uctoa::buffer#14 ← phi( uctoa::@7/(byte*) uctoa::buffer#11 uctoa::@6/(byte*) uctoa::buffer#4 )
[87] (byte) uctoa::started#4 ← phi( uctoa::@7/(byte) uctoa::started#2 uctoa::@6/(byte) 1 )
[87] (byte) uctoa::value#6 ← phi( uctoa::@7/(byte) uctoa::value#2 uctoa::@6/(byte) uctoa::value#0 )
[88] (byte) uctoa::digit#1 ← ++ (byte) uctoa::digit#2
to:uctoa::@1
uctoa::@5: scope:[uctoa] from uctoa::@2 uctoa::@7
[86] (byte*) uctoa_append::buffer#0 ← (byte*) uctoa::buffer#11
[87] (byte) uctoa_append::value#0 ← (byte) uctoa::value#2
[88] (byte) uctoa_append::sub#0 ← (byte) uctoa::digit_value#0
[89] call uctoa_append
[90] (byte) uctoa_append::return#0 ← (byte) uctoa_append::value#2
[89] (byte*) uctoa_append::buffer#0 ← (byte*) uctoa::buffer#11
[90] (byte) uctoa_append::value#0 ← (byte) uctoa::value#2
[91] (byte) uctoa_append::sub#0 ← (byte) uctoa::digit_value#0
[92] call uctoa_append
[93] (byte) uctoa_append::return#0 ← (byte) uctoa_append::value#2
to:uctoa::@6
uctoa::@6: scope:[uctoa] from uctoa::@5
[91] (byte) uctoa::value#0 ← (byte) uctoa_append::return#0
[92] (byte*) uctoa::buffer#4 ← ++ (byte*) uctoa::buffer#11
[94] (byte) uctoa::value#0 ← (byte) uctoa_append::return#0
[95] (byte*) uctoa::buffer#4 ← ++ (byte*) uctoa::buffer#11
to:uctoa::@4
(byte()) uctoa_append((byte*) uctoa_append::buffer , (byte) uctoa_append::value , (byte) uctoa_append::sub)
uctoa_append: scope:[uctoa_append] from uctoa::@5
[93] phi()
[96] phi()
to:uctoa_append::@1
uctoa_append::@1: scope:[uctoa_append] from uctoa_append uctoa_append::@2
[94] (byte) uctoa_append::digit#2 ← phi( uctoa_append/(byte) 0 uctoa_append::@2/(byte) uctoa_append::digit#1 )
[94] (byte) uctoa_append::value#2 ← phi( uctoa_append/(byte) uctoa_append::value#0 uctoa_append::@2/(byte) uctoa_append::value#1 )
[95] if((byte) uctoa_append::value#2>=(byte) uctoa_append::sub#0) goto uctoa_append::@2
[97] (byte) uctoa_append::digit#2 ← phi( uctoa_append/(byte) 0 uctoa_append::@2/(byte) uctoa_append::digit#1 )
[97] (byte) uctoa_append::value#2 ← phi( uctoa_append/(byte) uctoa_append::value#0 uctoa_append::@2/(byte) uctoa_append::value#1 )
[98] if((byte) uctoa_append::value#2>=(byte) uctoa_append::sub#0) goto uctoa_append::@2
to:uctoa_append::@3
uctoa_append::@3: scope:[uctoa_append] from uctoa_append::@1
[96] *((byte*) uctoa_append::buffer#0) ← *((const byte*) DIGITS + (byte) uctoa_append::digit#2)
[99] *((byte*) uctoa_append::buffer#0) ← *((const byte*) DIGITS + (byte) uctoa_append::digit#2)
to:uctoa_append::@return
uctoa_append::@return: scope:[uctoa_append] from uctoa_append::@3
[97] return
[100] return
to:@return
uctoa_append::@2: scope:[uctoa_append] from uctoa_append::@1
[98] (byte) uctoa_append::digit#1 ← ++ (byte) uctoa_append::digit#2
[99] (byte) uctoa_append::value#1 ← (byte) uctoa_append::value#2 - (byte) uctoa_append::sub#0
[101] (byte) uctoa_append::digit#1 ← ++ (byte) uctoa_append::digit#2
[102] (byte) uctoa_append::value#1 ← (byte) uctoa_append::value#2 - (byte) uctoa_append::sub#0
to:uctoa_append::@1
(void()) printf_cls()
printf_cls: scope:[printf_cls] from main
[100] phi()
[101] call memset
[103] phi()
[104] call memset
to:printf_cls::@1
printf_cls::@1: scope:[printf_cls] from printf_cls
[102] (byte*) printf_cursor_ptr ← (byte*) 1024
[103] (byte) printf_cursor_x ← (byte) 0
[104] (byte) printf_cursor_y ← (byte) 0
[105] (byte*) printf_cursor_ptr ← (byte*) 1024
[106] (byte) printf_cursor_x ← (byte) 0
[107] (byte) printf_cursor_y ← (byte) 0
to:printf_cls::@return
printf_cls::@return: scope:[printf_cls] from printf_cls::@1
[105] return
[108] return
to:@return

File diff suppressed because it is too large Load Diff

View File

@ -21,16 +21,16 @@
(void*) memcpy::destination
(const void*) memcpy::destination#0 destination = (void*) 1024
(byte*) memcpy::dst
(byte*) memcpy::dst#1 dst zp[2]:4 1.000000001E9
(byte*) memcpy::dst#2 dst zp[2]:4 1.000000001E9
(byte*) memcpy::dst#1 dst zp[2]:4 1.0000000001E10
(byte*) memcpy::dst#2 dst zp[2]:4 1.0000000001E10
(word) memcpy::num
(const word) memcpy::num#0 num = (word)(number) $28*(number) $19-(number) $28
(void*) memcpy::return
(void*) memcpy::source
(const void*) memcpy::source#0 source = (void*)(number) $400+(number) $28
(byte*) memcpy::src
(byte*) memcpy::src#1 src zp[2]:2 2.000000002E9
(byte*) memcpy::src#2 src zp[2]:2 1.000000001E9
(byte*) memcpy::src#1 src zp[2]:2 2.0000000002E10
(byte*) memcpy::src#2 src zp[2]:2 1.0000000001E10
(byte*) memcpy::src_end
(const byte*) memcpy::src_end#0 src_end = (byte*)(const void*) memcpy::source#0+(const word) memcpy::num#0
(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num)
@ -39,15 +39,15 @@
(label) memset::@3
(label) memset::@return
(byte) memset::c
(byte) memset::c#4 reg byte x 1.2500000125E7
(byte) memset::c#4 reg byte x 1.25000000125E8
(byte*) memset::dst
(byte*) memset::dst#1 dst zp[2]:4 2.00000002E8
(byte*) memset::dst#2 dst zp[2]:4 1.3666666833333334E8
(byte*) memset::dst#4 dst zp[2]:4 2.0000002E7
(byte*) memset::dst#1 dst zp[2]:4 2.000000002E9
(byte*) memset::dst#2 dst zp[2]:4 1.3666666683333335E9
(byte*) memset::dst#4 dst zp[2]:4 2.00000002E8
(byte*) memset::end
(byte*) memset::end#0 end zp[2]:2 1.8333333666666668E7
(byte*) memset::end#0 end zp[2]:2 1.833333336666667E8
(word) memset::num
(word) memset::num#2 num zp[2]:2 1.0000001E7
(word) memset::num#2 num zp[2]:2 1.00000001E8
(void*) memset::return
(void*) memset::str
(void*) memset::str#3 str zp[2]:4
@ -55,11 +55,7 @@
(const byte*) printf_buffer_number::digits[(number) $b] = { fill( $b, 0) }
(byte) printf_buffer_number::sign
(void()) printf_char((byte) printf_char::ch)
(byte*~) printf_char::$6 zp[2]:12 2000002.0
(label) printf_char::@1
(label) printf_char::@2
(label) printf_char::@3
(label) printf_char::@4
(label) printf_char::@return
(byte) printf_char::ch
(byte) printf_char::ch#1 reg byte a 200002.0
@ -68,9 +64,9 @@
(void()) printf_cls()
(label) printf_cls::@1
(label) printf_cls::@return
(byte*) printf_cursor_ptr loadstore zp[2]:12 159093.4090909091
(byte) printf_cursor_x loadstore zp[1]:10 139537.41860465117
(byte) printf_cursor_y loadstore zp[1]:11 155558.00000000003
(byte*) printf_cursor_ptr loadstore zp[2]:12 531917.2340425533
(byte) printf_cursor_x loadstore zp[1]:10 162165.1081081081
(byte) printf_cursor_y loadstore zp[1]:11 708335.6249999999
(byte) printf_format_number::justify_left
(byte) printf_format_number::min_length
(byte) printf_format_number::radix
@ -102,6 +98,12 @@
(byte) printf_number_buffer::format_zero_padding
(signed byte) printf_number_buffer::len
(signed byte) printf_number_buffer::padding
(void()) printf_scroll()
(byte*~) printf_scroll::$4 zp[2]:12 2.0000002E7
(label) printf_scroll::@1
(label) printf_scroll::@2
(label) printf_scroll::@3
(label) printf_scroll::@return
(void()) printf_str((byte*) printf_str::str)
(label) printf_str::@1
(label) printf_str::@2
@ -175,10 +177,10 @@
(byte) uctoa_append::value#1 reg byte x 2.0000002E7
(byte) uctoa_append::value#2 reg byte x 5018334.166666666
reg byte a [ printf_char::ch#3 printf_char::ch#2 printf_char::ch#1 ]
reg byte x [ memset::c#4 ]
zp[2]:2 [ memcpy::src#2 memcpy::src#1 memset::num#2 memset::end#0 ]
zp[2]:4 [ memcpy::dst#2 memcpy::dst#1 memset::str#3 memset::dst#2 memset::dst#4 memset::dst#1 ]
reg byte a [ printf_char::ch#3 printf_char::ch#2 printf_char::ch#1 ]
zp[1]:6 [ uctoa::digit#2 uctoa::digit#1 ]
reg byte x [ uctoa::value#2 uctoa::value#6 uctoa::value#0 ]
zp[1]:7 [ uctoa::started#2 uctoa::started#4 ]
@ -187,7 +189,7 @@ 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[1]:10 [ printf_cursor_x ]
zp[1]:11 [ printf_cursor_y ]
zp[2]:12 [ printf_cursor_ptr printf_char::$6 printf_ln::$0 printf_ln::$1 ]
zp[2]:12 [ printf_cursor_ptr printf_scroll::$4 printf_ln::$0 printf_ln::$1 ]
reg byte a [ printf_number_buffer::buffer_sign#0 ]
reg byte a [ printf_str::ch#0 ]
zp[1]:14 [ uctoa::digit_value#0 uctoa_append::sub#0 ]

View File

@ -100,32 +100,14 @@ printf_ln: {
sta.z printf_cursor_x
// printf_cursor_y++;
inc.z printf_cursor_y
// printf_scroll()
jsr printf_scroll
// }
rts
}
// Print a single char
// If the end of the screen is reached scroll it up one char and place the cursor at the
// printf_char(byte register(A) ch)
printf_char: {
.label __6 = $a
// *(printf_cursor_ptr++) = ch
ldy #0
sta (printf_cursor_ptr),y
// *(printf_cursor_ptr++) = ch;
inc.z printf_cursor_ptr
bne !+
inc.z printf_cursor_ptr+1
!:
// if(++printf_cursor_x==PRINTF_SCREEN_WIDTH)
inc.z printf_cursor_x
lda #$28
cmp.z printf_cursor_x
bne __breturn
// printf_cursor_x = 0
lda #0
sta.z printf_cursor_x
// ++printf_cursor_y;
inc.z printf_cursor_y
// Scroll the entire screen if the cursor is on the last line
printf_scroll: {
.label __4 = $a
// if(printf_cursor_y==PRINTF_SCREEN_HEIGHT)
lda #$19
cmp.z printf_cursor_y
@ -144,13 +126,13 @@ printf_char: {
sta.z memset.num+1
jsr memset
// printf_cursor_ptr-PRINTF_SCREEN_WIDTH
lda.z __6
lda.z __4
sec
sbc #<$28
sta.z __6
lda.z __6+1
sta.z __4
lda.z __4+1
sbc #>$28
sta.z __6+1
sta.z __4+1
// printf_cursor_ptr = printf_cursor_ptr-PRINTF_SCREEN_WIDTH
// printf_cursor_y--;
dec.z printf_cursor_y
@ -245,6 +227,34 @@ memcpy: {
!:
jmp __b1
}
// Print a single char
// If the end of the screen is reached scroll it up one char and place the cursor at the
// printf_char(byte register(A) ch)
printf_char: {
// *(printf_cursor_ptr++) = ch
ldy #0
sta (printf_cursor_ptr),y
// *(printf_cursor_ptr++) = ch;
inc.z printf_cursor_ptr
bne !+
inc.z printf_cursor_ptr+1
!:
// if(++printf_cursor_x==PRINTF_SCREEN_WIDTH)
inc.z printf_cursor_x
lda #$28
cmp.z printf_cursor_x
bne __breturn
// printf_cursor_x = 0
lda #0
sta.z printf_cursor_x
// ++printf_cursor_y;
inc.z printf_cursor_y
// printf_scroll()
jsr printf_scroll
__breturn:
// }
rts
}
// Clear the screen. Also resets current line/char cursor.
printf_cls: {
// memset(PRINTF_SCREEN_ADDRESS, ' ', PRINTF_SCREEN_BYTES)

View File

@ -65,91 +65,100 @@ printf_ln: scope:[printf_ln] from printf_str::@4
[27] (byte*) printf_cursor_ptr ← (byte*~) printf_ln::$1
[28] (byte) printf_cursor_x ← (byte) 0
[29] (byte) printf_cursor_y ← ++ (byte) printf_cursor_y
[30] call printf_scroll
to:printf_ln::@return
printf_ln::@return: scope:[printf_ln] from printf_ln
[30] return
[31] return
to:@return
(void()) printf_char((byte) printf_char::ch)
printf_char: scope:[printf_char] from printf_str::@5
[31] *((byte*) printf_cursor_ptr) ← (byte) printf_char::ch#0
[32] (byte*) printf_cursor_ptr ← ++ (byte*) printf_cursor_ptr
[33] (byte) printf_cursor_x ← ++ (byte) printf_cursor_x
[34] if((byte) printf_cursor_x!=(byte) $28) goto printf_char::@return
to:printf_char::@1
printf_char::@1: scope:[printf_char] from printf_char
[35] (byte) printf_cursor_x ← (byte) 0
[36] (byte) printf_cursor_y ← ++ (byte) printf_cursor_y
[37] if((byte) printf_cursor_y!=(byte) $19) goto printf_char::@return
to:printf_char::@2
printf_char::@2: scope:[printf_char] from printf_char::@1
[38] phi()
[39] call memcpy
to:printf_char::@3
printf_char::@3: scope:[printf_char] from printf_char::@2
[40] phi()
[41] call memset
to:printf_char::@4
printf_char::@4: scope:[printf_char] from printf_char::@3
[42] (byte*~) printf_char::$6 ← (byte*) printf_cursor_ptr - (byte) $28
[43] (byte*) printf_cursor_ptr ← (byte*~) printf_char::$6
[44] (byte) printf_cursor_y ← -- (byte) printf_cursor_y
to:printf_char::@return
printf_char::@return: scope:[printf_char] from printf_char printf_char::@1 printf_char::@4
[45] return
(void()) printf_scroll()
printf_scroll: scope:[printf_scroll] from printf_char::@1 printf_ln
[32] if((byte) printf_cursor_y!=(byte) $19) goto printf_scroll::@return
to:printf_scroll::@1
printf_scroll::@1: scope:[printf_scroll] from printf_scroll
[33] phi()
[34] call memcpy
to:printf_scroll::@2
printf_scroll::@2: scope:[printf_scroll] from printf_scroll::@1
[35] phi()
[36] call memset
to:printf_scroll::@3
printf_scroll::@3: scope:[printf_scroll] from printf_scroll::@2
[37] (byte*~) printf_scroll::$4 ← (byte*) printf_cursor_ptr - (byte) $28
[38] (byte*) printf_cursor_ptr ← (byte*~) printf_scroll::$4
[39] (byte) printf_cursor_y ← -- (byte) printf_cursor_y
to:printf_scroll::@return
printf_scroll::@return: scope:[printf_scroll] from printf_scroll printf_scroll::@3
[40] return
to:@return
(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num)
memset: scope:[memset] from printf_char::@3 printf_cls
[46] (byte) memset::c#4 ← phi( printf_char::@3/(byte) ' ' printf_cls/(byte) ' ' )
[46] (void*) memset::str#3 ← phi( printf_char::@3/(void*)(number) $400+(number) $28*(number) $19-(number) $28 printf_cls/(void*) 1024 )
[46] (word) memset::num#2 ← phi( printf_char::@3/(byte) $28 printf_cls/(word)(number) $28*(number) $19 )
[47] if((word) memset::num#2<=(byte) 0) goto memset::@return
memset: scope:[memset] from printf_cls printf_scroll::@2
[41] (byte) memset::c#4 ← phi( printf_cls/(byte) ' ' printf_scroll::@2/(byte) ' ' )
[41] (void*) memset::str#3 ← phi( printf_cls/(void*) 1024 printf_scroll::@2/(void*)(number) $400+(number) $28*(number) $19-(number) $28 )
[41] (word) memset::num#2 ← phi( printf_cls/(word)(number) $28*(number) $19 printf_scroll::@2/(byte) $28 )
[42] if((word) memset::num#2<=(byte) 0) goto memset::@return
to:memset::@1
memset::@1: scope:[memset] from memset
[48] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) memset::num#2
[49] (byte*) memset::dst#4 ← (byte*)(void*) memset::str#3
[43] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) memset::num#2
[44] (byte*) memset::dst#4 ← (byte*)(void*) memset::str#3
to:memset::@2
memset::@2: scope:[memset] from memset::@1 memset::@3
[50] (byte*) memset::dst#2 ← phi( memset::@1/(byte*) memset::dst#4 memset::@3/(byte*) memset::dst#1 )
[51] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@3
[45] (byte*) memset::dst#2 ← phi( memset::@1/(byte*) memset::dst#4 memset::@3/(byte*) memset::dst#1 )
[46] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@3
to:memset::@return
memset::@return: scope:[memset] from memset memset::@2
[52] return
[47] return
to:@return
memset::@3: scope:[memset] from memset::@2
[53] *((byte*) memset::dst#2) ← (byte) memset::c#4
[54] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2
[48] *((byte*) memset::dst#2) ← (byte) memset::c#4
[49] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2
to:memset::@2
(void*()) memcpy((void*) memcpy::destination , (void*) memcpy::source , (word) memcpy::num)
memcpy: scope:[memcpy] from printf_char::@2
[55] phi()
memcpy: scope:[memcpy] from printf_scroll::@1
[50] phi()
to:memcpy::@1
memcpy::@1: scope:[memcpy] from memcpy memcpy::@2
[56] (byte*) memcpy::dst#2 ← phi( memcpy/(byte*)(const void*) memcpy::destination#0 memcpy::@2/(byte*) memcpy::dst#1 )
[56] (byte*) memcpy::src#2 ← phi( memcpy/(byte*)(const void*) memcpy::source#0 memcpy::@2/(byte*) memcpy::src#1 )
[57] if((byte*) memcpy::src#2!=(const byte*) memcpy::src_end#0) goto memcpy::@2
[51] (byte*) memcpy::dst#2 ← phi( memcpy/(byte*)(const void*) memcpy::destination#0 memcpy::@2/(byte*) memcpy::dst#1 )
[51] (byte*) memcpy::src#2 ← phi( memcpy/(byte*)(const void*) memcpy::source#0 memcpy::@2/(byte*) memcpy::src#1 )
[52] if((byte*) memcpy::src#2!=(const byte*) memcpy::src_end#0) goto memcpy::@2
to:memcpy::@return
memcpy::@return: scope:[memcpy] from memcpy::@1
[58] return
[53] return
to:@return
memcpy::@2: scope:[memcpy] from memcpy::@1
[59] *((byte*) memcpy::dst#2) ← *((byte*) memcpy::src#2)
[60] (byte*) memcpy::dst#1 ← ++ (byte*) memcpy::dst#2
[61] (byte*) memcpy::src#1 ← ++ (byte*) memcpy::src#2
[54] *((byte*) memcpy::dst#2) ← *((byte*) memcpy::src#2)
[55] (byte*) memcpy::dst#1 ← ++ (byte*) memcpy::dst#2
[56] (byte*) memcpy::src#1 ← ++ (byte*) memcpy::src#2
to:memcpy::@1
(void()) printf_char((byte) printf_char::ch)
printf_char: scope:[printf_char] from printf_str::@5
[57] *((byte*) printf_cursor_ptr) ← (byte) printf_char::ch#0
[58] (byte*) printf_cursor_ptr ← ++ (byte*) printf_cursor_ptr
[59] (byte) printf_cursor_x ← ++ (byte) printf_cursor_x
[60] if((byte) printf_cursor_x!=(byte) $28) goto printf_char::@return
to:printf_char::@1
printf_char::@1: scope:[printf_char] from printf_char
[61] (byte) printf_cursor_x ← (byte) 0
[62] (byte) printf_cursor_y ← ++ (byte) printf_cursor_y
[63] call printf_scroll
to:printf_char::@return
printf_char::@return: scope:[printf_char] from printf_char printf_char::@1
[64] return
to:@return
(void()) printf_cls()
printf_cls: scope:[printf_cls] from main
[62] phi()
[63] call memset
[65] phi()
[66] call memset
to:printf_cls::@1
printf_cls::@1: scope:[printf_cls] from printf_cls
[64] (byte*) printf_cursor_ptr ← (byte*) 1024
[65] (byte) printf_cursor_x ← (byte) 0
[66] (byte) printf_cursor_y ← (byte) 0
[67] (byte*) printf_cursor_ptr ← (byte*) 1024
[68] (byte) printf_cursor_x ← (byte) 0
[69] (byte) printf_cursor_y ← (byte) 0
to:printf_cls::@return
printf_cls::@return: scope:[printf_cls] from printf_cls::@1
[67] return
[70] return
to:@return

File diff suppressed because it is too large Load Diff

View File

@ -21,16 +21,16 @@
(void*) memcpy::destination
(const void*) memcpy::destination#0 destination = (void*) 1024
(byte*) memcpy::dst
(byte*) memcpy::dst#1 dst zp[2]:6 1.0000001E7
(byte*) memcpy::dst#2 dst zp[2]:6 1.0000001E7
(byte*) memcpy::dst#1 dst zp[2]:6 1.00000001E8
(byte*) memcpy::dst#2 dst zp[2]:6 1.00000001E8
(word) memcpy::num
(const word) memcpy::num#0 num = (word)(number) $28*(number) $19-(number) $28
(void*) memcpy::return
(void*) memcpy::source
(const void*) memcpy::source#0 source = (void*)(number) $400+(number) $28
(byte*) memcpy::src
(byte*) memcpy::src#1 src zp[2]:4 2.0000002E7
(byte*) memcpy::src#2 src zp[2]:4 1.0000001E7
(byte*) memcpy::src#1 src zp[2]:4 2.00000002E8
(byte*) memcpy::src#2 src zp[2]:4 1.00000001E8
(byte*) memcpy::src_end
(const byte*) memcpy::src_end#0 src_end = (byte*)(const void*) memcpy::source#0+(const word) memcpy::num#0
(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num)
@ -39,35 +39,31 @@
(label) memset::@3
(label) memset::@return
(byte) memset::c
(byte) memset::c#4 reg byte x 1250000.125
(byte) memset::c#4 reg byte x 1.2500000125E7
(byte*) memset::dst
(byte*) memset::dst#1 dst zp[2]:6 2.0000002E7
(byte*) memset::dst#2 dst zp[2]:6 1.3366668333333332E7
(byte*) memset::dst#4 dst zp[2]:6 200002.0
(byte*) memset::dst#1 dst zp[2]:6 2.00000002E8
(byte*) memset::dst#2 dst zp[2]:6 1.3366666833333334E8
(byte*) memset::dst#4 dst zp[2]:6 2000002.0
(byte*) memset::end
(byte*) memset::end#0 end zp[2]:4 1683333.6666666665
(byte*) memset::end#0 end zp[2]:4 1.6833333666666668E7
(word) memset::num
(word) memset::num#2 num zp[2]:4 100001.0
(word) memset::num#2 num zp[2]:4 1000001.0
(void*) memset::return
(void*) memset::str
(void*) memset::str#3 str zp[2]:6
(const byte*) printf_buffer_number::digits[(number) $b] = { fill( $b, 0) }
(byte) printf_buffer_number::sign
(void()) printf_char((byte) printf_char::ch)
(byte*~) printf_char::$6 zp[2]:10 20002.0
(label) printf_char::@1
(label) printf_char::@2
(label) printf_char::@3
(label) printf_char::@4
(label) printf_char::@return
(byte) printf_char::ch
(byte) printf_char::ch#0 reg byte a 11002.0
(void()) printf_cls()
(label) printf_cls::@1
(label) printf_cls::@return
(byte*) printf_cursor_ptr loadstore zp[2]:10 1894.864864864865
(byte) printf_cursor_x loadstore zp[1]:8 1669.6944444444448
(byte) printf_cursor_y loadstore zp[1]:9 1845.0000000000002
(byte*) printf_cursor_ptr loadstore zp[2]:10 6252.749999999998
(byte) printf_cursor_x loadstore zp[1]:8 2003.6333333333334
(byte) printf_cursor_y loadstore zp[1]:9 8295.365853658537
(byte) printf_format_number::justify_left
(byte) printf_format_number::min_length
(byte) printf_format_number::radix
@ -80,6 +76,12 @@
(byte*~) printf_ln::$0 zp[2]:10 20002.0
(byte*~) printf_ln::$1 zp[2]:10 20002.0
(label) printf_ln::@return
(void()) printf_scroll()
(byte*~) printf_scroll::$4 zp[2]:10 200002.0
(label) printf_scroll::@1
(label) printf_scroll::@2
(label) printf_scroll::@3
(label) printf_scroll::@return
(void()) printf_str((byte*) printf_str::str)
(label) printf_str::@1
(label) printf_str::@2
@ -100,6 +102,6 @@ zp[2]:4 [ memcpy::src#2 memcpy::src#1 memset::num#2 memset::end#0 ]
zp[2]:6 [ memcpy::dst#2 memcpy::dst#1 memset::str#3 memset::dst#2 memset::dst#4 memset::dst#1 ]
zp[1]:8 [ printf_cursor_x ]
zp[1]:9 [ printf_cursor_y ]
zp[2]:10 [ printf_cursor_ptr printf_char::$6 printf_ln::$0 printf_ln::$1 ]
zp[2]:10 [ printf_cursor_ptr printf_scroll::$4 printf_ln::$0 printf_ln::$1 ]
reg byte a [ printf_str::ch#0 ]
reg byte a [ printf_char::ch#0 ]

View File

@ -312,32 +312,14 @@ printf_ln: {
sta.z printf_cursor_x
// printf_cursor_y++;
inc.z printf_cursor_y
// printf_scroll()
jsr printf_scroll
// }
rts
}
// Print a single char
// If the end of the screen is reached scroll it up one char and place the cursor at the
// printf_char(byte register(A) ch)
printf_char: {
.label __6 = 9
// *(printf_cursor_ptr++) = ch
ldy #0
sta (printf_cursor_ptr),y
// *(printf_cursor_ptr++) = ch;
inc.z printf_cursor_ptr
bne !+
inc.z printf_cursor_ptr+1
!:
// if(++printf_cursor_x==PRINTF_SCREEN_WIDTH)
inc.z printf_cursor_x
lda #$28
cmp.z printf_cursor_x
bne __breturn
// printf_cursor_x = 0
lda #0
sta.z printf_cursor_x
// ++printf_cursor_y;
inc.z printf_cursor_y
// Scroll the entire screen if the cursor is on the last line
printf_scroll: {
.label __4 = 9
// if(printf_cursor_y==PRINTF_SCREEN_HEIGHT)
lda #$19
cmp.z printf_cursor_y
@ -356,13 +338,13 @@ printf_char: {
sta.z memset.num+1
jsr memset
// printf_cursor_ptr-PRINTF_SCREEN_WIDTH
lda.z __6
lda.z __4
sec
sbc #<$28
sta.z __6
lda.z __6+1
sta.z __4
lda.z __4+1
sbc #>$28
sta.z __6+1
sta.z __4+1
// printf_cursor_ptr = printf_cursor_ptr-PRINTF_SCREEN_WIDTH
// printf_cursor_y--;
dec.z printf_cursor_y
@ -457,6 +439,34 @@ memcpy: {
!:
jmp __b1
}
// Print a single char
// If the end of the screen is reached scroll it up one char and place the cursor at the
// printf_char(byte register(A) ch)
printf_char: {
// *(printf_cursor_ptr++) = ch
ldy #0
sta (printf_cursor_ptr),y
// *(printf_cursor_ptr++) = ch;
inc.z printf_cursor_ptr
bne !+
inc.z printf_cursor_ptr+1
!:
// if(++printf_cursor_x==PRINTF_SCREEN_WIDTH)
inc.z printf_cursor_x
lda #$28
cmp.z printf_cursor_x
bne __breturn
// printf_cursor_x = 0
lda #0
sta.z printf_cursor_x
// ++printf_cursor_y;
inc.z printf_cursor_y
// printf_scroll()
jsr printf_scroll
__breturn:
// }
rts
}
// Print a signed integer using a specific format
// printf_sint(signed word zp(2) value)
printf_sint: {

View File

@ -217,200 +217,209 @@ printf_ln: scope:[printf_ln] from printf_str::@4
[103] (byte*) printf_cursor_ptr ← (byte*~) printf_ln::$1
[104] (byte) printf_cursor_x ← (byte) 0
[105] (byte) printf_cursor_y ← ++ (byte) printf_cursor_y
[106] call printf_scroll
to:printf_ln::@return
printf_ln::@return: scope:[printf_ln] from printf_ln
[106] return
[107] return
to:@return
(void()) printf_char((byte) printf_char::ch)
printf_char: scope:[printf_char] from main::@1 main::@11 main::@17 main::@19 main::@25 main::@27 main::@3 main::@33 main::@35 main::@9 printf_number_buffer::@3 printf_str::@5
[107] (byte) printf_char::ch#13 ← phi( main::@1/(byte) '%' main::@11/(byte) '%' main::@17/(byte) '%' main::@19/(byte) '%' main::@25/(byte) '%' main::@27/(byte) '%' main::@3/(byte) '%' main::@33/(byte) '%' main::@35/(byte) '%' main::@9/(byte) '%' printf_number_buffer::@3/(byte) printf_char::ch#2 printf_str::@5/(byte) printf_char::ch#1 )
[108] *((byte*) printf_cursor_ptr) ← (byte) printf_char::ch#13
[109] (byte*) printf_cursor_ptr ← ++ (byte*) printf_cursor_ptr
[110] (byte) printf_cursor_x ← ++ (byte) printf_cursor_x
[111] if((byte) printf_cursor_x!=(byte) $28) goto printf_char::@return
to:printf_char::@1
printf_char::@1: scope:[printf_char] from printf_char
[112] (byte) printf_cursor_x ← (byte) 0
[113] (byte) printf_cursor_y ← ++ (byte) printf_cursor_y
[114] if((byte) printf_cursor_y!=(byte) $19) goto printf_char::@return
to:printf_char::@2
printf_char::@2: scope:[printf_char] from printf_char::@1
[115] phi()
[116] call memcpy
to:printf_char::@3
printf_char::@3: scope:[printf_char] from printf_char::@2
[117] phi()
[118] call memset
to:printf_char::@4
printf_char::@4: scope:[printf_char] from printf_char::@3
[119] (byte*~) printf_char::$6 ← (byte*) printf_cursor_ptr - (byte) $28
[120] (byte*) printf_cursor_ptr ← (byte*~) printf_char::$6
[121] (byte) printf_cursor_y ← -- (byte) printf_cursor_y
to:printf_char::@return
printf_char::@return: scope:[printf_char] from printf_char printf_char::@1 printf_char::@4
[122] return
(void()) printf_scroll()
printf_scroll: scope:[printf_scroll] from printf_char::@1 printf_ln
[108] if((byte) printf_cursor_y!=(byte) $19) goto printf_scroll::@return
to:printf_scroll::@1
printf_scroll::@1: scope:[printf_scroll] from printf_scroll
[109] phi()
[110] call memcpy
to:printf_scroll::@2
printf_scroll::@2: scope:[printf_scroll] from printf_scroll::@1
[111] phi()
[112] call memset
to:printf_scroll::@3
printf_scroll::@3: scope:[printf_scroll] from printf_scroll::@2
[113] (byte*~) printf_scroll::$4 ← (byte*) printf_cursor_ptr - (byte) $28
[114] (byte*) printf_cursor_ptr ← (byte*~) printf_scroll::$4
[115] (byte) printf_cursor_y ← -- (byte) printf_cursor_y
to:printf_scroll::@return
printf_scroll::@return: scope:[printf_scroll] from printf_scroll printf_scroll::@3
[116] return
to:@return
(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num)
memset: scope:[memset] from printf_char::@3 printf_cls
[123] (byte) memset::c#4 ← phi( printf_char::@3/(byte) ' ' printf_cls/(byte) ' ' )
[123] (void*) memset::str#3 ← phi( printf_char::@3/(void*)(number) $400+(number) $28*(number) $19-(number) $28 printf_cls/(void*) 1024 )
[123] (word) memset::num#2 ← phi( printf_char::@3/(byte) $28 printf_cls/(word)(number) $28*(number) $19 )
[124] if((word) memset::num#2<=(byte) 0) goto memset::@return
memset: scope:[memset] from printf_cls printf_scroll::@2
[117] (byte) memset::c#4 ← phi( printf_cls/(byte) ' ' printf_scroll::@2/(byte) ' ' )
[117] (void*) memset::str#3 ← phi( printf_cls/(void*) 1024 printf_scroll::@2/(void*)(number) $400+(number) $28*(number) $19-(number) $28 )
[117] (word) memset::num#2 ← phi( printf_cls/(word)(number) $28*(number) $19 printf_scroll::@2/(byte) $28 )
[118] if((word) memset::num#2<=(byte) 0) goto memset::@return
to:memset::@1
memset::@1: scope:[memset] from memset
[125] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) memset::num#2
[126] (byte*) memset::dst#4 ← (byte*)(void*) memset::str#3
[119] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) memset::num#2
[120] (byte*) memset::dst#4 ← (byte*)(void*) memset::str#3
to:memset::@2
memset::@2: scope:[memset] from memset::@1 memset::@3
[127] (byte*) memset::dst#2 ← phi( memset::@1/(byte*) memset::dst#4 memset::@3/(byte*) memset::dst#1 )
[128] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@3
[121] (byte*) memset::dst#2 ← phi( memset::@1/(byte*) memset::dst#4 memset::@3/(byte*) memset::dst#1 )
[122] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@3
to:memset::@return
memset::@return: scope:[memset] from memset memset::@2
[129] return
[123] return
to:@return
memset::@3: scope:[memset] from memset::@2
[130] *((byte*) memset::dst#2) ← (byte) memset::c#4
[131] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2
[124] *((byte*) memset::dst#2) ← (byte) memset::c#4
[125] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2
to:memset::@2
(void*()) memcpy((void*) memcpy::destination , (void*) memcpy::source , (word) memcpy::num)
memcpy: scope:[memcpy] from printf_char::@2
[132] phi()
memcpy: scope:[memcpy] from printf_scroll::@1
[126] phi()
to:memcpy::@1
memcpy::@1: scope:[memcpy] from memcpy memcpy::@2
[133] (byte*) memcpy::dst#2 ← phi( memcpy/(byte*)(const void*) memcpy::destination#0 memcpy::@2/(byte*) memcpy::dst#1 )
[133] (byte*) memcpy::src#2 ← phi( memcpy/(byte*)(const void*) memcpy::source#0 memcpy::@2/(byte*) memcpy::src#1 )
[134] if((byte*) memcpy::src#2!=(const byte*) memcpy::src_end#0) goto memcpy::@2
[127] (byte*) memcpy::dst#2 ← phi( memcpy/(byte*)(const void*) memcpy::destination#0 memcpy::@2/(byte*) memcpy::dst#1 )
[127] (byte*) memcpy::src#2 ← phi( memcpy/(byte*)(const void*) memcpy::source#0 memcpy::@2/(byte*) memcpy::src#1 )
[128] if((byte*) memcpy::src#2!=(const byte*) memcpy::src_end#0) goto memcpy::@2
to:memcpy::@return
memcpy::@return: scope:[memcpy] from memcpy::@1
[135] return
[129] return
to:@return
memcpy::@2: scope:[memcpy] from memcpy::@1
[136] *((byte*) memcpy::dst#2) ← *((byte*) memcpy::src#2)
[137] (byte*) memcpy::dst#1 ← ++ (byte*) memcpy::dst#2
[138] (byte*) memcpy::src#1 ← ++ (byte*) memcpy::src#2
[130] *((byte*) memcpy::dst#2) ← *((byte*) memcpy::src#2)
[131] (byte*) memcpy::dst#1 ← ++ (byte*) memcpy::dst#2
[132] (byte*) memcpy::src#1 ← ++ (byte*) memcpy::src#2
to:memcpy::@1
(void()) printf_char((byte) printf_char::ch)
printf_char: scope:[printf_char] from main::@1 main::@11 main::@17 main::@19 main::@25 main::@27 main::@3 main::@33 main::@35 main::@9 printf_number_buffer::@3 printf_str::@5
[133] (byte) printf_char::ch#13 ← phi( main::@1/(byte) '%' main::@11/(byte) '%' main::@17/(byte) '%' main::@19/(byte) '%' main::@25/(byte) '%' main::@27/(byte) '%' main::@3/(byte) '%' main::@33/(byte) '%' main::@35/(byte) '%' main::@9/(byte) '%' printf_number_buffer::@3/(byte) printf_char::ch#2 printf_str::@5/(byte) printf_char::ch#1 )
[134] *((byte*) printf_cursor_ptr) ← (byte) printf_char::ch#13
[135] (byte*) printf_cursor_ptr ← ++ (byte*) printf_cursor_ptr
[136] (byte) printf_cursor_x ← ++ (byte) printf_cursor_x
[137] if((byte) printf_cursor_x!=(byte) $28) goto printf_char::@return
to:printf_char::@1
printf_char::@1: scope:[printf_char] from printf_char
[138] (byte) printf_cursor_x ← (byte) 0
[139] (byte) printf_cursor_y ← ++ (byte) printf_cursor_y
[140] call printf_scroll
to:printf_char::@return
printf_char::@return: scope:[printf_char] from printf_char printf_char::@1
[141] return
to:@return
(void()) printf_sint((signed word) printf_sint::value , (byte) printf_sint::format_min_length , (byte) printf_sint::format_justify_left , (byte) printf_sint::format_sign_always , (byte) printf_sint::format_zero_padding , (byte) printf_sint::format_upper_case , (byte) printf_sint::format_radix)
printf_sint: scope:[printf_sint] from main::@13 main::@15 main::@21 main::@23 main::@29 main::@31 main::@37 main::@39 main::@5 main::@7
[139] (signed word) printf_sint::value#11 ← phi( main::@13/(signed byte) 1 main::@15/(signed byte) 2 main::@21/(signed byte) 1 main::@23/(signed byte) 1 main::@29/(signed byte) 2 main::@31/(signed byte) 2 main::@37/(signed byte) 2 main::@39/(signed byte) 1 main::@5/(signed byte) 1 main::@7/(signed byte) 2 )
[140] *((byte*)&(struct printf_buffer_number) printf_buffer) ← (byte) 0
[141] if((signed word) printf_sint::value#11<(signed byte) 0) goto printf_sint::@1
[142] (signed word) printf_sint::value#11 ← phi( main::@13/(signed byte) 1 main::@15/(signed byte) 2 main::@21/(signed byte) 1 main::@23/(signed byte) 1 main::@29/(signed byte) 2 main::@31/(signed byte) 2 main::@37/(signed byte) 2 main::@39/(signed byte) 1 main::@5/(signed byte) 1 main::@7/(signed byte) 2 )
[143] *((byte*)&(struct printf_buffer_number) printf_buffer) ← (byte) 0
[144] if((signed word) printf_sint::value#11<(signed byte) 0) goto printf_sint::@1
to:printf_sint::@2
printf_sint::@1: scope:[printf_sint] from printf_sint
[142] (signed word) printf_sint::value#0 ← - (signed word) printf_sint::value#11
[143] *((byte*)&(struct printf_buffer_number) printf_buffer) ← (byte) '-'
[145] (signed word) printf_sint::value#0 ← - (signed word) printf_sint::value#11
[146] *((byte*)&(struct printf_buffer_number) printf_buffer) ← (byte) '-'
to:printf_sint::@2
printf_sint::@2: scope:[printf_sint] from printf_sint printf_sint::@1
[144] (signed word) printf_sint::value#13 ← phi( printf_sint::@1/(signed word) printf_sint::value#0 printf_sint/(signed word) printf_sint::value#11 )
[145] (word) utoa::value#1 ← (word)(signed word) printf_sint::value#13
[146] call utoa
[147] (signed word) printf_sint::value#13 ← phi( printf_sint::@1/(signed word) printf_sint::value#0 printf_sint/(signed word) printf_sint::value#11 )
[148] (word) utoa::value#1 ← (word)(signed word) printf_sint::value#13
[149] call utoa
to:printf_sint::@3
printf_sint::@3: scope:[printf_sint] from printf_sint::@2
[147] (byte) printf_number_buffer::buffer_sign#0 ← *((byte*)&(struct printf_buffer_number) printf_buffer)
[148] call printf_number_buffer
[150] (byte) printf_number_buffer::buffer_sign#0 ← *((byte*)&(struct printf_buffer_number) printf_buffer)
[151] call printf_number_buffer
to:printf_sint::@return
printf_sint::@return: scope:[printf_sint] from printf_sint::@3
[149] return
[152] return
to:@return
(void()) printf_number_buffer((byte) printf_number_buffer::buffer_sign , (byte*) printf_number_buffer::buffer_digits , (byte) printf_number_buffer::format_min_length , (byte) printf_number_buffer::format_justify_left , (byte) printf_number_buffer::format_sign_always , (byte) printf_number_buffer::format_zero_padding , (byte) printf_number_buffer::format_upper_case , (byte) printf_number_buffer::format_radix)
printf_number_buffer: scope:[printf_number_buffer] from printf_sint::@3
[150] phi()
[153] phi()
to:printf_number_buffer::@1
printf_number_buffer::@1: scope:[printf_number_buffer] from printf_number_buffer
[151] if((byte) 0==(byte) printf_number_buffer::buffer_sign#0) goto printf_number_buffer::@2
[154] if((byte) 0==(byte) printf_number_buffer::buffer_sign#0) goto printf_number_buffer::@2
to:printf_number_buffer::@3
printf_number_buffer::@3: scope:[printf_number_buffer] from printf_number_buffer::@1
[152] (byte) printf_char::ch#2 ← (byte) printf_number_buffer::buffer_sign#0
[153] call printf_char
[155] (byte) printf_char::ch#2 ← (byte) printf_number_buffer::buffer_sign#0
[156] call printf_char
to:printf_number_buffer::@2
printf_number_buffer::@2: scope:[printf_number_buffer] from printf_number_buffer::@1 printf_number_buffer::@3
[154] phi()
[155] call printf_str
[157] phi()
[158] call printf_str
to:printf_number_buffer::@return
printf_number_buffer::@return: scope:[printf_number_buffer] from printf_number_buffer::@2
[156] return
[159] return
to:@return
(void()) utoa((word) utoa::value , (byte*) utoa::buffer , (byte) utoa::radix)
utoa: scope:[utoa] from printf_sint::@2
[157] phi()
[160] phi()
to:utoa::@1
utoa::@1: scope:[utoa] from utoa utoa::@4
[158] (byte*) utoa::buffer#11 ← phi( utoa::@4/(byte*) utoa::buffer#14 utoa/(byte*)&(struct printf_buffer_number) printf_buffer+(const byte) OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS )
[158] (byte) utoa::started#2 ← phi( utoa::@4/(byte) utoa::started#4 utoa/(byte) 0 )
[158] (word) utoa::value#2 ← phi( utoa::@4/(word) utoa::value#6 utoa/(word) utoa::value#1 )
[158] (byte) utoa::digit#2 ← phi( utoa::@4/(byte) utoa::digit#1 utoa/(byte) 0 )
[159] if((byte) utoa::digit#2<(byte) 5-(byte) 1) goto utoa::@2
[161] (byte*) utoa::buffer#11 ← phi( utoa::@4/(byte*) utoa::buffer#14 utoa/(byte*)&(struct printf_buffer_number) printf_buffer+(const byte) OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS )
[161] (byte) utoa::started#2 ← phi( utoa::@4/(byte) utoa::started#4 utoa/(byte) 0 )
[161] (word) utoa::value#2 ← phi( utoa::@4/(word) utoa::value#6 utoa/(word) utoa::value#1 )
[161] (byte) utoa::digit#2 ← phi( utoa::@4/(byte) utoa::digit#1 utoa/(byte) 0 )
[162] if((byte) utoa::digit#2<(byte) 5-(byte) 1) goto utoa::@2
to:utoa::@3
utoa::@3: scope:[utoa] from utoa::@1
[160] (byte~) utoa::$11 ← (byte)(word) utoa::value#2
[161] *((byte*) utoa::buffer#11) ← *((const byte*) DIGITS + (byte~) utoa::$11)
[162] (byte*) utoa::buffer#3 ← ++ (byte*) utoa::buffer#11
[163] *((byte*) utoa::buffer#3) ← (byte) 0
[163] (byte~) utoa::$11 ← (byte)(word) utoa::value#2
[164] *((byte*) utoa::buffer#11) ← *((const byte*) DIGITS + (byte~) utoa::$11)
[165] (byte*) utoa::buffer#3 ← ++ (byte*) utoa::buffer#11
[166] *((byte*) utoa::buffer#3) ← (byte) 0
to:utoa::@return
utoa::@return: scope:[utoa] from utoa::@3
[164] return
[167] return
to:@return
utoa::@2: scope:[utoa] from utoa::@1
[165] (byte~) utoa::$10 ← (byte) utoa::digit#2 << (byte) 1
[166] (word) utoa::digit_value#0 ← *((const word*) RADIX_DECIMAL_VALUES + (byte~) utoa::$10)
[167] if((byte) 0!=(byte) utoa::started#2) goto utoa::@5
[168] (byte~) utoa::$10 ← (byte) utoa::digit#2 << (byte) 1
[169] (word) utoa::digit_value#0 ← *((const word*) RADIX_DECIMAL_VALUES + (byte~) utoa::$10)
[170] if((byte) 0!=(byte) utoa::started#2) goto utoa::@5
to:utoa::@7
utoa::@7: scope:[utoa] from utoa::@2
[168] if((word) utoa::value#2>=(word) utoa::digit_value#0) goto utoa::@5
[171] if((word) utoa::value#2>=(word) utoa::digit_value#0) goto utoa::@5
to:utoa::@4
utoa::@4: scope:[utoa] from utoa::@6 utoa::@7
[169] (byte*) utoa::buffer#14 ← phi( utoa::@7/(byte*) utoa::buffer#11 utoa::@6/(byte*) utoa::buffer#4 )
[169] (byte) utoa::started#4 ← phi( utoa::@7/(byte) utoa::started#2 utoa::@6/(byte) 1 )
[169] (word) utoa::value#6 ← phi( utoa::@7/(word) utoa::value#2 utoa::@6/(word) utoa::value#0 )
[170] (byte) utoa::digit#1 ← ++ (byte) utoa::digit#2
[172] (byte*) utoa::buffer#14 ← phi( utoa::@7/(byte*) utoa::buffer#11 utoa::@6/(byte*) utoa::buffer#4 )
[172] (byte) utoa::started#4 ← phi( utoa::@7/(byte) utoa::started#2 utoa::@6/(byte) 1 )
[172] (word) utoa::value#6 ← phi( utoa::@7/(word) utoa::value#2 utoa::@6/(word) utoa::value#0 )
[173] (byte) utoa::digit#1 ← ++ (byte) utoa::digit#2
to:utoa::@1
utoa::@5: scope:[utoa] from utoa::@2 utoa::@7
[171] (byte*) utoa_append::buffer#0 ← (byte*) utoa::buffer#11
[172] (word) utoa_append::value#0 ← (word) utoa::value#2
[173] (word) utoa_append::sub#0 ← (word) utoa::digit_value#0
[174] call utoa_append
[175] (word) utoa_append::return#0 ← (word) utoa_append::value#2
[174] (byte*) utoa_append::buffer#0 ← (byte*) utoa::buffer#11
[175] (word) utoa_append::value#0 ← (word) utoa::value#2
[176] (word) utoa_append::sub#0 ← (word) utoa::digit_value#0
[177] call utoa_append
[178] (word) utoa_append::return#0 ← (word) utoa_append::value#2
to:utoa::@6
utoa::@6: scope:[utoa] from utoa::@5
[176] (word) utoa::value#0 ← (word) utoa_append::return#0
[177] (byte*) utoa::buffer#4 ← ++ (byte*) utoa::buffer#11
[179] (word) utoa::value#0 ← (word) utoa_append::return#0
[180] (byte*) utoa::buffer#4 ← ++ (byte*) utoa::buffer#11
to:utoa::@4
(word()) utoa_append((byte*) utoa_append::buffer , (word) utoa_append::value , (word) utoa_append::sub)
utoa_append: scope:[utoa_append] from utoa::@5
[178] phi()
[181] phi()
to:utoa_append::@1
utoa_append::@1: scope:[utoa_append] from utoa_append utoa_append::@2
[179] (byte) utoa_append::digit#2 ← phi( utoa_append/(byte) 0 utoa_append::@2/(byte) utoa_append::digit#1 )
[179] (word) utoa_append::value#2 ← phi( utoa_append/(word) utoa_append::value#0 utoa_append::@2/(word) utoa_append::value#1 )
[180] if((word) utoa_append::value#2>=(word) utoa_append::sub#0) goto utoa_append::@2
[182] (byte) utoa_append::digit#2 ← phi( utoa_append/(byte) 0 utoa_append::@2/(byte) utoa_append::digit#1 )
[182] (word) utoa_append::value#2 ← phi( utoa_append/(word) utoa_append::value#0 utoa_append::@2/(word) utoa_append::value#1 )
[183] if((word) utoa_append::value#2>=(word) utoa_append::sub#0) goto utoa_append::@2
to:utoa_append::@3
utoa_append::@3: scope:[utoa_append] from utoa_append::@1
[181] *((byte*) utoa_append::buffer#0) ← *((const byte*) DIGITS + (byte) utoa_append::digit#2)
[184] *((byte*) utoa_append::buffer#0) ← *((const byte*) DIGITS + (byte) utoa_append::digit#2)
to:utoa_append::@return
utoa_append::@return: scope:[utoa_append] from utoa_append::@3
[182] return
[185] return
to:@return
utoa_append::@2: scope:[utoa_append] from utoa_append::@1
[183] (byte) utoa_append::digit#1 ← ++ (byte) utoa_append::digit#2
[184] (word) utoa_append::value#1 ← (word) utoa_append::value#2 - (word) utoa_append::sub#0
[186] (byte) utoa_append::digit#1 ← ++ (byte) utoa_append::digit#2
[187] (word) utoa_append::value#1 ← (word) utoa_append::value#2 - (word) utoa_append::sub#0
to:utoa_append::@1
(void()) printf_cls()
printf_cls: scope:[printf_cls] from main
[185] phi()
[186] call memset
[188] phi()
[189] call memset
to:printf_cls::@1
printf_cls::@1: scope:[printf_cls] from printf_cls
[187] (byte*) printf_cursor_ptr ← (byte*) 1024
[188] (byte) printf_cursor_x ← (byte) 0
[189] (byte) printf_cursor_y ← (byte) 0
[190] (byte*) printf_cursor_ptr ← (byte*) 1024
[191] (byte) printf_cursor_x ← (byte) 0
[192] (byte) printf_cursor_y ← (byte) 0
to:printf_cls::@return
printf_cls::@return: scope:[printf_cls] from printf_cls::@1
[190] return
[193] return
to:@return

File diff suppressed because one or more lines are too long

View File

@ -68,16 +68,16 @@
(void*) memcpy::destination
(const void*) memcpy::destination#0 destination = (void*) 1024
(byte*) memcpy::dst
(byte*) memcpy::dst#1 dst zp[2]:11 1.000000001E9
(byte*) memcpy::dst#2 dst zp[2]:11 1.000000001E9
(byte*) memcpy::dst#1 dst zp[2]:11 1.0000000001E10
(byte*) memcpy::dst#2 dst zp[2]:11 1.0000000001E10
(word) memcpy::num
(const word) memcpy::num#0 num = (word)(number) $28*(number) $19-(number) $28
(void*) memcpy::return
(void*) memcpy::source
(const void*) memcpy::source#0 source = (void*)(number) $400+(number) $28
(byte*) memcpy::src
(byte*) memcpy::src#1 src zp[2]:5 2.000000002E9
(byte*) memcpy::src#2 src zp[2]:5 1.000000001E9
(byte*) memcpy::src#1 src zp[2]:5 2.0000000002E10
(byte*) memcpy::src#2 src zp[2]:5 1.0000000001E10
(byte*) memcpy::src_end
(const byte*) memcpy::src_end#0 src_end = (byte*)(const void*) memcpy::source#0+(const word) memcpy::num#0
(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num)
@ -86,15 +86,15 @@
(label) memset::@3
(label) memset::@return
(byte) memset::c
(byte) memset::c#4 reg byte x 1.25000000125E8
(byte) memset::c#4 reg byte x 1.250000000125E9
(byte*) memset::dst
(byte*) memset::dst#1 dst zp[2]:11 2.000000002E9
(byte*) memset::dst#2 dst zp[2]:11 1.3366666683333335E9
(byte*) memset::dst#4 dst zp[2]:11 2.0000002E7
(byte*) memset::dst#1 dst zp[2]:11 2.0000000002E10
(byte*) memset::dst#2 dst zp[2]:11 1.3366666668333332E10
(byte*) memset::dst#4 dst zp[2]:11 2.00000002E8
(byte*) memset::end
(byte*) memset::end#0 end zp[2]:5 1.683333336666667E8
(byte*) memset::end#0 end zp[2]:5 1.6833333336666665E9
(word) memset::num
(word) memset::num#2 num zp[2]:5 1.0000001E7
(word) memset::num#2 num zp[2]:5 1.00000001E8
(void*) memset::return
(void*) memset::str
(void*) memset::str#3 str zp[2]:11
@ -102,11 +102,7 @@
(const byte*) printf_buffer_number::digits[(number) $b] = { fill( $b, 0) }
(byte) printf_buffer_number::sign
(void()) printf_char((byte) printf_char::ch)
(byte*~) printf_char::$6 zp[2]:9 2000002.0
(label) printf_char::@1
(label) printf_char::@2
(label) printf_char::@3
(label) printf_char::@4
(label) printf_char::@return
(byte) printf_char::ch
(byte) printf_char::ch#1 reg byte a 200002.0
@ -115,9 +111,9 @@
(void()) printf_cls()
(label) printf_cls::@1
(label) printf_cls::@return
(byte*) printf_cursor_ptr loadstore zp[2]:9 53031.13636363637
(byte) printf_cursor_x loadstore zp[1]:7 45802.35877862595
(byte) printf_cursor_y loadstore zp[1]:8 52632.4060150376
(byte*) printf_cursor_ptr loadstore zp[2]:9 185185.99999999997
(byte) printf_cursor_x loadstore zp[1]:7 48000.872
(byte) printf_cursor_y loadstore zp[1]:8 250000.80882352943
(byte) printf_format_number::justify_left
(byte) printf_format_number::min_length
(byte) printf_format_number::radix
@ -149,6 +145,12 @@
(byte) printf_number_buffer::format_zero_padding
(signed byte) printf_number_buffer::len
(signed byte) printf_number_buffer::padding
(void()) printf_scroll()
(byte*~) printf_scroll::$4 zp[2]:9 2.0000002E7
(label) printf_scroll::@1
(label) printf_scroll::@2
(label) printf_scroll::@3
(label) printf_scroll::@return
(void()) printf_sint((signed word) printf_sint::value , (byte) printf_sint::format_min_length , (byte) printf_sint::format_justify_left , (byte) printf_sint::format_sign_always , (byte) printf_sint::format_zero_padding , (byte) printf_sint::format_upper_case , (byte) printf_sint::format_radix)
(label) printf_sint::@1
(label) printf_sint::@2
@ -230,8 +232,8 @@
(word) utoa_append::value#1 value zp[2]:2 2.0000002E7
(word) utoa_append::value#2 value zp[2]:2 5018334.166666666
reg byte a [ printf_char::ch#13 printf_char::ch#2 printf_char::ch#1 ]
reg byte x [ memset::c#4 ]
reg byte a [ printf_char::ch#13 printf_char::ch#2 printf_char::ch#1 ]
zp[2]:2 [ printf_sint::value#13 printf_sint::value#0 printf_sint::value#11 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 printf_str::str#22 printf_str::str#24 printf_str::str#0 ]
zp[1]:4 [ utoa::digit#2 utoa::digit#1 ]
reg byte x [ utoa::started#2 utoa::started#4 ]
@ -239,7 +241,7 @@ zp[2]:5 [ utoa::buffer#11 utoa::buffer#14 utoa::buffer#4 utoa::buffer#3 utoa_app
reg byte x [ utoa_append::digit#2 utoa_append::digit#1 ]
zp[1]:7 [ printf_cursor_x ]
zp[1]:8 [ printf_cursor_y ]
zp[2]:9 [ printf_cursor_ptr printf_char::$6 printf_ln::$0 printf_ln::$1 ]
zp[2]:9 [ printf_cursor_ptr printf_scroll::$4 printf_ln::$0 printf_ln::$1 ]
reg byte a [ printf_str::ch#0 ]
reg byte a [ printf_number_buffer::buffer_sign#0 ]
reg byte a [ utoa::$11 ]

View File

@ -84,9 +84,133 @@ printf_ln: {
sta.z printf_cursor_x
// printf_cursor_y++;
inc.z printf_cursor_y
// printf_scroll()
jsr printf_scroll
// }
rts
}
// Scroll the entire screen if the cursor is on the last line
printf_scroll: {
.label __4 = $f
// if(printf_cursor_y==PRINTF_SCREEN_HEIGHT)
lda #$19
cmp.z printf_cursor_y
bne __breturn
// memcpy(PRINTF_SCREEN_ADDRESS, PRINTF_SCREEN_ADDRESS+PRINTF_SCREEN_WIDTH, PRINTF_SCREEN_BYTES-PRINTF_SCREEN_WIDTH)
jsr memcpy
// memset(PRINTF_SCREEN_ADDRESS+PRINTF_SCREEN_BYTES-PRINTF_SCREEN_WIDTH, ' ', PRINTF_SCREEN_WIDTH)
ldx #' '
lda #<$400+$28*$19-$28
sta.z memset.str
lda #>$400+$28*$19-$28
sta.z memset.str+1
lda #<$28
sta.z memset.num
lda #>$28
sta.z memset.num+1
jsr memset
// printf_cursor_ptr-PRINTF_SCREEN_WIDTH
lda.z __4
sec
sbc #<$28
sta.z __4
lda.z __4+1
sbc #>$28
sta.z __4+1
// printf_cursor_ptr = printf_cursor_ptr-PRINTF_SCREEN_WIDTH
// printf_cursor_y--;
dec.z printf_cursor_y
__breturn:
// }
rts
}
// Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str.
// memset(void* zp(5) str, byte register(X) c, word zp($11) num)
memset: {
.label end = $11
.label dst = 5
.label num = $11
.label str = 5
// if(num>0)
lda.z num
bne !+
lda.z num+1
beq __breturn
!:
// end = (char*)str + num
lda.z end
clc
adc.z str
sta.z end
lda.z end+1
adc.z str+1
sta.z end+1
__b2:
// for(char* dst = str; dst!=end; dst++)
lda.z dst+1
cmp.z end+1
bne __b3
lda.z dst
cmp.z end
bne __b3
__breturn:
// }
rts
__b3:
// *dst = c
txa
ldy #0
sta (dst),y
// for(char* dst = str; dst!=end; dst++)
inc.z dst
bne !+
inc.z dst+1
!:
jmp __b2
}
// Copy block of memory (forwards)
// Copies the values of num bytes from the location pointed to by source directly to the memory block pointed to by destination.
memcpy: {
.label destination = $400
.label source = $400+$28
.const num = $28*$19-$28
.label src_end = source+num
.label dst = 5
.label src = $11
lda #<destination
sta.z dst
lda #>destination
sta.z dst+1
lda #<source
sta.z src
lda #>source
sta.z src+1
__b1:
// while(src!=src_end)
lda.z src+1
cmp #>src_end
bne __b2
lda.z src
cmp #<src_end
bne __b2
// }
rts
__b2:
// *dst++ = *src++
ldy #0
lda (src),y
sta (dst),y
// *dst++ = *src++;
inc.z dst
bne !+
inc.z dst+1
!:
inc.z src
bne !+
inc.z src+1
!:
jmp __b1
}
// Print an unsigned int using a specific format
printf_uint: {
.label uvalue = $d80
@ -265,7 +389,6 @@ printf_padding: {
// If the end of the screen is reached scroll it up one char and place the cursor at the
// printf_char(byte register(A) ch)
printf_char: {
.label __6 = $f
// *(printf_cursor_ptr++) = ch
ldy #0
sta (printf_cursor_ptr),y
@ -284,125 +407,12 @@ printf_char: {
sta.z printf_cursor_x
// ++printf_cursor_y;
inc.z printf_cursor_y
// if(printf_cursor_y==PRINTF_SCREEN_HEIGHT)
lda #$19
cmp.z printf_cursor_y
bne __breturn
// memcpy(PRINTF_SCREEN_ADDRESS, PRINTF_SCREEN_ADDRESS+PRINTF_SCREEN_WIDTH, PRINTF_SCREEN_BYTES-PRINTF_SCREEN_WIDTH)
jsr memcpy
// memset(PRINTF_SCREEN_ADDRESS+PRINTF_SCREEN_BYTES-PRINTF_SCREEN_WIDTH, ' ', PRINTF_SCREEN_WIDTH)
ldx #' '
lda #<$400+$28*$19-$28
sta.z memset.str
lda #>$400+$28*$19-$28
sta.z memset.str+1
lda #<$28
sta.z memset.num
lda #>$28
sta.z memset.num+1
jsr memset
// printf_cursor_ptr-PRINTF_SCREEN_WIDTH
lda.z __6
sec
sbc #<$28
sta.z __6
lda.z __6+1
sbc #>$28
sta.z __6+1
// printf_cursor_ptr = printf_cursor_ptr-PRINTF_SCREEN_WIDTH
// printf_cursor_y--;
dec.z printf_cursor_y
// printf_scroll()
jsr printf_scroll
__breturn:
// }
rts
}
// Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str.
// memset(void* zp(5) str, byte register(X) c, word zp($11) num)
memset: {
.label end = $11
.label dst = 5
.label num = $11
.label str = 5
// if(num>0)
lda.z num
bne !+
lda.z num+1
beq __breturn
!:
// end = (char*)str + num
lda.z end
clc
adc.z str
sta.z end
lda.z end+1
adc.z str+1
sta.z end+1
__b2:
// for(char* dst = str; dst!=end; dst++)
lda.z dst+1
cmp.z end+1
bne __b3
lda.z dst
cmp.z end
bne __b3
__breturn:
// }
rts
__b3:
// *dst = c
txa
ldy #0
sta (dst),y
// for(char* dst = str; dst!=end; dst++)
inc.z dst
bne !+
inc.z dst+1
!:
jmp __b2
}
// Copy block of memory (forwards)
// Copies the values of num bytes from the location pointed to by source directly to the memory block pointed to by destination.
memcpy: {
.label destination = $400
.label source = $400+$28
.const num = $28*$19-$28
.label src_end = source+num
.label dst = 5
.label src = $11
lda #<destination
sta.z dst
lda #>destination
sta.z dst+1
lda #<source
sta.z src
lda #>source
sta.z src+1
__b1:
// while(src!=src_end)
lda.z src+1
cmp #>src_end
bne __b2
lda.z src
cmp #<src_end
bne __b2
// }
rts
__b2:
// *dst++ = *src++
ldy #0
lda (src),y
sta (dst),y
// *dst++ = *src++;
inc.z dst
bne !+
inc.z dst+1
!:
inc.z src
bne !+
inc.z src+1
!:
jmp __b1
}
// Print a zero-terminated string
// Handles escape codes such as newline
// printf_str(byte* zp($b) str)

View File

@ -53,484 +53,493 @@ printf_ln: scope:[printf_ln] from main::@2 main::@4 main::@6 printf_str::@4
[24] (byte*) printf_cursor_ptr ← (byte*~) printf_ln::$1
[25] (byte) printf_cursor_x ← (byte) 0
[26] (byte) printf_cursor_y ← ++ (byte) printf_cursor_y
[27] call printf_scroll
to:printf_ln::@return
printf_ln::@return: scope:[printf_ln] from printf_ln
[27] return
[28] return
to:@return
(void()) printf_scroll()
printf_scroll: scope:[printf_scroll] from printf_char::@1 printf_ln
[29] if((byte) printf_cursor_y!=(byte) $19) goto printf_scroll::@return
to:printf_scroll::@1
printf_scroll::@1: scope:[printf_scroll] from printf_scroll
[30] phi()
[31] call memcpy
to:printf_scroll::@2
printf_scroll::@2: scope:[printf_scroll] from printf_scroll::@1
[32] phi()
[33] call memset
to:printf_scroll::@3
printf_scroll::@3: scope:[printf_scroll] from printf_scroll::@2
[34] (byte*~) printf_scroll::$4 ← (byte*) printf_cursor_ptr - (byte) $28
[35] (byte*) printf_cursor_ptr ← (byte*~) printf_scroll::$4
[36] (byte) printf_cursor_y ← -- (byte) printf_cursor_y
to:printf_scroll::@return
printf_scroll::@return: scope:[printf_scroll] from printf_scroll printf_scroll::@3
[37] return
to:@return
(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num)
memset: scope:[memset] from printf_cls printf_scroll::@2
[38] (byte) memset::c#4 ← phi( printf_cls/(byte) ' ' printf_scroll::@2/(byte) ' ' )
[38] (void*) memset::str#3 ← phi( printf_cls/(void*) 1024 printf_scroll::@2/(void*)(number) $400+(number) $28*(number) $19-(number) $28 )
[38] (word) memset::num#2 ← phi( printf_cls/(word)(number) $28*(number) $19 printf_scroll::@2/(byte) $28 )
[39] if((word) memset::num#2<=(byte) 0) goto memset::@return
to:memset::@1
memset::@1: scope:[memset] from memset
[40] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) memset::num#2
[41] (byte*) memset::dst#4 ← (byte*)(void*) memset::str#3
to:memset::@2
memset::@2: scope:[memset] from memset::@1 memset::@3
[42] (byte*) memset::dst#2 ← phi( memset::@1/(byte*) memset::dst#4 memset::@3/(byte*) memset::dst#1 )
[43] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@3
to:memset::@return
memset::@return: scope:[memset] from memset memset::@2
[44] return
to:@return
memset::@3: scope:[memset] from memset::@2
[45] *((byte*) memset::dst#2) ← (byte) memset::c#4
[46] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2
to:memset::@2
(void*()) memcpy((void*) memcpy::destination , (void*) memcpy::source , (word) memcpy::num)
memcpy: scope:[memcpy] from printf_scroll::@1
[47] phi()
to:memcpy::@1
memcpy::@1: scope:[memcpy] from memcpy memcpy::@2
[48] (byte*) memcpy::dst#2 ← phi( memcpy/(byte*)(const void*) memcpy::destination#0 memcpy::@2/(byte*) memcpy::dst#1 )
[48] (byte*) memcpy::src#2 ← phi( memcpy/(byte*)(const void*) memcpy::source#0 memcpy::@2/(byte*) memcpy::src#1 )
[49] if((byte*) memcpy::src#2!=(const byte*) memcpy::src_end#0) goto memcpy::@2
to:memcpy::@return
memcpy::@return: scope:[memcpy] from memcpy::@1
[50] return
to:@return
memcpy::@2: scope:[memcpy] from memcpy::@1
[51] *((byte*) memcpy::dst#2) ← *((byte*) memcpy::src#2)
[52] (byte*) memcpy::dst#1 ← ++ (byte*) memcpy::dst#2
[53] (byte*) memcpy::src#1 ← ++ (byte*) memcpy::src#2
to:memcpy::@1
(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)
printf_uint: scope:[printf_uint] from main::@5
[28] phi()
[54] phi()
to:printf_uint::@1
printf_uint::@1: scope:[printf_uint] from printf_uint
[29] *((byte*)&(struct printf_buffer_number) printf_buffer) ← (byte) 0
[30] call utoa
[55] *((byte*)&(struct printf_buffer_number) printf_buffer) ← (byte) 0
[56] call utoa
to:printf_uint::@2
printf_uint::@2: scope:[printf_uint] from printf_uint::@1
[31] (byte) printf_number_buffer::buffer_sign#0 ← *((byte*)&(struct printf_buffer_number) printf_buffer)
[32] call printf_number_buffer
[57] (byte) printf_number_buffer::buffer_sign#0 ← *((byte*)&(struct printf_buffer_number) printf_buffer)
[58] call printf_number_buffer
to:printf_uint::@return
printf_uint::@return: scope:[printf_uint] from printf_uint::@2
[33] return
[59] return
to:@return
(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::@5 printf_uint::@2
[34] (byte) printf_number_buffer::format_upper_case#10 ← phi( printf_schar::@5/(byte) 0 printf_uint::@2/(const byte) printf_uint::format_upper_case#0 )
[34] (byte) printf_number_buffer::buffer_sign#10 ← phi( printf_schar::@5/(byte) printf_number_buffer::buffer_sign#1 printf_uint::@2/(byte) printf_number_buffer::buffer_sign#0 )
[34] (byte*) printf_number_buffer::buffer_digits#10 ← phi( printf_schar::@5/(byte*)&(struct printf_buffer_number) printf_buffer+(const byte) OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS printf_uint::@2/(byte*)&(struct printf_buffer_number) printf_buffer+(const byte) OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS )
[34] (byte) printf_number_buffer::format_zero_padding#10 ← phi( printf_schar::@5/(byte) printf_number_buffer::format_zero_padding#1 printf_uint::@2/(const byte) printf_uint::format_zero_padding#0 )
[34] (byte) printf_number_buffer::format_justify_left#10 ← phi( printf_schar::@5/(byte) 0 printf_uint::@2/(const byte) printf_uint::format_justify_left#0 )
[34] (byte) printf_number_buffer::format_min_length#2 ← phi( printf_schar::@5/(byte) 6 printf_uint::@2/(const byte) printf_uint::format_min_length#0 )
[35] if((byte) 0==(byte) printf_number_buffer::format_min_length#2) goto printf_number_buffer::@1
[60] (byte) printf_number_buffer::format_upper_case#10 ← phi( printf_schar::@5/(byte) 0 printf_uint::@2/(const byte) printf_uint::format_upper_case#0 )
[60] (byte) printf_number_buffer::buffer_sign#10 ← phi( printf_schar::@5/(byte) printf_number_buffer::buffer_sign#1 printf_uint::@2/(byte) printf_number_buffer::buffer_sign#0 )
[60] (byte*) printf_number_buffer::buffer_digits#10 ← phi( printf_schar::@5/(byte*)&(struct printf_buffer_number) printf_buffer+(const byte) OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS printf_uint::@2/(byte*)&(struct printf_buffer_number) printf_buffer+(const byte) OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS )
[60] (byte) printf_number_buffer::format_zero_padding#10 ← phi( printf_schar::@5/(byte) printf_number_buffer::format_zero_padding#1 printf_uint::@2/(const byte) printf_uint::format_zero_padding#0 )
[60] (byte) printf_number_buffer::format_justify_left#10 ← phi( printf_schar::@5/(byte) 0 printf_uint::@2/(const byte) printf_uint::format_justify_left#0 )
[60] (byte) printf_number_buffer::format_min_length#2 ← phi( printf_schar::@5/(byte) 6 printf_uint::@2/(const byte) printf_uint::format_min_length#0 )
[61] if((byte) 0==(byte) printf_number_buffer::format_min_length#2) goto printf_number_buffer::@1
to:printf_number_buffer::@6
printf_number_buffer::@6: scope:[printf_number_buffer] from printf_number_buffer
[36] (byte*) strlen::str#1 ← (byte*) printf_number_buffer::buffer_digits#10
[37] call strlen
[38] (word) strlen::return#2 ← (word) strlen::len#2
[62] (byte*) strlen::str#1 ← (byte*) printf_number_buffer::buffer_digits#10
[63] call strlen
[64] (word) strlen::return#2 ← (word) strlen::len#2
to:printf_number_buffer::@14
printf_number_buffer::@14: scope:[printf_number_buffer] from printf_number_buffer::@6
[39] (word~) printf_number_buffer::$19 ← (word) strlen::return#2
[40] (signed byte) printf_number_buffer::len#0 ← (signed byte)(word~) printf_number_buffer::$19
[41] if((byte) 0==(byte) printf_number_buffer::buffer_sign#10) goto printf_number_buffer::@13
[65] (word~) printf_number_buffer::$19 ← (word) strlen::return#2
[66] (signed byte) printf_number_buffer::len#0 ← (signed byte)(word~) printf_number_buffer::$19
[67] if((byte) 0==(byte) printf_number_buffer::buffer_sign#10) goto printf_number_buffer::@13
to:printf_number_buffer::@7
printf_number_buffer::@7: scope:[printf_number_buffer] from printf_number_buffer::@14
[42] (signed byte) printf_number_buffer::len#1 ← ++ (signed byte) printf_number_buffer::len#0
[68] (signed byte) printf_number_buffer::len#1 ← ++ (signed byte) printf_number_buffer::len#0
to:printf_number_buffer::@13
printf_number_buffer::@13: scope:[printf_number_buffer] from printf_number_buffer::@14 printf_number_buffer::@7
[43] (signed byte) printf_number_buffer::len#2 ← phi( printf_number_buffer::@14/(signed byte) printf_number_buffer::len#0 printf_number_buffer::@7/(signed byte) printf_number_buffer::len#1 )
[44] (signed byte) printf_number_buffer::padding#1 ← (signed byte)(byte) printf_number_buffer::format_min_length#2 - (signed byte) printf_number_buffer::len#2
[45] if((signed byte) printf_number_buffer::padding#1>=(signed byte) 0) goto printf_number_buffer::@21
[69] (signed byte) printf_number_buffer::len#2 ← phi( printf_number_buffer::@14/(signed byte) printf_number_buffer::len#0 printf_number_buffer::@7/(signed byte) printf_number_buffer::len#1 )
[70] (signed byte) printf_number_buffer::padding#1 ← (signed byte)(byte) printf_number_buffer::format_min_length#2 - (signed byte) printf_number_buffer::len#2
[71] if((signed byte) printf_number_buffer::padding#1>=(signed byte) 0) goto printf_number_buffer::@21
to:printf_number_buffer::@1
printf_number_buffer::@21: scope:[printf_number_buffer] from printf_number_buffer::@13
[46] phi()
[72] phi()
to:printf_number_buffer::@1
printf_number_buffer::@1: scope:[printf_number_buffer] from printf_number_buffer printf_number_buffer::@13 printf_number_buffer::@21
[47] (signed byte) printf_number_buffer::padding#10 ← phi( printf_number_buffer/(signed byte) 0 printf_number_buffer::@21/(signed byte) printf_number_buffer::padding#1 printf_number_buffer::@13/(signed byte) 0 )
[48] if((byte) 0!=(byte) printf_number_buffer::format_justify_left#10) goto printf_number_buffer::@2
[73] (signed byte) printf_number_buffer::padding#10 ← phi( printf_number_buffer/(signed byte) 0 printf_number_buffer::@21/(signed byte) printf_number_buffer::padding#1 printf_number_buffer::@13/(signed byte) 0 )
[74] if((byte) 0!=(byte) printf_number_buffer::format_justify_left#10) goto printf_number_buffer::@2
to:printf_number_buffer::@17
printf_number_buffer::@17: scope:[printf_number_buffer] from printf_number_buffer::@1
[49] if((byte) 0!=(byte) printf_number_buffer::format_zero_padding#10) goto printf_number_buffer::@2
[75] if((byte) 0!=(byte) printf_number_buffer::format_zero_padding#10) goto printf_number_buffer::@2
to:printf_number_buffer::@16
printf_number_buffer::@16: scope:[printf_number_buffer] from printf_number_buffer::@17
[50] if((signed byte) 0!=(signed byte) printf_number_buffer::padding#10) goto printf_number_buffer::@8
[76] if((signed byte) 0!=(signed byte) printf_number_buffer::padding#10) goto printf_number_buffer::@8
to:printf_number_buffer::@2
printf_number_buffer::@8: scope:[printf_number_buffer] from printf_number_buffer::@16
[51] (byte) printf_padding::length#0 ← (byte)(signed byte) printf_number_buffer::padding#10
[52] call printf_padding
[77] (byte) printf_padding::length#0 ← (byte)(signed byte) printf_number_buffer::padding#10
[78] call printf_padding
to:printf_number_buffer::@2
printf_number_buffer::@2: scope:[printf_number_buffer] from printf_number_buffer::@1 printf_number_buffer::@16 printf_number_buffer::@17 printf_number_buffer::@8
[53] if((byte) 0==(byte) printf_number_buffer::buffer_sign#10) goto printf_number_buffer::@3
[79] if((byte) 0==(byte) printf_number_buffer::buffer_sign#10) goto printf_number_buffer::@3
to:printf_number_buffer::@9
printf_number_buffer::@9: scope:[printf_number_buffer] from printf_number_buffer::@2
[54] (byte) printf_char::ch#2 ← (byte) printf_number_buffer::buffer_sign#10
[55] call printf_char
[80] (byte) printf_char::ch#2 ← (byte) printf_number_buffer::buffer_sign#10
[81] call printf_char
to:printf_number_buffer::@3
printf_number_buffer::@3: scope:[printf_number_buffer] from printf_number_buffer::@2 printf_number_buffer::@9
[56] if((byte) 0==(byte) printf_number_buffer::format_zero_padding#10) goto printf_number_buffer::@4
[82] if((byte) 0==(byte) printf_number_buffer::format_zero_padding#10) goto printf_number_buffer::@4
to:printf_number_buffer::@18
printf_number_buffer::@18: scope:[printf_number_buffer] from printf_number_buffer::@3
[57] if((signed byte) 0!=(signed byte) printf_number_buffer::padding#10) goto printf_number_buffer::@10
[83] if((signed byte) 0!=(signed byte) printf_number_buffer::padding#10) goto printf_number_buffer::@10
to:printf_number_buffer::@4
printf_number_buffer::@10: scope:[printf_number_buffer] from printf_number_buffer::@18
[58] (byte) printf_padding::length#1 ← (byte)(signed byte) printf_number_buffer::padding#10
[59] call printf_padding
[84] (byte) printf_padding::length#1 ← (byte)(signed byte) printf_number_buffer::padding#10
[85] call printf_padding
to:printf_number_buffer::@4
printf_number_buffer::@4: scope:[printf_number_buffer] from printf_number_buffer::@10 printf_number_buffer::@18 printf_number_buffer::@3
[60] if((byte) 0==(byte) printf_number_buffer::format_upper_case#10) goto printf_number_buffer::@5
[86] if((byte) 0==(byte) printf_number_buffer::format_upper_case#10) goto printf_number_buffer::@5
to:printf_number_buffer::@11
printf_number_buffer::@11: scope:[printf_number_buffer] from printf_number_buffer::@4
[61] (byte*) strupr::str#0 ← (byte*) printf_number_buffer::buffer_digits#10
[62] call strupr
[87] (byte*) strupr::str#0 ← (byte*) printf_number_buffer::buffer_digits#10
[88] call strupr
to:printf_number_buffer::@5
printf_number_buffer::@5: scope:[printf_number_buffer] from printf_number_buffer::@11 printf_number_buffer::@4
[63] (byte*) printf_str::str#1 ← (byte*) printf_number_buffer::buffer_digits#10
[64] call printf_str
[89] (byte*) printf_str::str#1 ← (byte*) printf_number_buffer::buffer_digits#10
[90] call printf_str
to:printf_number_buffer::@15
printf_number_buffer::@15: scope:[printf_number_buffer] from printf_number_buffer::@5
[65] if((byte) 0==(byte) printf_number_buffer::format_justify_left#10) goto printf_number_buffer::@return
[91] if((byte) 0==(byte) printf_number_buffer::format_justify_left#10) goto printf_number_buffer::@return
to:printf_number_buffer::@20
printf_number_buffer::@20: scope:[printf_number_buffer] from printf_number_buffer::@15
[66] if((byte) 0!=(byte) printf_number_buffer::format_zero_padding#10) goto printf_number_buffer::@return
[92] if((byte) 0!=(byte) printf_number_buffer::format_zero_padding#10) goto printf_number_buffer::@return
to:printf_number_buffer::@19
printf_number_buffer::@19: scope:[printf_number_buffer] from printf_number_buffer::@20
[67] if((signed byte) 0!=(signed byte) printf_number_buffer::padding#10) goto printf_number_buffer::@12
[93] if((signed byte) 0!=(signed byte) printf_number_buffer::padding#10) goto printf_number_buffer::@12
to:printf_number_buffer::@return
printf_number_buffer::@12: scope:[printf_number_buffer] from printf_number_buffer::@19
[68] (byte) printf_padding::length#2 ← (byte)(signed byte) printf_number_buffer::padding#10
[69] call printf_padding
[94] (byte) printf_padding::length#2 ← (byte)(signed byte) printf_number_buffer::padding#10
[95] call printf_padding
to:printf_number_buffer::@return
printf_number_buffer::@return: scope:[printf_number_buffer] from printf_number_buffer::@12 printf_number_buffer::@15 printf_number_buffer::@19 printf_number_buffer::@20
[70] return
[96] return
to:@return
(void()) printf_padding((byte) printf_padding::pad , (byte) printf_padding::length)
printf_padding: scope:[printf_padding] from printf_number_buffer::@10 printf_number_buffer::@12 printf_number_buffer::@8
[71] (byte) printf_padding::pad#5 ← phi( printf_number_buffer::@10/(byte) '0' printf_number_buffer::@12/(byte) ' ' printf_number_buffer::@8/(byte) ' ' )
[71] (byte) printf_padding::length#4 ← phi( printf_number_buffer::@10/(byte) printf_padding::length#1 printf_number_buffer::@12/(byte) printf_padding::length#2 printf_number_buffer::@8/(byte) printf_padding::length#0 )
[97] (byte) printf_padding::pad#5 ← phi( printf_number_buffer::@10/(byte) '0' printf_number_buffer::@12/(byte) ' ' printf_number_buffer::@8/(byte) ' ' )
[97] (byte) printf_padding::length#4 ← phi( printf_number_buffer::@10/(byte) printf_padding::length#1 printf_number_buffer::@12/(byte) printf_padding::length#2 printf_number_buffer::@8/(byte) printf_padding::length#0 )
to:printf_padding::@1
printf_padding::@1: scope:[printf_padding] from printf_padding printf_padding::@3
[72] (byte) printf_padding::i#2 ← phi( printf_padding/(byte) 0 printf_padding::@3/(byte) printf_padding::i#1 )
[73] if((byte) printf_padding::i#2<(byte) printf_padding::length#4) goto printf_padding::@2
[98] (byte) printf_padding::i#2 ← phi( printf_padding/(byte) 0 printf_padding::@3/(byte) printf_padding::i#1 )
[99] if((byte) printf_padding::i#2<(byte) printf_padding::length#4) goto printf_padding::@2
to:printf_padding::@return
printf_padding::@return: scope:[printf_padding] from printf_padding::@1
[74] return
[100] return
to:@return
printf_padding::@2: scope:[printf_padding] from printf_padding::@1
[75] (byte) printf_char::ch#0 ← (byte) printf_padding::pad#5
[76] call printf_char
[101] (byte) printf_char::ch#0 ← (byte) printf_padding::pad#5
[102] call printf_char
to:printf_padding::@3
printf_padding::@3: scope:[printf_padding] from printf_padding::@2
[77] (byte) printf_padding::i#1 ← ++ (byte) printf_padding::i#2
[103] (byte) printf_padding::i#1 ← ++ (byte) printf_padding::i#2
to:printf_padding::@1
(void()) printf_char((byte) printf_char::ch)
printf_char: scope:[printf_char] from printf_number_buffer::@9 printf_padding::@2 printf_str::@5
[78] (byte) printf_char::ch#3 ← phi( printf_number_buffer::@9/(byte) printf_char::ch#2 printf_padding::@2/(byte) printf_char::ch#0 printf_str::@5/(byte) printf_char::ch#1 )
[79] *((byte*) printf_cursor_ptr) ← (byte) printf_char::ch#3
[80] (byte*) printf_cursor_ptr ← ++ (byte*) printf_cursor_ptr
[81] (byte) printf_cursor_x ← ++ (byte) printf_cursor_x
[82] if((byte) printf_cursor_x!=(byte) $28) goto printf_char::@return
[104] (byte) printf_char::ch#3 ← phi( printf_number_buffer::@9/(byte) printf_char::ch#2 printf_padding::@2/(byte) printf_char::ch#0 printf_str::@5/(byte) printf_char::ch#1 )
[105] *((byte*) printf_cursor_ptr) ← (byte) printf_char::ch#3
[106] (byte*) printf_cursor_ptr ← ++ (byte*) printf_cursor_ptr
[107] (byte) printf_cursor_x ← ++ (byte) printf_cursor_x
[108] if((byte) printf_cursor_x!=(byte) $28) goto printf_char::@return
to:printf_char::@1
printf_char::@1: scope:[printf_char] from printf_char
[83] (byte) printf_cursor_x ← (byte) 0
[84] (byte) printf_cursor_y ← ++ (byte) printf_cursor_y
[85] if((byte) printf_cursor_y!=(byte) $19) goto printf_char::@return
to:printf_char::@2
printf_char::@2: scope:[printf_char] from printf_char::@1
[86] phi()
[87] call memcpy
to:printf_char::@3
printf_char::@3: scope:[printf_char] from printf_char::@2
[88] phi()
[89] call memset
to:printf_char::@4
printf_char::@4: scope:[printf_char] from printf_char::@3
[90] (byte*~) printf_char::$6 ← (byte*) printf_cursor_ptr - (byte) $28
[91] (byte*) printf_cursor_ptr ← (byte*~) printf_char::$6
[92] (byte) printf_cursor_y ← -- (byte) printf_cursor_y
[109] (byte) printf_cursor_x ← (byte) 0
[110] (byte) printf_cursor_y ← ++ (byte) printf_cursor_y
[111] call printf_scroll
to:printf_char::@return
printf_char::@return: scope:[printf_char] from printf_char printf_char::@1 printf_char::@4
[93] return
printf_char::@return: scope:[printf_char] from printf_char printf_char::@1
[112] return
to:@return
(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num)
memset: scope:[memset] from printf_char::@3 printf_cls
[94] (byte) memset::c#4 ← phi( printf_char::@3/(byte) ' ' printf_cls/(byte) ' ' )
[94] (void*) memset::str#3 ← phi( printf_char::@3/(void*)(number) $400+(number) $28*(number) $19-(number) $28 printf_cls/(void*) 1024 )
[94] (word) memset::num#2 ← phi( printf_char::@3/(byte) $28 printf_cls/(word)(number) $28*(number) $19 )
[95] if((word) memset::num#2<=(byte) 0) goto memset::@return
to:memset::@1
memset::@1: scope:[memset] from memset
[96] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) memset::num#2
[97] (byte*) memset::dst#4 ← (byte*)(void*) memset::str#3
to:memset::@2
memset::@2: scope:[memset] from memset::@1 memset::@3
[98] (byte*) memset::dst#2 ← phi( memset::@1/(byte*) memset::dst#4 memset::@3/(byte*) memset::dst#1 )
[99] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@3
to:memset::@return
memset::@return: scope:[memset] from memset memset::@2
[100] return
to:@return
memset::@3: scope:[memset] from memset::@2
[101] *((byte*) memset::dst#2) ← (byte) memset::c#4
[102] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2
to:memset::@2
(void*()) memcpy((void*) memcpy::destination , (void*) memcpy::source , (word) memcpy::num)
memcpy: scope:[memcpy] from printf_char::@2
[103] phi()
to:memcpy::@1
memcpy::@1: scope:[memcpy] from memcpy memcpy::@2
[104] (byte*) memcpy::dst#2 ← phi( memcpy/(byte*)(const void*) memcpy::destination#0 memcpy::@2/(byte*) memcpy::dst#1 )
[104] (byte*) memcpy::src#2 ← phi( memcpy/(byte*)(const void*) memcpy::source#0 memcpy::@2/(byte*) memcpy::src#1 )
[105] if((byte*) memcpy::src#2!=(const byte*) memcpy::src_end#0) goto memcpy::@2
to:memcpy::@return
memcpy::@return: scope:[memcpy] from memcpy::@1
[106] return
to:@return
memcpy::@2: scope:[memcpy] from memcpy::@1
[107] *((byte*) memcpy::dst#2) ← *((byte*) memcpy::src#2)
[108] (byte*) memcpy::dst#1 ← ++ (byte*) memcpy::dst#2
[109] (byte*) memcpy::src#1 ← ++ (byte*) memcpy::src#2
to:memcpy::@1
(void()) printf_str((byte*) printf_str::str)
printf_str: scope:[printf_str] from printf_number_buffer::@5
[110] phi()
[113] phi()
to:printf_str::@1
printf_str::@1: scope:[printf_str] from printf_str printf_str::@4 printf_str::@5
[111] (byte*) printf_str::str#2 ← phi( printf_str/(byte*) printf_str::str#1 printf_str::@4/(byte*) printf_str::str#0 printf_str::@5/(byte*) printf_str::str#0 )
[114] (byte*) printf_str::str#2 ← phi( printf_str/(byte*) printf_str::str#1 printf_str::@4/(byte*) printf_str::str#0 printf_str::@5/(byte*) printf_str::str#0 )
to:printf_str::@2
printf_str::@2: scope:[printf_str] from printf_str::@1
[112] (byte) printf_str::ch#0 ← *((byte*) printf_str::str#2)
[113] (byte*) printf_str::str#0 ← ++ (byte*) printf_str::str#2
[114] if((byte) printf_str::ch#0!=(byte) 0) goto printf_str::@3
[115] (byte) printf_str::ch#0 ← *((byte*) printf_str::str#2)
[116] (byte*) printf_str::str#0 ← ++ (byte*) printf_str::str#2
[117] if((byte) printf_str::ch#0!=(byte) 0) goto printf_str::@3
to:printf_str::@return
printf_str::@return: scope:[printf_str] from printf_str::@2
[115] return
[118] return
to:@return
printf_str::@3: scope:[printf_str] from printf_str::@2
[116] if((byte) printf_str::ch#0==(byte) '
[119] if((byte) printf_str::ch#0==(byte) '
') goto printf_str::@4
to:printf_str::@5
printf_str::@5: scope:[printf_str] from printf_str::@3
[117] (byte) printf_char::ch#1 ← (byte) printf_str::ch#0
[118] call printf_char
[120] (byte) printf_char::ch#1 ← (byte) printf_str::ch#0
[121] call printf_char
to:printf_str::@1
printf_str::@4: scope:[printf_str] from printf_str::@3
[119] phi()
[120] call printf_ln
[122] phi()
[123] call printf_ln
to:printf_str::@1
(byte*()) strupr((byte*) strupr::str)
strupr: scope:[strupr] from printf_number_buffer::@11
[121] phi()
[124] phi()
to:strupr::@1
strupr::@1: scope:[strupr] from strupr strupr::@3
[122] (byte*) strupr::src#2 ← phi( strupr/(byte*) strupr::str#0 strupr::@3/(byte*) strupr::src#1 )
[123] if((byte) 0!=*((byte*) strupr::src#2)) goto strupr::@2
[125] (byte*) strupr::src#2 ← phi( strupr/(byte*) strupr::str#0 strupr::@3/(byte*) strupr::src#1 )
[126] if((byte) 0!=*((byte*) strupr::src#2)) goto strupr::@2
to:strupr::@return
strupr::@return: scope:[strupr] from strupr::@1
[124] return
[127] return
to:@return
strupr::@2: scope:[strupr] from strupr::@1
[125] (byte) toupper::ch#0 ← *((byte*) strupr::src#2)
[126] call toupper
[127] (byte) toupper::return#3 ← (byte) toupper::return#2
[128] (byte) toupper::ch#0 ← *((byte*) strupr::src#2)
[129] call toupper
[130] (byte) toupper::return#3 ← (byte) toupper::return#2
to:strupr::@3
strupr::@3: scope:[strupr] from strupr::@2
[128] (byte~) strupr::$0 ← (byte) toupper::return#3
[129] *((byte*) strupr::src#2) ← (byte~) strupr::$0
[130] (byte*) strupr::src#1 ← ++ (byte*) strupr::src#2
[131] (byte~) strupr::$0 ← (byte) toupper::return#3
[132] *((byte*) strupr::src#2) ← (byte~) strupr::$0
[133] (byte*) strupr::src#1 ← ++ (byte*) strupr::src#2
to:strupr::@1
(byte()) toupper((byte) toupper::ch)
toupper: scope:[toupper] from strupr::@2
[131] if((byte) toupper::ch#0<(byte) 'a') goto toupper::@return
[134] if((byte) toupper::ch#0<(byte) 'a') goto toupper::@return
to:toupper::@2
toupper::@2: scope:[toupper] from toupper
[132] if((byte) toupper::ch#0<=(byte) 'z') goto toupper::@1
[135] if((byte) toupper::ch#0<=(byte) 'z') goto toupper::@1
to:toupper::@return
toupper::@1: scope:[toupper] from toupper::@2
[133] (byte) toupper::return#0 ← (byte) toupper::ch#0 + (byte) 'A'-(byte) 'a'
[136] (byte) toupper::return#0 ← (byte) toupper::ch#0 + (byte) 'A'-(byte) 'a'
to:toupper::@return
toupper::@return: scope:[toupper] from toupper toupper::@1 toupper::@2
[134] (byte) toupper::return#2 ← phi( toupper::@1/(byte) toupper::return#0 toupper/(byte) toupper::ch#0 toupper::@2/(byte) toupper::ch#0 )
[135] return
[137] (byte) toupper::return#2 ← phi( toupper::@1/(byte) toupper::return#0 toupper/(byte) toupper::ch#0 toupper::@2/(byte) toupper::ch#0 )
[138] return
to:@return
(word()) strlen((byte*) strlen::str)
strlen: scope:[strlen] from printf_number_buffer::@6
[136] phi()
[139] phi()
to:strlen::@1
strlen::@1: scope:[strlen] from strlen strlen::@2
[137] (word) strlen::len#2 ← phi( strlen/(word) 0 strlen::@2/(word) strlen::len#1 )
[137] (byte*) strlen::str#2 ← phi( strlen/(byte*) strlen::str#1 strlen::@2/(byte*) strlen::str#0 )
[138] if((byte) 0!=*((byte*) strlen::str#2)) goto strlen::@2
[140] (word) strlen::len#2 ← phi( strlen/(word) 0 strlen::@2/(word) strlen::len#1 )
[140] (byte*) strlen::str#2 ← phi( strlen/(byte*) strlen::str#1 strlen::@2/(byte*) strlen::str#0 )
[141] if((byte) 0!=*((byte*) strlen::str#2)) goto strlen::@2
to:strlen::@return
strlen::@return: scope:[strlen] from strlen::@1
[139] return
[142] return
to:@return
strlen::@2: scope:[strlen] from strlen::@1
[140] (word) strlen::len#1 ← ++ (word) strlen::len#2
[141] (byte*) strlen::str#0 ← ++ (byte*) strlen::str#2
[143] (word) strlen::len#1 ← ++ (word) strlen::len#2
[144] (byte*) strlen::str#0 ← ++ (byte*) strlen::str#2
to:strlen::@1
(void()) utoa((word) utoa::value , (byte*) utoa::buffer , (byte) utoa::radix)
utoa: scope:[utoa] from printf_uint::@1
[142] phi()
[145] phi()
to:utoa::@1
utoa::@1: scope:[utoa] from utoa utoa::@4
[143] (byte*) utoa::buffer#11 ← phi( utoa::@4/(byte*) utoa::buffer#14 utoa/(byte*)&(struct printf_buffer_number) printf_buffer+(const byte) OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS )
[143] (byte) utoa::started#2 ← phi( utoa::@4/(byte) utoa::started#4 utoa/(byte) 0 )
[143] (word) utoa::value#2 ← phi( utoa::@4/(word) utoa::value#6 utoa/(const word) printf_uint::uvalue#0 )
[143] (byte) utoa::digit#2 ← phi( utoa::@4/(byte) utoa::digit#1 utoa/(byte) 0 )
[144] if((byte) utoa::digit#2<(const byte) utoa::max_digits#2-(byte) 1) goto utoa::@2
[146] (byte*) utoa::buffer#11 ← phi( utoa::@4/(byte*) utoa::buffer#14 utoa/(byte*)&(struct printf_buffer_number) printf_buffer+(const byte) OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS )
[146] (byte) utoa::started#2 ← phi( utoa::@4/(byte) utoa::started#4 utoa/(byte) 0 )
[146] (word) utoa::value#2 ← phi( utoa::@4/(word) utoa::value#6 utoa/(const word) printf_uint::uvalue#0 )
[146] (byte) utoa::digit#2 ← phi( utoa::@4/(byte) utoa::digit#1 utoa/(byte) 0 )
[147] if((byte) utoa::digit#2<(const byte) utoa::max_digits#2-(byte) 1) goto utoa::@2
to:utoa::@3
utoa::@3: scope:[utoa] from utoa::@1
[145] (byte~) utoa::$11 ← (byte)(word) utoa::value#2
[146] *((byte*) utoa::buffer#11) ← *((const byte*) DIGITS + (byte~) utoa::$11)
[147] (byte*) utoa::buffer#3 ← ++ (byte*) utoa::buffer#11
[148] *((byte*) utoa::buffer#3) ← (byte) 0
[148] (byte~) utoa::$11 ← (byte)(word) utoa::value#2
[149] *((byte*) utoa::buffer#11) ← *((const byte*) DIGITS + (byte~) utoa::$11)
[150] (byte*) utoa::buffer#3 ← ++ (byte*) utoa::buffer#11
[151] *((byte*) utoa::buffer#3) ← (byte) 0
to:utoa::@return
utoa::@return: scope:[utoa] from utoa::@3
[149] return
[152] return
to:@return
utoa::@2: scope:[utoa] from utoa::@1
[150] (byte~) utoa::$10 ← (byte) utoa::digit#2 << (byte) 1
[151] (word) utoa::digit_value#0 ← *((const word*) RADIX_HEXADECIMAL_VALUES + (byte~) utoa::$10)
[152] if((byte) 0!=(byte) utoa::started#2) goto utoa::@5
[153] (byte~) utoa::$10 ← (byte) utoa::digit#2 << (byte) 1
[154] (word) utoa::digit_value#0 ← *((const word*) RADIX_HEXADECIMAL_VALUES + (byte~) utoa::$10)
[155] if((byte) 0!=(byte) utoa::started#2) goto utoa::@5
to:utoa::@7
utoa::@7: scope:[utoa] from utoa::@2
[153] if((word) utoa::value#2>=(word) utoa::digit_value#0) goto utoa::@5
[156] if((word) utoa::value#2>=(word) utoa::digit_value#0) goto utoa::@5
to:utoa::@4
utoa::@4: scope:[utoa] from utoa::@6 utoa::@7
[154] (byte*) utoa::buffer#14 ← phi( utoa::@7/(byte*) utoa::buffer#11 utoa::@6/(byte*) utoa::buffer#4 )
[154] (byte) utoa::started#4 ← phi( utoa::@7/(byte) utoa::started#2 utoa::@6/(byte) 1 )
[154] (word) utoa::value#6 ← phi( utoa::@7/(word) utoa::value#2 utoa::@6/(word) utoa::value#0 )
[155] (byte) utoa::digit#1 ← ++ (byte) utoa::digit#2
[157] (byte*) utoa::buffer#14 ← phi( utoa::@7/(byte*) utoa::buffer#11 utoa::@6/(byte*) utoa::buffer#4 )
[157] (byte) utoa::started#4 ← phi( utoa::@7/(byte) utoa::started#2 utoa::@6/(byte) 1 )
[157] (word) utoa::value#6 ← phi( utoa::@7/(word) utoa::value#2 utoa::@6/(word) utoa::value#0 )
[158] (byte) utoa::digit#1 ← ++ (byte) utoa::digit#2
to:utoa::@1
utoa::@5: scope:[utoa] from utoa::@2 utoa::@7
[156] (byte*) utoa_append::buffer#0 ← (byte*) utoa::buffer#11
[157] (word) utoa_append::value#0 ← (word) utoa::value#2
[158] (word) utoa_append::sub#0 ← (word) utoa::digit_value#0
[159] call utoa_append
[160] (word) utoa_append::return#0 ← (word) utoa_append::value#2
[159] (byte*) utoa_append::buffer#0 ← (byte*) utoa::buffer#11
[160] (word) utoa_append::value#0 ← (word) utoa::value#2
[161] (word) utoa_append::sub#0 ← (word) utoa::digit_value#0
[162] call utoa_append
[163] (word) utoa_append::return#0 ← (word) utoa_append::value#2
to:utoa::@6
utoa::@6: scope:[utoa] from utoa::@5
[161] (word) utoa::value#0 ← (word) utoa_append::return#0
[162] (byte*) utoa::buffer#4 ← ++ (byte*) utoa::buffer#11
[164] (word) utoa::value#0 ← (word) utoa_append::return#0
[165] (byte*) utoa::buffer#4 ← ++ (byte*) utoa::buffer#11
to:utoa::@4
(word()) utoa_append((byte*) utoa_append::buffer , (word) utoa_append::value , (word) utoa_append::sub)
utoa_append: scope:[utoa_append] from utoa::@5
[163] phi()
[166] phi()
to:utoa_append::@1
utoa_append::@1: scope:[utoa_append] from utoa_append utoa_append::@2
[164] (byte) utoa_append::digit#2 ← phi( utoa_append/(byte) 0 utoa_append::@2/(byte) utoa_append::digit#1 )
[164] (word) utoa_append::value#2 ← phi( utoa_append/(word) utoa_append::value#0 utoa_append::@2/(word) utoa_append::value#1 )
[165] if((word) utoa_append::value#2>=(word) utoa_append::sub#0) goto utoa_append::@2
[167] (byte) utoa_append::digit#2 ← phi( utoa_append/(byte) 0 utoa_append::@2/(byte) utoa_append::digit#1 )
[167] (word) utoa_append::value#2 ← phi( utoa_append/(word) utoa_append::value#0 utoa_append::@2/(word) utoa_append::value#1 )
[168] if((word) utoa_append::value#2>=(word) utoa_append::sub#0) goto utoa_append::@2
to:utoa_append::@3
utoa_append::@3: scope:[utoa_append] from utoa_append::@1
[166] *((byte*) utoa_append::buffer#0) ← *((const byte*) DIGITS + (byte) utoa_append::digit#2)
[169] *((byte*) utoa_append::buffer#0) ← *((const byte*) DIGITS + (byte) utoa_append::digit#2)
to:utoa_append::@return
utoa_append::@return: scope:[utoa_append] from utoa_append::@3
[167] return
[170] return
to:@return
utoa_append::@2: scope:[utoa_append] from utoa_append::@1
[168] (byte) utoa_append::digit#1 ← ++ (byte) utoa_append::digit#2
[169] (word) utoa_append::value#1 ← (word) utoa_append::value#2 - (word) utoa_append::sub#0
[171] (byte) utoa_append::digit#1 ← ++ (byte) utoa_append::digit#2
[172] (word) utoa_append::value#1 ← (word) utoa_append::value#2 - (word) utoa_append::sub#0
to:utoa_append::@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 main::@1 main::@3
[170] (byte) printf_schar::format_zero_padding#2 ← phi( main::@1/(byte) 0 main::@3/(byte) 1 )
[170] (byte) printf_schar::format_radix#2 ← phi( main::@1/(const byte) DECIMAL main::@3/(const byte) OCTAL )
[170] (byte) printf_schar::format_sign_always#2 ← phi( main::@1/(byte) 0 main::@3/(byte) 1 )
[170] (signed byte) printf_schar::value#3 ← phi( main::@1/(signed byte) -$4d main::@3/(signed byte) $63 )
[171] *((byte*)&(struct printf_buffer_number) printf_buffer) ← (byte) 0
[172] if((signed byte) printf_schar::value#3<(signed byte) 0) goto printf_schar::@1
[173] (byte) printf_schar::format_zero_padding#2 ← phi( main::@1/(byte) 0 main::@3/(byte) 1 )
[173] (byte) printf_schar::format_radix#2 ← phi( main::@1/(const byte) DECIMAL main::@3/(const byte) OCTAL )
[173] (byte) printf_schar::format_sign_always#2 ← phi( main::@1/(byte) 0 main::@3/(byte) 1 )
[173] (signed byte) printf_schar::value#3 ← phi( main::@1/(signed byte) -$4d main::@3/(signed byte) $63 )
[174] *((byte*)&(struct printf_buffer_number) printf_buffer) ← (byte) 0
[175] if((signed byte) printf_schar::value#3<(signed byte) 0) goto printf_schar::@1
to:printf_schar::@3
printf_schar::@3: scope:[printf_schar] from printf_schar
[173] if((byte) 0==(byte) printf_schar::format_sign_always#2) goto printf_schar::@2
[176] if((byte) 0==(byte) printf_schar::format_sign_always#2) goto printf_schar::@2
to:printf_schar::@4
printf_schar::@4: scope:[printf_schar] from printf_schar::@3
[174] *((byte*)&(struct printf_buffer_number) printf_buffer) ← (byte) '+'
[177] *((byte*)&(struct printf_buffer_number) printf_buffer) ← (byte) '+'
to:printf_schar::@2
printf_schar::@2: scope:[printf_schar] from printf_schar::@1 printf_schar::@3 printf_schar::@4
[175] (signed byte) printf_schar::value#5 ← phi( printf_schar::@1/(signed byte) printf_schar::value#0 printf_schar::@3/(signed byte) printf_schar::value#3 printf_schar::@4/(signed byte) printf_schar::value#3 )
[176] (byte) uctoa::value#1 ← (byte)(signed byte) printf_schar::value#5
[177] (byte) uctoa::radix#0 ← (byte) printf_schar::format_radix#2
[178] call uctoa
[178] (signed byte) printf_schar::value#5 ← phi( printf_schar::@1/(signed byte) printf_schar::value#0 printf_schar::@3/(signed byte) printf_schar::value#3 printf_schar::@4/(signed byte) printf_schar::value#3 )
[179] (byte) uctoa::value#1 ← (byte)(signed byte) printf_schar::value#5
[180] (byte) uctoa::radix#0 ← (byte) printf_schar::format_radix#2
[181] call uctoa
to:printf_schar::@5
printf_schar::@5: scope:[printf_schar] from printf_schar::@2
[179] (byte) printf_number_buffer::buffer_sign#1 ← *((byte*)&(struct printf_buffer_number) printf_buffer)
[180] (byte) printf_number_buffer::format_zero_padding#1 ← (byte) printf_schar::format_zero_padding#2
[181] call printf_number_buffer
[182] (byte) printf_number_buffer::buffer_sign#1 ← *((byte*)&(struct printf_buffer_number) printf_buffer)
[183] (byte) printf_number_buffer::format_zero_padding#1 ← (byte) printf_schar::format_zero_padding#2
[184] call printf_number_buffer
to:printf_schar::@return
printf_schar::@return: scope:[printf_schar] from printf_schar::@5
[182] return
[185] return
to:@return
printf_schar::@1: scope:[printf_schar] from printf_schar
[183] (signed byte) printf_schar::value#0 ← - (signed byte) printf_schar::value#3
[184] *((byte*)&(struct printf_buffer_number) printf_buffer) ← (byte) '-'
[186] (signed byte) printf_schar::value#0 ← - (signed byte) printf_schar::value#3
[187] *((byte*)&(struct printf_buffer_number) printf_buffer) ← (byte) '-'
to:printf_schar::@2
(void()) uctoa((byte) uctoa::value , (byte*) uctoa::buffer , (byte) uctoa::radix)
uctoa: scope:[uctoa] from printf_schar::@2
[185] if((byte) uctoa::radix#0==(const byte) DECIMAL) goto uctoa::@1
[188] if((byte) uctoa::radix#0==(const byte) DECIMAL) goto uctoa::@1
to:uctoa::@2
uctoa::@2: scope:[uctoa] from uctoa
[186] if((byte) uctoa::radix#0==(const byte) HEXADECIMAL) goto uctoa::@1
[189] if((byte) uctoa::radix#0==(const byte) HEXADECIMAL) goto uctoa::@1
to:uctoa::@3
uctoa::@3: scope:[uctoa] from uctoa::@2
[187] if((byte) uctoa::radix#0==(const byte) OCTAL) goto uctoa::@1
[190] if((byte) uctoa::radix#0==(const byte) OCTAL) goto uctoa::@1
to:uctoa::@4
uctoa::@4: scope:[uctoa] from uctoa::@3
[188] if((byte) uctoa::radix#0==(const byte) BINARY) goto uctoa::@1
[191] if((byte) uctoa::radix#0==(const byte) BINARY) goto uctoa::@1
to:uctoa::@5
uctoa::@5: scope:[uctoa] from uctoa::@4
[189] *((byte*)&(struct printf_buffer_number) printf_buffer+(const byte) OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS) ← (byte) 'e'
[190] *((byte*)&(struct printf_buffer_number) printf_buffer+(const byte) OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS+(byte) 1) ← (byte) 'r'
[191] *((byte*)&(struct printf_buffer_number) printf_buffer+(const byte) OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS+(byte) 2) ← (byte) 'r'
[192] *((byte*)&(struct printf_buffer_number) printf_buffer+(const byte) OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS+(byte) 3) ← (byte) 0
[192] *((byte*)&(struct printf_buffer_number) printf_buffer+(const byte) OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS) ← (byte) 'e'
[193] *((byte*)&(struct printf_buffer_number) printf_buffer+(const byte) OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS+(byte) 1) ← (byte) 'r'
[194] *((byte*)&(struct printf_buffer_number) printf_buffer+(const byte) OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS+(byte) 2) ← (byte) 'r'
[195] *((byte*)&(struct printf_buffer_number) printf_buffer+(const byte) OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS+(byte) 3) ← (byte) 0
to:uctoa::@return
uctoa::@return: scope:[uctoa] from uctoa::@5 uctoa::@8
[193] return
[196] return
to:@return
uctoa::@1: scope:[uctoa] from uctoa uctoa::@2 uctoa::@3 uctoa::@4
[194] (byte*) uctoa::digit_values#8 ← phi( uctoa/(const byte*) RADIX_DECIMAL_VALUES_CHAR uctoa::@2/(const byte*) RADIX_HEXADECIMAL_VALUES_CHAR uctoa::@3/(const byte*) RADIX_OCTAL_VALUES_CHAR uctoa::@4/(const byte*) RADIX_BINARY_VALUES_CHAR )
[194] (byte) uctoa::max_digits#7 ← phi( uctoa/(byte) 3 uctoa::@2/(byte) 2 uctoa::@3/(byte) 3 uctoa::@4/(byte) 8 )
[197] (byte*) uctoa::digit_values#8 ← phi( uctoa/(const byte*) RADIX_DECIMAL_VALUES_CHAR uctoa::@2/(const byte*) RADIX_HEXADECIMAL_VALUES_CHAR uctoa::@3/(const byte*) RADIX_OCTAL_VALUES_CHAR uctoa::@4/(const byte*) RADIX_BINARY_VALUES_CHAR )
[197] (byte) uctoa::max_digits#7 ← phi( uctoa/(byte) 3 uctoa::@2/(byte) 2 uctoa::@3/(byte) 3 uctoa::@4/(byte) 8 )
to:uctoa::@6
uctoa::@6: scope:[uctoa] from uctoa::@1 uctoa::@9
[195] (byte*) uctoa::buffer#11 ← phi( uctoa::@9/(byte*) uctoa::buffer#14 uctoa::@1/(byte*)&(struct printf_buffer_number) printf_buffer+(const byte) OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS )
[195] (byte) uctoa::started#2 ← phi( uctoa::@9/(byte) uctoa::started#4 uctoa::@1/(byte) 0 )
[195] (byte) uctoa::value#2 ← phi( uctoa::@9/(byte) uctoa::value#6 uctoa::@1/(byte) uctoa::value#1 )
[195] (byte) uctoa::digit#2 ← phi( uctoa::@9/(byte) uctoa::digit#1 uctoa::@1/(byte) 0 )
[196] (byte~) uctoa::$4 ← (byte) uctoa::max_digits#7 - (byte) 1
[197] if((byte) uctoa::digit#2<(byte~) uctoa::$4) goto uctoa::@7
[198] (byte*) uctoa::buffer#11 ← phi( uctoa::@9/(byte*) uctoa::buffer#14 uctoa::@1/(byte*)&(struct printf_buffer_number) printf_buffer+(const byte) OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS )
[198] (byte) uctoa::started#2 ← phi( uctoa::@9/(byte) uctoa::started#4 uctoa::@1/(byte) 0 )
[198] (byte) uctoa::value#2 ← phi( uctoa::@9/(byte) uctoa::value#6 uctoa::@1/(byte) uctoa::value#1 )
[198] (byte) uctoa::digit#2 ← phi( uctoa::@9/(byte) uctoa::digit#1 uctoa::@1/(byte) 0 )
[199] (byte~) uctoa::$4 ← (byte) uctoa::max_digits#7 - (byte) 1
[200] if((byte) uctoa::digit#2<(byte~) uctoa::$4) goto uctoa::@7
to:uctoa::@8
uctoa::@8: scope:[uctoa] from uctoa::@6
[198] *((byte*) uctoa::buffer#11) ← *((const byte*) DIGITS + (byte) uctoa::value#2)
[199] (byte*) uctoa::buffer#3 ← ++ (byte*) uctoa::buffer#11
[200] *((byte*) uctoa::buffer#3) ← (byte) 0
[201] *((byte*) uctoa::buffer#11) ← *((const byte*) DIGITS + (byte) uctoa::value#2)
[202] (byte*) uctoa::buffer#3 ← ++ (byte*) uctoa::buffer#11
[203] *((byte*) uctoa::buffer#3) ← (byte) 0
to:uctoa::@return
uctoa::@7: scope:[uctoa] from uctoa::@6
[201] (byte) uctoa::digit_value#0 ← *((byte*) uctoa::digit_values#8 + (byte) uctoa::digit#2)
[202] if((byte) 0!=(byte) uctoa::started#2) goto uctoa::@10
[204] (byte) uctoa::digit_value#0 ← *((byte*) uctoa::digit_values#8 + (byte) uctoa::digit#2)
[205] if((byte) 0!=(byte) uctoa::started#2) goto uctoa::@10
to:uctoa::@12
uctoa::@12: scope:[uctoa] from uctoa::@7
[203] if((byte) uctoa::value#2>=(byte) uctoa::digit_value#0) goto uctoa::@10
[206] if((byte) uctoa::value#2>=(byte) uctoa::digit_value#0) goto uctoa::@10
to:uctoa::@9
uctoa::@9: scope:[uctoa] from uctoa::@11 uctoa::@12
[204] (byte*) uctoa::buffer#14 ← phi( uctoa::@12/(byte*) uctoa::buffer#11 uctoa::@11/(byte*) uctoa::buffer#4 )
[204] (byte) uctoa::started#4 ← phi( uctoa::@12/(byte) uctoa::started#2 uctoa::@11/(byte) 1 )
[204] (byte) uctoa::value#6 ← phi( uctoa::@12/(byte) uctoa::value#2 uctoa::@11/(byte) uctoa::value#0 )
[205] (byte) uctoa::digit#1 ← ++ (byte) uctoa::digit#2
[207] (byte*) uctoa::buffer#14 ← phi( uctoa::@12/(byte*) uctoa::buffer#11 uctoa::@11/(byte*) uctoa::buffer#4 )
[207] (byte) uctoa::started#4 ← phi( uctoa::@12/(byte) uctoa::started#2 uctoa::@11/(byte) 1 )
[207] (byte) uctoa::value#6 ← phi( uctoa::@12/(byte) uctoa::value#2 uctoa::@11/(byte) uctoa::value#0 )
[208] (byte) uctoa::digit#1 ← ++ (byte) uctoa::digit#2
to:uctoa::@6
uctoa::@10: scope:[uctoa] from uctoa::@12 uctoa::@7
[206] (byte*) uctoa_append::buffer#0 ← (byte*) uctoa::buffer#11
[207] (byte) uctoa_append::value#0 ← (byte) uctoa::value#2
[208] (byte) uctoa_append::sub#0 ← (byte) uctoa::digit_value#0
[209] call uctoa_append
[210] (byte) uctoa_append::return#0 ← (byte) uctoa_append::value#2
[209] (byte*) uctoa_append::buffer#0 ← (byte*) uctoa::buffer#11
[210] (byte) uctoa_append::value#0 ← (byte) uctoa::value#2
[211] (byte) uctoa_append::sub#0 ← (byte) uctoa::digit_value#0
[212] call uctoa_append
[213] (byte) uctoa_append::return#0 ← (byte) uctoa_append::value#2
to:uctoa::@11
uctoa::@11: scope:[uctoa] from uctoa::@10
[211] (byte) uctoa::value#0 ← (byte) uctoa_append::return#0
[212] (byte*) uctoa::buffer#4 ← ++ (byte*) uctoa::buffer#11
[214] (byte) uctoa::value#0 ← (byte) uctoa_append::return#0
[215] (byte*) uctoa::buffer#4 ← ++ (byte*) uctoa::buffer#11
to:uctoa::@9
(byte()) uctoa_append((byte*) uctoa_append::buffer , (byte) uctoa_append::value , (byte) uctoa_append::sub)
uctoa_append: scope:[uctoa_append] from uctoa::@10
[213] phi()
[216] phi()
to:uctoa_append::@1
uctoa_append::@1: scope:[uctoa_append] from uctoa_append uctoa_append::@2
[214] (byte) uctoa_append::digit#2 ← phi( uctoa_append/(byte) 0 uctoa_append::@2/(byte) uctoa_append::digit#1 )
[214] (byte) uctoa_append::value#2 ← phi( uctoa_append/(byte) uctoa_append::value#0 uctoa_append::@2/(byte) uctoa_append::value#1 )
[215] if((byte) uctoa_append::value#2>=(byte) uctoa_append::sub#0) goto uctoa_append::@2
[217] (byte) uctoa_append::digit#2 ← phi( uctoa_append/(byte) 0 uctoa_append::@2/(byte) uctoa_append::digit#1 )
[217] (byte) uctoa_append::value#2 ← phi( uctoa_append/(byte) uctoa_append::value#0 uctoa_append::@2/(byte) uctoa_append::value#1 )
[218] if((byte) uctoa_append::value#2>=(byte) uctoa_append::sub#0) goto uctoa_append::@2
to:uctoa_append::@3
uctoa_append::@3: scope:[uctoa_append] from uctoa_append::@1
[216] *((byte*) uctoa_append::buffer#0) ← *((const byte*) DIGITS + (byte) uctoa_append::digit#2)
[219] *((byte*) uctoa_append::buffer#0) ← *((const byte*) DIGITS + (byte) uctoa_append::digit#2)
to:uctoa_append::@return
uctoa_append::@return: scope:[uctoa_append] from uctoa_append::@3
[217] return
[220] return
to:@return
uctoa_append::@2: scope:[uctoa_append] from uctoa_append::@1
[218] (byte) uctoa_append::digit#1 ← ++ (byte) uctoa_append::digit#2
[219] (byte) uctoa_append::value#1 ← (byte) uctoa_append::value#2 - (byte) uctoa_append::sub#0
[221] (byte) uctoa_append::digit#1 ← ++ (byte) uctoa_append::digit#2
[222] (byte) uctoa_append::value#1 ← (byte) uctoa_append::value#2 - (byte) uctoa_append::sub#0
to:uctoa_append::@1
(void()) printf_cls()
printf_cls: scope:[printf_cls] from main
[220] phi()
[221] call memset
[223] phi()
[224] call memset
to:printf_cls::@1
printf_cls::@1: scope:[printf_cls] from printf_cls
[222] (byte*) printf_cursor_ptr ← (byte*) 1024
[223] (byte) printf_cursor_x ← (byte) 0
[224] (byte) printf_cursor_y ← (byte) 0
[225] (byte*) printf_cursor_ptr ← (byte*) 1024
[226] (byte) printf_cursor_x ← (byte) 0
[227] (byte) printf_cursor_y ← (byte) 0
to:printf_cls::@return
printf_cls::@return: scope:[printf_cls] from printf_cls::@1
[225] return
[228] return
to:@return

File diff suppressed because one or more lines are too long

View File

@ -33,16 +33,16 @@
(void*) memcpy::destination
(const void*) memcpy::destination#0 destination = (void*) 1024
(byte*) memcpy::dst
(byte*) memcpy::dst#1 dst zp[2]:5 1.000000001E9
(byte*) memcpy::dst#2 dst zp[2]:5 1.000000001E9
(byte*) memcpy::dst#1 dst zp[2]:5 1.0000000001E10
(byte*) memcpy::dst#2 dst zp[2]:5 1.0000000001E10
(word) memcpy::num
(const word) memcpy::num#0 num = (word)(number) $28*(number) $19-(number) $28
(void*) memcpy::return
(void*) memcpy::source
(const void*) memcpy::source#0 source = (void*)(number) $400+(number) $28
(byte*) memcpy::src
(byte*) memcpy::src#1 src zp[2]:17 2.000000002E9
(byte*) memcpy::src#2 src zp[2]:17 1.000000001E9
(byte*) memcpy::src#1 src zp[2]:17 2.0000000002E10
(byte*) memcpy::src#2 src zp[2]:17 1.0000000001E10
(byte*) memcpy::src_end
(const byte*) memcpy::src_end#0 src_end = (byte*)(const void*) memcpy::source#0+(const word) memcpy::num#0
(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num)
@ -51,15 +51,15 @@
(label) memset::@3
(label) memset::@return
(byte) memset::c
(byte) memset::c#4 reg byte x 1.2500000125E7
(byte) memset::c#4 reg byte x 1.25000000125E8
(byte*) memset::dst
(byte*) memset::dst#1 dst zp[2]:5 2.00000002E8
(byte*) memset::dst#2 dst zp[2]:5 1.3666666833333334E8
(byte*) memset::dst#4 dst zp[2]:5 2.0000002E7
(byte*) memset::dst#1 dst zp[2]:5 2.000000002E9
(byte*) memset::dst#2 dst zp[2]:5 1.3666666683333335E9
(byte*) memset::dst#4 dst zp[2]:5 2.00000002E8
(byte*) memset::end
(byte*) memset::end#0 end zp[2]:17 1.8333333666666668E7
(byte*) memset::end#0 end zp[2]:17 1.833333336666667E8
(word) memset::num
(word) memset::num#2 num zp[2]:17 1.0000001E7
(word) memset::num#2 num zp[2]:17 1.00000001E8
(void*) memset::return
(void*) memset::str
(void*) memset::str#3 str zp[2]:5
@ -67,11 +67,7 @@
(const byte*) printf_buffer_number::digits[(number) $b] = { fill( $b, 0) }
(byte) printf_buffer_number::sign
(void()) printf_char((byte) printf_char::ch)
(byte*~) printf_char::$6 zp[2]:15 2000002.0
(label) printf_char::@1
(label) printf_char::@2
(label) printf_char::@3
(label) printf_char::@4
(label) printf_char::@return
(byte) printf_char::ch
(byte) printf_char::ch#0 reg byte a 200002.0
@ -81,9 +77,9 @@
(void()) printf_cls()
(label) printf_cls::@1
(label) printf_cls::@return
(byte*) printf_cursor_ptr loadstore zp[2]:15 63064.05405405405
(byte) printf_cursor_x loadstore zp[1]:13 54546.44545454546
(byte) printf_cursor_y loadstore zp[1]:14 62500.98214285713
(byte*) printf_cursor_ptr loadstore zp[2]:15 219299.21052631582
(byte) printf_cursor_x loadstore zp[1]:13 57693.35576923078
(byte) printf_cursor_y loadstore zp[1]:14 295653.1304347826
(byte) printf_format_number::justify_left
(byte) printf_format_number::min_length
(byte) printf_format_number::radix
@ -183,6 +179,12 @@
(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_scroll()
(byte*~) printf_scroll::$4 zp[2]:15 2.0000002E7
(label) printf_scroll::@1
(label) printf_scroll::@2
(label) printf_scroll::@3
(label) printf_scroll::@return
(void()) printf_str((byte*) printf_str::str)
(label) printf_str::@1
(label) printf_str::@2
@ -356,12 +358,12 @@
(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 [ memset::c#4 ]
reg byte x [ printf_number_buffer::format_min_length#2 ]
zp[1]:2 [ printf_number_buffer::format_zero_padding#10 printf_number_buffer::format_zero_padding#1 printf_schar::format_zero_padding#2 ]
reg byte y [ printf_number_buffer::len#2 printf_number_buffer::len#0 printf_number_buffer::len#1 ]
zp[1]:3 [ printf_padding::i#2 printf_padding::i#1 ]
reg byte a [ printf_char::ch#3 printf_char::ch#2 printf_char::ch#0 printf_char::ch#1 ]
reg byte x [ memset::c#4 ]
reg byte a [ toupper::return#2 toupper::return#0 toupper::ch#0 ]
zp[1]:4 [ utoa::digit#2 utoa::digit#1 printf_number_buffer::format_justify_left#10 ]
reg byte x [ utoa::started#2 utoa::started#4 ]
@ -379,7 +381,7 @@ 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[1]:13 [ printf_cursor_x ]
zp[1]:14 [ printf_cursor_y ]
zp[2]:15 [ printf_cursor_ptr printf_char::$6 printf_ln::$0 printf_ln::$1 ]
zp[2]:15 [ printf_cursor_ptr printf_scroll::$4 printf_ln::$0 printf_ln::$1 ]
reg byte a [ printf_str::ch#0 ]
reg byte a [ toupper::return#3 ]
reg byte a [ strupr::$0 ]