Mirror of CollapseOS
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
385B

  1. : ABORT (resSP) QUIT ;
  2. : = CMP NOT ; : < CMP -1 = ; : > CMP 1 = ;
  3. : 0< 32767 > ; : >= < NOT ; : <= > NOT ; : 0>= 0< NOT ;
  4. ( n l h -- f )
  5. : >< 2 PICK > ( n l f ) ROT ROT > AND ;
  6. : =><= 2 PICK >= ( n l f ) ROT ROT >= AND ;
  7. ( a -- a+1 c )
  8. : C@+ DUP C@ SWAP 1+ SWAP ;
  9. ( c a -- a+1 )
  10. : C!+ SWAP OVER C! 1+ ;
  11. ( a -- a-1 c )
  12. : C@- DUP C@ SWAP 1- SWAP ;
  13. ( c a -- a-1 )
  14. : C!- SWAP OVER C! 1- ;