Hi Jan,

On 05/31/2012 06:01 PM, Jan Kromhout wrote:
> 
> Hi Erich This is the answer that I get from amForth    amforth 4.8 ATmega328P
>>
>   ok
>>
>   ok
>> forth
> forth ?? -13 5
>> FORTH
> FORTH ?? -13 5

If you get error -13, which is "word not found",
then this word should not show up in the output of
" words ". Did you check that?

This means, your question is "how do I get the word
forth into the installed amforth?".

First: find, where "forth" is defined:

        cd /home/my/path/to/amforth
        grep -rl '"forth"' ./trunk
        
./trunk/doc/TechnicalGuide/.svn/text-base/amforth-architecture.xml.svn-base
        ./trunk/doc/TechnicalGuide/amforth-architecture.xml
        ./trunk/core/words/.svn/text-base/forth.asm.svn-base
        ./trunk/core/words/forth.asm

Please note the single+double quotes. I want to find the string
including its enclosing double quotes. Otherwise I will get too many
matches.

So it finds 4 files. 2 of them are items in the subversion
version control infrastructure (*.svn-base), so I ignore
those. The file
        ./trunk/core/words/forth.asm
holds the definition of the word.
        cat ./trunk/core/words/forth.asm
        ; ( -- ) 
        ; Search Order
        ; replace the search order list with the system default list
        VE_FORTH:
            .dw $ff05
            .db "forth",0                <== this is the entry in the wordlist
            .dw VE_HEAD
            .set VE_HEAD = VE_FORTH
        XT_FORTH:
            .dw DO_COLON
        PFA_FORTH:
            .dw XT_GET_ORDER
            .dw XT_SWAP
            .dw XT_DROP
            .dw XT_FORTH_WORDLIST
            .dw XT_SWAP
            .dw XT_SET_ORDER
            .dw XT_EXIT

We know now, in which file the definition resides.
Second: we need to see, whether this file is included somewhere, or not.

        grep -rl 'include "words/forth.asm"' ./trunk 
        ./trunk/core/dict_wl.inc
        ./trunk/core/.svn/text-base/dict_wl.inc.svn-base

There is an include statement in dict_wl.inc.

        cat ./trunk/core/dict_wl.inc
        .include "words/set-current.asm"
        .include "words/previous.asm"
        .include "words/definitions.asm"
        .include "words/wordlist.asm"
        
        .include "words/only.asm"
        .include "words/forth.asm"
        .include "words/forth-wordlist.asm"
        .include "words/also.asm"
        .include "words/set-order.asm"
        .include "words/order.asm"


So this is the file you want to add into your local dict_appl.inc

Third: if forth.asm is not included in some "dict_*.inc" file, then
you add this to your local dict_appl.inc file.

        .include "dict_wl.inc"



Moral: amforth does not include more than it needs itself to function
properly. This is a concious decision towards keeping the amforth
system on the controller as small as possible. However, the programmer
has full control to include whatever is missing for his/her particular
piece of code.

Hope this helps,
Erich



> Sommeting wrong with the definition of vacabulary or the other words?
>   Cheers, Jan>  Date: Thu, 31 May 2012 12:31:24 +0200
>> From: ew.fo...@nassur.net
>> To: amforth-devel@lists.sourceforge.net
>> Subject: Re: [Amforth] Vocabulary
>>
>> Hi Jan,
>>
>> On 05/31/2012 12:14 PM, Jan Kromhout wrote:
>>>
>>> Hello, I tested the word vocabulary with vocabulary test-vocabulary
>>> only forth also test-vocabulary definitions: test1 ." test1" ;
>>> : test2 ." test2" ;
>>> : test3 ." test3" ;
>>> : test4 ." test4" ;
>>> : test5 ." test5" ;previous definitions On one thing all is working fine. 
>>> When I wont
>>> to go back to the Forth vocabulary, in my win32 forth I type in FORTH.When 
>>> I try that
>>> in amForth there is no posibilty to go back.System is not recognise anny 
>>> words except
>>> the ones in the vocabulary. What should I do? Thanks for anny help.
>>   >
>>
>> "FORTH" or "forth" ?
>>
>> Please note, that amforth is case-sensitive. Looking at
>>    http://amforth.sourceforge.net/words/index.html
>> the word "forth" (lower case) is available.
>>
>>
>> Cheers,
>> Erich
>>
>> ------------------------------------------------------------------------------
>> Live Security Virtual Conference
>> Exclusive live event will cover all the ways today's security and
>> threat landscape has changed and how IT managers can respond. Discussions
>> will include endpoint security, mobile security and the latest in malware
>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>> _______________________________________________
>> Amforth-devel mailing list for http://amforth.sf.net/
>> Amforth-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/amforth-devel
>                                       
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Amforth-devel mailing list for http://amforth.sf.net/
> Amforth-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/amforth-devel


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Amforth-devel mailing list for http://amforth.sf.net/
Amforth-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amforth-devel

Reply via email to