Commit Graph

12 Commits

Author SHA1 Message Date
Jordan K. Hubbard
37869e957d o Add proper stack checking to all file words
o add fkey and fread
o eliminate fexists now that this can be expressed in HLL forth
  ( : fexists fopen dup -1 <> if fclose 1 else drop 0 then ; ) :-)

Once we get the ability to write files, it should be possible to do
stand-alone rescue work from the 3rd stage boot. :)
1998-11-07 17:38:40 +00:00
Jordan K. Hubbard
335edb957d Eliminate much code cruft by extending simple file I/O API to include
fopen and fclose.
1998-11-07 06:18:06 +00:00
Jordan K. Hubbard
65e7b066b3 OK, fload/fexec work properly when both compiling and interpreting
now.  Gack.
1998-11-07 01:56:06 +00:00
Jordan K. Hubbard
ebc4b7c4fb switch words to default mode. 1998-11-06 23:50:08 +00:00
Jordan K. Hubbard
f476d38a01 Make fexists/fload work with existing string literals instead. Doing
my own string literal handling is just too wonky.
1998-11-06 23:20:32 +00:00
Jordan K. Hubbard
c6c128e122 Argh, I had this right[er] before. More commits to follow. 1998-11-06 19:17:03 +00:00
Jordan K. Hubbard
11adc0d65e Use proper literal names. 1998-11-06 04:01:32 +00:00
Jordan K. Hubbard
82f35547c9 Remember a bit more of my forth and do:
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).
1998-11-05 08:39:43 +00:00
Jordan K. Hubbard
5eb1c6c169 1. rebuild all elements of testmain properly for safety.
2. add fload and key prims for doing simple file and terminal I/O, respectively
1998-11-05 07:27:55 +00:00
Mike Smith
4ce140ae69 Fix includes; we were still pulling in <stdlib.h> in some places.
Support building a standalone interpreter with 'make testmain', remove
win32 and egregious gets() in testmain.c
1998-11-04 03:42:16 +00:00
Mike Smith
cbb5c0dd58 Make this work in the libstand environment; don't use stdio/stdlib headers. 1998-11-04 00:29:33 +00:00
Mike Smith
780ebb4b00 Add the Ficl (Forth Inspired Command Language) interpreter. If all goes well,
this will allow us to manage bloat in the loader by using a bytecoded HLL
rather than lots of C code.  It also offers an opportunity for vendors
or others with special applications to significantly customise the boot
process without having to commit to a divergent code branch.

This early commit is to allow others to experiment with the most effective
mechanisms for integrating FICL with the loader as it currently stands.

Ficl is distributed with the following license conditions:

"Ficl is freeware.  Use it in any way that you like, with the understanding
 that the code is not supported."

All source files contain authorship attributions.

Obtained from:	John Sadler (john_sadler@alum.mit.edu)
1998-11-03 06:11:35 +00:00