mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-30 21:08:05 +11:00
ecca70c7f3
This would allow things like temporary giving control to the *CL line on the TRS-80. For example... A very far fetched example. Not at all the only *raison d'etre* of the layer...
17 lines
377 B
Plaintext
17 lines
377 B
Plaintext
: 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!
|
|
;
|