mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-27 17:18:05 +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
|
||||
( As long as R> == W>-1, it means that buffer is empty )
|
||||
BEGIN ACIAR> @ 1 + ACIAW> @ = NOT UNTIL
|
||||
|
||||
( 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@
|
||||
;
|
||||
|
||||
|
@ -39,11 +39,11 @@ ACIA_IO
|
||||
( advance W> )
|
||||
HL INCss,
|
||||
ACIAW> LD(nn)HL,
|
||||
DE ACIA) @ LDdd(nn),
|
||||
DE ACIA) LDdd(nn),
|
||||
DE SUBHLss,
|
||||
JRNZ, L4 FWR ( skip )
|
||||
( end of buffer reached )
|
||||
ACIA( @ LDHL(nn),
|
||||
ACIA( LDHL(nn),
|
||||
ACIAW> LD(nn)HL,
|
||||
L4 FSET ( skip )
|
||||
L3 FSET L2 FSET ( end )
|
||||
|
Loading…
Reference in New Issue
Block a user