我正在阅读brokenthorn.com的O/S开发教程之一的教程,下面的代码就在那里。引导程序的大小
http://www.brokenthorn.com/Resources/OSDev3.html
我不明白为什么这个代码清晰510个字节。 org,bits,cli,hlt也在代码中。不应该将其更改为小于510字节?它可能是错字或什么的?
谢谢。
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;*********************************************
; Boot1.asm
; - A Simple Bootloader
;
; Operating Systems Development Tutorial
;*********************************************
org 0x7c00 ; We are loaded by BIOS at 0x7C00
bits 16 ; We are still in 16 bit Real Mode
Start:
cli ; Clear all Interrupts
hlt ; halt the system
times 510 - ($-$$) db 0 ; We have to be 512 bytes. Clear the rest of the bytes with 0
dw 0xAA55 ; Boot Signiture
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;