mirror of
https://github.com/hsoft/collapseos.git
synced 2024-12-27 07:58:05 +11:00
7001446212
Recipes contain bits and pieces of hardware-related knowledge, but these bits feel sparse. I've been wanting to consolidate hardware- related documentation for a while, but always fell at odds with the recipes organisation. We don't have recipes anymore, just a /doc/hw section that contains hardware-related documentation which often translate to precise instructions to run Collapse OS on a specific machine. With this new organisation, I hope to end up with a better, more solid documentation.
15 lines
532 B
Plaintext
15 lines
532 B
Plaintext
0x80 CONSTANT ACIA_CTL ( IO port for ACIA's control register )
|
|
0x81 CONSTANT ACIA_IO ( IO port for ACIA's data registers )
|
|
0x20 CONSTANT ACIA_BUFSZ ( SZ-1 must be a mask )
|
|
( Address in memory that can be used variables shared
|
|
with ACIA's native words. 4 bytes used. )
|
|
CREATE ACIA_MEM SYSVARS 0x70 + ,
|
|
( Points to ACIA buf )
|
|
: ACIA( ACIA_MEM @ 2+ ;
|
|
( Read buf idx Pre-inc )
|
|
: ACIAR> ACIA_MEM @ ;
|
|
( Write buf idx Post-inc )
|
|
: ACIAW> ACIA_MEM @ 1+ ;
|
|
( This means that if W> == R>, buffer is full.
|
|
If R>+1 == W>, buffer is empty. )
|