Page 1 of 1

TBOS 2 journal

Posted: Mon Sep 01, 2008 9:43 pm
by Troy Martin
Hope this is an OK forum to post this in...

So, after a little venture into learning OS programming with MikeOS, I'm writing my own kernel in assembly, and it's mostly free of code from other OSes. It's going to be in protected mode (naturally with A20) and possibly have support for V8086 mode.

So far I have a keyboard driver that uses no interrupts, and works in both real mode and pmode. So far I've only tested it in real mode, taking up 509 out of 510 bytes for the bootsector. It takes alphabetic characters, backspace (erases characters), spacebar, and enter. Just type and shut down when you're done.

NOTE: This boot sector uses int 10h for printing characters, but uses I/O ports 60h and 64h for the keyboard. The next version will go pmode and load the kernel from FAT.

Comments, questions, and suggestions are welcomed. If they weren't I wouldn't post this here :wink:

PS: Would writing an interrupt handler to replace BIOS functions work? So programs that are 32-bit can use the "BIOS functions"?

Re: TBOS 2 journal

Posted: Mon Sep 01, 2008 11:44 pm
by inflater
Well, it's a bootsector... and it boots and writes characters you type in uppercase. End of testing?
BTW you will have more fun in pmode, when you will not have the bios ints available and you will need to start from scratch. So
The next version will go pmode and load the kernel from FAT.
is a bit challenging, especially if you will write your own pmode bootloader.
(naturally with A20)
You're German right? They seem to use the word "natuerlich" frequently :)

Re: TBOS 2 journal

Posted: Sat Sep 06, 2008 11:38 am
by Troy Martin
Well I haven't posted recently...

No, I'm not German.

I'm working on my own multi-stage bootloader.

And the point of that bootloader was to show it is possible to write up a text interpreter that runs in 512 bytes and (if I shrink some stuff down and remove extras) doesn't need the bios.

Also, would it be OK to load the kernel in real mode and then have the kernel beginning do the pmode stuff?