bootloader

bios looks for a bootloader to boot by search all storage media for the signature "0x55AA" and load the sector into address 0x7C00 and execute it.

bootloader load the kernel into memory, switch the process into 32 bit proteced mode then execute kernel

sudo apt install nasm
sudo apt install qemu-system-x86

realmode

1 MB of ram accessible,base on the x86 design,16 bit accessible at once,no security
absolute positon = segment register * 16 + offset
jmp 0x7c0:step2
CS = 0x07C0
IP = step2的偏移(设为0x7C2A)
物理地址 = 0x07C0 × 16 + 0x2A = 0x7C2A

posted @ 2025-08-13 19:45  fangshuo  阅读(6)  评论(0)    收藏  举报