Mirror of CollapseOS
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. # C VM
  2. This is a C implementation of Collapse OS' native words. It allows Collapse OS
  3. to run natively on any POSIX environment.
  4. ## Requirements
  5. You need `curses` to build the `forth` executable.
  6. ## Build
  7. Running `make` will yield `forth` and `stage` executables.
  8. ## Usage
  9. To play around Collapse OS, you'll want to run `./forth`. Refer to
  10. `doc/intro.txt` for help.
  11. The program is a curses interface with a limited, fixed size so that it can
  12. provide a AT-XY interface. If you wish to change the size of that screen, you
  13. need to modify COLS and LINES in both `forth.c` and `forth.fs`.
  14. You can get a REPL by launching the program with [`rlwrap(1)`][rlwrap] like
  15. this:
  16. rlwrap -e '' -m -S '> ' ./forth /dev/stdin
  17. ## Problems?
  18. If the `forth` executable works badly (hangs, spew garbage, etc.),
  19. it's probably because you've broken your bootstrap binary. It's easy to
  20. mistakenly break. To verify if you've done that, look at your git status. If
  21. `stage.bin` is modified, try resetting it and then run `make clean all`. Things
  22. should go better afterwards.
  23. A modified `blkfs` can also break things (although even with a completely broken
  24. blkfs, you should still get to prompt), you might want to run `make pack` to
  25. ensure that the `blkfs` file is in sync with the contents of the `blk/` folder.
  26. If that doesn't work, there's also the nuclear option of `git reset --hard`
  27. and `git clean -fxd`.
  28. If that still doesn't work, it might be because the current commit you're on
  29. is broken, but that is rather rare.
  30. [rlwrap]: https://linux.die.net/man/1/rlwrap