delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/10/02/07:30:16

From: "Andrew Crabtree" <andrewc AT rosemail DOT rose DOT hp DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: And another question...
Date: Wed, 1 Oct 1997 13:20:37 -0700
Organization: Hewlett Packard
Lines: 21
Message-ID: <60ub8d$4rc$1@rosenews.rose.hp.com>
References: <EHCoLA DOT 5q4 AT nonexistent DOT com>
NNTP-Posting-Host: ros51675cra.rose.hp.com
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Arthur Bredrick wrote in message ...
>I think I understand the purpose
>of alignment, but what are the advantages to using it?  Why is it used.
>Does it help speed?
When used properly it helps speed, yes.  Unfortunately, the details of it
are very processor dependent (they are different between 486, Pentium,
Pentium
Pro, etc.).

> And why is there the need to repeat the same alignment
>directive throughout the code when the same value is fed to it each time
(in
>this case .align 4)?  Thanks again.
The assembler aligns the data every time it get to a .align. It does this by
padding
data or by adding nops.  It does not cause anything after it to remain
properly aligned, so
you need to specify it whenever you need to align something.


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019