Fixing struct type size struct F018_DMAGIC to 17
Fixing struct type size struct printf_buffer_number to 12
Fixing struct type size struct printf_buffer_number to 12
Fixing struct type size struct printf_buffer_number to 12
Fixing struct type SIZE_OF struct F018_DMAGIC to 17
Fixing struct type SIZE_OF struct printf_buffer_number to 12
Fixing struct type SIZE_OF struct F018_DMAGIC to 17
Fixing struct type SIZE_OF struct printf_buffer_number to 12
Setting inferred __stackcall on procedure affected by address-of __stackcall void cputc(char c) caused by statement call printf_str(&cputc, "hello world!")
Setting inferred volatile on symbol affected by address-of: memoryRemap::aVal in asm { ldaaVal ldxxVal ldyyVal ldzzVal map eom  }
Setting inferred volatile on symbol affected by address-of: memoryRemap::xVal in asm { ldaaVal ldxxVal ldyyVal ldzzVal map eom  }
Setting inferred volatile on symbol affected by address-of: memoryRemap::yVal in asm { ldaaVal ldxxVal ldyyVal ldzzVal map eom  }
Setting inferred volatile on symbol affected by address-of: memoryRemap::zVal in asm { ldaaVal ldxxVal ldyyVal ldzzVal map eom  }
Setting inferred volatile on symbol affected by address-of: memoryRemap256M::lMb in asm { ldalMb ldx#$0f ldyuMb ldz#$0f map ldaaVal ldxxVal ldyyVal ldzzVal map eom  }
Setting inferred volatile on symbol affected by address-of: memoryRemap256M::uMb in asm { ldalMb ldx#$0f ldyuMb ldz#$0f map ldaaVal ldxxVal ldyyVal ldzzVal map eom  }
Setting inferred volatile on symbol affected by address-of: memoryRemap256M::aVal in asm { ldalMb ldx#$0f ldyuMb ldz#$0f map ldaaVal ldxxVal ldyyVal ldzzVal map eom  }
Setting inferred volatile on symbol affected by address-of: memoryRemap256M::xVal in asm { ldalMb ldx#$0f ldyuMb ldz#$0f map ldaaVal ldxxVal ldyyVal ldzzVal map eom  }
Setting inferred volatile on symbol affected by address-of: memoryRemap256M::yVal in asm { ldalMb ldx#$0f ldyuMb ldz#$0f map ldaaVal ldxxVal ldyyVal ldzzVal map eom  }
Setting inferred volatile on symbol affected by address-of: memoryRemap256M::zVal in asm { ldalMb ldx#$0f ldyuMb ldz#$0f map ldaaVal ldxxVal ldyyVal ldzzVal map eom  }
Adding parameter assignment in __stackcall procedure cputc::c = param(cputc::c)
Inlined call vicSelectGfxBank::$0 = call toDd00(vicSelectGfxBank::gfx)
Inlined call call SEI
Inlined call call __init
Eliminating unused variable with no statement memcpy::$0
Eliminating unused variable with no statement memset::$2
Eliminating unused variable with no statement gotoxy::$4
Eliminating unused variable with no statement memoryRemap::$0
Eliminating unused variable with no statement memoryRemap::$4
Eliminating unused variable with no statement memoryRemap::$5
Eliminating unused variable with no statement memoryRemap::$9
Eliminating unused variable with no statement conio_mega65_init::$2
Eliminating unused variable with no statement printf_buffer
Eliminating unused variable with no statement main::$0
Calling convention STACK_CALL adding prepare/execute/finalize for call *printf_str::putc printf_str::c 
Calling convention STACK_CALL replacing param(cputc::c) with stackidx(char,cputc::OFFSET_STACK_C)
Calling convention STACK_CALL adding stack push stackpush(char) = printf_str::c

CONTROL FLOW GRAPH SSA

void * memcpy(void *destination , void *source , unsigned int num)
memcpy: scope:[memcpy]  from cscroll::@3 cscroll::@4
  memcpy::num#2 = phi( cscroll::@3/memcpy::num#0, cscroll::@4/memcpy::num#1 )
  memcpy::destination#2 = phi( cscroll::@3/memcpy::destination#0, cscroll::@4/memcpy::destination#1 )
  memcpy::source#2 = phi( cscroll::@3/memcpy::source#0, cscroll::@4/memcpy::source#1 )
  memcpy::src#0 = ((char *)) memcpy::source#2
  memcpy::dst#0 = ((char *)) memcpy::destination#2
  memcpy::$2 = (char *)memcpy::source#2
  memcpy::src_end#0 = memcpy::$2 + memcpy::num#2
  to:memcpy::@1
memcpy::@1: scope:[memcpy]  from memcpy memcpy::@2
  memcpy::destination#4 = phi( memcpy/memcpy::destination#2, memcpy::@2/memcpy::destination#5 )
  memcpy::dst#3 = phi( memcpy/memcpy::dst#0, memcpy::@2/memcpy::dst#1 )
  memcpy::src_end#1 = phi( memcpy/memcpy::src_end#0, memcpy::@2/memcpy::src_end#2 )
  memcpy::src#2 = phi( memcpy/memcpy::src#0, memcpy::@2/memcpy::src#1 )
  memcpy::$1 = memcpy::src#2 != memcpy::src_end#1
  if(memcpy::$1) goto memcpy::@2
  to:memcpy::@3
memcpy::@2: scope:[memcpy]  from memcpy::@1
  memcpy::destination#5 = phi( memcpy::@1/memcpy::destination#4 )
  memcpy::src_end#2 = phi( memcpy::@1/memcpy::src_end#1 )
  memcpy::dst#2 = phi( memcpy::@1/memcpy::dst#3 )
  memcpy::src#3 = phi( memcpy::@1/memcpy::src#2 )
  *memcpy::dst#2 = *memcpy::src#3
  memcpy::dst#1 = ++ memcpy::dst#2
  memcpy::src#1 = ++ memcpy::src#3
  to:memcpy::@1
memcpy::@3: scope:[memcpy]  from memcpy::@1
  memcpy::destination#3 = phi( memcpy::@1/memcpy::destination#4 )
  memcpy::return#0 = memcpy::destination#3
  to:memcpy::@return
memcpy::@return: scope:[memcpy]  from memcpy::@3
  memcpy::return#4 = phi( memcpy::@3/memcpy::return#0 )
  memcpy::return#1 = memcpy::return#4
  return 
  to:@return

void * memset(void *str , char c , unsigned int num)
memset: scope:[memset]  from cscroll::@5 cscroll::@6
  memset::c#5 = phi( cscroll::@5/memset::c#0, cscroll::@6/memset::c#1 )
  memset::str#4 = phi( cscroll::@5/memset::str#0, cscroll::@6/memset::str#1 )
  memset::num#2 = phi( cscroll::@5/memset::num#0, cscroll::@6/memset::num#1 )
  memset::$0 = memset::num#2 > 0
  memset::$1 = ! memset::$0
  if(memset::$1) goto memset::@1
  to:memset::@2
memset::@1: scope:[memset]  from memset memset::@3
  memset::str#2 = phi( memset/memset::str#4, memset::@3/memset::str#5 )
  memset::return#0 = memset::str#2
  to:memset::@return
memset::@2: scope:[memset]  from memset
  memset::c#4 = phi( memset/memset::c#5 )
  memset::num#3 = phi( memset/memset::num#2 )
  memset::str#3 = phi( memset/memset::str#4 )
  memset::$4 = (char *)memset::str#3
  memset::end#0 = memset::$4 + memset::num#3
  memset::dst#0 = ((char *)) memset::str#3
  to:memset::@3
memset::@3: scope:[memset]  from memset::@2 memset::@4
  memset::c#3 = phi( memset::@2/memset::c#4, memset::@4/memset::c#2 )
  memset::str#5 = phi( memset::@2/memset::str#3, memset::@4/memset::str#6 )
  memset::end#1 = phi( memset::@2/memset::end#0, memset::@4/memset::end#2 )
  memset::dst#2 = phi( memset::@2/memset::dst#0, memset::@4/memset::dst#1 )
  memset::$3 = memset::dst#2 != memset::end#1
  if(memset::$3) goto memset::@4
  to:memset::@1
memset::@4: scope:[memset]  from memset::@3
  memset::str#6 = phi( memset::@3/memset::str#5 )
  memset::end#2 = phi( memset::@3/memset::end#1 )
  memset::dst#3 = phi( memset::@3/memset::dst#2 )
  memset::c#2 = phi( memset::@3/memset::c#3 )
  *memset::dst#3 = memset::c#2
  memset::dst#1 = ++ memset::dst#3
  to:memset::@3
memset::@return: scope:[memset]  from memset::@1
  memset::return#4 = phi( memset::@1/memset::return#0 )
  memset::return#1 = memset::return#4
  return 
  to:@return

void gotoxy(char x , char y)
gotoxy: scope:[gotoxy]  from conio_mega65_init::@1 cscroll::@2
  gotoxy::x#5 = phi( conio_mega65_init::@1/gotoxy::x#2, cscroll::@2/gotoxy::x#1 )
  gotoxy::y#3 = phi( conio_mega65_init::@1/gotoxy::y#2, cscroll::@2/gotoxy::y#1 )
  gotoxy::$0 = gotoxy::y#3 > $19
  gotoxy::$1 = ! gotoxy::$0
  if(gotoxy::$1) goto gotoxy::@1
  to:gotoxy::@3
gotoxy::@1: scope:[gotoxy]  from gotoxy gotoxy::@3
  gotoxy::y#5 = phi( gotoxy/gotoxy::y#3, gotoxy::@3/gotoxy::y#0 )
  gotoxy::x#3 = phi( gotoxy/gotoxy::x#5, gotoxy::@3/gotoxy::x#6 )
  gotoxy::$2 = gotoxy::x#3 >= $50
  gotoxy::$3 = ! gotoxy::$2
  if(gotoxy::$3) goto gotoxy::@2
  to:gotoxy::@4
gotoxy::@3: scope:[gotoxy]  from gotoxy
  gotoxy::x#6 = phi( gotoxy/gotoxy::x#5 )
  gotoxy::y#0 = 0
  to:gotoxy::@1
gotoxy::@2: scope:[gotoxy]  from gotoxy::@1 gotoxy::@4
  gotoxy::y#4 = phi( gotoxy::@1/gotoxy::y#5, gotoxy::@4/gotoxy::y#6 )
  gotoxy::x#4 = phi( gotoxy::@1/gotoxy::x#3, gotoxy::@4/gotoxy::x#0 )
  conio_cursor_x = gotoxy::x#4
  conio_cursor_y = gotoxy::y#4
  gotoxy::$7 = (unsigned int)gotoxy::y#4
  gotoxy::line_offset#0 = gotoxy::$7 * $50
  gotoxy::$5 = CONIO_SCREEN_TEXT + gotoxy::line_offset#0
  conio_line_text = gotoxy::$5
  gotoxy::$6 = CONIO_SCREEN_COLORS + gotoxy::line_offset#0
  conio_line_color = gotoxy::$6
  to:gotoxy::@return
gotoxy::@4: scope:[gotoxy]  from gotoxy::@1
  gotoxy::y#6 = phi( gotoxy::@1/gotoxy::y#5 )
  gotoxy::x#0 = 0
  to:gotoxy::@2
gotoxy::@return: scope:[gotoxy]  from gotoxy::@2
  return 
  to:@return

__stackcall void cputc(char c)
cputc: scope:[cputc]  from
  cputc::c#0 = stackidx(char,cputc::OFFSET_STACK_C)
  cputc::$0 = cputc::c#0 == '
'
  if(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
  cputc::c#1 = phi( cputc/cputc::c#0 )
  conio_line_text[conio_cursor_x] = cputc::c#1
  conio_line_color[conio_cursor_x] = conio_textcolor
  conio_cursor_x = ++ conio_cursor_x
  cputc::$1 = conio_cursor_x == $50
  cputc::$2 = ! cputc::$1
  if(cputc::$2) goto cputc::@return
  to:cputc::@3
cputc::@3: scope:[cputc]  from cputc::@2
  call cputln
  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 cputc::@3
  conio_line_text = conio_line_text + $50
  conio_line_color = conio_line_color + $50
  conio_cursor_x = 0
  conio_cursor_y = ++ 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 memoryRemap(char remapBlocks , unsigned int lowerPageOffset , unsigned int upperPageOffset)
memoryRemap: scope:[memoryRemap]  from conio_mega65_init::@3
  memoryRemap::upperPageOffset#1 = phi( conio_mega65_init::@3/memoryRemap::upperPageOffset#0 )
  memoryRemap::remapBlocks#1 = phi( conio_mega65_init::@3/memoryRemap::remapBlocks#0 )
  memoryRemap::lowerPageOffset#1 = phi( conio_mega65_init::@3/memoryRemap::lowerPageOffset#0 )
  memoryRemap::aVal = byte0  memoryRemap::lowerPageOffset#1
  memoryRemap::$1 = memoryRemap::remapBlocks#1 << 4
  memoryRemap::$2 = byte1  memoryRemap::lowerPageOffset#1
  memoryRemap::$3 = memoryRemap::$2 & $f
  memoryRemap::xVal = memoryRemap::$1 | memoryRemap::$3
  memoryRemap::yVal = byte0  memoryRemap::upperPageOffset#1
  memoryRemap::$6 = memoryRemap::remapBlocks#1 & $f0
  memoryRemap::$7 = byte1  memoryRemap::upperPageOffset#1
  memoryRemap::$8 = memoryRemap::$7 & $f
  memoryRemap::zVal = memoryRemap::$6 | memoryRemap::$8
  asm { ldaaVal ldxxVal ldyyVal ldzzVal map eom  }
  to:memoryRemap::@return
memoryRemap::@return: scope:[memoryRemap]  from memoryRemap
  return 
  to:@return

void cscroll()
cscroll: scope:[cscroll]  from cputln
  cscroll::$0 = conio_cursor_y == $19
  cscroll::$1 = ! cscroll::$0
  if(cscroll::$1) goto cscroll::@return
  to:cscroll::@1
cscroll::@1: scope:[cscroll]  from cscroll
  cscroll::$7 = 0 != conio_scroll_enable
  if(cscroll::$7) goto cscroll::@3
  to:cscroll::@2
cscroll::@3: scope:[cscroll]  from cscroll::@1
  memcpy::destination#0 = (void *)CONIO_SCREEN_TEXT
  memcpy::source#0 = (void *)CONIO_SCREEN_TEXT+$50
  memcpy::num#0 = $19*$50-$50
  call memcpy
  memcpy::return#2 = memcpy::return#1
  to:cscroll::@4
cscroll::@4: scope:[cscroll]  from cscroll::@3
  memcpy::destination#1 = (void *)CONIO_SCREEN_COLORS
  memcpy::source#1 = (void *)CONIO_SCREEN_COLORS+$50
  memcpy::num#1 = $19*$50-$50
  call memcpy
  memcpy::return#3 = memcpy::return#1
  to:cscroll::@5
cscroll::@5: scope:[cscroll]  from cscroll::@4
  memset::str#0 = (void *)CONIO_SCREEN_TEXT+$19*$50-$50
  memset::c#0 = ' '
  memset::num#0 = $50
  call memset
  memset::return#2 = memset::return#1
  to:cscroll::@6
cscroll::@6: scope:[cscroll]  from cscroll::@5
  memset::str#1 = (void *)CONIO_SCREEN_COLORS+$19*$50-$50
  memset::c#1 = conio_textcolor
  memset::num#1 = $50
  call memset
  memset::return#3 = memset::return#1
  to:cscroll::@7
cscroll::@7: scope:[cscroll]  from cscroll::@6
  conio_line_text = conio_line_text - $50
  conio_line_color = conio_line_color - $50
  conio_cursor_y = -- conio_cursor_y
  to:cscroll::@return
cscroll::@2: scope:[cscroll]  from cscroll::@1
  gotoxy::x#1 = 0
  gotoxy::y#1 = 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 conio_mega65_init()
conio_mega65_init: scope:[conio_mega65_init]  from __start::__init1
  to:conio_mega65_init::SEI1
conio_mega65_init::SEI1: scope:[conio_mega65_init]  from conio_mega65_init
  asm { sei  }
  to:conio_mega65_init::@3
conio_mega65_init::@3: scope:[conio_mega65_init]  from conio_mega65_init::SEI1
  memoryRemap::remapBlocks#0 = 0
  memoryRemap::lowerPageOffset#0 = 0
  memoryRemap::upperPageOffset#0 = 0
  call memoryRemap
  to:conio_mega65_init::@4
conio_mega65_init::@4: scope:[conio_mega65_init]  from conio_mega65_init::@3
  *IO_KEY = $47
  *IO_KEY = $53
  *IO_BANK = *IO_BANK | CRAM2K
  conio_mega65_init::line#0 = *conio_mega65_init::BASIC_CURSOR_LINE + 1
  conio_mega65_init::$3 = conio_mega65_init::line#0 >= $19
  conio_mega65_init::$4 = ! conio_mega65_init::$3
  if(conio_mega65_init::$4) goto conio_mega65_init::@1
  to:conio_mega65_init::@2
conio_mega65_init::@1: scope:[conio_mega65_init]  from conio_mega65_init::@2 conio_mega65_init::@4
  conio_mega65_init::line#2 = phi( conio_mega65_init::@2/conio_mega65_init::line#1, conio_mega65_init::@4/conio_mega65_init::line#0 )
  gotoxy::x#2 = 0
  gotoxy::y#2 = conio_mega65_init::line#2
  call gotoxy
  to:conio_mega65_init::@5
conio_mega65_init::@5: scope:[conio_mega65_init]  from conio_mega65_init::@1
  to:conio_mega65_init::@return
conio_mega65_init::@2: scope:[conio_mega65_init]  from conio_mega65_init::@4
  conio_mega65_init::line#1 = $19-1
  to:conio_mega65_init::@1
conio_mega65_init::@return: scope:[conio_mega65_init]  from conio_mega65_init::@5
  return 
  to:@return

void printf_str(void (*putc)(char) , const char *s)
printf_str: scope:[printf_str]  from main
  printf_str::putc#3 = phi( main/printf_str::putc#0 )
  printf_str::s#3 = phi( main/printf_str::s#1 )
  printf_str::c#0 = 0
  to:printf_str::@1
printf_str::@1: scope:[printf_str]  from printf_str printf_str::@2
  printf_str::putc#2 = phi( printf_str/printf_str::putc#3, printf_str::@2/printf_str::putc#1 )
  printf_str::s#2 = phi( printf_str/printf_str::s#3, printf_str::@2/printf_str::s#4 )
  printf_str::c#1 = *printf_str::s#2
  printf_str::$0 = printf_str::c#1
  printf_str::s#0 = ++ printf_str::s#2
  printf_str::$2 = 0 != printf_str::$0
  if(printf_str::$2) goto printf_str::@2
  to:printf_str::@return
printf_str::@2: scope:[printf_str]  from printf_str::@1
  printf_str::s#4 = phi( printf_str::@1/printf_str::s#0 )
  printf_str::putc#1 = phi( printf_str::@1/printf_str::putc#2 )
  printf_str::c#2 = phi( printf_str::@1/printf_str::c#1 )
  stackpush(char) = printf_str::c#2
  callexecute *printf_str::putc#1 
  sideeffect stackpullbytes(1)
  to:printf_str::@1
printf_str::@return: scope:[printf_str]  from printf_str::@1
  return 
  to:@return

void main()
main: scope:[main]  from __start::@1
  printf_str::putc#0 = &cputc
  printf_str::s#1 = main::s
  call printf_str
  to:main::@1
main::@1: scope:[main]  from main
  to:main::@return
main::@return: scope:[main]  from main::@1
  return 
  to:@return

void __start()
__start: scope:[__start]  from
  to:__start::__init1
__start::__init1: scope:[__start]  from __start
  conio_cursor_x = 0
  conio_cursor_y = 0
  conio_line_text = CONIO_SCREEN_TEXT
  conio_line_color = CONIO_SCREEN_COLORS
  conio_textcolor = CONIO_TEXTCOLOR_DEFAULT
  conio_scroll_enable = 1
  call conio_mega65_init
  to:__start::@2
__start::@2: scope:[__start]  from __start::__init1
  to:__start::@1
__start::@1: scope:[__start]  from __start::@2
  call main
  to:__start::@3
__start::@3: scope:[__start]  from __start::@1
  to:__start::@return
__start::@return: scope:[__start]  from __start::@3
  return 
  to:@return

SYMBOL TABLE SSA
__constant char * const COLORRAM = (char *)$d800
__constant char * const CONIO_SCREEN_COLORS = COLORRAM
__constant char * const CONIO_SCREEN_TEXT = DEFAULT_SCREEN
__constant const char CONIO_TEXTCOLOR_DEFAULT = LIGHT_BLUE
__constant const char CRAM2K = 1
__constant char * const DEFAULT_SCREEN = (char *)$800
__constant volatile char * const IO_BANK = (char *)$d030
__constant volatile char * const IO_KEY = (char *)$d02f
__constant const char LIGHT_BLUE = $e
__constant char RADIX::BINARY = 2
__constant char RADIX::DECIMAL = $a
__constant char RADIX::HEXADECIMAL = $10
__constant char RADIX::OCTAL = 8
__constant unsigned int STACK_BASE = $103
void __start()
__loadstore char conio_cursor_x
__loadstore char conio_cursor_y
__loadstore char *conio_line_color
__loadstore char *conio_line_text
void conio_mega65_init()
bool conio_mega65_init::$3
bool conio_mega65_init::$4
__constant char * const conio_mega65_init::BASIC_CURSOR_LINE = (char *)$eb
char conio_mega65_init::line
char conio_mega65_init::line#0
char conio_mega65_init::line#1
char conio_mega65_init::line#2
__loadstore char conio_scroll_enable
__loadstore char conio_textcolor
__stackcall void cputc(char c)
bool cputc::$0
bool cputc::$1
bool cputc::$2
__constant char cputc::OFFSET_STACK_C = 0
char cputc::c
char cputc::c#0
char cputc::c#1
void cputln()
void cscroll()
bool cscroll::$0
bool cscroll::$1
bool cscroll::$7
void gotoxy(char x , char y)
bool gotoxy::$0
bool gotoxy::$1
bool gotoxy::$2
bool gotoxy::$3
char *gotoxy::$5
char *gotoxy::$6
unsigned int gotoxy::$7
unsigned int gotoxy::line_offset
unsigned int gotoxy::line_offset#0
char gotoxy::x
char gotoxy::x#0
char gotoxy::x#1
char gotoxy::x#2
char gotoxy::x#3
char gotoxy::x#4
char gotoxy::x#5
char gotoxy::x#6
char gotoxy::y
char gotoxy::y#0
char gotoxy::y#1
char gotoxy::y#2
char gotoxy::y#3
char gotoxy::y#4
char gotoxy::y#5
char gotoxy::y#6
void main()
__constant char main::s[$d] = "hello world!"
void * memcpy(void *destination , void *source , unsigned int num)
bool memcpy::$1
char *memcpy::$2
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
char *memcpy::dst
char *memcpy::dst#0
char *memcpy::dst#1
char *memcpy::dst#2
char *memcpy::dst#3
unsigned int memcpy::num
unsigned int memcpy::num#0
unsigned int memcpy::num#1
unsigned int 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
char *memcpy::src
char *memcpy::src#0
char *memcpy::src#1
char *memcpy::src#2
char *memcpy::src#3
char *memcpy::src_end
char *memcpy::src_end#0
char *memcpy::src_end#1
char *memcpy::src_end#2
void memoryRemap(char remapBlocks , unsigned int lowerPageOffset , unsigned int upperPageOffset)
char memoryRemap::$1
char memoryRemap::$2
number memoryRemap::$3
number memoryRemap::$6
char memoryRemap::$7
number memoryRemap::$8
__loadstore volatile char memoryRemap::aVal
unsigned int memoryRemap::lowerPageOffset
unsigned int memoryRemap::lowerPageOffset#0
unsigned int memoryRemap::lowerPageOffset#1
char memoryRemap::remapBlocks
char memoryRemap::remapBlocks#0
char memoryRemap::remapBlocks#1
unsigned int memoryRemap::upperPageOffset
unsigned int memoryRemap::upperPageOffset#0
unsigned int memoryRemap::upperPageOffset#1
__loadstore volatile char memoryRemap::xVal
__loadstore volatile char memoryRemap::yVal
__loadstore volatile char memoryRemap::zVal
void * memset(void *str , char c , unsigned int num)
bool memset::$0
bool memset::$1
bool memset::$3
char *memset::$4
char memset::c
char memset::c#0
char memset::c#1
char memset::c#2
char memset::c#3
char memset::c#4
char memset::c#5
char *memset::dst
char *memset::dst#0
char *memset::dst#1
char *memset::dst#2
char *memset::dst#3
char *memset::end
char *memset::end#0
char *memset::end#1
char *memset::end#2
unsigned int memset::num
unsigned int memset::num#0
unsigned int memset::num#1
unsigned int memset::num#2
unsigned int 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
void printf_str(void (*putc)(char) , const char *s)
char printf_str::$0
bool printf_str::$2
char printf_str::c
char printf_str::c#0
char printf_str::c#1
char printf_str::c#2
void (*printf_str::putc)(char)
void (*printf_str::putc#0)(char)
void (*printf_str::putc#1)(char)
void (*printf_str::putc#2)(char)
void (*printf_str::putc#3)(char)
const char *printf_str::s
const char *printf_str::s#0
const char *printf_str::s#1
const char *printf_str::s#2
const char *printf_str::s#3
const char *printf_str::s#4

Adding number conversion cast (unumber) 0 in memset::$0 = memset::num#2 > 0
Adding number conversion cast (unumber) $19 in gotoxy::$0 = gotoxy::y#3 > $19
Adding number conversion cast (unumber) $50 in gotoxy::$2 = gotoxy::x#3 >= $50
Adding number conversion cast (unumber) 0 in gotoxy::y#0 = 0
Adding number conversion cast (unumber) $50 in gotoxy::line_offset#0 = gotoxy::$7 * $50
Adding number conversion cast (unumber) 0 in gotoxy::x#0 = 0
Adding number conversion cast (unumber) $50 in cputc::$1 = conio_cursor_x == $50
Adding number conversion cast (unumber) $50 in conio_line_text = conio_line_text + $50
Adding number conversion cast (unumber) $50 in conio_line_color = conio_line_color + $50
Adding number conversion cast (unumber) 0 in conio_cursor_x = 0
Adding number conversion cast (unumber) 4 in memoryRemap::$1 = memoryRemap::remapBlocks#1 << 4
Adding number conversion cast (unumber) $f in memoryRemap::$3 = memoryRemap::$2 & $f
Adding number conversion cast (unumber) memoryRemap::$3 in memoryRemap::$3 = memoryRemap::$2 & (unumber)$f
Adding number conversion cast (unumber) $f0 in memoryRemap::$6 = memoryRemap::remapBlocks#1 & $f0
Adding number conversion cast (unumber) memoryRemap::$6 in memoryRemap::$6 = memoryRemap::remapBlocks#1 & (unumber)$f0
Adding number conversion cast (unumber) $f in memoryRemap::$8 = memoryRemap::$7 & $f
Adding number conversion cast (unumber) memoryRemap::$8 in memoryRemap::$8 = memoryRemap::$7 & (unumber)$f
Adding number conversion cast (unumber) $19 in cscroll::$0 = conio_cursor_y == $19
Adding number conversion cast (unumber) 0 in cscroll::$7 = 0 != conio_scroll_enable
Adding number conversion cast (unumber) $50 in memcpy::source#0 = (void *)CONIO_SCREEN_TEXT+$50
Adding number conversion cast (unumber) $19*$50-$50 in memcpy::num#0 = $19*$50-$50
Adding number conversion cast (unumber) $50 in memcpy::source#1 = (void *)CONIO_SCREEN_COLORS+$50
Adding number conversion cast (unumber) $19*$50-$50 in memcpy::num#1 = $19*$50-$50
Adding number conversion cast (unumber) $50 in memset::str#0 = (void *)CONIO_SCREEN_TEXT+$19*$50-$50
Adding number conversion cast (unumber) $19*$50 in memset::str#0 = (void *)CONIO_SCREEN_TEXT+$19*$50-(unumber)$50
Adding number conversion cast (unumber) $50 in memset::num#0 = $50
Adding number conversion cast (unumber) $50 in memset::str#1 = (void *)CONIO_SCREEN_COLORS+$19*$50-$50
Adding number conversion cast (unumber) $19*$50 in memset::str#1 = (void *)CONIO_SCREEN_COLORS+$19*$50-(unumber)$50
Adding number conversion cast (unumber) $50 in memset::num#1 = $50
Adding number conversion cast (unumber) $50 in conio_line_text = conio_line_text - $50
Adding number conversion cast (unumber) $50 in conio_line_color = conio_line_color - $50
Adding number conversion cast (unumber) 0 in gotoxy::x#1 = 0
Adding number conversion cast (unumber) 0 in gotoxy::y#1 = 0
Adding number conversion cast (unumber) 0 in memoryRemap::remapBlocks#0 = 0
Adding number conversion cast (unumber) 0 in memoryRemap::lowerPageOffset#0 = 0
Adding number conversion cast (unumber) 0 in memoryRemap::upperPageOffset#0 = 0
Adding number conversion cast (unumber) $47 in *IO_KEY = $47
Adding number conversion cast (unumber) $53 in *IO_KEY = $53
Adding number conversion cast (unumber) 1 in conio_mega65_init::line#0 = *conio_mega65_init::BASIC_CURSOR_LINE + 1
Adding number conversion cast (unumber) $19 in conio_mega65_init::$3 = conio_mega65_init::line#0 >= $19
Adding number conversion cast (unumber) 0 in gotoxy::x#2 = 0
Adding number conversion cast (unumber) $19-1 in conio_mega65_init::line#1 = $19-1
Adding number conversion cast (unumber) 0 in printf_str::$2 = 0 != printf_str::$0
Successful SSA optimization PassNAddNumberTypeConversions
Inlining cast memcpy::src#0 = (char *)memcpy::source#2
Inlining cast memcpy::dst#0 = (char *)memcpy::destination#2
Inlining cast memset::dst#0 = (char *)memset::str#3
Inlining cast gotoxy::y#0 = (unumber)0
Inlining cast gotoxy::x#0 = (unumber)0
Inlining cast conio_cursor_x = (unumber)0
Inlining cast memcpy::num#0 = (unumber)$19*$50-$50
Inlining cast memcpy::num#1 = (unumber)$19*$50-$50
Inlining cast memset::num#0 = (unumber)$50
Inlining cast memset::num#1 = (unumber)$50
Inlining cast gotoxy::x#1 = (unumber)0
Inlining cast gotoxy::y#1 = (unumber)0
Inlining cast memoryRemap::remapBlocks#0 = (unumber)0
Inlining cast memoryRemap::lowerPageOffset#0 = (unumber)0
Inlining cast memoryRemap::upperPageOffset#0 = (unumber)0
Inlining cast *IO_KEY = (unumber)$47
Inlining cast *IO_KEY = (unumber)$53
Inlining cast gotoxy::x#2 = (unumber)0
Inlining cast conio_mega65_init::line#1 = (unumber)$19-1
Successful SSA optimization Pass2InlineCast
Simplifying constant pointer cast (char *) 53295
Simplifying constant pointer cast (char *) 53296
Simplifying constant pointer cast (char *) 55296
Simplifying constant pointer cast (char *) 2048
Simplifying constant pointer cast (char *) 235
Simplifying constant integer cast 0
Simplifying constant integer cast $19
Simplifying constant integer cast $50
Simplifying constant integer cast 0
Simplifying constant integer cast $50
Simplifying constant integer cast 0
Simplifying constant integer cast $50
Simplifying constant integer cast $50
Simplifying constant integer cast $50
Simplifying constant integer cast 0
Simplifying constant integer cast 4
Simplifying constant integer cast $f
Simplifying constant integer cast $f0
Simplifying constant integer cast $f
Simplifying constant integer cast $19
Simplifying constant integer cast 0
Simplifying constant integer cast $50
Simplifying constant integer cast $50
Simplifying constant integer cast $50
Simplifying constant integer cast $50
Simplifying constant integer cast $50
Simplifying constant integer cast $50
Simplifying constant integer cast $50
Simplifying constant integer cast $50
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast $47
Simplifying constant integer cast $53
Simplifying constant integer cast 1
Simplifying constant integer cast $19
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (char) 0
Finalized unsigned number type (char) $19
Finalized unsigned number type (char) $50
Finalized unsigned number type (char) 0
Finalized unsigned number type (char) $50
Finalized unsigned number type (char) 0
Finalized unsigned number type (char) $50
Finalized unsigned number type (char) $50
Finalized unsigned number type (char) $50
Finalized unsigned number type (char) 0
Finalized unsigned number type (char) 4
Finalized unsigned number type (char) $f
Finalized unsigned number type (char) $f0
Finalized unsigned number type (char) $f
Finalized unsigned number type (char) $19
Finalized unsigned number type (char) 0
Finalized unsigned number type (char) $50
Finalized unsigned number type (char) $50
Finalized unsigned number type (char) $50
Finalized unsigned number type (char) $50
Finalized unsigned number type (char) $50
Finalized unsigned number type (char) $50
Finalized unsigned number type (char) $50
Finalized unsigned number type (char) $50
Finalized unsigned number type (char) 0
Finalized unsigned number type (char) 0
Finalized unsigned number type (char) 0
Finalized unsigned number type (char) 0
Finalized unsigned number type (char) 0
Finalized unsigned number type (char) $47
Finalized unsigned number type (char) $53
Finalized unsigned number type (char) 1
Finalized unsigned number type (char) $19
Finalized unsigned number type (char) 0
Finalized unsigned number type (char) 0
Successful SSA optimization PassNFinalizeNumberTypeConversions
Inferred type updated to char in memoryRemap::$3 = memoryRemap::$2 & $f
Inferred type updated to char in memoryRemap::$6 = memoryRemap::remapBlocks#1 & $f0
Inferred type updated to char in memoryRemap::$8 = memoryRemap::$7 & $f
Inversing boolean not [19] memset::$1 = memset::num#2 <= 0 from [18] memset::$0 = memset::num#2 > 0
Inversing boolean not [38] gotoxy::$1 = gotoxy::y#3 <= $19 from [37] gotoxy::$0 = gotoxy::y#3 > $19
Inversing boolean not [42] gotoxy::$3 = gotoxy::x#3 < $50 from [41] gotoxy::$2 = gotoxy::x#3 >= $50
Inversing boolean not [67] cputc::$2 = conio_cursor_x != $50 from [66] cputc::$1 = conio_cursor_x == $50
Inversing boolean not [91] cscroll::$1 = conio_cursor_y != $19 from [90] cscroll::$0 = conio_cursor_y == $19
Inversing boolean not [132] conio_mega65_init::$4 = conio_mega65_init::line#0 < $19 from [131] conio_mega65_init::$3 = conio_mega65_init::line#0 >= $19
Successful SSA optimization Pass2UnaryNotSimplification
Alias candidate removed (volatile)conio_line_text = gotoxy::$5 
Alias candidate removed (volatile)conio_line_color = gotoxy::$6 
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::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 gotoxy::x#5 = gotoxy::x#6 
Alias gotoxy::y#5 = gotoxy::y#6 
Alias cputc::c#0 = cputc::c#1 
Alias printf_str::c#1 = printf_str::$0 printf_str::c#2 
Alias printf_str::putc#1 = printf_str::putc#2 
Alias printf_str::s#0 = printf_str::s#4 
Successful SSA optimization Pass2AliasElimination
Alias candidate removed (volatile)conio_line_text = gotoxy::$5 
Alias candidate removed (volatile)conio_line_color = gotoxy::$6 
Alias gotoxy::x#3 = gotoxy::x#5 
Alias gotoxy::y#4 = gotoxy::y#5 
Successful SSA optimization Pass2AliasElimination
Alias candidate removed (volatile)conio_line_text = gotoxy::$5 
Alias candidate removed (volatile)conio_line_color = gotoxy::$6 
Identical Phi Values memcpy::src_end#1 memcpy::src_end#0
Identical Phi Values memcpy::destination#3 memcpy::destination#2
Identical Phi Values memset::end#1 memset::end#0
Identical Phi Values memset::str#5 memset::str#3
Identical Phi Values memset::c#2 memset::c#4
Identical Phi Values memoryRemap::lowerPageOffset#1 memoryRemap::lowerPageOffset#0
Identical Phi Values memoryRemap::remapBlocks#1 memoryRemap::remapBlocks#0
Identical Phi Values memoryRemap::upperPageOffset#1 memoryRemap::upperPageOffset#0
Identical Phi Values printf_str::s#3 printf_str::s#1
Identical Phi Values printf_str::putc#3 printf_str::putc#0
Identical Phi Values printf_str::putc#1 printf_str::putc#3
Successful SSA optimization Pass2IdenticalPhiElimination
Identical Phi Values memset::return#0 memset::str#3
Successful SSA optimization Pass2IdenticalPhiElimination
Simple Condition memcpy::$1 [7] if(memcpy::src#2!=memcpy::src_end#0) goto memcpy::@2
Simple Condition memset::$1 [14] if(memset::num#2<=0) goto memset::@1
Simple Condition memset::$3 [21] if(memset::dst#2!=memset::end#0) goto memset::@4
Simple Condition gotoxy::$1 [27] if(gotoxy::y#3<=$19) goto gotoxy::@1
Simple Condition gotoxy::$3 [30] if(gotoxy::x#3<$50) goto gotoxy::@2
Simple Condition cputc::$0 [45] if(cputc::c#0=='
') goto cputc::@1
Simple Condition cputc::$2 [51] if(conio_cursor_x!=$50) goto cputc::@return
Simple Condition cscroll::$1 [74] if(conio_cursor_y!=$19) goto cscroll::@return
Simple Condition cscroll::$7 [76] if(0!=conio_scroll_enable) goto cscroll::@3
Simple Condition conio_mega65_init::$4 [114] if(conio_mega65_init::line#0<$19) goto conio_mega65_init::@1
Simple Condition printf_str::$2 [127] if(0!=printf_str::c#1) goto printf_str::@2
Successful SSA optimization Pass2ConditionalJumpSimplification
Constant right-side identified [79] memcpy::num#0 = (unumber)$19*$50-$50
Constant right-side identified [84] memcpy::num#1 = (unumber)$19*$50-$50
Constant right-side identified [119] conio_mega65_init::line#1 = (unumber)$19-1
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant gotoxy::y#0 = 0
Constant gotoxy::x#0 = 0
Constant memcpy::destination#0 = (void *)CONIO_SCREEN_TEXT
Constant memcpy::source#0 = (void *)CONIO_SCREEN_TEXT+$50
Constant memcpy::num#0 = (unumber)$19*$50-$50
Constant memcpy::destination#1 = (void *)CONIO_SCREEN_COLORS
Constant memcpy::source#1 = (void *)CONIO_SCREEN_COLORS+$50
Constant memcpy::num#1 = (unumber)$19*$50-$50
Constant memset::str#0 = (void *)CONIO_SCREEN_TEXT+(unsigned int)$19*$50-$50
Constant memset::c#0 = ' '
Constant memset::num#0 = $50
Constant memset::str#1 = (void *)CONIO_SCREEN_COLORS+(unsigned int)$19*$50-$50
Constant memset::num#1 = $50
Constant gotoxy::x#1 = 0
Constant gotoxy::y#1 = 0
Constant memoryRemap::remapBlocks#0 = 0
Constant memoryRemap::lowerPageOffset#0 = 0
Constant memoryRemap::upperPageOffset#0 = 0
Constant gotoxy::x#2 = 0
Constant conio_mega65_init::line#1 = (unumber)$19-1
Constant printf_str::c#0 = 0
Constant printf_str::putc#0 = &cputc
Constant printf_str::s#1 = main::s
Constant conio_textcolor = CONIO_TEXTCOLOR_DEFAULT
Constant conio_scroll_enable = 1
Successful SSA optimization Pass2ConstantIdentification
Constant memset::c#1 = conio_textcolor
Successful SSA optimization Pass2ConstantIdentification
Replacing constant pointer function [129] callexecute cputc 
Successful SSA optimization Pass2ConstantCallPointerIdentification
if() condition always true - replacing block destination [76] if(0!=conio_scroll_enable) goto cscroll::@3
Successful SSA optimization Pass2ConstantIfs
Rewriting conditional comparison [27] if(gotoxy::y#3<=$19) goto gotoxy::@1
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
Eliminating unused variable memcpy::return#2 and assignment [64] memcpy::return#2 = memcpy::destination#2
Eliminating unused variable memcpy::return#3 and assignment [66] memcpy::return#3 = memcpy::destination#2
Eliminating unused variable memset::return#2 and assignment [68] memset::return#2 = memset::str#3
Eliminating unused variable memset::return#3 and assignment [70] memset::return#3 = memset::str#3
Eliminating unused constant gotoxy::x#1
Eliminating unused constant gotoxy::y#1
Eliminating unused constant printf_str::c#0
Eliminating unused constant printf_str::putc#0
Eliminating unused constant conio_scroll_enable
Successful SSA optimization PassNEliminateUnusedVars
Adding number conversion cast (unumber) $19+1 in if(gotoxy::y#3<$19+1) goto gotoxy::@1
Adding number conversion cast (unumber) 1 in if(gotoxy::y#3<(unumber)$19+1) goto gotoxy::@1
Successful SSA optimization PassNAddNumberTypeConversions
Simplifying constant integer cast $19+(unumber)1
Simplifying constant integer cast 1
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (char) 1
Successful SSA optimization PassNFinalizeNumberTypeConversions
Alias candidate removed (volatile)conio_line_text = gotoxy::$5 
Alias candidate removed (volatile)conio_line_color = gotoxy::$6 
Identical Phi Values gotoxy::y#3 gotoxy::y#2
Identical Phi Values gotoxy::x#3 gotoxy::x#2
Successful SSA optimization Pass2IdenticalPhiElimination
Constant right-side identified [50] memoryRemap::aVal = byte0  memoryRemap::lowerPageOffset#0
Constant right-side identified [51] memoryRemap::$1 = memoryRemap::remapBlocks#0 << 4
Constant right-side identified [52] memoryRemap::$2 = byte1  memoryRemap::lowerPageOffset#0
Constant right-side identified [55] memoryRemap::yVal = byte0  memoryRemap::upperPageOffset#0
Constant right-side identified [56] memoryRemap::$6 = memoryRemap::remapBlocks#0 & $f0
Constant right-side identified [57] memoryRemap::$7 = byte1  memoryRemap::upperPageOffset#0
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant memoryRemap::$1 = memoryRemap::remapBlocks#0<<4
Constant memoryRemap::$2 = byte1 memoryRemap::lowerPageOffset#0
Constant memoryRemap::$6 = memoryRemap::remapBlocks#0&$f0
Constant memoryRemap::$7 = byte1 memoryRemap::upperPageOffset#0
Successful SSA optimization Pass2ConstantIdentification
if() condition always true - replacing block destination [24] if(gotoxy::x#2<$50) goto gotoxy::@2
Successful SSA optimization Pass2ConstantIfs
Simplifying constant evaluating to zero memoryRemap::remapBlocks#0<<4 in 
Simplifying constant evaluating to zero byte1 memoryRemap::lowerPageOffset#0 in 
Simplifying constant evaluating to zero memoryRemap::remapBlocks#0&$f0 in 
Simplifying constant evaluating to zero byte1 memoryRemap::upperPageOffset#0 in 
Simplifying constant evaluating to zero byte0 memoryRemap::lowerPageOffset#0 in [50] memoryRemap::aVal = byte0 memoryRemap::lowerPageOffset#0
Simplifying constant evaluating to zero byte0 memoryRemap::upperPageOffset#0 in [55] memoryRemap::yVal = byte0 memoryRemap::upperPageOffset#0
Successful SSA optimization PassNSimplifyConstantZero
Simplifying expression containing zero memoryRemap::$3 in [54] memoryRemap::xVal = memoryRemap::$1 | memoryRemap::$3
Simplifying expression containing zero memoryRemap::$8 in [59] memoryRemap::zVal = memoryRemap::$6 | memoryRemap::$8
Successful SSA optimization PassNSimplifyExpressionWithZero
Removing PHI-reference to removed block (gotoxy::@4) in block gotoxy::@2
Removing unused block gotoxy::@4
Successful SSA optimization Pass2EliminateUnusedBlocks
Eliminating unused constant gotoxy::x#0
Eliminating unused constant memoryRemap::remapBlocks#0
Eliminating unused constant memoryRemap::lowerPageOffset#0
Eliminating unused constant memoryRemap::upperPageOffset#0
Eliminating unused constant memoryRemap::$1
Eliminating unused constant memoryRemap::$6
Successful SSA optimization PassNEliminateUnusedVars
Alias candidate removed (volatile)conio_line_text = gotoxy::$5 
Alias candidate removed (volatile)conio_line_color = gotoxy::$6 
Alias candidate removed (volatile)memoryRemap::xVal = memoryRemap::$3 
Alias candidate removed (volatile)memoryRemap::zVal = memoryRemap::$8 
Identical Phi Values gotoxy::x#4 gotoxy::x#2
Successful SSA optimization Pass2IdenticalPhiElimination
Constant right-side identified [49] memoryRemap::$3 = memoryRemap::$2 & $f
Constant right-side identified [52] memoryRemap::$8 = memoryRemap::$7 & $f
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant memoryRemap::$3 = memoryRemap::$2&$f
Constant memoryRemap::$8 = memoryRemap::$7&$f
Successful SSA optimization Pass2ConstantIdentification
Simplifying constant evaluating to zero memoryRemap::$2&$f in 
Simplifying constant evaluating to zero memoryRemap::$7&$f in 
Successful SSA optimization PassNSimplifyConstantZero
Eliminating unused constant memoryRemap::$2
Eliminating unused constant memoryRemap::$7
Successful SSA optimization PassNEliminateUnusedVars
Alias candidate removed (volatile)conio_line_text = gotoxy::$5 
Alias candidate removed (volatile)conio_line_color = gotoxy::$6 
Inlining Noop Cast [1] memcpy::src#0 = (char *)memcpy::source#2 keeping memcpy::source#2
Inlining Noop Cast [2] memcpy::dst#0 = (char *)memcpy::destination#2 keeping memcpy::destination#2
Inlining Noop Cast [3] memcpy::$2 = (char *)memcpy::source#2 keeping memcpy::source#2
Inlining Noop Cast [13] memset::$4 = (char *)memset::str#3 keeping memset::str#3
Inlining Noop Cast [15] memset::dst#0 = (char *)memset::str#3 keeping memset::str#3
Successful SSA optimization Pass2NopCastInlining
Rewriting multiplication to use shift and addition[26] gotoxy::line_offset#0 = gotoxy::$7 * $50
Inlining constant with var siblings memcpy::destination#0
Inlining constant with var siblings memcpy::source#0
Inlining constant with var siblings memcpy::num#0
Inlining constant with var siblings memcpy::destination#1
Inlining constant with var siblings memcpy::source#1
Inlining constant with var siblings memcpy::num#1
Inlining constant with var siblings memset::str#0
Inlining constant with var siblings memset::c#0
Inlining constant with var siblings memset::num#0
Inlining constant with var siblings memset::str#1
Inlining constant with var siblings memset::num#1
Inlining constant with var siblings memset::c#1
Inlining constant with var siblings gotoxy::y#0
Inlining constant with var siblings conio_mega65_init::line#1
Inlining constant with var siblings printf_str::s#1
Constant inlined memset::str#1 = (void *)COLORRAM+(unsigned int)$19*$50-$50
Constant inlined memset::str#0 = (void *)DEFAULT_SCREEN+(unsigned int)$19*$50-$50
Constant inlined CONIO_SCREEN_COLORS = COLORRAM
Constant inlined conio_textcolor = LIGHT_BLUE
Constant inlined memcpy::destination#0 = (void *)DEFAULT_SCREEN
Constant inlined memset::num#1 = $50
Constant inlined memcpy::destination#1 = (void *)COLORRAM
Constant inlined memset::num#0 = $50
Constant inlined memcpy::source#0 = (void *)DEFAULT_SCREEN+$50
Constant inlined conio_mega65_init::line#1 = (char)$19-1
Constant inlined memcpy::num#1 = (unsigned int)$19*$50-$50
Constant inlined memcpy::num#0 = (unsigned int)$19*$50-$50
Constant inlined memcpy::source#1 = (void *)COLORRAM+$50
Constant inlined gotoxy::y#0 = 0
Constant inlined memoryRemap::$3 = 0
Constant inlined CONIO_SCREEN_TEXT = DEFAULT_SCREEN
Constant inlined printf_str::s#1 = main::s
Constant inlined memset::c#0 = ' '
Constant inlined memset::c#1 = LIGHT_BLUE
Constant inlined memoryRemap::$8 = 0
Constant inlined CONIO_TEXTCOLOR_DEFAULT = LIGHT_BLUE
Successful SSA optimization Pass2ConstantInlining
Alias candidate removed (volatile)conio_line_text = gotoxy::$5 
Alias candidate removed (volatile)conio_line_color = gotoxy::$6 
Alias gotoxy::line_offset#0 = gotoxy::$10 
Successful SSA optimization Pass2AliasElimination
Alias candidate removed (volatile)conio_line_text = gotoxy::$5 
Alias candidate removed (volatile)conio_line_color = gotoxy::$6 
Identical Phi Values memcpy::num#2 (unsigned int)$19*$50-$50
Identical Phi Values memset::num#2 $50
Successful SSA optimization Pass2IdenticalPhiElimination
if() condition always false - eliminating [9] if($50<=0) goto memset::@1
Successful SSA optimization Pass2ConstantIfs
Alias candidate removed (volatile)conio_line_text = gotoxy::$5 
Alias candidate removed (volatile)conio_line_color = gotoxy::$6 
Finalized unsigned number type (char) 2
Finalized unsigned number type (char) 8
Finalized unsigned number type (char) $a
Finalized unsigned number type (char) $10
Finalized unsigned number type (char) 8
Finalized unsigned number type (char) 8
Finalized unsigned number type (char) $b
Finalized unsigned number type (char) $b
Finalized unsigned number type (char) $19
Finalized unsigned number type (char) $50
Finalized unsigned number type (char) $50
Finalized unsigned number type (char) $19
Finalized unsigned number type (char) $50
Finalized unsigned number type (char) $19
Finalized unsigned number type (char) $50
Finalized unsigned number type (char) $19
Finalized unsigned number type (char) 1
Finalized unsigned number type (char) 1
Successful SSA optimization PassNFinalizeNumberTypeConversions
Simplifying constant integer cast $19-1
Successful SSA optimization PassNCastSimplification
Alias candidate removed (volatile)conio_line_text = gotoxy::$5 
Alias candidate removed (volatile)conio_line_color = gotoxy::$6 
Alias candidate removed (volatile)conio_line_text = gotoxy::$5 
Alias candidate removed (volatile)conio_line_color = gotoxy::$6 
Added new block during phi lifting gotoxy::@5(between gotoxy and gotoxy::@1)
Added new block during phi lifting conio_mega65_init::@6(between conio_mega65_init::@4 and conio_mega65_init::@1)
Adding NOP phi() at start of __start
Adding NOP phi() at start of __start::@2
Adding NOP phi() at start of __start::@1
Adding NOP phi() at start of __start::@3
Adding NOP phi() at start of conio_mega65_init
Adding NOP phi() at start of conio_mega65_init::@3
Adding NOP phi() at start of conio_mega65_init::@2
Adding NOP phi() at start of conio_mega65_init::@5
Adding NOP phi() at start of cputc::@3
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 main
Adding NOP phi() at start of main::@1
Adding NOP phi() at start of gotoxy::@3
Adding NOP phi() at start of cputln::@1
Adding NOP phi() at start of printf_str
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 memcpy::@3
Adding NOP phi() at start of memset::@1
CALL GRAPH
Calls in [__start] to conio_mega65_init:5 main:8 
Calls in [conio_mega65_init] to memoryRemap:14 gotoxy:23 
Calls in [cputc] to cputln:34 cputln:38 
Calls in [main] to printf_str:41 
Calls in [cputln] to cscroll:69 
Calls in [printf_str] to cputc:79 
Calls in [cscroll] to memcpy:85 memcpy:87 memset:89 memset:91 

Created 10 initial phi equivalence classes
Coalesced [26] conio_mega65_init::line#3 = conio_mega65_init::line#0
Coalesced [64] gotoxy::y#7 = gotoxy::y#2
Coalesced [81] printf_str::s#5 = printf_str::s#0
Coalesced [107] memcpy::src#5 = memcpy::src#1
Coalesced [108] memcpy::dst#5 = memcpy::dst#1
Coalesced [118] memset::dst#5 = memset::dst#1
Coalesced down to 10 phi equivalence classes
Culled Empty Block label __start::@2
Culled Empty Block label __start::@3
Culled Empty Block label conio_mega65_init::@2
Culled Empty Block label conio_mega65_init::@5
Culled Empty Block label cputc::@5
Culled Empty Block label cputc::@4
Culled Empty Block label main::@1
Culled Empty Block label gotoxy::@3
Culled Empty Block label cputln::@1
Culled Empty Block label cscroll::@1
Culled Empty Block label memcpy::@3
Culled Empty Block label memset::@1
Renumbering block memset::@2 to memset::@1
Renumbering block memset::@3 to memset::@2
Renumbering block memset::@4 to memset::@3
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 conio_mega65_init::@3 to conio_mega65_init::@2
Renumbering block conio_mega65_init::@4 to conio_mega65_init::@3
Renumbering block conio_mega65_init::@6 to conio_mega65_init::@4
Adding NOP phi() at start of __start
Adding NOP phi() at start of __start::@1
Adding NOP phi() at start of conio_mega65_init
Adding NOP phi() at start of conio_mega65_init::@2
Adding NOP phi() at start of conio_mega65_init::@4
Adding NOP phi() at start of cputc::@3
Adding NOP phi() at start of cputc::@1
Adding NOP phi() at start of main
Adding NOP phi() at start of gotoxy::@3
Adding NOP phi() at start of printf_str
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

FINAL CONTROL FLOW GRAPH

void __start()
__start: scope:[__start]  from
  [0] phi()
  to:__start::__init1
__start::__init1: scope:[__start]  from __start
  [1] conio_cursor_x = 0
  [2] conio_cursor_y = 0
  [3] conio_line_text = DEFAULT_SCREEN
  [4] conio_line_color = COLORRAM
  [5] call conio_mega65_init
  to:__start::@1
__start::@1: scope:[__start]  from __start::__init1
  [6] phi()
  [7] call main
  to:__start::@return
__start::@return: scope:[__start]  from __start::@1
  [8] return 
  to:@return

void conio_mega65_init()
conio_mega65_init: scope:[conio_mega65_init]  from __start::__init1
  [9] phi()
  to:conio_mega65_init::SEI1
conio_mega65_init::SEI1: scope:[conio_mega65_init]  from conio_mega65_init
  asm { sei  }
  to:conio_mega65_init::@2
conio_mega65_init::@2: scope:[conio_mega65_init]  from conio_mega65_init::SEI1
  [11] phi()
  [12] call memoryRemap
  to:conio_mega65_init::@3
conio_mega65_init::@3: scope:[conio_mega65_init]  from conio_mega65_init::@2
  [13] *IO_KEY = $47
  [14] *IO_KEY = $53
  [15] *IO_BANK = *IO_BANK | CRAM2K
  [16] conio_mega65_init::line#0 = *conio_mega65_init::BASIC_CURSOR_LINE + 1
  [17] if(conio_mega65_init::line#0<$19) goto conio_mega65_init::@4
  to:conio_mega65_init::@1
conio_mega65_init::@4: scope:[conio_mega65_init]  from conio_mega65_init::@3
  [18] phi()
  to:conio_mega65_init::@1
conio_mega65_init::@1: scope:[conio_mega65_init]  from conio_mega65_init::@3 conio_mega65_init::@4
  [19] conio_mega65_init::line#2 = phi( conio_mega65_init::@3/$19-1, conio_mega65_init::@4/conio_mega65_init::line#0 )
  [20] gotoxy::y#2 = conio_mega65_init::line#2
  [21] call gotoxy
  to:conio_mega65_init::@return
conio_mega65_init::@return: scope:[conio_mega65_init]  from conio_mega65_init::@1
  [22] return 
  to:@return

__stackcall void cputc(char c)
cputc: scope:[cputc]  from printf_str::@2
  [23] cputc::c#0 = stackidx(char,cputc::OFFSET_STACK_C)
  [24] if(cputc::c#0=='
') goto cputc::@1
  to:cputc::@2
cputc::@2: scope:[cputc]  from cputc
  [25] conio_line_text[conio_cursor_x] = cputc::c#0
  [26] conio_line_color[conio_cursor_x] = LIGHT_BLUE
  [27] conio_cursor_x = ++ conio_cursor_x
  [28] if(conio_cursor_x!=$50) goto cputc::@return
  to:cputc::@3
cputc::@3: scope:[cputc]  from cputc::@2
  [29] phi()
  [30] call cputln
  to:cputc::@return
cputc::@return: scope:[cputc]  from cputc::@1 cputc::@2 cputc::@3
  [31] return 
  to:@return
cputc::@1: scope:[cputc]  from cputc
  [32] phi()
  [33] call cputln
  to:cputc::@return

void main()
main: scope:[main]  from __start::@1
  [34] phi()
  [35] call printf_str
  to:main::@return
main::@return: scope:[main]  from main
  [36] return 
  to:@return

void memoryRemap(char remapBlocks , unsigned int lowerPageOffset , unsigned int upperPageOffset)
memoryRemap: scope:[memoryRemap]  from conio_mega65_init::@2
  [37] memoryRemap::aVal = 0
  [38] memoryRemap::xVal = 0
  [39] memoryRemap::yVal = 0
  [40] memoryRemap::zVal = 0
  asm { ldaaVal ldxxVal ldyyVal ldzzVal map eom  }
  to:memoryRemap::@return
memoryRemap::@return: scope:[memoryRemap]  from memoryRemap
  [42] return 
  to:@return

void gotoxy(char x , char y)
gotoxy: scope:[gotoxy]  from conio_mega65_init::@1
  [43] if(gotoxy::y#2<$19+1) goto gotoxy::@3
  to:gotoxy::@1
gotoxy::@3: scope:[gotoxy]  from gotoxy
  [44] phi()
  to:gotoxy::@1
gotoxy::@1: scope:[gotoxy]  from gotoxy gotoxy::@3
  [45] gotoxy::y#4 = phi( gotoxy::@3/gotoxy::y#2, gotoxy/0 )
  to:gotoxy::@2
gotoxy::@2: scope:[gotoxy]  from gotoxy::@1
  [46] conio_cursor_x = gotoxy::x#2
  [47] conio_cursor_y = gotoxy::y#4
  [48] gotoxy::$7 = (unsigned int)gotoxy::y#4
  [49] gotoxy::$8 = gotoxy::$7 << 2
  [50] gotoxy::$9 = gotoxy::$8 + gotoxy::$7
  [51] gotoxy::line_offset#0 = gotoxy::$9 << 4
  [52] gotoxy::$5 = DEFAULT_SCREEN + gotoxy::line_offset#0
  [53] conio_line_text = gotoxy::$5
  [54] gotoxy::$6 = COLORRAM + gotoxy::line_offset#0
  [55] conio_line_color = gotoxy::$6
  to:gotoxy::@return
gotoxy::@return: scope:[gotoxy]  from gotoxy::@2
  [56] return 
  to:@return

void cputln()
cputln: scope:[cputln]  from cputc::@1 cputc::@3
  [57] conio_line_text = conio_line_text + $50
  [58] conio_line_color = conio_line_color + $50
  [59] conio_cursor_x = 0
  [60] conio_cursor_y = ++ conio_cursor_y
  [61] call cscroll
  to:cputln::@return
cputln::@return: scope:[cputln]  from cputln
  [62] return 
  to:@return

void printf_str(void (*putc)(char) , const char *s)
printf_str: scope:[printf_str]  from main
  [63] phi()
  to:printf_str::@1
printf_str::@1: scope:[printf_str]  from printf_str printf_str::@2
  [64] printf_str::s#2 = phi( printf_str/main::s, printf_str::@2/printf_str::s#0 )
  [65] printf_str::c#1 = *printf_str::s#2
  [66] printf_str::s#0 = ++ printf_str::s#2
  [67] if(0!=printf_str::c#1) goto printf_str::@2
  to:printf_str::@return
printf_str::@return: scope:[printf_str]  from printf_str::@1
  [68] return 
  to:@return
printf_str::@2: scope:[printf_str]  from printf_str::@1
  [69] stackpush(char) = printf_str::c#1
  [70] callexecute cputc 
  sideeffect stackpullbytes(1)
  to:printf_str::@1

void cscroll()
cscroll: scope:[cscroll]  from cputln
  [72] if(conio_cursor_y!=$19) goto cscroll::@return
  to:cscroll::@1
cscroll::@1: scope:[cscroll]  from cscroll
  [73] phi()
  [74] call memcpy
  to:cscroll::@2
cscroll::@2: scope:[cscroll]  from cscroll::@1
  [75] phi()
  [76] call memcpy
  to:cscroll::@3
cscroll::@3: scope:[cscroll]  from cscroll::@2
  [77] phi()
  [78] call memset
  to:cscroll::@4
cscroll::@4: scope:[cscroll]  from cscroll::@3
  [79] phi()
  [80] call memset
  to:cscroll::@5
cscroll::@5: scope:[cscroll]  from cscroll::@4
  [81] conio_line_text = conio_line_text - $50
  [82] conio_line_color = conio_line_color - $50
  [83] conio_cursor_y = -- conio_cursor_y
  to:cscroll::@return
cscroll::@return: scope:[cscroll]  from cscroll cscroll::@5
  [84] return 
  to:@return

void * memcpy(void *destination , void *source , unsigned int num)
memcpy: scope:[memcpy]  from cscroll::@1 cscroll::@2
  [85] memcpy::destination#2 = phi( cscroll::@1/(void *)DEFAULT_SCREEN, cscroll::@2/(void *)COLORRAM )
  [85] memcpy::source#2 = phi( cscroll::@1/(void *)DEFAULT_SCREEN+$50, cscroll::@2/(void *)COLORRAM+$50 )
  [86] memcpy::src_end#0 = (char *)memcpy::source#2 + (unsigned int)$19*$50-$50
  [87] memcpy::src#4 = (char *)memcpy::source#2
  [88] memcpy::dst#4 = (char *)memcpy::destination#2
  to:memcpy::@1
memcpy::@1: scope:[memcpy]  from memcpy memcpy::@2
  [89] memcpy::dst#2 = phi( memcpy/memcpy::dst#4, memcpy::@2/memcpy::dst#1 )
  [89] memcpy::src#2 = phi( memcpy/memcpy::src#4, memcpy::@2/memcpy::src#1 )
  [90] if(memcpy::src#2!=memcpy::src_end#0) goto memcpy::@2
  to:memcpy::@return
memcpy::@return: scope:[memcpy]  from memcpy::@1
  [91] return 
  to:@return
memcpy::@2: scope:[memcpy]  from memcpy::@1
  [92] *memcpy::dst#2 = *memcpy::src#2
  [93] memcpy::dst#1 = ++ memcpy::dst#2
  [94] memcpy::src#1 = ++ memcpy::src#2
  to:memcpy::@1

void * memset(void *str , char c , unsigned int num)
memset: scope:[memset]  from cscroll::@3 cscroll::@4
  [95] memset::c#4 = phi( cscroll::@3/' ', cscroll::@4/LIGHT_BLUE )
  [95] memset::str#3 = phi( cscroll::@3/(void *)DEFAULT_SCREEN+(unsigned int)$19*$50-$50, cscroll::@4/(void *)COLORRAM+(unsigned int)$19*$50-$50 )
  to:memset::@1
memset::@1: scope:[memset]  from memset
  [96] memset::end#0 = (char *)memset::str#3 + $50
  [97] memset::dst#4 = (char *)memset::str#3
  to:memset::@2
memset::@2: scope:[memset]  from memset::@1 memset::@3
  [98] memset::dst#2 = phi( memset::@1/memset::dst#4, memset::@3/memset::dst#1 )
  [99] if(memset::dst#2!=memset::end#0) goto memset::@3
  to:memset::@return
memset::@return: scope:[memset]  from memset::@2
  [100] return 
  to:@return
memset::@3: scope:[memset]  from memset::@2
  [101] *memset::dst#2 = memset::c#4
  [102] memset::dst#1 = ++ memset::dst#2
  to:memset::@2

null depth in calling loop Loop head: printf_str::@1 tails: printf_str::@2 blocks: printf_str::@2 printf_str::@1  in scope cputc
null depth in calling loop Loop head: printf_str::@1 tails: printf_str::@2 blocks: printf_str::@2 printf_str::@1  in scope cputc
null depth in calling loop Loop head: printf_str::@1 tails: printf_str::@2 blocks: printf_str::@2 printf_str::@1  in scope cputc

VARIABLE REGISTER WEIGHTS
void __start()
__loadstore char conio_cursor_x // 4057.0
__loadstore char conio_cursor_y // 60379.3962264151
__loadstore char *conio_line_color // 49113.51111111111
__loadstore char *conio_line_text // 47023.574468085106
void conio_mega65_init()
char conio_mega65_init::line
char conio_mega65_init::line#0 // 11.0
char conio_mega65_init::line#2 // 22.0
__stackcall void cputc(char c)
char cputc::c
char cputc::c#0 // 15001.5
void cputln()
void cscroll()
void gotoxy(char x , char y)
char *gotoxy::$5 // 202.0
char *gotoxy::$6 // 202.0
unsigned int gotoxy::$7 // 151.5
unsigned int gotoxy::$8 // 202.0
unsigned int gotoxy::$9 // 202.0
unsigned int gotoxy::line_offset
unsigned int gotoxy::line_offset#0 // 101.0
char gotoxy::x
char gotoxy::y
char gotoxy::y#2 // 71.0
char gotoxy::y#4 // 67.33333333333333
void main()
void * memcpy(void *destination , void *source , unsigned int num)
void *memcpy::destination
void *memcpy::destination#2
char *memcpy::dst
char *memcpy::dst#1 // 1.000000001E9
char *memcpy::dst#2 // 1.0033333346666667E9
char *memcpy::dst#4 // 2.0000002E7
unsigned int memcpy::num
void *memcpy::return
void *memcpy::source
void *memcpy::source#2
char *memcpy::src
char *memcpy::src#1 // 2.000000002E9
char *memcpy::src#2 // 1.00250000125E9
char *memcpy::src#4 // 1.0000001E7
char *memcpy::src_end
char *memcpy::src_end#0 // 1.2625000025E8
void memoryRemap(char remapBlocks , unsigned int lowerPageOffset , unsigned int upperPageOffset)
__loadstore volatile char memoryRemap::aVal // 25.25
unsigned int memoryRemap::lowerPageOffset
char memoryRemap::remapBlocks
unsigned int memoryRemap::upperPageOffset
__loadstore volatile char memoryRemap::xVal // 33.666666666666664
__loadstore volatile char memoryRemap::yVal // 50.5
__loadstore volatile char memoryRemap::zVal // 101.0
void * memset(void *str , char c , unsigned int num)
char memset::c
char memset::c#4 // 1.42857143E8
char *memset::dst
char *memset::dst#1 // 2.000000002E9
char *memset::dst#2 // 1.3366666683333335E9
char *memset::dst#4 // 2.0000002E7
char *memset::end
char *memset::end#0 // 1.683333336666667E8
unsigned int memset::num
void *memset::return
void *memset::str
void *memset::str#3
void printf_str(void (*putc)(char) , const char *s)
char printf_str::c
char printf_str::c#1 // 1001.0
void (*printf_str::putc)(char)
const char *printf_str::s
const char *printf_str::s#0 // 400.4
const char *printf_str::s#2 // 1501.5

Initial phi equivalence classes
[ conio_mega65_init::line#2 conio_mega65_init::line#0 ]
[ gotoxy::y#4 gotoxy::y#2 ]
[ printf_str::s#2 printf_str::s#0 ]
[ memcpy::source#2 ]
[ memcpy::destination#2 ]
[ memcpy::src#2 memcpy::src#4 memcpy::src#1 ]
[ memcpy::dst#2 memcpy::dst#4 memcpy::dst#1 ]
[ memset::str#3 ]
[ memset::c#4 ]
[ memset::dst#2 memset::dst#4 memset::dst#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_line_text to live range equivalence class [ conio_line_text ]
Added variable conio_line_color to live range equivalence class [ conio_line_color ]
Added variable cputc::c#0 to live range equivalence class [ cputc::c#0 ]
Added variable memoryRemap::aVal to live range equivalence class [ memoryRemap::aVal ]
Added variable memoryRemap::xVal to live range equivalence class [ memoryRemap::xVal ]
Added variable memoryRemap::yVal to live range equivalence class [ memoryRemap::yVal ]
Added variable memoryRemap::zVal to live range equivalence class [ memoryRemap::zVal ]
Added variable gotoxy::$7 to live range equivalence class [ gotoxy::$7 ]
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::line_offset#0 to live range equivalence class [ gotoxy::line_offset#0 ]
Added variable gotoxy::$5 to live range equivalence class [ gotoxy::$5 ]
Added variable gotoxy::$6 to live range equivalence class [ gotoxy::$6 ]
Added variable printf_str::c#1 to live range equivalence class [ printf_str::c#1 ]
Added variable memcpy::src_end#0 to live range equivalence class [ memcpy::src_end#0 ]
Added variable memset::end#0 to live range equivalence class [ memset::end#0 ]
Complete equivalence classes
[ conio_mega65_init::line#2 conio_mega65_init::line#0 ]
[ gotoxy::y#4 gotoxy::y#2 ]
[ printf_str::s#2 printf_str::s#0 ]
[ memcpy::source#2 ]
[ memcpy::destination#2 ]
[ memcpy::src#2 memcpy::src#4 memcpy::src#1 ]
[ memcpy::dst#2 memcpy::dst#4 memcpy::dst#1 ]
[ memset::str#3 ]
[ memset::c#4 ]
[ memset::dst#2 memset::dst#4 memset::dst#1 ]
[ conio_cursor_x ]
[ conio_cursor_y ]
[ conio_line_text ]
[ conio_line_color ]
[ cputc::c#0 ]
[ memoryRemap::aVal ]
[ memoryRemap::xVal ]
[ memoryRemap::yVal ]
[ memoryRemap::zVal ]
[ gotoxy::$7 ]
[ gotoxy::$8 ]
[ gotoxy::$9 ]
[ gotoxy::line_offset#0 ]
[ gotoxy::$5 ]
[ gotoxy::$6 ]
[ printf_str::c#1 ]
[ memcpy::src_end#0 ]
[ memset::end#0 ]
Allocated zp[2]:2 [ memset::dst#2 memset::dst#4 memset::dst#1 ]
Allocated zp[2]:4 [ memcpy::src#2 memcpy::src#4 memcpy::src#1 ]
Allocated zp[2]:6 [ memcpy::dst#2 memcpy::dst#4 memcpy::dst#1 ]
Allocated zp[2]:8 [ memset::end#0 ]
Allocated zp[1]:10 [ memset::c#4 ]
Allocated zp[2]:11 [ memcpy::src_end#0 ]
Allocated zp[1]:13 [ conio_cursor_y ]
Allocated zp[2]:14 [ conio_line_color ]
Allocated zp[2]:16 [ conio_line_text ]
Allocated zp[1]:18 [ cputc::c#0 ]
Allocated zp[1]:19 [ conio_cursor_x ]
Allocated zp[2]:20 [ printf_str::s#2 printf_str::s#0 ]
Allocated zp[1]:22 [ printf_str::c#1 ]
Allocated zp[2]:23 [ gotoxy::$8 ]
Allocated zp[2]:25 [ gotoxy::$9 ]
Allocated zp[2]:27 [ gotoxy::$5 ]
Allocated zp[2]:29 [ gotoxy::$6 ]
Allocated zp[2]:31 [ gotoxy::$7 ]
Allocated zp[1]:33 [ gotoxy::y#4 gotoxy::y#2 ]
Allocated zp[1]:34 [ memoryRemap::zVal ]
Allocated zp[2]:35 [ gotoxy::line_offset#0 ]
Allocated zp[1]:37 [ memoryRemap::yVal ]
Allocated zp[1]:38 [ memoryRemap::xVal ]
Allocated zp[1]:39 [ conio_mega65_init::line#2 conio_mega65_init::line#0 ]
Allocated zp[1]:40 [ memoryRemap::aVal ]
Allocated zp[2]:41 [ memcpy::source#2 ]
Allocated zp[2]:43 [ memcpy::destination#2 ]
Allocated zp[2]:45 [ memset::str#3 ]
REGISTER UPLIFT POTENTIAL REGISTERS
Statement [1] conio_cursor_x = 0 [ ] (  [ ] { }  ) always clobbers reg byte a 
Statement [2] conio_cursor_y = 0 [ ] (  [ ] { }  ) always clobbers reg byte a 
Statement [3] conio_line_text = DEFAULT_SCREEN [ ] (  [ ] { }  ) always clobbers reg byte a 
Statement [4] conio_line_color = COLORRAM [ ] (  [ ] { }  ) always clobbers reg byte a 
Statement [13] *IO_KEY = $47 [ ] (  [ ] { }  conio_mega65_init:5 [ ] { }  ) always clobbers reg byte a 
Statement [14] *IO_KEY = $53 [ ] (  [ ] { }  conio_mega65_init:5 [ ] { }  ) always clobbers reg byte a 
Statement [15] *IO_BANK = *IO_BANK | CRAM2K [ ] (  [ ] { }  conio_mega65_init:5 [ ] { }  ) always clobbers reg byte a 
Statement [23] cputc::c#0 = stackidx(char,cputc::OFFSET_STACK_C) [ conio_cursor_x conio_cursor_y conio_line_text conio_line_color cputc::c#0 ] ( main:7::printf_str:35::cputc:70 [ printf_str::s#0 conio_cursor_x conio_cursor_y conio_line_text conio_line_color cputc::c#0 ] { }  ) always clobbers reg byte a reg byte x 
Statement [25] conio_line_text[conio_cursor_x] = cputc::c#0 [ conio_cursor_x conio_cursor_y conio_line_text conio_line_color ] ( main:7::printf_str:35::cputc:70 [ printf_str::s#0 conio_cursor_x conio_cursor_y conio_line_text conio_line_color ] { }  ) always clobbers reg byte z 
Statement [26] conio_line_color[conio_cursor_x] = LIGHT_BLUE [ conio_cursor_x conio_cursor_y conio_line_text conio_line_color ] ( main:7::printf_str:35::cputc:70 [ printf_str::s#0 conio_cursor_x conio_cursor_y conio_line_text conio_line_color ] { }  ) always clobbers reg byte a reg byte z 
Statement [28] if(conio_cursor_x!=$50) goto cputc::@return [ conio_cursor_x conio_cursor_y conio_line_text conio_line_color ] ( main:7::printf_str:35::cputc:70 [ printf_str::s#0 conio_cursor_x conio_cursor_y conio_line_text conio_line_color ] { }  ) always clobbers reg byte a 
Statement [37] memoryRemap::aVal = 0 [ memoryRemap::aVal ] ( memoryRemap:12 [ memoryRemap::aVal ] { }  conio_mega65_init:5::memoryRemap:12 [ memoryRemap::aVal ] { }  ) always clobbers reg byte a 
Statement [38] memoryRemap::xVal = 0 [ memoryRemap::aVal memoryRemap::xVal ] ( memoryRemap:12 [ memoryRemap::aVal memoryRemap::xVal ] { }  conio_mega65_init:5::memoryRemap:12 [ memoryRemap::aVal memoryRemap::xVal ] { }  ) always clobbers reg byte a 
Statement [39] memoryRemap::yVal = 0 [ memoryRemap::aVal memoryRemap::xVal memoryRemap::yVal ] ( memoryRemap:12 [ memoryRemap::aVal memoryRemap::xVal memoryRemap::yVal ] { }  conio_mega65_init:5::memoryRemap:12 [ memoryRemap::aVal memoryRemap::xVal memoryRemap::yVal ] { }  ) always clobbers reg byte a 
Statement [40] memoryRemap::zVal = 0 [ memoryRemap::aVal memoryRemap::xVal memoryRemap::yVal memoryRemap::zVal ] ( memoryRemap:12 [ memoryRemap::aVal memoryRemap::xVal memoryRemap::yVal memoryRemap::zVal ] { }  conio_mega65_init:5::memoryRemap:12 [ memoryRemap::aVal memoryRemap::xVal memoryRemap::yVal memoryRemap::zVal ] { }  ) always clobbers reg byte a 
Statement asm { ldaaVal ldxxVal ldyyVal ldzzVal map eom  } always clobbers reg byte a reg byte x reg byte y reg byte z 
Statement [46] conio_cursor_x = gotoxy::x#2 [ conio_cursor_x gotoxy::y#4 ] ( gotoxy:21 [ conio_cursor_x gotoxy::y#4 ] { { gotoxy::y#2 = conio_mega65_init::line#2 } }  conio_mega65_init:5::gotoxy:21 [ conio_cursor_x gotoxy::y#4 ] { { gotoxy::y#2 = conio_mega65_init::line#2 } }  ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp[1]:33 [ gotoxy::y#4 gotoxy::y#2 ]
Statement [48] gotoxy::$7 = (unsigned int)gotoxy::y#4 [ conio_cursor_x conio_cursor_y gotoxy::$7 ] ( gotoxy:21 [ conio_cursor_x conio_cursor_y gotoxy::$7 ] { { gotoxy::y#2 = conio_mega65_init::line#2 } }  conio_mega65_init:5::gotoxy:21 [ conio_cursor_x conio_cursor_y gotoxy::$7 ] { { gotoxy::y#2 = conio_mega65_init::line#2 } }  ) always clobbers reg byte a 
Statement [49] gotoxy::$8 = gotoxy::$7 << 2 [ conio_cursor_x conio_cursor_y gotoxy::$7 gotoxy::$8 ] ( gotoxy:21 [ conio_cursor_x conio_cursor_y gotoxy::$7 gotoxy::$8 ] { { gotoxy::y#2 = conio_mega65_init::line#2 } }  conio_mega65_init:5::gotoxy:21 [ conio_cursor_x conio_cursor_y gotoxy::$7 gotoxy::$8 ] { { gotoxy::y#2 = conio_mega65_init::line#2 } }  ) always clobbers reg byte a 
Statement [50] gotoxy::$9 = gotoxy::$8 + gotoxy::$7 [ conio_cursor_x conio_cursor_y gotoxy::$9 ] ( gotoxy:21 [ conio_cursor_x conio_cursor_y gotoxy::$9 ] { { gotoxy::y#2 = conio_mega65_init::line#2 } }  conio_mega65_init:5::gotoxy:21 [ conio_cursor_x conio_cursor_y gotoxy::$9 ] { { gotoxy::y#2 = conio_mega65_init::line#2 } }  ) always clobbers reg byte a 
Statement [51] gotoxy::line_offset#0 = gotoxy::$9 << 4 [ conio_cursor_x conio_cursor_y gotoxy::line_offset#0 ] ( gotoxy:21 [ conio_cursor_x conio_cursor_y gotoxy::line_offset#0 ] { { gotoxy::y#2 = conio_mega65_init::line#2 } }  conio_mega65_init:5::gotoxy:21 [ conio_cursor_x conio_cursor_y gotoxy::line_offset#0 ] { { gotoxy::y#2 = conio_mega65_init::line#2 } }  ) always clobbers reg byte a 
Statement [52] gotoxy::$5 = DEFAULT_SCREEN + gotoxy::line_offset#0 [ conio_cursor_x conio_cursor_y gotoxy::line_offset#0 gotoxy::$5 ] ( gotoxy:21 [ conio_cursor_x conio_cursor_y gotoxy::line_offset#0 gotoxy::$5 ] { { gotoxy::y#2 = conio_mega65_init::line#2 } }  conio_mega65_init:5::gotoxy:21 [ conio_cursor_x conio_cursor_y gotoxy::line_offset#0 gotoxy::$5 ] { { gotoxy::y#2 = conio_mega65_init::line#2 } }  ) always clobbers reg byte a 
Statement [53] conio_line_text = gotoxy::$5 [ conio_cursor_x conio_cursor_y conio_line_text gotoxy::line_offset#0 ] ( gotoxy:21 [ conio_cursor_x conio_cursor_y conio_line_text gotoxy::line_offset#0 ] { { gotoxy::y#2 = conio_mega65_init::line#2 } }  conio_mega65_init:5::gotoxy:21 [ conio_cursor_x conio_cursor_y conio_line_text gotoxy::line_offset#0 ] { { gotoxy::y#2 = conio_mega65_init::line#2 } }  ) always clobbers reg byte a 
Statement [54] gotoxy::$6 = COLORRAM + gotoxy::line_offset#0 [ conio_cursor_x conio_cursor_y conio_line_text gotoxy::$6 ] ( gotoxy:21 [ conio_cursor_x conio_cursor_y conio_line_text gotoxy::$6 ] { { gotoxy::y#2 = conio_mega65_init::line#2 } }  conio_mega65_init:5::gotoxy:21 [ conio_cursor_x conio_cursor_y conio_line_text gotoxy::$6 ] { { gotoxy::y#2 = conio_mega65_init::line#2 } }  ) always clobbers reg byte a 
Statement [55] conio_line_color = gotoxy::$6 [ conio_cursor_x conio_cursor_y conio_line_text conio_line_color ] ( gotoxy:21 [ conio_cursor_x conio_cursor_y conio_line_text conio_line_color ] { { gotoxy::y#2 = conio_mega65_init::line#2 } }  conio_mega65_init:5::gotoxy:21 [ conio_cursor_x conio_cursor_y conio_line_text conio_line_color ] { { gotoxy::y#2 = conio_mega65_init::line#2 } }  ) always clobbers reg byte a 
Statement [57] conio_line_text = conio_line_text + $50 [ conio_cursor_y conio_line_text conio_line_color ] ( main:7::printf_str:35::cputc:70::cputln:30 [ printf_str::s#0 conio_cursor_y conio_line_text conio_line_color ] { }  main:7::printf_str:35::cputc:70::cputln:33 [ printf_str::s#0 conio_cursor_y conio_line_text conio_line_color ] { }  ) always clobbers reg byte a 
Statement [58] conio_line_color = conio_line_color + $50 [ conio_cursor_y conio_line_text conio_line_color ] ( main:7::printf_str:35::cputc:70::cputln:30 [ printf_str::s#0 conio_cursor_y conio_line_text conio_line_color ] { }  main:7::printf_str:35::cputc:70::cputln:33 [ printf_str::s#0 conio_cursor_y conio_line_text conio_line_color ] { }  ) always clobbers reg byte a 
Statement [59] conio_cursor_x = 0 [ conio_cursor_x conio_cursor_y conio_line_text conio_line_color ] ( main:7::printf_str:35::cputc:70::cputln:30 [ printf_str::s#0 conio_cursor_x conio_cursor_y conio_line_text conio_line_color ] { }  main:7::printf_str:35::cputc:70::cputln:33 [ printf_str::s#0 conio_cursor_x conio_cursor_y conio_line_text conio_line_color ] { }  ) always clobbers reg byte a 
Statement [65] printf_str::c#1 = *printf_str::s#2 [ conio_cursor_x conio_cursor_y conio_line_text conio_line_color printf_str::s#2 printf_str::c#1 ] ( main:7::printf_str:35 [ conio_cursor_x conio_cursor_y conio_line_text conio_line_color printf_str::s#2 printf_str::c#1 ] { }  ) always clobbers reg byte a reg byte y 
Statement sideeffect stackpullbytes(1) always clobbers reg byte a 
Statement [72] if(conio_cursor_y!=$19) goto cscroll::@return [ conio_cursor_y conio_line_text conio_line_color ] ( main:7::printf_str:35::cputc:70::cputln:30::cscroll:61 [ printf_str::s#0 conio_cursor_x conio_cursor_y conio_line_text conio_line_color ] { }  main:7::printf_str:35::cputc:70::cputln:33::cscroll:61 [ printf_str::s#0 conio_cursor_x conio_cursor_y conio_line_text conio_line_color ] { }  ) always clobbers reg byte a 
Statement [81] conio_line_text = conio_line_text - $50 [ conio_cursor_y conio_line_text conio_line_color ] ( main:7::printf_str:35::cputc:70::cputln:30::cscroll:61 [ printf_str::s#0 conio_cursor_x conio_cursor_y conio_line_text conio_line_color ] { }  main:7::printf_str:35::cputc:70::cputln:33::cscroll:61 [ printf_str::s#0 conio_cursor_x conio_cursor_y conio_line_text conio_line_color ] { }  ) always clobbers reg byte a 
Statement [82] conio_line_color = conio_line_color - $50 [ conio_cursor_y conio_line_text conio_line_color ] ( main:7::printf_str:35::cputc:70::cputln:30::cscroll:61 [ printf_str::s#0 conio_cursor_x conio_cursor_y conio_line_text conio_line_color ] { }  main:7::printf_str:35::cputc:70::cputln:33::cscroll:61 [ printf_str::s#0 conio_cursor_x conio_cursor_y conio_line_text conio_line_color ] { }  ) always clobbers reg byte a 
Statement [86] memcpy::src_end#0 = (char *)memcpy::source#2 + (unsigned int)$19*$50-$50 [ memcpy::source#2 memcpy::destination#2 memcpy::src_end#0 ] ( main:7::printf_str:35::cputc:70::cputln:30::cscroll:61::memcpy:74 [ printf_str::s#0 conio_cursor_x conio_cursor_y conio_line_text conio_line_color memcpy::source#2 memcpy::destination#2 memcpy::src_end#0 ] { }  main:7::printf_str:35::cputc:70::cputln:33::cscroll:61::memcpy:74 [ printf_str::s#0 conio_cursor_x conio_cursor_y conio_line_text conio_line_color memcpy::source#2 memcpy::destination#2 memcpy::src_end#0 ] { }  main:7::printf_str:35::cputc:70::cputln:30::cscroll:61::memcpy:76 [ printf_str::s#0 conio_cursor_x conio_cursor_y conio_line_text conio_line_color memcpy::source#2 memcpy::destination#2 memcpy::src_end#0 ] { }  main:7::printf_str:35::cputc:70::cputln:33::cscroll:61::memcpy:76 [ printf_str::s#0 conio_cursor_x conio_cursor_y conio_line_text conio_line_color memcpy::source#2 memcpy::destination#2 memcpy::src_end#0 ] { }  ) always clobbers reg byte a 
Statement [87] memcpy::src#4 = (char *)memcpy::source#2 [ memcpy::destination#2 memcpy::src_end#0 memcpy::src#4 ] ( main:7::printf_str:35::cputc:70::cputln:30::cscroll:61::memcpy:74 [ printf_str::s#0 conio_cursor_x conio_cursor_y conio_line_text conio_line_color memcpy::destination#2 memcpy::src_end#0 memcpy::src#4 ] { }  main:7::printf_str:35::cputc:70::cputln:33::cscroll:61::memcpy:74 [ printf_str::s#0 conio_cursor_x conio_cursor_y conio_line_text conio_line_color memcpy::destination#2 memcpy::src_end#0 memcpy::src#4 ] { }  main:7::printf_str:35::cputc:70::cputln:30::cscroll:61::memcpy:76 [ printf_str::s#0 conio_cursor_x conio_cursor_y conio_line_text conio_line_color memcpy::destination#2 memcpy::src_end#0 memcpy::src#4 ] { }  main:7::printf_str:35::cputc:70::cputln:33::cscroll:61::memcpy:76 [ printf_str::s#0 conio_cursor_x conio_cursor_y conio_line_text conio_line_color memcpy::destination#2 memcpy::src_end#0 memcpy::src#4 ] { }  ) always clobbers reg byte a 
Statement [88] memcpy::dst#4 = (char *)memcpy::destination#2 [ memcpy::src_end#0 memcpy::src#4 memcpy::dst#4 ] ( main:7::printf_str:35::cputc:70::cputln:30::cscroll:61::memcpy:74 [ printf_str::s#0 conio_cursor_x conio_cursor_y conio_line_text conio_line_color memcpy::src_end#0 memcpy::src#4 memcpy::dst#4 ] { }  main:7::printf_str:35::cputc:70::cputln:33::cscroll:61::memcpy:74 [ printf_str::s#0 conio_cursor_x conio_cursor_y conio_line_text conio_line_color memcpy::src_end#0 memcpy::src#4 memcpy::dst#4 ] { }  main:7::printf_str:35::cputc:70::cputln:30::cscroll:61::memcpy:76 [ printf_str::s#0 conio_cursor_x conio_cursor_y conio_line_text conio_line_color memcpy::src_end#0 memcpy::src#4 memcpy::dst#4 ] { }  main:7::printf_str:35::cputc:70::cputln:33::cscroll:61::memcpy:76 [ printf_str::s#0 conio_cursor_x conio_cursor_y conio_line_text conio_line_color memcpy::src_end#0 memcpy::src#4 memcpy::dst#4 ] { }  ) always clobbers reg byte a 
Statement [90] if(memcpy::src#2!=memcpy::src_end#0) goto memcpy::@2 [ memcpy::src_end#0 memcpy::src#2 memcpy::dst#2 ] ( main:7::printf_str:35::cputc:70::cputln:30::cscroll:61::memcpy:74 [ printf_str::s#0 conio_cursor_x conio_cursor_y conio_line_text conio_line_color memcpy::src_end#0 memcpy::src#2 memcpy::dst#2 ] { }  main:7::printf_str:35::cputc:70::cputln:33::cscroll:61::memcpy:74 [ printf_str::s#0 conio_cursor_x conio_cursor_y conio_line_text conio_line_color memcpy::src_end#0 memcpy::src#2 memcpy::dst#2 ] { }  main:7::printf_str:35::cputc:70::cputln:30::cscroll:61::memcpy:76 [ printf_str::s#0 conio_cursor_x conio_cursor_y conio_line_text conio_line_color memcpy::src_end#0 memcpy::src#2 memcpy::dst#2 ] { }  main:7::printf_str:35::cputc:70::cputln:33::cscroll:61::memcpy:76 [ printf_str::s#0 conio_cursor_x conio_cursor_y conio_line_text conio_line_color memcpy::src_end#0 memcpy::src#2 memcpy::dst#2 ] { }  ) always clobbers reg byte a 
Statement [92] *memcpy::dst#2 = *memcpy::src#2 [ memcpy::src_end#0 memcpy::src#2 memcpy::dst#2 ] ( main:7::printf_str:35::cputc:70::cputln:30::cscroll:61::memcpy:74 [ printf_str::s#0 conio_cursor_x conio_cursor_y conio_line_text conio_line_color memcpy::src_end#0 memcpy::src#2 memcpy::dst#2 ] { }  main:7::printf_str:35::cputc:70::cputln:33::cscroll:61::memcpy:74 [ printf_str::s#0 conio_cursor_x conio_cursor_y conio_line_text conio_line_color memcpy::src_end#0 memcpy::src#2 memcpy::dst#2 ] { }  main:7::printf_str:35::cputc:70::cputln:30::cscroll:61::memcpy:76 [ printf_str::s#0 conio_cursor_x conio_cursor_y conio_line_text conio_line_color memcpy::src_end#0 memcpy::src#2 memcpy::dst#2 ] { }  main:7::printf_str:35::cputc:70::cputln:33::cscroll:61::memcpy:76 [ printf_str::s#0 conio_cursor_x conio_cursor_y conio_line_text conio_line_color memcpy::src_end#0 memcpy::src#2 memcpy::dst#2 ] { }  ) always clobbers reg byte a reg byte y 
Statement [96] memset::end#0 = (char *)memset::str#3 + $50 [ memset::str#3 memset::c#4 memset::end#0 ] ( main:7::printf_str:35::cputc:70::cputln:30::cscroll:61::memset:78 [ printf_str::s#0 conio_cursor_x conio_cursor_y conio_line_text conio_line_color memset::str#3 memset::c#4 memset::end#0 ] { }  main:7::printf_str:35::cputc:70::cputln:33::cscroll:61::memset:78 [ printf_str::s#0 conio_cursor_x conio_cursor_y conio_line_text conio_line_color memset::str#3 memset::c#4 memset::end#0 ] { }  main:7::printf_str:35::cputc:70::cputln:30::cscroll:61::memset:80 [ printf_str::s#0 conio_cursor_x conio_cursor_y conio_line_text conio_line_color memset::str#3 memset::c#4 memset::end#0 ] { }  main:7::printf_str:35::cputc:70::cputln:33::cscroll:61::memset:80 [ printf_str::s#0 conio_cursor_x conio_cursor_y conio_line_text conio_line_color memset::str#3 memset::c#4 memset::end#0 ] { }  ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp[1]:10 [ memset::c#4 ]
Statement [97] memset::dst#4 = (char *)memset::str#3 [ memset::c#4 memset::end#0 memset::dst#4 ] ( main:7::printf_str:35::cputc:70::cputln:30::cscroll:61::memset:78 [ printf_str::s#0 conio_cursor_x conio_cursor_y conio_line_text conio_line_color memset::c#4 memset::end#0 memset::dst#4 ] { }  main:7::printf_str:35::cputc:70::cputln:33::cscroll:61::memset:78 [ printf_str::s#0 conio_cursor_x conio_cursor_y conio_line_text conio_line_color memset::c#4 memset::end#0 memset::dst#4 ] { }  main:7::printf_str:35::cputc:70::cputln:30::cscroll:61::memset:80 [ printf_str::s#0 conio_cursor_x conio_cursor_y conio_line_text conio_line_color memset::c#4 memset::end#0 memset::dst#4 ] { }  main:7::printf_str:35::cputc:70::cputln:33::cscroll:61::memset:80 [ printf_str::s#0 conio_cursor_x conio_cursor_y conio_line_text conio_line_color memset::c#4 memset::end#0 memset::dst#4 ] { }  ) always clobbers reg byte a 
Statement [99] if(memset::dst#2!=memset::end#0) goto memset::@3 [ memset::c#4 memset::end#0 memset::dst#2 ] ( main:7::printf_str:35::cputc:70::cputln:30::cscroll:61::memset:78 [ printf_str::s#0 conio_cursor_x conio_cursor_y conio_line_text conio_line_color memset::c#4 memset::end#0 memset::dst#2 ] { }  main:7::printf_str:35::cputc:70::cputln:33::cscroll:61::memset:78 [ printf_str::s#0 conio_cursor_x conio_cursor_y conio_line_text conio_line_color memset::c#4 memset::end#0 memset::dst#2 ] { }  main:7::printf_str:35::cputc:70::cputln:30::cscroll:61::memset:80 [ printf_str::s#0 conio_cursor_x conio_cursor_y conio_line_text conio_line_color memset::c#4 memset::end#0 memset::dst#2 ] { }  main:7::printf_str:35::cputc:70::cputln:33::cscroll:61::memset:80 [ printf_str::s#0 conio_cursor_x conio_cursor_y conio_line_text conio_line_color memset::c#4 memset::end#0 memset::dst#2 ] { }  ) always clobbers reg byte a 
Statement [101] *memset::dst#2 = memset::c#4 [ memset::c#4 memset::end#0 memset::dst#2 ] ( main:7::printf_str:35::cputc:70::cputln:30::cscroll:61::memset:78 [ printf_str::s#0 conio_cursor_x conio_cursor_y conio_line_text conio_line_color memset::c#4 memset::end#0 memset::dst#2 ] { }  main:7::printf_str:35::cputc:70::cputln:33::cscroll:61::memset:78 [ printf_str::s#0 conio_cursor_x conio_cursor_y conio_line_text conio_line_color memset::c#4 memset::end#0 memset::dst#2 ] { }  main:7::printf_str:35::cputc:70::cputln:30::cscroll:61::memset:80 [ printf_str::s#0 conio_cursor_x conio_cursor_y conio_line_text conio_line_color memset::c#4 memset::end#0 memset::dst#2 ] { }  main:7::printf_str:35::cputc:70::cputln:33::cscroll:61::memset:80 [ printf_str::s#0 conio_cursor_x conio_cursor_y conio_line_text conio_line_color memset::c#4 memset::end#0 memset::dst#2 ] { }  ) always clobbers reg byte a reg byte y 
Removing always clobbered register reg byte y as potential for zp[1]:10 [ memset::c#4 ]
Statement [1] conio_cursor_x = 0 [ ] (  [ ] { }  ) always clobbers reg byte a 
Statement [2] conio_cursor_y = 0 [ ] (  [ ] { }  ) always clobbers reg byte a 
Statement [3] conio_line_text = DEFAULT_SCREEN [ ] (  [ ] { }  ) always clobbers reg byte a 
Statement [4] conio_line_color = COLORRAM [ ] (  [ ] { }  ) always clobbers reg byte a 
Statement [13] *IO_KEY = $47 [ ] (  [ ] { }  conio_mega65_init:5 [ ] { }  ) always clobbers reg byte a 
Statement [14] *IO_KEY = $53 [ ] (  [ ] { }  conio_mega65_init:5 [ ] { }  ) always clobbers reg byte a 
Statement [15] *IO_BANK = *IO_BANK | CRAM2K [ ] (  [ ] { }  conio_mega65_init:5 [ ] { }  ) always clobbers reg byte a 
Statement [23] cputc::c#0 = stackidx(char,cputc::OFFSET_STACK_C) [ conio_cursor_x conio_cursor_y conio_line_text conio_line_color cputc::c#0 ] ( main:7::printf_str:35::cputc:70 [ printf_str::s#0 conio_cursor_x conio_cursor_y conio_line_text conio_line_color cputc::c#0 ] { }  ) always clobbers reg byte a reg byte x 
Statement [25] conio_line_text[conio_cursor_x] = cputc::c#0 [ conio_cursor_x conio_cursor_y conio_line_text conio_line_color ] ( main:7::printf_str:35::cputc:70 [ printf_str::s#0 conio_cursor_x conio_cursor_y conio_line_text conio_line_color ] { }  ) always clobbers reg byte z 
Statement [26] conio_line_color[conio_cursor_x] = LIGHT_BLUE [ conio_cursor_x conio_cursor_y conio_line_text conio_line_color ] ( main:7::printf_str:35::cputc:70 [ printf_str::s#0 conio_cursor_x conio_cursor_y conio_line_text conio_line_color ] { }  ) always clobbers reg byte a reg byte z 
Statement [28] if(conio_cursor_x!=$50) goto cputc::@return [ conio_cursor_x conio_cursor_y conio_line_text conio_line_color ] ( main:7::printf_str:35::cputc:70 [ printf_str::s#0 conio_cursor_x conio_cursor_y conio_line_text conio_line_color ] { }  ) always clobbers reg byte a 
Statement [37] memoryRemap::aVal = 0 [ memoryRemap::aVal ] ( memoryRemap:12 [ memoryRemap::aVal ] { }  conio_mega65_init:5::memoryRemap:12 [ memoryRemap::aVal ] { }  ) always clobbers reg byte a 
Statement [38] memoryRemap::xVal = 0 [ memoryRemap::aVal memoryRemap::xVal ] ( memoryRemap:12 [ memoryRemap::aVal memoryRemap::xVal ] { }  conio_mega65_init:5::memoryRemap:12 [ memoryRemap::aVal memoryRemap::xVal ] { }  ) always clobbers reg byte a 
Statement [39] memoryRemap::yVal = 0 [ memoryRemap::aVal memoryRemap::xVal memoryRemap::yVal ] ( memoryRemap:12 [ memoryRemap::aVal memoryRemap::xVal memoryRemap::yVal ] { }  conio_mega65_init:5::memoryRemap:12 [ memoryRemap::aVal memoryRemap::xVal memoryRemap::yVal ] { }  ) always clobbers reg byte a 
Statement [40] memoryRemap::zVal = 0 [ memoryRemap::aVal memoryRemap::xVal memoryRemap::yVal memoryRemap::zVal ] ( memoryRemap:12 [ memoryRemap::aVal memoryRemap::xVal memoryRemap::yVal memoryRemap::zVal ] { }  conio_mega65_init:5::memoryRemap:12 [ memoryRemap::aVal memoryRemap::xVal memoryRemap::yVal memoryRemap::zVal ] { }  ) always clobbers reg byte a 
Statement asm { ldaaVal ldxxVal ldyyVal ldzzVal map eom  } always clobbers reg byte a reg byte x reg byte y reg byte z 
Statement [46] conio_cursor_x = gotoxy::x#2 [ conio_cursor_x gotoxy::y#4 ] ( gotoxy:21 [ conio_cursor_x gotoxy::y#4 ] { { gotoxy::y#2 = conio_mega65_init::line#2 } }  conio_mega65_init:5::gotoxy:21 [ conio_cursor_x gotoxy::y#4 ] { { gotoxy::y#2 = conio_mega65_init::line#2 } }  ) always clobbers reg byte a 
Statement [48] gotoxy::$7 = (unsigned int)gotoxy::y#4 [ conio_cursor_x conio_cursor_y gotoxy::$7 ] ( gotoxy:21 [ conio_cursor_x conio_cursor_y gotoxy::$7 ] { { gotoxy::y#2 = conio_mega65_init::line#2 } }  conio_mega65_init:5::gotoxy:21 [ conio_cursor_x conio_cursor_y gotoxy::$7 ] { { gotoxy::y#2 = conio_mega65_init::line#2 } }  ) always clobbers reg byte a 
Statement [49] gotoxy::$8 = gotoxy::$7 << 2 [ conio_cursor_x conio_cursor_y gotoxy::$7 gotoxy::$8 ] ( gotoxy:21 [ conio_cursor_x conio_cursor_y gotoxy::$7 gotoxy::$8 ] { { gotoxy::y#2 = conio_mega65_init::line#2 } }  conio_mega65_init:5::gotoxy:21 [ conio_cursor_x conio_cursor_y gotoxy::$7 gotoxy::$8 ] { { gotoxy::y#2 = conio_mega65_init::line#2 } }  ) always clobbers reg byte a 
Statement [50] gotoxy::$9 = gotoxy::$8 + gotoxy::$7 [ conio_cursor_x conio_cursor_y gotoxy::$9 ] ( gotoxy:21 [ conio_cursor_x conio_cursor_y gotoxy::$9 ] { { gotoxy::y#2 = conio_mega65_init::line#2 } }  conio_mega65_init:5::gotoxy:21 [ conio_cursor_x conio_cursor_y gotoxy::$9 ] { { gotoxy::y#2 = conio_mega65_init::line#2 } }  ) always clobbers reg byte a 
Statement [51] gotoxy::line_offset#0 = gotoxy::$9 << 4 [ conio_cursor_x conio_cursor_y gotoxy::line_offset#0 ] ( gotoxy:21 [ conio_cursor_x conio_cursor_y gotoxy::line_offset#0 ] { { gotoxy::y#2 = conio_mega65_init::line#2 } }  conio_mega65_init:5::gotoxy:21 [ conio_cursor_x conio_cursor_y gotoxy::line_offset#0 ] { { gotoxy::y#2 = conio_mega65_init::line#2 } }  ) always clobbers reg byte a 
Statement [52] gotoxy::$5 = DEFAULT_SCREEN + gotoxy::line_offset#0 [ conio_cursor_x conio_cursor_y gotoxy::line_offset#0 gotoxy::$5 ] ( gotoxy:21 [ conio_cursor_x conio_cursor_y gotoxy::line_offset#0 gotoxy::$5 ] { { gotoxy::y#2 = conio_mega65_init::line#2 } }  conio_mega65_init:5::gotoxy:21 [ conio_cursor_x conio_cursor_y gotoxy::line_offset#0 gotoxy::$5 ] { { gotoxy::y#2 = conio_mega65_init::line#2 } }  ) always clobbers reg byte a 
Statement [53] conio_line_text = gotoxy::$5 [ conio_cursor_x conio_cursor_y conio_line_text gotoxy::line_offset#0 ] ( gotoxy:21 [ conio_cursor_x conio_cursor_y conio_line_text gotoxy::line_offset#0 ] { { gotoxy::y#2 = conio_mega65_init::line#2 } }  conio_mega65_init:5::gotoxy:21 [ conio_cursor_x conio_cursor_y conio_line_text gotoxy::line_offset#0 ] { { gotoxy::y#2 = conio_mega65_init::line#2 } }  ) always clobbers reg byte a 
Statement [54] gotoxy::$6 = COLORRAM + gotoxy::line_offset#0 [ conio_cursor_x conio_cursor_y conio_line_text gotoxy::$6 ] ( gotoxy:21 [ conio_cursor_x conio_cursor_y conio_line_text gotoxy::$6 ] { { gotoxy::y#2 = conio_mega65_init::line#2 } }  conio_mega65_init:5::gotoxy:21 [ conio_cursor_x conio_cursor_y conio_line_text gotoxy::$6 ] { { gotoxy::y#2 = conio_mega65_init::line#2 } }  ) always clobbers reg byte a 
Statement [55] conio_line_color = gotoxy::$6 [ conio_cursor_x conio_cursor_y conio_line_text conio_line_color ] ( gotoxy:21 [ conio_cursor_x conio_cursor_y conio_line_text conio_line_color ] { { gotoxy::y#2 = conio_mega65_init::line#2 } }  conio_mega65_init:5::gotoxy:21 [ conio_cursor_x conio_cursor_y conio_line_text conio_line_color ] { { gotoxy::y#2 = conio_mega65_init::line#2 } }  ) always clobbers reg byte a 
Statement [57] conio_line_text = conio_line_text + $50 [ conio_cursor_y conio_line_text conio_line_color ] ( main:7::printf_str:35::cputc:70::cputln:30 [ printf_str::s#0 conio_cursor_y conio_line_text conio_line_color ] { }  main:7::printf_str:35::cputc:70::cputln:33 [ printf_str::s#0 conio_cursor_y conio_line_text conio_line_color ] { }  ) always clobbers reg byte a 
Statement [58] conio_line_color = conio_line_color + $50 [ conio_cursor_y conio_line_text conio_line_color ] ( main:7::printf_str:35::cputc:70::cputln:30 [ printf_str::s#0 conio_cursor_y conio_line_text conio_line_color ] { }  main:7::printf_str:35::cputc:70::cputln:33 [ printf_str::s#0 conio_cursor_y conio_line_text conio_line_color ] { }  ) always clobbers reg byte a 
Statement [59] conio_cursor_x = 0 [ conio_cursor_x conio_cursor_y conio_line_text conio_line_color ] ( main:7::printf_str:35::cputc:70::cputln:30 [ printf_str::s#0 conio_cursor_x conio_cursor_y conio_line_text conio_line_color ] { }  main:7::printf_str:35::cputc:70::cputln:33 [ printf_str::s#0 conio_cursor_x conio_cursor_y conio_line_text conio_line_color ] { }  ) always clobbers reg byte a 
Statement [65] printf_str::c#1 = *printf_str::s#2 [ conio_cursor_x conio_cursor_y conio_line_text conio_line_color printf_str::s#2 printf_str::c#1 ] ( main:7::printf_str:35 [ conio_cursor_x conio_cursor_y conio_line_text conio_line_color printf_str::s#2 printf_str::c#1 ] { }  ) always clobbers reg byte a reg byte y 
Statement sideeffect stackpullbytes(1) always clobbers reg byte a 
Statement [72] if(conio_cursor_y!=$19) goto cscroll::@return [ conio_cursor_y conio_line_text conio_line_color ] ( main:7::printf_str:35::cputc:70::cputln:30::cscroll:61 [ printf_str::s#0 conio_cursor_x conio_cursor_y conio_line_text conio_line_color ] { }  main:7::printf_str:35::cputc:70::cputln:33::cscroll:61 [ printf_str::s#0 conio_cursor_x conio_cursor_y conio_line_text conio_line_color ] { }  ) always clobbers reg byte a 
Statement [81] conio_line_text = conio_line_text - $50 [ conio_cursor_y conio_line_text conio_line_color ] ( main:7::printf_str:35::cputc:70::cputln:30::cscroll:61 [ printf_str::s#0 conio_cursor_x conio_cursor_y conio_line_text conio_line_color ] { }  main:7::printf_str:35::cputc:70::cputln:33::cscroll:61 [ printf_str::s#0 conio_cursor_x conio_cursor_y conio_line_text conio_line_color ] { }  ) always clobbers reg byte a 
Statement [82] conio_line_color = conio_line_color - $50 [ conio_cursor_y conio_line_text conio_line_color ] ( main:7::printf_str:35::cputc:70::cputln:30::cscroll:61 [ printf_str::s#0 conio_cursor_x conio_cursor_y conio_line_text conio_line_color ] { }  main:7::printf_str:35::cputc:70::cputln:33::cscroll:61 [ printf_str::s#0 conio_cursor_x conio_cursor_y conio_line_text conio_line_color ] { }  ) always clobbers reg byte a 
Statement [86] memcpy::src_end#0 = (char *)memcpy::source#2 + (unsigned int)$19*$50-$50 [ memcpy::source#2 memcpy::destination#2 memcpy::src_end#0 ] ( main:7::printf_str:35::cputc:70::cputln:30::cscroll:61::memcpy:74 [ printf_str::s#0 conio_cursor_x conio_cursor_y conio_line_text conio_line_color memcpy::source#2 memcpy::destination#2 memcpy::src_end#0 ] { }  main:7::printf_str:35::cputc:70::cputln:33::cscroll:61::memcpy:74 [ printf_str::s#0 conio_cursor_x conio_cursor_y conio_line_text conio_line_color memcpy::source#2 memcpy::destination#2 memcpy::src_end#0 ] { }  main:7::printf_str:35::cputc:70::cputln:30::cscroll:61::memcpy:76 [ printf_str::s#0 conio_cursor_x conio_cursor_y conio_line_text conio_line_color memcpy::source#2 memcpy::destination#2 memcpy::src_end#0 ] { }  main:7::printf_str:35::cputc:70::cputln:33::cscroll:61::memcpy:76 [ printf_str::s#0 conio_cursor_x conio_cursor_y conio_line_text conio_line_color memcpy::source#2 memcpy::destination#2 memcpy::src_end#0 ] { }  ) always clobbers reg byte a 
Statement [87] memcpy::src#4 = (char *)memcpy::source#2 [ memcpy::destination#2 memcpy::src_end#0 memcpy::src#4 ] ( main:7::printf_str:35::cputc:70::cputln:30::cscroll:61::memcpy:74 [ printf_str::s#0 conio_cursor_x conio_cursor_y conio_line_text conio_line_color memcpy::destination#2 memcpy::src_end#0 memcpy::src#4 ] { }  main:7::printf_str:35::cputc:70::cputln:33::cscroll:61::memcpy:74 [ printf_str::s#0 conio_cursor_x conio_cursor_y conio_line_text conio_line_color memcpy::destination#2 memcpy::src_end#0 memcpy::src#4 ] { }  main:7::printf_str:35::cputc:70::cputln:30::cscroll:61::memcpy:76 [ printf_str::s#0 conio_cursor_x conio_cursor_y conio_line_text conio_line_color memcpy::destination#2 memcpy::src_end#0 memcpy::src#4 ] { }  main:7::printf_str:35::cputc:70::cputln:33::cscroll:61::memcpy:76 [ printf_str::s#0 conio_cursor_x conio_cursor_y conio_line_text conio_line_color memcpy::destination#2 memcpy::src_end#0 memcpy::src#4 ] { }  ) always clobbers reg byte a 
Statement [88] memcpy::dst#4 = (char *)memcpy::destination#2 [ memcpy::src_end#0 memcpy::src#4 memcpy::dst#4 ] ( main:7::printf_str:35::cputc:70::cputln:30::cscroll:61::memcpy:74 [ printf_str::s#0 conio_cursor_x conio_cursor_y conio_line_text conio_line_color memcpy::src_end#0 memcpy::src#4 memcpy::dst#4 ] { }  main:7::printf_str:35::cputc:70::cputln:33::cscroll:61::memcpy:74 [ printf_str::s#0 conio_cursor_x conio_cursor_y conio_line_text conio_line_color memcpy::src_end#0 memcpy::src#4 memcpy::dst#4 ] { }  main:7::printf_str:35::cputc:70::cputln:30::cscroll:61::memcpy:76 [ printf_str::s#0 conio_cursor_x conio_cursor_y conio_line_text conio_line_color memcpy::src_end#0 memcpy::src#4 memcpy::dst#4 ] { }  main:7::printf_str:35::cputc:70::cputln:33::cscroll:61::memcpy:76 [ printf_str::s#0 conio_cursor_x conio_cursor_y conio_line_text conio_line_color memcpy::src_end#0 memcpy::src#4 memcpy::dst#4 ] { }  ) always clobbers reg byte a 
Statement [90] if(memcpy::src#2!=memcpy::src_end#0) goto memcpy::@2 [ memcpy::src_end#0 memcpy::src#2 memcpy::dst#2 ] ( main:7::printf_str:35::cputc:70::cputln:30::cscroll:61::memcpy:74 [ printf_str::s#0 conio_cursor_x conio_cursor_y conio_line_text conio_line_color memcpy::src_end#0 memcpy::src#2 memcpy::dst#2 ] { }  main:7::printf_str:35::cputc:70::cputln:33::cscroll:61::memcpy:74 [ printf_str::s#0 conio_cursor_x conio_cursor_y conio_line_text conio_line_color memcpy::src_end#0 memcpy::src#2 memcpy::dst#2 ] { }  main:7::printf_str:35::cputc:70::cputln:30::cscroll:61::memcpy:76 [ printf_str::s#0 conio_cursor_x conio_cursor_y conio_line_text conio_line_color memcpy::src_end#0 memcpy::src#2 memcpy::dst#2 ] { }  main:7::printf_str:35::cputc:70::cputln:33::cscroll:61::memcpy:76 [ printf_str::s#0 conio_cursor_x conio_cursor_y conio_line_text conio_line_color memcpy::src_end#0 memcpy::src#2 memcpy::dst#2 ] { }  ) always clobbers reg byte a 
Statement [92] *memcpy::dst#2 = *memcpy::src#2 [ memcpy::src_end#0 memcpy::src#2 memcpy::dst#2 ] ( main:7::printf_str:35::cputc:70::cputln:30::cscroll:61::memcpy:74 [ printf_str::s#0 conio_cursor_x conio_cursor_y conio_line_text conio_line_color memcpy::src_end#0 memcpy::src#2 memcpy::dst#2 ] { }  main:7::printf_str:35::cputc:70::cputln:33::cscroll:61::memcpy:74 [ printf_str::s#0 conio_cursor_x conio_cursor_y conio_line_text conio_line_color memcpy::src_end#0 memcpy::src#2 memcpy::dst#2 ] { }  main:7::printf_str:35::cputc:70::cputln:30::cscroll:61::memcpy:76 [ printf_str::s#0 conio_cursor_x conio_cursor_y conio_line_text conio_line_color memcpy::src_end#0 memcpy::src#2 memcpy::dst#2 ] { }  main:7::printf_str:35::cputc:70::cputln:33::cscroll:61::memcpy:76 [ printf_str::s#0 conio_cursor_x conio_cursor_y conio_line_text conio_line_color memcpy::src_end#0 memcpy::src#2 memcpy::dst#2 ] { }  ) always clobbers reg byte a reg byte y 
Statement [96] memset::end#0 = (char *)memset::str#3 + $50 [ memset::str#3 memset::c#4 memset::end#0 ] ( main:7::printf_str:35::cputc:70::cputln:30::cscroll:61::memset:78 [ printf_str::s#0 conio_cursor_x conio_cursor_y conio_line_text conio_line_color memset::str#3 memset::c#4 memset::end#0 ] { }  main:7::printf_str:35::cputc:70::cputln:33::cscroll:61::memset:78 [ printf_str::s#0 conio_cursor_x conio_cursor_y conio_line_text conio_line_color memset::str#3 memset::c#4 memset::end#0 ] { }  main:7::printf_str:35::cputc:70::cputln:30::cscroll:61::memset:80 [ printf_str::s#0 conio_cursor_x conio_cursor_y conio_line_text conio_line_color memset::str#3 memset::c#4 memset::end#0 ] { }  main:7::printf_str:35::cputc:70::cputln:33::cscroll:61::memset:80 [ printf_str::s#0 conio_cursor_x conio_cursor_y conio_line_text conio_line_color memset::str#3 memset::c#4 memset::end#0 ] { }  ) always clobbers reg byte a 
Statement [97] memset::dst#4 = (char *)memset::str#3 [ memset::c#4 memset::end#0 memset::dst#4 ] ( main:7::printf_str:35::cputc:70::cputln:30::cscroll:61::memset:78 [ printf_str::s#0 conio_cursor_x conio_cursor_y conio_line_text conio_line_color memset::c#4 memset::end#0 memset::dst#4 ] { }  main:7::printf_str:35::cputc:70::cputln:33::cscroll:61::memset:78 [ printf_str::s#0 conio_cursor_x conio_cursor_y conio_line_text conio_line_color memset::c#4 memset::end#0 memset::dst#4 ] { }  main:7::printf_str:35::cputc:70::cputln:30::cscroll:61::memset:80 [ printf_str::s#0 conio_cursor_x conio_cursor_y conio_line_text conio_line_color memset::c#4 memset::end#0 memset::dst#4 ] { }  main:7::printf_str:35::cputc:70::cputln:33::cscroll:61::memset:80 [ printf_str::s#0 conio_cursor_x conio_cursor_y conio_line_text conio_line_color memset::c#4 memset::end#0 memset::dst#4 ] { }  ) always clobbers reg byte a 
Statement [99] if(memset::dst#2!=memset::end#0) goto memset::@3 [ memset::c#4 memset::end#0 memset::dst#2 ] ( main:7::printf_str:35::cputc:70::cputln:30::cscroll:61::memset:78 [ printf_str::s#0 conio_cursor_x conio_cursor_y conio_line_text conio_line_color memset::c#4 memset::end#0 memset::dst#2 ] { }  main:7::printf_str:35::cputc:70::cputln:33::cscroll:61::memset:78 [ printf_str::s#0 conio_cursor_x conio_cursor_y conio_line_text conio_line_color memset::c#4 memset::end#0 memset::dst#2 ] { }  main:7::printf_str:35::cputc:70::cputln:30::cscroll:61::memset:80 [ printf_str::s#0 conio_cursor_x conio_cursor_y conio_line_text conio_line_color memset::c#4 memset::end#0 memset::dst#2 ] { }  main:7::printf_str:35::cputc:70::cputln:33::cscroll:61::memset:80 [ printf_str::s#0 conio_cursor_x conio_cursor_y conio_line_text conio_line_color memset::c#4 memset::end#0 memset::dst#2 ] { }  ) always clobbers reg byte a 
Statement [101] *memset::dst#2 = memset::c#4 [ memset::c#4 memset::end#0 memset::dst#2 ] ( main:7::printf_str:35::cputc:70::cputln:30::cscroll:61::memset:78 [ printf_str::s#0 conio_cursor_x conio_cursor_y conio_line_text conio_line_color memset::c#4 memset::end#0 memset::dst#2 ] { }  main:7::printf_str:35::cputc:70::cputln:33::cscroll:61::memset:78 [ printf_str::s#0 conio_cursor_x conio_cursor_y conio_line_text conio_line_color memset::c#4 memset::end#0 memset::dst#2 ] { }  main:7::printf_str:35::cputc:70::cputln:30::cscroll:61::memset:80 [ printf_str::s#0 conio_cursor_x conio_cursor_y conio_line_text conio_line_color memset::c#4 memset::end#0 memset::dst#2 ] { }  main:7::printf_str:35::cputc:70::cputln:33::cscroll:61::memset:80 [ printf_str::s#0 conio_cursor_x conio_cursor_y conio_line_text conio_line_color memset::c#4 memset::end#0 memset::dst#2 ] { }  ) always clobbers reg byte a reg byte y 
Potential registers zp[1]:39 [ conio_mega65_init::line#2 conio_mega65_init::line#0 ] : zp[1]:39 , reg byte a , reg byte x , reg byte y , reg byte z , 
Potential registers zp[1]:33 [ gotoxy::y#4 gotoxy::y#2 ] : zp[1]:33 , reg byte x , reg byte y , reg byte z , 
Potential registers zp[2]:20 [ printf_str::s#2 printf_str::s#0 ] : zp[2]:20 , 
Potential registers zp[2]:41 [ memcpy::source#2 ] : zp[2]:41 , 
Potential registers zp[2]:43 [ memcpy::destination#2 ] : zp[2]:43 , 
Potential registers zp[2]:4 [ memcpy::src#2 memcpy::src#4 memcpy::src#1 ] : zp[2]:4 , 
Potential registers zp[2]:6 [ memcpy::dst#2 memcpy::dst#4 memcpy::dst#1 ] : zp[2]:6 , 
Potential registers zp[2]:45 [ memset::str#3 ] : zp[2]:45 , 
Potential registers zp[1]:10 [ memset::c#4 ] : zp[1]:10 , reg byte x , reg byte z , 
Potential registers zp[2]:2 [ memset::dst#2 memset::dst#4 memset::dst#1 ] : zp[2]:2 , 
Potential registers zp[1]:19 [ conio_cursor_x ] : zp[1]:19 , 
Potential registers zp[1]:13 [ conio_cursor_y ] : zp[1]:13 , 
Potential registers zp[2]:16 [ conio_line_text ] : zp[2]:16 , 
Potential registers zp[2]:14 [ conio_line_color ] : zp[2]:14 , 
Potential registers zp[1]:18 [ cputc::c#0 ] : zp[1]:18 , reg byte a , reg byte x , reg byte y , reg byte z , 
Potential registers zp[1]:40 [ memoryRemap::aVal ] : zp[1]:40 , 
Potential registers zp[1]:38 [ memoryRemap::xVal ] : zp[1]:38 , 
Potential registers zp[1]:37 [ memoryRemap::yVal ] : zp[1]:37 , 
Potential registers zp[1]:34 [ memoryRemap::zVal ] : zp[1]:34 , 
Potential registers zp[2]:31 [ gotoxy::$7 ] : zp[2]:31 , 
Potential registers zp[2]:23 [ gotoxy::$8 ] : zp[2]:23 , 
Potential registers zp[2]:25 [ gotoxy::$9 ] : zp[2]:25 , 
Potential registers zp[2]:35 [ gotoxy::line_offset#0 ] : zp[2]:35 , 
Potential registers zp[2]:27 [ gotoxy::$5 ] : zp[2]:27 , 
Potential registers zp[2]:29 [ gotoxy::$6 ] : zp[2]:29 , 
Potential registers zp[1]:22 [ printf_str::c#1 ] : zp[1]:22 , reg byte a , reg byte x , reg byte y , reg byte z , 
Potential registers zp[2]:11 [ memcpy::src_end#0 ] : zp[2]:11 , 
Potential registers zp[2]:8 [ memset::end#0 ] : zp[2]:8 , 

REGISTER UPLIFT SCOPES
Uplift Scope [memcpy] 3,012,500,004.25: zp[2]:4 [ memcpy::src#2 memcpy::src#4 memcpy::src#1 ] 2,023,333,337.67: zp[2]:6 [ memcpy::dst#2 memcpy::dst#4 memcpy::dst#1 ] 126,250,000.25: zp[2]:11 [ memcpy::src_end#0 ] 0: zp[2]:41 [ memcpy::source#2 ] 0: zp[2]:43 [ memcpy::destination#2 ] 
Uplift Scope [memset] 3,356,666,672.33: zp[2]:2 [ memset::dst#2 memset::dst#4 memset::dst#1 ] 168,333,333.67: zp[2]:8 [ memset::end#0 ] 142,857,143: zp[1]:10 [ memset::c#4 ] 0: zp[2]:45 [ memset::str#3 ] 
Uplift Scope [] 60,379.4: zp[1]:13 [ conio_cursor_y ] 49,113.51: zp[2]:14 [ conio_line_color ] 47,023.57: zp[2]:16 [ conio_line_text ] 4,057: zp[1]:19 [ conio_cursor_x ] 
Uplift Scope [cputc] 15,001.5: zp[1]:18 [ cputc::c#0 ] 
Uplift Scope [printf_str] 1,901.9: zp[2]:20 [ printf_str::s#2 printf_str::s#0 ] 1,001: zp[1]:22 [ printf_str::c#1 ] 
Uplift Scope [gotoxy] 202: zp[2]:23 [ gotoxy::$8 ] 202: zp[2]:25 [ gotoxy::$9 ] 202: zp[2]:27 [ gotoxy::$5 ] 202: zp[2]:29 [ gotoxy::$6 ] 151.5: zp[2]:31 [ gotoxy::$7 ] 138.33: zp[1]:33 [ gotoxy::y#4 gotoxy::y#2 ] 101: zp[2]:35 [ gotoxy::line_offset#0 ] 
Uplift Scope [memoryRemap] 101: zp[1]:34 [ memoryRemap::zVal ] 50.5: zp[1]:37 [ memoryRemap::yVal ] 33.67: zp[1]:38 [ memoryRemap::xVal ] 25.25: zp[1]:40 [ memoryRemap::aVal ] 
Uplift Scope [conio_mega65_init] 33: zp[1]:39 [ conio_mega65_init::line#2 conio_mega65_init::line#0 ] 
Uplift Scope [RADIX] 
Uplift Scope [cputln] 
Uplift Scope [MOS6526_CIA] 
Uplift Scope [MOS6569_VICII] 
Uplift Scope [MOS6581_SID] 
Uplift Scope [MOS4569_VICIII] 
Uplift Scope [MEGA65_VICIV] 
Uplift Scope [F018_DMAGIC] 
Uplift Scope [DMA_LIST_F018A] 
Uplift Scope [DMA_LIST_F018B] 
Uplift Scope [cscroll] 
Uplift Scope [printf_format_number] 
Uplift Scope [printf_buffer_number] 
Uplift Scope [printf_format_string] 
Uplift Scope [main] 
Uplift Scope [__start] 

Uplifting [memcpy] best 10837 combination zp[2]:4 [ memcpy::src#2 memcpy::src#4 memcpy::src#1 ] zp[2]:6 [ memcpy::dst#2 memcpy::dst#4 memcpy::dst#1 ] zp[2]:11 [ memcpy::src_end#0 ] zp[2]:41 [ memcpy::source#2 ] zp[2]:43 [ memcpy::destination#2 ] 
Uplifting [memset] best 10631 combination zp[2]:2 [ memset::dst#2 memset::dst#4 memset::dst#1 ] zp[2]:8 [ memset::end#0 ] reg byte z [ memset::c#4 ] zp[2]:45 [ memset::str#3 ] 
Uplifting [] best 10631 combination zp[1]:13 [ conio_cursor_y ] zp[2]:14 [ conio_line_color ] zp[2]:16 [ conio_line_text ] zp[1]:19 [ conio_cursor_x ] 
Uplifting [cputc] best 10622 combination reg byte a [ cputc::c#0 ] 
Uplifting [printf_str] best 10552 combination zp[2]:20 [ printf_str::s#2 printf_str::s#0 ] reg byte a [ printf_str::c#1 ] 
Uplifting [gotoxy] best 10539 combination zp[2]:23 [ gotoxy::$8 ] zp[2]:25 [ gotoxy::$9 ] zp[2]:27 [ gotoxy::$5 ] zp[2]:29 [ gotoxy::$6 ] zp[2]:31 [ gotoxy::$7 ] reg byte x [ gotoxy::y#4 gotoxy::y#2 ] zp[2]:35 [ gotoxy::line_offset#0 ] 
Uplifting [memoryRemap] best 10539 combination zp[1]:34 [ memoryRemap::zVal ] zp[1]:37 [ memoryRemap::yVal ] zp[1]:38 [ memoryRemap::xVal ] zp[1]:40 [ memoryRemap::aVal ] 
Uplifting [conio_mega65_init] best 10527 combination reg byte x [ conio_mega65_init::line#2 conio_mega65_init::line#0 ] 
Uplifting [RADIX] best 10527 combination 
Uplifting [cputln] best 10527 combination 
Uplifting [MOS6526_CIA] best 10527 combination 
Uplifting [MOS6569_VICII] best 10527 combination 
Uplifting [MOS6581_SID] best 10527 combination 
Uplifting [MOS4569_VICIII] best 10527 combination 
Uplifting [MEGA65_VICIV] best 10527 combination 
Uplifting [F018_DMAGIC] best 10527 combination 
Uplifting [DMA_LIST_F018A] best 10527 combination 
Uplifting [DMA_LIST_F018B] best 10527 combination 
Uplifting [cscroll] best 10527 combination 
Uplifting [printf_format_number] best 10527 combination 
Uplifting [printf_buffer_number] best 10527 combination 
Uplifting [printf_format_string] best 10527 combination 
Uplifting [main] best 10527 combination 
Uplifting [__start] best 10527 combination 
Attempting to uplift remaining variables inzp[1]:13 [ conio_cursor_y ]
Uplifting [] best 10527 combination zp[1]:13 [ conio_cursor_y ] 
Attempting to uplift remaining variables inzp[1]:19 [ conio_cursor_x ]
Uplifting [] best 10527 combination zp[1]:19 [ conio_cursor_x ] 
Attempting to uplift remaining variables inzp[1]:34 [ memoryRemap::zVal ]
Uplifting [memoryRemap] best 10527 combination zp[1]:34 [ memoryRemap::zVal ] 
Attempting to uplift remaining variables inzp[1]:37 [ memoryRemap::yVal ]
Uplifting [memoryRemap] best 10527 combination zp[1]:37 [ memoryRemap::yVal ] 
Attempting to uplift remaining variables inzp[1]:38 [ memoryRemap::xVal ]
Uplifting [memoryRemap] best 10527 combination zp[1]:38 [ memoryRemap::xVal ] 
Attempting to uplift remaining variables inzp[1]:40 [ memoryRemap::aVal ]
Uplifting [memoryRemap] best 10527 combination zp[1]:40 [ memoryRemap::aVal ] 
Coalescing zero page register [ zp[2]:41 [ memcpy::source#2 ] ] with [ zp[2]:4 [ memcpy::src#2 memcpy::src#4 memcpy::src#1 ] ] - score: 1
Coalescing zero page register [ zp[2]:43 [ memcpy::destination#2 ] ] with [ zp[2]:6 [ memcpy::dst#2 memcpy::dst#4 memcpy::dst#1 ] ] - score: 1
Coalescing zero page register [ zp[2]:45 [ memset::str#3 ] ] with [ zp[2]:2 [ memset::dst#2 memset::dst#4 memset::dst#1 ] ] - score: 1
Coalescing zero page register [ zp[2]:31 [ gotoxy::$7 ] ] with [ zp[2]:25 [ gotoxy::$9 ] ] - score: 1
Coalescing zero page register [ zp[2]:35 [ gotoxy::line_offset#0 ] ] with [ zp[2]:29 [ gotoxy::$6 ] ] - score: 1
Coalescing zero page register [ zp[2]:31 [ gotoxy::$7 gotoxy::$9 ] ] with [ zp[2]:35 [ gotoxy::line_offset#0 gotoxy::$6 ] ] - score: 1
Coalescing zero page register [ zp[2]:45 [ memset::str#3 memset::dst#2 memset::dst#4 memset::dst#1 ] ] with [ zp[2]:41 [ memcpy::source#2 memcpy::src#2 memcpy::src#4 memcpy::src#1 ] ]
Coalescing zero page register [ zp[2]:8 [ memset::end#0 ] ] with [ zp[2]:43 [ memcpy::destination#2 memcpy::dst#2 memcpy::dst#4 memcpy::dst#1 ] ]
Allocated (was zp[2]:45) zp[2]:2 [ memset::str#3 memset::dst#2 memset::dst#4 memset::dst#1 memcpy::source#2 memcpy::src#2 memcpy::src#4 memcpy::src#1 ]
Allocated (was zp[2]:8) zp[2]:4 [ memset::end#0 memcpy::destination#2 memcpy::dst#2 memcpy::dst#4 memcpy::dst#1 ]
Allocated (was zp[2]:11) zp[2]:6 [ memcpy::src_end#0 ]
Allocated (was zp[1]:13) zp[1]:8 [ conio_cursor_y ]
Allocated (was zp[2]:14) zp[2]:9 [ conio_line_color ]
Allocated (was zp[2]:16) zp[2]:11 [ conio_line_text ]
Allocated (was zp[1]:19) zp[1]:13 [ conio_cursor_x ]
Allocated (was zp[2]:20) zp[2]:14 [ printf_str::s#2 printf_str::s#0 ]
Allocated (was zp[2]:31) zp[2]:16 [ gotoxy::$7 gotoxy::$9 gotoxy::line_offset#0 gotoxy::$6 ]
Allocated (was zp[2]:23) zp[2]:18 [ gotoxy::$8 ]
Allocated (was zp[2]:27) zp[2]:20 [ gotoxy::$5 ]
Allocated (was zp[1]:34) zp[1]:22 [ memoryRemap::zVal ]
Allocated (was zp[1]:37) zp[1]:23 [ memoryRemap::yVal ]
Allocated (was zp[1]:38) zp[1]:24 [ memoryRemap::xVal ]
Allocated (was zp[1]:40) zp[1]:25 [ memoryRemap::aVal ]

ASSEMBLER BEFORE OPTIMIZATION
  // File Comments
// Hello World for MEGA 65 - using stdio.h and conio.h
/// @file
/// Functions for performing input and output.
  // Upstart
.cpu _45gs02
  // MEGA65 platform PRG executable starting in MEGA65 mode.
.file [name="helloworld-mega65.prg", type="prg", segments="Program"]
.segmentdef Program [segments="Basic, Code, Data"]
.segmentdef Basic [start=$2001]
.segmentdef Code [start=$2017]
.segmentdef Data [startAfter="Code"]
.segment Basic
.byte $0a, $20, $0a, $00, $fe, $02, $20, $30, $00       // 10 BANK 0
.byte $15, $20, $14, $00, $9e, $20                      // 20 SYS 
.text toIntString(__start)                                   //         NNNN
.byte $00, $00, $00                                     // 
  // Global Constants & labels
  /// Map 2nd KB of colour RAM $DC00-$DFFF (hiding CIA's)
  .const CRAM2K = 1
  .const LIGHT_BLUE = $e
  .const STACK_BASE = $103
  /// I/O Personality selection
  .label IO_KEY = $d02f
  /// C65 Banking Register
  .label IO_BANK = $d030
  /// Color Ram
  .label COLORRAM = $d800
  /// Default address of screen character matrix
  .label DEFAULT_SCREEN = $800
  // The number of bytes on the screen
  // The current cursor x-position
  .label conio_cursor_x = $d
  // The current cursor y-position
  .label conio_cursor_y = 8
  // The current text cursor line start
  .label conio_line_text = $b
  // The current color cursor line start
  .label conio_line_color = 9
.segment Code
  // __start
__start: {
    jmp __init1
    // __start::__init1
  __init1:
    // [1] conio_cursor_x = 0 -- vbuz1=vbuc1 
    lda #0
    sta.z conio_cursor_x
    // [2] conio_cursor_y = 0 -- vbuz1=vbuc1 
    lda #0
    sta.z conio_cursor_y
    // [3] conio_line_text = DEFAULT_SCREEN -- pbuz1=pbuc1 
    lda #<DEFAULT_SCREEN
    sta.z conio_line_text
    lda #>DEFAULT_SCREEN
    sta.z conio_line_text+1
    // [4] conio_line_color = COLORRAM -- pbuz1=pbuc1 
    lda #<COLORRAM
    sta.z conio_line_color
    lda #>COLORRAM
    sta.z conio_line_color+1
    // [5] call conio_mega65_init
    // [9] phi from __start::__init1 to conio_mega65_init [phi:__start::__init1->conio_mega65_init]
  conio_mega65_init_from___init1:
    jsr conio_mega65_init
    // [6] phi from __start::__init1 to __start::@1 [phi:__start::__init1->__start::@1]
  __b1_from___init1:
    jmp __b1
    // __start::@1
  __b1:
    // [7] call main
    // [34] phi from __start::@1 to main [phi:__start::@1->main]
  main_from___b1:
    jsr main
    jmp __breturn
    // __start::@return
  __breturn:
    // [8] return 
    rts
}
  // conio_mega65_init
// Enable 2K Color ROM
conio_mega65_init: {
    // Position cursor at current line
    .label BASIC_CURSOR_LINE = $eb
    jmp SEI1
    // conio_mega65_init::SEI1
  SEI1:
    // asm { sei  }
    sei
    // [11] phi from conio_mega65_init::SEI1 to conio_mega65_init::@2 [phi:conio_mega65_init::SEI1->conio_mega65_init::@2]
  __b2_from_SEI1:
    jmp __b2
    // conio_mega65_init::@2
  __b2:
    // [12] call memoryRemap
    // Map memory to BANK 0 : 0x00XXXX - giving access to I/O
    jsr memoryRemap
    jmp __b3
    // conio_mega65_init::@3
  __b3:
    // [13] *IO_KEY = $47 -- _deref_pbuc1=vbuc2 
    // Enable the VIC 4
    lda #$47
    sta IO_KEY
    // [14] *IO_KEY = $53 -- _deref_pbuc1=vbuc2 
    lda #$53
    sta IO_KEY
    // [15] *IO_BANK = *IO_BANK | CRAM2K -- _deref_pbuc1=_deref_pbuc1_bor_vbuc2 
    // Enable 2K Color RAM
    lda #CRAM2K
    ora IO_BANK
    sta IO_BANK
    // [16] conio_mega65_init::line#0 = *conio_mega65_init::BASIC_CURSOR_LINE + 1 -- vbuxx=_deref_pbuc1_plus_1 
    ldx BASIC_CURSOR_LINE
    inx
    // [17] if(conio_mega65_init::line#0<$19) goto conio_mega65_init::@4 -- vbuxx_lt_vbuc1_then_la1 
    cpx #$19
    bcc __b4_from___b3
    // [19] phi from conio_mega65_init::@3 to conio_mega65_init::@1 [phi:conio_mega65_init::@3->conio_mega65_init::@1]
  __b1_from___b3:
    // [19] phi conio_mega65_init::line#2 = $19-1 [phi:conio_mega65_init::@3->conio_mega65_init::@1#0] -- vbuxx=vbuc1 
    ldx #$19-1
    jmp __b1
    // [18] phi from conio_mega65_init::@3 to conio_mega65_init::@4 [phi:conio_mega65_init::@3->conio_mega65_init::@4]
  __b4_from___b3:
    jmp __b4
    // conio_mega65_init::@4
  __b4:
    // [19] phi from conio_mega65_init::@4 to conio_mega65_init::@1 [phi:conio_mega65_init::@4->conio_mega65_init::@1]
  __b1_from___b4:
    // [19] phi conio_mega65_init::line#2 = conio_mega65_init::line#0 [phi:conio_mega65_init::@4->conio_mega65_init::@1#0] -- register_copy 
    jmp __b1
    // conio_mega65_init::@1
  __b1:
    // [20] gotoxy::y#2 = conio_mega65_init::line#2
    // [21] call gotoxy
    jsr gotoxy
    jmp __breturn
    // conio_mega65_init::@return
  __breturn:
    // [22] return 
    rts
}
  // cputc
// Output one character at the current cursor position
// Moves the cursor forward. Scrolls the entire screen if needed
// void cputc(__register(A) char c)
cputc: {
    .const OFFSET_STACK_C = 0
    // [23] cputc::c#0 = stackidx(char,cputc::OFFSET_STACK_C) -- vbuaa=_stackidxbyte_vbuc1 
    tsx
    lda STACK_BASE+OFFSET_STACK_C,x
    // [24] if(cputc::c#0==' ') goto cputc::@1 -- vbuaa_eq_vbuc1_then_la1 
    cmp #'\n'
    beq __b1_from_cputc
    jmp __b2
    // cputc::@2
  __b2:
    // [25] conio_line_text[conio_cursor_x] = cputc::c#0 -- pbuz1_derefidx_vbuz2=vbuaa 
    ldz conio_cursor_x
    sta.z (conio_line_text),z
    // [26] conio_line_color[conio_cursor_x] = LIGHT_BLUE -- pbuz1_derefidx_vbuz2=vbuc1 
    lda #LIGHT_BLUE
    ldz conio_cursor_x
    sta.z (conio_line_color),z
    // [27] conio_cursor_x = ++ conio_cursor_x -- vbuz1=_inc_vbuz1 
    inc.z conio_cursor_x
    // [28] if(conio_cursor_x!=$50) goto cputc::@return -- vbuz1_neq_vbuc1_then_la1 
    lda #$50
    cmp.z conio_cursor_x
    bne __breturn
    // [29] phi from cputc::@2 to cputc::@3 [phi:cputc::@2->cputc::@3]
  __b3_from___b2:
    jmp __b3
    // cputc::@3
  __b3:
    // [30] call cputln
    jsr cputln
    jmp __breturn
    // cputc::@return
  __breturn:
    // [31] return 
    rts
    // [32] phi from cputc to cputc::@1 [phi:cputc->cputc::@1]
  __b1_from_cputc:
    jmp __b1
    // cputc::@1
  __b1:
    // [33] call cputln
    jsr cputln
    jmp __breturn
}
  // main
main: {
    // [35] call printf_str
    // [63] phi from main to printf_str [phi:main->printf_str]
  printf_str_from_main:
    jsr printf_str
    jmp __breturn
    // main::@return
  __breturn:
    // [36] return 
    rts
  .segment Data
    s: .text "hello world!"
    .byte 0
}
.segment Code
  // memoryRemap
// Remap some of the eight 8K memory blocks in the 64K address space of the 6502 to point somewhere else in the first 1MB memory space of the MEGA65.
// After the remapping the CPU will access the mapped memory whenever it uses instructions that access a remapped block.
// See section 2.3.4 in http://www.zimmers.net/cbmpics/cbm/c65/c65manual.txt for a description of the CPU memory remapper of the C65.
// remapBlocks: Indicates which 8K blocks of the 6502 address space to remap. Each bit represents one 8K block
// - bit 0  Memory block $0000-$1fff. Use constant MEMORYBLOCK_0000.
// - bit 1  Memory block $2000-$3fff. Use constant MEMORYBLOCK_2000.
// - bit 2  Memory block $4000-$5fff. Use constant MEMORYBLOCK_4000.
// - bit 3  Memory block $6000-$7fff. Use constant MEMORYBLOCK_6000.
// - bit 4  Memory block $8000-$9fff. Use constant MEMORYBLOCK_8000.
// - bit 5  Memory block $a000-$bfff. Use constant MEMORYBLOCK_A000.
// - bit 6  Memory block $c000-$dfff. Use constant MEMORYBLOCK_C000.
// - bit 7  Memory block $e000-$ffff. Use constant MEMORYBLOCK_E000.
// lowerPageOffset: Offset that will be added to any remapped blocks in the lower 32K of memory (block 0-3).
// The offset is a page offset (meaning it is multiplied by 0x100). Only the lower 12bits of the passed value is used.
// - If block 0 ($0000-$1fff) is remapped it will point to lowerPageOffset*$100.
// - If block 1 ($2000-$3fff) is remapped it will point to lowerPageOffset*$100 + $2000.
// - If block 2 ($4000-$5fff) is remapped it will point to lowerPageOffset*$100 + $4000.
// - If block 3 ($6000-$7fff) is remapped it will point to lowerPageOffset*$100 + $6000.
// upperPageOffset: Offset that will be added to any remapped blocks in the upper 32K of memory (block 4-7).
// The offset is a page offset (meaning it is multiplied by 0x100). Only the lower 12bits of the passed value is used.
// - If block 4 ($8000-$9fff) is remapped it will point to upperPageOffset*$100 + $8000
// - If block 5 ($a000-$bfff) is remapped it will point to upperPageOffset*$100 + $a000.
// - If block 6 ($c000-$dfff) is remapped it will point to upperPageOffset*$100 + $c000.
// - If block 7 ($e000-$ffff) is remapped it will point to upperPageOffset*$100 + $e000.
// void memoryRemap(char remapBlocks, unsigned int lowerPageOffset, unsigned int upperPageOffset)
memoryRemap: {
    .label aVal = $19
    .label xVal = $18
    .label yVal = $17
    .label zVal = $16
    // [37] memoryRemap::aVal = 0 -- vbuz1=vbuc1 
    // lower blocks offset page low
    lda #0
    sta.z aVal
    // [38] memoryRemap::xVal = 0 -- vbuz1=vbuc1 
    // lower blocks to map + lower blocks offset high nibble
    lda #0
    sta.z xVal
    // [39] memoryRemap::yVal = 0 -- vbuz1=vbuc1 
    // upper blocks offset page
    lda #0
    sta.z yVal
    // [40] memoryRemap::zVal = 0 -- vbuz1=vbuc1 
    // upper blocks to map + upper blocks offset page high nibble
    lda #0
    sta.z zVal
    // asm { ldaaVal ldxxVal ldyyVal ldzzVal map eom  }
    lda aVal
    ldx xVal
    ldy yVal
    ldz zVal
    map
    eom
    jmp __breturn
    // memoryRemap::@return
  __breturn:
    // [42] return 
    rts
}
  // gotoxy
// Set the cursor to the specified position
// void gotoxy(char x, __register(X) char y)
gotoxy: {
    .const x = 0
    .label __5 = $14
    .label __6 = $10
    .label __7 = $10
    .label line_offset = $10
    .label __8 = $12
    .label __9 = $10
    // [43] if(gotoxy::y#2<$19+1) goto gotoxy::@3 -- vbuxx_lt_vbuc1_then_la1 
    cpx #$19+1
    bcc __b3_from_gotoxy
    // [45] phi from gotoxy to gotoxy::@1 [phi:gotoxy->gotoxy::@1]
  __b1_from_gotoxy:
    // [45] phi gotoxy::y#4 = 0 [phi:gotoxy->gotoxy::@1#0] -- vbuxx=vbuc1 
    ldx #0
    jmp __b1
    // [44] phi from gotoxy to gotoxy::@3 [phi:gotoxy->gotoxy::@3]
  __b3_from_gotoxy:
    jmp __b3
    // gotoxy::@3
  __b3:
    // [45] phi from gotoxy::@3 to gotoxy::@1 [phi:gotoxy::@3->gotoxy::@1]
  __b1_from___b3:
    // [45] phi gotoxy::y#4 = gotoxy::y#2 [phi:gotoxy::@3->gotoxy::@1#0] -- register_copy 
    jmp __b1
    // gotoxy::@1
  __b1:
    jmp __b2
    // gotoxy::@2
  __b2:
    // [46] conio_cursor_x = gotoxy::x#2 -- vbuz1=vbuc1 
    lda #x
    sta.z conio_cursor_x
    // [47] conio_cursor_y = gotoxy::y#4 -- vbuz1=vbuxx 
    stx.z conio_cursor_y
    // [48] gotoxy::$7 = (unsigned int)gotoxy::y#4 -- vwuz1=_word_vbuxx 
    txa
    sta.z __7
    lda #0
    sta.z __7+1
    // [49] gotoxy::$8 = gotoxy::$7 << 2 -- vwuz1=vwuz2_rol_2 
    lda.z __7
    asl
    sta.z __8
    lda.z __7+1
    rol
    sta.z __8+1
    asl.z __8
    rol.z __8+1
    // [50] gotoxy::$9 = gotoxy::$8 + gotoxy::$7 -- vwuz1=vwuz2_plus_vwuz1 
    clc
    lda.z __9
    adc.z __8
    sta.z __9
    lda.z __9+1
    adc.z __8+1
    sta.z __9+1
    // [51] gotoxy::line_offset#0 = gotoxy::$9 << 4 -- vwuz1=vwuz1_rol_4 
    asw line_offset
    asw line_offset
    asw line_offset
    asw line_offset
    // [52] gotoxy::$5 = DEFAULT_SCREEN + gotoxy::line_offset#0 -- pbuz1=pbuc1_plus_vwuz2 
    lda.z line_offset
    clc
    adc #<DEFAULT_SCREEN
    sta.z __5
    lda.z line_offset+1
    adc #>DEFAULT_SCREEN
    sta.z __5+1
    // [53] conio_line_text = gotoxy::$5 -- pbuz1=pbuz2 
    lda.z __5
    sta.z conio_line_text
    lda.z __5+1
    sta.z conio_line_text+1
    // [54] gotoxy::$6 = COLORRAM + gotoxy::line_offset#0 -- pbuz1=pbuc1_plus_vwuz1 
    lda.z __6
    clc
    adc #<COLORRAM
    sta.z __6
    lda.z __6+1
    adc #>COLORRAM
    sta.z __6+1
    // [55] conio_line_color = gotoxy::$6 -- pbuz1=pbuz2 
    lda.z __6
    sta.z conio_line_color
    lda.z __6+1
    sta.z conio_line_color+1
    jmp __breturn
    // gotoxy::@return
  __breturn:
    // [56] return 
    rts
}
  // cputln
// Print a newline
cputln: {
    // [57] conio_line_text = conio_line_text + $50 -- pbuz1=pbuz1_plus_vbuc1 
    lda #$50
    clc
    adc.z conio_line_text
    sta.z conio_line_text
    bcc !+
    inc.z conio_line_text+1
  !:
    // [58] conio_line_color = conio_line_color + $50 -- pbuz1=pbuz1_plus_vbuc1 
    lda #$50
    clc
    adc.z conio_line_color
    sta.z conio_line_color
    bcc !+
    inc.z conio_line_color+1
  !:
    // [59] conio_cursor_x = 0 -- vbuz1=vbuc1 
    lda #0
    sta.z conio_cursor_x
    // [60] conio_cursor_y = ++ conio_cursor_y -- vbuz1=_inc_vbuz1 
    inc.z conio_cursor_y
    // [61] call cscroll
    jsr cscroll
    jmp __breturn
    // cputln::@return
  __breturn:
    // [62] return 
    rts
}
  // printf_str
/// Print a NUL-terminated string
// void printf_str(void (*putc)(char), __zp($e) const char *s)
printf_str: {
    .label s = $e
    // [64] phi from printf_str to printf_str::@1 [phi:printf_str->printf_str::@1]
  __b1_from_printf_str:
    // [64] phi printf_str::s#2 = main::s [phi:printf_str->printf_str::@1#0] -- pbuz1=pbuc1 
    lda #<main.s
    sta.z s
    lda #>main.s
    sta.z s+1
    jmp __b1
    // printf_str::@1
  __b1:
    // [65] printf_str::c#1 = *printf_str::s#2 -- vbuaa=_deref_pbuz1 
    ldy #0
    lda (s),y
    // [66] printf_str::s#0 = ++ printf_str::s#2 -- pbuz1=_inc_pbuz1 
    inw.z s
    // [67] if(0!=printf_str::c#1) goto printf_str::@2 -- 0_neq_vbuaa_then_la1 
    cmp #0
    bne __b2
    jmp __breturn
    // printf_str::@return
  __breturn:
    // [68] return 
    rts
    // printf_str::@2
  __b2:
    // [69] stackpush(char) = printf_str::c#1 -- _stackpushbyte_=vbuaa 
    pha
    // [70] callexecute cputc  -- call_vprc1 
    jsr cputc
    // sideeffect stackpullbytes(1) -- _stackpullbyte_1 
    pla
    // [64] phi from printf_str::@2 to printf_str::@1 [phi:printf_str::@2->printf_str::@1]
  __b1_from___b2:
    // [64] phi printf_str::s#2 = printf_str::s#0 [phi:printf_str::@2->printf_str::@1#0] -- register_copy 
    jmp __b1
}
  // cscroll
// Scroll the entire screen if the cursor is beyond the last line
cscroll: {
    // [72] if(conio_cursor_y!=$19) goto cscroll::@return -- vbuz1_neq_vbuc1_then_la1 
    lda #$19
    cmp.z conio_cursor_y
    bne __breturn
    // [73] phi from cscroll to cscroll::@1 [phi:cscroll->cscroll::@1]
  __b1_from_cscroll:
    jmp __b1
    // cscroll::@1
  __b1:
    // [74] call memcpy
    // [85] phi from cscroll::@1 to memcpy [phi:cscroll::@1->memcpy]
  memcpy_from___b1:
    // [85] phi memcpy::destination#2 = (void *)DEFAULT_SCREEN [phi:cscroll::@1->memcpy#0] -- pvoz1=pvoc1 
    lda #<DEFAULT_SCREEN
    sta.z memcpy.destination
    lda #>DEFAULT_SCREEN
    sta.z memcpy.destination+1
    // [85] phi memcpy::source#2 = (void *)DEFAULT_SCREEN+$50 [phi:cscroll::@1->memcpy#1] -- pvoz1=pvoc1 
    lda #<DEFAULT_SCREEN+$50
    sta.z memcpy.source
    lda #>DEFAULT_SCREEN+$50
    sta.z memcpy.source+1
    jsr memcpy
    // [75] phi from cscroll::@1 to cscroll::@2 [phi:cscroll::@1->cscroll::@2]
  __b2_from___b1:
    jmp __b2
    // cscroll::@2
  __b2:
    // [76] call memcpy
    // [85] phi from cscroll::@2 to memcpy [phi:cscroll::@2->memcpy]
  memcpy_from___b2:
    // [85] phi memcpy::destination#2 = (void *)COLORRAM [phi:cscroll::@2->memcpy#0] -- pvoz1=pvoc1 
    lda #<COLORRAM
    sta.z memcpy.destination
    lda #>COLORRAM
    sta.z memcpy.destination+1
    // [85] phi memcpy::source#2 = (void *)COLORRAM+$50 [phi:cscroll::@2->memcpy#1] -- pvoz1=pvoc1 
    lda #<COLORRAM+$50
    sta.z memcpy.source
    lda #>COLORRAM+$50
    sta.z memcpy.source+1
    jsr memcpy
    // [77] phi from cscroll::@2 to cscroll::@3 [phi:cscroll::@2->cscroll::@3]
  __b3_from___b2:
    jmp __b3
    // cscroll::@3
  __b3:
    // [78] call memset
    // [95] phi from cscroll::@3 to memset [phi:cscroll::@3->memset]
  memset_from___b3:
    // [95] phi memset::c#4 = ' ' [phi:cscroll::@3->memset#0] -- vbuzz=vbuc1 
    ldz #' '
    // [95] phi memset::str#3 = (void *)DEFAULT_SCREEN+(unsigned int)$19*$50-$50 [phi:cscroll::@3->memset#1] -- pvoz1=pvoc1 
    lda #<DEFAULT_SCREEN+$19*$50-$50
    sta.z memset.str
    lda #>DEFAULT_SCREEN+$19*$50-$50
    sta.z memset.str+1
    jsr memset
    // [79] phi from cscroll::@3 to cscroll::@4 [phi:cscroll::@3->cscroll::@4]
  __b4_from___b3:
    jmp __b4
    // cscroll::@4
  __b4:
    // [80] call memset
    // [95] phi from cscroll::@4 to memset [phi:cscroll::@4->memset]
  memset_from___b4:
    // [95] phi memset::c#4 = LIGHT_BLUE [phi:cscroll::@4->memset#0] -- vbuzz=vbuc1 
    ldz #LIGHT_BLUE
    // [95] phi memset::str#3 = (void *)COLORRAM+(unsigned int)$19*$50-$50 [phi:cscroll::@4->memset#1] -- pvoz1=pvoc1 
    lda #<COLORRAM+$19*$50-$50
    sta.z memset.str
    lda #>COLORRAM+$19*$50-$50
    sta.z memset.str+1
    jsr memset
    jmp __b5
    // cscroll::@5
  __b5:
    // [81] conio_line_text = conio_line_text - $50 -- pbuz1=pbuz1_minus_vbuc1 
    sec
    lda.z conio_line_text
    sbc #$50
    sta.z conio_line_text
    lda.z conio_line_text+1
    sbc #0
    sta.z conio_line_text+1
    // [82] conio_line_color = conio_line_color - $50 -- pbuz1=pbuz1_minus_vbuc1 
    sec
    lda.z conio_line_color
    sbc #$50
    sta.z conio_line_color
    lda.z conio_line_color+1
    sbc #0
    sta.z conio_line_color+1
    // [83] conio_cursor_y = -- conio_cursor_y -- vbuz1=_dec_vbuz1 
    dec.z conio_cursor_y
    jmp __breturn
    // cscroll::@return
  __breturn:
    // [84] return 
    rts
}
  // 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.
// void * memcpy(__zp(4) void *destination, __zp(2) void *source, unsigned int num)
memcpy: {
    .label src_end = 6
    .label dst = 4
    .label src = 2
    .label source = 2
    .label destination = 4
    // [86] memcpy::src_end#0 = (char *)memcpy::source#2 + (unsigned int)$19*$50-$50 -- pbuz1=pbuz2_plus_vwuc1 
    lda.z source
    clc
    adc #<$19*$50-$50
    sta.z src_end
    lda.z source+1
    adc #>$19*$50-$50
    sta.z src_end+1
    // [87] memcpy::src#4 = (char *)memcpy::source#2
    // [88] memcpy::dst#4 = (char *)memcpy::destination#2
    // [89] phi from memcpy memcpy::@2 to memcpy::@1 [phi:memcpy/memcpy::@2->memcpy::@1]
  __b1_from_memcpy:
  __b1_from___b2:
    // [89] phi memcpy::dst#2 = memcpy::dst#4 [phi:memcpy/memcpy::@2->memcpy::@1#0] -- register_copy 
    // [89] phi memcpy::src#2 = memcpy::src#4 [phi:memcpy/memcpy::@2->memcpy::@1#1] -- register_copy 
    jmp __b1
    // memcpy::@1
  __b1:
    // [90] if(memcpy::src#2!=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:
    // [91] return 
    rts
    // memcpy::@2
  __b2:
    // [92] *memcpy::dst#2 = *memcpy::src#2 -- _deref_pbuz1=_deref_pbuz2 
    ldy #0
    lda (src),y
    ldy #0
    sta (dst),y
    // [93] memcpy::dst#1 = ++ memcpy::dst#2 -- pbuz1=_inc_pbuz1 
    inw.z dst
    // [94] memcpy::src#1 = ++ memcpy::src#2 -- pbuz1=_inc_pbuz1 
    inw.z src
    jmp __b1_from___b2
}
  // memset
// Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str.
// void * memset(__zp(2) void *str, __register(Z) char c, unsigned int num)
memset: {
    .label end = 4
    .label dst = 2
    .label str = 2
    jmp __b1
    // memset::@1
  __b1:
    // [96] memset::end#0 = (char *)memset::str#3 + $50 -- pbuz1=pbuz2_plus_vbuc1 
    lda #$50
    clc
    adc.z str
    sta.z end
    lda #0
    adc.z str+1
    sta.z end+1
    // [97] memset::dst#4 = (char *)memset::str#3
    // [98] phi from memset::@1 memset::@3 to memset::@2 [phi:memset::@1/memset::@3->memset::@2]
  __b2_from___b1:
  __b2_from___b3:
    // [98] phi memset::dst#2 = memset::dst#4 [phi:memset::@1/memset::@3->memset::@2#0] -- register_copy 
    jmp __b2
    // memset::@2
  __b2:
    // [99] if(memset::dst#2!=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:
    // [100] return 
    rts
    // memset::@3
  __b3:
    // [101] *memset::dst#2 = memset::c#4 -- _deref_pbuz1=vbuzz 
    tza
    ldy #0
    sta (dst),y
    // [102] memset::dst#1 = ++ memset::dst#2 -- pbuz1=_inc_pbuz1 
    inw.z dst
    jmp __b2_from___b3
}
  // File Data

ASSEMBLER OPTIMIZATIONS
Removing instruction jmp __init1
Removing instruction jmp __b1
Removing instruction jmp __breturn
Removing instruction jmp SEI1
Removing instruction jmp __b2
Removing instruction jmp __b3
Removing instruction jmp __b4
Removing instruction jmp __b1
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 __breturn
Removing instruction jmp __b3
Removing instruction jmp __b1
Removing instruction jmp __b2
Removing instruction jmp __breturn
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 __breturn
Removing instruction jmp __b1
Removing instruction jmp __b2
Removing instruction jmp __breturn
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction lda #0
Removing instruction lda #0
Removing instruction lda #0
Removing instruction lda #0
Removing instruction ldy #0
Succesful ASM optimization Pass5UnnecesaryLoadElimination
Replacing label __b4_from___b3 with __b1
Replacing label __b1_from_cputc with __b1
Replacing label __b3_from_gotoxy with __b2
Replacing label __b1 with __b2
Replacing label __b1_from___b2 with __b1
Replacing label __b2_from___b3 with __b2
Removing instruction __b1_from___init1:
Removing instruction main_from___b1:
Removing instruction __b2_from_SEI1:
Removing instruction __b4_from___b3:
Removing instruction __b4:
Removing instruction __b1_from___b4:
Removing instruction __b3_from___b2:
Removing instruction __b1_from_cputc:
Removing instruction __b3_from_gotoxy:
Removing instruction __b3:
Removing instruction __b1_from___b3:
Removing instruction __b1:
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 __b1_from_memcpy:
Removing instruction __b1_from___b2:
Removing instruction __b2_from___b1:
Removing instruction __b2_from___b3:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction __init1:
Removing instruction conio_mega65_init_from___init1:
Removing instruction __b1:
Removing instruction __breturn:
Removing instruction SEI1:
Removing instruction __b2:
Removing instruction __b3:
Removing instruction __b1_from___b3:
Removing instruction __breturn:
Removing instruction __b2:
Removing instruction __b3:
Removing instruction printf_str_from_main:
Removing instruction __breturn:
Removing instruction __breturn:
Removing instruction __b1_from_gotoxy:
Removing instruction __breturn:
Removing instruction __breturn:
Removing instruction __b1_from_printf_str:
Removing instruction __breturn:
Removing instruction __b1_from___b2:
Removing instruction __b1:
Removing instruction __b2:
Removing instruction __b3:
Removing instruction __b4:
Removing instruction __b5:
Removing instruction __breturn:
Removing instruction __b1:
Removing instruction __breturn:
Succesful ASM optimization Pass5UnusedLabelElimination
Replacing jump to rts with rts in jmp __breturn
Succesful ASM optimization Pass5DoubleJumpElimination
Removing instruction jmp __b1
Removing instruction jmp __b2
Succesful ASM optimization Pass5NextJumpElimination

FINAL SYMBOL TABLE
__constant char * const COLORRAM = (char *) 55296
__constant const char CRAM2K = 1
__constant char * const DEFAULT_SCREEN = (char *) 2048
__constant volatile char * const IO_BANK = (char *) 53296
__constant volatile char * const IO_KEY = (char *) 53295
__constant const char LIGHT_BLUE = $e
__constant char RADIX::BINARY = 2
__constant char RADIX::DECIMAL = $a
__constant char RADIX::HEXADECIMAL = $10
__constant char RADIX::OCTAL = 8
__constant unsigned int STACK_BASE = $103
void __start()
__loadstore char conio_cursor_x // zp[1]:13 4057.0
__loadstore char conio_cursor_y // zp[1]:8 60379.3962264151
__loadstore char *conio_line_color // zp[2]:9 49113.51111111111
__loadstore char *conio_line_text // zp[2]:11 47023.574468085106
void conio_mega65_init()
__constant char * const conio_mega65_init::BASIC_CURSOR_LINE = (char *) 235
char conio_mega65_init::line
char conio_mega65_init::line#0 // reg byte x 11.0
char conio_mega65_init::line#2 // reg byte x 22.0
__stackcall void cputc(char c)
__constant char cputc::OFFSET_STACK_C = 0
char cputc::c
char cputc::c#0 // reg byte a 15001.5
void cputln()
void cscroll()
void gotoxy(char x , char y)
char *gotoxy::$5 // zp[2]:20 202.0
char *gotoxy::$6 // zp[2]:16 202.0
unsigned int gotoxy::$7 // zp[2]:16 151.5
unsigned int gotoxy::$8 // zp[2]:18 202.0
unsigned int gotoxy::$9 // zp[2]:16 202.0
unsigned int gotoxy::line_offset
unsigned int gotoxy::line_offset#0 // line_offset zp[2]:16 101.0
char gotoxy::x
__constant char gotoxy::x#2 = 0 // x
char gotoxy::y
char gotoxy::y#2 // reg byte x 71.0
char gotoxy::y#4 // reg byte x 67.33333333333333
void main()
__constant char main::s[$d] = "hello world!"
void * memcpy(void *destination , void *source , unsigned int num)
void *memcpy::destination
void *memcpy::destination#2 // destination zp[2]:4
char *memcpy::dst
char *memcpy::dst#1 // dst zp[2]:4 1.000000001E9
char *memcpy::dst#2 // dst zp[2]:4 1.0033333346666667E9
char *memcpy::dst#4 // dst zp[2]:4 2.0000002E7
unsigned int memcpy::num
void *memcpy::return
void *memcpy::source
void *memcpy::source#2 // source zp[2]:2
char *memcpy::src
char *memcpy::src#1 // src zp[2]:2 2.000000002E9
char *memcpy::src#2 // src zp[2]:2 1.00250000125E9
char *memcpy::src#4 // src zp[2]:2 1.0000001E7
char *memcpy::src_end
char *memcpy::src_end#0 // src_end zp[2]:6 1.2625000025E8
void memoryRemap(char remapBlocks , unsigned int lowerPageOffset , unsigned int upperPageOffset)
__loadstore volatile char memoryRemap::aVal // zp[1]:25 25.25
unsigned int memoryRemap::lowerPageOffset
char memoryRemap::remapBlocks
unsigned int memoryRemap::upperPageOffset
__loadstore volatile char memoryRemap::xVal // zp[1]:24 33.666666666666664
__loadstore volatile char memoryRemap::yVal // zp[1]:23 50.5
__loadstore volatile char memoryRemap::zVal // zp[1]:22 101.0
void * memset(void *str , char c , unsigned int num)
char memset::c
char memset::c#4 // reg byte z 1.42857143E8
char *memset::dst
char *memset::dst#1 // dst zp[2]:2 2.000000002E9
char *memset::dst#2 // dst zp[2]:2 1.3366666683333335E9
char *memset::dst#4 // dst zp[2]:2 2.0000002E7
char *memset::end
char *memset::end#0 // end zp[2]:4 1.683333336666667E8
unsigned int memset::num
void *memset::return
void *memset::str
void *memset::str#3 // str zp[2]:2
void printf_str(void (*putc)(char) , const char *s)
char printf_str::c
char printf_str::c#1 // reg byte a 1001.0
void (*printf_str::putc)(char)
const char *printf_str::s
const char *printf_str::s#0 // s zp[2]:14 400.4
const char *printf_str::s#2 // s zp[2]:14 1501.5

reg byte x [ conio_mega65_init::line#2 conio_mega65_init::line#0 ]
reg byte x [ gotoxy::y#4 gotoxy::y#2 ]
zp[2]:14 [ printf_str::s#2 printf_str::s#0 ]
zp[2]:2 [ memset::str#3 memset::dst#2 memset::dst#4 memset::dst#1 memcpy::source#2 memcpy::src#2 memcpy::src#4 memcpy::src#1 ]
reg byte z [ memset::c#4 ]
zp[1]:13 [ conio_cursor_x ]
zp[1]:8 [ conio_cursor_y ]
zp[2]:11 [ conio_line_text ]
zp[2]:9 [ conio_line_color ]
reg byte a [ cputc::c#0 ]
zp[1]:25 [ memoryRemap::aVal ]
zp[1]:24 [ memoryRemap::xVal ]
zp[1]:23 [ memoryRemap::yVal ]
zp[1]:22 [ memoryRemap::zVal ]
zp[2]:16 [ gotoxy::$7 gotoxy::$9 gotoxy::line_offset#0 gotoxy::$6 ]
zp[2]:18 [ gotoxy::$8 ]
zp[2]:20 [ gotoxy::$5 ]
reg byte a [ printf_str::c#1 ]
zp[2]:6 [ memcpy::src_end#0 ]
zp[2]:4 [ memset::end#0 memcpy::destination#2 memcpy::dst#2 memcpy::dst#4 memcpy::dst#1 ]


FINAL ASSEMBLER
Score: 8813

  // File Comments
// Hello World for MEGA 65 - using stdio.h and conio.h
/// @file
/// Functions for performing input and output.
  // Upstart
.cpu _45gs02
  // MEGA65 platform PRG executable starting in MEGA65 mode.
.file [name="helloworld-mega65.prg", type="prg", segments="Program"]
.segmentdef Program [segments="Basic, Code, Data"]
.segmentdef Basic [start=$2001]
.segmentdef Code [start=$2017]
.segmentdef Data [startAfter="Code"]
.segment Basic
.byte $0a, $20, $0a, $00, $fe, $02, $20, $30, $00       // 10 BANK 0
.byte $15, $20, $14, $00, $9e, $20                      // 20 SYS 
.text toIntString(__start)                                   //         NNNN
.byte $00, $00, $00                                     // 
  // Global Constants & labels
  /// Map 2nd KB of colour RAM $DC00-$DFFF (hiding CIA's)
  .const CRAM2K = 1
  .const LIGHT_BLUE = $e
  .const STACK_BASE = $103
  /// I/O Personality selection
  .label IO_KEY = $d02f
  /// C65 Banking Register
  .label IO_BANK = $d030
  /// Color Ram
  .label COLORRAM = $d800
  /// Default address of screen character matrix
  .label DEFAULT_SCREEN = $800
  // The number of bytes on the screen
  // The current cursor x-position
  .label conio_cursor_x = $d
  // The current cursor y-position
  .label conio_cursor_y = 8
  // The current text cursor line start
  .label conio_line_text = $b
  // The current color cursor line start
  .label conio_line_color = 9
.segment Code
  // __start
__start: {
    // __start::__init1
    // __ma char conio_cursor_x = 0
    // [1] conio_cursor_x = 0 -- vbuz1=vbuc1 
    lda #0
    sta.z conio_cursor_x
    // __ma char conio_cursor_y = 0
    // [2] conio_cursor_y = 0 -- vbuz1=vbuc1 
    sta.z conio_cursor_y
    // __ma char *conio_line_text = CONIO_SCREEN_TEXT
    // [3] conio_line_text = DEFAULT_SCREEN -- pbuz1=pbuc1 
    lda #<DEFAULT_SCREEN
    sta.z conio_line_text
    lda #>DEFAULT_SCREEN
    sta.z conio_line_text+1
    // __ma char *conio_line_color = CONIO_SCREEN_COLORS
    // [4] conio_line_color = COLORRAM -- pbuz1=pbuc1 
    lda #<COLORRAM
    sta.z conio_line_color
    lda #>COLORRAM
    sta.z conio_line_color+1
    // #pragma constructor_for(conio_mega65_init, cputc, clrscr, cscroll)
    // [5] call conio_mega65_init
    // [9] phi from __start::__init1 to conio_mega65_init [phi:__start::__init1->conio_mega65_init]
    jsr conio_mega65_init
    // [6] phi from __start::__init1 to __start::@1 [phi:__start::__init1->__start::@1]
    // __start::@1
    // [7] call main
    // [34] phi from __start::@1 to main [phi:__start::@1->main]
    jsr main
    // __start::@return
    // [8] return 
    rts
}
  // conio_mega65_init
// Enable 2K Color ROM
conio_mega65_init: {
    // Position cursor at current line
    .label BASIC_CURSOR_LINE = $eb
    // conio_mega65_init::SEI1
    // asm
    // asm { sei  }
    sei
    // [11] phi from conio_mega65_init::SEI1 to conio_mega65_init::@2 [phi:conio_mega65_init::SEI1->conio_mega65_init::@2]
    // conio_mega65_init::@2
    // memoryRemap(0,0,0)
    // [12] call memoryRemap
    // Map memory to BANK 0 : 0x00XXXX - giving access to I/O
    jsr memoryRemap
    // conio_mega65_init::@3
    // *IO_KEY = 0x47
    // [13] *IO_KEY = $47 -- _deref_pbuc1=vbuc2 
    // Enable the VIC 4
    lda #$47
    sta IO_KEY
    // *IO_KEY = 0x53
    // [14] *IO_KEY = $53 -- _deref_pbuc1=vbuc2 
    lda #$53
    sta IO_KEY
    // *IO_BANK |= CRAM2K
    // [15] *IO_BANK = *IO_BANK | CRAM2K -- _deref_pbuc1=_deref_pbuc1_bor_vbuc2 
    // Enable 2K Color RAM
    lda #CRAM2K
    ora IO_BANK
    sta IO_BANK
    // char line = *BASIC_CURSOR_LINE+1
    // [16] conio_mega65_init::line#0 = *conio_mega65_init::BASIC_CURSOR_LINE + 1 -- vbuxx=_deref_pbuc1_plus_1 
    ldx BASIC_CURSOR_LINE
    inx
    // if(line>=CONIO_HEIGHT)
    // [17] if(conio_mega65_init::line#0<$19) goto conio_mega65_init::@4 -- vbuxx_lt_vbuc1_then_la1 
    cpx #$19
    bcc __b1
    // [19] phi from conio_mega65_init::@3 to conio_mega65_init::@1 [phi:conio_mega65_init::@3->conio_mega65_init::@1]
    // [19] phi conio_mega65_init::line#2 = $19-1 [phi:conio_mega65_init::@3->conio_mega65_init::@1#0] -- vbuxx=vbuc1 
    ldx #$19-1
    // [18] phi from conio_mega65_init::@3 to conio_mega65_init::@4 [phi:conio_mega65_init::@3->conio_mega65_init::@4]
    // conio_mega65_init::@4
    // [19] phi from conio_mega65_init::@4 to conio_mega65_init::@1 [phi:conio_mega65_init::@4->conio_mega65_init::@1]
    // [19] phi conio_mega65_init::line#2 = conio_mega65_init::line#0 [phi:conio_mega65_init::@4->conio_mega65_init::@1#0] -- register_copy 
    // conio_mega65_init::@1
  __b1:
    // gotoxy(0, line)
    // [20] gotoxy::y#2 = conio_mega65_init::line#2
    // [21] call gotoxy
    jsr gotoxy
    // conio_mega65_init::@return
    // }
    // [22] return 
    rts
}
  // cputc
// Output one character at the current cursor position
// Moves the cursor forward. Scrolls the entire screen if needed
// void cputc(__register(A) char c)
cputc: {
    .const OFFSET_STACK_C = 0
    // [23] cputc::c#0 = stackidx(char,cputc::OFFSET_STACK_C) -- vbuaa=_stackidxbyte_vbuc1 
    tsx
    lda STACK_BASE+OFFSET_STACK_C,x
    // if(c=='\n')
    // [24] if(cputc::c#0==' ') goto cputc::@1 -- vbuaa_eq_vbuc1_then_la1 
    cmp #'\n'
    beq __b1
    // cputc::@2
    // conio_line_text[conio_cursor_x] = c
    // [25] conio_line_text[conio_cursor_x] = cputc::c#0 -- pbuz1_derefidx_vbuz2=vbuaa 
    ldz conio_cursor_x
    sta.z (conio_line_text),z
    // conio_line_color[conio_cursor_x] = conio_textcolor
    // [26] conio_line_color[conio_cursor_x] = LIGHT_BLUE -- pbuz1_derefidx_vbuz2=vbuc1 
    lda #LIGHT_BLUE
    ldz conio_cursor_x
    sta.z (conio_line_color),z
    // if(++conio_cursor_x==CONIO_WIDTH)
    // [27] conio_cursor_x = ++ conio_cursor_x -- vbuz1=_inc_vbuz1 
    inc.z conio_cursor_x
    // [28] if(conio_cursor_x!=$50) goto cputc::@return -- vbuz1_neq_vbuc1_then_la1 
    lda #$50
    cmp.z conio_cursor_x
    bne __breturn
    // [29] phi from cputc::@2 to cputc::@3 [phi:cputc::@2->cputc::@3]
    // cputc::@3
    // cputln()
    // [30] call cputln
    jsr cputln
    // cputc::@return
  __breturn:
    // }
    // [31] return 
    rts
    // [32] phi from cputc to cputc::@1 [phi:cputc->cputc::@1]
    // cputc::@1
  __b1:
    // cputln()
    // [33] call cputln
    jsr cputln
    rts
}
  // main
main: {
    // printf("hello world!")
    // [35] call printf_str
    // [63] phi from main to printf_str [phi:main->printf_str]
    jsr printf_str
    // main::@return
    // }
    // [36] return 
    rts
  .segment Data
    s: .text "hello world!"
    .byte 0
}
.segment Code
  // memoryRemap
// Remap some of the eight 8K memory blocks in the 64K address space of the 6502 to point somewhere else in the first 1MB memory space of the MEGA65.
// After the remapping the CPU will access the mapped memory whenever it uses instructions that access a remapped block.
// See section 2.3.4 in http://www.zimmers.net/cbmpics/cbm/c65/c65manual.txt for a description of the CPU memory remapper of the C65.
// remapBlocks: Indicates which 8K blocks of the 6502 address space to remap. Each bit represents one 8K block
// - bit 0  Memory block $0000-$1fff. Use constant MEMORYBLOCK_0000.
// - bit 1  Memory block $2000-$3fff. Use constant MEMORYBLOCK_2000.
// - bit 2  Memory block $4000-$5fff. Use constant MEMORYBLOCK_4000.
// - bit 3  Memory block $6000-$7fff. Use constant MEMORYBLOCK_6000.
// - bit 4  Memory block $8000-$9fff. Use constant MEMORYBLOCK_8000.
// - bit 5  Memory block $a000-$bfff. Use constant MEMORYBLOCK_A000.
// - bit 6  Memory block $c000-$dfff. Use constant MEMORYBLOCK_C000.
// - bit 7  Memory block $e000-$ffff. Use constant MEMORYBLOCK_E000.
// lowerPageOffset: Offset that will be added to any remapped blocks in the lower 32K of memory (block 0-3).
// The offset is a page offset (meaning it is multiplied by 0x100). Only the lower 12bits of the passed value is used.
// - If block 0 ($0000-$1fff) is remapped it will point to lowerPageOffset*$100.
// - If block 1 ($2000-$3fff) is remapped it will point to lowerPageOffset*$100 + $2000.
// - If block 2 ($4000-$5fff) is remapped it will point to lowerPageOffset*$100 + $4000.
// - If block 3 ($6000-$7fff) is remapped it will point to lowerPageOffset*$100 + $6000.
// upperPageOffset: Offset that will be added to any remapped blocks in the upper 32K of memory (block 4-7).
// The offset is a page offset (meaning it is multiplied by 0x100). Only the lower 12bits of the passed value is used.
// - If block 4 ($8000-$9fff) is remapped it will point to upperPageOffset*$100 + $8000
// - If block 5 ($a000-$bfff) is remapped it will point to upperPageOffset*$100 + $a000.
// - If block 6 ($c000-$dfff) is remapped it will point to upperPageOffset*$100 + $c000.
// - If block 7 ($e000-$ffff) is remapped it will point to upperPageOffset*$100 + $e000.
// void memoryRemap(char remapBlocks, unsigned int lowerPageOffset, unsigned int upperPageOffset)
memoryRemap: {
    .label aVal = $19
    .label xVal = $18
    .label yVal = $17
    .label zVal = $16
    // char aVal = BYTE0(lowerPageOffset)
    // [37] memoryRemap::aVal = 0 -- vbuz1=vbuc1 
    // lower blocks offset page low
    lda #0
    sta.z aVal
    // char xVal = (remapBlocks << 4)   | (BYTE1(lowerPageOffset) & 0xf)
    // [38] memoryRemap::xVal = 0 -- vbuz1=vbuc1 
    // lower blocks to map + lower blocks offset high nibble
    sta.z xVal
    // char yVal = BYTE0(upperPageOffset)
    // [39] memoryRemap::yVal = 0 -- vbuz1=vbuc1 
    // upper blocks offset page
    sta.z yVal
    // char zVal = (remapBlocks & 0xf0) | (BYTE1(upperPageOffset) & 0xf)
    // [40] memoryRemap::zVal = 0 -- vbuz1=vbuc1 
    // upper blocks to map + upper blocks offset page high nibble
    sta.z zVal
    // asm
    // asm { ldaaVal ldxxVal ldyyVal ldzzVal map eom  }
    lda aVal
    ldx xVal
    ldy yVal
    ldz zVal
    map
    eom
    // memoryRemap::@return
    // }
    // [42] return 
    rts
}
  // gotoxy
// Set the cursor to the specified position
// void gotoxy(char x, __register(X) char y)
gotoxy: {
    .const x = 0
    .label __5 = $14
    .label __6 = $10
    .label __7 = $10
    .label line_offset = $10
    .label __8 = $12
    .label __9 = $10
    // if(y>CONIO_HEIGHT)
    // [43] if(gotoxy::y#2<$19+1) goto gotoxy::@3 -- vbuxx_lt_vbuc1_then_la1 
    cpx #$19+1
    bcc __b2
    // [45] phi from gotoxy to gotoxy::@1 [phi:gotoxy->gotoxy::@1]
    // [45] phi gotoxy::y#4 = 0 [phi:gotoxy->gotoxy::@1#0] -- vbuxx=vbuc1 
    ldx #0
    // [44] phi from gotoxy to gotoxy::@3 [phi:gotoxy->gotoxy::@3]
    // gotoxy::@3
    // [45] phi from gotoxy::@3 to gotoxy::@1 [phi:gotoxy::@3->gotoxy::@1]
    // [45] phi gotoxy::y#4 = gotoxy::y#2 [phi:gotoxy::@3->gotoxy::@1#0] -- register_copy 
    // gotoxy::@1
    // gotoxy::@2
  __b2:
    // conio_cursor_x = x
    // [46] conio_cursor_x = gotoxy::x#2 -- vbuz1=vbuc1 
    lda #x
    sta.z conio_cursor_x
    // conio_cursor_y = y
    // [47] conio_cursor_y = gotoxy::y#4 -- vbuz1=vbuxx 
    stx.z conio_cursor_y
    // unsigned int line_offset = (unsigned int)y*CONIO_WIDTH
    // [48] gotoxy::$7 = (unsigned int)gotoxy::y#4 -- vwuz1=_word_vbuxx 
    txa
    sta.z __7
    lda #0
    sta.z __7+1
    // [49] gotoxy::$8 = gotoxy::$7 << 2 -- vwuz1=vwuz2_rol_2 
    lda.z __7
    asl
    sta.z __8
    lda.z __7+1
    rol
    sta.z __8+1
    asl.z __8
    rol.z __8+1
    // [50] gotoxy::$9 = gotoxy::$8 + gotoxy::$7 -- vwuz1=vwuz2_plus_vwuz1 
    clc
    lda.z __9
    adc.z __8
    sta.z __9
    lda.z __9+1
    adc.z __8+1
    sta.z __9+1
    // [51] gotoxy::line_offset#0 = gotoxy::$9 << 4 -- vwuz1=vwuz1_rol_4 
    asw line_offset
    asw line_offset
    asw line_offset
    asw line_offset
    // CONIO_SCREEN_TEXT + line_offset
    // [52] gotoxy::$5 = DEFAULT_SCREEN + gotoxy::line_offset#0 -- pbuz1=pbuc1_plus_vwuz2 
    lda.z line_offset
    clc
    adc #<DEFAULT_SCREEN
    sta.z __5
    lda.z line_offset+1
    adc #>DEFAULT_SCREEN
    sta.z __5+1
    // conio_line_text = CONIO_SCREEN_TEXT + line_offset
    // [53] conio_line_text = gotoxy::$5 -- pbuz1=pbuz2 
    lda.z __5
    sta.z conio_line_text
    lda.z __5+1
    sta.z conio_line_text+1
    // CONIO_SCREEN_COLORS + line_offset
    // [54] gotoxy::$6 = COLORRAM + gotoxy::line_offset#0 -- pbuz1=pbuc1_plus_vwuz1 
    lda.z __6
    clc
    adc #<COLORRAM
    sta.z __6
    lda.z __6+1
    adc #>COLORRAM
    sta.z __6+1
    // conio_line_color = CONIO_SCREEN_COLORS + line_offset
    // [55] conio_line_color = gotoxy::$6 -- pbuz1=pbuz2 
    lda.z __6
    sta.z conio_line_color
    lda.z __6+1
    sta.z conio_line_color+1
    // gotoxy::@return
    // }
    // [56] return 
    rts
}
  // cputln
// Print a newline
cputln: {
    // conio_line_text +=  CONIO_WIDTH
    // [57] conio_line_text = conio_line_text + $50 -- pbuz1=pbuz1_plus_vbuc1 
    lda #$50
    clc
    adc.z conio_line_text
    sta.z conio_line_text
    bcc !+
    inc.z conio_line_text+1
  !:
    // conio_line_color += CONIO_WIDTH
    // [58] conio_line_color = conio_line_color + $50 -- pbuz1=pbuz1_plus_vbuc1 
    lda #$50
    clc
    adc.z conio_line_color
    sta.z conio_line_color
    bcc !+
    inc.z conio_line_color+1
  !:
    // conio_cursor_x = 0
    // [59] conio_cursor_x = 0 -- vbuz1=vbuc1 
    lda #0
    sta.z conio_cursor_x
    // conio_cursor_y++;
    // [60] conio_cursor_y = ++ conio_cursor_y -- vbuz1=_inc_vbuz1 
    inc.z conio_cursor_y
    // cscroll()
    // [61] call cscroll
    jsr cscroll
    // cputln::@return
    // }
    // [62] return 
    rts
}
  // printf_str
/// Print a NUL-terminated string
// void printf_str(void (*putc)(char), __zp($e) const char *s)
printf_str: {
    .label s = $e
    // [64] phi from printf_str to printf_str::@1 [phi:printf_str->printf_str::@1]
    // [64] phi printf_str::s#2 = main::s [phi:printf_str->printf_str::@1#0] -- pbuz1=pbuc1 
    lda #<main.s
    sta.z s
    lda #>main.s
    sta.z s+1
    // printf_str::@1
  __b1:
    // while(c=*s++)
    // [65] printf_str::c#1 = *printf_str::s#2 -- vbuaa=_deref_pbuz1 
    ldy #0
    lda (s),y
    // [66] printf_str::s#0 = ++ printf_str::s#2 -- pbuz1=_inc_pbuz1 
    inw.z s
    // [67] if(0!=printf_str::c#1) goto printf_str::@2 -- 0_neq_vbuaa_then_la1 
    cmp #0
    bne __b2
    // printf_str::@return
    // }
    // [68] return 
    rts
    // printf_str::@2
  __b2:
    // putc(c)
    // [69] stackpush(char) = printf_str::c#1 -- _stackpushbyte_=vbuaa 
    pha
    // [70] callexecute cputc  -- call_vprc1 
    jsr cputc
    // sideeffect stackpullbytes(1) -- _stackpullbyte_1 
    pla
    // [64] phi from printf_str::@2 to printf_str::@1 [phi:printf_str::@2->printf_str::@1]
    // [64] phi printf_str::s#2 = printf_str::s#0 [phi:printf_str::@2->printf_str::@1#0] -- register_copy 
    jmp __b1
}
  // cscroll
// Scroll the entire screen if the cursor is beyond the last line
cscroll: {
    // if(conio_cursor_y==CONIO_HEIGHT)
    // [72] if(conio_cursor_y!=$19) goto cscroll::@return -- vbuz1_neq_vbuc1_then_la1 
    lda #$19
    cmp.z conio_cursor_y
    bne __breturn
    // [73] 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)
    // [74] call memcpy
    // [85] phi from cscroll::@1 to memcpy [phi:cscroll::@1->memcpy]
    // [85] phi memcpy::destination#2 = (void *)DEFAULT_SCREEN [phi:cscroll::@1->memcpy#0] -- pvoz1=pvoc1 
    lda #<DEFAULT_SCREEN
    sta.z memcpy.destination
    lda #>DEFAULT_SCREEN
    sta.z memcpy.destination+1
    // [85] phi memcpy::source#2 = (void *)DEFAULT_SCREEN+$50 [phi:cscroll::@1->memcpy#1] -- pvoz1=pvoc1 
    lda #<DEFAULT_SCREEN+$50
    sta.z memcpy.source
    lda #>DEFAULT_SCREEN+$50
    sta.z memcpy.source+1
    jsr memcpy
    // [75] 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)
    // [76] call memcpy
    // [85] phi from cscroll::@2 to memcpy [phi:cscroll::@2->memcpy]
    // [85] phi memcpy::destination#2 = (void *)COLORRAM [phi:cscroll::@2->memcpy#0] -- pvoz1=pvoc1 
    lda #<COLORRAM
    sta.z memcpy.destination
    lda #>COLORRAM
    sta.z memcpy.destination+1
    // [85] phi memcpy::source#2 = (void *)COLORRAM+$50 [phi:cscroll::@2->memcpy#1] -- pvoz1=pvoc1 
    lda #<COLORRAM+$50
    sta.z memcpy.source
    lda #>COLORRAM+$50
    sta.z memcpy.source+1
    jsr memcpy
    // [77] phi from cscroll::@2 to cscroll::@3 [phi:cscroll::@2->cscroll::@3]
    // cscroll::@3
    // memset(CONIO_SCREEN_TEXT+CONIO_BYTES-CONIO_WIDTH, ' ', CONIO_WIDTH)
    // [78] call memset
    // [95] phi from cscroll::@3 to memset [phi:cscroll::@3->memset]
    // [95] phi memset::c#4 = ' ' [phi:cscroll::@3->memset#0] -- vbuzz=vbuc1 
    ldz #' '
    // [95] phi memset::str#3 = (void *)DEFAULT_SCREEN+(unsigned int)$19*$50-$50 [phi:cscroll::@3->memset#1] -- pvoz1=pvoc1 
    lda #<DEFAULT_SCREEN+$19*$50-$50
    sta.z memset.str
    lda #>DEFAULT_SCREEN+$19*$50-$50
    sta.z memset.str+1
    jsr memset
    // [79] 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)
    // [80] call memset
    // [95] phi from cscroll::@4 to memset [phi:cscroll::@4->memset]
    // [95] phi memset::c#4 = LIGHT_BLUE [phi:cscroll::@4->memset#0] -- vbuzz=vbuc1 
    ldz #LIGHT_BLUE
    // [95] phi memset::str#3 = (void *)COLORRAM+(unsigned int)$19*$50-$50 [phi:cscroll::@4->memset#1] -- pvoz1=pvoc1 
    lda #<COLORRAM+$19*$50-$50
    sta.z memset.str
    lda #>COLORRAM+$19*$50-$50
    sta.z memset.str+1
    jsr memset
    // cscroll::@5
    // conio_line_text -= CONIO_WIDTH
    // [81] conio_line_text = conio_line_text - $50 -- pbuz1=pbuz1_minus_vbuc1 
    sec
    lda.z conio_line_text
    sbc #$50
    sta.z conio_line_text
    lda.z conio_line_text+1
    sbc #0
    sta.z conio_line_text+1
    // conio_line_color -= CONIO_WIDTH
    // [82] conio_line_color = conio_line_color - $50 -- pbuz1=pbuz1_minus_vbuc1 
    sec
    lda.z conio_line_color
    sbc #$50
    sta.z conio_line_color
    lda.z conio_line_color+1
    sbc #0
    sta.z conio_line_color+1
    // conio_cursor_y--;
    // [83] conio_cursor_y = -- conio_cursor_y -- vbuz1=_dec_vbuz1 
    dec.z conio_cursor_y
    // cscroll::@return
  __breturn:
    // }
    // [84] return 
    rts
}
  // 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.
// void * memcpy(__zp(4) void *destination, __zp(2) void *source, unsigned int num)
memcpy: {
    .label src_end = 6
    .label dst = 4
    .label src = 2
    .label source = 2
    .label destination = 4
    // char* src_end = (char*)source+num
    // [86] memcpy::src_end#0 = (char *)memcpy::source#2 + (unsigned int)$19*$50-$50 -- pbuz1=pbuz2_plus_vwuc1 
    lda.z source
    clc
    adc #<$19*$50-$50
    sta.z src_end
    lda.z source+1
    adc #>$19*$50-$50
    sta.z src_end+1
    // [87] memcpy::src#4 = (char *)memcpy::source#2
    // [88] memcpy::dst#4 = (char *)memcpy::destination#2
    // [89] phi from memcpy memcpy::@2 to memcpy::@1 [phi:memcpy/memcpy::@2->memcpy::@1]
    // [89] phi memcpy::dst#2 = memcpy::dst#4 [phi:memcpy/memcpy::@2->memcpy::@1#0] -- register_copy 
    // [89] phi memcpy::src#2 = memcpy::src#4 [phi:memcpy/memcpy::@2->memcpy::@1#1] -- register_copy 
    // memcpy::@1
  __b1:
    // while(src!=src_end)
    // [90] if(memcpy::src#2!=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
    // }
    // [91] return 
    rts
    // memcpy::@2
  __b2:
    // *dst++ = *src++
    // [92] *memcpy::dst#2 = *memcpy::src#2 -- _deref_pbuz1=_deref_pbuz2 
    ldy #0
    lda (src),y
    sta (dst),y
    // *dst++ = *src++;
    // [93] memcpy::dst#1 = ++ memcpy::dst#2 -- pbuz1=_inc_pbuz1 
    inw.z dst
    // [94] memcpy::src#1 = ++ memcpy::src#2 -- pbuz1=_inc_pbuz1 
    inw.z src
    jmp __b1
}
  // memset
// Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str.
// void * memset(__zp(2) void *str, __register(Z) char c, unsigned int num)
memset: {
    .label end = 4
    .label dst = 2
    .label str = 2
    // memset::@1
    // char* end = (char*)str + num
    // [96] memset::end#0 = (char *)memset::str#3 + $50 -- pbuz1=pbuz2_plus_vbuc1 
    lda #$50
    clc
    adc.z str
    sta.z end
    lda #0
    adc.z str+1
    sta.z end+1
    // [97] memset::dst#4 = (char *)memset::str#3
    // [98] phi from memset::@1 memset::@3 to memset::@2 [phi:memset::@1/memset::@3->memset::@2]
    // [98] phi memset::dst#2 = memset::dst#4 [phi:memset::@1/memset::@3->memset::@2#0] -- register_copy 
    // memset::@2
  __b2:
    // for(char* dst = str; dst!=end; dst++)
    // [99] if(memset::dst#2!=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
    // }
    // [100] return 
    rts
    // memset::@3
  __b3:
    // *dst = c
    // [101] *memset::dst#2 = memset::c#4 -- _deref_pbuz1=vbuzz 
    tza
    ldy #0
    sta (dst),y
    // for(char* dst = str; dst!=end; dst++)
    // [102] memset::dst#1 = ++ memset::dst#2 -- pbuz1=_inc_pbuz1 
    inw.z dst
    jmp __b2
}
  // File Data

