On Wed, 13 Jul 2005 21:13:45 UTC, "Michel Castelein"
<arcis@[EMAIL PROTECTED]
> wrote:
> A DC or DS instruction with a zero duplication factor forces boundary
> alignment, even when the NOALIGN assembler option is in effect.
>
> At the other hand, IMHO, the assembler always aligns machine
instructions on
> a halfword boundary.
>
> So, I'm wondering why the expansion of the SAVE macro begins with a DS
0H.
>
> That's redundant, isn't it?
>
> Or are there some historical reasons? If yes, which ones?
>
> The first one to provide me with the correct information will receive a
copy
> of my new assembler course.
When I was an active programmer I used to do this all the time,
especially on the first instruction of a macro I wrote.
One, the DS forces the alignment. This is not redundant because the
SAVE macro could be coded following some data which may not have
terminated on a halfword boundary.
Two, the DS provides an easy way to assign the label, if any, on the
macro to the first instruction of the macro. Since the macro may
expand in various ways and therefore may have various first executable
instructions, it is a lot easier to use the DS than to assign/reassign
the label to the various first executable instructions. Even if a
simple macro does not have multiple ways of expanding, macros are not
always static. They tend to change over time. It is just much easier
to maintain macros without having to juggle with assigning and
reassigning the label for the first instruction.
--
John Small
(remove the z's for email address)


|