2020-05-01 20:05:15 -04:00
|
|
|
: KEY
|
|
|
|
( inc then fetch )
|
|
|
|
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@
|
|
|
|
;
|
|
|
|
: (emit)
|
|
|
|
( As long at CTL bit 1 is low, we are transmitting. wait )
|
|
|
|
BEGIN ACIA_CTL PC@ 0x02 AND UNTIL
|
|
|
|
( The way is clear, go! )
|
|
|
|
ACIA_IO PC!
|
2020-04-23 12:42:41 -04:00
|
|
|
;
|