fixed incorrect byte comparing

This commit is contained in:
FeralChild64 committed 2019-07-23 20:56:28 +02:00
1 parent f4db0f31c6
commit 44db729d5c
2 files changed
+12 -11

No files matched your search

+5 -7
View File
@@ -7,18 +7,16 @@
iec_devnum_check:
;; 0, 1, 2, or 3 are illegal - reserved for non-IEC devices on Commodore
cmp #$03
bpl +
cmp #$04
bcs +
;; FALLTROUGH
iec_devnum_check_failed:
sec
sec ; indicate non-IEC device
rts
*
;; 30 and above are illegal too, due to IEC command encoding scheme,
;; 31 and above are illegal too, due to IEC command encoding scheme,
;; see https://www.pagetable.com/?p=1031
cmp #$1E
bpl iec_devnum_check_failed
cmp #$1F
bcs iec_devnum_check_failed
clc
;; Carry is clear here - indicates IEC device
rts