Okay... second question! i've seen code using NASM for shoving in a variable bunch of bytes into a program based on current position (e.g. for patching or use in a boot sector) like this:
db SizeAtPosition - ($-$$) dup (?)
This doesn't work in MASM and i tried several work arounds. no matter what i tried, i usually got some error about using a constant instead of a variable.
Thanks in advance :)
Desired_Size equ 512
Start_of_BootSector:
...
...
...
End_of_BootSector:
db Desired_Size - ( $ - Start_of_BootSector) dup ("*")
MASM doesn't support $$. IIRC, it is the start of the segment - should look in the MASM manual to find out how to reference the start of the segment. ;)Possibly a label?
e.g.
anyway, i'll test this out (when i get a chance) and see what happens... thanks :)
e.g.
Desired_Size equ 512
PositionStart LABEL
Start_of_BootSector:
...
...
...
End_of_BootSector:
db Desired_Size - ( $ - PositionStart) dup ("*")
anyway, i'll test this out (when i get a chance) and see what happens... thanks :)