tad@killer.UUCP (09/24/87)
I was flipping through my Microsoft MASM manual (I'm trying to learn 80x86 ASM), and I noticed an align type PAGE (256 byte alignment). What I want to know is, WHY? I can understand why you would align something on a byte, a word, or even a paragraph, but why on this architecture an alignment this coarse? Can someone enlighten me? Thanks, Tad -- Tad Marko ..!ihnp4!killer!tad || ..!ihnp4!alamo!infoswx!ntvax!tad UNIX Connection BBS AT&T 3B2 North Texas State U. VAX 11/780 "Hi there!" -- Peter Gabriel in "Big Time"
johnl@ima.ISC.COM (John R. Levine) (09/25/87)
In article <1617@killer.UUCP> tad@killer.UUCP (Tad Marko) writes: >I was flipping through my Microsoft MASM manual (I'm trying to learn >80x86 ASM), and I noticed an align type PAGE (256 byte alignment). >What I want to know is, WHY? Three guesses: A) Some kinds of ROMS used to come in 256 byte sizes, this would make it easier to write ROMable code. B) Some kinds of disks used to have 256 byte sectors, this would make it easier to assemble grotty boot programs. C) When the original programmer was writing the first 8086 assembler, he was used to some previous micro like the 8080 where eight-bit offsets were used, and he implemented and documented it before someone noticed that it was useless on an 8086. The astute reader will note that you can get any alignment you want by use of the .ORG pseudo-op, so ALIGN is no more than syntactic sugar in any case. -- John R. Levine, IECC, PO Box 349, Cambridge MA 02238-0349, +1 617 492 3869 { ihnp4 | decvax | cbosgd | harvard | yale }!ima!johnl, Levine@YALE.something The Iran-Contra affair: None of this would have happened if Ronald Reagan were still alive.
garyq@hpfcdc.UUCP (09/30/87)
> The astute reader will note that you can get any alignment you want by > use of the .ORG pseudo-op, so ALIGN is no more than syntactic sugar in > any case. Doesn't ORG align to specific locations, rather than the next 8/16/256 byte boundary?