small CBDOS cleanup

This commit is contained in:
FeralChild64 committed 2021-02-25 20:00:14 +01:00
1 parent 00dd3bc5db
commit 1de5af7cb4
17 files changed
+35 -34

No files matched your search

+1 -1
View File
@@ -14,4 +14,4 @@ dev_fd_cmd_OPEN_EOI:
; XXX provide implementation ; XXX provide implementation
jmp dos_EXIT jmp dos_EXIT_CLC
+1 -1
View File
@@ -14,4 +14,4 @@ dev_rd_cmd_OPEN_EOI:
; XXX provide implementation ; XXX provide implementation
jmp dos_EXIT jmp dos_EXIT_CLC
+1 -1
View File
@@ -8,4 +8,4 @@ dev_sd_cmd_CLOSE:
; XXX provide implementation ; XXX provide implementation
jmp dos_EXIT jmp dos_EXIT_CLC
+1 -1
View File
@@ -9,7 +9,7 @@ dev_sd_cmd_OPEN:
lda #$01 ; mode: receive command or file name lda #$01 ; mode: receive command or file name
sta SD_MODE sta SD_MODE
jmp dos_EXIT jmp dos_EXIT_CLC
dev_sd_cmd_OPEN_EOI: dev_sd_cmd_OPEN_EOI:
+1 -1
View File
@@ -42,7 +42,7 @@ fs_hvsr_read_dir_open:
; End ; End
jmp dos_EXIT jmp dos_EXIT_CLC
fs_hvsr_read_dir: fs_hvsr_read_dir:
+3 -2
View File
@@ -53,7 +53,7 @@ fs_hvsr_read_file_open:
jmp dos_EXIT jmp dos_EXIT_CLC
fs_hvsr_file_not_found: fs_hvsr_file_not_found:
@@ -68,4 +68,5 @@ fs_hvsr_file_not_found:
lda #39 ; file not found error lda #39 ; file not found error
jsr util_status_SD jsr util_status_SD
jmp dos_EXIT_SEC lda #K_ERR_FILE_NOT_FOUND
jmp dos_EXIT_SEC_A
+8 -8
View File
@@ -20,32 +20,32 @@ dos_ENTER: ; enter DOS context
dos_EXIT_SEC: ; exit DOS context with Carry set dos_EXIT_SEC: ; exit DOS context with Carry set
sec sec
bra dos_EXIT_common bra dos_EXIT
dos_EXIT: ; exit DOS context with Carry clear dos_EXIT_CLC: ; exit DOS context with Carry clear
clc clc
; FALLTROUGH ; FALLTROUGH
dos_EXIT_common: dos_EXIT:
lda REG_A lda REG_A
bra dos_EXIT_A_common bra dos_EXIT_A
dos_EXIT_A_SEC: ; exit DOS context with Carry set, return .A dos_EXIT_SEC_A: ; exit DOS context with Carry set, return .A
sec sec
bra dos_EXIT_A_common bra dos_EXIT_A
dos_EXIT_A: ; exit DOS context with Carry clear, return .A dos_EXIT_CLC_A: ; exit DOS context with Carry clear, return .A
clc clc
; FALLTROUGH ; FALLTROUGH
dos_EXIT_A_common: dos_EXIT_A:
ldz REG_Z ldz REG_Z
ldy REG_Y ldy REG_Y
+1 -1
View File
@@ -47,4 +47,4 @@ dos_UNITCHK_ramdisk:
lda #$02 lda #$02
jmp dos_EXIT_A jmp dos_EXIT_CLC_A
+2 -2
View File
@@ -30,7 +30,7 @@ dos_UNITNUM_fail:
lda #$00 lda #$00
jmp dos_EXIT_A_SEC jmp dos_EXIT_SEC_A
dos_UNITNUM_sdcard: dos_UNITNUM_sdcard:
@@ -53,4 +53,4 @@ dos_UNITNUM_common:
cmp #$00 cmp #$00
beq dos_UNITNUM_fail beq dos_UNITNUM_fail
jmp dos_EXIT_A jmp dos_EXIT_CLC_A
+1 -1
View File
@@ -46,4 +46,4 @@ dos_UNITSET_ramdisk:
stx UNIT_RAMDISK stx UNIT_RAMDISK
jmp dos_EXIT jmp dos_EXIT_CLC
+3 -3
View File
@@ -60,7 +60,7 @@ msg_ACPTR_read_SD:
bcc @3 bcc @3
jsr kernalstatus_EOI jsr kernalstatus_EOI
@3: @3:
jmp dos_EXIT jmp dos_EXIT_CLC
msg_ACPTR_read_FD: msg_ACPTR_read_FD:
@@ -113,7 +113,7 @@ msg_ACPTR_status_got:
sta TBTCNT ; byte return sta TBTCNT ; byte return
beq msg_ACPTR_reset_status beq msg_ACPTR_reset_status
jmp dos_EXIT_A jmp dos_EXIT_CLC_A
msg_ACPTR_fail_no_talker: msg_ACPTR_fail_no_talker:
@@ -134,7 +134,7 @@ msg_ACPTR_reset_status:
msg_ACPTR_EOI: msg_ACPTR_EOI:
jsr kernalstatus_EOI jsr kernalstatus_EOI
jmp dos_EXIT jmp dos_EXIT_CLC
; Vector tables for jumps ; Vector tables for jumps
+4 -4
View File
@@ -34,7 +34,7 @@ msg_CIOUT_fail:
; XXX should we set status? ; XXX should we set status?
lda #K_ERR_DEVICE_NOT_FOUND lda #K_ERR_DEVICE_NOT_FOUND
jmp dos_EXIT_A_SEC jmp dos_EXIT_SEC_A
@@ -53,7 +53,7 @@ msg_CIOUT_cmdfn_SD: ; get next byte of status - SD card
sta SD_CMDFN_BUF,x sta SD_CMDFN_BUF,x
plp plp
+bcs dev_sd_cmd_OPEN_EOI ; if EOI - execute command +bcs dev_sd_cmd_OPEN_EOI ; if EOI - execute command
jmp dos_EXIT jmp dos_EXIT_CLC
msg_CIOUT_cmdfn_FD: ; get next byte of status - floppy msg_CIOUT_cmdfn_FD: ; get next byte of status - floppy
@@ -68,7 +68,7 @@ msg_CIOUT_cmdfn_FD: ; get next byte of status - floppy
sta FD_CMDFN_BUF,x sta FD_CMDFN_BUF,x
plp plp
+bcs dev_fd_cmd_OPEN_EOI ; if EOI - execute command +bcs dev_fd_cmd_OPEN_EOI ; if EOI - execute command
jmp dos_EXIT jmp dos_EXIT_CLC
msg_CIOUT_cmdfn_RD: ; get next byte of status - ram disk msg_CIOUT_cmdfn_RD: ; get next byte of status - ram disk
@@ -83,7 +83,7 @@ msg_CIOUT_cmdfn_RD: ; get next byte of status - ram disk
sta RD_CMDFN_BUF,x sta RD_CMDFN_BUF,x
plp plp
+bcs dev_rd_cmd_OPEN_EOI ; if EOI - execute command +bcs dev_rd_cmd_OPEN_EOI ; if EOI - execute command
jmp dos_EXIT jmp dos_EXIT_CLC
msg_CIOUT_cmdfn_vectab: msg_CIOUT_cmdfn_vectab:
+2 -2
View File
@@ -45,10 +45,10 @@ msg_LISTEN_success:
; XXX should we reset XX_CMDFN_IDX ? ; XXX should we reset XX_CMDFN_IDX ?
jmp dos_EXIT jmp dos_EXIT_CLC
msg_LISTEN_fail: msg_LISTEN_fail:
lda #K_ERR_DEVICE_NOT_FOUND lda #K_ERR_DEVICE_NOT_FOUND
jmp dos_EXIT_A_SEC jmp dos_EXIT_SEC_A
+1 -1
View File
@@ -34,7 +34,7 @@ msg_SECOND:
msg_SECOND_done: msg_SECOND_done:
jmp dos_EXIT jmp dos_EXIT_CLC
msg_SECOND_OPEN: msg_SECOND_OPEN:
+2 -2
View File
@@ -43,10 +43,10 @@ msg_TALK_success:
asl asl
sta IDX2_TALKER sta IDX2_TALKER
jmp dos_EXIT jmp dos_EXIT_CLC
msg_TALK_fail: msg_TALK_fail:
lda #K_ERR_DEVICE_NOT_FOUND lda #K_ERR_DEVICE_NOT_FOUND
jmp dos_EXIT_A_SEC jmp dos_EXIT_SEC_A
+1 -1
View File
@@ -19,4 +19,4 @@ msg_TKSA:
msg_TKSA_done: msg_TKSA_done:
jmp dos_EXIT jmp dos_EXIT_CLC
+2 -2
View File
@@ -13,7 +13,7 @@ msg_UNLSN:
sta IDX1_LISTENER sta IDX1_LISTENER
sta IDX2_LISTENER sta IDX2_LISTENER
jmp dos_EXIT jmp dos_EXIT_CLC
msg_UNTLK: msg_UNTLK:
@@ -22,4 +22,4 @@ msg_UNTLK:
sta IDX1_TALKER sta IDX1_TALKER
sta IDX2_TALKER sta IDX2_TALKER
jmp dos_EXIT jmp dos_EXIT_CLC