small LOAD cleanup
This commit is contained in:
1 parent
05253c3e92
commit
3d9e713f07
20 files changed
+98
-84
No files matched your search
@@ -5,18 +5,27 @@
|
||||
// Preserves .A, .X and .Y
|
||||
//
|
||||
|
||||
iec_check_devnum:
|
||||
// 0, 1, 2, or 3 are illegal - reserved for non-IEC devices on Commodore
|
||||
cmp #$04
|
||||
|
||||
iec_check_devnum_lvs: // for load/verify/save
|
||||
|
||||
cmp #$08 // below 8 are illegal for load/save
|
||||
bcs !+
|
||||
|
||||
// FALLTROUGH
|
||||
|
||||
iec_check_devnum_oc: // for open/close
|
||||
|
||||
cmp #$04 // below 4 are illegal, reserved for non-IEC devices on Commodore
|
||||
bcs !+
|
||||
|
||||
// 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
|
||||
bcs iec_check_devnum_failed
|
||||
// Carry is clear here - indicates IEC device
|
||||
cmp #$1F // sets carry for 31 or above
|
||||
rts
|
||||
Reference in new issue
Block a user