1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2025-02-10 10:31:27 +00:00

Added test of toupper()

This commit is contained in:
jespergravgaard 2020-04-25 20:23:40 +02:00
parent 793a776b04
commit 7069a8c17c
7 changed files with 3720 additions and 2 deletions

View File

@ -31,7 +31,7 @@ void cputc(char c);
// Move cursor and output one character
// Same as "gotoxy (x, y); cputc (c);"
void cputcxy (unsigned char x, unsigned char y, char c);
void cputcxy(unsigned char x, unsigned char y, char c);
// Output a NUL-terminated string at the current cursor position
void cputs(const char* s);
@ -44,7 +44,7 @@ void cputsxy(unsigned char x, unsigned char y, const char* s);
void chline(unsigned char length);
// Output a vertical line with the given length at the current cursor position.
void cvline (unsigned char length);
void cvline(unsigned char length);
// Move cursor and output a vertical line with the given length
// Same as "gotoxy (x, y); cvline (length);"

View File

@ -40,6 +40,11 @@ public class TestPrograms {
public TestPrograms() {
}
@Test
public void testToUpper1() throws IOException, URISyntaxException {
compileAndCompare("toupper-1.c");
}
@Test
public void testPrintfError5() throws IOException, URISyntaxException {
assertError("printf-error-5.c", "Error! printf() format parameter must be a string!");

20
src/test/kc/toupper-1.c Normal file
View File

@ -0,0 +1,20 @@
// Test toupper()
#include <conio.h>
#include <ctype.h>
void main() {
// Show mixed chars on screen
*((char*)0xd018) = 0x17;
// Clear screen
clrscr();
// Output un-modified chars
for(char c:0..0xff) {
cputc(c);
}
gotoxy(0, wherey()+2);
// Output toupper-chars chars
for(char c:0..0xff) {
cputc(toupper(c));
}
}

259
src/test/ref/toupper-1.asm Normal file
View File

@ -0,0 +1,259 @@
// Test toupper()
.pc = $801 "Basic"
:BasicUpstart(main)
.pc = $80d "Program"
// The text screen address
.label CONIO_SCREEN_TEXT = $400
// The color screen address
.label CONIO_SCREEN_COLORS = $d800
// The screen width
.const CONIO_WIDTH = $28
// The screen height
.const CONIO_HEIGHT = $19
// The default text color
.const CONIO_TEXTCOLOR_DEFAULT = $e
// The current cursor x-position
.label conio_cursor_x = 7
// The current cursor y-position
.label conio_cursor_y = 2
// The current cursor address
.label conio_cursor_text = 3
// The current cursor address
.label conio_cursor_color = 5
main: {
// *((char*)0xd018) = 0x17
// Show mixed chars on screen
lda #$17
sta $d018
// clrscr()
// Clear screen
jsr clrscr
lda #<CONIO_SCREEN_COLORS
sta.z conio_cursor_color
lda #>CONIO_SCREEN_COLORS
sta.z conio_cursor_color+1
lda #<CONIO_SCREEN_TEXT
sta.z conio_cursor_text
lda #>CONIO_SCREEN_TEXT
sta.z conio_cursor_text+1
lda #0
sta.z conio_cursor_y
sta.z conio_cursor_x
tax
// Output un-modified chars
__b1:
// cputc(c)
txa
jsr cputc
// for(char c:0..0xff)
inx
cpx #0
bne __b1
// return conio_cursor_y;
lda.z conio_cursor_y
// gotoxy(0, wherey()+2)
clc
adc #2
jsr gotoxy
lda #0
sta.z conio_cursor_x
tax
// Output toupper-chars chars
__b2:
// toupper(c)
txa
jsr toupper
// cputc(toupper(c))
jsr cputc
// for(char c:0..0xff)
inx
cpx #0
bne __b2
// }
rts
}
// Output one character at the current cursor position
// Moves the cursor forward
// cputc(byte register(A) c)
cputc: {
// if(c=='\n')
cmp #'\n'
beq __b1
// *conio_cursor_text++ = c
ldy #0
sta (conio_cursor_text),y
// *conio_cursor_text++ = c;
inc.z conio_cursor_text
bne !+
inc.z conio_cursor_text+1
!:
// *conio_cursor_color++ = conio_textcolor
lda #CONIO_TEXTCOLOR_DEFAULT
ldy #0
sta (conio_cursor_color),y
// *conio_cursor_color++ = conio_textcolor;
inc.z conio_cursor_color
bne !+
inc.z conio_cursor_color+1
!:
// if(++conio_cursor_x==CONIO_WIDTH)
inc.z conio_cursor_x
lda #CONIO_WIDTH
cmp.z conio_cursor_x
bne __breturn
// if(++conio_cursor_y==CONIO_HEIGHT)
inc.z conio_cursor_y
lda #CONIO_HEIGHT
cmp.z conio_cursor_y
bne __b2
// gotoxy(0,0)
lda #0
jsr gotoxy
__b2:
lda #0
sta.z conio_cursor_x
rts
__breturn:
// }
rts
__b1:
// gotoxy(0, conio_cursor_y+1)
lda.z conio_cursor_y
clc
adc #1
jsr gotoxy
jmp __b2
}
// Set the cursor to the specified position
// gotoxy(byte register(A) y)
gotoxy: {
.label __8 = 5
.label offset = 5
.label __9 = $a
.label __10 = 5
// if(y>=CONIO_HEIGHT)
cmp #CONIO_HEIGHT
bcc __b2
lda #0
__b2:
// conio_cursor_y = y
sta.z conio_cursor_y
// (unsigned int)y*CONIO_WIDTH
sta.z __8
lda #0
sta.z __8+1
lda.z __8
asl
sta.z __9
lda.z __8+1
rol
sta.z __9+1
asl.z __9
rol.z __9+1
lda.z __10
clc
adc.z __9
sta.z __10
lda.z __10+1
adc.z __9+1
sta.z __10+1
// offset = (unsigned int)y*CONIO_WIDTH + x
asl.z offset
rol.z offset+1
asl.z offset
rol.z offset+1
asl.z offset
rol.z offset+1
// CONIO_SCREEN_TEXT + offset
lda.z offset
clc
adc #<CONIO_SCREEN_TEXT
sta.z conio_cursor_text
lda.z offset+1
adc #>CONIO_SCREEN_TEXT
sta.z conio_cursor_text+1
// CONIO_SCREEN_COLORS + offset
clc
lda.z conio_cursor_color
adc #<CONIO_SCREEN_COLORS
sta.z conio_cursor_color
lda.z conio_cursor_color+1
adc #>CONIO_SCREEN_COLORS
sta.z conio_cursor_color+1
// }
rts
}
// Convert lowercase alphabet to uppercase
// Returns uppercase equivalent to c, if such value exists, else c remains unchanged
// toupper(byte register(A) ch)
toupper: {
// if(ch>='a' && ch<='z')
cmp #'a'
bcc __breturn
cmp #'z'
bcc __b1
beq __b1
rts
__b1:
// return ch + ('A'-'a');
clc
adc #'A'-'a'
__breturn:
// }
rts
}
// clears the screen and moves the cursor to the upper left-hand corner of the screen.
clrscr: {
.label line_text = $a
.label line_cols = 8
lda #<CONIO_SCREEN_COLORS
sta.z line_cols
lda #>CONIO_SCREEN_COLORS
sta.z line_cols+1
lda #<CONIO_SCREEN_TEXT
sta.z line_text
lda #>CONIO_SCREEN_TEXT
sta.z line_text+1
ldx #0
__b1:
// for( char l=0;l<CONIO_HEIGHT; l++ )
cpx #CONIO_HEIGHT
bcc __b4
// }
rts
__b4:
ldy #0
__b2:
// for( char c=0;c<CONIO_WIDTH; c++ )
cpy #CONIO_WIDTH
bcc __b3
// line_text += CONIO_WIDTH
lda #CONIO_WIDTH
clc
adc.z line_text
sta.z line_text
bcc !+
inc.z line_text+1
!:
// line_cols += CONIO_WIDTH
lda #CONIO_WIDTH
clc
adc.z line_cols
sta.z line_cols
bcc !+
inc.z line_cols+1
!:
// for( char l=0;l<CONIO_HEIGHT; l++ )
inx
jmp __b1
__b3:
// line_text[c] = ' '
lda #' '
sta (line_text),y
// line_cols[c] = conio_textcolor
lda #CONIO_TEXTCOLOR_DEFAULT
sta (line_cols),y
// for( char c=0;c<CONIO_WIDTH; c++ )
iny
jmp __b2
}

161
src/test/ref/toupper-1.cfg Normal file
View File

@ -0,0 +1,161 @@
@begin: scope:[] from
[0] phi()
to:@1
@1: scope:[] from @begin
[1] phi()
[2] call main
to:@end
@end: scope:[] from @1
[3] phi()
(void()) main()
main: scope:[main] from @1
[4] *((byte*) 53272) ← (byte) $17
[5] call clrscr
to:main::@1
main::@1: scope:[main] from main main::@4
[6] (byte*) conio_cursor_color#32 ← phi( main/(const nomodify byte*) CONIO_SCREEN_COLORS main::@4/(byte*) conio_cursor_color#20 )
[6] (byte*) conio_cursor_text#32 ← phi( main/(const nomodify byte*) CONIO_SCREEN_TEXT main::@4/(byte*) conio_cursor_text#20 )
[6] (byte) conio_cursor_y#33 ← phi( main/(byte) 0 main::@4/(byte) conio_cursor_y#21 )
[6] (byte) conio_cursor_x#32 ← phi( main/(byte) 0 main::@4/(byte) conio_cursor_x#21 )
[6] (byte) main::c#2 ← phi( main/(byte) 0 main::@4/(byte) main::c#1 )
[7] (byte) cputc::c#0 ← (byte) main::c#2
[8] call cputc
to:main::@4
main::@4: scope:[main] from main::@1
[9] (byte) main::c#1 ← ++ (byte) main::c#2
[10] if((byte) main::c#1!=(byte) 0) goto main::@1
to:main::wherey1
main::wherey1: scope:[main] from main::@4
[11] (byte) main::wherey1_return#0 ← (byte) conio_cursor_y#21
to:main::@3
main::@3: scope:[main] from main::wherey1
[12] (byte) gotoxy::y#3 ← (byte) main::wherey1_return#0 + (byte) 2
[13] call gotoxy
to:main::@2
main::@2: scope:[main] from main::@3 main::@6
[14] (byte*) conio_cursor_color#34 ← phi( main::@3/(byte*) conio_cursor_color#16 main::@6/(byte*) conio_cursor_color#20 )
[14] (byte*) conio_cursor_text#34 ← phi( main::@3/(byte*) conio_cursor_text#16 main::@6/(byte*) conio_cursor_text#20 )
[14] (byte) conio_cursor_y#35 ← phi( main::@3/(byte) conio_cursor_y#16 main::@6/(byte) conio_cursor_y#21 )
[14] (byte) conio_cursor_x#34 ← phi( main::@3/(byte) 0 main::@6/(byte) conio_cursor_x#21 )
[14] (byte) main::c1#2 ← phi( main::@3/(byte) 0 main::@6/(byte) main::c1#1 )
[15] (byte) toupper::ch#0 ← (byte) main::c1#2
[16] call toupper
[17] (byte) toupper::return#3 ← (byte) toupper::return#2
to:main::@5
main::@5: scope:[main] from main::@2
[18] (byte) cputc::c#1 ← (byte) toupper::return#3
[19] call cputc
to:main::@6
main::@6: scope:[main] from main::@5
[20] (byte) main::c1#1 ← ++ (byte) main::c1#2
[21] if((byte) main::c1#1!=(byte) 0) goto main::@2
to:main::@return
main::@return: scope:[main] from main::@6
[22] return
to:@return
(void()) cputc((byte) cputc::c)
cputc: scope:[cputc] from main::@1 main::@5
[23] (byte) conio_cursor_x#19 ← phi( main::@1/(byte) conio_cursor_x#32 main::@5/(byte) conio_cursor_x#34 )
[23] (byte*) conio_cursor_color#18 ← phi( main::@1/(byte*) conio_cursor_color#32 main::@5/(byte*) conio_cursor_color#34 )
[23] (byte*) conio_cursor_text#18 ← phi( main::@1/(byte*) conio_cursor_text#32 main::@5/(byte*) conio_cursor_text#34 )
[23] (byte) conio_cursor_y#17 ← phi( main::@1/(byte) conio_cursor_y#33 main::@5/(byte) conio_cursor_y#35 )
[23] (byte) cputc::c#2 ← phi( main::@1/(byte) cputc::c#0 main::@5/(byte) cputc::c#1 )
[24] if((byte) cputc::c#2==(byte) '
') goto cputc::@1
to:cputc::@2
cputc::@2: scope:[cputc] from cputc
[25] *((byte*) conio_cursor_text#18) ← (byte) cputc::c#2
[26] (byte*) conio_cursor_text#29 ← ++ (byte*) conio_cursor_text#18
[27] *((byte*) conio_cursor_color#18) ← (const nomodify byte) CONIO_TEXTCOLOR_DEFAULT
[28] (byte*) conio_cursor_color#29 ← ++ (byte*) conio_cursor_color#18
[29] (byte) conio_cursor_x#6 ← ++ (byte) conio_cursor_x#19
[30] if((byte) conio_cursor_x#6!=(const nomodify byte) CONIO_WIDTH) goto cputc::@return
to:cputc::@3
cputc::@3: scope:[cputc] from cputc::@2
[31] (byte) conio_cursor_y#31 ← ++ (byte) conio_cursor_y#17
[32] if((byte) conio_cursor_y#31!=(const nomodify byte) CONIO_HEIGHT) goto cputc::@return
to:cputc::@4
cputc::@4: scope:[cputc] from cputc::@3
[33] phi()
[34] call gotoxy
to:cputc::@return
cputc::@return: scope:[cputc] from cputc::@1 cputc::@2 cputc::@3 cputc::@4
[35] (byte*) conio_cursor_color#20 ← phi( cputc::@2/(byte*) conio_cursor_color#29 cputc::@3/(byte*) conio_cursor_color#29 cputc::@1/(byte*) conio_cursor_color#16 cputc::@4/(byte*) conio_cursor_color#16 )
[35] (byte*) conio_cursor_text#20 ← phi( cputc::@2/(byte*) conio_cursor_text#29 cputc::@3/(byte*) conio_cursor_text#29 cputc::@1/(byte*) conio_cursor_text#16 cputc::@4/(byte*) conio_cursor_text#16 )
[35] (byte) conio_cursor_y#21 ← phi( cputc::@2/(byte) conio_cursor_y#17 cputc::@3/(byte) conio_cursor_y#31 cputc::@1/(byte) conio_cursor_y#16 cputc::@4/(byte) conio_cursor_y#16 )
[35] (byte) conio_cursor_x#21 ← phi( cputc::@2/(byte) conio_cursor_x#6 cputc::@3/(byte) 0 cputc::@1/(byte) 0 cputc::@4/(byte) 0 )
[36] return
to:@return
cputc::@1: scope:[cputc] from cputc
[37] (byte) gotoxy::y#1 ← (byte) conio_cursor_y#17 + (byte) 1
[38] call gotoxy
to:cputc::@return
(void()) gotoxy((byte) gotoxy::x , (byte) gotoxy::y)
gotoxy: scope:[gotoxy] from cputc::@1 cputc::@4 main::@3
[39] (byte) gotoxy::y#4 ← phi( cputc::@1/(byte) gotoxy::y#1 cputc::@4/(byte) 0 main::@3/(byte) gotoxy::y#3 )
to:gotoxy::@1
gotoxy::@1: scope:[gotoxy] from gotoxy
[40] if((byte) gotoxy::y#4<(const nomodify byte) CONIO_HEIGHT) goto gotoxy::@3
to:gotoxy::@2
gotoxy::@3: scope:[gotoxy] from gotoxy::@1
[41] phi()
to:gotoxy::@2
gotoxy::@2: scope:[gotoxy] from gotoxy::@1 gotoxy::@3
[42] (byte) gotoxy::y#5 ← phi( gotoxy::@3/(byte) gotoxy::y#4 gotoxy::@1/(byte) 0 )
[43] (byte) conio_cursor_y#16 ← (byte) gotoxy::y#5
[44] (word~) gotoxy::$8 ← (word)(byte) gotoxy::y#5
[45] (word~) gotoxy::$9 ← (word~) gotoxy::$8 << (byte) 2
[46] (word~) gotoxy::$10 ← (word~) gotoxy::$9 + (word~) gotoxy::$8
[47] (word) gotoxy::offset#0 ← (word~) gotoxy::$10 << (byte) 3
[48] (byte*) conio_cursor_text#16 ← (const nomodify byte*) CONIO_SCREEN_TEXT + (word) gotoxy::offset#0
[49] (byte*) conio_cursor_color#16 ← (const nomodify byte*) CONIO_SCREEN_COLORS + (word) gotoxy::offset#0
to:gotoxy::@return
gotoxy::@return: scope:[gotoxy] from gotoxy::@2
[50] return
to:@return
(byte()) toupper((byte) toupper::ch)
toupper: scope:[toupper] from main::@2
[51] if((byte) toupper::ch#0<(byte) 'a') goto toupper::@return
to:toupper::@2
toupper::@2: scope:[toupper] from toupper
[52] if((byte) toupper::ch#0<=(byte) 'z') goto toupper::@1
to:toupper::@return
toupper::@1: scope:[toupper] from toupper::@2
[53] (byte) toupper::return#0 ← (byte) toupper::ch#0 + (byte) 'A'-(byte) 'a'
to:toupper::@return
toupper::@return: scope:[toupper] from toupper toupper::@1 toupper::@2
[54] (byte) toupper::return#2 ← phi( toupper::@1/(byte) toupper::return#0 toupper/(byte) toupper::ch#0 toupper::@2/(byte) toupper::ch#0 )
[55] return
to:@return
(void()) clrscr()
clrscr: scope:[clrscr] from main
[56] phi()
to:clrscr::@1
clrscr::@1: scope:[clrscr] from clrscr clrscr::@4
[57] (byte*) clrscr::line_cols#5 ← phi( clrscr/(const nomodify byte*) CONIO_SCREEN_COLORS clrscr::@4/(byte*) clrscr::line_cols#1 )
[57] (byte*) clrscr::line_text#5 ← phi( clrscr/(const nomodify byte*) CONIO_SCREEN_TEXT clrscr::@4/(byte*) clrscr::line_text#1 )
[57] (byte) clrscr::l#2 ← phi( clrscr/(byte) 0 clrscr::@4/(byte) clrscr::l#1 )
[58] if((byte) clrscr::l#2<(const nomodify byte) CONIO_HEIGHT) goto clrscr::@2
to:clrscr::@return
clrscr::@return: scope:[clrscr] from clrscr::@1
[59] return
to:@return
clrscr::@2: scope:[clrscr] from clrscr::@1 clrscr::@3
[60] (byte) clrscr::c#2 ← phi( clrscr::@1/(byte) 0 clrscr::@3/(byte) clrscr::c#1 )
[61] if((byte) clrscr::c#2<(const nomodify byte) CONIO_WIDTH) goto clrscr::@3
to:clrscr::@4
clrscr::@4: scope:[clrscr] from clrscr::@2
[62] (byte*) clrscr::line_text#1 ← (byte*) clrscr::line_text#5 + (const nomodify byte) CONIO_WIDTH
[63] (byte*) clrscr::line_cols#1 ← (byte*) clrscr::line_cols#5 + (const nomodify byte) CONIO_WIDTH
[64] (byte) clrscr::l#1 ← ++ (byte) clrscr::l#2
to:clrscr::@1
clrscr::@3: scope:[clrscr] from clrscr::@2
[65] *((byte*) clrscr::line_text#5 + (byte) clrscr::c#2) ← (byte) ' '
[66] *((byte*) clrscr::line_cols#5 + (byte) clrscr::c#2) ← (const nomodify byte) CONIO_TEXTCOLOR_DEFAULT
[67] (byte) clrscr::c#1 ← ++ (byte) clrscr::c#2
to:clrscr::@2

3150
src/test/ref/toupper-1.log Normal file

File diff suppressed because it is too large Load Diff

123
src/test/ref/toupper-1.sym Normal file
View File

@ -0,0 +1,123 @@
(label) @1
(label) @begin
(label) @end
(const nomodify byte) CONIO_HEIGHT = (byte) $19
(const nomodify byte*) CONIO_SCREEN_COLORS = (byte*) 55296
(const nomodify byte*) CONIO_SCREEN_TEXT = (byte*) 1024
(const nomodify byte) CONIO_TEXTCOLOR_DEFAULT = (byte) $e
(const nomodify byte) CONIO_WIDTH = (byte) $28
(void()) clrscr()
(label) clrscr::@1
(label) clrscr::@2
(label) clrscr::@3
(label) clrscr::@4
(label) clrscr::@return
(byte) clrscr::c
(byte) clrscr::c#1 reg byte y 20002.0
(byte) clrscr::c#2 reg byte y 12501.25
(byte) clrscr::l
(byte) clrscr::l#1 reg byte x 2002.0
(byte) clrscr::l#2 reg byte x 333.6666666666667
(byte*) clrscr::line_cols
(byte*) clrscr::line_cols#1 line_cols zp[2]:8 1001.0
(byte*) clrscr::line_cols#5 line_cols zp[2]:8 1500.375
(byte*) clrscr::line_text
(byte*) clrscr::line_text#1 line_text zp[2]:10 667.3333333333334
(byte*) clrscr::line_text#5 line_text zp[2]:10 1714.7142857142858
(byte*) conio_cursor_color
(byte*) conio_cursor_color#16 conio_cursor_color zp[2]:5 2402.8
(byte*) conio_cursor_color#18 conio_cursor_color zp[2]:5 440.79999999999995
(byte*) conio_cursor_color#20 conio_cursor_color zp[2]:5 525.75
(byte*) conio_cursor_color#29 conio_cursor_color zp[2]:5 600.5999999999999
(byte*) conio_cursor_color#32 conio_cursor_color zp[2]:5 101.0
(byte*) conio_cursor_color#34 conio_cursor_color zp[2]:5 42.599999999999994
(byte*) conio_cursor_text
(byte*) conio_cursor_text#16 conio_cursor_text zp[2]:3 2002.3333333333333
(byte*) conio_cursor_text#18 conio_cursor_text zp[2]:3 734.6666666666667
(byte*) conio_cursor_text#20 conio_cursor_text zp[2]:3 525.75
(byte*) conio_cursor_text#29 conio_cursor_text zp[2]:3 429.0
(byte*) conio_cursor_text#32 conio_cursor_text zp[2]:3 101.0
(byte*) conio_cursor_text#34 conio_cursor_text zp[2]:3 42.599999999999994
(byte) conio_cursor_x
(byte) conio_cursor_x#19 conio_cursor_x zp[1]:7 200.5
(byte) conio_cursor_x#21 conio_cursor_x zp[1]:7 150.375
(byte) conio_cursor_x#32 conio_cursor_x zp[1]:7 101.0
(byte) conio_cursor_x#34 conio_cursor_x zp[1]:7 40.4
(byte) conio_cursor_x#6 conio_cursor_x zp[1]:7 1501.5
(byte) conio_cursor_y
(byte) conio_cursor_y#16 conio_cursor_y zp[1]:2 1092.181818181818
(byte) conio_cursor_y#17 conio_cursor_y zp[1]:2 400.625
(byte) conio_cursor_y#21 conio_cursor_y zp[1]:2 527.125
(byte) conio_cursor_y#31 conio_cursor_y zp[1]:2 1501.5
(byte) conio_cursor_y#33 conio_cursor_y zp[1]:2 101.0
(byte) conio_cursor_y#35 conio_cursor_y zp[1]:2 42.599999999999994
(byte) conio_textcolor
(void()) cputc((byte) cputc::c)
(label) cputc::@1
(label) cputc::@2
(label) cputc::@3
(label) cputc::@4
(label) cputc::@return
(byte) cputc::c
(byte) cputc::c#0 reg byte a 202.0
(byte) cputc::c#1 reg byte a 202.0
(byte) cputc::c#2 reg byte a 1102.0
(void()) gotoxy((byte) gotoxy::x , (byte) gotoxy::y)
(word~) gotoxy::$10 zp[2]:5 20002.0
(word~) gotoxy::$8 zp[2]:5 15001.5
(word~) gotoxy::$9 zp[2]:10 20002.0
(label) gotoxy::@1
(label) gotoxy::@2
(label) gotoxy::@3
(label) gotoxy::@return
(word) gotoxy::offset
(word) gotoxy::offset#0 offset zp[2]:5 15001.5
(byte) gotoxy::x
(byte) gotoxy::y
(byte) gotoxy::y#1 reg byte a 2002.0
(byte) gotoxy::y#3 reg byte a 22.0
(byte) gotoxy::y#4 reg byte a 7004.666666666666
(byte) gotoxy::y#5 reg byte a 10001.0
(void()) main()
(label) main::@1
(label) main::@2
(label) main::@3
(label) main::@4
(label) main::@5
(label) main::@6
(label) main::@return
(byte) main::c
(byte) main::c#1 reg byte x 151.5
(byte) main::c#2 reg byte x 101.0
(byte) main::c1
(byte) main::c1#1 reg byte x 151.5
(byte) main::c1#2 reg byte x 50.5
(label) main::wherey1
(byte) main::wherey1_return
(byte) main::wherey1_return#0 reg byte a 22.0
(byte()) toupper((byte) toupper::ch)
(label) toupper::@1
(label) toupper::@2
(label) toupper::@return
(byte) toupper::ch
(byte) toupper::ch#0 reg byte a 1702.0000000000002
(byte) toupper::return
(byte) toupper::return#0 reg byte a 2002.0
(byte) toupper::return#2 reg byte a 1034.6666666666667
(byte) toupper::return#3 reg byte a 202.0
reg byte x [ main::c#2 main::c#1 ]
reg byte x [ main::c1#2 main::c1#1 ]
reg byte a [ cputc::c#2 cputc::c#0 cputc::c#1 ]
zp[1]:2 [ conio_cursor_y#17 conio_cursor_y#35 conio_cursor_y#16 conio_cursor_y#33 conio_cursor_y#21 conio_cursor_y#31 ]
zp[2]:3 [ conio_cursor_text#18 conio_cursor_text#34 conio_cursor_text#16 conio_cursor_text#32 conio_cursor_text#20 conio_cursor_text#29 ]
zp[2]:5 [ conio_cursor_color#18 conio_cursor_color#34 conio_cursor_color#16 conio_cursor_color#32 conio_cursor_color#20 conio_cursor_color#29 gotoxy::offset#0 gotoxy::$8 gotoxy::$10 ]
zp[1]:7 [ conio_cursor_x#19 conio_cursor_x#34 conio_cursor_x#32 conio_cursor_x#21 conio_cursor_x#6 ]
reg byte a [ gotoxy::y#5 gotoxy::y#4 gotoxy::y#1 gotoxy::y#3 ]
reg byte a [ toupper::return#2 toupper::return#0 toupper::ch#0 ]
reg byte x [ clrscr::l#2 clrscr::l#1 ]
zp[2]:8 [ clrscr::line_cols#5 clrscr::line_cols#1 ]
reg byte y [ clrscr::c#2 clrscr::c#1 ]
reg byte a [ main::wherey1_return#0 ]
reg byte a [ toupper::return#3 ]
zp[2]:10 [ gotoxy::$9 clrscr::line_text#5 clrscr::line_text#1 ]