some work towards I/O stack modularization

This commit is contained in:
FeralChild64 committed 2019-10-28 22:36:53 +01:00
1 parent 966658eae0
commit 6fa2c5b570
56 files changed
+357 -69

No files matched your search

+35
View File
@@ -0,0 +1,35 @@
//
// IEC part of the CLOSE routine
//
#if CONFIG_IEC
// .Y contains LAT/FAT/SAT table index, it should stay this way
close_iec:
jsr iec_tx_flush // make sure no byte is awaiting
lda SAT, y // get secondary address
cmp #$60
bne !+
// workaround for using CLOSE on reading executable - XXX is this a proper way?
jsr iec_close_load
jmp close_remove_from_table
!:
ora $E0 // CLOSE command
sta TBTCNT
jsr iec_tx_command
bcs close_iec_end
jsr iec_tx_command_finalize
close_iec_end:
jmp close_remove_from_table
#endif // CONFIG_IEC