Special Symbols in AS?

Peter Barada peter@the-baradas.com
Wed Apr 21 19:08:00 GMT 2004


>Are there any special symbols available in the GAS syntax? I'm writing ax
>x86 bootsector and it would be really nice if I could put:
>
>.space (510-$$)
>.word 0xaa55
>
>at the end, where $$ represents the current assembled position, instead of
>calculating how long the file is and then adjusting it everytime I change
>the length.

I think that:

  .space (510-.)

should work.

YMMV.

-- 
Peter Barada
peter@the-baradas.com



More information about the Binutils mailing list