61 #define CELLsz (sizeof(CELL))
89 extern void save(
char* filename);
133 #define op_QUEST 0xD1
void Bcompile(BYTE byte)
B, ( byte -- ) compile byte
Definition: FORTH.c:18
void JMP()
jmp addr ( -- ) unconditional jump
Definition: FORTH.c:57
CELL fetch(CELL addr)
fetch VM machine word from M address
Definition: FORTH.c:30
void RET()
ret ( -- ) (R: addr -- ) return from nested call
Definition: FORTH.c:74
#define Msz
main memory size (bytes)
Definition: FORTH.h:37
void DUMP()
dump ( -- ) dump M bytecode until Cp
Definition: FORTH.c:81
void BYE()
BYE ( -- ) stop system
Definition: FORTH.c:50
CELL R[Rsz]
return stack for call/ret
Definition: FORTH.c:15
void VM()
bytecode interpreter
Definition: FORTH.c:90
#define CELL
machine word (cell)
Definition: FORTH.h:58
void compile(CELL cell)
, ( cell -- ) compile cell
Definition: FORTH.c:22
BYTE M[Msz]
bytecode memory
Definition: FORTH.c:9
void Bstore(CELL addr, BYTE byte)
store byte at M address
Definition: FORTH.c:26
CELL Cp
compiler pointer
Definition: FORTH.c:13
CELL Ip
instruction pointer
Definition: FORTH.c:11
void CALL()
call addr ( -- ) (R: -- addr) nested call
Definition: FORTH.c:65
void store(CELL addr, CELL cell)
store VM machine word at M address
Definition: FORTH.c:34
#define Rsz
return stack size (cells)
Definition: FORTH.h:40
void NOP()
NOP ( -- ) no operation
Definition: FORTH.c:44
void save(char *filename)
save compiled vocabular memory to file
Definition: ByteCompiler.cpp:15
#define BYTE
byte
Definition: FORTH.h:55
CELL Rp
return stack pointer
Definition: FORTH.c:16