mirror of
https://github.com/cfenollosa/os-tutorial.git
synced 2026-03-02 03:49:21 +00:00
First commit
This commit is contained in:
BIN
01-boot-sector/.README.md.swp
Normal file
BIN
01-boot-sector/.README.md.swp
Normal file
Binary file not shown.
17
01-boot-sector/README.md
Normal file
17
01-boot-sector/README.md
Normal file
@@ -0,0 +1,17 @@
|
||||
This is very exciting, we're going to create our own boot sector!
|
||||
|
||||
When the computer boots, the BIOS doesn't know how to load the OS, so it
|
||||
delegates that task to the boot sector. Thus, the boot sector must be
|
||||
placed in a known, standard location. That location is the first sector
|
||||
of the disk (cylinder 0, head 0, sector 0) and it takes 512 bytes.
|
||||
|
||||
To make sure that the "disk is bootable", the BIOS checks that bytes
|
||||
511 and 512 of the alleged boot sector are bytes `0xAA55`.
|
||||
|
||||
This is the simplest boot sector ever:
|
||||
|
||||
```asm
|
||||
e9 fd ff 00 00 00 00 00 00 00 00 00 00 00 00 00
|
||||
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
|
||||
00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa
|
||||
```
|
||||
Reference in New Issue
Block a user