Simple boot sector written in x86_64 Assembly. Reads from disk and prints string.
- make (For makefile)
- nasm (For compiling binary)
- qemu (For emulation)
- cdrtools (For generating ISO)
git clone https://github.com/manankarnik/operating-system.git
cd operating-system
Uses nasm to compile to bin
make
Uses qemu-system-x86_64 to emulate boot sector
make run
ISO can be attached to virtualbox (not tested on hardware)
make iso
Removes all iso and bin files generated by make
make clean
Prints a string using int 0x10. Move the string defined by db to si register.
- 0x0a: Line Feed (New line)
- 0x0d: Carriage Return
- 0: Terminates string
mov si, STR
call print
STR: db "Hello World!", 0x0a, 0x0d, 0
Prints hexadecimal value. Move either a hexadecimal or memory address to dx register.
mov dx, 0x1234
call print_hex
Reads sectors from disk.
al
: Number of sectors to readcl
: Sector to be read
mov al, 2
mov cl, 2
call read_disk
Tests whether A20 line is enabled. Returns value to ax.
- 0: Disabled
- 1: Enabled
call test_A20_line
mov dx, ax
call print_hex