delorie.com/archives/browse.cgi | search |
From: | xmerm05 AT vse DOT cz (Mertl Michal - IN,,student,UID=22797) |
Newsgroups: | comp.os.msdos.djgpp |
Subject: | Re: And another question... |
Date: | Fri, 3 Oct 1997 11:07:25 GMT |
Organization: | University of Economy, Prague |
Lines: | 11 |
Message-ID: | <xmerm05.2.3434D1ED@vse.cz> |
References: | <EHCoLA DOT 5q4 AT nonexistent DOT com> |
NNTP-Posting-Host: | j382h9.vse.cz |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
>In the same keyboard int handler I mentioned in my last post, the directive >.align 4 is used throughout the assembly. I think I understand the purpose >of alignment, but what are the advantages to using it? Why is it used. >Does it help speed? 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 ".align n" directive means "make address of next instruction be 2^n divisible". Jumps are faster on intel processors if jumps are into these addresses. The problem can be it makes code longer and so may be to long to fit into the level 1 cache. I think .align 4 can be often too much and should be changed to .align 2 for that reason.
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |