Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Assembly 370 > Re: Assembler: ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 13 of 13 Topic 248 of 328
Post > Topic >>

Re: Assembler: alignment of machine instructions

by "Sven Pran" <no.direct@[EMAIL PROTECTED] > Jul 28, 2005 at 12:11 AM

"Bruce Uttley" <beu@[EMAIL PROTECTED]
> wrote in message 
news:dc8s3i$vk0$1@[EMAIL PROTECTED]
> In article <VPSdnXoSaKoDpnrf4p2dnA@[EMAIL PROTECTED]
>,
> Sven Pran <no.direct@[EMAIL PROTECTED]
> wrote:
>> ...
>>
>>Do you also know and understand the difference between
>>
>>XXX DS 0H
>>
>>and
>>
>>XXX DC 0H'0' ?
>>
>>There is a significant difference (although normally not very
im****tant).
>>
>>regards Sven
>>
>
> The first example merely resets the location counter for the
> next generated output in the object deck.  If the "DS 0H"
> should bump the location counter to a halfword alignment, the
> extra byte is uninitialized data in the object deck.
>
> The second example conditionally generates an extra byte to
> align to the next halfword as if it were a DC.  The object
> deck will contain any forced alignments initialized with needed
> bytes set to X'00'.
>
> The second technique for generating labels in a macro was once
> preferred because it could generate object decks with fewer records
> (because the location counter wasn't being reset) and because
> the extra padding for alignments would be initialized in the
> object deck.  Neither benefit is im****tant today, but it was
> once a [very] small concern.
>

Quite correct.

The "rule" was that if you needed to force alignment immediately
following a DS instruction then you could better use DS 0H, but
if the immediately preceeding instruction was a DC then you ought
to use DC 0H'0' instead.

This "rule" applied to open code as well as in macro coding.

regards Sven
 




 13 Posts in Topic:
Assembler: alignment of machine instructions
"Michel Castelein&qu  2005-07-13 23:13:45 
Re: Assembler: alignment of machine instructions
richgr@[EMAIL PROTECTED]   2005-07-13 21:37:48 
Re: Assembler: alignment of machine instructions
Binyamin Dissen <posti  2005-07-14 11:26:02 
Re: Assembler: alignment of machine instructions
"arargh" arargh  2005-07-13 18:00:03 
Re: Assembler: alignment of machine instructions
glen herrmannsfeldt <g  2005-07-13 21:27:03 
Re: Assembler: alignment of machine instructions
glen herrmannsfeldt <g  2005-07-19 13:43:28 
Re: Assembler: alignment of machine instructions
Binyamin Dissen <posti  2005-07-14 11:26:04 
Re: Assembler: alignment of machine instructions
"John Small" &l  2005-07-14 10:50:59 
Re: Assembler: alignment of machine instructions
glen herrmannsfeldt <g  2005-07-25 16:03:55 
Re: Assembler: alignment of machine instructions
"Michel Castelein&qu  2005-07-26 08:25:21 
Re: Assembler: alignment of machine instructions
"Sven Pran" <  2005-07-27 09:45:31 
Re: Assembler: alignment of machine instructions
beu@[EMAIL PROTECTED] (B  2005-07-27 20:50:58 
Re: Assembler: alignment of machine instructions
"Sven Pran" <  2005-07-28 00:11:47 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Jul 26 2:23:50 CDT 2008.