mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-24 06:28:09 +11:00
drv/acia: fix broken buffer bounds
How did this ever work?
This commit is contained in:
parent
79527976ab
commit
4515241318
12
drv/acia.fs
12
drv/acia.fs
@ -36,11 +36,15 @@ ACIA_MEM: Address in memory that can be used variables shared
|
|||||||
;
|
;
|
||||||
|
|
||||||
: KEY
|
: KEY
|
||||||
( As long as R> == W>-1, it means that buffer is empty )
|
|
||||||
BEGIN ACIAR> @ 1 + ACIAW> @ = NOT UNTIL
|
|
||||||
|
|
||||||
( inc then fetch )
|
( inc then fetch )
|
||||||
1 ACIAR> +!
|
ACIAR> @ 1 + DUP ACIA) @ = IF
|
||||||
|
DROP ACIA( @
|
||||||
|
THEN
|
||||||
|
|
||||||
|
( As long as R> == W>-1, it means that buffer is empty )
|
||||||
|
BEGIN DUP ACIAW> @ = NOT UNTIL
|
||||||
|
|
||||||
|
ACIAR> !
|
||||||
ACIAR> @ C@
|
ACIAR> @ C@
|
||||||
;
|
;
|
||||||
|
|
||||||
|
@ -39,11 +39,11 @@ ACIA_IO
|
|||||||
( advance W> )
|
( advance W> )
|
||||||
HL INCss,
|
HL INCss,
|
||||||
ACIAW> LD(nn)HL,
|
ACIAW> LD(nn)HL,
|
||||||
DE ACIA) @ LDdd(nn),
|
DE ACIA) LDdd(nn),
|
||||||
DE SUBHLss,
|
DE SUBHLss,
|
||||||
JRNZ, L4 FWR ( skip )
|
JRNZ, L4 FWR ( skip )
|
||||||
( end of buffer reached )
|
( end of buffer reached )
|
||||||
ACIA( @ LDHL(nn),
|
ACIA( LDHL(nn),
|
||||||
ACIAW> LD(nn)HL,
|
ACIAW> LD(nn)HL,
|
||||||
L4 FSET ( skip )
|
L4 FSET ( skip )
|
||||||
L3 FSET L2 FSET ( end )
|
L3 FSET L2 FSET ( end )
|
||||||
|
Loading…
Reference in New Issue
Block a user