mirror of
https://github.com/hsoft/collapseos.git
synced 2024-12-26 03:48:05 +11:00
9424770caa
Driver configuration don't need their own words at runtime, we only need to compile them as literals when compiling words. Now that we have this "declaration blocks" pattern emerging, it seems like a good idea to take advantage of this in drivers, both for simplifying the xcomp unit and to make final binary slimmer.
13 lines
400 B
Plaintext
13 lines
400 B
Plaintext
: ACIA$
|
|
H@ DUP DUP [ ACIA( LITN ] ! [ ACIAR> LITN ] !
|
|
1+ [ ACIAW> LITN ] ! ( write index starts one pos later )
|
|
0x20 ( buffer size ) ALLOT
|
|
H@ [ ACIA) LITN ] !
|
|
( setup ACIA
|
|
CR7 (1) - Receive Interrupt enabled
|
|
CR6:5 (00) - RTS low, transmit interrupt disabled.
|
|
CR4:2 (101) - 8 bits + 1 stop bit
|
|
CR1:0 (10) - Counter divide: 64 )
|
|
0b10010110 [ ACIA_CTL LITN ] PC!
|
|
(im1) ;
|