1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-11-23 21:28:06 +11:00
collapseos/blk/590
Virgil Dupras 5f9fccfa8c rc2014: make SIO actually work on real hardware
my previous commit was only tested in emulation, I had init wrong.
2020-08-18 15:33:15 -04:00

13 lines
429 B
Plaintext

: _ [ SIO_ACTL LITN ] PC! ;
: SIO$
H@ [ SIO( LITN ] ! 0 [ SIOR> LITN ] C!
1 [ SIOW> LITN ] C! ( write index starts one pos later )
[ SIO_BUFSZ LITN ] ALLOT
0x18 _ ( CMD3 )
0x24 _ ( CMD2/PTR4 ) 0b11000100 _ ( WR4/64x/1stop/nopar )
0x03 _ ( PTR3 ) 0b11000001 _ ( WR3/RXen/8char )
0x05 _ ( PTR5 ) 0b01101000 _ ( WR5/TXen/8char )
0x21 _ ( CMD2/PTR1 ) 0b00011000 _ ( WR1/Rx INT all chars )
(im1)
;