bif-c is an attempt to implement a (near) fig-forth interpreter and run-time environment in portable C. It gets close, in that it compiles and runs pretty much anywhere the gnu compiler toolchain compiles and runs.

It is, however, still in mid-development, with many bugs remaining.

Getting Started Compiling

The simplest way to run it is to

  • Download a snapshot of the most recent version in the repository;
    • Look at the upper-right for the export button, and pick ZIP (for MSWindows) or TAR, according to your platform;
  • Unpack the download in an appropriate directory;
  • Make the configuration file in the configs directory;
  • Make the rest of the files in the main source directory;
  • Run it there, with "./bif-c".

If you are running on MSWindows, you have my sympathies, but that probably doesn't help you much. However, you can get the gnu toolchain from any of several places. I recommend

If you are running on an embedded Linux kernel, you can cross-compile, but there are a couple more steps necessary.

The configuration step involves actually running the small program, "makecelltype" on the target platform, or on the best emulation of the target that you have. Or, if all else fails, hand-editing the source may work.

  • If you can run gcc on the target, you're probably home free.
  • If not,
    • Cross compile "makecelltype.c" in the configs directory.
    • Copy the program produced, "makecelltype", to the target and run it there.
    • This produces two source files, celltype.c and celltype.h.
      • Copy them back to the configs directory.
      • DO NOT run make in the configs directory again!
    • Change to the main source directory and directly cross-compile *.c there:
      • cross-cc -o bif-c -Wall *.c
  • If this doesn't work, you can try
    • Making bif-c on a normal workstation and
    • Hand-editing the celltype.c and celltype.h produced, according to your knowledge of the target, and
    • Copy them to the configs directory in the target source tree.
    • Again, DO NOT run make in the configs directory after this!
    • Change to the main source directory and directly cross-compile *.c there:
      • cross-cc -o bif-c -Wall *.c