Skip to content

Instantly share code, notes, and snippets.

@abarya
Last active February 21, 2019 00:33
Show Gist options
  • Save abarya/1f3675451bd591398f712548110f5273 to your computer and use it in GitHub Desktop.
Save abarya/1f3675451bd591398f712548110f5273 to your computer and use it in GitHub Desktop.
abhiOS -- Here, I will be documenting stuff that I learned creating my own Operating System.

Int is an assembly level instruction for x86 architectures microprocessors that generates a software interrupt. After calling an interrupt, the the processor calls one of the 256 functions pointed to by the interrupt address table.

INT 10H - It is a shorthand for BIOS interrupt call 10hex which is used to provide video services. It is actually quite slow as the OS needs to switch between real mode and protected mode/ long mode which is an expensive operation.

As soon as the computer is turned on, BIOS(Binary I/O Subsystem) comes into picture. On it's own, BIOS doesn't know what to do.

Boot Sector is a special region(a standard location) on a disk(hard drive, pen drive, CD) that contains the instructions for loading operating system into RAM. BIOS also has a Boot Priority with which it knows which boot sector to look at if it has more than bootable drives attached to the computer.

The Boot sector is 512-byte long and the last 2 bytes are 0xAA55 which are used by BIOS to check whether a disck is bootable. Isn't this quite cool?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment