下面是我想了解的汇编代码。用 nasm 组装此代码后如何填充 512 个字节?
因为我还不清楚510-($-$$)
这里做的意思?根据下面的代码,$
它的价值是什么?$$
http://www.brokenthorn.com/Resources/OSDev3.html
;***************************
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 Signature
;*********************