VSI Openvms VAX MACRO and Instruction Set Reference Manual
Total Page:16
File Type:pdf, Size:1020Kb
VSI OpenVMS VAX MACRO and Instruction Set Reference Manual Document Number: DO-VMACRM-01A Publication Date: April 2019 This document describes the features of the VAX MACRO instruction set and assembler. It includes a detailed description of MACRO directives and instructions, as well as information about MACRO source program syntax. Revision Update Information: This is a new manual. Operating System and Version: OpenVMS VAX Version 7.3 VMS Software, Inc., (VSI) Bolton, Massachusetts, USA VAX MACRO and Instruction Set Reference Manual Copyright © 2019 VMS Software, Inc. (VSI), Bolton, Massachusetts, USA Legal Notice Confidential computer software. Valid license from VSI required for possession, use or copying. Consistent with FAR 12.211 and 12.212, Commercial Computer Software, Computer Software Documentation, and Technical Data for Commercial Items are licensed to the U.S. Government under vendor's standard commercial license. The information contained herein is subject to change without notice. The only warranties for VSI products and services are set forth in the express warranty statements accompanying such products and services. Nothing herein should be construed as constituting an additional warranty. VSI shall not be liable for technical or editorial errors or omissions contained herein. HPE, HPE Integrity, HPE Alpha, and HPE Proliant are trademarks or registered trademarks of Hewlett Packard Enterprise. Intel, Itanium, and IA-64 are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States and other countries. The VSI OpenVMS documentation set is available on CD. ii VAX MACRO and Instruction Set Reference Manual Preface .................................................................................................................................... xi 1. About VSI ..................................................................................................................... xi 2. Intended Audience ......................................................................................................... xi 3. Document Structure ....................................................................................................... xi 4. Related Documents ....................................................................................................... xii 5. Typographical Conventions .......................................................................................... xiii 6. VSI Encourages Your Comments .................................................................................. xiv 7. How to Order Additional Documentation ...................................................................... xiv Part I. VAX MACRO Language Chapter 1. Introduction ........................................................................................................ 3 Chapter 2. VAX MACRO Source Statement Format ........................................................ 5 2.1. Label Field .................................................................................................................. 6 2.2. Operator Field .............................................................................................................. 6 2.3. Operand Field .............................................................................................................. 7 2.4. Comment Field ............................................................................................................ 7 Chapter 3. Components of MACRO Source Statements ................................................... 9 3.1. Character Set ............................................................................................................... 9 3.2. Numbers .................................................................................................................... 10 3.2.1. Integers ........................................................................................................... 10 3.2.2. Floating-Point Numbers ................................................................................... 11 3.2.3. Packed Decimal Strings ................................................................................... 12 3.3. Symbols ..................................................................................................................... 12 3.3.1. Permanent Symbols ......................................................................................... 12 3.3.2. User-Defined Symbols and Macro Names ......................................................... 13 3.3.3. Determining Symbol Values ............................................................................. 13 3.4. Local Labels .............................................................................................................. 14 3.5. Terms and Expressions ............................................................................................... 16 3.6. Unary Operators ......................................................................................................... 17 3.6.1. Radix Control Operators .................................................................................. 18 3.6.2. Textual Operators ............................................................................................ 19 3.6.2.1. ASCII Operator .................................................................................... 19 3.6.2.2. Register Mask Operator ........................................................................ 20 3.6.3. Numeric Control Operators .............................................................................. 21 3.6.3.1. Floating-Point Operator ......................................................................... 21 3.6.3.2. Complement Operator ........................................................................... 21 3.7. Binary Operators ........................................................................................................ 22 3.7.1. Arithmetic Shift Operator ................................................................................. 22 3.7.2. Logical AND Operator .................................................................................... 23 3.7.3. Logical Inclusive OR Operator ......................................................................... 23 3.7.4. Logical Exclusive OR Operator ........................................................................ 23 3.8. Direct Assignment Statements ..................................................................................... 23 3.9. Current Location Counter ........................................................................................... 24 Chapter 4. Macro Arguments and String Operators ....................................................... 27 4.1. Arguments in Macros ................................................................................................. 27 4.2. Default Values ............................................................................................................ 28 4.3. Keyword Arguments ................................................................................................... 28 4.4. String Arguments ....................................................................................................... 29 4.5. Argument Concatenation ............................................................................................. 31 iii VAX MACRO and Instruction Set Reference Manual 4.6. Passing Numeric Values of Symbols ........................................................................... 32 4.7. Created Local Labels .................................................................................................. 32 4.8. Macro String Operators .............................................................................................. 33 4.8.1. %LENGTH Operator ....................................................................................... 33 4.8.2. %LOCATE Operator ........................................................................................ 34 4.8.3. %EXTRACT Operator ..................................................................................... 35 Chapter 5. VAX MACRO Addressing Modes .................................................................. 37 5.1. General Register Modes ............................................................................................. 37 5.1.1. Register Mode ................................................................................................. 40 5.1.2. Register Deferred Mode ................................................................................... 41 5.1.3. Autoincrement Mode ....................................................................................... 41 5.1.4. Autoincrement Deferred Mode ......................................................................... 42 5.1.5. Autodecrement Mode ....................................................................................... 42 5.1.6. Displacement Mode ......................................................................................... 43 5.1.7. Displacement Deferred Mode ........................................................................... 44 5.1.8. Literal Mode ................................................................................................... 46 5.2. Program Counter Modes ............................................................................................. 47 5.2.1. Relative Mode ................................................................................................