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
; ---------------------------------------------------------------------------
-; 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
; 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
;
; I/O $dc00: CIA 6526
-
+;
; cia = $dc00
; I/O $dd00: ACIA 6551
-
+;
; acia = $dd00
.struct ACIA
; I/O $de00: Triport #1 6525
-
+;
; tpi1 = $de00
.struct TPI
.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"
.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
ktmp: .byte 0
CURS_X: .byte 0
CURS_Y: .byte 0
+RVS: .byte 0
CharPtr: .word 0
+
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
.import sys_bank, restore_bank
.import sysp0: zp, ktmp: zp
-
- .include "cbm610.inc"
-
+
+ .include "cbm610.inc"
.proc SETNAM
sty ktmp
txa
- ldy #FNAM_ADR
+ ldy #$90 ; FNAM
sta (sysp0),y
lda ktmp
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
.export _revers
+ .import RVS: zp
+
.include "cbm610.inc"
+
.proc _revers