CompC

Artifact Content
Login

Artifact f9600afac213500382d17ae0e0df4aba1abfc822:

Wiki page [WHY?] by tehologist 2015-04-24 22:52:58.
D 2015-04-24T22:52:58.925
L WHY?
P 359f55781adbcc883bcf1e8b7863d59a0a77e9a1
U tehologist
W 781
<h1>WHY?!?</h1>

<p>I have always been interested in forth. I was at a SVFIG group meet up at Stanford. Dr. Ting was handing out copies of his excellently written document entitled "eForth and Zen". I was intrigued, the virtual machine seemed simple enough. Most of the code for the entire system was written in forth. This got me thinking, what would be required to write a program that could implement enough of a subset of eforth to generate an image that was self hosting on a virtual machine. I gave myself a few constraints, minimal function calls, use as little of c as possible and treating c as portable assembler. The result fits in under 500 lines of C. It can read in an eforth source file and generate an image that can run on a very simple VM with 21 opcodes.</p>

Z ea4532689e5358324965ea5b030bd293