mirror of
https://github.com/hsoft/collapseos.git
synced 2024-12-26 07:28:05 +11:00
acia: protect DE during aciaInt
I don't know why I haven't noticed it wasn't protected. It must have been behind many random problems I've been having...
This commit is contained in:
parent
3bc165c8f6
commit
7c23e5a9ef
@ -77,17 +77,19 @@ aciaInt:
|
|||||||
cp l
|
cp l
|
||||||
jr z, .end ; Equal? buffer is full
|
jr z, .end ; Equal? buffer is full
|
||||||
|
|
||||||
; Alrighty, buffer not full. let's write.
|
push de ; <|
|
||||||
ld de, ACIA_BUF
|
; Alrighty, buffer not full|. let's write.
|
||||||
; A already contains our write index, add it to DE
|
ld de, ACIA_BUF ; |
|
||||||
call addDE
|
; A already contains our wr|ite index, add it to DE
|
||||||
; increase our buf ptr while we still have it in A
|
call addDE ; |
|
||||||
call aciaIncIndex
|
; increase our buf ptr whil|e we still have it in A
|
||||||
ld (ACIA_BUFWRIDX), a
|
call aciaIncIndex ; |
|
||||||
|
ld (ACIA_BUFWRIDX), a ;
|
||||||
; And finally, fetch the value and write it.
|
; |
|
||||||
in a, (ACIA_IO)
|
; And finally, fetch the va|lue and write it.
|
||||||
ld (de), a
|
in a, (ACIA_IO) ; |
|
||||||
|
ld (de), a ; |
|
||||||
|
pop de ; <|
|
||||||
|
|
||||||
.end:
|
.end:
|
||||||
pop hl
|
pop hl
|
||||||
|
Loading…
Reference in New Issue
Block a user