j
: Next unread message k
: Previous unread message j a
: Jump to all threads
j l
: Jump to MailingList overview
Hello,
I am unable to understand how the forth words are called? The definitions for forth words are maintained in "char *wordnames[]" of "/kernel/bootstrap.c" and in "/kernel/primitive.c" all the functions for primitive words are defined.
When we say "dup" what will be the s/w flow? Please let me know how these two files are interconnected.
Please give me some input with regard to this.
Thanks and Regards Swamy
* Swamy@soc-soft.com Swamy@soc-soft.com [040924 14:52]:
I am unable to understand how the forth words are called? The definitions for forth words are maintained in "char *wordnames[]" of "/kernel/bootstrap.c" and in "/kernel/primitive.c" all the functions for primitive words are defined.
When we say "dup" what will be the s/w flow? Please let me know how these two files are interconnected.
It is really simple:
The forth outer interpreter will look up the execution token (xt) of the word "dup" and "execute" the xt.
Execute will look at the code field address, which could be seen as the type description of the word. It is an index to the words[] array. processxt() will execute the native code.
But actually you don't have to know this either to port OpenBIOS to a new platform, or to enhance the system in any way. What are you exactly working on? This makes me very curious.
Can you maybe provide some writeup of the things you are learning here? It seems to me that many people who are trying to look into the code have your questions.
Please give me some input with regard to this.
The best input is the code!
Stefan