flat assembler
Message board for the users of flat assembler.

Index > DOS > Extend filesize with times instruction times 512-($-$$) db 0

Author
Thread Post new topic Reply to topic
KiteMaster



Joined: 01 Aug 2003
Posts: 18
Location: Austria
KiteMaster 17 Oct 2003, 18:20
Code:
times 512-($-$$) db 0    


this is the code in nasm
it makes the segment 512 bytes long

how can i do this in fasm??
Post 17 Oct 2003, 18:20
View user's profile Send private message Reply with quote
scientica
Retired moderator


Joined: 16 Jun 2003
Posts: 689
Location: Linköping, Sweden
scientica 17 Oct 2003, 19:11
it should work with:
times 512-($-the_start_address_of_the_segment) db 0
or: (i.e. the same result)
times (the_start_address_of_the_segment+512)-$ db 0

where you replace the_start_address_of_the_segment with either the start address of the segment or put the label name of some label defied at the start of the segment.

_________________
... a professor saying: "use this proprietary software to learn computer science" is the same as English professor handing you a copy of Shakespeare and saying: "use this book to learn Shakespeare without opening the book itself.
- Bradley Kuhn
Post 17 Oct 2003, 19:11
View user's profile Send private message Visit poster's website Reply with quote
KiteMaster



Joined: 01 Aug 2003
Posts: 18
Location: Austria
KiteMaster 19 Oct 2003, 21:01
thx
now it works
Post 19 Oct 2003, 21:01
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.