download source code, PXE binary, floppy binary, CD-ROM binary

I guess he really can count...

2009-01-31 00:46:00, Kohlrak

As most of you don't know, in my humble little town of Lewistown, where I reside, there teaches a very, uuuuuuhhh, by the book teacher. Whenever a debate between a student and the book arrives, he almost always sided with the book first. Well, until one day, about a year ago, my Junior year of Highschool. Me and two other students were taking the Advanced Placement Computer Science A course, which was simply a not so in-depth course into Java. Well, we were studying either recursion or step loops, I honestly can't remember since both were an equally old, dry topic for all three of us, but there was some other lesson we were supposed to learn about debugging code the hard way by executing it in our heads. I think there was a fancy name for it, but any attempt to remember it is futile.

It wasn't long before we started to argue with the book on an individual iteration of the loop (or recursive routine), which was "irrelevant," since the end solution was the same anyway. The details of the algorithem and starting values elude my memory, however, the argument hasn't. This particular iteration involved a division of 10 by the number 2. Now, one would imagin that this is simple math, right? Wrong. Upon arguing that 10/2 is 5, not 8 like the teacher edition says, we ended up arguing for half an hour. Eventually, he realized that he was saying 10/2 is 8, and that this is not a true statement. But, he waited to realize that after becomming angry with us for "wasting class time."

Now, less than a week ago, my mind started to wander as we were doing reviews in the Visual Basic 2 (part 2, not version 2) Course, as this was for people who hadn't taken part one in over a year (the district just approved, this year, the teaching of the second half of the book, which informs everyone alot about how technologically advanced my district is). Some of us were also picking on him, again, for his mathematical mistake, and also having our usual talk about hex and assembly verses high level languages. Well, I got to thinking, "What is 10h/2?" To test my theory (as I've come to the inevitable conclusion upon conceiving this idea) I checked my math in Hex mode of the windows calculator (the school district is also very MS friendly), and realized that the book wasn't wrong in saying the result is 8, but wrong in that it did not append an "h" to the original number. Since this wasn't a class that used hex more than chapter one, where it told us that such a notation exists and that magic is needed to use it in Java, hex was the last thing on our four simple minds.

Perhaps we may finally stop picking on our poor computer teacher (who, might I add, is one of those HLL advocates who knows very, very little about assembly, not to mention he was one of those teachers that just happened to be available when computers started to be taught in the district, which was when they took ANYONE who was willing to try it). Or, at least we'll stop picking on him for his mathematical ability, since his age and a few other things are still fair game.


2008-12-30 03:28:00, dustwolf

I was continuing work on the mouse, which was interesting due to being the first device with an IRQ I implemented support for. I worked on general code cleanup as well, split out the old keyboard code, etc.

A Bochs screenshot for your amusement:

It actually works fine on an actual machine as well, though it only supports PS/2 mice (and not say, touchpads, unfortunately for Kohlrak). Work on this was actually somewhat more fun than frustrating, I only gave up twice durring development. IBM manuals saved me here, they're great albeit written in inverse logic: To understand the basics, you have to read the footnotes and vice-versa. I'm guessing this is a classic case of a manual written for those who already know everything and don't need a manual.

As usual there were other docs around, but if you actually read what the IBM docs say some of the stuff was extremelly silly. Can't blame people for not knowing what they're doing I guess, as they prolly reverse-engineered the whole thing from a Linux (which has a big ugly 50 page code hierarchy on mice as usual) or something, but I feel it strange that nobody cared to consider that PS/2 was an IBM thing! Poor IBM.

Rearanged the code so that the debugging macros could be used anywhere. Cursing self for making code look like C with codeless header includes (macro includes), but at least it's still tidy (unlike C). Threw out fancy16, because the kernel boots to graphics mode too fast for you to see it anyway. Renamed some files to keep some sense in filenames. Take a look.

where we are

2008-12-18 02:14:00, dustwolf

Finnaly! The bootable CDROM image is ready.

As Kohlrak finally admits, trying to rely on other people's work has proven to be a futile excercise. Personally I have nothing against other people who contribute code, but you know.. when it doesn't work at the end of the day... well gee. I'd like to think the code we have is more reliable. For one, we really did try it with our code which is provided to you and it really really does work.

It didn't really take us all this time to make it, just life intervened. Now with this ISO headache off our heads and holidays approaching we are more likely to get more done. :)

Stay tuned.


2008-12-01 21:14:00, dustwolf

The work on the cdrom is progressing slowly as it is horribly dull work, but we intend to get it trough (in hopes that with our nifty clean GPL code, nobody will be tempted to do something like this ever again).

I was working on preparing some more documentation. Created INSTALL file with all the software requirements for assembling, testing and publishing microKernel and it's source code. Also created HACKING file with some details useful for people who may find the source code interesting to toy with. Cleaned the code up some, removing various blank or irrelevant files. Also temporarily lost hope in recruiting a maintainer I really hoped would help with the development (smoke) and removed him from the credits, except where his code was used.

Made minor modifications to this website so that you get the download links without having to look for them in the older blogs. Getting ready to publish website in some more places and hopefully get some more people take an interest in the code.

cdrom and ps/2

2008-11-25 04:05:00, dustwolf

So we are back up with no problem.

In this time we have been finnishing off the IDT, which was handled pretty much entirely by Kohlrak, while I finnished up some fancy in the pcspeaker driver as well as some details regarding the IDT.

Then we started on the mouse and keyboard drivers and CD-ROM image booting support, which was pretty much a documentation digging project. We got some nifty IBM manuals from 1990 on the PS/2 which are the very first helpful documents we have seen trough the entire development process thus far (Thank you IBM!). You know I whatched that "Triumph of the nerds" documentary again recently and there was this interview with Bill Gates telling us that IBM was the big bad generic cubicle plus marketting company. Looking at this IBM manual I can find more design genius, hands on approach and efficiency than in all of Microsoft today. Kind of prooves that all MS, Apple, and company were really good at was lying. IBM rules!

