Skip to content

Pritam-Kumar-911/Zenith-OS-Shell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 

Repository files navigation

🐚 ZENITH OS Shell

A Linux Bash-inspired interactive shell built from scratch in x86 Assembly Language — simulating how real operating systems handle commands at the hardware level.


📸 Preview

Shell Startup


🔄 Program Flow

image

💡 About The Project

ZENITH OS Shell is a DOS-based command-line shell developed as part of the Computer Organization & Assembly Language course

The goal was simple — build something that works like a real shell, but without any high-level language helping you. No frameworks, no libraries, no abstractions. Just registers, memory, and interrupts.

The shell mimics the look and feel of a Linux Bash terminal — complete with a pritam@root:$ prompt — and supports real filesystem operations like creating files, deleting them, navigating directories, and listing contents.


⚙️ Supported Commands

Command Description
ls List contents of current directory
cd <dir> Change directory
mkdir <name> Create a new directory
create <file> Create a new file
write <file> Write text into a file
rm <file> Delete a file
echo <text> Print text to the screen
clear Clear the screen
help Display all available commands
about Info about the developer
exit Exit the shell

🛠️ How To Run

Prerequisites

  • DOSBox — DOS emulator
  • MASM — Microsoft Macro Assembler

Steps

1. Clone the repository

git clone https://github.com/Pritam-Kumar-911/zenith-os-shell.git
cd zenith-os-shell

2. Assemble the source file

masm shell.asm;
link shell.obj;

3. Open DOSBox and mount the project folder

mount c <path-to-project-folder>
c:

4. Run the executable

shell.exe

🏗️ How It Works

The shell runs as a continuous loop:

Start
  └── Print Banner
        └── Print Prompt (pritam@root:$)
              └── Read Input
                    └── Parse & Match Command
                          └── Execute → Repeat

Every command is matched manually using a custom string comparison routine. There are no built-in string functions — each character is compared byte by byte using CPU registers.

Filesystem operations like create, rm, mkdir, and cd are handled through DOS interrupt INT 21h — the same way real operating systems talk to hardware.


📚 What I Learned

  • How an OS shell actually processes and dispatches user commands
  • Manual memory management — buffers, segments, and pointers
  • How filesystem operations work at the system call level
  • Low-level input/output using DOS interrupts
  • Writing structured, maintainable code in Assembly without any abstractions

👨‍💻 Developer

Pritam Kumar
CS Undergraduate — SZABIST, Karachi (Batch 2028)
GitHub


Built as part of Computer Organization & Assembly Language course

About

A DOS-based shell written in x86 Assembly that mimics Linux Bash. Supports commands like ls, cd, mkdir, create, rm, and echo through manual parsing and DOS interrupts—demonstrating core OS concepts without frameworks.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors