parent
5c39cb6ae7
commit
9eee9e7819
@ -0,0 +1,6 @@
|
||||
I'm working on a Mac, though Linux is better because it will have all the standard tools already
|
||||
available for you.
|
||||
|
||||
On a mac, [install Homebrew](http://brew.sh) and then `brew install qemu nasm`
|
||||
|
||||
Don't use the Xcode developer tools `nasm` if you have them installed, they won't work for the most cases.
|
Binary file not shown.
@ -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
|
||||
```
|
Loading…
Reference in new issue