Reply to topic  [ 23 posts ]  Go to page Previous  1, 2, 3
STM8S103F3 Development Board (HCDVBD0034) 
Author Message

Joined: Sat May 13, 2017 12:43 pm
Posts: 22
Post Re: STM8S103F3 Development Board (HCDVBD0034)
There is a new updated version STM8eForth 2.2.18, and if you build from the most recent source the version counter shows 2.2.19!

The most interesting part is clearly the export of register address words from resource files with "\res export". The feature depends on e4thcom but there is also platform independent code (

Edit: ouch, double post! Let's turn it into a new post!

Last edited by Alfredo on Thu Nov 02, 2017 5:58 am, edited 2 times in total.

Wed Oct 25, 2017 5:31 pm

Joined: Wed Aug 21, 2013 7:38 am
Posts: 49
Post Re: STM8S103F3 Development Board (HCDVBD0034)
@alfredo You may want to remove the duplicate posts as it appears to be shouting.

One problem I see is that you are using a word to represent a constant, 10 bytes used for a two byte value, very bad code. Just because you can do something in eForth, doesn't mean that you should. Learners should not be taught this. As an expert you should already know that.

This is like calling a function or routine to return a single value. There are eForth structures to handle this. In the Microchip PIC the instruction RETLW does just that, returns a literal as used in lookup table calls, only because it has 35 instructions and limited power. Perhaps you are an expert in that chip too?

Instead of lurking perhaps you should post some OC original content. Teach people things that I haven't.

Thu Oct 26, 2017 2:55 pm

Joined: Sat May 13, 2017 12:43 pm
Posts: 22
Post Re: STM8S103F3 Development Board (HCDVBD0034)
Bad style? It depends :-)

A CONSTANT can be in RAM, and only exist as long as you need it to write the "hardware dependent code". The runtime part of constant detects the state (compiler or interpreter), and returns either the value or compiles a literal (3 bytes).

The source code of CONSTANT is here. The code is now in the kernel, and it looks much more compact than in the Forth source.

The source code uses MARKER which is also a nice example of advanced Forth programming.

Both examples use "headerless" code: as long as you only need the address of the code (e.g. stored in a temporary ALIAS) a Forth word (a factor) consumes very little code space.

Thu Nov 02, 2017 6:24 am
Display posts from previous:  Sort by  
Reply to topic   [ 23 posts ]  Go to page Previous  1, 2, 3

Who is online

Users browsing this forum: No registered users and 1 guest

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Thank you to &
Design created by Florea Cosmin Ionut.
© 2011 All contents of this site are © Hobby Components LTD