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.gitcd operating-systemUses nasm to compile to bin
makeUses qemu-system-x86_64 to emulate boot sector
make runISO can be attached to virtualbox (not tested on hardware)
make isoRemoves all iso and bin files generated by make
make cleanPrints 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, 0Prints hexadecimal value. Move either a hexadecimal or memory address to dx register.
mov dx, 0x1234
call print_hexReads sectors from disk.
al: Number of sectors to readcl: Sector to be read
mov al, 2
mov cl, 2
call read_diskTests whether A20 line is enabled. Returns value to ax.
- 0: Disabled
- 1: Enabled
call test_A20_line
mov dx, ax
call print_hex