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:
@@ -32,7 +32,8 @@ OBJS = _scrsize.o \
|
||||
kreadst.o \
|
||||
ksetlfs.o \
|
||||
ksetnam.o \
|
||||
randomize.o
|
||||
randomize.o \
|
||||
revers.o
|
||||
|
||||
all: $(OBJS)
|
||||
|
||||
|
||||
@@ -8,10 +8,10 @@
|
||||
.export _cputcxy, _cputc, cputdirect, putchar
|
||||
.export newline, plot
|
||||
.import popa, _gotoxy
|
||||
.import xsize, revers
|
||||
.import xsize
|
||||
|
||||
.include "pet.inc"
|
||||
.include "../cbm/cbm.inc"
|
||||
; .include "../cbm/cbm.inc"
|
||||
|
||||
_cputcxy:
|
||||
pha ; Save C
|
||||
@@ -98,7 +98,7 @@ plot: ldy CURS_Y
|
||||
; position in Y
|
||||
|
||||
putchar:
|
||||
ora revers ; Set revers bit
|
||||
ora RVS ; Set revers bit
|
||||
ldy CURS_X
|
||||
sta (SCREEN_PTR),y ; Set char
|
||||
rts
|
||||
|
||||
@@ -10,6 +10,7 @@ MEMSIZE = $34 ; Size of memory installed
|
||||
TIME = $8D ; 60HZ clock
|
||||
ST = $96 ; IEC status byte
|
||||
KEY_COUNT = $9E ; Number of keys in input buffer
|
||||
RVS = $9F ; Reverse flag
|
||||
CURS_FLAG = $A7 ; 1 = cursor off
|
||||
CURS_BLINK = $A8 ; Blink counter
|
||||
CURS_CHAR = $A9 ; Character under the cursor
|
||||
@@ -29,7 +30,7 @@ KEY_BUF = $26F ; Keyboard buffer
|
||||
;----------------------------------------------------------------------------
|
||||
; PET ROM type detection
|
||||
|
||||
PET_DETECT = $FFFB
|
||||
PET_DETECT = $FFFB
|
||||
PET_2000 = $CA
|
||||
PET_3000 = $FC
|
||||
PET_4000 = $FD
|
||||
|
||||
27
libsrc/pet/revers.s
Normal file
27
libsrc/pet/revers.s
Normal file
@@ -0,0 +1,27 @@
|
||||
;
|
||||
; Ullrich von Bassewitz, 07.08.1998
|
||||
;
|
||||
; unsigned char revers (unsigned char onoff);
|
||||
;
|
||||
|
||||
.export _revers
|
||||
|
||||
.include "pet.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
|
||||
|
||||
Reference in New Issue
Block a user