
void __start()
__start: scope:[__start]  from
  [0] phi()
  to:__start::__init1
__start::__init1: scope:[__start]  from __start
  [1] conio_screen_width = 0
  [2] conio_screen_height = 0
  [3] conio_screen_layer = 1
  [4] conio_width = 0
  [5] conio_height = 0
  [6] conio_rowshift = 0
  [7] conio_rowskip = 0
  [8] scroll_x = 0
  [9] scroll_y = 0
  [10] delta_x = 2
  [11] delta_y = 0
  [12] speed = 2
  [13] call conio_x16_init
  to:__start::@1
__start::@1: scope:[__start]  from __start::__init1
  [14] phi()
  [15] call main
  to:__start::@return
__start::@return: scope:[__start]  from __start::@1
  [16] return 
  to:@return

__interrupt(rom_sys_cx16) void irq_vsync()
irq_vsync: scope:[irq_vsync]  from
  [17] scroll_x = scroll_x + delta_x
  [18] scroll_y = scroll_y + delta_y
  [19] if(scroll_x<=(int)$80*8-$50*8) goto irq_vsync::@1
  to:irq_vsync::@5
irq_vsync::@5: scope:[irq_vsync]  from irq_vsync
  [20] delta_x = 0
  [21] delta_y = speed
  [22] scroll_x = (int)$80*8-$50*8
  to:irq_vsync::@1
irq_vsync::@1: scope:[irq_vsync]  from irq_vsync irq_vsync::@5
  [23] if(scroll_y<=(int)$80*8-$3c*8) goto irq_vsync::@2
  to:irq_vsync::@6
irq_vsync::@6: scope:[irq_vsync]  from irq_vsync::@1
  [24] irq_vsync::$10 = - speed
  [25] delta_x = irq_vsync::$10
  [26] delta_y = 0
  [27] scroll_y = (int)$80*8-$3c*8
  to:irq_vsync::@2
irq_vsync::@2: scope:[irq_vsync]  from irq_vsync::@1 irq_vsync::@6
  [28] if(scroll_x>=0) goto irq_vsync::@3
  to:irq_vsync::@7
irq_vsync::@7: scope:[irq_vsync]  from irq_vsync::@2
  [29] delta_x = 0
  [30] irq_vsync::$11 = - speed
  [31] delta_y = irq_vsync::$11
  [32] scroll_x = 0
  to:irq_vsync::@3
irq_vsync::@3: scope:[irq_vsync]  from irq_vsync::@2 irq_vsync::@7
  [33] if(scroll_y>=0) goto irq_vsync::@4
  to:irq_vsync::@8
irq_vsync::@8: scope:[irq_vsync]  from irq_vsync::@3
  [34] delta_x = speed
  [35] delta_y = 0
  [36] scroll_y = 0
  to:irq_vsync::@4
irq_vsync::@4: scope:[irq_vsync]  from irq_vsync::@3 irq_vsync::@8
  [37] irq_vsync::vera_layer_set_horizontal_scroll1_scroll#0 = (unsigned int)scroll_x
  to:irq_vsync::vera_layer_set_horizontal_scroll1
irq_vsync::vera_layer_set_horizontal_scroll1: scope:[irq_vsync]  from irq_vsync::@4
  [38] irq_vsync::vera_layer_set_horizontal_scroll1_$0 = byte0  irq_vsync::vera_layer_set_horizontal_scroll1_scroll#0
  [39] *(*vera_layer_hscroll_l) = irq_vsync::vera_layer_set_horizontal_scroll1_$0
  [40] irq_vsync::vera_layer_set_horizontal_scroll1_$1 = byte1  irq_vsync::vera_layer_set_horizontal_scroll1_scroll#0
  [41] *(*vera_layer_hscroll_h) = irq_vsync::vera_layer_set_horizontal_scroll1_$1
  to:irq_vsync::@9
irq_vsync::@9: scope:[irq_vsync]  from irq_vsync::vera_layer_set_horizontal_scroll1
  [42] irq_vsync::vera_layer_set_vertical_scroll1_scroll#0 = (unsigned int)scroll_y
  to:irq_vsync::vera_layer_set_vertical_scroll1
irq_vsync::vera_layer_set_vertical_scroll1: scope:[irq_vsync]  from irq_vsync::@9
  [43] irq_vsync::vera_layer_set_vertical_scroll1_$0 = byte0  irq_vsync::vera_layer_set_vertical_scroll1_scroll#0
  [44] *(*vera_layer_vscroll_l) = irq_vsync::vera_layer_set_vertical_scroll1_$0
  [45] irq_vsync::vera_layer_set_vertical_scroll1_$1 = byte1  irq_vsync::vera_layer_set_vertical_scroll1_scroll#0
  [46] *(*vera_layer_vscroll_h) = irq_vsync::vera_layer_set_vertical_scroll1_$1
  to:irq_vsync::@10
irq_vsync::@10: scope:[irq_vsync]  from irq_vsync::vera_layer_set_vertical_scroll1
  [47] *VERA_ISR = VERA_VSYNC
  to:irq_vsync::@return
irq_vsync::@return: scope:[irq_vsync]  from irq_vsync::@10
  [48] return 
  to:@return

void conio_x16_init()
conio_x16_init: scope:[conio_x16_init]  from __start::__init1
  [49] conio_x16_init::line#0 = *conio_x16_init::BASIC_CURSOR_LINE
  [50] call vera_layer_mode_text
  to:conio_x16_init::@3
conio_x16_init::@3: scope:[conio_x16_init]  from conio_x16_init
  [51] phi()
  [52] call screensize
  to:conio_x16_init::@4
conio_x16_init::@4: scope:[conio_x16_init]  from conio_x16_init::@3
  [53] phi()
  [54] call screenlayer
  to:conio_x16_init::@5
conio_x16_init::@5: scope:[conio_x16_init]  from conio_x16_init::@4
  [55] phi()
  [56] call vera_layer_set_textcolor
  to:conio_x16_init::@6
conio_x16_init::@6: scope:[conio_x16_init]  from conio_x16_init::@5
  [57] phi()
  [58] call vera_layer_set_backcolor
  to:conio_x16_init::@7
conio_x16_init::@7: scope:[conio_x16_init]  from conio_x16_init::@6
  [59] phi()
  [60] call vera_layer_set_mapbase
  to:conio_x16_init::@8
conio_x16_init::@8: scope:[conio_x16_init]  from conio_x16_init::@7
  [61] phi()
  [62] call vera_layer_set_mapbase
  to:conio_x16_init::@9
