M3 Operating System Development

A chronicle of the development of the M3 operating system

Plan for the kernel – baby steps

leave a comment »

Now that I have successfully booted into my very rudimentary C kernel, I can start working to expand that into something that is truly functional.

I’m not just going to jump right into the heavy stuff yet though. Instead, I will ease myself into the shallow waters, and once I’m comfortable I’ll wade into greater depths. It’s been many years since I wrote C code, and even back then I didn’t really get into anything too difficult. Therefore, the first order of business is to refamiliarize myself with programming in C. 

I’ve spent the last couple of days reading up, and I’m ready to start writing some code.

I’ll start exercising my C muscles by coding up some routines that will be immediately useful as I start to build out the rest of the kernel. First up is a clearscreen routine, which will clear the entire screen. Next up will be a print routine, a function that will print a null-terminated string to the screen at the current cursor position. That means it will also need to track the current cursor position. I’ll also need to add cursor handling into the clearscreen function, which will reset the screen position to line 0, position 0.

From there, I plan to write several functions that will assist in debugging, by dumping the contents of the registers to the screen, or the contents of a certain section of memory, etc. Whatever I think will be useful for debugging purposes as I start to tread into the gnarly areas of paging, memory management, etc.

Advertisements

Written by m3os

March 20, 2009 at 7:18 pm

Posted in Status Update

Tagged with , ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: