|
|
|
@ -57,10 +57,10 @@
|
|
|
|
|
.label BRAM = 0
|
|
|
|
|
.label BROM = 1
|
|
|
|
|
.segment Code
|
|
|
|
|
// __start
|
|
|
|
|
// void __start()
|
|
|
|
|
__start: {
|
|
|
|
|
// __start::__init1
|
|
|
|
|
// __conio_var_start
|
|
|
|
|
// void __conio_var_start()
|
|
|
|
|
__conio_var_start: {
|
|
|
|
|
// __conio_var_start::__init1
|
|
|
|
|
// __export volatile __address(0x00) unsigned char BRAM = 0
|
|
|
|
|
// [1] BRAM = 0 -- vbuz1=vbuc1
|
|
|
|
|
lda #0
|
|
|
|
@ -69,12 +69,12 @@ __start: {
|
|
|
|
|
// [2] BROM = 4 -- vbuz1=vbuc1
|
|
|
|
|
lda #4
|
|
|
|
|
sta.z BROM
|
|
|
|
|
// [3] phi from __start::__init1 to __start::@1 [phi:__start::__init1->__start::@1]
|
|
|
|
|
// __start::@1
|
|
|
|
|
// [3] phi from __conio_var_start::__init1 to __conio_var_start::@1 [phi:__conio_var_start::__init1->__conio_var_start::@1]
|
|
|
|
|
// __conio_var_start::@1
|
|
|
|
|
// #pragma constructor_for(conio_x16_init, cputc, clrscr, cscroll)
|
|
|
|
|
// [4] callexecute conio_x16_init -- call_var_near
|
|
|
|
|
jsr conio_var.conio_x16_init
|
|
|
|
|
// __start::@return
|
|
|
|
|
// __conio_var_start::@return
|
|
|
|
|
// [5] return
|
|
|
|
|
rts
|
|
|
|
|
}
|
|
|
|
@ -83,10 +83,10 @@ __start: {
|
|
|
|
|
/// Set initial screen values.
|
|
|
|
|
// void conio_x16_init()
|
|
|
|
|
conio_x16_init: {
|
|
|
|
|
.label conio_x16_init__4 = $1c
|
|
|
|
|
.label conio_x16_init__5 = $1f
|
|
|
|
|
.label conio_x16_init__6 = $1c
|
|
|
|
|
.label conio_x16_init__7 = $1f
|
|
|
|
|
.label conio_x16_init__4 = $e
|
|
|
|
|
.label conio_x16_init__5 = $d
|
|
|
|
|
.label conio_x16_init__6 = $e
|
|
|
|
|
.label conio_x16_init__7 = 4
|
|
|
|
|
// screenlayer1()
|
|
|
|
|
// [7] callexecute screenlayer1 -- call_var_near
|
|
|
|
|
jsr conio_var.screenlayer1
|
|
|
|
@ -168,11 +168,11 @@ screenlayer1: {
|
|
|
|
|
// If onoff is 1, scrolling is enabled when outputting past the end of the screen
|
|
|
|
|
// If onoff is 0, scrolling is disabled and the cursor instead moves to (0,0)
|
|
|
|
|
// The function returns the old scroll setting.
|
|
|
|
|
// __zp($24) char scroll(__zp($32) char onoff)
|
|
|
|
|
// __zp($d) char scroll(__zp(5) char onoff)
|
|
|
|
|
scroll: {
|
|
|
|
|
.label onoff = $32
|
|
|
|
|
.label return = $24
|
|
|
|
|
.label old = $24
|
|
|
|
|
.label onoff = 5
|
|
|
|
|
.label return = $d
|
|
|
|
|
.label old = $d
|
|
|
|
|
// char old = __conio.scroll[__conio.layer]
|
|
|
|
|
// [31] scroll::old#0 = ((char *)&__conio+$f)[*((char *)&__conio+2)] -- vbuz1=pbuc1_derefidx_(_deref_pbuc2)
|
|
|
|
|
ldy __conio+2
|
|
|
|
@ -193,11 +193,11 @@ scroll: {
|
|
|
|
|
// If onoff is 1, a cursor is displayed when waiting for keyboard input.
|
|
|
|
|
// If onoff is 0, the cursor is hidden when waiting for keyboard input.
|
|
|
|
|
// The function returns the old cursor setting.
|
|
|
|
|
// __zp($18) char cursor(__zp($2f) char onoff)
|
|
|
|
|
// __zp(4) char cursor(__zp(5) char onoff)
|
|
|
|
|
cursor: {
|
|
|
|
|
.label onoff = $2f
|
|
|
|
|
.label return = $18
|
|
|
|
|
.label old = $18
|
|
|
|
|
.label onoff = 5
|
|
|
|
|
.label return = 4
|
|
|
|
|
.label old = 4
|
|
|
|
|
// char old = __conio.cursor
|
|
|
|
|
// [35] cursor::old#0 = *((char *)&__conio+$c) -- vbuz1=_deref_pbuc1
|
|
|
|
|
// not supported in CX16
|
|
|
|
@ -234,10 +234,10 @@ kbhit: {
|
|
|
|
|
}
|
|
|
|
|
// bordercolor
|
|
|
|
|
// Set the color for the border.
|
|
|
|
|
// __zp($25) char bordercolor(__zp($25) char color)
|
|
|
|
|
// __zp(4) char bordercolor(__zp(3) char color)
|
|
|
|
|
bordercolor: {
|
|
|
|
|
.label color = $25
|
|
|
|
|
.label return = $25
|
|
|
|
|
.label color = 3
|
|
|
|
|
.label return = 4
|
|
|
|
|
// __conio.bordercolor = *VERA_DC_BORDER
|
|
|
|
|
// [44] *((char *)&__conio+$e) = *VERA_DC_BORDER -- _deref_pbuc1=_deref_pbuc2
|
|
|
|
|
lda VERA_DC_BORDER
|
|
|
|
@ -255,13 +255,13 @@ bordercolor: {
|
|
|
|
|
// - color: a 4 bit value ( decimal between 0 and 15).
|
|
|
|
|
// This will only work when the VERA is in 16 color mode!
|
|
|
|
|
// Note that on the VERA, the transparent color has value 0.
|
|
|
|
|
// __zp($17) char bgcolor(__zp($1b) char color)
|
|
|
|
|
// __zp(2) char bgcolor(__zp(3) char color)
|
|
|
|
|
bgcolor: {
|
|
|
|
|
.label color = $1b
|
|
|
|
|
.label return = $17
|
|
|
|
|
.label bgcolor__0 = $17
|
|
|
|
|
.label bgcolor__1 = $1b
|
|
|
|
|
.label bgcolor__2 = $17
|
|
|
|
|
.label color = 3
|
|
|
|
|
.label return = 2
|
|
|
|
|
.label bgcolor__0 = $a
|
|
|
|
|
.label bgcolor__1 = 3
|
|
|
|
|
.label bgcolor__2 = $a
|
|
|
|
|
// __conio.color & 0x0F
|
|
|
|
|
// [47] bgcolor::$0 = *((char *)&__conio+$d) & $f -- vbuz1=_deref_pbuc1_band_vbuc2
|
|
|
|
|
lda #$f
|
|
|
|
@ -296,12 +296,12 @@ bgcolor: {
|
|
|
|
|
// - color: a 4 bit value ( decimal between 0 and 15).
|
|
|
|
|
// This will only work when the VERA is in 16 color mode!
|
|
|
|
|
// Note that on the VERA, the transparent color has value 0.
|
|
|
|
|
// __zp($16) char textcolor(__zp($2c) char color)
|
|
|
|
|
// __zp(2) char textcolor(__zp(6) char color)
|
|
|
|
|
textcolor: {
|
|
|
|
|
.label color = $2c
|
|
|
|
|
.label return = $16
|
|
|
|
|
.label textcolor__0 = $16
|
|
|
|
|
.label textcolor__1 = $16
|
|
|
|
|
.label color = 6
|
|
|
|
|
.label return = 2
|
|
|
|
|
.label textcolor__0 = $a
|
|
|
|
|
.label textcolor__1 = $a
|
|
|
|
|
// __conio.color & 0xF0
|
|
|
|
|
// [53] textcolor::$0 = *((char *)&__conio+$d) & $f0 -- vbuz1=_deref_pbuc1_band_vbuc2
|
|
|
|
|
lda #$f0
|
|
|
|
@ -326,18 +326,14 @@ textcolor: {
|
|
|
|
|
// cputsxy
|
|
|
|
|
// Move cursor and output a NUL-terminated string
|
|
|
|
|
// Same as "gotoxy (x, y); puts (s);"
|
|
|
|
|
// void cputsxy(__zp($2b) char x, __zp($31) char y, __zp($36) const char *s)
|
|
|
|
|
// void cputsxy(__zp($d) char x, __zp(2) char y, __zp($10) const char *s)
|
|
|
|
|
cputsxy: {
|
|
|
|
|
.label x = $2b
|
|
|
|
|
.label y = $31
|
|
|
|
|
.label s = $36
|
|
|
|
|
.label x = $d
|
|
|
|
|
.label y = 2
|
|
|
|
|
.label s = $10
|
|
|
|
|
// gotoxy(x, y)
|
|
|
|
|
// [58] gotoxy::x = cputsxy::x -- vbuz1=vbuz2
|
|
|
|
|
lda.z x
|
|
|
|
|
sta.z conio_var.gotoxy.x
|
|
|
|
|
// [59] gotoxy::y = cputsxy::y -- vbuz1=vbuz2
|
|
|
|
|
lda.z y
|
|
|
|
|
sta.z conio_var.gotoxy.y
|
|
|
|
|
// [58] gotoxy::x = cputsxy::x
|
|
|
|
|
// [59] gotoxy::y = cputsxy::y
|
|
|
|
|
// [60] callexecute gotoxy -- call_var_near
|
|
|
|
|
jsr conio_var.gotoxy
|
|
|
|
|
// cputs(s)
|
|
|
|
@ -355,10 +351,10 @@ cputsxy: {
|
|
|
|
|
}
|
|
|
|
|
// cputs
|
|
|
|
|
// Output a NUL-terminated string at the current cursor position
|
|
|
|
|
// void cputs(__zp($20) const char *s)
|
|
|
|
|
// void cputs(__zp($e) const char *s)
|
|
|
|
|
cputs: {
|
|
|
|
|
.label s = $20
|
|
|
|
|
.label c = $1e
|
|
|
|
|
.label s = $e
|
|
|
|
|
.label c = 3
|
|
|
|
|
// cputs::@1
|
|
|
|
|
__b1:
|
|
|
|
|
// while(c=*s++)
|
|
|
|
@ -393,18 +389,14 @@ cputs: {
|
|
|
|
|
// cputcxy
|
|
|
|
|
// Move cursor and output one character
|
|
|
|
|
// Same as "gotoxy (x, y); cputc (c);"
|
|
|
|
|
// void cputcxy(__zp($2a) char x, __zp($30) char y, __zp($35) char c)
|
|
|
|
|
// void cputcxy(__zp($d) char x, __zp(2) char y, __zp(7) char c)
|
|
|
|
|
cputcxy: {
|
|
|
|
|
.label x = $2a
|
|
|
|
|
.label y = $30
|
|
|
|
|
.label c = $35
|
|
|
|
|
.label x = $d
|
|
|
|
|
.label y = 2
|
|
|
|
|
.label c = 7
|
|
|
|
|
// gotoxy(x, y)
|
|
|
|
|
// [72] gotoxy::x = cputcxy::x -- vbuz1=vbuz2
|
|
|
|
|
lda.z x
|
|
|
|
|
sta.z conio_var.gotoxy.x
|
|
|
|
|
// [73] gotoxy::y = cputcxy::y -- vbuz1=vbuz2
|
|
|
|
|
lda.z y
|
|
|
|
|
sta.z conio_var.gotoxy.y
|
|
|
|
|
// [72] gotoxy::x = cputcxy::x
|
|
|
|
|
// [73] gotoxy::y = cputcxy::y
|
|
|
|
|
// [74] callexecute gotoxy -- call_var_near
|
|
|
|
|
jsr conio_var.gotoxy
|
|
|
|
|
// cputc(c)
|
|
|
|
@ -424,7 +416,7 @@ cputcxy: {
|
|
|
|
|
// Print a newline
|
|
|
|
|
// void cputln()
|
|
|
|
|
cputln: {
|
|
|
|
|
.label cputln__3 = 8
|
|
|
|
|
.label cputln__3 = $a
|
|
|
|
|
// __conio.cursor_x = 0
|
|
|
|
|
// [79] *((char *)&__conio) = 0 -- _deref_pbuc1=vbuc2
|
|
|
|
|
lda #0
|
|
|
|
@ -463,22 +455,23 @@ cputln: {
|
|
|
|
|
// cputc
|
|
|
|
|
// Output one character at the current cursor position
|
|
|
|
|
// Moves the cursor forward. Scrolls the entire screen if needed
|
|
|
|
|
// void cputc(__zp($19) char c)
|
|
|
|
|
// void cputc(__zp($a) char c)
|
|
|
|
|
cputc: {
|
|
|
|
|
.const OFFSET_STACK_C = 0
|
|
|
|
|
.label c = $19
|
|
|
|
|
.label cputc__1 = $14
|
|
|
|
|
.label cputc__2 = $14
|
|
|
|
|
.label cputc__3 = $14
|
|
|
|
|
.label c = 3
|
|
|
|
|
.label cputc__1 = 2
|
|
|
|
|
.label cputc__2 = $d
|
|
|
|
|
.label cputc__3 = 2
|
|
|
|
|
.label c_1 = $a
|
|
|
|
|
// [87] cputc::c#0 = stackidx(char,cputc::OFFSET_STACK_C) -- vbuz1=_stackidxbyte_vbuc1
|
|
|
|
|
tsx
|
|
|
|
|
lda STACK_BASE+OFFSET_STACK_C,x
|
|
|
|
|
sta.z c
|
|
|
|
|
sta.z c_1
|
|
|
|
|
// if(c=='\n')
|
|
|
|
|
// [88] if(cputc::c#0==' 'pm) goto cputc::@1 -- vbuz1_eq_vbuc1_then_la1
|
|
|
|
|
.encoding "petscii_mixed"
|
|
|
|
|
lda #'\n'
|
|
|
|
|
cmp.z c
|
|
|
|
|
cmp.z c_1
|
|
|
|
|
beq __b1
|
|
|
|
|
// cputc::@2
|
|
|
|
|
// *VERA_CTRL &= ~VERA_ADDRSEL
|
|
|
|
@ -510,7 +503,7 @@ cputc: {
|
|
|
|
|
sta VERA_ADDRX_H
|
|
|
|
|
// *VERA_DATA0 = c
|
|
|
|
|
// [96] *VERA_DATA0 = cputc::c#0 -- _deref_pbuc1=vbuz1
|
|
|
|
|
lda.z c
|
|
|
|
|
lda.z c_1
|
|
|
|
|
sta VERA_DATA0
|
|
|
|
|
// *VERA_DATA0 = __conio.color
|
|
|
|
|
// [97] *VERA_DATA0 = *((char *)&__conio+$d) -- _deref_pbuc1=_deref_pbuc2
|
|
|
|
@ -596,9 +589,9 @@ cputc: {
|
|
|
|
|
}
|
|
|
|
|
// screensizey
|
|
|
|
|
// Return the current screen size y height.
|
|
|
|
|
// __zp($26) char screensizey()
|
|
|
|
|
// __zp(2) char screensizey()
|
|
|
|
|
screensizey: {
|
|
|
|
|
.label return = $26
|
|
|
|
|
.label return = 2
|
|
|
|
|
// return __conio.height;
|
|
|
|
|
// [114] screensizey::return = *((char *)&__conio+7) -- vbuz1=_deref_pbuc1
|
|
|
|
|
lda __conio+7
|
|
|
|
@ -610,9 +603,9 @@ screensizey: {
|
|
|
|
|
}
|
|
|
|
|
// screensizex
|
|
|
|
|
// Return the current screen size x width.
|
|
|
|
|
// __zp($27) char screensizex()
|
|
|
|
|
// __zp($d) char screensizex()
|
|
|
|
|
screensizex: {
|
|
|
|
|
.label return = $27
|
|
|
|
|
.label return = $d
|
|
|
|
|
// return __conio.width;
|
|
|
|
|
// [116] screensizex::return = *((char *)&__conio+6) -- vbuz1=_deref_pbuc1
|
|
|
|
|
lda __conio+6
|
|
|
|
@ -624,16 +617,16 @@ screensizex: {
|
|
|
|
|
}
|
|
|
|
|
// screensize
|
|
|
|
|
// Return the current screen size.
|
|
|
|
|
// void screensize(__zp($33) char *x, __zp($38) char *y)
|
|
|
|
|
// void screensize(__zp(8) char *x, __zp($10) char *y)
|
|
|
|
|
screensize: {
|
|
|
|
|
.label x = $33
|
|
|
|
|
.label y = $38
|
|
|
|
|
.label screensize__1 = $23
|
|
|
|
|
.label screensize__2 = $23
|
|
|
|
|
.label screensize__4 = $23
|
|
|
|
|
.label screensize__5 = $23
|
|
|
|
|
.label hscale = $23
|
|
|
|
|
.label vscale = $23
|
|
|
|
|
.label x = 8
|
|
|
|
|
.label y = $10
|
|
|
|
|
.label screensize__1 = 2
|
|
|
|
|
.label screensize__2 = 2
|
|
|
|
|
.label screensize__4 = 3
|
|
|
|
|
.label screensize__5 = 3
|
|
|
|
|
.label hscale = 2
|
|
|
|
|
.label vscale = 3
|
|
|
|
|
// char hscale = (*VERA_DC_HSCALE) >> 7
|
|
|
|
|
// [118] screensize::hscale#0 = *VERA_DC_HSCALE >> 7 -- vbuz1=_deref_pbuc1_ror_7
|
|
|
|
|
// VERA returns in VERA_DC_HSCALE the value of 128 when 80 columns is used in text mode,
|
|
|
|
@ -700,9 +693,9 @@ screensize: {
|
|
|
|
|
}
|
|
|
|
|
// wherey
|
|
|
|
|
// Return the y position of the cursor
|
|
|
|
|
// __zp($28) char wherey()
|
|
|
|
|
// __zp(3) char wherey()
|
|
|
|
|
wherey: {
|
|
|
|
|
.label return = $28
|
|
|
|
|
.label return = 3
|
|
|
|
|
// return __conio.cursor_y;
|
|
|
|
|
// [127] wherey::return = *((char *)&__conio+1) -- vbuz1=_deref_pbuc1
|
|
|
|
|
lda __conio+1
|
|
|
|
@ -714,9 +707,9 @@ wherey: {
|
|
|
|
|
}
|
|
|
|
|
// wherex
|
|
|
|
|
// Return the x position of the cursor
|
|
|
|
|
// __zp($29) char wherex()
|
|
|
|
|
// __zp(4) char wherex()
|
|
|
|
|
wherex: {
|
|
|
|
|
.label return = $29
|
|
|
|
|
.label return = 4
|
|
|
|
|
// return __conio.cursor_x;
|
|
|
|
|
// [129] wherex::return = *((char *)&__conio) -- vbuz1=_deref_pbuc1
|
|
|
|
|
lda __conio
|
|
|
|
@ -728,19 +721,19 @@ wherex: {
|
|
|
|
|
}
|
|
|
|
|
// gotoxy
|
|
|
|
|
// Set the cursor to the specified position
|
|
|
|
|
// void gotoxy(__zp($b) char x, __zp($d) char y)
|
|
|
|
|
// void gotoxy(__zp($d) char x, __zp(2) char y)
|
|
|
|
|
gotoxy: {
|
|
|
|
|
.label x = $b
|
|
|
|
|
.label y = $d
|
|
|
|
|
.label gotoxy__1 = $b
|
|
|
|
|
.label gotoxy__2 = $b
|
|
|
|
|
.label gotoxy__3 = $b
|
|
|
|
|
.label gotoxy__5 = $b
|
|
|
|
|
.label gotoxy__6 = $b
|
|
|
|
|
.label gotoxy__7 = $b
|
|
|
|
|
.label gotoxy__8 = $b
|
|
|
|
|
.label gotoxy__9 = $e
|
|
|
|
|
.label gotoxy__10 = $d
|
|
|
|
|
.label x = $d
|
|
|
|
|
.label y = 2
|
|
|
|
|
.label gotoxy__1 = $d
|
|
|
|
|
.label gotoxy__2 = $d
|
|
|
|
|
.label gotoxy__3 = $d
|
|
|
|
|
.label gotoxy__5 = $a
|
|
|
|
|
.label gotoxy__6 = $a
|
|
|
|
|
.label gotoxy__7 = $a
|
|
|
|
|
.label gotoxy__8 = 4
|
|
|
|
|
.label gotoxy__9 = $b
|
|
|
|
|
.label gotoxy__10 = 2
|
|
|
|
|
// (x>=__conio.width)?__conio.width:x
|
|
|
|
|
// [131] if(gotoxy::x>=*((char *)&__conio+6)) goto gotoxy::@1 -- vbuz1_ge__deref_pbuc1_then_la1
|
|
|
|
|
lda.z x
|
|
|
|
@ -817,13 +810,13 @@ gotoxy: {
|
|
|
|
|
// clears the screen and moves the cursor to the upper left-hand corner of the screen.
|
|
|
|
|
// void clrscr()
|
|
|
|
|
clrscr: {
|
|
|
|
|
.label clrscr__0 = $22
|
|
|
|
|
.label clrscr__1 = $1a
|
|
|
|
|
.label clrscr__2 = $1a
|
|
|
|
|
.label line_text = $2d
|
|
|
|
|
.label l = $22
|
|
|
|
|
.label ch = $2d
|
|
|
|
|
.label c = $1a
|
|
|
|
|
.label clrscr__0 = $d
|
|
|
|
|
.label clrscr__1 = 2
|
|
|
|
|
.label clrscr__2 = 4
|
|
|
|
|
.label line_text = $e
|
|
|
|
|
.label l = $d
|
|
|
|
|
.label ch = $e
|
|
|
|
|
.label c = $a
|
|
|
|
|
// unsigned int line_text = __conio.mapbase_offset
|
|
|
|
|
// [146] clrscr::line_text#0 = *((unsigned int *)&__conio+3) -- vwuz1=_deref_pwuc1
|
|
|
|
|
lda __conio+3
|
|
|
|
@ -931,9 +924,9 @@ clrscr: {
|
|
|
|
|
* @brief Get current x and y cursor position.
|
|
|
|
|
* @return An unsigned int where the hi byte is the x coordinate and the low byte is the y coordinate of the screen position.
|
|
|
|
|
*/
|
|
|
|
|
// __zp($1c) unsigned int cbm_k_plot_get()
|
|
|
|
|
// __zp($e) unsigned int cbm_k_plot_get()
|
|
|
|
|
cbm_k_plot_get: {
|
|
|
|
|
.label return = $1c
|
|
|
|
|
.label return = $e
|
|
|
|
|
// __mem unsigned char x
|
|
|
|
|
// [169] cbm_k_plot_get::x = 0 -- vbum1=vbuc1
|
|
|
|
|
lda #0
|
|
|
|
@ -965,29 +958,29 @@ cbm_k_plot_get: {
|
|
|
|
|
.segment CodeConIO
|
|
|
|
|
// screenlayer
|
|
|
|
|
// --- layer management in VERA ---
|
|
|
|
|
// void screenlayer(char layer, __zp($10) char mapbase, __zp($11) char config)
|
|
|
|
|
// void screenlayer(char layer, __zp(2) char mapbase, __zp(4) char config)
|
|
|
|
|
screenlayer: {
|
|
|
|
|
.label screenlayer__0 = $15
|
|
|
|
|
.label screenlayer__1 = $10
|
|
|
|
|
.label screenlayer__2 = $12
|
|
|
|
|
.label screenlayer__5 = $11
|
|
|
|
|
.label screenlayer__6 = $11
|
|
|
|
|
.label screenlayer__7 = $10
|
|
|
|
|
.label screenlayer__8 = $10
|
|
|
|
|
.label screenlayer__9 = $10
|
|
|
|
|
.label screenlayer__10 = $10
|
|
|
|
|
.label screenlayer__11 = $10
|
|
|
|
|
.label screenlayer__12 = $10
|
|
|
|
|
.label screenlayer__13 = $10
|
|
|
|
|
.label screenlayer__14 = $10
|
|
|
|
|
.label screenlayer__16 = $10
|
|
|
|
|
.label screenlayer__17 = $11
|
|
|
|
|
.label screenlayer__18 = $10
|
|
|
|
|
.label screenlayer__19 = $10
|
|
|
|
|
.label mapbase = $10
|
|
|
|
|
.label config = $11
|
|
|
|
|
.label mapbase_offset = $12
|
|
|
|
|
.label y = $10
|
|
|
|
|
.label screenlayer__0 = $d
|
|
|
|
|
.label screenlayer__1 = 2
|
|
|
|
|
.label screenlayer__2 = $b
|
|
|
|
|
.label screenlayer__5 = 4
|
|
|
|
|
.label screenlayer__6 = 4
|
|
|
|
|
.label screenlayer__7 = 2
|
|
|
|
|
.label screenlayer__8 = 2
|
|
|
|
|
.label screenlayer__9 = 4
|
|
|
|
|
.label screenlayer__10 = 4
|
|
|
|
|
.label screenlayer__11 = 4
|
|
|
|
|
.label screenlayer__12 = $d
|
|
|
|
|
.label screenlayer__13 = $d
|
|
|
|
|
.label screenlayer__14 = $d
|
|
|
|
|
.label screenlayer__16 = 2
|
|
|
|
|
.label screenlayer__17 = 2
|
|
|
|
|
.label screenlayer__18 = 4
|
|
|
|
|
.label screenlayer__19 = $d
|
|
|
|
|
.label mapbase = 2
|
|
|
|
|
.label config = 4
|
|
|
|
|
.label mapbase_offset = $e
|
|
|
|
|
.label y = $a
|
|
|
|
|
// __mem char vera_dc_hscale_temp = *VERA_DC_HSCALE
|
|
|
|
|
// [174] screenlayer::vera_dc_hscale_temp#0 = *VERA_DC_HSCALE -- vbum1=_deref_pbuc1
|
|
|
|
|
lda VERA_DC_HSCALE
|
|
|
|
@ -1271,12 +1264,12 @@ cscroll: {
|
|
|
|
|
// Insert a new line, and scroll the upper part of the screen up.
|
|
|
|
|
// void insertup(char rows)
|
|
|
|
|
insertup: {
|
|
|
|
|
.label insertup__0 = $c
|
|
|
|
|
.label insertup__0 = $d
|
|
|
|
|
.label insertup__4 = 2
|
|
|
|
|
.label insertup__6 = 3
|
|
|
|
|
.label insertup__7 = 2
|
|
|
|
|
.label width = $c
|
|
|
|
|
.label y = 8
|
|
|
|
|
.label width = $d
|
|
|
|
|
.label y = $a
|
|
|
|
|
// __conio.width+1
|
|
|
|
|
// [224] insertup::$0 = *((char *)&__conio+6) + 1 -- vbuz1=_deref_pbuc1_plus_1
|
|
|
|
|
lda __conio+6
|
|
|
|
@ -1358,7 +1351,7 @@ clearline: {
|
|
|
|
|
.label clearline__1 = 4
|
|
|
|
|
.label clearline__2 = 4
|
|
|
|
|
.label clearline__3 = 5
|
|
|
|
|
.label addr = 9
|
|
|
|
|
.label addr = $b
|
|
|
|
|
.label c = 2
|
|
|
|
|
// unsigned int addr = __conio.offsets[__conio.cursor_y]
|
|
|
|
|
// [241] clearline::$3 = *((char *)&__conio+1) << 1 -- vbuz1=_deref_pbuc1_rol_1
|
|
|
|
@ -1440,19 +1433,19 @@ clearline: {
|
|
|
|
|
* @param soffset_vram Offset of the source location in vram.
|
|
|
|
|
* @param num16 Specified the amount of bytes to be copied.
|
|
|
|
|
*/
|
|
|
|
|
// void memcpy8_vram_vram(__zp(5) char dbank_vram, __zp(9) unsigned int doffset_vram, __zp(3) char sbank_vram, __zp(6) unsigned int soffset_vram, __zp(3) char num8)
|
|
|
|
|
// void memcpy8_vram_vram(__zp(5) char dbank_vram, __zp($b) unsigned int doffset_vram, __zp(3) char sbank_vram, __zp(8) unsigned int soffset_vram, __zp(3) char num8)
|
|
|
|
|
memcpy8_vram_vram: {
|
|
|
|
|
.label memcpy8_vram_vram__0 = 4
|
|
|
|
|
.label memcpy8_vram_vram__1 = 4
|
|
|
|
|
.label memcpy8_vram_vram__2 = 3
|
|
|
|
|
.label memcpy8_vram_vram__3 = 3
|
|
|
|
|
.label memcpy8_vram_vram__4 = 3
|
|
|
|
|
.label memcpy8_vram_vram__3 = 7
|
|
|
|
|
.label memcpy8_vram_vram__4 = 6
|
|
|
|
|
.label memcpy8_vram_vram__5 = 5
|
|
|
|
|
.label num8 = 3
|
|
|
|
|
.label dbank_vram = 5
|
|
|
|
|
.label doffset_vram = 9
|
|
|
|
|
.label doffset_vram = $b
|
|
|
|
|
.label sbank_vram = 3
|
|
|
|
|
.label soffset_vram = 6
|
|
|
|
|
.label soffset_vram = 8
|
|
|
|
|
.label num8_1 = 2
|
|
|
|
|
// *VERA_CTRL &= ~VERA_ADDRSEL
|
|
|
|
|
// [257] *VERA_CTRL = *VERA_CTRL & ~VERA_ADDRSEL -- _deref_pbuc1=_deref_pbuc1_band_vbuc2
|
|
|
|
@ -1540,24 +1533,23 @@ memcpy8_vram_vram: {
|
|
|
|
|
.segment DataConIO
|
|
|
|
|
__conio: .fill SIZEOF_STRUCT___0, 0
|
|
|
|
|
}
|
|
|
|
|
// void __start()
|
|
|
|
|
// void conio_x16_init()
|
|
|
|
|
// void clrscr()
|
|
|
|
|
// void gotoxy(__zp($b) char x, __zp($d) char y)
|
|
|
|
|
// __zp($29) char wherex()
|
|
|
|
|
// __zp($28) char wherey()
|
|
|
|
|
// void screensize(__zp($33) char *x, __zp($38) char *y)
|
|
|
|
|
// __zp($27) char screensizex()
|
|
|
|
|
// __zp($26) char screensizey()
|
|
|
|
|
// void gotoxy(__zp($d) char x, __zp(2) char y)
|
|
|
|
|
// __zp(4) char wherex()
|
|
|
|
|
// __zp(3) char wherey()
|
|
|
|
|
// void screensize(__zp(8) char *x, __zp($10) char *y)
|
|
|
|
|
// __zp($d) char screensizex()
|
|
|
|
|
// __zp(2) char screensizey()
|
|
|
|
|
// void cputln()
|
|
|
|
|
// void cputc(__zp($19) char c)
|
|
|
|
|
// void cputcxy(__zp($2a) char x, __zp($30) char y, __zp($35) char c)
|
|
|
|
|
// void cputs(__zp($20) const char *s)
|
|
|
|
|
// void cputsxy(__zp($2b) char x, __zp($31) char y, __zp($36) const char *s)
|
|
|
|
|
// __zp($16) char textcolor(__zp($2c) char color)
|
|
|
|
|
// __zp($17) char bgcolor(__zp($1b) char color)
|
|
|
|
|
// __zp($25) char bordercolor(__zp($25) char color)
|
|
|
|
|
// void cputc(__zp($a) char c)
|
|
|
|
|
// void cputcxy(__zp($d) char x, __zp(2) char y, __zp(7) char c)
|
|
|
|
|
// void cputs(__zp($e) const char *s)
|
|
|
|
|
// void cputsxy(__zp($d) char x, __zp(2) char y, __zp($10) const char *s)
|
|
|
|
|
// __zp(2) char textcolor(__zp(6) char color)
|
|
|
|
|
// __zp(2) char bgcolor(__zp(3) char color)
|
|
|
|
|
// __zp(4) char bordercolor(__zp(3) char color)
|
|
|
|
|
// char kbhit()
|
|
|
|
|
// __zp($18) char cursor(__zp($2f) char onoff)
|
|
|
|
|
// __zp($24) char scroll(__zp($32) char onoff)
|
|
|
|
|
// __zp(4) char cursor(__zp(5) char onoff)
|
|
|
|
|
// __zp($d) char scroll(__zp(5) char onoff)
|
|
|
|
|
// void screenlayer1()
|
|
|
|
|