Driver

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.
Post Reply
User avatar
VolTeK
Member
Member
Posts: 815
Joined: Sat Nov 15, 2008 2:37 pm
Location: The Fire Nation

Driver

Post by VolTeK »

i have a file loaded to 5000h it includes all of my functions for VolTroX Programs. how can i call my functions from 5000h?
User avatar
01000101
Member
Member
Posts: 1599
Joined: Fri Jun 22, 2007 12:47 pm
Contact:

Re: Driver

Post by 01000101 »

maybe a bit more info could help :wink: .

I'm assuming VolTroX is your OS?
You need to make a relocatable file that you can fill in the unresolved function calls dynamically.

Please provide more information about how you would interface with your kernel and other base info.
Ask Smart Questions please. :wink:
User avatar
VolTeK
Member
Member
Posts: 815
Joined: Sat Nov 15, 2008 2:37 pm
Location: The Fire Nation

Re: Driver

Post by VolTeK »

im sorry if i am not very descrete, i have seen code where if you load a file to memory it stays there, is there a way i could use my filesystem to load it but not execute it, can i just call functions from the file loaded in memory?


hows that?
User avatar
neon
Member
Member
Posts: 1567
Joined: Sun Feb 18, 2007 7:28 pm
Contact:

Re: Driver

Post by neon »

GhostXoPCorp wrote:im sorry if i am not very descrete, i have seen code where if you load a file to memory it stays there, is there a way i could use my filesystem to load it but not execute it, can i just call functions from the file loaded in memory?
Two options that I know of:

-Use a linked list (or some sort) of function pointers to those functions in the loaded module, or
-Use a file format that supports dynamic linking (ie elf and pe).
OS Development Series | Wiki | os | ncc
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}
User avatar
Troy Martin
Member
Member
Posts: 1686
Joined: Fri Apr 18, 2008 4:40 pm
Location: Langley, Vancouver, BC, Canada
Contact:

Re: Driver

Post by Troy Martin »

GhostXoPCorp wrote:is there a way i could use my filesystem to load it but not execute it
I would sure as hell hope that your file loading calls are separate from your program execution calls.
Image
Image
Solar wrote:It keeps stunning me how friendly we - as a community - are towards people who start programming "their first OS" who don't even have a solid understanding of pointers, their compiler, or how a OS is structured.
I wish I could add more tex
User avatar
VolTeK
Member
Member
Posts: 815
Joined: Sat Nov 15, 2008 2:37 pm
Location: The Fire Nation

Re: Driver

Post by VolTeK »

i know i have to do that, alright i have found something, thanks for your time
Post Reply