The Punctilious Programmer IBM Mainframe Assembler New Video: Using COM Control Sections

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 thoughts on “New Video: Using COM Control Sections”

  1. Punctilious? This comment in the source is not:


    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: – In Assembler Language Ref (C28-6514 1967) p. 26 – 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