Ricardo Forth

A Forth dialect implemented in C, Javascript, WebAssembly and compiled from C to asm.js and WebAssembly.

This project is based on the 1992 IOCCC entry buzzard.2 (design notes: buzzard.2.design), prettified and then compiled to:

asmjs using emscripten

WebAssembly using Binaryen

Also reimplemented by translating the C code into Javascript and WebAssebly.

For instructions to setup the dev environment yourself check the README.

Simpler Examples Here we compile a simple C program to asmjs and WebAssembly to make it easier to follow the generated code for a minimal example that does function calls, local variables and I/O: hello.c file

hello-binaryen: hello.c compiled to WebAssembly using binaryen

hello-emcc: hello.c compiled to asmjs using emscripten

the resources folder has all the generated files if you want to read them