fix(iec): disable IRQs before releasing CLK to send a byte

iec_tx_byte and iec_tx_command released CLK and only then disabled IRQs. An
IRQ in between took about 500 cycles, longer than a listener's EOI wait and
acknowledgement, so the talker waited for an acknowledgement that had come and
gone, and a LOAD over the bus hung after its file name. Which byte an IRQ hit
depended on where the build placed the code.
This commit is contained in:
chris committed 2026-10-18 08:16:40 +02:00
1 parent 93c4932309
commit b4f334bbbf
2 files changed
+12 -5

No files matched your search

+3
View File
@@ -32,7 +32,10 @@ iec_tx_command:
; (can be busy processing something), we have to wait till they are all
; ready (or bored with DOS attack...)
; Release back CLK, keep DATA released - to ask devices for status.
; From here on IRQs are disabled, as in iec_tx_byte: a listener takes a
; talker that waits too long after the release for EOI
sei
jsr iec_release_clk_data
; Common part of iec_txbyte and iec_tx_common - waits for devices