Mirror of CollapseOS
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

13 řádky
528B

  1. : (spie) DROP ; ( always enabled )
  2. : (spix) ( x -- x, for port B )
  3. 0 SWAP ( rx tx ) 8 0 DO
  4. ( send bit 7 to bit 6, TR's output bit )
  5. DUP 1 RSHIFT 0x40 AND ( rx tx bits ) 0x80 OR ( CLK hi )
  6. 0x3f PC@ OR 0xf3 AND ( TH and TR output )
  7. DUP 0x3f PC! ( rx tx bits )
  8. ( CLK low ) 0x7f AND 0x3f PC! ( rx tx )
  9. ( shift tx ) 1 LSHIFT ( rx tx<< )
  10. ( read into rx ) SWAP 1 LSHIFT 0xdc PC@ ( tx<< rx<< x )
  11. ( out bit is the 6th ) 6 RSHIFT 1 AND OR
  12. SWAP LOOP ( rx tx ) DROP ;