1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2024-11-22 16:33:48 +00:00

Added WeeIP test of complex array of structs with char* members. Improved error message when applying member reference operator to non-struct.

This commit is contained in:
jespergravgaard 2021-08-02 12:18:43 +02:00
parent 6f69add10a
commit 689246780e
4 changed files with 7632 additions and 0 deletions

View File

@ -0,0 +1,717 @@
// Test initialization of array of struct with char* elements
// Commodore 64 PRG executable file
.file [name="weeip-bbslist.prg", type="prg", segments="Program"]
.segmentdef Program [segments="Basic, Code, Data"]
.segmentdef Basic [start=$0801]
.segmentdef Code [start=$80d]
.segmentdef Data [startAfter="Code"]
.segment Basic
:BasicUpstart(__start)
.const LIGHT_BLUE = $e
.const SIZEOF_STRUCT_BBS = 6
.const OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS = 1
.const OFFSET_STRUCT_MOS6569_VICII_MEMORY = $18
.const OFFSET_STRUCT_BBS_HOST_NAME = 2
.const OFFSET_STRUCT_BBS_PORT_NUMBER = 4
.const SIZEOF_STRUCT_PRINTF_BUFFER_NUMBER = $c
/// The VIC-II MOS 6567/6569
.label VICII = $d000
/// Color Ram
.label COLORRAM = $d800
/// Default address of screen character matrix
.label DEFAULT_SCREEN = $400
// The number of bytes on the screen
// The current cursor x-position
.label conio_cursor_x = 9
// The current cursor y-position
.label conio_cursor_y = $a
// The current text cursor line start
.label conio_line_text = $b
// The current color cursor line start
.label conio_line_color = $d
.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
lda #>DEFAULT_SCREEN
sta.z conio_line_text+1
// __ma char *conio_line_color = CONIO_SCREEN_COLORS
lda #<COLORRAM
sta.z conio_line_color
lda #>COLORRAM
sta.z conio_line_color+1
// #pragma constructor_for(conio_c64_init, cputc, clrscr, cscroll)
jsr conio_c64_init
jsr main
rts
}
// Set initial cursor position
conio_c64_init: {
// Position cursor at current line
.label BASIC_CURSOR_LINE = $d6
// char line = *BASIC_CURSOR_LINE
ldx BASIC_CURSOR_LINE
// if(line>=CONIO_HEIGHT)
cpx #$19
bcc __b1
ldx #$19-1
__b1:
// gotoxy(0, line)
jsr gotoxy
// }
rts
}
main: {
.label bbs = 2
// VICII->MEMORY = 0x17
lda #$17
sta VICII+OFFSET_STRUCT_MOS6569_VICII_MEMORY
lda #<bbs_list
sta.z bbs
lda #>bbs_list
sta.z bbs+1
__b1:
// for(struct bbs * bbs = bbs_list; bbs->name; bbs++)
ldy #0
tya
cmp (bbs),y
bne __b2
iny
cmp (bbs),y
bne __b2
// }
rts
__b2:
// printf("%s %s %u\n", bbs->name, bbs->host_name, bbs->port_number)
ldy #0
lda (bbs),y
sta.z printf_string.str
iny
lda (bbs),y
sta.z printf_string.str+1
jsr printf_string
// printf("%s %s %u\n", bbs->name, bbs->host_name, bbs->port_number)
lda #<s
sta.z cputs.s
lda #>s
sta.z cputs.s+1
jsr cputs
// printf("%s %s %u\n", bbs->name, bbs->host_name, bbs->port_number)
ldy #OFFSET_STRUCT_BBS_HOST_NAME
lda (bbs),y
sta.z printf_string.str
iny
lda (bbs),y
sta.z printf_string.str+1
jsr printf_string
// printf("%s %s %u\n", bbs->name, bbs->host_name, bbs->port_number)
lda #<s
sta.z cputs.s
lda #>s
sta.z cputs.s+1
jsr cputs
// printf("%s %s %u\n", bbs->name, bbs->host_name, bbs->port_number)
ldy #OFFSET_STRUCT_BBS_PORT_NUMBER
lda (bbs),y
sta.z printf_uint.uvalue
iny
lda (bbs),y
sta.z printf_uint.uvalue+1
jsr printf_uint
// printf("%s %s %u\n", bbs->name, bbs->host_name, bbs->port_number)
lda #<s2
sta.z cputs.s
lda #>s2
sta.z cputs.s+1
jsr cputs
// for(struct bbs * bbs = bbs_list; bbs->name; bbs++)
lda #SIZEOF_STRUCT_BBS
clc
adc.z bbs
sta.z bbs
bcc !+
inc.z bbs+1
!:
jmp __b1
.segment Data
s: .text " "
.byte 0
s2: .text @"\n"
.byte 0
}
.segment Code
// Set the cursor to the specified position
// gotoxy(byte register(X) y)
gotoxy: {
.const x = 0
.label __5 = $13
.label __6 = $f
.label __7 = $f
.label line_offset = $f
.label __8 = $11
.label __9 = $f
// if(y>CONIO_HEIGHT)
cpx #$19+1
bcc __b2
ldx #0
__b2:
// conio_cursor_x = x
lda #x
sta.z conio_cursor_x
// conio_cursor_y = y
stx.z conio_cursor_y
// unsigned int line_offset = (unsigned int)y*CONIO_WIDTH
txa
sta.z __7
lda #0
sta.z __7+1
lda.z __7
asl
sta.z __8
lda.z __7+1
rol
sta.z __8+1
asl.z __8
rol.z __8+1
clc
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.z line_offset
clc
adc #<DEFAULT_SCREEN
sta.z __5
lda.z line_offset+1
adc #>DEFAULT_SCREEN
sta.z __5+1
// conio_line_text = CONIO_SCREEN_TEXT + line_offset
lda.z __5
sta.z conio_line_text
lda.z __5+1
sta.z conio_line_text+1
// CONIO_SCREEN_COLORS + line_offset
lda.z __6
clc
adc #<COLORRAM
sta.z __6
lda.z __6+1
adc #>COLORRAM
sta.z __6+1
// conio_line_color = CONIO_SCREEN_COLORS + line_offset
lda.z __6
sta.z conio_line_color
lda.z __6+1
sta.z conio_line_color+1
// }
rts
}
// Print a string value using a specific format
// Handles justification and min length
// printf_string(byte* zp(5) str)
printf_string: {
.label str = 5
// cputs(str)
jsr cputs
// }
rts
}
// Output a NUL-terminated string at the current cursor position
// cputs(const byte* zp(5) s)
cputs: {
.label s = 5
__b1:
// while(c=*s++)
ldy #0
lda (s),y
inc.z s
bne !+
inc.z s+1
!:
cmp #0
bne __b2
// }
rts
__b2:
// cputc(c)
jsr cputc
jmp __b1
}
// Print an unsigned int using a specific format
// printf_uint(word zp(5) uvalue)
printf_uint: {
.label uvalue = 5
// printf_buffer.sign = format.sign_always?'+':0
// Handle any sign
lda #0
sta printf_buffer
// utoa(uvalue, printf_buffer.digits, format.radix)
// Format number into buffer
jsr utoa
// printf_number_buffer(printf_buffer, format)
lda printf_buffer
// Print using format
jsr printf_number_buffer
// }
rts
}
// Output one character at the current cursor position
// Moves the cursor forward. Scrolls the entire screen if needed
// cputc(byte register(A) c)
cputc: {
// if(c=='\n')
cmp #'\n'
beq __b1
// conio_line_text[conio_cursor_x] = c
ldy.z conio_cursor_x
sta (conio_line_text),y
// conio_line_color[conio_cursor_x] = conio_textcolor
lda #LIGHT_BLUE
sta (conio_line_color),y
// if(++conio_cursor_x==CONIO_WIDTH)
inc.z conio_cursor_x
lda #$28
cmp.z conio_cursor_x
bne __breturn
// cputln()
jsr cputln
__breturn:
// }
rts
__b1:
// cputln()
jsr cputln
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
// - buffer : receives the string representing the number and zero-termination.
// - radix : The radix to convert the number to (from the enum RADIX)
// utoa(word zp(5) value, byte* zp($17) buffer)
utoa: {
.const max_digits = 5
.label digit_value = $15
.label buffer = $17
.label digit = 4
.label value = 5
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
ldx #0
txa
sta.z digit
__b1:
// for( char digit=0; digit<max_digits-1; digit++ )
lda.z digit
cmp #max_digits-1
bcc __b2
// *buffer++ = DIGITS[(char)value]
ldx.z value
lda DIGITS,x
ldy #0
sta (buffer),y
// *buffer++ = DIGITS[(char)value];
inc.z buffer
bne !+
inc.z buffer+1
!:
// *buffer = 0
lda #0
tay
sta (buffer),y
// }
rts
__b2:
// unsigned int digit_value = digit_values[digit]
lda.z digit
asl
tay
lda RADIX_DECIMAL_VALUES,y
sta.z digit_value
lda RADIX_DECIMAL_VALUES+1,y
sta.z digit_value+1
// if (started || value >= digit_value)
cpx #0
bne __b5
cmp.z value+1
bne !+
lda.z digit_value
cmp.z value
beq __b5
!:
bcc __b5
__b4:
// for( char digit=0; digit<max_digits-1; digit++ )
inc.z digit
jmp __b1
__b5:
// utoa_append(buffer++, value, digit_value)
jsr utoa_append
// utoa_append(buffer++, value, digit_value)
// value = utoa_append(buffer++, value, digit_value)
// value = utoa_append(buffer++, value, digit_value);
inc.z buffer
bne !+
inc.z buffer+1
!:
ldx #1
jmp __b4
}
// Print the contents of the number buffer using a specific format.
// This handles minimum length, zero-filling, and left/right justification from the format
// printf_number_buffer(byte register(A) buffer_sign)
printf_number_buffer: {
.label buffer_digits = printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS
// if(buffer.sign)
cmp #0
beq __b2
// cputc(buffer.sign)
jsr cputc
__b2:
// cputs(buffer.digits)
lda #<buffer_digits
sta.z cputs.s
lda #>buffer_digits
sta.z cputs.s+1
jsr cputs
// }
rts
}
// Print a newline
cputln: {
// conio_line_text += CONIO_WIDTH
lda #$28
clc
adc.z conio_line_text
sta.z conio_line_text
bcc !+
inc.z conio_line_text+1
!:
// conio_line_color += CONIO_WIDTH
lda #$28
clc
adc.z conio_line_color
sta.z conio_line_color
bcc !+
inc.z conio_line_color+1
!:
// conio_cursor_x = 0
lda #0
sta.z conio_cursor_x
// conio_cursor_y++;
inc.z conio_cursor_y
// cscroll()
jsr cscroll
// }
rts
}
// Used to convert a single digit of an unsigned number value to a string representation
// Counts a single digit up from '0' as long as the value is larger than sub.
// Each time the digit is increased sub is subtracted from value.
// - buffer : pointer to the char that receives the digit
// - value : The value where the digit will be derived from
// - 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.
// utoa_append(byte* zp($17) buffer, word zp(5) value, word zp($15) sub)
utoa_append: {
.label buffer = $17
.label value = 5
.label sub = $15
.label return = 5
ldx #0
__b1:
// while (value >= sub)
lda.z sub+1
cmp.z value+1
bne !+
lda.z sub
cmp.z value
beq __b2
!:
bcc __b2
// *buffer = DIGITS[digit]
lda DIGITS,x
ldy #0
sta (buffer),y
// }
rts
__b2:
// digit++;
inx
// value -= sub
lda.z value
sec
sbc.z sub
sta.z value
lda.z value+1
sbc.z sub+1
sta.z value+1
jmp __b1
}
// Scroll the entire screen if the cursor is beyond the last line
cscroll: {
// if(conio_cursor_y==CONIO_HEIGHT)
lda #$19
cmp.z conio_cursor_y
bne __breturn
// memcpy(CONIO_SCREEN_TEXT, CONIO_SCREEN_TEXT+CONIO_WIDTH, CONIO_BYTES-CONIO_WIDTH)
lda #<DEFAULT_SCREEN
sta.z memcpy.destination
lda #>DEFAULT_SCREEN
sta.z memcpy.destination+1
lda #<DEFAULT_SCREEN+$28
sta.z memcpy.source
lda #>DEFAULT_SCREEN+$28
sta.z memcpy.source+1
jsr memcpy
// memcpy(CONIO_SCREEN_COLORS, CONIO_SCREEN_COLORS+CONIO_WIDTH, CONIO_BYTES-CONIO_WIDTH)
lda #<COLORRAM
sta.z memcpy.destination
lda #>COLORRAM
sta.z memcpy.destination+1
lda #<COLORRAM+$28
sta.z memcpy.source
lda #>COLORRAM+$28
sta.z memcpy.source+1
jsr memcpy
// memset(CONIO_SCREEN_TEXT+CONIO_BYTES-CONIO_WIDTH, ' ', CONIO_WIDTH)
ldx #' '
lda #<DEFAULT_SCREEN+$19*$28-$28
sta.z memset.str
lda #>DEFAULT_SCREEN+$19*$28-$28
sta.z memset.str+1
jsr memset
// memset(CONIO_SCREEN_COLORS+CONIO_BYTES-CONIO_WIDTH, conio_textcolor, CONIO_WIDTH)
ldx #LIGHT_BLUE
lda #<COLORRAM+$19*$28-$28
sta.z memset.str
lda #>COLORRAM+$19*$28-$28
sta.z memset.str+1
jsr memset
// conio_line_text -= CONIO_WIDTH
sec
lda.z conio_line_text
sbc #$28
sta.z conio_line_text
lda.z conio_line_text+1
sbc #0
sta.z conio_line_text+1
// conio_line_color -= CONIO_WIDTH
sec
lda.z conio_line_color
sbc #$28
sta.z conio_line_color
lda.z conio_line_color+1
sbc #0
sta.z conio_line_color+1
// conio_cursor_y--;
dec.z conio_cursor_y
__breturn:
// }
rts
}
// 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(void* zp(7) destination, void* zp($17) source)
memcpy: {
.label src_end = $15
.label dst = 7
.label src = $17
.label source = $17
.label destination = 7
// char* src_end = (char*)source+num
lda.z source
clc
adc #<$19*$28-$28
sta.z src_end
lda.z source+1
adc #>$19*$28-$28
sta.z src_end+1
__b1:
// while(src!=src_end)
lda.z src+1
cmp.z src_end+1
bne __b2
lda.z src
cmp.z 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
}
// Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str.
// memset(void* zp(7) str, byte register(X) c)
memset: {
.label end = $17
.label dst = 7
.label str = 7
// char* end = (char*)str + num
lda #$28
clc
adc.z str
sta.z end
lda #0
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
// }
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
}
.segment Data
// The digits used for numbers
DIGITS: .text "0123456789abcdef"
// Values of decimal digits
RADIX_DECIMAL_VALUES: .word $2710, $3e8, $64, $a
bbs_list: .word bbs_name, bbs_host_name, $fa80, bbs_name1, bbs_host_name1, $fa80, bbs_name2, bbs_host_name2, $fa80, bbs_name3, bbs_host_name3, $17, bbs_name4, bbs_host_name4, $fa80, bbs_name5, bbs_host_name5, $1900, bbs_name6, bbs_host_name6, $17, bbs_name7, bbs_host_name7, $1900, bbs_name8, bbs_host_name8, $1900, bbs_name9, bbs_host_name9, $1900, bbs_name10, bbs_host_name10, $17, bbs_name11, bbs_host_name11, $1900, bbs_name12, bbs_host_name12, $8fc, bbs_name13, bbs_host_name13, $1900, bbs_name14, bbs_host_name14, $1900, bbs_name15, bbs_host_name15, $1966, bbs_name16, bbs_host_name8, $1904, bbs_name17, bbs_host_name1, $fa80, bbs_name18, bbs_host_name18, $1900, bbs_name19, bbs_host_name19, $1900, bbs_name20, bbs_host_name20, $1966, bbs_name21, bbs_host_name21, $1900, bbs_name22, bbs_host_name22, $1900, bbs_name23, bbs_host_name23, $fa80, bbs_name24, bbs_host_name24, $605, bbs_name25, bbs_host_name25, $fa80, 0, 0, 0
bbs_name: .text "Boar's Head"
.byte 0
bbs_host_name: .text "byob.hopto.org"
.byte 0
bbs_name1: .text "RapidFire"
.byte 0
bbs_host_name1: .text "rapidfire.hopto.org"
.byte 0
bbs_name2: .text "Antidote by Triad"
.byte 0
bbs_host_name2: .text "antidote.hopto.org"
.byte 0
bbs_name3: .text "Wizards's Realm"
.byte 0
bbs_host_name3: .text "wizardsrealm.c64bbs.org"
.byte 0
bbs_name4: .text "The Hidden"
.byte 0
bbs_host_name4: .text "the-hidden.hopto.org"
.byte 0
bbs_name5: .text "Eaglewing BBS"
.byte 0
bbs_host_name5: .text "eagelbird.ddns.net"
.byte 0
bbs_name6: .text "Scorps Portal"
.byte 0
bbs_host_name6: .text "scorp.us.to"
.byte 0
bbs_name7: .text "My C=ult BBS"
.byte 0
bbs_host_name7: .text "maraud.dynalias.com"
.byte 0
bbs_name8: .text "Commodore Image"
.byte 0
bbs_host_name8: .text "cib.dyndns.org"
.byte 0
bbs_name9: .text "64 Vintag Remic"
.byte 0
bbs_host_name9: .text "64vintageremixbbs.dyndns.org"
.byte 0
bbs_name10: .text "Jamming Signal"
.byte 0
bbs_host_name10: .text "bbs.jammingsignal.com"
.byte 0
bbs_name11: .text "Centronian BBS"
.byte 0
bbs_host_name11: .text "centronian.servebeer.com"
.byte 0
bbs_name12: .text "Anrchy Undergrnd"
.byte 0
bbs_host_name12: .text "aubbs.dyndns.org"
.byte 0
bbs_name13: .text "The Oasis BBS"
.byte 0
bbs_host_name13: .text "oasisbbs.hopto.org"
.byte 0
bbs_name14: .text "The Disk Box"
.byte 0
bbs_host_name14: .text "bbs.thediskbox.com"
.byte 0
bbs_name15: .text "Cottonwood"
.byte 0
bbs_host_name15: .text "cottonwoodbbs.dyndns.org"
.byte 0
bbs_name16: .text "Wrong Number ]["
.byte 0
bbs_name17: .text "RabidFire"
.byte 0
bbs_name18: .text "Mad World"
.byte 0
bbs_host_name18: .text "madworld.bounceme.net"
.byte 0
bbs_name19: .text "Citadel 64"
.byte 0
bbs_host_name19: .text "bbs.thejlab.com"
.byte 0
bbs_name20: .text "Hotwire BBS"
.byte 0
bbs_host_name20: .text "hotwirebbs.zapto.org"
.byte 0
bbs_name21: .text "Endless Chaos"
.byte 0
bbs_host_name21: .text "endlesschaos.dyndns.org"
.byte 0
bbs_name22: .text "Borderline"
.byte 0
bbs_host_name22: .text "borderlinebbs.dyndns.org"
.byte 0
bbs_name23: .text "RAVELOUTION"
.byte 0
bbs_host_name23: .text "raveolution.hopto.org"
.byte 0
bbs_name24: .text "The Edge BBS"
.byte 0
bbs_host_name24: .text "theedgebbs.dyndns.org"
.byte 0
bbs_name25: .text "PGS Test"
.byte 0
bbs_host_name25: .text "F96NG92-L.fritz.box"
.byte 0
// Buffer used for stringified number being printed
printf_buffer: .fill SIZEOF_STRUCT_PRINTF_BUFFER_NUMBER, 0

View File

@ -0,0 +1,341 @@
void __start()
__start: scope:[__start] from
[0] phi()
to:__start::__init1
__start::__init1: scope:[__start] from __start
[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
[6] phi()
[7] call main
to:__start::@return
__start::@return: scope:[__start] from __start::@1
[8] return
to:@return
void conio_c64_init()
conio_c64_init: scope:[conio_c64_init] from __start::__init1
[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
[11] phi()
to:conio_c64_init::@1
conio_c64_init::@1: scope:[conio_c64_init] from conio_c64_init conio_c64_init::@2
[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
[15] return
to:@return
void main()
main: scope:[main] from __start::@1
[16] *((byte*)VICII+OFFSET_STRUCT_MOS6569_VICII_MEMORY) = $17
to:main::@1
main::@1: scope:[main] from main main::@8
[17] main::bbs#2 = phi( main/bbs_list, main::@8/main::bbs#1 )
[18] if((byte*)0!=*((byte**)main::bbs#2)) goto main::@2
to:main::@return
main::@return: scope:[main] from main::@1
[19] return
to:@return
main::@2: scope:[main] from main::@1
[20] printf_string::str#0 = *((byte**)main::bbs#2)
[21] call printf_string
to:main::@3
main::@3: scope:[main] from main::@2
[22] phi()
[23] call cputs
to:main::@4
main::@4: scope:[main] from main::@3
[24] printf_string::str#1 = ((byte**)main::bbs#2)[OFFSET_STRUCT_BBS_HOST_NAME]
[25] call printf_string
to:main::@5
main::@5: scope:[main] from main::@4
[26] phi()
[27] call cputs
to:main::@6
main::@6: scope:[main] from main::@5
[28] printf_uint::uvalue#0 = ((word*)main::bbs#2)[OFFSET_STRUCT_BBS_PORT_NUMBER]
[29] call printf_uint
to:main::@7
main::@7: scope:[main] from main::@6
[30] phi()
[31] call cputs
to:main::@8
main::@8: scope:[main] from main::@7
[32] main::bbs#1 = main::bbs#2 + SIZEOF_STRUCT_BBS
to:main::@1
void gotoxy(byte gotoxy::x , byte gotoxy::y)
gotoxy: scope:[gotoxy] from conio_c64_init::@1
[33] if(gotoxy::y#2<$19+1) goto gotoxy::@3
to:gotoxy::@1
gotoxy::@3: scope:[gotoxy] from gotoxy
[34] phi()
to:gotoxy::@1
gotoxy::@1: scope:[gotoxy] from gotoxy gotoxy::@3
[35] gotoxy::y#4 = phi( gotoxy::@3/gotoxy::y#2, gotoxy/0 )
to:gotoxy::@2
gotoxy::@2: scope:[gotoxy] from gotoxy::@1
[36] conio_cursor_x = gotoxy::x#2
[37] conio_cursor_y = gotoxy::y#4
[38] gotoxy::$7 = (word)gotoxy::y#4
[39] gotoxy::$8 = gotoxy::$7 << 2
[40] gotoxy::$9 = gotoxy::$8 + gotoxy::$7
[41] gotoxy::line_offset#0 = gotoxy::$9 << 3
[42] gotoxy::$5 = DEFAULT_SCREEN + gotoxy::line_offset#0
[43] conio_line_text = gotoxy::$5
[44] gotoxy::$6 = COLORRAM + gotoxy::line_offset#0
[45] conio_line_color = gotoxy::$6
to:gotoxy::@return
gotoxy::@return: scope:[gotoxy] from gotoxy::@2
[46] return
to:@return
void printf_string(byte* printf_string::str , byte printf_string::format_min_length , byte printf_string::format_justify_left)
printf_string: scope:[printf_string] from main::@2 main::@4
[47] printf_string::str#2 = phi( main::@2/printf_string::str#0, main::@4/printf_string::str#1 )
to:printf_string::@1
printf_string::@1: scope:[printf_string] from printf_string
[48] cputs::s#2 = printf_string::str#2
[49] call cputs
to:printf_string::@return
printf_string::@return: scope:[printf_string] from printf_string::@1
[50] return
to:@return
void cputs(const byte* cputs::s)
cputs: scope:[cputs] from main::@3 main::@5 main::@7 printf_number_buffer::@2 printf_string::@1
[51] cputs::s#7 = phi( main::@3/main::s, main::@5/main::s, main::@7/main::s2, printf_number_buffer::@2/printf_number_buffer::buffer_digits#0, printf_string::@1/cputs::s#2 )
to:cputs::@1
cputs::@1: scope:[cputs] from cputs cputs::@2
[52] cputs::s#6 = phi( cputs/cputs::s#7, cputs::@2/cputs::s#0 )
[53] cputs::c#1 = *cputs::s#6
[54] cputs::s#0 = ++ cputs::s#6
[55] if(0!=cputs::c#1) goto cputs::@2
to:cputs::@return
cputs::@return: scope:[cputs] from cputs::@1
[56] return
to:@return
cputs::@2: scope:[cputs] from cputs::@1
[57] cputc::c#0 = cputs::c#1
[58] call cputc
to:cputs::@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::@6
[59] phi()
to:printf_uint::@1
printf_uint::@1: scope:[printf_uint] from printf_uint
[60] *((byte*)&printf_buffer) = 0
[61] utoa::value#1 = printf_uint::uvalue#0
[62] call utoa
to:printf_uint::@2
printf_uint::@2: scope:[printf_uint] from printf_uint::@1
[63] printf_number_buffer::buffer_sign#0 = *((byte*)&printf_buffer)
[64] call printf_number_buffer
to:printf_uint::@return
printf_uint::@return: scope:[printf_uint] from printf_uint::@2
[65] return
to:@return
void cputc(byte cputc::c)
cputc: scope:[cputc] from cputs::@2 printf_number_buffer::@3
[66] cputc::c#3 = phi( cputs::@2/cputc::c#0, printf_number_buffer::@3/cputc::c#2 )
[67] if(cputc::c#3=='
') goto cputc::@1
to:cputc::@2
cputc::@2: scope:[cputc] from cputc
[68] conio_line_text[conio_cursor_x] = cputc::c#3
[69] conio_line_color[conio_cursor_x] = LIGHT_BLUE
[70] conio_cursor_x = ++ conio_cursor_x
[71] if(conio_cursor_x!=$28) goto cputc::@return
to:cputc::@3
cputc::@3: scope:[cputc] from cputc::@2
[72] phi()
[73] call cputln
to:cputc::@return
cputc::@return: scope:[cputc] from cputc::@1 cputc::@2 cputc::@3
[74] return
to:@return
cputc::@1: scope:[cputc] from cputc
[75] phi()
[76] call cputln
to:cputc::@return
void utoa(word utoa::value , byte* utoa::buffer , byte utoa::radix)
utoa: scope:[utoa] from printf_uint::@1
[77] phi()
to:utoa::@1
utoa::@1: scope:[utoa] from utoa utoa::@4
[78] utoa::buffer#11 = phi( utoa::@4/utoa::buffer#14, utoa/(byte*)&printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS )
[78] utoa::started#2 = phi( utoa::@4/utoa::started#4, utoa/0 )
[78] utoa::value#2 = phi( utoa::@4/utoa::value#6, utoa/utoa::value#1 )
[78] utoa::digit#2 = phi( utoa::@4/utoa::digit#1, utoa/0 )
[79] if(utoa::digit#2<utoa::max_digits#1-1) goto utoa::@2
to:utoa::@3
utoa::@3: scope:[utoa] from utoa::@1
[80] utoa::$11 = (byte)utoa::value#2
[81] *utoa::buffer#11 = DIGITS[utoa::$11]
[82] utoa::buffer#3 = ++ utoa::buffer#11
[83] *utoa::buffer#3 = 0
to:utoa::@return
utoa::@return: scope:[utoa] from utoa::@3
[84] return
to:@return
utoa::@2: scope:[utoa] from utoa::@1
[85] utoa::$10 = utoa::digit#2 << 1
[86] utoa::digit_value#0 = RADIX_DECIMAL_VALUES[utoa::$10]
[87] if(0!=utoa::started#2) goto utoa::@5
to:utoa::@7
utoa::@7: scope:[utoa] from utoa::@2
[88] if(utoa::value#2>=utoa::digit_value#0) goto utoa::@5
to:utoa::@4
utoa::@4: scope:[utoa] from utoa::@6 utoa::@7
[89] utoa::buffer#14 = phi( utoa::@7/utoa::buffer#11, utoa::@6/utoa::buffer#4 )
[89] utoa::started#4 = phi( utoa::@7/utoa::started#2, utoa::@6/1 )
[89] utoa::value#6 = phi( utoa::@7/utoa::value#2, utoa::@6/utoa::value#0 )
[90] utoa::digit#1 = ++ utoa::digit#2
to:utoa::@1
utoa::@5: scope:[utoa] from utoa::@2 utoa::@7
[91] utoa_append::buffer#0 = utoa::buffer#11
[92] utoa_append::value#0 = utoa::value#2
[93] utoa_append::sub#0 = utoa::digit_value#0
[94] call utoa_append
[95] utoa_append::return#0 = utoa_append::value#2
to:utoa::@6
utoa::@6: scope:[utoa] from utoa::@5
[96] utoa::value#0 = utoa_append::return#0
[97] utoa::buffer#4 = ++ utoa::buffer#11
to:utoa::@4
void printf_number_buffer(byte printf_number_buffer::buffer_sign , byte* printf_number_buffer::buffer_digits , byte printf_number_buffer::format_min_length , byte printf_number_buffer::format_justify_left , byte printf_number_buffer::format_sign_always , byte printf_number_buffer::format_zero_padding , byte printf_number_buffer::format_upper_case , byte printf_number_buffer::format_radix)
printf_number_buffer: scope:[printf_number_buffer] from printf_uint::@2
[98] phi()
to:printf_number_buffer::@1
printf_number_buffer::@1: scope:[printf_number_buffer] from printf_number_buffer
[99] if(0==printf_number_buffer::buffer_sign#0) goto printf_number_buffer::@2
to:printf_number_buffer::@3
printf_number_buffer::@3: scope:[printf_number_buffer] from printf_number_buffer::@1
[100] cputc::c#2 = printf_number_buffer::buffer_sign#0
[101] call cputc
to:printf_number_buffer::@2
printf_number_buffer::@2: scope:[printf_number_buffer] from printf_number_buffer::@1 printf_number_buffer::@3
[102] phi()
[103] call cputs
to:printf_number_buffer::@return
printf_number_buffer::@return: scope:[printf_number_buffer] from printf_number_buffer::@2
[104] return
to:@return
void cputln()
cputln: scope:[cputln] from cputc::@1 cputc::@3
[105] conio_line_text = conio_line_text + $28
[106] conio_line_color = conio_line_color + $28
[107] conio_cursor_x = 0
[108] conio_cursor_y = ++ conio_cursor_y
[109] call cscroll
to:cputln::@return
cputln::@return: scope:[cputln] from cputln
[110] return
to:@return
word utoa_append(byte* utoa_append::buffer , word utoa_append::value , word utoa_append::sub)
utoa_append: scope:[utoa_append] from utoa::@5
[111] phi()
to:utoa_append::@1
utoa_append::@1: scope:[utoa_append] from utoa_append utoa_append::@2
[112] utoa_append::digit#2 = phi( utoa_append/0, utoa_append::@2/utoa_append::digit#1 )
[112] utoa_append::value#2 = phi( utoa_append/utoa_append::value#0, utoa_append::@2/utoa_append::value#1 )
[113] if(utoa_append::value#2>=utoa_append::sub#0) goto utoa_append::@2
to:utoa_append::@3
utoa_append::@3: scope:[utoa_append] from utoa_append::@1
[114] *utoa_append::buffer#0 = DIGITS[utoa_append::digit#2]
to:utoa_append::@return
utoa_append::@return: scope:[utoa_append] from utoa_append::@3
[115] return
to:@return
utoa_append::@2: scope:[utoa_append] from utoa_append::@1
[116] utoa_append::digit#1 = ++ utoa_append::digit#2
[117] utoa_append::value#1 = utoa_append::value#2 - utoa_append::sub#0
to:utoa_append::@1
void cscroll()
cscroll: scope:[cscroll] from cputln
[118] if(conio_cursor_y!=$19) goto cscroll::@return
to:cscroll::@1
cscroll::@1: scope:[cscroll] from cscroll
[119] phi()
[120] call memcpy
to:cscroll::@2
cscroll::@2: scope:[cscroll] from cscroll::@1
[121] phi()
[122] call memcpy
to:cscroll::@3
cscroll::@3: scope:[cscroll] from cscroll::@2
[123] phi()
[124] call memset
to:cscroll::@4
cscroll::@4: scope:[cscroll] from cscroll::@3
[125] phi()
[126] call memset
to:cscroll::@5
cscroll::@5: scope:[cscroll] from cscroll::@4
[127] conio_line_text = conio_line_text - $28
[128] conio_line_color = conio_line_color - $28
[129] conio_cursor_y = -- conio_cursor_y
to:cscroll::@return
cscroll::@return: scope:[cscroll] from cscroll cscroll::@5
[130] return
to:@return
void* memcpy(void* memcpy::destination , void* memcpy::source , word memcpy::num)
memcpy: scope:[memcpy] from cscroll::@1 cscroll::@2
[131] memcpy::destination#2 = phi( cscroll::@1/(void*)DEFAULT_SCREEN, cscroll::@2/(void*)COLORRAM )
[131] memcpy::source#2 = phi( cscroll::@1/(void*)DEFAULT_SCREEN+$28, cscroll::@2/(void*)COLORRAM+$28 )
[132] memcpy::src_end#0 = (byte*)memcpy::source#2 + (word)$19*$28-$28
[133] memcpy::src#4 = (byte*)memcpy::source#2
[134] memcpy::dst#4 = (byte*)memcpy::destination#2
to:memcpy::@1
memcpy::@1: scope:[memcpy] from memcpy memcpy::@2
[135] memcpy::dst#2 = phi( memcpy/memcpy::dst#4, memcpy::@2/memcpy::dst#1 )
[135] memcpy::src#2 = phi( memcpy/memcpy::src#4, memcpy::@2/memcpy::src#1 )
[136] if(memcpy::src#2!=memcpy::src_end#0) goto memcpy::@2
to:memcpy::@return
memcpy::@return: scope:[memcpy] from memcpy::@1
[137] return
to:@return
memcpy::@2: scope:[memcpy] from memcpy::@1
[138] *memcpy::dst#2 = *memcpy::src#2
[139] memcpy::dst#1 = ++ memcpy::dst#2
[140] memcpy::src#1 = ++ memcpy::src#2
to:memcpy::@1
void* memset(void* memset::str , byte memset::c , word memset::num)
memset: scope:[memset] from cscroll::@3 cscroll::@4
[141] memset::c#4 = phi( cscroll::@3/' ', cscroll::@4/LIGHT_BLUE )
[141] memset::str#3 = phi( cscroll::@3/(void*)DEFAULT_SCREEN+(word)$19*$28-$28, cscroll::@4/(void*)COLORRAM+(word)$19*$28-$28 )
to:memset::@1
memset::@1: scope:[memset] from memset
[142] memset::end#0 = (byte*)memset::str#3 + $28
[143] memset::dst#4 = (byte*)memset::str#3
to:memset::@2
memset::@2: scope:[memset] from memset::@1 memset::@3
[144] memset::dst#2 = phi( memset::@1/memset::dst#4, memset::@3/memset::dst#1 )
[145] if(memset::dst#2!=memset::end#0) goto memset::@3
to:memset::@return
memset::@return: scope:[memset] from memset::@2
[146] return
to:@return
memset::@3: scope:[memset] from memset::@2
[147] *memset::dst#2 = memset::c#4
[148] memset::dst#1 = ++ memset::dst#2
to:memset::@2

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,242 @@
constant byte* const COLORRAM = (byte*) 55296
constant byte* const DEFAULT_SCREEN = (byte*) 1024
constant byte* DIGITS[] = "0123456789abcdef"z
constant const byte LIGHT_BLUE = $e
constant byte OFFSET_STRUCT_BBS_HOST_NAME = 2
constant byte OFFSET_STRUCT_BBS_PORT_NUMBER = 4
constant byte OFFSET_STRUCT_MOS6569_VICII_MEMORY = $18
constant byte OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS = 1
constant byte RADIX::BINARY = 2
constant byte RADIX::DECIMAL = $a
constant byte RADIX::HEXADECIMAL = $10
constant byte RADIX::OCTAL = 8
constant word* RADIX_DECIMAL_VALUES[] = { $2710, $3e8, $64, $a }
constant byte SIZEOF_STRUCT_BBS = 6
constant byte SIZEOF_STRUCT_PRINTF_BUFFER_NUMBER = $c
constant struct MOS6569_VICII* const VICII = (struct MOS6569_VICII*) 53248
void __start()
constant byte* bbs_host_name[$f] = "byob.hopto.org"
constant byte* bbs_host_name1[$14] = "rapidfire.hopto.org"
constant byte* bbs_host_name10[$16] = "bbs.jammingsignal.com"
constant byte* bbs_host_name11[$19] = "centronian.servebeer.com"
constant byte* bbs_host_name12[$11] = "aubbs.dyndns.org"
constant byte* bbs_host_name13[$13] = "oasisbbs.hopto.org"
constant byte* bbs_host_name14[$13] = "bbs.thediskbox.com"
constant byte* bbs_host_name15[$19] = "cottonwoodbbs.dyndns.org"
constant byte* bbs_host_name18[$16] = "madworld.bounceme.net"
constant byte* bbs_host_name19[$10] = "bbs.thejlab.com"
constant byte* bbs_host_name2[$13] = "antidote.hopto.org"
constant byte* bbs_host_name20[$15] = "hotwirebbs.zapto.org"
constant byte* bbs_host_name21[$18] = "endlesschaos.dyndns.org"
constant byte* bbs_host_name22[$19] = "borderlinebbs.dyndns.org"
constant byte* bbs_host_name23[$16] = "raveolution.hopto.org"
constant byte* bbs_host_name24[$16] = "theedgebbs.dyndns.org"
constant byte* bbs_host_name25[$14] = "F96NG92-L.fritz.box"
constant byte* bbs_host_name3[$18] = "wizardsrealm.c64bbs.org"
constant byte* bbs_host_name4[$15] = "the-hidden.hopto.org"
constant byte* bbs_host_name5[$13] = "eagelbird.ddns.net"
constant byte* bbs_host_name6[$c] = "scorp.us.to"
constant byte* bbs_host_name7[$14] = "maraud.dynalias.com"
constant byte* bbs_host_name8[$f] = "cib.dyndns.org"
constant byte* bbs_host_name9[$1d] = "64vintageremixbbs.dyndns.org"
constant const struct bbs* bbs_list[$1b] = { { name: bbs_name, host_name: bbs_host_name, port_number: $fa80 }, { name: bbs_name1, host_name: bbs_host_name1, port_number: $fa80 }, { name: bbs_name2, host_name: bbs_host_name2, port_number: $fa80 }, { name: bbs_name3, host_name: bbs_host_name3, port_number: $17 }, { name: bbs_name4, host_name: bbs_host_name4, port_number: $fa80 }, { name: bbs_name5, host_name: bbs_host_name5, port_number: $1900 }, { name: bbs_name6, host_name: bbs_host_name6, port_number: $17 }, { name: bbs_name7, host_name: bbs_host_name7, port_number: $1900 }, { name: bbs_name8, host_name: bbs_host_name8, port_number: $1900 }, { name: bbs_name9, host_name: bbs_host_name9, port_number: $1900 }, { name: bbs_name10, host_name: bbs_host_name10, port_number: $17 }, { name: bbs_name11, host_name: bbs_host_name11, port_number: $1900 }, { name: bbs_name12, host_name: bbs_host_name12, port_number: $8fc }, { name: bbs_name13, host_name: bbs_host_name13, port_number: $1900 }, { name: bbs_name14, host_name: bbs_host_name14, port_number: $1900 }, { name: bbs_name15, host_name: bbs_host_name15, port_number: $1966 }, { name: bbs_name16, host_name: bbs_host_name8, port_number: $1904 }, { name: bbs_name17, host_name: bbs_host_name1, port_number: $fa80 }, { name: bbs_name18, host_name: bbs_host_name18, port_number: $1900 }, { name: bbs_name19, host_name: bbs_host_name19, port_number: $1900 }, { name: bbs_name20, host_name: bbs_host_name20, port_number: $1966 }, { name: bbs_name21, host_name: bbs_host_name21, port_number: $1900 }, { name: bbs_name22, host_name: bbs_host_name22, port_number: $1900 }, { name: bbs_name23, host_name: bbs_host_name23, port_number: $fa80 }, { name: bbs_name24, host_name: bbs_host_name24, port_number: $605 }, { name: bbs_name25, host_name: bbs_host_name25, port_number: $fa80 }, { name: 0, host_name: 0, port_number: 0 } }
constant byte* bbs_name[$c] = "Boar's Head"
constant byte* bbs_name1[$a] = "RapidFire"
constant byte* bbs_name10[$f] = "Jamming Signal"
constant byte* bbs_name11[$f] = "Centronian BBS"
constant byte* bbs_name12[$11] = "Anrchy Undergrnd"
constant byte* bbs_name13[$e] = "The Oasis BBS"
constant byte* bbs_name14[$d] = "The Disk Box"
constant byte* bbs_name15[$b] = "Cottonwood"
constant byte* bbs_name16[$10] = "Wrong Number ]["
constant byte* bbs_name17[$a] = "RabidFire"
constant byte* bbs_name18[$a] = "Mad World"
constant byte* bbs_name19[$b] = "Citadel 64"
constant byte* bbs_name2[$12] = "Antidote by Triad"
constant byte* bbs_name20[$c] = "Hotwire BBS"
constant byte* bbs_name21[$e] = "Endless Chaos"
constant byte* bbs_name22[$b] = "Borderline"
constant byte* bbs_name23[$c] = "RAVELOUTION"
constant byte* bbs_name24[$d] = "The Edge BBS"
constant byte* bbs_name25[9] = "PGS Test"
constant byte* bbs_name3[$10] = "Wizards's Realm"
constant byte* bbs_name4[$b] = "The Hidden"
constant byte* bbs_name5[$e] = "Eaglewing BBS"
constant byte* bbs_name6[$e] = "Scorps Portal"
constant byte* bbs_name7[$d] = "My C=ult BBS"
constant byte* bbs_name8[$10] = "Commodore Image"
constant byte* bbs_name9[$10] = "64 Vintag Remic"
void conio_c64_init()
constant byte* const conio_c64_init::BASIC_CURSOR_LINE = (byte*) 214
byte conio_c64_init::line
byte conio_c64_init::line#0 reg byte x 11.0
byte conio_c64_init::line#2 reg byte x 22.0
byte conio_cursor_x loadstore zp[1]:9 2.1428572985714287E7
byte conio_cursor_y loadstore zp[1]:10 3.720930245116279E8
byte* conio_line_color loadstore zp[2]:13 2.8333333471794873E8
byte* conio_line_text loadstore zp[2]:11 2.7625000135E8
void cputc(byte cputc::c)
byte cputc::c
byte cputc::c#0 reg byte a 2.0000002E7
byte cputc::c#2 reg byte a 20002.0
byte cputc::c#3 reg byte a 1.05005002E8
void cputln()
void cputs(const byte* cputs::s)
byte cputs::c
byte cputs::c#1 reg byte a 1.0000001E7
const byte* cputs::s
const byte* cputs::s#0 s zp[2]:5 5000000.5
const byte* cputs::s#2 s zp[2]:5 2002.0
const byte* cputs::s#6 s zp[2]:5 1.5050002E7
const byte* cputs::s#7 s zp[2]:5 101002.0
void cscroll()
void gotoxy(byte gotoxy::x , byte gotoxy::y)
byte*~ gotoxy::$5 zp[2]:19 202.0
byte*~ gotoxy::$6 zp[2]:15 202.0
word~ gotoxy::$7 zp[2]:15 151.5
word~ gotoxy::$8 zp[2]:17 202.0
word~ gotoxy::$9 zp[2]:15 202.0
word gotoxy::line_offset
word gotoxy::line_offset#0 line_offset zp[2]:15 101.0
byte gotoxy::x
constant byte gotoxy::x#2 x = 0
byte gotoxy::y
byte gotoxy::y#2 reg byte x 71.0
byte gotoxy::y#4 reg byte x 67.33333333333333
void main()
struct bbs* main::bbs
struct bbs* main::bbs#1 bbs zp[2]:2 202.0
struct bbs* main::bbs#2 bbs zp[2]:2 14.428571428571429
constant byte* main::s[2] = " "
constant byte* main::s2[2] = "
"
void* memcpy(void* memcpy::destination , void* memcpy::source , word memcpy::num)
void* memcpy::destination
void* memcpy::destination#2 destination zp[2]:7
byte* memcpy::dst
byte* memcpy::dst#1 dst zp[2]:7 1.00000000000001E14
byte* memcpy::dst#2 dst zp[2]:7 1.0003333333333467E14
byte* memcpy::dst#4 dst zp[2]:7 2.00000000002E11
word memcpy::num
void* memcpy::return
void* memcpy::source
void* memcpy::source#2 source zp[2]:23
byte* memcpy::src
byte* memcpy::src#1 src zp[2]:23 2.00000000000002E14
byte* memcpy::src#2 src zp[2]:23 1.0002500000000125E14
byte* memcpy::src#4 src zp[2]:23 1.00000000001E11
byte* memcpy::src_end
byte* memcpy::src_end#0 src_end zp[2]:21 1.251250000000025E13
void* memset(void* memset::str , byte memset::c , word memset::num)
byte memset::c
byte memset::c#4 reg byte x 1.4285714285714428E13
byte* memset::dst
byte* memset::dst#1 dst zp[2]:7 2.00000000000002E14
byte* memset::dst#2 dst zp[2]:7 1.3336666666666834E14
byte* memset::dst#4 dst zp[2]:7 2.00000000002E11
byte* memset::end
byte* memset::end#0 end zp[2]:23 1.6683333333333668E13
word memset::num
void* memset::return
void* memset::str
void* memset::str#3 str zp[2]:7
struct printf_buffer_number printf_buffer loadstore mem[12] = {}
void printf_number_buffer(byte printf_number_buffer::buffer_sign , byte* printf_number_buffer::buffer_digits , byte printf_number_buffer::format_min_length , byte printf_number_buffer::format_justify_left , byte printf_number_buffer::format_sign_always , byte printf_number_buffer::format_zero_padding , byte printf_number_buffer::format_upper_case , byte printf_number_buffer::format_radix)
struct printf_buffer_number printf_number_buffer::buffer
byte* printf_number_buffer::buffer_digits
constant byte* printf_number_buffer::buffer_digits#0 buffer_digits = (byte*)&printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS
byte printf_number_buffer::buffer_sign
byte printf_number_buffer::buffer_sign#0 reg byte a 7001.0
struct printf_format_number printf_number_buffer::format
byte printf_number_buffer::format_justify_left
byte printf_number_buffer::format_min_length
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_zero_padding
signed byte printf_number_buffer::len
signed byte printf_number_buffer::padding
void printf_string(byte* printf_string::str , byte printf_string::format_min_length , byte printf_string::format_justify_left)
struct printf_format_string printf_string::format
byte printf_string::format_justify_left
byte printf_string::format_min_length
signed byte printf_string::len
signed byte printf_string::padding
byte* printf_string::str
byte* printf_string::str#0 str zp[2]:5 202.0
byte* printf_string::str#1 str zp[2]:5 202.0
byte* printf_string::str#2 str zp[2]:5 1203.0
void printf_uint(word printf_uint::uvalue , byte printf_uint::format_min_length , byte printf_uint::format_justify_left , byte printf_uint::format_sign_always , byte printf_uint::format_zero_padding , byte printf_uint::format_upper_case , byte printf_uint::format_radix)
struct printf_format_number printf_uint::format
byte printf_uint::format_justify_left
byte printf_uint::format_min_length
byte printf_uint::format_radix
byte printf_uint::format_sign_always
byte printf_uint::format_upper_case
byte printf_uint::format_zero_padding
word printf_uint::uvalue
word printf_uint::uvalue#0 uvalue zp[2]:5 367.33333333333337
void utoa(word utoa::value , byte* utoa::buffer , byte utoa::radix)
byte~ utoa::$10 reg byte a 2000002.0
byte~ utoa::$11 reg byte x 20002.0
byte* utoa::buffer
byte* utoa::buffer#11 buffer zp[2]:23 287143.2857142857
byte* utoa::buffer#14 buffer zp[2]:23 1500001.5
byte* utoa::buffer#3 buffer zp[2]:23 20002.0
byte* utoa::buffer#4 buffer zp[2]:23 2000002.0
byte utoa::digit
byte utoa::digit#1 digit zp[1]:4 2000002.0
byte utoa::digit#2 digit zp[1]:4 285714.5714285714
word utoa::digit_value
word utoa::digit_value#0 digit_value zp[2]:21 600000.6000000001
word* utoa::digit_values
byte utoa::max_digits
constant byte utoa::max_digits#1 max_digits = 5
byte utoa::radix
byte utoa::started
byte utoa::started#2 reg byte x 500000.5
byte utoa::started#4 reg byte x 1000001.0
word utoa::value
word utoa::value#0 value zp[2]:5 1000001.0
word utoa::value#1 value zp[2]:5 5501.0
word utoa::value#2 value zp[2]:5 572857.857142857
word utoa::value#6 value zp[2]:5 1500001.5
word utoa_append(byte* utoa_append::buffer , word utoa_append::value , word utoa_append::sub)
byte* utoa_append::buffer
byte* utoa_append::buffer#0 buffer zp[2]:23 1375000.25
byte utoa_append::digit
byte utoa_append::digit#1 reg byte x 1.0000000001E10
byte utoa_append::digit#2 reg byte x 1.00050000015E10
word utoa_append::return
word utoa_append::return#0 return zp[2]:5 2000002.0
word utoa_append::sub
word utoa_append::sub#0 sub zp[2]:21 3.3335000005E9
word utoa_append::value
word utoa_append::value#0 value zp[2]:5 3666667.333333333
word utoa_append::value#1 value zp[2]:5 2.0000000002E10
word utoa_append::value#2 value zp[2]:5 5.001833334166666E9
reg byte x [ conio_c64_init::line#2 conio_c64_init::line#0 ]
zp[2]:2 [ main::bbs#2 main::bbs#1 ]
reg byte x [ gotoxy::y#4 gotoxy::y#2 ]
reg byte a [ cputc::c#3 cputc::c#0 cputc::c#2 ]
zp[1]:4 [ utoa::digit#2 utoa::digit#1 ]
zp[2]:5 [ utoa::value#2 utoa::value#6 utoa::value#1 utoa::value#0 utoa_append::value#2 utoa_append::value#0 utoa_append::value#1 printf_uint::uvalue#0 utoa_append::return#0 printf_string::str#2 printf_string::str#0 printf_string::str#1 cputs::s#6 cputs::s#7 cputs::s#2 cputs::s#0 ]
reg byte x [ utoa::started#2 utoa::started#4 ]
reg byte x [ utoa_append::digit#2 utoa_append::digit#1 ]
zp[2]:7 [ memset::str#3 memset::dst#2 memset::dst#4 memset::dst#1 memcpy::destination#2 memcpy::dst#2 memcpy::dst#4 memcpy::dst#1 ]
reg byte x [ memset::c#4 ]
zp[1]:9 [ conio_cursor_x ]
zp[1]:10 [ conio_cursor_y ]
zp[2]:11 [ conio_line_text ]
zp[2]:13 [ conio_line_color ]
zp[2]:15 [ gotoxy::$7 gotoxy::$9 gotoxy::line_offset#0 gotoxy::$6 ]
zp[2]:17 [ gotoxy::$8 ]
zp[2]:19 [ gotoxy::$5 ]
reg byte a [ cputs::c#1 ]
reg byte a [ printf_number_buffer::buffer_sign#0 ]
reg byte x [ utoa::$11 ]
reg byte a [ utoa::$10 ]
zp[2]:21 [ memcpy::src_end#0 utoa::digit_value#0 utoa_append::sub#0 ]
zp[2]:23 [ memset::end#0 memcpy::source#2 memcpy::src#2 memcpy::src#4 memcpy::src#1 utoa::buffer#11 utoa::buffer#14 utoa::buffer#4 utoa::buffer#3 utoa_append::buffer#0 ]
mem[12] [ printf_buffer ]