improved VECTOR/RESTOR compatibility, small DOS wedge improvements

This commit is contained in:
FeralChild64 committed 2019-10-27 18:36:57 +01:00
1 parent d0ac49b2b6
commit 05253c3e92
2 files changed
+9 -10

No files matched your search

+3 -3
View File
@@ -66,6 +66,7 @@ wedge_dos_command:
!: !:
// Retrieve status, print it if not OK // Retrieve status, print it if not OK
jsr JCLALL jsr JCLALL
jsr print_return
jsr wedge_dos_status_get jsr wedge_dos_status_get
lda BUF+0 lda BUF+0
cmp #$30 // '0' cmp #$30 // '0'
@@ -92,6 +93,7 @@ wedge_dos_change_drive:
jmp do_ILLEGAL_DEVICE_NUMBER_error jmp do_ILLEGAL_DEVICE_NUMBER_error
!: !:
sta FA sta FA
jsr print_return
jmp basic_end_of_line jmp basic_end_of_line
wedge_dos_status_get: wedge_dos_status_get:
@@ -134,8 +136,8 @@ wedge_dos_x1:
wedge_dos_status: wedge_dos_status:
jsr print_return
jsr wedge_dos_status_get jsr wedge_dos_status_get
jsr print_return
// FALLTROUGH // FALLTROUGH
wedge_dos_status_print: wedge_dos_status_print:
@@ -230,8 +232,6 @@ wedge_dos_directory_display:
wedge_dos_clean_exit: wedge_dos_clean_exit:
jsr JCLALL jsr JCLALL
// Print new line
jsr print_return
jmp basic_main_loop jmp basic_main_loop
wedge_dos_basic_error: wedge_dos_basic_error:
+6 -7
View File
@@ -1,4 +1,5 @@
vector_real: vector_real:
// Use MEMUSS as temporary storage location - checked on real C64 that this is the // Use MEMUSS as temporary storage location - checked on real C64 that this is the
@@ -8,11 +9,11 @@ vector_real:
// According to 'Compute's Mapping the Commodore 64' page 237, // According to 'Compute's Mapping the Commodore 64' page 237,
// the CBM implementation does not disable IRQs - yet, the // the CBM implementation does not disable IRQs - yet, the
// 'C64 Programmers Reference Guide' does not contain such // 'C64 Programmers Reference Guide' does not contain such
// warning and does not mention any preparations needed, so... // warning and does not mention any preparations needed.
// better safe than sorry, disable the IRQ for the duration
// of vector manipulation // Initial idea was to do php, cli, ..., plp to make the routine safer,
php // but it seems it might cause problem with initialization sequence,
cli // as the stack might be uninitialized when this routine is called
// Prepare the user data pointer - strange order to reduce risk // Prepare the user data pointer - strange order to reduce risk
// of potential similarity to the original routine // of potential similarity to the original routine
@@ -38,6 +39,4 @@ vector_end_loop:
dey dey
bpl vector_restore bpl vector_restore
// Restore status register (IRQ) before return
plp
rts rts