From 2c86e4809f5e9169a8630d614c06c1d44ba9ba71 Mon Sep 17 00:00:00 2001 From: Philip Zembrod Date: Sun, 31 Jul 2022 23:54:37 +0200 Subject: [PATCH] Remove references to the Kernal variables InDev and OutDev which are needed to implement BUSOFF via CLRCHN and which moved on X16 between r38 and r41 and will likely change again, and replace with own variables and calls to UNLSN and UNTLK. --- 6502/C64/src/vf-sys-c16.fth | 2 -- 6502/C64/src/vf-sys-c64.fth | 2 -- 6502/C64/src/vf-sys-cbm.fth | 14 +++++++++----- 6502/C64/src/vf-sys-x16.fth | 2 -- 4 files changed, 9 insertions(+), 11 deletions(-) diff --git a/6502/C64/src/vf-sys-c16.fth b/6502/C64/src/vf-sys-c16.fth index 3dd8d44..4c74e42 100644 --- a/6502/C64/src/vf-sys-c16.fth +++ b/6502/C64/src/vf-sys-c16.fth @@ -9,8 +9,6 @@ include vf-lbls-cbm.fth 0ff4c >label ConOut 090 >label IOStatus 09a >label MsgFlg - 099 >label OutDev - 098 >label InDev 0ff19 >label BrdCol 0ff15 >label BkgCol 053b >label PenCol diff --git a/6502/C64/src/vf-sys-c64.fth b/6502/C64/src/vf-sys-c64.fth index 9eb05de..10e0082 100644 --- a/6502/C64/src/vf-sys-c64.fth +++ b/6502/C64/src/vf-sys-c64.fth @@ -9,8 +9,6 @@ include vf-lbls-cbm.fth 0E716 >label ConOut 090 >label IOStatus 09d >label MsgFlg - 09a >label OutDev - 099 >label InDev 0d020 >label BrdCol 0d021 >label BkgCol 0286 >label PenCol diff --git a/6502/C64/src/vf-sys-cbm.fth b/6502/C64/src/vf-sys-cbm.fth index 260a63e..44a9d28 100644 --- a/6502/C64/src/vf-sys-cbm.fth +++ b/6502/C64/src/vf-sys-cbm.fth @@ -100,7 +100,7 @@ Output: display [ here output ! ] 87 fthpage Code i/o-status? ( -- n ) - IOStatus lda Push0A jmp end-code + READST jsr Push0A jmp end-code \ b/blk drive >drive drvinit clv14:2x87 @@ -131,7 +131,12 @@ Variable (drv 0 (drv ! Variable i/o 0 i/o ! \ Semaphore -Code busoff ( --) CLRCHN jsr +Label LsnDev 0 c, +Label TlkDev 0 c, + +Code busoff ( --) + LsnDev lda 0<> ?[ LsnDev stx UNLSN jsr ]? + TlkDev lda 0<> ?[ TlkDev stx UNTLK jsr ]? Label unlocki/o 1 # ldy 0 # ldx ;c: i/o unlock ; @@ -164,7 +169,7 @@ Label (?dev N 2+ lda (?dev jsr N 2+ lda LISTEN jsr N lda 60 # ora SECOND jsr - N 2+ ldx OutDev stx + N 2+ ldx LsnDev stx xyNext jmp end-code @@ -188,8 +193,7 @@ Label (?dev N 2+ lda TALK jsr N lda 60 # ora (C16 $ad sta ( ) TKSA jsr -\ because of error in old C16 OS - N 2+ ldx InDev stx + N 2+ ldx TlkDev stx xyNext jmp end-code : busin ( dev 2nd -- ) diff --git a/6502/C64/src/vf-sys-x16.fth b/6502/C64/src/vf-sys-x16.fth index 18cbc7e..b472e7d 100644 --- a/6502/C64/src/vf-sys-x16.fth +++ b/6502/C64/src/vf-sys-x16.fth @@ -9,8 +9,6 @@ include vf-lbls-cbm.fth 0febd >label KbdbufPeek 0289 >label IOStatus 028c >label MsgFlg - 028e >label OutDev - 028d >label InDev 09f2c >label BrdCol 0266 >label BkgCol 0284 >label PenCol