mirror of
https://github.com/cc65/cc65.git
synced 2024-09-28 10:55:43 +00:00
Added the cputdirect entry point to the cputc() functions in the two Oric libraries.
It now is available in all libraries that have cputc().
This commit is contained in:
parent
2d7777b604
commit
5f65252fa6
@ -7,7 +7,7 @@
|
|||||||
;
|
;
|
||||||
|
|
||||||
.export _cputcxy, _cputc
|
.export _cputcxy, _cputc
|
||||||
.export setscrptr, putchar
|
.export setscrptr, cputdirect, putchar
|
||||||
.constructor initcputc
|
.constructor initcputc
|
||||||
.import rvs
|
.import rvs
|
||||||
.import popax
|
.import popax
|
||||||
@ -32,13 +32,13 @@ _cputc: cmp #$0D ; CR?
|
|||||||
rts
|
rts
|
||||||
|
|
||||||
L1: cmp #$0A ; LF?
|
L1: cmp #$0A ; LF?
|
||||||
bne output
|
bne cputdirect
|
||||||
inc CURS_Y ; Newline
|
inc CURS_Y ; Newline
|
||||||
rts
|
rts
|
||||||
|
|
||||||
; Output the character, then advance the cursor position
|
; Output the character, then advance the cursor position
|
||||||
|
|
||||||
output:
|
cputdirect:
|
||||||
jsr putchar
|
jsr putchar
|
||||||
|
|
||||||
advance:
|
advance:
|
||||||
|
@ -4,15 +4,17 @@
|
|||||||
; void cputc (char c);
|
; void cputc (char c);
|
||||||
;
|
;
|
||||||
|
|
||||||
.export _cputc, CHARCOLOR, OLD_CHARCOLOR, BGCOLOR, OLD_BGCOLOR
|
.export _cputc, cputdirect
|
||||||
|
.export CHARCOLOR, OLD_CHARCOLOR, BGCOLOR, OLD_BGCOLOR
|
||||||
|
|
||||||
.include "telestrat.inc"
|
.include "telestrat.inc"
|
||||||
|
|
||||||
|
cputdirect:
|
||||||
.proc _cputc
|
.proc _cputc
|
||||||
ldx CHARCOLOR
|
ldx CHARCOLOR
|
||||||
cpx OLD_CHARCOLOR
|
cpx OLD_CHARCOLOR
|
||||||
beq do_not_change_color_foreground
|
beq do_not_change_color_foreground
|
||||||
|
|
||||||
stx OLD_CHARCOLOR ; Store CHARCOLOR into OLD_CHARCOLOR
|
stx OLD_CHARCOLOR ; Store CHARCOLOR into OLD_CHARCOLOR
|
||||||
|
|
||||||
dec SCRX
|
dec SCRX
|
||||||
@ -47,8 +49,8 @@ do_not_change_color:
|
|||||||
CHARCOLOR:
|
CHARCOLOR:
|
||||||
.res 1
|
.res 1
|
||||||
OLD_CHARCOLOR:
|
OLD_CHARCOLOR:
|
||||||
.res 1
|
.res 1
|
||||||
BGCOLOR:
|
BGCOLOR:
|
||||||
.res 1
|
.res 1
|
||||||
OLD_BGCOLOR:
|
OLD_BGCOLOR:
|
||||||
.res 1
|
.res 1
|
||||||
|
Loading…
Reference in New Issue
Block a user