The 2.2.2 snapshot provides some important changes
- vector for an EMIT word, e.g. for background task, but also for text output via a general Forth word
- Refactoring of most core words to Y=TOS, which means that assembly and STC code can be mixed more easily
- Improved NUMBER string conversion: new modifiers % for base 2 and & for base 10. The number strings %-111 and -%111 both result in -7.
Here is an example for valid number strings:
DECIMAL
$10 $-10 -$20 20 -20 %1111 -%1111 .S
16 -16 -32 20 -20 15 -15 ok
HEX &16 . 10 ok
Since NUMBER was re-implemented in a mix of STC and assembly the binary size of this snapshot is significantly smaller even if there are more features. I checked the code size again: MINDEV including the new features, and WORDS_EXTRACORE is now 5185 bytes, down from 5320 bytes a week before. Bare-bones CORE is now 4195 bytes, down from 4350.
Maybe the vectored EMIT is also interesting: as I plan to support more board and features like more than two character output devices, I removed the board dependent output for the background task with a more flexible approach: USREMIT now holds the address of the basic character output word for the active task (foreground or background). The default EMIT word for background can be configured in the board's globalconf.inc. The default for W1209 is EMIT7S (7-seg-display). For all other boards it's simply DROP.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.