From 5f65252fa6197c5ec635a9f5b4bec2cad60c70fb Mon Sep 17 00:00:00 2001 From: Greg King Date: Sun, 15 Nov 2020 11:44:12 -0500 Subject: [PATCH] Added the cputdirect entry point to the cputc() functions in the two Oric libraries. It now is available in all libraries that have cputc(). --- libsrc/atmos/cputc.s | 6 +++--- libsrc/telestrat/cputc.s | 10 ++++++---- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/libsrc/atmos/cputc.s b/libsrc/atmos/cputc.s index f1ce5f2b7..db3fa373d 100644 --- a/libsrc/atmos/cputc.s +++ b/libsrc/atmos/cputc.s @@ -7,7 +7,7 @@ ; .export _cputcxy, _cputc - .export setscrptr, putchar + .export setscrptr, cputdirect, putchar .constructor initcputc .import rvs .import popax @@ -32,13 +32,13 @@ _cputc: cmp #$0D ; CR? rts L1: cmp #$0A ; LF? - bne output + bne cputdirect inc CURS_Y ; Newline rts ; Output the character, then advance the cursor position -output: +cputdirect: jsr putchar advance: diff --git a/libsrc/telestrat/cputc.s b/libsrc/telestrat/cputc.s index 38f8af84b..4b2fc4024 100644 --- a/libsrc/telestrat/cputc.s +++ b/libsrc/telestrat/cputc.s @@ -4,15 +4,17 @@ ; 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" +cputdirect: .proc _cputc ldx CHARCOLOR cpx OLD_CHARCOLOR beq do_not_change_color_foreground - + stx OLD_CHARCOLOR ; Store CHARCOLOR into OLD_CHARCOLOR dec SCRX @@ -47,8 +49,8 @@ do_not_change_color: CHARCOLOR: .res 1 OLD_CHARCOLOR: - .res 1 + .res 1 BGCOLOR: - .res 1 + .res 1 OLD_BGCOLOR: .res 1