1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2024-12-22 06:29:23 +00:00

Updated too kickasm 5.22. Fixed tests.

This commit is contained in:
jespergravgaard 2021-09-27 23:37:44 +02:00
parent a570dd36d6
commit c1e7d37ac7
16 changed files with 2116 additions and 2363 deletions

View File

@ -16511,3 +16511,49 @@ sta {c1},x
lda #{c2}
ora {c1},y
sta {c1},y
//FRAGMENT call__deref_(qprc1_derefidx_vbuz1)
ldy {z1}
lda {c1},y
sta !+ +1
lda {c1}+1,y
sta !+ +2
!:
jsr $0000
//FRAGMENT call__deref_(qprc1_derefidx_vbuaa)
tay
lda {c1},y
sta !+ +1
lda {c1}+1,y
sta !+ +2
!:
jsr $0000
//FRAGMENT call__deref_(qprc1_derefidx_vbuxx)
txa
tay
lda {c1},y
sta !+ +1
lda {c1}+1,y
sta !+ +2
!:
jsr $0000
//FRAGMENT call__deref_(qprc1_derefidx_vbuyy)
lda {c1},y
sta !+ +1
lda {c1}+1,y
sta !+ +2
!:
jsr $0000
//FRAGMENT vbsaa=vbsc1_minus_vbsz1
lda #{c1}
sec
sbc {z1}
//FRAGMENT vbsxx=vbsc1_minus_vbsz1
lda #{c1}
sec
sbc {z1}
tax
//FRAGMENT vbsyy=vbsc1_minus_vbsz1
lda #{c1}
sec
sbc {z1}
tay

View File

