11.07.2015 Views

HLASM: V1R6 Language Ref

HLASM: V1R6 Language Ref

HLASM: V1R6 Language Ref

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

TITLE instructioninstruction occurs in the source module. If the TITLE instruction is the firstinstruction in the source module the heading is printed on the first page of thelisting.When a TITLE instruction immediately follows an EJECT instruction, the assemblerchanges the title but does not perform an additional page-eject.Printing the TITLE statementThe TITLE statement is printed in the listing when you specify a variable symbolin the name, or in the title_string, in which case the statement is printed beforesubstitution occurs.Sample program using the TITLE instructionThe following example shows three TITLE instructions:PGM1 TITLE ’The First Heading’PGM1CSECTUSING PGM1,12 Assign the base registerTITLE ’The Next Heading’LR 12,15 Load the base address&VARSYM SETC ’Value from Variable Symbol’TITLE ’The &VARSYM’BR 14 ReturnENDAfter the program is assembled, the characters PGM1 are placed in bytes 73 to 76 ofall object records, and the heading appears at the top of each page in the listing asshown in Figure 23. The TITLE instruction at statement 7 is printed because itcontains a variable symbol.PGM1 The First Heading Page 3Active Usings: NoneLoc Object Code Addr1 Addr2 Stmt Source Statement <strong>HLASM</strong> R6.0 2008/07/11 17.48000000 00000 00004 2 PGM1 CSECT LRM00020R:C 00000 3 USING PGM1,12 Assign the base registerPGM1 The Next Heading Page 4Active Usings: PGM1,R12Loc Object Code Addr1 Addr2 Stmt Source Statement <strong>HLASM</strong> R6.0 2008/07/11 17.48000000 18CF 5 LR 12,15 Load the base address6 &VARSYM SETC ’Value from Variable Symbol’7 TITLE ’The &VARSYM’PGM1 The Value from Variable Symbol Page 5Active Usings: PGM1,R12Loc Object Code Addr1 Addr2 Stmt Source Statement <strong>HLASM</strong> R6.0 2008/07/11 17.48000002 07FE 8 BR 14 Return9 END LRM00090Figure 23. Sample program using TITLE instructionPageejectsEach inline TITLE statement causes the listing to be advanced to a new pagebefore the heading is printed unless it is preceded immediately by one of thefollowing:v A CEJECT instructionv An EJECT instructionv A SPACE instruction that positions the current print line at the start of a newpagev A TITLE instructionChapter 5. Assembler instruction statements 215

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!