1# TinyOS
2
3TinyOS is a minimal, 32-bit x86 operating system implemented to get familiar
4with OS development internals. I made this for fun and exploration.
5
6## Specs
7
8- **Architecture:** x86 (i386)
9- **Bootloader:** 16-bit real-mode (NASM) -> 32-bit protected-mode.
10- **Kernel:** Freestanding C (GCC).
11- **Video:** VGA Mode 13h (320x200, 256 colors).
12- **Interrupts:** IDT for hardware IRQs and CPU exceptions.
13- **Input:** PS/2 keyboard.
14- **Shell:** Basic CLI.
15
16## Implementation Details
17
18- `boot.asm`: 16-bit real-mode bootloader.
19- `entry.asm`: Protected-mode initialization and kernel entry.
20- `kmain.c`: Main kernel loop.
21- `idt.c`: IDT configuration and interrupt routing.
22- `keyboard.c`: PS/2 scancode to ASCII mapping.
23- `shell.c`: Basic CLI.
24- `link.ld`: Memory layout definition.
25
26## Dependencies
27
28- `nasm`
29- `gcc` (i386 target support)
30- `binutils` (ld with elf_i386 support)
31- `qemu-system-x86_64`
32- `make`
33
34## Usage
35
36Build:
37```bash
38make
39```
40
41Run:
42```bash
43make run
44```
45
46Clean:
47```bash
48make clean
49```
50
51## Memory Map
52
53The kernel is loaded into memory starting at `0x1000`. The VGA buffer for Mode
5413h is located at `0xA0000`.