File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -98,6 +98,12 @@ default_header_handlers_end:
9898ioRegisterHandler:
9999 push hl
100100 push de
101+ push bc
102+ ld c , a
103+ ld a , i
104+ push af
105+ ld a , c
106+ di
101107 push af
102108 push bc
103109 push ix
@@ -123,6 +129,11 @@ ioRegisterHandler:
123129 ld (hl) , b \ dec hl
124130 pop af
125131 ld (hl) , a
132+ pop af
133+ jp po , _
134+ ei
135+ _:
136+ pop bc
126137 pop de
127138 pop hl
128139 ret
@@ -150,6 +161,9 @@ ioRegisterHandler:
150161;; will end in tears.
151162ioSendPacket:
152163 push bc
164+ push af
165+ ld a , i
166+ di
153167 push af
154168 ; io_tx_header_ix is 0xFF when ready to send
155169 ld a , (io_tx_header_ix)
@@ -185,11 +199,19 @@ _: ld (io_tx_header), de
185199 out (PORT_LINK_ASSIST_ENABLE) , a
186200 pop de
187201 pop hl
202+ pop af
203+ jp po , _
204+ ei
205+ _:
188206 pop af
189207 pop bc
190208 cp a
191209 ret
192210.abort:
211+ pop af
212+ jp po , _
213+ ei
214+ _:
193215 pop af \ ld b , a \ or 1 \ ld a , b
194216 pop bc \ ret ; Packet in progress, GTFO
195217
You can’t perform that action at this time.
0 commit comments