Mirror of CollapseOS
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

15 lines
581B

  1. : _bchk DUP 0x7f + 0xff > IF LIT" br ovfl" (print) ABORT THEN ;
  2. : DO COMPILE 2>R H@ ; IMMEDIATE
  3. : LOOP COMPILE (loop) H@ - _bchk C, ; IMMEDIATE
  4. ( LEAVE is implemented in low xcomp )
  5. : LITN COMPILE (n) , ;
  6. ( gets its name at the very end. can't comment afterwards )
  7. : _ BEGIN LIT" )" WORD S= UNTIL ; IMMEDIATE
  8. : _ ( : will get its name almost at the very end )
  9. (entry) 1 ( compiled ) C,
  10. BEGIN
  11. WORD DUP LIT" ;" S= IF DROP COMPILE EXIT EXIT THEN
  12. FIND IF ( is word ) DUP IMMED? IF EXECUTE ELSE , THEN
  13. ELSE ( maybe number ) (parse) LITN THEN
  14. AGAIN ;