Arthur T. wrote:

On 13 Jul 2005 16:01:06 -0700, in bit.listserv.ibm-main (Message-ID:<[EMAIL PROTECTED]>) [EMAIL PROTECTED] (Edward E. Jaffe) wrote:

     In open code, people often coded
LABEL     EQU   *
but, if there was an odd-length constant prior to it, it would not be halfword aligned, so people started using the DS 0H technique, instead. (Also, IIRC, the TEST instruction has more information if you code as DS 0H.)



Of course, with modern HLASM it's preferable to code 'DC 0H' rather than the 'DS 0H' as required by older assembler implementations.


Would you please elucidate? IIRC, DS 0H will fill with zeros just as will DC 0H. Why is the latter preferable?


No. 'DS 0H' does *not* fill with zeros! Only 'DC 0H' does that!

The HLASM Language Reference is quite explicit about this. Read the description of the DS instruction here:

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ASMR1010/5.19

It contains the following admonishment:

<Admonishment>
Bytes Skipped for Alignment:  Unlike the DC instruction, bytes skipped for
alignment are not set to zero.  Also, nothing is assembled into the
storage area reserved by a DS instruction.  No assumption should be made
as to the contents of the skipped bytes or the reserved area.
</Admonishment>

'DS 0H' simply updates the offset within the emitted object deck. If/when the slack byte is needed, this causes a new control record to be generated in the load module, which uses more disk space and slows down the fetch process. (At least this used to be true for the linkage editor. Admittedly, I haven't checked lately to see if the z/OS V1.6 binder continues this treatment.)

In any case, the doc is pretty clear about this substantial difference between DC and DS.

--
-----------------------------------------------------------------
| Edward E. Jaffe                |                                |
| Mgr, Research & Development    | [EMAIL PROTECTED]    |
| Phoenix Software International | Tel: (310) 338-0400 x318       |
| 5200 W Century Blvd, Suite 800 | Fax: (310) 338-0801            |
| Los Angeles, CA 90045          | http://www.phoenixsoftware.com |
-----------------------------------------------------------------

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to