mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-24 13:38:06 +11:00
15 lines
495 B
Plaintext
15 lines
495 B
Plaintext
0x80 CONSTANT SIO_ACTL 0x81 CONSTANT SIO_ADATA
|
|
0x82 CONSTANT SIO_BCTL 0x83 CONSTANT SIO_BDATA
|
|
0x20 CONSTANT SIO_BUFSZ ( SZ-1 must be a mask )
|
|
( Address in memory that can be used variables shared
|
|
with SIO native words. 4 bytes used. )
|
|
CREATE SIO_MEM SYSVARS 0x70 + ,
|
|
( Points to SIO buf )
|
|
: SIO( SIO_MEM @ 2+ ;
|
|
( Read buf idx Pre-inc )
|
|
: SIOR> SIO_MEM @ ;
|
|
( Write buf idx Post-inc )
|
|
: SIOW> SIO_MEM @ 1+ ;
|
|
( This means that if W> == R>, buffer is full.
|
|
If R>+1 == W>, buffer is empty. )
|