1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-11-28 00:38:05 +11:00
collapseos/arch/z80/sms/blk/613
Virgil Dupras 7d568bd782 sms: simplify and solidify ports-related drivers
Add _TRA!, _THA!, _TRB!, _THB! routines to easily handle those pins'
value without stepping on other pins like the drivers previously
did. For SDC driver, it's going to be important soon because it turns
out that I can't get away with "always on" CS, so I'll need a scheme
where it's important that TH/TR pins have stable values.
2020-11-02 18:53:57 -05:00

8 lines
286 B
Plaintext

: _status
1 _THA! ( output, high/unselected )
_D1@ 0x3f AND ( low 6 bits are good )
( Start and A are returned when TH is selected, in bits 5 and
4. Well get them, left-shift them and integrate them to B. )
0 _THA! ( output, low/selected )
_D1@ 0x30 AND 2 LSHIFT OR ;