ASSEMBLER INPUT AND OUTPUT The Assembler accepts as input a paper tape containing a control statement and a source language program. A relocat- able source language program may be divided into several subroutines; the designation of these elements is optional. The output produced by the Assembler may include a punched paper tape containing the object programs, an object program listing, and diagnostic messages. 5.1 CONTROL STATEMENT The control statement specifies the output to be produced: ASMB,p1,p2,...,pn "ASMB," is entered in positions 1-5. Following the comma are one or more parameters, in any order, which define the output to be produced. The control staement must be termi- nated by an end-of-statement mark, (CR)(LF). The parameters may be any legal combinations of the follow- ing starting in position 6: A Absolute: The addresses generated by the Assembler are to be interpreted as absolute locations in memory. The program is a complete entity. It may not include NAM, ORB, COM, ENT, EXT, arithmetic pseudo operation statements or literals. The binary output format is that specified for the Basic Binary Loader. R Relocatable: The program may be located anywhere in memory. Instruction operands are adjusted as neces- sary. The binary output format is that specified for the BCS Relocating loader. B Binary output: A program is to be punched according to one of the above parameters. L Listing output: A program listing is to be produced either during pass two or pass three (if binary output se- lected) according to one of the above parameters. 5-1 T Table print: List the symbol table at the end of the first pass. For the Extended Assembler: List the symbol table in alphabetic order in three sections: section 1 for on- character symbols, section 2 for two- and three- character symbols, and section 3 for four- and five- character symbols. N Include sets of instructions following the IFN pseudo instruction. Z Include sets of instructions following the IFZ pseudo instruction. F Accepted by the Assembler to provide compatibility with DOS or DOS-M Assembler programs. F causes no action in any other assemblers. (F = Extended Arithmetic Unit/Floating Point; X = Nonextended Arithmetic Unit; No parameter - Extended Arithmetic Unit) Either A or R must be specified in addition to any combination of B, L, or T. If a programmer wishes to assemble pass 1 of a source program to check for errors, he can specify only an A or R to be the sole parameter of the Assembler control statement, executing only pass 1. (This produces pass 1 error messages without listing the program or providing an object tape). Extended Assembler only. The Assembler control statement must specifcally request pass 2 operations (list or punch) in order for pass 2 to be executed. Lack of pass 2 option information causes processing only of pass 1 errors. If a C option is also provided, an automatic cross-reference symbol table is done after pass 1 when operating in the MTS environment. The control statement may be on the same tape as the source program, or on a separate tape; or it may be entered via the Teleprinter keyboard. 5-2 5.2 SOURCE PROGRAM The first statement of the program (other than remarks or a HED statement) must ba a NAM statement for a relocatable program or an ORG statement for indicating the origin of an absolute program. THe last statement must be an END state- ment and may contain a transfer address for the start of a relocatable program. Each statement is followed by an end-of-statement mark. 5.3 BINARY OUTPUT The punch output is defined by the ASMB control statement. The punch output includes the instructions translated from the source program. It does not include system subroutines re- ferenced within the source program (arithmetic subroutine calls, .IOC., .DIO., .ENTR, etc.) 5.4 LIST OUTPUT Fields of the object program are listed in the following print columns. Columns Content ------- ------- 1-4 Source statement sequence number gener- ated by the Assembler 5-6 Blank 7-11 Location (octal) 12 Blank 13-18 Object code word in octal 19 Relocation or external symbol indicator 20 Blank 21-72 First 52 characters of source statement. 5-3 Lines consisting entirely of comments (i.e. * in column 1) are printed as follows: Columns Content ------- ------- 1-4 Source statement sequence number 5-72 Up to 68 characters of comments A Symbol Table listing has the following format: Columns Content ------- ------- 1-5 Symbol 6 Blank 7 Relocation or external symbol indicator 8 Blank 9-14 Value of the symbol The characters that designate an external symbol or type of relocation for the Operand field or the symbol are as follows: Columns Content ------- ------- Blank Absolute R Program relocatable B Base page relocatable C Common relocatable X External symbol At the end of each pass, the following is printed: ** NO ERRORS* or ** nnnn ERRORS* The value nnnn, indicates the number of errors. NOTE: For complete operating instructions for the HP Assem- bler or the extended Assembler, consult Software Operat- ing Procedures, SIO Subsystems module (5931-1390) 5-4