more work on DOS wedge
Retrieving the status (@) should teoretically work, but several KERNAL routines are still missing or incomplete
This commit is contained in:
1 parent
805fc970ff
commit
86a7af378d
1 file changed
+41
-7
+41
-7
@@ -8,13 +8,13 @@ wedge_dos:
|
|||||||
|
|
||||||
;; Take last device number, make sure it's a drive
|
;; Take last device number, make sure it's a drive
|
||||||
;; If not, set to 8 (first drive number)
|
;; If not, set to 8 (first drive number)
|
||||||
ldx current_device_number
|
ldx DFLTN
|
||||||
cpx #$07
|
cpx #$07
|
||||||
bpl +
|
bpl +
|
||||||
bcs +
|
bcs +
|
||||||
ldx #$08
|
ldx #$08
|
||||||
*
|
*
|
||||||
;; Set remaining file parameters
|
;; Set remaining file parameters; channel 15 is a typical one for commands
|
||||||
lda #$0F
|
lda #$0F
|
||||||
ldy #$0F
|
ldy #$0F
|
||||||
jsr $FFBA ; SETLFS
|
jsr $FFBA ; SETLFS
|
||||||
@@ -67,15 +67,35 @@ wedge_dos_change_drive:
|
|||||||
bcs +
|
bcs +
|
||||||
jmp do_ILLEGAL_DEVICE_NUMBER_error
|
jmp do_ILLEGAL_DEVICE_NUMBER_error
|
||||||
*
|
*
|
||||||
sta current_device_number
|
sta DFLTN
|
||||||
jmp basic_end_of_line
|
jmp basic_end_of_line
|
||||||
|
|
||||||
wedge_dos_status:
|
wedge_dos_status:
|
||||||
|
|
||||||
;; XXX - implement this
|
;; Here the flow is mostly the same as in the example from
|
||||||
jsr printf
|
;; https://codebase64.org/doku.php?id=base:reading_the_error_channel_of_a_disk_drive
|
||||||
.byte "DBG: STATUS", 0
|
|
||||||
jmp do_NOT_IMPLEMENTED_error
|
;; Set remaining file parameters, open the channel
|
||||||
|
lda #$00 ; empty file name
|
||||||
|
jsr $FFBD ; SETNAM
|
||||||
|
jsr wedge_dos_OPEN
|
||||||
|
bcc +
|
||||||
|
jmp do_DEVICE_NOT_PRESENT_error
|
||||||
|
*
|
||||||
|
;; Set channel for input
|
||||||
|
ldx #$0F
|
||||||
|
jsr wedge_dos_CHKIN
|
||||||
|
*
|
||||||
|
jsr $FFB7 ; READST - to retrieve errors
|
||||||
|
*
|
||||||
|
;; Print out everything retrieved from the drive
|
||||||
|
bne +
|
||||||
|
jsr $FFCF ; CHRIN
|
||||||
|
jsr $FFD2 ; CHROUT
|
||||||
|
jmp -
|
||||||
|
*
|
||||||
|
;; Clean-up and exit
|
||||||
|
jmp wedge_dos_clean_exit
|
||||||
|
|
||||||
wedge_dos_directory:
|
wedge_dos_directory:
|
||||||
|
|
||||||
@@ -86,5 +106,19 @@ wedge_dos_directory:
|
|||||||
|
|
||||||
wedge_dos_CLALL:
|
wedge_dos_CLALL:
|
||||||
jmp (ICLALL)
|
jmp (ICLALL)
|
||||||
|
|
||||||
|
wedge_dos_CHKIN:
|
||||||
|
jmp (ICHKIN)
|
||||||
|
|
||||||
|
wedge_dos_CLRCHR:
|
||||||
|
jmp (ICLRCH)
|
||||||
|
|
||||||
|
wedge_dos_OPEN:
|
||||||
|
jmp (IOPEN)
|
||||||
|
|
||||||
|
wedge_dos_clean_exit:
|
||||||
|
jsr wedge_dos_CLALL
|
||||||
|
jsr wedge_dos_CLRCHR
|
||||||
|
jmp basic_end_of_line
|
||||||
|
|
||||||
;; END wedge support
|
;; END wedge support
|
||||||
Reference in new issue
Block a user