1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-12-25 04:48:06 +11:00

drv/acia: fix broken buffer bounds

How did this ever work?
This commit is contained in:
Virgil Dupras 2020-04-08 08:26:04 -04:00
parent 79527976ab
commit 4515241318
2 changed files with 10 additions and 6 deletions

View File

@ -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@
;

View File

@ -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 )