"Linking" drivers to a binary kernel

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
User avatar
-m32
Member
Member
Posts: 120
Joined: Thu Feb 21, 2008 5:59 am
Location: Ottawa, Canada

Re: "Linking" drivers to a binary kernel

Post 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 ;)
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: "Linking" drivers to a binary kernel

Post 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*
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
fronty
Member
Member
Posts: 188
Joined: Mon Jan 14, 2008 5:53 am
Location: Helsinki

Re: "Linking" drivers to a binary kernel

Post 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.
User avatar
-m32
Member
Member
Posts: 120
Joined: Thu Feb 21, 2008 5:59 am
Location: Ottawa, Canada

Re: "Linking" drivers to a binary kernel

Post 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
egos
Member
Member
Posts: 612
Joined: Fri Nov 16, 2007 1:59 pm

Re: "Linking" drivers to a binary kernel

Post 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.
If you have seen bad English in my words, tell me what's wrong, please.
Post Reply