( -*- forth -*- ) ( some example code using interactive mode with a monitor running on the target ) load stc16/interactive.f target ( compile target code ) incremental ( use incremental code uploading ) ( the target interpret mode works like this: * target words are executed on the target * host words not overridden are executed on the host * numbers are loaded on the host stack * @ ! execute take arguments from host stack, but run on target * >target and target> push and pop to/from the target stack * { ...... } compiles and executes target code using the scratch block * .ds .xs print target data and aux stacks when not using incremental mode, you need to run 'update' before you can execute target code. this will overwrite the application in the target with the one compiled in the host's target code buffer. for frequent updates and exploration, it's best to use incremental mode to not wear out the memory too much. ) variable x variable y : init 0 x ! 0 y ! ; : cycle 1 x +! 2 y +! ; init blink