Skip to content

Features IDLE, EVALUATE, EEALIAS

Pre-release
Pre-release
Compare
Choose a tag to compare
@TG9541 TG9541 released this 08 Apr 21:43
· 455 commits to master since this release
15c51ee

New Features

Basic IDLE Feature

#187 adds a basic IDLE feature. Here is an example:

#require 'IDLE
\ this is "$0066 CONSTANT 'IDLE" independent of configuration
VARIABLE TALLY
: testidle TALLY ( -- ) 
  \ idle code must be stack neutral!
  @ 1+ DUP TALLY ! $F000 AND 0= OUT!
;
' testidle 'IDLE !

When the console is idle, the example code flashes the board outputs (e.g. LED) about 34 times per minute. One IDLE loop iteration thus takes about 34s/(60*65536) = 8.65µs.

Basic EVALUATE Feature

#185 adds a basic EVALUATE for STM8 eForth. The feature required a minuscule core change that was addressed in #183 (Enable EVALUATE-like feature by using indirect addressing for TIB).

EVALUATE enables interpretation (or compilation!) of code independent of the console. Consider the following example:

#require EVALUATE
: myString $" 2 7 *" ;
: test myString COUNT EVALUATE ;

test . evaluates myString and prints 14 ok. Possible use cases comprise the implementation of communication protocols, algorithmic auto-configuration, and compiling source code stored in the embedded system.

If used carefully (no compilation!), EVALUATE can also be executed in an idle task.

Dictionary entries in the EEPROM

#178 adds a method for storing dictionary entries in the EEPROM based on the STM8 eForth ALIAS feature. By using the EEPROM for core code dictionary entries, about 500 bytes Flash ROM can be saved for use in Forth applications.

New STM8S High Density configuration

#173 adds initial support for STM8S High Density devices: up to 32K Flash, 6K RAM, and 2K EEPROM plus up to 96K Flash > 0x10000.

Improvements and Other Changes

fixes #180 SPI register constants

fixes #180 PD8544 LCD code

several code size reductions