Nuvoton FORTH
 All Classes Files Functions Variables Macros Modules Pages
Functions | Variables
FORTH.c File Reference

global Virtual Machine universal part (ANSI C'89 code shared between byte compiler & embedded) More...

#include "FORTH.h"
Include dependency graph for FORTH.c:

Functions

void Bcompile (BYTE byte)
 B, ( byte -- ) compile byte
 
void compile (CELL cell)
 , ( cell -- ) compile cell
 
void Bstore (CELL addr, BYTE byte)
 store byte at M address
 
CELL fetch (CELL addr)
 fetch VM machine word from M address
 
void store (CELL addr, CELL cell)
 store VM machine word at M address
 
void NOP ()
 NOP ( -- ) no operation
 
void BYE ()
 BYE ( -- ) stop system
 
void JMP ()
 jmp addr ( -- ) unconditional jump
 
void CALL ()
 call addr ( -- ) (R: -- addr) nested call
 
void RET ()
 ret ( -- ) (R: addr -- ) return from nested call
 
void DUMP ()
 dump ( -- ) dump M bytecode until Cp
 
void VM ()
 bytecode interpreter
 

Variables

BYTE M [Msz]
 bytecode memory
 
CELL Ip =0
 instruction pointer
 
CELL Cp =0
 compiler pointer
 
CELL R [Rsz]
 return stack for call/ret
 
CELL Rp =0
 return stack pointer
 

Detailed Description

global Virtual Machine universal part (ANSI C'89 code shared between byte compiler & embedded)