2020-06-29 07:30:01 +10:00
|
|
|
0x80 CONSTANT ACIA_CTL ( IO port for ACIA's control register )
|
|
|
|
0x81 CONSTANT ACIA_IO ( IO port for ACIA's data registers )
|
2020-08-15 12:51:27 +10:00
|
|
|
0x20 CONSTANT ACIA_BUFSZ ( SZ-1 must be a mask )
|
2020-06-29 07:30:01 +10:00
|
|
|
( Address in memory that can be used variables shared
|
2020-08-15 12:51:27 +10:00
|
|
|
with ACIA's native words. 4 bytes used. )
|
2020-06-29 08:49:30 +10:00
|
|
|
CREATE ACIA_MEM SYSVARS 0x70 + ,
|
2020-06-29 07:30:01 +10:00
|
|
|
( Points to ACIA buf )
|
2020-08-15 12:51:27 +10:00
|
|
|
: ACIA( ACIA_MEM @ 2+ ;
|
|
|
|
( Read buf idx Pre-inc )
|
2020-06-29 07:30:01 +10:00
|
|
|
: ACIAR> ACIA_MEM @ ;
|
2020-08-15 12:51:27 +10:00
|
|
|
( Write buf idx Post-inc )
|
|
|
|
: ACIAW> ACIA_MEM @ 1+ ;
|
2020-06-29 07:30:01 +10:00
|
|
|
( This means that if W> == R>, buffer is full.
|
|
|
|
If R>+1 == W>, buffer is empty. )
|