Menu

pboot completed

I realize that it's a bit of an odd setup, but I created a new standalone 1.44mb floppy image in FAT12 format with boot code that looks for a file named P5KERN.BIN in the root directory of the floppy, loads it to memory location 0x0:0x1700 and then jumps to it. I realize that I could have made it a little more flexible and allowed it to load files of names besides P5BOOT.BIN in directories besides the root directory on disks besides the floppy, but I worked my butt off on this thing, learning the mechanics of FAT12 as I went, so I may work on that later, but not now. You can write this disk to a floppy or virtually mount it(if you're using an emulator, which is probably wise as I have had no problems thus far, but I'm really acting as a large monkey with a crowbar when making this code) and write either the supplied C version of the R0 'kernel' or your own 16-bit (or 32-bit if you manually switch out of real mode first) raw x86 binary code which is aware of a starting address of 0x1700 with the label P5BOOT.BIN

In other concurrent news, I switched the official kernel coding language to ANSI C. In fact, I finished PBOOT quite some time ago; I've been using the rest of the time trying to figure out what language I was going to develop the kernel in. Yes, I realize that the project specifications say C explicitly, and that's what I was planning on using, but it's suprisingly difficult to generate 16-bit code with GCC. I assumed that a simple compiler argument would do the trick, however you actually have to insert an assembler directive into your code which is the equivalent to NASM's [BITS 16]. If I were any good at these things I would have known this. However, I'm not. but I'm learning, right? As well, my development machine is a ppc mac mini and I managed to break the original ppc toolchain trying to build a cross compiler, so I was at an impass for a bit until I got the great idea of installing DJGPP on DOSBox.

If you take a glance at the kernel code you'll notice that there is a stub for FAT12 access which does absolutely nothing. If you noticed that, then you'll also remember that this is a 32-bit OS, meaning that it's independant of any BIOS interrupts. Or should be, rather. In short, the stub is just there because that's what I had done at the time, there's a LOT of things that are technically broken in this code, such as EVERYTHING using BIOS ints. I'll get on that at some point.

Posted by stithyoshi 2006-08-31

Log in to post a comment.

MongoDB Logo MongoDB