360 Assembly/Comments

A comment in 360 Assembly is a portion of text that is not processed by the assembler and is used by the programmer to add a description to the code. There are three forms of comments, line comments, code comments and macro comments.

Line Comments
If a line begins with one (or more) asterisks ("*), the rest of the line is treated as a comment Examples: * This is a comment line because it begins with an asterisk **** This is a comment line also ************************************************ *     This is a comment 'box'                  * ************************************************

Caution: The assembler uses a line beginning with *PROCESS to optionally set certain options if a *PROCESS line appears as the first line in the source file.

Code Comments
After a valid 360 instruction, after a single blank, everything else on the line is treated as a comment. A comment - line or code - is not printed when it appears in a macro if PRINT NOGEN has been used. It is also not printed if it appears after a PRINT OFF statement has been issued.

Note: If a code comment is to be specified on a macro instruction where no arguments are to be passed to the macro, it is recommended that a space, a comma, and another space precede the comment to prevent the first word from being interpreted as an argument to the macro.

Macro Comments
Macro comments are used for commenting macros (but can be used outside of macros in mainline program code), and are not listed on the program listing. They are the same as code comments, only they begin with ".*" instead of "*".

.* This comment will never be listed * This comment will be listed if not following PRINT OFF or PRINT NOGEN (if in a macro)