mirror of
https://github.com/forth-ev/VolksForth.git
synced 2024-11-26 17:49:18 +00:00
Switch X16 ConOut to $ffd2, and introduce more labels to prepare switch to X16 R39.
This commit is contained in:
parent
9b54bb8144
commit
1047117fe6
@ -5,7 +5,7 @@ include vf-lbls-cbm.fth
|
|||||||
|
|
||||||
\ X16 labels
|
\ X16 labels
|
||||||
|
|
||||||
0c28c >label ConOut
|
0ffd2 >label ConOut
|
||||||
0286 >label IOStatus
|
0286 >label IOStatus
|
||||||
028c >label MsgFlg
|
028c >label MsgFlg
|
||||||
028b >label OutDev
|
028b >label OutDev
|
||||||
@ -18,6 +18,19 @@ include vf-lbls-cbm.fth
|
|||||||
0381 >label CurFlg \ aka qtsw
|
0381 >label CurFlg \ aka qtsw
|
||||||
0385 >label InsCnt \ aka insrt
|
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:
|
\ C64 labels that X16 doesn't have:
|
||||||
|
|
||||||
@ -30,22 +43,22 @@ include vf-lbls-cbm.fth
|
|||||||
\ X16 c64key? getkey
|
\ X16 c64key? getkey
|
||||||
|
|
||||||
Code c64key? ( -- flag)
|
Code c64key? ( -- flag)
|
||||||
9f61 ldx
|
RamBank ldx
|
||||||
0 # lda 9f61 sta
|
0 # lda RamBank sta
|
||||||
0a00a lda
|
Ndx lda
|
||||||
0<> ?[ 0FF # lda ]? pha
|
0<> ?[ 0FF # lda ]? pha
|
||||||
9f61 stx
|
RamBank stx
|
||||||
Push jmp end-code
|
Push jmp end-code
|
||||||
|
|
||||||
Code getkey ( -- 8b)
|
Code getkey ( -- 8b)
|
||||||
9f61 lda N sta
|
RamBank lda N sta
|
||||||
0 # lda 9f61 sta
|
0 # lda RamBank sta
|
||||||
0a00a lda 0<>
|
Ndx lda 0<>
|
||||||
?[ sei 0a000 ldy
|
?[ sei KeyD ldy
|
||||||
[[ 0a000 1+ ,X lda 0a000 ,X sta inx
|
[[ KeyD 1+ ,X lda KeyD ,X sta inx
|
||||||
0a00a cpx 0= ?]
|
Ndx cpx 0= ?]
|
||||||
0a00a dec
|
Ndx dec
|
||||||
N lda 9f61 sta
|
N lda RamBank sta
|
||||||
tya cli 0A0 # cmp
|
tya cli 0A0 # cmp
|
||||||
0= ?[ bl # lda ]?
|
0= ?[ bl # lda ]?
|
||||||
]?
|
]?
|
||||||
@ -57,16 +70,6 @@ Code getkey ( -- 8b)
|
|||||||
|
|
||||||
\ X16 curon curoff
|
\ 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 ( --)
|
Code curon ( --)
|
||||||
blnsw stx Next jmp end-code
|
blnsw stx Next jmp end-code
|
||||||
|
|
||||||
@ -109,7 +112,7 @@ Label restore pha txa pha tya pha cld
|
|||||||
|
|
||||||
Label first-init
|
Label first-init
|
||||||
sei cld
|
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
|
IOINIT jsr CINT jsr RESTOR jsr \ init. and set I/O-Vectors
|
||||||
ink-pot lda BrdCol sta \ border
|
ink-pot lda BrdCol sta \ border
|
||||||
ink-pot 1+ lda BkgCol sta \ backgrnd
|
ink-pot 1+ lda BkgCol sta \ backgrnd
|
||||||
|
@ -17,8 +17,8 @@ Output: alsologtofile
|
|||||||
c64at c64at? ;
|
c64at c64at? ;
|
||||||
|
|
||||||
: logopen"
|
: logopen"
|
||||||
ascii " parse log-dev-2nd@ busopen
|
ascii " parse 2dup type
|
||||||
2dup type
|
log-dev-2nd@ busopen
|
||||||
bustype " ,s,w" count bustype busoff
|
bustype " ,s,w" count bustype busoff
|
||||||
i/o-status? IF c64cr log-dev @ dos-error abort THEN
|
i/o-status? IF c64cr log-dev @ dos-error abort THEN
|
||||||
alsologtofile ;
|
alsologtofile ;
|
||||||
|
Loading…
Reference in New Issue
Block a user