AnsweredAssumed Answered

FORTH for STM8S-Discovery

Question asked by ting.chen_hanson on Jul 20, 2010
Latest reply on Dec 31, 2017 by Thomas G
Here is a FORTH interpreter-compiler for Discovery Board.  It is in the form of an assembly file stm8ef.asm.  You can assemble it on STVD and download it to Discovery.  You need a UART connection to Hyperterminal on PC to interact with STM8S microcontroller.

If you are lucky enough, or persist enough to get it going, the whole Hyperterminal project will be reduced to 6 lines of FORTH code:

 1 500F C! ; turn off LED

 0 500F C! ; turn on LED


 3E 50F3 C! ; turn on 1 KHz beep

 7E 50F3 C! ; turn on 2 KHz beep

 FE 50F3 C! ; turn on 4 KHz beep

 1E 50F3 C! ; turn off beep

This is how microcontrollers are to be used.

Good luck,