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.

16 lines
623B

  1. : ABORT (resSP) QUIT ;
  2. : ERR LIT< (print) FIND IF EXECUTE THEN ABORT ;
  3. : = CMP NOT ; : < CMP -1 = ; : > CMP 1 = ;
  4. : 0< 32767 > ; : >= < NOT ; : <= > NOT ; : 0>= 0< NOT ;
  5. : >< ( n l h -- f ) 2 PICK > ( n l f ) ROT ROT > AND ;
  6. : =><= 2 PICK >= ( n l f ) ROT ROT >= AND ;
  7. : MIN ( n n - n ) 2DUP > IF SWAP THEN DROP ;
  8. : MAX ( n n - n ) 2DUP < IF SWAP THEN DROP ;
  9. : NIP SWAP DROP ; : TUCK SWAP OVER ;
  10. : -^ SWAP - ;
  11. : C@+ ( a -- a+1 c ) DUP C@ SWAP 1+ SWAP ;
  12. : C!+ ( c a -- a+1 ) TUCK C! 1+ ;
  13. : C@- ( a -- a-1 c ) DUP C@ SWAP 1- SWAP ;
  14. : C!- ( c a -- a-1 ) TUCK C! 1- ;
  15. : LEAVE R> R> DROP I 1- >R >R ; : UNLOOP R> 2R> 2DROP >R ;