flat assembler
Message board for the users of flat assembler.

Index > Main > Align Code on 16 byte boundary

Author
Thread Post new topic Reply to topic
V Coder



Joined: 16 Oct 2003
Posts: 3
V Coder
How do I align a segment of code on a 16 byte boundary please?

I use rb (v-1)-($+v-1) mod v, however rb seems geared to reserving bytes of data 00.

In the middle of code, I need some sort of NOP (db $90).

Is it possible to rb 12 $90, for example?

Thanks
Post 16 Oct 2003, 02:56
View user's profile Send private message Reply with quote
comrade



Joined: 16 Jun 2003
Posts: 1137
Location: Russian Federation
comrade
Code:
macro aligncode value {
   times ((value-1) - (rva $ + value-1) mod value) nop
}    

_________________
comrade (comrade64@live.com; http://comrade.ownz.com/)
Post 16 Oct 2003, 03:01
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number Reply with quote
V Coder



Joined: 16 Oct 2003
Posts: 3
V Coder
Thanks much
Post 16 Oct 2003, 03:29
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-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.