NASM - The Netwide Assembler
NASM Forum => Using NASM => Topic started by: bitbit on March 06, 2011, 02:24:10 PM
-
times 512 -($-$$) db 0
What does $ and $$ stand for?
What says the argument 512 -($-$$) of times in this context?
bitbit
-
'$' is roughly "here" (in this context). '$$' is "beginning of section". So "$-$$" is an expression that calculates the length of your code, so far. So your code gets padded out to 512 bytes.
Best,
Frank
-
It's all explained in the NASM Documentation (http://www.nasm.us/docs.php).