shortened DOS wedge implementation
This commit is contained in:
1 parent
0396127e69
commit
aa7e220575
1 file changed
+19
-32
+19
-32
@@ -37,29 +37,12 @@ wedge_dos:
|
|||||||
|
|
||||||
wedge_dos_command:
|
wedge_dos_command:
|
||||||
|
|
||||||
;; Set remaining file parameters, open the channel
|
;; Provide command name
|
||||||
lda #$00 ; empty file name
|
jsr wedge_dos_setnam
|
||||||
|
|
||||||
jsr JSETNAM
|
jsr JSETNAM
|
||||||
jsr via_IOPEN
|
jsr via_IOPEN
|
||||||
bcs wedge_dos_basic_error
|
bcs wedge_dos_basic_error
|
||||||
*
|
|
||||||
;; Set channel for output
|
|
||||||
ldx #$0F
|
|
||||||
jsr via_ICKOUT
|
|
||||||
bcs wedge_dos_basic_error
|
|
||||||
*
|
|
||||||
jsr basic_fetch_and_consume_character
|
|
||||||
cmp #$00
|
|
||||||
beq +
|
|
||||||
|
|
||||||
jsr via_IBSOUT
|
|
||||||
bcs wedge_dos_basic_error
|
|
||||||
jmp -
|
|
||||||
*
|
|
||||||
;; Finalize command
|
|
||||||
lda #$0D
|
|
||||||
jsr via_IBSOUT
|
|
||||||
bcs wedge_dos_basic_error
|
|
||||||
|
|
||||||
;; Retrieve status, print it if not OK
|
;; Retrieve status, print it if not OK
|
||||||
jsr via_ICLALL
|
jsr via_ICLALL
|
||||||
@@ -149,18 +132,8 @@ wedge_dos_directory:
|
|||||||
lda #$00
|
lda #$00
|
||||||
sta current_secondary_address
|
sta current_secondary_address
|
||||||
|
|
||||||
;; Now determine the length of the 'file' name
|
;; Provide file name
|
||||||
ldy #$FF
|
jsr wedge_dos_setnam
|
||||||
*
|
|
||||||
iny
|
|
||||||
lda (basic_current_statement_ptr), y
|
|
||||||
bne -
|
|
||||||
|
|
||||||
;; Set the name to open
|
|
||||||
tya
|
|
||||||
ldx basic_current_statement_ptr+0
|
|
||||||
ldy basic_current_statement_ptr+1
|
|
||||||
jsr JSETNAM
|
|
||||||
|
|
||||||
;; Open the file
|
;; Open the file
|
||||||
jsr via_IOPEN
|
jsr via_IOPEN
|
||||||
@@ -228,4 +201,18 @@ wedge_dos_basic_error:
|
|||||||
dex
|
dex
|
||||||
jmp do_basic_error
|
jmp do_basic_error
|
||||||
|
|
||||||
|
wedge_dos_setnam:
|
||||||
|
;; Now determine the length of the 'file' name
|
||||||
|
ldy #$FF
|
||||||
|
*
|
||||||
|
iny
|
||||||
|
lda (basic_current_statement_ptr), y
|
||||||
|
bne -
|
||||||
|
|
||||||
|
;; Set the name to open
|
||||||
|
tya
|
||||||
|
ldx basic_current_statement_ptr+0
|
||||||
|
ldy basic_current_statement_ptr+1
|
||||||
|
jmp JSETNAM
|
||||||
|
|
||||||
;; END wedge support
|
;; END wedge support
|
||||||
Reference in new issue
Block a user