Page 2 of 2

Re: "Linking" drivers to a binary kernel

Posted: Mon Jan 04, 2010 8:22 am
by -m32
Not only is it daunting, it is extremely involved and time consuming.

I've written a compiler & lexical/syntax analyser before. It is no small task.

It could take years to work out all of the semantics in getting such a thing to work for real-world applications. Also, what about language? Should one create a totally new language to accommodate requirements? Use an existing language? Extend an existing language?

Nah, that's beyond what I want to do. I'm already re-inventing one wheel :P

Thanks for the suggestion though.

I'm still investigating solutions for my particular implementation. Once I think of something brilliant, I'll come back and update this thread ;)

Re: "Linking" drivers to a binary kernel

Posted: Mon Jan 04, 2010 10:18 am
by Combuster
I've written a compiler & lexical/syntax analyser before. It is no small task.
How to make a java to native compiler in one day: Know haskell (proven possible, I spent less than 12 hours on that assignment :wink:)

*ducks and runs*

Re: "Linking" drivers to a binary kernel

Posted: Mon Jan 04, 2010 11:31 am
by fronty
Combuster wrote:How to make a java to native compiler in one day: Know haskell (proven possible, I spent less than 12 hours on that assignment :wink:)
Do you have sources somewhere available? I'd like to see how well pure functional languages suit to compiler writing, I have written/participated writing compilers and interpreters only in procedural languages, if you don't count some small interpreter for subset of K&R C in Lisp. I guess something like recursive descent parsing is quite natural thing to write in functional languages.

Re: "Linking" drivers to a binary kernel

Posted: Mon Jan 04, 2010 12:46 pm
by -m32
Combuster wrote: How to make a java to native compiler in one day: Know haskell (proven possible, I spent less than 12 hours on that assignment :wink:)

*ducks and runs*
Smart @$$ :D

Re: "Linking" drivers to a binary kernel

Posted: Tue Jan 05, 2010 9:01 am
by egos
You can include in a driver the import table, which contains standard export indexes for used kernel functions and terminator at the end, and store its address as a global symbol like a driver entry point. Or driver can register this address (for resolving table entries) by calling special function through int interface or through function address parameter transferred to driver.