|
From: pito <pi...@vo...> - 2010-07-02 23:33:51
|
Dear friends, I've just started with amforth and I would be happy to ask expets following: In the version 4 there is a feature which stops me to compile succesfuly in the template.asm: ....These files include the *def.inc from atmel internally. .include "device.asm"...... I had to change to: ...These files include the *def.inc from atmel internally. .include "devices/atmega32/device.asm"..... in order to compile. I am using AVR studio under XP. It works great. I am using Forfiter for uploading the words. 2. I am new with forth (I am learning it because I want to design a FPGA based forth procesor) so I've tried to add new words from examples - however, some examples require to have defined additional words, which are not included in the fresh compilation from the template. I've read the docs there but - pls be so kind and do advise me in which dict_*.inc shall I include missing *.asm word definitions? Is there any "full version" which compiles all the words from your distribution - all those in \amforth-4.0\core\words? And how to delete a word from flash when interactivly added? With forget (..not there) or marker? Thanks a lot. |
|
From: Matthias T. <mt...@we...> - 2010-07-03 08:23:21
|
Hi pito, > Dear friends, > I've just started with amforth and I would be happy to ask expets following: > In the version 4 there is a feature which stops me to compile succesfuly > in the template.asm: > ....These files include the *def.inc from atmel internally. > .include "device.asm"...... > > I had to change to: > ...These files include the *def.inc from atmel internally. > .include "devices/atmega32/device.asm"..... > in order to compile. I just wrote a little page at http://amforth.sourceforge.net/porting.html that may be useful. (and to answer Leons question as well). Feel free to comment or (if possible) send me a better one. I may edit it anyway later on... > I am using AVR studio under XP. It works great. Yeah, since I do not really use the studio, I cannot give any assistance. My world is Linux and Make/ant, despite the fact that I use the Atmel assembler with the wine tool ;=) > I am using Forfiter for uploading the words. Well, my czech is not that good to praise it ;=) > 2. I am new with forth (I am learning it because I want to design a FPGA > based forth procesor) so I've tried to add new words from examples - > however, some examples require to have defined additional words, which > are not included in the fresh compilation from the template. I've read > the docs there but - pls be so kind and do advise me in which dict_*.inc > shall I include missing *.asm word definitions? Is there any "full version" > which compiles all the words from your distribution - all those in \amforth-4.0\core\words? > And how to delete a word from flash when interactivly added? With forget > (..not there) or marker? I use the amforth-upload.py a lot. Just have a look at the howto section. With it I can keep the assembly code as little as possible (forth code is much better maintainable than assembly). For those who want to convert forth source code into assembler syntax Michael Kalus wrote a smart utility. With it you can include the generated files in your dict_appl.inc file. Michaels tool is called g4 and can be found at http://www.forth-ev.de/trac/browser/g4 And finally: the dict-files from the template/ directory contain most of the pre-defined words. Either directly or via the dict_xy files fromthe core directory. There are only a very few that are not included (you won't miss them initially). And yes, marker is the word you need. Just upload the lib/ans/postpone.frt and lib/ans94/marker.frt in that order to your controller. I droped FORGET in order to get the word list feature simple. Matthias |
|
From: pito <pi...@vo...> - 2010-07-03 08:50:21
|
Hi Matthias, yes the work under XP with amforth v4 and AVR Studio is easy (begginers luck..), no issue, I am not using any .py scripts yet. Except the device.asm path issue it was quick to start. The Forfiter is a simple but useful forth terminal where you can set the CR delay and it may wait on the "ok" response as well so uploading works nice. My previous Q to the interactivity - so my understanding is you may delete words from flash w/o burning new image. However let us mind the atmel flash and eeprom endurance.. Pito > Hi pito, > > > Dear friends, > > I've just started with amforth and I would be happy > > to ask expets following: > > > In the version 4 there is a feature which stops me > > to compile succesfuly > > > in the template.asm: > > ....These files include the *def.inc from atmel internally. > > > .include "device.asm"...... > > > > I had to change to: > > ...These files include the *def.inc from atmel internally. > > > .include "devices/atmega32/device.asm"..... > > in order to compile. > > I just wrote a little page at > http://amforth.sourceforge.net/porting.html that may > be useful. (and to > answer Leons question as well). Feel free to comment > or (if possible) > send me a better one. I may edit it anyway later on... > > > I am using AVR studio under XP. It works great. > > Yeah, since I do not really use the studio, I cannot > give any assistance. My world is Linux and Make/ant, > > despite the fact that I use the Atmel assembler with > > the wine tool ;=) > > > I am using Forfiter for uploading the words. > > Well, my czech is not that good to praise it ;=) > > > 2. I am new with forth (I am learning it because > > I want to design a FPGA > > > based forth procesor) so I've tried to add new words > > from examples - > > > however, some examples require to have defined additional > > words, which > > > are not included in the fresh compilation from the > > template. I've read > > > the docs there but - pls be so kind and do advise > > me in which dict_*.inc > > > shall I include missing *.asm word definitions? Is > > there any "full version" > > > which compiles all the words from your distribution > > - all those in \amforth-4.0\core\words? > > > And how to delete a word from flash when interactivly > > added? With forget > > > (..not there) or marker? > > I use the amforth-upload.py a lot. Just have a look > at the howto > section. With it I can keep the assembly code as little > as possible > (forth code is much better maintainable than assembly). > > > For those who want to convert forth source code into > assembler syntax > Michael Kalus wrote a smart utility. With it you can > include the > generated files in your dict_appl.inc file. Michaels > tool is called > g4 and can be found at http://www.forth-ev.de/trac/browser/g4 > > And finally: the dict-files from the template/ directory > contain most of > the pre-defined words. Either directly or via the dict_xy > files fromthe > core directory. There are only a very few that are > not included (you > won't miss them initially). > > And yes, marker is the word you need. Just upload the > lib/ans/postpone.frt and lib/ans94/marker.frt in that > order > to your controller. I droped FORGET in order to get > the > word list feature simple. > > > Matthias |
|
From: Matthias T. <mt...@we...> - 2010-07-03 11:55:38
|
Hi Pito, > My previous Q to the interactivity - so my understanding is you may delete > words from flash w/o burning new image. Just do a marker -foo : bar ; : baz bar ; ... use bar and baz and... now get rid of bar -foo and both bar/baz and -foo are gone. The only real difference from a users point of view is some planning with the -foo thing. Most of my source files define such markes... > However let us mind the atmel > flash and eeprom endurance.. I still use the very first atmegas for developing, they have seen versions pre-0.1 and still work. And replacing a DIP package is easy... Matthias |
|
From: pito <pi...@vo...> - 2010-07-03 18:53:55
|
Matthias, I see the marker usage with sieve example. If you mark the set of words with -foo2 where is the end of the marked area (as you may have X words defined)? Is that the next new marker position? It means (wordlist): bla bla -foo3 hello hello -foo2 happy happy -foo1 <-----------> <---------------> <---------------> the area of marker -foo2 bla bla -foo3 happy happy -foo1 <-----------> <---------------> or bla bla -foo3 ...................happy happy -foo1 ?? <-----------> <---------------> My understanding is it works like a "file system" so a deleted -foo will create a free space for new words - am I right? As I uploaded lot of stuff for my naive experiments and the word list is now very long so the way how the list is maintained seems to be a challenge.. Pito ----- PŮVODNÍ ZPRÁVA ----- Od: "Matthias Trute" <mt...@we...> Komu: "Everything around amforth" <amf...@li...> Předmět: Re: [Amforth-devel] Starting with amforth v4 Datum: 3.7.2010 - 13:55:30 > Hi Pito, > > > My previous Q to the interactivity - so my understanding > > is you may delete > > > words from flash w/o burning new image. > > Just do a > > marker -foo > : bar ; > : baz bar ; > ... use bar and baz and... > > now get rid of bar > > -foo > > and both bar/baz and -foo are gone. The only real difference > from a > users point of view is some planning with the -foo > thing. Most of my > source files define such markes... > > > However let us mind the atmel > > flash and eeprom endurance.. > > I still use the very first atmegas for developing, > they have seen > versions pre-0.1 and still work. And replacing a DIP > package is > easy... > > Matthias |
|
From: <an...@ki...> - 2010-07-04 10:02:56
|
Interesting question. I am afraid my understanding is that when you marker you delete everything back to the marker. Other markers as well. Managing linked lists etc on microcontrolers with limited space can be problematic. You dont have the memory to reorganize the memory space to free up bits of space in the middle of lumps of good code. Who is to say that the next bit of code would fit that space ??? The technique then is to purge from the end of the list wherever that may be back to the marker. So for > bla bla -foo3 hello hello -foo2 happy happy -foo1 doing -foo2 would give you..... > bla bla -foo3 hello hello Doing -foo1 would be pointless. Doing -foo3 would give........ > bla bla Happy to be told I have got the wrong end of the stick though. Cheers Andy Kirby On 03/07/10 19:53, pito wrote: > Matthias, > I see the marker usage with sieve example. If you mark the set of words > with -foo2 where is the end of the marked area (as you may have X words > defined)? Is that the next new marker position? It means (wordlist): > > bla bla -foo3 hello hello -foo2 happy happy -foo1 > <-----------> <---------------> <---------------> the area of marker > > -foo2 > > bla bla -foo3 happy happy -foo1 > <-----------> <---------------> > > or > > bla bla -foo3 ...................happy happy -foo1 ?? > <-----------> <---------------> > > My understanding is it works like a "file system" so a deleted -foo will > create a free space for new words - am I right? > As I uploaded lot of stuff for my naive experiments and the word list > is now very long so the way how the list is maintained seems to be a > challenge.. > Pito > > ----- PŮVODNÍ ZPRÁVA ----- > Od: "Matthias Trute" <mt...@we...> > Komu: "Everything around amforth" <amf...@li...> > Předmět: Re: [Amforth-devel] Starting with amforth v4 > Datum: 3.7.2010 - 13:55:30 > >> Hi Pito, >> >>> My previous Q to the interactivity - so my understanding >>> is you may delete >>>> words from flash w/o burning new image. >> >> Just do a >> >> marker -foo >> : bar ; >> : baz bar ; >> ... use bar and baz and... >> >> now get rid of bar >> >> -foo >> >> and both bar/baz and -foo are gone. The only real difference >> from a >> users point of view is some planning with the -foo >> thing. Most of my >> source files define such markes... >> >>> However let us mind the atmel >>> flash and eeprom endurance.. >> >> I still use the very first atmegas for developing, >> they have seen >> versions pre-0.1 and still work. And replacing a DIP >> package is >> easy... >> >> Matthias > > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by Sprint > What will you do first with EVO, the first 4G phone? > Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first > _______________________________________________ > Amforth-devel mailing list > Amf...@li... > https://lists.sourceforge.net/lists/listinfo/amforth-devel > |
|
From: Erich W. <ew....@na...> - 2010-07-04 10:42:41
|
Hello, On 07/04/2010 12:02 PM, an...@ki... wrote: > The technique then is to purge from the end of the list wherever that > may be back to the marker. Correct. Whereever the end of the currently used space, calling a marker word will free everything from the end to (and including) the marker word. When defineing marker -foo1 calling "-foo1" does reset the relevant pointers to the positions known when defining the marker. Reusing the "free" space then just overwrites, what was there before. Cheers, Erich |
|
From: pito <pi...@vo...> - 2010-07-04 10:46:54
|
Andy, after I rised the Q I did it directly with my dev system. Frankly the way how it works is changing my understanding for "interactivity". Basically you cannot delete wrong words so the space occupied will grow. Imagine my apollo picosatellite flying in the space and I am tweaking the sw in its guidance computer. So I have to have at least a chance activate/deactivate specific words. As I've seen the forth manual the last definition of a word is valid. So you may have many words with same name, however the last one will be used (am I right?) for "following" usage. Imagine wordlist: > words navigate distance position sinus sinus speed height sinus .... The Q: which sinus word will be used in speed and height calculations? Sorry for this elementar Q, however I think one has to understand the concepts... Pito ----- PŮVODNÍ ZPRÁVA ----- Od: an...@ki... Komu: amf...@li... Předmět: Re: [Amforth-devel] Starting with amforth v4 Datum: 4.7.2010 - 12:02:46 > Interesting question. > > I am afraid my understanding is that when you marker > you delete > everything back to the marker. Other markers as well. > > Managing linked lists etc on microcontrolers with limited > space can be > problematic. You dont have the memory to reorganize > the memory space to > free up bits of space in the middle of lumps of good > code. Who is to say > that the next bit of code would fit that space ??? > > The technique then is to purge from the end of the > list wherever that > may be back to the marker. > > So for > > > bla bla -foo3 hello hello -foo2 happy happy -foo1 > > > doing -foo2 would give you..... > > > bla bla -foo3 hello hello > > Doing -foo1 would be pointless. > > Doing -foo3 would give........ > > > bla bla > > Happy to be told I have got the wrong end of the stick > though. > > Cheers > > Andy Kirby > > > > On 03/07/10 19:53, pito wrote: > > Matthias, > > I see the marker usage with sieve example. If you > > mark the set of words > > > with -foo2 where is the end of the marked area (as > > you may have X words > > > defined)? Is that the next new marker position? It > > means (wordlist): > > > > > bla bla -foo3 hello hello -foo2 happy happy -foo1 > > > <-----------> <---------------> <---------------> > > the area of marker > > > > > -foo2 > > > > bla bla -foo3 happy happy -foo1 > > <-----------> <---------------> > > > > or > > > > bla bla -foo3 ...................happy happy -foo1 > > ?? > > > <-----------> <---------------> > > > > > My understanding is it works like a "file system" > > so a deleted -foo will > > > create a free space for new words - am I right? > > As I uploaded lot of stuff for my naive experiments > > and the word list > > > is now very long so the way how the list is maintained > > seems to be a > > > challenge.. > > Pito > > > > ----- PŮVODNÍ ZPRÁVA ----- > > Od: "Matthias Trute" <mt...@we...> > > Komu: "Everything around amforth" <amf...@li...> > > > > > Předmět: Re: [Amforth-devel] Starting with amforth > > v4 > > > Datum: 3.7.2010 - 13:55:30 > > > >> Hi Pito, > >> > >>> My previous Q to the interactivity - so my understanding > >>> >>> is you may delete > >>>> words from flash w/o burning new image. > >> > >> Just do a > >> > >> marker -foo > >> : bar ; > >> : baz bar ; > >> ... use bar and baz and... > >> > >> now get rid of bar > >> > >> -foo > >> > >> and both bar/baz and -foo are gone. The only real > >> difference > >> >> from a > >> users point of view is some planning with the -foo > >> >> thing. Most of my > >> source files define such markes... > >> > >>> However let us mind the atmel > >>> flash and eeprom endurance.. > >> > >> I still use the very first atmegas for developing, > >> >> they have seen > >> versions pre-0.1 and still work. And replacing a > >> DIP > >> >> package is > >> easy... > >> > >> Matthias > > > > > > > > ------------------------------------------------------------------------------ > > > > > This SF.net email is sponsored by Sprint > > What will you do first with EVO, the first 4G phone? > > > Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first > > > _______________________________________________ > > Amforth-devel mailing list > > Amf...@li... > > https://lists.sourceforge.net/lists/listinfo/amforth-devel > > > > > ------------------------------------------------------------------------------ > > This SF.net email is sponsored by Sprint > What will you do first with EVO, the first 4G phone? > Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first > _______________________________________________ > Amforth-devel mailing list > Amf...@li... > https://lists.sourceforge.net/lists/listinfo/amforth-devel |
|
From: Erich W. <ew....@na...> - 2010-07-04 11:31:34
|
Hello, On 07/04/2010 12:46 PM, pito wrote: > Andy, after I rised the Q I did it directly with my dev system. Frankly > the way how it works is changing my understanding for "interactivity". > Basically you cannot delete wrong words so the space occupied will grow. > Imagine my apollo picosatellite flying in the space and I am tweaking > the sw in its guidance computer. So I have to have at least a chance > activate/deactivate specific words. As I've seen the forth manual the > last definition of a word is valid. So you may have many words with > same name, however the last one will be used (am I right?) for "following" > usage. Imagine wordlist: >> words > navigate distance position sinus sinus speed height sinus .... > > The Q: which sinus word will be used in speed and height calculations? Assuming height calls sinus. When height is compiled, it searches for sinus in the current wordlist. So it finds > navigate distance position sinus sinus speed height sinus .... ------------------------------------------------------^^^^ this one. HOWEVER, sinus is redefined twice. When position is compiled, it will find > navigate distance position sinus sinus speed height sinus .... -----------------------------^^^^^ this one. Same when you call it interactively in this state of definitions. And redefining sinus will *NOT* change the reference to the older version of sinus in height. I'm sure you have consulted http://home.iae.nl/users/mhx/sf.html Chapter 9 (under the hood) gives a brief outline, how dictionary entries are organized. Cheers, Erich |
|
From: <an...@ki...> - 2010-07-04 11:02:41
|
The last definition you wrote is the one that gets run when you invoke the word. So for :- >> words > navigate distance position sinus sinus speed height sinus .... ........................................................* Assuming left hand side is the start or oldest end of the wordlist and right is the end or newest end of the wordlist. The asterisk is marking the one that would be used. The others are waste. For the purposes of Space Technology this is actually a good feature. Imagine that a stray bit of cosmic radiation zaps through your controllers memory and screws up the last sinus word in the list. You dont want to try and recovery all the memory that the defintion occupied becasue there is no way for you to tell which bit has been zapped. You just define sinus again. the new definition coming closer to the end of the list is used in preference to the screwed one and your satellite is returned to full service. If you were developing code in situ as a development thing you would marker before you started. Develop and when happy invoke the marker and reload just the good code bits. Eliminating all the trial and error along the way. FORTH has apparently been used in several space programs because of these types of features. ie your mission is remotely repairable and therefore less likely to fail. Hope this helps. Cheers Andy Kirby On 04/07/10 11:46, pito wrote: > Andy, after I rised the Q I did it directly with my dev system. Frankly > the way how it works is changing my understanding for "interactivity". > Basically you cannot delete wrong words so the space occupied will grow. > Imagine my apollo picosatellite flying in the space and I am tweaking > the sw in its guidance computer. So I have to have at least a chance > activate/deactivate specific words. As I've seen the forth manual the > last definition of a word is valid. So you may have many words with > same name, however the last one will be used (am I right?) for "following" > usage. Imagine wordlist: >> words > navigate distance position sinus sinus speed height sinus .... > > The Q: which sinus word will be used in speed and height calculations? > > Sorry for this elementar Q, however I think one has to understand the > concepts... > Pito > > > ----- PŮVODNÍ ZPRÁVA ----- > Od: an...@ki... > Komu: amf...@li... > Předmět: Re: [Amforth-devel] Starting with amforth v4 > Datum: 4.7.2010 - 12:02:46 > >> Interesting question. >> >> I am afraid my understanding is that when you marker >> you delete >> everything back to the marker. Other markers as well. >> >> Managing linked lists etc on microcontrolers with limited >> space can be >> problematic. You dont have the memory to reorganize >> the memory space to >> free up bits of space in the middle of lumps of good >> code. Who is to say >> that the next bit of code would fit that space ??? >> >> The technique then is to purge from the end of the >> list wherever that >> may be back to the marker. >> >> So for >> >>> bla bla -foo3 hello hello -foo2 happy happy -foo1 >>> >> doing -foo2 would give you..... >> >>> bla bla -foo3 hello hello >> >> Doing -foo1 would be pointless. >> >> Doing -foo3 would give........ >> >>> bla bla >> >> Happy to be told I have got the wrong end of the stick >> though. >> >> Cheers >> >> Andy Kirby >> >> >> >> On 03/07/10 19:53, pito wrote: >>> Matthias, >>> I see the marker usage with sieve example. If you >>> mark the set of words >>>> with -foo2 where is the end of the marked area (as >>> you may have X words >>>> defined)? Is that the next new marker position? It >>> means (wordlist): >>>> >>> bla bla -foo3 hello hello -foo2 happy happy -foo1 >>>> <-----------> <---------------> <---------------> >>> the area of marker >>>> >>> -foo2 >>> >>> bla bla -foo3 happy happy -foo1 >>> <-----------> <---------------> >>> >>> or >>> >>> bla bla -foo3 ...................happy happy -foo1 >>> ?? >>>> <-----------> <---------------> >>>> >>> My understanding is it works like a "file system" >>> so a deleted -foo will >>>> create a free space for new words - am I right? >>> As I uploaded lot of stuff for my naive experiments >>> and the word list >>>> is now very long so the way how the list is maintained >>> seems to be a >>>> challenge.. >>> Pito >>> >>> ----- PŮVODNÍ ZPRÁVA ----- >>> Od: "Matthias Trute" <mt...@we...> >>> Komu: "Everything around amforth" <amf...@li...> >>>>>> Předmět: Re: [Amforth-devel] Starting with amforth >>> v4 >>>> Datum: 3.7.2010 - 13:55:30 >>> >>>> Hi Pito, >>>> >>>>> My previous Q to the interactivity - so my understanding >>>>>>>> is you may delete >>>>>> words from flash w/o burning new image. >>>> >>>> Just do a >>>> >>>> marker -foo >>>> : bar ; >>>> : baz bar ; >>>> ... use bar and baz and... >>>> >>>> now get rid of bar >>>> >>>> -foo >>>> >>>> and both bar/baz and -foo are gone. The only real >>>> difference >>>>>> from a >>>> users point of view is some planning with the -foo >>>>>> thing. Most of my >>>> source files define such markes... >>>> >>>>> However let us mind the atmel >>>>> flash and eeprom endurance.. >>>> >>>> I still use the very first atmegas for developing, >>>>>> they have seen >>>> versions pre-0.1 and still work. And replacing a >>>> DIP >>>>>> package is >>>> easy... >>>> >>>> Matthias >>> >>> >>> >>> ------------------------------------------------------------------------------ >>>>>> This SF.net email is sponsored by Sprint >>> What will you do first with EVO, the first 4G phone? >>>> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first >>>> _______________________________________________ >>> Amforth-devel mailing list >>> Amf...@li... >>> https://lists.sourceforge.net/lists/listinfo/amforth-devel >>>> >> >> ------------------------------------------------------------------------------ >>> This SF.net email is sponsored by Sprint >> What will you do first with EVO, the first 4G phone? >> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first >> _______________________________________________ >> Amforth-devel mailing list >> Amf...@li... >> https://lists.sourceforge.net/lists/listinfo/amforth-devel > > > |
|
From: pito <pi...@vo...> - 2010-07-04 11:16:26
|
Andy, so the forth when parsing any word in wordlist is using always the newest word defined(from lefthanside or newest defined in the wordlist) so the word height will use the word sinus next right to the word position..? Pito ----- PŮVODNÍ ZPRÁVA ----- Od: an...@ki... Komu: "pito" <pi...@vo...> Předmět: Re: [Amforth-devel] Starting with amforth v4 Datum: 4.7.2010 - 13:02:32 > The last definition you wrote is the one that gets > run when you invoke > the word. > > So for :- > > >> words > > navigate distance position sinus sinus speed height > > sinus .... > > > ........................................................* > > Assuming left hand side is the start or oldest end > of the wordlist and > right is the end or newest end of the wordlist. The > asterisk is marking > the one that would be used. The others are waste. > > For the purposes of Space Technology this is actually > a good feature. > > Imagine that a stray bit of cosmic radiation zaps through > your > controllers memory and screws up the last sinus word > in the list. > > You dont want to try and recovery all the memory that > the defintion > occupied becasue there is no way for you to tell which > bit has been zapped. > > You just define sinus again. the new definition coming > closer to the end > of the list is used in preference to the screwed one > and your satellite > is returned to full service. > > If you were developing code in situ as a development > thing you would > marker before you started. Develop and when happy invoke > the marker and > reload just the good code bits. Eliminating all the > trial and error > along the way. > > FORTH has apparently been used in several space programs > because of > these types of features. ie your mission is remotely > repairable and > therefore less likely to fail. > > Hope this helps. > > Cheers > > Andy Kirby > > > > On 04/07/10 11:46, pito wrote: > > Andy, after I rised the Q I did it directly with > > my dev system. Frankly > > > the way how it works is changing my understanding > > for "interactivity". > > > Basically you cannot delete wrong words so the space > > occupied will grow. > > > Imagine my apollo picosatellite flying in the space > > and I am tweaking > > > the sw in its guidance computer. So I have to have > > at least a chance > > > activate/deactivate specific words. As I've seen > > the forth manual the > > > last definition of a word is valid. So you may have > > many words with > > > same name, however the last one will be used (am > > I right?) for "following" > > > usage. Imagine wordlist: > >> words > > navigate distance position sinus sinus speed height > > sinus .... > > > > > The Q: which sinus word will be used in speed and > > height calculations? > > > > > Sorry for this elementar Q, however I think one has > > to understand the > > > concepts... > > Pito > > > > > > ----- PŮVODNÍ ZPRÁVA ----- > > Od: an...@ki... > > Komu: amf...@li... > > Předmět: Re: [Amforth-devel] Starting with amforth > > v4 > > > Datum: 4.7.2010 - 12:02:46 > > > >> Interesting question. > >> > >> I am afraid my understanding is that when you marker > >> >> you delete > >> everything back to the marker. Other markers as > >> well. > >> >> > >> Managing linked lists etc on microcontrolers with > >> limited > >> >> space can be > >> problematic. You dont have the memory to reorganize > >> >> the memory space to > >> free up bits of space in the middle of lumps of > >> good > >> >> code. Who is to say > >> that the next bit of code would fit that space ??? > >> >> > >> The technique then is to purge from the end of the > >> >> list wherever that > >> may be back to the marker. > >> > >> So for > >> > >>> bla bla -foo3 hello hello -foo2 happy happy -foo1 > >>> >>> > >> doing -foo2 would give you..... > >> > >>> bla bla -foo3 hello hello > >> > >> Doing -foo1 would be pointless. > >> > >> Doing -foo3 would give........ > >> > >>> bla bla > >> > >> Happy to be told I have got the wrong end of the > >> stick > >> >> though. > >> > >> Cheers > >> > >> Andy Kirby > >> > >> > >> > >> On 03/07/10 19:53, pito wrote: > >>> Matthias, > >>> I see the marker usage with sieve example. If you > >>> >>> mark the set of words > >>>> with -foo2 where is the end of the marked area > >>>> (as > >>>> >>> you may have X words > >>>> defined)? Is that the next new marker position? > >>>> It > >>>> >>> means (wordlist): > >>>> > >>> bla bla -foo3 hello hello -foo2 happy happy -foo1 > >>> >>>> <-----------> <---------------> <---------------> > >>>> >>> the area of marker > >>>> > >>> -foo2 > >>> > >>> bla bla -foo3 happy happy -foo1 > >>> <-----------> <---------------> > >>> > >>> or > >>> > >>> bla bla -foo3 ...................happy happy -foo1 > >>> >>> ?? > >>>> <-----------> <---------------> > >>>> >>>> > >>> My understanding is it works like a "file system" > >>> >>> so a deleted -foo will > >>>> create a free space for new words - am I right? > >>>> >>> As I uploaded lot of stuff for my naive experiments > >>> >>> and the word list > >>>> is now very long so the way how the list is maintained > >>>> >>> seems to be a > >>>> challenge.. > >>> Pito > >>> > >>> ----- PŮVODNÍ ZPRÁVA ----- > >>> Od: "Matthias Trute" <mt...@we...> > >>> Komu: "Everything around amforth" <amf...@li...> > >>> > >>> >>>>>> Předmět: Re: [Amforth-devel] Starting with > >>>>>> amforth > >>>>>> >>> v4 > >>>> Datum: 3.7.2010 - 13:55:30 > >>> > >>>> Hi Pito, > >>>> > >>>>> My previous Q to the interactivity - so my understanding > >>>>> >>>>>>>> is you may delete > >>>>>> words from flash w/o burning new image. > >>>> > >>>> Just do a > >>>> > >>>> marker -foo > >>>> : bar ; > >>>> : baz bar ; > >>>> ... use bar and baz and... > >>>> > >>>> now get rid of bar > >>>> > >>>> -foo > >>>> > >>>> and both bar/baz and -foo are gone. The only real > >>>> >>>> difference > >>>>>> from a > >>>> users point of view is some planning with the > >>>> -foo > >>>> >>>>>> thing. Most of my > >>>> source files define such markes... > >>>> > >>>>> However let us mind the atmel > >>>>> flash and eeprom endurance.. > >>>> > >>>> I still use the very first atmegas for developing, > >>>> >>>>>> they have seen > >>>> versions pre-0.1 and still work. And replacing > >>>> a > >>>> >>>> DIP > >>>>>> package is > >>>> easy... > >>>> > >>>> Matthias > >>> > >>> > >>> > >>> ------------------------------------------------------------------------------ > >>> > >>> >>>>>> This SF.net email is sponsored by Sprint > >>> What will you do first with EVO, the first 4G phone? > >>> >>>> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first > >>> >>>> > >>>> >>>> _______________________________________________ > >>>> >>> Amforth-devel mailing list > >>> Amf...@li... > >>> https://lists.sourceforge.net/lists/listinfo/amforth-devel > >>> >>>> > >> > >> ------------------------------------------------------------------------------ > >> > >> >>> This SF.net email is sponsored by Sprint > >> What will you do first with EVO, the first 4G phone? > >> >> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first > >> >> > >> >> _______________________________________________ > >> Amforth-devel mailing list > >> Amf...@li... > >> https://lists.sourceforge.net/lists/listinfo/amforth-devel > >> > > > > > |
|
From: pito <pi...@vo...> - 2010-07-04 11:09:28
|
Andy, No, the wordlist is as printed out with "words". So lefthandside are the newest defined. Pito ----- PŮVODNÍ ZPRÁVA ----- Od: an...@ki... Komu: "pito" <pi...@vo...> Předmět: Re: [Amforth-devel] Starting with amforth v4 Datum: 4.7.2010 - 13:02:32 > The last definition you wrote is the one that gets > run when you invoke > the word. > > So for :- > > >> words > > navigate distance position sinus sinus speed height > > sinus .... > > > ........................................................* > > Assuming left hand side is the start or oldest end > of the wordlist and > right is the end or newest end of the wordlist. The > asterisk is marking > the one that would be used. The others are waste. > > For the purposes of Space Technology this is actually > a good feature. > > Imagine that a stray bit of cosmic radiation zaps through > your > controllers memory and screws up the last sinus word > in the list. > > You dont want to try and recovery all the memory that > the defintion > occupied becasue there is no way for you to tell which > bit has been zapped. > > You just define sinus again. the new definition coming > closer to the end > of the list is used in preference to the screwed one > and your satellite > is returned to full service. > > If you were developing code in situ as a development > thing you would > marker before you started. Develop and when happy invoke > the marker and > reload just the good code bits. Eliminating all the > trial and error > along the way. > > FORTH has apparently been used in several space programs > because of > these types of features. ie your mission is remotely > repairable and > therefore less likely to fail. > > Hope this helps. > > Cheers > > Andy Kirby > > > > On 04/07/10 11:46, pito wrote: > > Andy, after I rised the Q I did it directly with > > my dev system. Frankly > > > the way how it works is changing my understanding > > for "interactivity". > > > Basically you cannot delete wrong words so the space > > occupied will grow. > > > Imagine my apollo picosatellite flying in the space > > and I am tweaking > > > the sw in its guidance computer. So I have to have > > at least a chance > > > activate/deactivate specific words. As I've seen > > the forth manual the > > > last definition of a word is valid. So you may have > > many words with > > > same name, however the last one will be used (am > > I right?) for "following" > > > usage. Imagine wordlist: > >> words > > navigate distance position sinus sinus speed height > > sinus .... > > > > > The Q: which sinus word will be used in speed and > > height calculations? > > > > > Sorry for this elementar Q, however I think one has > > to understand the > > > concepts... > > Pito > > > > > > ----- PŮVODNÍ ZPRÁVA ----- > > Od: an...@ki... > > Komu: amf...@li... > > Předmět: Re: [Amforth-devel] Starting with amforth > > v4 > > > Datum: 4.7.2010 - 12:02:46 > > > >> Interesting question. > >> > >> I am afraid my understanding is that when you marker > >> >> you delete > >> everything back to the marker. Other markers as > >> well. > >> >> > >> Managing linked lists etc on microcontrolers with > >> limited > >> >> space can be > >> problematic. You dont have the memory to reorganize > >> >> the memory space to > >> free up bits of space in the middle of lumps of > >> good > >> >> code. Who is to say > >> that the next bit of code would fit that space ??? > >> >> > >> The technique then is to purge from the end of the > >> >> list wherever that > >> may be back to the marker. > >> > >> So for > >> > >>> bla bla -foo3 hello hello -foo2 happy happy -foo1 > >>> >>> > >> doing -foo2 would give you..... > >> > >>> bla bla -foo3 hello hello > >> > >> Doing -foo1 would be pointless. > >> > >> Doing -foo3 would give........ > >> > >>> bla bla > >> > >> Happy to be told I have got the wrong end of the > >> stick > >> >> though. > >> > >> Cheers > >> > >> Andy Kirby > >> > >> > >> > >> On 03/07/10 19:53, pito wrote: > >>> Matthias, > >>> I see the marker usage with sieve example. If you > >>> >>> mark the set of words > >>>> with -foo2 where is the end of the marked area > >>>> (as > >>>> >>> you may have X words > >>>> defined)? Is that the next new marker position? > >>>> It > >>>> >>> means (wordlist): > >>>> > >>> bla bla -foo3 hello hello -foo2 happy happy -foo1 > >>> >>>> <-----------> <---------------> <---------------> > >>>> >>> the area of marker > >>>> > >>> -foo2 > >>> > >>> bla bla -foo3 happy happy -foo1 > >>> <-----------> <---------------> > >>> > >>> or > >>> > >>> bla bla -foo3 ...................happy happy -foo1 > >>> >>> ?? > >>>> <-----------> <---------------> > >>>> >>>> > >>> My understanding is it works like a "file system" > >>> >>> so a deleted -foo will > >>>> create a free space for new words - am I right? > >>>> >>> As I uploaded lot of stuff for my naive experiments > >>> >>> and the word list > >>>> is now very long so the way how the list is maintained > >>>> >>> seems to be a > >>>> challenge.. > >>> Pito > >>> > >>> ----- PŮVODNÍ ZPRÁVA ----- > >>> Od: "Matthias Trute" <mt...@we...> > >>> Komu: "Everything around amforth" <amf...@li...> > >>> > >>> >>>>>> Předmět: Re: [Amforth-devel] Starting with > >>>>>> amforth > >>>>>> >>> v4 > >>>> Datum: 3.7.2010 - 13:55:30 > >>> > >>>> Hi Pito, > >>>> > >>>>> My previous Q to the interactivity - so my understanding > >>>>> >>>>>>>> is you may delete > >>>>>> words from flash w/o burning new image. > >>>> > >>>> Just do a > >>>> > >>>> marker -foo > >>>> : bar ; > >>>> : baz bar ; > >>>> ... use bar and baz and... > >>>> > >>>> now get rid of bar > >>>> > >>>> -foo > >>>> > >>>> and both bar/baz and -foo are gone. The only real > >>>> >>>> difference > >>>>>> from a > >>>> users point of view is some planning with the > >>>> -foo > >>>> >>>>>> thing. Most of my > >>>> source files define such markes... > >>>> > >>>>> However let us mind the atmel > >>>>> flash and eeprom endurance.. > >>>> > >>>> I still use the very first atmegas for developing, > >>>> >>>>>> they have seen > >>>> versions pre-0.1 and still work. And replacing > >>>> a > >>>> >>>> DIP > >>>>>> package is > >>>> easy... > >>>> > >>>> Matthias > >>> > >>> > >>> > >>> ------------------------------------------------------------------------------ > >>> > >>> >>>>>> This SF.net email is sponsored by Sprint > >>> What will you do first with EVO, the first 4G phone? > >>> >>>> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first > >>> >>>> > >>>> >>>> _______________________________________________ > >>>> >>> Amforth-devel mailing list > >>> Amf...@li... > >>> https://lists.sourceforge.net/lists/listinfo/amforth-devel > >>> >>>> > >> > >> ------------------------------------------------------------------------------ > >> > >> >>> This SF.net email is sponsored by Sprint > >> What will you do first with EVO, the first 4G phone? > >> >> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first > >> >> > >> >> _______________________________________________ > >> Amforth-devel mailing list > >> Amf...@li... > >> https://lists.sourceforge.net/lists/listinfo/amforth-devel > >> > > > > > |
|
From: Kalus M. <mic...@on...> - 2010-07-04 12:32:11
|
Hi. Am 04.07.2010 um 13:09 schrieb pito: > Andy, > No, the wordlist is as printed out with "words". So lefthandside are > the newest defined. > Pito > .. >>>> words >>> navigate distance position sinus sinus speed height >>> sinus .... >>> navigate is last defined word. If position, distance and navigate use sinus, they use the 3rd (latest) sinus defined. If speed and height use sinus, they use the first sinus. Second sinus is not uses at all. If you want speed and height and position and distance and navigate all use the same sinus do it like this: defere sinus : sinus1 <some.code> ; ' sinus1 is sinus And later my be you have a : sinus2 <some.other.code> ; Now you can say ' sinus2 is sinus So this way they all use the same sinus. Michael |
|
From: Erich W. <ew....@na...> - 2010-07-03 10:30:23
|
Hi, just for the records: On 07/03/2010 10:23 AM, Matthias Trute wrote: > I use the amforth-upload.py a lot. Just have a look at the howto > section. I use amforth-upload.py as well. However, I have noticed that the script apparently does not know/check the settings of the serial port (speed, parity, etc). Thus I use minicom to connect to the controller first, then amforth-upload.py will work nicely. Cheers, Erich |
|
From: Matthias T. <mt...@we...> - 2010-07-03 11:50:05
|
Hi Erich, > I use amforth-upload.py as well. However, I have noticed that the > script apparently does not know/check the settings of the serial > port (speed, parity, etc). Thus I use minicom to connect to the > controller first, then amforth-upload.py will work nicely. Interesting thing. Do want to send me a patch? ;=) I put on my todo list... Matthias |
|
From: pito <pi...@vo...> - 2010-07-04 12:03:38
|
Erich, this is a bad news. It contradicts to what Andy indicated - the height will use THE NEWEST defined sinus. If the height would have used the newest defined sinus I would call it a big plus for forth. There must be I guess a simple mechanism where the newest defined sinus will change all the references in all the other words which call the sinus. If I uplaod a new sinus word to my satellite I would be very happy that all the words will use the new sinus. Pito ----- PŮVODNÍ ZPRÁVA ----- Od: "Erich Waelde" <ew....@na...> Komu: amf...@li... Předmět: Re: [Amforth-devel] Starting with amforth v4 Datum: 4.7.2010 - 13:31:23 > Hello, > > On 07/04/2010 12:46 PM, pito wrote: > > Andy, after I rised the Q I did it directly with > > my dev system. Frankly > > > the way how it works is changing my understanding > > for "interactivity". > > > Basically you cannot delete wrong words so the space > > occupied will grow. > > > Imagine my apollo picosatellite flying in the space > > and I am tweaking > > > the sw in its guidance computer. So I have to have > > at least a chance > > > activate/deactivate specific words. As I've seen > > the forth manual the > > > last definition of a word is valid. So you may have > > many words with > > > same name, however the last one will be used (am > > I right?) for "following" > > > usage. Imagine wordlist: > >> words > > navigate distance position sinus sinus speed height > > sinus .... > > > > > The Q: which sinus word will be used in speed and > > height calculations? > > > Assuming height calls sinus. When height is compiled, > it searches > for sinus in the current wordlist. So it finds > > > navigate distance position sinus sinus speed height > > sinus .... > > ------------------------------------------------------^^^^ > this one. > > HOWEVER, sinus is redefined twice. When position is > compiled, > it will find > > navigate distance position sinus sinus speed height > > sinus .... > > -----------------------------^^^^^ > this one. Same when you call it interactively in this > state > of definitions. > > And redefining sinus will *NOT* change the reference > to > the older version of sinus in height. > > > I'm sure you have consulted > http://home.iae.nl/users/mhx/sf.html > Chapter 9 (under the hood) gives a brief outline, how > dictionary entries are organized. > > > Cheers, > Erich > > ------------------------------------------------------------------------------ > > This SF.net email is sponsored by Sprint > What will you do first with EVO, the first 4G phone? > Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first > _______________________________________________ > Amforth-devel mailing list > Amf...@li... > https://lists.sourceforge.net/lists/listinfo/amforth-devel |
|
From: Matthias T. <mt...@we...> - 2010-07-04 12:43:27
|
Hi, > Erich, this is a bad news. It contradicts to what Andy indicated - the > height will use THE NEWEST defined sinus. If the height would have used > the newest defined sinus I would call it a big plus for forth. What you want to achieve can be done by using deferred words. They are designed to resolve the code to be executed at runtime. Normal forth code is resolved at compile time. Erichs explaination is absolutly correct. amforth supports deferred words in a few different ways: Edefer uses EEPROM cells, Rdefer ordinary RAM cells and Udefer uses task specific User Variables. Details of how deferred words in general are at the forth200x website (http://www.forth200x.org/deferred.html > There must be I guess a simple mechanism where the newest defined sinus will > change all the references in all the other words which call the sinus. You can iterate over the whole dictionary and replace all occurances of the old sinus with your new one. But no marker/forget will undo that. > If I uplaod a new sinus word to my satellite I would be very happy that > all the words will use the new sinus. Pito see above: If you plan to replace the sinus any time later on, make it deferred. amforth has a few deferred words, the most important ones are probably turnkey and pause. Matthias |