summaryrefslogtreecommitdiffstats
path: root/sys/boot/common/interp_forth.c
Commit message (Collapse)AuthorAgeFilesLines
* Cleanup warnings. Most of these are signed/unsigned warnings, as well asjhb2000-08-031-1/+1
| | | | some added const's.
* Fix vocabulary juggling so that builtins voc is always searched beforedcs2000-06-161-2/+2
| | | | | | | forth vocabulary when initially creating the builtins. FICL 2.05 has a better way to do this, but this works for now. Fixes "?".
* Remove the setting of sourceid from bf_vm(), as bf_vm() really hasdcs2000-06-141-4/+0
| | | | | | | | | | | | no clue. Set sourceid to 0 when booting, which is the correct setting for stdin. Set sourceid to an arbitrary fd when include'ing, preserving and restoring the previous sourceid. This is possibly broken(), as 0 is a valid fd. Maybe we should +1 to this value. This fixes the version problem widely reported.
* Place original builtins in a vocabulary called "builtins". Thisdcs2000-06-071-0/+6
| | | | | is intended mainly for debuging purposes, but it can be used by other words if done carefully.
* Bring in ficl version 2.03. No version bump for loader.dcs1999-09-291-10/+8
|
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Increase ficl's dictionary size, in preparation for the newer loader.rc.dcs1999-03-081-2/+2
|
* Make use of prototypes to silence warnings.dcs1999-02-041-25/+49
| | | | | | | | | | | | | | | | | | | Change include() so it will be able to load files with forth code, instead of just builtins. Remove #@- from the include section of the help file, since they don't work in the new version of include, unless BOOT_FORTH is not defined. Change bf_run() so it will return the result returned by ficlExec(). Also, make bf_run() push "interpret" to be executed by ficlExec(), since ficlExec() doesn't do it by itself. (Things worked previously because nothing recursed through ficlExec() by the way of bf_run()). Change/extend comments on builtin behavior. Search for "interpret" at the end of bf_init(), so /boot/boot.4th can provide it's own version. Remove dead code.
* Make builtin's state-aware in loader.jkh1999-01-281-14/+106
| | | | | Submitted by: Daniel C. Sobral PR: 9663
* bootstrap.hmsmith1999-01-221-6/+53
| | | | | | | | | | | | | | | | | | | | | | help.common interp.c Rename the 'source' command to 'include' in order to avoid conflict with the ANS Forth command of the same name. (kern/9473) interp_forth.c: Changes from kern/9412 (EXCEPTION word), kern/9442 (TIB buffer sizing) and an improved version of kern/9460 (set version numbers). load_aout.c: Trim some obsolete #if 0'ed cruft. pnp.c: Tidy the pnpscan output, turn off the module scanning until we sort out how to do it right. PR: kern/9412 kern/9442 kern/9460 kern/9473 Submitted by: PRs from Daniel Sobral <dcs@newsguy.com>
* Fix variable initialization.. It was written with '==' instead of '-'.peter1999-01-041-2/+3
| | | | #include <string.h> for string prototypes.
* * Begin integration of built-ins with Forth: leave the exit code fromabial1998-12-221-5/+8
| | | | | | | a built-in command on Forth stack. * Fix a bug which was causing a panic when loading stripped aout kernels. Reviewed by: jkh
* Eliminate much code cruft by extending simple file I/O API to includejkh1998-11-071-4/+9
| | | | | fopen and fclose. Also look for /boot/boot.4th now and, if found, load its contents.
* Don't have debugging on by default - it makes testing annoying. :)jkh1998-11-071-2/+2
|
* Ack. Create parseable command tail properly, and eat args out of the TIB.msmith1998-11-061-2/+5
|
* Don't use the poxy vmGetString interface (who uses counted strings thesemsmith1998-11-061-7/+23
| | | | days?), get the input buffer ourselves. Add some debugging code.
* Remember a bit more of my forth and do:jkh1998-11-051-3/+4
| | | | | | | | | o Add fexists word to check for the presence of a file o make fexists and fload immediate words which DTRT both interpreted and compiled (doh!) o add an init word which gets run at bootstrapping time to do extra post-coldload initialization (in the default implementation, we look for /boot/boot.4th and load it if found).
* Use a smaller default dictionary to waste less space.msmith1998-11-041-2/+2
|
* Add BootForth hooks; if BOOT_FORTH is defined, pass every line readmsmith1998-11-041-0/+113
to the Forth interpreter. Instantiate all of our inbuilt commands as Forth words, and handle them being called from there. Add my copyright to the bcache module (oops).
OpenPOWER on IntegriCloud