Switch X16 ConOut to $ffd2, and introduce more labels to prepare switch to X16 R39.

This commit is contained in:
Philip Zembrod 2021-04-02 00:07:59 +02:00
parent 9b54bb8144
commit 1047117fe6
2 changed files with 29 additions and 26 deletions

View File

@ -5,7 +5,7 @@ include vf-lbls-cbm.fth
\ X16 labels
0c28c >label ConOut
0ffd2 >label ConOut
0286 >label IOStatus
028c >label MsgFlg
028b >label OutDev
@ -18,6 +18,19 @@ include vf-lbls-cbm.fth
0381 >label CurFlg \ aka qtsw
0385 >label InsCnt \ aka insrt
09f60 >label RomBank
09f61 >label RamBank
0a000 >label KeyD \ keyboard buffer
0a00a >label Ndx \ #keys in keyboard buffer
037B >label blnsw \ C64: $cc
\ 037C >label blnct \ C64: $cd
\ 037D >label gdbln \ C64: $ce
\ 037E >label blnon \ C64: $cf
\ 0262 >label pnt \ C64: $d1
\ 0380 >label pntr \ C64: $d3
\ 0373 >label gdcol
\ C64 labels that X16 doesn't have:
@ -30,22 +43,22 @@ include vf-lbls-cbm.fth
\ X16 c64key? getkey
Code c64key? ( -- flag)
9f61 ldx
0 # lda 9f61 sta
0a00a lda
RamBank ldx
0 # lda RamBank sta
Ndx lda
0<> ?[ 0FF # lda ]? pha
9f61 stx
RamBank stx
Push jmp end-code
Code getkey ( -- 8b)
9f61 lda N sta
0 # lda 9f61 sta
0a00a lda 0<>
?[ sei 0a000 ldy
[[ 0a000 1+ ,X lda 0a000 ,X sta inx
0a00a cpx 0= ?]
0a00a dec
N lda 9f61 sta
RamBank lda N sta
0 # lda RamBank sta
Ndx lda 0<>
?[ sei KeyD ldy
[[ KeyD 1+ ,X lda KeyD ,X sta inx
Ndx cpx 0= ?]
Ndx dec
N lda RamBank sta
tya cli 0A0 # cmp
0= ?[ bl # lda ]?
]?
@ -57,16 +70,6 @@ Code getkey ( -- 8b)
\ X16 curon curoff
037B >label blnsw \ C64: $cc
\ 037C >label blnct \ C64: $cd
\ 037D >label gdbln \ C64: $ce
\ 037E >label blnon \ C64: $cf
\ 0262 >label pnt \ C64: $d1
\ 0380 >label pntr \ C64: $d3
\ 0373 >label gdcol
09f60 >label via1pb
Code curon ( --)
blnsw stx Next jmp end-code
@ -109,7 +112,7 @@ Label restore pha txa pha tya pha cld
Label first-init
sei cld
via1pb lda $f8 # and via1pb sta \ map in KERNAL ROM
RomBank lda $f8 # and RomBank sta \ map in KERNAL ROM
IOINIT jsr CINT jsr RESTOR jsr \ init. and set I/O-Vectors
ink-pot lda BrdCol sta \ border
ink-pot 1+ lda BkgCol sta \ backgrnd

View File

@ -17,8 +17,8 @@ Output: alsologtofile
c64at c64at? ;
: logopen"
ascii " parse log-dev-2nd@ busopen
2dup type
ascii " parse 2dup type
log-dev-2nd@ busopen
bustype " ,s,w" count bustype busoff
i/o-status? IF c64cr log-dev @ dos-error abort THEN
alsologtofile ;