Advertisement
Guest User

Untitled

a guest
Mar 23rd, 2019
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. 0 // Vocabulary support
  2. 1
  3. 2 5 ?load ghosts
  4. 3
  5. 4 variable lvoc forth lvoc !
  6. 5 variable dummy hp @ dummy ! 0 h, x:FFFF h,
  7. 6
  8. 7 .: wlink dummy @ hcell + 0@ ! ;
  9. 8 .: vlink lvoc @ 0@ tuck cell + ! lvoc ! ;
  10. 9 .: voc.c 2 cells allot wlink vlink ;
  11. 10 .: voc.x cell context +! context @ ! ;
  12. 11 : voc create dp @ {{ voc.c }} drop does> voc.x ;
  13. 12
  14. 13 .: oops? context .<>; 2 cells + ;
  15. 14 .: (;path) .@ 0=; cell - me [[
  16. 15 .: (-voc) cell - .@ 0<>; me [[
  17. 16 : path: 0 voc.x forth voc.x ;
  18. 17 : ;path context @ (;path) cell - oops? context ! ;
  19. 18 : -voc context @ (-voc) oops? context ! ;
  20. 19
  21. 20 : defs context @ @ current ! ;
  22. 21 : forth context r! 2 cells + r> ! ;
  23. 22
  24. 23 .wipe
  25. 2
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement