Win4K is an interactive forth-based programming environment that comes up with its own console. You can write graphics effects in real-time and modify live variables.
This software was my first attempt to implement a forth machine. Although it has many limitations and bugs, is far away from being complete and currently not in active development stage, I decided to make this tiny computer art available to the public to stress the forth community with new ideas. On this site you'll find some general information on the design issues that made up this machine.
typedef void (exec_t) (void*); typedef struct _word word_t; struct _word { exec_t* exec; void* data; };The machine is made up of several exec functions:
void code_call (void* wp ); void code_btrue(void* dest ); void code_push (void* imm32 ); void code_ret (void* mark ); void code_imm (void* imm_exec ); void code_throw(void* excid ); void code_exit (void* mark ); void code_dump (void* strptr );The actual execution engine looks like this:
word_t* ip; next: ip->exec(ip->data); ip++; goto next;