Hi Privalov!

Trying to learn a little bit about operativ systems, I often meet this code in the end of the sources:


times 510-($-$$) db 0
dw 0AA55h


...and this is a very smart way to end these files too (I'm thinking on the use of the 'times' directive), but when I try to do this in fasm, it doesn't accept it... It seems to me that it doesn't accept expressions in such cases - only constants... :(

Could you please take a look at it ??? Thanks!

Oh...sorry my english.... :)

Well, see yah!
Regards, POW
Posted on 2003-02-21 15:23:16 by POW
Welcome the the OS-club. ;)

This is the way I solved that (it works for me at least :)):
times 7C00h+512-2-$ db 0 ; Origin+SectSize-size of the 2 bytes-our current possition

db 055h,0AAh
Posted on 2003-02-21 15:43:28 by scientica
This is exactly how it is in the phboot example from fasm's website.
Posted on 2003-02-21 16:45:35 by Tomasz Grysztar
Thank you very much!!! Then I can continue without to change the value of the times directive all the time :)
Keep on going!

Regards, POW
Posted on 2003-02-22 01:40:21 by POW