From: "Andrew Crabtree" 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: NNTP-Posting-Host: ros51675cra.rose.hp.com To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk 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.