1
0
mirror of https://github.com/cc65/cc65.git synced 2024-06-08 15:29:37 +00:00

cc65 ebadger improvements

This commit is contained in:
Eric Badger 2023-07-22 13:33:18 -07:00
parent 2939b5ce69
commit ffe2eebdd4
6 changed files with 56 additions and 10 deletions

View File

@ -22,8 +22,8 @@ LASTCHAR := $D2 ; last character Read
;-----------------------------------------------------------------------------
; ROM functions
READCHARUPPER := $F643
READCHARASYNC := $F651
READCHARUPPER := $C11B
READCHARASYNC := $C11E
;-----------------------------------------------------------------------------
; Hardware

View File

@ -3,12 +3,12 @@ FEATURES {
}
SYMBOLS {
__STACKSIZE__: type = weak, value = $0800; # 2k stack
__STACKSTART__: type = weak, value = $B000;
__STACKSTART__: type = weak, value = $1200;
__ZPSTART__: type = weak, value = $0080;
}
MEMORY {
ZP: file = "", define = yes, start = __ZPSTART__, size = $001F;
MAIN: file = %O, start = %S, size = __STACKSTART__ - __STACKSIZE__ - %S;
MAIN: file = %O, start = %S, size = $C000 - %S;
}
SEGMENTS {
ZEROPAGE: load = ZP, type = zp;

10
libsrc/ebadger/clrscr.s Normal file
View File

@ -0,0 +1,10 @@
;
; Kevin Ruland
;
; void clrscr (void);
;
.export _clrscr
.import HOME
_clrscr := $C106

View File

@ -12,7 +12,7 @@
.segment "ONCE"
.include "ebadger.inc"
.code
; Plot a character - also used as internal function
@ -27,10 +27,6 @@ _cputc:
beq left
cmp #$0A ; Test for \n = line feed
beq newline
eor #$80 ; Invert high bit
cmp #$E0 ; Test for lowercase
bcc cputdirect
and #$DF ; Convert to uppercase
cputdirect:
jsr putchar
@ -53,7 +49,7 @@ newline:
: jmp VTABZ
putchar:
mask: and INVFLG ; Apply normal, inverse, flash
mask: ;and INVFLG ; Apply normal, inverse, flash
putchardirect:
pha

13
libsrc/ebadger/revers.s Normal file
View File

@ -0,0 +1,13 @@
;
; Ullrich von Bassewitz, 2005-03-28
;
; unsigned char __fastcall__ revers (unsigned char onoff)
;
.export _revers
.include "ebadger.inc"
_revers:
lda #$00
rts

View File

@ -7,6 +7,33 @@
.export VTABZ
.segment "LOWCODE"
.include "ebadger.inc"
VTABZ:
; Accumulator holds the row
; Calculate the line address for text mode
phx
tax
; start at first row
LDA #$00
STA BASL
LDA #$04
STA BASH
cpx #$00
beq :+
@loop:
clc
lda BASL
adc #$28
sta BASL
lda BASH
adc #$0
sta BASH
dex
bpl @loop
:
plx
rts