Article View: comp.sys.intel
Article #1881Re: function start address allignment
From: Rick Richardson
Date: Wed, 01 Mar 1989 03:50
Date: Wed, 01 Mar 1989 03:50
25 lines
1774 bytes
1774 bytes
In article <311@ssp2.idca.tds.philips.nl> pb@idca.tds.PHILIPS.nl (Peter Brouwer) writes:
>When looking at executables with sdb and dis (unix) I noticed that the
>start of a function in a c program is always word alligned. If
>My question is: Is this general for compilers/assemblers in unix environment
>on 80386 machines?
I think this is due to the Basic-16 ... iAPX286 ... iAPX386 heritage
of the compiler. Basic-16 had a mechanism known as transfer vectors
that were a lousy substitute for medium model, but nice for doing
'patches' to individual modules at runtime. The implementation,
I believe, required word alignment. I think this saw heavy use
in AT&T's biggest software project and also in their products with
the undefinable new name.
Of course, those wasted bytes add up in a hurry. I can recall being
short around 250 bytes of ROM and finding 300 bytes available by
deleting the alignment requests. Even more hideous, though, is
to count the number of times a register half is zeroed when it
already contains zero.
--
Rick Richardson | JetRoff "di"-troff to LaserJet Postprocessor|uunet!pcrat!dry2
PC Research,Inc.| Mail: uunet!pcrat!jetroff; For anon uucp do:|for Dhrystone 2
uunet!pcrat!rick| uucp jetroff!~jetuucp/file_list ~nuucp/. |submission forms.
jetroff Wk2200-0300,Sa,Su ACU {2400,PEP} 12013898963 "" \d\r\d ogin: jetuucp
Technical Details
Message-ID:
<687@pcrat.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!attcan!uunet!pcrat!rickReferences:
<311@ssp2.idca.tds.philips.nl>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!pcrat!rick From: rick@pcrat.UUCP (Rick Richardson) Newsgroups: comp.sys.intel Subject: Re: function start address allignment Keywords: word alignment Message-ID: <687@pcrat.UUCP> Date: 1 Mar 89 03:50:08 GMT References: <311@ssp2.idca.tds.philips.nl> Reply-To: rick@pcrat.UUCP (Rick Richardson) Organization: PC Research, Inc., Tinton Falls, NJ Lines: 25