From 16f737af6543cfcca693237ca870f9299e68d505 Mon Sep 17 00:00:00 2001 From: cuz Date: Sat, 20 Dec 2003 23:38:42 +0000 Subject: [PATCH] Minor changes and cleanup git-svn-id: svn://svn.cc65.org/cc65/trunk@2796 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- libsrc/Makefile | 2 +- libsrc/cbm610/cbm610.inc | 74 ++++++---------------------------------- libsrc/cbm610/cputc.s | 3 +- libsrc/cbm610/extzp.inc | 3 +- libsrc/cbm610/extzp.s | 2 ++ libsrc/cbm610/kreadst.s | 4 +-- libsrc/cbm610/ksetnam.s | 11 +++--- libsrc/cbm610/revers.s | 3 ++ 8 files changed, 27 insertions(+), 75 deletions(-) diff --git a/libsrc/Makefile b/libsrc/Makefile index 538ab4de6..0e84f96e7 100644 --- a/libsrc/Makefile +++ b/libsrc/Makefile @@ -172,7 +172,7 @@ cbm610lib: done mv cbm610/crt0.o cbm610.o cp cbm610/*.emd . - cp cbm610/*.ser . + cp cbm610/cbm610-stdser.ser cbm610-std.ser #----------------------------------------------------------------------------- # GEOS on the C64/128 diff --git a/libsrc/cbm610/cbm610.inc b/libsrc/cbm610/cbm610.inc index f05a5f3e5..ea85cd50d 100644 --- a/libsrc/cbm610/cbm610.inc +++ b/libsrc/cbm610/cbm610.inc @@ -7,37 +7,10 @@ ; --------------------------------------------------------------------------- -; Zeropage stuff - -ExecReg = $0000 -IndReg = $0001 - -FNAM_ADR := $90 ; File name address -FNAM_SEG := $92 ; Unused -ST := $9C ; Status -FNAM_LEN := $9D -LFN := $9E -DEVNUM := $9F -SECADR := $A0 -;CharPtr = $C8 -;CURS_Y = $CA -;CURS_X = $CB -GrafMode = $CC -LastIndex = $CD -KeyIndex = $D1 -Config = $D4 -RepeatCount = $D7 -RepeatDelay = $D8 -ModKey = $E0 -NorKey = $E1 - - -; --------------------------------------------------------------------------- -; Page 3 variables - -RVS = $0397 -KeyBuf = $03AB ; Keyboard buffer +; Zeropage registers +ExecReg = $00 +IndReg = $01 ; --------------------------------------------------------------------------- ; Screen size @@ -51,37 +24,10 @@ YSIZE = 25 ; I/O $d800: CRTC 6545 -CRTC = $D800 -CRTC_ADDR = $00 -CRTC_DATA = $01 - - -; I/O $da00: SID 6581 - -; sid = $da00 - -Osc1 = $00 -Osc2 = $07 -Osc3 = $0e - -FreqLo = $00 -FreqHi = $01 -PulseF = $02 -PulseC = $03 -OscCtl = $04 -AtkDcy = $05 -SusRel = $06 - -FiCtlLo = $15 -FiCtlHi = $16 -Resonance = $17 -Volume = $18 -PotX = $19 -PotY = $1A -Random = $1B -Env3 = $1C - - +.struct CRTC + ADDR .byte + DATA .byte +.endstruct ; I/O $db00: CIA 6526 Inter Process Communication ; @@ -118,13 +64,13 @@ Env3 = $1C ; I/O $dc00: CIA 6526 - +; ; cia = $dc00 ; I/O $dd00: ACIA 6551 - +; ; acia = $dd00 .struct ACIA @@ -136,7 +82,7 @@ Env3 = $1C ; I/O $de00: Triport #1 6525 - +; ; tpi1 = $de00 .struct TPI diff --git a/libsrc/cbm610/cputc.s b/libsrc/cbm610/cputc.s index cc73d739b..c464c8d2b 100644 --- a/libsrc/cbm610/cputc.s +++ b/libsrc/cbm610/cputc.s @@ -11,7 +11,8 @@ .import _gotoxy .import popa - .import ktmp: zp, crtc: zp, CURS_X: zp, CURS_Y: zp, CharPtr: zp + .import ktmp: zp, crtc: zp, CURS_X: zp, CURS_Y: zp, RVS: zp + .import CharPtr: zp .include "cbm610.inc" diff --git a/libsrc/cbm610/extzp.inc b/libsrc/cbm610/extzp.inc index 783f6dca0..43e8697bf 100644 --- a/libsrc/cbm610/extzp.inc +++ b/libsrc/cbm610/extzp.inc @@ -9,5 +9,6 @@ .globalzp sysp1, sysp3, crtc, sid, ipccia, cia, acia, tpi1, tpi2 .globalzp ktab1, ktab2, ktab3, ktab4 - .globalzp sysp0, time, segsave, ktmp, CURS_X, CURS_Y, CharPtr + .globalzp sysp0, time, segsave, ktmp, CURS_X, CURS_Y, RVS + .globalzp CharPtr diff --git a/libsrc/cbm610/extzp.s b/libsrc/cbm610/extzp.s index f98f1165b..7417d6447 100644 --- a/libsrc/cbm610/extzp.s +++ b/libsrc/cbm610/extzp.s @@ -37,8 +37,10 @@ scanbuf: .byte 0 ktmp: .byte 0 CURS_X: .byte 0 CURS_Y: .byte 0 +RVS: .byte 0 CharPtr: .word 0 + diff --git a/libsrc/cbm610/kreadst.s b/libsrc/cbm610/kreadst.s index d2bdec781..d9bbf7c2d 100644 --- a/libsrc/cbm610/kreadst.s +++ b/libsrc/cbm610/kreadst.s @@ -16,8 +16,8 @@ jsr sys_bank sty ktmp ; Save Y register - ldy #ST - lda (sysp0),y ; Load ST from system bank + ldy #$9C ; STATUS + lda (sysp0),y ; Load STATUS from system bank ldy ktmp jmp restore_bank ; Will set condition codes on A diff --git a/libsrc/cbm610/ksetnam.s b/libsrc/cbm610/ksetnam.s index c377b3bb6..aeb72bd0b 100644 --- a/libsrc/cbm610/ksetnam.s +++ b/libsrc/cbm610/ksetnam.s @@ -12,9 +12,8 @@ .import sys_bank, restore_bank .import sysp0: zp, ktmp: zp - - .include "cbm610.inc" - + + .include "cbm610.inc" .proc SETNAM @@ -23,7 +22,7 @@ sty ktmp txa - ldy #FNAM_ADR + ldy #$90 ; FNAM sta (sysp0),y lda ktmp @@ -31,10 +30,10 @@ sta (sysp0),y lda ExecReg ; Assume name is always in this segment - ldy #FNAM_SEG + ldy #$92 ; FNAM_SEG sta (sysp0),y - ldy #FNAM_LEN + ldy #$9D ; FNAM_LEN pla sta (sysp0),y ldy ktmp diff --git a/libsrc/cbm610/revers.s b/libsrc/cbm610/revers.s index d5958a64d..10dba117e 100644 --- a/libsrc/cbm610/revers.s +++ b/libsrc/cbm610/revers.s @@ -6,7 +6,10 @@ .export _revers + .import RVS: zp + .include "cbm610.inc" + .proc _revers -- 2.39.5