khamidou / miniforth

A minimal implementation of forth

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

miniforth

at the moment, there is only a minimal vm implemented.
see as.c and vm.c to see the assembler and the vm
source code.

= format of binary files

There is no real format. The assembler simply reads the
files and spits binary code corresponding to the direct
ives he has read.

= the assembler opcodes

PUSH: followed by a value. Pushes this value on the stack 
POP: pop a value off the stack
NOP: do nothing
DPRINT: Debug PRINT; print the top of the stack
INC: increment the value on top of the stack
DEC: decrement the same value
CALL: syn: call label; calls the label
RET: return to the caller
JMP: jump inconditionally to a label.

To see those opcodes used, see the tests directory.

About

A minimal implementation of forth


Languages

Language:C 95.9%Language:ActionScript 4.1%