OS-research-lab

jordyOS

jordyOS is a minimal, bootable operating system featuring a command-line shell, a calculator application, and a text editor with in-memory file support.

It’s written in x86 Assembly and C, and is built with an i686-elf cross-compiler toolchain. The OS runs in 16-bit real mode initially (via the bootloader), then switches to 32-bit protected mode where it executes a multitasking kernel.


High Level System Design

image

System Name: jordyOS

Type: 32-bit x86 protected-mode kernel
Architecture: Cooperative multitasking with an in-memory file system


Boot Process


Protected Mode Setup


Kernel Initialization


kmain() Performs


Task Management


Context Switching (ctx_switch.asm)


Scheduler (yield)


Shell Task


App Example: app_edit() (Editor)


In-Memory File System


System Calls Summary


Memory Model


Features


Example Usage

jordyOS multitask w/ In-Memory FS 

sh> help
Available commands:
  calc    - Run the calculator app
  edit    - Run the text editor app
  clear   - Clear the screen
  help    - Show this help message

sh> calc
Calculator App. Type 'exit' or 'quit' to close.
calc> add 10 5
15
calc> mul 3 7
21
calc> exit
Exiting calculator...

sh> edit
Editor v0.4 (In-Memory FS)
Commands: list, new <fn>, open <fn>, edit, save [fn], delete <fn>, quit
edit# new myfile.txt
New file 'myfile.txt' in buffer. Use 'edit', then 'save'.
edit [myfile.txt]# edit
--- Text Edit Mode (Press ESC to finish) ---
Hello world!
This is a test file.
--- Exiting Text Edit Mode ---
edit [myfile.txt]# save
File 'myfile.txt' saved (36 bytes).
edit [myfile.txt]# list
Files:
myfile.txt
edit [myfile.txt]# quit
Exiting editor...

sh> clear

Install Toolchain (if not already)

$ brew install cdrkit
$ brew install cdrtools
$ brew install i686-elf-binutils i686-elf-gcc
$ brew install nasm qemu

Build and Run the OS

$ make
$ make run