I have been writing a PC emulator in JavaScript and HTML5 for the sake of understanding every single concept of an 8086 PC as a minimum (e.g., every single functionality to implement VGA text and graphics modes, truly emulating them with accuracy), and exactly how the algorithms for the CPU and FPU instructions work, as well as how to perform the same actions a PIT, PIC, PS/2 controller/keyboard/mouse, DMA, floppy, hard disk and BIOS.
For the BIOS, I bought 3 books from Amazon. These books don't talk only about the INT services of the BIOS, but about every single step to perform the different actions of a BIOS:
System BIOS for IBM PCs, Compatibles, and EISA Computers (2nd Edition)
ABIOS for IBM(R) PS/2(R) Computers and Compatibles: The Complete Guide to ROM-Based System Software for OS/2(R)
CBIOS for IBM(R) PS/2(R) Computers and Compatibles: The Complete Guide to ROM-based System Software for DOS
I also bought the book about FreeDOS, to have some reliable code and concepts to work as I progressed with implementing the CPU instructions, and the BIOS, as per the concern of this thread:
FreeDOS Kernel: An MS-DOS Emulator for Platform Independence & Embedded System Development
Then, the Ralf Brown's interrupt reference.
I also have looked for BIOS source code (use a search engine to dig around).
Finally, a reference with the original instructions and some BIOS and general motherboard information about the 8086/8088 will be nice. The one I used is
IBM PC-XT Technical Reference Manual.
Then it is just about keep digging here and there (looking up for "BIOS" and related keywords), and understand things over time. I don't know how much you want to learn about the BIOS, but at least for me, in the need to understand 100% standard machines, the easiest way to do that is slowly implementing a PC emulator, which includes the BIOS and the video BIOS of course.
So I will use all of the above, I will try to implement functionality over time, and if I can understand it, I will use the references others have given (SeaBIOS, Bochs BIOS, CoreBoot, FreeBIOS).
And don't forget to search until you find BIOS source code, be it for AT or whatever. Something like this:
http://www.intel-assembler.it/portale/5/ibm-at-286-souce-code/ibm-at-286-souce-code.asp
If you can, look for more material somewhere.
__________________________________________
Prochamber wrote:Gigasoft wrote:Prochamber wrote:On real hardware BIOS would start at 0x000FFFF0 and jump to a lower address within the motherboard BIOS ROM area.
On your emulator 'VMWare player' it starts at the 0xFFFFFFF0. It is impossible for real hardware to do this because it is outside the first megabyte, therefore not accessible in real mode. However emulators don't have to play by the rules and is probably performing some kind of early startup (maybe emulator-specific) tasks away from the memory area your operating system is going to use.
What? Where do you get all this from? Please read the manual again carefully. VMWare Player is functioning just like it should.
I meant that it would be important to note that this wouldn't happen on real hardware, since the OP is studying BIOS.
I have read about that first jump in manuals for 386 CPUs and above (that there are some 15 bytes to perform that jump to the BIOS code entry point; so if you think about how to do that in an emulator, some circuitry would need to place a correct jump instruction at that address). Once you jump to a lower memory area, you cannot set EIP to a value greater than 0xFFFF unless you enter Protected Mode. Isn't that so? Of course, that is only of interest to very early startup code from the motherboard. An OS developer would never be concerned with that. By the time an OS is booting, things like the above would already be irrelevant.
To study about how the PC starts and some of the BIOS, but specially for an emulator, understanding that has some importance, since it has to do with the right way to emulate the startup of a CPU core.
Prochamber wrote:iansjack wrote:Yep. the original IBM PC was supplied with a manual that contained a complete assembler listing of the BIOS. How things have changed.
You probably wouldn't
want to know the nasty hacks hardware manufacturers are using these days.
I would, and would also like to see PCs made standard again, because they are no longer a standarized platform in practice, due to too many different peripherals/drivers for the same tasks.