Should or Shouldn't i use BIOS routines in PMode

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
kan
Posts: 19
Joined: Sat Jan 22, 2005 12:00 am
Location: India

Should or Shouldn't i use BIOS routines in PMode

Post by kan »

hi,
i want my OS to be as Hardware Independent as possible. And for this
should i use BIOS routines for accessing Hardware(eg Floppy,HDD,Graphics Adapter)?? or is there any other technique for same?

According to what i know BIOS routines are 16bit so in Pmode i would have to use V86 mode to call these routines? Right? So would there be a performance hit in switching to V86mode everytime i have to access flpy,hdd or any other BIOS supported Hardware?

I want to avoid writting those very very low level routines(32bit) for accessing hardware devices (flpy,hdd etc) !

So what do u think , should i use BIOS function calls or write my own 32bit drivers to driving various controllers(flpy etc). But don't u think writing 32bit drivers will be very time consuming, and tooo much hardware dependent?????
Nothings Impossible :)
Legend
Member
Member
Posts: 195
Joined: Tue Nov 02, 2004 12:00 am
Contact:

Re: Should or Shouldn't i use BIOS routines in PMode

Post by Legend »

Will there be a performance? As the BIOS in real mode doesn't seem to be fast in all cases - yes!
Is it hardware dependant? Where there are no standards - unfortunately yes!
Will it be easier to implement? From what I have heard, implemeting V86 seems very hard to get right, so it might be just as much work (at least for the basic hardware)
*post*
[AlAdDiN]
Member
Member
Posts: 107
Joined: Fri Oct 22, 2004 11:00 pm
Contact:

Re: Should or Shouldn't i use BIOS routines in PMode

Post by [AlAdDiN] »

@kan : BIOS calls are too slow and will make your OS too dependent to x86 architechture, but if you want to use them i suggest you to use unreal mode instead of pmode
-----------------------
There are 10 types of people in this world... those that understand binary, and those that don't.
frizzz
Member
Member
Posts: 36
Joined: Sat Oct 30, 2004 11:00 pm
Location: Germany
Contact:

Re: Should or Shouldn't i use BIOS routines in PMode

Post by frizzz »

I just published my own assembler OS, which contains drivers for FD and IDE-ATA, written new from scratch using the datasheets of intel and ATA-, T13-commitees. The driver-code works very well an four machines from 1980-2004 (486,pentium.athlon,duron). Look at my homepage:
www.rcfriz.de
If You want to cooperate, contact me at
[email protected]
Post Reply