1
0
mirror of https://github.com/cc65/cc65.git synced 2026-04-26 13:18:31 +00:00

For the CBM platforms, make revers() machine dependent and use the RVS flag

of the different machines instead of a separate one.
For the C128, make the textcolor() function work in 40 and 80 column mode.


git-svn-id: svn://svn.cc65.org/cc65/trunk@1787 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cuz
2002-12-19 20:29:27 +00:00
parent 0b496a9daa
commit 36fe6284a8
33 changed files with 243 additions and 38 deletions
+1
View File
@@ -46,6 +46,7 @@ OBJS = _scrsize.o \
kuntlk.o \
randomize.o \
readjoy.o \
revers.o \
tgi_mode_table.o
all: $(OBJS)
+3 -3
View File
@@ -8,7 +8,7 @@
.export _cputcxy, _cputc, cputdirect, putchar
.export newline, plot
.import popa, _gotoxy
.import xsize, revers
.import xsize
.import PLOT
.include "plus4.inc"
@@ -89,7 +89,7 @@ L11: ora #$40
plot: ldy CURS_X
ldx CURS_Y
clc
clc
jmp PLOT ; Set the new cursor
@@ -98,7 +98,7 @@ plot: ldy CURS_X
; position in Y
putchar:
ora revers ; Set revers bit
ora RVS ; Set revers bit
ldy CURS_X
sta (SCREEN_PTR),y ; Set char
lda CHARCOLOR
+1
View File
@@ -15,6 +15,7 @@ SECADR = $AD ; Secondary address
DEVNUM = $AE ; Device number
FNAM_ADR = $AF ; Pointer to filename for OPEN
KEY_COUNT = $EF ; Number of keys in input buffer
RVS = $C2 ; Reverse flag
CURS_X = $CA ; Cursor column
CURS_Y = $CD ; Cursor row
SCREEN_PTR = $C8 ; Pointer to current char in text screen
+27
View File
@@ -0,0 +1,27 @@
;
; Ullrich von Bassewitz, 07.08.1998
;
; unsigned char revers (unsigned char onoff);
;
.export _revers
.include "plus4.inc"
.proc _revers
ldx #$00 ; Assume revers off
tay ; Test onoff
beq L1 ; Jump if off
ldx #$80 ; Load on value
ldy #$00 ; Assume old value is zero
L1: lda RVS ; Load old value
stx RVS ; Set new value
beq L2 ; Jump if old value zero
iny ; Make old value = 1
L2: ldx #$00 ; Load high byte of result
tya ; Load low byte, set CC
rts
.endproc