1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2024-09-09 08:54:40 +00:00
kickc/src/test/ref/toupper-1.log
2020-05-05 08:37:49 +02:00

4201 lines
219 KiB
Plaintext

Inlined call (byte~) main::$1 ← call wherey
CONTROL FLOW GRAPH SSA
@begin: scope:[] from
to:@1
(byte()) toupper((byte) toupper::ch)
toupper: scope:[toupper] from main::@2
(byte) toupper::ch#1 ← phi( main::@2/(byte) toupper::ch#0 )
(bool~) toupper::$0 ← (byte) toupper::ch#1 >= (byte) 'a'
(bool~) toupper::$1 ← (byte) toupper::ch#1 <= (byte) 'z'
(bool~) toupper::$2 ← (bool~) toupper::$0 && (bool~) toupper::$1
if((bool~) toupper::$2) goto toupper::@1
to:toupper::@2
toupper::@1: scope:[toupper] from toupper
(byte) toupper::ch#2 ← phi( toupper/(byte) toupper::ch#1 )
(byte~) toupper::$3 ← (byte) toupper::ch#2 + (byte) 'A'-(byte) 'a'
(byte) toupper::return#0 ← (byte~) toupper::$3
to:toupper::@return
toupper::@2: scope:[toupper] from toupper
(byte) toupper::ch#3 ← phi( toupper/(byte) toupper::ch#1 )
(byte) toupper::return#1 ← (byte) toupper::ch#3
to:toupper::@return
toupper::@return: scope:[toupper] from toupper::@1 toupper::@2
(byte) toupper::return#4 ← phi( toupper::@1/(byte) toupper::return#0 toupper::@2/(byte) toupper::return#1 )
(byte) toupper::return#2 ← (byte) toupper::return#4
return
to:@return
(void*()) memcpy((void*) memcpy::destination , (void*) memcpy::source , (word) memcpy::num)
memcpy: scope:[memcpy] from cscroll::@3 cscroll::@4
(word) memcpy::num#2 ← phi( cscroll::@3/(word) memcpy::num#0 cscroll::@4/(word) memcpy::num#1 )
(void*) memcpy::destination#2 ← phi( cscroll::@3/(void*) memcpy::destination#0 cscroll::@4/(void*) memcpy::destination#1 )
(void*) memcpy::source#2 ← phi( cscroll::@3/(void*) memcpy::source#0 cscroll::@4/(void*) memcpy::source#1 )
(byte*) memcpy::src#0 ← ((byte*)) (void*) memcpy::source#2
(byte*) memcpy::dst#0 ← ((byte*)) (void*) memcpy::destination#2
(byte*~) memcpy::$2 ← (byte*)(void*) memcpy::source#2
(byte*~) memcpy::$0 ← (byte*~) memcpy::$2 + (word) memcpy::num#2
(byte*) memcpy::src_end#0 ← (byte*~) memcpy::$0
to:memcpy::@1
memcpy::@1: scope:[memcpy] from memcpy memcpy::@2
(void*) memcpy::destination#4 ← phi( memcpy/(void*) memcpy::destination#2 memcpy::@2/(void*) memcpy::destination#5 )
(byte*) memcpy::dst#3 ← phi( memcpy/(byte*) memcpy::dst#0 memcpy::@2/(byte*) memcpy::dst#1 )
(byte*) memcpy::src_end#1 ← phi( memcpy/(byte*) memcpy::src_end#0 memcpy::@2/(byte*) memcpy::src_end#2 )
(byte*) memcpy::src#2 ← phi( memcpy/(byte*) memcpy::src#0 memcpy::@2/(byte*) memcpy::src#1 )
(bool~) memcpy::$1 ← (byte*) memcpy::src#2 != (byte*) memcpy::src_end#1
if((bool~) memcpy::$1) goto memcpy::@2
to:memcpy::@3
memcpy::@2: scope:[memcpy] from memcpy::@1
(void*) memcpy::destination#5 ← phi( memcpy::@1/(void*) memcpy::destination#4 )
(byte*) memcpy::src_end#2 ← phi( memcpy::@1/(byte*) memcpy::src_end#1 )
(byte*) memcpy::dst#2 ← phi( memcpy::@1/(byte*) memcpy::dst#3 )
(byte*) memcpy::src#3 ← phi( memcpy::@1/(byte*) memcpy::src#2 )
*((byte*) memcpy::dst#2) ← *((byte*) memcpy::src#3)
(byte*) memcpy::dst#1 ← ++ (byte*) memcpy::dst#2
(byte*) memcpy::src#1 ← ++ (byte*) memcpy::src#3
to:memcpy::@1
memcpy::@3: scope:[memcpy] from memcpy::@1
(void*) memcpy::destination#3 ← phi( memcpy::@1/(void*) memcpy::destination#4 )
(void*) memcpy::return#0 ← (void*) memcpy::destination#3
to:memcpy::@return
memcpy::@return: scope:[memcpy] from memcpy::@3
(void*) memcpy::return#4 ← phi( memcpy::@3/(void*) memcpy::return#0 )
(void*) memcpy::return#1 ← (void*) memcpy::return#4
return
to:@return
(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num)
memset: scope:[memset] from cscroll::@5 cscroll::@6
(byte) memset::c#5 ← phi( cscroll::@5/(byte) memset::c#0 cscroll::@6/(byte) memset::c#1 )
(void*) memset::str#4 ← phi( cscroll::@5/(void*) memset::str#0 cscroll::@6/(void*) memset::str#1 )
(word) memset::num#2 ← phi( cscroll::@5/(word) memset::num#0 cscroll::@6/(word) memset::num#1 )
(bool~) memset::$0 ← (word) memset::num#2 > (number) 0
(bool~) memset::$1 ← ! (bool~) memset::$0
if((bool~) memset::$1) goto memset::@1
to:memset::@2
memset::@1: scope:[memset] from memset memset::@3
(void*) memset::str#2 ← phi( memset/(void*) memset::str#4 memset::@3/(void*) memset::str#5 )
(void*) memset::return#0 ← (void*) memset::str#2
to:memset::@return
memset::@2: scope:[memset] from memset
(byte) memset::c#4 ← phi( memset/(byte) memset::c#5 )
(word) memset::num#3 ← phi( memset/(word) memset::num#2 )
(void*) memset::str#3 ← phi( memset/(void*) memset::str#4 )
(byte*~) memset::$4 ← (byte*)(void*) memset::str#3
(byte*~) memset::$2 ← (byte*~) memset::$4 + (word) memset::num#3
(byte*) memset::end#0 ← (byte*~) memset::$2
(byte*) memset::dst#0 ← ((byte*)) (void*) memset::str#3
to:memset::@3
memset::@3: scope:[memset] from memset::@2 memset::@4
(byte) memset::c#3 ← phi( memset::@2/(byte) memset::c#4 memset::@4/(byte) memset::c#2 )
(void*) memset::str#5 ← phi( memset::@2/(void*) memset::str#3 memset::@4/(void*) memset::str#6 )
(byte*) memset::end#1 ← phi( memset::@2/(byte*) memset::end#0 memset::@4/(byte*) memset::end#2 )
(byte*) memset::dst#2 ← phi( memset::@2/(byte*) memset::dst#0 memset::@4/(byte*) memset::dst#1 )
(bool~) memset::$3 ← (byte*) memset::dst#2 != (byte*) memset::end#1
if((bool~) memset::$3) goto memset::@4
to:memset::@1
memset::@4: scope:[memset] from memset::@3
(void*) memset::str#6 ← phi( memset::@3/(void*) memset::str#5 )
(byte*) memset::end#2 ← phi( memset::@3/(byte*) memset::end#1 )
(byte*) memset::dst#3 ← phi( memset::@3/(byte*) memset::dst#2 )
(byte) memset::c#2 ← phi( memset::@3/(byte) memset::c#3 )
*((byte*) memset::dst#3) ← (byte) memset::c#2
(byte*) memset::dst#1 ← ++ (byte*) memset::dst#3
to:memset::@3
memset::@return: scope:[memset] from memset::@1
(void*) memset::return#4 ← phi( memset::@1/(void*) memset::return#0 )
(void*) memset::return#1 ← (void*) memset::return#4
return
to:@return
@1: scope:[] from @begin
(byte) conio_cursor_x ← (byte) 0
(byte) conio_cursor_y ← (byte) 0
(byte*) conio_cursor_text ← (const nomodify byte*) CONIO_SCREEN_TEXT
(byte*) conio_cursor_color ← (const nomodify byte*) CONIO_SCREEN_COLORS
(byte) conio_textcolor ← (const nomodify byte) CONIO_TEXTCOLOR_DEFAULT
(byte) conio_scroll_enable ← (byte) 1
to:@2
(void()) clrscr()
clrscr: scope:[clrscr] from main
(byte*) clrscr::line_text#0 ← (const nomodify byte*) CONIO_SCREEN_TEXT
(byte*) clrscr::line_cols#0 ← (const nomodify byte*) CONIO_SCREEN_COLORS
(byte) clrscr::l#0 ← (byte) 0
to:clrscr::@1
clrscr::@1: scope:[clrscr] from clrscr clrscr::@6
(byte*) clrscr::line_cols#6 ← phi( clrscr/(byte*) clrscr::line_cols#0 clrscr::@6/(byte*) clrscr::line_cols#1 )
(byte*) clrscr::line_text#6 ← phi( clrscr/(byte*) clrscr::line_text#0 clrscr::@6/(byte*) clrscr::line_text#1 )
(byte) clrscr::l#2 ← phi( clrscr/(byte) clrscr::l#0 clrscr::@6/(byte) clrscr::l#1 )
(bool~) clrscr::$0 ← (byte) clrscr::l#2 < (number) $19
if((bool~) clrscr::$0) goto clrscr::@2
to:clrscr::@3
clrscr::@2: scope:[clrscr] from clrscr::@1
(byte) clrscr::l#5 ← phi( clrscr::@1/(byte) clrscr::l#2 )
(byte*) clrscr::line_cols#5 ← phi( clrscr::@1/(byte*) clrscr::line_cols#6 )
(byte*) clrscr::line_text#5 ← phi( clrscr::@1/(byte*) clrscr::line_text#6 )
(byte) clrscr::c#0 ← (byte) 0
to:clrscr::@4
clrscr::@3: scope:[clrscr] from clrscr::@1
(byte) conio_cursor_x ← (number) 0
(byte) conio_cursor_y ← (number) 0
(byte*) conio_cursor_text ← (const nomodify byte*) CONIO_SCREEN_TEXT
(byte*) conio_cursor_color ← (const nomodify byte*) CONIO_SCREEN_COLORS
to:clrscr::@return
clrscr::@4: scope:[clrscr] from clrscr::@2 clrscr::@5
(byte) clrscr::l#4 ← phi( clrscr::@2/(byte) clrscr::l#5 clrscr::@5/(byte) clrscr::l#6 )
(byte*) clrscr::line_cols#4 ← phi( clrscr::@2/(byte*) clrscr::line_cols#5 clrscr::@5/(byte*) clrscr::line_cols#2 )
(byte*) clrscr::line_text#4 ← phi( clrscr::@2/(byte*) clrscr::line_text#5 clrscr::@5/(byte*) clrscr::line_text#2 )
(byte) clrscr::c#2 ← phi( clrscr::@2/(byte) clrscr::c#0 clrscr::@5/(byte) clrscr::c#1 )
(bool~) clrscr::$1 ← (byte) clrscr::c#2 < (number) $28
if((bool~) clrscr::$1) goto clrscr::@5
to:clrscr::@6
clrscr::@5: scope:[clrscr] from clrscr::@4
(byte) clrscr::l#6 ← phi( clrscr::@4/(byte) clrscr::l#4 )
(byte*) clrscr::line_cols#2 ← phi( clrscr::@4/(byte*) clrscr::line_cols#4 )
(byte) clrscr::c#3 ← phi( clrscr::@4/(byte) clrscr::c#2 )
(byte*) clrscr::line_text#2 ← phi( clrscr::@4/(byte*) clrscr::line_text#4 )
*((byte*) clrscr::line_text#2 + (byte) clrscr::c#3) ← (byte) ' '
*((byte*) clrscr::line_cols#2 + (byte) clrscr::c#3) ← (byte) conio_textcolor
(byte) clrscr::c#1 ← ++ (byte) clrscr::c#3
to:clrscr::@4
clrscr::@6: scope:[clrscr] from clrscr::@4
(byte) clrscr::l#3 ← phi( clrscr::@4/(byte) clrscr::l#4 )
(byte*) clrscr::line_cols#3 ← phi( clrscr::@4/(byte*) clrscr::line_cols#4 )
(byte*) clrscr::line_text#3 ← phi( clrscr::@4/(byte*) clrscr::line_text#4 )
(byte*) clrscr::line_text#1 ← (byte*) clrscr::line_text#3 + (number) $28
(byte*) clrscr::line_cols#1 ← (byte*) clrscr::line_cols#3 + (number) $28
(byte) clrscr::l#1 ← ++ (byte) clrscr::l#3
to:clrscr::@1
clrscr::@return: scope:[clrscr] from clrscr::@3
return
to:@return
(void()) gotoxy((byte) gotoxy::x , (byte) gotoxy::y)
gotoxy: scope:[gotoxy] from cscroll::@2 main::@3
(byte) gotoxy::x#5 ← phi( cscroll::@2/(byte) gotoxy::x#1 main::@3/(byte) gotoxy::x#2 )
(byte) gotoxy::y#3 ← phi( cscroll::@2/(byte) gotoxy::y#1 main::@3/(byte) gotoxy::y#2 )
(bool~) gotoxy::$0 ← (byte) gotoxy::y#3 > (number) $19
(bool~) gotoxy::$1 ← ! (bool~) gotoxy::$0
if((bool~) gotoxy::$1) goto gotoxy::@1
to:gotoxy::@3
gotoxy::@1: scope:[gotoxy] from gotoxy gotoxy::@3
(byte) gotoxy::y#5 ← phi( gotoxy/(byte) gotoxy::y#3 gotoxy::@3/(byte) gotoxy::y#0 )
(byte) gotoxy::x#3 ← phi( gotoxy/(byte) gotoxy::x#5 gotoxy::@3/(byte) gotoxy::x#6 )
(bool~) gotoxy::$2 ← (byte) gotoxy::x#3 >= (number) $28
(bool~) gotoxy::$3 ← ! (bool~) gotoxy::$2
if((bool~) gotoxy::$3) goto gotoxy::@2
to:gotoxy::@4
gotoxy::@3: scope:[gotoxy] from gotoxy
(byte) gotoxy::x#6 ← phi( gotoxy/(byte) gotoxy::x#5 )
(byte) gotoxy::y#0 ← (number) 0
to:gotoxy::@1
gotoxy::@2: scope:[gotoxy] from gotoxy::@1 gotoxy::@4
(byte) gotoxy::y#4 ← phi( gotoxy::@1/(byte) gotoxy::y#5 gotoxy::@4/(byte) gotoxy::y#6 )
(byte) gotoxy::x#4 ← phi( gotoxy::@1/(byte) gotoxy::x#3 gotoxy::@4/(byte) gotoxy::x#0 )
(byte) conio_cursor_x ← (byte) gotoxy::x#4
(byte) conio_cursor_y ← (byte) gotoxy::y#4
(word~) gotoxy::$8 ← (word)(byte) gotoxy::y#4
(number~) gotoxy::$4 ← (word~) gotoxy::$8 * (number) $28
(number~) gotoxy::$5 ← (number~) gotoxy::$4 + (byte) gotoxy::x#4
(word) gotoxy::offset#0 ← (number~) gotoxy::$5
(byte*~) gotoxy::$6 ← (const nomodify byte*) CONIO_SCREEN_TEXT + (word) gotoxy::offset#0
(byte*) conio_cursor_text ← (byte*~) gotoxy::$6
(byte*~) gotoxy::$7 ← (const nomodify byte*) CONIO_SCREEN_COLORS + (word) gotoxy::offset#0
(byte*) conio_cursor_color ← (byte*~) gotoxy::$7
to:gotoxy::@return
gotoxy::@4: scope:[gotoxy] from gotoxy::@1
(byte) gotoxy::y#6 ← phi( gotoxy::@1/(byte) gotoxy::y#5 )
(byte) gotoxy::x#0 ← (number) 0
to:gotoxy::@2
gotoxy::@return: scope:[gotoxy] from gotoxy::@2
return
to:@return
(void()) cputc((byte) cputc::c)
cputc: scope:[cputc] from main::@1 main::@7
(byte) cputc::c#2 ← phi( main::@1/(byte) cputc::c#0 main::@7/(byte) cputc::c#1 )
(bool~) cputc::$0 ← (byte) cputc::c#2 == (byte) '
'
if((bool~) cputc::$0) goto cputc::@1
to:cputc::@2
cputc::@1: scope:[cputc] from cputc
call cputln
to:cputc::@4
cputc::@4: scope:[cputc] from cputc::@1
to:cputc::@return
cputc::@2: scope:[cputc] from cputc
(byte) cputc::c#3 ← phi( cputc/(byte) cputc::c#2 )
*((byte*) conio_cursor_text) ← (byte) cputc::c#3
(byte*) conio_cursor_text ← ++ (byte*) conio_cursor_text
*((byte*) conio_cursor_color) ← (byte) conio_textcolor
(byte*) conio_cursor_color ← ++ (byte*) conio_cursor_color
(byte) conio_cursor_x ← ++ (byte) conio_cursor_x
(bool~) cputc::$1 ← (byte) conio_cursor_x == (number) $28
(bool~) cputc::$2 ← ! (bool~) cputc::$1
if((bool~) cputc::$2) goto cputc::@return
to:cputc::@3
cputc::@3: scope:[cputc] from cputc::@2
(byte) conio_cursor_x ← (number) 0
(byte) conio_cursor_y ← ++ (byte) conio_cursor_y
call cscroll
to:cputc::@5
cputc::@5: scope:[cputc] from cputc::@3
to:cputc::@return
cputc::@return: scope:[cputc] from cputc::@2 cputc::@4 cputc::@5
return
to:@return
(void()) cputln()
cputln: scope:[cputln] from cputc::@1
(number~) cputln::$0 ← (number) $28 - (byte) conio_cursor_x
(word) cputln::ln_offset#0 ← (number~) cputln::$0
(byte*~) cputln::$1 ← (byte*) conio_cursor_text + (word) cputln::ln_offset#0
(byte*) conio_cursor_text ← (byte*~) cputln::$1
(byte*~) cputln::$2 ← (byte*) conio_cursor_color + (word) cputln::ln_offset#0
(byte*) conio_cursor_color ← (byte*~) cputln::$2
(byte) conio_cursor_x ← (number) 0
(byte) conio_cursor_y ← ++ (byte) conio_cursor_y
call cscroll
to:cputln::@1
cputln::@1: scope:[cputln] from cputln
to:cputln::@return
cputln::@return: scope:[cputln] from cputln::@1
return
to:@return
(void()) cscroll()
cscroll: scope:[cscroll] from cputc::@3 cputln
(bool~) cscroll::$0 ← (byte) conio_cursor_y == (number) $19
(bool~) cscroll::$1 ← ! (bool~) cscroll::$0
if((bool~) cscroll::$1) goto cscroll::@return
to:cscroll::@1
cscroll::@1: scope:[cscroll] from cscroll
(bool~) cscroll::$9 ← (number) 0 != (byte) conio_scroll_enable
if((bool~) cscroll::$9) goto cscroll::@3
to:cscroll::@2
cscroll::@3: scope:[cscroll] from cscroll::@1
(void*) memcpy::destination#0 ← (void*)(const nomodify byte*) CONIO_SCREEN_TEXT
(void*) memcpy::source#0 ← (void*)(const nomodify byte*) CONIO_SCREEN_TEXT+(number) $28
(word) memcpy::num#0 ← (number) $19*(number) $28-(number) $28
call memcpy
(void*) memcpy::return#2 ← (void*) memcpy::return#1
to:cscroll::@4
cscroll::@4: scope:[cscroll] from cscroll::@3
(void*) memcpy::destination#1 ← (void*)(const nomodify byte*) CONIO_SCREEN_COLORS
(void*) memcpy::source#1 ← (void*)(const nomodify byte*) CONIO_SCREEN_COLORS+(number) $28
(word) memcpy::num#1 ← (number) $19*(number) $28-(number) $28
call memcpy
(void*) memcpy::return#3 ← (void*) memcpy::return#1
to:cscroll::@5
cscroll::@5: scope:[cscroll] from cscroll::@4
(void*) memset::str#0 ← (void*)(const nomodify byte*) CONIO_SCREEN_TEXT+(number) $19*(number) $28-(number) $28
(byte) memset::c#0 ← (byte) ' '
(word) memset::num#0 ← (number) $28
call memset
(void*) memset::return#2 ← (void*) memset::return#1
to:cscroll::@6
cscroll::@6: scope:[cscroll] from cscroll::@5
(void*) memset::str#1 ← (void*)(const nomodify byte*) CONIO_SCREEN_COLORS+(number) $19*(number) $28-(number) $28
(byte) memset::c#1 ← (byte) conio_textcolor
(word) memset::num#1 ← (number) $28
call memset
(void*) memset::return#3 ← (void*) memset::return#1
to:cscroll::@7
cscroll::@7: scope:[cscroll] from cscroll::@6
(byte*~) cscroll::$7 ← (byte*) conio_cursor_text - (number) $28
(byte*) conio_cursor_text ← (byte*~) cscroll::$7
(byte*~) cscroll::$8 ← (byte*) conio_cursor_color - (number) $28
(byte*) conio_cursor_color ← (byte*~) cscroll::$8
(byte) conio_cursor_y ← -- (byte) conio_cursor_y
to:cscroll::@return
cscroll::@2: scope:[cscroll] from cscroll::@1
(byte) gotoxy::x#1 ← (number) 0
(byte) gotoxy::y#1 ← (number) 0
call gotoxy
to:cscroll::@8
cscroll::@8: scope:[cscroll] from cscroll::@2
to:cscroll::@return
cscroll::@return: scope:[cscroll] from cscroll cscroll::@7 cscroll::@8
return
to:@return
(void()) main()
main: scope:[main] from @2
*((byte*)(number) $d018) ← (number) $17
call clrscr
to:main::@4
main::@4: scope:[main] from main
(byte) main::c#0 ← (byte) 0
to:main::@1
main::@1: scope:[main] from main::@4 main::@5
(byte) main::c#2 ← phi( main::@4/(byte) main::c#0 main::@5/(byte) main::c#1 )
(byte) cputc::c#0 ← (byte) main::c#2
call cputc
to:main::@5
main::@5: scope:[main] from main::@1
(byte) main::c#3 ← phi( main::@1/(byte) main::c#2 )
(byte) main::c#1 ← (byte) main::c#3 + rangenext(0,$ff)
(bool~) main::$5 ← (byte) main::c#1 != rangelast(0,$ff)
if((bool~) main::$5) goto main::@1
to:main::wherey1
main::wherey1: scope:[main] from main::@5
(byte) main::wherey1_return#0 ← (byte) conio_cursor_y
to:main::wherey1_@return
main::wherey1_@return: scope:[main] from main::wherey1
(byte) main::wherey1_return#2 ← phi( main::wherey1/(byte) main::wherey1_return#0 )
(byte) main::wherey1_return#1 ← (byte) main::wherey1_return#2
to:main::@3
main::@3: scope:[main] from main::wherey1_@return
(byte) main::wherey1_return#3 ← phi( main::wherey1_@return/(byte) main::wherey1_return#1 )
(byte~) main::$1 ← (byte) main::wherey1_return#3
(number~) main::$2 ← (byte~) main::$1 + (number) 2
(byte) gotoxy::x#2 ← (number) 0
(byte) gotoxy::y#2 ← (number~) main::$2
call gotoxy
to:main::@6
main::@6: scope:[main] from main::@3
(byte) main::c1#0 ← (byte) 0
to:main::@2
main::@2: scope:[main] from main::@6 main::@8
(byte) main::c1#2 ← phi( main::@6/(byte) main::c1#0 main::@8/(byte) main::c1#1 )
(byte) toupper::ch#0 ← (byte) main::c1#2
call toupper
(byte) toupper::return#3 ← (byte) toupper::return#2
to:main::@7
main::@7: scope:[main] from main::@2
(byte) main::c1#4 ← phi( main::@2/(byte) main::c1#2 )
(byte) toupper::return#5 ← phi( main::@2/(byte) toupper::return#3 )
(byte~) main::$6 ← (byte) toupper::return#5
(byte) cputc::c#1 ← (byte~) main::$6
call cputc
to:main::@8
main::@8: scope:[main] from main::@7
(byte) main::c1#3 ← phi( main::@7/(byte) main::c1#4 )
(byte) main::c1#1 ← (byte) main::c1#3 + rangenext(0,$ff)
(bool~) main::$8 ← (byte) main::c1#1 != rangelast(0,$ff)
if((bool~) main::$8) goto main::@2
to:main::@return
main::@return: scope:[main] from main::@8
return
to:@return
@2: scope:[] from @1
call main
to:@3
@3: scope:[] from @2
to:@end
@end: scope:[] from @3
SYMBOL TABLE SSA
(label) @1
(label) @2
(label) @3
(label) @begin
(label) @end
(const nomodify byte*) CONIO_SCREEN_COLORS = (byte*)(number) $d800
(const nomodify byte*) CONIO_SCREEN_TEXT = (byte*)(number) $400
(const nomodify byte) CONIO_TEXTCOLOR_DEFAULT = (byte) $e
(void()) clrscr()
(bool~) clrscr::$0
(bool~) clrscr::$1
(label) clrscr::@1
(label) clrscr::@2
(label) clrscr::@3
(label) clrscr::@4
(label) clrscr::@5
(label) clrscr::@6
(label) clrscr::@return
(byte) clrscr::c
(byte) clrscr::c#0
(byte) clrscr::c#1
(byte) clrscr::c#2
(byte) clrscr::c#3
(byte) clrscr::l
(byte) clrscr::l#0
(byte) clrscr::l#1
(byte) clrscr::l#2
(byte) clrscr::l#3
(byte) clrscr::l#4
(byte) clrscr::l#5
(byte) clrscr::l#6
(byte*) clrscr::line_cols
(byte*) clrscr::line_cols#0
(byte*) clrscr::line_cols#1
(byte*) clrscr::line_cols#2
(byte*) clrscr::line_cols#3
(byte*) clrscr::line_cols#4
(byte*) clrscr::line_cols#5
(byte*) clrscr::line_cols#6
(byte*) clrscr::line_text
(byte*) clrscr::line_text#0
(byte*) clrscr::line_text#1
(byte*) clrscr::line_text#2
(byte*) clrscr::line_text#3
(byte*) clrscr::line_text#4
(byte*) clrscr::line_text#5
(byte*) clrscr::line_text#6
(byte*) conio_cursor_color loadstore
(byte*) conio_cursor_text loadstore
(byte) conio_cursor_x loadstore
(byte) conio_cursor_y loadstore
(byte) conio_scroll_enable loadstore
(byte) conio_textcolor loadstore
(void()) cputc((byte) cputc::c)
(bool~) cputc::$0
(bool~) cputc::$1
(bool~) cputc::$2
(label) cputc::@1
(label) cputc::@2
(label) cputc::@3
(label) cputc::@4
(label) cputc::@5
(label) cputc::@return
(byte) cputc::c
(byte) cputc::c#0
(byte) cputc::c#1
(byte) cputc::c#2
(byte) cputc::c#3
(void()) cputln()
(number~) cputln::$0
(byte*~) cputln::$1
(byte*~) cputln::$2
(label) cputln::@1
(label) cputln::@return
(word) cputln::ln_offset
(word) cputln::ln_offset#0
(void()) cscroll()
(bool~) cscroll::$0
(bool~) cscroll::$1
(byte*~) cscroll::$7
(byte*~) cscroll::$8
(bool~) cscroll::$9
(label) cscroll::@1
(label) cscroll::@2
(label) cscroll::@3
(label) cscroll::@4
(label) cscroll::@5
(label) cscroll::@6
(label) cscroll::@7
(label) cscroll::@8
(label) cscroll::@return
(void()) gotoxy((byte) gotoxy::x , (byte) gotoxy::y)
(bool~) gotoxy::$0
(bool~) gotoxy::$1
(bool~) gotoxy::$2
(bool~) gotoxy::$3
(number~) gotoxy::$4
(number~) gotoxy::$5
(byte*~) gotoxy::$6
(byte*~) gotoxy::$7
(word~) gotoxy::$8
(label) gotoxy::@1
(label) gotoxy::@2
(label) gotoxy::@3
(label) gotoxy::@4
(label) gotoxy::@return
(word) gotoxy::offset
(word) gotoxy::offset#0
(byte) gotoxy::x
(byte) gotoxy::x#0
(byte) gotoxy::x#1
(byte) gotoxy::x#2
(byte) gotoxy::x#3
(byte) gotoxy::x#4
(byte) gotoxy::x#5
(byte) gotoxy::x#6
(byte) gotoxy::y
(byte) gotoxy::y#0
(byte) gotoxy::y#1
(byte) gotoxy::y#2
(byte) gotoxy::y#3
(byte) gotoxy::y#4
(byte) gotoxy::y#5
(byte) gotoxy::y#6
(void()) main()
(byte~) main::$1
(number~) main::$2
(bool~) main::$5
(byte~) main::$6
(bool~) main::$8
(label) main::@1
(label) main::@2
(label) main::@3
(label) main::@4
(label) main::@5
(label) main::@6
(label) main::@7
(label) main::@8
(label) main::@return
(byte) main::c
(byte) main::c#0
(byte) main::c#1
(byte) main::c#2
(byte) main::c#3
(byte) main::c1
(byte) main::c1#0
(byte) main::c1#1
(byte) main::c1#2
(byte) main::c1#3
(byte) main::c1#4
(label) main::wherey1
(label) main::wherey1_@return
(byte) main::wherey1_return
(byte) main::wherey1_return#0
(byte) main::wherey1_return#1
(byte) main::wherey1_return#2
(byte) main::wherey1_return#3
(void*()) memcpy((void*) memcpy::destination , (void*) memcpy::source , (word) memcpy::num)
(byte*~) memcpy::$0
(bool~) memcpy::$1
(byte*~) memcpy::$2
(label) memcpy::@1
(label) memcpy::@2
(label) memcpy::@3
(label) memcpy::@return
(void*) memcpy::destination
(void*) memcpy::destination#0
(void*) memcpy::destination#1
(void*) memcpy::destination#2
(void*) memcpy::destination#3
(void*) memcpy::destination#4
(void*) memcpy::destination#5
(byte*) memcpy::dst
(byte*) memcpy::dst#0
(byte*) memcpy::dst#1
(byte*) memcpy::dst#2
(byte*) memcpy::dst#3
(word) memcpy::num
(word) memcpy::num#0
(word) memcpy::num#1
(word) memcpy::num#2
(void*) memcpy::return
(void*) memcpy::return#0
(void*) memcpy::return#1
(void*) memcpy::return#2
(void*) memcpy::return#3
(void*) memcpy::return#4
(void*) memcpy::source
(void*) memcpy::source#0
(void*) memcpy::source#1
(void*) memcpy::source#2
(byte*) memcpy::src
(byte*) memcpy::src#0
(byte*) memcpy::src#1
(byte*) memcpy::src#2
(byte*) memcpy::src#3
(byte*) memcpy::src_end
(byte*) memcpy::src_end#0
(byte*) memcpy::src_end#1
(byte*) memcpy::src_end#2
(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num)
(bool~) memset::$0
(bool~) memset::$1
(byte*~) memset::$2
(bool~) memset::$3
(byte*~) memset::$4
(label) memset::@1
(label) memset::@2
(label) memset::@3
(label) memset::@4
(label) memset::@return
(byte) memset::c
(byte) memset::c#0
(byte) memset::c#1
(byte) memset::c#2
(byte) memset::c#3
(byte) memset::c#4
(byte) memset::c#5
(byte*) memset::dst
(byte*) memset::dst#0
(byte*) memset::dst#1
(byte*) memset::dst#2
(byte*) memset::dst#3
(byte*) memset::end
(byte*) memset::end#0
(byte*) memset::end#1
(byte*) memset::end#2
(word) memset::num
(word) memset::num#0
(word) memset::num#1
(word) memset::num#2
(word) memset::num#3
(void*) memset::return
(void*) memset::return#0
(void*) memset::return#1
(void*) memset::return#2
(void*) memset::return#3
(void*) memset::return#4
(void*) memset::str
(void*) memset::str#0
(void*) memset::str#1
(void*) memset::str#2
(void*) memset::str#3
(void*) memset::str#4
(void*) memset::str#5
(void*) memset::str#6
(byte()) toupper((byte) toupper::ch)
(bool~) toupper::$0
(bool~) toupper::$1
(bool~) toupper::$2
(byte~) toupper::$3
(label) toupper::@1
(label) toupper::@2
(label) toupper::@return
(byte) toupper::ch
(byte) toupper::ch#0
(byte) toupper::ch#1
(byte) toupper::ch#2
(byte) toupper::ch#3
(byte) toupper::return
(byte) toupper::return#0
(byte) toupper::return#1
(byte) toupper::return#2
(byte) toupper::return#3
(byte) toupper::return#4
(byte) toupper::return#5
Adding number conversion cast (unumber) 0 in (bool~) memset::$0 ← (word) memset::num#2 > (number) 0
Adding number conversion cast (unumber) $19 in (bool~) clrscr::$0 ← (byte) clrscr::l#2 < (number) $19
Adding number conversion cast (unumber) 0 in (byte) conio_cursor_x ← (number) 0
Adding number conversion cast (unumber) 0 in (byte) conio_cursor_y ← (number) 0
Adding number conversion cast (unumber) $28 in (bool~) clrscr::$1 ← (byte) clrscr::c#2 < (number) $28
Adding number conversion cast (unumber) $28 in (byte*) clrscr::line_text#1 ← (byte*) clrscr::line_text#3 + (number) $28
Adding number conversion cast (unumber) $28 in (byte*) clrscr::line_cols#1 ← (byte*) clrscr::line_cols#3 + (number) $28
Adding number conversion cast (unumber) $19 in (bool~) gotoxy::$0 ← (byte) gotoxy::y#3 > (number) $19
Adding number conversion cast (unumber) $28 in (bool~) gotoxy::$2 ← (byte) gotoxy::x#3 >= (number) $28
Adding number conversion cast (unumber) 0 in (byte) gotoxy::y#0 ← (number) 0
Adding number conversion cast (unumber) $28 in (number~) gotoxy::$4 ← (word~) gotoxy::$8 * (number) $28
Adding number conversion cast (unumber) gotoxy::$4 in (number~) gotoxy::$4 ← (word~) gotoxy::$8 * (unumber)(number) $28
Adding number conversion cast (unumber) gotoxy::$5 in (number~) gotoxy::$5 ← (unumber~) gotoxy::$4 + (byte) gotoxy::x#4
Adding number conversion cast (unumber) 0 in (byte) gotoxy::x#0 ← (number) 0
Adding number conversion cast (unumber) $28 in (bool~) cputc::$1 ← (byte) conio_cursor_x == (number) $28
Adding number conversion cast (unumber) 0 in (byte) conio_cursor_x ← (number) 0
Adding number conversion cast (unumber) $28 in (number~) cputln::$0 ← (number) $28 - (byte) conio_cursor_x
Adding number conversion cast (unumber) cputln::$0 in (number~) cputln::$0 ← (unumber)(number) $28 - (byte) conio_cursor_x
Adding number conversion cast (unumber) 0 in (byte) conio_cursor_x ← (number) 0
Adding number conversion cast (unumber) $19 in (bool~) cscroll::$0 ← (byte) conio_cursor_y == (number) $19
Adding number conversion cast (unumber) 0 in (bool~) cscroll::$9 ← (number) 0 != (byte) conio_scroll_enable
Adding number conversion cast (unumber) $28 in (void*) memcpy::source#0 ← (void*)(const nomodify byte*) CONIO_SCREEN_TEXT+(number) $28
Adding number conversion cast (unumber) $19*$28-$28 in (word) memcpy::num#0 ← (number) $19*(number) $28-(number) $28
Adding number conversion cast (unumber) $28 in (void*) memcpy::source#1 ← (void*)(const nomodify byte*) CONIO_SCREEN_COLORS+(number) $28
Adding number conversion cast (unumber) $19*$28-$28 in (word) memcpy::num#1 ← (number) $19*(number) $28-(number) $28
Adding number conversion cast (unumber) $28 in (void*) memset::str#0 ← (void*)(const nomodify byte*) CONIO_SCREEN_TEXT+(number) $19*(number) $28-(number) $28
Adding number conversion cast (unumber) $19*$28 in (void*) memset::str#0 ← (void*)(const nomodify byte*) CONIO_SCREEN_TEXT+(number) $19*(number) $28-(unumber)(number) $28
Adding number conversion cast (unumber) $28 in (word) memset::num#0 ← (number) $28
Adding number conversion cast (unumber) $28 in (void*) memset::str#1 ← (void*)(const nomodify byte*) CONIO_SCREEN_COLORS+(number) $19*(number) $28-(number) $28
Adding number conversion cast (unumber) $19*$28 in (void*) memset::str#1 ← (void*)(const nomodify byte*) CONIO_SCREEN_COLORS+(number) $19*(number) $28-(unumber)(number) $28
Adding number conversion cast (unumber) $28 in (word) memset::num#1 ← (number) $28
Adding number conversion cast (unumber) $28 in (byte*~) cscroll::$7 ← (byte*) conio_cursor_text - (number) $28
Adding number conversion cast (unumber) $28 in (byte*~) cscroll::$8 ← (byte*) conio_cursor_color - (number) $28
Adding number conversion cast (unumber) 0 in (byte) gotoxy::x#1 ← (number) 0
Adding number conversion cast (unumber) 0 in (byte) gotoxy::y#1 ← (number) 0
Adding number conversion cast (unumber) $17 in *((byte*)(number) $d018) ← (number) $17
Adding number conversion cast (unumber) 2 in (number~) main::$2 ← (byte~) main::$1 + (number) 2
Adding number conversion cast (unumber) main::$2 in (number~) main::$2 ← (byte~) main::$1 + (unumber)(number) 2
Adding number conversion cast (unumber) 0 in (byte) gotoxy::x#2 ← (number) 0
Successful SSA optimization PassNAddNumberTypeConversions
Inlining cast (byte*) memcpy::src#0 ← (byte*)(void*) memcpy::source#2
Inlining cast (byte*) memcpy::dst#0 ← (byte*)(void*) memcpy::destination#2
Inlining cast (byte*) memset::dst#0 ← (byte*)(void*) memset::str#3
Inlining cast (byte) conio_cursor_x ← (unumber)(number) 0
Inlining cast (byte) conio_cursor_y ← (unumber)(number) 0
Inlining cast (byte) gotoxy::y#0 ← (unumber)(number) 0
Inlining cast (byte) gotoxy::x#0 ← (unumber)(number) 0
Inlining cast (byte) conio_cursor_x ← (unumber)(number) 0
Inlining cast (byte) conio_cursor_x ← (unumber)(number) 0
Inlining cast (word) memcpy::num#0 ← (unumber)(number) $19*(number) $28-(number) $28
Inlining cast (word) memcpy::num#1 ← (unumber)(number) $19*(number) $28-(number) $28
Inlining cast (word) memset::num#0 ← (unumber)(number) $28
Inlining cast (word) memset::num#1 ← (unumber)(number) $28
Inlining cast (byte) gotoxy::x#1 ← (unumber)(number) 0
Inlining cast (byte) gotoxy::y#1 ← (unumber)(number) 0
Inlining cast *((byte*)(number) $d018) ← (unumber)(number) $17
Inlining cast (byte) gotoxy::x#2 ← (unumber)(number) 0
Successful SSA optimization Pass2InlineCast
Simplifying constant pointer cast (byte*) 1024
Simplifying constant pointer cast (byte*) 55296
Simplifying constant integer cast 0
Simplifying constant integer cast $19
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast $28
Simplifying constant integer cast $28
Simplifying constant integer cast $28
Simplifying constant integer cast $19
Simplifying constant integer cast $28
Simplifying constant integer cast 0
Simplifying constant integer cast $28
Simplifying constant integer cast 0
Simplifying constant integer cast $28
Simplifying constant integer cast 0
Simplifying constant integer cast $28
Simplifying constant integer cast 0
Simplifying constant integer cast $19
Simplifying constant integer cast 0
Simplifying constant integer cast $28
Simplifying constant integer cast $28
Simplifying constant integer cast $28
Simplifying constant integer cast $28
Simplifying constant integer cast $28
Simplifying constant integer cast $28
Simplifying constant integer cast $28
Simplifying constant integer cast $28
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast $17
Simplifying constant pointer cast (byte*) 53272
Simplifying constant integer cast 2
Simplifying constant integer cast 0
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) $19
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) $28
Finalized unsigned number type (byte) $28
Finalized unsigned number type (byte) $28
Finalized unsigned number type (byte) $19
Finalized unsigned number type (byte) $28
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) $28
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) $28
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) $28
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) $19
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) $28
Finalized unsigned number type (byte) $28
Finalized unsigned number type (byte) $28
Finalized unsigned number type (byte) $28
Finalized unsigned number type (byte) $28
Finalized unsigned number type (byte) $28
Finalized unsigned number type (byte) $28
Finalized unsigned number type (byte) $28
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) $17
Finalized unsigned number type (byte) 2
Finalized unsigned number type (byte) 0
Successful SSA optimization PassNFinalizeNumberTypeConversions
Inferred type updated to word in (unumber~) gotoxy::$4 ← (word~) gotoxy::$8 * (byte) $28
Inferred type updated to word in (unumber~) gotoxy::$5 ← (word~) gotoxy::$4 + (byte) gotoxy::x#4
Inferred type updated to byte in (unumber~) cputln::$0 ← (byte) $28 - (byte) conio_cursor_x
Inferred type updated to byte in (unumber~) main::$2 ← (byte~) main::$1 + (byte) 2
Inversing boolean not [33] (bool~) memset::$1 ← (word) memset::num#2 <= (byte) 0 from [32] (bool~) memset::$0 ← (word) memset::num#2 > (byte) 0
Inversing boolean not [83] (bool~) gotoxy::$1 ← (byte) gotoxy::y#3 <= (byte) $19 from [82] (bool~) gotoxy::$0 ← (byte) gotoxy::y#3 > (byte) $19
Inversing boolean not [87] (bool~) gotoxy::$3 ← (byte) gotoxy::x#3 < (byte) $28 from [86] (bool~) gotoxy::$2 ← (byte) gotoxy::x#3 >= (byte) $28
Inversing boolean not [116] (bool~) cputc::$2 ← (byte) conio_cursor_x != (byte) $28 from [115] (bool~) cputc::$1 ← (byte) conio_cursor_x == (byte) $28
Inversing boolean not [133] (bool~) cscroll::$1 ← (byte) conio_cursor_y != (byte) $19 from [132] (bool~) cscroll::$0 ← (byte) conio_cursor_y == (byte) $19
Successful SSA optimization Pass2UnaryNotSimplification
Alias candidate removed (volatile)conio_cursor_text = gotoxy::$6 cputln::$1 cscroll::$7
Alias candidate removed (volatile)conio_cursor_color = gotoxy::$7 cputln::$2 cscroll::$8
Alias toupper::ch#1 = toupper::ch#2 toupper::ch#3 toupper::return#1
Alias toupper::return#0 = toupper::$3
Alias toupper::return#2 = toupper::return#4
Alias memcpy::src_end#0 = memcpy::$0
Alias memcpy::src#2 = memcpy::src#3
Alias memcpy::dst#2 = memcpy::dst#3
Alias memcpy::src_end#1 = memcpy::src_end#2
Alias memcpy::destination#3 = memcpy::destination#5 memcpy::destination#4 memcpy::return#0 memcpy::return#4 memcpy::return#1
Alias memset::return#0 = memset::str#2 memset::return#4 memset::return#1
Alias memset::str#3 = memset::str#4
Alias memset::num#2 = memset::num#3
Alias memset::c#4 = memset::c#5
Alias memset::end#0 = memset::$2
Alias memset::c#2 = memset::c#3
Alias memset::dst#2 = memset::dst#3
Alias memset::end#1 = memset::end#2
Alias memset::str#5 = memset::str#6
Alias clrscr::line_text#5 = clrscr::line_text#6
Alias clrscr::line_cols#5 = clrscr::line_cols#6
Alias clrscr::l#2 = clrscr::l#5
Alias clrscr::line_text#2 = clrscr::line_text#4 clrscr::line_text#3
Alias clrscr::c#2 = clrscr::c#3
Alias clrscr::line_cols#2 = clrscr::line_cols#4 clrscr::line_cols#3
Alias clrscr::l#3 = clrscr::l#6 clrscr::l#4
Alias gotoxy::x#5 = gotoxy::x#6
Alias gotoxy::offset#0 = gotoxy::$5
Alias gotoxy::y#5 = gotoxy::y#6
Alias cputc::c#2 = cputc::c#3
Alias cputln::ln_offset#0 = cputln::$0
Alias main::c#2 = main::c#3
Alias main::wherey1_return#0 = main::wherey1_return#2 main::wherey1_return#1 main::wherey1_return#3 main::$1
Alias gotoxy::y#2 = main::$2
Alias toupper::return#3 = toupper::return#5
Alias main::c1#2 = main::c1#4 main::c1#3
Alias cputc::c#1 = main::$6
Successful SSA optimization Pass2AliasElimination
Alias candidate removed (volatile)conio_cursor_text = gotoxy::$6 cputln::$1 cscroll::$7
Alias candidate removed (volatile)conio_cursor_color = gotoxy::$7 cputln::$2 cscroll::$8
Alias gotoxy::x#3 = gotoxy::x#5
Alias gotoxy::y#4 = gotoxy::y#5
Successful SSA optimization Pass2AliasElimination
Alias candidate removed (volatile)conio_cursor_text = gotoxy::$6 cputln::$1 cscroll::$7
Alias candidate removed (volatile)conio_cursor_color = gotoxy::$7 cputln::$2 cscroll::$8
Identical Phi Values (byte) toupper::ch#1 (byte) toupper::ch#0
Identical Phi Values (byte*) memcpy::src_end#1 (byte*) memcpy::src_end#0
Identical Phi Values (void*) memcpy::destination#3 (void*) memcpy::destination#2
Identical Phi Values (byte*) memset::end#1 (byte*) memset::end#0
Identical Phi Values (void*) memset::str#5 (void*) memset::str#3
Identical Phi Values (byte) memset::c#2 (byte) memset::c#4
Identical Phi Values (byte*) clrscr::line_text#2 (byte*) clrscr::line_text#5
Identical Phi Values (byte*) clrscr::line_cols#2 (byte*) clrscr::line_cols#5
Identical Phi Values (byte) clrscr::l#3 (byte) clrscr::l#2
Successful SSA optimization Pass2IdenticalPhiElimination
Identical Phi Values (void*) memset::return#0 (void*) memset::str#3
Successful SSA optimization Pass2IdenticalPhiElimination
Simple Condition (bool~) memcpy::$1 [15] if((byte*) memcpy::src#2!=(byte*) memcpy::src_end#0) goto memcpy::@2
Simple Condition (bool~) memset::$1 [22] if((word) memset::num#2<=(byte) 0) goto memset::@1
Simple Condition (bool~) memset::$3 [29] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@4
Simple Condition (bool~) clrscr::$0 [44] if((byte) clrscr::l#2<(byte) $19) goto clrscr::@2
Simple Condition (bool~) clrscr::$1 [52] if((byte) clrscr::c#2<(byte) $28) goto clrscr::@5
Simple Condition (bool~) gotoxy::$1 [62] if((byte) gotoxy::y#3<=(byte) $19) goto gotoxy::@1
Simple Condition (bool~) gotoxy::$3 [65] if((byte) gotoxy::x#3<(byte) $28) goto gotoxy::@2
Simple Condition (bool~) cputc::$0 [81] if((byte) cputc::c#2==(byte) '
') goto cputc::@1
Simple Condition (bool~) cputc::$2 [89] if((byte) conio_cursor_x!=(byte) $28) goto cputc::@return
Simple Condition (bool~) cscroll::$1 [104] if((byte) conio_cursor_y!=(byte) $19) goto cscroll::@return
Simple Condition (bool~) cscroll::$9 [106] if((byte) 0!=(byte) conio_scroll_enable) goto cscroll::@3
Simple Condition (bool~) main::$5 [144] if((byte) main::c#1!=rangelast(0,$ff)) goto main::@1
Simple Condition (bool~) main::$8 [158] if((byte) main::c1#1!=rangelast(0,$ff)) goto main::@2
Successful SSA optimization Pass2ConditionalJumpSimplification
Rewriting && if()-condition to two if()s [3] (bool~) toupper::$2 ← (bool~) toupper::$0 && (bool~) toupper::$1
Successful SSA optimization Pass2ConditionalAndOrRewriting
Constant right-side identified [109] (word) memcpy::num#0 ← (unumber)(number) $19*(number) $28-(number) $28
Constant right-side identified [114] (word) memcpy::num#1 ← (unumber)(number) $19*(number) $28-(number) $28
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte*) clrscr::line_text#0 = CONIO_SCREEN_TEXT
Constant (const byte*) clrscr::line_cols#0 = CONIO_SCREEN_COLORS
Constant (const byte) clrscr::l#0 = 0
Constant (const byte) clrscr::c#0 = 0
Constant (const byte) gotoxy::y#0 = 0
Constant (const byte) gotoxy::x#0 = 0
Constant (const void*) memcpy::destination#0 = (void*)CONIO_SCREEN_TEXT
Constant (const void*) memcpy::source#0 = (void*)CONIO_SCREEN_TEXT+$28
Constant (const word) memcpy::num#0 = (unumber)$19*$28-$28
Constant (const void*) memcpy::destination#1 = (void*)CONIO_SCREEN_COLORS
Constant (const void*) memcpy::source#1 = (void*)CONIO_SCREEN_COLORS+$28
Constant (const word) memcpy::num#1 = (unumber)$19*$28-$28
Constant (const void*) memset::str#0 = (void*)CONIO_SCREEN_TEXT+(word)$19*$28-$28
Constant (const byte) memset::c#0 = ' '
Constant (const word) memset::num#0 = $28
Constant (const void*) memset::str#1 = (void*)CONIO_SCREEN_COLORS+(word)$19*$28-$28
Constant (const word) memset::num#1 = $28
Constant (const byte) gotoxy::x#1 = 0
Constant (const byte) gotoxy::y#1 = 0
Constant (const byte) main::c#0 = 0
Constant (const byte) gotoxy::x#2 = 0
Constant (const byte) main::c1#0 = 0
Constant (const byte) conio_textcolor = CONIO_TEXTCOLOR_DEFAULT
Constant (const byte) conio_scroll_enable = 1
Successful SSA optimization Pass2ConstantIdentification
Constant (const byte) memset::c#1 = conio_textcolor
Successful SSA optimization Pass2ConstantIdentification
if() condition always true - replacing block destination [106] if((byte) 0!=(const byte) conio_scroll_enable) goto cscroll::@3
Successful SSA optimization Pass2ConstantIfs
Resolved ranged next value [142] main::c#1 ← ++ main::c#2 to ++
Resolved ranged comparison value [144] if(main::c#1!=rangelast(0,$ff)) goto main::@1 to (number) 0
Resolved ranged next value [156] main::c1#1 ← ++ main::c1#2 to ++
Resolved ranged comparison value [158] if(main::c1#1!=rangelast(0,$ff)) goto main::@2 to (number) 0
Rewriting conditional comparison [62] if((byte) gotoxy::y#3<=(byte) $19) goto gotoxy::@1
Eliminating unused variable (void*) memcpy::return#2 and assignment [85] (void*) memcpy::return#2 ← (void*) memcpy::destination#2
Eliminating unused variable (void*) memcpy::return#3 and assignment [87] (void*) memcpy::return#3 ← (void*) memcpy::destination#2
Eliminating unused variable (void*) memset::return#2 and assignment [89] (void*) memset::return#2 ← (void*) memset::str#3
Eliminating unused variable (void*) memset::return#3 and assignment [91] (void*) memset::return#3 ← (void*) memset::str#3
Eliminating unused constant (const byte) conio_scroll_enable
Successful SSA optimization PassNEliminateUnusedVars
Removing PHI-reference to removed block (cscroll::@2) in block gotoxy
Removing PHI-reference to removed block (cscroll::@2) in block gotoxy
Removing unused block cscroll::@2
Removing unused block cscroll::@8
Successful SSA optimization Pass2EliminateUnusedBlocks
Adding number conversion cast (unumber) $19+1 in if((byte) gotoxy::y#3<(byte) $19+(number) 1) goto gotoxy::@1
Adding number conversion cast (unumber) 1 in if((byte) gotoxy::y#3<(unumber)(byte) $19+(number) 1) goto gotoxy::@1
Adding number conversion cast (unumber) 0 in if((byte) main::c#1!=(number) 0) goto main::@1
Adding number conversion cast (unumber) 0 in if((byte) main::c1#1!=(number) 0) goto main::@2
Successful SSA optimization PassNAddNumberTypeConversions
Simplifying constant integer cast (byte) $19+(unumber)(number) 1
Simplifying constant integer cast 1
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Successful SSA optimization PassNFinalizeNumberTypeConversions
Alias candidate removed (volatile)conio_cursor_text = gotoxy::$6 cputln::$1 cscroll::$7
Alias candidate removed (volatile)conio_cursor_color = gotoxy::$7 cputln::$2 cscroll::$8
Identical Phi Values (byte) gotoxy::y#3 (byte) gotoxy::y#2
Identical Phi Values (byte) gotoxy::x#3 (const byte) gotoxy::x#2
Successful SSA optimization Pass2IdenticalPhiElimination
Simple Condition (bool~) toupper::$0 [2] if((byte) toupper::ch#0>=(byte) 'a') goto toupper::@3
Simple Condition (bool~) toupper::$1 [114] if((byte) toupper::ch#0<=(byte) 'z') goto toupper::@1
Successful SSA optimization Pass2ConditionalJumpSimplification
Negating conditional jump and destination [2] if((byte) toupper::ch#0<(byte) 'a') goto toupper::@2
Successful SSA optimization Pass2ConditionalJumpSequenceImprovement
if() condition always true - replacing block destination [49] if((const byte) gotoxy::x#2<(byte) $28) goto gotoxy::@2
Successful SSA optimization Pass2ConstantIfs
Eliminating unused constant (const byte) gotoxy::x#1
Eliminating unused constant (const byte) gotoxy::y#1
Successful SSA optimization PassNEliminateUnusedVars
Removing PHI-reference to removed block (gotoxy::@4) in block gotoxy::@2
Removing unused block gotoxy::@4
Successful SSA optimization Pass2EliminateUnusedBlocks
Alias candidate removed (volatile)conio_cursor_text = gotoxy::$6 cputln::$1 cscroll::$7
Alias candidate removed (volatile)conio_cursor_color = gotoxy::$7 cputln::$2 cscroll::$8
Identical Phi Values (byte) gotoxy::x#4 (const byte) gotoxy::x#2
Successful SSA optimization Pass2IdenticalPhiElimination
Simplifying expression containing zero gotoxy::$4 in [51] (word) gotoxy::offset#0 ← (word~) gotoxy::$4 + (const byte) gotoxy::x#2
Successful SSA optimization PassNSimplifyExpressionWithZero
Eliminating unused constant (const byte) gotoxy::x#0
Successful SSA optimization PassNEliminateUnusedVars
Alias candidate removed (volatile)conio_cursor_text = gotoxy::$6 cputln::$1 cscroll::$7
Alias candidate removed (volatile)conio_cursor_color = gotoxy::$7 cputln::$2 cscroll::$8
Alias gotoxy::offset#0 = gotoxy::$4
Successful SSA optimization Pass2AliasElimination
Alias candidate removed (volatile)conio_cursor_text = gotoxy::$6 cputln::$1 cscroll::$7
Alias candidate removed (volatile)conio_cursor_color = gotoxy::$7 cputln::$2 cscroll::$8
Alias candidate removed (volatile)conio_cursor_text = gotoxy::$6 cputln::$1 cscroll::$7
Alias candidate removed (volatile)conio_cursor_color = gotoxy::$7 cputln::$2 cscroll::$8
Inlining Noop Cast [5] (byte*) memcpy::src#0 ← (byte*)(void*) memcpy::source#2 keeping memcpy::source#2
Inlining Noop Cast [6] (byte*) memcpy::dst#0 ← (byte*)(void*) memcpy::destination#2 keeping memcpy::destination#2
Inlining Noop Cast [7] (byte*~) memcpy::$2 ← (byte*)(void*) memcpy::source#2 keeping memcpy::source#2
Inlining Noop Cast [17] (byte*~) memset::$4 ← (byte*)(void*) memset::str#3 keeping memset::str#3
Inlining Noop Cast [19] (byte*) memset::dst#0 ← (byte*)(void*) memset::str#3 keeping memset::str#3
Successful SSA optimization Pass2NopCastInlining
Rewriting multiplication to use shift and addition[49] (word) gotoxy::offset#0 ← (word~) gotoxy::$8 * (byte) $28
Inlining constant with var siblings (const void*) memcpy::destination#0
Inlining constant with var siblings (const void*) memcpy::source#0
Inlining constant with var siblings (const word) memcpy::num#0
Inlining constant with var siblings (const void*) memcpy::destination#1
Inlining constant with var siblings (const void*) memcpy::source#1
Inlining constant with var siblings (const word) memcpy::num#1
Inlining constant with var siblings (const void*) memset::str#0
Inlining constant with var siblings (const byte) memset::c#0
Inlining constant with var siblings (const word) memset::num#0
Inlining constant with var siblings (const void*) memset::str#1
Inlining constant with var siblings (const word) memset::num#1
Inlining constant with var siblings (const byte) memset::c#1
Inlining constant with var siblings (const byte*) clrscr::line_text#0
Inlining constant with var siblings (const byte*) clrscr::line_cols#0
Inlining constant with var siblings (const byte) clrscr::l#0
Inlining constant with var siblings (const byte) clrscr::c#0
Inlining constant with var siblings (const byte) gotoxy::y#0
Inlining constant with var siblings (const byte) main::c#0
Inlining constant with var siblings (const byte) main::c1#0
Constant inlined main::c1#0 = (byte) 0
Constant inlined memset::str#1 = (void*)(const nomodify byte*) CONIO_SCREEN_COLORS+(word)(number) $19*(number) $28-(byte) $28
Constant inlined memset::str#0 = (void*)(const nomodify byte*) CONIO_SCREEN_TEXT+(word)(number) $19*(number) $28-(byte) $28
Constant inlined clrscr::line_text#0 = (const nomodify byte*) CONIO_SCREEN_TEXT
Constant inlined conio_textcolor = (const nomodify byte) CONIO_TEXTCOLOR_DEFAULT
Constant inlined memcpy::destination#0 = (void*)(const nomodify byte*) CONIO_SCREEN_TEXT
Constant inlined memset::num#1 = (byte) $28
Constant inlined memcpy::destination#1 = (void*)(const nomodify byte*) CONIO_SCREEN_COLORS
Constant inlined memset::num#0 = (byte) $28
Constant inlined memcpy::source#0 = (void*)(const nomodify byte*) CONIO_SCREEN_TEXT+(byte) $28
Constant inlined clrscr::l#0 = (byte) 0
Constant inlined memcpy::num#1 = (word)(number) $19*(number) $28-(number) $28
Constant inlined memcpy::num#0 = (word)(number) $19*(number) $28-(number) $28
Constant inlined main::c#0 = (byte) 0
Constant inlined memcpy::source#1 = (void*)(const nomodify byte*) CONIO_SCREEN_COLORS+(byte) $28
Constant inlined gotoxy::y#0 = (byte) 0
Constant inlined memset::c#0 = (byte) ' '
Constant inlined memset::c#1 = (const nomodify byte) CONIO_TEXTCOLOR_DEFAULT
Constant inlined clrscr::c#0 = (byte) 0
Constant inlined clrscr::line_cols#0 = (const nomodify byte*) CONIO_SCREEN_COLORS
Successful SSA optimization Pass2ConstantInlining
Alias candidate removed (volatile)conio_cursor_text = gotoxy::$6 cputln::$1 cscroll::$7
Alias candidate removed (volatile)conio_cursor_color = gotoxy::$7 cputln::$2 cscroll::$8
Alias gotoxy::offset#0 = gotoxy::$11
Successful SSA optimization Pass2AliasElimination
Alias candidate removed (volatile)conio_cursor_text = gotoxy::$6 cputln::$1 cscroll::$7
Alias candidate removed (volatile)conio_cursor_color = gotoxy::$7 cputln::$2 cscroll::$8
Identical Phi Values (word) memcpy::num#2 (word)(number) $19*(number) $28-(number) $28
Identical Phi Values (word) memset::num#2 (byte) $28
Successful SSA optimization Pass2IdenticalPhiElimination
if() condition always false - eliminating [13] if((byte) $28<=(byte) 0) goto memset::@1
Successful SSA optimization Pass2ConstantIfs
Alias candidate removed (volatile)conio_cursor_text = gotoxy::$6 cputln::$1 cscroll::$7
Alias candidate removed (volatile)conio_cursor_color = gotoxy::$7 cputln::$2 cscroll::$8
Added new block during phi lifting gotoxy::@5(between gotoxy and gotoxy::@1)
Added new block during phi lifting main::@9(between main::@5 and main::@1)
Added new block during phi lifting main::@10(between main::@8 and main::@2)
Adding NOP phi() at start of @begin
Adding NOP phi() at start of @2
Adding NOP phi() at start of @3
Adding NOP phi() at start of @end
Adding NOP phi() at start of main::@4
Adding NOP phi() at start of main::wherey1_@return
Adding NOP phi() at start of main::@6
Adding NOP phi() at start of cputc::@5
Adding NOP phi() at start of cputc::@1
Adding NOP phi() at start of cputc::@4
Adding NOP phi() at start of cputln::@1
Adding NOP phi() at start of cscroll::@1
Adding NOP phi() at start of cscroll::@3
Adding NOP phi() at start of cscroll::@4
Adding NOP phi() at start of cscroll::@5
Adding NOP phi() at start of cscroll::@6
Adding NOP phi() at start of memset::@1
Adding NOP phi() at start of memcpy::@3
Adding NOP phi() at start of gotoxy::@3
Adding NOP phi() at start of clrscr
Adding NOP phi() at start of clrscr::@2
CALL GRAPH
Calls in [] to main:6
Calls in [main] to clrscr:10 cputc:15 gotoxy:21 toupper:25 cputc:29
Calls in [cputc] to cscroll:45 cputln:49
Calls in [cputln] to cscroll:58
Calls in [cscroll] to memcpy:64 memcpy:66 memset:68 memset:70
Created 16 initial phi equivalence classes
Coalesced [14] cputc::c#4 ← cputc::c#0
Coalesced [28] cputc::c#5 ← cputc::c#1
Coalesced [33] main::c1#5 ← main::c1#1
Coalesced [34] main::c#4 ← main::c#1
Coalesced [86] memset::dst#5 ← memset::dst#1
Coalesced [98] memcpy::src#5 ← memcpy::src#1
Coalesced [99] memcpy::dst#5 ← memcpy::dst#1
Coalesced [102] toupper::return#7 ← toupper::ch#0
Coalesced [106] toupper::return#6 ← toupper::return#0
Coalesced [121] gotoxy::y#7 ← gotoxy::y#2
Coalesced [136] clrscr::l#7 ← clrscr::l#1
Coalesced [137] clrscr::line_text#7 ← clrscr::line_text#1
Coalesced [138] clrscr::line_cols#7 ← clrscr::line_cols#1
Coalesced [142] clrscr::c#4 ← clrscr::c#1
Coalesced down to 16 phi equivalence classes
Culled Empty Block (label) @3
Culled Empty Block (label) main::@4
Culled Empty Block (label) main::wherey1_@return
Culled Empty Block (label) main::@6
Culled Empty Block (label) main::@10
Culled Empty Block (label) main::@9
Culled Empty Block (label) cputc::@5
Culled Empty Block (label) cputc::@4
Culled Empty Block (label) cputln::@1
Culled Empty Block (label) cscroll::@1
Culled Empty Block (label) memset::@1
Culled Empty Block (label) memcpy::@3
Culled Empty Block (label) toupper::@2
Culled Empty Block (label) gotoxy::@3
Culled Empty Block (label) clrscr::@2
Renumbering block toupper::@3 to toupper::@2
Renumbering block memset::@2 to memset::@1
Renumbering block memset::@3 to memset::@2
Renumbering block memset::@4 to memset::@3
Renumbering block clrscr::@3 to clrscr::@2
Renumbering block clrscr::@4 to clrscr::@3
Renumbering block clrscr::@5 to clrscr::@4
Renumbering block clrscr::@6 to clrscr::@5
Renumbering block gotoxy::@5 to gotoxy::@3
Renumbering block cscroll::@3 to cscroll::@1
Renumbering block cscroll::@4 to cscroll::@2
Renumbering block cscroll::@5 to cscroll::@3
Renumbering block cscroll::@6 to cscroll::@4
Renumbering block cscroll::@7 to cscroll::@5
Renumbering block main::@5 to main::@4
Renumbering block main::@7 to main::@5
Renumbering block main::@8 to main::@6
Adding NOP phi() at start of @begin
Adding NOP phi() at start of @2
Adding NOP phi() at start of @end
Adding NOP phi() at start of cputc::@1
Adding NOP phi() at start of cscroll::@1
Adding NOP phi() at start of cscroll::@2
Adding NOP phi() at start of cscroll::@3
Adding NOP phi() at start of cscroll::@4
Adding NOP phi() at start of gotoxy::@3
Adding NOP phi() at start of clrscr
FINAL CONTROL FLOW GRAPH
@begin: scope:[] from
[0] phi()
to:@1
@1: scope:[] from @begin
[1] (byte) conio_cursor_x ← (byte) 0
[2] (byte) conio_cursor_y ← (byte) 0
[3] (byte*) conio_cursor_text ← (const nomodify byte*) CONIO_SCREEN_TEXT
[4] (byte*) conio_cursor_color ← (const nomodify byte*) CONIO_SCREEN_COLORS
to:@2
@2: scope:[] from @1
[5] phi()
[6] call main
to:@end
@end: scope:[] from @2
[7] phi()
(void()) main()
main: scope:[main] from @2
[8] *((byte*) 53272) ← (byte) $17
[9] call clrscr
to:main::@1
main::@1: scope:[main] from main main::@4
[10] (byte) main::c#2 ← phi( main/(byte) 0 main::@4/(byte) main::c#1 )
[11] (byte) cputc::c#0 ← (byte) main::c#2
[12] call cputc
to:main::@4
main::@4: scope:[main] from main::@1
[13] (byte) main::c#1 ← ++ (byte) main::c#2
[14] if((byte) main::c#1!=(byte) 0) goto main::@1
to:main::wherey1
main::wherey1: scope:[main] from main::@4
[15] (byte) main::wherey1_return#0 ← (byte) conio_cursor_y
to:main::@3
main::@3: scope:[main] from main::wherey1
[16] (byte) gotoxy::y#2 ← (byte) main::wherey1_return#0 + (byte) 2
[17] call gotoxy
to:main::@2
main::@2: scope:[main] from main::@3 main::@6
[18] (byte) main::c1#2 ← phi( main::@3/(byte) 0 main::@6/(byte) main::c1#1 )
[19] (byte) toupper::ch#0 ← (byte) main::c1#2
[20] call toupper
[21] (byte) toupper::return#3 ← (byte) toupper::return#2
to:main::@5
main::@5: scope:[main] from main::@2
[22] (byte) cputc::c#1 ← (byte) toupper::return#3
[23] call cputc
to:main::@6
main::@6: scope:[main] from main::@5
[24] (byte) main::c1#1 ← ++ (byte) main::c1#2
[25] if((byte) main::c1#1!=(byte) 0) goto main::@2
to:main::@return
main::@return: scope:[main] from main::@6
[26] return
to:@return
(void()) cputc((byte) cputc::c)
cputc: scope:[cputc] from main::@1 main::@5
[27] (byte) cputc::c#2 ← phi( main::@1/(byte) cputc::c#0 main::@5/(byte) cputc::c#1 )
[28] if((byte) cputc::c#2==(byte) '
') goto cputc::@1
to:cputc::@2
cputc::@2: scope:[cputc] from cputc
[29] *((byte*) conio_cursor_text) ← (byte) cputc::c#2
[30] (byte*) conio_cursor_text ← ++ (byte*) conio_cursor_text
[31] *((byte*) conio_cursor_color) ← (const nomodify byte) CONIO_TEXTCOLOR_DEFAULT
[32] (byte*) conio_cursor_color ← ++ (byte*) conio_cursor_color
[33] (byte) conio_cursor_x ← ++ (byte) conio_cursor_x
[34] if((byte) conio_cursor_x!=(byte) $28) goto cputc::@return
to:cputc::@3
cputc::@3: scope:[cputc] from cputc::@2
[35] (byte) conio_cursor_x ← (byte) 0
[36] (byte) conio_cursor_y ← ++ (byte) conio_cursor_y
[37] call cscroll
to:cputc::@return
cputc::@return: scope:[cputc] from cputc::@1 cputc::@2 cputc::@3
[38] return
to:@return
cputc::@1: scope:[cputc] from cputc
[39] phi()
[40] call cputln
to:cputc::@return
(void()) cputln()
cputln: scope:[cputln] from cputc::@1
[41] (word) cputln::ln_offset#0 ← (byte) $28 - (byte) conio_cursor_x
[42] (byte*~) cputln::$1 ← (byte*) conio_cursor_text + (word) cputln::ln_offset#0
[43] (byte*) conio_cursor_text ← (byte*~) cputln::$1
[44] (byte*~) cputln::$2 ← (byte*) conio_cursor_color + (word) cputln::ln_offset#0
[45] (byte*) conio_cursor_color ← (byte*~) cputln::$2
[46] (byte) conio_cursor_x ← (byte) 0
[47] (byte) conio_cursor_y ← ++ (byte) conio_cursor_y
[48] call cscroll
to:cputln::@return
cputln::@return: scope:[cputln] from cputln
[49] return
to:@return
(void()) cscroll()
cscroll: scope:[cscroll] from cputc::@3 cputln
[50] if((byte) conio_cursor_y!=(byte) $19) goto cscroll::@return
to:cscroll::@1
cscroll::@1: scope:[cscroll] from cscroll
[51] phi()
[52] call memcpy
to:cscroll::@2
cscroll::@2: scope:[cscroll] from cscroll::@1
[53] phi()
[54] call memcpy
to:cscroll::@3
cscroll::@3: scope:[cscroll] from cscroll::@2
[55] phi()
[56] call memset
to:cscroll::@4
cscroll::@4: scope:[cscroll] from cscroll::@3
[57] phi()
[58] call memset
to:cscroll::@5
cscroll::@5: scope:[cscroll] from cscroll::@4
[59] (byte*~) cscroll::$7 ← (byte*) conio_cursor_text - (byte) $28
[60] (byte*) conio_cursor_text ← (byte*~) cscroll::$7
[61] (byte*~) cscroll::$8 ← (byte*) conio_cursor_color - (byte) $28
[62] (byte*) conio_cursor_color ← (byte*~) cscroll::$8
[63] (byte) conio_cursor_y ← -- (byte) conio_cursor_y
to:cscroll::@return
cscroll::@return: scope:[cscroll] from cscroll cscroll::@5
[64] return
to:@return
(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num)
memset: scope:[memset] from cscroll::@3 cscroll::@4
[65] (byte) memset::c#4 ← phi( cscroll::@3/(byte) ' ' cscroll::@4/(const nomodify byte) CONIO_TEXTCOLOR_DEFAULT )
[65] (void*) memset::str#3 ← phi( cscroll::@3/(void*)(const nomodify byte*) CONIO_SCREEN_TEXT+(word)(number) $19*(number) $28-(byte) $28 cscroll::@4/(void*)(const nomodify byte*) CONIO_SCREEN_COLORS+(word)(number) $19*(number) $28-(byte) $28 )
to:memset::@1
memset::@1: scope:[memset] from memset
[66] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (byte) $28
[67] (byte*) memset::dst#4 ← (byte*)(void*) memset::str#3
to:memset::@2
memset::@2: scope:[memset] from memset::@1 memset::@3
[68] (byte*) memset::dst#2 ← phi( memset::@1/(byte*) memset::dst#4 memset::@3/(byte*) memset::dst#1 )
[69] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@3
to:memset::@return
memset::@return: scope:[memset] from memset::@2
[70] return
to:@return
memset::@3: scope:[memset] from memset::@2
[71] *((byte*) memset::dst#2) ← (byte) memset::c#4
[72] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2
to:memset::@2
(void*()) memcpy((void*) memcpy::destination , (void*) memcpy::source , (word) memcpy::num)
memcpy: scope:[memcpy] from cscroll::@1 cscroll::@2
[73] (void*) memcpy::destination#2 ← phi( cscroll::@1/(void*)(const nomodify byte*) CONIO_SCREEN_TEXT cscroll::@2/(void*)(const nomodify byte*) CONIO_SCREEN_COLORS )
[73] (void*) memcpy::source#2 ← phi( cscroll::@1/(void*)(const nomodify byte*) CONIO_SCREEN_TEXT+(byte) $28 cscroll::@2/(void*)(const nomodify byte*) CONIO_SCREEN_COLORS+(byte) $28 )
[74] (byte*) memcpy::src_end#0 ← (byte*)(void*) memcpy::source#2 + (word)(number) $19*(number) $28-(number) $28
[75] (byte*) memcpy::src#4 ← (byte*)(void*) memcpy::source#2
[76] (byte*) memcpy::dst#4 ← (byte*)(void*) memcpy::destination#2
to:memcpy::@1
memcpy::@1: scope:[memcpy] from memcpy memcpy::@2
[77] (byte*) memcpy::dst#2 ← phi( memcpy/(byte*) memcpy::dst#4 memcpy::@2/(byte*) memcpy::dst#1 )
[77] (byte*) memcpy::src#2 ← phi( memcpy/(byte*) memcpy::src#4 memcpy::@2/(byte*) memcpy::src#1 )
[78] if((byte*) memcpy::src#2!=(byte*) memcpy::src_end#0) goto memcpy::@2
to:memcpy::@return
memcpy::@return: scope:[memcpy] from memcpy::@1
[79] return
to:@return
memcpy::@2: scope:[memcpy] from memcpy::@1
[80] *((byte*) memcpy::dst#2) ← *((byte*) memcpy::src#2)
[81] (byte*) memcpy::dst#1 ← ++ (byte*) memcpy::dst#2
[82] (byte*) memcpy::src#1 ← ++ (byte*) memcpy::src#2
to:memcpy::@1
(byte()) toupper((byte) toupper::ch)
toupper: scope:[toupper] from main::@2
[83] if((byte) toupper::ch#0<(byte) 'a') goto toupper::@return
to:toupper::@2
toupper::@2: scope:[toupper] from toupper
[84] if((byte) toupper::ch#0<=(byte) 'z') goto toupper::@1
to:toupper::@return
toupper::@1: scope:[toupper] from toupper::@2
[85] (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
[86] (byte) toupper::return#2 ← phi( toupper::@1/(byte) toupper::return#0 toupper/(byte) toupper::ch#0 toupper::@2/(byte) toupper::ch#0 )
[87] return
to:@return
(void()) gotoxy((byte) gotoxy::x , (byte) gotoxy::y)
gotoxy: scope:[gotoxy] from main::@3
[88] if((byte) gotoxy::y#2<(byte) $19+(byte) 1) goto gotoxy::@3
to:gotoxy::@1
gotoxy::@3: scope:[gotoxy] from gotoxy
[89] phi()
to:gotoxy::@1
gotoxy::@1: scope:[gotoxy] from gotoxy gotoxy::@3
[90] (byte) gotoxy::y#4 ← phi( gotoxy::@3/(byte) gotoxy::y#2 gotoxy/(byte) 0 )
to:gotoxy::@2
gotoxy::@2: scope:[gotoxy] from gotoxy::@1
[91] (byte) conio_cursor_x ← (const byte) gotoxy::x#2
[92] (byte) conio_cursor_y ← (byte) gotoxy::y#4
[93] (word~) gotoxy::$8 ← (word)(byte) gotoxy::y#4
[94] (word~) gotoxy::$9 ← (word~) gotoxy::$8 << (byte) 2
[95] (word~) gotoxy::$10 ← (word~) gotoxy::$9 + (word~) gotoxy::$8
[96] (word) gotoxy::offset#0 ← (word~) gotoxy::$10 << (byte) 3
[97] (byte*~) gotoxy::$6 ← (const nomodify byte*) CONIO_SCREEN_TEXT + (word) gotoxy::offset#0
[98] (byte*) conio_cursor_text ← (byte*~) gotoxy::$6
[99] (byte*~) gotoxy::$7 ← (const nomodify byte*) CONIO_SCREEN_COLORS + (word) gotoxy::offset#0
[100] (byte*) conio_cursor_color ← (byte*~) gotoxy::$7
to:gotoxy::@return
gotoxy::@return: scope:[gotoxy] from gotoxy::@2
[101] return
to:@return
(void()) clrscr()
clrscr: scope:[clrscr] from main
[102] phi()
to:clrscr::@1
clrscr::@1: scope:[clrscr] from clrscr clrscr::@5
[103] (byte*) clrscr::line_cols#5 ← phi( clrscr/(const nomodify byte*) CONIO_SCREEN_COLORS clrscr::@5/(byte*) clrscr::line_cols#1 )
[103] (byte*) clrscr::line_text#5 ← phi( clrscr/(const nomodify byte*) CONIO_SCREEN_TEXT clrscr::@5/(byte*) clrscr::line_text#1 )
[103] (byte) clrscr::l#2 ← phi( clrscr/(byte) 0 clrscr::@5/(byte) clrscr::l#1 )
[104] if((byte) clrscr::l#2<(byte) $19) goto clrscr::@3
to:clrscr::@2
clrscr::@2: scope:[clrscr] from clrscr::@1
[105] (byte) conio_cursor_x ← (byte) 0
[106] (byte) conio_cursor_y ← (byte) 0
[107] (byte*) conio_cursor_text ← (const nomodify byte*) CONIO_SCREEN_TEXT
[108] (byte*) conio_cursor_color ← (const nomodify byte*) CONIO_SCREEN_COLORS
to:clrscr::@return
clrscr::@return: scope:[clrscr] from clrscr::@2
[109] return
to:@return
clrscr::@3: scope:[clrscr] from clrscr::@1 clrscr::@4
[110] (byte) clrscr::c#2 ← phi( clrscr::@1/(byte) 0 clrscr::@4/(byte) clrscr::c#1 )
[111] if((byte) clrscr::c#2<(byte) $28) goto clrscr::@4
to:clrscr::@5
clrscr::@5: scope:[clrscr] from clrscr::@3
[112] (byte*) clrscr::line_text#1 ← (byte*) clrscr::line_text#5 + (byte) $28
[113] (byte*) clrscr::line_cols#1 ← (byte*) clrscr::line_cols#5 + (byte) $28
[114] (byte) clrscr::l#1 ← ++ (byte) clrscr::l#2
to:clrscr::@1
clrscr::@4: scope:[clrscr] from clrscr::@3
[115] *((byte*) clrscr::line_text#5 + (byte) clrscr::c#2) ← (byte) ' '
[116] *((byte*) clrscr::line_cols#5 + (byte) clrscr::c#2) ← (const nomodify byte) CONIO_TEXTCOLOR_DEFAULT
[117] (byte) clrscr::c#1 ← ++ (byte) clrscr::c#2
to:clrscr::@3
VARIABLE REGISTER WEIGHTS
(void()) clrscr()
(byte) clrscr::c
(byte) clrscr::c#1 20002.0
(byte) clrscr::c#2 12501.25
(byte) clrscr::l
(byte) clrscr::l#1 2002.0
(byte) clrscr::l#2 333.6666666666667
(byte*) clrscr::line_cols
(byte*) clrscr::line_cols#1 1001.0
(byte*) clrscr::line_cols#5 1500.375
(byte*) clrscr::line_text
(byte*) clrscr::line_text#1 667.3333333333334
(byte*) clrscr::line_text#5 1714.7142857142858
(byte*) conio_cursor_color loadstore 4058.3818181818187
(byte*) conio_cursor_text loadstore 3848.465517241379
(byte) conio_cursor_x loadstore 494.0816326530612
(byte) conio_cursor_y loadstore 4809.283582089552
(void()) cputc((byte) cputc::c)
(byte) cputc::c
(byte) cputc::c#0 202.0
(byte) cputc::c#1 202.0
(byte) cputc::c#2 1102.0
(void()) cputln()
(byte*~) cputln::$1 20002.0
(byte*~) cputln::$2 20002.0
(word) cputln::ln_offset
(word) cputln::ln_offset#0 10001.0
(void()) cscroll()
(byte*~) cscroll::$7 200002.0
(byte*~) cscroll::$8 200002.0
(void()) gotoxy((byte) gotoxy::x , (byte) gotoxy::y)
(word~) gotoxy::$10 202.0
(byte*~) gotoxy::$6 202.0
(byte*~) gotoxy::$7 202.0
(word~) gotoxy::$8 151.5
(word~) gotoxy::$9 202.0
(word) gotoxy::offset
(word) gotoxy::offset#0 101.0
(byte) gotoxy::x
(byte) gotoxy::y
(byte) gotoxy::y#2 71.0
(byte) gotoxy::y#4 67.33333333333333
(void()) main()
(byte) main::c
(byte) main::c#1 151.5
(byte) main::c#2 101.0
(byte) main::c1
(byte) main::c1#1 151.5
(byte) main::c1#2 50.5
(byte) main::wherey1_return
(byte) main::wherey1_return#0 22.0
(void*()) memcpy((void*) memcpy::destination , (void*) memcpy::source , (word) memcpy::num)
(void*) memcpy::destination
(void*) memcpy::destination#2
(byte*) memcpy::dst
(byte*) memcpy::dst#1 1.00000001E8
(byte*) memcpy::dst#2 1.0033333466666667E8
(byte*) memcpy::dst#4 2000002.0
(word) memcpy::num
(void*) memcpy::return
(void*) memcpy::source
(void*) memcpy::source#2
(byte*) memcpy::src
(byte*) memcpy::src#1 2.00000002E8
(byte*) memcpy::src#2 1.0025000125E8
(byte*) memcpy::src#4 1000001.0
(byte*) memcpy::src_end
(byte*) memcpy::src_end#0 1.262500025E7
(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num)
(byte) memset::c
(byte) memset::c#4 1.428571442857143E7
(byte*) memset::dst
(byte*) memset::dst#1 2.00000002E8
(byte*) memset::dst#2 1.3366666833333334E8
(byte*) memset::dst#4 2000002.0
(byte*) memset::end
(byte*) memset::end#0 1.6833333666666668E7
(word) memset::num
(void*) memset::return
(void*) memset::str
(void*) memset::str#3
(byte()) toupper((byte) toupper::ch)
(byte) toupper::ch
(byte) toupper::ch#0 1702.0000000000002
(byte) toupper::return
(byte) toupper::return#0 2002.0
(byte) toupper::return#2 1034.6666666666667
(byte) toupper::return#3 202.0
Initial phi equivalence classes
[ main::c#2 main::c#1 ]
[ main::c1#2 main::c1#1 ]
[ cputc::c#2 cputc::c#0 cputc::c#1 ]
[ memset::str#3 ]
[ memset::c#4 ]
[ memset::dst#2 memset::dst#4 memset::dst#1 ]
[ memcpy::source#2 ]
[ memcpy::destination#2 ]
[ memcpy::src#2 memcpy::src#4 memcpy::src#1 ]
[ memcpy::dst#2 memcpy::dst#4 memcpy::dst#1 ]
[ toupper::return#2 toupper::return#0 toupper::ch#0 ]
[ gotoxy::y#4 gotoxy::y#2 ]
[ clrscr::l#2 clrscr::l#1 ]
[ clrscr::line_text#5 clrscr::line_text#1 ]
[ clrscr::line_cols#5 clrscr::line_cols#1 ]
[ clrscr::c#2 clrscr::c#1 ]
Added variable conio_cursor_x to live range equivalence class [ conio_cursor_x ]
Added variable conio_cursor_y to live range equivalence class [ conio_cursor_y ]
Added variable conio_cursor_text to live range equivalence class [ conio_cursor_text ]
Added variable conio_cursor_color to live range equivalence class [ conio_cursor_color ]
Added variable main::wherey1_return#0 to live range equivalence class [ main::wherey1_return#0 ]
Added variable toupper::return#3 to live range equivalence class [ toupper::return#3 ]
Added variable cputln::ln_offset#0 to live range equivalence class [ cputln::ln_offset#0 ]
Added variable cputln::$1 to live range equivalence class [ cputln::$1 ]
Added variable cputln::$2 to live range equivalence class [ cputln::$2 ]
Added variable cscroll::$7 to live range equivalence class [ cscroll::$7 ]
Added variable cscroll::$8 to live range equivalence class [ cscroll::$8 ]
Added variable memset::end#0 to live range equivalence class [ memset::end#0 ]
Added variable memcpy::src_end#0 to live range equivalence class [ memcpy::src_end#0 ]
Added variable gotoxy::$8 to live range equivalence class [ gotoxy::$8 ]
Added variable gotoxy::$9 to live range equivalence class [ gotoxy::$9 ]
Added variable gotoxy::$10 to live range equivalence class [ gotoxy::$10 ]
Added variable gotoxy::offset#0 to live range equivalence class [ gotoxy::offset#0 ]
Added variable gotoxy::$6 to live range equivalence class [ gotoxy::$6 ]
Added variable gotoxy::$7 to live range equivalence class [ gotoxy::$7 ]
Complete equivalence classes
[ main::c#2 main::c#1 ]
[ main::c1#2 main::c1#1 ]
[ cputc::c#2 cputc::c#0 cputc::c#1 ]
[ memset::str#3 ]
[ memset::c#4 ]
[ memset::dst#2 memset::dst#4 memset::dst#1 ]
[ memcpy::source#2 ]
[ memcpy::destination#2 ]
[ memcpy::src#2 memcpy::src#4 memcpy::src#1 ]
[ memcpy::dst#2 memcpy::dst#4 memcpy::dst#1 ]
[ toupper::return#2 toupper::return#0 toupper::ch#0 ]
[ gotoxy::y#4 gotoxy::y#2 ]
[ clrscr::l#2 clrscr::l#1 ]
[ clrscr::line_text#5 clrscr::line_text#1 ]
[ clrscr::line_cols#5 clrscr::line_cols#1 ]
[ clrscr::c#2 clrscr::c#1 ]
[ conio_cursor_x ]
[ conio_cursor_y ]
[ conio_cursor_text ]
[ conio_cursor_color ]
[ main::wherey1_return#0 ]
[ toupper::return#3 ]
[ cputln::ln_offset#0 ]
[ cputln::$1 ]
[ cputln::$2 ]
[ cscroll::$7 ]
[ cscroll::$8 ]
[ memset::end#0 ]
[ memcpy::src_end#0 ]
[ gotoxy::$8 ]
[ gotoxy::$9 ]
[ gotoxy::$10 ]
[ gotoxy::offset#0 ]
[ gotoxy::$6 ]
[ gotoxy::$7 ]
Allocated zp[1]:2 [ main::c#2 main::c#1 ]
Allocated zp[1]:3 [ main::c1#2 main::c1#1 ]
Allocated zp[1]:4 [ cputc::c#2 cputc::c#0 cputc::c#1 ]
Allocated zp[2]:5 [ memset::str#3 ]
Allocated zp[1]:7 [ memset::c#4 ]
Allocated zp[2]:8 [ memset::dst#2 memset::dst#4 memset::dst#1 ]
Allocated zp[2]:10 [ memcpy::source#2 ]
Allocated zp[2]:12 [ memcpy::destination#2 ]
Allocated zp[2]:14 [ memcpy::src#2 memcpy::src#4 memcpy::src#1 ]
Allocated zp[2]:16 [ memcpy::dst#2 memcpy::dst#4 memcpy::dst#1 ]
Allocated zp[1]:18 [ toupper::return#2 toupper::return#0 toupper::ch#0 ]
Allocated zp[1]:19 [ gotoxy::y#4 gotoxy::y#2 ]
Allocated zp[1]:20 [ clrscr::l#2 clrscr::l#1 ]
Allocated zp[2]:21 [ clrscr::line_text#5 clrscr::line_text#1 ]
Allocated zp[2]:23 [ clrscr::line_cols#5 clrscr::line_cols#1 ]
Allocated zp[1]:25 [ clrscr::c#2 clrscr::c#1 ]
Allocated zp[1]:26 [ conio_cursor_x ]
Allocated zp[1]:27 [ conio_cursor_y ]
Allocated zp[2]:28 [ conio_cursor_text ]
Allocated zp[2]:30 [ conio_cursor_color ]
Allocated zp[1]:32 [ main::wherey1_return#0 ]
Allocated zp[1]:33 [ toupper::return#3 ]
Allocated zp[2]:34 [ cputln::ln_offset#0 ]
Allocated zp[2]:36 [ cputln::$1 ]
Allocated zp[2]:38 [ cputln::$2 ]
Allocated zp[2]:40 [ cscroll::$7 ]
Allocated zp[2]:42 [ cscroll::$8 ]
Allocated zp[2]:44 [ memset::end#0 ]
Allocated zp[2]:46 [ memcpy::src_end#0 ]
Allocated zp[2]:48 [ gotoxy::$8 ]
Allocated zp[2]:50 [ gotoxy::$9 ]
Allocated zp[2]:52 [ gotoxy::$10 ]
Allocated zp[2]:54 [ gotoxy::offset#0 ]
Allocated zp[2]:56 [ gotoxy::$6 ]
Allocated zp[2]:58 [ gotoxy::$7 ]
INITIAL ASM
Target platform is c64basic / MOS6502X
// File Comments
// Test toupper()
// Upstart
.pc = $801 "Basic"
:BasicUpstart(__bbegin)
.pc = $80d "Program"
// Global Constants & labels
// The default text color
.const CONIO_TEXTCOLOR_DEFAULT = $e
// The screen width
// The screen height
// The screen bytes
// The text screen address
.label CONIO_SCREEN_TEXT = $400
// The color screen address
.label CONIO_SCREEN_COLORS = $d800
.label conio_cursor_x = $1a
.label conio_cursor_y = $1b
.label conio_cursor_text = $1c
.label conio_cursor_color = $1e
// @begin
__bbegin:
jmp __b1
// @1
__b1:
// [1] (byte) conio_cursor_x ← (byte) 0 -- vbuz1=vbuc1
// The current cursor x-position
lda #0
sta.z conio_cursor_x
// [2] (byte) conio_cursor_y ← (byte) 0 -- vbuz1=vbuc1
// The current cursor y-position
lda #0
sta.z conio_cursor_y
// [3] (byte*) conio_cursor_text ← (const nomodify byte*) CONIO_SCREEN_TEXT -- pbuz1=pbuc1
// The current cursor address
lda #<CONIO_SCREEN_TEXT
sta.z conio_cursor_text
lda #>CONIO_SCREEN_TEXT
sta.z conio_cursor_text+1
// [4] (byte*) conio_cursor_color ← (const nomodify byte*) CONIO_SCREEN_COLORS -- pbuz1=pbuc1
// The current cursor address
lda #<CONIO_SCREEN_COLORS
sta.z conio_cursor_color
lda #>CONIO_SCREEN_COLORS
sta.z conio_cursor_color+1
// [5] phi from @1 to @2 [phi:@1->@2]
__b2_from___b1:
jmp __b2
// @2
__b2:
// [6] call main
jsr main
// [7] phi from @2 to @end [phi:@2->@end]
__bend_from___b2:
jmp __bend
// @end
__bend:
// main
main: {
.label c = 2
.label wherey1_return = $20
.label c1 = 3
// [8] *((byte*) 53272) ← (byte) $17 -- _deref_pbuc1=vbuc2
// Show mixed chars on screen
lda #$17
sta $d018
// [9] call clrscr
// Clear screen
// [102] phi from main to clrscr [phi:main->clrscr]
clrscr_from_main:
jsr clrscr
// [10] phi from main to main::@1 [phi:main->main::@1]
__b1_from_main:
// [10] phi (byte) main::c#2 = (byte) 0 [phi:main->main::@1#0] -- vbuz1=vbuc1
lda #0
sta.z c
jmp __b1
// Output un-modified chars
// [10] phi from main::@4 to main::@1 [phi:main::@4->main::@1]
__b1_from___b4:
// [10] phi (byte) main::c#2 = (byte) main::c#1 [phi:main::@4->main::@1#0] -- register_copy
jmp __b1
// main::@1
__b1:
// [11] (byte) cputc::c#0 ← (byte) main::c#2 -- vbuz1=vbuz2
lda.z c
sta.z cputc.c
// [12] call cputc
// [27] phi from main::@1 to cputc [phi:main::@1->cputc]
cputc_from___b1:
// [27] phi (byte) cputc::c#2 = (byte) cputc::c#0 [phi:main::@1->cputc#0] -- register_copy
jsr cputc
jmp __b4
// main::@4
__b4:
// [13] (byte) main::c#1 ← ++ (byte) main::c#2 -- vbuz1=_inc_vbuz1
inc.z c
// [14] if((byte) main::c#1!=(byte) 0) goto main::@1 -- vbuz1_neq_0_then_la1
lda.z c
cmp #0
bne __b1_from___b4
jmp wherey1
// main::wherey1
wherey1:
// [15] (byte) main::wherey1_return#0 ← (byte) conio_cursor_y -- vbuz1=vbuz2
lda.z conio_cursor_y
sta.z wherey1_return
jmp __b3
// main::@3
__b3:
// [16] (byte) gotoxy::y#2 ← (byte) main::wherey1_return#0 + (byte) 2 -- vbuz1=vbuz2_plus_2
lda.z wherey1_return
clc
adc #2
sta.z gotoxy.y
// [17] call gotoxy
jsr gotoxy
// [18] phi from main::@3 to main::@2 [phi:main::@3->main::@2]
__b2_from___b3:
// [18] phi (byte) main::c1#2 = (byte) 0 [phi:main::@3->main::@2#0] -- vbuz1=vbuc1
lda #0
sta.z c1
jmp __b2
// Output toupper-chars chars
// [18] phi from main::@6 to main::@2 [phi:main::@6->main::@2]
__b2_from___b6:
// [18] phi (byte) main::c1#2 = (byte) main::c1#1 [phi:main::@6->main::@2#0] -- register_copy
jmp __b2
// main::@2
__b2:
// [19] (byte) toupper::ch#0 ← (byte) main::c1#2 -- vbuz1=vbuz2
lda.z c1
sta.z toupper.ch
// [20] call toupper
jsr toupper
// [21] (byte) toupper::return#3 ← (byte) toupper::return#2 -- vbuz1=vbuz2
lda.z toupper.return
sta.z toupper.return_1
jmp __b5
// main::@5
__b5:
// [22] (byte) cputc::c#1 ← (byte) toupper::return#3 -- vbuz1=vbuz2
lda.z toupper.return_1
sta.z cputc.c
// [23] call cputc
// [27] phi from main::@5 to cputc [phi:main::@5->cputc]
cputc_from___b5:
// [27] phi (byte) cputc::c#2 = (byte) cputc::c#1 [phi:main::@5->cputc#0] -- register_copy
jsr cputc
jmp __b6
// main::@6
__b6:
// [24] (byte) main::c1#1 ← ++ (byte) main::c1#2 -- vbuz1=_inc_vbuz1
inc.z c1
// [25] if((byte) main::c1#1!=(byte) 0) goto main::@2 -- vbuz1_neq_0_then_la1
lda.z c1
cmp #0
bne __b2_from___b6
jmp __breturn
// main::@return
__breturn:
// [26] return
rts
}
// cputc
// Output one character at the current cursor position
// Moves the cursor forward. Scrolls the entire screen if needed
// cputc(byte zp(4) c)
cputc: {
.label c = 4
// [28] if((byte) cputc::c#2==(byte) ' ') goto cputc::@1 -- vbuz1_eq_vbuc1_then_la1
lda #'\n'
cmp.z c
beq __b1_from_cputc
jmp __b2
// cputc::@2
__b2:
// [29] *((byte*) conio_cursor_text) ← (byte) cputc::c#2 -- _deref_pbuz1=vbuz2
lda.z c
ldy #0
sta (conio_cursor_text),y
// [30] (byte*) conio_cursor_text ← ++ (byte*) conio_cursor_text -- pbuz1=_inc_pbuz1
inc.z conio_cursor_text
bne !+
inc.z conio_cursor_text+1
!:
// [31] *((byte*) conio_cursor_color) ← (const nomodify byte) CONIO_TEXTCOLOR_DEFAULT -- _deref_pbuz1=vbuc1
lda #CONIO_TEXTCOLOR_DEFAULT
ldy #0
sta (conio_cursor_color),y
// [32] (byte*) conio_cursor_color ← ++ (byte*) conio_cursor_color -- pbuz1=_inc_pbuz1
inc.z conio_cursor_color
bne !+
inc.z conio_cursor_color+1
!:
// [33] (byte) conio_cursor_x ← ++ (byte) conio_cursor_x -- vbuz1=_inc_vbuz1
inc.z conio_cursor_x
// [34] if((byte) conio_cursor_x!=(byte) $28) goto cputc::@return -- vbuz1_neq_vbuc1_then_la1
lda #$28
cmp.z conio_cursor_x
bne __breturn
jmp __b3
// cputc::@3
__b3:
// [35] (byte) conio_cursor_x ← (byte) 0 -- vbuz1=vbuc1
lda #0
sta.z conio_cursor_x
// [36] (byte) conio_cursor_y ← ++ (byte) conio_cursor_y -- vbuz1=_inc_vbuz1
inc.z conio_cursor_y
// [37] call cscroll
jsr cscroll
jmp __breturn
// cputc::@return
__breturn:
// [38] return
rts
// [39] phi from cputc to cputc::@1 [phi:cputc->cputc::@1]
__b1_from_cputc:
jmp __b1
// cputc::@1
__b1:
// [40] call cputln
jsr cputln
jmp __breturn
}
// cputln
// Print a newline
cputln: {
.label __1 = $24
.label __2 = $26
.label ln_offset = $22
// [41] (word) cputln::ln_offset#0 ← (byte) $28 - (byte) conio_cursor_x -- vwuz1=vbuc1_minus_vbuz2
sec
lda #$28
sbc.z conio_cursor_x
sta.z ln_offset
lda #0
sbc #0
sta.z ln_offset+1
// [42] (byte*~) cputln::$1 ← (byte*) conio_cursor_text + (word) cputln::ln_offset#0 -- pbuz1=pbuz2_plus_vwuz3
lda.z conio_cursor_text
clc
adc.z ln_offset
sta.z __1
lda.z conio_cursor_text+1
adc.z ln_offset+1
sta.z __1+1
// [43] (byte*) conio_cursor_text ← (byte*~) cputln::$1 -- pbuz1=pbuz2
lda.z __1
sta.z conio_cursor_text
lda.z __1+1
sta.z conio_cursor_text+1
// [44] (byte*~) cputln::$2 ← (byte*) conio_cursor_color + (word) cputln::ln_offset#0 -- pbuz1=pbuz2_plus_vwuz3
lda.z conio_cursor_color
clc
adc.z ln_offset
sta.z __2
lda.z conio_cursor_color+1
adc.z ln_offset+1
sta.z __2+1
// [45] (byte*) conio_cursor_color ← (byte*~) cputln::$2 -- pbuz1=pbuz2
lda.z __2
sta.z conio_cursor_color
lda.z __2+1
sta.z conio_cursor_color+1
// [46] (byte) conio_cursor_x ← (byte) 0 -- vbuz1=vbuc1
lda #0
sta.z conio_cursor_x
// [47] (byte) conio_cursor_y ← ++ (byte) conio_cursor_y -- vbuz1=_inc_vbuz1
inc.z conio_cursor_y
// [48] call cscroll
jsr cscroll
jmp __breturn
// cputln::@return
__breturn:
// [49] return
rts
}
// cscroll
// Scroll the entire screen if the cursor is beyond the last line
cscroll: {
.label __7 = $28
.label __8 = $2a
// [50] if((byte) conio_cursor_y!=(byte) $19) goto cscroll::@return -- vbuz1_neq_vbuc1_then_la1
lda #$19
cmp.z conio_cursor_y
bne __breturn
// [51] phi from cscroll to cscroll::@1 [phi:cscroll->cscroll::@1]
__b1_from_cscroll:
jmp __b1
// cscroll::@1
__b1:
// [52] call memcpy
// [73] phi from cscroll::@1 to memcpy [phi:cscroll::@1->memcpy]
memcpy_from___b1:
// [73] phi (void*) memcpy::destination#2 = (void*)(const nomodify byte*) CONIO_SCREEN_TEXT [phi:cscroll::@1->memcpy#0] -- pvoz1=pvoc1
lda #<CONIO_SCREEN_TEXT
sta.z memcpy.destination
lda #>CONIO_SCREEN_TEXT
sta.z memcpy.destination+1
// [73] phi (void*) memcpy::source#2 = (void*)(const nomodify byte*) CONIO_SCREEN_TEXT+(byte) $28 [phi:cscroll::@1->memcpy#1] -- pvoz1=pvoc1
lda #<CONIO_SCREEN_TEXT+$28
sta.z memcpy.source
lda #>CONIO_SCREEN_TEXT+$28
sta.z memcpy.source+1
jsr memcpy
// [53] phi from cscroll::@1 to cscroll::@2 [phi:cscroll::@1->cscroll::@2]
__b2_from___b1:
jmp __b2
// cscroll::@2
__b2:
// [54] call memcpy
// [73] phi from cscroll::@2 to memcpy [phi:cscroll::@2->memcpy]
memcpy_from___b2:
// [73] phi (void*) memcpy::destination#2 = (void*)(const nomodify byte*) CONIO_SCREEN_COLORS [phi:cscroll::@2->memcpy#0] -- pvoz1=pvoc1
lda #<CONIO_SCREEN_COLORS
sta.z memcpy.destination
lda #>CONIO_SCREEN_COLORS
sta.z memcpy.destination+1
// [73] phi (void*) memcpy::source#2 = (void*)(const nomodify byte*) CONIO_SCREEN_COLORS+(byte) $28 [phi:cscroll::@2->memcpy#1] -- pvoz1=pvoc1
lda #<CONIO_SCREEN_COLORS+$28
sta.z memcpy.source
lda #>CONIO_SCREEN_COLORS+$28
sta.z memcpy.source+1
jsr memcpy
// [55] phi from cscroll::@2 to cscroll::@3 [phi:cscroll::@2->cscroll::@3]
__b3_from___b2:
jmp __b3
// cscroll::@3
__b3:
// [56] call memset
// [65] phi from cscroll::@3 to memset [phi:cscroll::@3->memset]
memset_from___b3:
// [65] phi (byte) memset::c#4 = (byte) ' ' [phi:cscroll::@3->memset#0] -- vbuz1=vbuc1
lda #' '
sta.z memset.c
// [65] phi (void*) memset::str#3 = (void*)(const nomodify byte*) CONIO_SCREEN_TEXT+(word)(number) $19*(number) $28-(byte) $28 [phi:cscroll::@3->memset#1] -- pvoz1=pvoc1
lda #<CONIO_SCREEN_TEXT+$19*$28-$28
sta.z memset.str
lda #>CONIO_SCREEN_TEXT+$19*$28-$28
sta.z memset.str+1
jsr memset
// [57] phi from cscroll::@3 to cscroll::@4 [phi:cscroll::@3->cscroll::@4]
__b4_from___b3:
jmp __b4
// cscroll::@4
__b4:
// [58] call memset
// [65] phi from cscroll::@4 to memset [phi:cscroll::@4->memset]
memset_from___b4:
// [65] phi (byte) memset::c#4 = (const nomodify byte) CONIO_TEXTCOLOR_DEFAULT [phi:cscroll::@4->memset#0] -- vbuz1=vbuc1
lda #CONIO_TEXTCOLOR_DEFAULT
sta.z memset.c
// [65] phi (void*) memset::str#3 = (void*)(const nomodify byte*) CONIO_SCREEN_COLORS+(word)(number) $19*(number) $28-(byte) $28 [phi:cscroll::@4->memset#1] -- pvoz1=pvoc1
lda #<CONIO_SCREEN_COLORS+$19*$28-$28
sta.z memset.str
lda #>CONIO_SCREEN_COLORS+$19*$28-$28
sta.z memset.str+1
jsr memset
jmp __b5
// cscroll::@5
__b5:
// [59] (byte*~) cscroll::$7 ← (byte*) conio_cursor_text - (byte) $28 -- pbuz1=pbuz2_minus_vwuc1
lda.z conio_cursor_text
sec
sbc #<$28
sta.z __7
lda.z conio_cursor_text+1
sbc #>$28
sta.z __7+1
// [60] (byte*) conio_cursor_text ← (byte*~) cscroll::$7 -- pbuz1=pbuz2
lda.z __7
sta.z conio_cursor_text
lda.z __7+1
sta.z conio_cursor_text+1
// [61] (byte*~) cscroll::$8 ← (byte*) conio_cursor_color - (byte) $28 -- pbuz1=pbuz2_minus_vwuc1
lda.z conio_cursor_color
sec
sbc #<$28
sta.z __8
lda.z conio_cursor_color+1
sbc #>$28
sta.z __8+1
// [62] (byte*) conio_cursor_color ← (byte*~) cscroll::$8 -- pbuz1=pbuz2
lda.z __8
sta.z conio_cursor_color
lda.z __8+1
sta.z conio_cursor_color+1
// [63] (byte) conio_cursor_y ← -- (byte) conio_cursor_y -- vbuz1=_dec_vbuz1
dec.z conio_cursor_y
jmp __breturn
// cscroll::@return
__breturn:
// [64] return
rts
}
// memset
// Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str.
// memset(void* zp(5) str, byte zp(7) c)
memset: {
.label end = $2c
.label dst = 8
.label str = 5
.label c = 7
jmp __b1
// memset::@1
__b1:
// [66] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (byte) $28 -- pbuz1=pbuz2_plus_vbuc1
lda #$28
clc
adc.z str
sta.z end
lda #0
adc.z str+1
sta.z end+1
// [67] (byte*) memset::dst#4 ← (byte*)(void*) memset::str#3 -- pbuz1=pbuz2
lda.z str
sta.z dst
lda.z str+1
sta.z dst+1
// [68] phi from memset::@1 memset::@3 to memset::@2 [phi:memset::@1/memset::@3->memset::@2]
__b2_from___b1:
__b2_from___b3:
// [68] phi (byte*) memset::dst#2 = (byte*) memset::dst#4 [phi:memset::@1/memset::@3->memset::@2#0] -- register_copy
jmp __b2
// memset::@2
__b2:
// [69] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@3 -- pbuz1_neq_pbuz2_then_la1
lda.z dst+1
cmp.z end+1
bne __b3
lda.z dst
cmp.z end
bne __b3
jmp __breturn
// memset::@return
__breturn:
// [70] return
rts
// memset::@3
__b3:
// [71] *((byte*) memset::dst#2) ← (byte) memset::c#4 -- _deref_pbuz1=vbuz2
lda.z c
ldy #0
sta (dst),y
// [72] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 -- pbuz1=_inc_pbuz1
inc.z dst
bne !+
inc.z dst+1
!:
jmp __b2_from___b3
}
// memcpy
// 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($c) destination, void* zp($a) source)
memcpy: {
.label src_end = $2e
.label dst = $10
.label src = $e
.label source = $a
.label destination = $c
// [74] (byte*) memcpy::src_end#0 ← (byte*)(void*) memcpy::source#2 + (word)(number) $19*(number) $28-(number) $28 -- pbuz1=pbuz2_plus_vwuc1
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
// [75] (byte*) memcpy::src#4 ← (byte*)(void*) memcpy::source#2 -- pbuz1=pbuz2
lda.z source
sta.z src
lda.z source+1
sta.z src+1
// [76] (byte*) memcpy::dst#4 ← (byte*)(void*) memcpy::destination#2 -- pbuz1=pbuz2
lda.z destination
sta.z dst
lda.z destination+1
sta.z dst+1
// [77] phi from memcpy memcpy::@2 to memcpy::@1 [phi:memcpy/memcpy::@2->memcpy::@1]
__b1_from_memcpy:
__b1_from___b2:
// [77] phi (byte*) memcpy::dst#2 = (byte*) memcpy::dst#4 [phi:memcpy/memcpy::@2->memcpy::@1#0] -- register_copy
// [77] phi (byte*) memcpy::src#2 = (byte*) memcpy::src#4 [phi:memcpy/memcpy::@2->memcpy::@1#1] -- register_copy
jmp __b1
// memcpy::@1
__b1:
// [78] if((byte*) memcpy::src#2!=(byte*) memcpy::src_end#0) goto memcpy::@2 -- pbuz1_neq_pbuz2_then_la1
lda.z src+1
cmp.z src_end+1
bne __b2
lda.z src
cmp.z src_end
bne __b2
jmp __breturn
// memcpy::@return
__breturn:
// [79] return
rts
// memcpy::@2
__b2:
// [80] *((byte*) memcpy::dst#2) ← *((byte*) memcpy::src#2) -- _deref_pbuz1=_deref_pbuz2
ldy #0
lda (src),y
ldy #0
sta (dst),y
// [81] (byte*) memcpy::dst#1 ← ++ (byte*) memcpy::dst#2 -- pbuz1=_inc_pbuz1
inc.z dst
bne !+
inc.z dst+1
!:
// [82] (byte*) memcpy::src#1 ← ++ (byte*) memcpy::src#2 -- pbuz1=_inc_pbuz1
inc.z src
bne !+
inc.z src+1
!:
jmp __b1_from___b2
}
// toupper
// Convert lowercase alphabet to uppercase
// Returns uppercase equivalent to c, if such value exists, else c remains unchanged
// toupper(byte zp($12) ch)
toupper: {
.label return = $12
.label ch = $12
.label return_1 = $21
// [83] if((byte) toupper::ch#0<(byte) 'a') goto toupper::@return -- vbuz1_lt_vbuc1_then_la1
lda.z ch
cmp #'a'
bcc __breturn_from_toupper
jmp __b2
// toupper::@2
__b2:
// [84] if((byte) toupper::ch#0<=(byte) 'z') goto toupper::@1 -- vbuz1_le_vbuc1_then_la1
lda #'z'
cmp.z ch
bcs __b1
// [86] phi from toupper toupper::@1 toupper::@2 to toupper::@return [phi:toupper/toupper::@1/toupper::@2->toupper::@return]
__breturn_from_toupper:
__breturn_from___b1:
__breturn_from___b2:
// [86] phi (byte) toupper::return#2 = (byte) toupper::ch#0 [phi:toupper/toupper::@1/toupper::@2->toupper::@return#0] -- register_copy
jmp __breturn
// toupper::@1
__b1:
// [85] (byte) toupper::return#0 ← (byte) toupper::ch#0 + (byte) 'A'-(byte) 'a' -- vbuz1=vbuz1_plus_vbuc1
lax.z return
axs #-['A'-'a']
stx.z return
jmp __breturn_from___b1
// toupper::@return
__breturn:
// [87] return
rts
}
// gotoxy
// Set the cursor to the specified position
// gotoxy(byte zp($13) y)
gotoxy: {
.const x = 0
.label __6 = $38
.label __7 = $3a
.label __8 = $30
.label offset = $36
.label y = $13
.label __9 = $32
.label __10 = $34
// [88] if((byte) gotoxy::y#2<(byte) $19+(byte) 1) goto gotoxy::@3 -- vbuz1_lt_vbuc1_then_la1
lda.z y
cmp #$19+1
bcc __b3_from_gotoxy
// [90] phi from gotoxy to gotoxy::@1 [phi:gotoxy->gotoxy::@1]
__b1_from_gotoxy:
// [90] phi (byte) gotoxy::y#4 = (byte) 0 [phi:gotoxy->gotoxy::@1#0] -- vbuz1=vbuc1
lda #0
sta.z y
jmp __b1
// [89] phi from gotoxy to gotoxy::@3 [phi:gotoxy->gotoxy::@3]
__b3_from_gotoxy:
jmp __b3
// gotoxy::@3
__b3:
// [90] phi from gotoxy::@3 to gotoxy::@1 [phi:gotoxy::@3->gotoxy::@1]
__b1_from___b3:
// [90] phi (byte) gotoxy::y#4 = (byte) gotoxy::y#2 [phi:gotoxy::@3->gotoxy::@1#0] -- register_copy
jmp __b1
// gotoxy::@1
__b1:
jmp __b2
// gotoxy::@2
__b2:
// [91] (byte) conio_cursor_x ← (const byte) gotoxy::x#2 -- vbuz1=vbuc1
lda #x
sta.z conio_cursor_x
// [92] (byte) conio_cursor_y ← (byte) gotoxy::y#4 -- vbuz1=vbuz2
lda.z y
sta.z conio_cursor_y
// [93] (word~) gotoxy::$8 ← (word)(byte) gotoxy::y#4 -- vwuz1=_word_vbuz2
lda.z y
sta.z __8
lda #0
sta.z __8+1
// [94] (word~) gotoxy::$9 ← (word~) gotoxy::$8 << (byte) 2 -- vwuz1=vwuz2_rol_2
lda.z __8
asl
sta.z __9
lda.z __8+1
rol
sta.z __9+1
asl.z __9
rol.z __9+1
// [95] (word~) gotoxy::$10 ← (word~) gotoxy::$9 + (word~) gotoxy::$8 -- vwuz1=vwuz2_plus_vwuz3
lda.z __9
clc
adc.z __8
sta.z __10
lda.z __9+1
adc.z __8+1
sta.z __10+1
// [96] (word) gotoxy::offset#0 ← (word~) gotoxy::$10 << (byte) 3 -- vwuz1=vwuz2_rol_3
lda.z __10
asl
sta.z offset
lda.z __10+1
rol
sta.z offset+1
asl.z offset
rol.z offset+1
asl.z offset
rol.z offset+1
// [97] (byte*~) gotoxy::$6 ← (const nomodify byte*) CONIO_SCREEN_TEXT + (word) gotoxy::offset#0 -- pbuz1=pbuc1_plus_vwuz2
lda.z offset
clc
adc #<CONIO_SCREEN_TEXT
sta.z __6
lda.z offset+1
adc #>CONIO_SCREEN_TEXT
sta.z __6+1
// [98] (byte*) conio_cursor_text ← (byte*~) gotoxy::$6 -- pbuz1=pbuz2
lda.z __6
sta.z conio_cursor_text
lda.z __6+1
sta.z conio_cursor_text+1
// [99] (byte*~) gotoxy::$7 ← (const nomodify byte*) CONIO_SCREEN_COLORS + (word) gotoxy::offset#0 -- pbuz1=pbuc1_plus_vwuz2
lda.z offset
clc
adc #<CONIO_SCREEN_COLORS
sta.z __7
lda.z offset+1
adc #>CONIO_SCREEN_COLORS
sta.z __7+1
// [100] (byte*) conio_cursor_color ← (byte*~) gotoxy::$7 -- pbuz1=pbuz2
lda.z __7
sta.z conio_cursor_color
lda.z __7+1
sta.z conio_cursor_color+1
jmp __breturn
// gotoxy::@return
__breturn:
// [101] return
rts
}
// clrscr
// clears the screen and moves the cursor to the upper left-hand corner of the screen.
clrscr: {
.label c = $19
.label line_text = $15
.label line_cols = $17
.label l = $14
// [103] phi from clrscr to clrscr::@1 [phi:clrscr->clrscr::@1]
__b1_from_clrscr:
// [103] phi (byte*) clrscr::line_cols#5 = (const nomodify byte*) CONIO_SCREEN_COLORS [phi:clrscr->clrscr::@1#0] -- pbuz1=pbuc1
lda #<CONIO_SCREEN_COLORS
sta.z line_cols
lda #>CONIO_SCREEN_COLORS
sta.z line_cols+1
// [103] phi (byte*) clrscr::line_text#5 = (const nomodify byte*) CONIO_SCREEN_TEXT [phi:clrscr->clrscr::@1#1] -- pbuz1=pbuc1
lda #<CONIO_SCREEN_TEXT
sta.z line_text
lda #>CONIO_SCREEN_TEXT
sta.z line_text+1
// [103] phi (byte) clrscr::l#2 = (byte) 0 [phi:clrscr->clrscr::@1#2] -- vbuz1=vbuc1
lda #0
sta.z l
jmp __b1
// clrscr::@1
__b1:
// [104] if((byte) clrscr::l#2<(byte) $19) goto clrscr::@3 -- vbuz1_lt_vbuc1_then_la1
lda.z l
cmp #$19
bcc __b3_from___b1
jmp __b2
// clrscr::@2
__b2:
// [105] (byte) conio_cursor_x ← (byte) 0 -- vbuz1=vbuc1
lda #0
sta.z conio_cursor_x
// [106] (byte) conio_cursor_y ← (byte) 0 -- vbuz1=vbuc1
lda #0
sta.z conio_cursor_y
// [107] (byte*) conio_cursor_text ← (const nomodify byte*) CONIO_SCREEN_TEXT -- pbuz1=pbuc1
lda #<CONIO_SCREEN_TEXT
sta.z conio_cursor_text
lda #>CONIO_SCREEN_TEXT
sta.z conio_cursor_text+1
// [108] (byte*) conio_cursor_color ← (const nomodify byte*) CONIO_SCREEN_COLORS -- pbuz1=pbuc1
lda #<CONIO_SCREEN_COLORS
sta.z conio_cursor_color
lda #>CONIO_SCREEN_COLORS
sta.z conio_cursor_color+1
jmp __breturn
// clrscr::@return
__breturn:
// [109] return
rts
// [110] phi from clrscr::@1 to clrscr::@3 [phi:clrscr::@1->clrscr::@3]
__b3_from___b1:
// [110] phi (byte) clrscr::c#2 = (byte) 0 [phi:clrscr::@1->clrscr::@3#0] -- vbuz1=vbuc1
lda #0
sta.z c
jmp __b3
// clrscr::@3
__b3:
// [111] if((byte) clrscr::c#2<(byte) $28) goto clrscr::@4 -- vbuz1_lt_vbuc1_then_la1
lda.z c
cmp #$28
bcc __b4
jmp __b5
// clrscr::@5
__b5:
// [112] (byte*) clrscr::line_text#1 ← (byte*) clrscr::line_text#5 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1
lda #$28
clc
adc.z line_text
sta.z line_text
bcc !+
inc.z line_text+1
!:
// [113] (byte*) clrscr::line_cols#1 ← (byte*) clrscr::line_cols#5 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1
lda #$28
clc
adc.z line_cols
sta.z line_cols
bcc !+
inc.z line_cols+1
!:
// [114] (byte) clrscr::l#1 ← ++ (byte) clrscr::l#2 -- vbuz1=_inc_vbuz1
inc.z l
// [103] phi from clrscr::@5 to clrscr::@1 [phi:clrscr::@5->clrscr::@1]
__b1_from___b5:
// [103] phi (byte*) clrscr::line_cols#5 = (byte*) clrscr::line_cols#1 [phi:clrscr::@5->clrscr::@1#0] -- register_copy
// [103] phi (byte*) clrscr::line_text#5 = (byte*) clrscr::line_text#1 [phi:clrscr::@5->clrscr::@1#1] -- register_copy
// [103] phi (byte) clrscr::l#2 = (byte) clrscr::l#1 [phi:clrscr::@5->clrscr::@1#2] -- register_copy
jmp __b1
// clrscr::@4
__b4:
// [115] *((byte*) clrscr::line_text#5 + (byte) clrscr::c#2) ← (byte) ' ' -- pbuz1_derefidx_vbuz2=vbuc1
lda #' '
ldy.z c
sta (line_text),y
// [116] *((byte*) clrscr::line_cols#5 + (byte) clrscr::c#2) ← (const nomodify byte) CONIO_TEXTCOLOR_DEFAULT -- pbuz1_derefidx_vbuz2=vbuc1
lda #CONIO_TEXTCOLOR_DEFAULT
ldy.z c
sta (line_cols),y
// [117] (byte) clrscr::c#1 ← ++ (byte) clrscr::c#2 -- vbuz1=_inc_vbuz1
inc.z c
// [110] phi from clrscr::@4 to clrscr::@3 [phi:clrscr::@4->clrscr::@3]
__b3_from___b4:
// [110] phi (byte) clrscr::c#2 = (byte) clrscr::c#1 [phi:clrscr::@4->clrscr::@3#0] -- register_copy
jmp __b3
}
// File Data
REGISTER UPLIFT POTENTIAL REGISTERS
Statement [1] (byte) conio_cursor_x ← (byte) 0 [ ] ( [ ] { } ) always clobbers reg byte a
Statement [2] (byte) conio_cursor_y ← (byte) 0 [ ] ( [ ] { } ) always clobbers reg byte a
Statement [3] (byte*) conio_cursor_text ← (const nomodify byte*) CONIO_SCREEN_TEXT [ ] ( [ ] { } ) always clobbers reg byte a
Statement [4] (byte*) conio_cursor_color ← (const nomodify byte*) CONIO_SCREEN_COLORS [ ] ( [ ] { } ) always clobbers reg byte a
Statement [8] *((byte*) 53272) ← (byte) $17 [ ] ( main:6 [ ] { } ) always clobbers reg byte a
Statement [29] *((byte*) conio_cursor_text) ← (byte) cputc::c#2 [ conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color ] ( main:6::cputc:12 [ main::c#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23 [ main::c1#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } ) always clobbers reg byte y
Removing always clobbered register reg byte y as potential for zp[1]:2 [ main::c#2 main::c#1 ]
Removing always clobbered register reg byte y as potential for zp[1]:3 [ main::c1#2 main::c1#1 ]
Statement [31] *((byte*) conio_cursor_color) ← (const nomodify byte) CONIO_TEXTCOLOR_DEFAULT [ conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color ] ( main:6::cputc:12 [ main::c#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23 [ main::c1#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } ) always clobbers reg byte a reg byte y
Removing always clobbered register reg byte a as potential for zp[1]:2 [ main::c#2 main::c#1 ]
Removing always clobbered register reg byte a as potential for zp[1]:3 [ main::c1#2 main::c1#1 ]
Statement [34] if((byte) conio_cursor_x!=(byte) $28) goto cputc::@return [ conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color ] ( main:6::cputc:12 [ main::c#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23 [ main::c1#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } ) always clobbers reg byte a
Statement [35] (byte) conio_cursor_x ← (byte) 0 [ conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color ] ( main:6::cputc:12 [ main::c#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23 [ main::c1#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } ) always clobbers reg byte a
Statement [41] (word) cputln::ln_offset#0 ← (byte) $28 - (byte) conio_cursor_x [ conio_cursor_y conio_cursor_text conio_cursor_color cputln::ln_offset#0 ] ( main:6::cputc:12::cputln:40 [ main::c#2 conio_cursor_y conio_cursor_text conio_cursor_color cputln::ln_offset#0 ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23::cputln:40 [ main::c1#2 conio_cursor_y conio_cursor_text conio_cursor_color cputln::ln_offset#0 ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } ) always clobbers reg byte a
Statement [42] (byte*~) cputln::$1 ← (byte*) conio_cursor_text + (word) cputln::ln_offset#0 [ conio_cursor_y conio_cursor_color cputln::ln_offset#0 cputln::$1 ] ( main:6::cputc:12::cputln:40 [ main::c#2 conio_cursor_y conio_cursor_color cputln::ln_offset#0 cputln::$1 ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23::cputln:40 [ main::c1#2 conio_cursor_y conio_cursor_color cputln::ln_offset#0 cputln::$1 ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } ) always clobbers reg byte a
Statement [43] (byte*) conio_cursor_text ← (byte*~) cputln::$1 [ conio_cursor_y conio_cursor_text conio_cursor_color cputln::ln_offset#0 ] ( main:6::cputc:12::cputln:40 [ main::c#2 conio_cursor_y conio_cursor_text conio_cursor_color cputln::ln_offset#0 ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23::cputln:40 [ main::c1#2 conio_cursor_y conio_cursor_text conio_cursor_color cputln::ln_offset#0 ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } ) always clobbers reg byte a
Statement [44] (byte*~) cputln::$2 ← (byte*) conio_cursor_color + (word) cputln::ln_offset#0 [ conio_cursor_y conio_cursor_text cputln::$2 ] ( main:6::cputc:12::cputln:40 [ main::c#2 conio_cursor_y conio_cursor_text cputln::$2 ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23::cputln:40 [ main::c1#2 conio_cursor_y conio_cursor_text cputln::$2 ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } ) always clobbers reg byte a
Statement [45] (byte*) conio_cursor_color ← (byte*~) cputln::$2 [ conio_cursor_y conio_cursor_text conio_cursor_color ] ( main:6::cputc:12::cputln:40 [ main::c#2 conio_cursor_y conio_cursor_text conio_cursor_color ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23::cputln:40 [ main::c1#2 conio_cursor_y conio_cursor_text conio_cursor_color ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } ) always clobbers reg byte a
Statement [46] (byte) conio_cursor_x ← (byte) 0 [ conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color ] ( main:6::cputc:12::cputln:40 [ main::c#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23::cputln:40 [ main::c1#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } ) always clobbers reg byte a
Statement [50] if((byte) conio_cursor_y!=(byte) $19) goto cscroll::@return [ conio_cursor_y conio_cursor_text conio_cursor_color ] ( main:6::cputc:12::cscroll:37 [ main::c#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23::cscroll:37 [ main::c1#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } main:6::cputc:12::cputln:40::cscroll:48 [ main::c#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23::cputln:40::cscroll:48 [ main::c1#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } ) always clobbers reg byte a
Statement [59] (byte*~) cscroll::$7 ← (byte*) conio_cursor_text - (byte) $28 [ conio_cursor_y conio_cursor_color cscroll::$7 ] ( main:6::cputc:12::cscroll:37 [ main::c#2 conio_cursor_x conio_cursor_y conio_cursor_color cscroll::$7 ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23::cscroll:37 [ main::c1#2 conio_cursor_x conio_cursor_y conio_cursor_color cscroll::$7 ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } main:6::cputc:12::cputln:40::cscroll:48 [ main::c#2 conio_cursor_x conio_cursor_y conio_cursor_color cscroll::$7 ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23::cputln:40::cscroll:48 [ main::c1#2 conio_cursor_x conio_cursor_y conio_cursor_color cscroll::$7 ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } ) always clobbers reg byte a
Statement [60] (byte*) conio_cursor_text ← (byte*~) cscroll::$7 [ conio_cursor_y conio_cursor_text conio_cursor_color ] ( main:6::cputc:12::cscroll:37 [ main::c#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23::cscroll:37 [ main::c1#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } main:6::cputc:12::cputln:40::cscroll:48 [ main::c#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23::cputln:40::cscroll:48 [ main::c1#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } ) always clobbers reg byte a
Statement [61] (byte*~) cscroll::$8 ← (byte*) conio_cursor_color - (byte) $28 [ conio_cursor_y conio_cursor_text cscroll::$8 ] ( main:6::cputc:12::cscroll:37 [ main::c#2 conio_cursor_x conio_cursor_y conio_cursor_text cscroll::$8 ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23::cscroll:37 [ main::c1#2 conio_cursor_x conio_cursor_y conio_cursor_text cscroll::$8 ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } main:6::cputc:12::cputln:40::cscroll:48 [ main::c#2 conio_cursor_x conio_cursor_y conio_cursor_text cscroll::$8 ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23::cputln:40::cscroll:48 [ main::c1#2 conio_cursor_x conio_cursor_y conio_cursor_text cscroll::$8 ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } ) always clobbers reg byte a
Statement [62] (byte*) conio_cursor_color ← (byte*~) cscroll::$8 [ conio_cursor_y conio_cursor_text conio_cursor_color ] ( main:6::cputc:12::cscroll:37 [ main::c#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23::cscroll:37 [ main::c1#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } main:6::cputc:12::cputln:40::cscroll:48 [ main::c#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23::cputln:40::cscroll:48 [ main::c1#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } ) always clobbers reg byte a
Statement [66] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (byte) $28 [ memset::str#3 memset::c#4 memset::end#0 ] ( main:6::cputc:12::cscroll:37::memset:56 [ main::c#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memset::str#3 memset::c#4 memset::end#0 ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23::cscroll:37::memset:56 [ main::c1#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memset::str#3 memset::c#4 memset::end#0 ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } main:6::cputc:12::cputln:40::cscroll:48::memset:56 [ main::c#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memset::str#3 memset::c#4 memset::end#0 ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23::cputln:40::cscroll:48::memset:56 [ main::c1#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memset::str#3 memset::c#4 memset::end#0 ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } main:6::cputc:12::cscroll:37::memset:58 [ main::c#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memset::str#3 memset::c#4 memset::end#0 ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23::cscroll:37::memset:58 [ main::c1#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memset::str#3 memset::c#4 memset::end#0 ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } main:6::cputc:12::cputln:40::cscroll:48::memset:58 [ main::c#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memset::str#3 memset::c#4 memset::end#0 ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23::cputln:40::cscroll:48::memset:58 [ main::c1#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memset::str#3 memset::c#4 memset::end#0 ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } ) always clobbers reg byte a
Removing always clobbered register reg byte a as potential for zp[1]:7 [ memset::c#4 ]
Statement [67] (byte*) memset::dst#4 ← (byte*)(void*) memset::str#3 [ memset::c#4 memset::end#0 memset::dst#4 ] ( main:6::cputc:12::cscroll:37::memset:56 [ main::c#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memset::c#4 memset::end#0 memset::dst#4 ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23::cscroll:37::memset:56 [ main::c1#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memset::c#4 memset::end#0 memset::dst#4 ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } main:6::cputc:12::cputln:40::cscroll:48::memset:56 [ main::c#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memset::c#4 memset::end#0 memset::dst#4 ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23::cputln:40::cscroll:48::memset:56 [ main::c1#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memset::c#4 memset::end#0 memset::dst#4 ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } main:6::cputc:12::cscroll:37::memset:58 [ main::c#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memset::c#4 memset::end#0 memset::dst#4 ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23::cscroll:37::memset:58 [ main::c1#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memset::c#4 memset::end#0 memset::dst#4 ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } main:6::cputc:12::cputln:40::cscroll:48::memset:58 [ main::c#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memset::c#4 memset::end#0 memset::dst#4 ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23::cputln:40::cscroll:48::memset:58 [ main::c1#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memset::c#4 memset::end#0 memset::dst#4 ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } ) always clobbers reg byte a
Statement [69] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@3 [ memset::c#4 memset::end#0 memset::dst#2 ] ( main:6::cputc:12::cscroll:37::memset:56 [ main::c#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memset::c#4 memset::end#0 memset::dst#2 ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23::cscroll:37::memset:56 [ main::c1#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memset::c#4 memset::end#0 memset::dst#2 ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } main:6::cputc:12::cputln:40::cscroll:48::memset:56 [ main::c#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memset::c#4 memset::end#0 memset::dst#2 ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23::cputln:40::cscroll:48::memset:56 [ main::c1#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memset::c#4 memset::end#0 memset::dst#2 ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } main:6::cputc:12::cscroll:37::memset:58 [ main::c#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memset::c#4 memset::end#0 memset::dst#2 ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23::cscroll:37::memset:58 [ main::c1#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memset::c#4 memset::end#0 memset::dst#2 ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } main:6::cputc:12::cputln:40::cscroll:48::memset:58 [ main::c#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memset::c#4 memset::end#0 memset::dst#2 ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23::cputln:40::cscroll:48::memset:58 [ main::c1#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memset::c#4 memset::end#0 memset::dst#2 ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } ) always clobbers reg byte a
Statement [71] *((byte*) memset::dst#2) ← (byte) memset::c#4 [ memset::c#4 memset::end#0 memset::dst#2 ] ( main:6::cputc:12::cscroll:37::memset:56 [ main::c#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memset::c#4 memset::end#0 memset::dst#2 ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23::cscroll:37::memset:56 [ main::c1#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memset::c#4 memset::end#0 memset::dst#2 ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } main:6::cputc:12::cputln:40::cscroll:48::memset:56 [ main::c#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memset::c#4 memset::end#0 memset::dst#2 ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23::cputln:40::cscroll:48::memset:56 [ main::c1#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memset::c#4 memset::end#0 memset::dst#2 ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } main:6::cputc:12::cscroll:37::memset:58 [ main::c#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memset::c#4 memset::end#0 memset::dst#2 ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23::cscroll:37::memset:58 [ main::c1#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memset::c#4 memset::end#0 memset::dst#2 ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } main:6::cputc:12::cputln:40::cscroll:48::memset:58 [ main::c#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memset::c#4 memset::end#0 memset::dst#2 ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23::cputln:40::cscroll:48::memset:58 [ main::c1#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memset::c#4 memset::end#0 memset::dst#2 ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } ) always clobbers reg byte a reg byte y
Removing always clobbered register reg byte y as potential for zp[1]:7 [ memset::c#4 ]
Statement [74] (byte*) memcpy::src_end#0 ← (byte*)(void*) memcpy::source#2 + (word)(number) $19*(number) $28-(number) $28 [ memcpy::source#2 memcpy::destination#2 memcpy::src_end#0 ] ( main:6::cputc:12::cscroll:37::memcpy:52 [ main::c#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memcpy::source#2 memcpy::destination#2 memcpy::src_end#0 ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23::cscroll:37::memcpy:52 [ main::c1#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memcpy::source#2 memcpy::destination#2 memcpy::src_end#0 ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } main:6::cputc:12::cputln:40::cscroll:48::memcpy:52 [ main::c#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memcpy::source#2 memcpy::destination#2 memcpy::src_end#0 ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23::cputln:40::cscroll:48::memcpy:52 [ main::c1#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memcpy::source#2 memcpy::destination#2 memcpy::src_end#0 ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } main:6::cputc:12::cscroll:37::memcpy:54 [ main::c#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memcpy::source#2 memcpy::destination#2 memcpy::src_end#0 ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23::cscroll:37::memcpy:54 [ main::c1#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memcpy::source#2 memcpy::destination#2 memcpy::src_end#0 ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } main:6::cputc:12::cputln:40::cscroll:48::memcpy:54 [ main::c#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memcpy::source#2 memcpy::destination#2 memcpy::src_end#0 ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23::cputln:40::cscroll:48::memcpy:54 [ main::c1#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memcpy::source#2 memcpy::destination#2 memcpy::src_end#0 ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } ) always clobbers reg byte a
Statement [75] (byte*) memcpy::src#4 ← (byte*)(void*) memcpy::source#2 [ memcpy::destination#2 memcpy::src_end#0 memcpy::src#4 ] ( main:6::cputc:12::cscroll:37::memcpy:52 [ main::c#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memcpy::destination#2 memcpy::src_end#0 memcpy::src#4 ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23::cscroll:37::memcpy:52 [ main::c1#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memcpy::destination#2 memcpy::src_end#0 memcpy::src#4 ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } main:6::cputc:12::cputln:40::cscroll:48::memcpy:52 [ main::c#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memcpy::destination#2 memcpy::src_end#0 memcpy::src#4 ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23::cputln:40::cscroll:48::memcpy:52 [ main::c1#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memcpy::destination#2 memcpy::src_end#0 memcpy::src#4 ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } main:6::cputc:12::cscroll:37::memcpy:54 [ main::c#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memcpy::destination#2 memcpy::src_end#0 memcpy::src#4 ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23::cscroll:37::memcpy:54 [ main::c1#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memcpy::destination#2 memcpy::src_end#0 memcpy::src#4 ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } main:6::cputc:12::cputln:40::cscroll:48::memcpy:54 [ main::c#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memcpy::destination#2 memcpy::src_end#0 memcpy::src#4 ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23::cputln:40::cscroll:48::memcpy:54 [ main::c1#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memcpy::destination#2 memcpy::src_end#0 memcpy::src#4 ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } ) always clobbers reg byte a
Statement [76] (byte*) memcpy::dst#4 ← (byte*)(void*) memcpy::destination#2 [ memcpy::src_end#0 memcpy::src#4 memcpy::dst#4 ] ( main:6::cputc:12::cscroll:37::memcpy:52 [ main::c#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memcpy::src_end#0 memcpy::src#4 memcpy::dst#4 ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23::cscroll:37::memcpy:52 [ main::c1#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memcpy::src_end#0 memcpy::src#4 memcpy::dst#4 ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } main:6::cputc:12::cputln:40::cscroll:48::memcpy:52 [ main::c#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memcpy::src_end#0 memcpy::src#4 memcpy::dst#4 ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23::cputln:40::cscroll:48::memcpy:52 [ main::c1#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memcpy::src_end#0 memcpy::src#4 memcpy::dst#4 ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } main:6::cputc:12::cscroll:37::memcpy:54 [ main::c#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memcpy::src_end#0 memcpy::src#4 memcpy::dst#4 ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23::cscroll:37::memcpy:54 [ main::c1#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memcpy::src_end#0 memcpy::src#4 memcpy::dst#4 ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } main:6::cputc:12::cputln:40::cscroll:48::memcpy:54 [ main::c#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memcpy::src_end#0 memcpy::src#4 memcpy::dst#4 ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23::cputln:40::cscroll:48::memcpy:54 [ main::c1#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memcpy::src_end#0 memcpy::src#4 memcpy::dst#4 ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } ) always clobbers reg byte a
Statement [78] if((byte*) memcpy::src#2!=(byte*) memcpy::src_end#0) goto memcpy::@2 [ memcpy::src_end#0 memcpy::src#2 memcpy::dst#2 ] ( main:6::cputc:12::cscroll:37::memcpy:52 [ main::c#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memcpy::src_end#0 memcpy::src#2 memcpy::dst#2 ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23::cscroll:37::memcpy:52 [ main::c1#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memcpy::src_end#0 memcpy::src#2 memcpy::dst#2 ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } main:6::cputc:12::cputln:40::cscroll:48::memcpy:52 [ main::c#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memcpy::src_end#0 memcpy::src#2 memcpy::dst#2 ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23::cputln:40::cscroll:48::memcpy:52 [ main::c1#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memcpy::src_end#0 memcpy::src#2 memcpy::dst#2 ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } main:6::cputc:12::cscroll:37::memcpy:54 [ main::c#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memcpy::src_end#0 memcpy::src#2 memcpy::dst#2 ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23::cscroll:37::memcpy:54 [ main::c1#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memcpy::src_end#0 memcpy::src#2 memcpy::dst#2 ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } main:6::cputc:12::cputln:40::cscroll:48::memcpy:54 [ main::c#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memcpy::src_end#0 memcpy::src#2 memcpy::dst#2 ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23::cputln:40::cscroll:48::memcpy:54 [ main::c1#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memcpy::src_end#0 memcpy::src#2 memcpy::dst#2 ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } ) always clobbers reg byte a
Statement [80] *((byte*) memcpy::dst#2) ← *((byte*) memcpy::src#2) [ memcpy::src_end#0 memcpy::src#2 memcpy::dst#2 ] ( main:6::cputc:12::cscroll:37::memcpy:52 [ main::c#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memcpy::src_end#0 memcpy::src#2 memcpy::dst#2 ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23::cscroll:37::memcpy:52 [ main::c1#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memcpy::src_end#0 memcpy::src#2 memcpy::dst#2 ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } main:6::cputc:12::cputln:40::cscroll:48::memcpy:52 [ main::c#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memcpy::src_end#0 memcpy::src#2 memcpy::dst#2 ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23::cputln:40::cscroll:48::memcpy:52 [ main::c1#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memcpy::src_end#0 memcpy::src#2 memcpy::dst#2 ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } main:6::cputc:12::cscroll:37::memcpy:54 [ main::c#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memcpy::src_end#0 memcpy::src#2 memcpy::dst#2 ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23::cscroll:37::memcpy:54 [ main::c1#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memcpy::src_end#0 memcpy::src#2 memcpy::dst#2 ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } main:6::cputc:12::cputln:40::cscroll:48::memcpy:54 [ main::c#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memcpy::src_end#0 memcpy::src#2 memcpy::dst#2 ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23::cputln:40::cscroll:48::memcpy:54 [ main::c1#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memcpy::src_end#0 memcpy::src#2 memcpy::dst#2 ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } ) always clobbers reg byte a reg byte y
Statement [85] (byte) toupper::return#0 ← (byte) toupper::ch#0 + (byte) 'A'-(byte) 'a' [ toupper::return#0 ] ( main:6::toupper:20 [ conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color main::c1#2 toupper::return#0 ] { { toupper::ch#0 = main::c1#2 } { toupper::return#2 = toupper::return#3 } } ) always clobbers reg byte a
Statement [91] (byte) conio_cursor_x ← (const byte) gotoxy::x#2 [ conio_cursor_x gotoxy::y#4 ] ( main:6::gotoxy:17 [ conio_cursor_x gotoxy::y#4 ] { } ) always clobbers reg byte a
Removing always clobbered register reg byte a as potential for zp[1]:19 [ gotoxy::y#4 gotoxy::y#2 ]
Statement [93] (word~) gotoxy::$8 ← (word)(byte) gotoxy::y#4 [ conio_cursor_x conio_cursor_y gotoxy::$8 ] ( main:6::gotoxy:17 [ conio_cursor_x conio_cursor_y gotoxy::$8 ] { } ) always clobbers reg byte a
Statement [94] (word~) gotoxy::$9 ← (word~) gotoxy::$8 << (byte) 2 [ conio_cursor_x conio_cursor_y gotoxy::$8 gotoxy::$9 ] ( main:6::gotoxy:17 [ conio_cursor_x conio_cursor_y gotoxy::$8 gotoxy::$9 ] { } ) always clobbers reg byte a
Statement [95] (word~) gotoxy::$10 ← (word~) gotoxy::$9 + (word~) gotoxy::$8 [ conio_cursor_x conio_cursor_y gotoxy::$10 ] ( main:6::gotoxy:17 [ conio_cursor_x conio_cursor_y gotoxy::$10 ] { } ) always clobbers reg byte a
Statement [96] (word) gotoxy::offset#0 ← (word~) gotoxy::$10 << (byte) 3 [ conio_cursor_x conio_cursor_y gotoxy::offset#0 ] ( main:6::gotoxy:17 [ conio_cursor_x conio_cursor_y gotoxy::offset#0 ] { } ) always clobbers reg byte a
Statement [97] (byte*~) gotoxy::$6 ← (const nomodify byte*) CONIO_SCREEN_TEXT + (word) gotoxy::offset#0 [ conio_cursor_x conio_cursor_y gotoxy::offset#0 gotoxy::$6 ] ( main:6::gotoxy:17 [ conio_cursor_x conio_cursor_y gotoxy::offset#0 gotoxy::$6 ] { } ) always clobbers reg byte a
Statement [98] (byte*) conio_cursor_text ← (byte*~) gotoxy::$6 [ conio_cursor_x conio_cursor_y conio_cursor_text gotoxy::offset#0 ] ( main:6::gotoxy:17 [ conio_cursor_x conio_cursor_y conio_cursor_text gotoxy::offset#0 ] { } ) always clobbers reg byte a
Statement [99] (byte*~) gotoxy::$7 ← (const nomodify byte*) CONIO_SCREEN_COLORS + (word) gotoxy::offset#0 [ conio_cursor_x conio_cursor_y conio_cursor_text gotoxy::$7 ] ( main:6::gotoxy:17 [ conio_cursor_x conio_cursor_y conio_cursor_text gotoxy::$7 ] { } ) always clobbers reg byte a
Statement [100] (byte*) conio_cursor_color ← (byte*~) gotoxy::$7 [ conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color ] ( main:6::gotoxy:17 [ conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color ] { } ) always clobbers reg byte a
Statement [105] (byte) conio_cursor_x ← (byte) 0 [ conio_cursor_x ] ( main:6::clrscr:9 [ conio_cursor_x ] { } ) always clobbers reg byte a
Statement [106] (byte) conio_cursor_y ← (byte) 0 [ conio_cursor_x conio_cursor_y ] ( main:6::clrscr:9 [ conio_cursor_x conio_cursor_y ] { } ) always clobbers reg byte a
Statement [107] (byte*) conio_cursor_text ← (const nomodify byte*) CONIO_SCREEN_TEXT [ conio_cursor_x conio_cursor_y conio_cursor_text ] ( main:6::clrscr:9 [ conio_cursor_x conio_cursor_y conio_cursor_text ] { } ) always clobbers reg byte a
Statement [108] (byte*) conio_cursor_color ← (const nomodify byte*) CONIO_SCREEN_COLORS [ conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color ] ( main:6::clrscr:9 [ conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color ] { } ) always clobbers reg byte a
Statement [112] (byte*) clrscr::line_text#1 ← (byte*) clrscr::line_text#5 + (byte) $28 [ clrscr::l#2 clrscr::line_cols#5 clrscr::line_text#1 ] ( main:6::clrscr:9 [ clrscr::l#2 clrscr::line_cols#5 clrscr::line_text#1 ] { } ) always clobbers reg byte a
Removing always clobbered register reg byte a as potential for zp[1]:20 [ clrscr::l#2 clrscr::l#1 ]
Statement [113] (byte*) clrscr::line_cols#1 ← (byte*) clrscr::line_cols#5 + (byte) $28 [ clrscr::l#2 clrscr::line_text#1 clrscr::line_cols#1 ] ( main:6::clrscr:9 [ clrscr::l#2 clrscr::line_text#1 clrscr::line_cols#1 ] { } ) always clobbers reg byte a
Statement [115] *((byte*) clrscr::line_text#5 + (byte) clrscr::c#2) ← (byte) ' ' [ clrscr::l#2 clrscr::line_text#5 clrscr::line_cols#5 clrscr::c#2 ] ( main:6::clrscr:9 [ clrscr::l#2 clrscr::line_text#5 clrscr::line_cols#5 clrscr::c#2 ] { } ) always clobbers reg byte a
Removing always clobbered register reg byte a as potential for zp[1]:25 [ clrscr::c#2 clrscr::c#1 ]
Statement [116] *((byte*) clrscr::line_cols#5 + (byte) clrscr::c#2) ← (const nomodify byte) CONIO_TEXTCOLOR_DEFAULT [ clrscr::l#2 clrscr::line_text#5 clrscr::line_cols#5 clrscr::c#2 ] ( main:6::clrscr:9 [ clrscr::l#2 clrscr::line_text#5 clrscr::line_cols#5 clrscr::c#2 ] { } ) always clobbers reg byte a
Statement [1] (byte) conio_cursor_x ← (byte) 0 [ ] ( [ ] { } ) always clobbers reg byte a
Statement [2] (byte) conio_cursor_y ← (byte) 0 [ ] ( [ ] { } ) always clobbers reg byte a
Statement [3] (byte*) conio_cursor_text ← (const nomodify byte*) CONIO_SCREEN_TEXT [ ] ( [ ] { } ) always clobbers reg byte a
Statement [4] (byte*) conio_cursor_color ← (const nomodify byte*) CONIO_SCREEN_COLORS [ ] ( [ ] { } ) always clobbers reg byte a
Statement [8] *((byte*) 53272) ← (byte) $17 [ ] ( main:6 [ ] { } ) always clobbers reg byte a
Statement [29] *((byte*) conio_cursor_text) ← (byte) cputc::c#2 [ conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color ] ( main:6::cputc:12 [ main::c#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23 [ main::c1#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } ) always clobbers reg byte y
Statement [31] *((byte*) conio_cursor_color) ← (const nomodify byte) CONIO_TEXTCOLOR_DEFAULT [ conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color ] ( main:6::cputc:12 [ main::c#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23 [ main::c1#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } ) always clobbers reg byte a reg byte y
Statement [34] if((byte) conio_cursor_x!=(byte) $28) goto cputc::@return [ conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color ] ( main:6::cputc:12 [ main::c#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23 [ main::c1#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } ) always clobbers reg byte a
Statement [35] (byte) conio_cursor_x ← (byte) 0 [ conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color ] ( main:6::cputc:12 [ main::c#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23 [ main::c1#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } ) always clobbers reg byte a
Statement [41] (word) cputln::ln_offset#0 ← (byte) $28 - (byte) conio_cursor_x [ conio_cursor_y conio_cursor_text conio_cursor_color cputln::ln_offset#0 ] ( main:6::cputc:12::cputln:40 [ main::c#2 conio_cursor_y conio_cursor_text conio_cursor_color cputln::ln_offset#0 ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23::cputln:40 [ main::c1#2 conio_cursor_y conio_cursor_text conio_cursor_color cputln::ln_offset#0 ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } ) always clobbers reg byte a
Statement [42] (byte*~) cputln::$1 ← (byte*) conio_cursor_text + (word) cputln::ln_offset#0 [ conio_cursor_y conio_cursor_color cputln::ln_offset#0 cputln::$1 ] ( main:6::cputc:12::cputln:40 [ main::c#2 conio_cursor_y conio_cursor_color cputln::ln_offset#0 cputln::$1 ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23::cputln:40 [ main::c1#2 conio_cursor_y conio_cursor_color cputln::ln_offset#0 cputln::$1 ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } ) always clobbers reg byte a
Statement [43] (byte*) conio_cursor_text ← (byte*~) cputln::$1 [ conio_cursor_y conio_cursor_text conio_cursor_color cputln::ln_offset#0 ] ( main:6::cputc:12::cputln:40 [ main::c#2 conio_cursor_y conio_cursor_text conio_cursor_color cputln::ln_offset#0 ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23::cputln:40 [ main::c1#2 conio_cursor_y conio_cursor_text conio_cursor_color cputln::ln_offset#0 ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } ) always clobbers reg byte a
Statement [44] (byte*~) cputln::$2 ← (byte*) conio_cursor_color + (word) cputln::ln_offset#0 [ conio_cursor_y conio_cursor_text cputln::$2 ] ( main:6::cputc:12::cputln:40 [ main::c#2 conio_cursor_y conio_cursor_text cputln::$2 ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23::cputln:40 [ main::c1#2 conio_cursor_y conio_cursor_text cputln::$2 ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } ) always clobbers reg byte a
Statement [45] (byte*) conio_cursor_color ← (byte*~) cputln::$2 [ conio_cursor_y conio_cursor_text conio_cursor_color ] ( main:6::cputc:12::cputln:40 [ main::c#2 conio_cursor_y conio_cursor_text conio_cursor_color ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23::cputln:40 [ main::c1#2 conio_cursor_y conio_cursor_text conio_cursor_color ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } ) always clobbers reg byte a
Statement [46] (byte) conio_cursor_x ← (byte) 0 [ conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color ] ( main:6::cputc:12::cputln:40 [ main::c#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23::cputln:40 [ main::c1#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } ) always clobbers reg byte a
Statement [50] if((byte) conio_cursor_y!=(byte) $19) goto cscroll::@return [ conio_cursor_y conio_cursor_text conio_cursor_color ] ( main:6::cputc:12::cscroll:37 [ main::c#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23::cscroll:37 [ main::c1#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } main:6::cputc:12::cputln:40::cscroll:48 [ main::c#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23::cputln:40::cscroll:48 [ main::c1#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } ) always clobbers reg byte a
Statement [59] (byte*~) cscroll::$7 ← (byte*) conio_cursor_text - (byte) $28 [ conio_cursor_y conio_cursor_color cscroll::$7 ] ( main:6::cputc:12::cscroll:37 [ main::c#2 conio_cursor_x conio_cursor_y conio_cursor_color cscroll::$7 ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23::cscroll:37 [ main::c1#2 conio_cursor_x conio_cursor_y conio_cursor_color cscroll::$7 ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } main:6::cputc:12::cputln:40::cscroll:48 [ main::c#2 conio_cursor_x conio_cursor_y conio_cursor_color cscroll::$7 ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23::cputln:40::cscroll:48 [ main::c1#2 conio_cursor_x conio_cursor_y conio_cursor_color cscroll::$7 ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } ) always clobbers reg byte a
Statement [60] (byte*) conio_cursor_text ← (byte*~) cscroll::$7 [ conio_cursor_y conio_cursor_text conio_cursor_color ] ( main:6::cputc:12::cscroll:37 [ main::c#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23::cscroll:37 [ main::c1#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } main:6::cputc:12::cputln:40::cscroll:48 [ main::c#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23::cputln:40::cscroll:48 [ main::c1#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } ) always clobbers reg byte a
Statement [61] (byte*~) cscroll::$8 ← (byte*) conio_cursor_color - (byte) $28 [ conio_cursor_y conio_cursor_text cscroll::$8 ] ( main:6::cputc:12::cscroll:37 [ main::c#2 conio_cursor_x conio_cursor_y conio_cursor_text cscroll::$8 ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23::cscroll:37 [ main::c1#2 conio_cursor_x conio_cursor_y conio_cursor_text cscroll::$8 ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } main:6::cputc:12::cputln:40::cscroll:48 [ main::c#2 conio_cursor_x conio_cursor_y conio_cursor_text cscroll::$8 ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23::cputln:40::cscroll:48 [ main::c1#2 conio_cursor_x conio_cursor_y conio_cursor_text cscroll::$8 ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } ) always clobbers reg byte a
Statement [62] (byte*) conio_cursor_color ← (byte*~) cscroll::$8 [ conio_cursor_y conio_cursor_text conio_cursor_color ] ( main:6::cputc:12::cscroll:37 [ main::c#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23::cscroll:37 [ main::c1#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } main:6::cputc:12::cputln:40::cscroll:48 [ main::c#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23::cputln:40::cscroll:48 [ main::c1#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } ) always clobbers reg byte a
Statement [66] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (byte) $28 [ memset::str#3 memset::c#4 memset::end#0 ] ( main:6::cputc:12::cscroll:37::memset:56 [ main::c#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memset::str#3 memset::c#4 memset::end#0 ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23::cscroll:37::memset:56 [ main::c1#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memset::str#3 memset::c#4 memset::end#0 ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } main:6::cputc:12::cputln:40::cscroll:48::memset:56 [ main::c#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memset::str#3 memset::c#4 memset::end#0 ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23::cputln:40::cscroll:48::memset:56 [ main::c1#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memset::str#3 memset::c#4 memset::end#0 ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } main:6::cputc:12::cscroll:37::memset:58 [ main::c#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memset::str#3 memset::c#4 memset::end#0 ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23::cscroll:37::memset:58 [ main::c1#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memset::str#3 memset::c#4 memset::end#0 ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } main:6::cputc:12::cputln:40::cscroll:48::memset:58 [ main::c#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memset::str#3 memset::c#4 memset::end#0 ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23::cputln:40::cscroll:48::memset:58 [ main::c1#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memset::str#3 memset::c#4 memset::end#0 ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } ) always clobbers reg byte a
Statement [67] (byte*) memset::dst#4 ← (byte*)(void*) memset::str#3 [ memset::c#4 memset::end#0 memset::dst#4 ] ( main:6::cputc:12::cscroll:37::memset:56 [ main::c#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memset::c#4 memset::end#0 memset::dst#4 ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23::cscroll:37::memset:56 [ main::c1#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memset::c#4 memset::end#0 memset::dst#4 ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } main:6::cputc:12::cputln:40::cscroll:48::memset:56 [ main::c#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memset::c#4 memset::end#0 memset::dst#4 ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23::cputln:40::cscroll:48::memset:56 [ main::c1#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memset::c#4 memset::end#0 memset::dst#4 ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } main:6::cputc:12::cscroll:37::memset:58 [ main::c#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memset::c#4 memset::end#0 memset::dst#4 ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23::cscroll:37::memset:58 [ main::c1#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memset::c#4 memset::end#0 memset::dst#4 ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } main:6::cputc:12::cputln:40::cscroll:48::memset:58 [ main::c#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memset::c#4 memset::end#0 memset::dst#4 ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23::cputln:40::cscroll:48::memset:58 [ main::c1#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memset::c#4 memset::end#0 memset::dst#4 ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } ) always clobbers reg byte a
Statement [69] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@3 [ memset::c#4 memset::end#0 memset::dst#2 ] ( main:6::cputc:12::cscroll:37::memset:56 [ main::c#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memset::c#4 memset::end#0 memset::dst#2 ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23::cscroll:37::memset:56 [ main::c1#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memset::c#4 memset::end#0 memset::dst#2 ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } main:6::cputc:12::cputln:40::cscroll:48::memset:56 [ main::c#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memset::c#4 memset::end#0 memset::dst#2 ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23::cputln:40::cscroll:48::memset:56 [ main::c1#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memset::c#4 memset::end#0 memset::dst#2 ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } main:6::cputc:12::cscroll:37::memset:58 [ main::c#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memset::c#4 memset::end#0 memset::dst#2 ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23::cscroll:37::memset:58 [ main::c1#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memset::c#4 memset::end#0 memset::dst#2 ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } main:6::cputc:12::cputln:40::cscroll:48::memset:58 [ main::c#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memset::c#4 memset::end#0 memset::dst#2 ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23::cputln:40::cscroll:48::memset:58 [ main::c1#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memset::c#4 memset::end#0 memset::dst#2 ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } ) always clobbers reg byte a
Statement [71] *((byte*) memset::dst#2) ← (byte) memset::c#4 [ memset::c#4 memset::end#0 memset::dst#2 ] ( main:6::cputc:12::cscroll:37::memset:56 [ main::c#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memset::c#4 memset::end#0 memset::dst#2 ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23::cscroll:37::memset:56 [ main::c1#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memset::c#4 memset::end#0 memset::dst#2 ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } main:6::cputc:12::cputln:40::cscroll:48::memset:56 [ main::c#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memset::c#4 memset::end#0 memset::dst#2 ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23::cputln:40::cscroll:48::memset:56 [ main::c1#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memset::c#4 memset::end#0 memset::dst#2 ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } main:6::cputc:12::cscroll:37::memset:58 [ main::c#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memset::c#4 memset::end#0 memset::dst#2 ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23::cscroll:37::memset:58 [ main::c1#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memset::c#4 memset::end#0 memset::dst#2 ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } main:6::cputc:12::cputln:40::cscroll:48::memset:58 [ main::c#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memset::c#4 memset::end#0 memset::dst#2 ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23::cputln:40::cscroll:48::memset:58 [ main::c1#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memset::c#4 memset::end#0 memset::dst#2 ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } ) always clobbers reg byte a reg byte y
Statement [74] (byte*) memcpy::src_end#0 ← (byte*)(void*) memcpy::source#2 + (word)(number) $19*(number) $28-(number) $28 [ memcpy::source#2 memcpy::destination#2 memcpy::src_end#0 ] ( main:6::cputc:12::cscroll:37::memcpy:52 [ main::c#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memcpy::source#2 memcpy::destination#2 memcpy::src_end#0 ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23::cscroll:37::memcpy:52 [ main::c1#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memcpy::source#2 memcpy::destination#2 memcpy::src_end#0 ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } main:6::cputc:12::cputln:40::cscroll:48::memcpy:52 [ main::c#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memcpy::source#2 memcpy::destination#2 memcpy::src_end#0 ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23::cputln:40::cscroll:48::memcpy:52 [ main::c1#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memcpy::source#2 memcpy::destination#2 memcpy::src_end#0 ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } main:6::cputc:12::cscroll:37::memcpy:54 [ main::c#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memcpy::source#2 memcpy::destination#2 memcpy::src_end#0 ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23::cscroll:37::memcpy:54 [ main::c1#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memcpy::source#2 memcpy::destination#2 memcpy::src_end#0 ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } main:6::cputc:12::cputln:40::cscroll:48::memcpy:54 [ main::c#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memcpy::source#2 memcpy::destination#2 memcpy::src_end#0 ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23::cputln:40::cscroll:48::memcpy:54 [ main::c1#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memcpy::source#2 memcpy::destination#2 memcpy::src_end#0 ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } ) always clobbers reg byte a
Statement [75] (byte*) memcpy::src#4 ← (byte*)(void*) memcpy::source#2 [ memcpy::destination#2 memcpy::src_end#0 memcpy::src#4 ] ( main:6::cputc:12::cscroll:37::memcpy:52 [ main::c#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memcpy::destination#2 memcpy::src_end#0 memcpy::src#4 ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23::cscroll:37::memcpy:52 [ main::c1#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memcpy::destination#2 memcpy::src_end#0 memcpy::src#4 ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } main:6::cputc:12::cputln:40::cscroll:48::memcpy:52 [ main::c#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memcpy::destination#2 memcpy::src_end#0 memcpy::src#4 ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23::cputln:40::cscroll:48::memcpy:52 [ main::c1#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memcpy::destination#2 memcpy::src_end#0 memcpy::src#4 ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } main:6::cputc:12::cscroll:37::memcpy:54 [ main::c#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memcpy::destination#2 memcpy::src_end#0 memcpy::src#4 ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23::cscroll:37::memcpy:54 [ main::c1#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memcpy::destination#2 memcpy::src_end#0 memcpy::src#4 ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } main:6::cputc:12::cputln:40::cscroll:48::memcpy:54 [ main::c#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memcpy::destination#2 memcpy::src_end#0 memcpy::src#4 ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23::cputln:40::cscroll:48::memcpy:54 [ main::c1#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memcpy::destination#2 memcpy::src_end#0 memcpy::src#4 ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } ) always clobbers reg byte a
Statement [76] (byte*) memcpy::dst#4 ← (byte*)(void*) memcpy::destination#2 [ memcpy::src_end#0 memcpy::src#4 memcpy::dst#4 ] ( main:6::cputc:12::cscroll:37::memcpy:52 [ main::c#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memcpy::src_end#0 memcpy::src#4 memcpy::dst#4 ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23::cscroll:37::memcpy:52 [ main::c1#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memcpy::src_end#0 memcpy::src#4 memcpy::dst#4 ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } main:6::cputc:12::cputln:40::cscroll:48::memcpy:52 [ main::c#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memcpy::src_end#0 memcpy::src#4 memcpy::dst#4 ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23::cputln:40::cscroll:48::memcpy:52 [ main::c1#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memcpy::src_end#0 memcpy::src#4 memcpy::dst#4 ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } main:6::cputc:12::cscroll:37::memcpy:54 [ main::c#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memcpy::src_end#0 memcpy::src#4 memcpy::dst#4 ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23::cscroll:37::memcpy:54 [ main::c1#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memcpy::src_end#0 memcpy::src#4 memcpy::dst#4 ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } main:6::cputc:12::cputln:40::cscroll:48::memcpy:54 [ main::c#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memcpy::src_end#0 memcpy::src#4 memcpy::dst#4 ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23::cputln:40::cscroll:48::memcpy:54 [ main::c1#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memcpy::src_end#0 memcpy::src#4 memcpy::dst#4 ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } ) always clobbers reg byte a
Statement [78] if((byte*) memcpy::src#2!=(byte*) memcpy::src_end#0) goto memcpy::@2 [ memcpy::src_end#0 memcpy::src#2 memcpy::dst#2 ] ( main:6::cputc:12::cscroll:37::memcpy:52 [ main::c#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memcpy::src_end#0 memcpy::src#2 memcpy::dst#2 ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23::cscroll:37::memcpy:52 [ main::c1#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memcpy::src_end#0 memcpy::src#2 memcpy::dst#2 ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } main:6::cputc:12::cputln:40::cscroll:48::memcpy:52 [ main::c#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memcpy::src_end#0 memcpy::src#2 memcpy::dst#2 ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23::cputln:40::cscroll:48::memcpy:52 [ main::c1#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memcpy::src_end#0 memcpy::src#2 memcpy::dst#2 ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } main:6::cputc:12::cscroll:37::memcpy:54 [ main::c#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memcpy::src_end#0 memcpy::src#2 memcpy::dst#2 ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23::cscroll:37::memcpy:54 [ main::c1#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memcpy::src_end#0 memcpy::src#2 memcpy::dst#2 ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } main:6::cputc:12::cputln:40::cscroll:48::memcpy:54 [ main::c#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memcpy::src_end#0 memcpy::src#2 memcpy::dst#2 ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23::cputln:40::cscroll:48::memcpy:54 [ main::c1#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memcpy::src_end#0 memcpy::src#2 memcpy::dst#2 ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } ) always clobbers reg byte a
Statement [80] *((byte*) memcpy::dst#2) ← *((byte*) memcpy::src#2) [ memcpy::src_end#0 memcpy::src#2 memcpy::dst#2 ] ( main:6::cputc:12::cscroll:37::memcpy:52 [ main::c#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memcpy::src_end#0 memcpy::src#2 memcpy::dst#2 ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23::cscroll:37::memcpy:52 [ main::c1#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memcpy::src_end#0 memcpy::src#2 memcpy::dst#2 ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } main:6::cputc:12::cputln:40::cscroll:48::memcpy:52 [ main::c#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memcpy::src_end#0 memcpy::src#2 memcpy::dst#2 ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23::cputln:40::cscroll:48::memcpy:52 [ main::c1#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memcpy::src_end#0 memcpy::src#2 memcpy::dst#2 ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } main:6::cputc:12::cscroll:37::memcpy:54 [ main::c#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memcpy::src_end#0 memcpy::src#2 memcpy::dst#2 ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23::cscroll:37::memcpy:54 [ main::c1#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memcpy::src_end#0 memcpy::src#2 memcpy::dst#2 ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } main:6::cputc:12::cputln:40::cscroll:48::memcpy:54 [ main::c#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memcpy::src_end#0 memcpy::src#2 memcpy::dst#2 ] { { cputc::c#0 = cputc::c#2 main::c#2 } } main:6::cputc:23::cputln:40::cscroll:48::memcpy:54 [ main::c1#2 conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color memcpy::src_end#0 memcpy::src#2 memcpy::dst#2 ] { { cputc::c#1 = cputc::c#2 toupper::return#3 } } ) always clobbers reg byte a reg byte y
Statement [85] (byte) toupper::return#0 ← (byte) toupper::ch#0 + (byte) 'A'-(byte) 'a' [ toupper::return#0 ] ( main:6::toupper:20 [ conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color main::c1#2 toupper::return#0 ] { { toupper::ch#0 = main::c1#2 } { toupper::return#2 = toupper::return#3 } } ) always clobbers reg byte a
Statement [91] (byte) conio_cursor_x ← (const byte) gotoxy::x#2 [ conio_cursor_x gotoxy::y#4 ] ( main:6::gotoxy:17 [ conio_cursor_x gotoxy::y#4 ] { } ) always clobbers reg byte a
Statement [93] (word~) gotoxy::$8 ← (word)(byte) gotoxy::y#4 [ conio_cursor_x conio_cursor_y gotoxy::$8 ] ( main:6::gotoxy:17 [ conio_cursor_x conio_cursor_y gotoxy::$8 ] { } ) always clobbers reg byte a
Statement [94] (word~) gotoxy::$9 ← (word~) gotoxy::$8 << (byte) 2 [ conio_cursor_x conio_cursor_y gotoxy::$8 gotoxy::$9 ] ( main:6::gotoxy:17 [ conio_cursor_x conio_cursor_y gotoxy::$8 gotoxy::$9 ] { } ) always clobbers reg byte a
Statement [95] (word~) gotoxy::$10 ← (word~) gotoxy::$9 + (word~) gotoxy::$8 [ conio_cursor_x conio_cursor_y gotoxy::$10 ] ( main:6::gotoxy:17 [ conio_cursor_x conio_cursor_y gotoxy::$10 ] { } ) always clobbers reg byte a
Statement [96] (word) gotoxy::offset#0 ← (word~) gotoxy::$10 << (byte) 3 [ conio_cursor_x conio_cursor_y gotoxy::offset#0 ] ( main:6::gotoxy:17 [ conio_cursor_x conio_cursor_y gotoxy::offset#0 ] { } ) always clobbers reg byte a
Statement [97] (byte*~) gotoxy::$6 ← (const nomodify byte*) CONIO_SCREEN_TEXT + (word) gotoxy::offset#0 [ conio_cursor_x conio_cursor_y gotoxy::offset#0 gotoxy::$6 ] ( main:6::gotoxy:17 [ conio_cursor_x conio_cursor_y gotoxy::offset#0 gotoxy::$6 ] { } ) always clobbers reg byte a
Statement [98] (byte*) conio_cursor_text ← (byte*~) gotoxy::$6 [ conio_cursor_x conio_cursor_y conio_cursor_text gotoxy::offset#0 ] ( main:6::gotoxy:17 [ conio_cursor_x conio_cursor_y conio_cursor_text gotoxy::offset#0 ] { } ) always clobbers reg byte a
Statement [99] (byte*~) gotoxy::$7 ← (const nomodify byte*) CONIO_SCREEN_COLORS + (word) gotoxy::offset#0 [ conio_cursor_x conio_cursor_y conio_cursor_text gotoxy::$7 ] ( main:6::gotoxy:17 [ conio_cursor_x conio_cursor_y conio_cursor_text gotoxy::$7 ] { } ) always clobbers reg byte a
Statement [100] (byte*) conio_cursor_color ← (byte*~) gotoxy::$7 [ conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color ] ( main:6::gotoxy:17 [ conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color ] { } ) always clobbers reg byte a
Statement [105] (byte) conio_cursor_x ← (byte) 0 [ conio_cursor_x ] ( main:6::clrscr:9 [ conio_cursor_x ] { } ) always clobbers reg byte a
Statement [106] (byte) conio_cursor_y ← (byte) 0 [ conio_cursor_x conio_cursor_y ] ( main:6::clrscr:9 [ conio_cursor_x conio_cursor_y ] { } ) always clobbers reg byte a
Statement [107] (byte*) conio_cursor_text ← (const nomodify byte*) CONIO_SCREEN_TEXT [ conio_cursor_x conio_cursor_y conio_cursor_text ] ( main:6::clrscr:9 [ conio_cursor_x conio_cursor_y conio_cursor_text ] { } ) always clobbers reg byte a
Statement [108] (byte*) conio_cursor_color ← (const nomodify byte*) CONIO_SCREEN_COLORS [ conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color ] ( main:6::clrscr:9 [ conio_cursor_x conio_cursor_y conio_cursor_text conio_cursor_color ] { } ) always clobbers reg byte a
Statement [112] (byte*) clrscr::line_text#1 ← (byte*) clrscr::line_text#5 + (byte) $28 [ clrscr::l#2 clrscr::line_cols#5 clrscr::line_text#1 ] ( main:6::clrscr:9 [ clrscr::l#2 clrscr::line_cols#5 clrscr::line_text#1 ] { } ) always clobbers reg byte a
Statement [113] (byte*) clrscr::line_cols#1 ← (byte*) clrscr::line_cols#5 + (byte) $28 [ clrscr::l#2 clrscr::line_text#1 clrscr::line_cols#1 ] ( main:6::clrscr:9 [ clrscr::l#2 clrscr::line_text#1 clrscr::line_cols#1 ] { } ) always clobbers reg byte a
Statement [115] *((byte*) clrscr::line_text#5 + (byte) clrscr::c#2) ← (byte) ' ' [ clrscr::l#2 clrscr::line_text#5 clrscr::line_cols#5 clrscr::c#2 ] ( main:6::clrscr:9 [ clrscr::l#2 clrscr::line_text#5 clrscr::line_cols#5 clrscr::c#2 ] { } ) always clobbers reg byte a
Statement [116] *((byte*) clrscr::line_cols#5 + (byte) clrscr::c#2) ← (const nomodify byte) CONIO_TEXTCOLOR_DEFAULT [ clrscr::l#2 clrscr::line_text#5 clrscr::line_cols#5 clrscr::c#2 ] ( main:6::clrscr:9 [ clrscr::l#2 clrscr::line_text#5 clrscr::line_cols#5 clrscr::c#2 ] { } ) always clobbers reg byte a
Potential registers zp[1]:2 [ main::c#2 main::c#1 ] : zp[1]:2 , reg byte x ,
Potential registers zp[1]:3 [ main::c1#2 main::c1#1 ] : zp[1]:3 , reg byte x ,
Potential registers zp[1]:4 [ cputc::c#2 cputc::c#0 cputc::c#1 ] : zp[1]:4 , reg byte a , reg byte x , reg byte y ,
Potential registers zp[2]:5 [ memset::str#3 ] : zp[2]:5 ,
Potential registers zp[1]:7 [ memset::c#4 ] : zp[1]:7 , reg byte x ,
Potential registers zp[2]:8 [ memset::dst#2 memset::dst#4 memset::dst#1 ] : zp[2]:8 ,
Potential registers zp[2]:10 [ memcpy::source#2 ] : zp[2]:10 ,
Potential registers zp[2]:12 [ memcpy::destination#2 ] : zp[2]:12 ,
Potential registers zp[2]:14 [ memcpy::src#2 memcpy::src#4 memcpy::src#1 ] : zp[2]:14 ,
Potential registers zp[2]:16 [ memcpy::dst#2 memcpy::dst#4 memcpy::dst#1 ] : zp[2]:16 ,
Potential registers zp[1]:18 [ toupper::return#2 toupper::return#0 toupper::ch#0 ] : zp[1]:18 , reg byte a , reg byte x , reg byte y ,
Potential registers zp[1]:19 [ gotoxy::y#4 gotoxy::y#2 ] : zp[1]:19 , reg byte x , reg byte y ,
Potential registers zp[1]:20 [ clrscr::l#2 clrscr::l#1 ] : zp[1]:20 , reg byte x , reg byte y ,
Potential registers zp[2]:21 [ clrscr::line_text#5 clrscr::line_text#1 ] : zp[2]:21 ,
Potential registers zp[2]:23 [ clrscr::line_cols#5 clrscr::line_cols#1 ] : zp[2]:23 ,
Potential registers zp[1]:25 [ clrscr::c#2 clrscr::c#1 ] : zp[1]:25 , reg byte x , reg byte y ,
Potential registers zp[1]:26 [ conio_cursor_x ] : zp[1]:26 ,
Potential registers zp[1]:27 [ conio_cursor_y ] : zp[1]:27 ,
Potential registers zp[2]:28 [ conio_cursor_text ] : zp[2]:28 ,
Potential registers zp[2]:30 [ conio_cursor_color ] : zp[2]:30 ,
Potential registers zp[1]:32 [ main::wherey1_return#0 ] : zp[1]:32 , reg byte a , reg byte x , reg byte y ,
Potential registers zp[1]:33 [ toupper::return#3 ] : zp[1]:33 , reg byte a , reg byte x , reg byte y ,
Potential registers zp[2]:34 [ cputln::ln_offset#0 ] : zp[2]:34 ,
Potential registers zp[2]:36 [ cputln::$1 ] : zp[2]:36 ,
Potential registers zp[2]:38 [ cputln::$2 ] : zp[2]:38 ,
Potential registers zp[2]:40 [ cscroll::$7 ] : zp[2]:40 ,
Potential registers zp[2]:42 [ cscroll::$8 ] : zp[2]:42 ,
Potential registers zp[2]:44 [ memset::end#0 ] : zp[2]:44 ,
Potential registers zp[2]:46 [ memcpy::src_end#0 ] : zp[2]:46 ,
Potential registers zp[2]:48 [ gotoxy::$8 ] : zp[2]:48 ,
Potential registers zp[2]:50 [ gotoxy::$9 ] : zp[2]:50 ,
Potential registers zp[2]:52 [ gotoxy::$10 ] : zp[2]:52 ,
Potential registers zp[2]:54 [ gotoxy::offset#0 ] : zp[2]:54 ,
Potential registers zp[2]:56 [ gotoxy::$6 ] : zp[2]:56 ,
Potential registers zp[2]:58 [ gotoxy::$7 ] : zp[2]:58 ,
REGISTER UPLIFT SCOPES
Uplift Scope [memcpy] 301,250,004.25: zp[2]:14 [ memcpy::src#2 memcpy::src#4 memcpy::src#1 ] 202,333,337.67: zp[2]:16 [ memcpy::dst#2 memcpy::dst#4 memcpy::dst#1 ] 12,625,000.25: zp[2]:46 [ memcpy::src_end#0 ] 0: zp[2]:10 [ memcpy::source#2 ] 0: zp[2]:12 [ memcpy::destination#2 ]
Uplift Scope [memset] 335,666,672.33: zp[2]:8 [ memset::dst#2 memset::dst#4 memset::dst#1 ] 16,833,333.67: zp[2]:44 [ memset::end#0 ] 14,285,714.43: zp[1]:7 [ memset::c#4 ] 0: zp[2]:5 [ memset::str#3 ]
Uplift Scope [cscroll] 200,002: zp[2]:40 [ cscroll::$7 ] 200,002: zp[2]:42 [ cscroll::$8 ]
Uplift Scope [cputln] 20,002: zp[2]:36 [ cputln::$1 ] 20,002: zp[2]:38 [ cputln::$2 ] 10,001: zp[2]:34 [ cputln::ln_offset#0 ]
Uplift Scope [clrscr] 32,503.25: zp[1]:25 [ clrscr::c#2 clrscr::c#1 ] 2,501.38: zp[2]:23 [ clrscr::line_cols#5 clrscr::line_cols#1 ] 2,382.05: zp[2]:21 [ clrscr::line_text#5 clrscr::line_text#1 ] 2,335.67: zp[1]:20 [ clrscr::l#2 clrscr::l#1 ]
Uplift Scope [] 4,809.28: zp[1]:27 [ conio_cursor_y ] 4,058.38: zp[2]:30 [ conio_cursor_color ] 3,848.47: zp[2]:28 [ conio_cursor_text ] 494.08: zp[1]:26 [ conio_cursor_x ]
Uplift Scope [toupper] 4,738.67: zp[1]:18 [ toupper::return#2 toupper::return#0 toupper::ch#0 ] 202: zp[1]:33 [ toupper::return#3 ]
Uplift Scope [cputc] 1,506: zp[1]:4 [ cputc::c#2 cputc::c#0 cputc::c#1 ]
Uplift Scope [gotoxy] 202: zp[2]:50 [ gotoxy::$9 ] 202: zp[2]:52 [ gotoxy::$10 ] 202: zp[2]:56 [ gotoxy::$6 ] 202: zp[2]:58 [ gotoxy::$7 ] 151.5: zp[2]:48 [ gotoxy::$8 ] 138.33: zp[1]:19 [ gotoxy::y#4 gotoxy::y#2 ] 101: zp[2]:54 [ gotoxy::offset#0 ]
Uplift Scope [main] 252.5: zp[1]:2 [ main::c#2 main::c#1 ] 202: zp[1]:3 [ main::c1#2 main::c1#1 ] 22: zp[1]:32 [ main::wherey1_return#0 ]
Uplifting [memcpy] best 19075 combination zp[2]:14 [ memcpy::src#2 memcpy::src#4 memcpy::src#1 ] zp[2]:16 [ memcpy::dst#2 memcpy::dst#4 memcpy::dst#1 ] zp[2]:46 [ memcpy::src_end#0 ] zp[2]:10 [ memcpy::source#2 ] zp[2]:12 [ memcpy::destination#2 ]
Uplifting [memset] best 18969 combination zp[2]:8 [ memset::dst#2 memset::dst#4 memset::dst#1 ] zp[2]:44 [ memset::end#0 ] reg byte x [ memset::c#4 ] zp[2]:5 [ memset::str#3 ]
Uplifting [cscroll] best 18969 combination zp[2]:40 [ cscroll::$7 ] zp[2]:42 [ cscroll::$8 ]
Uplifting [cputln] best 18969 combination zp[2]:36 [ cputln::$1 ] zp[2]:38 [ cputln::$2 ] zp[2]:34 [ cputln::ln_offset#0 ]
Uplifting [clrscr] best 17379 combination reg byte y [ clrscr::c#2 clrscr::c#1 ] zp[2]:23 [ clrscr::line_cols#5 clrscr::line_cols#1 ] zp[2]:21 [ clrscr::line_text#5 clrscr::line_text#1 ] reg byte x [ clrscr::l#2 clrscr::l#1 ]
Uplifting [] best 17379 combination zp[1]:27 [ conio_cursor_y ] zp[2]:30 [ conio_cursor_color ] zp[2]:28 [ conio_cursor_text ] zp[1]:26 [ conio_cursor_x ]
Uplifting [toupper] best 17252 combination reg byte a [ toupper::return#2 toupper::return#0 toupper::ch#0 ] reg byte a [ toupper::return#3 ]
Uplifting [cputc] best 17186 combination reg byte a [ cputc::c#2 cputc::c#0 cputc::c#1 ]
Uplifting [gotoxy] best 17173 combination zp[2]:50 [ gotoxy::$9 ] zp[2]:52 [ gotoxy::$10 ] zp[2]:56 [ gotoxy::$6 ] zp[2]:58 [ gotoxy::$7 ] zp[2]:48 [ gotoxy::$8 ] reg byte x [ gotoxy::y#4 gotoxy::y#2 ] zp[2]:54 [ gotoxy::offset#0 ]
Uplifting [main] best 17167 combination zp[1]:2 [ main::c#2 main::c#1 ] zp[1]:3 [ main::c1#2 main::c1#1 ] reg byte x [ main::wherey1_return#0 ]
Attempting to uplift remaining variables inzp[1]:27 [ conio_cursor_y ]
Uplifting [] best 17167 combination zp[1]:27 [ conio_cursor_y ]
Attempting to uplift remaining variables inzp[1]:26 [ conio_cursor_x ]
Uplifting [] best 17167 combination zp[1]:26 [ conio_cursor_x ]
Attempting to uplift remaining variables inzp[1]:2 [ main::c#2 main::c#1 ]
Uplifting [main] best 17167 combination zp[1]:2 [ main::c#2 main::c#1 ]
Attempting to uplift remaining variables inzp[1]:3 [ main::c1#2 main::c1#1 ]
Uplifting [main] best 17167 combination zp[1]:3 [ main::c1#2 main::c1#1 ]
Coalescing zero page register [ zp[2]:28 [ conio_cursor_text ] ] with [ zp[2]:36 [ cputln::$1 ] ] - score: 2
Coalescing zero page register [ zp[2]:28 [ conio_cursor_text cputln::$1 ] ] with [ zp[2]:40 [ cscroll::$7 ] ] - score: 2
Coalescing zero page register [ zp[2]:30 [ conio_cursor_color ] ] with [ zp[2]:38 [ cputln::$2 ] ] - score: 2
Coalescing zero page register [ zp[2]:30 [ conio_cursor_color cputln::$2 ] ] with [ zp[2]:42 [ cscroll::$8 ] ] - score: 2
Coalescing zero page register [ zp[2]:5 [ memset::str#3 ] ] with [ zp[2]:8 [ memset::dst#2 memset::dst#4 memset::dst#1 ] ] - score: 1
Coalescing zero page register [ zp[2]:10 [ memcpy::source#2 ] ] with [ zp[2]:14 [ memcpy::src#2 memcpy::src#4 memcpy::src#1 ] ] - score: 1
Coalescing zero page register [ zp[2]:12 [ memcpy::destination#2 ] ] with [ zp[2]:16 [ memcpy::dst#2 memcpy::dst#4 memcpy::dst#1 ] ] - score: 1
Coalescing zero page register [ zp[2]:28 [ conio_cursor_text cputln::$1 cscroll::$7 ] ] with [ zp[2]:56 [ gotoxy::$6 ] ] - score: 1
Coalescing zero page register [ zp[2]:30 [ conio_cursor_color cputln::$2 cscroll::$8 ] ] with [ zp[2]:58 [ gotoxy::$7 ] ] - score: 1
Coalescing zero page register [ zp[2]:48 [ gotoxy::$8 ] ] with [ zp[2]:52 [ gotoxy::$10 ] ] - score: 1
Coalescing zero page register [ zp[2]:30 [ conio_cursor_color cputln::$2 cscroll::$8 gotoxy::$7 ] ] with [ zp[2]:54 [ gotoxy::offset#0 ] ] - score: 1
Coalescing zero page register [ zp[2]:30 [ conio_cursor_color cputln::$2 cscroll::$8 gotoxy::$7 gotoxy::offset#0 ] ] with [ zp[2]:48 [ gotoxy::$8 gotoxy::$10 ] ] - score: 1
Coalescing zero page register [ zp[2]:10 [ memcpy::source#2 memcpy::src#2 memcpy::src#4 memcpy::src#1 ] ] with [ zp[2]:5 [ memset::str#3 memset::dst#2 memset::dst#4 memset::dst#1 ] ]
Coalescing zero page register [ zp[2]:21 [ clrscr::line_text#5 clrscr::line_text#1 ] ] with [ zp[2]:12 [ memcpy::destination#2 memcpy::dst#2 memcpy::dst#4 memcpy::dst#1 ] ]
Coalescing zero page register [ zp[2]:28 [ conio_cursor_text cputln::$1 cscroll::$7 gotoxy::$6 ] ] with [ zp[2]:23 [ clrscr::line_cols#5 clrscr::line_cols#1 ] ]
Coalescing zero page register [ zp[2]:46 [ memcpy::src_end#0 ] ] with [ zp[2]:44 [ memset::end#0 ] ]
Coalescing zero page register [ zp[2]:50 [ gotoxy::$9 ] ] with [ zp[2]:34 [ cputln::ln_offset#0 ] ]
Coalescing zero page register [ zp[2]:50 [ gotoxy::$9 cputln::ln_offset#0 ] ] with [ zp[2]:10 [ memcpy::source#2 memcpy::src#2 memcpy::src#4 memcpy::src#1 memset::str#3 memset::dst#2 memset::dst#4 memset::dst#1 ] ]
Allocated (was zp[2]:21) zp[2]:4 [ clrscr::line_text#5 clrscr::line_text#1 memcpy::destination#2 memcpy::dst#2 memcpy::dst#4 memcpy::dst#1 ]
Allocated (was zp[1]:26) zp[1]:6 [ conio_cursor_x ]
Allocated (was zp[1]:27) zp[1]:7 [ conio_cursor_y ]
Allocated (was zp[2]:28) zp[2]:8 [ conio_cursor_text cputln::$1 cscroll::$7 gotoxy::$6 clrscr::line_cols#5 clrscr::line_cols#1 ]
Allocated (was zp[2]:30) zp[2]:10 [ conio_cursor_color cputln::$2 cscroll::$8 gotoxy::$7 gotoxy::offset#0 gotoxy::$8 gotoxy::$10 ]
Allocated (was zp[2]:46) zp[2]:12 [ memcpy::src_end#0 memset::end#0 ]
Allocated (was zp[2]:50) zp[2]:14 [ gotoxy::$9 cputln::ln_offset#0 memcpy::source#2 memcpy::src#2 memcpy::src#4 memcpy::src#1 memset::str#3 memset::dst#2 memset::dst#4 memset::dst#1 ]
ASSEMBLER BEFORE OPTIMIZATION
// File Comments
// Test toupper()
// Upstart
.pc = $801 "Basic"
:BasicUpstart(__bbegin)
.pc = $80d "Program"
// Global Constants & labels
// The default text color
.const CONIO_TEXTCOLOR_DEFAULT = $e
// The screen width
// The screen height
// The screen bytes
// The text screen address
.label CONIO_SCREEN_TEXT = $400
// The color screen address
.label CONIO_SCREEN_COLORS = $d800
.label conio_cursor_x = 6
.label conio_cursor_y = 7
.label conio_cursor_text = 8
.label conio_cursor_color = $a
// @begin
__bbegin:
jmp __b1
// @1
__b1:
// [1] (byte) conio_cursor_x ← (byte) 0 -- vbuz1=vbuc1
// The current cursor x-position
lda #0
sta.z conio_cursor_x
// [2] (byte) conio_cursor_y ← (byte) 0 -- vbuz1=vbuc1
// The current cursor y-position
lda #0
sta.z conio_cursor_y
// [3] (byte*) conio_cursor_text ← (const nomodify byte*) CONIO_SCREEN_TEXT -- pbuz1=pbuc1
// The current cursor address
lda #<CONIO_SCREEN_TEXT
sta.z conio_cursor_text
lda #>CONIO_SCREEN_TEXT
sta.z conio_cursor_text+1
// [4] (byte*) conio_cursor_color ← (const nomodify byte*) CONIO_SCREEN_COLORS -- pbuz1=pbuc1
// The current cursor address
lda #<CONIO_SCREEN_COLORS
sta.z conio_cursor_color
lda #>CONIO_SCREEN_COLORS
sta.z conio_cursor_color+1
// [5] phi from @1 to @2 [phi:@1->@2]
__b2_from___b1:
jmp __b2
// @2
__b2:
// [6] call main
jsr main
// [7] phi from @2 to @end [phi:@2->@end]
__bend_from___b2:
jmp __bend
// @end
__bend:
// main
main: {
.label c = 2
.label c1 = 3
// [8] *((byte*) 53272) ← (byte) $17 -- _deref_pbuc1=vbuc2
// Show mixed chars on screen
lda #$17
sta $d018
// [9] call clrscr
// Clear screen
// [102] phi from main to clrscr [phi:main->clrscr]
clrscr_from_main:
jsr clrscr
// [10] phi from main to main::@1 [phi:main->main::@1]
__b1_from_main:
// [10] phi (byte) main::c#2 = (byte) 0 [phi:main->main::@1#0] -- vbuz1=vbuc1
lda #0
sta.z c
jmp __b1
// Output un-modified chars
// [10] phi from main::@4 to main::@1 [phi:main::@4->main::@1]
__b1_from___b4:
// [10] phi (byte) main::c#2 = (byte) main::c#1 [phi:main::@4->main::@1#0] -- register_copy
jmp __b1
// main::@1
__b1:
// [11] (byte) cputc::c#0 ← (byte) main::c#2 -- vbuaa=vbuz1
lda.z c
// [12] call cputc
// [27] phi from main::@1 to cputc [phi:main::@1->cputc]
cputc_from___b1:
// [27] phi (byte) cputc::c#2 = (byte) cputc::c#0 [phi:main::@1->cputc#0] -- register_copy
jsr cputc
jmp __b4
// main::@4
__b4:
// [13] (byte) main::c#1 ← ++ (byte) main::c#2 -- vbuz1=_inc_vbuz1
inc.z c
// [14] if((byte) main::c#1!=(byte) 0) goto main::@1 -- vbuz1_neq_0_then_la1
lda.z c
cmp #0
bne __b1_from___b4
jmp wherey1
// main::wherey1
wherey1:
// [15] (byte) main::wherey1_return#0 ← (byte) conio_cursor_y -- vbuxx=vbuz1
ldx.z conio_cursor_y
jmp __b3
// main::@3
__b3:
// [16] (byte) gotoxy::y#2 ← (byte) main::wherey1_return#0 + (byte) 2 -- vbuxx=vbuxx_plus_2
inx
inx
// [17] call gotoxy
jsr gotoxy
// [18] phi from main::@3 to main::@2 [phi:main::@3->main::@2]
__b2_from___b3:
// [18] phi (byte) main::c1#2 = (byte) 0 [phi:main::@3->main::@2#0] -- vbuz1=vbuc1
lda #0
sta.z c1
jmp __b2
// Output toupper-chars chars
// [18] phi from main::@6 to main::@2 [phi:main::@6->main::@2]
__b2_from___b6:
// [18] phi (byte) main::c1#2 = (byte) main::c1#1 [phi:main::@6->main::@2#0] -- register_copy
jmp __b2
// main::@2
__b2:
// [19] (byte) toupper::ch#0 ← (byte) main::c1#2 -- vbuaa=vbuz1
lda.z c1
// [20] call toupper
jsr toupper
// [21] (byte) toupper::return#3 ← (byte) toupper::return#2
jmp __b5
// main::@5
__b5:
// [22] (byte) cputc::c#1 ← (byte) toupper::return#3
// [23] call cputc
// [27] phi from main::@5 to cputc [phi:main::@5->cputc]
cputc_from___b5:
// [27] phi (byte) cputc::c#2 = (byte) cputc::c#1 [phi:main::@5->cputc#0] -- register_copy
jsr cputc
jmp __b6
// main::@6
__b6:
// [24] (byte) main::c1#1 ← ++ (byte) main::c1#2 -- vbuz1=_inc_vbuz1
inc.z c1
// [25] if((byte) main::c1#1!=(byte) 0) goto main::@2 -- vbuz1_neq_0_then_la1
lda.z c1
cmp #0
bne __b2_from___b6
jmp __breturn
// main::@return
__breturn:
// [26] return
rts
}
// cputc
// Output one character at the current cursor position
// Moves the cursor forward. Scrolls the entire screen if needed
// cputc(byte register(A) c)
cputc: {
// [28] if((byte) cputc::c#2==(byte) ' ') goto cputc::@1 -- vbuaa_eq_vbuc1_then_la1
cmp #'\n'
beq __b1_from_cputc
jmp __b2
// cputc::@2
__b2:
// [29] *((byte*) conio_cursor_text) ← (byte) cputc::c#2 -- _deref_pbuz1=vbuaa
ldy #0
sta (conio_cursor_text),y
// [30] (byte*) conio_cursor_text ← ++ (byte*) conio_cursor_text -- pbuz1=_inc_pbuz1
inc.z conio_cursor_text
bne !+
inc.z conio_cursor_text+1
!:
// [31] *((byte*) conio_cursor_color) ← (const nomodify byte) CONIO_TEXTCOLOR_DEFAULT -- _deref_pbuz1=vbuc1
lda #CONIO_TEXTCOLOR_DEFAULT
ldy #0
sta (conio_cursor_color),y
// [32] (byte*) conio_cursor_color ← ++ (byte*) conio_cursor_color -- pbuz1=_inc_pbuz1
inc.z conio_cursor_color
bne !+
inc.z conio_cursor_color+1
!:
// [33] (byte) conio_cursor_x ← ++ (byte) conio_cursor_x -- vbuz1=_inc_vbuz1
inc.z conio_cursor_x
// [34] if((byte) conio_cursor_x!=(byte) $28) goto cputc::@return -- vbuz1_neq_vbuc1_then_la1
lda #$28
cmp.z conio_cursor_x
bne __breturn
jmp __b3
// cputc::@3
__b3:
// [35] (byte) conio_cursor_x ← (byte) 0 -- vbuz1=vbuc1
lda #0
sta.z conio_cursor_x
// [36] (byte) conio_cursor_y ← ++ (byte) conio_cursor_y -- vbuz1=_inc_vbuz1
inc.z conio_cursor_y
// [37] call cscroll
jsr cscroll
jmp __breturn
// cputc::@return
__breturn:
// [38] return
rts
// [39] phi from cputc to cputc::@1 [phi:cputc->cputc::@1]
__b1_from_cputc:
jmp __b1
// cputc::@1
__b1:
// [40] call cputln
jsr cputln
jmp __breturn
}
// cputln
// Print a newline
cputln: {
.label __1 = 8
.label __2 = $a
.label ln_offset = $e
// [41] (word) cputln::ln_offset#0 ← (byte) $28 - (byte) conio_cursor_x -- vwuz1=vbuc1_minus_vbuz2
sec
lda #$28
sbc.z conio_cursor_x
sta.z ln_offset
lda #0
sbc #0
sta.z ln_offset+1
// [42] (byte*~) cputln::$1 ← (byte*) conio_cursor_text + (word) cputln::ln_offset#0 -- pbuz1=pbuz1_plus_vwuz2
lda.z __1
clc
adc.z ln_offset
sta.z __1
lda.z __1+1
adc.z ln_offset+1
sta.z __1+1
// [43] (byte*) conio_cursor_text ← (byte*~) cputln::$1
// [44] (byte*~) cputln::$2 ← (byte*) conio_cursor_color + (word) cputln::ln_offset#0 -- pbuz1=pbuz1_plus_vwuz2
lda.z __2
clc
adc.z ln_offset
sta.z __2
lda.z __2+1
adc.z ln_offset+1
sta.z __2+1
// [45] (byte*) conio_cursor_color ← (byte*~) cputln::$2
// [46] (byte) conio_cursor_x ← (byte) 0 -- vbuz1=vbuc1
lda #0
sta.z conio_cursor_x
// [47] (byte) conio_cursor_y ← ++ (byte) conio_cursor_y -- vbuz1=_inc_vbuz1
inc.z conio_cursor_y
// [48] call cscroll
jsr cscroll
jmp __breturn
// cputln::@return
__breturn:
// [49] return
rts
}
// cscroll
// Scroll the entire screen if the cursor is beyond the last line
cscroll: {
.label __7 = 8
.label __8 = $a
// [50] if((byte) conio_cursor_y!=(byte) $19) goto cscroll::@return -- vbuz1_neq_vbuc1_then_la1
lda #$19
cmp.z conio_cursor_y
bne __breturn
// [51] phi from cscroll to cscroll::@1 [phi:cscroll->cscroll::@1]
__b1_from_cscroll:
jmp __b1
// cscroll::@1
__b1:
// [52] call memcpy
// [73] phi from cscroll::@1 to memcpy [phi:cscroll::@1->memcpy]
memcpy_from___b1:
// [73] phi (void*) memcpy::destination#2 = (void*)(const nomodify byte*) CONIO_SCREEN_TEXT [phi:cscroll::@1->memcpy#0] -- pvoz1=pvoc1
lda #<CONIO_SCREEN_TEXT
sta.z memcpy.destination
lda #>CONIO_SCREEN_TEXT
sta.z memcpy.destination+1
// [73] phi (void*) memcpy::source#2 = (void*)(const nomodify byte*) CONIO_SCREEN_TEXT+(byte) $28 [phi:cscroll::@1->memcpy#1] -- pvoz1=pvoc1
lda #<CONIO_SCREEN_TEXT+$28
sta.z memcpy.source
lda #>CONIO_SCREEN_TEXT+$28
sta.z memcpy.source+1
jsr memcpy
// [53] phi from cscroll::@1 to cscroll::@2 [phi:cscroll::@1->cscroll::@2]
__b2_from___b1:
jmp __b2
// cscroll::@2
__b2:
// [54] call memcpy
// [73] phi from cscroll::@2 to memcpy [phi:cscroll::@2->memcpy]
memcpy_from___b2:
// [73] phi (void*) memcpy::destination#2 = (void*)(const nomodify byte*) CONIO_SCREEN_COLORS [phi:cscroll::@2->memcpy#0] -- pvoz1=pvoc1
lda #<CONIO_SCREEN_COLORS
sta.z memcpy.destination
lda #>CONIO_SCREEN_COLORS
sta.z memcpy.destination+1
// [73] phi (void*) memcpy::source#2 = (void*)(const nomodify byte*) CONIO_SCREEN_COLORS+(byte) $28 [phi:cscroll::@2->memcpy#1] -- pvoz1=pvoc1
lda #<CONIO_SCREEN_COLORS+$28
sta.z memcpy.source
lda #>CONIO_SCREEN_COLORS+$28
sta.z memcpy.source+1
jsr memcpy
// [55] phi from cscroll::@2 to cscroll::@3 [phi:cscroll::@2->cscroll::@3]
__b3_from___b2:
jmp __b3
// cscroll::@3
__b3:
// [56] call memset
// [65] phi from cscroll::@3 to memset [phi:cscroll::@3->memset]
memset_from___b3:
// [65] phi (byte) memset::c#4 = (byte) ' ' [phi:cscroll::@3->memset#0] -- vbuxx=vbuc1
ldx #' '
// [65] phi (void*) memset::str#3 = (void*)(const nomodify byte*) CONIO_SCREEN_TEXT+(word)(number) $19*(number) $28-(byte) $28 [phi:cscroll::@3->memset#1] -- pvoz1=pvoc1
lda #<CONIO_SCREEN_TEXT+$19*$28-$28
sta.z memset.str
lda #>CONIO_SCREEN_TEXT+$19*$28-$28
sta.z memset.str+1
jsr memset
// [57] phi from cscroll::@3 to cscroll::@4 [phi:cscroll::@3->cscroll::@4]
__b4_from___b3:
jmp __b4
// cscroll::@4
__b4:
// [58] call memset
// [65] phi from cscroll::@4 to memset [phi:cscroll::@4->memset]
memset_from___b4:
// [65] phi (byte) memset::c#4 = (const nomodify byte) CONIO_TEXTCOLOR_DEFAULT [phi:cscroll::@4->memset#0] -- vbuxx=vbuc1
ldx #CONIO_TEXTCOLOR_DEFAULT
// [65] phi (void*) memset::str#3 = (void*)(const nomodify byte*) CONIO_SCREEN_COLORS+(word)(number) $19*(number) $28-(byte) $28 [phi:cscroll::@4->memset#1] -- pvoz1=pvoc1
lda #<CONIO_SCREEN_COLORS+$19*$28-$28
sta.z memset.str
lda #>CONIO_SCREEN_COLORS+$19*$28-$28
sta.z memset.str+1
jsr memset
jmp __b5
// cscroll::@5
__b5:
// [59] (byte*~) cscroll::$7 ← (byte*) conio_cursor_text - (byte) $28 -- pbuz1=pbuz1_minus_vwuc1
lda.z __7
sec
sbc #<$28
sta.z __7
lda.z __7+1
sbc #>$28
sta.z __7+1
// [60] (byte*) conio_cursor_text ← (byte*~) cscroll::$7
// [61] (byte*~) cscroll::$8 ← (byte*) conio_cursor_color - (byte) $28 -- pbuz1=pbuz1_minus_vwuc1
lda.z __8
sec
sbc #<$28
sta.z __8
lda.z __8+1
sbc #>$28
sta.z __8+1
// [62] (byte*) conio_cursor_color ← (byte*~) cscroll::$8
// [63] (byte) conio_cursor_y ← -- (byte) conio_cursor_y -- vbuz1=_dec_vbuz1
dec.z conio_cursor_y
jmp __breturn
// cscroll::@return
__breturn:
// [64] return
rts
}
// memset
// Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str.
// memset(void* zp($e) str, byte register(X) c)
memset: {
.label end = $c
.label dst = $e
.label str = $e
jmp __b1
// memset::@1
__b1:
// [66] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (byte) $28 -- pbuz1=pbuz2_plus_vbuc1
lda #$28
clc
adc.z str
sta.z end
lda #0
adc.z str+1
sta.z end+1
// [67] (byte*) memset::dst#4 ← (byte*)(void*) memset::str#3
// [68] phi from memset::@1 memset::@3 to memset::@2 [phi:memset::@1/memset::@3->memset::@2]
__b2_from___b1:
__b2_from___b3:
// [68] phi (byte*) memset::dst#2 = (byte*) memset::dst#4 [phi:memset::@1/memset::@3->memset::@2#0] -- register_copy
jmp __b2
// memset::@2
__b2:
// [69] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@3 -- pbuz1_neq_pbuz2_then_la1
lda.z dst+1
cmp.z end+1
bne __b3
lda.z dst
cmp.z end
bne __b3
jmp __breturn
// memset::@return
__breturn:
// [70] return
rts
// memset::@3
__b3:
// [71] *((byte*) memset::dst#2) ← (byte) memset::c#4 -- _deref_pbuz1=vbuxx
txa
ldy #0
sta (dst),y
// [72] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 -- pbuz1=_inc_pbuz1
inc.z dst
bne !+
inc.z dst+1
!:
jmp __b2_from___b3
}
// memcpy
// 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(4) destination, void* zp($e) source)
memcpy: {
.label src_end = $c
.label dst = 4
.label src = $e
.label source = $e
.label destination = 4
// [74] (byte*) memcpy::src_end#0 ← (byte*)(void*) memcpy::source#2 + (word)(number) $19*(number) $28-(number) $28 -- pbuz1=pbuz2_plus_vwuc1
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
// [75] (byte*) memcpy::src#4 ← (byte*)(void*) memcpy::source#2
// [76] (byte*) memcpy::dst#4 ← (byte*)(void*) memcpy::destination#2
// [77] phi from memcpy memcpy::@2 to memcpy::@1 [phi:memcpy/memcpy::@2->memcpy::@1]
__b1_from_memcpy:
__b1_from___b2:
// [77] phi (byte*) memcpy::dst#2 = (byte*) memcpy::dst#4 [phi:memcpy/memcpy::@2->memcpy::@1#0] -- register_copy
// [77] phi (byte*) memcpy::src#2 = (byte*) memcpy::src#4 [phi:memcpy/memcpy::@2->memcpy::@1#1] -- register_copy
jmp __b1
// memcpy::@1
__b1:
// [78] if((byte*) memcpy::src#2!=(byte*) memcpy::src_end#0) goto memcpy::@2 -- pbuz1_neq_pbuz2_then_la1
lda.z src+1
cmp.z src_end+1
bne __b2
lda.z src
cmp.z src_end
bne __b2
jmp __breturn
// memcpy::@return
__breturn:
// [79] return
rts
// memcpy::@2
__b2:
// [80] *((byte*) memcpy::dst#2) ← *((byte*) memcpy::src#2) -- _deref_pbuz1=_deref_pbuz2
ldy #0
lda (src),y
ldy #0
sta (dst),y
// [81] (byte*) memcpy::dst#1 ← ++ (byte*) memcpy::dst#2 -- pbuz1=_inc_pbuz1
inc.z dst
bne !+
inc.z dst+1
!:
// [82] (byte*) memcpy::src#1 ← ++ (byte*) memcpy::src#2 -- pbuz1=_inc_pbuz1
inc.z src
bne !+
inc.z src+1
!:
jmp __b1_from___b2
}
// toupper
// Convert lowercase alphabet to uppercase
// Returns uppercase equivalent to c, if such value exists, else c remains unchanged
// toupper(byte register(A) ch)
toupper: {
// [83] if((byte) toupper::ch#0<(byte) 'a') goto toupper::@return -- vbuaa_lt_vbuc1_then_la1
cmp #'a'
bcc __breturn_from_toupper
jmp __b2
// toupper::@2
__b2:
// [84] if((byte) toupper::ch#0<=(byte) 'z') goto toupper::@1 -- vbuaa_le_vbuc1_then_la1
cmp #'z'
bcc __b1
beq __b1
// [86] phi from toupper toupper::@1 toupper::@2 to toupper::@return [phi:toupper/toupper::@1/toupper::@2->toupper::@return]
__breturn_from_toupper:
__breturn_from___b1:
__breturn_from___b2:
// [86] phi (byte) toupper::return#2 = (byte) toupper::ch#0 [phi:toupper/toupper::@1/toupper::@2->toupper::@return#0] -- register_copy
jmp __breturn
// toupper::@1
__b1:
// [85] (byte) toupper::return#0 ← (byte) toupper::ch#0 + (byte) 'A'-(byte) 'a' -- vbuaa=vbuaa_plus_vbuc1
clc
adc #'A'-'a'
jmp __breturn_from___b1
// toupper::@return
__breturn:
// [87] return
rts
}
// gotoxy
// Set the cursor to the specified position
// gotoxy(byte register(X) y)
gotoxy: {
.const x = 0
.label __6 = 8
.label __7 = $a
.label __8 = $a
.label offset = $a
.label __9 = $e
.label __10 = $a
// [88] if((byte) gotoxy::y#2<(byte) $19+(byte) 1) goto gotoxy::@3 -- vbuxx_lt_vbuc1_then_la1
cpx #$19+1
bcc __b3_from_gotoxy
// [90] phi from gotoxy to gotoxy::@1 [phi:gotoxy->gotoxy::@1]
__b1_from_gotoxy:
// [90] phi (byte) gotoxy::y#4 = (byte) 0 [phi:gotoxy->gotoxy::@1#0] -- vbuxx=vbuc1
ldx #0
jmp __b1
// [89] phi from gotoxy to gotoxy::@3 [phi:gotoxy->gotoxy::@3]
__b3_from_gotoxy:
jmp __b3
// gotoxy::@3
__b3:
// [90] phi from gotoxy::@3 to gotoxy::@1 [phi:gotoxy::@3->gotoxy::@1]
__b1_from___b3:
// [90] phi (byte) gotoxy::y#4 = (byte) gotoxy::y#2 [phi:gotoxy::@3->gotoxy::@1#0] -- register_copy
jmp __b1
// gotoxy::@1
__b1:
jmp __b2
// gotoxy::@2
__b2:
// [91] (byte) conio_cursor_x ← (const byte) gotoxy::x#2 -- vbuz1=vbuc1
lda #x
sta.z conio_cursor_x
// [92] (byte) conio_cursor_y ← (byte) gotoxy::y#4 -- vbuz1=vbuxx
stx.z conio_cursor_y
// [93] (word~) gotoxy::$8 ← (word)(byte) gotoxy::y#4 -- vwuz1=_word_vbuxx
txa
sta.z __8
lda #0
sta.z __8+1
// [94] (word~) gotoxy::$9 ← (word~) gotoxy::$8 << (byte) 2 -- vwuz1=vwuz2_rol_2
lda.z __8
asl
sta.z __9
lda.z __8+1
rol
sta.z __9+1
asl.z __9
rol.z __9+1
// [95] (word~) gotoxy::$10 ← (word~) gotoxy::$9 + (word~) gotoxy::$8 -- vwuz1=vwuz2_plus_vwuz1
lda.z __10
clc
adc.z __9
sta.z __10
lda.z __10+1
adc.z __9+1
sta.z __10+1
// [96] (word) gotoxy::offset#0 ← (word~) gotoxy::$10 << (byte) 3 -- vwuz1=vwuz1_rol_3
asl.z offset
rol.z offset+1
asl.z offset
rol.z offset+1
asl.z offset
rol.z offset+1
// [97] (byte*~) gotoxy::$6 ← (const nomodify byte*) CONIO_SCREEN_TEXT + (word) gotoxy::offset#0 -- pbuz1=pbuc1_plus_vwuz2
lda.z offset
clc
adc #<CONIO_SCREEN_TEXT
sta.z __6
lda.z offset+1
adc #>CONIO_SCREEN_TEXT
sta.z __6+1
// [98] (byte*) conio_cursor_text ← (byte*~) gotoxy::$6
// [99] (byte*~) gotoxy::$7 ← (const nomodify byte*) CONIO_SCREEN_COLORS + (word) gotoxy::offset#0 -- pbuz1=pbuc1_plus_vwuz1
clc
lda.z __7
adc #<CONIO_SCREEN_COLORS
sta.z __7
lda.z __7+1
adc #>CONIO_SCREEN_COLORS
sta.z __7+1
// [100] (byte*) conio_cursor_color ← (byte*~) gotoxy::$7
jmp __breturn
// gotoxy::@return
__breturn:
// [101] return
rts
}
// clrscr
// clears the screen and moves the cursor to the upper left-hand corner of the screen.
clrscr: {
.label line_text = 4
.label line_cols = 8
// [103] phi from clrscr to clrscr::@1 [phi:clrscr->clrscr::@1]
__b1_from_clrscr:
// [103] phi (byte*) clrscr::line_cols#5 = (const nomodify byte*) CONIO_SCREEN_COLORS [phi:clrscr->clrscr::@1#0] -- pbuz1=pbuc1
lda #<CONIO_SCREEN_COLORS
sta.z line_cols
lda #>CONIO_SCREEN_COLORS
sta.z line_cols+1
// [103] phi (byte*) clrscr::line_text#5 = (const nomodify byte*) CONIO_SCREEN_TEXT [phi:clrscr->clrscr::@1#1] -- pbuz1=pbuc1
lda #<CONIO_SCREEN_TEXT
sta.z line_text
lda #>CONIO_SCREEN_TEXT
sta.z line_text+1
// [103] phi (byte) clrscr::l#2 = (byte) 0 [phi:clrscr->clrscr::@1#2] -- vbuxx=vbuc1
ldx #0
jmp __b1
// clrscr::@1
__b1:
// [104] if((byte) clrscr::l#2<(byte) $19) goto clrscr::@3 -- vbuxx_lt_vbuc1_then_la1
cpx #$19
bcc __b3_from___b1
jmp __b2
// clrscr::@2
__b2:
// [105] (byte) conio_cursor_x ← (byte) 0 -- vbuz1=vbuc1
lda #0
sta.z conio_cursor_x
// [106] (byte) conio_cursor_y ← (byte) 0 -- vbuz1=vbuc1
lda #0
sta.z conio_cursor_y
// [107] (byte*) conio_cursor_text ← (const nomodify byte*) CONIO_SCREEN_TEXT -- pbuz1=pbuc1
lda #<CONIO_SCREEN_TEXT
sta.z conio_cursor_text
lda #>CONIO_SCREEN_TEXT
sta.z conio_cursor_text+1
// [108] (byte*) conio_cursor_color ← (const nomodify byte*) CONIO_SCREEN_COLORS -- pbuz1=pbuc1
lda #<CONIO_SCREEN_COLORS
sta.z conio_cursor_color
lda #>CONIO_SCREEN_COLORS
sta.z conio_cursor_color+1
jmp __breturn
// clrscr::@return
__breturn:
// [109] return
rts
// [110] phi from clrscr::@1 to clrscr::@3 [phi:clrscr::@1->clrscr::@3]
__b3_from___b1:
// [110] phi (byte) clrscr::c#2 = (byte) 0 [phi:clrscr::@1->clrscr::@3#0] -- vbuyy=vbuc1
ldy #0
jmp __b3
// clrscr::@3
__b3:
// [111] if((byte) clrscr::c#2<(byte) $28) goto clrscr::@4 -- vbuyy_lt_vbuc1_then_la1
cpy #$28
bcc __b4
jmp __b5
// clrscr::@5
__b5:
// [112] (byte*) clrscr::line_text#1 ← (byte*) clrscr::line_text#5 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1
lda #$28
clc
adc.z line_text
sta.z line_text
bcc !+
inc.z line_text+1
!:
// [113] (byte*) clrscr::line_cols#1 ← (byte*) clrscr::line_cols#5 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1
lda #$28
clc
adc.z line_cols
sta.z line_cols
bcc !+
inc.z line_cols+1
!:
// [114] (byte) clrscr::l#1 ← ++ (byte) clrscr::l#2 -- vbuxx=_inc_vbuxx
inx
// [103] phi from clrscr::@5 to clrscr::@1 [phi:clrscr::@5->clrscr::@1]
__b1_from___b5:
// [103] phi (byte*) clrscr::line_cols#5 = (byte*) clrscr::line_cols#1 [phi:clrscr::@5->clrscr::@1#0] -- register_copy
// [103] phi (byte*) clrscr::line_text#5 = (byte*) clrscr::line_text#1 [phi:clrscr::@5->clrscr::@1#1] -- register_copy
// [103] phi (byte) clrscr::l#2 = (byte) clrscr::l#1 [phi:clrscr::@5->clrscr::@1#2] -- register_copy
jmp __b1
// clrscr::@4
__b4:
// [115] *((byte*) clrscr::line_text#5 + (byte) clrscr::c#2) ← (byte) ' ' -- pbuz1_derefidx_vbuyy=vbuc1
lda #' '
sta (line_text),y
// [116] *((byte*) clrscr::line_cols#5 + (byte) clrscr::c#2) ← (const nomodify byte) CONIO_TEXTCOLOR_DEFAULT -- pbuz1_derefidx_vbuyy=vbuc1
lda #CONIO_TEXTCOLOR_DEFAULT
sta (line_cols),y
// [117] (byte) clrscr::c#1 ← ++ (byte) clrscr::c#2 -- vbuyy=_inc_vbuyy
iny
// [110] phi from clrscr::@4 to clrscr::@3 [phi:clrscr::@4->clrscr::@3]
__b3_from___b4:
// [110] phi (byte) clrscr::c#2 = (byte) clrscr::c#1 [phi:clrscr::@4->clrscr::@3#0] -- register_copy
jmp __b3
}
// File Data
ASSEMBLER OPTIMIZATIONS
Removing instruction jmp __b1
Removing instruction jmp __b2
Removing instruction jmp __bend
Removing instruction jmp __b1
Removing instruction jmp __b4
Removing instruction jmp wherey1
Removing instruction jmp __b3
Removing instruction jmp __b2
Removing instruction jmp __b5
Removing instruction jmp __b6
Removing instruction jmp __breturn
Removing instruction jmp __b2
Removing instruction jmp __b3
Removing instruction jmp __breturn
Removing instruction jmp __b1
Removing instruction jmp __breturn
Removing instruction jmp __b1
Removing instruction jmp __b2
Removing instruction jmp __b3
Removing instruction jmp __b4
Removing instruction jmp __b5
Removing instruction jmp __breturn
Removing instruction jmp __b1
Removing instruction jmp __b2
Removing instruction jmp __breturn
Removing instruction jmp __b1
Removing instruction jmp __breturn
Removing instruction jmp __b2
Removing instruction jmp __b3
Removing instruction jmp __b1
Removing instruction jmp __b2
Removing instruction jmp __breturn
Removing instruction jmp __b1
Removing instruction jmp __b2
Removing instruction jmp __breturn
Removing instruction jmp __b3
Removing instruction jmp __b5
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction lda #0
Removing instruction ldy #0
Removing instruction lda #0
Succesful ASM optimization Pass5UnnecesaryLoadElimination
Replacing label __b1_from___b4 with __b1
Replacing label __b2_from___b6 with __b2
Replacing label __b1_from_cputc with __b1
Replacing label __b2_from___b3 with __b2
Replacing label __b1_from___b2 with __b1
Replacing label __breturn_from_toupper with __breturn_from___b2
Replacing label __breturn_from___b1 with __breturn_from___b2
Replacing label __b3_from_gotoxy with __b2
Replacing label __b1 with __b2
Removing instruction __b1:
Removing instruction __b2_from___b1:
Removing instruction __bend_from___b2:
Removing instruction __b1_from___b4:
Removing instruction __b2_from___b6:
Removing instruction cputc_from___b5:
Removing instruction __b1_from_cputc:
Removing instruction __b1_from_cscroll:
Removing instruction memcpy_from___b1:
Removing instruction __b2_from___b1:
Removing instruction memcpy_from___b2:
Removing instruction __b3_from___b2:
Removing instruction memset_from___b3:
Removing instruction __b4_from___b3:
Removing instruction memset_from___b4:
Removing instruction __b2_from___b1:
Removing instruction __b2_from___b3:
Removing instruction __b1_from_memcpy:
Removing instruction __b1_from___b2:
Removing instruction __breturn_from_toupper:
Removing instruction __breturn_from___b1:
Removing instruction __b3_from_gotoxy:
Removing instruction __b3:
Removing instruction __b1_from___b3:
Removing instruction __b1:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction __b2:
Removing instruction __bend:
Removing instruction clrscr_from_main:
Removing instruction __b1_from_main:
Removing instruction cputc_from___b1:
Removing instruction __b4:
Removing instruction wherey1:
Removing instruction __b3:
Removing instruction __b2_from___b3:
Removing instruction __b5:
Removing instruction __b6:
Removing instruction __breturn:
Removing instruction __b2:
Removing instruction __b3:
Removing instruction __breturn:
Removing instruction __b1:
Removing instruction __b2:
Removing instruction __b3:
Removing instruction __b4:
Removing instruction __b5:
Removing instruction __b1:
Removing instruction __breturn:
Removing instruction __breturn:
Removing instruction __b2:
Removing instruction __b1_from_gotoxy:
Removing instruction __breturn:
Removing instruction __b1_from_clrscr:
Removing instruction __b2:
Removing instruction __breturn:
Removing instruction __b5:
Removing instruction __b1_from___b5:
Removing instruction __b3_from___b4:
Succesful ASM optimization Pass5UnusedLabelElimination
Replacing jump to rts with rts in jmp __breturn
Skipping double jump to __breturn in bcc __breturn_from___b2
Replacing jump to rts with rts in jmp __breturn
Skipping double jump to __breturn in jmp __breturn_from___b2
Succesful ASM optimization Pass5DoubleJumpElimination
Relabelling long label __breturn_from___b2 to __b2
Relabelling long label __b3_from___b1 to __b2
Succesful ASM optimization Pass5RelabelLongLabels
Adding RTS to root block
Succesful ASM optimization Pass5AddMainRts
Removing instruction jmp __b1
Removing instruction jmp __b2
Removing instruction jmp __breturn
Removing instruction jmp __b2
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction __b2:
Succesful ASM optimization Pass5UnusedLabelElimination
FINAL SYMBOL TABLE
(label) @1
(label) @2
(label) @begin
(label) @end
(const nomodify byte*) CONIO_SCREEN_COLORS = (byte*) 55296
(const nomodify byte*) CONIO_SCREEN_TEXT = (byte*) 1024
(const nomodify byte) CONIO_TEXTCOLOR_DEFAULT = (byte) $e
(void()) clrscr()
(label) clrscr::@1
(label) clrscr::@2
(label) clrscr::@3
(label) clrscr::@4
(label) clrscr::@5
(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]:4 667.3333333333334
(byte*) clrscr::line_text#5 line_text zp[2]:4 1714.7142857142858
(byte*) conio_cursor_color loadstore zp[2]:10 4058.3818181818187
(byte*) conio_cursor_text loadstore zp[2]:8 3848.465517241379
(byte) conio_cursor_x loadstore zp[1]:6 494.0816326530612
(byte) conio_cursor_y loadstore zp[1]:7 4809.283582089552
(void()) cputc((byte) cputc::c)
(label) cputc::@1
(label) cputc::@2
(label) cputc::@3
(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()) cputln()
(byte*~) cputln::$1 zp[2]:8 20002.0
(byte*~) cputln::$2 zp[2]:10 20002.0
(label) cputln::@return
(word) cputln::ln_offset
(word) cputln::ln_offset#0 ln_offset zp[2]:14 10001.0
(void()) cscroll()
(byte*~) cscroll::$7 zp[2]:8 200002.0
(byte*~) cscroll::$8 zp[2]:10 200002.0
(label) cscroll::@1
(label) cscroll::@2
(label) cscroll::@3
(label) cscroll::@4
(label) cscroll::@5
(label) cscroll::@return
(void()) gotoxy((byte) gotoxy::x , (byte) gotoxy::y)
(word~) gotoxy::$10 zp[2]:10 202.0
(byte*~) gotoxy::$6 zp[2]:8 202.0
(byte*~) gotoxy::$7 zp[2]:10 202.0
(word~) gotoxy::$8 zp[2]:10 151.5
(word~) gotoxy::$9 zp[2]:14 202.0
(label) gotoxy::@1
(label) gotoxy::@2
(label) gotoxy::@3
(label) gotoxy::@return
(word) gotoxy::offset
(word) gotoxy::offset#0 offset zp[2]:10 101.0
(byte) gotoxy::x
(const byte) gotoxy::x#2 x = (byte) 0
(byte) gotoxy::y
(byte) gotoxy::y#2 reg byte x 71.0
(byte) gotoxy::y#4 reg byte x 67.33333333333333
(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 c zp[1]:2 151.5
(byte) main::c#2 c zp[1]:2 101.0
(byte) main::c1
(byte) main::c1#1 c1 zp[1]:3 151.5
(byte) main::c1#2 c1 zp[1]:3 50.5
(label) main::wherey1
(byte) main::wherey1_return
(byte) main::wherey1_return#0 reg byte x 22.0
(void*()) memcpy((void*) memcpy::destination , (void*) memcpy::source , (word) memcpy::num)
(label) memcpy::@1
(label) memcpy::@2
(label) memcpy::@return
(void*) memcpy::destination
(void*) memcpy::destination#2 destination zp[2]:4
(byte*) memcpy::dst
(byte*) memcpy::dst#1 dst zp[2]:4 1.00000001E8
(byte*) memcpy::dst#2 dst zp[2]:4 1.0033333466666667E8
(byte*) memcpy::dst#4 dst zp[2]:4 2000002.0
(word) memcpy::num
(void*) memcpy::return
(void*) memcpy::source
(void*) memcpy::source#2 source zp[2]:14
(byte*) memcpy::src
(byte*) memcpy::src#1 src zp[2]:14 2.00000002E8
(byte*) memcpy::src#2 src zp[2]:14 1.0025000125E8
(byte*) memcpy::src#4 src zp[2]:14 1000001.0
(byte*) memcpy::src_end
(byte*) memcpy::src_end#0 src_end zp[2]:12 1.262500025E7
(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num)
(label) memset::@1
(label) memset::@2
(label) memset::@3
(label) memset::@return
(byte) memset::c
(byte) memset::c#4 reg byte x 1.428571442857143E7
(byte*) memset::dst
(byte*) memset::dst#1 dst zp[2]:14 2.00000002E8
(byte*) memset::dst#2 dst zp[2]:14 1.3366666833333334E8
(byte*) memset::dst#4 dst zp[2]:14 2000002.0
(byte*) memset::end
(byte*) memset::end#0 end zp[2]:12 1.6833333666666668E7
(word) memset::num
(void*) memset::return
(void*) memset::str
(void*) memset::str#3 str zp[2]:14
(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
zp[1]:2 [ main::c#2 main::c#1 ]
zp[1]:3 [ main::c1#2 main::c1#1 ]
reg byte a [ cputc::c#2 cputc::c#0 cputc::c#1 ]
reg byte x [ memset::c#4 ]
reg byte a [ toupper::return#2 toupper::return#0 toupper::ch#0 ]
reg byte x [ gotoxy::y#4 gotoxy::y#2 ]
reg byte x [ clrscr::l#2 clrscr::l#1 ]
zp[2]:4 [ clrscr::line_text#5 clrscr::line_text#1 memcpy::destination#2 memcpy::dst#2 memcpy::dst#4 memcpy::dst#1 ]
reg byte y [ clrscr::c#2 clrscr::c#1 ]
zp[1]:6 [ conio_cursor_x ]
zp[1]:7 [ conio_cursor_y ]
zp[2]:8 [ conio_cursor_text cputln::$1 cscroll::$7 gotoxy::$6 clrscr::line_cols#5 clrscr::line_cols#1 ]
zp[2]:10 [ conio_cursor_color cputln::$2 cscroll::$8 gotoxy::$7 gotoxy::offset#0 gotoxy::$8 gotoxy::$10 ]
reg byte x [ main::wherey1_return#0 ]
reg byte a [ toupper::return#3 ]
zp[2]:12 [ memcpy::src_end#0 memset::end#0 ]
zp[2]:14 [ gotoxy::$9 cputln::ln_offset#0 memcpy::source#2 memcpy::src#2 memcpy::src#4 memcpy::src#1 memset::str#3 memset::dst#2 memset::dst#4 memset::dst#1 ]
FINAL ASSEMBLER
Score: 14632
// File Comments
// Test toupper()
// Upstart
.pc = $801 "Basic"
:BasicUpstart(__bbegin)
.pc = $80d "Program"
// Global Constants & labels
// The default text color
.const CONIO_TEXTCOLOR_DEFAULT = $e
// The screen width
// The screen height
// The screen bytes
// The text screen address
.label CONIO_SCREEN_TEXT = $400
// The color screen address
.label CONIO_SCREEN_COLORS = $d800
.label conio_cursor_x = 6
.label conio_cursor_y = 7
.label conio_cursor_text = 8
.label conio_cursor_color = $a
// @begin
__bbegin:
// @1
// conio_cursor_x = 0
// [1] (byte) conio_cursor_x ← (byte) 0 -- vbuz1=vbuc1
// The current cursor x-position
lda #0
sta.z conio_cursor_x
// conio_cursor_y = 0
// [2] (byte) conio_cursor_y ← (byte) 0 -- vbuz1=vbuc1
// The current cursor y-position
sta.z conio_cursor_y
// conio_cursor_text = CONIO_SCREEN_TEXT
// [3] (byte*) conio_cursor_text ← (const nomodify byte*) CONIO_SCREEN_TEXT -- pbuz1=pbuc1
// The current cursor address
lda #<CONIO_SCREEN_TEXT
sta.z conio_cursor_text
lda #>CONIO_SCREEN_TEXT
sta.z conio_cursor_text+1
// conio_cursor_color = CONIO_SCREEN_COLORS
// [4] (byte*) conio_cursor_color ← (const nomodify byte*) CONIO_SCREEN_COLORS -- pbuz1=pbuc1
// The current cursor address
lda #<CONIO_SCREEN_COLORS
sta.z conio_cursor_color
lda #>CONIO_SCREEN_COLORS
sta.z conio_cursor_color+1
// [5] phi from @1 to @2 [phi:@1->@2]
// @2
// [6] call main
jsr main
rts
// [7] phi from @2 to @end [phi:@2->@end]
// @end
// main
main: {
.label c = 2
.label c1 = 3
// *((char*)0xd018) = 0x17
// [8] *((byte*) 53272) ← (byte) $17 -- _deref_pbuc1=vbuc2
// Show mixed chars on screen
lda #$17
sta $d018
// clrscr()
// [9] call clrscr
// Clear screen
// [102] phi from main to clrscr [phi:main->clrscr]
jsr clrscr
// [10] phi from main to main::@1 [phi:main->main::@1]
// [10] phi (byte) main::c#2 = (byte) 0 [phi:main->main::@1#0] -- vbuz1=vbuc1
lda #0
sta.z c
// Output un-modified chars
// [10] phi from main::@4 to main::@1 [phi:main::@4->main::@1]
// [10] phi (byte) main::c#2 = (byte) main::c#1 [phi:main::@4->main::@1#0] -- register_copy
// main::@1
__b1:
// cputc(c)
// [11] (byte) cputc::c#0 ← (byte) main::c#2 -- vbuaa=vbuz1
lda.z c
// [12] call cputc
// [27] phi from main::@1 to cputc [phi:main::@1->cputc]
// [27] phi (byte) cputc::c#2 = (byte) cputc::c#0 [phi:main::@1->cputc#0] -- register_copy
jsr cputc
// main::@4
// for(char c:0..0xff)
// [13] (byte) main::c#1 ← ++ (byte) main::c#2 -- vbuz1=_inc_vbuz1
inc.z c
// [14] if((byte) main::c#1!=(byte) 0) goto main::@1 -- vbuz1_neq_0_then_la1
lda.z c
cmp #0
bne __b1
// main::wherey1
// return conio_cursor_y;
// [15] (byte) main::wherey1_return#0 ← (byte) conio_cursor_y -- vbuxx=vbuz1
ldx.z conio_cursor_y
// main::@3
// gotoxy(0, wherey()+2)
// [16] (byte) gotoxy::y#2 ← (byte) main::wherey1_return#0 + (byte) 2 -- vbuxx=vbuxx_plus_2
inx
inx
// [17] call gotoxy
jsr gotoxy
// [18] phi from main::@3 to main::@2 [phi:main::@3->main::@2]
// [18] phi (byte) main::c1#2 = (byte) 0 [phi:main::@3->main::@2#0] -- vbuz1=vbuc1
lda #0
sta.z c1
// Output toupper-chars chars
// [18] phi from main::@6 to main::@2 [phi:main::@6->main::@2]
// [18] phi (byte) main::c1#2 = (byte) main::c1#1 [phi:main::@6->main::@2#0] -- register_copy
// main::@2
__b2:
// toupper(c)
// [19] (byte) toupper::ch#0 ← (byte) main::c1#2 -- vbuaa=vbuz1
lda.z c1
// [20] call toupper
jsr toupper
// [21] (byte) toupper::return#3 ← (byte) toupper::return#2
// main::@5
// cputc(toupper(c))
// [22] (byte) cputc::c#1 ← (byte) toupper::return#3
// [23] call cputc
// [27] phi from main::@5 to cputc [phi:main::@5->cputc]
// [27] phi (byte) cputc::c#2 = (byte) cputc::c#1 [phi:main::@5->cputc#0] -- register_copy
jsr cputc
// main::@6
// for(char c:0..0xff)
// [24] (byte) main::c1#1 ← ++ (byte) main::c1#2 -- vbuz1=_inc_vbuz1
inc.z c1
// [25] if((byte) main::c1#1!=(byte) 0) goto main::@2 -- vbuz1_neq_0_then_la1
lda.z c1
cmp #0
bne __b2
// main::@return
// }
// [26] return
rts
}
// cputc
// 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')
// [28] if((byte) cputc::c#2==(byte) ' ') goto cputc::@1 -- vbuaa_eq_vbuc1_then_la1
cmp #'\n'
beq __b1
// cputc::@2
// *conio_cursor_text++ = c
// [29] *((byte*) conio_cursor_text) ← (byte) cputc::c#2 -- _deref_pbuz1=vbuaa
ldy #0
sta (conio_cursor_text),y
// *conio_cursor_text++ = c;
// [30] (byte*) conio_cursor_text ← ++ (byte*) conio_cursor_text -- pbuz1=_inc_pbuz1
inc.z conio_cursor_text
bne !+
inc.z conio_cursor_text+1
!:
// *conio_cursor_color++ = conio_textcolor
// [31] *((byte*) conio_cursor_color) ← (const nomodify byte) CONIO_TEXTCOLOR_DEFAULT -- _deref_pbuz1=vbuc1
lda #CONIO_TEXTCOLOR_DEFAULT
ldy #0
sta (conio_cursor_color),y
// *conio_cursor_color++ = conio_textcolor;
// [32] (byte*) conio_cursor_color ← ++ (byte*) conio_cursor_color -- pbuz1=_inc_pbuz1
inc.z conio_cursor_color
bne !+
inc.z conio_cursor_color+1
!:
// if(++conio_cursor_x==CONIO_WIDTH)
// [33] (byte) conio_cursor_x ← ++ (byte) conio_cursor_x -- vbuz1=_inc_vbuz1
inc.z conio_cursor_x
// [34] if((byte) conio_cursor_x!=(byte) $28) goto cputc::@return -- vbuz1_neq_vbuc1_then_la1
lda #$28
cmp.z conio_cursor_x
bne __breturn
// cputc::@3
// conio_cursor_x = 0
// [35] (byte) conio_cursor_x ← (byte) 0 -- vbuz1=vbuc1
lda #0
sta.z conio_cursor_x
// ++conio_cursor_y;
// [36] (byte) conio_cursor_y ← ++ (byte) conio_cursor_y -- vbuz1=_inc_vbuz1
inc.z conio_cursor_y
// cscroll()
// [37] call cscroll
jsr cscroll
// cputc::@return
__breturn:
// }
// [38] return
rts
// [39] phi from cputc to cputc::@1 [phi:cputc->cputc::@1]
// cputc::@1
__b1:
// cputln()
// [40] call cputln
jsr cputln
rts
}
// cputln
// Print a newline
cputln: {
.label __1 = 8
.label __2 = $a
.label ln_offset = $e
// ln_offset = CONIO_WIDTH - conio_cursor_x
// [41] (word) cputln::ln_offset#0 ← (byte) $28 - (byte) conio_cursor_x -- vwuz1=vbuc1_minus_vbuz2
sec
lda #$28
sbc.z conio_cursor_x
sta.z ln_offset
lda #0
sbc #0
sta.z ln_offset+1
// conio_cursor_text + ln_offset
// [42] (byte*~) cputln::$1 ← (byte*) conio_cursor_text + (word) cputln::ln_offset#0 -- pbuz1=pbuz1_plus_vwuz2
lda.z __1
clc
adc.z ln_offset
sta.z __1
lda.z __1+1
adc.z ln_offset+1
sta.z __1+1
// conio_cursor_text = conio_cursor_text + ln_offset
// [43] (byte*) conio_cursor_text ← (byte*~) cputln::$1
// conio_cursor_color + ln_offset
// [44] (byte*~) cputln::$2 ← (byte*) conio_cursor_color + (word) cputln::ln_offset#0 -- pbuz1=pbuz1_plus_vwuz2
lda.z __2
clc
adc.z ln_offset
sta.z __2
lda.z __2+1
adc.z ln_offset+1
sta.z __2+1
// conio_cursor_color = conio_cursor_color + ln_offset
// [45] (byte*) conio_cursor_color ← (byte*~) cputln::$2
// conio_cursor_x = 0
// [46] (byte) conio_cursor_x ← (byte) 0 -- vbuz1=vbuc1
lda #0
sta.z conio_cursor_x
// conio_cursor_y++;
// [47] (byte) conio_cursor_y ← ++ (byte) conio_cursor_y -- vbuz1=_inc_vbuz1
inc.z conio_cursor_y
// cscroll()
// [48] call cscroll
jsr cscroll
// cputln::@return
// }
// [49] return
rts
}
// cscroll
// Scroll the entire screen if the cursor is beyond the last line
cscroll: {
.label __7 = 8
.label __8 = $a
// if(conio_cursor_y==CONIO_HEIGHT)
// [50] if((byte) conio_cursor_y!=(byte) $19) goto cscroll::@return -- vbuz1_neq_vbuc1_then_la1
lda #$19
cmp.z conio_cursor_y
bne __breturn
// [51] phi from cscroll to cscroll::@1 [phi:cscroll->cscroll::@1]
// cscroll::@1
// memcpy(CONIO_SCREEN_TEXT, CONIO_SCREEN_TEXT+CONIO_WIDTH, CONIO_BYTES-CONIO_WIDTH)
// [52] call memcpy
// [73] phi from cscroll::@1 to memcpy [phi:cscroll::@1->memcpy]
// [73] phi (void*) memcpy::destination#2 = (void*)(const nomodify byte*) CONIO_SCREEN_TEXT [phi:cscroll::@1->memcpy#0] -- pvoz1=pvoc1
lda #<CONIO_SCREEN_TEXT
sta.z memcpy.destination
lda #>CONIO_SCREEN_TEXT
sta.z memcpy.destination+1
// [73] phi (void*) memcpy::source#2 = (void*)(const nomodify byte*) CONIO_SCREEN_TEXT+(byte) $28 [phi:cscroll::@1->memcpy#1] -- pvoz1=pvoc1
lda #<CONIO_SCREEN_TEXT+$28
sta.z memcpy.source
lda #>CONIO_SCREEN_TEXT+$28
sta.z memcpy.source+1
jsr memcpy
// [53] phi from cscroll::@1 to cscroll::@2 [phi:cscroll::@1->cscroll::@2]
// cscroll::@2
// memcpy(CONIO_SCREEN_COLORS, CONIO_SCREEN_COLORS+CONIO_WIDTH, CONIO_BYTES-CONIO_WIDTH)
// [54] call memcpy
// [73] phi from cscroll::@2 to memcpy [phi:cscroll::@2->memcpy]
// [73] phi (void*) memcpy::destination#2 = (void*)(const nomodify byte*) CONIO_SCREEN_COLORS [phi:cscroll::@2->memcpy#0] -- pvoz1=pvoc1
lda #<CONIO_SCREEN_COLORS
sta.z memcpy.destination
lda #>CONIO_SCREEN_COLORS
sta.z memcpy.destination+1
// [73] phi (void*) memcpy::source#2 = (void*)(const nomodify byte*) CONIO_SCREEN_COLORS+(byte) $28 [phi:cscroll::@2->memcpy#1] -- pvoz1=pvoc1
lda #<CONIO_SCREEN_COLORS+$28
sta.z memcpy.source
lda #>CONIO_SCREEN_COLORS+$28
sta.z memcpy.source+1
jsr memcpy
// [55] phi from cscroll::@2 to cscroll::@3 [phi:cscroll::@2->cscroll::@3]
// cscroll::@3
// memset(CONIO_SCREEN_TEXT+CONIO_BYTES-CONIO_WIDTH, ' ', CONIO_WIDTH)
// [56] call memset
// [65] phi from cscroll::@3 to memset [phi:cscroll::@3->memset]
// [65] phi (byte) memset::c#4 = (byte) ' ' [phi:cscroll::@3->memset#0] -- vbuxx=vbuc1
ldx #' '
// [65] phi (void*) memset::str#3 = (void*)(const nomodify byte*) CONIO_SCREEN_TEXT+(word)(number) $19*(number) $28-(byte) $28 [phi:cscroll::@3->memset#1] -- pvoz1=pvoc1
lda #<CONIO_SCREEN_TEXT+$19*$28-$28
sta.z memset.str
lda #>CONIO_SCREEN_TEXT+$19*$28-$28
sta.z memset.str+1
jsr memset
// [57] phi from cscroll::@3 to cscroll::@4 [phi:cscroll::@3->cscroll::@4]
// cscroll::@4
// memset(CONIO_SCREEN_COLORS+CONIO_BYTES-CONIO_WIDTH, conio_textcolor, CONIO_WIDTH)
// [58] call memset
// [65] phi from cscroll::@4 to memset [phi:cscroll::@4->memset]
// [65] phi (byte) memset::c#4 = (const nomodify byte) CONIO_TEXTCOLOR_DEFAULT [phi:cscroll::@4->memset#0] -- vbuxx=vbuc1
ldx #CONIO_TEXTCOLOR_DEFAULT
// [65] phi (void*) memset::str#3 = (void*)(const nomodify byte*) CONIO_SCREEN_COLORS+(word)(number) $19*(number) $28-(byte) $28 [phi:cscroll::@4->memset#1] -- pvoz1=pvoc1
lda #<CONIO_SCREEN_COLORS+$19*$28-$28
sta.z memset.str
lda #>CONIO_SCREEN_COLORS+$19*$28-$28
sta.z memset.str+1
jsr memset
// cscroll::@5
// conio_cursor_text-CONIO_WIDTH
// [59] (byte*~) cscroll::$7 ← (byte*) conio_cursor_text - (byte) $28 -- pbuz1=pbuz1_minus_vwuc1
lda.z __7
sec
sbc #<$28
sta.z __7
lda.z __7+1
sbc #>$28
sta.z __7+1
// conio_cursor_text = conio_cursor_text-CONIO_WIDTH
// [60] (byte*) conio_cursor_text ← (byte*~) cscroll::$7
// conio_cursor_color-CONIO_WIDTH
// [61] (byte*~) cscroll::$8 ← (byte*) conio_cursor_color - (byte) $28 -- pbuz1=pbuz1_minus_vwuc1
lda.z __8
sec
sbc #<$28
sta.z __8
lda.z __8+1
sbc #>$28
sta.z __8+1
// conio_cursor_color = conio_cursor_color-CONIO_WIDTH
// [62] (byte*) conio_cursor_color ← (byte*~) cscroll::$8
// conio_cursor_y--;
// [63] (byte) conio_cursor_y ← -- (byte) conio_cursor_y -- vbuz1=_dec_vbuz1
dec.z conio_cursor_y
// cscroll::@return
__breturn:
// }
// [64] return
rts
}
// memset
// Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str.
// memset(void* zp($e) str, byte register(X) c)
memset: {
.label end = $c
.label dst = $e
.label str = $e
// memset::@1
// end = (char*)str + num
// [66] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (byte) $28 -- pbuz1=pbuz2_plus_vbuc1
lda #$28
clc
adc.z str
sta.z end
lda #0
adc.z str+1
sta.z end+1
// [67] (byte*) memset::dst#4 ← (byte*)(void*) memset::str#3
// [68] phi from memset::@1 memset::@3 to memset::@2 [phi:memset::@1/memset::@3->memset::@2]
// [68] phi (byte*) memset::dst#2 = (byte*) memset::dst#4 [phi:memset::@1/memset::@3->memset::@2#0] -- register_copy
// memset::@2
__b2:
// for(char* dst = str; dst!=end; dst++)
// [69] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@3 -- pbuz1_neq_pbuz2_then_la1
lda.z dst+1
cmp.z end+1
bne __b3
lda.z dst
cmp.z end
bne __b3
// memset::@return
// }
// [70] return
rts
// memset::@3
__b3:
// *dst = c
// [71] *((byte*) memset::dst#2) ← (byte) memset::c#4 -- _deref_pbuz1=vbuxx
txa
ldy #0
sta (dst),y
// for(char* dst = str; dst!=end; dst++)
// [72] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 -- pbuz1=_inc_pbuz1
inc.z dst
bne !+
inc.z dst+1
!:
jmp __b2
}
// memcpy
// 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(4) destination, void* zp($e) source)
memcpy: {
.label src_end = $c
.label dst = 4
.label src = $e
.label source = $e
.label destination = 4
// src_end = (char*)source+num
// [74] (byte*) memcpy::src_end#0 ← (byte*)(void*) memcpy::source#2 + (word)(number) $19*(number) $28-(number) $28 -- pbuz1=pbuz2_plus_vwuc1
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
// [75] (byte*) memcpy::src#4 ← (byte*)(void*) memcpy::source#2
// [76] (byte*) memcpy::dst#4 ← (byte*)(void*) memcpy::destination#2
// [77] phi from memcpy memcpy::@2 to memcpy::@1 [phi:memcpy/memcpy::@2->memcpy::@1]
// [77] phi (byte*) memcpy::dst#2 = (byte*) memcpy::dst#4 [phi:memcpy/memcpy::@2->memcpy::@1#0] -- register_copy
// [77] phi (byte*) memcpy::src#2 = (byte*) memcpy::src#4 [phi:memcpy/memcpy::@2->memcpy::@1#1] -- register_copy
// memcpy::@1
__b1:
// while(src!=src_end)
// [78] if((byte*) memcpy::src#2!=(byte*) memcpy::src_end#0) goto memcpy::@2 -- pbuz1_neq_pbuz2_then_la1
lda.z src+1
cmp.z src_end+1
bne __b2
lda.z src
cmp.z src_end
bne __b2
// memcpy::@return
// }
// [79] return
rts
// memcpy::@2
__b2:
// *dst++ = *src++
// [80] *((byte*) memcpy::dst#2) ← *((byte*) memcpy::src#2) -- _deref_pbuz1=_deref_pbuz2
ldy #0
lda (src),y
sta (dst),y
// *dst++ = *src++;
// [81] (byte*) memcpy::dst#1 ← ++ (byte*) memcpy::dst#2 -- pbuz1=_inc_pbuz1
inc.z dst
bne !+
inc.z dst+1
!:
// [82] (byte*) memcpy::src#1 ← ++ (byte*) memcpy::src#2 -- pbuz1=_inc_pbuz1
inc.z src
bne !+
inc.z src+1
!:
jmp __b1
}
// toupper
// 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')
// [83] if((byte) toupper::ch#0<(byte) 'a') goto toupper::@return -- vbuaa_lt_vbuc1_then_la1
cmp #'a'
bcc __breturn
// toupper::@2
// [84] if((byte) toupper::ch#0<=(byte) 'z') goto toupper::@1 -- vbuaa_le_vbuc1_then_la1
cmp #'z'
bcc __b1
beq __b1
// [86] phi from toupper toupper::@1 toupper::@2 to toupper::@return [phi:toupper/toupper::@1/toupper::@2->toupper::@return]
// [86] phi (byte) toupper::return#2 = (byte) toupper::ch#0 [phi:toupper/toupper::@1/toupper::@2->toupper::@return#0] -- register_copy
rts
// toupper::@1
__b1:
// return ch + ('A'-'a');
// [85] (byte) toupper::return#0 ← (byte) toupper::ch#0 + (byte) 'A'-(byte) 'a' -- vbuaa=vbuaa_plus_vbuc1
clc
adc #'A'-'a'
// toupper::@return
__breturn:
// }
// [87] return
rts
}
// gotoxy
// Set the cursor to the specified position
// gotoxy(byte register(X) y)
gotoxy: {
.const x = 0
.label __6 = 8
.label __7 = $a
.label __8 = $a
.label offset = $a
.label __9 = $e
.label __10 = $a
// if(y>CONIO_HEIGHT)
// [88] if((byte) gotoxy::y#2<(byte) $19+(byte) 1) goto gotoxy::@3 -- vbuxx_lt_vbuc1_then_la1
cpx #$19+1
bcc __b2
// [90] phi from gotoxy to gotoxy::@1 [phi:gotoxy->gotoxy::@1]
// [90] phi (byte) gotoxy::y#4 = (byte) 0 [phi:gotoxy->gotoxy::@1#0] -- vbuxx=vbuc1
ldx #0
// [89] phi from gotoxy to gotoxy::@3 [phi:gotoxy->gotoxy::@3]
// gotoxy::@3
// [90] phi from gotoxy::@3 to gotoxy::@1 [phi:gotoxy::@3->gotoxy::@1]
// [90] phi (byte) gotoxy::y#4 = (byte) gotoxy::y#2 [phi:gotoxy::@3->gotoxy::@1#0] -- register_copy
// gotoxy::@1
// gotoxy::@2
__b2:
// conio_cursor_x = x
// [91] (byte) conio_cursor_x ← (const byte) gotoxy::x#2 -- vbuz1=vbuc1
lda #x
sta.z conio_cursor_x
// conio_cursor_y = y
// [92] (byte) conio_cursor_y ← (byte) gotoxy::y#4 -- vbuz1=vbuxx
stx.z conio_cursor_y
// (unsigned int)y*CONIO_WIDTH
// [93] (word~) gotoxy::$8 ← (word)(byte) gotoxy::y#4 -- vwuz1=_word_vbuxx
txa
sta.z __8
lda #0
sta.z __8+1
// offset = (unsigned int)y*CONIO_WIDTH + x
// [94] (word~) gotoxy::$9 ← (word~) gotoxy::$8 << (byte) 2 -- vwuz1=vwuz2_rol_2
lda.z __8
asl
sta.z __9
lda.z __8+1
rol
sta.z __9+1
asl.z __9
rol.z __9+1
// [95] (word~) gotoxy::$10 ← (word~) gotoxy::$9 + (word~) gotoxy::$8 -- vwuz1=vwuz2_plus_vwuz1
lda.z __10
clc
adc.z __9
sta.z __10
lda.z __10+1
adc.z __9+1
sta.z __10+1
// [96] (word) gotoxy::offset#0 ← (word~) gotoxy::$10 << (byte) 3 -- vwuz1=vwuz1_rol_3
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
// [97] (byte*~) gotoxy::$6 ← (const nomodify byte*) CONIO_SCREEN_TEXT + (word) gotoxy::offset#0 -- pbuz1=pbuc1_plus_vwuz2
lda.z offset
clc
adc #<CONIO_SCREEN_TEXT
sta.z __6
lda.z offset+1
adc #>CONIO_SCREEN_TEXT
sta.z __6+1
// conio_cursor_text = CONIO_SCREEN_TEXT + offset
// [98] (byte*) conio_cursor_text ← (byte*~) gotoxy::$6
// CONIO_SCREEN_COLORS + offset
// [99] (byte*~) gotoxy::$7 ← (const nomodify byte*) CONIO_SCREEN_COLORS + (word) gotoxy::offset#0 -- pbuz1=pbuc1_plus_vwuz1
clc
lda.z __7
adc #<CONIO_SCREEN_COLORS
sta.z __7
lda.z __7+1
adc #>CONIO_SCREEN_COLORS
sta.z __7+1
// conio_cursor_color = CONIO_SCREEN_COLORS + offset
// [100] (byte*) conio_cursor_color ← (byte*~) gotoxy::$7
// gotoxy::@return
// }
// [101] return
rts
}
// clrscr
// clears the screen and moves the cursor to the upper left-hand corner of the screen.
clrscr: {
.label line_text = 4
.label line_cols = 8
// [103] phi from clrscr to clrscr::@1 [phi:clrscr->clrscr::@1]
// [103] phi (byte*) clrscr::line_cols#5 = (const nomodify byte*) CONIO_SCREEN_COLORS [phi:clrscr->clrscr::@1#0] -- pbuz1=pbuc1
lda #<CONIO_SCREEN_COLORS
sta.z line_cols
lda #>CONIO_SCREEN_COLORS
sta.z line_cols+1
// [103] phi (byte*) clrscr::line_text#5 = (const nomodify byte*) CONIO_SCREEN_TEXT [phi:clrscr->clrscr::@1#1] -- pbuz1=pbuc1
lda #<CONIO_SCREEN_TEXT
sta.z line_text
lda #>CONIO_SCREEN_TEXT
sta.z line_text+1
// [103] phi (byte) clrscr::l#2 = (byte) 0 [phi:clrscr->clrscr::@1#2] -- vbuxx=vbuc1
ldx #0
// clrscr::@1
__b1:
// for( char l=0;l<CONIO_HEIGHT; l++ )
// [104] if((byte) clrscr::l#2<(byte) $19) goto clrscr::@3 -- vbuxx_lt_vbuc1_then_la1
cpx #$19
bcc __b2
// clrscr::@2
// conio_cursor_x = 0
// [105] (byte) conio_cursor_x ← (byte) 0 -- vbuz1=vbuc1
lda #0
sta.z conio_cursor_x
// conio_cursor_y = 0
// [106] (byte) conio_cursor_y ← (byte) 0 -- vbuz1=vbuc1
sta.z conio_cursor_y
// conio_cursor_text = CONIO_SCREEN_TEXT
// [107] (byte*) conio_cursor_text ← (const nomodify byte*) CONIO_SCREEN_TEXT -- pbuz1=pbuc1
lda #<CONIO_SCREEN_TEXT
sta.z conio_cursor_text
lda #>CONIO_SCREEN_TEXT
sta.z conio_cursor_text+1
// conio_cursor_color = CONIO_SCREEN_COLORS
// [108] (byte*) conio_cursor_color ← (const nomodify byte*) CONIO_SCREEN_COLORS -- pbuz1=pbuc1
lda #<CONIO_SCREEN_COLORS
sta.z conio_cursor_color
lda #>CONIO_SCREEN_COLORS
sta.z conio_cursor_color+1
// clrscr::@return
// }
// [109] return
rts
// [110] phi from clrscr::@1 to clrscr::@3 [phi:clrscr::@1->clrscr::@3]
__b2:
// [110] phi (byte) clrscr::c#2 = (byte) 0 [phi:clrscr::@1->clrscr::@3#0] -- vbuyy=vbuc1
ldy #0
// clrscr::@3
__b3:
// for( char c=0;c<CONIO_WIDTH; c++ )
// [111] if((byte) clrscr::c#2<(byte) $28) goto clrscr::@4 -- vbuyy_lt_vbuc1_then_la1
cpy #$28
bcc __b4
// clrscr::@5
// line_text += CONIO_WIDTH
// [112] (byte*) clrscr::line_text#1 ← (byte*) clrscr::line_text#5 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1
lda #$28
clc
adc.z line_text
sta.z line_text
bcc !+
inc.z line_text+1
!:
// line_cols += CONIO_WIDTH
// [113] (byte*) clrscr::line_cols#1 ← (byte*) clrscr::line_cols#5 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1
lda #$28
clc
adc.z line_cols
sta.z line_cols
bcc !+
inc.z line_cols+1
!:
// for( char l=0;l<CONIO_HEIGHT; l++ )
// [114] (byte) clrscr::l#1 ← ++ (byte) clrscr::l#2 -- vbuxx=_inc_vbuxx
inx
// [103] phi from clrscr::@5 to clrscr::@1 [phi:clrscr::@5->clrscr::@1]
// [103] phi (byte*) clrscr::line_cols#5 = (byte*) clrscr::line_cols#1 [phi:clrscr::@5->clrscr::@1#0] -- register_copy
// [103] phi (byte*) clrscr::line_text#5 = (byte*) clrscr::line_text#1 [phi:clrscr::@5->clrscr::@1#1] -- register_copy
// [103] phi (byte) clrscr::l#2 = (byte) clrscr::l#1 [phi:clrscr::@5->clrscr::@1#2] -- register_copy
jmp __b1
// clrscr::@4
__b4:
// line_text[c] = ' '
// [115] *((byte*) clrscr::line_text#5 + (byte) clrscr::c#2) ← (byte) ' ' -- pbuz1_derefidx_vbuyy=vbuc1
lda #' '
sta (line_text),y
// line_cols[c] = conio_textcolor
// [116] *((byte*) clrscr::line_cols#5 + (byte) clrscr::c#2) ← (const nomodify byte) CONIO_TEXTCOLOR_DEFAULT -- pbuz1_derefidx_vbuyy=vbuc1
lda #CONIO_TEXTCOLOR_DEFAULT
sta (line_cols),y
// for( char c=0;c<CONIO_WIDTH; c++ )
// [117] (byte) clrscr::c#1 ← ++ (byte) clrscr::c#2 -- vbuyy=_inc_vbuyy
iny
// [110] phi from clrscr::@4 to clrscr::@3 [phi:clrscr::@4->clrscr::@3]
// [110] phi (byte) clrscr::c#2 = (byte) clrscr::c#1 [phi:clrscr::@4->clrscr::@3#0] -- register_copy
jmp __b3
}
// File Data