* Samuel Rydh samuel@ibrium.se [031030 17:16]:
call ( function_addr -- <whatever> )
Great! I'm trying to make it simple to track the latest openbios source so I'm avoiding MOL specific modifications whenever possible...
I checked this into CVS, so it will be part of BeginAgain 1.2
- Be able to invoke the forth interpreter from C-code
(I think this can be implementable without modifying the kernel code, but I haven't looked into it yet).
Well, I don't need concurrent instances, just recursive. enterforth() seems to be able to handle that. What I need though is runtime translation of C-string forth into tokens. I.e. basically I need to do the same stuff as interpret does. I will look into it;
Ok, I wrote a little example which can be used as a plugin i.e. with: ~/openbios/kernel/obj-x86> ./unix openfirmware.dict -P . -p mol
The C function calls the interpreter giving it the string in forthcode[]. It's the same thing as typing the following on the interpreter: ." This is a forth statement" cr 23 dup
Hope this helps...
Stefan