
c-os
c-os (Chad Operating System) is a 16-bit operating system built to run on an IBM AT (5170). The XT (5150) is 8-bit and may or may not work with this OS, we'll see.
I started this project after reading The little book about OS development. It made OS development seem simpler than I had thought so I tried a few examples based on the code in the book. Building off the examples I was booting a bare-bones OS and the result is this toy OS. I'm using NASM and the Watcom linker to build the OS. Watcom is no longer commercially supported but has been made available as the opensource pacakge Open Watcom. Setting up the Watcom development environment is not simple on a Mac so to aid in development I created a Docker image watcom-docker. This Docker image will allow you to build and link without having to setup the environment.
My goal is to build a fully functional but basic single user operating system with memory management, file system that will boot on a real IBM AT (currently using emulators).
I made it 16-bit for a few reasons. First, why not ¯_(ツ)_/¯? I'm interested in old 8-bit and 16-bit computers and software. They hold a lot of nostalgia for me. I learned to program
Current Progress
- Bootloader that boots the kernel (single stage)
- Using BIOS for graphics and disk access_log
Future Plans
- Finish the kernel including memory management and file system.
- Write some utility programs
C-OS Memory Map
Disk Layout
+---------+---------+------+-------------+
| Start | End | Size | Description |
+---------+---------+------+-------------+
| 0x00000 | 0x001FF | 512b | Bootsect |
| 0x00200 | 0x074FE | 28k | Kernel |
| 0x074FF | 0x07A11 | 512b | Kernel Data |
| 0x07A11 | 0x28000 | 129k | Padding |
+---------+---------+------+-------------+
RAM (during booloader)
+--------------------------++--------------------------++------++---------------+
| Start || End || Size || Description |
| seg:addr | linear || seg:addr | linear || || |
+---------------+----------++---------------+----------++------++---------------+
| 0x0000:0x7C00 | 0x007C00 || 0x0000:0x7DFF | 0x007DFF || 512b || bootloader |
| 0x07E0:0x0000 | 0x007E00 || 0x07E0:0x1000 | 0x008E00 || 4k || stack |
+---------------+----------++---------------+----------++------++---------------+
RAM (after kernel loaded)
+--------------------------++--------------------------++------++---------------+
| Start || End || Size || Description |
| seg:addr | linear || seg:addr | linear || || |
+---------------+----------++---------------+----------++------++---------------+
| 0x0050:0x0000 | 0x000500 || 0x0050:0x72FE | 0x0077FE || 28k || Kernel code |
| 0x0050:0x72FF | 0x0077FF || 0x0050:0x74FE | 0x0079FE || 512b || CONST |
| 0x0050:0x74FF | 0x0079FF || 0x0050:0x76FE | 0x007BFE || 512b || DATA |
| 0x07C0:0x0000 | 0x007C00 || 0x07C0:0x0FFF | 0x008BFF || 4k || Kernel Stack |
| 0x08C0:0x0000 | 0x008C00 || 0x08C0:0x7400 | 0x010000 || 29k || User Space |
+---------------+----------++---------------+----------++------++---------------+