From beefa98acc6e964705aab553b1870223f6343b8a Mon Sep 17 00:00:00 2001 From: FeralChild64 Date: Fri, 12 Feb 2021 18:53:38 +0100 Subject: [PATCH] some work towards SECOND in the internal DOS --- src/dos_m65/dos_second_tksa.s | 42 +++++++++++++++++++++++++++++------ src/kernal/iec/open_iec.s | 9 +++----- 2 files changed, 38 insertions(+), 13 deletions(-) diff --git a/src/dos_m65/dos_second_tksa.s b/src/dos_m65/dos_second_tksa.s index 6ad101cb..071869a0 100644 --- a/src/dos_m65/dos_second_tksa.s +++ b/src/dos_m65/dos_second_tksa.s @@ -7,19 +7,25 @@ dos_SECOND: + phx + cmp #$60 + bcs dos_SECOND_OPEN + ; XXX provide implementation + plx sec rts +dos_SECOND_OPEN: -dos_TKSA: + and #$1F - phx - pha - and #$60 - bne dos_TKSA_OPEN - pla + ldx IDX1_LISTENER ; store channel + sta XX_CHANNEL, X + + cmp #$0F + beq dos_SECOND_OPEN_cmd ; XXX provide implementation @@ -28,9 +34,31 @@ dos_TKSA: rts +dos_SECOND_OPEN_cmd: + + ; XXX provide implementation + + plx + clc + rts + + + + +dos_TKSA: + + phx + cmp #$60 + bcs dos_TKSA_OPEN + + ; XXX provide implementation + + plx + sec + rts + dos_TKSA_OPEN: - pla and #$1F ldx IDX1_TALKER ; store channel diff --git a/src/kernal/iec/open_iec.s b/src/kernal/iec/open_iec.s index f0f94bc2..d4b5fb54 100644 --- a/src/kernal/iec/open_iec.s +++ b/src/kernal/iec/open_iec.s @@ -18,14 +18,11 @@ open_iec: ; We have a command to send to IEC device jsr LISTEN - bcc @1 - jmp kernalerror_DEVICE_NOT_FOUND -@1: + +bcs kernalerror_DEVICE_NOT_FOUND + lda SA jsr iec_cmd_open - bcc @2 - jmp kernalerror_DEVICE_NOT_FOUND -@2: + +bcs kernalerror_DEVICE_NOT_FOUND !ifdef CONFIG_MEMORY_MODEL_60K { ; We need our helpers to get to filenames under ROMs or IO area