conio_x16_init::@9: scope:[conio_x16_init]  from conio_x16_init::@8
  [63] if(conio_x16_init::line#0<conio_screen_height) goto conio_x16_init::@1
  to:conio_x16_init::@2
conio_x16_init::@2: scope:[conio_x16_init]  from conio_x16_init::@9
  [64] conio_x16_init::line#1 = conio_screen_height - 1
  to:conio_x16_init::@1
conio_x16_init::@1: scope:[conio_x16_init]  from conio_x16_init::@2 conio_x16_init::@9
  [65] conio_x16_init::line#3 = phi( conio_x16_init::@2/conio_x16_init::line#1, conio_x16_init::@9/conio_x16_init::line#0 )
  [66] gotoxy::y#1 = conio_x16_init::line#3
  [67] call gotoxy
  to:conio_x16_init::@return
conio_x16_init::@return: scope:[conio_x16_init]  from conio_x16_init::@1
  [68] return 
  to:@return

__stackcall void cputc(char c)
cputc: scope:[cputc]  from printf_str::@2
  [69] CONIO_SCREEN_BANK#14 = phi( )
  [69] CONIO_SCREEN_TEXT#101 = phi( )
  [70] cputc::c#0 = stackidx(char,cputc::OFFSET_STACK_C)
  [71] vera_layer_get_color::layer#0 = conio_screen_layer
  [72] call vera_layer_get_color
  [73] vera_layer_get_color::return#0 = vera_layer_get_color::return#3
  to:cputc::@7
cputc::@7: scope:[cputc]  from cputc
  [74] cputc::color#0 = vera_layer_get_color::return#0
  [75] cputc::$15 = conio_screen_layer << 1
  [76] cputc::conio_addr#0 = CONIO_SCREEN_TEXT#101 + conio_line_text[cputc::$15]
  [77] cputc::$2 = conio_cursor_x[conio_screen_layer] << 1
  [78] cputc::conio_addr#1 = cputc::conio_addr#0 + cputc::$2
  [79] if(cputc::c#0=='
') goto cputc::@1
  to:cputc::@2
cputc::@2: scope:[cputc]  from cputc::@7
  [80] *VERA_CTRL = *VERA_CTRL & ~VERA_ADDRSEL
  [81] cputc::$4 = byte0  cputc::conio_addr#1
  [82] *VERA_ADDRX_L = cputc::$4
  [83] cputc::$5 = byte1  cputc::conio_addr#1
  [84] *VERA_ADDRX_M = cputc::$5
  [85] cputc::$6 = CONIO_SCREEN_BANK#14 | VERA_INC_1
  [86] *VERA_ADDRX_H = cputc::$6
  [87] *VERA_DATA0 = cputc::c#0
  [88] *VERA_DATA0 = cputc::color#0
  [89] conio_cursor_x[conio_screen_layer] = ++ conio_cursor_x[conio_screen_layer]
  [90] cputc::scroll_enable#0 = conio_scroll_enable[conio_screen_layer]
  [91] if(0!=cputc::scroll_enable#0) goto cputc::@5
  to:cputc::@3
cputc::@3: scope:[cputc]  from cputc::@2
  [92] cputc::$16 = (unsigned int)conio_cursor_x[conio_screen_layer]
  [93] if(cputc::$16!=conio_width) goto cputc::@return
  to:cputc::@4
cputc::@4: scope:[cputc]  from cputc::@3
  [94] phi()
  [95] call cputln
  to:cputc::@return
cputc::@return: scope:[cputc]  from cputc::@1 cputc::@3 cputc::@4 cputc::@5 cputc::@6
  [96] return 
  to:@return
cputc::@5: scope:[cputc]  from cputc::@2
  [97] if(conio_cursor_x[conio_screen_layer]!=conio_screen_width) goto cputc::@return
  to:cputc::@6
cputc::@6: scope:[cputc]  from cputc::@5
  [98] phi()
  [99] call cputln
  to:cputc::@return
cputc::@1: scope:[cputc]  from cputc::@7
  [100] phi()
  [101] call cputln
  to:cputc::@return

void main()
main: scope:[main]  from __start::@1
  [102] phi()
  to:main::textcolor1
main::textcolor1: scope:[main]  from main
  [103] vera_layer_set_textcolor::layer#1 = conio_screen_layer
  [104] call vera_layer_set_textcolor
  to:main::bgcolor1
main::bgcolor1: scope:[main]  from main::textcolor1
  [105] vera_layer_set_backcolor::layer#1 = conio_screen_layer
  [106] call vera_layer_set_backcolor
  to:main::@4
main::@4: scope:[main]  from main::bgcolor1
  [107] phi()
  [108] call clrscr
  to:main::@13
main::@13: scope:[main]  from main::@4
  [109] phi()
  [110] call vera_layer_get_tilebase_address
  [111] vera_layer_get_tilebase_address::return#2 = vera_layer_get_tilebase_address::return#0
  to:main::@14
main::@14: scope:[main]  from main::@13
  [112] main::tilebase#0 = vera_layer_get_tilebase_address::return#2
  [113] vera_layer_mode_tile::tilebase_address#2 = main::tilebase#0
  [114] call vera_layer_mode_tile
  to:main::@15
main::@15: scope:[main]  from main::@14
  [115] phi()
  [116] call screenlayer
  to:main::@16
main::@16: scope:[main]  from main::@15
  [117] phi()
  [118] call scroll
  to:main::textcolor2
main::textcolor2: scope:[main]  from main::@16
  [119] vera_layer_set_textcolor::layer#2 = conio_screen_layer
  [120] call vera_layer_set_textcolor
  to:main::bgcolor2
main::bgcolor2: scope:[main]  from main::textcolor2
  [121] vera_layer_set_backcolor::layer#2 = conio_screen_layer
  [122] call vera_layer_set_backcolor
  to:main::@5
main::@5: scope:[main]  from main::bgcolor2
  [123] draw_characters::tilebase#0 = main::tilebase#0
  [124] call draw_characters
  to:main::SEI1
main::SEI1: scope:[main]  from main::@5
  asm { sei  }
  to:main::@6
main::@6: scope:[main]  from main::SEI1
  [126] *KERNEL_IRQ = &irq_vsync
  [127] *VERA_IEN = VERA_VSYNC
  to:main::CLI1
main::CLI1: scope:[main]  from main::@6
  asm { cli  }
  to:main::vera_layer_show1
main::vera_layer_show1: scope:[main]  from main::CLI1
  [129] *VERA_DC_VIDEO = *VERA_DC_VIDEO | *vera_layer_enable
  to:main::@1
main::@1: scope:[main]  from main::@17 main::vera_layer_show1
  [130] phi()
  [131] call kbhit
  [132] kbhit::return#2 = kbhit::return#1
  to:main::@17
main::@17: scope:[main]  from main::@1
  [133] main::$39 = kbhit::return#2
  [134] if(0==main::$39) goto main::@1
  to:main::vera_layer_hide1
main::vera_layer_hide1: scope:[main]  from main::@17
  [135] main::vera_layer_hide1_$0 = ~ *vera_layer_enable
  [136] *VERA_DC_VIDEO = *VERA_DC_VIDEO & main::vera_layer_hide1_$0
  to:main::textcolor3
main::textcolor3: scope:[main]  from main::vera_layer_hide1
  [137] vera_layer_set_textcolor::layer#3 = conio_screen_layer
  [138] call vera_layer_set_textcolor
  to:main::bgcolor3
main::bgcolor3: scope:[main]  from main::textcolor3
  [139] vera_layer_set_backcolor::layer#3 = conio_screen_layer
  [140] call vera_layer_set_backcolor
  to:main::@7
main::@7: scope:[main]  from main::bgcolor3
  [141] draw_characters::tilebase#1 = main::tilebase#0
  [142] call draw_characters
  to:main::vera_layer_show2
main::vera_layer_show2: scope:[main]  from main::@7
  [143] *VERA_DC_VIDEO = *VERA_DC_VIDEO | *vera_layer_enable
  to:main::@8
main::@8: scope:[main]  from main::vera_layer_show2
  [144] phi()
  [145] call screenlayer
  to:main::textcolor4
main::textcolor4: scope:[main]  from main::@8
  [146] vera_layer_set_textcolor::layer#4 = conio_screen_layer
  [147] call vera_layer_set_textcolor
  to:main::bgcolor4
main::bgcolor4: scope:[main]  from main::textcolor4
  [148] vera_layer_set_backcolor::layer#4 = conio_screen_layer
  [149] call vera_layer_set_backcolor
  to:main::@9
main::@9: scope:[main]  from main::bgcolor4
  [150] phi()
  [151] call printf_str
  to:main::@18
main::@18: scope:[main]  from main::@9
  [152] phi()
  [153] call printf_str
  to:main::@19
main::@19: scope:[main]  from main::@18
  [154] phi()
  [155] call printf_str
  to:main::@20
main::@20: scope:[main]  from main::@19
  [156] phi()
  [157] call printf_str
  to:main::@21
main::@21: scope:[main]  from main::@20
  [158] phi()
  [159] call printf_str
  to:main::@22
main::@22: scope:[main]  from main::@21
  [160] phi()
  [161] call printf_str
  to:main::@23
main::@23: scope:[main]  from main::@22
  [162] phi()
  [163] call printf_str
  to:main::@24
main::@24: scope:[main]  from main::@23
  [164] phi()
  [165] call printf_str
  to:main::textcolor5
main::textcolor5: scope:[main]  from main::@24
  [166] vera_layer_set_textcolor::layer#5 = conio_screen_layer
  [167] call vera_layer_set_textcolor
  to:main::@10
main::@10: scope:[main]  from main::textcolor5
  [168] phi()
  [169] call printf_str
  to:main::@2
main::@2: scope:[main]  from main::@10 main::@25
  [170] phi()
  [171] call kbhit
  [172] kbhit::return#3 = kbhit::return#1
  to:main::@25
main::@25: scope:[main]  from main::@2
  [173] main::$41 = kbhit::return#3
  [174] if(0==main::$41) goto main::@2
  to:main::@3
main::@3: scope:[main]  from main::@25
  [175] phi()
  [176] call screenlayer
  to:main::vera_layer_hide2
main::vera_layer_hide2: scope:[main]  from main::@3
  [177] main::vera_layer_hide2_$0 = ~ *vera_layer_enable
  [178] *VERA_DC_VIDEO = *VERA_DC_VIDEO & main::vera_layer_hide2_$0
  to:main::textcolor6
main::textcolor6: scope:[main]  from main::vera_layer_hide2
  [179] vera_layer_set_textcolor::layer#6 = conio_screen_layer
  [180] call vera_layer_set_textcolor
  to:main::bgcolor5
main::bgcolor5: scope:[main]  from main::textcolor6
  [181] vera_layer_set_backcolor::layer#5 = conio_screen_layer
  [182] call vera_layer_set_backcolor
  to:main::@11
main::@11: scope:[main]  from main::bgcolor5
  [183] draw_characters::tilebase#2 = main::tilebase#0
  [184] call draw_characters
  to:main::vera_layer_show3
main::vera_layer_show3: scope:[main]  from main::@11
  [185] *VERA_DC_VIDEO = *VERA_DC_VIDEO | *vera_layer_enable
  to:main::@12
main::@12: scope:[main]  from main::vera_layer_show3
  [186] phi()
  [187] call screenlayer
  to:main::@26
main::@26: scope:[main]  from main::@12
  [188] phi()
  [189] call gotoxy
  to:main::@return
main::@return: scope:[main]  from main::@26
  [190] return 
  to:@return

void vera_layer_mode_text(char layer , unsigned long mapbase_address , unsigned long tilebase_address , unsigned int mapwidth , unsigned int mapheight , char tilewidth , char tileheight , unsigned int color_mode)
vera_layer_mode_text: scope:[vera_layer_mode_text]  from conio_x16_init
  [191] phi()
  [192] call vera_layer_mode_tile
  to:vera_layer_mode_text::@1
vera_layer_mode_text::@1: scope:[vera_layer_mode_text]  from vera_layer_mode_text
  [193] phi()
  [194] call vera_layer_set_text_color_mode
  to:vera_layer_mode_text::@return
vera_layer_mode_text::@return: scope:[vera_layer_mode_text]  from vera_layer_mode_text::@1
  [195] return 
  to:@return

void screensize(char *x , char *y)
screensize: scope:[screensize]  from conio_x16_init::@3
  [196] screensize::hscale#0 = *VERA_DC_HSCALE >> 7
  [197] screensize::$1 = $28 << screensize::hscale#0
  [198] *screensize::x#0 = screensize::$1
  [199] screensize::vscale#0 = *VERA_DC_VSCALE >> 7
  [200] screensize::$3 = $1e << screensize::vscale#0
  [201] *screensize::y#0 = screensize::$3
  to:screensize::@return
screensize::@return: scope:[screensize]  from screensize
  [202] return 
  to:@return

void screenlayer(char layer)
screenlayer: scope:[screenlayer]  from conio_x16_init::@4 main::@12 main::@15 main::@3 main::@8
  [203] screenlayer::layer#5 = phi( conio_x16_init::@4/1, main::@8/1, main::@12/1, main::@15/0, main::@3/0 )
  [204] conio_screen_layer = screenlayer::layer#5
  [205] vera_layer_get_mapbase_bank::layer#0 = conio_screen_layer
  [206] call vera_layer_get_mapbase_bank
  [207] vera_layer_get_mapbase_bank::return#2 = vera_layer_get_mapbase_bank::return#0
  to:screenlayer::@3
screenlayer::@3: scope:[screenlayer]  from screenlayer
  [208] CONIO_SCREEN_BANK#17 = vera_layer_get_mapbase_bank::return#2
  [209] vera_layer_get_mapbase_offset::layer#0 = conio_screen_layer
  [210] call vera_layer_get_mapbase_offset
  [211] vera_layer_get_mapbase_offset::return#2 = vera_layer_get_mapbase_offset::return#0
  to:screenlayer::@4
screenlayer::@4: scope:[screenlayer]  from screenlayer::@3
  [212] CONIO_SCREEN_TEXT#103 = vera_layer_get_mapbase_offset::return#2
  [213] screenlayer::vera_layer_get_width1_layer#0 = conio_screen_layer
  to:screenlayer::vera_layer_get_width1
screenlayer::vera_layer_get_width1: scope:[screenlayer]  from screenlayer::@4
  [214] screenlayer::vera_layer_get_width1_$2 = screenlayer::vera_layer_get_width1_layer#0 << 1
  [215] screenlayer::vera_layer_get_width1_config#0 = vera_layer_config[screenlayer::vera_layer_get_width1_$2]
  [216] screenlayer::vera_layer_get_width1_$0 = *screenlayer::vera_layer_get_width1_config#0 & VERA_LAYER_WIDTH_MASK
  [217] screenlayer::vera_layer_get_width1_$1 = screenlayer::vera_layer_get_width1_$0 >> 4
  [218] screenlayer::vera_layer_get_width1_$3 = screenlayer::vera_layer_get_width1_$1 << 1
  [219] screenlayer::vera_layer_get_width1_return#0 = VERA_LAYER_WIDTH[screenlayer::vera_layer_get_width1_$3]
  to:screenlayer::vera_layer_get_width1_@return
screenlayer::vera_layer_get_width1_@return: scope:[screenlayer]  from screenlayer::vera_layer_get_width1
  [220] screenlayer::vera_layer_get_width1_return#1 = screenlayer::vera_layer_get_width1_return#0
  to:screenlayer::@1
screenlayer::@1: scope:[screenlayer]  from screenlayer::vera_layer_get_width1_@return
  [221] screenlayer::$2 = screenlayer::vera_layer_get_width1_return#1
  [222] conio_width = screenlayer::$2
  [223] vera_layer_get_rowshift::layer#0 = conio_screen_layer
  [224] call vera_layer_get_rowshift
  [225] vera_layer_get_rowshift::return#2 = vera_layer_get_rowshift::return#0
  to:screenlayer::@5
screenlayer::@5: scope:[screenlayer]  from screenlayer::@1
  [226] screenlayer::$3 = vera_layer_get_rowshift::return#2
  [227] conio_rowshift = screenlayer::$3
  [228] vera_layer_get_rowskip::layer#0 = conio_screen_layer
  [229] call vera_layer_get_rowskip
  [230] vera_layer_get_rowskip::return#2 = vera_layer_get_rowskip::return#0
  to:screenlayer::@6
screenlayer::@6: scope:[screenlayer]  from screenlayer::@5
  [231] screenlayer::$4 = vera_layer_get_rowskip::return#2
  [232] conio_rowskip = screenlayer::$4
  [233] screenlayer::vera_layer_get_height1_layer#0 = conio_screen_layer
  to:screenlayer::vera_layer_get_height1
screenlayer::vera_layer_get_height1: scope:[screenlayer]  from screenlayer::@6
  [234] screenlayer::vera_layer_get_height1_$2 = screenlayer::vera_layer_get_height1_layer#0 << 1
  [235] screenlayer::vera_layer_get_height1_config#0 = vera_layer_config[screenlayer::vera_layer_get_height1_$2]
  [236] screenlayer::vera_layer_get_height1_$0 = *screenlayer::vera_layer_get_height1_config#0 & VERA_LAYER_HEIGHT_MASK
  [237] screenlayer::vera_layer_get_height1_$1 = screenlayer::vera_layer_get_height1_$0 >> 6
  [238] screenlayer::vera_layer_get_height1_$3 = screenlayer::vera_layer_get_height1_$1 << 1
  [239] screenlayer::vera_layer_get_height1_return#0 = VERA_LAYER_HEIGHT[screenlayer::vera_layer_get_height1_$3]
  to:screenlayer::vera_layer_get_height1_@return
screenlayer::vera_layer_get_height1_@return: scope:[screenlayer]  from screenlayer::vera_layer_get_height1
  [240] screenlayer::vera_layer_get_height1_return#1 = screenlayer::vera_layer_get_height1_return#0
  to:screenlayer::@2
screenlayer::@2: scope:[screenlayer]  from screenlayer::vera_layer_get_height1_@return
  [241] screenlayer::$5 = screenlayer::vera_layer_get_height1_return#1
  [242] conio_height = screenlayer::$5
  to:screenlayer::@return
screenlayer::@return: scope:[screenlayer]  from screenlayer::@2
  [243] return 
  to:@return

char vera_layer_set_textcolor(char layer , char color)
vera_layer_set_textcolor: scope:[vera_layer_set_textcolor]  from conio_x16_init::@5 main::textcolor1 main::textcolor2 main::textcolor3 main::textcolor4 main::textcolor5 main::textcolor6
  [244] vera_layer_set_textcolor::color#7 = phi( conio_x16_init::@5/WHITE, main::textcolor1/WHITE, main::textcolor2/WHITE, main::textcolor3/GREY, main::textcolor4/WHITE, main::textcolor5/YELLOW, main::textcolor6/DARK_GREY )
  [244] vera_layer_set_textcolor::layer#7 = phi( conio_x16_init::@5/1, main::textcolor1/vera_layer_set_textcolor::layer#1, main::textcolor2/vera_layer_set_textcolor::layer#2, main::textcolor3/vera_layer_set_textcolor::layer#3, main::textcolor4/vera_layer_set_textcolor::layer#4, main::textcolor5/vera_layer_set_textcolor::layer#5, main::textcolor6/vera_layer_set_textcolor::layer#6 )
  [245] vera_layer_textcolor[vera_layer_set_textcolor::layer#7] = vera_layer_set_textcolor::color#7
  to:vera_layer_set_textcolor::@return
vera_layer_set_textcolor::@return: scope:[vera_layer_set_textcolor]  from vera_layer_set_textcolor
  [246] return 
  to:@return

char vera_layer_set_backcolor(char layer , char color)
vera_layer_set_backcolor: scope:[vera_layer_set_backcolor]  from conio_x16_init::@6 main::bgcolor1 main::bgcolor2 main::bgcolor3 main::bgcolor4 main::bgcolor5
  [247] vera_layer_set_backcolor::color#6 = phi( conio_x16_init::@6/BLUE, main::bgcolor1/BLACK, main::bgcolor2/GREEN, main::bgcolor3/GREEN, main::bgcolor4/BLACK, main::bgcolor5/BLACK )
  [247] vera_layer_set_backcolor::layer#6 = phi( conio_x16_init::@6/1, main::bgcolor1/vera_layer_set_backcolor::layer#1, main::bgcolor2/vera_layer_set_backcolor::layer#2, main::bgcolor3/vera_layer_set_backcolor::layer#3, main::bgcolor4/vera_layer_set_backcolor::layer#4, main::bgcolor5/vera_layer_set_backcolor::layer#5 )
  [248] vera_layer_backcolor[vera_layer_set_backcolor::layer#6] = vera_layer_set_backcolor::color#6
  to:vera_layer_set_backcolor::@return
vera_layer_set_backcolor::@return: scope:[vera_layer_set_backcolor]  from vera_layer_set_backcolor
  [249] return 
  to:@return

void vera_layer_set_mapbase(char layer , char mapbase)
vera_layer_set_mapbase: scope:[vera_layer_set_mapbase]  from conio_x16_init::@7 conio_x16_init::@8 vera_layer_mode_tile::@23
  [250] vera_layer_set_mapbase::mapbase#3 = phi( conio_x16_init::@7/$20, conio_x16_init::@8/0, vera_layer_mode_tile::@23/vera_layer_set_mapbase::mapbase#0 )
  [250] vera_layer_set_mapbase::layer#3 = phi( conio_x16_init::@7/0, conio_x16_init::@8/1, vera_layer_mode_tile::@23/vera_layer_set_mapbase::layer#0 )
  [251] vera_layer_set_mapbase::$0 = vera_layer_set_mapbase::layer#3 << 1
  [252] vera_layer_set_mapbase::addr#0 = vera_layer_mapbase[vera_layer_set_mapbase::$0]
  [253] *vera_layer_set_mapbase::addr#0 = vera_layer_set_mapbase::mapbase#3
  to:vera_layer_set_mapbase::@return
vera_layer_set_mapbase::@return: scope:[vera_layer_set_mapbase]  from vera_layer_set_mapbase
  [254] return 
  to:@return

void gotoxy(char x , char y)
gotoxy: scope:[gotoxy]  from conio_x16_init::@1 cscroll::@5 main::@26
  [255] gotoxy::y#4 = phi( conio_x16_init::@1/gotoxy::y#1, cscroll::@5/gotoxy::y#2, main::@26/$14 )
  [256] if(gotoxy::y#4<=conio_screen_height) goto gotoxy::@4
  to:gotoxy::@1
gotoxy::@4: scope:[gotoxy]  from gotoxy
  [257] phi()
  to:gotoxy::@1
gotoxy::@1: scope:[gotoxy]  from gotoxy gotoxy::@4
  [258] gotoxy::y#5 = phi( gotoxy::@4/gotoxy::y#4, gotoxy/0 )
  [259] if(0<conio_screen_width) goto gotoxy::@2
  to:gotoxy::@3
gotoxy::@3: scope:[gotoxy]  from gotoxy::@1
  [260] phi()
  to:gotoxy::@2
gotoxy::@2: scope:[gotoxy]  from gotoxy::@1 gotoxy::@3
  [261] conio_cursor_x[conio_screen_layer] = 0
  [262] conio_cursor_y[conio_screen_layer] = gotoxy::y#5
  [263] gotoxy::$6 = (unsigned int)gotoxy::y#5
  [264] gotoxy::line_offset#0 = gotoxy::$6 << conio_rowshift
  [265] gotoxy::$5 = conio_screen_layer << 1
  [266] conio_line_text[gotoxy::$5] = gotoxy::line_offset#0
  to:gotoxy::@return
gotoxy::@return: scope:[gotoxy]  from gotoxy::@2
  [267] return 
  to:@return

char vera_layer_get_color(char layer)
vera_layer_get_color: scope:[vera_layer_get_color]  from clearline cputc
  [268] vera_layer_get_color::layer#2 = phi( clearline/vera_layer_get_color::layer#1, cputc/vera_layer_get_color::layer#0 )
  [269] vera_layer_get_color::$3 = vera_layer_get_color::layer#2 << 1
  [270] vera_layer_get_color::addr#0 = vera_layer_config[vera_layer_get_color::$3]
  [271] vera_layer_get_color::$0 = *vera_layer_get_color::addr#0 & VERA_LAYER_CONFIG_256C
  [272] if(0!=vera_layer_get_color::$0) goto vera_layer_get_color::@1
  to:vera_layer_get_color::@2
vera_layer_get_color::@2: scope:[vera_layer_get_color]  from vera_layer_get_color
  [273] vera_layer_get_color::$1 = vera_layer_backcolor[vera_layer_get_color::layer#2] << 4
  [274] vera_layer_get_color::return#2 = vera_layer_get_color::$1 | vera_layer_textcolor[vera_layer_get_color::layer#2]
  to:vera_layer_get_color::@return
vera_layer_get_color::@return: scope:[vera_layer_get_color]  from vera_layer_get_color::@1 vera_layer_get_color::@2
  [275] vera_layer_get_color::return#3 = phi( vera_layer_get_color::@1/vera_layer_get_color::return#1, vera_layer_get_color::@2/vera_layer_get_color::return#2 )
  [276] return 
  to:@return
vera_layer_get_color::@1: scope:[vera_layer_get_color]  from vera_layer_get_color
  [277] vera_layer_get_color::return#1 = vera_layer_textcolor[vera_layer_get_color::layer#2]
  to:vera_layer_get_color::@return

void cputln()
cputln: scope:[cputln]  from cputc::@1 cputc::@4 cputc::@6
  [278] cputln::$2 = conio_screen_layer << 1
  [279] cputln::temp#0 = conio_line_text[cputln::$2]
  [280] cputln::temp#1 = cputln::temp#0 + conio_rowskip
  [281] cputln::$3 = conio_screen_layer << 1
  [282] conio_line_text[cputln::$3] = cputln::temp#1
  [283] conio_cursor_x[conio_screen_layer] = 0
  [284] conio_cursor_y[conio_screen_layer] = ++ conio_cursor_y[conio_screen_layer]
  [285] call cscroll
  to:cputln::@return
cputln::@return: scope:[cputln]  from cputln
  [286] return 
  to:@return

void clrscr()
clrscr: scope:[clrscr]  from draw_characters main::@4
  [287] clrscr::line_text#0 = (char *)CONIO_SCREEN_TEXT#103
  [288] vera_layer_get_backcolor::layer#0 = conio_screen_layer
  [289] call vera_layer_get_backcolor
  [290] vera_layer_get_backcolor::return#0 = vera_layer_get_backcolor::return#1
  to:clrscr::@7
clrscr::@7: scope:[clrscr]  from clrscr
  [291] clrscr::$0 = vera_layer_get_backcolor::return#0
  [292] clrscr::$1 = clrscr::$0 << 4
  [293] vera_layer_get_textcolor::layer#0 = conio_screen_layer
  [294] call vera_layer_get_textcolor
  [295] vera_layer_get_textcolor::return#0 = vera_layer_get_textcolor::return#1
  to:clrscr::@8
clrscr::@8: scope:[clrscr]  from clrscr::@7
  [296] clrscr::$2 = vera_layer_get_textcolor::return#0
  [297] clrscr::color#0 = clrscr::$1 | clrscr::$2
  to:clrscr::@1
clrscr::@1: scope:[clrscr]  from clrscr::@6 clrscr::@8
  [298] clrscr::line_text#2 = phi( clrscr::@6/clrscr::line_text#1, clrscr::@8/clrscr::line_text#0 )
  [298] clrscr::l#2 = phi( clrscr::@6/clrscr::l#1, clrscr::@8/0 )
  [299] if(clrscr::l#2<conio_height) goto clrscr::@2
  to:clrscr::@3
clrscr::@3: scope:[clrscr]  from clrscr::@1
  [300] conio_cursor_x[conio_screen_layer] = 0
  [301] conio_cursor_y[conio_screen_layer] = 0
  [302] clrscr::$9 = conio_screen_layer << 1
  [303] conio_line_text[clrscr::$9] = 0
  to:clrscr::@return
clrscr::@return: scope:[clrscr]  from clrscr::@3
  [304] return 
  to:@return
clrscr::@2: scope:[clrscr]  from clrscr::@1
  [305] *VERA_CTRL = *VERA_CTRL & ~VERA_ADDRSEL
  [306] clrscr::$5 = byte0  clrscr::line_text#2
  [307] *VERA_ADDRX_L = clrscr::$5
  [308] clrscr::$6 = byte1  clrscr::line_text#2
  [309] *VERA_ADDRX_M = clrscr::$6
  [310] clrscr::$7 = CONIO_SCREEN_BANK#17 | VERA_INC_1
  [311] *VERA_ADDRX_H = clrscr::$7
  to:clrscr::@4
clrscr::@4: scope:[clrscr]  from clrscr::@2 clrscr::@5
  [312] clrscr::c#2 = phi( clrscr::@2/0, clrscr::@5/clrscr::c#1 )
  [313] if(clrscr::c#2<conio_width) goto clrscr::@5
  to:clrscr::@6
clrscr::@6: scope:[clrscr]  from clrscr::@4
  [314] clrscr::line_text#1 = clrscr::line_text#2 + conio_rowskip
  [315] clrscr::l#1 = ++ clrscr::l#2
  to:clrscr::@1
clrscr::@5: scope:[clrscr]  from clrscr::@4
  [316] *VERA_DATA0 = ' '
  [317] *VERA_DATA0 = clrscr::color#0
  [318] clrscr::c#1 = ++ clrscr::c#2
  to:clrscr::@4

unsigned long vera_layer_get_tilebase_address(char layer)
vera_layer_get_tilebase_address: scope:[vera_layer_get_tilebase_address]  from main::@13
  [319] vera_layer_get_tilebase_address::tilebase#0 = *(*(vera_layer_tilebase+vera_layer_get_tilebase_address::layer#0*SIZEOF_POINTER))
  [320] vera_layer_get_tilebase_address::address#0 = (unsigned long)vera_layer_get_tilebase_address::tilebase#0
  [321] vera_layer_get_tilebase_address::address#1 = vera_layer_get_tilebase_address::address#0 & $fc
  [322] vera_layer_get_tilebase_address::address#2 = vera_layer_get_tilebase_address::address#1 << 8
  [323] vera_layer_get_tilebase_address::return#0 = vera_layer_get_tilebase_address::address#2 << 1
  to:vera_layer_get_tilebase_address::@return
vera_layer_get_tilebase_address::@return: scope:[vera_layer_get_tilebase_address]  from vera_layer_get_tilebase_address
  [324] return 
  to:@return

void vera_layer_mode_tile(char layer , unsigned long mapbase_address , unsigned long tilebase_address , unsigned int mapwidth , unsigned int mapheight , char tilewidth , char tileheight , char color_depth)
vera_layer_mode_tile: scope:[vera_layer_mode_tile]  from main::@14 vera_layer_mode_text
  [325] vera_layer_mode_tile::tileheight#10 = phi( main::@14/8, vera_layer_mode_text/vera_layer_mode_text::tileheight#0 )
  [325] vera_layer_mode_tile::tilewidth#10 = phi( main::@14/8, vera_layer_mode_text/vera_layer_mode_text::tilewidth#0 )
  [325] vera_layer_mode_tile::tilebase_address#10 = phi( main::@14/vera_layer_mode_tile::tilebase_address#2, vera_layer_mode_text/vera_layer_mode_text::tilebase_address#0 )
  [325] vera_layer_mode_tile::mapbase_address#10 = phi( main::@14/$10000, vera_layer_mode_text/vera_layer_mode_text::mapbase_address#0 )
  [325] vera_layer_mode_tile::mapheight#10 = phi( main::@14/$80, vera_layer_mode_text/vera_layer_mode_text::mapheight#0 )
  [325] vera_layer_mode_tile::layer#10 = phi( main::@14/0, vera_layer_mode_text/vera_layer_mode_text::layer#0 )
  [325] vera_layer_mode_tile::mapwidth#10 = phi( main::@14/$80, vera_layer_mode_text/vera_layer_mode_text::mapwidth#0 )
  to:vera_layer_mode_tile::@1
vera_layer_mode_tile::@1: scope:[vera_layer_mode_tile]  from vera_layer_mode_tile
  [326] if(vera_layer_mode_tile::mapwidth#10==$20) goto vera_layer_mode_tile::@5
  to:vera_layer_mode_tile::@2
vera_layer_mode_tile::@2: scope:[vera_layer_mode_tile]  from vera_layer_mode_tile::@1
  [327] if(vera_layer_mode_tile::mapwidth#10==$40) goto vera_layer_mode_tile::@6
  to:vera_layer_mode_tile::@3
vera_layer_mode_tile::@3: scope:[vera_layer_mode_tile]  from vera_layer_mode_tile::@2
  [328] if(vera_layer_mode_tile::mapwidth#10==$80) goto vera_layer_mode_tile::@7
  to:vera_layer_mode_tile::@4
vera_layer_mode_tile::@4: scope:[vera_layer_mode_tile]  from vera_layer_mode_tile::@3
  [329] if(vera_layer_mode_tile::mapwidth#10!=$100) goto vera_layer_mode_tile::@9
  to:vera_layer_mode_tile::@8
vera_layer_mode_tile::@8: scope:[vera_layer_mode_tile]  from vera_layer_mode_tile::@4
  [330] vera_layer_rowshift[vera_layer_mode_tile::layer#10] = 9
  [331] vera_layer_mode_tile::$14 = vera_layer_mode_tile::layer#10 << 1
  [332] vera_layer_rowskip[vera_layer_mode_tile::$14] = $200
  to:vera_layer_mode_tile::@9
vera_layer_mode_tile::@9: scope:[vera_layer_mode_tile]  from vera_layer_mode_tile::@4 vera_layer_mode_tile::@5 vera_layer_mode_tile::@6 vera_layer_mode_tile::@7 vera_layer_mode_tile::@8
  [333] vera_layer_mode_tile::config#21 = phi( vera_layer_mode_tile::@4/VERA_LAYER_COLOR_DEPTH_1BPP, vera_layer_mode_tile::@5/VERA_LAYER_COLOR_DEPTH_1BPP, vera_layer_mode_tile::@6/VERA_LAYER_WIDTH_64, vera_layer_mode_tile::@7/VERA_LAYER_WIDTH_128, vera_layer_mode_tile::@8/VERA_LAYER_WIDTH_256 )
  [334] if(vera_layer_mode_tile::mapheight#10==$20) goto vera_layer_mode_tile::@16
  to:vera_layer_mode_tile::@10
vera_layer_mode_tile::@10: scope:[vera_layer_mode_tile]  from vera_layer_mode_tile::@9
  [335] if(vera_layer_mode_tile::mapheight#10==$40) goto vera_layer_mode_tile::@13
  to:vera_layer_mode_tile::@11
vera_layer_mode_tile::@11: scope:[vera_layer_mode_tile]  from vera_layer_mode_tile::@10
  [336] if(vera_layer_mode_tile::mapheight#10==$80) goto vera_layer_mode_tile::@14
  to:vera_layer_mode_tile::@12
vera_layer_mode_tile::@12: scope:[vera_layer_mode_tile]  from vera_layer_mode_tile::@11
  [337] if(vera_layer_mode_tile::mapheight#10!=$100) goto vera_layer_mode_tile::@16
  to:vera_layer_mode_tile::@15
vera_layer_mode_tile::@15: scope:[vera_layer_mode_tile]  from vera_layer_mode_tile::@12
  [338] vera_layer_mode_tile::config#12 = vera_layer_mode_tile::config#21 | VERA_LAYER_HEIGHT_256
  to:vera_layer_mode_tile::@16
vera_layer_mode_tile::@16: scope:[vera_layer_mode_tile]  from vera_layer_mode_tile::@12 vera_layer_mode_tile::@13 vera_layer_mode_tile::@14 vera_layer_mode_tile::@15 vera_layer_mode_tile::@9
  [339] vera_layer_mode_tile::config#25 = phi( vera_layer_mode_tile::@12/vera_layer_mode_tile::config#21, vera_layer_mode_tile::@9/vera_layer_mode_tile::config#21, vera_layer_mode_tile::@13/vera_layer_mode_tile::config#10, vera_layer_mode_tile::@14/vera_layer_mode_tile::config#11, vera_layer_mode_tile::@15/vera_layer_mode_tile::config#12 )
  [340] vera_layer_set_config::layer#0 = vera_layer_mode_tile::layer#10
  [341] vera_layer_set_config::config#0 = vera_layer_mode_tile::config#25
  [342] call vera_layer_set_config
  to:vera_layer_mode_tile::@23
vera_layer_mode_tile::@23: scope:[vera_layer_mode_tile]  from vera_layer_mode_tile::@16
  [343] vera_layer_mode_tile::$1 = word0  vera_layer_mode_tile::mapbase_address#10
  [344] vera_layer_mode_tile::$17 = vera_layer_mode_tile::layer#10 << 1
  [345] vera_mapbase_offset[vera_layer_mode_tile::$17] = vera_layer_mode_tile::$1
  [346] vera_layer_mode_tile::$2 = byte2  vera_layer_mode_tile::mapbase_address#10
  [347] vera_mapbase_bank[vera_layer_mode_tile::layer#10] = vera_layer_mode_tile::$2
  [348] vera_layer_mode_tile::$18 = vera_layer_mode_tile::layer#10 << 2
  [349] vera_mapbase_address[vera_layer_mode_tile::$18] = vera_layer_mode_tile::mapbase_address#10
  [350] vera_layer_mode_tile::mapbase_address#0 = vera_layer_mode_tile::mapbase_address#10 >> 1
  [351] vera_layer_mode_tile::mapbase#0 = byte1  vera_layer_mode_tile::mapbase_address#0
  [352] vera_layer_set_mapbase::layer#0 = vera_layer_mode_tile::layer#10
  [353] vera_layer_set_mapbase::mapbase#0 = vera_layer_mode_tile::mapbase#0
  [354] call vera_layer_set_mapbase
  to:vera_layer_mode_tile::@24
vera_layer_mode_tile::@24: scope:[vera_layer_mode_tile]  from vera_layer_mode_tile::@23
  [355] vera_layer_mode_tile::$6 = word0  vera_layer_mode_tile::tilebase_address#10
  [356] vera_tilebase_offset[vera_layer_mode_tile::$17] = vera_layer_mode_tile::$6
  [357] vera_layer_mode_tile::$7 = byte2  vera_layer_mode_tile::tilebase_address#10
  [358] vera_tilebase_bank[vera_layer_mode_tile::layer#10] = vera_layer_mode_tile::$7
  [359] vera_tilebase_address[vera_layer_mode_tile::$18] = vera_layer_mode_tile::tilebase_address#10
  [360] vera_layer_mode_tile::tilebase_address#0 = vera_layer_mode_tile::tilebase_address#10 >> 1
  [361] vera_layer_mode_tile::tilebase#0 = byte1  vera_layer_mode_tile::tilebase_address#0
  [362] vera_layer_mode_tile::tilebase#1 = vera_layer_mode_tile::tilebase#0 & VERA_LAYER_TILEBASE_MASK
  [363] if(vera_layer_mode_tile::tilewidth#10==8) goto vera_layer_mode_tile::@19
  to:vera_layer_mode_tile::@17
vera_layer_mode_tile::@17: scope:[vera_layer_mode_tile]  from vera_layer_mode_tile::@24
  [364] if(vera_layer_mode_tile::tilewidth#10!=$10) goto vera_layer_mode_tile::@19
  to:vera_layer_mode_tile::@18
vera_layer_mode_tile::@18: scope:[vera_layer_mode_tile]  from vera_layer_mode_tile::@17
  [365] vera_layer_mode_tile::tilebase#3 = vera_layer_mode_tile::tilebase#1 | VERA_TILEBASE_WIDTH_16
  to:vera_layer_mode_tile::@19
vera_layer_mode_tile::@19: scope:[vera_layer_mode_tile]  from vera_layer_mode_tile::@17 vera_layer_mode_tile::@18 vera_layer_mode_tile::@24
  [366] vera_layer_mode_tile::tilebase#12 = phi( vera_layer_mode_tile::@17/vera_layer_mode_tile::tilebase#1, vera_layer_mode_tile::@24/vera_layer_mode_tile::tilebase#1, vera_layer_mode_tile::@18/vera_layer_mode_tile::tilebase#3 )
  [367] if(vera_layer_mode_tile::tileheight#10==8) goto vera_layer_mode_tile::@22
  to:vera_layer_mode_tile::@20
vera_layer_mode_tile::@20: scope:[vera_layer_mode_tile]  from vera_layer_mode_tile::@19
  [368] if(vera_layer_mode_tile::tileheight#10!=$10) goto vera_layer_mode_tile::@22
  to:vera_layer_mode_tile::@21
vera_layer_mode_tile::@21: scope:[vera_layer_mode_tile]  from vera_layer_mode_tile::@20
  [369] vera_layer_mode_tile::tilebase#5 = vera_layer_mode_tile::tilebase#12 | VERA_TILEBASE_HEIGHT_16
  to:vera_layer_mode_tile::@22
vera_layer_mode_tile::@22: scope:[vera_layer_mode_tile]  from vera_layer_mode_tile::@19 vera_layer_mode_tile::@20 vera_layer_mode_tile::@21
  [370] vera_layer_mode_tile::tilebase#10 = phi( vera_layer_mode_tile::@20/vera_layer_mode_tile::tilebase#12, vera_layer_mode_tile::@19/vera_layer_mode_tile::tilebase#12, vera_layer_mode_tile::@21/vera_layer_mode_tile::tilebase#5 )
  [371] vera_layer_set_tilebase::layer#0 = vera_layer_mode_tile::layer#10
  [372] vera_layer_set_tilebase::tilebase#0 = vera_layer_mode_tile::tilebase#10
  [373] call vera_layer_set_tilebase
  to:vera_layer_mode_tile::@return
vera_layer_mode_tile::@return: scope:[vera_layer_mode_tile]  from vera_layer_mode_tile::@22
  [374] return 
  to:@return
vera_layer_mode_tile::@14: scope:[vera_layer_mode_tile]  from vera_layer_mode_tile::@11
  [375] vera_layer_mode_tile::config#11 = vera_layer_mode_tile::config#21 | VERA_LAYER_HEIGHT_128
  to:vera_layer_mode_tile::@16
vera_layer_mode_tile::@13: scope:[vera_layer_mode_tile]  from vera_layer_mode_tile::@10
  [376] vera_layer_mode_tile::config#10 = vera_layer_mode_tile::config#21 | VERA_LAYER_HEIGHT_64
  to:vera_layer_mode_tile::@16
vera_layer_mode_tile::@7: scope:[vera_layer_mode_tile]  from vera_layer_mode_tile::@3
  [377] vera_layer_rowshift[vera_layer_mode_tile::layer#10] = 8
  [378] vera_layer_mode_tile::$13 = vera_layer_mode_tile::layer#10 << 1
  [379] vera_layer_rowskip[vera_layer_mode_tile::$13] = $100
  to:vera_layer_mode_tile::@9
vera_layer_mode_tile::@6: scope:[vera_layer_mode_tile]  from vera_layer_mode_tile::@2
  [380] vera_layer_rowshift[vera_layer_mode_tile::layer#10] = 7
  [381] vera_layer_mode_tile::$12 = vera_layer_mode_tile::layer#10 << 1
  [382] vera_layer_rowskip[vera_layer_mode_tile::$12] = $80
  to:vera_layer_mode_tile::@9
vera_layer_mode_tile::@5: scope:[vera_layer_mode_tile]  from vera_layer_mode_tile::@1
  [383] vera_layer_rowshift[vera_layer_mode_tile::layer#10] = 6
  [384] vera_layer_mode_tile::$11 = vera_layer_mode_tile::layer#10 << 1
  [385] vera_layer_rowskip[vera_layer_mode_tile::$11] = $40
  to:vera_layer_mode_tile::@9

char scroll(char onoff)
scroll: scope:[scroll]  from main::@16
  [386] conio_scroll_enable[conio_screen_layer] = scroll::onoff#0
  to:scroll::@return
scroll::@return: scope:[scroll]  from scroll
  [387] return 
  to:@return

void draw_characters(unsigned long tilebase)
draw_characters: scope:[draw_characters]  from main::@11 main::@5 main::@7
  [388] draw_characters::tilebase#4 = phi( main::@7/draw_characters::tilebase#1, main::@11/draw_characters::tilebase#2, main::@5/draw_characters::tilebase#0 )
  [389] call clrscr
  to:draw_characters::@1
draw_characters::@1: scope:[draw_characters]  from draw_characters draw_characters::@9
  [390] draw_characters::y#13 = phi( draw_characters::@9/draw_characters::y#1, draw_characters/0 )
  [390] draw_characters::tilerow#1 = phi( draw_characters::@9/draw_characters::tilebase#3, draw_characters/draw_characters::tilebase#4 )
  [391] draw_characters::tilecolumn#11 = draw_characters::tilerow#1
  to:draw_characters::@2
draw_characters::@2: scope:[draw_characters]  from draw_characters::@1 draw_characters::@8
  [392] draw_characters::r#11 = phi( draw_characters::@1/0, draw_characters::@8/draw_characters::r#1 )
  [392] draw_characters::tilecolumn#1 = phi( draw_characters::@1/draw_characters::tilecolumn#11, draw_characters::@8/draw_characters::tilerow#2 )
  [393] draw_characters::tilecolumn#13 = draw_characters::tilecolumn#1
  to:draw_characters::@3
draw_characters::@3: scope:[draw_characters]  from draw_characters::@2 draw_characters::@7
  [394] draw_characters::x#7 = phi( draw_characters::@2/0, draw_characters::@7/draw_characters::x#1 )
  [394] draw_characters::tilecolumn#10 = phi( draw_characters::@2/draw_characters::tilecolumn#13, draw_characters::@7/draw_characters::tilecolumn#2 )
  to:draw_characters::vera_vram_address01
draw_characters::vera_vram_address01: scope:[draw_characters]  from draw_characters::@3
  [395] *VERA_CTRL = *VERA_CTRL & ~VERA_ADDRSEL
  [396] draw_characters::vera_vram_address01_$0 = byte0  draw_characters::tilecolumn#10
  [397] *VERA_ADDRX_L = draw_characters::vera_vram_address01_$0
  [398] draw_characters::vera_vram_address01_$1 = byte1  draw_characters::tilecolumn#10
  [399] *VERA_ADDRX_M = draw_characters::vera_vram_address01_$1
  [400] draw_characters::vera_vram_address01_$3 = byte2  draw_characters::tilecolumn#10
  [401] *VERA_ADDRX_H = draw_characters::vera_vram_address01_$3
  to:draw_characters::@10
draw_characters::@10: scope:[draw_characters]  from draw_characters::vera_vram_address01
  [402] draw_characters::bit#0 = *VERA_DATA0
  to:draw_characters::@4
draw_characters::@4: scope:[draw_characters]  from draw_characters::@10 draw_characters::@6
  [403] draw_characters::b#2 = phi( draw_characters::@10/8, draw_characters::@6/draw_characters::b#1 )
  [404] draw_characters::$2 = draw_characters::b#2 - 1
  [405] draw_characters::$3 = draw_characters::bit#0 >> draw_characters::$2
  [406] draw_characters::bit#1 = draw_characters::$3 & 1
  [407] if(0!=draw_characters::bit#1) goto draw_characters::@5
  to:draw_characters::@6
draw_characters::@5: scope:[draw_characters]  from draw_characters::@4
  [408] phi()
  to:draw_characters::@6
draw_characters::@6: scope:[draw_characters]  from draw_characters::@4 draw_characters::@5
  [409] draw_characters::$7 = phi( draw_characters::@5/'*', draw_characters::@4/'.' )
  [410] stackpush(char) = draw_characters::$7
  [411] callexecute cputc 
  sideeffect stackpullbytes(1)
  [413] draw_characters::b#1 = -- draw_characters::b#2
  [414] if(draw_characters::b#1!=0) goto draw_characters::@4
  to:draw_characters::@7
draw_characters::@7: scope:[draw_characters]  from draw_characters::@6
  [415] draw_characters::tilecolumn#2 = draw_characters::tilecolumn#10 + 8
  [416] draw_characters::x#1 = ++ draw_characters::x#7
  [417] if(draw_characters::x#1!=$10) goto draw_characters::@3
  to:draw_characters::@8
draw_characters::@8: scope:[draw_characters]  from draw_characters::@7
  [418] draw_characters::tilerow#2 = draw_characters::tilecolumn#1 + 1
  [419] draw_characters::r#1 = ++ draw_characters::r#11
  [420] if(draw_characters::r#1!=8) goto draw_characters::@2
  to:draw_characters::@9
draw_characters::@9: scope:[draw_characters]  from draw_characters::@8
  [421] draw_characters::tilebase#3 = draw_characters::tilerow#1 + 8*$10
  [422] draw_characters::y#1 = ++ draw_characters::y#13
  [423] if(draw_characters::y#1!=$10) goto draw_characters::@1
  to:draw_characters::@return
draw_characters::@return: scope:[draw_characters]  from draw_characters::@9
  [424] return 
  to:@return

char kbhit()
kbhit: scope:[kbhit]  from main::@1 main::@2
  [425] kbhit::ch = 0
  kickasm( uses kbhit::chptr uses kbhit::IN_DEV uses kbhit::GETIN) {{ jsr _kbhit
        bne L3

        jmp continue1

        .var via1 = $9f60                  //VIA#1
        .var d1pra = via1+1

    _kbhit:
        ldy     d1pra       // The count of keys pressed is stored in RAM bank 0.
        stz     d1pra       // Set d1pra to zero to access RAM bank 0.
        lda     $A00A       // Get number of characters from this address in the ROM of the CX16 (ROM 38).
        sty     d1pra       // Set d1pra to previous value.
        rts

    L3:
        ldy     IN_DEV          // Save current input device
        stz     IN_DEV          // Keyboard
        phy
        jsr     GETIN           // Read char, and return in .A
        ply
        sta     chptr           // Store the character read in ch
        sty     IN_DEV          // Restore input device
        ldx     #>$0000
        rts

    continue1:
        nop
      }}
  [427] kbhit::return#0 = kbhit::ch
  to:kbhit::@return
kbhit::@return: scope:[kbhit]  from kbhit
  [428] kbhit::return#1 = kbhit::return#0
  [429] return 
  to:@return

void printf_str(void (*putc)(char) , const char *s)
printf_str: scope:[printf_str]  from main::@10 main::@18 main::@19 main::@20 main::@21 main::@22 main::@23 main::@24 main::@9
  [430] printf_str::s#11 = phi( main::@9/main::s, main::@10/main::s8, main::@18/main::s1, main::@19/main::s2, main::@20/main::s3, main::@21/main::s4, main::@22/main::s5, main::@23/main::s6, main::@24/main::s7 )
  to:printf_str::@1
printf_str::@1: scope:[printf_str]  from printf_str printf_str::@2
  [431] printf_str::s#10 = phi( printf_str/printf_str::s#11, printf_str::@2/printf_str::s#0 )
  [432] printf_str::c#1 = *printf_str::s#10
  [433] printf_str::s#0 = ++ printf_str::s#10
  [434] if(0!=printf_str::c#1) goto printf_str::@2
  to:printf_str::@return
printf_str::@return: scope:[printf_str]  from printf_str::@1
  [435] return 
  to:@return
printf_str::@2: scope:[printf_str]  from printf_str::@1
  [436] stackpush(char) = printf_str::c#1
  [437] callexecute cputc 
  sideeffect stackpullbytes(1)
  to:printf_str::@1

void vera_layer_set_text_color_mode(char layer , char color_mode)
vera_layer_set_text_color_mode: scope:[vera_layer_set_text_color_mode]  from vera_layer_mode_text::@1
  [439] vera_layer_set_text_color_mode::addr#0 = *(vera_layer_config+vera_layer_mode_text::layer#0*SIZEOF_POINTER)
  [440] *vera_layer_set_text_color_mode::addr#0 = *vera_layer_set_text_color_mode::addr#0 & ~VERA_LAYER_CONFIG_256C
  [441] *vera_layer_set_text_color_mode::addr#0 = *vera_layer_set_text_color_mode::addr#0
  to:vera_layer_set_text_color_mode::@return
vera_layer_set_text_color_mode::@return: scope:[vera_layer_set_text_color_mode]  from vera_layer_set_text_color_mode
  [442] return 
  to:@return

char vera_layer_get_mapbase_bank(char layer)
vera_layer_get_mapbase_bank: scope:[vera_layer_get_mapbase_bank]  from screenlayer
  [443] vera_layer_get_mapbase_bank::return#0 = vera_mapbase_bank[vera_layer_get_mapbase_bank::layer#0]
  to:vera_layer_get_mapbase_bank::@return
vera_layer_get_mapbase_bank::@return: scope:[vera_layer_get_mapbase_bank]  from vera_layer_get_mapbase_bank
  [444] return 
  to:@return

unsigned int vera_layer_get_mapbase_offset(char layer)
vera_layer_get_mapbase_offset: scope:[vera_layer_get_mapbase_offset]  from screenlayer::@3
  [445] vera_layer_get_mapbase_offset::$0 = vera_layer_get_mapbase_offset::layer#0 << 1
  [446] vera_layer_get_mapbase_offset::return#0 = vera_mapbase_offset[vera_layer_get_mapbase_offset::$0]
  to:vera_layer_get_mapbase_offset::@return
vera_layer_get_mapbase_offset::@return: scope:[vera_layer_get_mapbase_offset]  from vera_layer_get_mapbase_offset
  [447] return 
  to:@return

char vera_layer_get_rowshift(char layer)
vera_layer_get_rowshift: scope:[vera_layer_get_rowshift]  from screenlayer::@1
  [448] vera_layer_get_rowshift::return#0 = vera_layer_rowshift[vera_layer_get_rowshift::layer#0]
  to:vera_layer_get_rowshift::@return
vera_layer_get_rowshift::@return: scope:[vera_layer_get_rowshift]  from vera_layer_get_rowshift
  [449] return 
  to:@return

unsigned int vera_layer_get_rowskip(char layer)
vera_layer_get_rowskip: scope:[vera_layer_get_rowskip]  from screenlayer::@5
  [450] vera_layer_get_rowskip::$0 = vera_layer_get_rowskip::layer#0 << 1
  [451] vera_layer_get_rowskip::return#0 = vera_layer_rowskip[vera_layer_get_rowskip::$0]
  to:vera_layer_get_rowskip::@return
vera_layer_get_rowskip::@return: scope:[vera_layer_get_rowskip]  from vera_layer_get_rowskip
  [452] return 
  to:@return

void cscroll()
cscroll: scope:[cscroll]  from cputln
  [453] if(conio_cursor_y[conio_screen_layer]<conio_screen_height) goto cscroll::@return
  to:cscroll::@1
cscroll::@1: scope:[cscroll]  from cscroll
  [454] if(0!=conio_scroll_enable[conio_screen_layer]) goto cscroll::@4
  to:cscroll::@2
cscroll::@2: scope:[cscroll]  from cscroll::@1
  [455] if(conio_cursor_y[conio_screen_layer]<conio_height) goto cscroll::@return
  to:cscroll::@3
cscroll::@3: scope:[cscroll]  from cscroll::@2
  [456] phi()
  to:cscroll::@return
cscroll::@return: scope:[cscroll]  from cscroll cscroll::@2 cscroll::@3 cscroll::@5
  [457] return 
  to:@return
cscroll::@4: scope:[cscroll]  from cscroll::@1
  [458] phi()
  [459] call insertup
  to:cscroll::@5
cscroll::@5: scope:[cscroll]  from cscroll::@4
  [460] gotoxy::y#2 = conio_screen_height - 1
  [461] call gotoxy
  to:cscroll::@return

char vera_layer_get_backcolor(char layer)
vera_layer_get_backcolor: scope:[vera_layer_get_backcolor]  from clrscr
  [462] vera_layer_get_backcolor::return#1 = vera_layer_backcolor[vera_layer_get_backcolor::layer#0]
  to:vera_layer_get_backcolor::@return
vera_layer_get_backcolor::@return: scope:[vera_layer_get_backcolor]  from vera_layer_get_backcolor
  [463] return 
  to:@return

char vera_layer_get_textcolor(char layer)
vera_layer_get_textcolor: scope:[vera_layer_get_textcolor]  from clrscr::@7
  [464] vera_layer_get_textcolor::return#1 = vera_layer_textcolor[vera_layer_get_textcolor::layer#0]
  to:vera_layer_get_textcolor::@return
vera_layer_get_textcolor::@return: scope:[vera_layer_get_textcolor]  from vera_layer_get_textcolor
  [465] return 
  to:@return

void vera_layer_set_config(char layer , char config)
vera_layer_set_config: scope:[vera_layer_set_config]  from vera_layer_mode_tile::@16
  [466] vera_layer_set_config::$0 = vera_layer_set_config::layer#0 << 1
  [467] vera_layer_set_config::addr#0 = vera_layer_config[vera_layer_set_config::$0]
  [468] *vera_layer_set_config::addr#0 = vera_layer_set_config::config#0
  to:vera_layer_set_config::@return
vera_layer_set_config::@return: scope:[vera_layer_set_config]  from vera_layer_set_config
  [469] return 
  to:@return

void vera_layer_set_tilebase(char layer , char tilebase)
vera_layer_set_tilebase: scope:[vera_layer_set_tilebase]  from vera_layer_mode_tile::@22
  [470] vera_layer_set_tilebase::$0 = vera_layer_set_tilebase::layer#0 << 1
  [471] vera_layer_set_tilebase::addr#0 = vera_layer_tilebase[vera_layer_set_tilebase::$0]
  [472] *vera_layer_set_tilebase::addr#0 = vera_layer_set_tilebase::tilebase#0
  to:vera_layer_set_tilebase::@return
vera_layer_set_tilebase::@return: scope:[vera_layer_set_tilebase]  from vera_layer_set_tilebase
  [473] return 
  to:@return

void insertup()
insertup: scope:[insertup]  from cscroll::@4
  [474] insertup::cy#0 = conio_cursor_y[conio_screen_layer]
  [475] insertup::width#0 = conio_screen_width << 1
  to:insertup::@1
insertup::@1: scope:[insertup]  from insertup insertup::@4
  [476] insertup::i#2 = phi( insertup/1, insertup::@4/insertup::i#1 )
  [477] if(insertup::i#2<=insertup::cy#0) goto insertup::@2
  to:insertup::@3
insertup::@3: scope:[insertup]  from insertup::@1
  [478] phi()
  [479] call clearline
  to:insertup::@return
insertup::@return: scope:[insertup]  from insertup::@3
  [480] return 
  to:@return
insertup::@2: scope:[insertup]  from insertup::@1
  [481] insertup::$3 = insertup::i#2 - 1
  [482] insertup::line#0 = insertup::$3 << conio_rowshift
  [483] insertup::start#0 = CONIO_SCREEN_TEXT#101 + insertup::line#0
  [484] memcpy_in_vram::src#0 = insertup::start#0 + conio_rowskip
  [485] memcpy_in_vram::dest#0 = (void *)insertup::start#0
  [486] memcpy_in_vram::num#0 = insertup::width#0
  [487] call memcpy_in_vram
  to:insertup::@4
insertup::@4: scope:[insertup]  from insertup::@2
  [488] insertup::i#1 = ++ insertup::i#2
  to:insertup::@1

void clearline()
clearline: scope:[clearline]  from insertup::@3
  [489] *VERA_CTRL = *VERA_CTRL & ~VERA_ADDRSEL
  [490] clearline::$5 = conio_screen_layer << 1
  [491] clearline::addr#0 = CONIO_SCREEN_TEXT#101 + conio_line_text[clearline::$5]
  [492] clearline::$1 = byte0  clearline::addr#0
  [493] *VERA_ADDRX_L = clearline::$1
  [494] clearline::$2 = byte1  clearline::addr#0
  [495] *VERA_ADDRX_M = clearline::$2
  [496] *VERA_ADDRX_H = VERA_INC_1
  [497] vera_layer_get_color::layer#1 = conio_screen_layer
  [498] call vera_layer_get_color
  [499] vera_layer_get_color::return#4 = vera_layer_get_color::return#3
  to:clearline::@4
clearline::@4: scope:[clearline]  from clearline
  [500] clearline::color#0 = vera_layer_get_color::return#4
  to:clearline::@1
clearline::@1: scope:[clearline]  from clearline::@2 clearline::@4
  [501] clearline::c#2 = phi( clearline::@2/clearline::c#1, clearline::@4/0 )
  [502] if(clearline::c#2<conio_screen_width) goto clearline::@2
  to:clearline::@3
clearline::@3: scope:[clearline]  from clearline::@1
  [503] conio_cursor_x[conio_screen_layer] = 0
  to:clearline::@return
clearline::@return: scope:[clearline]  from clearline::@3
  [504] return 
  to:@return
clearline::@2: scope:[clearline]  from clearline::@1
  [505] *VERA_DATA0 = ' '
  [506] *VERA_DATA0 = clearline::color#0
  [507] clearline::c#1 = ++ clearline::c#2
  to:clearline::@1

void memcpy_in_vram(char dest_bank , void *dest , char dest_increment , char src_bank , void *src , char src_increment , unsigned int num)
memcpy_in_vram: scope:[memcpy_in_vram]  from insertup::@2
  [508] *VERA_CTRL = *VERA_CTRL & ~VERA_ADDRSEL
  [509] memcpy_in_vram::$0 = byte0  (void *)memcpy_in_vram::src#0
  [510] *VERA_ADDRX_L = memcpy_in_vram::$0
  [511] memcpy_in_vram::$1 = byte1  (void *)memcpy_in_vram::src#0
  [512] *VERA_ADDRX_M = memcpy_in_vram::$1
  [513] *VERA_ADDRX_H = VERA_INC_1
  [514] *VERA_CTRL = *VERA_CTRL | VERA_ADDRSEL
  [515] memcpy_in_vram::$3 = byte0  memcpy_in_vram::dest#0
  [516] *VERA_ADDRX_L = memcpy_in_vram::$3
  [517] memcpy_in_vram::$4 = byte1  memcpy_in_vram::dest#0
  [518] *VERA_ADDRX_M = memcpy_in_vram::$4
  [519] *VERA_ADDRX_H = VERA_INC_1
  to:memcpy_in_vram::@1
memcpy_in_vram::@1: scope:[memcpy_in_vram]  from memcpy_in_vram memcpy_in_vram::@2
  [520] memcpy_in_vram::i#2 = phi( memcpy_in_vram/0, memcpy_in_vram::@2/memcpy_in_vram::i#1 )
  [521] if(memcpy_in_vram::i#2<memcpy_in_vram::num#0) goto memcpy_in_vram::@2
  to:memcpy_in_vram::@return
memcpy_in_vram::@return: scope:[memcpy_in_vram]  from memcpy_in_vram::@1
  [522] return 
  to:@return
memcpy_in_vram::@2: scope:[memcpy_in_vram]  from memcpy_in_vram::@1
  [523] *VERA_DATA1 = *VERA_DATA0
  [524] memcpy_in_vram::i#1 = ++ memcpy_in_vram::i#2
  to:memcpy_in_vram::@1
