1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-12-26 17:08:05 +11:00
collapseos/blk/665
Virgil Dupras 177e70580f sms/kbd: begin rewriting ps2ctl to Forth
So far, the resulting binary matches.
2020-05-17 14:24:27 -04:00

14 lines
476 B
Plaintext

( 0000 KKKK dddd KKKK )
: OPRdK CREATE C, DOES> C@ ( rd K op )
OVER _r256c 0xf0 AND 4 RSHIFT OR ( rd K op' )
ROT _r16+c 4 LSHIFT ROT 0x0f AND OR ( op' rdK ) A, A, ;
0x70 OPRdK ANDI, 0x30 OPRdK CPI, 0xe0 OPRdK LDI,
0x60 OPRdK ORI, 0x40 OPRdK SBCI, 0x60 OPRdK SBR,
0x50 OPRdK SUBI,
( 0000 0000 AAAA Abbb )
: OPAb CREATE C, DOES> C@ ( A b op )
ROT _r32c 3 LSHIFT ROT _r8c OR A, A, ;
0x98 OPAb CBI, 0x9a OPAb SBI, 0x99 OPAb SBIC,
0x9b OPAb SBIS,