Implementing a Simple Operating System — ANU_OS
A Simple Operating System using Assembly Language for Displaying Computer Hardware Information.
This is a simple guide showing how to implement an operating system using assembly language to display hardware information on a computer. Operating this operating system requires a basic understanding of some assembly language functions and operations.
Basic Knowledge of Assembly Language
This task is done in Ubuntu. So the following tools should be installed to encode.
NASM Installation — The compiler for assembly language.
sudo apt-get install build-essential qemu nasm
Main File Structure of ANU_OS
source file — This folder contains the main assembly code of the OS. (kernel.asm and bootload/bootload.asm)
— source/bootload — Contains bootload.asm.
— source/kernel.asm— The main kernel source file. It includes the source code needed to display hardware information.
build-linux.sh — The main build script of OS. This can be used in Linux OS.
After creating the source file with the above codes, compile the kernel.asm code by using the below command.
nasm source/kernel.asm -o source/kernel.bin -f bin
The kernel.asm file is converted to the kernel.bin file after building the source code.
Booting Process
This OS can be booted from floppy disk, CD Rom and USB. Moreover, there is another way to do this by using the QEMU emulator. We have already installed it. So, let’s boot our OS using QEMU emulator.
1st step: Run the below command on the terminal in the root directory.
sudo bash ./build-linux.sh
After you run this command, some bin files like bootload.bin should be created and anuos.iso and anuos.flp should be created in disk_images folder.
2nd step: Go to the disk_images folder and open the terminal then run the below command.
qemu-system-x86_64 -boot d -cdrom anuos.iso -m 512
After running this command the QEMU emulator will be opened.
Source Code…
You can find the ANU_OS full source codes from this link.