1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-11-10 14:18:05 +11:00
collapseos/arch/z80/sms/blk/621

11 lines
416 B
Plaintext
Raw Normal View History

2020-05-20 10:52:48 +10:00
: (ps2kcB) ( for port B )
( Port B TL is bit 2 )
_D2@ 0x04 AND IF 0 EXIT ( nothing ) THEN
0 _THB! ( Port B TH output, low )
_D1@ ( bit 7:6 go in 1:0 ) 6 RSHIFT ( n )
_D2@ ( bit 1:0 go in 3:2 ) 0x03 AND 2 LSHIFT OR ( n )
1 _THB! ( Port B TH output, high )
_D1@ ( bit 7:6 go in 5:4 ) 0xc0 AND 2 RSHIFT OR ( n )
_D2@ ( bit 1:0 go in 7:6 ) 0x03 AND 6 LSHIFT OR ( n )
2 _THB! ( TH input ) ;