@ -115,7 +115,7 @@ public enum CpuAddressingMode {
* address. The carry from this addition is added to the contents of the next page zero memory location, the result
* being the high order eight bits of the effective address."
*/
IZZ("(zp),z", "%i.z (%p),z", 1),
IZZ("(zp),z", "%i (%p),z", 1),
/**
* (abs) Indirect Absolute <br>
@ -132,7 +132,7 @@ public enum CpuAddressingMode {
* ZEROPAGE INDIRECT
* The second byte of the instruction contains address of a zeropage memory location.
*/
INZ("(zp)", "%i.z (%p)", 1),
INZ("(zp)", "%i (%p)", 1),
/**
* ((zp)) 32-bit Indirect Zeropage <br>
@ -140,7 +140,7 @@ public enum CpuAddressingMode {
* In indirect addressing the second byte of the instruction points to a memory location in page zero. This mode is
* formed by preceding a Base Page Indirect Mode instruction with NEG NEG NOP instructions.
*/
LIN("((zp))", "%i.z ((%p))", 1),
LIN("((zp))", "%i ((%p))", 1),
/**
* ((zp)),z 32-bit Indirect Zeropage Z <br>
@ -148,7 +148,7 @@ public enum CpuAddressingMode {
* In indirect indexed addressing the second byte of the instruction points to a memory location in page zero. This
* mode is formed by preceding a Base Page Indirect Z-Indexed Mode instruction with the NOP instruction (opcode $EA).
*/
LIZ("((zp)),z", "%i.z ((%p)),z", 1),
LIZ("((zp)),z", "%i ((%p)),z", 1),
/**
* (zp,sp),y Stack Pointer Indirect Indexed <br>
@ -159,7 +159,7 @@ public enum CpuAddressingMode {
* addition is added to the contents of the next (D -1) stack location the result being the high order eight bits of
* the effective address." STA ($12,SP),Y
*/
ISY("(zp,sp),y", "%i.z (%p,sp),y", 1),
ISY("(zp,sp),y", "%i (%p,sp),y", 1),
/**
* Relative <br>

View File

@ -19,12 +19,22 @@
.label DEFAULT_SCREEN = $400
/// Default address of the chargen font (mixed case)
.label DEFAULT_FONT_MIXED = $1800
// The number of bytes on the screen
// The current cursor x-position
.label conio_cursor_x = $13
// The current cursor y-position
.label conio_cursor_y = 9
// The current text cursor line start
.label conio_line_text = $e
.label conio_line_text = $c
// The current color cursor line start
.label conio_line_color = $c
.label conio_line_color = $a
.segment Code
__start: {
// __ma char conio_cursor_x = 0
lda #0
sta.z conio_cursor_x
// __ma char conio_cursor_y = 0
sta.z conio_cursor_y
// __ma char *conio_line_text = CONIO_SCREEN_TEXT
lda #<DEFAULT_SCREEN
sta.z conio_line_text
@ -67,15 +77,15 @@ cputc: {
cmp #'\n'
beq __b1
// conio_line_text[conio_cursor_x] = c
ldy conio_cursor_x
ldy.z conio_cursor_x
sta (conio_line_text),y
// conio_line_color[conio_cursor_x] = conio_textcolor
lda conio_textcolor
lda #LIGHT_BLUE
sta (conio_line_color),y
// if(++conio_cursor_x==CONIO_WIDTH)
inc conio_cursor_x
inc.z conio_cursor_x
lda #$28
cmp conio_cursor_x
cmp.z conio_cursor_x
bne __breturn
// cputln()
jsr cputln
@ -90,27 +100,30 @@ cputc: {
// Show the currently pressed key
main: {
.const toD0181_return = (>(DEFAULT_SCREEN&$3fff)*4)|(>DEFAULT_FONT_MIXED)/4&$f
.label __6 = $14
.label ch = $17
.label current = $16
// VICII->MEMORY = toD018(DEFAULT_SCREEN, DEFAULT_FONT_MIXED)
lda #toD0181_return
sta VICII+OFFSET_STRUCT_MOS6569_VICII_MEMORY
// clrscr()
jsr clrscr
lda #0
sta current
sta.z current
__b1:
// char ch = GETIN()
jsr GETIN
sta ch
sta.z ch
// if(ch && ch!=current)
beq __b1
cmp current
cmp.z current
bne __b2
jmp __b1
__b2:
// petscii_to_screencode(ch)
lda ch
lda.z ch
jsr petscii_to_screencode
sta __6
sta.z __6
// printf("'%c'($%2x) ", petscii_to_screencode(ch), ch)
lda #<cputc
sta.z printf_str.putc
@ -122,7 +135,7 @@ main: {
sta.z printf_str.s+1
jsr printf_str
// printf("'%c'($%2x) ", petscii_to_screencode(ch), ch)
lda __6
lda.z __6
pha
jsr cputc
pla
@ -136,7 +149,7 @@ main: {
sta.z printf_str.s+1
jsr printf_str
// printf("'%c'($%2x) ", petscii_to_screencode(ch), ch)
ldx ch
ldx.z ch
jsr printf_uchar
// printf("'%c'($%2x) ", petscii_to_screencode(ch), ch)
lda #<cputc
@ -148,8 +161,8 @@ main: {
lda #>s2
sta.z printf_str.s+1
jsr printf_str
lda ch
sta current
lda.z ch
sta.z current
jmp __b1
.segment Data
s: .text "'"
@ -158,58 +171,60 @@ main: {
.byte 0
s2: .text ") "
.byte 0
__6: .byte 0
ch: .byte 0
current: .byte 0
}
.segment Code
// Set the cursor to the specified position
// void gotoxy(char x, __register(X) char y)
gotoxy: {
.label __5 = 8
.label __6 = $a
.const x = 0
.label __5 = $1c
.label __6 = $18
.label __7 = $18
.label line_offset = $18
.label __8 = $1a
.label __9 = $18
// if(y>CONIO_HEIGHT)
cpx #$19+1
bcc __b2
ldx #0
__b2:
// conio_cursor_x = x
lda #0
sta conio_cursor_x
lda #x
sta.z conio_cursor_x
// conio_cursor_y = y
stx conio_cursor_y
stx.z conio_cursor_y
// unsigned int line_offset = (unsigned int)y*CONIO_WIDTH
txa
sta __7
sta.z __7
lda #0
sta __7+1
lda __7
sta.z __7+1
lda.z __7
asl
sta __8
lda __7+1
sta.z __8
lda.z __7+1
rol
sta __8+1
asl __8
rol __8+1
sta.z __8+1
asl.z __8
rol.z __8+1
clc
lda __9
adc __8
sta __9
lda __9+1
adc __8+1
sta __9+1
asl line_offset
rol line_offset+1
asl line_offset
rol line_offset+1
asl line_offset
rol line_offset+1
lda.z __9
adc.z __8
sta.z __9
lda.z __9+1
adc.z __8+1
sta.z __9+1
asl.z line_offset
rol.z line_offset+1
asl.z line_offset
rol.z line_offset+1
asl.z line_offset
rol.z line_offset+1
// CONIO_SCREEN_TEXT + line_offset
lda line_offset
lda.z line_offset
clc
adc #<DEFAULT_SCREEN
sta.z __5
lda line_offset+1
lda.z line_offset+1
adc #>DEFAULT_SCREEN
sta.z __5+1
// conio_line_text = CONIO_SCREEN_TEXT + line_offset
@ -218,11 +233,11 @@ gotoxy: {
lda.z __5+1
sta.z conio_line_text+1
// CONIO_SCREEN_COLORS + line_offset
lda line_offset
lda.z __6
clc
adc #<COLORRAM
sta.z __6
lda line_offset+1
lda.z __6+1
adc #>COLORRAM
sta.z __6+1
// conio_line_color = CONIO_SCREEN_COLORS + line_offset
@ -232,13 +247,7 @@ gotoxy: {
sta.z conio_line_color+1
// }
rts
.segment Data
__7: .word 0
.label line_offset = __7
__8: .word 0
.label __9 = __7
}
.segment Code
// Print a newline
cputln: {
// conio_line_text += CONIO_WIDTH
@ -259,9 +268,9 @@ cputln: {
!:
// conio_cursor_x = 0
lda #0
sta conio_cursor_x
sta.z conio_cursor_x
// conio_cursor_y++;
inc conio_cursor_y
inc.z conio_cursor_y
// cscroll()
jsr cscroll
// }
@ -270,7 +279,7 @@ cputln: {
// clears the screen and moves the cursor to the upper left-hand corner of the screen.
clrscr: {
.label line_text = $10
.label line_cols = $12
.label line_cols = $e
lda #<COLORRAM
sta.z line_cols
lda #>COLORRAM
@ -286,9 +295,9 @@ clrscr: {
bcc __b2
// conio_cursor_x = 0
lda #0
sta conio_cursor_x
sta.z conio_cursor_x
// conio_cursor_y = 0
sta conio_cursor_y
sta.z conio_cursor_y
// conio_line_text = CONIO_SCREEN_TEXT
lda #<DEFAULT_SCREEN
sta.z conio_line_text
@ -331,7 +340,7 @@ clrscr: {
lda #' '
sta (line_text),y
// line_cols[c] = conio_textcolor
lda conio_textcolor
lda #LIGHT_BLUE
sta (line_cols),y
// for( char c=0;c<CONIO_WIDTH; c++ )
iny
@ -400,9 +409,9 @@ petscii_to_screencode: {
rts
}
/// Print a NUL-terminated string
// void printf_str(__zp($10) void (*putc)(char), __zp($12) const char *s)
// void printf_str(__zp($10) void (*putc)(char), __zp($e) const char *s)
printf_str: {
.label s = $12
.label s = $e
.label putc = $10
__b1:
// while(c=*s++)
@ -439,7 +448,7 @@ printf_uchar: {
jsr uctoa
// printf_number_buffer(putc, printf_buffer, format)
lda printf_buffer
sta printf_number_buffer.buffer_sign
sta.z printf_number_buffer.buffer_sign
// Print using format
jsr printf_number_buffer
// }
@ -449,18 +458,8 @@ printf_uchar: {
cscroll: {
// if(conio_cursor_y==CONIO_HEIGHT)
lda #$19
cmp conio_cursor_y
cmp.z conio_cursor_y
bne __breturn
// if(conio_scroll_enable)
lda conio_scroll_enable
bne __b3
// gotoxy(0,0)
ldx #0
jsr gotoxy
__breturn:
// }
rts
__b3:
// memcpy(CONIO_SCREEN_TEXT, CONIO_SCREEN_TEXT+CONIO_WIDTH, CONIO_BYTES-CONIO_WIDTH)
lda #<DEFAULT_SCREEN
sta.z memcpy.destination
@ -489,7 +488,7 @@ cscroll: {
sta.z memset.str+1
jsr memset
// memset(CONIO_SCREEN_COLORS+CONIO_BYTES-CONIO_WIDTH, conio_textcolor, CONIO_WIDTH)
ldx conio_textcolor
ldx #LIGHT_BLUE
lda #<COLORRAM+$19*$28-$28
sta.z memset.str
lda #>COLORRAM+$19*$28-$28
@ -512,7 +511,9 @@ cscroll: {
sbc #0
sta.z conio_line_color+1
// conio_cursor_y--;
dec conio_cursor_y
dec.z conio_cursor_y
__breturn:
// }
rts
}
// Converts unsigned number value to a string representing it in RADIX format.
@ -523,17 +524,20 @@ cscroll: {
// void uctoa(__register(X) char value, __zp($10) char *buffer, char radix)
uctoa: {
.const max_digits = 2
.label digit_value = 8
.label buffer = $10
.label digit = $12
.label started = $14
lda #<printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS
sta.z buffer
lda #>printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS
sta.z buffer+1
lda #0
sta started
sta digit
sta.z started
sta.z digit
__b1:
// for( char digit=0; digit<max_digits-1; digit++ )
lda digit
lda.z digit
cmp #max_digits-1
bcc __b2
// *buffer++ = DIGITS[(char)value]
@ -553,17 +557,17 @@ uctoa: {
rts
__b2:
// unsigned char digit_value = digit_values[digit]
ldy digit
ldy.z digit
lda RADIX_HEXADECIMAL_VALUES_CHAR,y
sta digit_value
sta.z digit_value
// if (started || value >= digit_value)
lda started
lda.z started
bne __b5
cpx digit_value
cpx.z digit_value
bcs __b5
__b4:
// for( char digit=0; digit<max_digits-1; digit++ )
inc digit
inc.z digit
jmp __b1
__b5:
// uctoa_append(buffer++, value, digit_value)
@ -576,27 +580,24 @@ uctoa: {
inc.z buffer+1
!:
lda #1
sta started
sta.z started
jmp __b4
.segment Data
digit_value: .byte 0
digit: .byte 0
started: .byte 0
}
.segment Code
// Print the contents of the number buffer using a specific format.
// This handles minimum length, zero-filling, and left/right justification from the format
// void printf_number_buffer(void (*putc)(char), __mem() char buffer_sign, char *buffer_digits, char format_min_length, char format_justify_left, char format_sign_always, char format_zero_padding, char format_upper_case, char format_radix)
// void printf_number_buffer(void (*putc)(char), __zp(8) char buffer_sign, char *buffer_digits, char format_min_length, char format_justify_left, char format_sign_always, char format_zero_padding, char format_upper_case, char format_radix)
printf_number_buffer: {
.label buffer_digits = printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS
.label __19 = $e
.label buffer_sign = 8
// strlen(buffer.digits)
jsr strlen
// strlen(buffer.digits)
// signed char len = (signed char)strlen(buffer.digits)
// There is a minimum length - work out the padding
ldx __19
ldx.z __19
// if(buffer.sign)
lda buffer_sign
lda.z buffer_sign
beq __b8
// len++;
inx
@ -617,11 +618,11 @@ printf_number_buffer: {
jmp __b2
__b6:
// printf_padding(putc, ' ',(char)padding)
sta printf_padding.length
sta.z printf_padding.length
jsr printf_padding
__b2:
// if(buffer.sign)
lda buffer_sign
lda.z buffer_sign
beq __b3
// putc(buffer.sign)
pha
@ -640,11 +641,7 @@ printf_number_buffer: {
jsr printf_str
// }
rts
.segment Data
.label __19 = strlen.len
buffer_sign: .byte 0
}
.segment Code
// 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.
// void * memcpy(__zp(4) void *destination, __zp(2) void *source, unsigned int num)
@ -732,13 +729,14 @@ memset: {
// - sub : the value of a '1' in the digit. Subtracted continually while the digit is increased.
// (For decimal the subs used are 10000, 1000, 100, 10, 1)
// returns : the value reduced by sub * digit so that it is less than sub.
// __register(X) char uctoa_append(__zp($10) char *buffer, __register(X) char value, __mem() char sub)
// __register(X) char uctoa_append(__zp($10) char *buffer, __register(X) char value, __zp(8) char sub)
uctoa_append: {
.label buffer = $10
.label sub = 8
ldy #0
__b1:
// while (value >= sub)
cpx sub
cpx.z sub
bcs __b2
// *buffer = DIGITS[digit]
lda DIGITS,y
@ -752,20 +750,19 @@ uctoa_append: {
// value -= sub
txa
sec
sbc sub
sbc.z sub
tax
jmp __b1
.segment Data
.label sub = uctoa.digit_value
}
.segment Code
// Computes the length of the string str up to but not including the terminating null character.
// __mem() unsigned int strlen(__zp($10) char *str)
// __zp($e) unsigned int strlen(__zp($10) char *str)
strlen: {
.label len = $e
.label str = $10
.label return = $e
lda #<0
sta len
sta len+1
sta.z len
sta.z len+1
lda #<printf_number_buffer.buffer_digits
sta.z str
lda #>printf_number_buffer.buffer_digits
@ -780,9 +777,9 @@ strlen: {
rts
__b2:
// len++;
inc len
inc.z len
bne !+
inc len+1
inc.z len+1
!:
// str++;
inc.z str
@ -790,21 +787,19 @@ strlen: {
inc.z str+1
!:
jmp __b1
.segment Data
len: .word 0
.label return = len
}
.segment Code
// Print a padding char a number of times
// void printf_padding(void (*putc)(char), char pad, __mem() char length)
// void printf_padding(void (*putc)(char), char pad, __zp($15) char length)
printf_padding: {
.const pad = ' '
.label i = $12
.label length = $15
lda #0
sta i
sta.z i
__b1:
// for(char i=0;i<length; i++)
lda i
cmp length
lda.z i
cmp.z length
bcc __b2
// }
rts
@ -815,25 +810,13 @@ printf_padding: {
jsr cputc
pla
// for(char i=0;i<length; i++)
inc i
inc.z i
jmp __b1
.segment Data
i: .byte 0
length: .byte 0
}
.segment Data
// The digits used for numbers
DIGITS: .text "0123456789abcdef"
// Values of hexadecimal digits
RADIX_HEXADECIMAL_VALUES_CHAR: .byte $10
// The number of bytes on the screen
// The current cursor x-position
conio_cursor_x: .byte 0
// The current cursor y-position
conio_cursor_y: .byte 0
// The current text color
conio_textcolor: .byte LIGHT_BLUE
// Is scrolling enabled when outputting beyond the end of the screen (1: yes, 0: no).
// If disabled the cursor just moves back to (0,0) instead
conio_scroll_enable: .byte 1
// Buffer used for stringified number being printed
printf_buffer: .fill SIZEOF_STRUCT_PRINTF_BUFFER_NUMBER, 0

View File

@ -4,494 +4,488 @@ __start: scope:[__start] from
[0] phi()
to:__start::__init1
__start::__init1: scope:[__start] from __start
[1] conio_line_text = DEFAULT_SCREEN
[2] conio_line_color = COLORRAM
[3] call conio_c64_init
[1] conio_cursor_x = 0
[2] conio_cursor_y = 0
[3] conio_line_text = DEFAULT_SCREEN
[4] conio_line_color = COLORRAM
[5] call conio_c64_init
to:__start::@1
__start::@1: scope:[__start] from __start::__init1
[4] phi()
[5] call main
[6] phi()
[7] call main
to:__start::@return
__start::@return: scope:[__start] from __start::@1
[6] return
[8] return
to:@return
void conio_c64_init()
conio_c64_init: scope:[conio_c64_init] from __start::__init1
[7] conio_c64_init::line#0 = *conio_c64_init::BASIC_CURSOR_LINE
[8] if(conio_c64_init::line#0<$19) goto conio_c64_init::@2
[9] conio_c64_init::line#0 = *conio_c64_init::BASIC_CURSOR_LINE
[10] if(conio_c64_init::line#0<$19) goto conio_c64_init::@2
to:conio_c64_init::@1
conio_c64_init::@2: scope:[conio_c64_init] from conio_c64_init
[9] phi()
[11] phi()
to:conio_c64_init::@1
conio_c64_init::@1: scope:[conio_c64_init] from conio_c64_init conio_c64_init::@2
[10] conio_c64_init::line#2 = phi( conio_c64_init::@2/conio_c64_init::line#0, conio_c64_init/$19-1 )
[11] gotoxy::y#2 = conio_c64_init::line#2
[12] call gotoxy
[12] conio_c64_init::line#2 = phi( conio_c64_init::@2/conio_c64_init::line#0, conio_c64_init/$19-1 )
[13] gotoxy::y#2 = conio_c64_init::line#2
[14] call gotoxy
to:conio_c64_init::@return
conio_c64_init::@return: scope:[conio_c64_init] from conio_c64_init::@1
[13] return
[15] return
to:@return
__stackcall void cputc(char c)
cputc: scope:[cputc] from printf_number_buffer::@7 printf_padding::@2
[14] cputc::c#0 = stackidx(char,cputc::OFFSET_STACK_C)
[15] if(cputc::c#0=='
[16] cputc::c#0 = stackidx(char,cputc::OFFSET_STACK_C)
[17] if(cputc::c#0=='
') goto cputc::@1
to:cputc::@2
cputc::@2: scope:[cputc] from cputc
[16] conio_line_text[conio_cursor_x] = cputc::c#0
[17] conio_line_color[conio_cursor_x] = conio_textcolor
[18] conio_cursor_x = ++ conio_cursor_x
[19] if(conio_cursor_x!=$28) goto cputc::@return
[18] conio_line_text[conio_cursor_x] = cputc::c#0
[19] conio_line_color[conio_cursor_x] = LIGHT_BLUE
[20] conio_cursor_x = ++ conio_cursor_x
[21] if(conio_cursor_x!=$28) goto cputc::@return
to:cputc::@3
cputc::@3: scope:[cputc] from cputc::@2
[20] phi()
[21] call cputln
[22] phi()
[23] call cputln
to:cputc::@return
cputc::@return: scope:[cputc] from cputc::@1 cputc::@2 cputc::@3
[22] return
[24] return
to:@return
cputc::@1: scope:[cputc] from cputc
[23] phi()
[24] call cputln
[25] phi()
[26] call cputln
to:cputc::@return
int main()
main: scope:[main] from __start::@1
[25] phi()
[27] phi()
to:main::toD0181
main::toD0181: scope:[main] from main
[26] phi()
[28] phi()
to:main::@3
main::@3: scope:[main] from main::toD0181
[27] *((char *)VICII+OFFSET_STRUCT_MOS6569_VICII_MEMORY) = main::toD0181_return#0
[28] call clrscr
[29] *((char *)VICII+OFFSET_STRUCT_MOS6569_VICII_MEMORY) = main::toD0181_return#0
[30] call clrscr
to:main::@1
main::@1: scope:[main] from main::@10 main::@3 main::@4 main::@9
[29] main::current#2 = phi( main::@9/main::current#4, main::@3/0, main::@4/main::current#2 )
[30] call GETIN
[31] GETIN::return#0 = GETIN::return#1
[31] main::current#2 = phi( main::@9/main::current#4, main::@3/0, main::@4/main::current#2 )
[32] call GETIN
[33] GETIN::return#0 = GETIN::return#1
to:main::@4
main::@4: scope:[main] from main::@1
[32] main::ch#0 = GETIN::return#0
[33] if(0==main::ch#0) goto main::@1
[34] main::ch#0 = GETIN::return#0
[35] if(0==main::ch#0) goto main::@1
to:main::@10
main::@10: scope:[main] from main::@4
[34] if(main::ch#0!=main::current#2) goto main::@2
[36] if(main::ch#0!=main::current#2) goto main::@2
to:main::@1
main::@2: scope:[main] from main::@10
[35] petscii_to_screencode::petscii#0 = main::ch#0
[36] call petscii_to_screencode
[37] petscii_to_screencode::return#0 = petscii_to_screencode::return#10
[37] petscii_to_screencode::petscii#0 = main::ch#0
[38] call petscii_to_screencode
[39] petscii_to_screencode::return#0 = petscii_to_screencode::return#10
to:main::@5
main::@5: scope:[main] from main::@2
[38] main::$6 = petscii_to_screencode::return#0
[39] call printf_str
[40] main::$6 = petscii_to_screencode::return#0
[41] call printf_str
to:main::@6
main::@6: scope:[main] from main::@5
[40] stackpush(char) = main::$6
[41] callexecute cputc
[42] stackpush(char) = main::$6
[43] callexecute cputc
sideeffect stackpullbytes(1)
[43] call printf_str
[45] call printf_str
to:main::@7
main::@7: scope:[main] from main::@6
[44] printf_uchar::uvalue#0 = main::ch#0
[45] call printf_uchar
[46] printf_uchar::uvalue#0 = main::ch#0
[47] call printf_uchar
to:main::@8
main::@8: scope:[main] from main::@7
[46] phi()
[47] call printf_str
[48] phi()
[49] call printf_str
to:main::@9
main::@9: scope:[main] from main::@8
[48] main::current#4 = main::ch#0
[50] main::current#4 = main::ch#0
to:main::@1
void gotoxy(char x , char y)
gotoxy: scope:[gotoxy] from conio_c64_init::@1 cscroll::@2
[49] gotoxy::y#3 = phi( conio_c64_init::@1/gotoxy::y#2, cscroll::@2/0 )
[50] if(gotoxy::y#3<$19+1) goto gotoxy::@3
gotoxy: scope:[gotoxy] from conio_c64_init::@1
[51] if(gotoxy::y#2<$19+1) goto gotoxy::@3
to:gotoxy::@1
gotoxy::@3: scope:[gotoxy] from gotoxy
[51] phi()
[52] phi()
to:gotoxy::@1
gotoxy::@1: scope:[gotoxy] from gotoxy gotoxy::@3
[52] gotoxy::y#4 = phi( gotoxy::@3/gotoxy::y#3, gotoxy/0 )
[53] gotoxy::y#4 = phi( gotoxy::@3/gotoxy::y#2, gotoxy/0 )
to:gotoxy::@2
gotoxy::@2: scope:[gotoxy] from gotoxy::@1
[53] conio_cursor_x = 0
[54] conio_cursor_y = gotoxy::y#4
[55] gotoxy::$7 = (unsigned int)gotoxy::y#4
[56] gotoxy::$8 = gotoxy::$7 << 2
[57] gotoxy::$9 = gotoxy::$8 + gotoxy::$7
[58] gotoxy::line_offset#0 = gotoxy::$9 << 3
[59] gotoxy::$5 = DEFAULT_SCREEN + gotoxy::line_offset#0
[60] conio_line_text = gotoxy::$5
[61] gotoxy::$6 = COLORRAM + gotoxy::line_offset#0
[62] conio_line_color = gotoxy::$6
[54] conio_cursor_x = gotoxy::x#2
[55] conio_cursor_y = gotoxy::y#4
[56] gotoxy::$7 = (unsigned int)gotoxy::y#4
[57] gotoxy::$8 = gotoxy::$7 << 2
[58] gotoxy::$9 = gotoxy::$8 + gotoxy::$7
[59] gotoxy::line_offset#0 = gotoxy::$9 << 3
[60] gotoxy::$5 = DEFAULT_SCREEN + gotoxy::line_offset#0
[61] conio_line_text = gotoxy::$5
[62] gotoxy::$6 = COLORRAM + gotoxy::line_offset#0
[63] conio_line_color = gotoxy::$6
to:gotoxy::@return
gotoxy::@return: scope:[gotoxy] from gotoxy::@2
[63] return
[64] return
to:@return
void cputln()
cputln: scope:[cputln] from cputc::@1 cputc::@3
[64] conio_line_text = conio_line_text + $28
[65] conio_line_color = conio_line_color + $28
[66] conio_cursor_x = 0
[67] conio_cursor_y = ++ conio_cursor_y
[68] call cscroll
[65] conio_line_text = conio_line_text + $28
[66] conio_line_color = conio_line_color + $28
[67] conio_cursor_x = 0
[68] conio_cursor_y = ++ conio_cursor_y
[69] call cscroll
to:cputln::@return
cputln::@return: scope:[cputln] from cputln
[69] return
[70] return
to:@return
void clrscr()
clrscr: scope:[clrscr] from main::@3
[70] phi()
[71] phi()
to:clrscr::@1
clrscr::@1: scope:[clrscr] from clrscr clrscr::@5
[71] clrscr::line_cols#5 = phi( clrscr/COLORRAM, clrscr::@5/clrscr::line_cols#1 )
[71] clrscr::line_text#5 = phi( clrscr/DEFAULT_SCREEN, clrscr::@5/clrscr::line_text#1 )
[71] clrscr::l#2 = phi( clrscr/0, clrscr::@5/clrscr::l#1 )
[72] if(clrscr::l#2<$19) goto clrscr::@3
[72] clrscr::line_cols#5 = phi( clrscr/COLORRAM, clrscr::@5/clrscr::line_cols#1 )
[72] clrscr::line_text#5 = phi( clrscr/DEFAULT_SCREEN, clrscr::@5/clrscr::line_text#1 )
[72] clrscr::l#2 = phi( clrscr/0, clrscr::@5/clrscr::l#1 )
[73] if(clrscr::l#2<$19) goto clrscr::@3
to:clrscr::@2
clrscr::@2: scope:[clrscr] from clrscr::@1
[73] conio_cursor_x = 0
[74] conio_cursor_y = 0
[75] conio_line_text = DEFAULT_SCREEN
[76] conio_line_color = COLORRAM
[74] conio_cursor_x = 0
[75] conio_cursor_y = 0
[76] conio_line_text = DEFAULT_SCREEN
[77] conio_line_color = COLORRAM
to:clrscr::@return
clrscr::@return: scope:[clrscr] from clrscr::@2
[77] return
[78] return
to:@return
clrscr::@3: scope:[clrscr] from clrscr::@1 clrscr::@4
[78] clrscr::c#2 = phi( clrscr::@1/0, clrscr::@4/clrscr::c#1 )
[79] if(clrscr::c#2<$28) goto clrscr::@4
[79] clrscr::c#2 = phi( clrscr::@1/0, clrscr::@4/clrscr::c#1 )
[80] if(clrscr::c#2<$28) goto clrscr::@4
to:clrscr::@5
clrscr::@5: scope:[clrscr] from clrscr::@3
[80] clrscr::line_text#1 = clrscr::line_text#5 + $28
[81] clrscr::line_cols#1 = clrscr::line_cols#5 + $28
[82] clrscr::l#1 = ++ clrscr::l#2
[81] clrscr::line_text#1 = clrscr::line_text#5 + $28
[82] clrscr::line_cols#1 = clrscr::line_cols#5 + $28
[83] clrscr::l#1 = ++ clrscr::l#2
to:clrscr::@1
clrscr::@4: scope:[clrscr] from clrscr::@3
[83] clrscr::line_text#5[clrscr::c#2] = ' '
[84] clrscr::line_cols#5[clrscr::c#2] = conio_textcolor
[85] clrscr::c#1 = ++ clrscr::c#2
[84] clrscr::line_text#5[clrscr::c#2] = ' '
[85] clrscr::line_cols#5[clrscr::c#2] = LIGHT_BLUE
[86] clrscr::c#1 = ++ clrscr::c#2
to:clrscr::@3
char GETIN()
GETIN: scope:[GETIN] from main::@1
asm { jsr$ffe4 stach }
[87] GETIN::return#1 = *GETIN::ch
[88] GETIN::return#1 = *GETIN::ch
to:GETIN::@return
GETIN::@return: scope:[GETIN] from GETIN
[88] return
[89] return
to:@return
char petscii_to_screencode(char petscii)
petscii_to_screencode: scope:[petscii_to_screencode] from main::@2
[89] if(petscii_to_screencode::petscii#0<$20) goto petscii_to_screencode::@1
[90] if(petscii_to_screencode::petscii#0<$20) goto petscii_to_screencode::@1
to:petscii_to_screencode::@6
petscii_to_screencode::@6: scope:[petscii_to_screencode] from petscii_to_screencode
[90] if(petscii_to_screencode::petscii#0<$40) goto petscii_to_screencode::@return
[91] if(petscii_to_screencode::petscii#0<$40) goto petscii_to_screencode::@return
to:petscii_to_screencode::@7
petscii_to_screencode::@7: scope:[petscii_to_screencode] from petscii_to_screencode::@6
[91] if(petscii_to_screencode::petscii#0<$60) goto petscii_to_screencode::@2
[92] if(petscii_to_screencode::petscii#0<$60) goto petscii_to_screencode::@2
to:petscii_to_screencode::@8
petscii_to_screencode::@8: scope:[petscii_to_screencode] from petscii_to_screencode::@7
[92] if(petscii_to_screencode::petscii#0<$80) goto petscii_to_screencode::@3
[93] if(petscii_to_screencode::petscii#0<$80) goto petscii_to_screencode::@3
to:petscii_to_screencode::@9
petscii_to_screencode::@9: scope:[petscii_to_screencode] from petscii_to_screencode::@8
[93] if(petscii_to_screencode::petscii#0<$a0) goto petscii_to_screencode::@4
[94] if(petscii_to_screencode::petscii#0<$a0) goto petscii_to_screencode::@4
to:petscii_to_screencode::@10
petscii_to_screencode::@10: scope:[petscii_to_screencode] from petscii_to_screencode::@9
[94] if(petscii_to_screencode::petscii#0<$ff) goto petscii_to_screencode::@5
[95] if(petscii_to_screencode::petscii#0<$ff) goto petscii_to_screencode::@5
to:petscii_to_screencode::@return
petscii_to_screencode::@5: scope:[petscii_to_screencode] from petscii_to_screencode::@10
[95] petscii_to_screencode::return#6 = petscii_to_screencode::petscii#0 - $80
[96] petscii_to_screencode::return#6 = petscii_to_screencode::petscii#0 - $80
to:petscii_to_screencode::@return
petscii_to_screencode::@return: scope:[petscii_to_screencode] from petscii_to_screencode::@1 petscii_to_screencode::@10 petscii_to_screencode::@2 petscii_to_screencode::@3 petscii_to_screencode::@4 petscii_to_screencode::@5 petscii_to_screencode::@6
[96] petscii_to_screencode::return#10 = phi( petscii_to_screencode::@1/petscii_to_screencode::return#1, petscii_to_screencode::@10/$5e, petscii_to_screencode::@6/petscii_to_screencode::petscii#0, petscii_to_screencode::@2/petscii_to_screencode::return#3, petscii_to_screencode::@3/petscii_to_screencode::return#4, petscii_to_screencode::@4/petscii_to_screencode::return#5, petscii_to_screencode::@5/petscii_to_screencode::return#6 )
[97] return
[97] petscii_to_screencode::return#10 = phi( petscii_to_screencode::@1/petscii_to_screencode::return#1, petscii_to_screencode::@10/$5e, petscii_to_screencode::@6/petscii_to_screencode::petscii#0, petscii_to_screencode::@2/petscii_to_screencode::return#3, petscii_to_screencode::@3/petscii_to_screencode::return#4, petscii_to_screencode::@4/petscii_to_screencode::return#5, petscii_to_screencode::@5/petscii_to_screencode::return#6 )
[98] return
to:@return
petscii_to_screencode::@4: scope:[petscii_to_screencode] from petscii_to_screencode::@9
[98] petscii_to_screencode::return#5 = petscii_to_screencode::petscii#0 + $40
[99] petscii_to_screencode::return#5 = petscii_to_screencode::petscii#0 + $40
to:petscii_to_screencode::@return
petscii_to_screencode::@3: scope:[petscii_to_screencode] from petscii_to_screencode::@8
[99] petscii_to_screencode::return#4 = petscii_to_screencode::petscii#0 - $20
[100] petscii_to_screencode::return#4 = petscii_to_screencode::petscii#0 - $20
to:petscii_to_screencode::@return
petscii_to_screencode::@2: scope:[petscii_to_screencode] from petscii_to_screencode::@7
[100] petscii_to_screencode::return#3 = petscii_to_screencode::petscii#0 - $40
[101] petscii_to_screencode::return#3 = petscii_to_screencode::petscii#0 - $40
to:petscii_to_screencode::@return
petscii_to_screencode::@1: scope:[petscii_to_screencode] from petscii_to_screencode
[101] petscii_to_screencode::return#1 = petscii_to_screencode::petscii#0 + $80
[102] petscii_to_screencode::return#1 = petscii_to_screencode::petscii#0 + $80
to:petscii_to_screencode::@return
void printf_str(void (*putc)(char) , const char *s)
printf_str: scope:[printf_str] from main::@5 main::@6 main::@8 printf_number_buffer::@3
[102] printf_str::putc#6 = phi( main::@5/&cputc, main::@6/&cputc, main::@8/&cputc, printf_number_buffer::@3/printf_uchar::putc#0 )
[102] printf_str::s#6 = phi( main::@5/main::s, main::@6/main::s1, main::@8/main::s2, printf_number_buffer::@3/printf_number_buffer::buffer_digits#0 )
[103] printf_str::putc#6 = phi( main::@5/&cputc, main::@6/&cputc, main::@8/&cputc, printf_number_buffer::@3/printf_uchar::putc#0 )
[103] printf_str::s#6 = phi( main::@5/main::s, main::@6/main::s1, main::@8/main::s2, printf_number_buffer::@3/printf_number_buffer::buffer_digits#0 )
to:printf_str::@1
printf_str::@1: scope:[printf_str] from printf_str printf_str::@2
[103] printf_str::s#5 = phi( printf_str/printf_str::s#6, printf_str::@2/printf_str::s#0 )
[104] printf_str::c#1 = *printf_str::s#5
[105] printf_str::s#0 = ++ printf_str::s#5
[106] if(0!=printf_str::c#1) goto printf_str::@2
[104] printf_str::s#5 = phi( printf_str/printf_str::s#6, printf_str::@2/printf_str::s#0 )
[105] printf_str::c#1 = *printf_str::s#5
[106] printf_str::s#0 = ++ printf_str::s#5
[107] if(0!=printf_str::c#1) goto printf_str::@2
to:printf_str::@return
printf_str::@return: scope:[printf_str] from printf_str::@1
[107] return
[108] return
to:@return
printf_str::@2: scope:[printf_str] from printf_str::@1
[108] stackpush(char) = printf_str::c#1
[109] callexecute *printf_str::putc#6
[109] stackpush(char) = printf_str::c#1
[110] callexecute *printf_str::putc#6
sideeffect stackpullbytes(1)
to:printf_str::@1
void printf_uchar(void (*putc)(char) , char uvalue , char format_min_length , char format_justify_left , char format_sign_always , char format_zero_padding , char format_upper_case , char format_radix)
printf_uchar: scope:[printf_uchar] from main::@7
[111] phi()
[112] phi()
to:printf_uchar::@1
printf_uchar::@1: scope:[printf_uchar] from printf_uchar
[112] *((char *)&printf_buffer) = 0
[113] uctoa::value#1 = printf_uchar::uvalue#0
[114] call uctoa
[113] *((char *)&printf_buffer) = 0
[114] uctoa::value#1 = printf_uchar::uvalue#0
[115] call uctoa
to:printf_uchar::@2
printf_uchar::@2: scope:[printf_uchar] from printf_uchar::@1
[115] printf_number_buffer::buffer_sign#0 = *((char *)&printf_buffer)
[116] call printf_number_buffer
[116] printf_number_buffer::buffer_sign#0 = *((char *)&printf_buffer)
[117] call printf_number_buffer
to:printf_uchar::@return
printf_uchar::@return: scope:[printf_uchar] from printf_uchar::@2
[117] return
[118] return
to:@return
void cscroll()
cscroll: scope:[cscroll] from cputln
[118] if(conio_cursor_y!=$19) goto cscroll::@return
[119] if(conio_cursor_y!=$19) goto cscroll::@return
to:cscroll::@1
cscroll::@1: scope:[cscroll] from cscroll
[119] if(0!=conio_scroll_enable) goto cscroll::@3
[120] phi()
[121] call memcpy
to:cscroll::@2
cscroll::@2: scope:[cscroll] from cscroll::@1
[120] phi()
[121] call gotoxy
to:cscroll::@return
cscroll::@return: scope:[cscroll] from cscroll cscroll::@2 cscroll::@7
[122] return
to:@return
cscroll::@3: scope:[cscroll] from cscroll::@1
[123] phi()
[124] call memcpy
[122] phi()
[123] call memcpy
to:cscroll::@3
cscroll::@3: scope:[cscroll] from cscroll::@2
[124] phi()
[125] call memset
to:cscroll::@4
cscroll::@4: scope:[cscroll] from cscroll::@3
[125] phi()
[126] call memcpy
[126] phi()
[127] call memset
to:cscroll::@5
cscroll::@5: scope:[cscroll] from cscroll::@4
[127] phi()
[128] call memset
to:cscroll::@6
cscroll::@6: scope:[cscroll] from cscroll::@5
[129] memset::c#1 = conio_textcolor
[130] call memset
to:cscroll::@7
cscroll::@7: scope:[cscroll] from cscroll::@6
[131] conio_line_text = conio_line_text - $28
[132] conio_line_color = conio_line_color - $28
[133] conio_cursor_y = -- conio_cursor_y
[128] conio_line_text = conio_line_text - $28
[129] conio_line_color = conio_line_color - $28
[130] conio_cursor_y = -- conio_cursor_y
to:cscroll::@return
cscroll::@return: scope:[cscroll] from cscroll cscroll::@5
[131] return
to:@return
void uctoa(char value , char *buffer , char radix)
uctoa: scope:[uctoa] from printf_uchar::@1
[134] phi()
[132] phi()
to:uctoa::@1
uctoa::@1: scope:[uctoa] from uctoa uctoa::@4
[135] uctoa::buffer#11 = phi( uctoa::@4/uctoa::buffer#14, uctoa/(char *)&printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS )
[135] uctoa::started#2 = phi( uctoa::@4/uctoa::started#4, uctoa/0 )
[135] uctoa::value#2 = phi( uctoa::@4/uctoa::value#6, uctoa/uctoa::value#1 )
[135] uctoa::digit#2 = phi( uctoa::@4/uctoa::digit#1, uctoa/0 )
[136] if(uctoa::digit#2<uctoa::max_digits#2-1) goto uctoa::@2
[133] uctoa::buffer#11 = phi( uctoa::@4/uctoa::buffer#14, uctoa/(char *)&printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS )
[133] uctoa::started#2 = phi( uctoa::@4/uctoa::started#4, uctoa/0 )
[133] uctoa::value#2 = phi( uctoa::@4/uctoa::value#6, uctoa/uctoa::value#1 )
[133] uctoa::digit#2 = phi( uctoa::@4/uctoa::digit#1, uctoa/0 )
[134] if(uctoa::digit#2<uctoa::max_digits#2-1) goto uctoa::@2
to:uctoa::@3
uctoa::@3: scope:[uctoa] from uctoa::@1
[137] *uctoa::buffer#11 = DIGITS[uctoa::value#2]
[138] uctoa::buffer#3 = ++ uctoa::buffer#11
[139] *uctoa::buffer#3 = 0
[135] *uctoa::buffer#11 = DIGITS[uctoa::value#2]
[136] uctoa::buffer#3 = ++ uctoa::buffer#11
[137] *uctoa::buffer#3 = 0
to:uctoa::@return
uctoa::@return: scope:[uctoa] from uctoa::@3
[140] return
[138] return
to:@return
uctoa::@2: scope:[uctoa] from uctoa::@1
[141] uctoa::digit_value#0 = RADIX_HEXADECIMAL_VALUES_CHAR[uctoa::digit#2]
[142] if(0!=uctoa::started#2) goto uctoa::@5
[139] uctoa::digit_value#0 = RADIX_HEXADECIMAL_VALUES_CHAR[uctoa::digit#2]
[140] if(0!=uctoa::started#2) goto uctoa::@5
to:uctoa::@7
uctoa::@7: scope:[uctoa] from uctoa::@2
[143] if(uctoa::value#2>=uctoa::digit_value#0) goto uctoa::@5
[141] if(uctoa::value#2>=uctoa::digit_value#0) goto uctoa::@5
to:uctoa::@4
uctoa::@4: scope:[uctoa] from uctoa::@6 uctoa::@7
[144] uctoa::buffer#14 = phi( uctoa::@7/uctoa::buffer#11, uctoa::@6/uctoa::buffer#4 )
[144] uctoa::started#4 = phi( uctoa::@7/uctoa::started#2, uctoa::@6/1 )
[144] uctoa::value#6 = phi( uctoa::@7/uctoa::value#2, uctoa::@6/uctoa::value#0 )
[145] uctoa::digit#1 = ++ uctoa::digit#2
[142] uctoa::buffer#14 = phi( uctoa::@7/uctoa::buffer#11, uctoa::@6/uctoa::buffer#4 )
[142] uctoa::started#4 = phi( uctoa::@7/uctoa::started#2, uctoa::@6/1 )
[142] uctoa::value#6 = phi( uctoa::@7/uctoa::value#2, uctoa::@6/uctoa::value#0 )
[143] uctoa::digit#1 = ++ uctoa::digit#2
to:uctoa::@1
uctoa::@5: scope:[uctoa] from uctoa::@2 uctoa::@7
[146] uctoa_append::buffer#0 = uctoa::buffer#11
[147] uctoa_append::value#0 = uctoa::value#2
[148] uctoa_append::sub#0 = uctoa::digit_value#0
[149] call uctoa_append
[150] uctoa_append::return#0 = uctoa_append::value#2
[144] uctoa_append::buffer#0 = uctoa::buffer#11
[145] uctoa_append::value#0 = uctoa::value#2
[146] uctoa_append::sub#0 = uctoa::digit_value#0
[147] call uctoa_append
[148] uctoa_append::return#0 = uctoa_append::value#2
to:uctoa::@6
uctoa::@6: scope:[uctoa] from uctoa::@5
[151] uctoa::value#0 = uctoa_append::return#0
[152] uctoa::buffer#4 = ++ uctoa::buffer#11
[149] uctoa::value#0 = uctoa_append::return#0
[150] uctoa::buffer#4 = ++ uctoa::buffer#11
to:uctoa::@4
void printf_number_buffer(void (*putc)(char) , char buffer_sign , char *buffer_digits , char format_min_length , char format_justify_left , char format_sign_always , char format_zero_padding , char format_upper_case , char format_radix)
printf_number_buffer: scope:[printf_number_buffer] from printf_uchar::@2
[153] phi()
[151] phi()
to:printf_number_buffer::@4
printf_number_buffer::@4: scope:[printf_number_buffer] from printf_number_buffer
[154] phi()
[155] call strlen
[156] strlen::return#2 = strlen::len#2
[152] phi()
[153] call strlen
[154] strlen::return#2 = strlen::len#2
to:printf_number_buffer::@9
printf_number_buffer::@9: scope:[printf_number_buffer] from printf_number_buffer::@4
[157] printf_number_buffer::$19 = strlen::return#2
[158] printf_number_buffer::len#0 = (signed char)printf_number_buffer::$19
[159] if(0==printf_number_buffer::buffer_sign#0) goto printf_number_buffer::@8
[155] printf_number_buffer::$19 = strlen::return#2
[156] printf_number_buffer::len#0 = (signed char)printf_number_buffer::$19
[157] if(0==printf_number_buffer::buffer_sign#0) goto printf_number_buffer::@8
to:printf_number_buffer::@5
printf_number_buffer::@5: scope:[printf_number_buffer] from printf_number_buffer::@9
[160] printf_number_buffer::len#1 = ++ printf_number_buffer::len#0
[158] printf_number_buffer::len#1 = ++ printf_number_buffer::len#0
to:printf_number_buffer::@8
printf_number_buffer::@8: scope:[printf_number_buffer] from printf_number_buffer::@5 printf_number_buffer::@9
[161] printf_number_buffer::len#2 = phi( printf_number_buffer::@9/printf_number_buffer::len#0, printf_number_buffer::@5/printf_number_buffer::len#1 )
[162] printf_number_buffer::padding#1 = (signed char)printf_uchar::format_min_length#0 - printf_number_buffer::len#2
[163] if(printf_number_buffer::padding#1>=0) goto printf_number_buffer::@11
[159] printf_number_buffer::len#2 = phi( printf_number_buffer::@9/printf_number_buffer::len#0, printf_number_buffer::@5/printf_number_buffer::len#1 )
[160] printf_number_buffer::padding#1 = (signed char)printf_uchar::format_min_length#0 - printf_number_buffer::len#2
[161] if(printf_number_buffer::padding#1>=0) goto printf_number_buffer::@11
to:printf_number_buffer::@1
printf_number_buffer::@11: scope:[printf_number_buffer] from printf_number_buffer::@8
[164] phi()
[162] phi()
to:printf_number_buffer::@1
printf_number_buffer::@1: scope:[printf_number_buffer] from printf_number_buffer::@11 printf_number_buffer::@8
[165] printf_number_buffer::padding#10 = phi( printf_number_buffer::@11/printf_number_buffer::padding#1, printf_number_buffer::@8/0 )
[163] printf_number_buffer::padding#10 = phi( printf_number_buffer::@11/printf_number_buffer::padding#1, printf_number_buffer::@8/0 )
to:printf_number_buffer::@10
printf_number_buffer::@10: scope:[printf_number_buffer] from printf_number_buffer::@1
[166] if(0!=printf_number_buffer::padding#10) goto printf_number_buffer::@6
[164] if(0!=printf_number_buffer::padding#10) goto printf_number_buffer::@6
to:printf_number_buffer::@2
printf_number_buffer::@6: scope:[printf_number_buffer] from printf_number_buffer::@10
[167] printf_padding::length#0 = (char)printf_number_buffer::padding#10
[168] call printf_padding
[165] printf_padding::length#0 = (char)printf_number_buffer::padding#10
[166] call printf_padding
to:printf_number_buffer::@2
printf_number_buffer::@2: scope:[printf_number_buffer] from printf_number_buffer::@10 printf_number_buffer::@6
[169] if(0==printf_number_buffer::buffer_sign#0) goto printf_number_buffer::@3
[167] if(0==printf_number_buffer::buffer_sign#0) goto printf_number_buffer::@3
to:printf_number_buffer::@7
printf_number_buffer::@7: scope:[printf_number_buffer] from printf_number_buffer::@2
[170] stackpush(char) = printf_number_buffer::buffer_sign#0
[171] callexecute cputc
[168] stackpush(char) = printf_number_buffer::buffer_sign#0
[169] callexecute cputc
sideeffect stackpullbytes(1)
to:printf_number_buffer::@3
printf_number_buffer::@3: scope:[printf_number_buffer] from printf_number_buffer::@2 printf_number_buffer::@7
[173] phi()
[174] call printf_str
[171] phi()
[172] call printf_str
to:printf_number_buffer::@return
printf_number_buffer::@return: scope:[printf_number_buffer] from printf_number_buffer::@3
[175] return
[173] return
to:@return
void * memcpy(void *destination , void *source , unsigned int num)
memcpy: scope:[memcpy] from cscroll::@3 cscroll::@4
[176] memcpy::destination#2 = phi( cscroll::@3/(void *)DEFAULT_SCREEN, cscroll::@4/(void *)COLORRAM )
[176] memcpy::source#2 = phi( cscroll::@3/(void *)DEFAULT_SCREEN+$28, cscroll::@4/(void *)COLORRAM+$28 )
[177] memcpy::src_end#0 = (char *)memcpy::source#2 + (unsigned int)$19*$28-$28
[178] memcpy::src#4 = (char *)memcpy::source#2
[179] memcpy::dst#4 = (char *)memcpy::destination#2
memcpy: scope:[memcpy] from cscroll::@1 cscroll::@2
[174] memcpy::destination#2 = phi( cscroll::@1/(void *)DEFAULT_SCREEN, cscroll::@2/(void *)COLORRAM )
[174] memcpy::source#2 = phi( cscroll::@1/(void *)DEFAULT_SCREEN+$28, cscroll::@2/(void *)COLORRAM+$28 )
[175] memcpy::src_end#0 = (char *)memcpy::source#2 + (unsigned int)$19*$28-$28
[176] memcpy::src#4 = (char *)memcpy::source#2
[177] memcpy::dst#4 = (char *)memcpy::destination#2
to:memcpy::@1
memcpy::@1: scope:[memcpy] from memcpy memcpy::@2
[180] memcpy::dst#2 = phi( memcpy/memcpy::dst#4, memcpy::@2/memcpy::dst#1 )
[180] memcpy::src#2 = phi( memcpy/memcpy::src#4, memcpy::@2/memcpy::src#1 )
[181] if(memcpy::src#2!=memcpy::src_end#0) goto memcpy::@2
[178] memcpy::dst#2 = phi( memcpy/memcpy::dst#4, memcpy::@2/memcpy::dst#1 )
[178] memcpy::src#2 = phi( memcpy/memcpy::src#4, memcpy::@2/memcpy::src#1 )
[179] if(memcpy::src#2!=memcpy::src_end#0) goto memcpy::@2
to:memcpy::@return
memcpy::@return: scope:[memcpy] from memcpy::@1
[182] return
[180] return
to:@return
memcpy::@2: scope:[memcpy] from memcpy::@1
[183] *memcpy::dst#2 = *memcpy::src#2
[184] memcpy::dst#1 = ++ memcpy::dst#2
[185] memcpy::src#1 = ++ memcpy::src#2
[181] *memcpy::dst#2 = *memcpy::src#2
[182] memcpy::dst#1 = ++ memcpy::dst#2
[183] memcpy::src#1 = ++ memcpy::src#2
to:memcpy::@1
void * memset(void *str , char c , unsigned int num)
memset: scope:[memset] from cscroll::@5 cscroll::@6
[186] memset::c#4 = phi( cscroll::@5/' ', cscroll::@6/memset::c#1 )
[186] memset::str#3 = phi( cscroll::@5/(void *)DEFAULT_SCREEN+(unsigned int)$19*$28-$28, cscroll::@6/(void *)COLORRAM+(unsigned int)$19*$28-$28 )
memset: scope:[memset] from cscroll::@3 cscroll::@4
[184] memset::c#4 = phi( cscroll::@3/' ', cscroll::@4/LIGHT_BLUE )
[184] memset::str#3 = phi( cscroll::@3/(void *)DEFAULT_SCREEN+(unsigned int)$19*$28-$28, cscroll::@4/(void *)COLORRAM+(unsigned int)$19*$28-$28 )
to:memset::@1
memset::@1: scope:[memset] from memset
[187] memset::end#0 = (char *)memset::str#3 + $28
[188] memset::dst#4 = (char *)memset::str#3
[185] memset::end#0 = (char *)memset::str#3 + $28
[186] memset::dst#4 = (char *)memset::str#3
to:memset::@2
memset::@2: scope:[memset] from memset::@1 memset::@3
[189] memset::dst#2 = phi( memset::@1/memset::dst#4, memset::@3/memset::dst#1 )
[190] if(memset::dst#2!=memset::end#0) goto memset::@3
[187] memset::dst#2 = phi( memset::@1/memset::dst#4, memset::@3/memset::dst#1 )
[188] if(memset::dst#2!=memset::end#0) goto memset::@3
to:memset::@return
memset::@return: scope:[memset] from memset::@2
[191] return
[189] return
to:@return
memset::@3: scope:[memset] from memset::@2
[192] *memset::dst#2 = memset::c#4
[193] memset::dst#1 = ++ memset::dst#2
[190] *memset::dst#2 = memset::c#4
[191] memset::dst#1 = ++ memset::dst#2
to:memset::@2
char uctoa_append(char *buffer , char value , char sub)
uctoa_append: scope:[uctoa_append] from uctoa::@5
[194] phi()
[192] phi()
to:uctoa_append::@1
uctoa_append::@1: scope:[uctoa_append] from uctoa_append uctoa_append::@2
[195] uctoa_append::digit#2 = phi( uctoa_append/0, uctoa_append::@2/uctoa_append::digit#1 )
[195] uctoa_append::value#2 = phi( uctoa_append/uctoa_append::value#0, uctoa_append::@2/uctoa_append::value#1 )
[196] if(uctoa_append::value#2>=uctoa_append::sub#0) goto uctoa_append::@2
[193] uctoa_append::digit#2 = phi( uctoa_append/0, uctoa_append::@2/uctoa_append::digit#1 )
[193] uctoa_append::value#2 = phi( uctoa_append/uctoa_append::value#0, uctoa_append::@2/uctoa_append::value#1 )
[194] if(uctoa_append::value#2>=uctoa_append::sub#0) goto uctoa_append::@2
to:uctoa_append::@3
uctoa_append::@3: scope:[uctoa_append] from uctoa_append::@1
[197] *uctoa_append::buffer#0 = DIGITS[uctoa_append::digit#2]
[195] *uctoa_append::buffer#0 = DIGITS[uctoa_append::digit#2]
to:uctoa_append::@return
uctoa_append::@return: scope:[uctoa_append] from uctoa_append::@3
[198] return
[196] return
to:@return
uctoa_append::@2: scope:[uctoa_append] from uctoa_append::@1
[199] uctoa_append::digit#1 = ++ uctoa_append::digit#2
[200] uctoa_append::value#1 = uctoa_append::value#2 - uctoa_append::sub#0
[197] uctoa_append::digit#1 = ++ uctoa_append::digit#2
[198] uctoa_append::value#1 = uctoa_append::value#2 - uctoa_append::sub#0
to:uctoa_append::@1
unsigned int strlen(char *str)
strlen: scope:[strlen] from printf_number_buffer::@4
[201] phi()
[199] phi()
to:strlen::@1
strlen::@1: scope:[strlen] from strlen strlen::@2
[202] strlen::len#2 = phi( strlen/0, strlen::@2/strlen::len#1 )
[202] strlen::str#2 = phi( strlen/printf_number_buffer::buffer_digits#0, strlen::@2/strlen::str#0 )
[203] if(0!=*strlen::str#2) goto strlen::@2
[200] strlen::len#2 = phi( strlen/0, strlen::@2/strlen::len#1 )
[200] strlen::str#2 = phi( strlen/printf_number_buffer::buffer_digits#0, strlen::@2/strlen::str#0 )
[201] if(0!=*strlen::str#2) goto strlen::@2
to:strlen::@return
strlen::@return: scope:[strlen] from strlen::@1
[204] return
[202] return
to:@return
strlen::@2: scope:[strlen] from strlen::@1
[205] strlen::len#1 = ++ strlen::len#2
[206] strlen::str#0 = ++ strlen::str#2
[203] strlen::len#1 = ++ strlen::len#2
[204] strlen::str#0 = ++ strlen::str#2
to:strlen::@1
void printf_padding(void (*putc)(char) , char pad , char length)
printf_padding: scope:[printf_padding] from printf_number_buffer::@6
[207] phi()
[205] phi()
to:printf_padding::@1
printf_padding::@1: scope:[printf_padding] from printf_padding printf_padding::@3
[208] printf_padding::i#2 = phi( printf_padding/0, printf_padding::@3/printf_padding::i#1 )
[209] if(printf_padding::i#2<printf_padding::length#0) goto printf_padding::@2
[206] printf_padding::i#2 = phi( printf_padding/0, printf_padding::@3/printf_padding::i#1 )
[207] if(printf_padding::i#2<printf_padding::length#0) goto printf_padding::@2
to:printf_padding::@return
printf_padding::@return: scope:[printf_padding] from printf_padding::@1
[210] return
[208] return
to:@return
printf_padding::@2: scope:[printf_padding] from printf_padding::@1
[211] stackpush(char) = printf_padding::pad#0
[212] callexecute cputc
[209] stackpush(char) = printf_padding::pad#0
[210] callexecute cputc
sideeffect stackpullbytes(1)
to:printf_padding::@3
printf_padding::@3: scope:[printf_padding] from printf_padding::@2
[214] printf_padding::i#1 = ++ printf_padding::i#2
[212] printf_padding::i#1 = ++ printf_padding::i#2
to:printf_padding::@1

File diff suppressed because one or more lines are too long

View File

@ -27,8 +27,8 @@ char clrscr::l
char clrscr::l#1 // reg byte x 2002.0
char clrscr::l#2 // reg byte x 333.6666666666667
char *clrscr::line_cols
char *clrscr::line_cols#1 // line_cols zp[2]:18 1001.0
char *clrscr::line_cols#5 // line_cols zp[2]:18 1500.375
char *clrscr::line_cols#1 // line_cols zp[2]:14 1001.0
char *clrscr::line_cols#5 // line_cols zp[2]:14 1500.375
char *clrscr::line_text
char *clrscr::line_text#1 // line_text zp[2]:16 667.3333333333334
char *clrscr::line_text#5 // line_text zp[2]:16 1714.7142857142858
@ -37,12 +37,10 @@ __constant char * const conio_c64_init::BASIC_CURSOR_LINE = (char *) 214
char conio_c64_init::line
char conio_c64_init::line#0 // reg byte x 11.0
char conio_c64_init::line#2 // reg byte x 22.0
__loadstore char conio_cursor_x = 0 // mem[1] 9.854368942524271E8
__loadstore char conio_cursor_y = 0 // mem[1] 1.2571428581619048E9
__loadstore char *conio_line_color // zp[2]:12 1.2852631590421052E9
__loadstore char *conio_line_text // zp[2]:14 1.245918368459184E9
__loadstore char conio_scroll_enable = 1 // mem[1] 1.0000000001E8
__loadstore char conio_textcolor = LIGHT_BLUE // mem[1] 8.706905175E7
__loadstore char conio_cursor_x // zp[1]:19 1.9480522207792208E7
__loadstore char conio_cursor_y // zp[1]:9 3.4408602375268817E8
__loadstore char *conio_line_color // zp[2]:10 2.4285714515384617E8
__loadstore char *conio_line_text // zp[2]:12 2.4021739357608694E8
__stackcall void cputc(char c)
__constant char cputc::OFFSET_STACK_C = 0
char cputc::c
@ -50,25 +48,25 @@ char cputc::c#0 // reg byte a 1.500000015E8
void cputln()
void cscroll()
void gotoxy(char x , char y)
char *gotoxy::$5 // zp[2]:8 2.00000000002E11
char *gotoxy::$6 // zp[2]:10 2.00000000002E11
unsigned int gotoxy::$7 // mem[2] 1.500000000015E11
unsigned int gotoxy::$8 // mem[2] 2.00000000002E11
unsigned int gotoxy::$9 // mem[2] 2.00000000002E11
char *gotoxy::$5 // zp[2]:28 202.0
char *gotoxy::$6 // zp[2]:24 202.0
unsigned int gotoxy::$7 // zp[2]:24 151.5
unsigned int gotoxy::$8 // zp[2]:26 202.0
unsigned int gotoxy::$9 // zp[2]:24 202.0
unsigned int gotoxy::line_offset
unsigned int gotoxy::line_offset#0 // line_offset mem[2] 1.00000000001E11
unsigned int gotoxy::line_offset#0 // line_offset zp[2]:24 101.0
char gotoxy::x
__constant char gotoxy::x#2 = 0 // x
char gotoxy::y
char gotoxy::y#2 // reg byte x 22.0
char gotoxy::y#3 // reg byte x 6.6666666671E10
char gotoxy::y#4 // reg byte x 6.6666666667333336E10
char gotoxy::y#2 // reg byte x 71.0
char gotoxy::y#4 // reg byte x 67.33333333333333
int main()
char main::$6 // mem[1] 101.0
char main::$6 // zp[1]:20 101.0
char main::ch
char main::ch#0 // ch mem[1] 1331.625
char main::ch#0 // ch zp[1]:23 1331.625
char main::current
char main::current#2 // current mem[1] 4220.8
char main::current#4 // current mem[1] 202.0
char main::current#2 // current zp[1]:22 4220.8
char main::current#4 // current zp[1]:22 202.0
int main::return
__constant char main::s[2] = "'"
__constant char main::s1[4] = "'($"
@ -96,8 +94,7 @@ char *memcpy::src_end
char *memcpy::src_end#0 // src_end zp[2]:6 1.26250000000025E12
void * memset(void *str , char c , unsigned int num)
char memset::c
char memset::c#1 // reg byte x 2.0000000002E10
char memset::c#4 // reg byte x 1.430000000000286E12
char memset::c#4 // reg byte x 1.4285714285715715E12
char *memset::dst
char *memset::dst#1 // dst zp[2]:2 2.0000000000002E13
char *memset::dst#2 // dst zp[2]:2 1.3366666666668332E13
@ -121,12 +118,12 @@ char petscii_to_screencode::return#5 // reg byte a 2002.0
char petscii_to_screencode::return#6 // reg byte a 2002.0
__loadstore struct printf_buffer_number printf_buffer = {} // mem[12]
void printf_number_buffer(void (*putc)(char) , char buffer_sign , char *buffer_digits , char format_min_length , char format_justify_left , char format_sign_always , char format_zero_padding , char format_upper_case , char format_radix)
unsigned int printf_number_buffer::$19 // mem[2] 10001.0
unsigned int printf_number_buffer::$19 // zp[2]:14 10001.0
struct printf_buffer_number printf_number_buffer::buffer
char *printf_number_buffer::buffer_digits
__constant char *printf_number_buffer::buffer_digits#0 = (char *)&printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS // buffer_digits
char printf_number_buffer::buffer_sign
char printf_number_buffer::buffer_sign#0 // buffer_sign mem[1] 1722.4444444444443
char printf_number_buffer::buffer_sign#0 // buffer_sign zp[1]:8 1722.4444444444443
struct printf_format_number printf_number_buffer::format
char printf_number_buffer::format_justify_left
char printf_number_buffer::format_min_length
@ -144,10 +141,10 @@ signed char printf_number_buffer::padding#10 // reg byte a 10001.0
void (*printf_number_buffer::putc)(char)
void printf_padding(void (*putc)(char) , char pad , char length)
char printf_padding::i
char printf_padding::i#1 // i mem[1] 2.0000002E7
char printf_padding::i#2 // i mem[1] 6000000.6
char printf_padding::i#1 // i zp[1]:18 2.0000002E7
char printf_padding::i#2 // i zp[1]:18 6000000.6
char printf_padding::length
char printf_padding::length#0 // length mem[1] 1251250.25
char printf_padding::length#0 // length zp[1]:21 1251250.25
char printf_padding::pad
__constant char printf_padding::pad#0 = ' ' // pad
void (*printf_padding::putc)(char)
@ -157,9 +154,9 @@ char printf_str::c#1 // reg byte a 1.0000001E7
void (*printf_str::putc)(char)
void (*printf_str::putc#6)(char) // putc zp[2]:16
const char *printf_str::s
const char *printf_str::s#0 // s zp[2]:18 1.0000001E7
const char *printf_str::s#5 // s zp[2]:18 1.5050002E7
const char *printf_str::s#6 // s zp[2]:18 100001.0
const char *printf_str::s#0 // s zp[2]:14 1.0000001E7
const char *printf_str::s#5 // s zp[2]:14 1.5050002E7
const char *printf_str::s#6 // s zp[2]:14 100001.0
void printf_uchar(void (*putc)(char) , char uvalue , char format_min_length , char format_justify_left , char format_sign_always , char format_zero_padding , char format_upper_case , char format_radix)
struct printf_format_number printf_uchar::format
char printf_uchar::format_justify_left
@ -175,10 +172,10 @@ char printf_uchar::uvalue
char printf_uchar::uvalue#0 // reg byte x 367.33333333333337
unsigned int strlen(char *str)
unsigned int strlen::len
unsigned int strlen::len#1 // len mem[2] 1.0000001E7
unsigned int strlen::len#2 // len mem[2] 5002500.75
unsigned int strlen::len#1 // len zp[2]:14 1.0000001E7
unsigned int strlen::len#2 // len zp[2]:14 5002500.75
unsigned int strlen::return
unsigned int strlen::return#2 // return mem[2] 20002.0
unsigned int strlen::return#2 // return zp[2]:14 20002.0
char *strlen::str
char *strlen::str#0 // str zp[2]:16 2.0000002E7
char *strlen::str#2 // str zp[2]:16 1.0000001E7
@ -189,17 +186,17 @@ char *uctoa::buffer#14 // buffer zp[2]:16 1500001.5
char *uctoa::buffer#3 // buffer zp[2]:16 20002.0
char *uctoa::buffer#4 // buffer zp[2]:16 2000002.0
char uctoa::digit
char uctoa::digit#1 // digit mem[1] 2000002.0
char uctoa::digit#2 // digit mem[1] 307692.6153846154
char uctoa::digit#1 // digit zp[1]:18 2000002.0
char uctoa::digit#2 // digit zp[1]:18 307692.6153846154
char uctoa::digit_value
char uctoa::digit_value#0 // digit_value mem[1] 600000.6000000001
char uctoa::digit_value#0 // digit_value zp[1]:8 600000.6000000001
char *uctoa::digit_values
char uctoa::max_digits
__constant char uctoa::max_digits#2 = 2 // max_digits
char uctoa::radix
char uctoa::started
char uctoa::started#2 // started mem[1] 600000.6000000001
char uctoa::started#4 // started mem[1] 1000001.0
char uctoa::started#2 // started zp[1]:20 600000.6000000001
char uctoa::started#4 // started zp[1]:20 1000001.0
char uctoa::value
char uctoa::value#0 // reg byte x 1000001.0
char uctoa::value#1 // reg byte x 5501.0
@ -214,53 +211,46 @@ char uctoa_append::digit#2 // reg byte y 1.00050000015E10
char uctoa_append::return
char uctoa_append::return#0 // reg byte x 2000002.0
char uctoa_append::sub
char uctoa_append::sub#0 // sub mem[1] 3.3335000005E9
char uctoa_append::sub#0 // sub zp[1]:8 3.3335000005E9
char uctoa_append::value
char uctoa_append::value#0 // reg byte x 3666667.333333333
char uctoa_append::value#1 // reg byte x 2.0000000002E10
char uctoa_append::value#2 // reg byte x 5.001833334166666E9
reg byte x [ conio_c64_init::line#2 conio_c64_init::line#0 ]
mem[1] [ main::current#2 main::current#4 ]
reg byte x [ gotoxy::y#4 gotoxy::y#3 gotoxy::y#2 ]
zp[1]:22 [ main::current#2 main::current#4 ]
reg byte x [ gotoxy::y#4 gotoxy::y#2 ]
reg byte x [ clrscr::l#2 clrscr::l#1 ]
reg byte y [ clrscr::c#2 clrscr::c#1 ]
reg byte a [ petscii_to_screencode::return#10 petscii_to_screencode::return#1 petscii_to_screencode::petscii#0 petscii_to_screencode::return#3 petscii_to_screencode::return#4 petscii_to_screencode::return#5 petscii_to_screencode::return#6 ]
zp[2]:18 [ printf_str::s#5 printf_str::s#6 printf_str::s#0 clrscr::line_cols#5 clrscr::line_cols#1 ]
mem[1] [ uctoa::digit#2 uctoa::digit#1 ]
reg byte x [ uctoa::value#2 uctoa::value#6 uctoa::value#1 uctoa::value#0 ]
mem[1] [ uctoa::started#2 uctoa::started#4 ]
reg byte x [ printf_number_buffer::len#2 printf_number_buffer::len#0 printf_number_buffer::len#1 ]
reg byte a [ printf_number_buffer::padding#10 printf_number_buffer::padding#1 ]
zp[2]:2 [ memset::str#3 memset::dst#2 memset::dst#4 memset::dst#1 memcpy::source#2 memcpy::src#2 memcpy::src#4 memcpy::src#1 ]
reg byte x [ memset::c#4 memset::c#1 ]
reg byte x [ memset::c#4 ]
reg byte x [ uctoa_append::value#2 uctoa_append::value#0 uctoa_append::value#1 ]
reg byte y [ uctoa_append::digit#2 uctoa_append::digit#1 ]
zp[2]:16 [ strlen::str#2 strlen::str#0 uctoa::buffer#11 uctoa::buffer#14 uctoa::buffer#4 uctoa::buffer#3 uctoa_append::buffer#0 printf_str::putc#6 clrscr::line_text#5 clrscr::line_text#1 ]
mem[2] [ strlen::len#2 strlen::len#1 strlen::return#2 printf_number_buffer::$19 ]
mem[1] [ printf_padding::i#2 printf_padding::i#1 ]
zp[2]:14 [ conio_line_text ]
zp[2]:12 [ conio_line_color ]
zp[2]:14 [ strlen::len#2 strlen::len#1 strlen::return#2 printf_number_buffer::$19 printf_str::s#5 printf_str::s#6 printf_str::s#0 clrscr::line_cols#5 clrscr::line_cols#1 ]
zp[1]:18 [ printf_padding::i#2 printf_padding::i#1 uctoa::digit#2 uctoa::digit#1 ]
zp[1]:19 [ conio_cursor_x ]
zp[1]:9 [ conio_cursor_y ]
zp[2]:12 [ conio_line_text ]
zp[2]:10 [ conio_line_color ]
reg byte a [ cputc::c#0 ]
mem[1] [ conio_cursor_x ]
reg byte a [ GETIN::return#0 ]
mem[1] [ main::ch#0 ]
zp[1]:23 [ main::ch#0 ]
reg byte a [ petscii_to_screencode::return#0 ]
mem[1] [ main::$6 ]
zp[1]:20 [ main::$6 uctoa::started#2 uctoa::started#4 ]
reg byte x [ printf_uchar::uvalue#0 ]
mem[1] [ conio_cursor_y ]
mem[2] [ gotoxy::$7 gotoxy::$9 gotoxy::line_offset#0 ]
mem[2] [ gotoxy::$8 ]
zp[2]:8 [ gotoxy::$5 ]
zp[2]:10 [ gotoxy::$6 ]
zp[2]:24 [ gotoxy::$7 gotoxy::$9 gotoxy::line_offset#0 gotoxy::$6 ]
zp[2]:26 [ gotoxy::$8 ]
zp[2]:28 [ gotoxy::$5 ]
reg byte a [ GETIN::return#1 ]
reg byte a [ printf_str::c#1 ]
mem[1] [ printf_number_buffer::buffer_sign#0 ]
mem[1] [ uctoa::digit_value#0 uctoa_append::sub#0 ]
zp[1]:8 [ uctoa::digit_value#0 uctoa_append::sub#0 printf_number_buffer::buffer_sign#0 ]
reg byte x [ uctoa_append::return#0 ]
mem[1] [ printf_padding::length#0 ]
zp[1]:21 [ printf_padding::length#0 ]
zp[2]:6 [ memcpy::src_end#0 ]
zp[2]:4 [ memset::end#0 memcpy::destination#2 memcpy::dst#2 memcpy::dst#4 memcpy::dst#1 ]
mem[1] [ conio_textcolor ]
mem[1] [ conio_scroll_enable ]
mem[12] [ printf_buffer ]

View File

@ -19,8 +19,8 @@ main: {
ldx.z $12,y
lda ($12,x)
lda ($12),y
ora.z ($12),z
lda.z ($12,sp),y
ora ($12),z
lda ($12,sp),y
lda $1234
lda $1234,x
lda $1234,y
@ -32,8 +32,8 @@ main: {
lbl2:
jmp ($1234,x)
lbl3:
lda.z (($12)),z
ldq.z (($12))
lda (($12)),z
ldq (($12))
// }
rts
}

View File

@ -89,8 +89,8 @@ main: {
ldx.z $12,y
lda ($12,x)
lda ($12),y
ora.z ($12),z
lda.z ($12,sp),y
ora ($12),z
lda ($12,sp),y
lda $1234
lda $1234,x
lda $1234,y
@ -102,8 +102,8 @@ main: {
lbl2:
jmp ($1234,x)
lbl3:
lda.z (($12)),z
ldq.z (($12))
lda (($12)),z
ldq (($12))
jmp __breturn
// main::@return
__breturn:
@ -156,8 +156,8 @@ main: {
ldx.z $12,y
lda ($12,x)
lda ($12),y
ora.z ($12),z
lda.z ($12,sp),y
ora ($12),z
lda ($12,sp),y
lda $1234
lda $1234,x
lda $1234,y
@ -169,8 +169,8 @@ main: {
lbl2:
jmp ($1234,x)
lbl3:
lda.z (($12)),z
ldq.z (($12))
lda (($12)),z
ldq (($12))
// main::@return
// }
// [1] return

View File

@ -16,7 +16,7 @@ main: {
lda.z $12
lda.z $12,x
ldx.z $12,y
ora.z ($12)
ora ($12)
lda ($12,x)
lda ($12),y
lda $1234

View File

@ -11,7 +11,7 @@ main::@return: scope:[main] from main
void __start()
__start: scope:[__start] from
call main
call main
to:__start::@1
__start::@1: scope:[__start] from __start
to:__start::@return
@ -82,7 +82,7 @@ main: {
lda.z $12
lda.z $12,x
ldx.z $12,y
ora.z ($12)
ora ($12)
lda ($12,x)
lda ($12),y
lda $1234
@ -141,7 +141,7 @@ main: {
lda.z $12
lda.z $12,x
ldx.z $12,y
ora.z ($12)
ora ($12)
lda ($12,x)
lda ($12),y
lda $1234

View File

@ -19,8 +19,8 @@ main: {
ldx.z $12,y
lda ($12,x)
lda ($12),y
ora.z ($12),z
lda.z ($12,sp),y
ora ($12),z
lda ($12,sp),y
lda $1234
lda $1234,x
lda $1234,y

View File

@ -89,8 +89,8 @@ main: {
ldx.z $12,y
lda ($12,x)
lda ($12),y
ora.z ($12),z
lda.z ($12,sp),y
ora ($12),z
lda ($12,sp),y
lda $1234
lda $1234,x
lda $1234,y
@ -155,8 +155,8 @@ main: {
ldx.z $12,y
lda ($12,x)
lda ($12),y
ora.z ($12),z
lda.z ($12,sp),y
ora ($12),z
lda ($12,sp),y
lda $1234
lda $1234,x
lda $1234,y

View File

@ -43,7 +43,7 @@ main: {
ldz #0
!:
tza
sta.z ((ADDR32)),z
sta ((ADDR32)),z
inz
cpz #$50
bne !-
@ -61,7 +61,7 @@ main: {
lda #'*'
ldz #$4f
!:
sta.z ((ADDR32)),z
sta ((ADDR32)),z
dez
bpl !-
// }

View File

@ -175,7 +175,7 @@ main: {
ldz #0
!:
tza
sta.z ((ADDR32)),z
sta ((ADDR32)),z
inz
cpz #$50
bne !-
@ -193,7 +193,7 @@ main: {
lda #'*'
ldz #$4f
!:
sta.z ((ADDR32)),z
sta ((ADDR32)),z
dez
bpl !-
jmp __breturn
@ -291,7 +291,7 @@ main: {
ldz #0
!:
tza
sta.z ((ADDR32)),z
sta ((ADDR32)),z
inz
cpz #$50
bne !-
@ -311,7 +311,7 @@ main: {
lda #'*'
ldz #$4f
!:
sta.z ((ADDR32)),z
sta ((ADDR32)),z
dez
bpl !-
// main::@return

View File

@ -102,11 +102,11 @@ cputc: {
beq __b1
// conio_line_text[conio_cursor_x] = c
ldz conio_cursor_x
sta.z (conio_line_text),z
sta (conio_line_text),z
// conio_line_color[conio_cursor_x] = conio_textcolor
lda #LIGHT_BLUE
ldz conio_cursor_x
sta.z (conio_line_color),z
sta (conio_line_color),z
// if(++conio_cursor_x==CONIO_WIDTH)
inc.z conio_cursor_x
lda #$50

View File

@ -1804,11 +1804,11 @@ cputc: {
__b2:
// [25] conio_line_text[conio_cursor_x] = cputc::c#0 -- pbuz1_derefidx_vbuz2=vbuaa
ldz conio_cursor_x
sta.z (conio_line_text),z
sta (conio_line_text),z
// [26] conio_line_color[conio_cursor_x] = LIGHT_BLUE -- pbuz1_derefidx_vbuz2=vbuc1
lda #LIGHT_BLUE
ldz conio_cursor_x
sta.z (conio_line_color),z
sta (conio_line_color),z
// [27] conio_cursor_x = ++ conio_cursor_x -- vbuz1=_inc_vbuz1
inc.z conio_cursor_x
// [28] if(conio_cursor_x!=$50) goto cputc::@return -- vbuz1_neq_vbuc1_then_la1
@ -2659,12 +2659,12 @@ cputc: {
// conio_line_text[conio_cursor_x] = c
// [25] conio_line_text[conio_cursor_x] = cputc::c#0 -- pbuz1_derefidx_vbuz2=vbuaa
ldz conio_cursor_x
sta.z (conio_line_text),z
sta (conio_line_text),z
// conio_line_color[conio_cursor_x] = conio_textcolor
// [26] conio_line_color[conio_cursor_x] = LIGHT_BLUE -- pbuz1_derefidx_vbuz2=vbuc1
lda #LIGHT_BLUE
ldz conio_cursor_x
sta.z (conio_line_color),z
sta (conio_line_color),z
// if(++conio_cursor_x==CONIO_WIDTH)
// [27] conio_cursor_x = ++ conio_cursor_x -- vbuz1=_inc_vbuz1
inc.z conio_cursor_x