https://github.com/devsujay19/minimal_os
This is a minimal OS built with Assembly language. It can be scaled up and connected to main source C/C++ or Python file.
https://github.com/devsujay19/minimal_os
Last synced: 10 months ago
JSON representation
This is a minimal OS built with Assembly language. It can be scaled up and connected to main source C/C++ or Python file.
- Host: GitHub
- URL: https://github.com/devsujay19/minimal_os
- Owner: devsujay19
- Created: 2024-02-29T11:19:52.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-02-29T20:02:16.000Z (almost 2 years ago)
- Last Synced: 2025-01-30T12:47:23.827Z (12 months ago)
- Language: Assembly
- Size: 7.81 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
README
# Minimal_OS
This is a minimal OS built with Assembly language. It can be scaled up and connected to main source `C`/`C++`, `Python` or `Bash`/`Zsh` files.
## Pre-requesites for project
The project requires a `UNIX`-like environment. If you're on `Windows`, there're various ways of setting one up. You can use `WSL` (`Windows Subsystem for Linux`), a `Linux Virtual Machine`, `Cygwin` or `MSYS2`. But, I most-likely recommend you to setup `WSL` which is the easiest to setup among other techniques. [Read the documentation](https://learn.microsoft.com/en-us/windows/wsl/install). If you're on `macOS`, then it can be very easy to install the required packages by [`Homebrew'](https://formulae.brew.sh/).
For this project, you need to install the following tools and softwares below -
- `make`
- `nasm`
- `qemu-system-x86` for testing
- Your preferred source code editor (e.g., [`Visual Studio Code`](https://code.visualstudio.com), `NeoVim` or `Vim`)
## Tools installation
### For Linux based OSes
```
# Ubuntu, Debian:
sudo apt install make nasm qemu-system-x86 -y
# Fedora:
sudo dnf install make nasm qemu-system-x86 -y
# Arch & Arch-based:
paru -S make nasm qemu-system-x86
```
`NOTE` - To install all the required packages on `Arch Linux` or `Arch-based Linux distributions`, you need an [AUR Helper](https://wiki.archlinux.org/title/AUR_helpers).
### For macOS
```
brew install make nasm qemu-system-x86
```
## Guide on writing the code
You can either clone this repository or create your own by following the steps below.
- Create a source directory named whatever you want (e.g., "`src`" or "`kernel`").
- Then create a `build` directory (outside of the source directory).
- Navigate to the source directory and inside there, create a `Assembly language` file named "`main.asm`".
- Copy and paste the code from this repository to your "`main.asm`" file and save it.
- Outside of the source directory, create a file for building the `Assembly` runnable OS, must be named "`Makefile`".
## Building the OS Assembly code
- To `build` a `Floppy Image` and a `Binary` file, run the command in the terminal -
```
make
```
## Testing on a Virtual Machine
- To test your `OS` in a `Virtual Machine`, run -
```
qemu-system-i386 -fda build/main_floppy.img
```
## Output
After running `Qemu Virtual Emulator`, you can see similar screen like mine -
