Jump to content

Questions regarding writing a BIOS


Kempy
 Share

Recommended Posts

Right, I need some help from you CompSci guys out there.
On early computers (IBM PC/XT/AT era), was MS-DOS dependent on BIOS interrupts to perform certain functions? Also, does this mean that the versions of DOS a computer could run is limited by whether or not a particular BIOS interrupt routine was available on the ROM? If this is true, I hope that there is a resource somewhere which lists the BIOS interrupts required for DOS to run, so that a BIOS could be designed around a particular version of DOS.

Any clarification from anyone who knows more about software than I do would be fantastic.

Link to comment
Share on other sites

On early computers (IBM PC/XT/AT era), was MS-DOS dependent on BIOS interrupts to perform certain functions?

I won't say it was dependent on it, an example seen by programmers bypassing BIOS to access the graphics hardware. But to my understanding, BIOS used to work as an interface between the operating system and the hardware. So even if it was possible to bypass, I don't know that is was actually done. So I guess the answer is yes, pretty much.

 

http://en.wikipedia.org/wiki/INT_13H

http://en.wikipedia.org/wiki/BIOS_interrupt_call

 

Also, does this mean that the versions of DOS a computer could run is limited by whether or not a particular BIOS interrupt routine was available on the ROM?

Not quite. BIOS has changed very very little over the years. And, since BIOS became the de facto standard, operating systems were written with BIOS in mind. The makers of the operating systems simply didn't include functionality that would require a "special version of BIOS" or anything like it. There was just one interface, and they had to deal with it.

Link to comment
Share on other sites

DOS allowed the applications to access the Bios interrupts, but also to bypass them.

 

For Windows, beginning with 95 (and maybe Nt3), the OS has its own functions to access the hardware that do not call Bios interrupts.

 

For Windows Nt series, at least from 2000 (and possibly before), the OS prohibits applications to access the Bios interrupts. This is a major step towards safety, but prevents some applications to run, notably the ones dating back to Ms-dos that accessed the Bios interrupts and possibly the hardware directly.

 

For Windows Nt series, one must distinguish the administrator session from power users and normal users. The administrator session (and the system of course) can access the hardware through more direct Windows functions, for instance read a disk sector by its number, instead of a position in a file defined by Windows. This explains why some disk measurement tools can test a disk at locations where files already exist, or a disk where no partition has been created; these need the administrator mode, or rely on a server task in admin mode - while the other test tools create a test file and can run in user mode.

 

The Bios functions evolved little, but as a big benefit, offered a rather uniform interface to varied hardware. Though, they were an awkward limit if some added hardware was not compatible, for instance a disk too big for the CHS mode. Windows not relying on the Bios to access the hardware improved that point but made Win itself less easy to port among different hardwares - and the Bios has first to launch Windows' boot...

Link to comment
Share on other sites

  • 4 weeks later...

It has been a long time since I studied an Intel BIOS. As I recall, it used very few interrupts, reboot being one of them, but it did not use any for I/O, as I recall. The bios is really simple, it initializes the hardware if necessary, and starts a program (e.g., DOS, Windows, Linux, or perhaps your program. BIOS device drivers are quite simple and do not provide drivers for all devices. For example, the Intel BIOS circa DOS had drivers for only two serial ports although microprocessors and some motherboards had four serial ports.

 

The BIOS is in ROM and cannot be changed. However, mostly you can circumvent using it by making your own hardware drivers. Although, some devices have internal ROM that the BIOS or another program may call. Since BIOS are in ROM, it would be fairly expensive to make a BIOS, because you have to have hardware to write into the ROM, and once written you have to throw them away if you have a coding error. I don't know if that ROM is now internal to the microprocessor chip or external. If internal, you might have to work with Intel to program a BIOS. If external, they are likely soldered to the motherboard and difficult or impossible to replace.

 

Good luck.

Link to comment
Share on other sites

Since the last time you checked that, computers have gotten rewritable memory to store the Bios.

Same for all hardware with a microcode, for instance a disk host or a graphics card can receive an update.

One excellent reason for it is that true Rom chips are not available any more.

Link to comment
Share on other sites

Since the last time you checked that, computers have gotten rewritable memory to store the Bios.

Same for all hardware with a microcode, for instance a disk host or a graphics card can receive an update.

One excellent reason for it is that true Rom chips are not available any more.

 

Duh! I knew that, LOL. I was reaching back into my memory to the time before EPROM, EEPROM and flash memory.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.