This repository preserves my personal 8086 FIG-FORTH system, modified mainly in 1995 and now packaged with modern tools for examining and rebuilding it.
The system is based on the early Forth Interest Group implementation. Source comments credit this 8086 version to Thomas Newman and Joe Smith. Later extensions include my own modifications together with code, routines, and ideas drawn from Guy Kelly's KFORTH, MVP Forth, and other public-domain or historical Forth sources where noted in the source and block files.
This is not a modern ANS Forth. It is a compact historical and experimental system for DOS-hosted operation, DOS-like emulation, and standalone boot-disk use. It provides a working example of a small threaded 8086 Forth with block storage, screen editing, vectored I/O, turnkey and simple multitasking hooks, an 8086 assembler, RAM-disk support, and a substantial block-file extension library.
The main archival and build files include:
FIGFORTH.ASM— 8086 FIG-FORTH assembly source.FIGFORTH.COM— DOS-hosted executable.MYFORTH.BLK— block-file extension library.make_bootdisk.py— creates a bootable floppy image from a.COMfile and block file.blk2txt.pyandtxt2blk.py— convert between Forth block files and readable text listings.FIGFORTH_glossary.md— glossary generated from the;=comment lines inFIGFORTH.ASM.myforth_glossary.md— glossary generated from a text conversion ofMYFORTH.BLK.
This is an archival and educational system intended for study, experimentation, and preservation rather than production use.
- It does not implement the ANS Forth word set.
- Its screen- and block-based workflow is historically accurate but unfamiliar to many modern users.
- DOS-hosted and standalone boot-disk operation are distinct environments.
XBYEreturns to DOS only in the DOS-hosted version.- The standalone boot image requires the correct
OFFSETandASETvalues. - The BLK-to-text-to-BLK conversion normalizes screen contents to space-padded 16-by-64 records. Consequently, an all-zero block may be reconstructed as an all-space block even though its displayed Forth contents are equivalent.
Its value is that it remains small, understandable, close to the machine, and representative of the practical personal Forth systems built and extended on PC-compatible hardware in the DOS era.
The DOS-hosted version can be assembled and linked under DOSBox or a similar DOS-compatible environment.
Obtain the JWASM assembler and VAL linker from a FreeDOS distribution.
Assemble FIGFORTH.ASM:
JWASMR -Zm -O FIGFORTH.ASM
Link the object file to create a .COM program:
VAL /co FIGFORTH.OBJ
Run the resulting program:
FIGFORTH
Inside FIG-FORTH, enter:
VLISTPress any key to continue through the dictionary listing. Press Q to quit.
Connect the DOS block file:
DOS-BLOCKSWhen prompted for a filename, enter:
MYFORTH.BLK
Then list block 1:
1 LISTLoad the FIGDOS-related extension blocks:
10 LOAD 25 LOADUseful words to try include:
WORDS
FIGDOS WORDSWORDS displays the current vocabulary. FIGDOS WORDS displays the words in
the FIGDOS vocabulary.
Save the current system as a new .COM file:
SAVE-FORTHWhen prompted, enter a filename such as:
FIG2.COM
Exit to DOS:
XBYEThe updated system can then be run with:
FIG2
After creating an updated .COM file, exit DOSBox and run the included Python
script:
python3 make_bootdisk.pyExample session:
COM file [FIGFORTH.COM]: FIG2.COM
Block file [MYFORTH.BLK]:
Output boot image [bootdsk.img]:
Patched OFFSET line at image byte 27264: 0 OFFSET -> 29 OFFSET
Note the reported OFFSET value. The example above reports 29.
Boot the disk image in DOSBox:
boot <dir>/bootdsk.img -l A
Replace <dir> with the path to the directory containing bootdsk.img.
After the standalone system boots, set the block-file offset to the value
reported by make_bootdisk.py. For the example above:
29 OFFSET !
29 ASET !After setting OFFSET and ASET, inspect the FIGDOS vocabulary:
FIGDOS WORDSIn this system, DIR lists screen 1 rather than a modern filesystem directory:
DIRSwitch to the RAM disk:
RAM:Clear it:
CLEAR-RAMWarning: CLEAR-RAM wipes all RAM-disk screens.
List screen 10:
10 LISTTry a simple editing session:
0 T
P ( TEST SCREEN )
5 T
P : TEST ( -- ) ." HELLO! " CR ;
L
UPDATE
10 LOAD
TESTThis creates a small test screen, loads it, and runs TEST.
Return to the A: block device:
A:Then enter:
DIRThis system preserves a style of Forth programming centered on screens, blocks, and direct interaction with the underlying machine. Although less familiar than modern file-based Forth systems, it provides a working view of how compact early Forth environments were organized and extended by individual users.
The original FIG-FORTH material appears to have circulated historically as public-domain source, and no new copyright claim is made here on that material.
My modifications, additions, build scripts, generated documentation, and archival cleanup are dedicated to the public domain under CC0-1.0. Incorporated historical material retains its original public-domain or source-specific status where indicated in the source comments and block files.
See LICENSE and NOTICE.md for the complete terms and provenance statement.