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

+11 -9
View File
@@ -6,26 +6,28 @@
//
#if CONFIG_IEC
iec_check_devnum_lvs: // for load/verify/save
cmp #$08 // below 8 are illegal for load/save
bcs !+
bcc iec_check_devnum_failed
// FALLTROUGH
iec_check_devnum_oc: // for open/close
cmp #$04 // below 4 are illegal, reserved for non-IEC devices on Commodore
bcs !+
bcc iec_check_devnum_failed
// FALLTROUGH
iec_check_devnum_failed:
sec // indicate non-IEC device
rts
!:
// 31 and above are illegal too, due to IEC command encoding scheme,
// see https://www.pagetable.com/?p=1031
cmp #$1F // sets carry for 31 or above
rts
iec_check_devnum_failed:
sec // indicate non-IEC device
rts
#endif // CONFIG_IEC