Changing the Prompt
The prompt on your Udamonic computer is the traditional Forth prompt, a simple ok. FlashForth allows you to customize your prompt. The tick word ' and the is word can be used together to map any word to the prompt word. In this way, you can make the prompt anything you want. (You’ll still get the Forth ok just prior to your prompt, though.)
For example, to show the state of the stack after each command, you could make the prompt to be the .s word :
For example, to show the state of the stack after each command, you could make the prompt to be the .s word :
' .s is prompt
You can create your own prompt:
: myPrompt ( -- , my very own prompt )
cr
." Ready!"
;
' myPrompt is prompt
Other versions of FlashForth use .st as the default prompt:
' .st is prompt
To reset back to the Udamonic default prompt:
' chars is prompt
Next, learn how to run a word at startup.