mirror of
https://github.com/dschmenk/apple2pi.git
synced 2024-11-27 02:49:35 +00:00
Wait for IRQ to clear
This commit is contained in:
parent
92909f2bb7
commit
01bd0d884d
@ -262,18 +262,22 @@ SENDACC PHP
|
||||
SEI ; Disable interrupts
|
||||
PHA
|
||||
LDA SSCSLOT
|
||||
ORA #$88+1
|
||||
ORA #$89+1
|
||||
TAY
|
||||
LDA #$07
|
||||
STA $C002-1,Y ; Enable transmit IRQ
|
||||
LDA $C001-1,Y ; Clear any oustanding interrupts
|
||||
STA $C002-2,Y ; Enable transmit IRQ
|
||||
LDA $C001-2,Y ; Clear any oustanding interrupts
|
||||
PLA
|
||||
STA $C000-1,Y ; AVOID PHANTOM READ FROM $C0XX
|
||||
SENDWT LDA $C001-1,Y
|
||||
STA $C000-2,Y ; AVOID PHANTOM READ FROM $C0XX
|
||||
PHA
|
||||
SENDWT LDA $C001-2,Y
|
||||
; AND #$80 ; Check IRQ status
|
||||
BPL SENDWT
|
||||
LDA #$0B ; Disable transmit IRQ
|
||||
STA $C002-1,Y
|
||||
STA $C002-2,Y
|
||||
IRQWT LDA $C001-2,Y ; Wait for IRQ to clear
|
||||
BMI IRQWT
|
||||
PLA
|
||||
PLP ; Restore interrupts
|
||||
RTS
|
||||
*
|
||||
@ -282,7 +286,7 @@ SENDWT LDA $C001-1,Y
|
||||
RECVACC LDA SSCSLOT
|
||||
ORA #$89+1
|
||||
TAY
|
||||
RECVWT LDA $C000-1,Y
|
||||
RECVWT LDA $C001-2,Y
|
||||
AND #$08
|
||||
BEQ RECVWT
|
||||
LDA $C000-2,Y
|
||||
|
@ -231,18 +231,22 @@ SENDACC PHP
|
||||
SEI ; Disable interrupts
|
||||
PHA
|
||||
LDA SSCSLOT
|
||||
ORA #$88+1
|
||||
ORA #$89+1
|
||||
TAY
|
||||
LDA #$07
|
||||
STA $C002-1,Y ; Enable transmit IRQ
|
||||
LDA $C001-1,Y ; Clear any oustanding interrupts
|
||||
STA $C002-2,Y ; Enable transmit IRQ
|
||||
LDA $C001-2,Y ; Clear any oustanding interrupts
|
||||
PLA
|
||||
STA $C000-1,Y ; AVOID PHANTOM READ FROM $C0XX
|
||||
SENDWT LDA $C001-1,Y
|
||||
STA $C000-2,Y ; AVOID PHANTOM READ FROM $C0XX
|
||||
PHA
|
||||
SENDWT LDA $C001-2,Y
|
||||
; AND #$80 ; Check IRQ status
|
||||
BPL SENDWT
|
||||
LDA #$0B ; Disable transmit IRQ
|
||||
STA $C002-1,Y
|
||||
STA $C002-2,Y
|
||||
IRQWT LDA $C001-2,Y ; Wait for IRQ to clear
|
||||
BMI IRQWT
|
||||
PLA
|
||||
PLP ; Restore interrupts
|
||||
RTS
|
||||
*
|
||||
@ -251,7 +255,7 @@ SENDWT LDA $C001-1,Y
|
||||
RECVACC LDA SSCSLOT
|
||||
ORA #$89+1
|
||||
TAY
|
||||
RECVWT LDA $C000-1,Y
|
||||
RECVWT LDA $C001-2,Y
|
||||
AND #$08
|
||||
BEQ RECVWT
|
||||
LDA $C000-2,Y
|
||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user