Freeware Page
1 - - - SLAC VM NOTEBOOK - Module 24: SLAC Enhancements to and Beautifications of the IBM H-Level Assembler for Version 2.8 - Greg Mushial - Revision 6 20 July 1983 (CMS ASMH Ver. 2.9) - Module 24: The IBM Level H Assembler has been modified to provide added language and processing capabilities. This note describes only the departures from the full language, and assumes a working familiarity with the Level H Assembler language. - SLAC Computing Services (SCS) Stanford Linear Accelerator Center (SLAC) Menlo Park, California 94025 1 - DISCLAIMER NOTICE This document and/or portions of the material and data furnished + ___ ________ ___ ____ _________ herewith, was developed under sponsorship of the U.S. + ________ Government. Neither the U.S. nor the U.S.D.O.E., nor the Leland Stanford Junior University, nor their employees, makes any warranty, express or implied, or assumes any liability or responsibility for accuracy, completeness or usefulness of any information, apparatus, product or process disclosed, or represents that its use will not infringe privately-owned rights. Mention of any product, its manufacturer, or suppliers shall not, nor is it intended to, imply approval, disapproval, or fitness for any particular use. The U.S. and the University at all times retain the right to use and disseminate same for any purpose whatsoever. - - - Publishing History for Module 24 Revision 1.......14 Mar. 1979 (ASMH Ver. 2.4) Revision 2........5 Nov. 1979 (ASMH Ver. 2.5) Revision 3.......30 Aug. 1980 (ASMH Ver. 2.6) Revision 4....3 Sep. 1981 (CMS ASMH Ver. 2.7) Revision 5....9 Dec. 1982 (CMS ASMH Ver. 2.8) Revision 6...20 July 1983 (CMS ASMH Ver. 2.9) 1 Revision 6 SLAC VM NOTEBOOK Page iii Module 24: IBM H-Level Assembler - 0 CONTENTS FOR MODULE 24 - 0 Chapter + _______ + page + ____ 0 1. INTRODUCTION . . . . . . . . . . . . . . . . . . . . . . . . 1 + 1. INTRODUCTION 1 0 2. CHANGES TO THE ASSEMBLER . . . . . . . . . . . . . . . . . . 2 + 2. CHANGES TO THE ASSEMBLER 2 0 Changes to Printed Output . . . . . . . . . . . . . . . . 2 Changes to Error Messages and Severities . . . . . . . . . 3 Changes to Input and Output Handling . . . . . . . . . . . 3 Changes to Parameters . . . . . . . . . . . . . . . . . . 5 0 3. CHANGES TO THE MACRO LANGUAGE . . . . . . . . . . . . . . . . 7 + 3. CHANGES TO THE MACRO LANGUAGE 7 0 4. CHANGES TO THE ASSEMBLY LANGUAGE . . . . . . . . . . . . . . 9 + 4. CHANGES TO THE ASSEMBLY LANGUAGE 9 - Appendix + ________ + page + ____ 0 A. THE CMS/ASMH INTERFACE AND ITS BEHAVIOR . . . . . . . . . . . 14 + A. THE CMS/ASMH INTERFACE AND ITS BEHAVIOR 14 0 The Interface Function . . . . . . . . . . . . . . . . . . 14 ASMH Command Format . . . . . . . . . . . . . . . . . . . 14 ASMH Parameters Actually Understood by the Interface . 14 Alternate MACLIB Specification . . . . . . . . . . . . 15 - INDEX TO MODULE 24 . . . . . . . . . . . . . . . . . . . . . . . 16 + INDEX TO MODULE 24 16 1 Revision 6 SLAC VM NOTEBOOK Page 1 Module 24: IBM H-Level Assembler - 0 Chapter 1 + Chapter 1 0 INTRODUCTION + INTRODUCTION - The SLAC modifications to the IBM Program Product H-Level Assembler are of three kinds: 0 Changes that do not affect the programming language, but enhance the capabilities and usability of the Assembler; 0 Changes to the macro and conditional assembly language; and 0 Changes to the assembly ("open-code") language. 0 ¦ Note: Versions 2.7 and beyond are supported only in a VM/SP environ- ¦ ment (though Versions 2.7 through 2.9 are known to have successfully ¦ run at at least a couple of MVS and MVS/SP installations). 0 ¦ Note: Those parts of this document that changed with the current ¦ revision are denoted by "¦" in the left margin. 0 ¦ Note: The SLAC modifications, Versions 2.0 through 2.8 are/were ¦ based on IBM' Version 1 of ASMH; Versions 2.9 and beyond are/will be based on IBM's Version 2. 1 Revision 6 SLAC VM NOTEBOOK Page 2 Module 24: IBM H-Level Assembler - 0 Chapter 2 + Chapter 2 0 CHANGES TO THE ASSEMBLER + CHANGES TO THE ASSEMBLER - 2.1 CHANGES TO PRINTED OUTPUT + 2.1 CHANGES TO PRINTED OUTPUT + _______ __ _______ ______ 0 ¦ The heading at the top of each page contains the identification "(SLAC V2.9)". 0 A subset of the IEV9xx error messages that appear in the SYSPRINT data set now will also appear in the SYSTERM data set (e.g., no core left, i/o error...). 0 The default number of lines in SYSTERM for a no-error assembly is now 2. The "ASSEMBLER DONE" and the "NO STATEMENTS FLAGGED" are still printed, and the rest are suppressed. 0 The DECKID (the name field from the first title card) is now also printed in SYSTERM. This is helpful if you have done a batched assembly and are trying to determine which assembly is responsible for an error message. 0 MACRO/Copy Code Source Cross-Reference. This is a list of the SYSLIB data set names (in search order), and a listing of the mac- ros and copy code that were used from each. The MACRO/Copy Code Source Cross-Reference is under the control of the NO MSRC param- eter. MSRC (the default) will allow it to be produced. 0 DSECT Cross-Reference. Directly after the MACRO/Copy Code Source, if NODXREF is not specified (i.e., DXREF is the default), a listing of the DSECTs in the assembly is produced. For each DSECT, its name, length (in bytes), and the statement number where it is defined are given. 0 At the top of each page, the current active USINGs are now printed on up to two subtitle lines. These USINGs are current as of the end of assembly of the last instruction on the prior page. These lines are under the control of the NO UMAP parameter. UMAP (the default) will cause the USINGs to be printed. 0 The second heading line on each page of the actual assembly list- ing (the line with 'LOC OBJECT ADDR1 ADDR2') will start with 'D-LOC' if IBMOUT is not in effect and at the time of the page eject the assembly was in a DSECT. 0 The IBM implementation of SYSTERM has been entirely replaced. The new SYSTERM, for errors in macro-generated code, will only print the macro call once. After printing any individual macro call, it 1 Revision 6 SLAC VM NOTEBOOK Page 3 Module 24: IBM H-Level Assembler 0 will only print the statement in error and its associated error messages, rather than all the statements between the call to the + ___ error. The format for SYSTERM is now the same as that for SYSPRINT (i.e., it's not all rearranged like the old SYSTERM). 0 At the end of each assembly listing, the number of utility file (SYSUT1) reads and writes are displayed, along with the SYSIN, SYSPRINT and SYSLIB counts which were displayed before. 0 ¦ The output produced as the Assembly Symbol Cross Reference (the ¦ cross-reference under the control of NO XREF option) has been ¦ modified to indicate which references to a symbol will result in ¦ that symbol being altered at execution time; such references are denoted by being underscored. - 2.2 CHANGES TO ERROR MESSAGES AND SEVERITIES + 2.2 CHANGES TO ERROR MESSAGES AND SEVERITIES + _______ __ _____ ________ ___ __________ 0 A new error test and diagnostic message have been added: 0 IEV056 - USING RENDERED NULL BY A PRIOR ACTIVE USING 0 Given the rules governing base-displacement resolution of implied addresses (choose the register giving the smallest displacement, and the highest-numbered such register), this message will be issued if it is found that a prior active USING's range overlaps and super- sedes that of the USING being processed. The severity level of this error is 4. 0 The error message "IEV044 - SYMBOL NOT DEFINED" has been extended so that it now will tell you which symbol is thought to be unde- fined. 0 A misquoted operand on a TITLE card now will only earn you a level 4 error. - 2.3 CHANGES TO INPUT AND OUTPUT HANDLING + 2.3 CHANGES TO INPUT AND OUTPUT HANDLING + _______ __ _____ ___ ______ ________ 0 ASMH will now accept WYLBUR pressed format (with RECFM=U) as input for both SYSIN and SYSLIB. The concatenations of SYSLIB may be either RECFM=FB or RECFM=U, or a mixture of the two. Another change to SYSLIB processing is that the data set with the largest block size need not be first in the SYSLIB concatenation sequence. 0 An exit is available just before each line is printed. The exit routine name is specified by 'PEXIT=XXXX' in the invocation PARM string. XXXX is the module name of the exit routine in the PDS pointed to by the EXITLIB DD statement. The exit routine is called using standard OS linkage conventions. The parameter address list whose address is passed in R1 is: 1 Revision 6 SLAC VM NOTEBOOK Page 4 Module 24: IBM H-Level Assembler 0 A(the line to be printed) A(the SYSPRINT DCB) A(OCTL values) A(line type flag byte) 0 The first two are self-explanatory. The OCTL values, 4 successive halfwords, will be described below in the section "Changes to the Assembly Language." The line type flag is a single byte whose bits are defined as: 0 '80' - This line is part of the 3-line title field at the top of each page. '40' - This line is a machine instruction line. '20' - This line is a DC/DS line. '10' - This line is part of the symbol table cross-reference. '08' - This line is part of the post-assembly messages. '04' - This line is part of the pre-assembly '02' - SYSPRINT DCB open exit entry (occurs just before the exit returns to finish the open). '01' - This line is the first output line of this assembly. 0 (Note: For the open-exit call, only the DCB address and the flag byte address are defined; any nonzero return code is equivalent to 20.) 0 When the exit routine returns control to the Assembler, R15 must contain a return code. If an invalid return code is returned, the exit will be turned off (i.e., never called again for this assembly). The valid return codes are: 0 0 - print the line in the buffer 4 - don't print the line in the buffer 8 - print the line and return back to the exit with an empty buffer 12 - don't print the line and return with an empty buffer 16 - final return for this line 20 - kill the exit (i.e., don't call again for this assembly) 0 The LRECL of the SYSPRINT DCB has been unhardwired from 121. This allows you to specify any value greater than or equal to 121. (If the LRECL specified is less than 121 it will be set to 121.) If you do specify a value larger than 121, only the first 121 bytes of each print buffer will be properly blanked. It's up to you to blank or clear anything beyond 121. 0 The DD name for the object deck output data set for the Loader or Linkage Editor is now determined in much the same way as in ASMG. The ASMH default DD name, SYSGO, can be overridden by an alternate 1 Revision 6 SLAC VM NOTEBOOK Page 5 Module 24: IBM H-Level Assembler 0 DD name list. This name is searched for in the TIOT; if it is found, it will be used as the DD name. If not, the TIOT is searched for SYSGO or SYSLIN. If either is there, the one found will be used. If both are there, SYSGO will be used. If neither is there, the DD name in the DCB will be left as is and processing will continue as in the original ASMH. (The above does not apply to ASMH under CMS). 0 SYM cards are now produced for equates whose first operand is relocatable and the LOCTR for that operand is the current one. The format is the same as that generated by ASMF. 0 For any part of ASMH's input that is a WYLBUR edit data set, one now has a choice of formats of the sequence field. The invocation parameter INTEGER, the default, will yield a sequence field of 8 decimal digits (Fortran I8 format). DECIMAL, the other choice, will yield a sequence field of 4 digits, a period, and 3 more dig- its (Fortran F8.3 format). 0 The input WYLBUR line number 234.567 will yield "00234567" with INTEGER, and "234.567" with DECIMAL. Note that an input of "87654.321" with the DECIMAL option yields: "7654.321" (the sequence field only has room for 8 characters). 0 The FOLD parameter causes ASMH to treat all lower case characters as their upper case counterparts. NOFOLD is the default. - 2.4 CHANGES TO PARAMETERS + 2.4 CHANGES TO PARAMETERS + _______ __ __________ 0 If you specify the REL2 invocation parameter (a new option), 2-byte A-type relocatable constants are allowed, as in AL2(*). Y-type constants must still have absolute operands; only A-type constants are affected by the REL2 parameter in this version of ASMH. 0 The default for the RLD/NORLD invocation parameter is now NORLD. 0 The SYSPRINT exit parameter PEXIT=XXXX is described above, in the discussion of changes to input and output handling. 0 The Assembler can now run entirely in memory, without SYSUT1. By specifying NODISK, the Assembler will ignore SYSUT1 and attempt to run entirely with internal buffering of information that normally would be spilled to disk. If there isn't enough memory for the assembly to be done this way, it will be terminated with a level 20 return code and a message. 0 At the end of each assembly, the Assembler will tell you how much memory was allocated to buffers and what it determines it would need to do the assembly completely in memory. This information is provided even when you are not running with NODISK (i.e., DISK). 1 Revision 6 SLAC VM NOTEBOOK Page 6 Module 24: IBM H-Level Assembler 0 Two invocation parameters have been added to control PRINT statements that appear within an assembly source. PRINTGEN, if specified, will nullify any PRINT NOGENs embedded within a program source. PRINTON does similarly, overriding PRINT OFFs. 0 The invocation parameter OPCNTS will cause the opcode table and the opcode usage counts to be displayed at the end of each assem- bly. The usage count displayed is the number of times the opcode was searched for in the opcode table. 0 Within the Assembler, the opcodes are hashed onto a set of chains. For the OPCNTS display, the beginning of each such chain is flag- ged by a "¦". 0 The IBMOUT parameter requires the Assembler's SYSPRINT output to be similar to that of the unmodified ASMH. At the current time, IBMOUT really means NOUMAP, NOMSRC and NODXREF. If in the future there are other options that would change the listing format, IBMOUT will reset them also. 0 The parameters INTEGER/DECIMAL and FOLD/NOFOLD are described above, in the discussion of changes to input and output handling. 0 The OLDTYPE invocation parameter is described below in the discus- sion of changes to the macro language. 0 The parameter LIBMAC (NOLIBMAC is the default) has been added to allow for the definition of each library resident macro to be inserted into the SYSIN stream immediately preceeding the first invocation of that macro. 0 ¦ With the introduction of ASMH release 2, (by definition) the ¦ assembler's opcode table was extended to include the XA opcodes. ¦ These new opcodes can cause conflicts with already existing user ¦ macros. For those users that wish to use the new assembler but ¦ cannot because opcode conflicts, the invocation parameter OPC370 ¦ will delete the XA opcodes from the opcode table. The default ¦ option is OPCXA. 1 Revision 6 SLAC VM NOTEBOOK Page 7 Module 24: IBM H-Level Assembler - 0 Chapter 3 + Chapter 3 0 CHANGES TO THE MACRO LANGUAGE + CHANGES TO THE MACRO LANGUAGE - Six new system variable symbols have been defined: 0 (1) &SYSSTYP - a character variable containing the location counter type ('CSECT' or 'DSECT') at the invocation of the current macro. (This definition is the same as in ASMG.) 0 (2,3) &SYSJOB, &SYSSTEP - both are character variables. For OS, they return the job name and the rightmost non-blank stepname in the TIOT. For CMS, they return 'NO JOB' and 'NO STEP' respec- tively. 0 (4) &SYSNEST - an arithmetic type variable that returns the current macro nesting level. Level 0 is defined as the open code level. (The use of &SYSNEST makes writing recursive macros not only easier but much safer. A recursive macro now has a way of tell- ing how "deep in the weeds" it is, and can do something about it.) 0 (5) &SYSMDSN - a character variable giving the source of the current macro. The variable is 50 bytes long and is always padded with blanks on the right. The first 6 bytes give the volume serial on which the macro was found, and the following 44 bytes are the data set name. For CMS, the DSN is only 8 bytes long and is the file name. 0 (6) &SYSSTMT - an eight-byte character variable that contains the statement number of the next statement to be generated. The + ____ variable is always eight characters and is padded on the left with zeros. (The significant digits can be obtained by assign- ing &SYSSTMT to an arithmetic-type variable.) 0 MACRO call statement name fields need not contain a valid Assem- bler symbol. If you desire to put a number, any string without an embedded blank, or any quoted string in the name field, no error messages will be generated. 0 There are 2 valid operands on the AREAD statement that were not documented by IBM: CLOCKB and CLOCKD. They return the result of a TIME BIN and TIME DEC (in the OS sense) respectively. 0 The type attribute (T') of a parenthesized expression like "(10)" is no longer 'N'. It is set to 'U' like it should be. The only thing that has type attribute 'N' is a truly self-defining term. (Try generating DC H'10E(10)' from within a macro because the Assembler "told" you that the T' of "(10)" was 'N'. (For anyone 1 Revision 6 SLAC VM NOTEBOOK Page 8 Module 24: IBM H-Level Assembler 0 that may need the old definition, there is the OLDTYPE invocation parameter.) 0 In LCLx/GBLx statements, the "&" preceding the variable names being declared is no longer required. The absence of the "&" will cause a level 0 warning message to be generated. This can be sup- pressed by running ASMH with FLAG set to greater than 0. 0 The macro language has 2 new opcodes: ASPACE and AEJECT. They provide services analogous to SPACE and EJECT, but only for the listing of in-line macro source code. ASPACE, unlike its assembly time counterpart, allows only an unsigned decimal integer as a possible operand. AEJECT, like EJECT, neither requires nor allows an operand. 1 Revision 6 SLAC VM NOTEBOOK Page 9 Module 24: IBM H-Level Assembler - 0 Chapter 4 + Chapter 4 0 CHANGES TO THE ASSEMBLY LANGUAGE + CHANGES TO THE ASSEMBLY LANGUAGE - The <NO>MSOURCE operand may be specified on the PRINT statement. If PRINT NOMSOURCE and PRINT GEN are both in effect, the body (columns 1 - 71) of each macro-generated statement will not be printed. If you write code rich in macro calls, it's nice to see the addresses and the generated code on the left of the listing, but the body of each statement can be fairly meaningless; hence you may not want it printed. 0 The underscore (_) has been added to the list of characters that ASMH allows in symbols. It is treated the same as a numeric digit as far as where it may and may not appear in symbols and in opera- tion codes and macro names. The common use is to separate words in labels or identifiers (don't forget, ASMH allows identifiers of up to 63 characters). 0 A new machine instruction operation code has been added for VM users - DIAG (DIAGNOSE). DIAG is treated as an RS-type instruc- tion: 0 DIAG r1,r3,d2(b2) 0 The Assembler instruction statement opcode OCTL provides a way of passing parameters to the print exit. There are 4 operands allowed on an OCTL statement, each of which must evaluate to a 16-bit absolute expression. These are evaluated and put into the + ________ corresponding halfwords of the OCTL values passed to the exit rou- tine designated by the PEXIT parameter. Each operand may be of three forms: an absolute expression; an expression of the form * N (where * is taken to be the current value for that OCTL posi- tion to which N is either added or subtracted); or null, which means leave the current value as is. Note: The Assembler places no meaning on the operand values; it simply evaluates them and passes them to the print exit. For a missing (null) operand, the value that was there before is left untouched. 0 A new operand, NOPRINT, has been added to the PUSH, POP, and PRINT pseudo instructions. If you specify 'NOPRINT' the statement will not be printed, as you would expect. 0 Qualified USINGs (or, more properly, Labeled USINGs and Qualified Symbols), are a major new capability of ASMH, allowing much greater control over the resolution of symbolic expressions into base-displacement form with specific base registers. 1 Revision 6 SLAC VM NOTEBOOK Page 10 Module 24: IBM H-Level Assembler 0 The mechanics of this facility are rather simple. First, put a label on a USING statement. Then, to force the Assembler to resolve a symbol into base-displacement form through that USING, qualify the symbol by preceding it with the label on the USING, followed by a period. An example of Labeled USINGs and Qualified Symbols would be: 0 PRIOR USING IHADCB,R10 NEXT USING IHADCB,R2 MVC PRIOR.DCBLRECL,NEXT.DCBLRECL 0 Without labeled USINGs, this would have to be written in the awk- ward and inelegant form: 0 USING IHADCB,R10 MVC DCBLRECL,DCBLRECL-IHADCB(R2) or MVC DCBLRECL-IHADCB(,R10),DCBLRECL-IHADCB(R2) 0 Another example of the use of labeled USINGs is: 0 X CSECT USING X,R10,R11 . . SYSUT2 USING IHADCB-(DCBUT2-X),R10,R11 LH R0,SYSUT2.DCBBLKSI . . DCBUT2 DCB DDNAME=SYSUT2,... 0 The usual way of symbolically referencing parts of a DCB is to load the address of the DCB into Rn followed by "USING IHADCB,Rn". Such a technique requires you to allocate an extra register to hold the address of the DCB. With labeled USINGs, you are able to utilize already allocated registers (in this case, the program's base registers). This technique works because the two USINGs do not interfere with each other, even though they specify the same registers; see below for details. 0 The label on a USING may not appear in the name field of any other statements except that of other USINGs. If a label appears on a USING, any other USING with the same label is nullified. 0 As is the case with non-labeled USING statements, a symbol (in the first operand) or a register (in any of the remaining operands) may appear in any number of USINGs. However, in the case of qual- ified USINGs, as long as all the USINGs have unique labels, all are considered active and are eligible to be used as qualifiers. 0 There is a very basic concept about Labeled and non-Labeled USINGs that needs to be understood. In non-Labeled USINGs, a register implies data, in the sense that a register may imply only one 1 Revision 6 SLAC VM NOTEBOOK Page 11 Module 24: IBM H-Level Assembler 0 piece of data at a time (i.e., when a register that appeared in a USING appears in another USING, the prior USING is nullified). In Labeled USINGs the reverse is true: the data implies a register. That is, a single register may appear in multiple USINGs, all + ___ being active, so long as all the USINGs have unique labels. (Nul- lification of Labeled USINGs occurs only when a repeated Label appears, not when a repeated register appears.) 0 Labeled USINGs do not interfere with non-labeled USINGs. When the Assembler resolves an implied address into base-displacement form, either the expression to be resolved was qualified or not. If it was, the specified labeled USING will be used. If not, the active non-labeled USINGs will be scanned in the standard manner, looking for a resolution. 0 A label on a USING defines an environment. As such, when you want to nullify (delete) that environment, you must DROP the environ- ment's name, the USING's label. An attempt to nullify a labeled USING by dropping its registers will result in those registers being dropped instead from the non-labeled USING pool. You would nullify the Labeled USINGs from the example above by writing: 0 DROP PRIOR,NEXT - Ten new extended branch mnemonics have been added to the existing set. The new mnemonics are BGT, BGE, BEQ, BLE, BLT, and their RR-type BCR counterparts BGTR, BGER, BEQR, BLER, and BLTR. The corresponding branch mask digits are 2, 10, 8, 12, and 4 respec- tively. 0 Literals and where they may appear has been made slightly less restrictive. For machine instructions (and only machine instruc- tions) a literal may appear anywhere a relocatable symbol is valid. The exception to this is that the length attribute of a literal is still undefined. An example of this might be: 0 LA R1,=C'??'-24 get parm for ADT lookup 0 AOPTION - a new opcode. Given that the invocation parameters really only define a default assembly environment, AOPTION pro- vides a means to specify a specific statement-by-statement assem- bly environment. AOPTION may be used as many times as desired during an assembly whether batched or not. (TEST and NOTEST are currently the only valid operands.) 0 Now, at the end of each assembly, all the ASMH options are reset to their invocation values. This means that an environment modi- fied through AOPTION will not affect the next assembly in a batch. 0 The length attribute (L') used on a machine instruction within a macro definition now behaves the same as that of ASM-F. (A state- ment such as: 1 Revision 6 SLAC VM NOTEBOOK Page 12 Module 24: IBM H-Level Assembler 0 TM &X,L'&X 0 used to cause the Assembler to think that it had the letter "L" followed by an improperly quoted string.) 0 Both the scale attribute (S') and the integer attributes (I') now may also be used in open code. Both their definitions are identi- cal to those for use within macro definitions. 0 Errors in the invocation parameters are diagnosed better. Instead of getting a "There is an error in the parm list" message (at the end of the assembly), the actual parms in error will be displayed. In an OS environment, this display will be sent both to SYSPRINT and to SYSTERM. (Note: In CMS, SYSTERM is assigned to the termi- nal.) 0 More important, as soon as the assembler recognizes that it has an erroneous parm, a warning message and the erroneous parm will be sent to the terminal. (This way, if the parm is critical, the assembly can be aborted before wasting a lot of time.) 0 Associated USING statements provide additional control over address expression resolution. The format of an Associated USING is: 0 <label> USING S1,S2 0 <label> if present, makes this a labeled Associated USING (see the discussion of labeled USINGs above). S1 is an expression to be interpreted in the same way as in any other USING. S2 is a second address expression specifying where S1 is to be based. 0 An example of the use of an Associated USING might be: 0 X CSECT USING X,R10,R11 NORMAL USING . . USING IHADCB,DCBUT2 ASSOCIATED USING LH R0,DCBBLKSI USES R10 OR R11 FOR BASE . . DCBUT2 DCB DDNAME=SYSUT2,... 0 Note that this is another (simpler) solution to the problem solved in the second example in the description of Labeled USINGs. 0 The difference between ordinary USINGs, Labeled USINGs, and Associ- ated USINGs is the following. In ordinary situations, a programmer must assign several registers for addressing purposes, and provide USING statements to allow the Assembler to make address resolution decisions. Labeled and Associated USINGs allow you to restrict the Assembler's decisions and to reduce the number of registers needed for addressing. 1 Revision 6 SLAC VM NOTEBOOK Page 13 Module 24: IBM H-Level Assembler - With ordinary USINGs, a given expression may be addressable with several registers; Labeled USINGs provide qualifiers that let you specify exactly which USING is to be used to resolve that expres- sion. Thus, Labeled USINGs can be viewed as a way to reduce the freedom with which the Assembler chooses among the "available" reg- isters. 0 Conversely, Associated USINGs allow you to reduce the number of reg- isters that must be assigned to addressing, but allows the Assembler freedom to choose the register. If an area of memory customarily mapped by one register is addressed by another, only the second need be used for address resolution; the mapping is specified in an Asso- ciated USING, as in the above example. 0 Qualifiers (from labeled USINGs) are now cross referenced. 0 All the mnemonics listed in GA22-7000-7 (the edition of the Sys- + ___ tem/370 Principles of Operation relevant to the 3081) are now + _______ __________ __ _________ defined in the opcode table. The added opcodes include: BAS, BASR, CLRCH, CONCS, DISCS, EPAR, ESAR, IAC, IPTE, IVSK, LASP, MVCIN, MVCK, MVCP, MVCS, PC, PI, SAC, SSAR, TB and TPROT. 1 Revision 6 SLAC VM NOTEBOOK Page 14 Module 24: IBM H-Level Assembler - 0 Appendix A + Appendix A 0 THE CMS/ASMH INTERFACE AND ITS BEHAVIOR + THE CMS/ASMH INTERFACE AND ITS BEHAVIOR - For the IBM H-Level Assembler to run under CMS, there must be an interface module to establish the environment that the Assembler expects: IBM OS/360 MVT. This appendix describes such a module. - A.1 THE INTERFACE FUNCTION + A.1 THE INTERFACE FUNCTION + ___ _________ ________ 0 The interface has two functions: to convert the CMS token list of ASMH parameters into an OS-format parameter list, and to provide the FILEDEFs required for the Assembler to operate. 0 In providing the Assembler's required FILEDEFs, if the interface finds that a FILEDEF already exists for a particular file, the existing one will be used. 0 At the end of the assembly the interface will issue a FILEDEF CLEAR for each file the Assembler used. 0 Just after establishing the FILEDEF environment and before actually calling the Assembler, the interface will display the assignments for the Assembler input and output sources and sinks. The display is by DDname and shows the assigned file-id or device type and whether the FILEDEF is user-supplied for each source or sink. - A.2 ASMH COMMAND FORMAT + A.2 ASMH COMMAND FORMAT + ____ _______ ______ 0 ASMH <src_fn> (options ) <maclib_fns>¦= <mac_ctl> - A.2.1 ASMH Parameters Actually Understood by the Interface + A.2.1 ASMH Parameters Actually Understood by the Interface + ____ __________ ________ __________ __ ___ _________ 0 The interface understands two flavors of parameters: those that cause the interface to do something but, which also get passed on to the Assembler; and those the interface understands exclusively, which are not passed on to the Assembler. 0 There are three parameters understood by the interface and passed on: 0 NODISK if specified, the interface will not issue a FILEDEF for the utility file, SYSUT1. 1 Revision 6 SLAC VM NOTEBOOK Page 15 Module 24: IBM H-Level Assembler 0 NOLIST if specified, the interface will not issue a FILEDEF for the listing file, SYSPRINT. 0 NOOBJECT if specified, the interface will not issue a FILEDEF for the text deck output file, SYSLIN. 0 There are four parameters understood exclusively by the interface: 0 FRW the "default" disk (described below) is set to the filemode of the first R/W disk in the search sequence. 0 LRW the "default" disk is set to the filemode of the R/W disk with the greatest amount of free space, where "free space" means the number of free disk blocks times the size of each block. (LRW is the default.) 0 NOTELL if specified, the mapping of sources and sinks is not pro- duced. 0 PRINT if specified, the Assembler listing output (if produced) is directed to the user's virtual printer. 0 The "default disk" is used for the utility file and for the text or listing file if the SYSIN input file is on a read-only disk. - A.2.2 Alternate MACLIB Specification + A.2.2 Alternate MACLIB Specification + _________ ______ _____________ 0 Normally, ASMH uses the up to eight MACLIBs specified by the Global MACLIB. Up to 64 MACLIBS can be used by specifying either the <maclib_fns> or <mac_ctl> command format. 0 <maclib_fns> a list of MACLIB file names, each separated by a blank, to be used as the MACLIBs for the assembly. 0 = <mac_ctl> the name of a card-image file that contains the names of the MACLIBs to be used for the assembly. The form of <mac_ctl> is: 0 <fn> <ft> <fm> 0 ¦ where <fn> defaults to the "fn" of the file being ¦ assembled and <ft> and <fm> default to "MACLNAME" ¦ and "*", respectively. Single or multiple MACLIB names may be specified on a given record of the file, and there may be multiple records to the file, although a given MACLIB name may not span records. 1 Revision 6 SLAC VM NOTEBOOK Page 16 Module 24: IBM H-Level Assembler - 0 INDEX TO MODULE 24 + INDEX TO MODULE 24 - &SYSJOB ... 7 Labeled USING ... 9, 12 &SYSMDSN ... 7 LCLx/GBLx ... 8 &SYSNEST ... 7 length attribute (L') ... 11 &SYSSTEP ... 7 LIBMAC ... 6 &SYSSTMT ... 7 literals ... 11 &SYSSTYP ... 7 MACRO/Copy code source cross- "&" ... 8 reference ... 2 MSOURCE ... 9 AEJECT ... 8 AOPTION ... 11 name field ... 7 AREAD ... 7 nesting ... 7 ASMG ... 7 NODISK ... 5 ASMH ... 9 NOMSOURCE ... 9 ASPACE ... 8 NOPRINT ... 9 Associated USING ... 12 NOTEST ... 11 branch mnemonics ... 11 OCTL ... 4, 9 OLDTYPE ... 6, 8 CLOCKB ... 7 OPCNTS ... 6 CLOCKD ... 7 opcode ... 6 CMS ... 7, 12 PEXIT ... 3, 5, 9 D-LOC ... 2 POP ... 9 DECIMAL ... 5 PRINT ... 5, 9 DECKID ... 2 PRINT NOGEN ... 6 DIAG (DIAGNOSE) ... 9 PRINT OFF ... 6 DROP ... 11 PRINTGEN ... 5 DSECT cross-reference ... 2 PRINTON ... 5 DXREF ... 2 PUSH ... 9 equates ... 5 Qualified Symbols ... 9 EXITLIB ... 3 qualifiers ... 10 FOLD ... 5 RECFM=U ... 3 relocatable constants ... 5 GA22-7000-7 ... 13 REL2 ... 5 IBMOUT ... 6 scale attribute (S') ... 12 IEV044 - SYMBOL NOT sequence field ... 5 DEFINED ... 3 SLAC V2.9 ... 2 IEV056 - USING RENDERED SYSGO ... 5 NULL ... 3 SYSLIB ... 3 IEV9xx ... 2 SYSLIN ... 5 INTEGER ... 5 SYSPRINT ... 4, 6 integer attribute (I') ... 12 SYSPRINT exit ... 5 internal buffering ... 5 SYSTERM ... 3 invocation parameters ... 12 SYSUT1 ... 3, 5 1 Revision 6 SLAC VM NOTEBOOK Page 17 Module 24: IBM H-Level Assembler 0 TEST ... 11 TITLE card ... 3 type attribute (T') ... 7 0 UMAP ... 2 underscore (_) ... 9 USING ... 9, 12 utility file ... 3 0 VM/SP ... 1 0 WYLBUR ... 3 0 3081 ... 13 1 Revision 6 SLAC VM NOTEBOOK Page 18 Module 24: IBM H-Level Assembler 0 DOCUMENT EVALUATION 0 Date of your evaluation of this document: __________________________ 0 SLAC Computing Services would appreciate your response to our ques- tions concerning this document. Be as detailed as you can, but even brief responses help us improve our documentation. Please return to: 0 SLAC Computing Services, Documentation Department Stanford Linear Accelerator Center, Bin 97 2575 Sand Hill Road Menlo Park, CA. 94025 ******************************************************************** 0 Staff ____ Faculty ____ Grad ____ Undergrad ____ Other _________ 0 Field of interest of application: _________________________________ 0 Computer experience: None ______ Some programming ______ Extensive programming ______ Nonprogramming application (e.g., document or data preparation) __ 0 Familiarity with subject of this document: None ____ Some ____ Extensive ____ 0 How do you use this document? Background reading ___ Self-instruction ___ Everyday reference ___ Occasional reference ___ Other __________________________________ 0 What sections do you reference most often? _________________________ 0 How do you find information? Contents ___ Index ___ Browse ___ 0 Do you find the information you need readily? Yes ___ No ___ If no, what are stumbling blocks? _______________________________ 0 Indicate any parts you find difficult to understand: _______________ ____________________________________________________________________ 0 Indicate any subjects which are not covered adequately: ___________ ____________________________________________________________________ 0 If you have comments that we haven't covered in our questions, please include them on the back. Explain any specific changes or additions you think should be made to the document. ******************************************************************** 0 If you would like to receive a personal reply to your comments, indicate your name, address and/or phone: _________________________ __________________________________ Thank you for your assistance.