New Video: Using COM Control Sections

I’ve recently added a video that covers COM control sections – an old idea that’s interesting to try. If your program consists of multiple CSECTs, you can create a COM section – an uninitialized storage area that becomes part of the object module – and which can be shared selectively among the CSECTs that comprise the program. You can find the video here and some sample code to play with here. There’s also links to these items in the Video Course.

3 Comments

Filed under IBM Mainframe Assembler

3 responses to “New Video: Using COM Control Sections

  1. M Hopper

    Punctilious? This comment in the source is not:

    L R11,=A(MYCOM) POINT R12 TO THE COMMON AREA
    USING MYCOM,R11

    NORENT assembler coding is EVIL and the STORAGE macro is your friend.

  2. Bravo! Another fascinating article on a seldom seen feature of Assembler which has been around since at least System/360 and still carries on even today – the COM instruction:
    http://bit.ly/3poQu9u – In Assembler Language Ref (C28-6514 1967) p. 26
    http://ibm.co/3jSaSP8 – In HLASM 1.6 Language Ref in Knowledge Center
    A couple of aspects not covered in the video which I discovered by playing around with it (see source below).
    (1) Using the name field, you can have multiple COM sections in a source program. “A” and “B” below are separate COM sections.
    (2) Much like CSECT and DSECT, if you reuse a previous COM section name with a subsequent COM section, the previous COM section is continued. Fields “A1” and “A2” below are contiguous bytes in the same COM section (“A”).
    (3) COM sections always align on a double-word boundary. Using the source below, the assembler will insert slack bytes after COM “A” so as to align COM section “B” on a double-word boundary.

    A COM
    A1 DS C
    *
    B COM
    B1 DS C
    *
    A COM
    A2 DS C

Leave a Reply to dwoolbright Cancel reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.