Digital PDFs
Documents
Guest
Register
Log In
AA-DO33B-TE
February 1979
66 pages
Original
2.6MB
view
download
OCR Version
2.4MB
view
download
Document:
VAX-11 MACRO
User's Guide
Order Number:
AA-DO33B-TE
Revision:
0
Pages:
66
Original Filename:
OCR Text
February 1979 This document contains information that an assembly language programmer needs to use the capabilities of the VAX-11 MACRO assembly language efficiently. . VA X-11 MACRO User’s Guide Order No. AA-DO33B-TE SUPERSESSION/UPDATE INFORMATION: This revised document supersedes the VAX-11 MACRO User's Guide (Order No. AA-DO33A-TE) OPERATING SYSTEM AND VERSION: VAX/VMS V1.5 SOFTWARE VERSION: VAX-11 MACRO V2.0 To order additional copies of this document, contact the Software Distribution Center, Digital Equipment Corporation, Maynard, Massachusetts 01754 digital equipment corporation - maynard, massachusetts First Printing, August 1978 Revised, February 1979 The information in this document is and should not be construed as subject to change without notice a commitment by Digital Equipment Corporation. Digital Equipment Corporation assumes no responsibility for any errors that may appear in this document. The software described and may in this only be used or copied document in is furnished under accordance with the terms a license of such license. No responsibility is equipment that assumed is not for the use or reliability of supplied by DIGITAL or its affiliated software on companies. Copyright C) 1978, 1979 by Digital Equipment Corporation The postage-prepaid READER'S document requests the user's paring future documentation. COMMENTS form on the last page of this critical evaluation to assist us in pre- The of Digital Equipment Corporation: following are trademarks DIGITAL DECsystem~10 DEC DECtape MASSBUS OMNIBUS PDP DIBOL 0s/8 DECUS EDUSYSTEM PHA UNIBUS FLIP RSTS COMPUTER LABS FOCAL RSX COMTEX INDAC TYPESET-8 CHIP DDT LAB-8 TYPESET-11 DECCOMM DECSYSTEM-20 TMS-11 ASSIST-11 RTS-8 ITPS~10 VAX DECnet VMS IAS SBI PDT DATATRIEVE TRAX CONTENTS Page PREFACE v SUMMARY OF CHAPTER CHAPTER TECHNICAL CHANGES vii 1 INTRODUCTION 1-1 1.1 DEVELOPING A VAX-11 MACRO PROGRAM VAX-11 MACRO ASSEMBLER USER-DEFINED SYMBOLS MACROS PROGRAM SECTIONS LINKING MACRO PROGRAMS Resolving Symbolic and Library References 1-1 1-3 1.2 1.3 1.4 1.5 1.6 1.6.1 1.6.2 1.7 Program Relocation and Address Assignment DEBUGGING MACRO PROGRAMS 1-9 2 USING VAX-11l 2-1 2.1 THE MACRO COMMAND File Specifications 2.1.1 2.1.2 MACRO The /CROSS 2.1.2.2 The /ENABLE 2-2 2.1.2.3 2.1.2.4 The The and /NOCROSS Qualifiers and /DISABLE 1-9 2~-1 Qualifiers 2.1.2.1 1-4 1-5 1-5 1-7 1-8 Qualifiers 2-3 2-5 2-5 /LIBRARY Qualifier /LIST and /NOLIST Qualifiers 2.1.2.5 The /OBJECT and /NOOBJECT Qualifiers 2.1.2.6 The /SHOW and /NOSHOW Qualifiers 2.1.3 Diagnostic Messages 2.2 LISTING FILE FORMAT 2.2.1 Table of Contents and Page Headings 2.2.2 Source Statements and Hexadecimal Code 2.2.3 Symbol Table 2.2.4 Program Section Synopsis 2.2.5 Cross-Reference Listing 2.2.6 Assembly Summary 2.2.7 Assembly Listing Example 2-13 CHAPTER 3 WRITING POSITION-INDEPENDENT 3-1 APPENDIX A DTAGNOSTIC CODE MESSAGES INDEX 2-6 2-7 2-7 2-7 2-8 2-10 2-10 2-11 2-12 2-12 2-12 2-13 A-1 Index-1 FIGURES FIGURE 1-1 Developing 1-2 Function 1-3 a VAX-11 MACRO Program of a VAX-11 MACRO Assembler Link Functions iii 1-2 1-3 1-7 CONTENTS Page TABLES TABLE 1 2 -3 4 File Specification Defaults VAX-11 MACRO Command Qualifiers 5 /CROSS Qualifier Functions /ENABLE and /DISABLE Qualifier Functions /SHOW and /NOSHOW Qualifier Functions 1 Relative and Absolute Addressing Modes 2-3 2-4 2-5 2-6 2-8 3-2 PREFACE MANUAL OBJECTIVES This manual describes how to use the It 1is designed to enable users to MACRO. The VAX-11 MACRO features of Language the VAX-11 Reference VAX-11 MACRO assembly assemble programs coded MACRO language are language. in VAX-11 described in Manual. the INTENDED AUDIENCE This manual assumes experience is is intended that the and intended has for shareable images. STRUCTURE OF This manual follows: e e the VAX-11 had VAX/VMS into Chapter 1 provides an for users who are assembler. Chapter assembly Primer. MACRO 2 describes MACRO three This language Chapter programmers 3 of who manual programming this want to guide create and one appendix, the MACRO command, which invokes assembler. Chapter 3 describes how to use in shareable images. e Appendix A chapters describes the write VAX-11 position-independent MACRO error code messages. DOCUMENTS following documents e VAX-11 e VAX-11/780 e VAX/VMS Primer e VAX/VMS Command e VAX-11l Linker e VAX-1l1l Symbolic MACRO are relevant Language as introduction to VAX-11 MACRO assembler not familiar with the operation of an e ASSOCIATED MACRO programmers. some DOCUMENT organized VAX-11 The read all has experienced THIS is for reader to VAX-11 Reference Manual Architecture Language Reference Debugger MACRO Handbook User's Guide Manual Reference Manual programming: the for VAX/VMS System VAX/VMS 1I/0 For a complete description of CONVENTIONS The Reference IN of see THIS all VAX-1ll documents, 1including the VAX-11l Information Directory. a brief in other DOCUMENT following conventions are observed VAX-11 Manual User's Guide 1list each, USED Services in this gquide, as documents: Brackets ([]) indicate that Uppercase words and you should type the enclosed argument letters, the word or (...) indicate that repeated one more or indicate that used in formats, indicate or value of your choice. that letter Lowercase words and letters, you are to substitute a word Ellipses used times. vi the in formats, is optional. exactly as preceding shown. item(s) can be SUMMARY This manual technical Technical VAX-11 The VAX-11 TECHNICAL MACRO MACRO to Language and Reference /NOCROSS control the CHANGES V2.0. changes 1in the use of changes in the VAX-11l MACRO /CROSS command documents OF summarizes the the assembler from Version language are documented in This section 1.0. the Manual. qualifiers have cross-reference been added The SUPPRESSION function has been added to the /ENABLE qualifiers to the MACRO command to allow suppression of unreferenced You no symbols longer need to in the symbol specify macro The formats of the listing file and the MACRO and /DISABLE the listing of table. library before the source files. In fact, generally be specified after the source command that follows the description in will still work. been to listing. of files in the MACRO command macro 1library files should files. However, any MACRO the Version 1.0 documentation the diagnostic messages have changed. The assembler itself now runs 1in native mode rather than compatibility mode. This does not change the object code that assembler produces, which has always been native mode code, but only an internal assembler change. vii in the is CHAPTER 1 INTRODUCTION The VAX-11 MACRO instruction set allows you language and the perform many to compare, increment, described in the consists of the VAX-11/780 native mode assembler directives. The instruction set types move, of and VAX-11/780 data manipulation, complement. Architecture The Handbook. directives create and initialize data areas using the instruction set more effectively. described in the VAX-11 MACRO Language Reference provides an introduction to the assembler. 1.1 You DEVELOPING write a statements the operator and operand directives process). statement line as a sequence ; are either set and 1) data (instructions The are assembler The and provide tools for The directives are Manual. This chapter of assembly language statement comments instructions needed by the selected from the instructions or 2) to the assembler to label, which is optional, guide so that you can refer to the instructions from other parts of the program. Comments, explain what operations are being performed. on that optional, add, format: operand(s) instruction as PROGRAM MACRO program assembly the MACRO following operator VAX-11/780 assembler VAX-11l VAX-11 in label: The A such instructions the identifies or data which are line You use tabs and spaces to make the program more readable. When vyou have finished creating the program as a complete, edited file, you submit it as input to the VAX-11 MACRO language assembler. The VAX-11 MACRO language statements, assembler converting (object code). combines your execution. Figure program. To develop a illustrated processes to The object code program units, VAX-11 MACRO them VAX-11 in 1-1 is next making program 1-1. The (assembles) internal 1illustrates MACRO Figure an you the machine 1language language code processed by the linker, the program suitable which for the development must commands follow associated of an executable the four steps with these steps are: $ $ $ $ Chapter EDIT MACRO LINK RUN 2 Command commands. of this Language manual User's describes Guide the MACRO describes command. the EDIT, The LINK, VAX/VMS and RUN INTRODUCTION $ EDIT NAME.MAR Use the file type of MAR to indicate the source file NAME.MAR Create the contains a VAX-11 MACRO macro libraries source program program. $ MACRO NAME The MACRO command assumes the file type of an input file is MAR (.MLB for macro libraries). Assemble the source program If you use the /LIST NAME.OBJ > (NAME. LIS) object libraries qualifier, the assembler debugger creates a listing file. $ LINK NAME The LINK command assumes - jchzgf;a(t\(/)p:Boff an itr:‘pu: file libraries). NAME.EXE (NAME.MAP) object module or oblee DB, s Link the If you use the /MAP qualifier, the linker creates a map file. $ RUN NAME Run the The RUN command assumes executable : the file type of an image is EXE. Figure VAX-11] MACRO allows 1-1 you image Developing to use a a VAX-11 modular MACRO Program approach to your prodram. You can create an entire program as a series of smaller independent subprograms or modules. Each module consists of a number of routines. A routine Modular is sequence programming maintenance, e a and code You can write and routines, Then as test vyou independently Different that facilitates enhancement routines e of programmers performs one program procedure. creation, debugging, follows: each routine independently of other can test the module consisting of these of other can modules. develop and maintain different modules. e Changing a program requires changing module in which the change occurs. VAX-11 MACRO assembles each module them all into a complete program. separately. and testing Then the only linker the Jjoins INTRODUCTION 1.2 The VAX-11l VAX-11] your an MACRO ASSEMBLER MACRO assembler source object assembly computer program) module). accepts information and translates The assembler it into one format (that another in format (that interprets language and is, is, processes the editor statements, one at a time, and generates one or more instructions or data items. Because you originally use the to create a VAX-11l MACRO program in ASCII format, your program must be translated The VAX-1l output a module, new a machine assembler version You listing of illustrates into MACRO <can of the format performs program request the in that this object VAX-11 the source program at the role of the assembler. the format, MACRO the computer translation, called assembler same can time. use. producing to an as object produce Figure a 1-2 MACRO LIBRARIES ¥ SOURCE - PROGRAM > | ASSEMBLE "1 osuecT MobuLE LISTING (OPTIONAL) Figure During assembly e ® e unit; it Keeps track values in all does a of the a VAX-11 VAX-11] instructions this all symbol assembly and values data of their Converts MACRO used relative by means MACRO Assembler of user-defined assembler: within the positions a storage symbols source within location and program the program counter their respective table language into their mnemonics, respective user-defined machine symbols, language (object equivalents processing, statement into relative storage each for determines code) During Function processing, Accounts and 1-2 the numerical statement, assembler data location. it As wupdates converts (the object the assembler the wvalue each code) and program assigns translates of the language the data a and assigns 1location counter INTRODUCTION accordingly. assigned by computer's The the 1linker «converts the assembler to virtual memory. Each location has an relative storage storage 1locations 1locations in the associated number called its address, A VAX-1ll MACRO locations numbers See the Section machine 2.2 language more the code addresses numbers. that information symbols are names location of a e Identify the location of data ® Represent a also your several value. makes of memory The hexadecimal up the on the listing you can use object file. that identifies labels be in to locations by be internal in the is also called a A symbol that is 1is a and to represent label assembler symbol's address local a indicates each in memory locations is called without a knowing label. You exactly where referred use a redefining one in module; which a it the symbol that is, is in modules global to symbol. Global a constant used in change the value as the defined. several places referred to in a different symbol An 1is internal only symbol symbol. called symbols double double other than Global provide the one symbols in are which the communication key it to between colon (::) to define a global symbol used sign (==) to define a global symbol used with the equal value. replaces address of replaces a to to module programming. as location simply to You routine symbol to replace a This allows you to can modules. a refer symbol modular to: memory. can use a program. defined that value referred is symbolic the wuse You in it for shows hexadecimal Identify they will The as e symbol can A 1listing contents USER~-DEFINED SYMBOLS User-defined A assembly their represent module. 1.3 and or global to each symbol the global reference value., However, defined 1linker symbol in that reference to a the assembler 1local a different the symbol with not module. is the symbol does the Therefore, global. symbol's know The linker address or value, As the assembler symbol symbol's table processes contains address or value your all module, symbols (when known). it builds a wused in the The symbol symbol table. module table is with The each printed in the 1listing file (see Section 2.2.3). The assembler does not usually write the complete symbol table to the object module; instead it writes a symbol table that contains only global symbols. The linker uses the global symbol tables to resolve global symbol references. The VAX-11 Symbolic Debugger (see Section 1.7) also uses the object module symbol table. Consequently, you may want to include local symbols in the object module symbol table. To include a specific local symbol, you must specify it in the .DEBUG directive. To include all 1local symbols, you must specify the /ENABLE=DEBUG qualifier in the MACRO command or .ENABLE DEBUG in the source file. INTRODUCTION There are symbols. two specialized kinds Weak symbols do not of global symbols: have to be resolved the description of the .WEAK directive in the Reference Manual). Universal symbols are (see the description of universal symbols Reference Manual). Local labels are temporary labels (consisting weak and universal by the linker (see VAX-11 MACRO Language in shareable images in the VAX-11 Linker used of a number followed by a dollar sign) that you can use to refer to locations between symbolic labels (see the VAX-11 MACRO Language Reference Manual). Local labels are not symbols; module. table 1.4 and are not 1labels local available labels to the <can be are not linker reused in included or debugger. the VAX-11 the same object in the symbol MACROS Macros are language. want a local Consequently, to a very A macro recur name. useful 1is in your Then, you feature of any sequence of program. can You call first the MACRO instructions define the macro from any macro other program by simply entering the macro name in the operator statement 1line. You must define a macro before you can The assembler directives that define macros are described of the VAX-11 MACRO Language Reference Manual. Every time code contained the assembler in encounters the macro the assembly coding macro definition. name, This is it that you and give part of field of refer in to a it. Chapter inserts called it your 6 the expanding a macro. You can also directives. checked. one define Each Thus, you macros that time the macro can generate contain 1is conditional expanded, several different assembly the conditions are code sequences from macro. In addition to using macros that you define, you can use system macros provided by the VAX/VMS operating system. These system macros perform useful functions such as calling system services. The VAX/VMS System Services Reference Manual describes how you can use system macros to call system services to perform, for example, file and record handling, Macros process can example, control, and be defined in a are defined in the memory management macro library. system macro services. The system library. a library consisting entirely of macro definitions. macros in libraries in the same way that you refer object modules. You must MACRO command (with specify 1.5 You the name PROGRAM can of specify the the default routines of is You can refer to to macros in your the macro qualifier). You the for library library do system macro not in the have to library. SECTIONS segment your are object stored information information name library, module Using program sections allows you increased error protection, and section the /LIBRARY macros, A macro in in virtual into creating into a series to write control memory. The the object module, an executable of program sections. more modular programs, the order in which assembler and program the image. writes linker have vyour program uses this INTRODUCTION You specify the start of a program section and describe its attributes by using the .PSECT directive (see the VAX-11 MACRO Language Reference Manual). Within each module the assembler maintains several location counters -- one for each program section. You can continue a previously defined program section by using a second .PSECT directive that specifies the same name as the .PSECT directive that defined the original program section. Because the assembler does not know where each program section goes, all references between sections are relative to the base of the section. The linker resolves these references at link time. You can use program sections to perform any of the following: ® Separate your object module into smaller sections of code. Each program section should contain a complete routine. This can increase the modularity of your program, making it easier to debug, e and enhance. Allow different modules to gain access to the same data locations. (This is done in FORTRAN by using the COMMON statement.) If you specify the same program section name with the overlay (OVR) attribute in different modules, each program section e maintain, shares the same virtual memory. Separate areas where you intend to write information areas where you do not intend to write information. example, if your program erroneously writes to an area the no-write (NOWRT) attribute, a from For with memory access violation occurs. Separating such areas in your program into program sections makes debugging your program easier because the program sections act as additional protection from miscoded instructions e or logic errors. Identify sections of your object module to the debugger. The debugger uses the program section name to identify a location and to identify the section of the program being examined. Consequently, you should always specify names for all program sections. Do not use the default program sections that the assembler creates when you do not specify .PSECT or when you specify .PSECT with no program section name. ® Produce shareable program sections to use in shareable images. One copy of a shareable image on disk and in physical memory can be used by many processes at the same time. Several processes can gain access to the data in a shareable image. In addition, large programs that are used in many processes can be made into shareable images to improve system performance. See the VAX-1l Linker Reference Manual for more information on ® shareable images. Control the order in which program sections are stored in virtual memory; this can improve the performance of programs larger than your working set. Making frequently accessed program sections contiguous with each other in virtual memory increases the probability of having a frequently accessed program section in your working set. The linker separates all program sections attributes. Within these groups sections alphabetically by name. 1-6 the into 1linker groups stores with the similar program INTRODUCTION Program sections with the stored starting at the sections with concatenated The in attributes control the program section same the same the order that specify in you contents of and and they the in the are overlay virtual section; those you LINKING MACRO to in a are linker. describe but ensure For are Program attribute the must attributes. should not include instructions to be executed with the NOEXE (not executable) attribute. 1.6 attribute memory. concatenate specified .PSECT directive program has the address name the actually name same do not that the you example, program section PROGRAMS The object module produced by the MACRO command may in itself be incomplete. It may need to be joined, or linked, with other object modules or library files to form a complete functioning program. The link operation: e Joins together object modules e Relocates individual object memory addresses virtual ® Produces Figure the object modules that define them an executable that modules image and an as use symbols necessary optional map, and as 1-3 OBJECT LIBRARIES | OBJECT o MODULE(S) o LINK _ [EXECUTABLE MODULE MAP (OPTIONAL) Figure 1-3 Link Functions with the assigns shown in INTRODUCTION The link assigns operation, in addition to joining object modules virtual memory addresses to the relative addresses togethers calculated by the VAX-11l MACRO assembler. Because the memory addresses of one object module must be relocated to accommodate the addresses used in another object module, the 1link operation serves to resolve all address all changes. module links information program An and just image is (errors executable one that 1image that you operation memory then, can 1is is an addresses a picture image and of with storage what your on that cannot program : run errors system your link execution. 1logic the of the virtual 1image, before contains of all The like program properly result assigned. looks executable your The resolved the system. prevent always should it detect), produce Unless from running running the the results you intended. However, if logic errors exist within your program, running the program will produce either erroneous results or none at all. 1If this is the case, you must study the source program, debug it, edit it, then perform the assembly and link operations again. You can other also link native capability gives programming and example, VAX-11 you can MACRO In the addition, files modules of a the subprograms VAX-11 FORTRAN flexibility in to subprograms FORTRAN linker with as programming subprogram other VAX-11] such a of to assembly high-level perform data perform written IV-PLUS. language language. For acquisition data 1in This analysis or in file IV-PLUS. library files. These debugged, and 1linked subroutines, Because you gain access to link time, their routines can be used by your object program that allows contain you to use already object written, needed. 1.6.1 The both ease write subprograms and library files at as you and in MACRO languages, the input/output are VAX-11l mode Resolving linker Symbolic reads through and all Library References the object modules that you indicate as input to the LINK command. It gathers and evaluates information provided by the assembler that is necessary for program linking. For each input module, this information 1includes the object code, information needed instruction, the for relocation, the relative global symbols used, and the address of the first length of each program section. One of the references During 1linker's and library translation, module are functions 1is to references in the the global. assembler During notes resolve joined which 1linking, the all global symbols linker in keeps global references and definitions found in all the object as linking proceeds, makes the appropriate correlations instructions or a all 1list of globals) data either necessary object References to program library with necessary. because of were files a also the appropriate just as it that included involve in of the resolved error in the the use linker or LINK of for file and the any global the modules, and and modifies linking, not object of outputs (undefined because some command. global symbols. a library by naming a routine your program. You then link library does the track were programming not to the routines the source code references After references modules library You gain access global symbol in as symbolic symbol routines. linker symbol. resolves as a your the INTRODUCTION 1.6.2 Program Relocation and Address Assignment A second important function of the linker is to "fix" relative memory addresses so that they are wvirtual. The object module represents translated source instructions that have been assigned memory addresses relative to a base address of 0. The linker address 1.7 of assigns each DEBUGGING a base program MACRO address to the 1image and fixes the base section. PROGRAMS Debugging executable and linked is the process of finding and correcting errors in programs; that 1is, in programs that have been assembled without diagnostic messages, but that produce invalid results., (For VAX-11 MACRO, information see Section about 2.1.3 and diagnostic Appendix messages produced‘by A.) The debugger provided with the VAX/VMS system is a symbolic debugger; it can refer to instructions and data by symbolic names. However, it can only gain access to the names that are included in the symbol table in the object module. By default, the debugger can gain access to global symbol and program section names. If you want to debug with local symbol names, you must specify the /ENABLE=DEBUG qualifier in the MACRO command or include .ENABLE DEBUG in the source code. See on the VAX-11 debugging Symbolic VAX-11 Debugger MACRO Reference Manual for programs. ] more information CHAPTER USING The MACRO reads command your invokes source the program; VAX-11] VAX-11] checks 2 MACRO MACRO it for assembler. syntax The errors; object module; and, optionally produces a listing file. describes the format of the MACRO command and Section the listing file. 2.1 THE MACRO assembler produces an Section 2.1 2.2 describes COMMAND Format $ MACRO[/qualifiers] file-spec-list[/qualifiers] Parameters /qualifiers Command or performed file by the qualifiers that indicate assembler (see Section special actions to be 2.1.2). file-spec-list A file specification or list of file specifications that specify the source and macro 1library input files to be assembled into object modules (see Section 2.1.1). If the file specifications are separated assembled into separated by by one plus signs (+), object module. commas (,), the files the files are concatenated If the file specifications are assembled individual object modules. The default file source files and MLB for macro library files. separately type 1is MAR and are into for The assembler reads your source files in the order in which vyou specify thenm. You can request the assembler to perform several assemblies with one command. The assembler, by default, produces an object module with the same file name as your first input file. You can use the /OBJECT qualifier module. You can suppress the the /NOOBJECT qualifier. to specify the file name of the object production of the object module by using In interactive mode, the assembler does not, by default, produce a listing file; you must use the /LIST qualifier to specify a listing file. In batch mode, the assembler, by default, produces a 1listing file with the same file name as the first input file. You can use the /LIST qualifier to specify the file name of the listing file. USING VAX-11 MACRO Examples 1. $ MACRO PART1+PART2+PART3 The assembler concatenates the source files PART1l, PART2, and PART3 and assembles them into one object module with a name of PART1. No listing file is created. 2. $ MACRO/LIST APROG,BPROG,CPROG The assembler APROG, BPROG, 3. $ The assembler file MYPROG with the independently assembles and object CPROG into the three modules and source listing files files. MACRO MYPROG/LIST+MLIB/LIBRARY uses and file the macro creates name library an output MLIB object to assemble module and the source listing files MYPROG. The following sections describe the file specifications, file qualifiers, and how the assembler handles errors. 2.1.1 File A file output specification indicates file to be produced. command and Specifications the input file to be processed, or the Format device:{[directory]filename.filetype;version Parameters device The physical written,. device on which a file 1is under which the stored or 1is to be [directory] The name square of the brackets directory are file is cataloged. up to 9 characters describing the kind 3 characters long. of data The required. filename The name of the file; of the can be file, up to filename can be long. filetype The type filetype in the file; version The version number of the file. Versions are identified by a decimal number, which is incremented each time a new version of the file is created. USING You need each not time explicitly you specification any other Table 2-1 state assemble that part is all a the the elements file of The required is a the file a Optional Element default device directory User's current default directory filetype Depends on Source input Macro library specify information on omit value is used. —————— current version 2.1.2 e User's also file you Default usage: Object module Listing file can the 1If Defaults device specification. of name. ——— You specification part default values. Table 2-1 Specification file only specification, default File MACRO program, always of summarizes VAX-11] a MAR file MLB OBJ LIS Input: highest existing Output: highest version existing version logical See file the VAX/VMS logical names. name rather Command than Language a User's plus 1 complete file Guide more for Qualifiers Qualifiers actions. specify that the assembler should perform the specified Qualifiers can be used as either comman d qualifiers or file qualifiers. A command qualifier affects all the assemb lies specified in it the MACRO command. qualifies, All MACRO command only A be qualifiers qualifiers a file qualifier can A file except or qualifier the file qualifier. have one of the affects /LIBRARY only the qualifier qualifiers. The following formats: /qualifier=function /qualifier=(functionl, function2, ..., can /LIBRARY /qualifier functionn) assembly that be either qualifier can USING VAX-11] MACRO and Table 2-2 lists the MACRO qualifiers, their possible functions, their default functions. Note that some values have a long form and a Square the effect is the same., You can use either form; short form. brackets around the equal sign in the table indicate that the qualifier can appear with or without functions. Table 2-2 VAX-11 MACRO Command Qualifiers N Functions - Qualifier Long Form /CROSS [=] ALL DIRECTIVES MACROS OPCODES REGISTERS SYMBOLS /DISABLE= | ABSOLUTE DEBUG Short five egativ Form - /NOCROSS /NOCROSS AMA DBG /ENABLE= /DISABLE= (AMA,DBG,LSB,SUP,FPT) /ENABLE=(GBL, TBK) DIR MAC OPC REG SYM GLOBAL GBL SUPPRESSION TRACEBACK TRUNCATION TBK /ENABLE= ABSOLUTE AMA /DISABLE= /LIBRARY -- - - - /NOLIST . /LIST[=] DEBUG GLOBAL SUPPRESSION TRACEBACK TRUNCATION file-spec Default Form sSupP FPT DBG GBL SuUPp TBK FPT Not a library /NOLIST (interactive mode) /LIST /OBJECT[=]]|file-spec /SHOW [ =] BINARY CALLS CONDITIONALS DEFINITIONS EXPANSIONS (batch mode) - /NOOBJECT /OBJECT MEB /NOSHOW[=] /SHOW= (MC,CND,MD) MC CND MD ME The following sections describe the VAX-11 MACRO command qualifiers in detail. USING VAX-1l MACRO 2.1.2.1 The /CROSS and /NOCROSS Qualifiers - The /CROSS. and /NOCROSS qualifiers control whether a cross-reference listing is included in the listing file. 1If you specify the /CROSS qualifier, the 1listing file includes a cross-reference 1listing. Note that if you enter a MACRO command with the /CROSS qualifier interactively, you must also specify the /LIST qualifier. The /NOCROSS qualifier is the default; you need not specify it to have the cross-reference listing excluded. Table 2-3 lists the functions that you can specify 1in a /CROSS qualifier. You can specify either the long form or the short form of the functions. If you specify the /CROSS qualifier with no functions, it is equivalent to /CR0OSS=(MAC,SYM). See Section 2.2.5 for a description of the format of the cross-reference 1listing. See the VAX-11 MACRO Language Reference Manual for a description of the .CROSS and .NOCROSS directives. Table 2-3 /CROSS Qualifier Functions Long Form Short Form Meaning ALL - Includes directives, macros, opcodes, registers, and symbols in the cross-reference listing DIRECTIVES DIR Includes directives in the cross-reference listing MACROS MAC OPCODES OPC REGISTERS REG SYMBOLS SYM Includes macros listing in the cross-reference Includes opcodes in the cross-reference listing Includes register cross-reference references listing Includes user-defined cross-reference symbols listing in the in the 2.1.2.2 The /ENABLE and /DISABLE Qualifiers - The /ENABLE and /DISABLE qualifiers have the same effect as the .ENABLE and .DISABLE assembler directives, respectively. They control the way that the assembler interprets your source program. The /ENABLE and /DISABLE qualifiers override any .ENABLE or .DISABLE directives in the source program. See the VAX-1ll MACRO Language Reference Manual for more information on the .ENABLE and .DISABLE directives. Table 2-4 lists the functions that you can specify in an /ENABLE or /DISABLE qualifier. You can specify either the long form or the short form of the functions. If you specify more than one function, vyou must enclose the function list in parentheses. If you use an /ENABLE or /DISABLE qualifier, you must specify at least one function in the qualifier. USING /ENABLE Long Form Short and Table /DISABLE Form MACRO 2-4 Qualifier Functions Default AMA ABSOLUTE VAX-11 Meaning /DISABLE When all ABSOLUTE PC is relative enabled, addressing modes are assembled absolute addressing DBG DEBUG /DISABLE When DEBUG local the symbol table module for the GBL /ENABLE enabled, all are included symbols object in GLOBAL is GLOBAL all undefined is considered to symbols; disabled, when enabled, be any /DISABLE When an are the TBK /ENABLE all to error is symbols but not not are symbol that listed table; SUPPRESSION is all symbols defined are that are listed in symbol TRACEBACK listed directive assembly defined referred in not SUPPRESSION enabled, When are external GLOBAL is undefined that is .EXTERNAL a causes sSyUpP the by symbols symbol SUPPRESSION in use debugger When in as modes when disabled, the table TRACEBACK is enabled, MACRO includes the program section names and lengths, module names, and routine names in the object module for use by the debugger; when TRACEBACK is disabled, MACRO excludes this information and, in addition, does not make any local symbol information available the debugger TRUNCATION FPT /DISABLE When TRUNCATION enabled, to is floating-point numbers are truncated; TRUNCATION is when disabled, floating-point numbers are rounded 2.1.2‘3 that the qualifier The /LIBRARY associated affects Qualifier input only the file - The /LIBRARY contains input file qualifier indicates The /LIBRARY qualifies. a macro that it library. USING VAX-11 MACRO 2.1.2.4 The /LIST and /NOLIST Qualifiers - The qualifiers control whether an output listing file specify the /NOLIST qualifier, no listing file is specify the /LIST qualifier determines /LIST and is created. created. /NOLIST If you If you qualifier, a listing file is created. The_ /LIST the file specification of the output 1listing file. If you by in enter the default, batch MACRO create mode, a command interactively, listing file. however, the 1If assembler you does the assembler execute create the a does MACRO 1listing not, command file by default. If you specify assembler uses If you default the /LIST that file qualifier with a file specification, the specification for the output listing file. specify the /LIST qualifier without file name depends on whether a file /LIST specification, the used as a command is qualifier or as a file qualifier. If /LIST is used as a command qualifier, the default file name is the name of the first input source file. If /LIST is used as a file qualifier, the default file name is the name of the file that /LIST qualifies. 2.1.2.5 The /OBJECT and /NOOBJECT Qualifiers - The /OBJECT and /NOOBJECT qualifiers control whether an object module is created. The /OBJECT qualifier is the default; you need not specify it to have an object module created. If you specify the /NOOBJECT qualifier, no object module is created. If you do not specify either the the assembler creates an object first input file. If you specify uses the assembler If you that specify default If /OBJECT of is the name 2.1.2.6 The depends on used as a that file without whether a file qualifier. default file name file /NOOBJECT same file qualifier, name as the /OBJECT qualifier with a file specification, file specification for the output object file. the /OBJECT qualifier file qualifier or as qualifier, the name /OBJECT or the module with the a file /OBJECT If /OBJECT is is the name of qualifier, specification, is used as used as the first the default a the the command a command input file. file name /SHOW and is the /OBJECT qualifies. /SHOW and /NOSHOW Qualifiers - The /NOSHOW qualifiers have the same effect as the ,SHOW and .NOSHOW assembler directives, respectively. They control what 1lines appear 1in the listing. Note that if you enter a MACRO command with a /SHOW or /NOSHOW qualifier interactively, qualifier. /SHOW depending If the The on whether you you specify /SHOW or listing of source macros, or repeat any .SHOW or 2-5 describes and specify blocks. The /SHOW and the 1long form than one function, or the must also qualifiers them with or specify have the different without /LIST effects functions. /NOSHOW with functions, the qualifier controls lines that are in conditional assembly blocks, .NOSHOW directives the vyou /NOSHOW and /NOSHOW that are in /NOSHOW short you must /SHOW functions. form of enclose the the the qualifiers source You Table specify either can functions. function list override program. If in you use more parentheses. USING VAX-1ll MACRO Specifying either the /SHOW or /NOSHOW qualifier with no function is equivalent to starting your source file with an extra .SHOW or .NOSHOW directive, respectively. The listing count is incremented by a /SHOW qualifier and 1is decremented by a /NOSHOW qualifier. The listing count controls whether all source lines are listed. If the 1listing count 1is positive, all source lines are listed (including lines in conditional assembly blocks, macros, and repeat blocks). If the listing count is negative, no lines are listed. If the listing count is 0, all lines except lines in conditional blocks, macros, and repeat blocks are 1listed: these 1lines are listed depending on the values specified in .SHOW and .NOSHOW directives. Table 2-5 /NOSHOW Qualifier /SHOW and Long Form BINARY Short Form MEB Functions Default Function /NOSHOW Lists macro expansions and repeat block expansions that generate binary code; BINARY is a subset of EXPANSIONS CALLS MC / SHOW CONDITIONALS CND /SHOW Lists macro calls and repeat block specifiers Lists unsatisfied code associated with the conditional assembly directives conditional DEFINITIONS MD /SHOW Lists macro and repeat range definitions that appear in an input source file EXPANSIONS ME /NOSHOW Lists macro and repeat range expansions 2.1.3 Diagnostic Messages If the assembler encounters an error during assembly, it displays a diagnostic message. The assembler displays the message on the terminal (for interactive jobs) or in the batch log file (for batch jobs) and in the listing file. Appendix A describes the VAX-11 MACRO diagnostic messages. USING VAX-1ll MACRO There are two levels of severity: error and warning. Object modules created with an error message cannot be linked into an image file. Object modules created with a warning message can be 1linked into an image file although the linker will display a diagnostic message. The assembler displays EMACRO-1-code, diagnostic messages in the following format: text 1 A severity value of W code for indicator. a It has a value of E for an error or a warning. code An abbreviation of the message The explanation of the text. text For message. example: $MACRO-E-ILLMASKBITS, The assembler information: e The displays line from on Reserved the the bits terminal listing that set or in batch would ENTRY mask log , precede file the the error if there were a listing file. This line is often line that contains the error, but sometimes it 1is binary expansion of the source line. e If The the error assembler message has following message the source only the itself. detected any errors during the assembly process, it displays a diagnostic summary when the assembly is completed. It displays this summary on the terminal or batch log file and 1listing file. The summary contains the total number of errors and warnings with the line number and page number (enclosed in parentheses) of each, list of 2.2.6). An The the example assembler also displays at file specifications in the of a diagnostic summary the end MACRO of the error summary a command (see Section follows. $ MACRO/LIST PROG There were 100 (1) 400 /LIST (5) PROG $ 6 errors 1100 and (1) 1 warnings, 400 (2) on lines: 200 (3) 800 (3) 1200 (3) USING 2.2 LISTING FILE VAX-11 MACRO FORMAT The listing file produced by VAX-11 MACRO has the following six parts. The @ Table of ® Source statements e Symbol table e Program @ Cross-reference ® Assembly following contains an contents section of Table If the source module VAX-11 MACRO prints table of the line The number hexadecimal listing top of of and these Page contains a table all subtitle is the listed with The the listing, the module specified after the of ® Date e Time e Assembler e Listing of line source in listing. .SUBTITLE page number and listing file when it encounters it encounters a new page in the page of the listing is filled. On of title specified the directives, assembly the the Comment second in the when of e 2.2.7 directive. 1line Title Section .SUBTITLE before subtitles first e parts. optional contents .SUBTITLE page six Headings any of lists the each lines. The information: code listing. VAX-11] MACRO prints a new page in a .PAGE directive in the source, source file, or when the existing the headings (optional) describe a Contents contents directives. page synopsis sections 2.2.1 The and and summary example of (optional) VAX-11] header the in MACRO contains the prints two the header following .TITLE directive module in the .TITLE directive day version page of identification number the header contains the following e The identifying information specified in (often used to specify a version number) e Subtitle of the section .SUBTITLE directive ® Source file creation ® Source file specification ® Source page number date of the and time the module information: .IDENT specified directive 1in the USING 2.2.2 Source Statements and This section is the main lines of the module and code contains The ¢ The line numbers, source The of the Code listing: including location e The hexadecimal or, the code code is printed listed for e The addressing mode for the first e The addressing mode for the second e The addressing mode for the third is listed the data of data items data type as Data Type storage that are listed of if the file has no 1line line on operand operand operand from one (if any) (if any) (if any) right to line depends 1left. on The the size follows: Number of Byte 12 Word 7 Longword 4 Quadword 1 ASCII Packed source line with the lowest address on the right. an instruction contains, from right to opcode for the Each code The code contains generated. counter e binary it code comments number from the editor the sequence number of The number of Hexadecimal part line, e The hexadecimal The hexadecimal left: MACRO the hexadecimal following information: the e VAX-11 decimal Items per 12 (characters) 24 (digits) Line string If an expression lists the assembler externally will contains wvalue of evaluates defined complete the an the the externally expression expression symbol. evaluation The of by defined by an assigning a value apostrophe the symbol, followed indicates the assembler apostrophe. of that 0 the to The the linker expression. VAX-11 MACRO also prints the diagnostic messages in this section of the 1listing. It prints each diagnostic message immediately after the line at which the error was detected. See Section 2.1.3 for a description of the diagnostic message format and Appendix A for a list of the VAX-11 MACRO diagnostic messages. USING 2.2.3 Symbol VAX-11 MACRO Table The symbol table lists all symbols, except permanent symbols, that are defined or referred to in the module. The symbols are listed alphabetically, in three columns. The symbol's value (when known) 1is listed next to the symbol. If the symbol is assigned a value by a direct assignment statement or a directive (such as the .NARG directive), the symbol is separated from the value by an equal sign. If the symbol is defined externally (the value is unknown), the value is listed as a string of asterisks. The following letters are used in the symbol table to describe special attributes of symbols. Letter Meaning D The symbol is a local G The symbol is globally defined R The is W The symbol is a weak global X The is defined externally. U The symbol .DISABLE undefined made in available symbol a to symbol the debugger. will be in a module. relocatable. .WEAK directive). symbol that is not GLOBAL symbol symbol defined has been is not (specified (produced when specified and specified in .EXTERNAL) . If a symbol is defined externally or as a relocatable value, the number of the program section in which it appears first is printed. See Section 2.2.4 for information about program section numbers. 2.2.4 Program Section Synopsis The program section synopsis lists the program sections, their size, their attributes, and their alignment. The program sections are listed in the order in which they are defined in the program. Each program section is assigned a number based on the order in which it is defined in the program: this number is printed after the size of the program 2.2.5 section. Cross-Reference Listing The assembler lists the cross references separately for the following groups: symbols, macros, directives, opcodes, and registers. Within each group each item is listed alphabetically. following information is listed: e Symbol e Value e Line number e Line number and page number For each 1item, name and page number of the of each symbol's definition reference to the symbol the USING VAX-11 MACRO You control which groups are cross referenced by specifying values in the /CROSS qualifier. You can exclude certain symbols from the cross-reference listing by using the .CR0OSS and .NOCROSS directives. 2.2.6 The Assembly Summary assembly summary indicators, a specifications contains diagnostic in internal summary, and assembler the performance qualifiers and file the MACRO command. The internal assembler performance indicators include the page faults, CPU time, and elapsed time for the different stages of the assembly. In addition, the indicators include the working set 1limit and the number of symbols, source lines, object records, and macros and the memory required to process these. If the assembler detected any errors diagnostic summary in the listing If no errors occurred, the assembler the assembly summary: There no were errors or in the module, it prints the same that it displays on the terminal. prints the following message in warnings. The last line in the 1listing file shows the specifications entered in the MACRO command. 2,2.7 The Assembly following Listing pages qualifiers and Example show an example of a typical assembly listing. file JTYD(1z) (0Z0¢7O3=adnSepUwaTdIoNSiOUOdYT3A©I0T1FU3TUOIpapPJS9U[Td0WUdTSS139WyUITIe aTqelJos3ue@3uo0) USING VAX-11 2-14 MACRO 00012{ 8ylUOILIadoSTPINIXdPuB3Y3lITNSAIP3I03IS3@3UlSaipe 00 0Z2Z 20 pautelzuod Ul (dv)91 00 00 +¢ 0000000000 000€¥T0ES6T ¢0 {0 ¢¢0 {2 T$YINNACNIILO(saNuvii)GnvslaSxNOGaI8LyAlIN*M3OISnHsd3P9IUaSdOIDTI4SJa1b3abj3uyUT JT0TVD -BUTINOY03OpITAUT0000S00000000000000S0Tia00000w0yo000%LZ9L9Sl06EZ€Z€T1TL82y7ie{{iZ{! dH(ALSe‘3AU1ydsMiTL1LTaNvYnUL(Iu3F)Lvd1LnQA9Ndv4Ld1Qln)T°uAs®agUS“OI”JO*s/6dINLNa1L¥eUO0nv6IwNI7ddWTAaI=N0ID$VN3XO3YVVed[YL9OlS3‘=) I0S=1U0IdII0NOEZyISD3T®JlIEP0IFUQNDPI6RISVPOaZIYYqSdMII:NTdDUQ]TOIoO3SYTmAT0*MaSXLIIU3Tn01TOPT3b3T3UTUNaHTITnUl3FODWsIJpNS3U-O~IZPxT¢¢T1a3‘4fi9S3aUdl=UpduUOsjAsXuOuWtTfeTbVeiTaDIwIAUsSIlnPpTUYPIgIlASPDOOTa3o(TTIETIpHImoP=J®31S=q-=0BOD)u1¢SRuUIedi3yrOisj]lT‘61urSluZ3838aaec°d4wJteIotZU5a3i0YdUedoAWX3rOe*31pild3ueispfAqI8ulRpn1esS=e0U13o9yl abed(1i) 020INO000Q00S00000000SjU00000000s¥EZ69LT0ZET98SS%YS%Y€WSSi{{{XldYseWvldSpdJ1L3WQ0uaNSgsddANIeAOAvK1aNOMLdDI°-3Y1T,T**NdQ3®SISRINYCWDa‘<DIAsIuSvDsS*Yo®ISADMJP4DO8EsW4S1NXa‘D1‘LI4>Ls3sSSH‘IevIaWAyT1Idg-AIONeS4K3a’yII3P0nATATO4YeLPs)dAjIIAuO=AL2OML3u’N30IwLaMWxS'oIaeIeTuT11‘d!ldE¢=(¢!Hd ¢)sMS<I=aZ0T1ITJIs}/Oe9UNpoTd0<e’8EP3AXd0I37dSL1303q8VP8u(0E)O3oTf=sadTIXgnqsiS(bYZeT=oUWzlTHn1ODAi>9TO5=pR,3]saNus0ynh‘4.0I3S‘1}TASu3jVnuHoEhdXVsWeblie 00¢ 00 00 00 6811 ¢¢ 3LNdIno 0 0 0 ¥€Z -{=! 000 0 21 { 000000 000S8¥ =i0 i0 ! £odsHEF ase) 10309198 0{001 0{002 00S0Z VAX-11l 2-15 0 0 0 9S 00 00 00 LSE€ {{ 0 0 0 68 ! 0 0 0 vY { 0 0 0 8Z 00 00 00 €1E + ¢ USING MACRO 00S0 oV N o 80 20 A 13°) v 2-16 Zs A od £S 01 St 20aInosg S3USWSIRISpPuURTRWUTIOSPRXSHSpPOD3Ied) tr1a v SAY L3d SAd L3d <4ns on du3 20 Sa S O 13y 1LSL 1048 Oa 1 3] 80 13°] 01 sa $10W o ¥e 0 82 0 L2 0 82 4€01 #0 av00 Ju3 (1N 00%E TN (dv)9te‘cu’‘ey (9d1v9) Td10 [T du3d Su £1A1Q Hy3 Su Sa Gn oj] Sa 00 2¢0 0 4040 120D 9Q20i 0®€0 €10 £10 oa 0s 0 St O 0%00 000¢ 8a<AI0Qy’INS>W’ (dv)9te‘gd’‘zy Hdd Sa dud S SAd (U(O€2T))ISLaTjjAeeTirPnnddAtIQee)d‘09ayy1l30 j1TouenabptaoiTiIo1Yndb ( o ) I j e t n d t e d s y l a n s (dy)ois’zu’‘cd (1) wiogd 3yl 9J2U9I3 FTIP ddy (dvdzt by &y 10 008 006 04 AL TAOKW TAOKW TACKW asvd Su 0002 0012 Ou :aav IVWYONTS SH04 Surinoy XdIN3 jutod "AYILNE®IMZAUW O<IpVUD’YEU’‘ZUDKWL Sa Go 00 Z3SjUuITsSEuHInUbTlOFiDe YXS1U20u3pl8eu1jUu3cl4d0 MUPO3TI1yINDAC0Du0UiwTneal3TibIaoEyld MUPO3TIYNIDA0Hu0UwITe3NiIb1aoElyDd0SJ(3dIOg8TuA)DPU0DAOPTSTOQAIYP ‘10UMIOTN3IS3YA0 3sajiendipeu3l fa SQaD1 9€001€0 00% 00s Oa 01 0000 Sa Ga ai 001 oun Sa 1200 %200 o 009 0oL Su VAX-11 zs 3p1u3e9auyazniaslijuaayulnbiIeNSwIolUTa9yYl3luUaYw3nIbNiOeIJ‘3uIsSuITHnY€3uUuyYbIrd9iNuIaewISMelOIUJdoTYTuepsjIPdauiaIIueQ0aDUn1daAuOb0O8IDi30Hy9TeDlyIUnlUPPoIuROwSlTNITorU1IOlEDeTzNEDplIONaS1BrIsuwR0ReJaT3jAlUuNru®pTOonsoTwablNRd30ipdsD¥UbeTlIueeN3SOI1T T6OZ1=°JXZBV0WA 0s 48,0 0 ,DJ10 0 0 oot S5O07U3Td=WIp3YNUITOIYeS 0000 0000 0000 0000 LOOO 8000 6L6T=-NUVL~-ET P6YZI:TTI3 T 3ainpadoldAIjuajujod A1D13LSIsLdE*NS®1YMON‘IX3‘13nqpoadToMl0dA13u’3TjBJ8IuaTstYEisoeYdHWapTa*luDlTIieVJp0O3[®UlHT1S3dO03rQ)$XS9pSufi*4 beg (2Za ) USING MACRO fa ds3 0¢ Su SAd 8%00 8%0 ot Ou L3d ang* 0 &€ %00 o]Rl JT¥O TYWYONTSS ans °0ouJNVg Sdv44027 * O%000)(°9¢L NToquis;oeT31qe2aesSl4dApPs}yuSeTdPouTwALesTxLbLioLirduotrjloagsTsdoukg axd 00 0 0 0 ) (°0 JOIJdON dausn NOD 1071 dHSONYHSON QaYy LIM1OdNm ALXYE 1oLD3)Sd *ON(0 IV $3 INqT 12o0 J) (*z*t 1U0oi0€0300e00d0o00T0y¥) 4(*€o0 ternacscesncscnscnewd 101¥YHSON3IXION(JQUON LYMONdLXd T =XVA CIJ®K 6Z2°C0A =6LT616=L-6NTV=LN=YE[L P6YZS3TIT3S1T L8UaVsT YW*DTVD(HSOr)8 abed 13 ¢-c) - k6%2o0k 0oko0k d X@ Z¢0 Toquas a1ge} 16S0€2¥E0000000 9¥d¥4 aad ¢00 USING VAX-11l 13swdeSud 2-17 MACRO ) a4X3 Sdv 134 USING MACRO ) abed 14 VAX-1l1 (2) 2) A **CSEONIANIT 4X=00 0 00 20)L ¥4=12000 ¥4=0000 d=6€£000 4=62000 ANIVA d=S¥000000 - TOGKXS dud 10w 2-18 p3a43|IZu361IyHTv9laSaArylybq8uUlwledDWwdSUIosN3Tad)SllOIN3I1S0kIyb3aAOsmuM[rSuneOas($lUn]U)31I9aITSsS(STJos{OAai9eI0bId3TJea0AwIdJm3dlol3wOIJpaPOOsueew[amO*TlqessunpeU(w30umTAGITtsA1upTsISAa*ase“resmnqdA6a90el4b¢0roOe€‘&d]3wUaSwHdJIUeUSTTdsIOII02ANaZ€O2PmpY°PO10a-Ip[ldSa2:e0s*dono0GO2l1%[IdO0®e3DPW9IOB(3UqI0FPT€1NI8LIQOs°SYp20Tl0Io2U[dJ0a0[l2e(90J3°0Ue3TU-P0UsI)OWUeIdIppUu*TZuee*¢9Ap[0Tedq0u7es*sSyToqAuAxseumng J3(ls1Wau0o00sodaqqUetIg9uu3ydVlsiwIdd¥edA3gsz¢[isIty3a9aestITdgr«geoiSelutldu0slIi3Dn1di0in8Indnoi4dn2uio1nro8anoyab0e3yqosp3i1Na9n£3 LOT18eI491|d3L3wIyNsIAO3N2018$TZd0YI09€04’°°°°Dd0000w02y2:32W+3000I0"gL0|a222::e0000®l0°|*'SlY|ON£S1090p'€1I26o-1°Y°°s"°0I10d|0A0e2lF22:r20-Y00y0l0:-23::92"00u00i'0]\li-.? 6L6T=NYL=EZ PEITILT TT=XVA 01D®W 6C°C20A abed S S O¥O/1S1 / JI¥D TV $3s5v0d1D9JUaT193Fal i 09% 1) +tb|o"saIScdOnUI'0cRJsn|¥Wc®%IWstcnO-esISr'vrA-c02adI")n)vsSe"Js9a00sU3e3ce"dnDlc'6Is}9LaJl3cn6P9se'18UnYa=T|ycn-a+NdiiVL~EZ6Z3T3T 2814(HUSOLV)DYTVW" USING VAX-11l 2-19 MACRO (2) CHAPTER WRITING 3 POSITION-INDEPENDENT CODE An object module produced by VAX-11 MACRO is relocatable; that is, it can be 1linked anywhere in virtual memory. The 1linker modifies relocatable addresses so that they reflect the virtual memory locations in which the module will run. Once linked, the image can only be moved in virtual memory if the source code follows the restrictions described in this chapter. Source code that follows these restrictions, and thus can be moved in virtual memory, is called "position-independent code." Source code that does not follow these restrictions is called "position-dependent code." 1Images linked from position-dependent code will run correctly only at one virtual memory location. Position image. independence is important if you are creating a shareable To use a shareable 1image, you must relink it with object modules. can 1If place position the it shareable anywhere dependent, address, You shareable images the cannot image in linker link that is virtual a independent, If the place it at must object share position memory. modules virtual with two the shareable a fixed linker image is virtual position-dependent, address. The linker does not use the position-independent code (PIC) program section attribute to determine whether a shareable image is position independent. The linker assumes that when it is linking a shareable image, the shareable image is position independent unless the source code contains a was specified in shareable the image LINK .ADDRESS the that command Otherwise, the independent and the VAX-11 Linker shareable images. Position source is or The following are always instruction or unless a base address Consequently, if you are linking a dependent, specify a base address in use a .ADDRESS will assume directive that the depends the way chapter on the addressing addresses assumes described in are that Chapter stored vyou 4 of are the addressing position that in the image source is code. position the shareable image will not execute correctly. See Reference Manual for more information on 1linking and remainder of this addressing modes Reference Manual. directive command. position 1linker independence code assembler LINK is modes used in the in program. The the familiar VAX-11 MACRO with the Language modes involve only register references and independent if the register's value is set by an itself position independent. WRITING POSITION-INDEPENDENT CODE Format Mode Rn Register (Rn) Register (Rn) + Autoincrement @(Rn)+ Autoincrement -(Rn) Autodecrement deferred deferred The displacement addressing modes are position independent if the expression specifying the displacement 1is absolute and 1if the register's value is set by an instruction that is position independent itself. The displacement addressing modes are Format Mode dis (Rn) Displacement @dis (Rn) Displacement deferred listed below. Relative and relative deferred addressing modes are position independent 1if the address expression 1is relocatable. Absolute addressing mode is position independent if the address expression is absolute (for example, an address in the system space). Because the linker converts general addressing mode to relative if the expression is relocatable and converts it to absolute 1if the expression is absolute, using general addressing mode ensures that the code is position independent. Table 3-1 summarizes the position independence or dependence of relative and absolute Table Relative and modes. 3-1 Absolute Addressing Position Modes Independence/Dependence Mode Address Expression Relocatable Absolute Relative Position independent Position dependent Relative Position independent Position dependent Address Expression Deferred Absolute Position dependent Position independent General Position Position independent independent The index addressing modes are position independent if the base mode is position independent and if the index register contains an absolute number (not an address). In addition, to ensure position independence, you must make sure that no addresses are stored as data. For example, if you have a table of pointers, the code will be position dependent. But if you replace the table of ©pointers with a table of displacements from a relocatable address, then the code can be position independent. WRITING remainder of different MOVL # TABADDR, RO MOVAB TABADDR,RO MOVAB MOVL IOCSGL_DEVLIST,RO #I0CSGL_DEVLIST,RO This example demonstrates the writing position-independent use of code. example W 1 POSITION-DEPENDENT W9 Example this chapter presents four examples showing the use addressing modes to write position-independent code. POSITION-INDEPENDENT wWe the POSITION-DEPENDENT - The of POSITION-INDEPENDENT CODE POSITION-INDEPENDENT is not. But, if the address 1is absolute, position-independent and relative mode is not. absolute R3. CHARS,R3 4 (R3) ,RO MOVL #4,R3 MOVB CHARS[R,RO 3] W MOVAB MOVB Compare position E PUT POSITION-DEPENDENT PUT POSITION-INDEPENDENT CODE PUT E POSITION-INDEPENDENT CODE OFFSET ADDRESS OFFSET This example demonstrates the use of displacement and writing position-independent code. The address CHARS are is N #4,R3 CHARS (R3) ,RO with mode we MOVL address. address is absolute mode \ABCDEFGHIJKLMNOPQRSTUVWXYZ\ MOVB dependent, relocatable the WMy (ASCII a WM CHARS: CODE W 2 CODE CODE relative and absolute modes in All the instructions 1in this move an address to RO. The address TABADDR is address; the address IOCSGL DEVLIST is absolute. If relocatable, relative mode is position-independent and Example CODE the the two independent. first addressing following mode, equivalent OF LETTER OF OF CHARS IN LETTER index is which addressing a IN CODE R3. IN R3. modes in relocatable 1is position modes, which WRITING POSITION-INDEPENDENT CODE Example SETTING UP A STRING DESCRIPTOR IN A POSITION-DEPENDENT WAY .ALIGN DESCRIP: ; i ; ; GET ADDRESS OF DESCRIPTOR SETTING UP A STRING DESCRIPTOR IN A POSITION-INDEPENDENT WAY ; W STACK WMo #EOSTR-STR SP,R2 POSITION-INDEPENDENT REFERENCE TO GET ADDRESS WM W STR PUSHAB OF STRING ON THE PUSH LENGTH OF STRING ON STACK GET ADDRESS OF DESCRIPTOR SETTING UP A LIST HEAD IN A POSITION-DEPENDENT WAY QHEADA: ; THE STRING THE END OF STRING BY CREATING THE STRING DESCRIPTOR ON THE STACK PUSHL MOVL i DESCRIPTOR DESCRIP,R2 W ; THIS MOVAB ,ADDRESS QHEADA ; .ADDRESS QHEADA ; THIS IS POSITION DEPENDENT SETTING UP A LIST HEAD IN A POSITION-INDEPENDENT WAY BY USING EXECUTABLE QHEADB: .BLKA ; CODE MOVAB MOVL ; RESERVE 2 LONGWORDS FOR ADDRESS 2 TO STORE ADDRESSES QHEADB,RO RO, (RO) (RO) +, (RO) This example demonstrates a way to GET THE ADDRESS OF THE LIST HEAD. STORE THE FIRST ADDRESS (THE FORWARD LINK). W9 MOVAL STORAGE STORE THE SECOND ADDRESS N W SOURCE INSTRUCTIONS TO STORE ADDRESSES - ; TO ACCESS ; ; W ’ ; LENGTH OF STRING. ; CODE IS POSITION DEPENDENT EOSTR-STR . LONG STR .ADDRESS .ASCII \AN ASCII STRING\ STR: EOSTR: ; LONG N ; 3 BACKWARD avoid having absolute Both string descriptors used in stored as data. addresses procedure calling standard and the list head for the INSQUE To addresses. virtual absolute require instructions stored by position independent, the addresses must be instructions rather than as data (THE LINK). in the source code. virtual the VAX-1l1 and REMQUE code make executable WRITING Example ; POSITION-INDEPENDENT CODE 4 CREATING A POSITION-DEPENDENT DISPATCH DISPATBL: ; TABLE ;s LIST OF «ADDRESS ROUTINO ; ABSOLUTE .ADDRESS ROUTIN1 ; ADDRESSES .ADDRESS ROUTIN2 ; CAUSING .ADDRESS ROUTIN3 ; POSITION ROUTIN2 IS ENTERED BY MOVL THE FOLLOWING #<2*4> ,R3 @DISPATBL[R3] CODE TO BE DEPENDENT INSTRUCTIONS ; GET OFFSET ; OF ROUTIN2 OF ADDRESS ; ENTER ROUTIN2 e CREATING -y wo JSB VIRTUAL SOURCE AN CODE EQUIVALENT IS OFFSET POSITION LIST USING THE CASE INSTRUCTION INDEPENDENT DISPAT: CASEB R3,#0,#3 ; CASE 10$: .SIGNED_WORD . SIGNED_WORD ROUTINO-10$ ROUTIN1-10% ; ; LIST OF OFFSETS FROM PC. .SIGNED WORD ROUTIN2-10$ .SIGNED:WORD ; ROUTIN2 IS ENTERED ROUTIN3-10$ BY MOVL THE FOLLOWING #2,R3 BSBB DISPAT ; ' INSTRUCTION CODE IS POSITION INDEPENDENT. INSTRUCTIONS ; GET ; LIST OFFSET ; ENTER ; INSTRUCTION. OF OF ROUTIN2 IN OFFSETS ROUTIN2 USING CASE This example demonstrates another way to avoid storing absolute virtual addresses as data. The dispatch table is a list of entry points to routines. This is a frequently used way to enter one of a series of routines, but the code is position dependent. The same functionality can usually be provided in a position-independent way by using the CASE instruction, which transfers control to a routine based on an offset to the PC. APPENDIX DIAGNOSTIC A MESSAGES If the assembler encounters an error during an assembly, it displays a diagnostic message on the terminal or batch log file and in the listing file (if there is one). The general format of VAX-11 MACRO diagnostic messages is: $MACRO-1-code, text 1 A severity a value level of W indicator. for a It has a value of E for an error or warning. code An abbreviation of the message this appendix are alphabetized text; by the message descriptions in this code. text The For explanation of the message. example: ¥MACRO-E-ILLMASKBITS, Some input and output Reserved diagnostic bits set messages in are ENTRY mask followed by an RMS error message. Listed below are assembler. of the the Each error ADRLSTSYNX, diagnostic message and Address list Action: Severity: ALIGNXCEED, directive directive be caused syntax action an to by the explanation correct the VAX-11 MACRO of cause the error. error address 1list 1in the .ADDRESS directive error. Correct Alignment the user displayed by the syntax. Error Explanation: than messages accompanied recommended Explanation: The contained a syntax User is exceeds The program PSECT alignment .ALIGN directive section specified alignment. For an alignment example, the larger .PSECT specified byte alignment (the default) and the .ALIGN specified a longword alignment. This message can also by -a .PSECT directive with an illegal alignment. DIAGNOSTIC MESSAGES .PSECT The alignments. conflicting Correct Action: User directive should specify the largest alignment required in the program section. Severity: ARGTOOLONG, Error Argument too long Explanation: An argument was more than User Action: Reduce Severity: ASCTOOLONG, the length of 512 characters long. the argument. Error ACSII string too long than longer The string in an .ASCIC directive was Explanation: 255 characters or the string in an .ASCID directive was more than 65535 characters. User Action: Severity: ASGNMNTSYNX, Reduce the length of the string. Error Assignment syntax error A direct assignment statement Explanation: contained a syntax error. User Action: Severity: BADENTRY, Bad and format an BADLEXARG, syntax. for The .ENTRY statement .ENTRY directive did not specify an entry point entry mask. User Action: Severity: the Error Explanation: name Correct Correct the .ENTRY directive syntax. Error Illegal lexical function argument was operator string macro a to argument The Explanation: invalid. String arguments can be macro arguments or strings Symbol delimited by angle brackets or the circumflex delimiters. arguments can be absolute symbols or decimal integers. User Action: Severity: Correct Error the argument syntax. DIAGNOSTIC BADLEXFORM, Illegal format for Explanation: The macro User Correct Action: Severity: BADLOGICPC, Explanation: was or (SPR). listing User error The The address 1s produce assembler displayed be invalid object Correct in the VAX-~-1ll MACRO PC at the time the the not the value or a command syntax the produce error is Software error the an object reproducible, Problem Report message and the SPR. listing with value; XXXXX assembler does file. the correct syntax. error block or directive destination The too from away displacements current of address the have PC. from a a repeat block directive syntax. 1logic so instruction. Error of of in PC. from to the Branch -128 instruction bytes that range specified range Branch -32768 out current User Action: Use a branch instead of one with a instruction instead of a Severity: XXXXX Error Explanation: branch with keyword the directive Branch program PC does in module Reenter Action: range error. Error Severity: a at included Explanation: A conditional contained a syntax error. the syntax syntax. A command qualifier had an illegal value specified in the command. The an Block far detected assembly. 1If the manager to submit a should an Action: BRDESTRANGE, operator a Error Severity: User string the system program xxxxx BLKDIRSYNX, macro contained file. Retry Explanation: indicates the not logic detected. Severity: BADVALUE, the operator XxXxXXX User Action: notify your source string function There was an internal error 1indicates the value of assembler; error lexical Error Internal module MESSAGES instruction instructions bytes with +32767 branch to word bytes +127 branch bytes from the destination is was byte from displacements instruction with a word byte displacement; use branch instruction; or the with current have PC. displacement a jump (JMP) change closer to the the DIAGNOSTIC MESSAGES CANTFINDMAC, Can't locate macro in macro libraries Explanation: A macro name specified in a not defined in the macro User Action: Specify, that defines the macro. Severity: CLOSEIN, .MCALL libraries searched. in the MACRO command, the directive macro was library Error Error closing file-spec as input The assembler encountered an I/O error when closing Explanation: file-spec is the file or macro library file; source input an specification of the Retry the operation or make a new copy of the User Action: and file retry the operation with the copy. Severity: CLOSEOUT, file being closed. Error file-spec as output Error closing The assembler encountered an I/O error when closing Explanation: the file 1is file-spec file; listing or object output an specification of Severity: DATALSTSYNX, file being closed. Retry the operation. User Action: notify your the If the error is reproducible, system manager. Error Data list syntax error syntax a The data list in the directive contained Explanation: directive .LONG 3,,5 contains a data the example, For error. two the list syntax error because there is no data item between commas. User Action: Severity: DATATRUNC, Data Correct the syntax of the data list. Error truncation error given The specified value did not fit in the Explanation: type. The assembler truncated the value so that it fit. User Action: ASCII Severity: DIRSYNX, Reduce the value or the number of characters in string or change the data type. Warning Directive syntax error Explanation: The directive User Action: Correct the syntax of the directive. Severity: Error contained a syntax error. data an DIAGNOSTIC DIVBYZERO, Division by zero Explanation: An User Change Action: Severity: EMSKNOTABS, Explanation: The Severity: values in Statement Severity: ends The mask the values wrong overflowed User The Change Action: Severity: absolute or in the expression. MACRO specified a different name than the .ENDM directive to ensure .MACRO directive correspond as 32-bits value of the expression could not be stored bits). The assembler truncated the value to the values in the in 32 expression. Warning Floating point Explanation: A User Correct Action: Severity: syntax error floating-point the constant syntax of the contained a syntax error. constant. Warning Generated ERROR: xxxXxX Explanation: A value of expression is text specified in Action: Follow the Severity: not .MACRO directive. (32 User was Error Expression the 0. expression. expression .ENDM directive Explanation: a longword bits. GENERR, by symbols. User Action: Correct the name in that the .ENDM directive and required. FLTPNTSYNX, the division Error corresponding EXPOVR32, a absolute entry Change Explanation: its not undefined Action: ENDWRNGMAC, the contained Warning mask User error expression Entry contained MESSAGES the Error message .ERROR directive was specified the in assembled; the xxxxx directive; directive. instructions in the message. and 1is the message DIAGNOSTIC MESSAGES GENWRN, Generated WARNING: XXXXX message xxxxx 1is the Explanation: A .WARN directive was assembled; and message value of the expression specified in the directive; is the text specified in the directive. Follow the instructions in the message. User Action: Severity: IFDIRSYNX, Warning IF directive syntax error A conditional assembly directive contained a syntax Explanation: error. Correct the syntax of the directive. User Action: Severity: Error IF expression not absolute IFEXPRNTABS, not an 31 levels of decrease nesting of directive was was .IF directive Explanation: The expression in a absolute expression or contained undefined symbols. User Action: Severity: IFLEVLXCED, Change the values in the expression. Error IF nesting level exceeded Explanation: The assembler encountered more than User Action: Restructure the nested conditional assembly blocks. conditional assembly blocks. Severity: program to Error ILLARGDESC, Illegal operand argument descriptor Explanation: The operand descriptor in an .OPDEF User Action: Use one of the valid operand descriptors. invalid. Severity: ILLASCARG, Error Illegal ASCII argument Explanation: The argument to an .ASCIx directive did not have enclosing delimiters or an expression was not enclosed in angle brackets. User Action: Severity: Correct the syntax of the argument. Error DIAGNOSTIC ILLBRDEST, Illegal branch Explanation: address, User use jump destination destination example, Action: a Severity: ILLCHR, The for Change (JMP) MESSAGES BRB the of destination User illegal Action: Severity: Delete Illegal A Action: or expression. A Severity: IF and instruction or a character that was character. .DEFAULT was directive did not not BYTE, specify DISPLACEMENT WORD, LONGWORD. or .DEFAULT directive. wunary right the operator angle syntax of was not brackets the did followed by a not in an match expression. condition The condition a wvalid or IDENTICAL User Action: directive. ILLINDXREG, branch Error Explanation: Severity: the Correct Illegal DIFFERENT for specified radix 1left Action: not the expression Explanation: was of contained .DEFAULT directive Correct number, ILLIFCOND, an Error Illegal User the argument displacement Severity: ILLEXPR, not Error Explanation: User was character line the instruction instruction. Explanation: The source illegal in its context. or branch Error Illegal ILLDFLTARG, a 10(R9). specified condition, Correct or in a there conditional were no symbols assembly after a condition, the syntax of the conditional assembly Error Invalid index register Explanation: The base mode changed the value of the register and the index register was the same as the register in the base mode; the base mode was literal or immediate mode; or PC was used as the index register. User Action: Severity: Correct Error the addressing mode. DIAGNOSTIC MESSAGES ILLMACARGNM, The name Explanation: illegal in .MACRO the directive contained an character. Delete the User Action: Severity: ILLMACNAM, MACRO argument name Illegal illegal character. Error Illegal MACRO name name macro was specified in .MACRO the Explanation: No User Action: Specify the macro name in the .MACRO directive. directive. Severity: Error ILLMASKBITS, Reserved bits set in ENTRY mask The register Explanation: save mask in an LENTRY or .MASK directive specified RO, R1l, AP, or PC registers (corresponding to bits 0, 1, 12, ILLMODE, 13). Remove these registers from the register save mask. User Action: Severity: and Error ! mode Illegal Explanation: An invalid addressing mode for the instruction User Action: Specify a legal addressing mode. was specified. Severity: ILLOPDEF, Error Illegal format for .OPDEF .OPDEF directive had incorrect syntax. Explanation: The User Action: Correct the Severity: .OPDEF directive syntax. Error ILLOPDEFVAL, Illegal value for opcode definition Explanation: The value specified in the .OPDEF directive did not User Action: Correct the value in the directive. fit in two Severity: bytes. Error ILLREGHERE, This register Explanation: PUSHL (PC). User Action: Severity: ILLREGNUM, This Use Illeqal was User may used not register another register not A the be cannot here be used here, Severity: FP, Correct name SP, the was OR PC not in the register illegal range exceeds Action: INSVIRMEM, 15 Truncate Explanation: The definitions definition called terminated the User the Action: system register INVALIGN, the virtual module name name. to Action: LINETOOLONG, being the itself (a assembly. assembled virtual recursive the virtual reduce the has memory too many symbols available definition). or The a and: macro assembler memory available by contacting level of macro nesting; split modules; or eliminate the No integer Correct the or keyword syntax of the followed .ALIGN the .ALIGN directive. Error Line too long source line characters. User Action: shorter. Severity: characters. alignment Explanation:' A 500 The Error Invalid Severity: 15 characters. memory for 1Increase manager; Explanation: directive, User R12 characters the module into several smaller recursive macro definition. Severity: through Warning Insufficient macro RO name. Error Symbol Severity: example, register. Explanation: The symbol name was longer than 15 assembler truncated the name to 15 characters. User for number register AP, Action: ILLSYMLEN, MESSAGES Error Explanation: or DIAGNOSTIC Restructure Error in the a macro source definition code so that was longer the 1line than is DIAGNOSTIC MESSAGES MACLBFMTERR, Macro library format error A format error occurred in the macro library. Explanation: User Action: Retry the assembly and, if the error still occurs, use the LIBRARY command (see the VAX/VMS Command Language User's Guide) to re-create the library from the source code. Error Severity: MAYNOTINDEX, This mode may not be indexed Explanation: The base mode was register, immediate, User Action: Change the addressing mode. or 1literal mode. Error Severity: MCHINSTSYNX, Machine instruction syntax error occurred in an Explanation: A syntax error User Action: Correct the instruction syntax. example, MOVL, Severity: instruction, for A. Error MISSINGEND, Missing .END statement Explanation: There was no .END directive at the end of the The assembler inserted an .END directive after the last module. line. User Action: Severity: Insert a .END directive. Warning MSGCMAIIF, Missing comma in ,IIF statement Explanation: The condition was not separated from the User Action: 1Insert a comma in the directive. in an statement .IIF directive. Severity: Error MULDEFLBL, Multiple definition of label Explanation: The same label was defined twice in the module. User Action: Delete the second label definition or change one of the labels to a different symbol name. Severity: Error A-10 DIAGNOSTIC MESSAGES NOFORMALARG, No formal argument Explanation: directive. There were User Action: Correct Severity: NOTDECSTRNG, Illegal Explanation: digits 0 the formal syntax Severity: character in Correct the syntax a legal ENABLE option Severity: Not Delete enough in Action: The the assembly the operands NOTINMACRO, the the .ENABLE than decimal string. or or .DISABLE replace it directive with was a legal than were supplied requires operands A outside or condition .IF_FALSE, subconditional more operands change the instruction. body .IF_TRUE, .IF_TRUE_FALSE, directive was not in .IFF, a block. the subconditional delete the . IFT, conditi onal directive with subconditional directive. a Error Statement not Explanation: or expansion. The User Action: directive. Delete Severity: a instruction User Action: Replace conditional directive or Severity: of statement. Add Statement L.IFTF string Error Explanation: or .IRPC directive. Error Explanation: NOTINANIF, .IRPC option User Action: option. Severity: .IRP or A decimal string contained a character other 9 and a leading plus or minus sign. to User .IRP or in an Error Not specified of decimal Explanation: An argument not a legal option. NOTENUFOPR, arguments through Action: NOTENABLOPT, no .IRP/.IRPC Error the User for in .NARG or MACRO body directive move Error A-11 was not the 1line in a macro containing defini tion the . NARG DIAGNOSTIC NOTLGLISTOP, Not a legal Explanation: The directive was not User Action: legal MESSAGES listing option argument to a .SHOW, a legal option. Delete the illegal .NOSHOW, option .LIST, or it .NLIST or replace with a the .PSECT directive was option. Severity: NOTPSECTOPT, Error Not a valid Explanation: PSECT option The attribute specified in invalid. User Action: valid Severity: OPENIN, Delete the invalid attribute or replace it with a one. Error Error opening file-spec as input Explanation: The assembler encountered an I/0 error when opening an input source or macro library file; file-spec is the file specification of the file being opened. This message is produced when the file User Action: file and Severity: OPENOUT, Error then cannot be found. Retry the assembly or make a new copy of the retry the assembly. inpud\ Error opening file-spec as output Explanation: The assembler encountered an 1/0 error when opening an output object module or listing file; file-spec is the file specification of the file being opened. This message is produced when the device is write locked or is not mounted. User Action: reproducible, Severity: OPRNDSYNX, Retry the notify your assembly if the Error Operand syntax error Explanation: An operand contained a User Action: Correct Severity: and, system manager. the operand Error A-12 syntax error. syntax. error is DIAGNOSTIC PACKTOOLONG, Packed Explanation: than 31 User Action: string The numeric too string long in a .PACKED directive had Reduce the length of the decimal Conflicting section User Action: directive(s). Severity: PSECTBUFOVF, string. Error PSECT options Explanation: The values specified in a conflicted with each other or were not the specified in a preceding .PSECT directive that program more digits. Severity: PSECOPCNFLC, decimal MESSAGES .PSECT directive same as the values specified the same name. Correct the conflicting values in the LPSECT Error PSECT context buffer overflow Explanation: The .SAVE PSECT directive attempted to save a section context when the program section context buffer was filled. A maximum of 31 program section contexts can be saved in the buffer. program User Action: Severity: PSECTBUFUND, Reduce Explanation: was User context The section of program section nesting. buffer underflow .RESTORE_PSECT directive attempted context section when the program to restore context a buffer empty. Action: corresponds Severity: READERR, amount Error PSECT program the error to Ensure a that .SAVE_PSECT each .RESTORE_PSECT Error reading file-spec Explanation: The assembler encountered an an input source or macro library file; specification of the file being read. User Action: Retry input file and then Severity: directive directive. the assembly, retry the or create assembly. Error A~13 I/0O error when reading file-spec is the file a new copy of the DIAGNOSTIC MESSAGES REGOPSYNX, Register operand syntax error Explanation: The addressing mode syntax contained an error. User Action: Correct the addressing mode syntax. Severity: RMSERROR, Error RMS service error Explanation: The assembler encountered an error during a VAX-ll User Action: Retry the operation; the VAX-1l Record .BYTE, .WORD, . LONG, RMS operation. consult Management Services Reference Manual for more information. Severity: Error RPTCNTNTABS, Repeat count not absolute repeat a in count Explanation: The User Action: Replace the expression with an absolute .SIGNED_WORD directive contained an undefined or .SIGNED_BYTE, expression. relative a symbol or was expression that does not contain any undefined symbols. Severity: Error SYMDCLEXTRN, Symbol declared external Explanation: a specified statement A label definition or direct assignment that was previously declared external in a symbol User Action: Delete the external declaration or change the .EXTERNAL directive. of symbol. internal the Severity: Error SYMDEFINMOD, Symbol is defined in module Explanation: A .EXTERNAL directive specified a User Action: Delete previously defined internal Severity: SYMNOTABS, name 1label that was or rename the in the module. the external declaration symbol. Error Symbol is not absolute Explanation: The argument in User Action: Ensure a macro string is defined operator was a relative symbol or was undefined. that symbol symbol. Severity: Error A-14 as an absolute DIAGNOSTIC MESSAGES SYMOUTPHASE, Symbol out of phase Explanation: A label definition specified a 1label that was defined later in the module; or a local 1label definition specified a local label that was defined later in the same 1local label block. User Action: module or label block. Severity: TEXT, No input file Action: Severity: TOOMNYARGS, that local the label label is is defined defined only only once once in in the the local Too given The macro only macro Specify a command did not library files. source file in contain any source the command files; line. Error many Explanation: specified in User the Error Explanation: it contained User Ensure that Action: arguments in MACRO call The macro call contained more arguments than the .MACRO directive in the macro definition. Ensure that the macro call corresponds operands for instruction to were the macro for the sections were definition. Severity: TOOMNYOPRND, Error Too many Explanation: instruction. User Action: Severity: TOOMNYPSECT, Too many Reduce the number of were specified operands. Error Too many PSECTs Explanation: declared. More User Reduce Action: Severity: operands than the declared 255 user-defined number Error A-15 of program program sections. DIAGNOSTIC MESSAGES UNDEFSYMBOL, Undefined Explanation: local 1label symbol A local label was referred to but not defined in a block; or, if GLOBAL was disabled, a symbol was referred to but not defined in the module or specified in a .EXTERNAL directive, User Action: symbol Define the local label or symbol, in a Severity: UNDEFXFRADR, .EXTERNAL directive. or specify the Error Undefined transfer address Explanation: The .END directive specified a transfer address that was not defined in the module or specified in a .EXTERNAL directive. User Action: Define the transfer address or delete it .END directive. Severity: UNPROQUAL, from the Error Unprocessed qualifiers was qualifier /CROSS the /SHOW or the Either Explanation: specified without the /LIST qualifier. The assembler does not process the source file or produce an object module. User Action: Severity: UNRECSTMT, Reenter the command with the /LIST qualifier. Error Unrecognized statement Explanation: user-defined The operator was opcode, previously User Action: Change the operator to a valid library. or macro; or define Severity: Error UNTERMARG, Unterminated not an defined the macro. opcode, directive, macro, or macro in a opcode, directive, argument Explanation: The string argument was missing a delimiter or User Action: Add the delimiter or angle bracket. macro argument was missing an angle bracket. Severity: Error the DIAGNOSTIC UNTERMCOND, Unterminated Explanation: a J.ENDC before Severity: Error file the assembly block was The assembler Add the .ENDC writing The output not a terminated .ENDC by directive directive. file-spec assembler object specification of encountered module the or file Error A-17 an listing being User Action: Retry the assembly. notify your system manager. Severity: inserted Error Explanation: to A conditional .END directive. User Action: WRITEERR, conditional directive. the MESSAGES If I/0 file; error written. the error when file-spec is writing is the reproducible, INDEX A G Absolute addressing mode, 2-6 Addressing modes, 3-1, 3-2 Global symbols, 1-4, controlling, 2~6 position-independent, through role of, 1-3 summary, 2-13 Binary code, 2-11 Hexadecimal code, Identifying a Image, location, Code, hexadecimal, 2-11 position-independent, through Command Labels, 1-4 Library, macro, 2-1 Common data areas, 1-6 Compatibility mode, vii programs, Conditional blocks, controlling listing of, 2-7, 2-8 Controlling the listing file, 2-7, 2-8 Cross reference listing, 2-5, 2-12, 2-13 /CROSS qualifier, 1-9, 2-3 2-5, 2-6 symbols, 2-5, 2-8, 2-9, Executable image, A-1 External 2-6 1-4 1-4 command, 2-1 through libraries, vii, 1-5 2-8 1-5 controlling listing of, 2-7, Messages, diagnostic, 2-8, 2-9, A-1 A-17 Modular programming, 1-2 Native mode, vii /NOLIST qualifier, 2-6 producing File specifications, a, 1-7 2-7 /NOOBJECT qualifier, 2-7 /NOSHOW qualifier, 2-7, 2-8 O 2-2, Floating point numbers, of 2-8 2-7 identifying, F Format 2-7, 2-1, N E symbols, Local 2-6 A-17 /DISABLE qualifier, Errors, 1-8 the, the, Locations, Macros, 1-4, specifications, qualifier, controlling creating Macro Developing a program, 1-1, 1-2 Diagnostic messages, A-1 through /ENABLE 1-7, 2-6 /LIST qualifier, 2-7 Listing file, 2-10 through 2-19 MACRO Data, sharing, 1-6 Debugging programs, file 1-5, 2-5 D Default vii, /LIBRARY qualifier, 2-6 Linking, object modules, 1-7, 1-8 3-5 format, 1-4 L vii 3-1 1-4 3-1 symbols, C from VAX-11l MACRO V1, 2-11 shareable, Internal Changes 2-6 H 3-1 3-5 Assembler, Assembly 1-5, statements, 2-3 Object modules, creating, 2-6 1-1 linking, 2-1, 1-7, 2-7 1-8 /OBJECT qualifier, Index-1 2-7 2-8 through INDEX P Shareable image, 3-1 Sharing data, 1-6 /SHOW qualifier, 2-7, 2-8 Source statements, 2-11 Specifications, file, 2-2 Statement format, 1-1 Statements, source, 2-11 Suppressing listing of unreferenced symbols, Page headings, listing, 2-10 PIC attribute, 3-1 Position~-independent code, 3-1 through 3-5 Program, debugging, 1-4, 1-9, 2-6 developing, 1-1, 1-2 linking, 1-7, 1-8 modular, 1-2 sections, 1~-5 through 1-7 segmenting, 1-5, 1-6 Symbol 2-3 Table, symbol, 1-4, 2-12 Technical changes, vii through 2-8 2-7, 1-6 controlling listing Traceback, 2-6 I'runcating 2-6 floating point numbers, U Read-only program sections, of, 2-8 Rounding floating point numbers, 2-5, 2-6 Undefined symbols, 2-6 Universal symbols, 1-5 User~-defined symbols, 1-4, S system, 1-5 W Sections, program, 1-5 through 1-7 Segmenting your program, 1-5, 1-6 Services, 2-6 2-12 T R Repeat blocks, 1-4, Symbols, 1-4, 1-5, 2-6 System services, 1-5 Q Qualifiers, table, 1-5 Weak symbols, 1-5 Write protecting program sections, 1-6 Index-2 VAX-11] MACRO User's Guide AA-DQO33B~TE READER'S NOTE: This use form is comments for COMMENTS document comments submitted on this form discretion. only. DIGITAL will at company's the IR M SN GV AP TR e S S If you require a written reply and are eligible to receive one under Software Performance Report (SPR) service, submit your comments on an SPR form. A S0 G S Did you find this manual understandable, suggestions for usable, and well-organized? improvement. Did you find errors page in this manual? If so, number. Please indicate OOoOodod Please cut along this line. " S S G G S - ot AD S S S T P SR R ) M G Please make the Assembly type of language Higher-level reader the error and the that you most nearly represent. programmer language programmer Occasional programmer User with specify (experienced) little programming experience Student programmer Other (please specify) Name Date Organization Street City. State Zip Code or Cronntd rer — — - Fold Here and Tape Do Not Tear il — — — — — —_—— = - —_ l — - Necessary if Mailed in the United States FIRST CLASS PERMIT NO.33 MAYNARD MASS. POSTAGE WILL BE PAID BY ADDRESSEE TW/A14 DIGITAL EQUIPMENT CORPORATION 1925 ANDOVER STREET TEWKSBURY, MASSACHUSETTS -— DoNotTear-FoldHere @ 2 — — = e — = — — 01876 — — — =— — — e No Postage BUSINESS REPLY MAIL RT/C SOFTWARE PUBLICATIONS — —
Home
Privacy and Data
Site structure and layout ©2025 Majenko Technologies