Geeks With Blogs



Add to Technorati Favorites

An Archived Managed World This blog has moved to

Howdy Doodie :). After finishing Charles Petzold's book Code, getting some experience writing assembly code, and in preparation for my XGameStation incursions, I found myself to be a little curious to how certain low-level elements of an operating system works (like the whole bootstrap process, the BIOS, etc.). Knowing just how low my chances were to find any source code for MS-DOS, I decided to look for some source code for the OS that inspired the creation of MS-DOS's predecessor, CP/M.

To my pleasant surprise, there is actually quite a bit of Digital Research's source code available for download. Also to my pleasant surprise, the source code for version 2.2 in assembly is just a little over 3700 lines. Not too bad! So, in what little free time I have before the arrival of my XGameStation in 6-8 weeks from now, I plan on perusing through the CP/M v2.2 source code. Why would I submit myself to this? Easy - I'm *really* curious now about the internal workings of an early operating system. My eventual goal is to perhaps create my own, *very* stripped down OS on either the next release of the XGameStation (the Mega edition, which will feature an ARM7 processor), an 8080 emulator, or an x86 emulator. I would love to start messing around with building an OS on the XGameStation Micro Edition but I'm simply if the hardware would even be capable of it.

Now before you try telling me how immensely complicated a true OS is, rest assured that I *do* know and I have very low expectations for what I want to do. Also, I don't plan on doing this overnight. With how many priorities I already have in the works, this is definitely going to have to cook on the back burner. Who knows, by the time I can get around to it, perhaps I won't want to do it anymore. So anyone out there worried about me putting off my current priorities to run with “this new thing”, don't worry.

Also, before you start complaining about me wasting my time, I know that there aren't any true applications for me to apply this knowledge to my current job. However, I *do* feel that by gaining a deeper knowledge into how a computer actually works, I will ultimately become a better programmer. I guess in a way I am making up for not continuing my education after community college. I have friends that have been in Computer Science courses where they've been required to do this stuff for class credit, and I am extremely jealous of them. I figure what better way to learn than on something I am passionate about (games). I think it would be quite fun to write my own ESOS (Extremely Simple Operating System) for the next release of the XGameStation. Before I can do that though, I need to do some research. So, when I have some free time, onward toward the CP/M source code. Yay!

P.S. - I truly don't know how I would survive without the Internet :D.

P.S.S. - While I'm at it, do any of you have any recommendations for learning about the inner details of Operating Systems?

Posted on Sunday, August 22, 2004 7:27 PM | Back to top

Comments on this post: CP/M Source - Some Assembly Required :D

# re: CP/M Source - Some Assembly Required :D
Requesting Gravatar...
I'm sure you can get a simple OS working on the XGameStation Micro Edition, no matter how limited it is. SOMETHING has to run the games, etc. Will your OS have pre-emptive multitasking, a software FPU, etc? Maybe not. But I'm sure you could get something that starts and schedules processes.

Another way to really dig into understanding computers (that you may have missed from getting a CS BS) is to play with digital design, and boolean logic theory. Get a breadboard, some wire, and a set of AND/OR/NOT gates and build a simple calculator. Definitely the highlight of my education.
Try the link below (and other related classes) to help you get started.
Left by Joshua Flanagan on Aug 23, 2004 12:38 PM

# re: CP/M Source - Some Assembly Required :D
Requesting Gravatar...
Joshua -

Thanks for the link!! I'm finding that the more I read into this stuff, the more fun I have (so I suppose that's a good thing :)). While I know it definitely would be possible to have an OS on the XGS ME, I fear that the overhead would be high enough that there wouldn't be that much room left for the games. Who knows though. I won't even venture a guess. I suppose if it was an unconventional OS that allowed access to the hardware it might work. My concern is that the overhead of a Software API might be too much.

Perhaps the extent of the Pseudo-OS would be the software rasterizer? Maybe an abstract rasterizer that all the games could use. Something just to add to the level of abstraction. Anyways, I'm just blabbing away to myself. Thanks once again for the link, I appreciate it :).
Left by Jason Olson on Aug 23, 2004 2:18 PM

# re: CP/M Source - Some Assembly Required :D
Requesting Gravatar...
Oh, I guess I misunderstood your intention. I didn't realize you wanted to develop an OS that would enable you to play the actual games. I thought you meant just a simple OS that would let you start/pause/stop processes, and other basic OS tasks. Where the "processes" were just simple tasks like "write my name to the screen", or "count number of seconds since boot". If you want to actually wrap a layer around the hardware to provide an API, that's a different story, and can understand your hesitation.
I was thinking "os=kernel", you were thinking "os=entire system to run applications". Both right in our own contexts, we just weren't on the same page.
Left by Joshua Flanagan on Aug 23, 2004 3:48 PM

# re: CP/M Source - Some Assembly Required :D
Requesting Gravatar...
Ahhh, I get what direction you're coming from. That sounds like a fun project too. I'm making a mental note of it as I type :).
Left by Jason Olson on Aug 23, 2004 4:17 PM

Your comment:
 (will show your gravatar)

Copyright © Jason Olson | Powered by: