11.07.2015 Views

HLASM: V1R6 Language Ref

HLASM: V1R6 Language Ref

HLASM: V1R6 Language Ref

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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Assembler language coding conventionsBlanklinesBlank lines are accepted in source programs. In open code, each blank line istreated as equivalent to a SPACE 1 statement. In the body of a macro definition,each blank line is treated as equivalent to an ASPACE 1 statement.Comment statement formatComment statements are not assembled as part of the object module, but are onlyprinted in the assembly listing. You can write as many comment statements as youneed, provided you follow these rules:v Comment statements require an asterisk in the begin column. Internal macrodefinition comment statements require a period in the begin column, followedby an asterisk. Internal macro comments are accepted as comment statements inopen code.v Any characters of the EBCDIC character set, or double-byte character set can beused (see “Character set” on page 11).v Comment statements must lie within the statement field. If the comment extendsinto the continuation-indicator field, the statement following the commentstatement is considered a continuation line of that comment statement.v Comment statements must not appear between an instruction statement and itscontinuation lines.Instruction statement formatInstruction statements must consist of one to four entries in the statement field.They are:v A name entryv An operation entryv An operand entryv A remarks entryThese entries must be separated by one or more spaces, and must be written in theorder stated.Statement coding rulesThe following general rules apply to the coding of an instruction statement:v The entries must be written in the following order: name, operation, operand,and remarks.v The entries must be contained in the begin column (1) through the end column(71) of the first line and, if needed, in the continue column (16) through the endcolumn (71) of any continuation lines.v The entries must be separated from each other by one or more spaces.v If used, a name entry must start in the begin column.v The name and operation entries, each followed by at least one space, must becontained in the first line of an instruction statement.v The operation entry must begin at least one column to the right of the begincolumn.Statement example: The following example shows the use of name, operation,operand, and remarks entries. The symbol COMP names a compare instruction, theoperation entry (CR) is the mnemonic operation code for a register-to-registercompare operation, and the two operands (5,6) designate the two general registerswhose contents are to be compared. The remarks entry reminds readers that thisinstruction compares NEW SUM to OLD.18 <strong>HLASM</strong>: <strong>V1R6</strong> <strong>Language</strong> <strong>Ref</strong>

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

Saved successfully!

Ooh no, something went wrong!