High Level Assembler for Z/OS & Z/VM & Z/VSE: Language Reference
Total Page:16
File Type:pdf, Size:1020Kb
High Level Assembler for z/OS & z/VM & z/VSE Language Reference Version 1 Release 6 SC26-4940-06 Note Before using this information and the product it supports, be sure to read the general information under “Notices” on page 379. This edition applies to IBM High Level Assembler for z/OS & z/VM & z/VSE, Release 6, Program Number 5696-234 and to any subsequent releases until otherwise indicated in new editions. Make sure that you are using the correct edition for the level of the product. Order publications through your IBM representative or the IBM branch office serving your locality. IBM welcomes your comments. For information on how to send comments, see “How to send your comments to IBM” on page xvii. © Copyright IBM Corporation 1992, 2013. US Government Users Restricted Rights – Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. Contents Figures ..............vii Overview of assembler language structure . 19 Machine instructions ..........20 Tables ...............ix Assembler instructions .........21 Conditional assembly instructions ......22 Macro instructions ...........23 About this document .........xi Mnemonic tags ............23 Who should use this manual.........xi Terms, literals, and expressions ........24 Programming interface information ......xi Terms ...............24 Organization of this manual .........xi Literals ...............35 High Level Assembler documents .......xii Expressions .............38 Documents .............xii Collection kits ............xiii Chapter 3. Program structures and Related publications ...........xiii Syntax notation .............xiii addressing .............43 Object program structures .........43 How to send your comments to IBM xvii Source program structures .........44 Source module ............44 If you have a technical problem .......xvii Sections, elements, and parts .......45 Sections ..............46 Summary of changes ........xix Reference control sections ........48 Classes (z/OS and CMS) .........50 Chapter 1. Introduction ........1 Parts (z/OS and CMS)..........52 Language compatibility ...........1 Location counter setting .........52 Assembler language ............2 Addressing ..............54 Machine instructions...........2 Addressing within source modules: establishing Assembler instructions ..........2 addressability.............54 Macro instructions ...........3 Base register instructions .........56 Assembler program ............3 Qualified addressing ..........56 Basic functions.............3 Dependent addressing ..........57 Associated data ............3 Relative addressing ...........57 Controlling the assembly .........3 Literal pools .............58 Processing sequence ...........4 Establishing residence and addressing mode . 58 Relationship of assembler to operating system . 5 Symbolic linkages ...........58 Coding made easier ............6 External symbol dictionary entries......61 Symbolic representation of program elements . 6 Summary of source and object program Variety in data representation........6 structures ..............62 Controlling address assignment .......6 Relocatability .............6 Chapter 4. Machine instruction Sectioning a program ..........6 statements .............65 Linkage between source modules ......7 General instructions ...........65 Program listings ............7 Decimal instructions ...........65 Multiple source modules .........7 Floating-point instructions .........66 Double-byte character set notation .......7 Control instructions ...........66 Input/output operations ..........66 Chapter 2. Coding and structure ....9 Branching with extended mnemonic codes ....67 Character set ..............9 Alternative mnemonics for some branch relative Standard character set ..........9 instructions .............69 Double-byte character set .........10 Statement formats ............70 Translation table ............11 Symbolic operation codes..........70 Assembler language coding conventions .....11 Operand entries .............71 Field boundaries............12 Registers ..............72 Continuation lines ...........13 Addresses ..............73 Blank lines .............15 Lengths...............75 Comment statement format ........15 Immediate data ............76 Instruction statement format........15 Examples of coded machine instructions.....76 Assembler language structure ........17 RI format ..............76 © Copyright IBM Corp. 1992, 2013 iii RR format ..............78 ORG instruction ............177 RS format ..............78 POP instruction ............180 RSI format..............79 PRINT instruction ............181 RX format ..............80 Process statement ............184 SI format ..............81 PUNCH instruction ...........184 SS format ..............81 PUSH instruction ............185 REPRO instruction ...........186 Chapter 5. Assembler instruction RMODE instruction ...........187 statements .............83 RSECT instruction ............188 SPACE instruction ............189 64 bit addressing mode ..........84 START instruction ............189 *PROCESS statement ...........84 TITLE instruction ............190 ACONTROL instruction ..........85 Deck ID in object records ........191 ADATA instruction ............92 Printing the heading ..........191 AINSERT instruction ...........92 Printing the TITLE statement .......191 ALIAS instruction ............93 Sample program using the TITLE instruction 191 AMODE instruction ...........95 Page ejects .............192 CATTR instruction (z/OS and CMS) ......96 Valid characters ...........192 CCW and CCW0 instructions ........99 USING instruction............193 CCW1 instruction ............100 Base address ............193 CEJECT instruction ...........101 How to use the USING instruction .....193 CNOP instruction ............102 Base registers for absolute addresses.....194 COM instruction ............104 Ordinary USING instruction .......194 COPY instruction ............105 Labeled USING instruction ........197 CSECT instruction............106 Dependent USING instruction .......200 CXD instruction ............108 WXTRN instruction ...........202 DC instruction .............109 XATTR instruction (z/OS and CMS)......203 Rules for DC operands .........111 Association of code and data areas (z/OS and General information about constants.....111 CMS) ...............205 Padding and truncation of values......113 Subfield 1: Duplication Factor .......114 Subfield 2: Type ...........115 Chapter 6. Introduction to macro Subfield 3: Type Extension ........116 language .............207 Subfield 4: Program type ........117 Using macros .............207 Subfield 5: Modifier ..........118 Macro definition ............207 Subfield 6: Nominal Value ........121 Model statements ...........208 DROP instruction ............152 Processing statements .........208 Labeled USING ...........152 Comment statements ..........209 Dependent USING ..........153 Macro instruction ............209 DS instruction .............154 Source and library macro definitions .....210 Bytes skipped for alignment .......155 Macro library ............210 How to use the DS instruction.......155 System macro instructions ........210 DSECT instruction............157 Conditional assembly language .......210 DXD instruction ............159 EJECT instruction ............160 Chapter 7. How to specify macro END instruction ............160 definitions.............213 ENTRY instruction ...........162 Where to define a macro in a source module . 213 EQU instruction ............162 Format of a macro definition ........214 Using conditional assembly values .....165 Macro definition header and trailer ......214 EXITCTL instruction ...........166 MACRO statement ..........214 EXTRN instruction ...........167 MEND statement ...........214 ICTL instruction ............168 Macro instruction prototype ........215 ISEQ instruction ............168 Alternative formats for the prototype statement 216 LOCTR instruction ...........169 Body of a macro definition .........217 LTORG instruction ...........171 Model statements ............217 Literal pool .............172 Variable symbols as points of substitution . 217 Addressing considerations ........172 Listing of generated fields ........218 Duplicate literals ...........173 Rules for concatenation .........218 MNOTE instruction ...........173 Rules for model statement fields ......220 Remarks ..............174 Symbolic parameters ...........222 OPSYN instruction ...........175 Positional parameters..........223 Redefining conditional assembly instructions 177 iv High Level Assembler for z/OS & z/VM & z/VSE: Language Reference Keyword parameters ..........223 &SYSSTMT System Variable Symbol.....254 Combining positional and keyword parameters 223 &SYSSTYP System Variable Symbol .....254 Subscripted symbolic parameters ......223 &SYSTEM_ID System Variable Symbol ....255 Processing statements ..........224 &SYSTERM_DSN System Variable Symbol . 255 Conditional assembly instructions .....224 &SYSTERM_MEMBER System Variable Symbol 256 Inner macro instructions.........224 &SYSTERM_VOLUME System Variable Symbol 256 Other conditional assembly instructions . 224 &SYSTIME System Variable Symbol .....257 AEJECT instruction ..........225 &SYSVER System Variable Symbol .....257 AINSERT instruction ..........225 AREAD instruction ..........225 Chapter 8. How to write macro ASPACE instruction ..........227 instructions ............259 COPY instruction ...........228 Macro instruction format .........259 MEXIT instruction...........228 Alternative formats for a macro instruction