The CD-ROM image booting support I did because Kohlrak complains he has no other way of testing the microKernel on his hardware. And I would come to understand most of you probably agree with him. He wanted to go handle it all by himself originally but I figured I best do this since I made the floppy MBR too. I managed to dig up some good docs, specifically the El Torito and ISO9660 specs. Now, we have complained about sillyness in the past and little-endian and A20 really are very very ugly hacks, but this... I could give plenty of color comentary on the decision of the author of the El Torito specification to consider all numbers hex by default... I understand when you spend your life before a hex editor you kind of end up counting everything in hex, but what was the guy smoking when he decided that saying "a CD-ROM sector is 800 bytes" is a perfectly rational way of saying "a CD-ROM sector is 2048 bytes"?! This resulted in more than a few mistakes on my part and plenty of confusion, though some of it could prolly be blamed on lack of sleep.

This wasn't the worst of it though, behond: ISO reasoning! the ISO9660 is a bizzare standard, although I understand nobody really bothers to get to know what it is these days, even other kernel developers out there use premade tools for making their kernels into bootable CD images. Don't ask us why we wanted to make this ourselves too, let's just say that if we didn't want to do things ourselves we would have never started out on writing a kernel. So.. about ISO9660. Well it has these pre-defined arrays of nulls in random locations around the image. Now I can understand why somebody would leave spaces in a network protocol or the like... to have data filled in later.. but can somebody please explain to me, why would one have empty spaces in a fixed-size read-only media? I certaintly can't explain it. I don't think the ISO guys can either. It's pure nonsense. Oh and it gets better! Read this:

8.4.22 Application Identifier (BP 575 to 702)

This field shall specify an identification of the specification of how the data are recorded on the Volume Group of which the volume is a member.

If the first byte is set to (5F), the remaining bytes of this field shall specify an identifier for a file containing the identification of the application. This file shall be described in the Root Directory. The File Name shall not contain more than eight d-characters and the File Name Extension shall not contain more than three d-characters.

If all bytes of this field are set to FILLER, it shall mean that no such application is identified.

The characters in this field shall be a-characters.

Notice anything odd? Let me help you there, it's a 128 byte data structure which may only contain a 16-bit encoded DOS filename plus an additional byte. So it's a 128 byte structure that may only contain like 23 bytes tops. So what are the other 105 bytes for? Somebody obviously wasn't thinking very hard. Knowing that I guess it's not particularly suprizing that Microsoft's OOXML is an ISO standard. If you were wondering what they were thinking when they accepted it, the answer is obvious: They weren't. ISO pople don't think or plan ahead, they do company politics instead. And from this results in that %#&! double-endian format of recording offsets in ISO9660, which naturally records little-endian format FIRST. Cut down on the drugs people.

But then this frustration brings us a special kind of joy. We are developers after all. Enjoy your microKernel. :)

power down

2008-11-23 00:00:00, dustwolf

You won't be seeing this website tommorow (today, 23.11.2008) as we power down the server for maintenence on the power grid.

Worry not however, we are still working on the microKernel! Currently, as can be seen on the ChangeLog on the right, we have been working on the IDT. Kohlrak has been most helpful here, I've kinda just being sitting there giving directions, adding disclaimers and making minor corrections.

A useful tip: If you think you know interrupts, you don't understand interrupts. Some concepts surrounding them are extremely messed up. Not only that it's another silly hack of using chips outside the CPU, that there is quite a bit of bullshit about it that I have seen written in numerus textbooks of respected authors (the part about the IDT having to be on top of the memory), but also there are at least 3 different numberings of the same stuff and this is rarely pointed out.

After this is done however, the fun stuff starts. With the Clock ISR in place and multitasking on the horizon, the CPU scheduler awaits. Interesting times ahead.

Older >>

2013-03-03 16:14:08, Jure Sah

webpage fixes

makefile (M)

2013-02-17 14:19:39, Jure Sah

debug bochs hacks and requirements

INSTALL (M)  debug.bochs (M)

2013-02-17 14:07:03, Jure Sah

ubuntu 12.04 compatibility

bochsrc (M)  makefile (M)

2012-10-27 13:00:31, Shane Tyler "Kohlrak" Yorks

Commented out the mouse (due to hang) and cleaned up the makefile, a well as fixing a bug introduced with the AVX instructions being added to FASM.

bochsrc (M)  cdrom.asm (M)  debug.bochs (M)  eltorito.asm (M)  end.asm (M)  fancy32.asm (M)  floppy.asm (M)  main.asm (M)  makefile (M)  mbr.asm (M)  pxe.asm (M)

2012-10-26 22:28:35, jure sah

mess cleanup

2009-08-11 21:59:21, convert-repo

update tags

.hgtags (A)

2008-06-23 01:03:30, dustwolf

dustwolf smoke microkernel start

2009-03-06 03:00:37, dustwolf

copyright data update

VESAflip.asm (M)  cdrom.asm (M)  floppy.asm (M)  keyboard.asm (M)  main.asm (M)  makefile (M)  mouse.asm (M)  textDebugger32.asm (M)  textResolution.asm (M)  textmodedebug.asm (M)  transition32.asm (M)

2009-03-06 02:37:59, dustwolf

fixed hex output

textDebugger32.asm (M)

2009-03-06 02:30:56, dustwolf

text mode macros now work perfectly (I think?)

textDebugger32.asm (M)  textmode.asm (M)

2009-03-06 01:59:06, dustwolf

writing up on actual text mode output

textDebugger32.asm (M)  textResolution.asm (M)  textmode.asm (M)