My blog has been quiet recently. Mainly because I have been busy learning OS development. At the moment I'm calling the result of my efforts by the name "ShedOS" in honour of men who build things in sheds. I count myself in that category - even if my hobby is more likely to be practiced in Costa Coffee (drinking a flat white) than an actual shed. Maybe I need to build a better shed, or maybe sheds should serve better coffee.
As I've mentioned before on this blog, I've been following Bran's Kernel Development tutorial, so my OS is based on that. But I have been busy customising it and adding new things. Currently, ShedOS has these features:
- 32 bit x86 operating system
- preemptive multitasking
- floppy disk driver
- limited support for FAT12 filesystems (read-only)
- text only video driver (16 colours)
- exports a few system calls, like 'print', 'plot' and 'exit'
- can load and run user programs from disk
- oops, still no keyboard driver
I have just started to implement some system calls, so that the kernel can expose an API to user programs, it seems to work. If I seem surprised; it's because I am. I have gotten to the point where the kernel boots, then loads a user program from a FAT12 disk. The user program runs, making use of the kernel's API to print to the screen. Then the program exits and returns full control to the kernel again. During that whole process the system continues to multitask. Not a bad start I suppose.
At some point I'll bring over some of my favourite features from the PDP-11 world, like the ability to drop machine-code instructions straight into memory. Running some code by typing the instructions in manually must be like a "rite of passage", and it's something that you can't do from windows. Surely if you can do that using an OS that you've built yourself then you're the man.
Right, I really must get round to posting my floppy driver source code, just in case anybody else out there finds it interesting... Sadly, I don't think there will be many other people developing drivers for floppy disks these days, but I'll post my code anyway.