DECMACRO64n  $K2.61&K TemporaryLabelsWithinSourceCode2.6 Temporary Labels Within Source CodeSg' $K2.7&KLabel Addresses2.7 Label Addressesl8GG$@2.7.1Label Addresses, Optimization,andCode Alignment2.7.1 Label Addresses, Optimization, and Code Alignmentl3BB$@2.7.2Label Addressesand AutomaticData Alignment2.7.2 Label Addresses and Automatic Data Alignment`w. $K2.8!&KTermsand Expressions2.8 Terms and Expressionsw.E $L2.98&LUnary OperatorsforTermsand Expressions2.9 Unary Operators for Terms and Expressions`l**$A2.9.1RadixControl Operators2.9.1 Radix Control Operatorshl"..$A2.9.2Numeric ComplementOperator2.9.2 Numeric Complement OperatorWw)$K2.10&KBinary Operators2.10 Binary Operatorsfl!--$@2.10.1 ArithmeticShiftOperator2.10.1 Arithmetic Shift Operator\l(($@2.10.2LogicalANDOperator2.10.2 Logical AND Operatorol%22$A2.10.3Logical InclusiveOROperator2.10.3 Logical Inclusive OR Operatorol%22$A2.10.4Logical ExclusiveOROperator2.10.4 Logical Exclusive OR Operatorpw"6$K2.11(&KDirect Assignment Statements2.11 Direct Assignment Statementshg2$K2.12$&KCurrentLocationCounter2.12 Current Location Counter ^w))$K3MACRO-64Lexical Operators3 MACRO-64 Lexical Operatorsyw&; $K3.1.&K ProcessingwithLexical Operators3.1 Processing with Lexical Operatorsdw0 $K3.2#&KLexicalOperatorSyntax3.2 Lexical Operator Syntaxw/F $K3.39&KNumericSymbolsandLexicalStringSymbols3.3 Numeric Symbols and Lexical String Symbols(pw"6 $L3.4)&LLexical SubstitutionOperator3.4 Lexical Substitution Operator/dw0 $L3.5#&LLexicalEscapeOperator3.5 Lexical Escape Operator2dw0 $K3.6#&KUsingLexical Operators3.6 Using Lexical Operators;Ww) $K3.7&KLexical Operators3.7 Lexical Operators>-gEK%EDIT%EDIT@3g EK%ELEMENT%ELEMENTK3g EL%EXTRACT%EXTRACTT-gEL%FREG%FREG]3g EK%INTEGER%INTEGERd-gEK%IREG%IREGk1gEK%LENGTH%LENGTHr1gEK%LOCATE%LOCATEy1gEL%REPEAT%REPEAT1gEL%STRING%STRING-gEK%TIME%TIME-gEL%TYPE%TYPEGw$K4Macro Arguments4 Macro Arguments`w. $K4.1!&KUsingMacro Arguments4.1 Using Macro Arguments^w- $K4.2 &KUsingDefaultValues4.2 Using Default Valuesdw0 $K4.3#&KUsingKeyword Arguments4.3 Using Keyword Argumentsbw/ $L4.4"&LUsingString Arguments4.4 Using String Argumentsaw. $L4.5!&LArgument Concatenation4.5 Argument Concatenationzw&< $K4.6/&KPassingNumericValuesofSymbols4.6 Passing Numeric Values of Symbolssw#8 $K4.7+&KUsingCreated TemporaryLabels4.7 Using Created Temporary Labelsdg ,,$K5MACRO-64 Assembler Directives5 MACRO-64 Assembler DirectivesUw( $K5.1&KProgramSections5.1 Program Sectionsfw1 $L5.2$&L AutomaticData Alignment5.2 Automatic Data AlignmentHg! $L5.3&L Directives5.3 Directives3g EK.ADDRESS.ADDRESS/gEK.ALIGN.ALIGN/gEK.ASCIC.ASCIC/gEK.ASCID.ASCID /gEL.ASCII.ASCII/gEK.ASCIZ.ASCIZ-gEK.BASE.BASE%;r EL .BEGIN_EXACT.BEGIN_EXACT98gEK.BLK K x.BLK xB-gEK.BYTE.BYTEL=rEK .CODE_ADDRESS.CODE_ADDRESSS9r EK .D_FLOATING.D_FLOATINGZ;r EK .DEFINE_FREG.DEFINE_FREGa;r EL .DEFINE_IREG.DEFINE_IREGj3g EK.DISABLE.DISABLEt-gEK.ELSE.ELSEz1gEK.ENABLE.ENABLE+gEK.END.END-gEK.ENDC.ENDC-gEL.ENDM.ENDM-gEK.ENDR.ENDR7r EK .END_EXACT.END_EXACT/gEK.ERROR.ERROR-gEK.EVEN.EVEN5g EK .EXTERNAL.EXTERNAL9r EK .F_FLOATING.F_FLOATING9r EK .G_FLOATING.G_FLOATING/gEL.IDENT.IDENT)g  EL.IF.IF-rEK.IF_x.IF_x+gEK.IIF.IIF3g EK.INCLUDE.INCLUDE;g EK .INSTRUCTION.INSTRUCTION +gEL.IRP.IRP-gEL.IRPC.IRPC3g EK.LIBRARY.LIBRARY,=rEK .LINKAGE_PAIR.LINKAGE_PAIR7-gEK.LIST.LIST>IrEK.LOCAL_CODE_ADDRESS.LOCAL_CODE_ADDRESSDIrEL.LOCAL_LINKAGE_PAIR.LOCAL_LINKAGE_PAIRKYr%%EL.LOCAL_PROCEDURE_DESCRIPTOR.LOCAL_PROCEDURE_DESCRIPTORR-gEL.LONG.LONGZ/gEL.MACRO.MACROa/gEK.MCALL.MCALLv3g EK.MDELETE.MDELETE~/gEK.MEXIT.MEXIT-gEK.NARG.NARG-gEL.NCHR.NCHR/gEL.NLIST.NLIST1gEK.NOSHOW.NOSHOW-gEK.OCTA.OCTA+gEK.ODD.ODD1gEK.PACKED.PACKED-gEL.PAGE.PAGE/gEL.PRINT.PRINTMrEK.PROCEDURE_DESCRIPTOR.PROCEDURE_DESCRIPTOR/gEK.PSECT.PSECT-rEK.QUAD.QUAD1gEK.REPEAT.REPEAT?rEK.RESTORE_PSECT.RESTORE_PSECT9r EK .SAVE_PSECT.SAVE_PSECT9r EL .S_FLOATING.S_FLOATING-gEL.SHOW.SHOW;r EK .SIGNED_BYTE.SIGNED_BYTE ;r EK .SIGNED_WORD.SIGNED_WORD'5g EK .SUBTITLE.SUBTITLE.9r EK .T_FLOATING.T_FLOATING5/gEL.TITLE.TITLE<=rEL .UNDEFINE_REG.UNDEFINE_REGD-gEK.WARN.WARNK-gEK.WEAK.WEAKR-gEK.WORD.WORDZZw''$K6MACRO-64SuppliedMacros6 MACRO-64 Supplied Macrosahw2 $K6.1%&KMACRO-64SuppliedLibrary6.1 MACRO-64 Supplied Libraryckw4 $L6.2'&LRoutinesandLexicalScope6.2 Routines and Lexical Scopehml$11$A6.2.1RoutinesandProgramSections6.2.1 Routines and Program Sectionskw-D $K6.37&KUsingMacrostoControlProgramSections6.3 Using Macros to Control Program Sectionspdl ,,$A6.3.1DefiningProgramSections6.3.1 Defining Program Sectionsqhl"..$A6.3.2Using Macro-DefinedSymbols6.3.2 Using Macro-Defined Symbolsu`l**$@6.3.3Defining ProcedureType6.3.3 Defining Procedure Type{vl(66$@6.3.4UsingMacrosinPrologueSections6.3.4 Using Macros in Prologue Sections~vl(66$@6.3.5UsingMacrosinEpilogueSections6.3.5 Using Macros in Epilogue Sectionsw/E $L6.48&L ProgrammingExamplesUsingSuppliedMacros6.4 Programming Examples Using Supplied Macrosa|/ $Q6.5"&QUsingthe$CALLMacro6.5 Using the $CALL Macrohl!//$A6.5.1Using$CALLinSourceCode6.5.1 Using $CALL in Source Codeiw2 $K6.6%&K ProgrammingConsiderations6.6 Programming Considerationsl2BB$@6.6.1MakingMultipleCallsFromtheSameRoutine6.6.1 Making Multiple Calls From the Same RoutineWl%%$@6.6.2 NonstandardLinkage6.6.2 Nonstandard LinkageY\&&$A6.6.3Routine Restrictions6.6.3 Routine Restrictions~w(> $K6.71&KMacro DescriptionsandSyntaxRules6.7 Macro Descriptions and Syntax RulesAwEQ$BEGIN_EPILOGUE$BEGIN_EPILOGUE-wEP$CALL$CALL=wEP $CODE_SECTION$CODE_SECTION=wEP $DATA_SECTION$DATA_SECTION=wEQ $END_EPILOGUE$END_EPILOGUE=wEP $END_PROLOGUE$END_PROLOGUE;w EQ $END_ROUTINE$END_ROUTINE=wEQ $LINKAGE_PAIR$LINKAGE_PAIRCwEQ$LINKAGE_SECTION$LINKAGE_SECTION/wEQ$OPDEF$OPDEF1gEK.PACKED.PACKED MwEP$PROCEDURE_DESCRIPTOR$PROCEDURE_DESCRIPTOR?wEQ$RESET_LP_LIST$RESET_LP_LIST"1wEQ$RETURN$RETURN)3w EQ$ROUTINE$ROUTINE02I $\A>\MACRO-64AlphaAXP ArchitectureQuick ReferenceA MACRO-64 Alpha AXP Architecture Quick Referencegjw3 $KA.1&&KRegisterUsage ConventionsA.1 Register Usage Conventionslnw!5 $KA.2(&K InstructionOperandNotationA.2 Instruction Operand Notationrrr#7 $LA.3*&L Instruction QualifierNotationA.3 Instruction Qualifier Notationx|w'= $LA.40&LF-PControlRegister(FPCR)FormatA.4 F-P Control Register (FPCR) Formatzkw 3 $KA.5&&K DecodablePseudo-OperationsA.5 Decodable Pseudo-Operations|w3J $KA.6=&KCommon ArchitectureOpcodesin NumericalOrderA.6 Common Architecture Opcodes in Numerical Order}w(= $KA.70&KOpenVMSPALcode InstructionSummaryA.7 OpenVMS PALcode Instruction Summary|w'= $KA.80&KPALcodeOpcodesin NumericalOrderA.8 PALcode Opcodes in Numerical Ordervg%9 $KA.9,&KCommon Architecture InstructionsA.9 Common Architecture Instructionsd0 $[B%[ ProgrammingwithMACRO-64B Programming with MACRO-64jw3 $LB.1&&LMACRO-64 ProgrammingHintsB.1 MACRO-64 Programming Hintsjl#//$AB.1.1 STARLET.MLB MigrationMacrosB.1.1 STARLET.MLB Migration MacrosQl""$AB.1.2IntegerDivisionB.1.2 Integer Divisionl/==$AB.1.3 User-DefinedRegisterSymbolsandMacrosB.1.3 User-Defined Register Symbols and Macrosow!6 $KB.2)&KTheOpenVMSCallingStandardB.2 The OpenVMS Calling StandardBZJ$@B.2.1Effectson Assembly-TimewhenUsingCalling-StandardpMacrosB.2.1 Effects on Assembly-Time when Using Calling-Standard Macrosw)? $LB.32&L AccessingMemorywithBase RegistersB.3 Accessing Memory with Base Registersgw2 $LB.4%&LTypesofData StructuresB.4 Types of Data StructuresYl&&$AB.4.1 Procedure DescriptorB.4.1 Procedure DescriptorOl!!$AB.4.2 SignatureBlockB.4.2 Signature BlockIl$@B.4.3LinkagePairB.4.3 Linkage PairXw* $KB.5&KTypesofRoutinesB.5 Types of RoutinesYl&&$AB.5.1Routine CapabilitiesB.5.1 Routine Capabilitiesl1@@$AB.5.2EntryPrologueandExitEpilogue SequencesB.5.2 Entry Prologue and Exit Epilogue Sequencesuw%8 $KB.6+&K EstablishingSelf-AddressabilityB.6 Establishing Self-Addressability w)> $LB.71&L Optimizationand Automatic AlignmentB.7 Optimization and Automatic Alignmentbl++$AB.7.1 AutomaticData AlignmentB.7.1 Automatic Data Alignmentjl#//$A B.7.1.1 ControllingData AlignmentB.7.1.1 Controlling Data Alignmentl0>>$@ B.7.1.2 Directivesfor AutomaticData AlignmentB.7.1.2 Directives for Automatic Data Alignmentol%22$@B.7.2 AutomaticCodeLabel AlignmentB.7.2 Automatic Code Label Alignment_l))$@B.7.3 Scheduling OptimizationB.7.3 Scheduling Optimization"[l''$AB.7.4Peephole OptimizationB.7.4 Peephole Optimization$ol%22$AB.7.5UsingMACRO-64for PerformanceB.7.5 Using MACRO-64 for Performance&jl#//$AB.7.6Viewing OptimizationResultsB.7.6 Viewing Optimization Results*a/ $\C$\UsingLSEwithMACRO-64C Using LSE with MACRO-64,Mw$ $KC.1&KInvokingLSEC.1 Invoking LSE-[w+ $KC.2&KRunning DiagnosticsC.2 Running Diagnostics1gx2 $\D'\ DifferencesfromVAXMACROD Differences from VAX MACRO3sg#8 $KD.1+&K AssemblerFeaturesinMACRO-64D.1 Assembler Features in MACRO-646g/G $KD.2:&KVAXMACROFeaturesNotPresentinMACRO-64D.2 VAX MACRO Features Not Present in MACRO-64SM$ $\E\ErrorMessagesE Error Messagesn`. $\F#\MACRO-64ListingFormatF MACRO-64 Listing Format/ fEXAMPLESEXAMPLESl4BB=@3-1Lexical ProcessingWithouttheEscapeOperator3- 1 Lexical Processing Without the Escape Operator4l-::=@3-2Lexical ProcessingwithEscapeOperator3- 2 Lexical Processing with Escape Operator8]l((=A3-3UsingLexical Operators3- 3 Using Lexical Operators<l-::=A3-4Source StatementsAfterMacro Expansion3- 4 Source Statements After Macro Expansion=jl#//=A6-1ProgramUsingSuppliedMacros6- 1 Program Using Supplied MacrosUl$$=@6-2ProgramUsing$CALL6- 2 Program Using $CALLWl%%=@B-1RoutineCallExampleB- 1 Routine Call Examplejl#//=@B-2RoutineWithoutLinkagePairsB- 2 Routine Without Linkage Pairsdl ,,=AB-3RoutineWithLinkagePairsB- 3 Routine With Linkage Pairsfl!--=AB-4 EstablishingaBaseAddressB- 4 Establishing a Base Address{l+88=AB-5Enablingand DisablingData AlignmentB- 5 Enabling and Disabling Data AlignmentO\!!=@F-1MainSourceFileF- 1 Main Source FileU\$$=@F-2IncludeSourceFileF- 2 Include Source File[l''=@F-3ExampleListingOutputF- 3 Example Listing Output-gFIGURESFIGURESL\=AA-1Data StructuresA- 1 Data StructuresjT\##=AA-2 InstructionFormatsA- 2 Instruction Formatskql'22=AB-1 Base-RegisterMemory DisplacementB- 1 Base-Register Memory Displacementl-::=AB-2 AccessingMemoryThroughBase AddressesB- 2 Accessing Memory Through Base AddressesSl##=AB-3ProgramCallChainB- 3 Program Call Chain +gTABLESTABLESxl)77=@2-1UsingTabStopsin StatementFields2- 1 Using Tab Stops in Statement Fieldsrl4BB=A2-2Special CharactersUsedinMACRO-64 Statements2- 2 Special Characters Used in MACRO-64 Statementsdl ,,=A2-3SummaryofUnary Operators2- 3 Summary of Unary Operatorsfl!--=A2-4SummaryofBinary Operators2- 4 Summary of Binary Operatorshl"..=A3-1SummaryofMACRO-64Lexicals3- 1 Summary of MACRO-64 Lexicals?N\  =@3-2%TYPE Attributes3- 2 %TYPE Attributesl-::=@5-1SummaryofGeneral Assembler Directives5- 1 Summary of General Assembler Directivesfl!--=A5-2SummaryofMacro Directives5- 2 Summary of Macro Directivesl-::=A5-3.ENABLEand.DISABLESymbolic Arguments5- 3 .ENABLE and .DISABLE Symbolic Argumentsl9GG=A5-4 ConditionTestsfor ConditionalAssembly Directives5- 4 Condition Tests for Conditional Assembly Directivescl ++=A5-5ProgramSection Attributes5- 5 Program Section Attributestl(44=@5-6DefaultProgramSection Attributes5- 6 Default Program Section Attributesyl*77=@5-7.SHOWand.NOSHOWSymbolic Arguments5- 7 .SHOW and .NOSHOW Symbolic ArgumentsJl=A6-1ARGS Arguments6- 1 ARGS Argumentsl0>>=AA-1RegisterUsage ConventionsforOpenVMSAXPA- 1 Register Usage Conventions for OpenVMS AXPmgl"--=AA-2 InstructionOperandNotationA- 2 Instruction Operand Notationsk\$//=AA-3 Instruction QualifierNotationA- 3 Instruction Qualifier Notationyul(55=AA-4F-PControlRegister(FPCR)FormatA- 4 F-P Control Register (FPCR) Format{dl!++=AA-5 DecodablePseudo-OperationsA- 5 Decodable Pseudo-Operations}l4BB=@A-6Common ArchitectureOpcodesin NumericalOrderA- 6 Common Architecture Opcodes in Numerical Orderl/;;=@A-7OpenVMS UnprivilegedPALcode InstructionsA- 7 OpenVMS Unprivileged PALcode Instructions~l-99=AA-8OpenVMS PrivilegedPALcode InstructionsA- 8 OpenVMS Privileged PALcode Instructionsul(55=AA-9PALcodeOpcodesin NumericalOrderA- 9 PALcode Opcodes in Numerical Orderq\'22=AA-10Common Architecture InstructionsA- 10 Common Architecture InstructionsN\  =AB-1Frame AttributesB- 1 Frame Attributesxl*66=@B-2 DirectivesUsing Automatic AlignmentB- 2 Directives Using Automatic Alignment*af"O>MACRO-64 AssemblerforOOpenVMSAXPSystems OOH ReferenceManual]ONovember1993EOkThismanual describestheMACRO-64assembly language. 'ORevision/Update Information:'^Thismanual supersedesthe+^MACRO-64 AssemblerforOpenVMS)^`AXPSystems ReferenceManual'^(OrderNumber AA-PT9KA-TE).! ,kOSoftwareVersion:+^MACRO-64 AssemblerforOpenVMS$^AXPSystemsVersion1.1*O OperatingSystemandVersion:(^OpenVMSAXPVersion1.5or^higher)OsDigital Equipment Corporation!OMaynard, Massachusettss /! P O*OFirst printing,November1992"O Revised,November1993]ODigital Equipment Corporationmakesnorepresentationthattheuseofits^Oproductsinthemanner describedinthis publicationwillnotinfringeon`O?existingorfuturepatentrights,nordothe descriptions containedinthiscO publicationimplythegrantingoflicensestomake,use,orsell equipmentor;Osoftwarein accordancewiththe description.]O_ Possession,use,orcopyingofthesoftware describedinthis publication_Ois authorizedonlypursuanttoavalidwrittenlicensefromDigitaloran"O authorized sublicensor.RODigital Equipment Corporation1992,1993.&Allrights reserved.\OThe followingare trademarksofDigital Equipment Corporation:!AlphaAXP,UO\AXP,DEC, DECmigrate, DECwindows,Digital,OpenVMS,VAX,VAXMACRO,(OVMS,andtheDIGITALlogo.8O:The followingisa third-party trademark:YOOSF/1isa registered trademarkoftheOpenSoftware Foundation,Inc.:pZK6338LO7ThisdocumentwaspreparedusingVAXDOCUMENTVersion2.1.*S 9 O 1.2 IntroductionAOMACRO-64 AssemblerforOpenVMSAXPSystemsisanFOassemblylanguagefor programmingAlphaAXP computers.HOBSourceprogramswritteninMACRO-64are translatedintoJOobject(orbinary)codebytheMACRO-64 assembler,whichQOproducesanobjectmoduleand, optionally,alistingfile.*TheNOLfeaturesofthelanguageare introducedinthischapter,as=Owellas instructionstoinvokethe assembler.trJ?OTable2-1:7UsingTabStopsin StatementFields O OField4FColumnin4Which64FieldBeginsjTabStopstoReachColumn O OfLabel 4f1 f0OOperator9 1OZOperand17 Z2OComment41 5 O  h JOTable2-2:7Special CharactersUsedinMACRO-64 Statements O  CharacterF CharacterName-Function O  _3 Underscore Characterinsymbolnames. $5Dollarsign Characterinsymbolnames. . PeriodZ-  Characterinsymbolnames,currentlocationcounter,anddecimalpoint. :Colon#-Locallabel terminator. ::3DoublecolonGloballabel terminator. z=czEqualsignLocaldirect assignmentoperatorandmacrokeywordargumenttermina--tor.A= =ADoubleequalsign/-AGlobaldirect assignment operator. #2NumbersignxLiteralvalue indicator. @Atsign&- Arithmeticshift operator. ;/ SemicolonCommentfield indicator. u+QuPlussignUnaryplusoperatorand arithmeticaddition operator. Minussignor=hyphenZ-Unaryminus operator, arithmetic subtraction operator,andlinecontinu--=ation indicator. *Asterisk/- Arithmeticmultiplication operator. 0 /0 Slash)-0  Arithmeticdivision operator. &,  AmpersandLogicalAND operator. $ !$  Exclamationq point+-$ Logical inclusiveOR operator. \b  BackslashLogical exclusiveORandnumeric conversion indicatorinmacroargu--8 ments. ^H  CircumflexUnary operatorsandmacroargument delimiter., ()c,  Parentheses Displacementandregisterfield delimiterinan instructionoperand.8-y Argument delimitertoalexical operator. <>J AnglebracketsCArgumentor expressiongrouping delimiters.)_  O + Character Character+Name-+Function OF  ?QQuestionmarkCCreatedlocallabel indicatorinmacro arguments. ?'@? ApostropheMacroargument concatenation indicator. "4DoublequoteQuotedliteral delimiter. 3%L3PercentsignDelimitsthe beginningofalexical operator.(space)(tab)iSpaceortab Separatessource statementfields.#Spaceswithin expressionsareother--wiseignored. t,tCommaY-t Separatessymbolic argumentswithintheoperandfield."Multipleexpres-J-sionsintheoperandfieldmustbe separatedbycommas. O [w1O2.2B CharacterSetIOUWhencodingsource statements,youneedtobeawareofJOwhat charactersare acceptabletothe assembler,andhowIOthe assembler interpretsthem.*The followingnumbersand8O^ charactersareacceptedbythe assembler:G ` KThelettersofthe alphabet,AtoZ, uppercaseandlow-I(ercase.)Bydefault,the assemblerconvertsall lowercaseHlettersto uppercase.*Thismeansit considers lowercase6letters equivalentto uppercaseletters. 5HbThe assemblercanoperateinacase-sensitivemode.)InIcase-sensitivemode,the assemblerdoesnotconvertlow-Dercaselettersto uppercaseletters.,OnOpenVMSandBlOpenVMSAXPsystems,youcanselectcase-sensitiveAmodefromthecommandlinewiththe /NAMES=AS_IS qualifier. `  Thedigits0to9. ` .Thespecial characterslistedin@Table2-2.*@a?O2.4BQuotedLiteralsQOUAquotedliteralisastringof charactersenclosedindoublePOquotes( "" ).+Usethe following guidelineswhen specifying-O charactersinaquotedliteral:4!   ` KAny characterexceptnull,carriagereturn,andformfeed+(canappearwithinthestring. ` KToincludeadoublequoteor backslashinastring,you9mustprecedeitwitha backslash( \ ). ` CTospecifyan arbitrary character,youcanspecify " \xhh ",whereeach  h, representsasingle hexadecimal1digit.&Forexample:"AB\\CD\"EF\x47"zP=bThisstringcontainsthe following characters: AB\CD"EFGMOAlsonotethatthe assemblerdoesnotconvertthecaseof=O alphabetic characterswithinaquotedliteral.&ZOOQuotedliteralscanbe continuedoverseverallines.*UsetheOOhyphen( - )astheline continuation characteranddelimit;O5thestringwithdoublequotes.'Forexample:BO.ASCII%"Strings%are& delimited%with&double%quotes.">O.ASCII%"The% backslash%is%an%escape& character."HOI.ASCII%"Strings%can&be& continued%onto&multiple&lines&-&Ojust&as&any%other%line."@O.ASCII%"Use%two% backslashes%(\\)%to% represent%-#O!the% back-slash%itself."9Oi.ASCII% "Hexidecimal&escape% sequences%use&-/Olower%or%upper%X:%\x00&or&\X00"IO.ASCII%"Precede%a%double%quote%with%a& backslash%(\")&-!OAto%embed%the%quote." 4OTable2-3:7SummaryofUnary Operators O OFUnaryOOperatorFOperatorNameExample Operation O  O+Plussign+A3rResultsinthepositivevalueofA. OMinussign  AHrResultsinthenegative(two's complement)valueofA. O \ ValueofZEscapeY \symbol Indicatesthatthevalueofthesymbolshouldbeused.&InaKrZstringliteral, indicatesanescape sequence.!Forexample:r "Bob\X0A"O!^Aor^aRASCII3!^A/ABCD/v SpecifiesanASCII constant.O^Bor^bbBinaryG ^B11000111l Specifiesthat11000111isabinarynumber.O^Dor^dWDecimal^D1277r Specifiesthat127isadecimalnumber.O^Oor^o]Octal^O345r Specifiesthat34isanoctalnumber.]O^Xor^xW Hexadecimal~^XFCF9 SpecifiesthatFCF9isa hexadecimalnumber.&O^Cor^c] Complement^C24ErProducestheone's complementvalueof24 (decimal). O 5OTable2-4:7SummaryofBinary Operators O FBinary6OperatorOperatorNameExampleO Operation O  +Plussign[A+BAddition Minussign [A B Subtraction * Asterisk [ A * BMultiplication /Slash[A/BDivision@Atsign [A@B Arithmeticshiftz& Ampersand&[zA&BLogicalAND (product) ! ExclamationApoint![A!BLogicalOR(sum) \ Backslash)[A\BLogicalXOR (difference) O   & 2=O2.9BUnary OperatorsforTermsand ExpressionsOOUAunaryoperatormodifiesatermoran expressionandindi-POcatestheactiontobe performedonthattermor expression.IO Expressionsmodifiedbyunary operatorsmustbeenclosedJO^inangle brackets.,Youcanuseunary operatorstoindi-MOcatewhetheratermor expressionispositiveor negative.ROIfunaryplusorminusisnot specified,thedefaultvalueisLOhplus.)In addition,unary operatorsperformradix conversionOOandnumericcontrol operations,as describedinthe followingO sections.Table2-3, summarizestheunary operators.*a?b )8*O2.9.1BRadixControl OperatorsPORadixcontrol operators determinetheradixofatermorex-HO_ pression.*MACRO-64acceptstermsor expressionsinfourKO differentradixes:+binary,decimal,octal,and hexadecimal.+OThedefaultradixisdecimal.[B1OFORMATS O) ^Bnn^Dnn^Onn^Xnn  OnnUOAstringof charactersthatislegalinthe specifiedradix.(TheCOq followingarethelegal charactersforeachradix:   O0OFormatyRadixNameLegal Characters OOb^BnnBinaryb0and1O^DnnDecimal0to9OV^OnnOctalV0to74O^Xnn Hexadecimal~0to9andAtoF OMOYoucanincluderadixcontrol operatorsinthesourcepro-JOgramanywhereanumericvalueislegal.+AradixcontrolPO=operatoraffectsonlytheterm immediately followingit,caus-MOingthattermtobe evaluatedinthe specifiedradix..ForOexample:Os.WORDp ^B00001101s;%Binary&radixO.WORDp^D123&;%Decimal%radix% (default)O.WORDp^O47;%Octal%radix)OODonotplacespacesortabsbetweenthe circumflex(^),theJOradix specifier(B,D,O,orX),orthenumericvalue..O2.9.2BNumeric ComplementOperatorLO4The complementoperator( ^C )producestheone'scomple-*Omentofthe specifiedvalue.JB OFORMATO) ^CtermOtermRO#Anytermor expression.(Ifan expressionis specified,itmust,O|beenclosedinangle brackets.HOMACRO-64 evaluatesthetermor expressionasan8-byte:Oovaluebefore complementingit.'Forexample:5O.LONG^C^XFF;%Produces%FFFFFF00%(hex)O<.LONG^C25%<;%Produces% complement%of!;p25%(dec)%which%is;pFFFFFFE6%(hex)   wc!O2.10CBinary OperatorsNOUIncontrasttounary operators,binary operatorsspecifyac-NOtionstobe performedontwotermsor expressions.)YoucanPOenclose expressionsinanglebracketstospecifytheorderofO^ evaluation.^Table2-4-o^ summarizesthebinary operators.*!a?! IOAllbinary operatorshaveequal priority.-YoucangroupJOtermsor expressionsfor evaluationby enclosingtheminNO<angle brackets.&Theenclosedtermsand expressionsareeval-OOuatedfirst,and remaining operationsare performedfromleft#Otoright.'Forexample:$O.LONG1+2*3;%Equals%9&O.LONG1+<2*3>;%Equals%7WOONotethata64-bitresultisreturnedfromallbinaryoper-OOations.,Ifyouusethe64-bitresultinacontext requiringNO5lessthan64bits,onlythe lower-orderbitsoftheresultPOareused.,Ifthe truncationcausesalossof significanceinJOa data-storage directive,the assemblerdisplaysanerrorO>message.! NOThe followingsectionsdescribethe arithmeticshift,logicalPOAND,logical inclusiveOR,andlogical exclusiveOR operators. -O2.10.1C ArithmeticShiftOperatorPO4Usethe arithmeticshiftoperator( @ )toperformleftandQOright arithmeticshiftsof arithmetic quantities.(Thefirstar-SOgumentisshiftedleftorrightbythenumberofbit positionsNO=thatyouspecifyinthesecond argument.*Ifthesecondar-ROgumentis positive,thefirstargumentisshiftedleftandtheSO low-orderbitsaresettozero.'Ifthesecondargumentisneg-POGative,thefirstargumentisshiftedrightandthe high-orderRObitsaresettothevalueoftheoriginal high-orderbit(the$Osignbit).'Forexample:z}.LONGp^B101@4&};%Yields%1010000%(binary)z.LONGp1@2";%Yields%100&(binary)O A&=%4zU.LONGp1@A$U;%Yields%10000%(binary)z.LONGp ^X1234@-A;%Yields%123(hex)((O2.10.2CLogicalANDOperatorQO4ThelogicalANDoperator( & )takesthelogicalANDoftwo"O operands.'Forexample:OA&=%^B1010OYB&=%^B1100z.LONGpA&B#;%Yields&1000%(binary)I2O2.10.3CLogical InclusiveOROperatorUO4Thelogical inclusiveORoperator( ! )takesthelogicalinclu-5OsiveORoftwo operands.'Forexample:OA&=%^B1010OYB&=%^B1100z.LONGpA!B#;%Yields&1110%(binary)G2O2.10.4CLogical ExclusiveOROperatorMO4Thelogical exclusiveORoperator( \ )takesthelogical;O exclusiveORoftwo arguments.'Forexample:OA&=%^B1010OYB&=%^B1100z.LONGpA\B#;%Yields&0110%(binary)"!#p*O 3.2MACRO-64!Lexical" OperatorsFOThischapter describestheMACRO-64lexical operators.#"$3O3.1B ProcessingwithLexical OperatorsNOULexicaloperator processingis performedonallsourcelinesKOandmacro expansionlinesbeforeanyother assemblerpro-KOcessing.)Thus,macro invocations, assembler directives,andOO^ instructionsaresubjecttolexicaloperator processingbefore(Onormal assembler processing.F! MOLexical operatorsare recognizedand processedwithinstringJO literals.,Lexicaloperator processingis suppressedduringMO5macro registrationinorderthatlexicaloperator evaluationJOmayoccurduringmacro expansion.'Lexicaloperatorevalu-WOationisalso suppressedforarangeoftextthatis conditionallyPO>excludedwithoneofthe.IF directives.+In addition,lexicalGOoperator processingisnot performedwithinacomment. %$&S()>O3.3BNumericSymbolsandLexicalStringSymbolsNOULexicalstringsymbolsaresimilarinconceptandsyntaxtoAOnumericsymbols.+MACRO-64supportsnumericsymbols(Ousingthe followingsyntax:4O numeric_symbol_name=numeric_expression) KOMACRO-64supportslexicalstringsymbolsusingthefollow-Oingsyntax:>Ol string_symbol_name="anystringof characters"*GOThe assemblerdifferentiatesbetweennumericsymbolas-JOsignmentandlexicalstringsymbol assignmentasfollows:&+ ` HInalexicalstringsymbol assignment,aquotedstring9(literalmustappearaftertheequalsign. ` KAlexicalstringsymbolvalueis specifiedbythequotedstringliteral.,NSOThequotesarenotincludedinthevalueofthelexicalstringMOsymbol.*Youcannotusethesamenameforalexicalstring/O5symbol,numericsymbol,orlabel.>-JOLikenumericsymbols,lexicalstringsymbolsareassemblyNOtime variables.-Afteryouassignastringvaluetoalexi-QO5calstringsymbol,youcanreassigna differentvaluetothat+Osymbollaterinthe assembly..! MOYoucanuselexicalstringsymbolsas argumentstolexicalNO operators.*In particular,youcanusealexicalstringsym-VO5bolasanargumenttothelexical substitutionoperator( % )orNOthe%STRINGlexicaloperatorto substitutethevalueoftheTOlexicalstringsymbolatanypointinthetextofyourprogram.z(`46LOExample3-1:7Lexical ProcessingWithouttheEscapeOperator%BCODE_PSECT_NAME&=%"CODE1"A.MACRO& CODE_PSECT%#PSECT_NAME=%string(CODE_PSECT_NAME) .PSECT% PSECT_NAME.ENDM% CODE_PSECTb CODE_PSECT%CODE_PSECT_NAME&=%"CODE2" CODE_PSECTs)Y8/DOExample3-2:7Lexical ProcessingwithEscapeOperator%BCODE_PSECT_NAME&=%"CODE1"B.macro& CODE_PSECT%$PSECT_NAME=%%string(CODE_PSECT_NAME).psect% PSECT_NAME.endm% CODE_PSECTb CODE_PSECT%CODE_PSECT_NAME&=%"CODE2" CODE_PSECTK&%'d/:.O3.4BLexical SubstitutionOperatorQOUYoucanusethelexical substitutionoperatoratanypointinNOyourprogramtocausethe assemblerto substitutethevalueOOofalexicalstringsymbolforthenameofthesymbol.*TheNO^lexical substitutionoperatoristhepercentsign(%).+PlaceROthelexical substitutionoperatortotheleftandrightoftheQOnameofthelexicalstringsymbolthatyouwishto subsitute,Ohasfollows:O %lexsym_name%0OForexample:/ HORSES=&"All%the&king's%horses" PMEN$P=&"all%the&king's%men"( .print% "%HORSES%%and&%MEN%"1! HOThisexampledefinestwolexicalstringsymbols:+HORSESLOandMEN.Thethird statementdisplaysamessageatassem-RO5blytime.*Thetextofthemessage specifiesthatthevalueofJOtheHORSESandMENlexicalstringsymbolsbe substitutedLOas indicated.,Afterlexical processing,thethird statementO>appearsas:H .print%"All&the%king's%horses&and%all%the&king's%men"+< 2OExample3-3:7UsingLexical Operators@zB;%Macro%to%load%a&general%or%floating%register%z.macro%LOAD&REG%LOCATIOND;&If&the%location%doesn't&specify%a%base& register,D;;&load%relative%to%the& procedure% descriptor&PD&off;&of&R27.?.if%lt,& %locate(<(>,% LOCATION),&%length(LOCATION)&;%base&register& specified[LOC&=% "LOCATION".else+;%base&register&not% specified$3LOC&=%"LOCATION-PD(R27)"{.endc>;&Use%LDQ%if%a%general&register&is& specified8,.if%ne,& <%type(REG)&&%MACRO64$TYPE_GENREG>tLDQpREG,%string(LOC).else?%;%Use%LDx&if&a%floating%register%is% specified7m.if&ne& <%type(REG)&&%MACRO64$TYPE_FLTREG>7:;%Use&the% appropriate%LDx%floating%load7:;% depending&on&the%first%letter%of%the :E;%location%to%load.:FTYPES%=&"FGST"9:.if%ge,%"%locate(%extract(0,1,LOC),FTYPES),%-%length(FTYPES)e.error%-="Unknown%floating%data&type:&%extract(0,1,LOC)".mexit:< .endc4: LD%extract(0,1,LOCATION)%REG,%string(LOC) .else: .error%-I\ "First%argument%must%be%a&general%or%floating% register" .endc .endcz4 .endm&LOADz| .psect%D,noexe9O pd:.procedure_descriptor%my_routine,my_entry8z ;%Fill%in% procedure% descriptor% details...OT  BUILD_TIME:z .asciz_  "%time()"O K:.quad_ %repeat(9,<42,>)42$O, GPI: .g_floatingK3.14159'Ot CIRCLE:&.address FAC_CIRCLEO TX=%0OTY=%8OLTRADIUS&=%16z.psect%X,exeO MY_ENTRY:z#LOADKR1,KzkLOADK R2,CIRCLEzLOADKF13,TRADIUS(R2)zLOADKF11,GPIzCLOADKF10,KzLOADKKA,'= DOExample3-4:7Source StatementsAfterMacro Expansionz.psect%D,noexe9OXpd:.procedure_descriptor%my_routine,my_entry8z;%Fill%in% procedure% descriptor% details...O BUILD_TIME:z0.asciz"_0"& 9-JUL-1992% 17:56:20"OxK:.quad'_x42,42,42,42,42,42,42,42,42,42$OGPI: .g_floatingK3.14159'OCIRCLE:&.address FAC_CIRCLEOOTX=%0OTY=%8OTRADIUS&=%16z'.psect%X,exeOo MY_ENTRY:zLDQp R1,K-PD(R27) zLDQpR2,CIRCLE-PD(R27)zGLDTpF13,TRADIUS(R2)zLDG%F11,GPI-PD(R27)5z.error%"Unknown%floating%data&type:&K"Qz.error%"First%argument%must%be%a&general%or%floating% register"E' &*2 2(O3.5BLexicalEscapeOperatorVOUItispossibletodeferthe processingofalexicalstringopera-ROtorbyusingthelexicalescape operator,whichisthepercentVOsign( % ).(Sincealllexicalstring operatorsbeginwithaper-QO^centsign,theeffectofplacingtwopercentsignsbeforetheOOnameofthelexicalstringoperatordefersthe evaluationofOOthelexicalstring operator.*Ifyouwanttodefer processingQOhofalexical substitution operator,placetwopercentsignstoWOtheleftandtwopercentsignstotherightofthelexicalstringOsymbolname.=3 QOThiscanbeusefulwhenyouwantthe evaluationofalexicalOOstringoperatorthatyouhaveusedinadefaultmacroargu-JO5menttooccurduringmacro expansion,ratherthanduringKOmacro definition.*Lexicaloperator processingis suppressedKOduringmacro registration.* Therefore,lexicaloperatorpro-PO>cessingis automaticallydeferredwithinthebodyofamacro.JOHowever,the.MACRO directivelinethatbeginsthemacroMO definitionissubjecttonormallexicaloperator processing.POH SometimesyoumayneedtousethevalueofalexicalstringLOsymbolasthedefaultforamacro argument,butyouneedROtousethevalueofthelexicalstringsymbolthatiscurrentIORwhenthemacroexpands,notwhenthemacroisdefined.OExample3-1DCshowsanexampleofthis,butitdoesnotuseanOescape operator.*3OmO45dOExample3-1the PSECT_NAME7argumentwillbesettoCODE1,; not%string(CODE_PSECT_NAME).,Thisisbecause<c%string(CODE_PSECT_NAME)is evaluatedwhentheB CODE_PSECTmacroisdefined,notwhenitexpands.7OExample3-2Hissimilarto Example3-1exceptitusesthe$Olexicalescape operator.*7OFO8*7 FO4}9SOExample3-2=C processes correctlyforthe followingreasons:*9OMO8:$ # ` FLexicaloperator processingof%%string(CODE_PSECT_NAME)B(isdeferredwhenthe CODE_PSECTmacroisdefined.AThedefaultvalueforthe PSECT_NAMEargumentis/storedas%string(CODE_PSECT_NAME). `Y =YDuringmacro expansion,%string(CODE_PSECT_NAME)Jis evaluated,whichresultsinthecurrentvalueofthe@ CODE_PSECT_NAMElexicalstringsymbolasdesired..?k i6OTable3-1:7SummaryofMACRO-64Lexicals O OLexicalFReturnTypeFunction O HO%EDITStringLexicaloperatorforeditingtextstrings.iO%ELEMENT1StringLexicaloperatorfor extractinganelementfromalistof elements.vO %EXTRACT6StringLexicaloperatorfor extractingarangeof charactersfromastringofcharac-Zters.mO%FREGStringLexicaloperatorfor obtainingthefloating-pointregisternumber associated!withasymbol.sO%INTEGERADecimalLexicaloperatortoconvertthevalueofan expressiontoadecimalvalue.oO%IREGStringLexicaloperatorfor obtainingtheintegerregisternumber associatedwithabsymbol.\O%LENGTH[DecimalLexicaloperatorfor determiningthelengthofastring.xOV%LOCATEfDecimalLexicaloperatorforlocatingastringoftextwithinaanotherstringoftext.RO%REPEATkStringLexicaloperatorfor repeatinga specifiedstring x numberoftimes.iOI%STRINGqStringLexicaloperatorfor obtainingthevalueofalexicalstringsymbol.jO%TIMEStringLexicaloperatorfor obtainingthedateandtimeoftheassemblyunit.YO=%TYPEDecimalLexicaloperatorfor obtaining informationaboutaname. Oc *'-z;wP(O3.6BUsingLexical Operators>OUThis section contains two programming! examples.OExample3-3:Gshowssource statementsusinglexicaloper-Oators.7Example3-45-showsthesamesource statementsafter?O^macro expansionandlexicaloperator processing.*;OpO<*;7O=-*/> !O3.7BLexical OperatorsMO(Thissection describestheMACRO-64lexical operators,their1Oreturnvalues,andtheir arguments.Table3-1liststhelexi-POcalsandgivesabriefsummaryoftheir functions.'AdecimalLO1returnvalueresultsinthedecimaldigitsofthenumericAOvaluebeing substitutedforthelexical operator.*>Ca?? / -09@O%EDIT*AcB99OLexicaloperatorforeditingtextstrings.\C2OFormat"Os %EDITN(string1,string2)D=O ArgumentsOsstring1ROThefirst argument,oftypestring, specifiesthestringtobeO$edited.E Ostring2VO(Thesecond argument,oftypestring, specifiesalistofeditsto6Operform,whichare separatedbycommas.F! O DescriptionIOs%EDITismodeledaftertheOpenVMSDCLlexicalfunctionTOF$EDIT.Itisusedtoperformoneormoreeditsona specifiedOO$string.'%EDIT processesthestringof argumentsfromlefttoKO|right.'%EDITgives precedencetothelast argument.'%EDIT,&)"FAfterlexical processing,the statementapearsasthe following:.PRINT% "FREDSMITH"J! )Example26#.PRINT%$"%EDIT(,)6k.PRINT%$"%EDIT(,)IThefirstsource statementproducesthestring "abcdefg"D_andthesecondsource statementproducesthestringN "ABCDEFG".&Eachoftheeditsintheeditlistis performed/in sequence,fromlefttoright.z0 /1<KO%ELEMENT*LMA_OOLexicaloperatorfor extractingelementsfromalistofele-O(ments.gN=OFormat-Os %ELEMENTN(integer,string1,string2)O =O ArgumentsOsintegerQOThefirst argument,oftypeinteger,istheelementnumberto7O$extract.'Thefirstelementisnumber0.POstring1KO(Thesecond argument,oftypestring,isthe delimiteror/O delimitersthatseparate elements.QAaOstring2PO(Thethird argument,oftypestring,isthelistof elements.R O DescriptionBOs%ELEMENTismodeledaftertheOpenVMSDCLlexicalGOfunction F$ELEMENT.ItisusedtoextractoneelementHO$fromastringof elements.*Notethatunlike F$ELEMENT,OO|youmayspecifymultiple delimiters.(Theresultisthespec-JOifiedstringelement..Ifthe specifiedelementnumberisRO-greaterthanthenumberofelementsinthelist,the delimiter!Oargumentis returned.S{ OExampleC.PRINT% "%ELEMENT%(2,&<+-*/>,%JOE+FRED-TOM*BILL/ERIC)"COAfterlexical processing,the statementappearsas:.PRINT%"TOM"1 02<TO%EXTRACT*UVApOOLexicaloperatorfor extractingarangeof charactersfroma!O(stringof characters.hW>OFormat.Os %EXTRACTN(integer1,integer2,string)X=O ArgumentsOsinteger1SOThefirst argument,oftypeinteger,istheoffsetatwhichtoLO$beginthe extraction.'Thefirst characterisatoffset0.Y}Ointeger2IO(Thesecond argument,oftypeinteger,isthenumberof"O characterstoextract.ZOstringPO(Thethird argument,oftypestring,isthestringfromwhich'Otoextractthe characters.@[ O Description>Os%EXTRACTismodeledafterVAXMACRO's%EXTRACTIOmacrostringoperatorandtheOpenVMSDCLlexicalfunc-IO$tion F$EXTRACT.%EXTRACTisusedtoextracta specified1O|rangeof charactersfromastring.\OExample2b.PRINT% "%EXTRACT(3,4,ABCDEFGHIJKLMNOP)"COAfterlexical processing,the statementappearsas:.PRINT%"DEFG" 2139]O%FREG*^_AxJOLexicaloperatorfor obtainingthefloating-pointregister.O(number associatedwithasymbol.S`)OFormatOs %FREGM(symbol)aOArgumentOssymbolOOThesingle argument,oftypestring, specifiesasymbolthatJO$mayormaynotbe currentlydefinedasafloating-pointO|registersymbol.b=O DescriptionGOs%FREGreturnsthedecimalnumberofthefloating-pointOOregisterwhenthe specifiedsymbolisdefinedasa floating-CO$pointregistersymbol.' Otherwise,%FREGreturns32.c VOExample.ib;%Is%TARG_REG%the%same%as%F31?3i.IF&EQ,%<%FREG(TARG_REG)>,% <%FREG(31)>MOEIfTARG_REGhasbeendefinedasfloating-pointregisterF5,KOthe statementsappearasfollowsafterlexical processing:.i";%Is%TARG_REG%the%same%as%F31?ij.IF&EQ,%<5>,&<31>324<dO%INTEGER*efAlPOLexicaloperatorfor convertingthevalueofan expressiontoO(adecimalvalue.Wg-OFormatOs %INTEGERM (integer)h=OArgumentOsintegerQOThesingle argument,oftypeinteger,isthe expressiontobeO$ converted.i iO DescriptionBOs%INTEGERismodeledaftertheOpenVMSDCLlexicalIOfunction F$INTEGER.ItisusedtoconvertthevalueofOO$an expressiontoadecimalvalue.+TheresultisitsdecimalLO|value.(Youcanalsouse%INTEGERtoconverta relocatable.O expressiontoanabsolutevalue.jOExample*b.PRINT% "%INTEGER% (<*17>)"QOAfterlexical processing,ifXhasthevalue3,the statementOVwillappearas:.PRINT%"170"4359kO%IREG*lmAqKOLexicaloperatorfor obtainingtheintegerregisternumber&O( associatedwithasymbol.Sn)OFormatOs %IREGN(symbol)oOArgumentOssymbolOOThesingle argument,oftypestring, specifiesasymbolthatNO$mayormaynotbe currentlydefinedasanintegerregisterO|symbol. p=O DescriptionJOs%IREGreturnsthedecimalnumberoftheintegerregisterNOwhenthe specifiedsymbolisdefinedasanintegerregister2O$symbol.' Otherwise,%IREGreturns32.uqKOExample,ib;%Is%SRC_REG&the%same&as&SP?2i.IF&EQ,%<%IREG(SRC_REG)>,% <%IREG(SP)>KOEIfSRC_REGhasbeendefinedasintegerregisterR16,theFO statementsappearasfollowsafterlexical processing:,i";%Is%SRC_REG&the%same&as&SP?ij.IF&EQ,%<16>,%<30>Y546;rO%LENGTH*sttJJOLexicaloperatorfor determiningthelengthofastring.Uu+OFormatOs %LENGTHN(string)v =OArgumentOsstringQOThesingle argument,oftypestring,isthestringfromwhich,O$thelengthistobe computed.w UO Description)"COAfterlexical processing,the statementappearsas:.PRINT%"19"657;yO%LOCATE*z{AkPOLexicaloperatorforlocatingastringoftextwithinanotherO(stringoftext.^|4OFormat$Os %LOCATEN(string1,string2)}=O ArgumentsOsstring1OOThefirst argument,oftypestring,isthestringforwhichO$%LOCATE searches.~Ostring2OO(Thesecond argument,oftypestring,isthestringinwhich%Othesearchis performed.s IO Description)touch&that%button!"COAfterlexical processing,the statementappearsas:E.PRINT%"Never,&ever,&ever,&ever,&touch&that%button!"879;O%STRING*A`OOLexicaloperatorfor obtainingthevalueofalexicalstringO(symbol.U+OFormatOs %STRINGM(string)T*OArgumentOsstringMOThesingleargumentisoftypestring.,IftheargumentisQO$thenameofthelexicalstringsymbol,thevalueofthelex-LO|icalstringsymbolis returned.* Otherwise,theargumentisOreturned unchanged. O DescriptionHOs%STRINGismodeledaftertheOpenVMSDCLlexicalfunc-HOtion F$STRING.%STRINGis generallyusedtoobtaintheSO$valueofalexicalstringsymbol,butyoucanuseitwithanyLO|string argument.)Thelexical substitutionoperator described OinSection3.4)Bperformsasimilar function.*|?/OExample,bFOO%=&"All%the&king's%horses" .PRINT%"%STRING(FOO)"COEAfterlexical processing,the statementappearsas:,.PRINT%"All&the%king's%horses"; h(OTable3-2:8%TYPE Attributes O OFSymbolicNameF Attribute Ob BOMACRO64$TYPE_SYMBOLNameisanumericsymbolname.OEMACRO64$TYPE_PROC_ODESC3ENameisa procedure descriptorname.OMACRO64$TYPE_LABELNameisalabel.OMACRO64$TYPE_GENREGNameisageneral register.?O_MACRO64$TYPE_FLTREGNameisafloating register. O 98:9O%TIME*AcJOLexicaloperatorfor obtainingthedateandtimeoftheO(assemblyunit.O%OFormatOs %TIMEN( )mCO DescriptionFOs%TIMEismodeledaftertheOpenVMSDCLlexicalfunc-NOtionF$TIME.%TIMEisusedtoobtainthetimeanddateofNO$theassemblyunit.)Thereareno arguments.)TheresultisaLO|string specifyingthedateandtimeoftheassemblyunit.OExampleb.PRINT% "%TIME()"COAfterlexical processing,the statementappearsas:*.PRINT%"& 8-OCT-1991% 13:17:57" :9<9O%TYPE*sIIOLexicaloperatorfor obtaining informationaboutaname.Q'OFormatOs %TYPEN(name)=OArgumentOsnameJOThesingleargumentisoftypename.+ Informationisre-AO$turnedaboutthename specifiedinthe argument. ~O DescriptionFOs%TYPEismodeledaftertheOpenVMSDCLlexicalfunc-HOtionF$TYPE.%TYPEisusedtoobtain informationaboutKO$aname.*Thevaluereturnedisanumericvaluewithcer-OO|tainbit positions,either0or1, dependingonwhethertheMO specifiednamehasthe corresponding attribute.(As describedNO- elsewhere,thedecimaldigitsofthenumericvaluearesub-7Ostitutedforthe%TYPElexical operator. Table3-2showstheGOsymbolicnamesthatare predefinedforeach attribute.* Ia?tJJOAgivennamemayhavezero,one,orseveral attributes.OExampleb.macro%IS_GR%ARG;.IF&equal,% %TYPE(ARG)&&%6.PRINT%"ARG&is&not%a&general% register":.ENDC.endm&IS_GRIS_GR&F11OO Initially,thefirstlineoftheIS_GRmacroexpandsastheO following:;.IF%equal,% <%TYPE(F11)%&%MACRO64$TYPE_GENREG>!xCOAfterlexical processing,the statementappearsas:5.IF%equal,%<8192%&%MACRO64$TYPE_GENREG>POInthisexample,8192isthe attributevaluefora floating-KOpoint register.,Thisvaluecouldchangein subsequentre-JO5leases.+Useonlythe predefined attributemasks described OinTable3-2.:SSincethe attributeforageneralregisterAOMACRO64$TYPE_GENREGis4096,the expressionevalu-O>atesas0.(<8192&&%MACRO64$TYPE_GENREG>*Pe?*>=? %O4.2BUsingDefaultValuesQOUDefaultvaluesarevaluesthataredefinedinthemacrodefi-MOnition.(Theyareusedwhennovalueforaformalargument.Ois specifiedinthemacrocall.IODefaultvaluesare specifiedinthe.MACRO directiveasOfollows:0Ol formal-argument-name= default-valueLOAnexampleofamacro definition specifyingdefaultvaluesOfollows:1Oa.MACROKSTOREpARG1=12,ARG2=0,ARG3=1000O.LONGpARG1O.WORDpARG3O9.BYTEpARG2O.ENDMpSTORE MOThe followingthreeexamplesshowpossiblecallsandexpan-5Osionsofthemacrodefined previously:OaSTORE$a;&No& arguments%suppliedO.LONGp12O.WORDp1000O9.BYTEp0OSTOREp,5,X+;&Last%two& arguments%suppliedO.LONGp12O2.WORDpXOz.BYTEp5OSTOREp1&;&First&argument&suppliedO+.LONGp1Os.WORDp1000O.BYTEp0I?>@ )(O4.3BUsingKeyword ArgumentsLOUKeyword argumentsallowamacrocalltospecifytheargu-ROmentsinanyorder.'Inthiscase,themacrocallmustspecifyJOthesameformalargumentnamesthatappearinthemacroFO^ definition.+Keyword argumentsareusefulwhenamacroLO definitionhasmoreformal argumentsthan necessaryintheOcall.KSOInanyonemacrocall,itisgoodpracticetospecifythear-KOgumentsaseitherall positional argumentsorallkeywordFO5 arguments.-Forexample,the followingmacro definition&O specifiesthree arguments:'O.MACROKSTOREpARG1,ARG2,ARG3OZ.LONGpARG1O.WORDpARG3O.BYTEpARG2O2.ENDMpSTOREEOThe followingmacrocall specifieskeyword arguments:.OSTOREpARG3=27+5/4,ARG2=5,ARG1=SYMBLOP.LONGpSYMBLO.WORDp27+5/4O.BYTEp5! NQOBecausethekeywordsare specifiedinthemacrocall,thear-SOgumentsinthemacrocallneednotbegivenintheorderthey3O5werelistedinthemacro definition.HO Positionalandkeyword argumentsmaybemixed.)Usually,IO positional argumentsareplacedbeforekeyword arguments.O5Forexample:.O.MACROKSTOREpARG1,ARG2,ARG3=27+5/4O.LONGpARG1OI.BYTEpARG2O.WORDp27+5/4O.ENDMpSTORE [_U^Note [_AKeyword argumentsarenotcountedwhen positionalA; argumentsareparsed.)Thismeansthatwhenposi-Ctionalandkeyword argumentsareusedinthesameFmacro,oneargumentcanbe specifiedtwice.(Thelast9Evalue specifiedfortheargumentisused. T%@?A )'O4.4BUsingString ArgumentsOOUIfanactualargumentisastring containing charactersthatPOthe assembler interpretsas separators(suchasatab,space,OOorcomma),thestringmustbeenclosedby delimiters.(StringHO^ delimitersformacro argumentsareusuallypairedangleNObrackets(<>).'Aquotedliteralenclosedindoublequotes( ]"" )/Oisalsoavalidstring argument.6  _OThe assembleralso interpretsany character(exceptA,B,C,D,O,orX)POafteraninitial circumflex( ^ )asa delimiter.-NotethatRO5^B,^D,^O,and^Xareusedasradixcontrol operatorsratherMOthanargument delimiters.)^AisusedastheASCIIoperatorPOand^Cisusedasthe complement operator.'TopassanangleQO>bracketaspartofastring,youcanusethe circumflexformOofthe delimiter.[1IOThe followingareexamplesof delimitedmacro arguments:*O*OqKO"A%quoted%literal%is%taken%as%a&single% parameter%value."2OD ^%ARGUMENT&IS& %FOR%CALL%(O ^?EXPRESSION%IS% <5+3>*<4+2>?8 ROInthelasttwo examples,theinitial circumflex indicatesthatUOthepercentsign( % )andquestionmark( ? )arethedelim-RO5iters.(Notethatonlythe left-hand delimiterisprecededbyaO circumflex.WLOThe assembler interpretsastringargumentenclosedbyde-MOlimitersasoneactualargumentand associatesitwithoneKO5formal argument.)Ifastringargumentthatcontainssepa-OOrator charactersisnotenclosedby delimiters,the assemblerPO interpretsitas successiveactual argumentsand associatesit.O>with successiveformal arguments.RLOForexample,the followingmacro definitionhasoneformalO argument:%Oa.MACRO% DOUBLE_ASCII&STRNGO.ASCIIK"STRNG"O.ASCIIK"STRNG"O9.ENDMp DOUBLE_ASCIIs IKOThe followingtwomacrocalls demonstrateactual arguments)Owithandwithout delimiters:'Oa DOUBLE_ASCII%!O.ASCIIK"A&B%C%D&E"!O.ASCIIK"A&B%C%D&E"%OZ DOUBLE_ASCIIKA%B%C&D%EGO%MACRO64-E-TOOMNYARGS,&Too%many& arguments%in%macro%call NNONotethatthe assembler interpretsthesecondmacrocallasMOhavingfiveactual argumentsinsteadofoneactualargumentO5withspaces.r HFOWhenamacroiscalled,the assemblerremovesnormalQO delimitersaroundastringbefore associatingitwiththefor-GO5mal arguments.-However,aquotedliteralwithindoubleUOquotesistreatedasasingletokenandretainsitsdoublequoteO delimiters.`UOIfastringcontainsa semicolon( ; ),thestringmustbeen-NOclosedby delimiters; otherwise,the semicolonwillmarktheQO5startofthecommentfield.)Further,ifthestringcontainsaRO semicolon,youcannotcontinuethelineunlessthestringisaOquotedliteral.KOYoucannestmacro invocations,thatis,amacrodefini-QOtioncancontainacalltoanothermacro.)If,withinamacroRO5 definition,anothermacroiscalledandispassedastringar-KOgument,youmustdelimittheargumentsothattheentireHOstringispassedtothesecondmacroasone argument.{ QGOThe followingmacro definitioncontainsacalltothe0O DOUBLE_ASCIImacrodefinedearlier:*za.MACROCNTDA%LAB1,LAB2,STR_ARG#OLAB1:p.BYTE LAB2-LAB1-1!o;&Length%of%2*string! DOUBLE_ASCIIp &9;&Call% DOUBLE_ASCII&macroOLAB2:z.ENDMCNTDA! WMONotethattheargumentinthecallto DOUBLE_ASCIIisen-POclosedinanglebracketseventhoughitdoesnotcontainanyIO5 separator characters.*Theargumentisthus delimitedbe-QOcauseitisaformalargumentinthe definitionofthemacroJOCNTDAandwillbereplacedwithanactualargumentthat.O>maycontain separator characters.qGGOThe followingexamplecallsthemacroCNTDA,whichin0Oturncallsthemacro DOUBLE_ASCII:,OaCNTDAJ ST,FIN,OST:.BYTEpFIN-ST-1,z DOUBLE_ASCII%&z9.ASCIIJ"LEARN&YOUR%ABC'S"&z.ASCIIJ"LEARN&YOUR%ABC'S"OFIN: MOInadditiontonestedmacro invocations,youcanalsonestNOmacro definitions.(Thatis,youcandefineonemacrowithinCO5another.(Inthisexample,theINNER_MACRO_DEFmacroBOisnotdefineduntiltheOUTER_MACRO_DEFmacrois!Oinvokedand expanded:!zk.macro%OUTER_MACRO_DEF!.macro%INNER_MACRO_DEF ... B.endm%INNER_MACRO_DEF z.endm&OUTER_MACRO_DEF}ISPOYoucanusethis capabilitytodefineamacrothat redefinesOitself:za.macro%SETUPA&=%75B&=%929C&=%87D&=%0E&=%-12F&=%42Y.macro%SETUP,;%Setup%is%done&-%do%nothing.endm%SETUPz0.endm&SETUP! %GOInthisexample,theSETUPmacrodefinesanumberofHOassembly constants.*AftertheSETUPmacrohasbeenex-NO5pandedonce,itsworkisdone.) Subsequent expansionsoftheMOsetupmacroneednottakeanyaction.' Therefore,theSETUPLOmacro redefinesitselftoamacrowhose expansionincludesLO>onlyacomment statement.&As described elsewhere,whenyouPOredefineamacro,theoriginalversionofthemacroisauto-MO maticallydeleted.*Ifthatmacrois currently expanding(asMOHwouldbethecasewiththepreviousSETUPmacro),thenewJO definitionis immediately associatedwiththemacroname.POHowever,theold definitionisretaineduntilallpendingex-GORpansionscomplete normally.*Whenallpending expansionsPO complete,theoldversionofthemacroisdeleted.*Thus,theIOSETUPmacromaybeinvokedanynumberoftimesinthePO[assemblyunit.*Sincethefirst expansion redefinesitself,theMO expansionoftheSETUPmacrohasnoeffectotherthanthe'O firsttimeitisinvoked.; OOAnotherwaytopassstring argumentsinnestedmacrosisto@Oenclosethemacroargumentinnested delimiters. ^MBaNOTE ^M?Eachtimeyouusethe delimitedargumentinaE>macrocall,the assemblerremovesthe outermostpairIof delimitersbefore associatingitwiththeformalar-Bgument.(Thismethodisnot recommendedbecauseitGHrequiresthatyouknowhowdeeplyamacroisnested. o EMOThe followingmacro definitionalsocontainsacalltotheO DOUBLE_ASCIImacro:+Ta.MACROKCNTDA2%LAB1,LAB2,STR_ARG#OLAB1:J.BYTEp LAB2-LAB1-1!;&Length%of%2*stringT DOUBLE_ASCIIKSTR_ARG&;&Call% DOUBLE_ASCII&macroO9LAB2:T.ENDMpCNTDA2 uMONotethattheargumentinthecallto DOUBLE_ASCIIisnot(Oenclosedinangle brackets. y=OThe followingexamplecallsthemacroCNTDA2:8TCNTDA2&BEG,TERM,<>!OPBEG:p.BYTEp TERM-BEG-1!P;&Length%of%2*string3T DOUBLE_ASCIIK&T;%Call& DOUBLE_ASCII%macro-T(.ASCIIK"MIND%YOUR&P'S%AND%Q'S"-Tp.ASCIIK"MIND%YOUR&P'S%AND%Q'S"OTERM:L"HONotethateventhoughthecallto DOUBLE_ASCIIintheSOmacro definitionisnotenclosedin delimiters,thecallintheKO5 expansionisenclosedbecausethecalltoCNTDA2containsactualargumentfortheformal argument.RJOThe followingexampleisamacro definition specifyinga$Ocreated temporarylabel:za.MACROJPOSITIVEaARG1,?L1zBGEARG1,L1zNEGQ ARG1,ARG1O9L1:.ENDMPOSITIVE,LOThe followingthreecallsand expansionsofthemacrode-KOfined previouslyshowbothcreated temporarylabelsanda)O5 user-defined temporarylabel:zPOSITIVEKR0zBGE R0,30000$zINEGQR0,R0O30000$:zPOSITIVEKR5zBBGE R5,30001$zNEGQR5,R5O30001$:z;POSITIVEKR7,10$zBGER7,10$zNEGQR7,R7O10$:~T=OFormore informationon temporarylabels,seeSection2.6.*F{?&DCE  e-O 5.2MACRO-64! Assembler" DirectivesJOMACRO-64 directivesenableyoutocontrolcertainaspectsLOoftheassemblyprocess.'Thischapter describestheMACRO-MOB64 assembler directives.*It describesthevarious functionalQO categoriesof directives,aswellasadetailed descriptionofROeach directive.)Italso discussestheeffectsof automaticdata/OL alignmenton assembler directives." H /BOTable5-1:7SummaryofGeneral Assembler Directives O OKCategoryK Directives /1KPsect Application Of .OListingcontrol directives.TITLE .SUBTITLE(.SBTTL)k.IDENT.LIST.NLISTS.SHOW.NOSHOW.PAGE All.OhMessagedisplay directivesP.PRINT.WARN.ERROR hAll#O| Assembleroptiondirec-Otives|.ENABLE(.ENABL).DISABLE(.DSABL) |All)OD Data-storage directives.BYTE.WORD .SIGNED_BYTE, .SIGNED_WORDz.LONG.ADDRESS .CODE_ADDRESSb.LOCAL_CODE_ADDRESS.OCTA.QUADK .ASCII .ASCIC .ASCID3 .ASCIZ  .F_FLOATING(.FLOAT)   .D_FLOATING (.DOUBLE)  .G_FLOATINGi  .S_FLOATING  .T_FLOATINGDNOEXE(orMIX)0  .INSTRUCTION0 EXE(orMIX)/O Locationcontrol directives[.ALIGN  .BEGIN_EXACTE  .END_EXACT  All O  O 1FmThe alternateform,ifany,isgivenin parentheses. = O OCategory Directives 1Psect Application O .EVEN.ODD9.BLKA.BLKB.BLKD!.BLKFo.BLKG.BLKL .BLKOW.BLKQ.BLKS.BLKT@.BLKWPNOEXE(orMIX)%OProgram sectioningdirec-Otives.PSECT .SAVE_PSECT(.SAVE)T.RESTORE_PSECT (.RESTORE) All3OSymbolcontrol directives .DEFINE_FREGi .DEFINE_IREG .EXTERNAL(.EXTRN) .UNDEFINE_REGR.WEAK All&O ConditionalassemblyblockO  directives .IF  .IF_FALSE(.IFF)f .ENDC .ELSE .IF_TRUE(.IFT)!O .IF_TRUE_FALSE(.IFTF) .IIF AllO Source inclusion .INCLUDE  AllO Linkagecontrol .BASE .END+  .LINKAGE_PAIRx .LOCAL_LINKAGE_PAIR .PROCEDURE_DESCRIPTOR .LOCAL_PROCEDURE_a  DESCRIPTOR  All  All+ NOEXE(orMIX)x NOEXE(orMIX) O  O 1FmThe alternateform,ifany,isgivenin parentheses. O7  I; G5OTable5-2:7SummaryofMacro Directives O OCategoryK Directives x1F ApplicationinEXEorNOEXEPsects O OMacro definitionOf directivesK.MACROKf.ENDMK.LIBRARYK.MCALL All!O{Macrodeletiondirec-OtiveK{.MDELETE {All(OBMacroexit directive.MEXIT BAll5ORepeatblock directivesC.REPEAT(.REPT)K .IRPKW.IRPCK.ENDR All$OCounting directive.NARGKl.NCHR All O  O1FmThe alternateform,ifany,isgivenin parentheses. OA FEG  )O5.2B AutomaticData AlignmentIOUThe assemblercan optionallyalignyourdataonnaturalPO boundaries.(Whiledisabledbydefault,thisfeatureisenabledAOwiththe/ALIGNMENT=DATA command-line qualifieror4O^the.ENABLE ALIGN_DATA directive.)(See^Section1.2 -^andOSection5.3.)A"AnaturalboundaryisanaddressthatisevenlyQO divisiblybythesizeofthescalardatatypebeing accessed.FOhTheMACRO-64 automaticdata alignmentfeaturecanau-HO tomaticallyalignword, longword, quadword,andoctawordJOdatatoanatural boundary.- AccessingdataonanaturalLOrboundarycanbe significantlyfasterthanan unalignedac-NOcess.'Formore informationon accessingdataonalignedand*O# unaligned boundaries,seethe(# Alpha Architecture ReferenceO{ Manual o{.*!|?*Oz}? FOWhentheMACRO-64 automaticdata alignmentfeatureisLOenabled,the assembler automaticallyalignsall data-storageMO5 directivestoanatural boundary.)Toachieve alignment,theLO assemblerpadswith0bytesas necessarybefore allocatingOOthestorageforthedata directive.+LabelsthatoccurbeforeNO>the data-storage directivearedefinedtobetheaddressofMOthedatastorageafter alignment.(Formore information,seeOSection2.7.1.*;The directive descriptionsinBSection5.3indicateMOHthose data-storage directivesthatareaffectedby automaticOdata alignment.*O?*B|?GFJx NO5.3B DirectivesMOUThegeneral assembler directivesprovide facilitiesforper-0Oformingeleventypesof functions.,Table5-1liststhesetypesMOof functionsandtheir directives.+Some directivesareonlyJO^ applicablewithindatapsects(psectswiththeNOEXEandGONOMIX attributes).-Other directivesareonly applicableHOwithincodepsects(psectswiththeEXEandNOMIXat-LOh tributes).-All directivesare applicablewithinpsectsthatNOcontaineitherdataandcode,orboth(psectswiththeMIXKO attribute).(For informationontheMIX assembly-timepsectMOrandany associated restrictions,seethe descriptionofthe/O.PSECT directiveinthischapter.*,pa?tOTable5-1?showshoweach directivecanbeappliedwithin!Odataorcodepsects.*OFc?qGLOThemacro directivesprovide facilitiesfor performingfive$O categoriesof functions.Table5-2"/liststhese categories2O<andtheir associated directives.,SeeP<Chapter4<fordetailedDO informationonmacro argumentsandstring operators.*f?*PnOX.JOThe remainderofthischapter describesboththegeneralFO assembler directivesandthemacro directives,showingOO<theirformatsandgivingexamplesoftheiruse.*ForeaseofOO reference,the directivesare presentedin alphabeticalorder.JJGK<O.ADDRESS*O%%OAddressstorage directiveZ0OFormat Os .ADDRESSN address-list=O ParameterOs address-listQOAlistofsymbolsor expressions, separatedbycommas( , ),5O$whichMACRO-64 interpretsas addresses. O DescriptionIOs.ADDRESSstores successive quadwords(8bytes) containingMO addressesintheobjectmodule.(Digital recommendsthatyouIO$use.ADDRESSratherthan.QUADforstoringaddressdata@O|toprovide additional informationtothelinker.O"Notes ` GYoucanonlyusethis directivewithindataormixedBpsects(psectsthathaveeithertheNOEXEorMIX4X attributes).'Formore information,see=XSection5.1. ` GIf automaticdata alignmentisenabled,this directiveF0alignsthecurrent(64-bit)boundarybefore allocatingstorage. ` HYoucandefinea32-bitaddressitemusingmacrosand/athe.LONG directive.&Forexample:".macro% address_32%itemi-.long%itemu.endm% address_32*={?T{*OExampleb.ADDRESS%A,B,CK JL:O.ALIGN*[11OLocationcounter alignment directivehOFormat,Os .ALIGNNinteger[,fill-specifier],O .ALIGNNkeyword[,fill-specifier] ! O ParametersOsintegerUOAnintegerintherange0to9.'ThelocationcounterisalignedWO$atanaddressthatisthevalueof2raisedtothepoweroftheO|integer.OkeywordKO(Oneoffivekeywordsthatspecifythe alignment boundary.SOThelocationcounterisalignedtoanaddressthatisthenext/Omultipleofthe followingvalues:g= O$OKeywordSize(inBytes) OObBYTE b2 ,F0_b=1OWORD 2 ,1_=2OVLONG V2 ,92_V=4OQUAD 2 ,3_=8OIOCTA I2 ,-4_I=16 OdO[,fill-specifier]IO(Any expressionthatresolvestoan assembly-timeintegerMOvalue containingnoforward references.*ThefillingisdoneQOperbyte, regardlessofthe alignment.(Ifthevalueyouspec-RO2ifyisnotintherangeof0to255,the assemblerissuesa:O diagnosticmessageand truncatesthevalue. O DescriptionNOs.ALIGNalignsthelocationcountertotheboundary specified2Obyeitheranintegerorakeyword.OqNotes ` FIf.ALIGNis specifiedinapsectwiththeEXEandDONOMIX attributes,thefill-specifierisignored.-TheE assembleralignsthepsecttothe requestedboundary5paddingwithNOPorFNOP instructions. ` MIf.ALIGNis specifiedinapsectthatdoesnothavetheMEXE attributeandafill-specifieris specified,theassem-J0bleralignsthepsecttothe requestedboundarypadding,Mwithbyte locationsusingthefill-specifierastheinitial4valueforthe generatedbytepadding. `a MaIfthefill-specifier expression encountersavaluethatisLtoolargetofitinaboundary specifiedbythekeyword,Gthedatais truncatedandan informationalmessageisj displayed. ` HThe alignmentthatyouspecifyin.ALIGNcannotexceedLBthe alignmentofthepsectinwhichthe alignmentisat-Jtempted(seethe descriptionof.PSECT).Forexample,ifIyouareusingtheBYTEpsect alignmentandyouspecifyGL .ALIGNwithawordorlarger alignment,the assembler' displaysanerrormessage.<OExamples5Example10DE.PSECT%A,QUADK;&Begin&at&quadwordB::.BYTE%4t;&Data%is%byte)D.ALIGN%QUAD;&Next%data%isC::.WORD%6$t;&also%quadword%aligned5Example2"DE.PSECT%A,EXE,NOMIX,OCTA L1::TRAPB:t;&offset%05D.ALIGN%OCTA;&NOP%padding&bytes&4..15iTRAPB:;%offset%16(}Example3$DE.PSECT%A,NOEXE,NOMIX,OCTAL1:.WORD%5t;&byte%offset&0..1Y VAXMACROand InstructionSet ReferenceManual XYfordetails.* =D{?  OExampleDb.ASCIC%"MY&STRING"K;%In%the&listing,&this%becomes:;%.BYTE%9!;%.ASCII&\MY%STRING\4M LN: O.ASCID*h>>OString-descriptorASCIIstringstorage directiveZ0OFormat Os .ASCIDNquoted-literal=O ParameterOsquoted-literalHOAnASCIIstring delimitedwithdoublequotes.,FormoreCO$ informationonhowtospecifyquoted literals,see.$Section2.4.*.|?rO DescriptionHOs.ASCIDperformsthesamefunctionasthe.ASCIIdirec-ROtive,exceptthat.ASCIDinsertsastring descriptorbeforetheNO$stringdata.+The descriptorformatis identicaltothatde-CO|finedforOpenVMSAXPandOpenVMSVAX.Thestring2O descriptorhasthe followingformat:C O'Notes ` FString descriptorsareusedincallingcertainsystem routines. ` >The string-lengthfieldistwobytesinsize. ` K Descriptor information(2bytes)isalwayssetto^X010E. ` SThepointerfieldisa32-bitpointertothestring(4bytes). ` FIfnatural alignmentisenabled(using.ENABLEALIGN_GZDATA),the descriptorisquadwordaligned.*ThisallowsKyoutoaccesstheentire descriptor(2datawordsanda8 longwordaddress)onaquadword boundary. ` GYoucanonlyusethis directivewithindataormixedBpsects(psectsthathaveeithertheNOEXEorMIX4; attributes).'Formore information,see=;Section5.1. ` GThis directivealsoacceptsVAXMACROsyntax.(Seethe> VAXMACROand InstructionSet ReferenceManual X forl details.|OvRKKF@@@@@@ @ @@机9X@IIBR44e2@HHrRE@HHJRE@HHJRe@HH<Y@@@8@@@@@@@@@@@@@@95g @DM@DE@DE@DE@8Ef@@@@@@@@< pp< $$8 K/Nj H$< 0ļp<*={?<OExamples <\Example1H#.DESCR1:p.ASCID% "ARGUMENT%FOR&CALL";&String% descriptor[ <bExample2N#.DESCR2:p.ASCID%"SECOND& ARGUMENT"J;%Another&string% descriptorkN MO:O.ASCII*U++OASCIIstringstorage directiveZ0OFormat Os .ASCIINquoted-literaliO ParametersOsquoted-literal=OAnASCIIstring delimitedwithdoublequotes. O DescriptionPOs.ASCIIstorestheASCIIvalueofeach characterintheASCIISOstringorthevalueofeachbyte expressioninthenextavail-O$ablebyte.)SeeO$Section2.43$fora descriptionofhowtospecifyO|quoted literals.O"Notes ` GYoucanonlyusethis directivewithindataormixedBpsects(psectsthathaveeithertheNOEXEorMIX4X attributes).'Formore information,see=XSection5.1. ` GThis directivealsoacceptsVAXMACROsyntax.(Seethe>0 VAXMACROand InstructionSet ReferenceManual X0fordetails.*O}?*={?Z{0OExamplesb.ASCII%"MY&STRING"zO NP:O.ASCIZ*f < VAXMACROand InstructionSet ReferenceManual Xfor:details.*#O|?*#={?$iOExample1b.ASCIZ%"MY&STRING";% Equivalent&to' ;%.ASCII%"MY&STRING%\x00"POQ9%O.BASE*&M'##OBaseregister directivea(7OFormat'Os .BASEMRn[,base_expression])jO Parameters OsRnJOOneofthebase registers,R0throughR30,FP,andSP./*Obase_expressionOO(Thebaseaddress,whichis optional,andcanbeoneoftheO following: ` "Anabsolute expression ` $A relocatable expression ` "Anexternal expression+ WJOAn expressionmustnotcontainforward referencesorim-OOplicitexternalsymbols.(An implicitlydefinedexternalsymbolOO5isasymbolthatthe assemblerdefaultstoanexternalsym-NObol.'Thisoccurswhenthe assembler encounters referencestoPOasymbol,butdoesnot encountera definitionforthesymbolDO>oran .EXTERNAL directivethatdeclaresthesymbol.,! bO DescriptionNOsThe.BASE directiveisusedtoinformthe assemblerthataRO specifiedbaseregistercontainsa specifiedbaseaddress.'LaterOO$inyourprogram,the assemblerallowsyouto implicitlyref-NO|erencethe specifiedbase register.'Whenthe assemblerknowsNOwhichbase addressesarestoredinoneormorebaseregis-UO-ters,itcanconvertan expressiontoanoffsetfromoneoftheQObase registers previously specifiedina.BASE directive.'.BASEKOprovidesa convenientandmorereadable shorthandforac-IO7cessingmemoryandconstantvaluesusingbase registers.NO.BASEalsomakesiteasierforyoutochangeyourregister:O assignmentsifyoulatermodifyyourcode.-! WTOThebase expressionis optional.'Ifthebase expressionisspec-MOified,thisbaseaddressvalueisassumedbythe assemblerSO5tobeinthe specified register,Rn.*Ifthebase expressionisUOomitted,thecontentsofthe specifiedbase register,Rn,iscon-MOsidered undefineduntilanewbase expressionis associated$O>withthebase register.^. +4ROR31isdefinedtoalwayscontain0, accordingtothe architec-NOture definition.* Therefore,R31isknowntobea predefinedOO5baseregister containing0.'Forevery assembly,the assembler-Oassumesthe following statement:.BASE%R31,%0/uGOBecausethecontentsofR31cannotchange,youcannot.OspecifyabaseaddressforR31.F0OOYoucanusethe.BASE directiveto implicitly referencebaseNO registers.(Youcanalso automaticallycomputeoffsetsfromaRO5baseaddressknowntobeinaregistertoabaseaddressyou-Ouseinan instruction argument. 1 KOMostofthememoryformatAlphaAXP instructionsarede-KOfinedsuchthatoneoftheir argumentsmusthaveabaseNO5registerandanoffset.*Ifthe assembler encountersonlyanMO expressionwithnobase register,the assemblerattemptstoQOfindabaseregisterthatcontainsabaseaddressorconstantUO>withina16-bitsignedoffsetofthevalueofthe expression.'IfQOitfindssuchabase register,the assemblercomputesanoff-TOsetthat,whenaddedtothevalueofthebase register,resultsSOHinavalueequaltothe expression specifiedinthe instructionO argument.<2OExamplesz3! PExample1# .EXTERNAL% COMM_AREA #1k.BASE%R1,% COMM_AREA k2 CURR_LINE)=% COMM_AREA%+%0) CURR_COLUMN=% COMM_AREA%+%4C CURR_MODE)C=% COMM_AREA%+%8LDAR4,%17;%LDA&R4,%17(R31) e3LDLR2,% CURR_LINE;%LDL&R2,%0(R1) e4LDLR3,% CURR_COLUMN;%LDL&R3,%4(R1)cSTLR4,% CURR_MODEc;%STL&R4,%8(R1) 1:YThis! statement declares!an!external!symbol,6Y@ COMM_AREA., COMM_AREAisaglobalsymbolEYthat representsthebaseaddressofathree-longwordFY communicationareathatisusedby differentroutinesYJintheprogram. 2DYThis statementinformsthe assemblerthatbasereg-BY"isterR1containsthebaseaddress, COMM_AREA,ofBYzthis communicationarea.(Thenextthree statements>Ydefine variableswithinthe communicationarea. R3HYRThefirst instructionshowshowyoucanload registers0Ywithconstantvaluesintherange )T32,768to+32,767>Yby implicitlyusingR31asthebase register. 4EYThelastthree statementsshowhowthe.BASEdirec-GYtiveallowsyouto implicitly referencebase registersDY4 and automaticallycomputeoffsets.*IneachoftheseHY  instructions,thesecondargumentisdefinedtorequire-Y anoffsetandabase register.4 HYbSincenobaseregisteris specified,the assemblerat-CYtemptstoimplythebaseregisterandcomputetheFYoffsetbasedupon informationgiveninprevious.BASEYl directives.5 IYbInthelastthree instructions,theaddressargumentisYwithin Y<32,768to+32,767ofthebaseaddressknownEYtobeinR1(thatis, COMM_AREA).( Therefore,R1isHYlselectedasthebase register.'The assembleralsocom-FYputesthecorrectoffsetfromthebaseaddressknownKYtobeinR1totheaddress specifiedinthe instructionYv argument.y6 kOExample2G4The assemblerperformsa sequentialsearchthroughthePlistofpossiblebase registers,R0throughR31.(ItusestheQfirst definitionpossibleifmultiplebase registersarevalid.>Forexample:.BASE&R5,%300  :RLDQJR10,%1007!cFThe assembleroutputstheLDQ instructionasfollows:LDQJR10,%-200(R5)8! ajJBothR31andR5aredefinedasbase registersthatcanFbeusedin constructingthe instruction argument.+R31K5alwayscontains0.)Inthisexample,R5isalsoknowntoHcontaintheconstant300.+The assemblerusesthefirstGbase register,startingatR0and progressingtoR31,2>whichprovidesaknownvaluewithin 8>b>32,768to+32,767Kofthe specifiedargumentvalue.'Sincethe assemblercon-MsidersR5beforeit considersR31,R5isusedratherthanHR31.Q PR@9O .BEGIN_EXACT*:X;..OExact instructionblock directiveP<&OFormatOs .BEGIN_EXACTy=! OO DescriptionHOsAnexact instructionblock suppressescode optimizationsEO (SCHEDULEand PEEPHOLE) regardlessifthese optimiza-IO$tionsareenabledfortheassemblyunit.+Unlike.ENABLEQO|and .DISABLE,whichcanbeusedtoenableordisablespecificHO optimizationsfortheentireassemblyunit, .BEGIN_EXACTIO-and .END_EXACTallowyoutosuppress optimizationforaPO specifiedrangeof instructions.' Instructionsoutsidethespec-JOifiedrangeremainsubjecttoany optimizationsyouhaveO7enabled.ONotes `b IbThis directivecannotappearinapsectwiththeNOEXE!andNOMIX attributes. `: I:Althoughthis directiveisacceptedbythe assemblerinNapsectwiththeMIX attribute,ithasnoeffectintheseKpsectssincenocode optimizationsareinaffectforMIXDpsects. ` B .BEGIN_EXACTmustbepairedwithamatching.END_;EXACTtoclosetheexact instructionblock. ` 4 .BEGIN_EXACTand .END_EXACT instructionBblockscan benested.2The outermostlevelofthe=L  .BEGIN_EXACTandmatching .END_EXACT directivesL delimittheactualexact instructionblockfromwhichcode@  optimizationsare suppressed.)Nesting .BEGIN_EXACTCU and .END_EXACT instructionblockscanbeusefulinH macro definitionswherethemacro expansionrequiresanB exact instruction sequence.(Nested .BEGIN_EXACTandG_  .END_EXACT instructionblocksallowamacrotobein-J vokedbothfromwithinandwithouttheexact instruction block. ` @  .BEGIN_EXACTdoesnotaffect automatic alignment.?  Automatic alignmentisenabledwiththe.ENABLE6A  ALIGN_CODEand.ENABLE ALIGN_DATAdirec-@ tivesorwiththe/ALIGN=(CODE,DATA) command-line  qualifier.<>OExamples? NOAThe followingexampleshowsan instructionsequencepriortoO optimization:"addf%f7,&f8,%f9;%1"faddf%f2,&f3,%f4;%2"addl%r5,&r6,%r7;%3#addl%r8,&r9,%r10;%4R@(LOThe assembler optimizesthepreviousexampletoasequence=Osimilartothe following instruction sequence: a:"addf%f7,&f8,%f9;%1"addl%r5,&r6,%r7;%3"9addf%f2,&f3,%f4;%2#addl%r8,&r9,%r10;%4 :A OOIfyouchoosetosuppress optimizationinthepreviousexam-IOple,enclosethefour instructionswiththe .BEGIN_EXACTEO5and .END_EXACT directives,asshowninthe followingOexample: .BEGIN_EXACT"Zaddf%f7,&f8,%f9;%1"addf%f2,&f3,%f4;%2"addl%r5,&r6,%r7;%3#2addl%r8,&r9,%r10;%4z .END_EXACTR QSCBO.BLK /x*CZD00OBlockstorage allocation directivesyEpOOFormatOs .BLKAM [expression]O .BLKBN [expression]O: .BLKDN [expression]O .BLKFN [expression]O .BLKGM [expression]Oe .BLKLM [expression]O .BLKOM [expression]O, .BLKQM [expression]O .BLKSN [expression]O .BLKTN [expression]OW .BLKWN [expression]F! FO ParameterOs expressionOOAninteger expression specifyingtheamountofstoragetobeSO$ allocated.'Allthesymbolsinthe expressionmustbedefinedatPO|thecurrentpointintheassemblyandthe expressionmustbeROanabsolute expression.(Ifthe expressionisomitted,adefault$O-valueof1isassumed.G]O DescriptionHOsMACRO-64hasthe following11blockstorage directives:H  O,O DirectivehReservesStoragefor:Bytes Allocated O'Ob.BLKA Addresses (quadwords) b8 n*-bvalueof expressionO4.BLKBBytedata4Valueofex-pression1O.BLKDDouble-precisionfloating-point_data (quadwords) 8 *-valueof_ expression1O.BLKFSingle-precisionfloating-point2data (longwords) 4 *-valueof2 expression1O.BLKG G_floatingdata (quadwords)8 *-valueof expressionO~.BLKLLongworddata ~4 *-~valueof expressionOP.BLKOOctaworddata P16 \*VPvalueof expressionO".BLKQQuadworddata "8 .*-"valueof{ expression1O.BLKS S_floatingdata (longwords)4 *-valueofM expression1O.BLKT T_floatingdata (quadwords)8 *-valueof  expressionO .BLKW}Worddata  2  *- valueof  expression O QO Each directivereservesstoragefora differentdatatype.'TheNO valueofthe expression determinesthenumberofdataitemsHO_ forwhichMACRO-64reservesstorage.'Forexample,.BLKLOO 4reservesstoragefor4 longwordsofdataand.BLKB2re-RO servesstoragefor2bytesofdata.(ThetotalnumberofbytesOOi reservedisequaltothelengthofthedatatypetimesthe%O valueofthe expression.Og NotesI ` GIf automaticdata alignmentisenabled,the.BLKxdi-L(rectivesalignthecurrentlocationcountertooneofthe8 alignmentslistedinthe followingtable: J  Directive9 Alignment -b.BLKAnQuadword(64-bit)boundary.BLKBnNone-V.BLKDiQuadword(64-bit)boundary-.BLKFnLongword(32-bit)boundary-I.BLKGiQuadword(64-bit)boundary-.BLKLnLongword(32-bit)boundary.=.BLKOiOctaword (128-bit)boundary-.BLKQiQuadword(64-bit)boundary-0.BLKSyLongword(32-bit)boundary-.BLKTnQuadword(64-bit)boundary)$.BLKWNWord(16-bit)boundary ? ` FYoucanonlyusethese directiveswithinpsectshav-BingeithertheNOEXEorMIX attributes.,Formore'u informationonpsects,seeuSection5.1.*J8{?K tOExampleib.PSECT&A,NOEXEB::%.BLKWK100;%10%words%(20&bytes)%of%storagei.BLKQp53;%5% quadwords%(40&bytes)%of%storagei[.BLKW-[;%1%word&(2&bytes)%of%storageSRT9LO.BYTE*MLN""OBytestorage directiveZO0OFormat Os .BYTENexpression-listPFO ParameterOsexpression-listGOOneormore expressions separatedbycommas.+Eachex-LO$pressionisfirst evaluatedasaquadword expression;thenTO|thevalueofthe expressionis truncatedtofitinabyte.)TheROvalueofeach expressionshouldbeintherange0to255for,O-unsigneddataorintherange -+-128to+127forsigneddata.Q! O DescriptionPOs.BYTE generates successivebytesofbinarydataintheobjectOmodule.OqNotes ` IThe assemblerdisplaysawarningmessageiftheexpres-'Osionisoutsidetherange JOuO128to iOO255. ` NThe assemblerwilltruncatethemost significantbitsofanR&integerorexternalvaluethatistoolargetostoreineightbits. ` GYoucanonlyusethis directivewithindataormixedBWpsects(psectsthathaveeithertheNOEXEorMIX4 attributes).'Formore information,see=Section5.1.*Q=r{?tR{JOExamplebA:.BYTEp5#Tb;&Stores%5&in&a%byteTSUASO .CODE_ADDRESS*TUU++OCodeaddressstorage directive\V2OFormat"Os .CODE_ADDRESSN name-list4W  O ParameterOs name-listNOAlistofsymbols separatedbycommas.(ThesesymbolsshouldIO$ referenceeithera procedure descriptorname,suchasaMO|routinename,oran externallydefined procedure descriptor.X! O DescriptionFOs .CODE_ADDRESScausesthecode addressesofthespeci-ROfied identifierstobeplacedatthecurrentpsectandcurrentNO$locationcounter.*The specified identifiershould referencea9O| procedure descriptordefinedintheimage.O"Notes ` GYoucanonlyusethis directivewithindataormixedBpsects(psectsthathaveeithertheNOEXEorMIX4X attributes).'Formore information,see=XSection5.1. ` GIf automaticdata alignmentisenabled,this directiveL0alignsthecurrentlocationcountertoaquadword(64-bit)0boundarybefore allocatingstorage.*X={?UY{+OExampleb .CODE_ADDRESS&A U TVPZv&O .D_FLOATINGO].DOUBLE*[V\,,OFloating-pointstorage directive]nOFormat1Os .D_FLOATINGMfloating-point-number-list-O .DOUBLENfloating-point-number-listh^>O Parameter$Osfloating-point-number-listGOAcomma-separatedlistoffloating-point constants.-TheIO$ constantscannotcontainany operatorsexceptunaryplusGO|orunaryminus.,Formore informationonfloating-pointOnumbers,see8Section2.3.2.*^8?_! XO DescriptionFOs .D_FLOATING evaluatesthe specifiedfloating-pointcon-JOstantsandstorestheresultsintheobjectmodule./.D_CO$FLOATING generates64-bit,double-precision floating-TO|pointdata(1bitofsign,8bitsof exponent,and55bitsofKO fraction).(Seethe descriptionof .F_FLOATINGforinforma-KO-tiononstoringsingle-precisionfloating-pointnumbersandEOthe descriptionsof .G_FLOATING, .S_FLOATING,and.T_LOFLOATINGfor descriptionsofotherfloating-point constants.ONotes `  @ Double-precisionfloating-pointnumbersarealwaysbrounded. ` =The alternateformof .D_FLOATINGis.DOUBLE. `a GaYoucanonlyusethis directivewithindataormixedBpsects(psectsthathaveeithertheNOEXEorMIX4 attributes).'Formore information,see=Section5.1. ` GIf automaticdata alignmentisenabled,this directiveLalignsthecurrentlocationcountertoaquadword(64-bit)0Bboundarybefore allocatingstorage. ` CTheAlphaAXP architecturesupportsonly conversion  operationsforthe(s Dfloating-pointdatatype.*_={?Y`{/OExampleb .D_FLOATINGJ3.1E+02V UW@aO .DEFINE_FREG*bgc==ODefinefloating-pointregistersymbol directive`d6OFormat&Os .DEFINE_FREGMregsymregnumpeFO ParametersOsregsym"OAMACRO-64 identifier.fmOregnumLOAn assembly-time expressionora currentlydefinedregisterOqsymbol.g! O DescriptionOOsThe identifieryouspecifyasthefirstargumentto.DEFINE_JOFREGbecomesafloating-pointregistersymbol.) Thereafter,PO$itcannotbeusedasaMACRO-64 identifier.' Specifically,theOO| user-definedregistersymbolisonlyallowedwherearegisterQOisallowed.)Inthissense,the user-definedregistersymbolisTO-reserveduntiltheendoftheassemblyunitoruntilyoudeleteKOits definition(see.UNDEFINE_REG), whicheveroccursfirst.FO!Thesecondargumentto .DEFINE_FREGcanbeeitheranNOzinteger expressionora currentlydefinedfloating-pointreg-KOistersymbol.,Aninteger expression indicatestheregisterNO+numbertoassigntotheregistersymbol.)The expressioncanKOcontainnoforwardorexternal referencesandmustbeinSOtherangeof0to31.)Alternatively,youcandefinearegisterOO4symbolintermsofanother currentlydefinedregistersymbol.NOA currentlydefinedregistersymbolisa predefinedregisterPOsymboloraregistersymbolthatyouhave previouslydefined.UO>Inthiscase,thenewregistersymbolyouspecifywiththefirstLOargumentreceivesthecurrentvalueoftheregistersymbol4Oyouspecifywiththesecond argument.ONotesh  ` MYoucannotdefineafloating-pointregisterintermsofan.(integerregisterandviceversa. ` HYoucannotredefinea currentlydefinedregistersymbolJwitha differentregisternumber.)ToredefinearegisterLYsymbol,youmustfirstdeletetheold definitionwiththe# .UNDEFINE_REG directive.i OExample@i .DEFINE_IREG&A016;%A0%is%integer%register%16Bi .DEFINE_IREG&A1R17;%A1%is%integer%register%17,(;Kdefined%in%terms%of%the.[;K predefined%R17&register&symbolCi .DEFINE_IREG&PTRA0;%PTR&is&integer%register%16,(;Kdefined%in%terms%of%the3;K previously-O{defined&A0&register;Ksymboli  .DEFINE_FREG&$F00+ ;%$F0&is&floating&register&0CiS .DEFINE_FREG&$F1F1;%$F1&is&floating&register&1,(;Kdefined%in%terms%of%the-;K predefined%F1%register%symbolJi+ .DEFINE_FREG&RADIUS%$F1;%RADIUS&is&floating&register&1,(s;Kdefined%in%terms%of%the%;K previously%defined%$F1;Kregister&symbol@iJ .DEFINE_IREG&X1R5;%X1%is%integer%register%5,(;Kdefined%in%terms%of%the-;K predefined%R5%register%symboli" .DEFINE_IREG&X15+";%2nd& definition%is%the&same'j;Kvalue,%so%no% diagnostic;Kresultsi .DEFINE_IREG&X17,;%Warning:% redefinition&with%aB;K different%valueFi .DEFINE_IREG&X2F5;%Error:&cannot%define%an%integer';Kregister&in&terms&of&a ;Kfloating&register i LDQ) R1,&(PTR) ;%LDQ&R1,%(R16) i LDG+) RADIUS,%(A1);%LDG&F1,%(R17) W VX@jO .DEFINE_IREG*k`l66ODefineintegerregistersymbol directive`m6OFormat&Os .DEFINE_IREGNregsymregnumpnFO ParametersOsregsym"OAMACRO-64 identifier.omOregnumLOAn assembly-time expressionora currentlydefinedregisterOqsymbol.p O DescriptionOOsThe identifieryouspecifyasthefirstargumentto.DEFINE_HOIREGbecomesanintegerregistersymbol.- Thereafter,itLO$cannotbeusedasaMACRO-64 identifier.) Specifically,theOO| user-definedregistersymbolisonlyallowedwherearegisterQOisallowed.)Inthissense,the user-definedregistersymbolisTO-reserveduntiltheendoftheassemblyunitoruntilyoudeleteKOits definition(see.UNDEFINE_REG), whicheveroccursfirst.FO!Thesecondargumentto .DEFINE_IREGcanbeeitheranKOzinteger expressionora currentlydefinedintegerregisterLOsymbol.)Aninteger expression indicatestheregisternumberOO+toassigntotheregistersymbol.(The expressioncancontainNOnoforwardorexternal referencesandmustbeintherangeSOof0to31.)Alternatively,youcandefinearegistersymbolinMO4termsofanother, currentlydefinedregistersymbol.)Acur-POrentlydefinedregistersymbolisa predefinedregistersymbolROoraregistersymbolthatyouhave previouslydefined.'InthisPO>case,thenewregistersymbolyouspecifywiththefirstar-OOgumentreceivesthecurrentvalueoftheregistersymbolyou/Ospecifywiththesecond argument.ONotesq ` FYoucannotdefineanintegerregisterintermsofa5(floating-pointregisterandviceversa. ` HYoucannotredefinea currentlydefinedregistersymbolJwitha differentregisternumber.)ToredefinearegisterLYsymbol,youmustfirstdeletetheold definitionwiththe# .UNDEFINE_REG directive.;rOExample^sZ44OARefertotheexamplein .DEFINE_FREG.YXZ9zO.ELSE*{[|11O Conditionalassemblyblock directiveI}OFormatOs .ELSE~ XO DescriptionPOsA conditionalassemblyblockisaseriesofsource statementsUOthatis assembledonlyifacertain conditionismet.(.IFstartsMO$the conditionalblockand.ENDCendsthe conditionalblock;KO|each.IFmusthavea corresponding.ENDC.The.IFdirec-POtivecontainsa conditiontestandoneortwo arguments.'TheUO- conditiontest specifiedisappliedtothe arguments.'IfthetestGOismet,allMACRO-64 statementsbetween.IFand.ELSEQOare assembled.(Ifthetestisnotmet,the statementsbetween,O7.ELSEand.ENDCare assembled.QO Conditionalblockscanbenested;thatis,a conditionalblockMO+canbeinsideanother conditionalblock.-Inthiscase,theNO statementsintheinner conditionalblockare assembledonlyUOifthe conditionismetforboththeouterandinnerblock.'ForMO4more information,seethe descriptionofthe.IF directive.ONotes!  ` HYoucannotusethe.ELSE directiveinthesamecondi-3(tionalblockasthe.IF_x directive. ` LThe.ELSE directiveissimilartothe .IF_FALSE directive.GHowever,youcanonlyuse.ELSEoncewithinacondi-JYtionalblock.' .IF_FALSEcanbeusedanynumberoftimes$ina conditionalblock.;OExample-1 IOAHereisanexampleofa conditionalassembly directive:.IF%EQUALKALPHA+1,;%Assemble%block%if% ALPHA+1=0. . V..ELSE';%Assemble%when% .IF=false. . ..v.ENDC\Z]8O.END*T**OAssembly termination directiveQ'OFormatOs .ENDM[label] O ParameterOslabelIOThe procedure descriptornamethat specifiestheroutineEO$(calledthetransferaddress)whereprogram execution0O|begins.'Thisargumentis optional.! yO DescriptionGOs.END terminatesthesourceprogram.,No additionaltextUOshouldoccurbeyondthispointinthecurrentsourcefile,orinPO$any additionalsourcefiles specifiedinthecommandlineforRO|this assembly.'Ifany additionaltextdoesoccur,the assemblerROignoresit.*The additionaltextdoesnotappearinthelisting9O-filenordoesitaffecttheobjectfile.ONotes `X FXWhenan executableimage consistingofseveralobjectKmodulesislinked,onlyoneobjectmoduleshouldbeter-H minatedbyan.END directivethat specifiesatransferKbaddress.'Allotherobjectmodulesshouldbe terminatedbyM.END directivesthatdonotspecifyatransferaddress.(IfHan executableimagecontainseithernotransferaddressLlormorethanonetransferaddress,thelinkerdisplaysanerrormessage. `D 8DFor more information,!see the .PROCEDURE_  DESCRIPTOR directive. sOExample b. . .::.PROCEDURE_DESCRIPTOR%TRANSFER1,code_address_T1 . . .Z.END& TRANSFER15 Z;% TRANSFER1%is%module&transfer&address]\^9O.ENDC*O%%OEnd conditional directiveIOFormatOs .ENDC =O DescriptionKOs.ENDC terminatesthe conditionalrangestartedbythe.IFQO directive.'Seethe descriptionof.IFformore informationandO$ examples.L^]_9O.ENDM*U++OEndmacro definition directiveW-OFormatOs .ENDMN [macro-name]! FO ParameterOs macro-nameOOThenameofthemacrowhose definitionistobe terminated.OO$Themacronameis optional;if specified,itmustmatchtheJO|namedefinedinthematching.MACRO directive.&ThemacroQOnameshouldbe specifiedsothatthe assemblercandetectany1O- improperlynestedmacro definitions.hh>O DescriptionKOs.ENDM terminatesthemacro definition.(Seethe descriptionIOof.MACROforanexamplethatusesan.ENDM directive.OqNotes ` IIf.ENDMis encounteredoutsideamacro definition,the2O assemblerdisplaysanerrormessage._^`9O.ENDR*Q''OEndrepeatrange directiveIOFormatOs .ENDR ^O DescriptionNOs.ENDR indicatestheendofarepeatrange.*ItmustbetheMOfinal statementofeveryrepeatblock.+Arepeatblockcon-RO$sistsofanyrangeoftext beginningwiththe.IRP,.IRPC,orJO|.REPEAT directive.*Formore information,seethedescrip-OOtionforthe.IRP,.IRPC,or.REPEAT directivesforexamples2O-ofhowtousethe.ENDR directive.ONotes `X EXIf.ENDRis encounteredoutsidearepeatblock,the2 assemblerdisplaysanerrormessage.E`_a>O .END_EXACT*]33OEndexact instructionblock directiveN$OFormatOs .END_EXACT! O DescriptionLOs .END_EXACTdelimitstheendofanexact instructionblock.GOAnexact instructionblock suppressestheSCHEDULEandKO$PEEPHOLE optimizationsforthe specifiedrangeofinstruc-LO|tions regardlessifcode optimizationsareenabledfortheOassemblyunit.KOpFormore informationonthe .END_EXACT directive,seetheKO descriptionofthe .BEGIN_EXACT directiveinthischapter.a `b:O.ERROR*DOError directiveZ0OFormat Os .ERRORMquoted-literalO ParameterOsquoted-literalQOAstringof characters,betweenapairofdoublequotes,dis-GO$playedduring assembly.+Formore informationonquotedO| literals,see|Section2.4.*?|?_ 5O DescriptionMOs.ERRORcausesthe assemblertodisplayanerrormessageonZOtheterminalorbatchlogfileandinthelistingfile(ifthereisO$one).HOUsing.ERRORpreventsanoutputobjectfilefrombeingO produced.ONotes # ` G.PRINT,.WARN,and.ERRORare directivesusedtodis-H(play messages.(Youcanusethemtodisplay informationH indicating unexpectedor important conditionswithinthe assembly. `Y GYThis directivealsoacceptsVAXMACROsyntax.(Seethe> VAXMACROand InstructionSet ReferenceManual Xfor details. SOExample&b.ERROR%"Illegal% Arguments" ^E%MACRO64-E-GENERROR,% Generated%ERROR:&Illegal% Arguments@:at%line&number%3&in&file%DISK$:[TEST]ERROR.M64;2^bac9O.EVEN*a77OEvenlocationcounter alignment directiveIOFormatOs .EVEN  O DescriptionOOs.EVENensuresthatthecurrentvalueofthelocationcounterVOisevenbyadding1ifthecurrentvalueisodd.(Ifthecurrent;O$valueisalreadyeven,noactionistaken.ONotes `O GOYoucanonlyusethis directivewithindataormixedBpsects(psectsthathaveeithertheNOEXEorMIX4 attributes).'Formore information,see=Section5.1.*={?cbdMv#O .EXTERNALO].EXTRN*Z00OExternalsymbol attribute directivewMOFormat Os .EXTERNALN symbol-listO .EXTRNM symbol-listdO ParameterOs symbol-listb .EXTERNAL%B;%B%is%defined&in&another%module . . :.=A::K.ADDRESS&B;%Its%address%is%stored%here_d ceOv%O .F_FLOATINGO].FLOAT*V,,OFloating-pointstorage directivemOFormat1Os .F_FLOATINGNfloating-point-number-list,O .FLOATNfloating-point-number-list [O Parameter$Osfloating-point-number-listNOAlistofoneormorefloating-point constants separatedbyGO$commas.)Formore informationonfloating-pointnumbers, O|see|Section2.3.2.9|The constantscannotcontainany operators0Oexceptunaryplusorunaryminus.*?? O DescriptionFOs .F_FLOATING evaluatesthe specifiedfloating-pointcon-LOstant(s)andstorestheresultsintheobjectmodule.-.F_IO$FLOATING generates32-bit,single-precision,floating-pointTO|data(1bitofsign,8bitsof exponent,and23bitsoffrac-MOtionalsignificance).'Seethe descriptionof .D_FLOATINGforJO- informationonstoringdouble-precisionfloating-pointcon-GOstantsandthe descriptionsof .G_FLOATING, S_FLOATING,GOand T_FLOATINGfor descriptionsofotherfloating-pointO7 constants.ONotes `b <bThe alternateformof .F_FLOATINGis.FLOAT. ` GYoucanonlyusethis directivewithindataormixedB:psects(psectsthathaveeithertheNOEXEorMIX4 attributes).'Formore information,see=Section5.1. ` GIf automaticdata alignmentisenabled,this directiveLjalignsthecurrentlocationcountertoalongword(32-bit)0boundarybefore allocatingstorage.*=U{?\{2OExample!b .F_FLOATING% 1.0,3.0E+2e df?O .G_FLOATING*X..OG_floating-pointstorage directivekAOFormat1Os .G_FLOATINGNfloating-point-number-listzPO Parameter$Osfloating-point-number-listKOAcomma-separatedlistofoneormorefloating-pointcon-LO$stants.(Formore informationonfloating-pointnumbers,seeO|Section2.3.2.9A|The constantscannotcontainany operators0Oexceptunaryplusorunaryminus.*O??"! O DescriptionFOs .G_FLOATING evaluatesthe specifiedfloating-pointcon-JOstantsandstorestheresultsintheobjectmodule./.G_IO$FLOATING generates64-bitdata(1bitofsign,11bitsMO|of exponent,and52bitsof fraction).-Seethe descriptionAOof .D_FLOATINGfor informationonstoringdouble-JO- precisionfloating-point constantsandthe descriptionsof9O .F_FLOATING, S_FLOATING,and T_FLOATINGfor=O descriptionsofotherfloating-point constants.ONotes `  G Youcanonlyusethis directivewithindataormixedBbpsects(psectsthathaveeithertheNOEXEorMIX4 attributes).'Formore information,see=Section5.1. `: G:If automaticdata alignmentisenabled,this directiveLalignsthecurrentlocationcountertoaquadword(64-bit)0boundarybefore allocatingstorage.*=~{?X{.OExampleb .G_FLOATINGJ2.0E-3Hh.p 3OOTable5-4:8 ConditionTestsfor ConditionalAssembly Directives O O ConditionOTest_ Complement_ ConditionTestWArgumentWTypej Numberofj  ArgumentsO F ConditionThatO  AssemblesO BlockOqLongForm4$Short4qFormLongForm,$Short,qForm O 8OEQUALEQ NOT_EQUALNE Expression1or2 > 1O  Expression-1O OisequaltoO  expression-O 2ornotO XequaltoO  expression-2.;O+GREATER`GT LESS_EQUALLE Expression1or2 > 1O + Expression-1O isgreaterO thanO 4 expression-2O orlessthanO orequaltoO > expression-2.OLESS_OTHAN4LTGREATER__EQUAL",GE Expression1or2 > 1O  Expression-1O islessthanO i expression-2O orgreaterO  thanorO s equaltoO  expression-2.4OE DEFINEDjDF NOT_DEFINEDmNDFvSymbolic1O E SymbolisO definedornotO defined.(Op BLANKB NOT_BLANKNBMacro j p 1O p ArgumentisO blankornotO ! blank./O  IDENTICALIDN DIFFERENTDIFMacro j 2O  ArgumentsO are identicalO L or different. O  O 1Tm Ifthesecondargumentisomitted, comparisonismadeagainst0. O- feg:O.IDENT*M##OIdentification directiveZ0OFormat Os .IDENTNquoted-literalQ'O ParameterOsquoted-literalIOA1-to 31-characterstring,withindoublequotes,thatQO$ identifiesthemodule,suchasastringthat specifiesaver-KO|sionnumber.+Formore informationonquoted literals,seeOSection2.4.*O|?! SZO DescriptionHOs.IDENTprovidesameansof identifyingtheobjectmod-SOule.(ThisidentificationisinadditiontothenameassignedtoKO$theobjectmodulewith.TITLE.Youcanspecifyacharac-TO|terstringin.IDENTtolabeltheobjectmodule.(ThisstringisWOprintedintheheaderofthelistingfileandalsoappearsintheO-objectmodule.ONotes `X HXIfasourcemodulecontainsmorethanone.IDENT,theKlast directivegiven establishesthe characterstringthat? formspartoftheobjectmoduleidentification. ` GThis directivealsoacceptsVAXMACROsyntax.(Seethe> VAXMACROand InstructionSet ReferenceManual Xfor:details.[{1OExample b.IDENT%"Module%Name"Bgfi7  O.IF*[11O Conditionalassemblyblock directiveOFormat%Os .IFM condition argument(s) . . D.O range . y. .O .ENDC! FO ParametersOs conditionROA specified conditionthatmustbemetiftheblockistobeKO$includedinthe assembly.*The conditionmustbe separated>O|fromtheargumentbyacomma,space,ortab.|Table5-4j|listsPOthe conditionsthatcanbetestedbythe conditionalassemblyO- directives.*?a?.! UO argument(s)FO(Oneormoresymbolic argumentsor expressionsoftheOO specified conditionaltest.*Iftheargumentisan expression,GOitcannotcontainany undefinedsymbols.,The assemblerMO2converts relocatable argumentstoabsolute argumentsbydis-MOcardingthe relocatableportionofthe expressionandusingMOonlytheoffsetfromthe beginningofthepsect.* Arguments,O<mustbe separatedbyacomma.tOrangeROTheblockofsourcecodethatis conditionallyincludedintheOq assembly. wO DescriptionPOFA conditionalassemblyblockisaseriesofsource statementsQOthatare assembledonlyifacertain conditionismet.*A.IFPOstartsthe conditionalblockanda.ENDCendsthe conditionalKOOblock;each.IFmusthavea corresponding.ENDC.The.IFPO directivecontainsa conditiontestandoneortwo arguments.OOThe conditiontest specifiedisappliedtothe arguments.+IfKOYthetestismet,allMACRO-64 statementsbetween.IFandOO.ENDCare assembled.)Ifthetestisnotmet,the statementsNO arenot assembled.( Optionally,youcanusethe.ELSEdirec-SOctive(ora combinationofthe.IFF,.IFT,and.IFTF directives)SOtospecifyan alternateseriesof statementstoassembleiftheOtestisnotmet.POYoucannest conditionalblocks;thatis,a conditionalblockMOcanbeinsideanother conditionalblock.-Inthiscase,theNO` statementsintheinner conditionalblockare assembledonlyPOifthe conditionismetforboththeouterandinnerblock.O^Notes e ` HThe assemblerdisplaysanerrormessageifthefollow-K(ing directivesoccuroutsidea conditionalassemblyblock::.ENDC,.ELSE, .IF_FALSE, .IF_TRUE, .IF_TRUE_FALSE. `Y DYMACRO-64permitsanestingdepthof100 conditionalIassemblylevels.+Ifa statementattemptstoexceedthisE nestingleveldepth,the assemblerdisplaysanerrorcmessage. ` LTheeffectoflogical expressionscanonlybeachievedby;:usingseverallevelsof.IF directives.'See:Example5. ` E Lowercasestring argumentsare convertedto uppercaseGbeforebeing compared,unlessthestringis surroundedFkbydoublequotesor /NAMES=AS_ISis specifiedonthecommandline. `C GCThe assemblerdisplaysanerrormessageif.IFspeci-Pfiesanyofthe following:(a conditiontestotherthanthose in5Table5-4,7anillegal argument,oranullargument,L specifiedinan.IF directive.*O*5c?<OExamples2 Example1I4Hereisanexampleofa conditionalassembly directive:.IF%EQUALKALPHA+10;%Assemble%block%if% ALPHA+1=0.%Do ..;pnot%assemble%if%ALPHA+1%not=0 I. ..ENDC Example2F4Nested conditional directivestakethe followingform:%.IFp condition% argument(s)%.IFp condition% argument(s) I. . .!.ENDCh.ENDC9Example3G4The following conditional directivescangovernwhether=assemblyofthe specifiedrangeistooccur:.IF%DEFINEDJSYM1Y.IF%DEFINEDJSYM2 . . 1.y.ENDC.ENDCj 3@PInthisexample,ifthe outermost conditionisnot satisfied,Lnodeeperlevelof evaluationofnested conditionalstate-Fimentswithintheprogramoccurs.' Therefore,bothSYM1JandSYM2mustbedefinedforthe specifiedrangetobe assembled.0Example4J4An alternateseriesof statementscanbe specifiedusing.ELSE..IF%EQUAL%A,B.;&Assemble&if&A%is%equal%to%BY.ELSE3Y;&Assemble&if&A%is%not&equal&to&B.ENDC[ eExample5I4The followingexample demonstratestheuseof.ELSEandnesting:D.IF% LESS_THAN&X,YJ;%Assemble%if%X&is&less%than%Y?DY.IF%DEFINED%Zp;%Assemble%if%Z&is&defined%and!;JX%is%less&than%YD.ELSE3;%Assemble%if%Z&is&not%defined&and!1;JX%is%less&than%YDy.ENDC.ELSEA;%Assemble%if%X&is&greater%than%or%equal%to%YFD .IF%DEFINED%Zp;%Assemble%if%Z&is&defined%and&X%is,Q;Jgreater%than&or&equal&to&YD.ENDC.ENDCigj9O.IF_x*_55OSubconditionalassemblyblock directiveswSMOFormatOs .IF_FALSEO .IF_TRUEO: .IF_TRUE_FALSEO DescriptionCOsFor compatibilitywithVAXMACRO,MACRO-64provides;Othree directivesforusewithin.IFblocks:8 n  OO DirectiveFunction OOb .IF_FALSE6bIfthe conditionoftheassemblyblock4testsfalse,theprogramincludesthe1sourcecode followingthe .IF_FALSE7l directiveand continuinguptothenext9subconditional directiveortotheendof,the conditionalassemblyblock.O.IF_TRUE6Ifthe conditionoftheassemblyblock3teststrue,theprogramincludesthe0Hsourcecode followingthe.IF_TRUE7 directiveand continuinguptothenext9subconditional directiveortotheendof,Qthe conditionalassemblyblock.O .IF_TRUE_O$FALSE5 Regardlessofwhetherthe conditionof<$theassemblyblockteststrueorfalse,the2|sourcecode followingthe.IFTRUE_4FALSE directive(and continuingupto6-thenextsubconditional directiveorto9theendoftheassemblyblock)isalways included. OKOTheimpliedargumentofasubconditional directiveistheMO conditiontest specifiedwhenthe conditionalassemblyblockMOL wasentered.+A conditionalorsubconditional directiveinaQO nested conditionalassemblyblockisnot evaluatedifthepre-RO ceding(orouter) conditionintheblockisnot satisfied(seeOU Example3 U andU Example4).*O O* O~ TROA conditionalblockwithasubconditional directiveis differentTOfromanested conditionalblock.(Ifthe conditioninthe.IFisROinotmet,theinner conditionalblocksarenot assembled,butaMOsubconditional directivecancauseablocktobe assembled.OgNotes ` LIfasubconditional directiveappearsoutsidea conditionalI(assemblyblock,the assemblerdisplaysanerrormessage. ` EThe alternateformsof .IF_FALSE, .IF_TRUE,and.IF_4 TRUE_FALSEare.IFF,.IFT,and.IFTF. ` HYoucannotuse.ELSEinthesame conditionalblockas.IF_x.<OExamples [Example114AssumethatsymbolSYMisdefined:ED.IF%DEFINEDpSYM;%Tests%TRUE&since&SYM%is%defined. ".-y";p Assembles%the% following&code. j. .D .IF_FALSE*y;%Tests%FALSE%since%previous B.'yB;p.IF%was%TRUE.KDoes%not .,y;passemble&the% following%code. .D.IF_TRUE2y;%Tests%TRUE&since&SYM%is%defined. b.-yb;p Assembles%the% following&code. . .D9.IF_TRUE_FALSE'y9;% Assembles% following&code .y;punconditionally. . .DY.IF_TRUE2yY;%Tests%TRUE&since&SYM%is%defined. .%y;p Assembles% remainder%of .*y;p conditional&assembly&block. 1.Dy.ENDC BjExample2M4AssumethatsymbolXisdefinedandthatsymbolYisnotdefined:D.IF%DEFINEDJX0y;%Tests%TRUE&since&X%is%defined.DY.IF%DEFINEDJY6yY;%Tests%FALSE%since%Y&is&not%defined.D .IF_FALSE5y;%Tests%TRUE&since&Y%is%not&defined. .-y;p Assembles%the% following&code. 1. y.D.IF_TRUE6y;%Tests%FALSE%since%Y&is&not%defined.  .0y ;pDoes%not&assemble&the% following Q.yQ;pcode. .D.ENDCD).ENDCz PExample3M4AssumethatsymbolAisdefinedandthatsymbolBisnotdefined:D.IF%DEFINEDJA0T;&Tests&TRUE%since%A%is%defined. Y.-TY;p Assembles&the% following%code. . .D1 .IF_FALSE1T1;&Tests&FALSE&since&A%is%defined. y.0Ty;pDoes%not%assemble%the& following .T;pcode.  .@DQ.IF% NOT_DEFINED%B;&Nested% conditional% directive . T;pis%not& evaluated. . ).Dq.ENDCD.ENDC Example4G4AssumethatsymbolXisnotdefinedbutsymbolYisdefined:D.IF%DEFINEDJX6T;&Tests&FALSE&since&X%is%not&defined. Y.0TY;pDoes%not%assemble%the& following .T;pcode. .D1.IF%DEFINEDJY+T1;&Nested% conditional% directive y. Ty;pis%not& evaluated. .  .DQ .IF_FALSE#TQ;&Nested%subconditional .+T;p directive&is&not% evaluated. . ).Dq.IF_TRUE#Tq;&Nested%subconditional .+T;p directive&is&not% evaluated. . I.D.ENDCD.ENDC jik8O.IIF*f< assembly-timeconstantdatainacodesection.*|?T{*OExampleb .INSTRUCTION%7m ln8O.IRP*[11O Indefiniterepeatargument directiveqOFormat'Os .IRPMsymbol, . 4. .O range N. . .OX .ENDRQ 'O ParametersOssymbolJOAformalargumentthatis successivelyreplacedwiththePO$ specifiedactual argumentsenclosedinanglebrackets( <> ).PO|Ifnoformalargumentis specified,the assemblerdisplaysanOerrormessage. O LO(Alistofactual argumentsenclosedinanglebracketsandJOusedin expandingthe indefiniterepeatrange.,AnactualJOargumentcanconsistofoneormore characters.*MultipleJO2 argumentsmustbe separatedbyalegal separator(comma,SOspace,ortab).'Ifnoactual argumentsare specified,noactionOistaken.iOrangeNOTheblockofsourcetexttoberepeatedonceforeachoc-MOqcurrenceofanactualargumentinthelist.*TherangecanLOcontainmacro definitionsandrepeatranges.(.MEXITisle-LO"galwithintherangeandcausesthecurrentand remaining'O{ repetitionstobeaborted.! lO DescriptionLOs.IRPreplacesaformalargumentwith successiveactualar-HOguments specifiedinanargumentlist.,This replacementNO$processoccursduringthe expansionofthe indefiniterepeatLO|blockrange.,The.ENDR directive specifiestheendoftheOrange.SOp.IRPissimilartoamacro definitionwithonlyoneformalar-KOgument.+Ateach successive expansionoftherepeatblock,JO!thisformalargumentisreplacedwith successiveelementsQOzfromtheargumentlist.'The directiveanditsrangearecodedQOinlinewithinthesourceprogram.&Thistypeofmacrodefini-QO+tionanditsrangedonotrequirecallingthemacrobyname,>Oasdoothermacros describedinthissection.]! 3HO.IRPcanappeareitherinsideoroutsideanothermacroOO definition, indefiniterepeatblock,orrepeatblock(seetheNOi descriptionof .REPEAT).Therulesfor specifying.IRPargu-NOmentsarethesameasthosefor specifyingmacro arguments.;OExampleV 2OuThemacro definitionisasfollows:6.macro%CHECK_PROCEDURE_KIND%PROCEDURE_KIND:iBOK%=%0;%Assume%procedure_kind%is%unknown:i.irp%REFERENCE_KIND,BOUND,NULL,%REGISTER,STACK>.if% identical,&,&0OK%=&1%;%Procedure_kind%is%known0b.mexit%;%No%need&to&look%further.endci.endr7i:.if&eq,%OKJ;%If%unknown& procedure%kind=.error%"Unknown% procedure%kind:%PROCEDURE_KIND"i.endc%.endm%CHECK_PROCEDURE_KIND({CHECK_PROCEDURE_KIND%REGISTER&CHECK_PROCEDURE_KIND%FOOZLEHOThemacrocalland expansionofthe previouslydefined!Omacroisasfollows:(aCHECK_PROCEDURE_KIND%REGISTER;iOK%=%0;%Assume% procedure&kind%is%unknown+i.if&identical,,i9.endc*i.if&identical,,i.endc.i.if&identical,,1YOK&=%1%;& Procedure%kind&is&known0.mexit%;&No&need%to%look%further7i.if&eq,%OKJ;%If%unknown& procedure%kindi0.endc&CHECK_PROCEDURE_KIND%FOOZLE;iOK%=%0;%Assume% procedure&kind%is%unknown)i).if&identical,,iq.endc(i.if&identical,,i.endc,iI.if&identical,,i.endc)i.if&identical,,i!.endc7ii.if&eq,%OKJ;%If%unknown& procedure%kind5.error%"Unknown% procedure%kind:%FOOZLE"i.endcqG=OInthisexampletheCHECK_PROCEDURE_KINDmacroOOusesthe.IRP directivetoiterateoveralistof referenceKO5keywordsto determineifitsargumentmatchesoneoftheIO reference keywords.-Ifamatchisnotfound,themacro'Odisplaysanerrormessage.n mo9O.IRPC* \!22O Indefiniterepeat character directive"qOFormat Os .IRPCNsymbol, . 4. .O range N. . .OX .ENDRJ#  O ParametersOssymbolJOAformalargumentthatis successivelyreplacedwiththeQO$ specified charactersenclosedinanglebrackets( <> ).*IfnoOO|formalargumentis specified,the assemblerdisplaysanerrorOmessage.v$! KLOOO(Asequenceof charactersenclosedinanglebracketsandusedPOinthe expansionofthe indefiniterepeatrange.'AlthoughtheKOanglebracketsarerequiredonlywhenthestringcontainsPO2 separating characters,theiruseis recommendedfor legibility.7%! ; OrangeQOTheblockofsourcetexttoberepeatedonceforeachoccur-ROqrenceofa characterinthelist.'TherangecancontainmacroKO definitionsandrepeatranges.+.MEXITislegalwithintheO"range.|& RO DescriptionMOs.IRPCissimilarto.IRPexceptthat.IRPCpermitssingle-LO character substitutionratherthanargument substitution.'OnPO$each iterationofthe indefiniterepeatrange,theformalar-JO|gumentisreplacedwitheach successive characterintheQO specifiedstring.(The.ENDR directive specifiestheendoftheO-range.OO.IRPCissimilartoamacro definitionwithonlyoneformalMO! argument.+Ateach expansionoftherepeatblock,thisfor-IOzmalargumentisreplacedwith successive charactersfromNOtheactualargumentstring.(The directiveanditsrangeareNO+codedinlinewithinthesourceprogramanddonotrequire(Ocallingthemacrobyname.'! OO.IRPCcanappeareitherinsideoroutsideanothermacrodef-TOinition, indefiniterepeatblock,orrepeatblock(see descriptionOiof .REPEAT).;(OExample ){2OuThemacro definitionisasfollows:i.macro&X_COUNT%ARGBCOUNT&=%0.irpc&CH,:.iif&identical,,,%COUNT%=%COUNT%+&1.endrib.endm%X_COUNT*bKOThemacrocalland expansionofthemacrodefinedprevi-!Oouslyisasfollows:iaX_COUNT% XXFOOXBARXXCOUNT&=%0!.irpc&CH,:9.iif&identical,,,%COUNT%=%COUNT%+&1.endr9.iif&identical,,,%COUNT%=&COUNT&+%19.iif&identical,,,%COUNT%=&COUNT&+%19Y.iif&identical,,,%COUNT%=&COUNT&+%19.iif&identical,,,%COUNT%=&COUNT&+%19.iif&identical,,,%COUNT%=&COUNT&+%190.iif&identical,,,%COUNT%=&COUNT&+%19x.iif&identical,,,%COUNT%=&COUNT&+%19.iif&identical,,,%COUNT%=&COUNT&+%19.iif&identical,,,%COUNT%=&COUNT&+%19P.iif&identical,,,%COUNT%=&COUNT&+%19.iif&identical,,,%COUNT%=&COUNT&+%1#.print%"%integer(COUNT)"4I%MACRO64-I-GENPRINT,% Generated%PRINT:&5+ WLOThisexampleusesthe.IRPC directivetoiterateovertheGO charactersintheargumenttotheX_COUNTmacro.'EachIO5timeanargument characterisX,thevariableCOUNTisGO incremented.'AftertheX_COUNTmacrohas expanded,theJOexampleusesthe %INTEGER( )lexicaloperatortodisplay O>thevalueofCOUNT.>o np<,O.LIBRARY*-M.##OMacrolibrary directivep/FOFormat6Os .LIBRARYNquoted-literal1[quoted-literal2]0 FO ParametersOsquoted-literal1ROAstringenclosedwithindoublequotesthatisthefilespeci-UO$ficationofamacrolibrary.)IfalogicalnameexistsanditisMO|thesameasthemacrolibraryname,specifythe.MLBfileNO extensiontooverridethelogicalname.'Formore information$O-onquoted literals,see\-Section2.4.*0\|?1 kOquoted-literal2MO(Anoptionalstringenclosedwithindoublequotesthatspec-QOifiesasearchlistoffilespecificationswherethe assemblerLOshouldlookforthe specifiedmacrolibrary.*The assemblerNO2 successively processesthesearchlistin left-to-rightorderROandattemptstolocatethe specifiedmacrolibraryineachlo-ROcation specifiedinthesearchlistuntilthemacrolibraryisRO<found.'Ifthemacrolibraryisnotfound,the assemblerissuesPOa diagnosticmessage.'IfyouomitthesecondargumenttotheLO.LIBRARY directive,the assemblerusesthe followingsearchOElistbydefault: ` .Thecurrentdeviceand directory `J HJThedeviceand directory specifiedbythelogicalname(MACRO64$LIBRARY(ifdefined) `! H!Thedeviceand directory specifiedbythelogicalname&z ALPHA$LIBRARY(ifdefined) ` HThedeviceand directory specifiedbythelogicalnameR SYS$LIBRARYq2GGOLogicalnamesmaybedefinedasOpenVMSsearchlists._3 5O DescriptionJOs.LIBRARYaddsanametothemacrolibrarylistthatisKOsearchedwhenevera.MCALLoran undefinedopcodeisen-PO$ countered.(The librariesaresearchedinthereverseorderin;O|whichtheywere specifiedtothe assembler.b48HOIfyouomitany informationfromthemacro-library-nameNOfile description,defaultvaluesareassumed.*Thedevicede-QOifaultstoyourcurrentdefaultdisk;the directorydefaultstoQOyourcurrentdefault directory;thefiletypedefaultstoMLB.5 OExampleb.LIBRARY% "MY_MACROS" b1D.LIBRARY% "PROJ_MACROS"&!"PROJ:[MACRO],PROJ:[DEVELOPMENT]" E 2_6 J5 1IThefirst statementaddsthemacrolibrary MY_MACROS.MLBK(tothemacrolibrarylist.+The assemblerfirstlooksfor> MY_MACROS.MLBinthecurrent directory.-IfnotHfoundthere,the assemblernextlooksinthe directory>2or directories indicatedbytheMACRO64$LIBRARYLlogicalnameifitisdefined..IfnotfoundthereorifBMACRO64$LIBRARYisnotdefined,the assemblernextH<looksinthe directoryor directories indicatedbytheE ALPHA$LIBRARYlogicalnameifitisdefined.+IfnotEfoundthereorif ALPHA$LIBRARYisnotdefined,theLE assemblernextlooksinthe directoryor directoriesindi-Ecatedbythe SYS$LIBRARYlogicalname.*IfnotfoundAthere,the assemblerissuesa diagnosticmessage. v2LvThesecond statementaddsthemacrolibraryPROJ_MACROS.MLBKtothemacrolibrarylist.+The assemblerfirstlooksfor8'PROJ_MACROS.MLBinthe PROJ:[MACRO]direc-Mtory.)Ifnotfoundthere,the assemblernextlooksinthe@PROJ:[DEVELOPMENT] directory.*Ifnotfoundthere,91the assemblerissuesa diagnosticmessage.poqA7O .LINKAGE_PAIR*8F9OLinkage directiveW:-OFormatOs .LINKAGE_PAIRNname;=O ParameterOsnameNOThenameofthe procedure descriptor,possiblydefinedinaPO$ differentmoduleoftheroutinetowhichlinkageis required.<! O DescriptionJOs .LINKAGE_PAIRcausesalinkagepairtobestoredattheQOcurrentlocationcounter.&Alinkagepairconsistsoftwoquad-LO$words.-ThefirstquadwordisthecodeentrypointoftheKO|routine indicatedbythe specified identifier.,(See.CODE_KO ADDRESS.)Thesecondquadwordistheaddressofthepro-MO-cedure descriptoroftheroutine indicatedbythe specifiedNO identifier.)Thesecondquadwordisalsocalledthe procedureLOvalue.(The specifiednameshould referencea procedurede-TO7scriptorthatiseitherdefinedwithintheassemblyunitorthatDObecomesdefinedatthetimetheprogramislinked.O6Notes ` GYoucanonlyusethis directivewithindataormixedBpsects(psectsthathaveeithertheNOEXEorMIX4l attributes).'Formore information,see=lSection5.1. ` GIf automaticdata alignmentisenabled,this directiveJDalignsthecurrentlocationcountertoanoctaword(128-6bit)boundarybefore allocatingstorage.*<=/{?= OExampleJb .LINKAGE_PAIR&A;%Code%address&A%followed%by%address%of%;% procedure& descriptor%AbrqsGDO.LOCAL_CODE_ADDRESS*E\F22OLocalcodeaddressstorage directivebG8OFormat(Os .LOCAL_CODE_ADDRESSN name-listH=O ParameterOs name-listLOAlistofsymbols separatedbycommas.)Eachsymbolrefer-MO$encesa procedure descriptordefinedinthecurrentmodule.I! O DescriptionDOs.LOCAL_CODE_ADDRESScausesthecode addressesoftheNO specified identifierstobeplacedatthecurrentpsectandMO$currentlocationcounter.)The specified identifiermustref-IO|erencea procedure descriptordefinedwithinthemodule.AOThe.LOCAL_CODE_ADDRESS directive,ratherthantheDO- .CODE_ADDRESS directive,mustbeusedwith procedureQO descriptornamesthatarelocal(asopposedtoglobal)totheOassemblyunit.ONotes `  G Youcanonlyusethis directivewithindataormixedBbpsects(psectsthathaveeithertheNOEXEorMIX4 attributes).'Formore information,see=Section5.1. `: G:If automaticdata alignmentisenabled,this directiveLalignsthecurrentlocationcountertoaquadword(64-bit)0boundarybefore allocatingstorage.*I=~{?J OExample&b.PROCEDURE_DESCRIPTOR%P1,C1.BLKQ%1!.LOCAL_CODE_ADDRESS&P1;%Code%address(:;%of% P1...address&of&C1...;%is%stored&here.srtGKO.LOCAL_LINKAGE_PAIR*LMM##OLocallinkage directive]N3OFormat#Os .LOCAL_LINKAGE_PAIRNnameOO ParameterOsnameNOThenameofa procedure descriptoroftheroutinetowhichMO$linkageis required.(The specified procedure descriptormust0O|bedefinedinthecurrentmodule.dP :O DescriptionGOs.LOCAL_LINKAGE_PAIRcausesalinkagepairtobestoredQOatthecurrentlocationcounter.)AlinkagepairconsistsofaPO$codeaddressandtheaddressofthe specified identifier.)TheNO| specifiednamemust referencea procedure descriptorthatis/Odefinedwithintheassemblyunit.O{Notes ` GYoucanonlyusethis directivewithindataormixedBXpsects(psectsthathaveeithertheNOEXEorMIX4 attributes).'Formore information,see=Section5.1. `0 G0If automaticdata alignmentisenabled,this directiveJalignsthecurrentlocationcountertoanoctaword(128-6bit)boundarybefore allocatingstorage.*P=t{?Q[ OExample'b.PROCEDURE_DESCRIPTOR%P1,CA1 . . :.!.LOCAL_LINKAGE_PAIR&P1-4;&Code%address%CA1%followed%by04;& procedure% descriptor&address%P1.utv9ZO.LONG*[P\&&OLongwordstorage directiveZ]0OFormat Os .LONGNexpression-list^hO ParameterOsexpression-list informationon parameterpassing.*n?o <.MACRO%OP1& A,B=R4,?CC:ADDL%R2,&B,&R3.MACRO%OP'BTRAPB\.ENDM%OP'BADDL%A,%R2,&R3OP'B4.MDELETE&OP'B|.ENDM%OP1 pEWhenOP1isinvoked"OP1R0",thetextexpandsto:%33000$:&ADDL%R2,&R4,%R3P.MACRO%OPR4TRAPB.ENDM(ADDL%R0,&R2,%R3pOPR4.MDELETE&OPR4q I ProcessingthistextwillcauseOPR4tobeexpandedto-TRAPB;thefinaltextwillbe:$a33000$:&ADDL%R2,&R4&R3ADDL%R0,&R2,%R3TRAPB*r*sExample2>4The followingexampleshowsmacro redefinition:.MACRO% INITIALIZE4D.MACRO% INITIALIZEp ;Redefine%to%nothingDI.ENDM% INITIALIZE DX=0 DY=1D!Z=-1h.ENDM% INITIALIZE,t! INotethatwhilethe redefinedversionofthemacroim-I mediately supersedestheprevious definitioninanysub-N5sequent invocation,the invocationoftheoriginal definition"expandsto completion.BuExample344Thisexampleshowsa recursivemacro:.MACRO% FACTORIAL&N:D.IF%EQUAL%,0;Basis%step;%stop%at%zero IF=1D.ELSE FACTORIAL%!F&=%F%*&Dh.ENDC.ENDM% FACTORIAL'wvx:vO.MCALL*wJx  OMacrocall directive[y1OFormat!Os .MCALLMmacro-name-listz=O ParameterOsmacro-name-listSOAlistofmacrostobedefinedforthis assembly.(Separatethe%O$macronameswithcommas.{ /O DescriptionKOs.MCALL specifiesthenamesofthesystemand user-definedNOmacrosthatarerequiredtoassemblethesourceprogrambut3O$arenotdefinedinthesourcefile.JOIfanynamedmacroisnotfoundupon completionofthePOsearch(thatis,ifthemacroisnotdefinedinanyoftheKOpmacro libraries),the assemblerdisplaysanerrormessage.ONotes|! l ` IUsingthe.MCALL directiveisoptionalunlessthemacroH(nameisthesameasanopcodeor assembler directive.IThe assembler automaticallysearchesforalibrarymacroIwhenit encountersan identifierthatisnotanopcodeK2or directiveintheopcodefield.*IfyourmacronameisHthesameasanopcodeor directive,youmustusetheF.MCALL directive.(Youcanalsousethe.MCALLdirec-I<tiveinyourprogramtodocumentwhichmacrosareusedbyyourprogram.}wOExampleb.MCALL%TRAPB0b;% Substitute&macro&in&library%for;%TRAPB% instructionxwy<~O.MDELETE*N$$OMacrodeletion directive]3OFormat#Os .MDELETENmacro-name-list=O ParameterOsmacro-name-listROAlistofmacroswhose definitionsaretobedeleted.)Youcan:O$separatethemacroswithcommasorspaces. O DescriptionEOs.MDELETEdeletesthe definitionsof specifiedmacros.HO.MDELETE completelydeletesthemacro.+IfyoudeleteaJOfmacrothatis currently expanding(suchasamacrothatMOdeletesitself),themacronameis immediatelyremovedfromNOthemacronametableandthemacroismarkedfor deletion.BOpWhenthemacrofinishes expanding,itisdeleted.OExampleb.MACRO%FOO".PRINT%"In&macro&FOO".ENDM%FOO :FOO.MDELETE%FOOPy xz:O.MEXIT*J  OMacroexit directiveJ OFormatOs .MEXIT O DescriptionLOs.MEXIT terminatesamacro expansionbeforetheendoftheJOmacro.( Terminationisthesameasif.ENDMwereencoun-NO$tered.+Youcanalsousethe directivewithinrepeatblocks.IO|.MEXITisusefulin conditional expansionofmacrosandNOrepeatblocksbecauseitbypassesthe complexitiesofnestedCO- conditional directivesand alternateassemblypaths.ONotes `X BXWhen.MEXIToccursinarepeatblock,theassem-Ibler terminatesthecurrent repetitionoftherangeandA  suppressesfurther expansionoftherepeatrange. ` GWhenmacrosorrepeatblocksarenested,.MEXITexits6tothenexthigherlevelof expansion. `a JaIf.MEXIToccursoutsideamacro definitionorarepeat?block,the assemblerdisplaysanerrormessage.<OExamples1 Example1I4The followingmacro definitionusesthe.MEXIT directiveLtoexitthecurrentmacrowhenithasfinished processing,a particularkindof argument:'j.macro%STORE%REG,&LOCATION#.if%identical,,)STQ&REG,%LOCATION)B.mexit.endc#.if%identical,,)STQ&REG,%LOCATION)b.mexit.endc2.if%#identical,<%extract(0,1,)>,)9STQ&REG,%LOCATION).mexit.endc2.if%#identical,<%extract(0,1,)>,)YSTT&REG,%LOCATION).mexit.endc<1.error% "Register&argument&is&not%a& register"y.endm&STORE*a1 M 7Example2A4Inthisexample, theSTOREmacro(asdefinedinBExample1)attemptsto recognizeitsREGargumentLaseitherFP,SP,anintegerregister(aregisterwithRQ>asitsfirstletter),orafloating-pointregister(aregisterOwithFasitsfirstletter).'The followingexampleshowtwo, expansionsoftheSTOREmacro:tSTORE&R1,%0(SP)".if%identical,,.endc"K.if%identical,,.endc3.if%identical,<%extract(0,1,)>,% #.if%identical,,)kSTQ&R1,%0(SP)).mexit STORE&24(SP),%16(SP)&d.if%identical,<24(SP)>,.endc&.if%identical,<24(SP)>,<.endc5.if%&identical,<%extract(0,1,<24(SP)>)>, .if%identical,<2>,.endc6\.if% identical,%<%extract(0,1<24(SP)>)>, .if%identical,<2>,.endc<4 .error% "Register&argument&is&not%a& register"f! k<IThefirstcalloftheSTOREmacrostoresR1at0(SP).GTheSTOREmacro determinestodoanintegerstorebyP5 recognizingtheletterRasthefirstletteroftheregisterLname.'Afterithasdoneso,itabandonsfurther expansionEofthemacrousingthe.MEXIT directive.+ThesecondJ> invocationattemptstostore24(SP)at16(SP).SincetheISTOREmacrocannotidentify24(SP)asa legitimatereg-Kisterinanyofthefourformsit recognizes,theSTOREHHmacrodoesnotattempttostoretheREG argument,andBdoesnotabandon expansionwiththe.MEXITdirec-Etive.,Instead,theSTOREmacroexpandsandissuesaR diagnosticmessage. z y{9O.NARG*T**ONumberof arguments directiveQ'OFormatOs .NARGMsymbol=O ParameterOssymbolMOAsymbolthatisassignedavalueequaltothenumberof6O$ positional argumentsinthemacrocall. O DescriptionIOs.NARG determinesthenumberof argumentsinthecurrentOmacrocall.LOf.NARGcountsallthe positional arguments specifiedintheLOmacrocall, includingnull arguments (specifiedbyadjacentOOcommas).'Thevalueassignedtothe specifiedsymboldoesnotFOpincludeanykeyword argumentsoranyformal arguments&Othathavedefaultvalues.OnNotes Ar ` JIf.NARGappearsoutsideamacro,the assemblerdisplays(anerrormessage.<OExamplesRV (OExample12O4Themacro definitionisasfollows:D.MACROKCNT_ARG%)A1,A2,A3,A4,A5,A6,A7,A8,A9=DEF9,A10=DEF10.NARGpCOUNTER0T;&COUNTER%is%set&to&no.%of%ARGSI.WORDpCOUNTER&TI;&Store&value&of&COUNTER.ENDMpCNT_ARG 5OExample2HO4Themacrocallsand expansionsofthemacro previously$Odefinedareasfollows:8CNT_ARG& TEST,FIND,ANSp;&COUNTER%will%=&3Y.NARGpCOUNTER0TY;&COUNTER%is%set&to&no.%of%ARGS.WORDpCOUNTER&T;&Store&value&of&COUNTER CNT_ARG T ;&COUNTER%will%=&0R.NARGpCOUNTER0TR;&COUNTER%is%set&to&no.%of%ARGS.WORDpCOUNTER&T;&Store&value&of&COUNTER?CNT_ARG&TEST,A2=SYMB2,A3=SY3;%COUNTER&will%=%1K.NARGpCOUNTER0TK;&COUNTER%is%set&to&no.%of%ARGS.WORDpCOUNTER&T;&Store&value&of&COUNTER2T;&Keyword% arguments&are%not%countedDCNT_ARG&,SYMBL,, TD;&COUNTER%will%=&4.NARGpCOUNTER0T;&COUNTER%is%set&to&no.%of%ARGS.WORDpCOUNTER&T;&Store&value&of&COUNTER*T;&Null% arguments&are%countedy { z|9O.NCHR*U++ONumberof characters directiveZ0OFormat Os .NCHRNsymbol,=O ParametersOssymbolMOAsymbolthatisassignedavalueequaltothenumberofJO(Asequenceof printable characters.+Delimitthe characterNOstringwithanglebrackets( <> )(ora characterprecededRObya circumflex( ^ ))onlyifthe specified characterstringIO2containsalegal separator(comma,space,ortab)oraO semicolon( ; ).O DescriptionJOs.NCHR determinesthenumberof charactersina specifiedGO characterstring.*ItcanappearanywhereinanMACRO-OO$64programandisusefulin calculatingthelengthofmacroO| arguments.O"Notes ` EYoucanusethe%LENGTHlexicaloperatorinsteadof the.NCHR directive.<OExamplespV FExample124Themacro definitionisasfollows:.MACROpCHARMESS;&Define%MACRO<.NCHR CHRCNT,;%Assign%value%to%CHRCNTI.WORDCHRCNTI;&Store&value.ASCIIp"MESS";&Store& characters.ENDMCHAR;&Finish[ CbExample2H4Themacrocallsand expansionsofthemacro previously$definedareasfollows:CHAR;%CHRCNT%will%=&5Y.NCHRCHRCNT,&Y;%Assign%value%to%CHRCNT.WORDCHRCNT;%Store%value.ASCIIp"HELLO";%Store% charactersRCHAR<14,&75.39K4>%R;%CHRCNT%will%=&12(dec)'.NCHR CHRCNT,<14,%75.39J4>&;%Assign%value%to%CHRCNT.WORDCHRCNT;%Store%value!*.ASCIIp"14,&75.39K4"*;%Store% charactersF~}9O.OCTA*P&&OOctawordstorage directiveZ0OFormat Os .OCTAMexpression-listO ParameterOsexpression-listLOAlistofconstantvalues separatedbycommas.*EachvalueQO$resultsina64-bitvaluebeing sign-extendedto128bitsand#O|storedinan octaword. O DescriptionEOs.OCTA generates128bits(16bytes)ofbinarydata.ONotes ` HThelowquadwordcontainsthe specifiedconstantvalue. ` FThehighquadwordcontainsthesign extensionoftheKu specifiedconstantvalue.(Thatis,thehighquadwordcon-Ttains0ifthe specifiedvalueis positive,anditcontainsallD&bitssetto1ifthe specifiedvalueis negative. ` GYoucanonlyusethis directivewithindataormixedBpsects(psectsthathaveeithertheNOEXEorMIX4W attributes).'Formore information,see=WSection5.1. ` GIf automaticdata alignmentisenabled,this directiveJ/alignsthecurrentlocationcountertoanoctaword(128-6bit)boundarybefore allocatingstorage.*={? OExampleb.OCTAJ0b;&OCTA%0".OCTAJ^X01234ABCD5678F9(;&OCTA%hex&value& specified.OCTAJ VINTERVAL ;& VINTERVAL%has%64-O[bit%value,;p sign-extendedY~8O.ODD*`66OOddlocationcounter alignment directiveHOFormatOs .ODD  O DescriptionNOs.ODDensuresthatthecurrentvalueofthelocationcounterVOisoddbyadding1ifthecurrentvalueiseven.(Ifthecurrent:O$valueisalreadyodd,noactionistaken.ONotes `O GOYoucanonlyusethis directivewithindataormixedBpsects(psectsthathaveeithertheNOEXEorMIX4 attributes).'Formore information,see=Section5.3.*={?|9O.PAGE*M##OPageejection directiveIOFormatOs .PAGE#! O DescriptionTOs.PAGEforcesanewpageinthelisting.(The directiveitselfisGOalsoprintedinthelistingandbeginsthenewpage.OOf.PAGEinamacro definitionisignored.'Thepaging operationMOis performedonlyduringmacro expansion.(Ifthe.PAGEdi-KOrectiveoccursduringmacro expansion,text beginningwithSOptheoriginalmacro invocationlineappearsatthetopofanewOpage.F+OExample9b.MACRO%SKIP;&macro& definition%with%.PAGE.PAGE ;.ENDM%SKIP;:.PSECT%A,NOEXE%;.BLKW%10 ;SKIP3;&In&the%listing&file,&a%form%feed%;Kwill&be&inserted&here:O.PRINT*P&&OAssemblymessage directiveZ0OFormat Os .PRINTNquoted-literal!O ParameterOsquoted-literalKOThestringof charactersenclosedinquotesare displayedFO$when encounteredduring assembly.*Formore information$O|onquoted literals,see\|Section2.4.*\?|?s IIO DescriptionHOs.PRINTcausesthe assemblertodisplayan informational VAXMACROand InstructionSet ReferenceManual Xfor0details.1 SOExample'b.PRINT% "Questionable%usage" ^F%MACRO64-I-GENPRINT,% Generated%PRINT:& Questionable%usage@:at%line&number%3&in&file%DISK$:[TEST]PRINT.M64;2  w 3OTable5-5:8ProgramSection Attributes O OF AttributeDFunction Ob gOABS Absolute-Theprogramsectionhasanabsoluteaddress.(Anabsoluteprogramsec-k$tion contributesnobinarycodetotheimage,soitsbyte allocationrequesttotheg|linkeris0.+Youcannotstoreinitialvaluesinanabsoluteprogramsectionwith_ directivessuchas.BYTE,.WORD,.LONG,.QUAD.Usuallythe.BLKx directivesj-areusedin conjunctionwithlabel definitionswithinanabsoluteprogramsectiontojdefinesymbolicoffsetswithina structure.(Comparethis attributewithits opposite,REL.`OXCONConcatenate-Programsectionswiththesamenameand attributes (including^CON)fromothermodulesare concatenatedintooneprogramsectionatlinke time.+Theircontentsare concatenatedintheorderinwhichthelinkeracquiresfbthem.*The allocatedvirtualaddressspaceisthesumofthe individual requestedL allocations.'Comparethis attributewithits opposite,OVL.cO4EXEExecutable-Theprogramsectioncontains instructions.,This attributeprovidesethe capabilityof separating instructionsfrom read-onlyand read/writedata.(Thehlinkerusesthis attributein gatheringprogramsectionsandin verifyingthatthed>transferaddressisinan executableprogramsection.*The assembleronlyallowsjyoutoplace instructionsinaprogramsectionthathaseitherorboththeEXEorRMIX attributes.'Comparethis attributewithits opposite,NOEXE.iOiGBLGlobal-Programsectionsthathavethesamenameand attributeswillbecombinedgatlinktimeintoasingleprogramsectionevenwhenthe individualprogramsec-d tionsarein different clusters.*This attributeis specifiedforFortranCOMMONds blockprogram sections.*Comparethis attributewithits opposite,LCL.Formore1  informationabout clusters,seethe* OpenVMSLinkerUtilityManual  .mOE LCL Local-Theprogramsectionis restrictedtoitscluster.(Comparethis attributewith its opposite,GBL. z   O O AttributeDFunction O eOxMIXMix-Theprogramsectioncancontainbothdataand instructions.)TheMIXand`NOMIX attributesare assembly-time attributesthatonlyaffect assemblerpro-c)cessing.(TheMIXandNOMIX attributesdonotappearintheobjectmoduleandgdonotaffectlinker processing.+Tomix instructionsanddatainthesamepsect,eyoumustspecifytheMIX attribute.(TheNOMIX attributeisthedefault.(Ifyoue3choosetouse instructionsinaNOEXEpsect,orusedata directivesinanEXEdpsect,youmustspecifytheMIX attribute.)The following limitationsapplywhen%usingtheMIX attribute: i ^-i Optimizationsand alignmentofcodelabelsarenot performed.* Optimizations_-and code-label alignmentarenot performedon instructionsplacedinaMIX_-psect, regardlessofwhetherthe.ENABLE/.DISABLEoptionshavebeenset,orM-sifthe command-line /OPTIMIZATIONand/ALIGNMENT=CODEoptions -havebeen specified. J Y-JLimited debugging informationis provided.+NoPC-line(programcounter)e- correlation informationis generatedforthe instructionsplacedinaMIXpsect. " e-"Thelistingfileincludesonlybinaryencoded instructions.(All instructionsthatb-{areplacedinaMIXpsectappearinthe machine-codeportionofthelistingh-file,intheirbinaryencoded instructionformasadata initializertothe.LONG-,data directive.bThereareno restrictionsondata directives..Comparethis attributewithits9  opposite,NOMIX.Formore information,see Section5.1.jO NOEXE)NotExecutable-Theprogramsectioncontainsdataonly;itdoesnotcontainin-f  structions.*The assembleronlyallowsyoutoplacedata allocationsinaprogram`4 sectionthathaseitherorboththeNOEXEandMIX attributes.,Comparethis/  attributewithits opposite,EXE.kO NOMIXThedefault attributewhenyouusethe.PSECT directive.(Comparethis attribute$_ withits opposite,MIX.iO NOPICINon-Position-Independent Content-Theprogramsectionisassignedtoafixedlo-i1 cationinvirtualmemory(whenitisina shareableimage).'Comparethis attribute$ withits opposite,PIC.lO NORDdNonreadable-Reservedforfutureuse.'Comparethis attributewithits opposite,RD.*|?z x  O O AttributeDFunction O oOxNOSHR4No Share-Theprogramsectionisreservedforprivateuseat executiontimebytheT initiatingprocess.'Comparethis attributewithits opposite,SHR.kOKNOWRTNonwritable-Thecontentsoftheprogramsectioncannotbealtered(writteninto)Tat executiontime.'Comparethis attributewithits opposite,WRT.bOOVROverlay-Programsectionswiththesamenameand attributes (includingOVR)dufromothermodulesreceivethesame relocatablebaseaddressinmemoryatlinkjtime.)The allocatedvirtualaddressspaceisthe requested allocationofthelargest]& overlayingprogramsection.'Comparethis attributewithits opposite,CON.kOPICPosition-Independent Content-Theprogramsectioncanbe relocated;thatis,itcanfbeassignedtoanymemoryarea(whenitisina shareableimage).(ComparethisdQ attributewithits opposite,NOPIC.Formore informationabout shareableimages,seethe* OpenVMSLinkerUtilityManual D.iO$RDReadable-Reservedforfutureuse.'Comparethis attributewithits opposite,NORD.kORELRelocatable-Thelinkerassignstheprogramsectiona relocatablebaseaddress.&Thegcontentsoftheprogramsectioncanbecodeordata.)Comparethis attributewithOits opposite,ABS.jOSHR Share-Theprogramsectioncanbesharedat executiontimebymultiple processes.k!This attributeisassignedtoaprogramsectionthatcanbelinkedintoa shareableHyimage.'Comparethis attributewithits opposite,NOSHR.lOWRT Write-Thecontentsoftheprogramsectioncanbealtered(writteninto)atexecu-ML tiontime.&Comparethis attributewithits opposite,NOWRT. Or separatemodulesareoverlaidbythelinker.*TheOVRat-POtributedoesnotaffecthowmultiple contributionstoapsectMOare processedwithinasingleassemblyunit.)*YouneednotNOHrelistthe attributeswhen continuingaprogramsection,butROany attributesthatarelistedmustbethesameasthosepre-OOviouslyineffectfortheprogramsection.*A continuationofMORaprogramsectioncannotcontain attributes conflictingwithROthose specified,or defaulted,intheoriginal.PSECT directive. a~LOThe attributeslistedinthe.PSECT directivedescribetheJOcontentsoftheprogramsection.+ExceptfortheEXEandJO5NOEXE attributes,the assemblerdoesnotchecktoensureNOthatthecontentsoftheprogramsectionactuallyadheretoNOthe attributeslisted.)However,the assemblerandthelinkerNO>docheckthatallprogramsectionswiththesamenamehaveLOexactlythesame attributes.)The assemblerandlinkerdis-NOplayanerrormessageiftheprogramsection attributesareOHnot consistent.lGOProgramsectionnamesare independentoflocalsymbol,GOglobalsymbol,andmacronames.-YoucanusethesameOO5symbolicnameforaprogramsectionandforalocalsymbol,LOglobalsymbol,ormacroname.(Youmaywanttouseunique4Onamesforclarityandmaintainability.ONotes# ` @The.ALIGN directivecannotspecifyan alignmentH(greaterthanthatofthecurrentprogramsection;con-F sequently,.PSECTshouldspecifythelargest alignment,neededintheprogramsection. `Y IYFor efficiencyof executionandeaseof programming,anH alignmentofquadwordorlargeris recommendedforall8 programsectionsthathavequadworddata.g{=OExample,b.PSECT% A,QUAD,EXE;%Code&psects9O.QUAD*P&&OQuadwordstorage directiveZ0OFormat Os .QUADNexpression-listhO ParameterOsexpression-list! O DescriptionCOs.QUAD generates64bits(8bytes)ofbinarydata.ONotes ` GYoucanonlyusethis directivewithindataormixedBpsects(psectsthathaveeithertheNOEXEorMIX4O attributes).'Formore information,see=OSection5.1. ` GIf automaticdata alignmentisenabled,this directiveL&alignsthecurrentlocationcountertoaquadword(64-bit)0boundarybefore allocatingstorage.*={?R{(OExamplebA::%.QUAD%4oJv O.REPEATO].REPT*L""ORepeatblock directiveOFormatOs .REPEAT expression . . D.O range . y. .O .ENDR4  O ParametersOs expressionMOAn expressionwhosevaluecontrolsthenumberoftimestheMO$rangeistobe assembledwithintheprogram.(Whentheex-RO|pressionislessthanorequalto0,therepeatblockisnotJO assembled.+The expressionmustbeabsoluteor relocatableKO-andmustnotcontainany undefinedsymbols.(The assemblerQOconvertsa relocatablevaluetotherelativeoffsetwithintheOpsect.nOrangePOThesourcetexttoberepeatedthenumberoftimes specifiedPOqbythevalueofthe expression.)TherepeatblockcancontainKOmacro definitionsorotherrepeatblocks.+.MEXITislegalMO"withintherangeandcausesthecurrentandall succeeding'O{ repetitionstobeaborted.G hO DescriptionOOs.REPEATrepeatsablockofcodea specifiednumberoftimesPOinlinewithothersourcecode.'The.ENDR directive specifies#O$theendoftherange.ONotes7OOThe alternateformof.REPEATis.REPT.<OExamplesXExample1G4The followingmacro definitionusesthe.REPEATdirec-NtivetostoreanASCIIstringa specifiednumberoftimes,#followedbya0byte:$j.MACROKCOPIESJ STRING,NUM.REPEAT&NUM.ASCIIK"STRING"B.ENDR.BYTEp0.ENDMpCOPIESExample2L4The followingmacrocallstoresfivecopiesofthestringAABCDEF.Thisexampleisdividedintofourparts:bU8Macro invocation:<COPIESK ,5q4Macro expansionof.REPEAT invocation:.REPEAT%5P.ASCIIJ"ABCDEF".ENDRA.REPEAT expansion:.ASCIIJ"ABCDEF"P.ASCIIJ"ABCDEF".ASCIIJ"ABCDEF".ASCIIJ"ABCDEF"(.ASCIIJ"ABCDEF"`!6$Endofmacro expansion:.BYTEp0Example3M4The followingmacrocallstoresthreecopiesofthestringCHowManyTimes.-Thisexampleisdividedintofourparts:iYMacro invocation:VARB%=%3)PCOPIESJ,VARB~4Macro expansionof.REPEAT invocation:.REPEAT%VARB$P.ASCIIJ"How%Many&Times".ENDR.REPEAT expansion:$.ASCIIJ"How%Many&Times"$P.ASCIIJ"How%Many&Times"$.ASCIIJ"How%Many&Times"`!6$Endofmacro expansion:.BYTEp0Tv*O.RESTORE_PSECTO].RESTORE*kAAORestorepreviousprogramsectioncontext directived:OFormatOs .RESTORE_PSECTO .RESTOREs IO DescriptionEOs.RESTORE_PSECT retrievestheprogramsectionfromtheNOtopoftheprogramsectioncontextstack,aninternalstackIO$inthe assembler.+Ifthestackisemptywhen .RESTORE_KO|PSECTisissued,the assemblerdisplaysanerrormessage.COWhen.RESTORE_PSECT retrievesaprogramsection,itLO-restoresthecurrentlocationcountertothevalueithadGOwhentheprogramsectionwassaved.)ThemaximumstackKOlevelis50.+Seethe descriptionof .SAVE_PSECTformoreO7 information.ONotes `b AbThe alternateformof.RESTORE_PSECTis .RESTORE. ` CYoucannotuse.RESTORE_PSECTto overwritepreviousC: data-storageinitializations..Inthe followingexam-Hple,MACRO-64attemptstostore42over43andfails,' resultingina diagnostic:p.PSECT%A.SAVE%PSECT.PSECT%AH.QUAD%43.RESTORE%PSECT.QUAD%42 OExampleib.PSECT& A,QUAD,NOEXEA1:%.WORD%5A2:%.QUAD%6i: .SAVE_PSECT%/:;%Saves%psect%A%contexti.PSECT& B,QUAD,NOEXEB1:%.WORD%69i.RESTORE_PSECT;%Return&A%location%counterZA3:%.WORD%5i.PSECT& B,QUAD,NOEXE 1$:%.WORD%5IiS.SAVE% LOCAL_BLOCKK;%Saves%psect%B%context&and% temporary/;%label%contexti.PSECT&C,NOEXEL1$:%.WORD%6;i.RESTORE_PSECT;%Restores%psect%B%and%saves/;%label%contexti$.ADDRESS%1$)/$;% References%the%address%of+/l;%psect%B% temporary%label%1$DNv$O .SAVE_PSECTO].SAVE* g ==OSavecurrentprogramsectioncontext directive| ROFormat$Os .SAVE_PSECTN [LOCAL_BLOCK]O .SAVEN [LOCAL_BLOCK]S ! D)O DescriptionJOs .SAVE_PSECTstoresthecurrentprogramsectioncontextonQOthetopoftheprogramsectioncontextstack,aninternalas-NO$semblerstack.(ItleavesthecurrentprogramsectioncontextOO|ineffect.)TheprogramsectioncontextstackcanholduptoRO50entries.'Eachentryincludesthevalueofthecurrentloca-NO-tioncounterandthemaximumvalueassignedtothelocationPOcounterinthecurrentprogramsection.*IfthestackisfullAOwhen .SAVE_PSECTis encountered,anerroroccurs.JOzIfthe LOCAL_BLOCKoptionis specified,thecurrenttem-OOporarylabelblockissavedwiththecurrentprogramsectionO+context.  ! (CO .SAVE_PSECTand.RESTORE_PSECTare especiallyusefulQOinmacrosthatdefineprogram sections.'Seethe descriptionof?Oi.RESTORE_PSECTforanexampleusing .SAVE_PSECT.ONotespF ` ;The alternateformof .SAVE_PSECTis.SAVE.<"w A?OTable5-7:8.SHOWand.NOSHOWSymbolic Arguments O OFLongForm(FShortFormPDefaultFunction Ob OBINARYIMEBNoshowListsmacroandrepeatblock expansionsthat<$generatebinarycode.+BINARYisasubsetof| EXPANSIONS.\O CONDITIONALSMCNDNoshowLists unsatisfied conditionalcode associatedwith1Othe conditionalassembly directives.O EXPANSIONSME?NoshowListsmacroandrepeatrange expansions.OBLIBRARYMBNoneNoshowIncludesthemacro definitionsinalibraryinthelisting.OINCLUDEKNoneNoshowListsincludefiletextinthelistingfile. O;  ?O .S_FLOATING*qGGOSingle-precisionIEEEfloating-point arithmetic directivekAOFormat1Os .S_FLOATINGNfloating-point-number-list(O Parameter$Osfloating-point-number-listNOAlistofIEEEsingle-precisionfloating-point constantssep-IO$aratedbycommas.)Formore informationonfloating-pointO|numbers,see8|Section2.3.2.*8??a ]7O DescriptionFOs .S_FLOATING evaluatesthe specifiedfloating-pointcon-JOstantsandstorestheresultsintheobjectmodule./.S_DO$FLOATING generates32-bit,single-precision, floating-TO|pointdata(1bitofsign,8bitsof exponent,and23bitsofLO fractionalsignificance).'Seethe descriptionof .T_FLOATINGIO-for informationonstoringdouble-precisionfloating-pointAOIEEEnumbersandthe descriptionsof .D_FLOATING,FO .F_FLOATING,and .G_FLOATINGfor descriptionsofother"O7floating-pointnumbers.ONotes `b GbYoucanonlyusethis directivewithindataormixedBpsects(psectsthathaveeithertheNOEXEorMIX4 attributes).'Formore information,see=Section5.3. ` GIf automaticdata alignmentisenabled,this directiveLalignsthecurrentlocationcountertoalongword(32-bit)0Dboundarybefore allocatingstorage.*={?_{5OExample$b .S_FLOATING% 2.0,3.0,4.405 Jv O.SHOWO].NOSHOW*b88OListing inclusionand exclusion directives|ROFormat Os .SHOWN[argument-list]"O .NOSHOWN[argument-list]F O ParameterOs[argument-list]GOUseoneormoreofthesymbolic argumentsdefinedinO$Table5-7.@$YoucanuseeitherthelongformortheshortKO|formofthe arguments.)Ifyouspecifymultiple arguments,LOyoumustseparatethembycommas.(IfanyargumentisnotRO- specificallyincludedinalistingcontrol statement,theassem-LOblerassumesitsdefaultvalue(showornoshow) throughoutOthesourceprogram.*Od? O DescriptionEOF.SHOWand.NOSHOWspecifylistingcontroloptionsinGOthesourcetextofaprogram..Youcanuse.SHOWand9O.NOSHOWwithorwithoutanargumentlist.JOWhenyouusethemwithanargumentlist,.SHOWincludes;Oand.NOSHOWexcludesthelines specifiedinTable5-7.LOC.SHOWand.NOSHOWcontrolthelistingofthesourcelinesROthatarein conditionalassemblyblocks(seethe descriptionofKO.IF),macros,andrepeatblocks.*Whenyouusethemwith-POMout arguments,these directivesalterthelistinglevelcount.POThelistinglevelcountis initializedto0.)Eachtime.SHOWPOappearsinaprogram,thelistinglevelcountis incremented;LOVEachtime.NOSHOWappearsinaprogram,thelistinglevel!Ocountis decremented.*d?1QOWhenthelistinglevelcountis negative,thelistingissup-MOpressedunlessthelinecontainsanerror.) Conversely,whenQOithelistinglevelcountis positive,thelistingis generated.ROWhenthecountis0,thelineiseitherlistedor suppressed,OO dependingonthevalueofthelistingcontrolsymbolicargu-Orments.ONotes[ 1 ` LThelistinglevelcountallowsmacrostobelistedselec-G(tively;amacro definitioncanspecify.NOSHOWattheH beginningto decrementthelistingcountandcanspec-Mify.SHOWattheendtorestorethelistingcounttoits2originalvalue. ` DThe alternateformsof.SHOWand.NOSHOWare.LIST and.NLIST. ` HTheinitialsettingforeach .LIST/.SHOWoption(exceptABINARY)isobtainedfromthe command-linesettingC:usingthe/SHOW qualifier.,Formore informationon( command-line qualifiers,seeSection1.2. ` 7The/[NO]SHOW=BINARY option overrides the'k .[NO]SHOWBINARY directive.*V|?1 "OExampleHb.NOSHOWp;%Turn&off%listing&file%display.KCounter%<%0. D. D. D:.E.SHOW;%Turn&on&listing%file%display.JCounter%=&0.2I;%Value%of%.SHOW%options&are%used. D. DZ. D.>.SHOW;%Counter&>%0.KListing%file%display&is VAXMACROand InstructionSet ReferenceManual Xfordetails.m4{COExample2b .SUBTITLE% "Terminal&Display% Routines" ?5O .T_FLOATING*6q7GGODouble-precisionIEEEfloating-point arithmetic directivek8AOFormat1Os .T_FLOATINGNfloating-point-number-list(9O Parameter$Osfloating-point-number-listNOAlistofIEEEdouble-precisionfloating-point constantssep-IO$aratedbycommas.)Formore informationonfloating-pointO|numbers,see8|Section2.3.2.*98??d:! ]:O DescriptionFOs .T_FLOATING evaluatesthe specifiedfloating-pointcon-JOstantsandstorestheresultsintheobjectmodule./.T_DO$FLOATING generates64-bit,double-precision, floating-UO|pointdata(1bitofsign,11bitsof exponent,and52bitsofLO fractionalsignificance).'Seethe descriptionof .S_FLOATINGIO-for informationonstoringsingle-precisionfloating-pointFOIEEEnumbersandthe descriptionsof .D_FLOATING,.F_CO FLOATING,and .G_FLOATINGfor descriptionsofother"O7floating-pointnumbers.ONotes `b GbYoucanonlyusethis directivewithindataormixedBpsects(psectsthathaveeithertheNOEXEorMIX4 attributes).'Formore information,see=Section5.1. ` GIf automaticdata alignmentisenabled,this directiveLalignsthecurrentlocationcountertoaquadword(64-bit)0Dboundarybefore allocatingstorage.*:={?^;{4OExample#b .T_FLOATING% 4.5036,6.034/ :<O.TITLE*=M>##OListingtitle directivej?@OFormat0Os .TITLEN module-name["listing-title"]@O ParametersOs module-nameNOEitheraquotedliteraloran identifierthat specifiestheNO$module'stitle.*Formore informationonquoted literals,seeO|Section2.4.*@O?|?$A O"listing-title"RO(Optionalquotedliteralthat specifiesatitletoappearwithinTOthefirstlineofeachlistingoutputfile.'Formore information$Oonquoted literals,see\Section2.4.*A\|?B O Description VAXMACROand InstructionSet ReferenceManual Xforjdetails.iC{?OExample.b.TITLE%"MAIN"&"Main&Entry&Point"LADO .UNDEFINE_REG*EYF//OUndefineregistersymbol directiveYG/OFormatOs .UNDEFINE_REGNregsymH rO ParameterOsregsymOOA currentlydefinedfloating-pointorintegerregistersymbol.JI  O DescriptionOOsTheregistersymbolthatyouspecifyastheargumenttotheIO.UNDEFINED_REG directiveisnolongeraregistersymbol.HO$Startingwiththe statementthatfollowsthe .UNDEFINE_FO|REG directive,youcanusethesymbolasaMACRO-64O identifier.O{Notes ` HIfyouspecifyaMACRO-64 identifierthatisnotcur-DXrentlydefinedasaregistersymbol,the .UNDEFINE_*REG directivehasnoeffect./J $OExample?Db .DEFINE_IREGKX1R5;%X1%is%integer&register&5D .UNDEFINE_REG&X1*Y;%X1%is%an% identifier&againD .DEFINE_IREGKX17,Y;%X1%is%integer&register&7%- O:no+;K redefinition%and%no%warningi$ROUTINE%F0-;%Error:&F0&is&a%register%and%3;Kcannot%be%used&as&an{;K identifieri .UNDEFINE_REG%F0,;%F0%is%no%longer&a%registeri $ROUTINE%F0 ;%Ok%now9KO.WARN*LFMOWarning directiveYN/OFormatOs .WARNNquoted-literal O! O ParameterOsquoted-literalQOThestringof charactersenclosedinquotesare displayeddur-LO$ing assembly.*Formore informationonquoted literals,seeO|Section2.4.*OO?|?P! IrO DescriptionIOs.WARNcausesthe assemblertodisplayawarningmessageXOontheterminalorinthebatchlogfile,andinthelistingfileO$(ifthereisone).ONotes `O CO.PRINT,.WARN,and.ERRORare directivesthatdis-Hplay messages.(Youcanusethemtodisplay informationI indicatingan unexpectedor importantassembly condition. ` GThis directivealsoacceptsVAXMACROsyntax.(Seethe> VAXMACROand InstructionSet ReferenceManual Xfor0details.Q SOExample9b.WARN%"Illegal% parameter%value;&0%assumed" ^Z%MACRO64-W-GENWARN,& Generated%WARNING:%Illegal& parameter%value;%0%assumed?:at%line&number%3&in&file%DISK$:[TEST]WARN.M64;249RO.WEAK*SVT,,OWeaksymbol attribute directiveVU,OFormatOs .WEAKN symbol-listVbO ParameterOs symbol-list:OAlistof identifiers separatedbycommas.W DvO DescriptionKOs.WEAK specifiessymbolsthatareeitherdefined externallyOOinanothermoduleordefinedgloballyinthecurrentmodule.LO$.WEAK suppressesanyobjectlibrarysearchforthesymbol.LOWhen.WEAK specifiesasymbolthatisnotdefinedintheJOcurrentmodule,thesymbolis externallydefined.-IftheROplinkerfindsthesymbol's definitioninanothermodule,itusesQOthat definition.+Ifthelinkerdoesnotfindanexternaldef-RO!inition,thesymbolhasavalueof0andthelinkerdoesnotROzreportanerror.)ThelinkerdoesnotsearchalibraryfortheROsymbol,butifamodulebroughtinfromalibraryforanotherLO+reasoncontainsthesymbol definition,thelinkerusesit.XMOWhen.WEAK specifiesasymbolthatisdefinedinthecur-POrentmodule,thesymbolis consideredtobegloballydefined.LOiHowever,ifthismoduleisinsertedinanobjectlibrary,MOthissymbolisnotinsertedinthe library'ssymboltable.MO Consequently, searchingthelibraryatlinktimetoresolveHOrthissymboldoesnotcausethemoduletobe included.YSOExampleib.WEAK%A,B,CEA::%.WORD%5;%A&and%B&are%weak&global% definitionsB::%.QUAD%6=i:.ADDRESS%CJ;%C&is&a%weak%external% reference 9ZO.WORD*[L\""OWordstorage directiveZ]0OFormat Os .WORDNexpression-list^=O ParameterOsexpression-listGOOneormore expressions separatedbycommas.+Formore8O$ informationontermsand expressions,seeE$Section2.8.*^E|?_! O DescriptionLOs.WORD generates successivewords(2bytes)ofdataintheOobjectmodule.OqNotes ` KThe expressionisfirst evaluatedasaquadwordandthenJO truncatedtoaword.)Thevalueofthe expressionshould beintherangeof l432,768to+32,767forsigneddataorK0to65,535forunsigneddata.(The assemblerdisplaysanMXerrorifthe high-order6bytesofthequadword expression@haveavalueotherthanzeroor^XFFFFFFFFFFFF. `0 G0The assembler truncatesontheleftofanintegerorexternalvalue. ` 4 Addressesarenotallowedwith.WORD. ` GYoucanonlyusethis directivewithindataormixedBpsects(psectsthathaveeithertheNOEXEorMIX48 attributes).'Formore information,see=8Section5.1. ` GIf automaticdata alignmentisenabled,this directiveHalignsthecurrentlocationcountertoaword(16-bit)0iboundarybefore allocatingstorage.*_={?Q`{'OExampleb.WORD%5,6,7 h! ,O6.2BRoutinesandLexicalScopePOUThecalling-standardmacrosusetheconceptofasingle,cur-OOrent,activeroutine.)Aroutineisa programmingentitythatPOis associatedwitha procedure descriptorthatmaybecalled,PO^orisamainroutine specifiedasthetransferaddressofaOlinkedimage./i! POOnlyoneroutinecanbeactiveorcurrentatanygiventimeMOduring assembly.+IfmorethanoneroutineisdefinedinaSO5single assemblersourcefile,allitems associatedwiththecur-SOrentroutine,thatis,withinthelexicalscopeoftheroutine,NOmustbe completedbeforemakinga differentroutinecurrent.NO>Thelexicalscopeofoneroutinecannotoverlapthelexical&Oscopeofanotherroutine.j^JOAroutinebecomescurrentorcomesintoscopebyinvok-GOingthe$ROUTINEmacrowiththe appropriate arguments.IO5$ROUTINEmarksthe beginningofthelexicalscopeofa=Oroutine.-The complementarymacro, $END_ROUTINE,GOmarkstheendofthecurrent routine'slexicalscope.kM{1O6.2.1BRoutinesandProgramSectionsJO4Routineshavethreetypesof associatedprogram sections:#l!  ` HCodesection-Containsthe executable instructionsoftheM(routine.'Thissectionis typically read-onlyand executable. ` ADatasection-Containsdataaccessedbyaroutine.HY Typically,thisiswherevariabledataisstored.-ThisLsectionis typicallynonexecutable, readable,and writeable. ` FLinkagesection-Containsa routine's proceduredescrip-Ftorandthe necessarylinkage informationforcallingN:other routines,andforlinkagetodatanotinthelinkageKsection,ifany.*Also,constantdatamaybeplacedhere.I Typically,thissectionis read-onlyandnot executable.mtKbThelinkagesectionis consideredatypeofdatasection)withthe following function:npF-DProvideslinkage informationforcallsmadefroma;Y(routine associatedwiththelinkagesection.H-DProvideslinkage informationfordataoutsideoftheYlinkagesection.G-DDefinesthe associated routine's procedure descriptor;Ysothatcallscanbemadetotheroutine.1W-DDefinesconstantorstaticdata.*oB 9OExample6-1:7ProgramUsingSuppliedMacrosBzB$ROUTINE&MAIN,& KIND=STACK,&-%;%Stack%routine&kind B1+SAVED_REGS=,&-%;%Saves%FP 2SIZE=48 D;%Stack%size&is&48 v3z;$LINKAGE_SECTION-D;;%Switch%to%the&linkage%psect. ;4OX:.long&6D;%X&is&a%constantO FP1_ADDR:D;%FP1_ADDR%->%FP1z4.address&FP1z $DATA_SECTION+D;%Switch%to%the&data%section 5OA::.blkw&5D;%$DS%points&hereOOB::.blkwz $CODE_SECTION+D;%Switch%to%the&code%section 6 D;%($CS&points%here) H. . .z$RETURN+D;%Perform&epilogue&and%return 7z $END_ROUTINE%MAIN-D;%Mark&the%end%of%the&routine 8 os.OExample6-2:7ProgramUsing$CALL . _. .z $CODE_SECTION+D;%Switch%to%the&code%section D7;%($CS&points%here) . . .zWMOVR27,R2 ;W1z.basepR2,&$LS ;2 . /. w.z$CALL&SUB1*D;%Call&external&routine%SUB1 3Az$CALL&SUB2,& LOCAL=TRUE;%Call&local&routine%SUB2 4 O. . .z'$RETURN+D';%Perform&epilogue&and%returnzo $END_ROUTINE%MAIN-Do;%Mark&the%end%of%the&routine c 9=O6.4B ProgrammingExamplesUsingSuppliedMacrosOUExamples U6-1 cUand U6-23Ushowhowtousethecalling-standardLOmacrostodefinearoutine,switchcontrolbetweenpsects,DOgenerateanepilogue sequence,andendtheroutine.*?*?!  1D$ROUTINEdefinestheroutineMAIN.TheroutinetypeDisdefinedasastackroutineusingthe KIND=STACKYkeyword argument. 2<ThekeywordargumentSAVED_REGS=addstheP1framepointerregistertothelistof registerssavedontheCstackbytheprologuecode.)The SAVED_REGSkeywordMisvalidonlyforstack procedures.+IfyoudonotspecifyK;theFPregister(R29)withthis argument,itisassumed. 3DThekeywordargumentSIZE=48definesthestackareaIinbytes.,ThisargumentisvalidonlyforregisterandMkstack routines.,IfyoudonotspecifyastacksizeforaFstackorregisterroutine,$ROUTINEcomputesthemin-Bimumstacksizerequiredto accommodatetheother?u argumentsyouspecifyorleaveasthedefault. 4@The$LINKAGE_SECTIONmacroswitchestothelink-JMagesection.*Youcanusethe$LSsymbolcreatedbytheH$ROUTINEmacrotopointtotheaddressofthecurrentF routine'slinkagesection.($ROUTINEcreatestheproce-HWdure descriptorandleavesthecurrentlocationcounterEwithinthelinkagesectionjustbeyondthe procedure descriptor. 5<The $DATA_SECTIONmacroswitchestothedataEsection..Youcanusethe$DSsymbolcreatedbytheH8 $ROUTINEmacrotopointtotheaddressofthecurrent#  routine'sdatasection.  6B The $CODE_SECTIONmacroswitchestothecodesec-Dh tion.)The$CSsymbolcreatedbythe$ROUTINEmacroR isusedtopointtotheaddressofthecurrent routine'scode section. 7D The$RETURNmacro generatesastandardepiloguein-F  struction sequence.,YoucanusethismacroonlywithDJ stackorregisterroutinedefinedwiththe$ROUTINE macro. " 8<" The $END_ROUTINEmacromarkstheendofthez routine. 'O6.5BUsingthe$CALLMacroNOU$CALLcallslocalorexternalroutines previouslydefinedbyCOthe$ROUTINEmacroordefinedinanother language. JOTocallaroutineusingstandardlinkage,usethe$CALLNOmacro.'Youinvokethismacrofromwithinthe routine'scode=Oisection.'$CALLperformsthe followingactions:6 r  ` NSearchesalistoflinkagepairs referencedinpreviousin-?( vocationsofthe$CALLand $LINKAGE_PAIRmacrosKwithinthecallingroutine.+IfalinkagepairisalreadyKfoundtoexistonthelist,$CALLusesthelinkagepairE2storedfromtheprevious invocation.* Otherwise,$CALLQstoresthelinkagepairofthecalledroutineinthecaller'sLlinkagesectionandaddsthelinkagepairtothecaller's<list. ` B Allocatesstackspacefor arguments,if necessary. `: F:Loads arguments specifiedwiththeARGSargumentintoGargument registersandontothestack,as appropriate. ` GSetsthe arguments information register,R25, according>ktothe arguments specifiedwithARGS argument. ` G Generatesthe following instructionsequencetoperformMCtheactualcallbasedonthelocationofthelinkagepairK generatedfromabove,andthevalueofRls,linkagereg-Pister,whichisassumedtopointtothebaseofthelinkageLsection:BLDQ%R26,%code_addr_offset(Rls);&load%code%addressCLDQ%R27,%proc_desc_addr_offset(Rls)%;&load% procedure a;& descriptor%address ;JSR%R26,%R26#;&Jump%to%the&routine 9 ;Ksaving%the&return ;Kaddress&in&R26 ` H Freesargumentstackspace,ifany,andifthecalled?Y routinedoesnotreturnavalueonthestack.p<bLike $ROUTINE,the$CALLmacroinvokesother4macrostoperformtheprevioustasks. bMbIfyoudonotspecifytheRlsargumentinyour invocationGof$CALL,$CALLassumesthatyouhaveusedthe.BASEN directivetodefinearegisterthatpointstothebasead-Oldressofyourlinkagesection.'Thatis,itassumesthatyouDhaveincludeda statementsimilartothe following:I.BASE%R27,&$LSIGbThissource statementdefinesthebaseaddressoftheLlinkagesectiontobeR27,andtobe associatedwiththeBmacrosymbol$LS.Thissource statementshouldbeJlplacedinyoursourcecodebeforethe$CALLmacrocall.) /O6.5.1BUsing$CALLinSourceCodeO4Example6-2'F4usesthesourcecodefrom4Example6-1, 4ex-SOceptitusesthe$CALLmacrotoshowhowtocallalocalandOexternalroutine.*OO*O  1LThe$LSsymbolisdefinedtobetheaddressofthepro-Hcedurethatisdefinedwithinthelinkagesection.,TheIYcallingroutineplacestheaddressofthe procedurede-IscriptorinR27beforemakingthecall.)This guaranteesL thattheaddress associatedwiththesymbol$LSisstoredJcinR27uponroutineentry.)Sincethe informationinR27Liserasedduringastandardcall,acopyis preservedinregisterR2. 2GRegisterR2nowcontainstheaddressofour procedureL descriptor,whichisthebaseaddressofourlinkagesec-OEtion.*Since$LSisdefinedtopointtothebaseaddressofHthelinkagesection,the assemblercomputestheoffsetsFwithinthelinkagesectionusingthe.BASE directive. u3AuThe$CALLmacrocallstheexternalroutineSUB1. 4JThe$CALLmacrocallsthelocalroutineSUB2.'Thiscall@Musesthe LOCAL=TRUEkeywordargumenttoindicate@thatroutineSUB2isdefinedwithinthemodule. ! 6O6.7BMacro DescriptionsandSyntaxRulesNOUThissectionprovidesadetailed descriptionoftheMACRO-643Omacrosaswellasthesyntaxrules.)! IOYoucanuseeither positionalorkeywordargumentasso-NOciationora combinationofthetwowiththesemacros.*ForPO5 positional association,theorderofformal argumentsisshownNOwiththeformatofeachmacro.'Formore informationonar-#Ogument association,seeChapter4.'BThe followingsyntaxrulesIO>applywheninvokingthe assemblerusingthe command-line"O qualifier /NAMES=AS_IS:*jO! - ` CWhen specifyingmacronames,youmustuseallup-D(percaseorall lowercase characters.,Youcannotmix0 uppercaseand lowercase characters. ` DWhen specifyingkeyword arguments,youmustusetheJYsame alphabeticcaseasthemacronameitis associatedFwith.+Ifyouuse lowercase characterswiththemacroG name,youmustuse lowercase characterswiththekey-Icword argument.'Ifyouuse uppercase characterswiththeCmacroname,youmustuse uppercase characterswith!thekeyword argument.q l&OTable6-1:8ARGS Arguments O OFArgumentO QualifierArgumentType_LOAD_ InstructionSTORE Instruction AIEncodingkRegArgk SignatureMemArg Signature O  Of/A*fAddressLDASTQI64I32I32 O/D D-8floating_LDGSTGFDFDQ O/F+ F-floatingGLDFSTFFFFFI32 O,/G ,G-floating_,LDGSTGFGFGQ O/L+LongwordLLDLSTQI64I32I32 Ox/Q$xQuadwordALDQSTQI64Q xQ O/S+ S-floatingQLDSSTSFSFSI32 Ol/T)l T-floatingGLDTSTTFTFTQ O/UL 1Unsigned>Longword_LDL/ _>ZAP_#^xF0STQI64U32I32 O  O*1mFUnsigned32-bitintegersarenormallypassedusingthe/Largument qualifier. Therefore,Digitaldoesnot recommendthat2Oyouusethe/ULargument qualifier. O CO$BEGIN_EPILOGUE*sIIOMarksthe beginningofanepilogue instruction sequence.S)OFormatOs $BEGIN_EPILOGUE! :kO DescriptionBOs$BEGIN_EPILOGUEmarksthe beginningofanepiloguePO instructionsequencethatyoucodewithinastackorregister7O$routinedefinedwiththe$ROUTINEmacro.SOAteachpointwhereastackorregisterroutinereturnstoitsOOcaller,theroutinemustperformasequenceof operationstoNOprestoreanysaved registersandtoperformstackframeman-QOagement.'Thissequenceiscalledtheepilogueandis describedO!indetailinthe$q! OpenVMSCallingStandard e!.GOYoucanusethe$RETURNmacrotogenerateastandardNOepilogue instructionsequenceforyou,oryoucancodeyourLO5own sequence.)Ifyoucodeyourownepilogue sequence,youKOmustmarkthe beginningandendoftheepiloguesequence8Owiththe$BEGIN_EPILOGUEand $END_EPILOGUEO>macros.ONotes ` =Youmustnotuse$BEGIN_EPILOGUEforanepi-?.logue instructionsequence generatedby$RETURN.:$RETURN automaticallyinvokes$BEGIN_EPILOGUEand$END_EPILOGUE.n DOExample7b$ROUTINE&MUMBLE,%KIND=REGISTER,% SAVE_FP=R1 : : ::$BEGIN_EPILOGUEMOVR1,FP%;&Restore%caller's%frameRET(R26);&Return%to%callerZ $END_EPILOGUE : : 2:z $END_ROUTINE%MUMBLEO=9O$CALL*Z00OIssuesacalltoanotherroutine.~ cTOFormat-Os $CALLNNAME=routine-being-called-+ [Rls=linkage-section-register]-)$ [LS=linkage-section-address]-| [LOCAL=boolean]-! [ARGS=argument-list]-)- [SET_ARG_INFO=boolean-value]-/ "[STACK_RETURN_VALUE=boolean-value]-, [SCRATCH_REGS=scratch_reg-list]- 7 [TIE=boolean-value]- [FUNC_RETURN=; 1{I64,D64,I32,U32,FF,FD,FG,FS,FT,FDC,FGC,FSC,FTC}] A -- [USES_VAX_ARGLIST=boolean-value]-0 #[SIGNATURE_BLOCK=signature_address]-(J ONSTANDARD=boolean-value]-qO ParametersOsNAMEOOThenameoftheroutinetocall.'Thisargumentis required.gA = ORlsJO(Linkagesectionregistertousewhen generatingtheLDQ,JOLDQ,JSR instruction sequence.&Thisargumentis optional.MOIfRlsisomitted,$CALLassumesthatyouentereda.BASEKOu directivebeforeinvoking$CALLthat establishesthevaluePOofabaseregisterpointingintothelinkagesection.+IfyouLO&omittheRlsargumentandyoudonotentersucha.BASEJO~ directivebeforeinvoking$CALL,the assemblerissuestheJO followingerrormessageduringthe$CALLmacro expansion:E\ "Argument&2%invalid"KThe% assembler%failed&to&find%aH base%register% specified&with%a%previous%.BASE% directiveG to&form%a%register% expression&of&the%form& offset(Rn)" h OLSOO(LSistheaddressofthelinkagesection.+Ifyouuse$CALLIOwithinaroutinedefinedbythe$ROUTINEmacro,theLSJOargumentdefaultstothe$LSsymboldefinedby $ROUTINE.HO2Ifyouuse$CALLoutsideofaroutinedefinedbytheFO$ROUTINEmacro,therearetwowaysthatyoucanin-SOdicatethelocationofthelinkagesectionto$CALL.First,youMO<canspecifytheLSargumentto$CALLasa relocatablead-SOdress expressionthat indicatesthebaseofthelinkagesection.POInthiscaseyoumustalsospecifytheRls argument.(Second,QOEyoucanspecifyboththelinkage-sectionbaseregisterandtheKOlinkage-sectionaddressina.BASE directivebeforeinvok-POing$CALL.Inthiscase,youmustomitboththeRlsandLSOO argumentsto$CALL.LODigital recommendsthatyouomitthisargumentifyouuseGO$CALLwithinaroutinedefinedbythe$ROUTINEmacro.OLOCALHO(ABooleanvalue(TRUEorFALSE)that specifieswhetherVOtheroutinetobecalledislocaltothemoduleorgloballyvis-ROible.*Bydefault,$CALL generatesacalltoagloballyvisibleRO2routine.+Togenerateacalltoaroutinethatisnotglobally3Ovisible,youmustspecify LOCAL=TRUE. OARGSPO(Anoptionallistof argumentstopasstothecalledroutine.NOEnclosetheargumentlistwithinanglebrackets( <> )andNOseparatethe argumentswithcommas( , ).)YoucanusetheNO2 following qualifierswitheachargumentyouspecifywiththeOARGS argument.Table6-1'S describesthese qualifiers.*Nb?! KOEachargumentisanaddress expression(whichmayincludeTOa register)followedbya qualifier.'ThetablealsocontainsthePO5argumenttype,the instructionusedtoloadtheargumentintoQOa register,the instructionusedtostoretheargumentontheKOstack,andthe encodingsusedintheArgument InformationNO>Register(R25)inthecall signatureblockwhenyouspecifyO TIE=TRUE.Seethe$< OpenVMSCallingStandardOformoreHO informationonthese encodings.*Notethat argumentsareROHonlystoredonthestackiftherearemorethansix arguments%Oprovidedtotheroutine.O SET_ARG_INFOKOAnoptionalargumenttoindicatewhether$CALLshouldsetKOTtheArgument Information(AI)register(R25)withtheap-OO propriateargument informationornot.(Bydefault,orifyouAOspecifySET_ARG_INFO=TRUE,$CALLstorestheappro-IO^priateargument informationinR25.+IfyouspecifySET_9OARG_INFO=FALSE,$CALLdoesnotaffectR25.! JOIfyouwanttoconformtotheOpenVMSCalling Standard,LOyoumuststorethe appropriate informationinR25yourselfPOibeforeinvoking$CALL.'IfyoudonotneedtoconformtotheJOOpenVMSCalling Standard,andifthecalledroutinedoesMOnotneedargument informationinR25,youcanspecifySET_COrARG_INFO=FALSEandmakenochangeinR25.(Bymak-NOingnochangeinR25,youavoidtheoverheadinvolvedwhenLO#eitheryouor$CALLloadargument informationintoR25at;O|theexpenseofcallingstandard conformance.! OSTACK_RETURN_VALUEOO(Anoptionalargumenttoindicatethatthecalledroutinere-NOturnsavalueonthestack.(Bydefault,$CALLassumesthatPOthecalledroutinedoesnotreturnavalueonthestack.*InNO2thiscase,$CALLremovesany argumentspassedtothecalledIOroutinefromthestackwhenthecalledroutinereturns. aPOIfthecalledroutinereturnsavalueonthestack,there-JOturnedvalueisplacedataloweraddressthanthear-GO5gumentsonthestack.0Inthiscase,youmustspecify;OSTACK_RETURN_VALUE=TRUEtoprevent$CALLfromNOremovingthe argumentstothecalledroutinefromthestackLO>anderasingthevaluereturnedbythecalledroutine.+YouPOmustretrievethereturnvalueandremoveitfromthestack.JOThenyoucanremovethe argumentstothecalledroutineBOHusingthe$STACK_ARG_SIZEsymboldefinedby$CALL. hO SCRATCH_REGSOO(Anoptionallistofscratch registersfor$CALLtousewhenLO processing argumentspassedtothecalledroutinewiththeMOARGS argument.&Ifyoupassmorethansix argumentstotheMO2calledroutine,$CALLmayneedtousescratch registerstoOprocessthecall.NFOBydefault,$CALLusesR0,R1,F0,andF1./YoucanIOcause$CALLtouse differentscratch registerswiththe!O5 SCRATCH_REGS argument.$NOIfyouarepassinginteger arguments,youshouldspecifyatOOleastoneinteger register.*Ifyouarepassingfloating-pointJO5 arguments,youshouldspecifyatleastonefloating-pointO register. NMO$CALLcanprocess argumentstothecalledroutinemoreef-QO ficientlyifyouspecifytwoormorescratch registersoftheOO5typeortypes appropriatetothe argumentsyouare passsing.j @ OTIEHO(ABooleanvalue(TRUEorFALSE)that specifieswhetherGO$CALLshouldgenerateacallsequencethatiscompat-IOiblewithbothnativeroutinesandthe TranslatedImageHO2 Environment(TIE).Bydefault,$CALL generatesafasterQOcallsequencethatisonly compatiblewithnative routines.(IfFOyouspecify TIE=TRUE,$CALL generatesacallsequenceOO<thatworkswithbothnativeroutinesand translated routines.OOIfyouarecallingaVAXroutineina shareableimagethatGOhasbeen translatedwiththe DECmigrateimagetransla-NOEtor,specify TIE=TRUE.Ifyouarecallinganativeroutine,JODigital recommendsyoudefaulttheTIEargumentorspec-EOify TIE=FALSE.While$CALL generatesacallsequenceJOOthatis compatiblewithnativeroutineswhenyouspecifyFO TIE=TRUE,thatcallsequenceisslowerthanwhenyou*Ospecifyordefault TIE=FALSE. pO FUNC_RETURNMO(AnoptionalargumentusedtoindicatethetypeoffunctionIOreturnwhenyoualsospecify TIE=TRUE.ThisargumentisJOignoredunlessyoualsospecify TIE=TRUE.SpecifyoneofKO2I64,D64,I32,U32,FF,FD,FG,FS,FT,FFC,FDC,FGC,HOFSC,orFTC.Thesevalues correspondtothe RASE$K_FR_ O*B signature encodings describedinTable3-7inthe OpenVMSO< CallingStandard5<.,IfyouspecifyTIE=TRUEanddonotEOspecifyafunctionreturntypewith FUNC_RETURN,the3OdefaultfunctionreturntypeisI64. o_UrNote o_= Specificationofthe FUNC_RETURNargumentdoesCOnotinitselfcause$ROUTINEtogenerateaproce-Edure signatureblock.)However,ifyouspecifyeither6orboththeARGLISTorUSES_VAX_ARGLIST@Y arguments,anyvalueyouspecifywiththeFUNC_BRETURNargumentisrecordedinboththe procedure<  descriptorandthe procedure signatureblock. TOUSES_VAX_ARGLISTJO(Anoptionalargumenttoindicatewhetherthecalledrou-JOtineusesaVAXargumentlist.+ThisargumentisignoredIOunlessyoualsospecify TIE=TRUE.Bydefault,$CALLas-NO2sumesthecalledroutinedoesnotuseaVAXargumentlist.AOSpecifyUSES_VAX_ARGLIST=TRUEtoindicatethatthe8OcalledroutineusesaVAXargumentlist. hOSIGNATURE_BLOCKOO(AnoptionalargumentthatyoucanusetosupplytheaddressOOofthecall signatureblock.)ThisargumentisignoredunlessLOyoualsospecify TIE=TRUE.NotethatyoucannotspecifyaBO2SIGNATURE_BLOCKargumentin combinationwitheither;Oofthe FUNC_RETURNorUSES_VAX_ARGLISTargu-KOments.*Bydefault,$CALL generatesacall signatureblockJO<foryouwhenyouspecify TIE=TRUE,andyoucaninpartNOcontrolthecontentsofthat signatureblockwiththeFUNC_id$LINKAGE_SECTIONi.QUAD%1 XX:i< $CODE_SECTIONiMOV&R27,%R2i$CALL%SUB4,%R2i.BASE%R2,&$LSi\$CALL%SUB5i$CALL%SUB6,%-  ARGS=,&- 4SCRATCH_REGS=i|$CALL%SUB7,%-ARGS=<1/A,2/A,3/A>i $RETURNiT $END_ROUTINE&SUB3_[ \5Example2G#$CALL%FOO,&ARGS=,&STACK_RETURN_VALUE=TRUE8Tk;&Fetch&octaword&return%value%from&stackLDQ%R4,&0(SP)T;&low%quadwordLDQ%R5,&8(SP)T;&high%quadword;CLDA%SP,&$STACK_ARG_SIZE+16(SP)K;%RESET%STACKFAO $CODE_SECTION*yOOOSwitchescontroltothecurrent routine'scodesectionpsect.Q'OFormatOs $CODE_SECTION{O DescriptionGOs $CODE_SECTIONswitchescontroltothecurrent routine'sOcodesectionpsect.R{(OExampleb $CODE_SECTIONFAO $DATA_SECTION*yOOOSwitchescontroltothecurrent routine'sdatasectionpsect.Q'OFormatOs $DATA_SECTION{O DescriptionGOs $DATA_SECTIONswitchescontroltothecurrent routine'sOdatasectionpsect.R(OExample $DATA_SECTION AO $END_EPILOGUE*mCCOMarkstheendofanepilogue instruction sequence.Q'OFormatOs $END_EPILOGUEG! O DescriptionFOsYoucanusethe $END_EPILOGUEmacrotomarktheendIOofanepilogue instructionsequencethatyoucodeyour-KO$selfwithinastackorregisterroutinedefinedwiththe@O|$ROUTINEmacro..AteachpointwhereaSTACKorJOREGISTERroutinereturnstoitscaller,theroutinemustGO-performasequenceof operationstorestoreanysavedEO registersandtoperform stack-frame management.+ThisVOsequenceiscalledtheepilogueandis describedindetailinthe$O7 OpenVMSCallingStandard C7.GOYoucanusethe$RETURNmacrotogenerateastandardIO+epilogue instructionsequenceforyou.-Alternatively,youIOcancodeyourown sequence.,Ifyoucodeyourownepi-IOlogue sequence,youmustmarkthe beginningandendofBO4theepiloguesequencewiththe$BEGIN_EPILOGUEand/O $END_EPILOGUEmacros, respectively. AONotethatyoumustnotuse $END_EPILOGUEforanBOepilogue instructionsequence generatedby$RETURN.?O5$RETURNinvokes$BEGIN_EPILOGUEand $END_EPILOGUEOforyou.! FOYoumayomitthe invocationof $END_EPILOGUEifyourJOepiloguesequenceoccursattheendoftheroutine.-The:O5 $END_ROUTINEmacroinvokes $END_EPILOGUEforGOyouifyouinvokethe$BEGIN_EPILOGUEmacrowithoutaCOmatching invocationofthe $END_EPILOGUEmacro.)YouFO>mustinvoke $END_EPILOGUEwithepilogue sequencesthat4Ooccurinthemiddleofyourroutine.n DOExample7$ROUTINE&MUMBLE,%KIND=REGISTER,% SAVE_FP=R1 : : [:$BEGIN_EPILOGUEMOVR1,FP%;&Restore%caller's%frame3RET(R26)3;&Return%to%caller{ $END_EPILOGUE :  : S: $END_ROUTINE%MUMBLEAO $END_PROLOGUE*lBBOMarkstheendofaprologue instruction sequence.Q'OFormatOs $END_PROLOGUE O DescriptionBOs $END_PROLOGUEmarkstheendofaroutineprologueJO instructionsequencethatyoucode yourself.+TheprologueOO$ instructionsequencebeginswiththefirst instructionoftheIO|routine.-Therecanonlybeoneprologue instructionse-TOquenceinaroutine.'Theprologueis describedindetailinthe$O- OpenVMSCallingStandard C-.GOYouinvoke $END_PROLOGUEafterthelast instructioninNO!theroutineprologuecode.*Thelast instructionintherou-LOztineprologueistheonethatupdatesFP(R29,theframeGOpointer)andmakestheframebecomecurrent.*YoumustMO+usethismacrowhentheroutinetypeisstackorregister=OandyouspecifySTANDARD_PROLOGUE=FALSEtotheO$ROUTINEmacro.ONotes r ` EDonotusethismacrowhenthe$ROUTINEmacrogen-I.eratesastandardprologueorwhentheroutinetypeisJnullorbound.(Forexample,astandardprologueisgen-Keratedforyouwhenyouspecifyorleavethedefaultof57 $ROUTINE'sSTANDARD_PROLOGUEargumenttoTRUE.h>OExampleMOVSP,&FP $END_PROLOGUE@O $END_ROUTINE*T**OMarkstheendofaroutine.e;OFormat+Os $END_ROUTINEN[name=routine-name]#! O ParameterOsnameKOThenameoftheroutinethatisended.,ThisargumentisCO$ optional.-Ifyouspecifyaname, $END_ROUTINEver-LO|ifiesthatthenamematchesthatwhichwas specifiedwithNO$ROUTINEtobegintheroutine.'Ifthenamedoesnotmatch,FO- $END_ROUTINEissuesa diagnosticmessage.)ThereisnoFOdefault.+Ifyouomitthename, $END_ROUTINEdoesnot$Overifyamatchingname.9 O DescriptionROsYoumustusethismacroattheendofaroutinethatisde-GOfinedwiththe$ROUTINEmacrotodelimittheendtheOO$currentroutineandtoperformfinalmacro processingoftheO|routine.^4OExample#i $END_ROUTINE& NAME=FOOZLE  AO $LINKAGE_PAIR*tJJOLocatesordefinesalinkagepairinthelinkagepsect.tJOFormat:Os $LINKAGE_PAIRNname=routine-name, local=boolean=O ParametersOsnameLONameofthelinkagepairtodefine.+Thisargumentisre-O$quired.! oOlocalHO(ABooleanvalue(TRUEorFALSE)that specifieswhetherQOtheroutineisdefinedwithinthemodulefornot.(ThedefaultUOistostorealinkagepairforaglobalroutine.'Youmustspec-QO2ify LOCAL=TRUEtostorealinkagepairforaroutinethatis!Onotgloballyvisible.]! 3O DescriptionQOsYoucaninvokethismacrotolocateordefinealinkagepairSOinthelinkagepsect.*ThelinkagepairisaddedtoalistforHO$lateruseand retrievalbythe$CALLand $LINKAGE_PAIRIO|macros.(Thus,onlythefirst invocationof $LINKAGE_PAIRTO(or$CALL)foragivenroutinetobecalledresultsinalink-CO-agepairbeingstored.+ $LINKAGE_PAIRand$CALLuseLOthesamelistoflinkagepairs.' $LINKAGE_PAIRrestoresthe-Ocurrentpsectwhenitisdone.HOz $LINKAGE_PAIRdefinesthesymbol$LP.ThissymbolvalueQOistheaddresswithinthelinkagesectionofthelinkagepair1O+forthe specifiedroutinetocall.ONotes#  ` ABecausethe$CALLmacroinvokesthe $LINKAGE_PAIRF.macroforyou,youdonotneedtouse $LINKAGE_PAIR@whenyouareusing$CALL.Youmaywishtouse> $LINKAGE_PAIRwhenyouarenotusing$CALLorF7whenyourequireaspecificorderingor placementof8linkagepairswithinthelinkagesection. SOExampleib $LINKAGE_PAIR%SUB18b;%define&linkage%pair%in%linkage&sectioniLDQ&R26,%$LPiLDQ&R27,%$LP+8i:JSR&R26,%R26rDO$LINKAGE_SECTION*Gl?O$LINKAGE_SECTIONswitchescontroltothecurrent-O. routine'slinkagesectionpsect.T*OFormatOs $LINKAGE_SECTIONO Description?Os$LINKAGE_SECTIONswitchescontroltothecurrent-O routine'slinkagesectionpsect.U{+OExampleb$LINKAGE_SECTION3:O$OPDEF*N$$OUsedtodefineopcodes.uKOFormat;Os $OPDEFM MNEMONIC,FORMAT,ENCODING [,DEFAULTS]FO ParametersOsMNEMONIC@OMNEMONICisthemnemonicnamebywhichthein-SO$ structioniscalled.)Youmay optionallyspecifya qualifierlistWO| separatedfromthenamebyaslash( / ).)A qualifierlistisaQOsequenceofoneormorelettersordigitswithno intervening!O-spacesor separators.sAIOFORMAT9O(FORMATisoneofthe following arguments: m  OOFormat Description OObMEMORYbStandardmemoryformat instructions.O4MEMORY_FUNCTION4Memoryformat instructionswithafunctioncode.O_JUMP_Memoryformat instructionsfor-mattedlikejumpi instructions.OBRANCHStandardbranch;format instructions.OOPERATEStandardoperate instructions.OFLOATING_OPERATEStandard floating-pointoperatein-8 structions. OPALStandardPALcode  instructions.$OCustomformat. OLOA WiththeCUSTOMformat,youmay optionallyspecifyalistRO ofthetypesofoperandsthe instructionistoaccept.+IfyouPO specifyalistofoperandtypes,youmustenclosetheentireDOJ FORMATargumentwithinangle brackets,andyoumustOO specifytheoperandtypesintheordertheyaretobeusedLO withthe instruction.'$OPDEFsupportsthe followingoperandOT types: O IREGISTER3KInteger register,suchasR5orSP.O] FREGISTER2K]Floating-point register,suchasF7.OLITERAL7KIntegerliteral,suchas#123or32767.OPLIT_IREG7KPIntegerliteral,suchas#123or32767,7Korinteger register,suchasR5orSP.O"INDIRECT5K"IndirectintegerregisternotationsuchK{as(R7).CO DISPLACEMENTaIndirectintegerregisternotationwith7KManintegerliteral displacement,suchasK FOO(R12).O BRANCH_OxOFFSET8K Labeloraddress expression,suchasL1.q!GOForexample:0O&FORMAT=MOThe followingexampleshowsthe definitionoftheADDQin-RO struction,whichtakeseitheranintegerregisterorliteralas O5itssecond argument:$OPDEF&ADDQ, /-:z-FORMAT=,%-zIENCODING=<26:31=^x10, /I- 21:25=%OP1, /- 12:20=%OP2, /-! 5:11=^x20, /!-i 0:4=%OP3>LOForadetailed descriptionof instructionformats,seethe0O Alpha Architecture ReferenceManual .i K?OENCODINGEO(ENCODINGisthenumericencodingforthe instructionVOopcode.'Thedefaultradixisdecimal,asisthecaseforallas-NOsembler constants.'Prefixthevaluewith^Xfor hexadecimal.DO2Certain instructionformatsallow multipart encoding: i OOFormat3Encoding Description O@ObMEMORY_FUNCTIONYSpecifythebaseopcode,followed23byadot,followedbythefunction3code.'Forexample:3ENCODING=^X10.F000O"JUMP*3"Specifythebaseopcode,op-.3{tionallyfollowedbyadot,and+3the hardware-hintbitsoption-.3,allyfollowedbyadotandthe-3 software-hintbits.&Forexample:3ENCODING=^X1A.2.1OOPERATE/3Specifythebaseopcode,followed23byadot,followedbythefunction3Ecode.'Forexample:3ENCODING=^X12.3CAOTFLOATING_OPERATESpecifythebaseopcode,followed/3byadotandthefunctioncode.3Forexample:3ENCODING=^X17.02B O PAL13 Specifythebaseopcode, optionally23m followedbyadotandthefunction/3 code.)Omitthefunctioncodefor,3 agenericPAL instructionthat)3w acceptsaninteger-expression"3  argument.&Forexample:3e ENCODING=^X0.00803  ENCODING=^X19O7 CUSTOM+37 Specifyacomma-separatedlist13 ofbitrangesandvaluestoplace03 inthosebitranges.'Forexample:53~ ENCODING%=%<& 26:31=^X14,& 21:25=%OP1,&-,/16:20=%OP2.REG,%0:15=%OP2.DISP%> OJ!DOForCUSTOMformat instructions,specifytheENCODINGLOargumentasacomma-separatedlistofbitrangesandval-TO5uestoplaceinthosebitranges.)EnclosethelistwithinangleO brackets.{ QQOSpecifyabitrangeas start:endwherestartandendarein-OOtegerconstant expressions.*Fora1-bitbitrange,startandNO5endareequal.+Bit positionsrangefrom0to31.+PlaceanSOequalsign( = )afterthe bit-range specifierfollowedbytheUOvalueyouwishtoputinthebitrange.'YoucanplaceeitheraPO>constantinteger expressionoranoperandintothebitrange.KOStartandend expressionsandintegerconstant expressionsMOmustnot referenceanyexternalsymbolsorsymbolsnotyetLOHdefinedinthe assembly.'$OPDEF evaluatesthese expressionsSOatthetimethatitdefinesthe instructionasopposedtowhen4Othedefined instructionis referenced. NMOOperandnamesareoftheform%OPn,wherenistheordi-SOnalnumberoftheoperandas specifiedfromlefttorightwith O5theFORMAT argument.! NDOForthe IREGISTER, FREGISTER,andINDIRECT operands,MO$OPDEFplacesthe5-bitregisternumberintothebitposi-O5tionsyouspecify. WJOForLITERAL operands,$OPDEFplacestheliteralvalueofROtheoperandintothebit positionsyouspecify.(OperandliteralUO5valuescanbeupto32bitslong.'Themost significantbitsareRO truncatedifthesizeoftheoperandliteralvalueexceedstheLObitrangeyouspecify.)Forwardandexternal referencesareO>allowed.FOForLIT_IREG operands,$OPDEFplaceseitheraliteralOOvalueora5-bitregisternumberintothebit positionsyouXO5specify.+Ifaliteral,thelowbitis1,andtheliteralvalueisSOplacedintheupperbits.*Ifaninteger register,thelowfourTObitsare0,andthehighfivebitscontaintheregisternumber.! DOFor DISPLACEMENT operands,$OPDEFdefinestwoparts:LOa5-bitregisternumberanda displacementvaluethatcanSO5beupto32bitslong.)Themost significantbitsare truncatedNOfromthe displacementvalueifthesizeofthe displacementMOvalueexceedsthebitrangeyouspecify.*Youcan referenceNO>theregisternumberbyplacing.REGaftertheoperandname.HOForexample:* %OP2.REG. Similarly,youcan referencetheMO displacementvaluebyplacing.DISPaftertheoperandname.GOHForexample:) %OP2.DISP.Forward referencesareallowed.6O Relocatable expressionsarenotallowed. aDOFor BRANCH_OFFSET operands,$OPDEFstoresthesignedPOlongwordoffsetbetweenthenext instructionandthe specifiedPO5addressinthebit positionsyouspecify.(Theaddressexpres-EOsion specifiedfora BRANCH_OFFSEToperandcanbeaNObackwardorforward referencetoalocationwithinthecur-RO>rentpsect.(ItcannotbeanexternaladdressoranaddressinUOa differentpsect.(The resultingoffsetcanbeupto32bitsinXOsize.(Ifthesizeoftheoffsetexceedsthebitrangeyouspecify,7OHthemost significantbitsare truncated.[KO$OPDEFfillsanybit positionsyouleave unspecifiedwithOzeros. ODEFAULTSPO(DEFAULTSisanoptionallistofoperanddefaultsoftheformNO <%OPn=value,...>,wherenisthenumberoftheoperandtoNOwhichthevalueistoapplyasadefault.+OperanddefaultsPO2maybe specifiedinanyorder.+IfyouspecifyadefaultforQOoneormore operands,youneednotspecifyadefaultforallO operands.^ROThe followingexample specifiesadefaultofR31forthefirst O instruction argument:>a$OPDEF&RET,%#FORMAT=,p-zENCODING=<26:31=^x1A, /- 21:25=%OP1, /-9 16:20:%OP2, /9-14;14=^x2,0:13=0>, /-zDEFAULTS=<%OP1=R31> aO DescriptionLOsYoucanusethe$OPDEFmacrotodefineyourownopcodes.  ! MO$OPDEFdefinesamacrousingan unqualifiedversionoftheGOmnemonicnameyouspecify.*WhenthismacroisinvokedQO5withthe instruction qualifiersyouspecifywhenyoudefineitMOwith$OPDEF(ifany),itexpandstothe instructionrepre-NO sentationyouhavedefinedwith$OPDEF.YoucanspecifytheTO> qualifiersinanyorderaslongasthe combinationof qualifiers"Oyouuseisthesame. ! GOOtherusesofthemnemonicnameremainvalidprovidedDOyoudonotusethemnemonicnameasamacronameMO5ina.MACRO directive.)For instance,youcanusethesamePOmnemonicnameintheopcodefieldwith differentornoqual-UOifiers.'Ifthe qualifiers(orabsencethereof)donotmatchthoseKO> specifiedinyour$OPDEF instruction definition,themacroLOdefinedby$OPDEF processesasthoughyouhadnotdefinedNOan instructionbythatmnemonicname.(Todoso,itexpandsROHtoasingle statement.'This expansion statementis identicaltoGOthe mnemonic-namemacro invocation statement,exceptitKOis processedinacontextthatpreventsthe mnemonic-nameLORmacrofrom expanding recursively.(Instead,the statementisJO processedasanormal,MACRO-64 instruction statement.'InKOthiscase,youmaynotice referencestothe mnemonic-nameEO[macro expansionina MACAUXMSG diagnosticmessageif8Othe instruction statementcontainserrors.  aGOFor instance, ifyoudefineaSTQ/P instructionusingLO$OPDEF,youcanstillusetheSTQ instructionwithouttheNO5/P qualifier.*Ifyoudo,andyourSTQ instruction statementGOcontainsanerror,the assembler generatesa MACAUXMSGKOmessage indicatingthattheerroroccurredduringtheex-JO>pansionofmacroSTQ.AsidefromthefactthattheSTQSO instructionis processedinthecontextofthe expansionoftheHOSTQmacro,$OPDEF's definitionoftheSTQ/P instructionDOHhasnoeffectonyouruseoftheSTQ instruction. \OExample0b$OPDEF%MNEMONIC=BANG,% FORMAT=PAL,%-ENCODING=^X0.0099#; O.PACKED*\22OPackeddecimalstringstoragemacro.d:OFormat*Os .PACKEDMdecimal-string[,symbol]=O ParametersOsdecimal-stringOOAdecimalnumberfrom0to31digitslongwithanoptional;O$sign.'Digitscanbeintherange0to9.OsymbolLO(Anoptionalsymbolthatisassignedavalue equivalenttoPOthenumberofdecimaldigitsinthestring.+Thesignisnot Ocountedasadigit.* MO DescriptionKOs.PACKED generatespackeddecimaldatawithtwodigitsperMObyte.*Packeddecimaldataisusefulin calculationsrequir-OO$ingexact accuracy.*ItisoperatedonbythedecimalstringO| instructions.POApackeddecimalstringisa contiguoussequenceofbytesinOOpmemory.+Itis specifiedbytwo attributes:+theaddressAofVOthefirstbyteandalengthL,whichisthenumberofdigitsinUO!thestringandnotthelengthofthestringinbytes.(ThebytesQOzofapackeddecimalstringaredividedintotwo,4-bitfieldsRO (nibbles).+Eachnibbleexceptthelownibble(bits3:0)oftheLO+last(highest-addressed)bytemustcontainadecimaldigit.NOThelownibbleofthehighest-addressedbytemustcontainaTOsign.'Therepresentationforthedigitsandsignis indicatedasO4follows:? OODigitorO+SignDecimalv+ Hexadecimal OF O0 O1 Oa2 O3 O4 Oj5 O6 O7 Ot8 O9 O%+ O~ z0 z1 za2 z3 z4 zj5 z6 z7 zt8 z9z% 10,12,14,or15z~11or13 v0 v1 va2 v3 v4 vj5 v6 v7 vt8 v9v%A,C,E,orFv~BorD O5! a SOThe preferredsignrepresentationis12forplus( + )and13Oforminus( B).+ThelengthListhenumberofdigitsintheKO5packeddecimalstring(notcountingthesign);LmustbeROintherange0to31.)Whenthenumberofdigitsisodd,theTOdigitsandthesignfitintoastringofbyteswhoselengthis0O>definedbythe following equation:(> L/2(integerpartonly)+1 >.SOWhenthenumberofdigitsiseven,itisrequiredthatanex-[Otra0appearinthehighnibble(bits7:4)ofthefirstbyteoftheROHstring.'Again,thelengthinbytesofthestringisL/2+1. QOTheaddressAofthestring specifiesthebyteofthestringRO containingthemost-significantdigitinitshighnibble.'DigitsKO5of decreasing significanceareassignedto increasingbyteOO addressesandfromhighnibbletolownibblewithinabyte.POThus,+123hasalengthof3andis representedasfollows:* Op KKV|@@  @@@@@@@@@`@@@@ @@ @@@@@@@ @@ @@@@@@@@@@@@@ @@0"@` @ A @ A @G @A @ A >@ @@@@@@@@G!R@"@1cQprH@DHC&OThepackeddecimalnumber u,12hasalengthof2andis#O representedasfollows:* Op KKV|@@  @@@@@@@@@@ @ @@@ @ @@@@@@@@@@@@@ @@0"@` @ A @ A @G  @A "@ A @ @@@@@@@@G!R@!@1cQpsH@DHC  SOExample#b.PACKED&-12,PACKED_SIZED,b;% PACKED_SIZE%gets%value%of%2.PACKED&+500.PACKED&0:.PACKED& -0,SUM_SIZE):;%SUM_SIZE%gets%value%of%1SIO$PROCEDURE_DESCRIPTOR* AeOODefinesa procedure descriptor structureatthecurrentpsectO(andoffset.Y/OFormatOs $PROCEDURE_DESCRIPTOR!O Description9OsThe argumentsforthe$PROCEDURE_DESCRIPTOREOmacroarethesameasthe$ROUTINEmacro,withthe O$ following exceptions: ` -TheENTRYargumentis required. `( 9(Thereareno CODE_SECTION,LINKAGE_SECTION,2 DATA_SECTION,DATA_SECTION_POINTER,or'STANDARD_PROLOGUE arguments. `X <XThereisan additional END_PROLOGUE argument.HThisargumentmustbealabelthatyoudefineattheJ endofthe routine'sprologue sequence.(Thisargumentis@brequiredforstackandregister proceduretypes.ONotesc  P9 ` LBecausethe$ROUTINEmacroinvokesthe$PROCEDURE_DESCRIPTORS.macroforyou,youdonotneedtousethe$PROCEDURE_DESCRIPTORAmacroifyouuse $ROUTINE.-Youmaywishtouse;$PROCEDURE_DESCRIPTORwhenyouarenotusing7 $ROUTINE.!,wOExample$i$PROCEDURE_DESCRIPTOR&p1, -  KIND=NULL, - ENTRY=p1_entry B"O$RESET_LP_LIST*#$/ GrOOClearsthelistoflinkagepairs maintainedbythe $LINKAGE_#O.PAIRand$CALLmacros.R%(OFormatOs $RESET_LP_LIST& O Description>OsThe $LINKAGE_PAIRand$CALLmacrosmaintainanGO assembly-timelistoflinkagepairsthatthe $LINKAGE_OO$PAIRmacrohasstoredinthelinkagesection.)Thislisten-GO|ables $LINKAGE_PAIRand$CALLtousethesamelinkagePOpairformultipleroutinecallstothesameroutine.*YoucanJO-clearthislistoflinkagepairswiththe$RESET_LP_LISTOmacro.KO!Undernormalcircumstances,youdonotneedtocleartheKOz linkage-pairlist.,SomeofthetimeswhenyoudoareasOfollows:M' r# ` CWhenyouchangethepsectassignedtothelinkage(section. ` LIfdistancefromthelinkagesectionofyourcurrentrou-Jtinefallsmorethan32Kbytesbeyondwherethelinkage"Ypairhasbeenstored.( I dOExampleI;%Define%the&linkage%section%psect%for%routines%A%&&B)$LINK$&=%"AB_LINK,NOEXE,OCTA""4$ROUTINE%A,% KIND=STACK|.BASEKR27,%$LSB$CALL%D%;&Linkage%pair%is%stored%in%A's&linkageO$$ROUTINEmacro.0Theepiloguesequence generatedHO|by$RETURNrestoresany registersyouspecifywiththeBO SAVED_REGSargumentto$ROUTINEandperformsstackCO-frame managementas necessary.*Youcanuse$RETURN?OwhetherornotyouspecifySTANDARD_PROLOGUEas)OTRUEoracceptthedefault.JOzYoucanuse$RETURNanynumberoftimeswithinagivenOOstackorregisterroutinetoaffectareturntothecallingO+routine.. FOYoumustnotusethe$BEGIN_EPILOGUEor $END_EPILOGUEFOmacrosforanepiloguesequence generatedby$RETURN.?O5$RETURNinvokes$BEGIN_EPILOGUEand $END_EPILOGUEOforyou./OExample7$ROUTINE%FOOZLE,&KIND=REGISTER,& SAVE_FP=R1 i: i: i[:$RETURN $END_ROUTINE%FOOZLEeRj((OFigureA-1:8Data Structures3ejO eKK8??xp~787x~?8?s?q8?Ν>98Ïx98p98qp98qyq<Ν?|??x;xx``3ac f gx~;flff fflff͌fflfffflff ffflgfg>ff`?q0 H9@HI< HI H1 0@@@@@@@>@p@@@@@@q e5b@@" @!ITMp$ @8ATEH@'@@$A$ET@$@@$I$E@$A @Xq$eEpb#@H @@@@@@@@@@@@@@@P @00@0@PxN086" @7(Q IJ4A59 @.PQ JA51ї@)PQ$ JA21@)QQ$IJA29 @pN2A26 @@@@@@@>>c37ۆ Ywy a a c^37ی p3 q` 9I<I1`@@@@@@@>@q@@@H@@q6 bH@" @!I&T%Oq$ @8A"T%FHH'@@$A"$%FTH$@@$I"$%GH$A @Xq"$Fqb#HH @@@@@@@@@@@@@@@P@0P@ P@PyN 18V" @7HR! JT4A5Y @NPQ! TA5Qї@IPQ! D TA2Q@IRQ! DJTA2Y @qN 5A2V @@@@@@@>>c3c7ۆ 8 p 󙙙c cٝ>37ی p3 ` c0ȀH 0`d@H HH` gxH0@@@@@@@@"bu5" @x$%N @H%F@ T%F@"$%F @"b#aE @@@@@@@@@> f gx~; flff fflff ͌fflff fflff ffflgf g>ff` a @ `)a a(A$A"A a @ `@@@@@@@(@@@@@@$)QA@@8NBA@@@@@@@@@@@@@8@>@@D @@@ ӌBq BB@8SS4I IB@@ QHB8A/@D PQHB$A>@D SHB$IA@8BXqBA@@@@@@@ > 3 f a3= l=6 <~;a3gf;flffa3f lf3`lffi3f l~3|lffy3f l3flff3;fflf;fflgf~6nf< l=6>ff03a `aa `@@@@@@@@@j7," @Jd" @z'"@ "@J$" @6,# @ @@@@@@@@@@@@@8@@D@@ܰFA" @84) @@O@ї@D)A@@D)I@ @8ٰF@ @@p@@@@@00cffmxdž1afg晿̇13affƶ3́10affƶ1π1>affƶ113aff̀3ۙcƆaaǀn`a `aa `@@@@@@@8@D@57Q" @8MJY2 @@Ez@DE Q@DEJY @8E6 @@@@@@@:eVkk,,OFigureA-2:8 InstructionFormatsdkO+dKK(88{ws<~8s~8?8sss;88qp98qp89qp89qp898qps8s98w|89w!DQ!" fA!EY!" xXA8s"                  ?Zo7<0O$ROUTINE*12A^LODefinesthecurrentroutineandcreatesacontextfortheO(routine.3 OFormat)Os $ROUTINEM NAME=routinename-! ALIASES=aliasnames-!$ LOCAL=booleanvalue--| STANDARD_PROLOGUE=booleanvalue-% ENTRY=codeentrypoint-4- CODE_SECTION=codesectionpsectname-4 DATA_SECTION=datasectionpsectname-0 DATA_SECTION_POINTER=booleanvalue-77 LINKAGE_SECTION=linkagesectionpsectname  - KIND=routinetype-/A HANDLER_REINVOKABLE=booleanvalue-( BASE_REG_IS_FP=booleanvalue-& REI_RETURN=booleanvalue-.J STACK_RETURN_VALUE=booleanvalue-& RSA_OFFSET=integervalue-# SAVE_FP=registername-4T SAVE_RA=returnaddressregistername-  SIZE=numericvalue-+ SAVED_REGS=listof registers-0^ HANDLER=exceptionhandleraddress-4 HANDLER_DATA=dataaddressfor exception handler-*g SYNCH_EXCEPTIONS=booleanvalue-( PROC_VALUE=procedurevalue-+ ENVIRONMENT=environmentvalue-/q FUNC_RETURN=functionreturntype-) ARGLIST=argumenttypelist-," USES_VAX_ARGLIST=booleanvalue-8{ OVERRIDE_FLAGS=procedure descriptorflags-- DEFAULT_SIGNATURE=booleanvalue-,, COMMON_BASE=listof registers-' TARGET_INVO=booleanvalue-  EXCEPTION_MODE=mode-4O ParametersOsNAMENOThenameoftheroutine.*ThisargumentisrequiredforallCO$ procedurekinds.'Thereisnodefault.'Forexample:O NAME=FOOZLE5 OALIASESRO(Listofaliasnamesfortheroutine.'ThisargumentisoptionalMOforall proceduretypes.'Thereisnodefault.'Forexample:@O6ALIASES=26 wOLOCALNO(Booleanvalue indicatingwhethertheroutineislocal(TRUE)NOor externallyvisible(FALSE).ThisargumentisoptionalforIOall procedurekinds.'ThedefaultisFALSE.Forexample:O^ LOCAL=TRUEh7! L >OSTANDARD_PROLOGUEGO( SpecifiesaBooleanvaluetoindicatewhether$ROUTINELOshouldgenerateastandard instructionprologuesequenceatPOthe beginningofthe routine'scodesection.(ThisargumentisHO2optionalandvalidonlywithREGISTERandSTACKproce-ROdures.*Ifthe proceduretypeisstackor register,thedefaultHOisTRUEand$ROUTINE generatesastandardprologuese-CO<quence.,Theprologuesequence generatedby$ROUTINEKOsavesthe registersyouspecifywiththe SAVED_REGSargu-FOmentandperforms stack-frame managementas necessary.COIfyoualsospecifyBASE_REG_IS_FP=FALSE,thestan-EOdardprologuesequence generatedby$ROUTINEmakesaPO9copyofthe procedure descriptoraddressthatisinR27uponIOentryintoR29(FP).WhileyoucannotchangethevalueNOinR29beforethe epilogue,youcanuseR29asaworking,FOClinkage-section register.,Ifyouspecifythe STANDARD_DOPROLOGUEargumentasFALSE,youmustcodeyourownJOprologuesequenceandmarktheendoftheprologuewithBOLthe $END_PROLOGUEmacro.)Whetherornotyouspec-EOifySTANDARD_PROLOGUEasTRUEoracceptthedefault,IOyoucangenerateastandardepiloguesequenceforstackDOVandregister procedureswiththe$RETURNmacro.,ForOexample:!O3 STANDARD_PROLOGUE=FALSE8 ]OENTRYOO(Thenameofthe code-entrypoint.'ThisargumentisthecodeMO entry-pointlabelthat$ROUTINEdefinesforyouatthebe-QOginningofthecodesectionfortheroutine.)IfthisargumentEO2isomitted,$ROUTINE generatesalabel.&Forexample:OENTRY=FOOZLE_ENTRY9! 2O CODE_SECTIONOO(Thepsectnameand attributesofthecodesection.)Thisar-NOgumentisoptionalforall procedurekinds.+Ifomitted,theKOdefaultisthenameand attributesdefinedbythe$CODE$NO2lexicalstringsymbol.*Ifyouspecifyanameand attributes@Oforthe CODE_SECTION argument,$ROUTINE redefinesPOthe$CODE$lexicalstringsymbolsuchthatthe specifiedval-NO<uesbecomethenewdefault.( Initially,$CODE$isdefinedasOfollows:EO$CODE$%=%0"$CODE$,OCTA,PIC,CON,REL,LCL,SHR,EXE,NORD,NOWRT":jKOSinceyoumustdelimitthepsectnameand attributesus-LOingcommas,besuretoenclosethisargumentwithinangleKO5bracketstoavoidhavingthe assembler interpretthenameGOand attributesas different argumentsto $ROUTINE.ForOexample:/Ok%CODE_SECTION=; 2O DATA_SECTIONOO(Thepsectnameand attributesofthedatasection.)Thisar-NOgumentisoptionalforall procedurekinds.+Ifomitted,theKOdefaultisthenameand attributesdefinedbythe$DATA$NO2lexicalstringsymbol.*Ifyouspecifyanameand attributes@Oforthe DATA_SECTION argument,$ROUTINE redefinesPOthe$DATA$lexicalstringsymbolsuchthatthe specifiedval-NO<uesbecomethenewdefault.) Initially,$DATA$isdefinedasOfollows:GO$DATA$%=%2"$DATA$,OCTA,NOPIC,CON,REL,LCL,NOSHR,NOEXE,RD,WRT"<mKOSinceyoumustdelimitthepsectnameand attributesus-LOingcommas,besuretoenclosethisargumentwithinangleKO5bracketstoavoidhavingthe assembler interpretthenameGOand attributesas different argumentsto $ROUTINE.ForOexample:2Ok(DATA_SECTION== zODATA_SECTION_POINTERIO(Booleanvalue indicatingwhether$ROUTINEshouldstoreaQOpointertothedatasectioninthelinkagesectionanddefineQO$DPastheaddressofthatpointer.'ThisargumentisoptionalNO2forall procedurekinds.&ThedefaultisFALSE.Forexample:#ODATA_SECTION_POINTER=TRUE> Y@OYoucanusetheDATA_SECTION_POINTERargumentasOfollows:8a$ROUTINE% TALLY_HO,%DATA_SECTION_POINTER=TRUE $DATA_SECTIONtTALLY:K.QUAD%09 $CODE_SECTION.BASe9_R27,&$LSJ;%Inform% assembler&that%R27->$LS LDQ_R1,%$DPp;%R1->$DS.BASE%R1,$DS*;Inform% assembler%that%R1-$DS YLDQ"_YR0,%TALLY%;% R0<-TALLY LDA!_R0,%1(R0)%;%R0<-R0++ STQ"_R0,%TALLY%;% TALLY<-R0 0RET_0(R26);%Return x $END_ROUTINE%TALLY_HO*? AOInthisexample,theDATA_SECTION_POINTERargumentUOis specifiedinordertoobtainlinkagetothedatasection.'TheOO5firstLDQ instructionloadsR1withthepointertothedataJOsectionthat$ROUTINEstoresinthelinkagesection.+TheJOnextthree instructions incrementthevalueintheTALLYQO>variableinthedatasection.)Finally,theroutinereturnsthe6O incrementedvaluetoitscallerinR0.@f 2OLINKAGE_SECTIONMO(Thepsectnameand attributesofthelinkagesection.+ThisPOargumentisoptionalforall procedurekinds.)Ifomitted,theKOdefaultisthenameand attributesdefinedbythe$LINK$SO2lexicalstringsymbol.'Ifyouspecifyanameand attributesfor>OtheLINKAGE_SECTION argument,$ROUTINE redefinesPOthe$LINK$lexicalstringsymbolsuchthatthe specifiedval-NO<uesbecomethenewdefault.) Initially,$LINK$isdefinedasOfollows:IO$LINK$%=%4"$LINK$,OCTA,NOPIC,CON,REL,LCL,NOSHR,NOEXE,RD,NOWRT"ArKOSinceyoumustdelimitthepsectnameand attributesus-LOingcommas,besuretoenclosethisargumentwithinangleKO5bracketstoavoidhavingthe assembler interpretthenameGOand attributesas different argumentsto $ROUTINE.ForOexample:7Ok-LINKAGE_SECTION=;BOKINDQO( Specifiesthekindofroutinebeingdefined.(ThismustbeoneCOofthe following:*STACK, REGISTER,NULL,orBOUND.IOThisisanoptional argument.-ThedefaultisNULL.ForO2example:O KIND=STACKMC #OHANDLER_REINVOKABLEJO( SpecifiesaBooleanvaluetoindicatewhetherthecondi-KOtionhandlercanbe re-invoked.*ThisargumentisoptionalGOandvalidonlywithSTACKandREGISTER procedures.*ItMO2defaultstoFALSEifnovalueis specifiedandtheproce-JOdurekindisSTACKor REGISTER.NotethatthisargumentOOisonlyvalidifavalueisalso specifiedfortheHANDLER"O< argument.'Forexample:"OHANDLER_REINVOKABLE=TRUEJD  OBASE_REG_IS_FPLO( SpecifiesaBooleanvaluetoindicatewhetherregisterR29LO(FP)isusedasthe frame-pointerbaseregister(TRUE)orQOnot(FALSE).If specifiedasFALSE,R29mustbeusedtoholdRO2theaddressofthe procedure descriptor(ortheaddressofthe:Oaddressofthe proceduredescriptor-seetheu OpenVMSCallingO StandardD.*YoucanuseR29toholdaworkingcopyoftheOO<linkage-sectionaddresspassedinR27.'In addition,yourpro-MOlogueandepilogue instruction sequencescanbeshorterandLOmore efficient.)However,youcannotmakestandardcallstoHOEotherroutinesifBASE_REG_IS_FPis specifiedasFALSE.POThisargumentisoptionalandvalidonlywithstackandreg-NOister procedurekinds.*ItdefaultstoTRUEifthe procedure7OOtypeisstackor register.'Forexample:OBASE_REG_IS_FP=FALSEE )O REI_RETURNQO( SpecifiesaBooleanvaluetoindicatewhetherthisroutinere-KOturnsusinganREI instruction.+ThisargumentisoptionalDOandvalidonlywithSTACK, REGISTER,andNULLpro-OO2cedurekinds.*ItdefaultstoFALSEifthe procedurekindis5OSTACK, REGISTER,orNULL.Forexample:OREI_RETURN=TRUEFAfOSTACK_RETURN_VALUEJO(Thisargumentis obsolete.&Donotspecifythis argument. GO RSA_OFFSETRO(Anintegervalue specifyingthestackoffset(inbytes)oftheOOregistersavearea.)ThisargumentisoptionalandvalidonlyGOforSTACK procedures.(IfyouspecifyBASE_REG_IS_FPasIO2TRUE,thevalueyouspecifywith RSA_OFFSETmustbeatHOleast8.( RSA_OFFSETdefaultsto8ifBASE_REG_IS_FPiseL;EOTheOpenVMSCallingStandard specifiesthat registersKOR0,R1,R28,R30(SP),andR31mustneverbesavedandJO5 restored.,Ifyouspecifythese registerswiththeSAVED_FOREGS argument,the$ROUTINEmacroissuesa diagnosticOwarningmessage.VM ,OHANDLERQO(Theaddressofan exceptionhandler.)ItisoptionalandvalidJOonlyforSTACKandREGISTER procedurekinds.'Bydefault,MOthe procedureisdefinednottohavean exceptionhandler.O2Forexample:OHANDLER=MY_HANDLERN)O HANDLER_DATAOO(Theaddressofdataforthe specifiedhandler,ifany.,ThisMOargumentisoptionalandvalidonlyforstackandregisterMO procedurekindsandhasnodefaultvalue.(Youcannotspec-HO2ifya HANDLER_DATAargumentifyoudonotspecifythe+OHANDLER argument.'Forexample:&OHANDLER_DATA=MY_HANDLER_DATAO! hOSYNCH_EXCEPTIONSIO(Anargumenttoindicatewhether exceptionsmustbesyn-HO chronizedornot.,ThisargumentisoptionalwithSTACKEOandREGISTERroutinesandisnotallowedwithotherKO2kindsof routines.*ThisargumentdefaultstoTRUEifyouDOspecifyan exceptionhandlerwiththeHANDLERargu-FOment.. Otherwise,itdefaultstoFALSE.Whenthisar-GO<gumentisTRUEandyouspecifyoracceptthedefault9OSTANDARD_PROLOGUE=TRUE,$ROUTINE generatesaNOTRAPB instructionaspartofthestandardprologue sequence.FOEIn addition,whenthisargumentistrue,the$RETURNNOmacro generatesaTRAPB instructionaspartofthestandardHOepilogue sequence.*WhenthisargumentisFALSE,neither@OO$ROUTINEnor$RETURNgenerateTRAPB instructions./P wO PROC_VALUENO(The procedurevalueofabound procedure'sparent.'Thisar-MOgumentisrequiredforBOUND proceduresandisinvalidfor6Oallother procedurekinds.'Forexample: O^PROC_VALUE=PARENT_PROC QwO ENVIRONMENTKO( Specifiesan environmentvalue.)This parameterisoptionalIOandvalidonlyforBOUND procedures.+IthasnodefaultOvalue.'Forexample:O^ ENVIRONMENT=0QR'O FUNC_RETURNOO( Specifiesthefunctionreturntype.(ThisargumentisoptionalTOandvalidforall procedurekinds.(If specified,itmustbeoneNOofthe following:,I64,D64,I32,U32,FF,FD,FG,FS,FT,IO2FFC,FDC,FGC,FSC,orFTC.Thesevalues correspondto0OthoselistedinTable3-7ofthe$ OpenVMSCallingStandardJOthathavean additional "RASE$K_FR_"prefix.*Thereisno!O<default.'Forexample:OFUNC_RETURN=U32SOARGLISTNO(Argumenttypelist.)ThisargumentisoptionalandvalidforLOall procedurekinds.,IftheargumentlistcontainsoneorQOmore elements,eachofthefirstsixelementsmustbeoneofQO2the following:)Q,I32,U32,FF,FD,FG,FS,orFT.Thesev-LOenthand subsequent arguments(ifany)mustbeeitherI32OorQ.T8OThese values correspond tothe PSIG$K_RA_ * andO MASE$K_MA_ *7 signature encodingsinTable3-6ofthe$O5 OpenVMSCallingStandard-H5.-Thereisnodefault.-IfyouEOspecifythis argument,$ROUTINE generatesa procedure*O signatureblock.'Forexample:$OkARGLIST=.U )~OUSES_VAX_ARGLISTIO( SpecifiesaBooleanvalue indicatingwhethertheroutineJOusesaVAXargumentlist.,ThisargumentisoptionalforLOall procedurekindsanddefaultstoFALSE.IfyouspecifyGO2this argument,$ROUTINE generatesa procedure signatureOblock.'Forexample:OUSES_VAX_ARGLIST=TRUEV OOVERRIDE_FLAGSIO( Specifies overridingflagsforthe PDSC$W_FLAGSfieldinOOthe procedure descriptor.'ThisargumentisoptionalandvalidMOforall procedurekinds.)However,itisrequiredforBOUNDGO2 procedureswhenthe parameter specifiedwiththePROC_DOVALUEargumentisanexternalorforward reference.0OThereisnodefault.'Forexample:%OhOVERRIDE_FLAGS=PARENT_FLAGSW 2mODEFAULT_SIGNATUREIO( SpecifiesaBooleanvaluetoindicatewhetherthestan-JOdard procedure signatureisused.*TRUEmeanstousetheNOstandard signature.,Itisoptionalandvalidforallproce-NO2durekinds.+ThedefaultisFALSEifyouspecifyeitherthe?OARGLISTorUSES_VAX_ARGLIST arguments.( Otherwise,GOthedefaultisTRUE.NotethatthisargumentmustbeMO<FALSEorblankifyouspecifyeithertheARGLISTorUSES_0O VAX_ARGLIST arguments.'Forexample: ODEFAULT_SIGNATURE=TRUEX! O COMMON_BASEIO(Anargumenttospecifyoneormorebase registersthatKOareusedincommonwithother routines.)ThisargumentisMOoptionalforallroutinekinds.(Bydefault,$ROUTINEinval-MO2idatesanyprevious.BASE directivesthatmaybeineffectKOwhenyouinvoke $ROUTINE.Inthisway,youare preventedLOfrom inadvertently processingthesecondor subsequentrou-PO<tinesinamodulewith.BASE directivesineffectthatapplyNOonlytoapreviousroutine.)However,youmaywishtoshareGOacommonbaseregister assignmentbetweenanumberofLOE routines.+Todoso,youcanreissuethe appropriate.BASEKO directiveor directivesaftereach invocationof $ROUTINE.NOAlternatively,youcanspecifyoneormorecommonbasereg-DOOisterswiththe COMMON_BASE argument,andentertheQO appropriate.BASE directiveor directivesonlyonceatthebe-KOginningofthemodule.'SpecifythevaluefortheCOMMON_MOYBASEargumentasalistofinteger registers.'Forexample:OCOMMON_BASE= YNIOInthisexample,$ROUTINE invalidatesanyprevious.BASELO directivesexceptthosefor registersR5andR13.+PreviousKO5.BASE directivesfor registersR5andR13are unaffected.ZO TARGET_INVONO( SpecifiesaBooleanvalue indicatingwhetherornottheex-IOceptionhandlerforthis procedureisinvokedwhenthisKO procedureisthetargetofan invocationunwind.'(TARGET_FO2 INVO=TRUE)causesthe exceptionhandlertobeinvokedCOduringanunwind.'ThedefaultisTARGET_INVO=FALSE.[OEXCEPTION_MODENO(Anargumenttospecifyoneofthe following exceptionmodes1OwithSTACKandREGISTER procedures:6\  ` ; SIGNAL-raiseall exceptionsexcept underflow. `O ,OSIGNAL_ALL-raiseall exceptions. ` ' SILENT-raiseno exceptions. `N CNFULL_IEEE-onlyraise exceptionsasperIEEEcontrolbits.\]22OThedefaultisEXCEPTION_MODE=SIGNAL.^O DescriptionKOs$ROUTINEdefinesaroutine,makesitthecurrentroutine,1Oandperformsthe followingactions:_ p ` MCreatesand associatesalinkagesection,codesection,and,(datasectionwiththeroutine. ` EDefinesa procedure descriptorandoptional signatureIblockin accordancewiththevaluesofmacro arguments. ` M Optionallystoresapointertothedatasectionwithinthelinkagesection. `W BWCreatesthe followingnumericandlexicalsymbols:`!  SymbolD Description  b$CS9DbAddressatstartofthecurrent routine'sDcodesection. 4$DS9D4Addressatstartofthecurrent routine'sDdatasection. $DP4DOptionaladdressofapointertothe2D_current routine'sdatasection.-This6Dsymbolhasavaluethatisanaddress7Dinthecurrent routine'slinkagesection.Diatwhichthe$ROUTINEmacrohas6DplacedtheaddressofthedatasectionD($DS)asfollows:D$DP&=%.D.ADDRESS%$DS2D$DPenablesyoutoaccessthedata4DareaofthecurrentroutinefromitsDjlinkagesection. $LS7DAddressofthecurrent routine'slinkageD=section.$SIZE5DSizeoffixedareaofstackframeof2D thecurrentroutine.-Thissymbolis1Dg validonlywithSTACKandREGISTERD  routines.: $RSA_ OFFSET5D: Theoffsetwithinthe fixed-stackarea:D totheregistersavearea.'Thissymbolis-D validonlywithSTACK routines.Ce $RSA_ENDTheoffsetwithinthe fixed-stackareato:D thethefirstbytebeyondtheendofthe*D registersavearea(ifany). $CODE$8D Alexicalstringsymbolthatdefinesthe8D  routine'scodepsectnameand attributes.b $DATA$6Db Alexicalsymbolthatdefinestherou-5D tine'sdatapsectnameand attributes.4$LINK$3D4Alexicalstringsymbolthatdefines3Dthe routine'slinkagepsectnameandD attributes.  ` C Optionally generatesastandard instructionprologue?sequenceatthe beginningofthecodesection.7a  FbIfyouspecify /NAMES=AS_ISonthecommandline,allKbutthelastthreeofthesesymbolsaredefinedinbothEcomplete uppercaseandcomplete lowercase.'Thesesym-GlbolsareintendedforyouruseoutsideofthemacrosE themselves.+Forexample,thevaluesofthesenumericEsymbolsmaybeusefulasamnemonicwhencodinganJv instructionwitharegisterasinthe followingexample:ldap SP,-$SIZE(SP)b 6DbThelastthreesymbols,$CODE$,$DATA$,and$LINK$,Fareonlydefinedin uppercase.-TheyareusedbytheH$ROUTINEmacroforthedefaultcode,data,andlinkageJlsectionpsectnamesand attributes.(YoucandefinetheseFsymbolsbeforeinvoking$ROUTINEtoalterthedefault)programsectionsasfollows:co =-D$CODE$=%"MY_CODE,EXE,OCTA,SHR,NORD,NOWRT,GBL"=U-D$DATA$=%"MY_DATA,NOEXE,OCTA,NOSHR,RD,WRT,GBL"=-D$LINK$=%"MY_LINK,NOEXE,OCTA,SHR,RD,NOWRT,GBL"d6sDbThese statementscause$ROUTINEtousethepreviousEpsectnamesand attributesbydefault..Ifyouspec-=ifyanyofthe CODE_SECTION, DATA_SECTION,or:lLINKAGE_SECTION argumentsinyour invocation>of $ROUTINE,$ROUTINEusesthepsectnameand5 attributes specifiedwiththe argument.Se)>bIn addition,$ROUTINE redefinesthe correspond-<ing$CODE$, $DATA$,or$LINK$lexicalstringBsymboltothevalueyouspecifywhenyouspecify8lanyofthe CODE_SECTION, DATA_SECTION,or5LINKAGE_SECTION argumentswith $ROUTINE.fOExample%$ROUTINE&MAIN1,% KIND=NULL$ROUTINE&MAIN1, -4 KIND=STACK, 4-|SIZE=48, |-SAVED_REGS=OmFOTableA-1:7RegisterUsage ConventionsforOpenVMSAXP O  OhR0hIntfuncretvalue OR1Scratch4n  O Uoe+O%R2-R15%SavedO~R16-R21~ArgumentOR22-R24Scratch O/R25 /AI/Argument information OR26 RAReturnaddress OR27 PV Procedurevalue O8R288Volatilescratch OR29 FPStackframebase OR30 SPStackpointer OBR31BZero OF0#F-Pfunctionretvalue OF1(F-PcomplexfuncretvalueOLF2-F9LSaved4p  O q[O%F10-F15%ScratchO~F16-F22~ArgumentOF23-F30Scratch O/F31/Zero OU %g 7O A.#MACRO-64#Alpha"AXP" Architecture#QuickOr ReferenceLOThisappendixprovidesfiguresandtablesshowingthedataKOOtypesand addressing capabilitiesoftheAlphaAXParchi-:#Odisp Displacementfield'OfncPALcodefunctionfield:iO8aTheoperandisusedinanaddress calculationtoforman effectiveaddress.,Thehk data-typecodethatfollows indicatestheunitsofaddressability(orscalefactor)Jkappliedtothisoperandwhenthe instructionisdecoded. OBi3kBTheoperandisan immediateliteral.8OmTheoperandisbothreadandwritten.*OrTheoperandisreadonly.+OLwTheoperandiswriteonly.O:ObByte OUfkU F_floatingOg G_floating OlkLongwordO_qQuadword4v  O w[1O%sIEEEsinglefloating (S_floating) O~t.k~IEEEdoublefloating (T_floating)OwWordBO/xThedatatypeis specifiedbythe instruction. OU LlJ"+OA.1CRegisterUsage ConventionsO(TableA-1@(liststheregisterusage conventionsforOpenVMSEOAXP.MACRO-64 recognizesFPandSPasregistersyn-KOonyms,butdoesnot recognizeAI,RA,orPVasregisterO1 synonyms.*lOm?myc7OTableA-3:7 Instruction QualifierNotation O OF /QualifierzFMeaning Ob  OCzChoppedrounding O$Dz$Dynamicrounding+z|(mode determinedby FPCR) OI!zInexactresultenable O-M#z-Minusinfinityrounding OS&zSoftware completionenable OU%zFloating underflowenable O7V#z7Integeroverflowenable O] Fr)-OA.2C InstructionOperandNotationO(TableA-2@(showsthenotationfor instruction operands.)The,Onotationformatisasfollows:+O .*rOm?s{ w=OTableA-4:7F-PControlRegister(FPCR)Format O OFBitsFSymbolMeaning Ob  O63'SUMBitwiseORof<57:52>AO$62:60RAZ/IGNiReadaszero;ignoredwhenwrittenO|59:58DYN)|IEEEroundingmode selected:00Chopped-01Minusinfinity10Normalrounding11Plusinfinity O757 7IOV77Integeroverflowof destination precision O56 INE3Floatingmathematicallyinexactresult O55=UNFFloating underflowof destinationexponent OA54 AOVF7AFloatingoverflowof destinationexponent O53 DZE3Floatingdividewithdivisorofzero O52 INV+Floatinginvalidoperandvalue@OJ51:0RAZ/IGNiReadaszero;ignoredwhenwritten Oq xA/OA.3C Instruction QualifierNotationO(TableA-3=(showsthenotationfor instruction qualifiers.*xOl?y }I ;3OTableA-5:7 DecodablePseudo-Operations O OFPseudo-O OperationFActual Instruction O  OBRDtarget BRr R31,target OqCLR DqRx qBISrq R31,R31,RxOFABSDFx,FyCPYSr F31,Fx,FyO"FCLR D"Fx"CPYSr" F31,F31,Fx~e] O OPseudo-O+ OperationActual+ Instruction OF  O%FMOVFx,Fy%CPYSr%Fx,Fx,FyO~FNEGD~Fx,Fy~CPYSNr~Fx,Fx,FyOFNOPCPYSr F31,F31,F31 O/MOVD/Lit,Rx /LDAr/ Rx,lit(R31) OMOVD {Rx/Lit8},Ry BISrR31,{Rx/Lit8},RyOMF_FPCRZFxMF_FPCRFx,Fx,FxO8MT_FPCRZFx8MT_FPCRFx,Fx,FxONEGFDFx,FySUBFr F31,Fx,FyONEGF/SFx,FySUBF/Sr F31,Fx,FyOBNEGGDBFx,FyBSUBGrB F31,Fx,FyONEGG/SFx,FySUBG/Sr F31,Fx,FyONEGLD {Rx/Lit8},RySUBLrR31,{Rx/Lit},RyOLNEGL/V {Rx/Lit8},RyLSUBL/VrLR31,{Rx/Lit},RyONEGQD {Rx/Lit8},RySUBQrR31,{Rx/Lit},RyONEGQ/V {Rx/Lit8},RySUBQ/VrR31,{Rx/Lit},RyOUNEGSDUFx,FyUSUBSrU F31,Fx,FyONEGS/SUFx,FySUBS/SUr F31,Fx,FyONEGS/SUIpFx,FYSUBS/SUI F31,Fx,FyO_NEGTD_Fx,Fy_SUBTr_ F31,Fx,FyONEGT/SUFx,FySUBT/SUr F31,Fx,Fye] O OPseudo-O+ OperationActual+ Instruction OF W -O%NEGT/SUIeFx,FY%SUBT/SUI F31,Fx,Fy O~NOP ~BISr~ R31,R31,R31 ONOTD {Rx/Lit8},RyORNOTrR31,{Rx/Lit},RyO/SEXTL {Rx/Lit},Ry/ADDLr/R31,{Rx/Lit},RyOUNOPLDQ_Ur R31,0(Rx) O zA5OA.4CF-PControlRegister(FPCR)FormatO(TableA-4?(showstheformatfortheF-Pcontrol register.*zOl?{4 (; PJOTableA-6:7Common ArchitectureOpcodesin NumericalOrder O OFOpcodeFOpcodeFOpcode Ob  O00CALL_PAL11.26CMOVNE15.01E CVTDG $/C O|01|OPC01|11.28ORNOT|15.020 |ADDG /C O-02-OPC02-11.40XOR-15.021 -SUBG /C O03OPC0311.44CMOVLT15.022 MULG 7/Cn D O OOpcodeOpcodeOpcode O  c  O%04%OPC04%11.46CMOVGE%15.023 %DIVG ~/C O05OPC0511.48EQV15.02CCVTGF //C O06OPC0611.64CMOVLE15.02DCVTGD /C O8078OPC07811.66CMOVGT815.02F 8CVTGQ /C O08 LDA12.02MSKBL15.03CCVTQF B/C O09LDAH12.06EXTBL15.03E CVTQG /C OL0ALOPC0AL12.0BINSBLL15.080 LADDF O0BLDQ_U12.12MSKWL15.081 SUBF O0COPC0C12.16EXTWL15.082 MULF OU0DUOPC0DU12.1BINSWLU15.083 UDIVF O0EOPC0E12.22MSKLL15.09E CVTDG O0FSTQ_U12.26EXTLL15.0A0 ADDGO_10.00ADDL_12.2BINSLL_15.0A1 _SUBGO10.02S4ADDL12.30ZAP15.0A2 MULGO10.09SUBL12.31ZAPNOT15.0A3 DIVGOi10.0BS4SUBLi12.32MSKQLi15.0A5 iCMPGEQO10.0FCMPBGE12.34SRL15.0A6 CMPGLTO10.12S8ADDL12.36EXTQL15.0A7 CMPGLEOr10.1BS8SUBLr12.39SLLr15.0ACCVTGFO10.1DCMPULT12.3BINSQL15.0ADCVTGDO$ 10.20ADDQ$ 12.3CSRA$ 15.0AFCVTGQO| 10.22S4ADDQ| 12.52MSKWH| 15.0BCCVTQFO 10.29SUBQ 12.57INSWH 15.0BECVTQGO- 10.2BS4SUBQ- 12.5AEXTWH- 15.100 - ADDF /UCO 10.2DCMPEQ 12.62MSKLH 15.101 SUBF 7 /UCO 10.32S8ADDQ 12.67INSLH 15.102 MULF /UCOA 10.3BS8SUBQA 12.6AEXTLHA 15.103 A DIVF /UCO 10.3DCMPULE 12.72MSKQH 15.11E CVTDG J /UCB  O OOpcodeOpcodeOpcode O OW10.40ADDL/VW12.77INSQHW15.120 WADDG /UCO10.49SUBL/V12.7AEXTQH15.121 SUBG a/UCO10.4DCMPLT13.00MULL15.122 MULG /UCOj10.60ADDQ/Vj13.20MULQj15.123 jDIVG /UCO10.69SUBQ/V13.30UMULH15.12CCVTGF t/UCO10.6DCMPLE13.40MULL/V15.12DCVTGD %/UCO~11.00AND~13.60MULQ/V~15.12F ~CVTGQ /VCO/11.08BIC /14-/OPC14/15.180 /ADDF /UO11.14CMOVLBS15.000ADDF/C15.181 SUBF 8/UO11.16CMOVLBC15.001SUBF/C15.182 MULF /UOB11.20BISB15.002MULF/CB15.183 BDIVF /UO11.24CMOVEQ15.003DIVF/C15.19E CVTDG L /UO 15.1A0ADDG/U 15.580ADDF/SU 16.0A6 CMPTLTO 15.1A1SUBG/U 15.581SUBF/SU 16.0A7 CMPTLEOU 15.1A2MULG/UU 15.582MULF/SUU 16.0ACCVTTSO 15.1A3DIVG/U 15.583DIVF/SU 16.0AFCVTTQO 15.1ACCVTGF/U 15.59ECVTDG/SU 16.0BCCVTQSO_ 15.1ADCVTGD/U_ 15.5A0ADDG/SU_ 16.0BECVTQTO 15.1AFCVTGQ/V 15.5A1SUBG/SU 16.0C0ADDS  /DOi 15.400ADDF/SCi 15.5A2MULG/SUi 16.0C1SUBS /DO 15.401SUBF/SC 15.5A3DIVG/SU 16.0C2MULS r /D6  O OOpcodeOpcodeOpcode O OW15.402MULF/SCW15.5ACCVTGF/SUW16.0C3DIVS /DO15.403DIVF/SC15.5ADCVTGD/SU16.0E0 ADDT a/DO15.41ECVTDG/SC15.5AFCVTGQ/SV16.0E1 SUBT /DOj15.420ADDG/SCj16.000ADDS/Cj16.0E2 jMULT /DO15.421SUBG/SC16.001SUBS/C16.0E3 DIVT t/DO15.422MULG/SC16.002MULS/C16.0ECCVTTS %/DO~15.423DIVG/SC~16.003DIVS/C~16.0EFCVTTQ /DO/15.42CCVTGF/SC/16.020ADDT/C/16.0FCCVTQS /DO15.42DCVTGD/SC16.021SUBT/C16.0FECVTQT 8/DO15.42FCVTGQ/SC16.022MULT/C16.100 ADDS /UCOB15.480ADDF/SB16.023DIVT/CB16.101 BSUBS /UCO15.481SUBF/S16.02CCVTTS/C16.102 MULS L /UCO 15.482MULF/S 16.02FCVTTQ/C 16.103 DIVS /UCOU 15.483DIVF/SU 16.03CCVTQS/CU 16.120 U ADDT /UCO 15.49ECVTDG/S 16.03ECVTQT/C 16.121  SUBT _ /UCO 15.4A0ADDG/S 16.040ADDS/M 16.122 MULT  /UCOi 15.4A1SUBG/Si 16.041SUBS/Mi 16.123 i DIVT /UCO 15.4A2MULG/S 16.042MULS/M 16.12CCVTTS r /UC6  O OOpcodeOpcodeOpcode O OW15.4A3DIVG/SW16.043DIVS/MW16.12F WCVTTQ /VCO15.4A5CMPGEQ/S16.060ADDT/M16.140 ADDS a/UMO15.4A6CMPGLT/S16.061SUBT/M16.141 SUBS /UMOj15.4A7CMPGLE/Sj16.062MULT/Mj16.142 jMULS /UMO15.4ACCVTGF/S16.063DIVT/M16.143 DIVS t/UMO15.4ADCVTGD/S16.06CCVTTS/M16.160 ADDT %/UMO~15.4AFCVTGQ/S~16.06FCVTTQ/M~16.161 ~SUBT /UMO/15.500ADDF/SUC/16.07CCVTQS/M/16.162 /MULT /UMO15.501SUBF/SUC16.07ECVTQT/M16.163 DIVT 8/UMO15.502MULF/SUC16.080ADDS16.16CCVTTS /UMOB15.503DIVF/SUCB16.081SUBSB16.16F BCVTTQ /VM)O15.51E CVTDG/SUC16.082MULS16.180 ADDS L /UO 15.520ADDG/SUC 16.083DIVS 16.181 SUBS /UOU 15.521SUBG/SUCU 16.0A0ADDTU 16.182 U MULS /UO 15.522MULG/SUC 16.0A1SUBT 16.183  DIVS _ /UO 15.523DIVG/SUC 16.0A2MULT 16.1A0 ADDT  /U)Oi 15.52C CVTGF/SUC16.0A3DIVTi 16.1A1 i SUBT /U+O 15.52D CVTGD/SUC16.0A4CMPTUN 16.1A2  MULT r /Ub6 8 O OOpcodeOpcodeOpcode O OW15.52F CVTGQ/SVCW16.0A5CMPTEQW16.1A3 WDIVT /UO16.1ACCVTTS/U16.5AFCVTTQ/SV16.7BCCVTQS a/SUIO16.1AFCVTTQ/V16.5C0ADDS/SUD16.7BECVTQT /SUIOj16.1C0ADDS/UDj16.5C1SUBS/SUDj16.7C0ADDS /SUIDO16.1C1SUBS/UD16.5C2MULS/SUD16.7C1SUBS t/SUIDO16.1C2MULS/UD16.5C3DIVS/SUD16.7C2MULS %/SUIDO~16.1C3DIVS/UD~16.5E0ADDT/SUD~16.7C3DIVS /SUIDO/16.1E0ADDT/UD/16.5E1SUBT/SUD/16.7E0 /ADDT /SUIDO16.1E1SUBT/UD16.5E2MULT/SUD16.7E1 SUBT 8/SUIDO16.1E2MULT/UD16.5E3DIVT/SUD16.7E2 MULT /SUIDOB16.1E3DIVT/UDB16.5EC CVTTS/SUDB16.7E3 BDIVT /SUIDO16.1ECCVTTS/UD16.5EF CVTTQ/SVD16.7ECCVTTS L /SUIDO 16.1EFCVTTQ/VD 16.6ACCVTST/S 16.7EFCVTTQ /SVIDOU 16.2ACCVTSTU 16.700 ADDS/SUICU 16.7FCCVTQS /SUIDO 16.500ADDS/SUC 16.701 SUBS/SUIC 16.7FECVTQT _ /SUIDO 16.501SUBS/SUC# 16.702 MULS/SUIC17.010 CVTLQO 16.502MULS/SUC 16.703 DIVS/SUIC 17.020  CPYSOi 16.503DIVS/SUCi 16.720 ADDT/SUICi 17.021 i CPYSNO 16.520ADDT/SUC 16.721 SUBT/SUIC 17.022 CPYSEO 16.521SUBT/SUC# 16.722 MULT/SUIC17.024  MT_ r FPCR   O OOpcodeOpcodeOpcode O OW16.522MULT/SUCW16.723 DIVT/SUICW17.025 WMF_ FPCRO16.523DIVT/SUC$16.72C CVTTS/SUIC17.02A FCMOVEQOa16.52C CVTTS/SUC$a16.72F CVTTQ/SVIC17.02B aFCMOVNEO16.52F CVTTQ/SVC-16.73C CVTQS/SUIC17.02CFCMOVLTO16.540ADDS/SUM-16.73E CVTQT/SUIC17.02DFCMOVGEOj16.541SUBS/SUM#j16.740 ADDS/SUIM17.02E jFCMOVLE-O16.542MULS/SUM16.741 SUBS/SUIM17.02F FCMOVGTO16.543DIVS/SUM#16.742 MULS/SUIM17.030 CVTQLOt16.560ADDT/SUMt16.743 DIVS/SUIMt17.130 tCVTQL /VO%16.561SUBT/SUM#%16.760 ADDT/SUIM17.530 %CVTQL ~/SV=O16.562MULT/SUM16.761 SUBT/SUIM18.0000TRAPBO/16.563DIVT/SUM*/16.762 MULT/SUIM18.0400EXCB.O16.56C CVTTS/SUM16.763 DIVT/SUIM18.4000MB=O16.56F CVTTQ/SVM16.76C CVTTS/SUIM18.4400WMBO816.580ADDS/SU,816.76F CVTTQ/SVIM18.8000FETCHO16.581SUBS/SU-16.77C CVTQS/SUIM18.A000FETCH_ MOB16.582MULS/SU+B16.77E CVTQT/SUIM18.C000RPCCO16.583DIVS/SU16.780ADDS/SUI18.E000RCO16.5A0ADDT/SU16.781SUBS/SUI18.F000RSOL 16.5A1SUBT/SUL 16.782MULS/SUI L 19 L PAL19O 16.5A2MULT/SU 16.783DIVS/SUI 1A.0 JMPO 16.5A3DIVT/SU 16.7A0ADDT/SUI 1A.1 JSR-OU 16.5A4 CMPTUN/SU16.7A1SUBT/SUIU 1A.2 U RET-O 16.5A5 CMPTEQ/SU16.7A2MULT/SUI 1A.3 JSR_   COROUTINE-O_ 16.5A6 CMPTLT/SU16.7A3DIVT/SUI _ 1B _ PAL1B.O 16.5A7 CMPTLE/SU16.7AC CVTTS/SUI  1C OPC1CO 16.5ACCVTTS/SU 16.7AF CVTTQ/SVI  1D  PAL1D Oi 1Ei PAL1E i 2A-i LDL_L i 36 i FBGE O 1F PAL1F  2B- LDQ_L  37 FBGT O 20  LDF  2C - STL  38  BLBC Or 21 r LDG r 2D -r STQ r 39 r BEQ O 22  LDS  2E- STL_C  3A BLT  O OOpcodeOpcodeOpcode O  OW23 WLDT W2F-WSTQ_C W3B WBLE O24 STF 30 -BR 3C BLBSn D O OOpcodeOpcodeOpcode O } S O%25 %STG %31-%FBEQ %3D %BNE O~26 ~STS ~32-~FBLT ~3E ~BGE O27 STT 33-FBLE 3F BGT O/28 /LDL /34 -/BSR O29 LDQ 35-FBNE O |+OA.5C DecodablePseudo-OperationsO(TableA-5>(liststhe decodablepseudo-operationsandtheir+O associatedactual instructions.*|On?} FCOTableA-7:7OpenVMS UnprivilegedPALcode Instructions O OFMnemonicFOpcodeF Description Ob OAMOVRM;00.00A1AtomicmovefromregistertomemoryO$AMOVRR=$00.00A0Atomicmovefromregistertoregister O|BPT|00.0080 BreakpointOBUGCHK00.0081BugcheckO-CHMK+-00.0083ChangemodetokerneluK O OMnemonicOpcode Description O  x  x O%CHME.%00.0082Changemodeto executiveO~CHMS/~00.0084Changemodeto supervisorOCHMU)00.0085ChangemodetouserO/GENTRAP+/00.00AAGeneratesoftwaretrap OIMB,00.0086I-streammemorybarrierOINSQHILG00.0087Insertintolongwordqueueathead interlockedO8INSQHILRQ800.00A2Insertintolongwordqueueathead interlockedresidentOINSQHIQG00.0089Insertintoquadwordqueueathead interlockedOINSQHIQRQ00.00A4Insertintoquadwordqueueathead interlockedresidentOBINSQTILGB00.0088Insertintolongwordqueueattail interlockedOINSQTILRQ00.00A3Insertintolongwordqueueattail interlockedresidentOINSQTIQG00.008AInsertintoquadwordqueueattail interlockedOLINSQTIQRQL00.00A5Insertintoquadwordqueueattail interlockedresidentOINSQUEL700.008BInsertentryintolongwordqueueO INSQUEL/DA00.008DInsertentryintolongwordqueuedeferredOUINSQUEQ7U00.008CInsertentryintoquadwordqueueLO INSQUEQ/D00.008EInsertentryintoquadwordqueuedeferredOPROBER+00.008FProbeforreadaccessO_PROBEW,_00.0090ProbeforwriteaccessORD_PS*00.0091Move processorstatus2OREAD_UNQ00.009EReaduniquecontext OiREI9i00.0092Returnfrom exceptionor interruptOREMQHILG00.0093Removefromlongwordqueueathead interlocked[OREMQHILR00.00A6Removefromlongwordqueueathead interlockedresidentOrREMQHIQGr00.0095Removefromquadwordqueueathead interlockedXOREMQHIQR00.00A8Removefromquadwordqueueathead interlockedresi-$ dentO| REMQTILG| 00.0094Removefromlongwordqueueattail interlockedO REMQTILRQ 00.00A7Removefromlongwordqueueattail interlockedresidentO- REMQTIQG- 00.0096Removefromquadwordqueueattail interlockedO REMQTIQRQ 00.00A9Removefromquadwordqueueattail interlockedresidentO REMQUEL7 00.0097RemoveentryfromlongwordqueueLO7  REMQUEL/D00.0099RemoveentryfromlongwordqueuedeferredO REMQUEQ7 00.0098RemoveentryfromquadwordqueueLO  REMQUEQ/D00.009ARemoveentryfromquadwordqueuedeferreduK O OMnemonicOpcode Description O 4Z [ O%RSCC/%00.009DReadsystemcyclecounterO~SWASTEN8~00.009BSwapASTenableforcurrentmode4O WRITE_UNQ00.009FWriteuniquecontextFO/WR_PS_SW00.009CWrite processorstatussoftwarefield OU  xNAOTableA-8:7OpenVMS PrivilegedPALcode Instructions O OMnemonicOpcode Description O5 OCFLUSH00.0001CacheflushOCSERVE#00.0009ConsoleserviceOODRAINA O00.0002DrainabortsOHALT"00.0000Halt processoruK O OMnemonicOpcode Description O + b   O%LDQP+%00.0003LoadquadwordphysicalO~MFPR_ASN7~00.0006Movefrom processorregisterASNOMFPR_ESP700.001EMovefrom processorregisterESPO/MFPR_FEN7/00.000BMovefrom processorregisterFENOMFPR_IPL700.000EMovefrom processorregisterIPLO MFPR_MCES800.0010Movefrom processorregisterMCESO8 MFPR_PCBB8800.0012Movefrom processorregisterPCBBO MFPR_PRBR800.0013Movefrom processorregisterPRBRO MFPR_PTBR800.0015Movefrom processorregisterPTBROB MFPR_SCBB8B00.0016Movefrom processorregisterSCBBO MFPR_SISR800.0019Movefrom processorregisterSISROMFPR_SSP700.0020Movefrom processorregisterSSPOL MFPR_TBCHK9L00.001AMovefrom processorregisterTBCHKOMFPR_USP700.0022Movefrom processorregisterUSPO MFPR_VPTB800.0029Movefrom processorregisterVPTBOU MFPR_WHAMI9U00.003FMovefrom processorregisterWHAMIO MTPR_ASTEN700.0026Moveto processorregisterASTENO MTPR_ASTSR700.0027Moveto processorregisterASTSRO_ MTPR_DATFX7_00.002EMoveto processorregisterDATFXOMTPR_ESP500.001FMoveto processorregisterESPOMTPR_FEN500.000BMoveto processorregisterFENOi MTPR_IPIR6i00.000DMoveto processorregisterIPRIOMTPR_IPL500.000EMoveto processorregisterIPLO MTPR_MCES600.0011Moveto processorregisterMCESGOr MTPR_PERFMON00.002BMoveto processorregisterPERFMONO MTPR_PRBR600.0014Moveto processorregisterPRBRO$  MTPR_SCBB6$ 00.0017Moveto processorregisterSCBBO|  MTPR_SIRR6| 00.0018Moveto processorregisterSIRRO MTPR_SSP5 00.0021Moveto processorregisterSSPO-  MTPR_TBIA6- 00.001BMoveto processorregisterTBIAO  MTPR_TBIAP7 00.001CMoveto processorregisterTBIAPO  MTPR_TBIS6 00.001DMoveto processorregisterTBISO7  MTPR_TBISD77 00.0024Moveto processorregisterTBISDO  MTPR_TBISI7 00.0025Moveto processorregisterTBISIO MTPR_USP5 00.0023Moveto processorregisterUSPuK O OMnemonicOpcode Description O * [O% MTPR_VPTB6%00.002AMoveto processorregisterVPTBO~STQP,~00.0004StorequadwordphysicalOSWPCTX,00.0005Swap privilegedcontextO/SWPPAL'/00.000ASwapPALcodeimage OU  BOA.6CCommon ArchitectureOpcodesin NumericalOrderO(TableA-6@(liststhecommon architectureopcodesinnumeri-Ocalorder*Ol?H=OTableA-9:7PALcodeOpcodesin NumericalOrder O OFOpcode ?V16DFOpcode 4V108FOpenVMS Ob  O00.000000.0000HALT"O$00.000100.0001CFLUSH"O|00.000200.0002DRAINA O00.000300.0003LDQP] O OOpcode ?16DOpcode 4108OpenVMS O   O%00.000400.0004STQP"O~00.000500.0005SWPCTX$O00.000600.0006MFPR_ASN&O/00.000700.0007 MTPR_ASTEN&O00.000800.0008 MTPR_ASTSR"O00.000900.0009CSERVE"O800.000A00.0010SWPPAL$O00.000B00.0011MFPR_FEN$O00.000C00.0012MTPR_FEN%OB00.000D00.0013 MTPR_IPIR$O00.000E00.0014MFPR_IPL$O00.000F00.0015MTPR_IPL%OL00.001000.0016 MFPR_MCES%O00.001100.0017 MTPR_MCES%O00.001200.0018 MFPR_PCBB%OU00.001300.0019 MFPR_PRBR%O00.001400.0020 MTPR_PRBR%O00.001500.0021 MFPR_PTBR%O_00.001600.0022 MFPR_SCBB%O00.001700.0023 MTPR_SCBB%O00.001800.0024 MTPR_SIRR%Oi00.001900.0025 MFPR_SISR&O00.001A00.0026 MFPR_TBCHK%O00.001B00.0027 MTPR_TBIA&Or00.001C00.0028 MTPR_TBIAP%O00.001D00.0029 MTPR_TBIS$O$ 00.001E00.0030MFPR_ESP$O| 00.001F00.0031MTPR_ESP$O 00.002000.0032MFPR_SSP$O- 00.002100.0033MTPR_SSP$O 00.002200.0034MFPR_USP$O 00.002300.0035MTPR_USP&O7 00.002400.0036 MTPR_TBISD&O 00.002500.0037 MTPR_TBISI&O 00.002600.0038 MFPR_ASTEN&OA 00.002700.0039 MFPR_ASTSR%O 00.002900.0040 MFPR_VPTB%O 00.002A00.0041 MTPR_VPTB(OJ 00.002B00.0042 MTPR_PERFMON&O 00.002E00.0043 MTPR_DATFX [ O OOpcode ?16DOpcode 4108OpenVMS O &OW00.003F00.0063 MFPR_WHAMIO00.008000.0128BPT"O00.008100.0129BUGCHK Oa00.008200.0130CHME O00.008300.0131CHMK O00.008400.0132CHMS Oj00.008500.0133CHMUO00.008600.0134IMB#O00.008700.0135INSQHIL#Ot00.008800.0136INSQTIL#O00.008900.0137INSQHIQ#O%00.008A00.0138INSQTIQ#O~00.008B00.0139INSQUEL#O00.008C00.0140INSQUEQ%O/00.008D00.0141 INSQUEL/D%O00.008E00.0142 INSQUEQ/D"O00.008F00.0143PROBER"O800.009000.0144PROBEW!O00.009100.0145RD_PSO00.009200.0146REI#OB00.009300.0147REMQHIL#O00.009400.0148REMQTIL#O00.009500.0149REMQHIQ#OL 00.009600.0150REMQTIQ#O 00.009700.0151REMQUEL#O 00.009800.0152REMQUEQ%OU 00.009900.0153 REMQUEL/D%O 00.009A00.0154 REMQUEQ/D#O 00.009B00.0155SWASTEN$O_ 00.009C00.0156WR_PS_SW O 00.009D00.0157RSCC$O 00.009E00.0158READ_UNQ%Oi 00.009F00.0159 WRITE_UNQ"O 00.00A000.0160AMOVRR"O 00.00A100.0161AMOVRM$Or 00.00A200.0162INSQHILR$O 00.00A300.0163INSQTILR! O OOpcode ?16DOpcode 4108OpenVMS O $OW00.00A400.0164INSQHIQR$O00.00A500.0165INSQTIQR$O00.00A600.0166REMQHILR] O OOpcode ?16DOpcode 4108OpenVMS O [$O%00.00A700.0167REMQTILR$O~00.00A800.0168REMQHIQR$O00.00A900.0169REMQTIQR#O/00.00AA00.0170GENTRAP OU " 5OA.7COpenVMSPALcode InstructionSummaryO(TableA-7>(liststheOpenVMS unprivilegedPALcodeinstruc-OtionsandTableA-827liststheOpenVMS privilegedPALcodeO instructions.*Ol?*Cm?B{ Y:OTableA-10:7Common Architecture Instructions O OFMnemonicFCodeOperands F Operation Ob OADDF#15.080Fa.rf,Fb.rf,Fc.wf Fc   6 Fav + 1 FbvO$ADDF/C$15.000O|ADDF/S|15.480OADDF/SC15.400{ Q O OMnemonicCodeOperands  Operation O h O%ADDF/SUC%15.500O~ADDF/SU~15.580OADDF/U15.180O/ADDF/UC/15.100OADDG#15.0A0Fa.rg,Fb.rg,Fc.wg Fc   6 Fav + 1 FbvOADDG/C15.020O8ADDG/S815.4A0OADDG/SC15.420OADDG/SU15.5A0OBADDG/SUCB15.520OADDG/U15.1A0OADDG/UC15.120OLADDL*L10.00Ra.rl,{Rb.rl/#b.ib},Rc.wq LRc L ; L SEXT((Rav L+  Rbv)<31:0>)OADDL/V10.40OUADDQ*U10.20Ra.rq,{Rb.rq/#b.ib},Rc.wq URc U  ; URav U+ ; URbvOADDQ/V10.60OADDS#16.080Fa.rs,Fb.rs,Fc.ws Fc   6 Fav + 1 FbvO_ADDS/C_16.000OADDS/D16.0C0OADDS/M16.040OiADDS/SUi16.580OADDS/SUC16.500OADDS/SUD16.5C0OrADDS/SUIr16.780O ADDS/SUIC16.700O$  ADDS/SUID$ 16.7C0O|  ADDS/SUIM| 16.740O ADDS/SUM 16.540O- ADDS/U- 16.180O ADDS/UC 16.100O ADDS/UD 16.1C0O7 ADDS/UM7 16.140O ADDT# 16.0A0Fa.rt,Fb.rt,Fc.wt Fc   6 Fav + 1 FbvO ADDT/C 16.020OA ADDT/DA 16.0E0O ADDT/M 16.060O ADDT/SU 16.5A0OJ ADDT/SUCJ 16.520O ADDT/SUD 16.5E0j z @  O OMnemonicCodeOperands  Operation O OWADDT/SUIW16.7A0O ADDT/SUIC16.720O ADDT/SUID16.7E0Oa ADDT/SUIMa16.760OADDT/SUM16.560OADDT/U16.1A0OjADDT/UCj16.120OADDT/UD16.1E0OADDT/UM16.160 OtAND*t11.00Ra.rq,{Rb.rq/#b.ib},Rc.wq tRc t ; tRavANDRbv OBEQ 39 Ra.rq,disp.al IfRav = 0ThenPC p   PC %+ %{4 ' 1*L % SEXT(disp)} O~BGE ~3E~ Ra.rq,disp.al ~IfRav ~ ~0ThenPC ` ~  ~PC + {4 ' *L  SEXT(disp)} O/BGT /3F/ Ra.rq,disp.al! /IfRav>0ThenPC j /  /PC + {4 ' *L  SEXT(disp)} OBIC*11.08Ra.rq,{Rb.rq/#b.ib},Rc.wq Rc  ; RavAND{NOTRbv} O8BIS*811.20Ra.rq,{Rb.rq/#b.ib},Rc.wq 8Rc 8 ; 8RavORRbvOBLBC 38 Ra.rq,disp.al IfRav<0> + = 0Then PC    K PC + ( {4 h *  SEXT(disp)}OBBLBS B3CB Ra.rq,disp.al BIfRav<0> + B= B1Then PC    K PC + ( {4 h *  SEXT(disp)} OBLE 3B Ra.rq,disp.al IfRav  0ThenPC `   PC L + L {4 ' X *L L  SEXT(disp)} O BLT  3A  Ra.rq,disp.al! IfRav<0ThenPC j   PC + {4 ' *L  SEXT(disp)} OU BNE U 3DU  Ra.rq,disp.al U IfRav U 6 U = U 0ThenPC U   U PC + {4 ' *L  SEXT(disp)} O BR  30 [Ra.wq],disp.al  Ra   A  PC;PC N     PC '  + _ {4 k * _  SEXT(disp)} O BSR  34  Ra.wq,disp.al Ra  A PC;PC N   PC ' +  {4  *   SEXT(disp)}Oi CALL_PAL i 00i fnc.ir i TraptoPALcodeO CMOVEQ* 11.24Ra.rq,{Rb.rq/#b.ib},Rc.wq IfRav = 0ThenRc ^   RbvO CMOVGE* 11.46Ra.rq,{Rb.rq/#b.ib},Rc.wq  IfRav    0ThenRc L     RbvOr CMOVGT*r 11.66Ra.rq,{Rb.rq/#b.ib},Rc.wq! r IfRav>0ThenRc W r   r Rbv z  O OMnemonicCodeOperands  Operation O OWCMOVLBC*W11.16Ra.rq,{Rb.rq/#b.ib},Rc.wq WIfRav<0> + W= W0Then Rc   ; RbvOCMOVLBS*11.14Ra.rq,{Rb.rq/#b.ib},Rc.wq IfRav<0> + = 1Then aRc a  ; aRbvOCMOVLE*11.64Ra.rq,{Rb.rq/#b.ib},Rc.wq IfRav  0ThenRc L   RbvOCMOVLT*11.44Ra.rq,{Rb.rq/#b.ib},Rc.wq! IfRav<0ThenRc W   RbvOjCMOVNE*j11.26Ra.rq,{Rb.rq/#b.ib},Rc.wq jIfRav j6 j= j0ThenRc s j  jRbvOCMPBGE*10.0FRa.rq,{Rb.rq/#b.ib},Rc.wq Rc  ; Bytewisecompare maskof{Rav  Rbv}OtCMPEQ*t10.2DRa.rq,{Rb.rq/#b.ib},Rc.wq tIfRav t= tRbvThenRc t  t1 ElseRc   0O%CMPGEQ#%15.0A5Fa.rg,Fb.rg,Fc.wq %IfFav %= %FbvThen ~Fc ~ 6 ~0.5ElseFc ~   ~0.0OCMPGEQ/S15.4A5O/CMPGLE#/15.0A7Fa.rg,Fb.rg,Fc.wq /IfFav / /FbvThenFc /  /0.5 ElseFc   0.0OCMPGLE/S15.4A7O8CMPGLT#815.0A6Fa.rg,Fb.rg,Fc.wq 8IfFav<FbvThen Fc  6 0.5ElseFc    0.0OCMPGLT/S15.4A6OBCMPLE*B10.6DRa.rq,{Rb.rq/#b.ib},Rc.wq BIfRav B BRbvThenRc B  B1 ElseRc   0OCMPLT*10.4DRa.rq,{Rb.rq/#b.ib},Rc.wq# IfRav<RbvThenRc    1 L ElseRc L   L 0O CMPTEQ# 16.0A5Fa.rt,Fb.rt,Fc.wq IfFav = FbvThen Fc  6 2.0ElseFc    0.0OU  CMPTEQ/SUU 16.5A5O CMPTLE# 16.0A7Fa.rt,Fb.rt,Fc.wq IfFav  FbvThenFc   2.0  ElseFc     0.0O_  CMPTLE/SU_ 16.5A7O CMPTLT# 16.0A6Fa.rt,Fb.rt,Fc.wq IfFav<FbvThen  Fc   6  2.0ElseFc      0.0Oi  CMPTLT/SUi 16.5A6O CMPTUN# 16.0A4Fa.rt,Fb.rt,Fc.wq! IfFav UnorderedFbv  ThenFc     2.0ElseFc     0.0Or  CMPTUN/SUr 16.5A4?v  O OMnemonicCodeOperands  Operation O OWCMPULE*W10.3DRa.rq,{Rb.rq/#b.ib},Rc.wq WIfRavU W# WRbvThen Rc  ; 1ElseRc   0OCMPULT*10.1DRa.rq,{Rb.rq/#b.ib},Rc.wq IfRavU<RbvThen aRc a ; a1ElseRc a  a0OCPYS#17.020Fa.rq,Fb.rq,Fc.wq Fc  6 Fav<63>+||  Fbv<62:0>OjCPYSE#j17.022Fa.rq,Fb.rq,Fc.wq jFc j 6 j Fav<63:52>*||  Fbv<51:0>OCPYSN#17.021Fa.rq,Fb.rq,Fc.wq Fc  6 NOTFav<63>(|| t Fbv<62:0>OCVTDG15.09E Fb.rd,Fc.wg Fc  "6 D_FloattoG_Floatof %FbvO~CVTDG/C~15.01EOCVTDG/S15.49EO/CVTDG/SC/15.41EOCVTDG/SU15.59EO CVTDG/SUC15.51EO8CVTDG/U815.19EOCVTDG/UC15.11EOCVTGD15.0AD Fb.rg,Fc.wd Fc  "6 G_FloattoD_Floatof BFbvOCVTGD/C15.02DOCVTGD/S15.4ADOL CVTGD/SCL 15.42DO CVTGD/SU 15.5ADO  CVTGD/SUC 15.52DOU CVTGD/UU 15.1ADO CVTGD/UC 15.12DO CVTGF 15.0AC Fb.rg,Fc.wf  Fc   "6  G_FloattoF_Floatof _ FbvO CVTGF/C 15.02CO CVTGF/S 15.4ACOi CVTGF/SCi 15.42CO CVTGF/SU 15.5ACO  CVTGF/SUC 15.52COr CVTGF/Ur 15.1ACO CVTGF/UC 15.12Cf  O OMnemonicCodeOperands  Operation O OWCVTGQW15.0AF Fb.rg,Fc.wq WFc W 6 WG_Floattoquadof FbvOCVTGQ/C15.02FOaCVTGQ/Sa15.4AFOCVTGQ/SC15.42FOCVTGQ/SV15.5AFOj CVTGQ/SVCj15.52FOCVTGQ/V15.1AFOCVTGQ/VC15.12FOtCVTLQt17.010 Fb.rl,Fc.wq tFc t ,6 tSEXT(Fbv<63:62> || Fbv<58:29>)OCVTQF15.0BC Fb.rq,Fc.wf Fc  6 QuadtoF_Floatof %FbvO~CVTQF/C~15.03COCVTQG15.0BE Fb.rq,Fc.wg Fc  6 QuadtoG_Floatof /FbvOCVTQG/C15.03EOCVTQL17.030 Fb.rq,Fc.wl Fc  !6 QuadtolongofFbvO8CVTQL/SV817.530OCVTQL/V17.130OCVTQS16.0BC Fb.rq,Fc.ws Fc  6 QuadtoS_Floatof BFbvOCVTQS/C16.03COCVTQS/D16.0FCOL CVTQS/ML 16.07CO  CVTQS/SUI 16.7BCO  CVTQS/SUIC 16.73COU  CVTQS/SUIDU 16.7FCO  CVTQS/SUIM 16.77CO CVTQT 16.0BE Fb.rq,Fc.wt  Fc   6  QuadtoT_Floatof _ FbvO CVTQT/C 16.03EO CVTQT/D 16.0FEOi CVTQT/Mi 16.07EO  CVTQT/SUI 16.7BEO  CVTQT/SUIC 16.73EOr  CVTQT/SUIDr 16.7FEO  CVTQT/SUIM 16.77Ea  O OMnemonicCodeOperands  Operation O OWCVTSTW16.2AC Fb.rs,Fc.wt WFc W "6 WS_FloattoT_Floatof FbvOCVTST/S16.6ACOaCVTTQa16.0AF Fb.rt,Fc.wq aFc a 6 aT_Floattoquadof FbvOCVTTQ/C16.02FOjCVTTQ/Dj16.0EFOCVTTQ/M16.06FOCVTTQ/SV16.5AFOt CVTTQ/SVCt16.52FO CVTTQ/SVD16.5EFO% CVTTQ/SVI%16.7AFO~ CVTTQ/SVIC~16.72FO CVTTQ/SVID16.7EFO/ CVTTQ/SVIM/16.76FO CVTTQ/SVM16.56FOCVTTQ/V16.1AFO8CVTTQ/VC816.12FOCVTTQ/VD16.1EFOCVTTQ/VM16.16FOBCVTTSB16.0AC Fb.rt,Fc.ws BFc B "6 BT_FloattoS_Floatof FbvOCVTTS/C16.02COL CVTTS/DL 16.0ECO CVTTS/M 16.06CO CVTTS/SU 16.5ACOU  CVTTS/SUCU 16.52CO  CVTTS/SUD 16.5ECO  CVTTS/SUI 16.7ACO_  CVTTS/SUIC_ 16.72CO  CVTTS/SUID 16.7ECO  CVTTS/SUIM 16.76COi  CVTTS/SUMi 16.56CO CVTTS/U 16.1ACO CVTTS/UC 16.12COr CVTTS/UDr 16.1ECO CVTTS/UM 16.16Co E O OMnemonicCodeOperands  Operation O OWDIVF#W15.083Fa.rf,Fb.rf,Fc.wf WFc W  6 WFav W= WFbvODIVF/C15.003ODIVF/S15.483OaDIVF/SCa15.403ODIVF/SU15.583ODIVF/SUC15.503OjDIVF/Uj15.183ODIVF/UC15.103ODIVG#15.0A3Fa.rg,Fb.rg,Fc.wg Fc   6 Fav = FbvOtDIVG/Ct15.023ODIVG/S15.4A3O%DIVG/SC%15.423O~DIVG/SU~15.5A3ODIVG/SUC15.523O/DIVG/U/15.1A3ODIVG/UC15.123ODIVS#16.083Fa.rs,Fb.rs,Fc.ws Fc   6 Fav = FbvO8DIVS/C816.003ODIVS/D16.0C3ODIVS/M16.043OBDIVS/SUB16.583ODIVS/SUC16.503ODIVS/SUD16.5C3OL DIVS/SUIL 16.783O  DIVS/SUIC 16.703O  DIVS/SUID 16.7C3OU  DIVS/SUIMU 16.743O DIVS/SUM 16.543O DIVS/U 16.183O_ DIVS/UC_ 16.103O DIVS/UD 16.1C3O DIVS/UM 16.143Oi DIVT#i 16.0A3Fa.rt,Fb.rt,Fc.wt i Fc i   6 i Fav i = i FbvO DIVT/C 16.023O DIVT/D 16.0E3Or DIVT/Mr 16.063O DIVT/SU 16.5A3 u  O OMnemonicCodeOperands  Operation O OWDIVT/SUCW16.523ODIVT/SUD16.5E3ODIVT/SUI16.7A3Oa DIVT/SUICa16.723O DIVT/SUID16.7E3O DIVT/SUIM16.763OjDIVT/SUMj16.563ODIVT/U16.1A3ODIVT/UC16.123OtDIVT/UDt16.1E3ODIVT/UM16.163 O%EQV*%11.48Ra.rq,{Rb.rq/#b.ib},Rc.wq %Rc % ; %RavXOR{NOTRbv}O~EXCB~18.0400 ~ ExceptionbarrierOEXTBL*12.06Ra.rq,{Rb.rq/#b.ib},Rc.wq Rc  ; Byteextractlow! /fromRavatRbv<2:0>OEXTLH*12.6ARa.rq,{Rb.rq/#b.ib},Rc.wq Rc  ; Longextracthigh! fromRavatRbv<2:0>O8EXTLL*812.26Ra.rq,{Rb.rq/#b.ib},Rc.wq 8Rc 8 ; 8Longextractlow! fromRavatRbv<2:0>OEXTQH*12.7ARa.rq,{Rb.rq/#b.ib},Rc.wq Rc  ; Quadextracthigh! BfromRavatRbv<2:0>OEXTQL*12.36Ra.rq,{Rb.rq/#b.ib},Rc.wq Rc  ; Quadextractlow! fromRavatRbv<2:0>OL EXTWH*L 12.5ARa.rq,{Rb.rq/#b.ib},Rc.wq L Rc L  ; L Wordextracthigh! fromRavatRbv<2:0>O EXTWL* 12.16Ra.rq,{Rb.rq/#b.ib},Rc.wq Rc  ; Wordextractlow! U fromRavatRbv<2:0>O FBEQ  31  Fa.rq,disp.al IfFav = 0ThenPC k   PC  +  {4 '  *L   SEXT(disp)}O_ FBGE _ 36_  Fa.rq,disp.al _ IfFav _  _ 0ThenPC [ _   _ PC + {4 ' *L  SEXT(disp)}O FBGT  37  Fa.rq,disp.al!  IfFav>0ThenPC e     PC i + i {4 ' u *L i  SEXT(disp)}O FBLE  33  Fa.rq,disp.al IfFav  0ThenPC [   PC  +  {4 ' & *L   SEXT(disp)}Or FBLT r 32r  Fa.rq,disp.al! r IfFav<0ThenPC e r   r PC + {4 ' *L  SEXT(disp)}8 z   O OMnemonicCodeOperands  Operation O OWFBNE W35W Fa.rq,disp.al WIfFav W6 W= W0ThenPC  W  WPC + {4 ' *L  SEXT(disp)}OFCMOVEQ#17.02AFa.rq,Fb.rq,Fc.wq IfFav = 0ThenFc S   FbvOaFCMOVGE#a17.02DFa.rq,Fb.rq,Fc.wq aIfFav a a0ThenFc B a  aFbvOFCMOVGT#17.02FFa.rq,Fb.rq,Fc.wq! IfFav>0ThenFc L   FbvOFCMOVLE#17.02EFa.rq,Fb.rq,Fc.wq IfFav  0ThenFc B   FbvOjFCMOVLT#j17.02CFa.rq,Fb.rq,Fc.wq! jIfFav<0ThenFc L j  jFbvOFCMOVNE#17.02BFa.rq,Fb.rq,Fc.wq IfFav 6 = 0ThenFc i   FbvOFETCH18.8000x0(Rb.ab)! Prefetcharound(Rbv)OtFETCH_Mt18.A000m0(Rb.ab)" tPrefetcharound(Rbv), modifyintentO%INSBL*%12.0BRa.rq,{Rb.rq/#b.iq},Rc.wq %Rc % !; %Byteinsertlowfrom ~RavatRbv<2:0>OINSLH*12.67Ra.rq,{Rb.rq/#b.iq},Rc.wq Rc  ; Longinserthigh! /fromRavatRbv<2:0>OINSLL*12.2BRa.rq,{Rb.rq/#b.iq},Rc.wq Rc  !; Longinsertlowfrom RavatRbv<2:0>O8INSQH*812.77Ra.rq,{Rb.rq/#b.iq},Rc.wq 8Rc 8 ; 8Quadinserthigh! fromRavatRbv<2:0>OINSQL*12.3BRa.rq,{Rb.rq/#b.iq},Rc.wq Rc  !; Quadinsertlowfrom BRavatRbv<2:0>OINSWH*12.57Ra.rq,{Rb.rq/#b.iq},Rc.wq Rc  ; Wordinserthigh! fromRavatRbv<2:0>OL INSWL*L 12.1BRa.rq,{Rb.rq/#b.iq},Rc.wq L Rc L  !; L Wordinsertlowfrom RavatRbv<2:0> O JMP$ 1A.0[Ra.wq],(Rb.ab),hint Ra  A PC;PC L   RbvAND U {NOT3} O JSR" 1A.1Ra.wq,(Rb.ab),hint Ra  A PC;PC L   RbvAND  {NOT3}1O_  JSR_COROUTINE1A.3Ra.wq,(Rb.ab),hint _ Ra _  A _ PC;PC L _   _ RbvAND {NOT3} O LDA  08 Ra.wq,disp.ab(Rb.ab)  Ra    A  Rbv  +;   SEXT(disp)Oi LDAH i 09i Ra.wq,disp.ab(Rb.ab) i Ra i   A i Rbv i +  SEXT(disp  *6 65536) O LDF  20 Fa.wf,disp.ab(Rb.ab)  Fa   ;  ({Rbv   +f   SEXT(disp)}) Or LDG r 21r Fa.wg,disp.ab(Rb.ab) r Fa r  ; r ({Rbv  r +f r  SEXT(disp)}) x  O OMnemonicCodeOperands  Operation O  OWLDL W28WRa.wq,disp.ab(Rb.ab) WRa W A W SEXT(({Rbv  W+ SEXT(disp)})<31:0>)OLDL_L 2ARa.wq,disp.ab(Rb.ab) Ra  A  SEXT(({Rbv  + aSEXT(disp)})<31:0>) OLDQ 29Ra.wq,disp.ab(Rb.ab) Ra  A ({Rbv  +k  SEXT(disp)})OLDQ_L 2BRa.wq,disp.ab(Rb.ab) Ra  A ({Rbv  +k  SEXT(disp)})OjLDQ_U j0BjRa.wq,disp.ab(Rb.ab) jRa j A j({{Rbv + j+ j SEXT(disp)} ANDNOT7}) OLDS 22Fa.ws,disp.ab(Rb.ab) Fa  ; ({Rbv  +f  SEXT(disp)}) OtLDT t23tFa.wt,disp.ab(Rb.ab) tFa t ; t({Rbv  t+f t SEXT(disp)}) OMB18.4000 MemorybarrierO%MF_FPCR#%17.025Fa.rq,Fa.rq,Fa.wq %Fa % ; %FPCRO~MSKBL*~12.02Ra.rq,{Rb.rq/#b.iq},Rc.wq ~Rc ~ ; ~Bytemasklowfrom RavatRbv<2:0>O/MSKLH*/12.62Ra.rq,{Rb.rq/#b.iq},Rc.wq /Rc / ; /Longmaskhigh! fromRavatRbv<2:0>OMSKLL*12.22Ra.rq,{Rb.rq/#b.iq},Rc.wq Rc  ; Longmasklowfrom 8RavatRbv<2:0>OMSKQH*12.72Ra.rq,{Rb.rq/#b.iq},Rc.wq Rc  ; Quadmaskhigh! fromRavatRbv<2:0>OBMSKQL*B12.32Ra.rq,{Rb.rq/#b.iq},Rc.wq BRc B ; BQuadmasklowfrom RavatRbv<2:0>OMSKWH*12.52Ra.rq,{Rb.rq/#b.iq},Rc.wq Rc  ; Wordmaskhigh! L fromRavatRbv<2:0>O MSKWL* 12.12Ra.rq,{Rb.rq/#b.iq},Rc.wq Rc  ; Wordmasklowfrom RavatRbv<2:0>OU MT_FPCR#U 17.024Fa.rq,Fa.rq,Fa.wq U FPCR q U   U FaO MULF# 15.082Fa.rf,Fb.rf,Fc.wf Fc   6 Fav   FbvO MULF/C 15.002O_ MULF/S_ 15.482O MULF/SC 15.402O MULF/SU 15.582Oi MULF/SUCi 15.502O MULF/U 15.182O MULF/UC 15.102Or MULG#r 15.0A2Fa.rg,Fb.rg,Fc.wg r Fc r   6 r Fav r   r FbvO MULG/C 15.022pQ F O OMnemonicCodeOperands  Operation O OWMULG/SW15.4A2OMULG/SC15.422OMULG/SU15.5A2OaMULG/SUCa15.522OMULG/U15.1A2OMULG/UC15.122OjMULL*j13.00Ra.rl,{Rb.rl/#b.ib},Rc.wq jRc j ; j SEXT((Rav j  Rbv)<31:0>)OMULL/V13.40OtMULQ*t13.20Ra.rq,{Rb.rq/#b.ib},Rc.wq tRc t  ; tRav t $ tRbvOMULQ/V13.60O%MULS#%16.082Fa.rs,Fb.rs,Fc.ws %Fc %  6 %Fav %  %FbvO~MULS/C~16.002OMULS/D16.0C2O/MULS/M/16.042OMULS/SU16.582OMULS/SUC16.502O8MULS/SUD816.5C2OMULS/SUI16.782O MULS/SUIC16.702OB MULS/SUIDB16.7C2O MULS/SUIM16.742OMULS/SUM16.542OL MULS/UL 16.182O MULS/UC 16.102O MULS/UD 16.1C2OU MULS/UMU 16.142O MULT# 16.0A2Fa.rt,Fb.rt,Fc.wt Fc   6 Fav   FbvO MULT/C 16.022O_ MULT/D_ 16.0E2O MULT/M 16.062O MULT/SU 16.5A2Oi MULT/SUCi 16.522O MULT/SUD 16.5E2O MULT/SUI 16.7A2Or  MULT/SUICr 16.722O  MULT/SUID 16.7E2 m  O OMnemonicCodeOperands  Operation O OW MULT/SUIMW16.762OMULT/SUM16.562OMULT/U16.1A2OaMULT/UCa16.122OMULT/UD16.1E2OMULT/UM16.162OjORNOT*j11.28Ra.rq,{Rb.rq/#b.ib},Rc.wq jRc j ; jRavOR{NOTRbv} ORC18.E000mRa.wq Ra  A  intr_flag; intr_ flag    a 0 OtRET$t1A.2[Ra.wq],(Rb.ab),hint tRa t A tPC;PC L t  tRbvAND {NOT3}O%RPCC%18.C000hRa.wq %Ra % !A %Processcyclecounter O~RS~18.F000mRa.wq ~Ra ~ A ~ intr_flag; intr_ flag    a 1O/S4ADDL*/10.02Ra.rl,{Rb.rl/#b.ib},Rc.wq /Rc / ; /SEXT(((SLL(Rav,2)) +  Rbv)<31:0>)OS4ADDQ*10.22Ra.rq,{Rb.rq/#b.ib},Rc.wq Rc  ;  SLL(Rav,2) + F RbvO8S4SUBL*810.0BRa.rl,{Rb.rl/#b.ib},Rc.wq 8Rc 8 ; 8SEXT(((SLL(Rav,2))   Rbv)<31:0>)OS4SUBQ*10.2BRa.rq,{Rb.rq/#b.ib},Rc.wq Rc  ;  SLL(Rav,2)  4 RbvOBS8ADDL*B10.12Ra.rl,{Rb.rl/#b.ib},Rc.wq BRc B ; BSEXT(((SLL(Rav,3)) +  Rbv)<31:0>)OS8ADDQ*10.32Ra.rq,{Rb.rq/#b.ib},Rc.wq Rc  ;  SLL(Rav,3) + F RbvOL S8SUBL*L 10.1BRa.rl,{Rb.rl/#b.ib},Rc.wq L Rc L  ; L SEXT(((SLL(Rav,3))   Rbv)<31:0>)O S8SUBQ* 10.3BRa.rq,{Rb.rq/#b.ib},Rc.wq Rc  ;  SLL(Rav,3)  4 Rbv OU SLL*U 12.39Ra.rq,{Rb.rq/#b.ib},Rc.wq U Rc U  ; U SLL(Rav,Rvb<5:0>) O SRA* 12.3CRa.rb,{Rb.rq/#b.ib},Rc.wq Rc  ; SRA(Rav,Rvb<5:0>) O SRL* 12.34Ra.rq,{Rb.rq/#b.ib},Rc.wq  Rc   ;  SRL(Rav,Rvb<5:0>) O_ STF _ 24_ Fa.rf,disp.ab(Rb.ab) _ ({Rbv p _ +  SEXT(disp)}) k   Fav O STG  25 Fa.rg,disp.ab(Rb.ab)  ({Rbv p  + i  SEXT(disp)}) k i   i Fav O STL  2C Ra.rl,disp.ab(Rb.ab) ({Rbv p +  SEXT(disp)})<31:0> f      Rav<31:0>Or STL_C r 2Er Ra.ml,disp.ab(Rb.ab) r ({Rbv p r + SEXT(disp)})<31:0> f    Rav<31:0>  O OMnemonicCodeOperands  Operation O  OWSTQ W2DWRa.rq,disp.ab(Rb.ab) W({Rbv p W+  SEXT(disp)}) k   RavOSTQ_C 2FRa.mq,disp.ab(Rb.ab) ({Rbv p + a SEXT(disp)}) k a  aRavOSTQ_U 0FRa.rq,disp.ab(Rb.ab) ({{Rbv } +  SEXT(disp)} ANDNOT7})   Rav OjSTS j26jFa.rs,disp.ab(Rb.ab) j({Rbv p j+  SEXT(disp)}) k   Fav OSTT 27Fa.rt,disp.ab(Rb.ab) ({Rbv p + t SEXT(disp)}) k t  tFavOSUBF#15.081Fa.rf,Fb.rf,Fc.wf Fc   6 Fav   FbvO%SUBF/C%15.001O~SUBF/S~15.481OSUBF/SC15.401O/SUBF/SU/15.581OSUBF/SUC15.501OSUBF/U15.181O8SUBF/UC815.101OSUBG#15.0A1Fa.rg,Fb.rg,Fc.wg Fc   6 Fav   FbvOSUBG/C15.021OBSUBG/SB15.4A1OSUBG/SC15.421OSUBG/SU15.5A1OL SUBG/SUCL 15.521O SUBG/U 15.1A1O SUBG/UC 15.121OU SUBL*U 10.09Ra.rl,{Rb.rl/#b.ib},Rc.wq U Rc U  ; U  SEXT((Rav U   Rbv)<31:0>)O SUBL/V 10.49O_ SUBQ*_ 10.29Ra.rq,{Rb.rq/#b.ib},Rc.wq _ Rc _   ; _ Rav _  * _ RbvO SUBQ/V 10.69O SUBS# 16.081Fa.rs,Fb.rs,Fc.ws  Fc    6  Fav     FbvOi SUBS/Ci 16.001O SUBS/D 16.0C1O SUBS/M 16.041Or SUBS/SUr 16.581O SUBS/SUC 16.501s5 n I O OMnemonicCodeOperands  Operation O OWSUBS/SUDW16.5C1OSUBS/SUI16.781O SUBS/SUIC16.701Oa SUBS/SUIDa16.7C1O SUBS/SUIM16.741OSUBS/SUM16.541OjSUBS/Uj16.181OSUBS/UC16.101OSUBS/UD16.1C1OtSUBS/UMt16.141OSUBT#16.0A1Fa.rt,Fb.rt,Fc.wt Fc   6 Fav   FbvO%SUBT/C%16.021O~SUBT/D~16.0E1OSUBT/M16.061O/SUBT/SU/16.5A1OSUBT/SUC16.521OSUBT/SUD16.5E1O8SUBT/SUI816.7A1O SUBT/SUIC16.721O SUBT/SUID16.7E1OB SUBT/SUIMB16.761OSUBT/SUM16.561OSUBT/U16.1A1OL SUBT/UCL 16.121O SUBT/UD 16.1E1O SUBT/UM 16.161OU TRAPBU 18.0000$ U Drainanypendingtraps{ Q O OMnemonicCodeOperands  Operation O s% IO%UMULH*%13.30Ra.rq,{Rb.rq/#b.ib},Rc.wq %Rc % ; %{Rav  1* ( %U ~ Rbv}<127:64> OWMB18.4400 Writememorybarrier O/XOR*/11.40Ra.rq,{Rb.rq/#b.ib},Rc.wq /Rc / ; /RavXORRbv OZAP*12.30Ra.rq,{Rb.rq/#b.iq},Rc.wq Rc  ; ZapfromRav,byte maskRbv<7:0>O8ZAPNOT*812.31Ra.rq,{Rb.rq/#b.iq},Rc.wq 8Rc 8 ; 8ZapfromRav,byte maskNOTRbv<7:0> O A5OA.8CPALcodeOpcodesin NumericalOrderO(TableA-9=(liststhePALcodeopcodesin numericalorder.*Ol?w3 1OA.9CCommon Architecture InstructionsO(TableA-109(liststhecommon architecture instructions.KOWhereenclosedinsquare brackets,Ra.wqdefaultstoR31.?OThisoccursfor instructionsBR,JMP,andRET.*O?q r/OExampleB-1:8RoutineCallExampleNzB$ROUTINE& ROUTINE1,% KIND=STACK,%SAVED_REGS=,& ARGLIST=z$LINKAGE_SECTIONzI_ADDR:%.address%I%$;%Linkage&to&external&Iz $CODE_SECTION1$b;%The%prologue% instruction%sequence,$;%is% generated%by%$ROUTINE%by$;%defaultz[;%Routine%bodyz.BASEpR27,$LS$$;%Inform% assembler&that&$;%R27%->%linkage%sectionz3LDQR0,&I_ADDR$3;%R0%->%Iz{LDLR2,&(R0)${;%R2%<-%IzMOV1,%R25/$;%AI%<-%1&(R16%already%contains$ ;Jthe& argument)zS$CALLpROUTINE20$S;%Call& ROUTINE2,% R27->linkage%sectzADDLR2,&R0,%R0%$;%retval%<-%retval&+%Iz$RETURN.$;%$RETURN& generates%the%epilogue$+;% sequence. zr $END_ROUTINE%ROUTINE1 +OB.1CMACRO-64 ProgrammingHintsEOUToassistyouinMACRO-64 programming,severalexam-FOpleprogramsareplacedinthe SYS$EXAMPLES directory O(SYS$EXAMPLES:MACRO64$ *'.M64)onyoursystemdur-KO^ing installation.-Inorderof increasing complexity,these.Oexampleprogramsareasfollows: Yr ` ;MACRO64$HELLO.M64-Asimple"HelloWorld"pro-C.gramthat demonstratesthecallingstandardmacros. ` ;MACRO64$WHAMI.M64-AprogramthatdisplaystheAWHAMIinternal processorregisterand demonstrates9^makingsystemservicecallsfrom MACRO-64. ` 8MACRO64$PI.M64-AprogramthatcomputestheH6 mathematicalconstantPItoa specifiednumberofdig-Aits,and demonstratesgeneralMACRO-64 programmingA concepts, optimization techniques,and user-defined@registersymbols.nMOThe remainderofthissectioncontainssomehintsforpro-!Ogrammingin MACRO-64. /OB.1.1C STARLET.MLB MigrationMacrosHO4Alargenumberofmacrosin STARLET.MLBwork correctlyBOwith MACRO-64.*Someofthemacrosin STARLET.MLB,DOhowever,generate instruction statementsdesignedex-JO= clusivelyforusewiththemacro migration compiler,the@OMACRO-32CompilerforOpenVMSAXP.BecausetheseMOmacrosgenerateVAX instructions,theyarenotsuitableforIOGusewith MACRO-64.,IfyouattempttouseoneoftheseCOVAXinstruction-generatingmacroswith MACRO-64,theOO assemblerdisplaysanerrormessagesimilartothe following:DMacro%XXXXX%is%not& supported%for%use&with%MACRO-64 WqAOMACRO-64defines correspondingmacrosbythesameIOnamesin MACRO64.MLB,whichpreventsaseriesofpoten-GO5tially misleading diagnostics.)BecauseMACRO-64searches@O MACRO64.MLBbefore STARLET.MLB,themacrodefini-JOtionsin MACRO64.MLBoccludethoseofthesamenamesinO> STARLET.MLB.-! IOYoucanstillperformthe operationswithMACRO-64thatIOtheseSTARLETmacrosperform.(Forexample,the followingFO5STARLETmacro invocationdoesnotworkwith MACRO-64:+z$ALLOC_S&DEVNAM=OUTPUT_DEV_DESCRDOHowever,youcanuse MACRO-64's$CALLmacroinsteadOasfollows:6z$CALL& SYS$ALLOC,%ARGS= GOAswithother languages,youcancallsystemservicesOfrom MACRO-64.,SeeChapter6#2for informationonthe'O5$CALLmacro..Refertothe#b5 OpenVMSSystemServicesO ReferenceManual0for informationoncallingOpenVMSDOsystem services./After installing MACRO-64, referto:O>SYS$EXAMPLES:MACRO64$WHAMI.M64foranexample>Oofhowtocallsystemservicesfrom MACRO-64.*nOa "OB.1.2CIntegerDivisionKO4WhiletheAlphaAXP architecturedoesnotprovideanin-KO structionforinteger division,youcanusethe OTS$DIV_LHOand OTS$DIV_IroutinestoperformquadwordandlongwordOO=integer division, respectively.)ForanexampleofhowtouseFOthese routines,seetheMACRO64$PI.M64exampleprogram+Ointhe SYS$EXAMPLES directory. =OB.1.3C User-DefinedRegisterSymbolsandMacros$O4Themacros describedin4Chapter6$W4accept user-definedreg-LOistersymbolsinplaceofthe predefinedregistersymbols.KOWhenwritingyourownmacros,youmaywishtoallowforLO= user-definedregistersymbolsaswell.,Tohelpyoudoso,COthe%TYPE( )lexicaloperatorreturns MACRO64$TYPE_=OGENREGandMACRO64$TYPE_FLTREGfor user-definedLOGintegerandfloating-point registers, respectively.+Inaddi-HOtion,MACRO-64suppliesyouwithtwolexical operators:$O%IREG( )and%FREG( ).*mOa eN;;OFigureB-1:7 Base-RegisterMemory Displacementl O6B KK   W6 T T T 8D@M:0S@Q@QD80@ L14J))ML /EPT !)DTJ))EL5&D@@@@ @c 2VLIYI9 zQF^% QHB JYIRXc 2VL$%QPp "   t` $  " "&# p>a@ @ Xc̍id)RRD(^ҋDBRdRRX&kL (3)H$*1F$*J,J(1&aCm| CCOFigureB-2:7 AccessingMemoryThroughBase AddressesBOBKK<@@@@@@@@@@@! @@ @@@&@`4@@,M@@hE@@(@E@@(,AE@@(YˀcD@@@@@@@@@@@@@@@8H@B@D@N@ \N@~@ 8)I@@ @/HQ@?~@ D!HQ@N>N@(D)IQ@~BDZ 8XN@~@@?@@@@@@>@@?@@@@@@@@@@@@@@@@@?@@@@@@@8@@@@@@@@@@@@@@@@@@@@@?@@@@@@@@@@c@S5@@LR&A(4M @@D^AE@@DB"@(E@@DR"A$M@@c5@@x@ @@"@@@ @@@|x @@@@@@@@@ p|>@@>@@D"H@@@D"@@@@D@@D@@@D"@@@D"H@@@@>@@@@@c):c1@@@$)iRJ @@@|=I%3@@@I%B@@@@"RJ @@Bk"2k1@@N@@~@@@@~@@N@@B@@@й1@@NJR4@@ R@@PQR@@HQJR@@5 1@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@p|>@@@D"H@@D"@@@D@@D@@D"@@D"H@@@>@@@@@@@@|@@@@p|>B @@D"HN Tsй@D"@~S$̈́@D E䂐@D~ P$DP@D"N $EH@D"HBDd5 @@>@@@@@@@@@@|@@p|>@@@D"H@@D"@@@D?@@D @@D" @@D"H @@@> @@ @@ @@ @@ @@ @@ @@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ?@  @  @  @  @  @ $ @ A @ A @ H O)% @ A@ȋQ @ AH(Q( @ AI(Q(% @  @  @  @            $ " 5Xc. Me h EE( E%E( E)e ( xEZc,' @ 8      @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @@<  B@D  NQ9X 1UsN ~D)eiRJ$ ADE) Q$Q ~AD!D) Q$Q NAD)e)DRJ$Q BA8X. <1QcN @@ @@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @                       ?Qg8S$HU cH U9YHH $ BH CȈi̙q+'\%ƂH A&(H4$L)CH @"(HID(BI D@"(HID(BHI D@"(HID(CH J q" 'YȂH J@x B Cʱ k`Ʃ9H x&%!)&)jQ р@ ,A(z(J$) ?Q Q@@ A( ( ') >Q Q@ (@(K( )(1 BQ Q @ 8,A2' )(1 (x@  D (@   !DX B*ɱ@ tn *'J/<e) ^*x&*R@ T5(K !E B*"*@ T (J!E) B*"*R@ $ (J!e) B*"*R@ $ (K X +ɱ@ $ 'r@ @ 8 p@  @  @  @  @  @  @  @  @  @  @  @  @  @  @  @  @ 1 c1@ (cJJ)% RJ@ ()Q 1@ D!@ ADE D " @ AH"(MA DP"@ AH(S@ <P@ AH"D1 D "!b@ AH "|  D"!@ AD @ D'! @ σO } D "@   @  @  @  @ <' < yO@ AD(@DD DQ "@ AH"((@DB DPṔ @ AH( !< @ @@  @  @@  @  @ 8yG q8@ $AE H$(E@ $A H  A@ 5@x j@ @ AL@  $1@ $A$D@ H$H @ $AD@ I$(@ A9> #s}@  @ @ @  @  @  @  @  @  @  @  @  @  @  @  @  @  @ |@ >(@   (@  !M9V2 B*rd@ tn hʱ/|SEYJ ^*@ T5*R!QEQz B*@ T *!QEQ B*@ $ *R!SEYJ B*@ $ *R|M93 +r,g@ $kʱ  @  @ p @  @ yG ߇!8@ <Cq@ "(2E@ DQd""@ ""A@ DD"@x !@ @ <>C@@  ""1@ DD!b&@@ "" @ DD!"@@ "("@ DQD! "@> "!}@ D>C" @ @ @  @  @  @  @  @  @  @  @  @  @  @  @ ?D`qLD T1 )TGPB8d PB ED1 E  sI.OB.2CTheOpenVMSCallingStandardFOUAllOpenVMS languagessuppliedbyDigitalsupportthe@OOpenVMSCalling Standard..WithmostcompiledAXPHO languages,theOpenVMSCallingStandardis invisibleto@O^you.+However,when programmingwiththeMACRO-64MOassembly language,youare responsiblefordefiningtheap-KO propriatedata structuresandusing appropriate instructionKOh sequencesinorderto implementroutinesthatcomplywith*OtheOpenVMSCalling Standard.  OSeeChapter6Abfora descriptionofseverallibrarymacrosthat8OaresuppliedwiththeMACRO-64 Assembler.*FlOaO %FOAn importantroleoftheOpenVMSCallingStandardisHOsupportfor debugging, exception handling,and tracebackKO5 routines.)TheseroutinesareaidedbytheOpenVMSCallingJOStandarddata structuresand conventionsto determinetheROcurrentroutineandthesourceofitscall.*In addition,theseIO> structuresand conventionsenablethedebuggertointer-SOpretother information,suchasdatastoredonthestackorinO registers. AOAgain,when programminginMACRO-64assemblylan-ROguage,itis importantthatyoudefinethedata structuresandJO5adheretothe conventionsdefinedbytheOpenVMSCallingO Standard.mHOThe followingexampleshowsasimpleroutine, ROUTINE1,%Othatdoesthe following:  ` <Takesasingle,longword parameterasinput. `O AOCallsanother function, ROUTINE2,passingitsown4 parameterasa parameterto ROUTINE2. `' G'AddsthereturnvaluefromROUTINE2andthevalueofManexternal longword,I,storingtheresultina register. ` KReturnstheresultoftheadditiontoitscallerinR0.! 8OB.2.1CEffectson Assembly-TimewhenUsing"GCalling-StandardMacrosEO_Thecalling-standardmacrosprovidedwithMACRO-64inEO MACRO64.MLBaredesignedtomake programmingincon-HOformancewiththeOpenVMSCallingStandard significantlyOieasier.'SeeiChapter61iifora descriptionofthesemacros.*,lOaZ <0LOIngeneral,thesemacrosgenerateaminimumof instructionLOanddata-directive statements,thejobthesemacrosperformMOiiscomplexandcaninvolveseveralthousandlinesofmacroFO expansion assembly-time statements.*WhenyouusetheseGOmacrosyoumaynotice increasedassemblytimeandin-LOrcreasedmemoryusageatassemblytime.' Nonetheless,useofKOthecalling-standardmacrosshould significantlyspeedyour'O#program developmenteffort. 9OExampleB-2:8RoutineWithoutLinkagePairszB.enable% local_block z.psect%$LINKAGE,noexe7OLS:.procedure_descriptor%MY_PROC,%MY_CODE7z\;%MY_PROC% procedure% descriptor% details...OX_ADDR:&.address&X0$;%Store%address&of&X's%proc&descz.psect% $CODE,exe/OUMY_CODE:%;&R27%->%LS%upon&entry/z;%Prologue%omitted%for% clarity...AzLDQR27,X_ADDR-LS(R27);%R27%->%proc%desc&for%Xz-LDQ R26,8(R27)"$-;%R26%->%code%for%X V -1zuJSR R26,(R26)$u;%CALL&X V u2/z;%Epilogue%omitted%for% clarity...l ,6OExampleB-3:8RoutineWithLinkagePairszB.enable% local_block z.psect%$LINKAGE,noexe7OLS:.procedure_descriptor%MY_PROC,%MY_CODE4z;;MYPROC% procedure& descriptor% details...!OX_LP:p .LINKAGE_PAIR%X*$;%Store%address&of&X's%code+$;%followed%by%address&of&X's$;%proc&descz|.psect% $CODE,exe/OMY_CODE:%;&R27%->%LS%upon&entry/z ;%Prologue%omitted%for% clarity...=zTLDQR26,-LS(R27);%R26%->%code%for%XCzLDQR27,-LS(R27);%R27%->%proc%desc&for%XzJSR R26,(R26)$;%CALL&X/z,;%Epilogue%omitted%for% clarity...[+5 7OB.3C AccessingMemorywithBase RegistersLOUTheAlphaAXP architectureisa base-register architecture.KOMemory locationscanonlybeaccessedrelativetoabase=Oaddressstoredinoneofthebase registers. NKOTheAlphaAXP architecturehas31generalbase registers,POR0throughR30.(R31isaspecialbase register,whichalwaysQO5readsas0.'AnyattempttostoreavalueinR31isignored.V! ,HOSincememory-reference instructionsusea16-bit,signedNO displacementrelativetothebaseaddress, elevated-modepro-OO5gramsmayaccessthelowandhigh32Kbytesofthevirtual1OaddressspacerelativetoR31.&See"FigureB-1.*"POxJOHowever,theseareasofvirtualmemoryare typicallynot.O accessibleto user-mode programs.MOThe followingsectionsdescribeseveralmethodsyoucanuse5Otoaccessmemoryusingbase addresses.*A`%O Base-Register ArchitectureKO4 Base-register architecturesuse differentmethodstoobtainQOaninitialbaseaddressforaroutine.( Typically, base-registerIO architecturesloadthecurrentprogramcounter(PC)intoRO>abase register.*Thus,datacanbeaccessedrelativetoalo-KOcationinthecode./Thismethodis inconsistentwiththeIOhigh-performance objectivesoftheAlphaAXP architecture'OGforthe followingreasons: # ` HItrequiresplacingdataareasadjacenttocodeareas,O(whichresultsin inefficientuseofthe instructionanddatacaches. ` DThememory locationsneartheboundaryofthedataLYareaandcodewouldlikelybe duplicatedinboththein-J structioncacheandthedatacache,which diminishesthe6  effectivenessofthecaching algorithms.! O ProcedureValueIO4TheOpenVMSCallingStandard simplifies obtainingabaseOOaddresswithout requiringthedataandcodeareastobead-JOjacent.-WhenaprogramorroutineneedstocallanotherPO>routine,itmustloadR27witha procedurevalue.'Theproce-UOdurevalueisaspecialbaseaddressthatistheaddressoftheCO procedure descriptoroftheroutineitiscalling.1 O Procedure DescriptorRO4The procedurevalueforagivenroutineistheaddressofthe4O procedure descriptorforthatroutine.SectionB.4.1 describes7Othe procedure descriptorinmoredetail.*P?! NTOThe procedure descriptorisadatablockthatresidesinaspe-ROcialdataareaownedbytheroutine.(Thisdataareaiscalled O5thelinkagesection.NGOUnlikeVAXexternalroutinenames,which referenceitsLOentrypoint,AXPexternalroutinenames referencethepro-KO5cedure descriptorthatcontainstheentrypoint'saddress. zQOSincethecalledroutinehastheaddressofitsown procedureOO descriptorinR27,itcanaccessnotonlyitsown procedureRO5 descriptor,butmore importantly,itcanusethataddressasaQObaseaddressandaccessanydatathatiswithin32Kbyteson7Oeithersideofits procedure descriptor.h W>OLinkageSectionNO4Thespecialdataareawherethe procedure descriptorresidesQOiscalledthelinkagesection.+ThelinkagesectionisapsectNOthatcontainsthe routine's procedure descriptor.(Thelinkage7O>sectionperformsthe following functions:! i ` IAllowsotherroutinestolinktotheroutineusingthe ( procedure descriptor. ` IUsesittolinktootherareasofmemoryinorderto$receiveandstoredata. ` NStoresthe addressesofother routines,allowingtheroutine$tocallthose routines.bOFigureB-2;showshowyouaccessmemoryusingbasead-Odresses:*OFO*7 |  1JThecalledroutinecanaccessmemoryinitsownlinkageL(sectionrelativetoR27sinceR27containsabaseaddressNwithinitslinkagesection, specifically,theaddressofits  procedure descriptor. Y2EYSincememory-reference instructionsusea16-bitdis-M placementrelativetothebaseaddress,thelinkagesectionO canbeupto64KbytesinsizewithdirectaccessrelativectoR27. xJbIn addition,thelinkagesectionpsect typicallyhastheCNOWRT attributeandcontainsonlyaddress constantsKandpossiblyother constantsinorderto facilitateplac-Nlingthelinkagesectioninasharedsectionina shareableimage. D3JDIfthecalledroutineneedstoaccessmemorybeyonditsMownlinkagesection,itcanstore additionalbase addressesKinitslinkagesection,loadthemintobase registersasFMneeded,andaccessany legitimatelocationinmemory. 4LToaccess read/writedata,aseparate read/writedatasec-O%tionisdefinedina differentpsectwiththeWRT attributeN~andtheaddressofthe read/writesectionisstoredinthelinkagesection.! WOAsshownin"FigureB-2,1thespecialbaseaddresspassedinPOR27providesthecalledroutinewithaseedofaddressabilityQO5fromwhichitcandirectlyaccessitsownlinkagesectionandPOfromwhichitcan indirectlyaccessallofmemory.'Eachrou-VOtineinacallchainreceivesitsseedofaddressabilityfromitsO>caller.*"FOwM$OMAINProgramCallChainHO4Themainroutineinaprogramworksinthesameway.POThe operatingsystempassesitabaseaddresswithinitsownOOlinkagesectioninR27justlikeanyothercalling standard-KO> conformingroutine.+The operatingsystemcan establishitsOOownseedofaddressabilityinavarietyofways.)Theimpor-HOtant programming considerationisthatthemainroutineQOGisgivenits requisiteseedofaddressabilitythroughthebaseLOaddresspassedinR27whenthe operatingsystemcallstheOOmainroutine.)ThemainroutinemustinturnpassaseedofSOQaddressabilityinR27toanyroutinesthatitcalls,andsoon!Odownthecallchain._OFigureB-3:showsprogramstartupandtheprogramcallOchain.*OFOg! ,=OThecallchaininFigureB-3,showsatypical program'scallLOchain originatingwiththetransfertothe program'sentryGO<point(MAIN)fromthe operatingsystem.)TheMAINrou-QOtinecallsroutineA,whichinturncallsB.AfullprologueJOandepiloguearerequiredforroutinesMAINandAsinceQOEtheybothmakestandardcalls.'Thefullprologue allocatestheNOfixedstackareaandsavesthereturnaddress(R26),proce-JOdurevalue(R27),framepointer(R29),andany preservedTOO registersthataretobeusedbytheroutine.)Finally,thefullPOprologue establishesthe routine'sframeasthecurrentframe.QOIfMAINorAneedtoaccesstheir respectivelinkagesectionsQOYaftermakingastandardcall,theywillsavea preservedreg-QOisterinthe prologue,moveR27tothatregisterbeforeusingTO R27inastandardcall,usethatregistertoaccessthelinkageVObsectionafterthecall,andrestorethatregisterinthe epilogue.NOSinceBdoesnotmakeanystandardcalls,itsprologueand8Oepiloguecanbe significantly streamlined.*MO! OONotethatallthreeroutinesaccessdataintheir respectiveTOlinkagesectionsrelativetothebaseaddressthatisinR27onQO5entry.,ThecallerreferstothecalleebytheaddressoftheJOcallee's procedure descriptor.)Theprocedure-descriptorad-ROdressisalsocalledthe procedurevalue(PV),anditisthisRO>addressthatispassedtothecalleeinR27.*Tomakeacall,SOthecallermuststoretheaddressofthecallee's procedurede-QOscriptorinitsownlinkagesection.)ThecallercanthenloadPOHR27fromitsownlinkagesectionbeforethecall.*ThecallerVOthengoesontoobtaintheaddressofthecallee'scodefromtheNOcallee's procedure descriptor.)Withthecallee'scodeaddressJOR(CA)inR26andthecallee'sprocedure-descriptoraddressQOinR27,thecallercantransfercontroltothecalleewithaFOjump-to-subroutine(JSR) instructionthroughR26,stor-OO[ingthereturnaddressinR26.(Amoreoptimalcallsequence0OusingalinkagepairisshowninSectionB.4.3.*w?hN $(OTableB-1:8Frame Attributes O 3Null3/FrameFixed-Register/FrameF Variable-Register/Frame@Fixed-@Stack@/Frame  Variable- Stack /Frame OJ 2OExecutesinFrameofCallervYesNo No @No No&O-WhereCaller'sContextisO{Kept 3--,- Registers9 Registers:StackStack"OCanAllocateStackinOBProloque 3-YesYesYesYes#OMustAllocateStackinO Prologue 3- No No@YesYes+OCanAllocateStackinRoutineOBody3 Restricted$NoYesNo Yes"OJCanHavean ExceptionOHandler 3JNoJYesYesYesYes6OCan Save/Restore Registers Restricted$No No@YesYes4OCanMakeStandardCalls Restricted$No No @No Yes O *OB.4CTypesofData StructuresIOUThissection describestheOpenVMSCallingStandarddataKO structuresandhowtousethemin practical applications.JOThethreedata structuresdefinedbytheOpenVMSCallingLOStandardthatyoushouldbefamiliarwithareasfollows:q `  Procedure descriptor `O O Signatureblock ` Linkagepair: &OB.4.1C Procedure DescriptorLO4The procedure descriptorcontains informationthat describesPOtheroutine.(More importantly,itcontainstheaddressoftheNOcodefortheroutine.&Itincludesthe following information: ` !Stackusage(ifany) `O 'ORegister save/restoremasks `  Exceptionhandlers MOUsually,a routine'sname referencesthe routine's procedureOO descriptorratherthantheaddressofitscode.)Forexample,OO5aglobalnameforanexternalroutine representstheaddressLOwherethe procedure descriptorresides,nottheaddressofPOthe routine'scode.)ProgramsthatcalltheroutineobtainthePO>addressofitscodefromits procedure descriptororusingaOlinkagepair.& FOThe.PROCEDURE_DESCRIPTORand.LOCAL_PROCEDURE_DESCRIPTORCO assembler directives define thename ofthe proce-GO5dure descriptor, andindicate thattheblockofstor-FOage thatfollows isthe procedure descriptor for the9O specifiedroutine.0.PROCEDURE_DESCRIPTORand;O>.LOCAL_PROCEDURE_DESCRIPTORalso associatetheOOcodeaddressofthe routine'sentrypointwiththe procedureHOname.,The associationbetweenthecodeaddressandtheKOH procedurenameallowsthe assemblerandlinkertoprocessBOthe .CODE_ADDRESSand .LINKAGE_PAIR directives.(For5Omore informationonlinkagepairs,seeSectionB.4.3.*?d :POYouneedtodeclarethecorrectamountofstorage,andspec-IOifythecorrectinitialvalues.'The.PROCEDURE_DESCRIPTOR?O5and.LOCAL_PROCEDURE_DESCRIPTOR directivesdonotJOcreatethestorageforthe procedure descriptor.-Instead,MOtheymarkthestoragethatfollowsasa proceduredescrip-PO>tor,whichresultsinaspecial object-modulerecord.(Usethe:O$ROUTINEand$PROCEDURE_DESCRIPTORmacrostoPObothmarkthe procedure descriptoranddefinethestorageforKOHthe procedure descriptor.)For informationonthesemacros, OseeChapter6.:xFor informationonthe procedure descriptorOformat,seethe$} OpenVMSCallingStandard p.*cmOa! !OB.4.2C SignatureBlockHO4The signatureblock describesthe parameters, parameter-OOpassingmethods,andreturnvalueusedbytheroutine.'UsingVOthe signatureblockis optional.&Ifitisused,the procedurede-FO=scriptor referencesit.-Youcanusethe$ROUTINEand@O$PROCEDURE_DESCRIPTORmacrostodefinethesigna-AOtureblock.&For informationonthesemacros,see5Chapter6.*5lOa! aOB.4.3CLinkagePairIO4Youcanmakecallstoroutinesmore efficientbyusing>Othe .LINKAGE_PAIRand.LOCAL_LINKAGE directives.CO .LINKAGE_PAIRand.LOCAL_LINKAGEstoreboththead-PO=dressofthe specified routine'scodeand procedure descriptor)O(atotaloftwo quadwords).  EOForexample,the assemblerprovidesthe .CODE_ADDRESSDOand.LOCAL_CODE_ADDRESS directivestoobtainthead-QO5dressofa routine'scode(a quadword).(ToobtaintheaddressNOofthe routine'scodeand procedure descriptor,youcanuse=Oeitherthe .CODE_ADDRESSor.LOCAL_CODE_ADDRESSJO>in conjunctionwiththe.ADDRESS directive.)The followingPOexampleshowshowtousethese directivestoobtainthecode>Oaddressand procedure descriptorofroutineX:t .CODE_ADDRESS%X:dt;%Store%address&of&X's%code&(entry%point).ADDRESSX;d;%Store%address&of&X's% procedure% descriptorAO .LINKAGE_PAIRperformsthesamefunctionasusingEO .CODE_ADDRESSand.ADDRESS together,asshownintheO5 followingexample: .LINKAGE_PAIR%XS)-OUsingLinkagePairsinRoutinesMO4Anotherexampleofhowyoucanuselinkagepairsisshown OinExampleB-2 andSExampleB-3.tExampleB-2vshowsaAOcodesequencethatdoesnotusealinkagepair.*PO*SPO*tPO OOWhilethepreviouscodesequenceworks correctly,ithastwo&/%8OCLEAR_X_ARRAY::zBSRR1,10$$;%R1%->%10$@O[10$:LDQR22,X_ARRAY_ADDR-10$(R1);%R22%->%X_ARRAY%0z RET(R26)$ ;%ReturnzS.endb "OB.5CTypesofRoutinesJOUTheOpenVMSCallingStandarddefinesfour differenttypesQOofroutineswithfour differentkindsof procedure descriptors.LOTheformatvariesslightlyforeachkindof procedurede-9O scriptor.'Thefourtypesofroutinesare:g ` Nullframe `O ORegisterframe ` .Stackframe(fixedand variable) `N NBoundframe W OA null-frame<|routineisa light-weightroutinesimilarinMOconcepttoa JSB-linkageroutineonaVAXsystem.(Anull-NO5frameroutineexecutesinthecontextofitscallerandisQO therefore restrictedinthe operationsthatitcanperform.(AsOshowninTableB-1,6Ea null-frameroutinerequirestheleast:O>overheadandofferstheleast capabilities.*m? q OAregister-frame8routinecreatesitsownframeandthere-POforeexecutesinitsowncontext.(Aregister-frameroutineisHO5anintermediate-weightroutinewith intermediatecapabil-KOitiesand overhead.)Aregister-frameroutine maintainsthe3Ocontextofitscallersin registers.j OA stack-frame;routinehastwo categories:)fixedandvari-Oable: 6 ` FWiththe fixed-framestack,the stack-framesizedoesG(notvary.+A fixed-stackframeroutinecreatesitsownOframeandstoresthecontextofitscalleronthestack.(AH fixed-stackframeroutineisalsoanintermediate-weightH2routinewith intermediate capabilitiesand overhead.(TheFonly significant capabilitylackingwitha fixed-stackFframeroutineistheabilitytomakestandardcalls. `c IcWiththevariableframestack,the stack-framesizemayHvary.+Avariable-stackframeroutineisthefullfunc-Ftion,heavyweight-typeofroutine.-ItcreatesitsownKlstackframeandstoresthecontextofitscallerontheJstack.(Thevariable-stackframeroutineistheonlytype8ofroutinethatcanmakestandardcalls.j@ OA bound-frame:routineis generallyusedincompiledlan-HOguagessuchasAdaandPascalthatrequireadynamic,KO5uplevellinktodatainanouterroutine.,Most assembly-@Olanguage programmingdoesnotinvolve bound-frameO routines.JV &OB.5.1CRoutine CapabilitiesNO4Thetypesof operationsthataroutinemayperformandtheKOamountofrequiredoverheadinthe routine'sprologueandOOepilogue instruction sequencesare differentforeachtypeofO=routine. NIOThe capabilitiesandoverhead requirementsof null-frame,JOregister-frame, fixed-stackframe,andvariable-stackframe'O5routinesare summarizedinQ5TableB-1.*Ql?p9OFormore informationon routines,seetheJ OpenVMSCallingO Standard . u@OB.5.2CEntryPrologueandExitEpilogue SequencesOO4Ingeneral,astandardsequenceof instructionsisusedwhenNOaroutinefirststartsandwhenit completes.*The followingJOcodeexampleshowsatypicalentryprologuesequenceforJO=avariable stack-frame procedure.*SeveralelementsoftheCOprologuemaybeomittedforlesscomplex routines.COENTRY:KLDASP,&-32(SP);%Allocate% fixed-stack%area V 1zcSTQR27,%(SP)#c;%Save% procedure%value4zSTQR26,%8(SP);%Save%return%addressJzSTQR2,&16(SP);%Save%any% preserved&regs%that%are%used,z:STQFP,&24(SP);%Save%old%FPzMOVSP,&FP&;% Establish&current%framez $END_PROLOGUE/;%Marks%the&end%of%the%proloque 2 1ETheENTRYlabelmarksthecodeentrypointforthe(routine. 2AThe $END_PROLOGUEmacroisusedtomarktheendofthe prologue.+  #JOThe followingcodeexampleshowsatypicalexitepilogueKOsequenceforavariable-stackframe procedure.)Severalel-NO5ementsoftheepiloguemaybeomittedforroutinesoflessO complexity.z$BEGIN_EPILOGUE4;%Mark%the% beginning&of&the%epilogue 1zZMOVFP,&SP0Z;%Release%the%variable%stack%area5zLDQR28,%8(FP);%Fetch%return&addresszzLDASP,&32(SP);%Release%the% fixed-stack%areazRETR28;%Return&to&callerz  $END_EPILOGUE. ;%Mark%the%end&of&the%epilogue 1  17In this example,!the $BEGIN_EPILOGUEand?. $END_EPILOGUEmacrosareusedtobeginandend"theepilogue sequence.  \HOThe$ROUTINEmacro optionally generatesastandardpro-QOlogue instructionsequenceatthe beginningoftheroutine.'InKO5 addition,youcanalsousethe$RETURNmacrotogenerateMOastandardepilogue sequence.'Formore informationontheseOmacros,seeChapter6.* lOa[ u Q BOTable5-3:8.ENABLEand.DISABLESymbolic Arguments O OLongFormFShortFormFDefault Condition:Function O O ALIGN_CODEODisabled4Thecode alignmentoptionalignscertainbranchtar-GDqgetlabels.)The ALIGN_CODEoptionisdisabledfortheEDassemblyunitifanyoneofthe followingistrue: TO 9O/NOALIGNMENT=CODEis specifiedonthecom-mandline. T& >&.DISABLE ALIGN_CODEis specifiedinthesourceprogram. T 6The/ALIGNMENT=CODEoptionis defaulted. DSeeSectionB.72yfor informationon optimizationsandD automatic alignment.OV ALIGN_DATAKVDisabled4When ALIGN_DATAis disabled,the data-storagedi-DDrectivesputeach succeedingitemonthenextbyteD boundary.@DWhen ALIGN_DATAisenabled,the data-storagedi-HDrectivesputeach succeedingitemonnatural boundariesGD2(suchaswordsonword boundaries, longwordsonlong-ADword boundaries)andaddpadbytesas necessary.ED  Accessingdataonanythingotherthannaturalbound-GD\ ariesusuallyincursa significant performancepenalty.ED Youcanenableordisablethe ALIGN_DATAoptionforED/ specificrangeswithinyourprogram.*Formoreinfor-6D mationon automaticdata alignment,see$ Section5.2.D Also,see SectionB.72! for informationon optimizationsandD8  automatic alignment.*F?*$ J ~?* ?Ux + O O+LongFormShort+FormDefault+ Condition:Function OF OFLOATOEnabled?Controlswhetherthe assembler generatesfloating-pointFD instructionswhen optimizingcodeand performingcode-Dwlabel alignment.GD Currently,theonlyfloating-point instruction generatedBDIbythe assemblerduring optimizationand alignmentBD processingisFNOP,thefloating-point no-operationGD instruction.'Ifyouspecify.DISABLEFLOAT,theassem-JDSblerdoesnotgenerateanyfloating-point instructionsas=Dpartof optimizationand alignment processing.GD%Theinitialvalueofthisoptionis specifiedbythe3D~/ENVIRONMENT=[NO]FLOAT command-lineop-GDtion.-ThelastvalueoftheFLOAToptionattheendCD/ofassembly determineswhetherFLOATisenabledorD DISABLED.OGLOBALNGBLEnabled?WhenGLOBALisenabled,the assembler implicitlyEDZtreatsany undefinedsymbolasanexternal referenceDDdefinedinanothermodule.,IftheGLOBALoptionisHD  disabled,the assemblerissuesawarningand implicitlyEDctreatsthe undefinedsymbolasanexternal referenceJDassumedtobedefinedinanothermodule.'ThelastvalueID oftheGLOBALoptionattheendofassembly determinesBDm whethertheGLOBALoptionisenabledor disabled.z i  O O+LongFormShort+FormDefault+ Condition:Function OF gO LOCAL_BLOCKLSBDisabled4Usedtooverridethedefault assemblerbehaviortodefineHDa temporarylabelblock.+(A temporarylabelisoftheDwform w n?w$where w n/w representsanumber.)*A temporaryLDlabelblockisusually delimitedbytwo user-definedlocalBD(orgloballabels.'However,the.ENABLE LOCAL_BLOCKPD directivedefinesthestartofablockthatis terminatedby"Doneofthe following: T^ 5^Asecond.ENABLE LOCAL_BLOCK directive. T ;A.DISABLE LOCAL_BLOCK directivefollowedbyC6a user-definedlocalorgloballabel,ora.PSECT directive.O4PEEPHOLEO4Disabled4Peephole optimizationreducesthestrengthofcertainGD instructionsand eliminates instructionswhere possible.GDThePEEPHOLEoptionisdisabledfortheassemblyunit5D>ifanyoneofthe followingistrue: T 6/NOOPTIMIZE=PEEPHOLEis specifiedonthecommandline. T <.DISABLEPEEPHOLEis specifiedinthesourceprogram. Ts /s ThePEEPHOLEoptionis defaulted. D See SectionB.72y for informationon optimizationsandDP  automatic alignment.* ?v { O O+LongFormShort+FormDefault+ Condition:Function OF O PREPROCESSOR_OOUTPUT?Enabled?WhenPREPROCESSOR_OUTPUTisenabled,theADMACRO-64 preprocessor processesyoursourcestate-FDwmentsandoutputstothepreprocessor-outputfile.,If?DthePREPROCESSOR_OUTPUToptionis disabled,yourCD(source statementsare processedasbefore.,However,KDoutputofthese statementstothepreprocessor-outputfileDis suppressed.4DSNeither.ENABLEPREPROCESSOR_OUTPUTnor3D.DISABLEPREPROCESSOR_OUTPUTispassed=Dthroughto the preprocessor-output file.2TheseAD\two directiveshavenoeffectunlessyouspecify5D/PREPROCESSOR_ONLYonthecommandline.ADFormore information,seethe descriptionofthe9Df/PREPROCESSOR_ONLY command-line qualifierinDChapter1.O8SCHEDULEQ8Disabled4 Instruction scheduling optimizationreorders instructionsHDtomore optimallyutilizethe instruction pipeline.+TheFDSCHEDULEoptionisdisabledfortheassemblyunitif1DBanyoneofthe followingistrue: T 6/NOOPTIMIZE=SCHEDULEis specifiedonthe commandline. T < .DISABLESCHEDULEis specifiedinthesource program. Tw /w TheSCHEDULEoptionis defaulted. D See SectionB.72y for informationon optimizationsandDT  automatic alignment. Oz *DlO* ?7q [BOExampleB-5:8Enablingand DisablingData Alignment Oc.PSECT%D1,DATA,NONEXE@O.DISABLE% ALIGN_DATA;&This%is%the&default%state 1O.BYTEp1;&offset%=&0O;.QUADp2;;&offset%=&1O.PSECT% D2,DATA,NOEXE@O.ENABLE& ALIGN_DATA;&Turn%on% automatic& alignment P2O.BYTEp1;&offset%=&0O[.QUADp2I[;&offset%=&8%(pad%bytes%are%added%at%offsets%1&-%7) >OTableB-2:8 DirectivesUsing Automatic Alignment O OF Directive3F AlignmentBoundary Ob O.WORD3word(2)OE .SIGNED_WORD3Eword(2)O.LONG3longword(4)O8.ADDRESS38quadword(8)O.OCTA3octaword(16)O,.QUAD3,quadword(8)O .CODE_ADDRESS3quadword(8),O .LOCAL_CODE_ADDRESSquadword(8)O .LINKAGE_PAIR3octaword(16)-O.LOCAL_LINKAGE_PAIRoctaword(16).O.PROCEDURE_DESCRIPTORIquadword(8)O.LOCAL_PROCEDURE_OT DESCRIPTOR3quadword(8).O .F_FLOATING(.FLOAT)longword(4)/OH .D_FLOATING (.DOUBLE)quadword(8)O .G_FLOATING3quadword(8)O;  .S_FLOATING3; longword(4)O  .T_FLOATING3 quadword(8)O/ .BLKA3/ quadword(8)O .BLKD3 quadword(8)O" .BLKF3" longword(4)O .BLKG3 quadword(8)O .BLKL3 longword(4)O .BLKO3 octaword(16)O .BLKQ3 quadword(8)O .BLKS3 longword(4) O O Directive3 AlignmentBoundary O Ox.BLKT3xquadword(8)O.BLKW3word(2)Ol.ASCID3lquadword(8)O .INSTRUCTION3longword(4) O  "  0OB.6C EstablishingSelf-AddressabilityLOUAMACRO-64routinecan establishaddressabilitytoitsownTOlinkagesectionwithoutthehelpofitscaller(thecallingrou-OOtine).-Inthiscase,thecallerdoesnotpassthe procedureNO^valueinR27asinastandardcall.+ Therefore,theroutineROmust establishitsownbaseaddresswithinitslinkagesection.G ! MOTo accomplishself-addressability,thecodeandlinkagesec-OOtionsmustbeadjacenttoeachother.)ThisrequiresthemtoPO5resideinthesamepsect.(Becausethe assemblerdoesnotal-KOlow placementofdatainan EXE/NOMIXpsect, instructionsJOmustbeplacedinanEXE/MIXpsect.(When debugging,thePO>debuggerviews executiontohave transferredintoadataareaDObecausethedebuggerviewsallMIXpsectsasdata. MBNOTE MCThedebuggercan correctlydisplaydecodedinstruc-FtionsinaMIXpsect,butitcannotachievesource-?Rline/program-counter correlationand source-line scrolling. xOExampleB-42R representsthe CLEAR_X_ARRAYroutine,0Owhichhasno procedure descriptor.*OFO  FOOtherroutinesmaycallthe CLEAR_X_ARRAYroutineus-KOingonlyitscodeaddressanda nonstandardlinkage.,TheEO< CLEAR_X_ARRAYroutineexecutesinthecontextofitsTOcaller;itdoesnotcreateitsownframe.*It establishesabaseROaddressinitscodesectionandbecauseitslinkagesectionisTOEadjacenttoitscodesection,itcanaccessdatainitslinkageOsection.(nr6OB.7C Optimizationand Automatic Alignmentrangeof statements.s `I+OB.7.1C AutomaticData AlignmentQO4Accessto naturallyaligneddataisfasterthanaccesstoun-HOaligneddata.,MACRO-64doesnotaligndatabydefault.POInstead,itplacesdataexactlyas specifiedwithnopadding.LO=With automaticdata alignment selected,data directivesareLO automaticallyalignedonanatural boundary.)PadbytesareNOaddedas necessarytoachievenatural alignment.'LabelsthatOOGoccurwiththedataare automaticallyalignedwiththedata. /OB.7.1.1C ControllingData AlignmentKO)Youcancontrolwhenyouwanttohavedata alignmentinLOyourprogram.&Youdothisbyusingthe.ENABLE ALIGN_DATACOand.DISABLE ALIGN_DATA directives.,Notethatauto-OB.7.1.2C Directivesfor AutomaticData Alignment5O)TheMACRO-64 data-storage directivesin)TableB-2)pro-0Ovide optional, automatic alignment.*m?UKOSpecifya.PSECT directive alignment attributethatalignsROthepsectonaboundarythatisatleastas stringentasthe.O< automaticallyaligneddataitems.2OB.7.2C AutomaticCodeLabel AlignmentDO4 Automaticcodelabel alignmentimprovesI-cacheuti-FOlizationandmulti-instructionissue./This optimizationFOalignscertaincodelabelstoaquadwordboundaryby@O=paddingwithNOPandFNOP instructions.0Usethe=O/ENVIRONMENT=NOFLOAT qualifiertosuppressFNOPO instructions. NKOCodelabelsthatarethetargetofbackwardbranchesarePOaligned.)Also,labelsthatarethetargetofforwardbranchesPO5thatarenotalsothetargetofafallthrougharealigned.! N@OUsethe/ALIGNMENT=CODE qualifierorthe.ENABLEKO ALIGN_CODE directivetoselect automaticcodelabelalign-O5ment."! )OB.7.3C Scheduling OptimizationOO4 Schedulingreorders instructionstoreducepipelinestallsandPO increasesthechancesformulti-instructionissue.(Itonlyre-ROorders instructions;itdoesnotchangethe instructionsortheSO= registersusedinthe instructions.'In addition, instructionsareOOnot scheduledacrosslabels.( Therefore,the structureofyour Oprogramis retained. p_UsNote p_JIfyouusethesameregisterfortwoormore logicallyGQdistinctactions,the scheduler schedulestheseactionsKseriallyinthesequenceyouspecify.(Ifyouusediffer-Kent registersfortwoormore logicallydistinctactions,GZthe scheduler schedulestheactionsin parallel,which3providesfaster execution performance. # COUsethe/OPTIMIZE=SCHEDULE qualifierorthe.ENABLEDOSCHEDULE directivetoselect scheduling optimization.m$! C'OB.7.4CPeephole OptimizationJO4Peephole optimization restructuresyourprogramforfasterMO execution.+Todoso,itreducesthenumberof instructionsJOexecutedandreplaceslong-executing instructionswithin-KO= structionsthatrequireless executiontime.,AlthoughthisHO optimizationmayincreasethenumberof instructionsinIOmemory,thenumberactually executed,asyoufollowtheKOGcodepaths, decreasesorremainsthesame.*Peepholeopti-MOmizationmatchesshortcodepatternsandreplacesthemwithMOmoreoptimal sequences.)Italso eliminatesdeadcode.((NotePOQthatdeadcodeisoftencreatedbythecodechangesmadebyMOpeephole optimization.*Thisdeadcodeis eliminatedbysuc-LOcessive iterationswherepeephole optimizationis selected.)JOZPeephole optimization eliminatessomebranchesbyinliningGOor replicatingshort sequencesfromthebranchtarget.%COUsethe/OPTIMIZE=PEEPHOLE qualifierorthe.ENABLEBOPEEPHOLE directivetoselectpeephole optimization.&~2OB.7.5CUsingMACRO-64for PerformanceJO4 High-orderlanguage compilersdo optimizationscalledloopGO unrollingand inlining.*MACRO-64allowsyoutoperformKOthese optimizationsmanuallythroughcoding techniques,al-QO=thoughitdoesnotofferspecific qualifiersor directivesforOtheseoptimizations.'A MOLoop unrollingreducesthenumberofbranchesthatmustbeMO executed.)Youcanunrollloopsusingthe.REPEAT directive.BO5The followingexampleshowsmanualloop unrolling:O10$:;&Copy%loopO.repeat&10*;&Unroll%the%loop,% factor=10;ILDAR18,&-1(R18);& Decrement%quadword%countBLTR18,&20$.;&Branch%if%quadword%count%<&0LDQR0,%(R17);&Load%a%quadword!STQR0,%(R16)!!;&Store&the%quadwordiLDAR16,&8(R16),i;& Increment%the%target&addressLDAR17,&8(R17),;& Increment%the%source&addressBR%10$OA.endrO20$:O(A %COLoop unrolling complementedwithMACRO-64 schedulingMOandpeephole optimizationscan significantlyincreaseperfor-NO5mance.'Forbetterloop scheduling,youcanmakethecounter5O decrementandtheloopexit separable.O10$:;&Copy%loopOZ.repeat&10*Z;&Unroll%the%loop,% factor=10;LDAR18,&-1(R18);& Decrement%quadword%countLDQR0,%(R17);&Load%a%quadword2BLTR18,&20$.2;&Branch%if%quadword%count%<&0zSTQR0,%(R16)!z;&Store&the%quadwordLDAR16,&8(R16),;& Increment%the%target&address LDAR17,&8(R17), ;& Increment%the%source&addressRBR%10$O.endrO20$:) WNO High-orderlanguage compilersofteninlinearoutinecallifROthecalledroutineissmallandisdefinedinthesamemoduleTO5fromwhichitiscalled.(Toinlinearoutinecall,thecompilerROreplacestheroutinecallwiththebodyofthecalledroutine.NOYoucanusemacrostomanuallyinlineshort,localroutinesO>with MACRO-64. */OB.7.6CViewing OptimizationResultsMO4Youcanviewtheresultsof optimizationby comparingcodeGOfrombeforeandafter optimization..Usethe/LISTand@O /MACHINE_CODE command-line qualifiers describedinO=Section1.2.1.?>=Usingthese qualifiersprovidesyouwithabi-LOnary machine-codelisting,whichyoucanalsousetoview;Otheresultsof automatic alignment features.**O?$+ _AOManyoftheotherOpenVMSAXP languagesoffera=O /MACHINE_CODE command-line qualifierthatshowsLO5theassemblylanguage generatedforyoursourceprograminTOthelistingfile.)YoucanoftenusethisfeaturetolearnaboutAOAXPassemblylanguageand optimization techniques.dJ, (O C.!Using"LSE!with!MACRO-64EOThisappendixexplainshowtousetheDEC Language-GO SensitiveEditor(LSE)withtheMACRO-64 language.*ForNOBLSEtofunction correctly,LSEmustbe installedbeforetheOMACRO-64 assembler.U- +OC.1BInvokingLSEGOUTouseLSEwiththeMACRO-64 language,youmustnamePOyourprogramsourcefilewitha.M64file extension.'Forex-LOample,toeditafilenamed TEST.M64,enterthe followingO^command:O$&LSE%TEST.M64.KOUsingthe.M64file extensioninvokestheLSEeditorand@OplacesyouintheMACRO-64language environment.M/ +#SOIfyouchoosetousea differentfile extension,youcanstillGOuseLSEintheMACRO-64language environment.(Forex-LO5ample,toeditafilenamed TEST.ASM,enterthe followingOcommand:+O$&LSE/LANGUAGE=MACRO64&TEST.ASM:0+GOIfyouuseLSEwith MACRO-64,andyouwantthesameIObehaviorontheOpenVMSAXP operatingsystemasontheFO5OpenVMSVAX operatingsystem,enterthe followingLSEOcommand:(O$&SET%COMMAND&LANGUAGE&VMSK*260OD.1B AssemblerFeaturesinMACRO-64HOUThissection describesMACRO-64featuresnotpresentin!OVAXMACRO.&Theyare:O7% ` .BASE directive8 LbThe.BASE directiveisprovidedforimplicitbaseregistersupport. `: 7:.PROCEDURE_DESCRIPTORand.LOCAL_PROCEDURE_  DESCRIPTOR directives9 pDbThese directivesmarkthe specified identifierasa7 procedure descriptor.,.PROCEDURE_DESCRIPTORGdeclaresan identifierasagloballabelthatdefinesCltheaddressofthe procedure's description(adataCaddress)and associatesthe procedure'sentrypointB(acodeaddress)withthenameofthe procedure.8v.LOCAL_PROCEDURE_DESCRIPTORperformsasim-PilarfunctionbydefiningalocallabelratherthanaglobalI'label.*Nostorageis allocated.*Formore informationon!these directives,seeChapter5. ` 9 .LINKAGE_PAIRand.LOCAL_LINKAGE_PAIRdirec-Wtives*9BlO:MbThese directivescausealinkagepairtobestoredattheDcurrentpsectandcurrentlocationcounter..Alink-JagepairconsistsofacodeaddressandtheaddressofHlthe specified identifier.+Formore informationonthese directives,seeChapter5. `D 6D .CODE_ADDRESSand.LOCAL_CODE_ADDRESSdi-rectives*:lOA;! NbThese directivescausethecode address(es)ofthe specifiedN identifier(s)tobeplacedatthecurrentpsectandcurrent!locationcounter.'SeeChapter5!Wformore information. ` .ELSE directive*;kO*<pAbMACRO-64 introducesanewconditional-assemblydi-Irective,.ELSE.Youcanuseitin conjunctionwiththe>.IFand.ENDC directives(commontoVAXMACROBland MACRO-64)tospecifyasequenceof statementsGtobe assembledwhenthe conditioninthe controllingL.IF directiveisfalse.*Whilethe.ELSE directiveissim-DvilartoVAXMACRO's .IF_FALSE directive,itdiffersFinthatyoumayspecifyatmostone.ELSE directiveF'withinan .IF/.ENDCblock.* .IF_FALSEisalsoprovided.forVAXMACROcompatibility.)SeeChapter5formore information. `W W.INCLUDE directive*<BlO== ?bMACRO-64providesanew.INCLUDE directivethatJcausesa specifiedfiletobe textuallyincludedintheG assembly.'Theformatofthis directiveisasfollows:C.INCLUDE%"file_specification"%["Directory_search_list"]>! NbTheeffectofthe.INCLUDE directiveissimilartothatofJthe#include directiveinCortheREQUIRE statementinBLISS. ` 6Optionalcase sensitivityin identifiers!?! <bYoucanspecifythe /NAMES=AS_IS command-lineH qualifiertocausethe assemblerto distinguishbetweenL uppercaseand lowercaselettersin identifiersandexternal=lsymbolnames.*Thedefaultis/NAMES=UPPERCASE;I uppercaseand lowercaselettersarenot distinguishedas withVAXMACRO.'SeeXChapter1!formore information. ` ALexicaloperatorsupportfor12lexical operators*?XlO@ ]yGbMACRO-64provides12lexical operators,threeofwhichCare compatiblewithVAXMACRO'sthreemacrostringE operators.)YoucanuseMACRO-64lexical operatorsinHlanycontextandyouarenot restrictedtomacros.+SeeChapter3!Xformore information. `D "DLexicalstringsymbols*@lOAv bSeecbChapter3!bformore information. ` )Lexicalescapeoperator(%%)*Ac%lOB bSeecbChapter3!bformore information. ` :Lexical substitutionoperator(%lexsym_name%)*Bc%lOC bSeecbChapter3!bformore information. ` BMoreliberaluseofthevalue-ofoperator( \ )*Cc%lOpD F=bMACRO-64aswellasVAXMACRO recognizestheFvalue-ofoperator( \ )inmacro invocationsandinB default-valuestringsfor parametersin.MACROdi-Gl rectives.'In addition,MACRO-64 recognizesthevalue-of:operator( \ )inthe following contexts:TE *J-DWitheitherorbothofthetwo argumentsinthe.IF5Y( DIFFERENTand.IF IDENTICAL directives.E-DWiththeargumenttothe.IFBLANKand.IFNOT_YBLANK directives.D-DWiththesecondargumenttothe.NCHRand.IRPCY directives.CW-DWiththesecondand subsequent argumentstotheY.IRP directive.:/-DWith argumentstolexical operators.)See5/Chapter4!Yformore information. ` MACRO64$symbol*E5mOpF# FCbMACRO-64 implicitlydefinesanewsymbol, MACRO64$,Eforusein conditional assembly..Thissymbolisde-Gfinedinall uppercaseandall lowercaseletterswhenDl /NAMES=AS_ISis specifiedonthecommandline.)This/symbolmightbeusedasfollows:&I.MACRO% ADDRESS32& EXPR_LIST i.IF&DEFINED%MACRO64$i.LONG% EXPR_LISTi! .IF_FALSEii.ADDRESS% EXPR_LISTi.ENDC.ENDM% ADDRESS32A ADDRESS32% ` $ Automaticdata alignmentGS=b.ENABLE_ALIGN_DATAcausesdatatobe naturallyaligned.'SeeChapter5. `: : Optimizations*G~lOH DbThe assembler optionallyperformsanumberofopti- mizations.(SeeChapter2u(commandline)andiChapter5 (.ENABLE). ` $OPDEFmacro*H~lOl*Hi~mOISCb$OPDEFissuppliedinplaceofVAXMACRO's.OPDEF directive. `: -:OpenVMSCallingStandardmacros:DJ$ROUTINE$SEND_PROLOGUE]$CALL]$LINKAGE_SECTION $CODE_SECTION $DATA_SECTIONP $LINKAGE_PAIRP$BEGIN_EPILOGUE$RETURN $END_EPILOGUED $PROCEDURE_ DESCRIPTORD$RESET_LP_LISTVK, ` ! .INSTRUCTION directiveLSCbFormore informationonthe .INSTRUCTION directive, seeXChapter5. `: 3: .BEGIN_EXACTand .END_EXACT directives*LX~lOM}=bFormore informationonthese directives,see>bChapter5. `   /[NO]DEFINE qualifier*M>%lON ]r>bMACRO-64includesanew command-line qualifier,D /[NO]DEFINE.ItdefinesoneormorenumericsymbolsFby performingthesamefunctionasdirectsymbolas-Flsignmentinyoursourceprogram.'Formore information&aboutthis qualifier,seeChapter1. `D D Preprocessoroutput*NlOHO>bMACRO-64providesanew command-line qualifier,7PREPROCESSOR_ONLYandanewsymbolicar-?gumentforthe.ENABLEand.DISABLE directives,=lPREPROCESSOR_OUTPUT,thatyoucanusetopro--duceapreprocessor-outputfile.P ]f<bFormore informationaboutthe/PREPROCESSOR_-ONLY command-line qualifier,seeChapter1.Formore6 informationaboutthePREPROCESSOR_OUTPUTBl argument,seethe descriptionsofthe.ENABLEand".DISABLE directivesin!Chapter5. `D DRegistersymbols*P~lO*P!lOrQ H:bUnlikeVAXMACROregistersymbols,MACRO-64Esymbolsarenot permanently reserved.+YoucandeleteMthe definitionofany predefinedregistersymbol(usingtheBl .UNDEFINE_REG directive)ordefineyourown(using:the .DEFINE_FREGor .DEFINE_IREG directive).R 6@bFormore informationaboutregistersymbols,seeChapter1.6~ForalistofOpenVMSCallingStandard@registersymbolsyoucanusewithMACRO-64sup-lpliedmacros,seeHlChapter6.'lFormore informationaboutFdefiningregistersymbolsanddeletingregistersymbol definitions,seeChapter5.*R~oO*RH/lOa*RlOS?OD.2BVAXMACROFeaturesNotPresentinMACRO-64KOUThissectioncontainsfeaturesinVAXMACROthatarenot,Opresentin MACRO-64.'Theyare:UT+ `   EXE/NOEXE restrictionU! ]EbMACRO-64allowsonly instructionstobeplacedinaLpsectwitheithertheEXEorMIX attributesorboth.'YouKcanplacedatainapsectwitheithertheNOEXEorMIXEl attributesorboth.*VAXMACROallows instructionsor8datatobe arbitrarilyplacedinpsects. `D CDSettingthecurrentlocationinan EXE/NOMIXpsect9V FbMACRO-64doesnotpermitthecurrentlocationcounterCtobechangedinapsectwiththeEXEandNOMIXF attributes.'VAXMACROdoesnothavethis restriction. ` 5 Overlappingand replacement initializersW GbVAXMACROallowsyoutoreassignthecurrentlocationMcounterandstoredatainitialvaluesand instructionsoverEpreviousdatainitialvaluesand instructions.*MACRO-Kl64providesasimilar capability.(However,this capabilityIisonly availableinpsectsthathaveeithertheNOEXEForMIX attribute,orboth.) Furthermore,a replacementLvinitialvaluemuststartatexactlythesamepsectoffsetNandbeofexactlythesamelengthastheinitialvalueitF' replaces.'VAXMACROdoesnothavethese restrictions. ` !Radixunary operatorsXBbVAXMACROallowsunaryradix operatorsonexpres-Asions.+MACRO-64allowsunaryradix operatorsonlyFtospecifytheradixofnumeric constants.-TheoctalAlconstant^O123isvalidwithbothVAXMACROandE MACRO-64.*Theoctal expression^O(10+10)isvalid@withVAXMACRO;itisnotvalidwith MACRO-64. ` 'TheregistermaskoperatorJY ?bTheVAXMACRO^Moperatorisnot supportedonC MACRO-64.)BecauseregistermasksarenotneededbyEanyMACRO-64 instructionsor directives,thereisno$lneedforthis operator. ` *.ALIGNdoesnotsupportPAGEZHbBecausetheAlpha architecturehasvariablepagesizes,BMACRO-64doesnotsupportPAGEasanargumentto!the.ALIGN directive. ` =Nocount specifierson data-storage directivesM[! #FbMACRO-64doesnotallowarepeatcount expressiononHany data-storage directivesuchas.BYTEor.WORD.YouHcanusethe%REPEATlexicalfunctionforthispurpose. ` BNosupportforthe.CROSSand.NOCROSS directives\tGbThereisnosupportforthese directivesin MACRO-64. ` "Nosupportfor.DEBUGS])EbThereisnosupportforthis directivein MACRO-64.FHowever,eventhoughthis directiveisnot supported,DMACRO-64providessymbolic informationintheobject.lmoduleforusebythe debugger. ` !No.DEFAULT directive^x=bThis directiveinnot applicableon MACRO-64. ` 0.ENABLE/.DISABLE directive arguments_! FbTheMACRO-64 assemblerdoesnotsupportthe following@ argumentstothe.ENABLEor.DISABLE directives:`e3-D ABSOLUTE-not applicableonMACRO-64O-DDEBUG-D SUPPRESSIONN-D TRACEBACK-D TRUNCATION `L &L.END directive differencesja@?bVAXMACROrequiresthe.END directive.)MACRO-64Gdoesnotrequirethis directive.(MACRO-64requirestheNoptional identifierthatfollowsthe.END directivetobea6l previouslydeclared procedure descriptor. ` +.ENTRY directivenot supportedbSCbA$ROUTINEmacrothat accomplishesasimilarfunc-tionisused. `:  :No.GLOBAL directivec SCbThereisnosupportforthis directive.-VAXMACROHprovidedthis directiveforMACRO-11 compatibilityonly. `: $:No .H_FLOATING directived SLbSincethisdatatypeisnotanativeMACRO-64type,this( directiveisnot supported. `: :No.LINK directivee`7bThereisnosupportforthis directive. ` No.MASK directivefg=bThis directiveisnot applicableto MACRO-64. ` No.NTYPE directivegSAbThis directiveisnot supportedby MACRO-64.-TheC%TYPElexicaloperatorprovidesasimilar function. `: :No.OPDEF directivehSDbThereisnosupportforthis directive.-The$OPDEF0macroprovidesasimilar function. `: ,: Differencesin.PSECT directiveiSAbThe following.PSECT argumentsarenot supported: PAGE,LIB,andUSR. `: :No.REFn directivesjr9bThereisnosupportforthese directives. ` . Differencesin.RESTORE directivek! ;bOn successive! .RESTOREs for!the same psect,?VAXMACROrestoresthecurrentlocationcounterPvalueasthelastlocationcountervaluesavedforthepsectFlbeing restored.(MACRO-64restoresthecurrentlocationLcountervalueasthelocationcountervaluesavedforthe%matching.SAVE directive. ` "No .TRANSFER directivelp7bThereisnosupportforthis directive. ` . Differenceswith.ENDMand.ENDRSm! )?bVAXMACRO considersthe.ENDMand.ENDRdirec-Htivestobesynonymsofeachother.'MACRO-64 considersE.ENDMand.ENDRtobe distinct.)YoumustendmacroGl definitionswith.ENDMandyoumustendrepeatrangeswith.ENDR.nO E."Error!MessagesEOThisappendix describesthemessagesproducedbythe:OMACRO-64 AssemblerforOpenVMSAXPSystems.oNOThe descriptionofeachmessagegivesthe severity,followedDOby additional explanatorytextand suggestedaction.p )>O ADDTRUNC,-Storinganaddress expressionintoaE(storage allocationlessthanthesizeofanaddress(resultsindata truncation.Informational:9KThe assemblerstoredavaluethatistooNulargeforthe allocatedspace, resultingindata truncation.UserAction:"Allocatemorestorage.q=O ALIGNFILLIGN,-Theoptional.ALIGNfillpattern@(argumentisignoredinpsectswiththeEXEandNOMIX attributes.Warning:@`TheoptionalfillpatternisignoredbecauseitMuisonlyvalidforpsectsthatdonotpossesstheEXEandNOMIX attributes.hUserAction:9hOmitthefillpatternorspecifytheMIXpsect attribute.r! =OALIGNFILLTRUNC,-ThevalueyouspecifyfortheD(.ALIGNoptionalfillpatternmustbeanintegerinJtherangeof0...255.(Data truncationoccurswithHthe currently specifiedfillpatterninabytestorage2 location.Warning:D`Thevalueyouspecifyasthefillpatternforthe@&.ALIGN directivemustbewithintherangeof0&...0&255.J~Data truncationoccurswheneveryouspecifyavaluethat'isoutsideofthisrange.rUserAction:>rSpecifyasmallervalueforthefillpattern.Hs7OALIGNLABELIGN,,The ALIGN_LABELoptionhas6(beenreplacedbythe ALIGN_CODEoption.Error:;The ALIGN_LABELoptionhasbeenreplacedby"the ALIGN_CODEoption.UserAction:-Usethe recommendednewoption.t ~@O ALIGNTOBIG,, Specified alignmentistoolargefor(PSECT.Error:BThe alignmentyou specifiedistoolargeforthecurrentpsect.UserAction:9Checkthepsect attributestoinsurethatNthepsect alignmentisgreaterthanorequaltothealign-%hmentyouare requesting.u ;O ASCIITRUNC,,ASCIIconstantcontainstoomany,( characters;valueis truncated.Error:<YourASCIIconstantcontainsmorethaneightK characterswiththe^Aor^aradix specifier.(Theassem-0ublerdeletestheextra characters.UserAction::Checkyoursourcecode.(Useeightorlessh characters.iv?>O BADALIGN,, Alignment specifierisoutofrange.kError:@kThe alignment specifierusedwiththe.PSECTor0.ALIGN directiveisoutofrange.^UserAction:3^Fora descriptionofthe.PSECTand".ALIGN directives,seeChapter5.*vzlOw! )}9O BADENDARG,-Badargumentto.END directive.kError:?kTheoptionalargumenttothe.END directiveisinvalid.^UserAction:<^Ifyouspecifythe argument,itmustrefer-Jencea procedure descriptorwithinthemodule.(SpecifyaFvalid procedure descriptornameoromitthe argument.[x )1CO BADINSARG,,ArgumentNisinvalidforthisinstruc-(tion.Error:=Theargumentnumbershownisinvalidforthe instruction.UserAction:5Checktheargumentandrequiredformat0as specifiedinthedocumentation.;yw8OBADLIB,-ErroropeninglibraryfileXXXXX.kError:;kThe assembler encounteredanerrorwhenat-<temptingtoopenthe indicatedlibraryfile.^UserAction:;^Checkthefileformatandfile protections.Qz'5OBADMACPARAMNAME,-Illegalmacro parameter(name.Error:>The indicatedmacro parameternameisillegal.^UserAction:/^ExamineyoursourcecodeandseeChapter1;Xfor informationaboutvalid parameternames.*zzlO*{ w.O BADMACRONAME,,Illegalmacroname.kError:3kThe indicatedmacronameisillegal.UserAction:-CheckyoursourcecodeandseeChapter27^for informationaboutvalidmacronames.*{lOlW| -=O BADOPERAND,,Invalidoperandtypefor operator.kError:=kTheresolvedoperandtypeisinvalidforthe specified operator.^UserAction:;^Seethe descriptionsof operators, operands,and expressionsin|Chapter2.*||zlOlQ}'3O BADPARAMSTR,,Illegal parameterstring.kError:=kThestring specifiedasamacro parameterisinvalid.^UserAction:/^ExamineyoursourcecodeandseeChapter1;Xfor informationaboutvalid parameternames.*}zlO-~ w;O BADSYSCALL,,Internalerror.'Badsystemcall.kError:=kThe assembler encounteredan unexpectedinter-8nalerrorwhen performingasystemcall.^UserAction:,^ReporttheproblemtoDigital. >O BASEFAIL,,ArgumentNisinvalid.,The assemblerG(failedtofindabaseregister specifiedwithapre-Dvious.BASE directivetoformaregister expression$oftheform offset(Rn).uError:>uThe assemblercouldnotfindabase register,Iwhichyou specifiedwithaprevious.BASE directive,toJ&formavalidregister expressionoftheform offset(Rn).UserAction:8Checkthe instructioninthesourcecodeandseeChapter54}for informationaboutusingthe.BASEr directive.*mOc! 9@O BASERANGE,,ArgumentNinvalid.'The assemblerat-E(temptedtousebaseregisterRntoformaregister? expressionoftheform offset(Rn).+However,the>argumentoffsetexceedsthe allowablerangeof 2232,768to+32,767.Error:@The assembler attemptedtouseabase register,I&whichyou specifiedwithaprevious.BASE directive,toJ~formavalidregister expressionoftheform offset(Rn).HThisattemptfailedbecausethe specifiedargumentoff-O/setexceededthevalidrangeofthebaseregisteroffset(_M32,768to +32,767).'Theregistercitedinthemessagerep-Nresentstheregisterthatproducedanoffsetclosesttothe9rangeof 9B932,768to+32,767.UserAction:8Checkthe instructioninthesourcecode-andsee-Chapter54}-for informationaboutusingthe.BASE directive.*mOY! /BO BEGEXPSC,, .BEGIN_EXACTisinvalidinapsectwith-(theNOEXEandNOMIX attributes.Error:BA .BEGIN_EXACT directiveisnotvalidinapsect3withtheNOEXEandNOMIX attributes.UserAction:$Checkyoursourcecode.E;O BYTEALIGNIGN,,The BYTE_ALIGNoptionhasbeen0(replacedbythe ALIGN_DATAoption.Error::The BYTE_ALIGNoptionhasbeenreplacedby"the ALIGN_DATAoption.UserAction:-Usethe recommendednewoption.s I9O CONPSECTATTR,- ContradictoryPSECT attribute.kError:EkA previously specifiedpsect attribute conflictswith)theflaggedpsect attribute.^UserAction: ^See^Chapter5& ^fora descriptionofthe4.PSECT directiveandpsect attributes.*!oOA @OCONTEOF,- Assembler encounteredendoffileafter(line continuation.Error:DThe assembler encounteredendoffileafteraline+that specifieda continuation.UserAction:$Checkyoursourcecode.:9ODATAALIGNTOBIG,,Datarequires alignmenttoo(largeforPSECT.Error:AThe alignmentrequiredfora specifieddataitem*istoolargeforthepsect.UserAction:9Checkthepsect attributestoinsurethatKthepsect alignmentisgreaterthanorequaltothere-7hquired alignmentofthedataitems.)SeezhChapter5hforaJ descriptionofthe.PSECT directiveandpsect attributes.*z+lO->ODATANOTINNOEXE,,Data declarationsmustbeina6(psectwiththeMIXorNOEXE attribute.Error:?Adata declaration,suchasa data-storagedi-Nrective,hasbeen specifiedinapsectwith incorrectpsectu attributes.UserAction:3MakesurethepsecthastheMIXor%hNOEXE attributeset.)SeehChapter5!hfora descriptionof9the.PSECT directiveandpsect attributes.*+mOAODIRNOTINNOEXE,- Directivemustbeinapsectwith)(theMIXorNOEXE attribute.Error:BThe directiveyouspecifymustappearinapsect4withtheMIXorNOEXE attributeset.UserAction:7Makesureyouspecifyapsectwiththe.MIXorNOEXE attributeset..SeeChapter5jforaJh descriptionofthe.PSECT directiveandpsect attributes.*oO )@O DISPTOOLGE,,Branchoffsetistoolargeforthis( instruction.Error:ETheoffsetyou specifiedistoolargeforthisin- struction.UserAction:;Checktherangeofthe specifiedtargetto$insureitfallsbetween &1048576p... +1048575, inclusive.! )c=O DUPLEXTERN,-Externalitemhasmultipledefini-(tions.Error:;Theitemyoudeclaredas externallydefinedDwiththe .EXTERNAL attributehasanother conflicting3u definitionwithinthisassemblyunit.UserAction:=Checkthe definitionsforthe specifieditem.! /O DUPLGLOBAL,, Duplicateglobalname.kWarning:7`kTheassemberdetecteda duplicateglobalname.^UserAction:<^Checkall referencesinyoursourcecodetothisname.7ODUPMACPARAMNAME,, Duplicatemacro parameter(name.Error:<The assemblerdetecteda duplicatemacropa-rametername.UserAction:$Checkyoursourcecode.U+@O ENDEXPSC,- .END_EXACTisinvalidinapsectwith-(theNOEXEandNOMIX attributes.Error:@A .END_EXACT directiveisnotvalidinapsect3withtheNOEXEandNOMIX attributes.UserAction:$Checkyoursourcecode.w:OEOLEXP,, Assemblerexpectedanendofline.kError:>kThe assemblerexpectednomoreinputfromthecurrentline.^UserAction:$^Checkyoursourcecode.GBOESCAPE,,Illegalescapesequenceinstringliteral;1( assemblerexpected\,",x,orX.Error:@Theescapesequenceyou specifiedinthestringliteralisillegal.UserAction:$Checkyoursourcecode.K !>OEXP32BITTRUNC,, Assemblerexpectedanintegerin((therange0...(2^32) *(*U(1foranunsigned expression OR p"(2^31)...+(2^31) (H1forasigned expression.)Data truncationto32bits.uWarning:<`uThe assemblerfoundanintegerthatwasnot'withintheexpectedrange.hUserAction:2hCheckyoursourcecode./Theliteral-mustbewithintherangeof0(...(2^32) 1foranun- signed expressionOR (2^31)...+(2^31) 1forasigned>r expression.'Data truncationto32bitsoccurs.! s=O EXP32BITTYPE,, Assemblerexpectedanintegerin((therange0...(2^32) '(*R(1forunsigned expressionOR "(2^31)...+(2^31) %1forsigned expression.Error:@The assemblerexpectedanunsignedintegervalue#uwithintherangeof0u...u(2^32) `u#u1orasignedinteger+valuewithinintherangeof (2^31)...+(2^31)  1.hUserAction:$hCheckyoursourcecode. 7OEXPBINEXPTERM,, AssemblerfoundXXXXXwhen@( expectingabinaryoperatoror expressiontermi-nator.Error:>The assemblerexpectedabinary operator,suchUuastheplussign( + )forbinary addition,oranitemtoendIthe expression,suchasthe right-anglebracket( > ).hUserAction:4hChecktheflaggediteminthesource statement.)b>O EXPFPREG,,ArgumentNisinvalid., Assemblerex-/(pectedafloatingpoint register.Error:>The instructionargumentcitedisinvalid.+The; assemblerexpectedafloating-point register.UserAction:7Checkyoursourcecodeandtheinstruc-tiondocumentation.{)Q:O EXPGENREG,,ArgumentNisinvalid.. Assembler)(expectedageneral register.Error:>The instructionargumentcitedisinvalid.+The4 assemblerexpectedageneral register.UserAction:7Checkyoursourcecodeandtheinstruc-tiondocumentation.?O EXPIDPROC,-ArgumentNisinvalid.* Assemblerex-<(pectedan identifier representinga procedurevalue.Error:<Theargumentcitedisinvalid.,The assemblerGuexpectedauser identifierthat representsa procedurevalue.hUserAction:7hCheckyoursourcecodeandtheinstruc-tiondocumentation.9?O EXPINTPAL,- Assemblerexpectedanintegerexpres- (sionorPALopcode.Error:7Integer expessionorPALopcodemissing.^UserAction:8^ReplacetheflaggeditemwithanintegerorPALopcode. AOEXPLAB,-ArgumentNisinvalid.' Assemblerexpected2(alabeldefinedinthesamepsect.Error:AThecitedargumentisinvalid.(The assemblerex-Ppectedalabel definitiontooccurinthesamepsectasitsu reference.UserAction:7Checkyoursourcecodeandtheinstruc-htiondocumentation.?O EXPLITVAL,,ArgumentNisinvalid.* Assemblerex-A(pectedanintegerliteralvalueinthe inclusive!range0...255.Error:>The instructionargumentcitedisinvalid.+TheKu assemblerexpectedanintegerliteralwithintherangeof 0...255.hUserAction:7hCheckyoursourcecodeandtheinstruc-tiondocumentation. ^=O EXPMACRONAME,, Assemblerexpectedavalidmacro(name.Error:=The assemblerexpectedavalidmacronameinthiscontext.UserAction::CheckyoursourcecodetoinsurethattheHitemflaggedisauser identifier,opcode,ornonmacroh directive.The instructionargumentcitedisinvalid.+The4u assemblerexpectedanintegerliteral.UserAction:7Checkyoursourcecodeandtheinstruc-htiondocumentation. ?O EXPREGOFF,,ArgumentNisinvalid.* Assemblerex-A(pectedageneralregister expressionoftheform offset(Rn).Error:AThecitedargumentisinvalid.(The assemblerex-Kupectedageneralregister expressionoftheforminteger_* offset(Rn)forthis argument.hUserAction:9hCheckthesourcecodeandthe instructiondocumentation.?O EXPRESEXP,-ArgumentNisinvalid.* Assemblerex-?(pectedan expressionwithnoforward references# resolvabletopsect+/ 'koffset.Error:<Theargumentcitedisinvalid.,The assemblerBuexpectedan expressionwithnoforward references.UserAction:7Checkyoursourcecodeandtheinstruc-htiondocumentation.w )M9O EXPSTACKOVER,-InternalSEM expressionstack( overflow.Fatal:-Aninternalerrorhas occurred.^UserAction:5^Gatherasmuch informationaspossibleGaboutthe circumstancesunderwhichtheerroroccurred1andreporttheproblemtoDigital. @O EXPTOOCMPLX,, Expressionistoocomplextoevalu-(ate.Error:DThe expressionistoocomplexforthe assemblerto evaluate.UserAction:4Trygroupingthe expression componentsFusinganglebrackets(<>).*Themostcomplexexpres-Khsionformhandledbythe assemblerresolvestotheform: OPERATOR ,whereOPERATORisoneof:'+, x , %*,/,@,\,&,orr!.(SeerChapter280rforfurther descriptionsofthe assembler& evaluationof expressions.*5mOl ?O EXPZEROFF,,ArgumentNisinvalid.* Assemblerex-A(pectedageneralregister expressionoftheform0(Rn)or(Rn).Error:<Thecitedargumentisinvalid.,The assemblerKuexpectedageneralregister expressionoftheform0(Rn).UserAction:-CheckyoursourcecodeandseeChapter2Bhfor informationaboutgeneralregister expressions.*lOl;O FOUNDEXP,- AssemblerfoundXXXXXwhenexpect-/(ingoneofthe following:'XXXXX.Error:<The assemblerfoundan unexpecteditemina9locationwhereitexpected somethingelse.UserAction:6Checkthe unexpecteditemfoundinthe>source statement.)Examinethoseitemscitedas expected7has alternativesforthe unexpecteditem.J  BOFREGDEF,,Youcannotdefineafloating-pointregis-4(terintermsofaninteger register.Warning:=`Youare attemptingtodefineafloating-pointAregistersymbolintermsofaninteger register.UserAction:6Specifyeitherafloating-pointregisterJoran expressionwithintherangeof0to31withthe'h .DEFINE_FREG directive.'SeeDhChapter5hfor information.aboutthe .DEFINE_FREG directive.*D+lOw&O GENERROR,, GeneratedERROR:kError:=kThis statementwas generatedusingthe.ERROR directive.^UserAction:&^Examineyoursourcecode. w&O GENPRINT,, GeneratedPRINT:kInformational:5KkThis statementwas generatedusingthe.PRINT directive.^UserAction:&^Examineyoursourcecode.w'OGENWARN,, GeneratedWARNING:kWarning:5`kThis statementwas generatedusingthe.WARNING directive.^UserAction:&^Examineyoursourcecode.=)=OHEXSTR,,Illegal hexadecimalescapesequencein(stringliteral.Error:;The specified hexadecimalescapesequenceisinvalid.UserAction:4Checkyoursourcecodeandthedocu- mentation.;O IDENTTRUNC,,ThestringlengthofthemoduleB(IDENTisgreaterthan31 characters.+Itistrun-$catedto31 characters.Warning::`Thestringargumentyou specifiedwiththe+u.IDENT directiveistoolong.UserAction:5Specifyashorterstring argument.+SeehChapter5:Xhfor informationaboutthe.IDENT directive.*+lO AOIDFOUND,, Assemblerfound identifierintheopcodeC(fieldwhen expectingoneofthe following:'opcode,A directive,macro invocation,orsymbol definition.Error:<The identifiercitedwas unexpected.,Theas-Iusemblerexpectedeitheranopcode,a directive,amacro1 invocation,orasymbol definition.hUserAction:$hCheckyoursourcecode.B! CO IDTOOLONG,, Identifierislongerthan31 characters.kError:?kThe identifierexceedsthe31 charactermaximumsize.^UserAction:8^Checkyoursourcecodeandeitherrename(ortruncatethe identifier.w.O ILLASCII,,IllegalASCII constant.kError:=kThe assemblerfoundanillegalASCIIconstant2withthe6Aor^aradix specifier.^UserAction:$^Checkyoursourcecode.w-OILLBIN,,Illegalbinary constant.kError:>kThe assemblerfoundanillegalbinaryconstant2withthe^Bor^bradix specifier.^UserAction:$^Checkyoursourcecode.w.OILLDEC,-Illegaldecimal constant.kError:>kThe assemblerfoundanillegalbinaryconstant2withthe^Dor^dradix specifier.^UserAction:$^Checkyoursourcecode.z )P@O ILLEXPON,,Illegalexponentinfloating-pointcon-(stant.Error:;The specifiedexponentofthefloating-point constantisillegal.UserAction:-CheckyoursourcecodeandseeChapter5=for informationaboutfloating-point constants.*zlOF w7O ILLFLOAT,-Illegalfloating-point constant.kError:@kThe specifiedfloating-pointconstantisillegal.UserAction:-CheckyoursourcecodeandseeChapter5=^for informationaboutfloating-point constants.*lOw2OILLHEX,,Illegal hexadecimal constant.kError:>kThe assemblerfoundanillegalbinaryconstant2withthe^Xor^xradix specifier.^UserAction:$^Checkyoursourcecode.I! +OILLIFOP,-Illegal.IF operator.kError:>kAnillegaloperatorwas encounteredasan.IF operator.^UserAction:)^Checkyoursourcecode.'See^Chapter5 ^for2 informationaboutthe.IF directive.*!lO]! 3;OILLINCL,,Illegal.INCLUDEfilespecification.kError:<kThe assembler encounteredanillegal.INCLUDE directive.^UserAction:)^Checkyoursourcecode.'See^Chapter5 ^for7 informationaboutthe.INCLUDE directive.*!lOw,OILLOCT,,Illegaloctal constant.kError:>kThe assemblerfoundanillegalbinaryconstant2withthe^Oor^oradix specifier.^UserAction:$^Checkyoursourcecode. )V?OILLOPERANDMIX,,Illegaloperandmixingforopera-(tor.Error:ATheresolvedoperandtypesareinvalidwhenused3togetherwiththe specified operator.UserAction:;Seethe descriptionsof operators, operands,and expressionsin|Chapter2.*|lOl AO ILLPROCRET,-Illegal procedurereturn;linkagereg-C(ister (argument1)mustbeR31whensoftwarehint (argument3)is1.Error:%Illegal procedurereturn.UserAction:3Checkthe instruction arguments.)WhenEargument3,softwarehint,is1,thefirstargument<h specifyingthelinkageregistermustbeR31.`6AO ILLRADIX,-Illegalradix specifierinnumericcon-5(stant;specifyA,B,C,D,O,orX.Error:?The assemblerfoundanillegalradix specifier.^UserAction::^CheckyoursourcecodeanduseoneofA, B,C,D,O,orX.g! )=AO INCLDEPTH,,.INCLUDEnestdepthexceedsN-check"(forcircular .INCLUDE.Error:=The assembler attemptedtoexceedthemaximum*levelofincludefiledepth.UserAction:8Checkyoursourcecodeforcircularfile inclusion.%! w1O INCLOPEN,-.INCLUDEfileopenerror.kError:@kThe assemblercouldnotopentheincludedfile.UserAction:?Checkthefile attributesandsoforthofthe$^ specified.INCLUDEfile. )W;O INSNOTINPSC,- InstructionsmustbeinaMIX,5(NOEXE;MIX,EXE;orNOMIX,EXEPSECT.Error:EYou specifiedan instructioninapsectwithincor-"rectpsect attributes.UserAction:3MakesurethepsecthasMIXorEXE&andNOMIX attributesset. )e@O INTERNAL,,Internal assemblererror.)Pleasereport$(theproblemtoDigital.Fatal:-Aninternalerrorhas occurred.^UserAction:5^Gatherasmuch informationaspossibleGaboutthe circumstancesunderwhichtheerroroccurred1andreporttheproblemtoDigital.Z! )|GOINTERR,,Internal processingerrorintheSYN facility.4(PleasereporttheproblemtoDigital.Fatal:-Aninternalerrorhas occurred.^UserAction:5^Gatherasmuch informationaspossibleGaboutthe circumstancesunderwhichtheerroroccurred1andreporttheproblemtoDigital.# DO INVALIGNFILL,,You specifiedaninvalidoptionalfill0(patternwiththe.ALIGN directive.Error:?You specifiedaninvalidoptionalfillpattern.^UserAction:9^Checkyoursourcecode,in particulartheGsecondargumenttothe.ALIGN directive,the alignmentQfill specifier,toinsurethatitresolvestoaninteger.*SeehChapter5:Xhfor informationaboutthe.ALIGN directive.*+lO? BO INVBASEEXP,,Invalid expressionfor.BASE directive.kError:AkThe expressionisnotvalidfor.BASE directive.UserAction:7The expressionyou specifiedforabaseJ^registerwiththe.BASE directiveshouldcontainnofor-Oward referencesandresolvetooneofthe followingatthis)pointin assembly:'psect+/ +offset,externalsymbolrefer-hence+/ h&hoffset,integer,label+/ $h(ihoffset,wherethelabelisHdefinedinapsectwiththeEXEandNOMIX attributes. SeedChapter57formore informationaboutthe assembler&r evaluationof expressions.*dlO! )?O INVBASEREG,-Invalidbase register.,Baseregister.(mustbeoneofR0throughR30.Error:6You specifiedaninvalidbase register.^UserAction:>^Specifyabaseregisterasageneralregister"fromtherangeofR0....}R30.'R31cannotbe specifiedasNabaseregisterandis implicitlydefinedas.BASER31,0. BO INVBRTGT,,Invalidbranchtarget.)Branchtargetla-B(belmustbedefinedinsamepsectasthebranch5 instructionwhich referencesthelabel.Error:DThe specifiedlabelyou referenceasthetargetofMuabranch instructionmustbedefinedinthesamepsectin$whichitis referenced.hUserAction: hSeezhChapter4'hformore informationaboutlabels.*z+lO BOINVCA,,You specifiedaninvalidcodeaddresswith9(the procedure descriptor./ThecodeaddressAmustbea nontemporarylabeldefinedinapsectCwiththeEXEorMIX attributeafteritsusewith 2.PROCEDURE_DESCRIPTOR.Error:BThecodeaddressyou specifiedasthesecondar-?&gumenttothe.PROCEDURE_DESCRIPTOR directiveis~invalid.UserAction:/Thecodeaddressmustbeanon-Er temporarylabeldefinedinapsectwiththeEXEor7NOMIX attribute.'Checkyoursourcecode.! >OINVEXP,, AssemblerfoundXXXXXwhen expectinga(valid expression.Error:CThe assemblerexpectedoneofthe following:'inte-Sger,floating-point constant, identifier, register,period( . ),=u left-anglebracket( < ),orunary operator.UserAction:6Checkthe unexpecteditemfoundinthehsource statement.! )w@OINVEXPRFORDIR,,Invalid expressiontypefordirec-(tive.Error:CThe assemblerresolvedvalueforthe expressionin-thecited directiveisinvalid.UserAction:SeeChapters 1 and 5 formore information7aboutthe directive argumentsandtypes.*z-?*z,?w2M>OINVEXPRFORSYM,,Invalid expressiontypeforsym-(bol.Error:?The assemblerresolvedvalueforthe expressionLthatisassignedtoalocalorglobalsymbolisinvalid.UserAction:4 ExpressionsassignedtoasymbolmustFcontainnoforward referencesandmustresolvetoan&hintegeror psect/label+/ h[hoffset.)SeehChapter2fhformoreE informationabouthowthe assembler determinessymbol"and expressionvalues.*+mOl_ )5=O INVFPCONST,,Invalidfloating-pointvalue.,Check8(valuerangeforfloating-pointdatatype.Error:?The assemblerdetectedaninvalidfloating-pointvalue.UserAction:;Checkthe specifiedrangeforthe directivetype.)m?O INVINSQUAL,,You specifiedaninvalid instruction,( qualifierlistfortheopcode.Error:@The instruction qualifieryou specifiedwiththeopcodeisinvalid.UserAction: SeeAppendixA$;foracompletelistof7opcodesandvalid instruction qualifiers.*zOg )c?OINVLCA,, Assemblerfoundaninvalidor undefined9(codeaddressforthe procedure descriptor.Error:@Aninvalidor undefinedcodeaddress corresponds4tothe specified procedure descriptor.UserAction:8Checkyoursourcecodeforthe specifiedcodeaddress.j )U@O INVLISTOPT,,You specifiedaninvalidoptionwith+(the.LISTor.SHOW directive.Error:CYou specifiedaninvalidoptionwiththe.LISTor.SHOW directive.UserAction: SeezChapter5'forvalid.LISTand.SHOW directiveoptions.*zzmOI2OINVLPD,,Invalid procedure descriptor.kError:=kYou specifiedaninvalid procedure descriptor.KTherewasno definitionofa procedure descriptorbythe specifiedname.UserAction:$Checkyoursourcecode.! )cAO INVNLISTOPT,,You specifiedaninvalidoptionwith.(the.NLISTor.NOSHOW directive.Error:DYou specifiedaninvalidoptionwiththe.NLISTor.NO_SHOW directive.UserAction: SeezChapter5'forvalid.NLISTand.NO_#SHOW directiveoptions.*zzmO @OINVOFF,,You attemptedtospecifydata intializa-G(tionwithacurrentpsectoffsetthatisoutsidethe'rangeof0to 2147483647.Error:FThecurrentpsectoffsetisinvalidfor specifyingaudatainitialization.UserAction:8Checkyoursourcecodeandthevalueof&hthecurrentpsectoffset. :O INVREGNUMEXP,,Invalidregister-numberexpres-B(sion.'Specifyaninteger expressionbetween0andC31ora previouslydefinedor predefined register.Error:CYou specifiedanillegal expressionforaregisterusymbol definition.UserAction:;Specifyavaluebetween0and31.'YoucanMhalsodefinearegisterintermsofapreviously-definedor predefined register.$ =O INVREPCOUNT,-Theintegervalueofthe.REPEAT@( expressionisnotwithinthe inclusiverangeof70...65535.'A0valueisassumed.Warning:<`Thevalueofthe.REPEAT expressionmustbe#uwithintherangeof0u.../xu65,535, inclusive.' Therefore,a0) expressionvalueisassumed.hUserAction:8hSpecifya repetitioncountbetween0and65,535, inclusive.r)H@O INVSAVEOPT,-You specifiedaninvalidoptionwith&(the .SAVE_PSECT directive.Error:AYou spoecifiedaninvalidoptionwiththe.SAVE_PSECT directive.UserAction: See~Chapter5!forvalid .SAVE_PSECT directiveoptions.*~znOF :O INVTEMPLAB,,Invaliduseof temporarylabel.kError:DkA temporarylabel referenceisnotallowedinthiscontext.^UserAction: ^Seez^Chapter2(^for informationaboutusing temporarylabels.*z!lOl! BOINVTERM,, AssemblerfoundNwhen expectingavalid( expressionterm.Error:@The assemblerfoundan unexpecteditemwhereitIexpectedoneofthe following expressions:)floating-pointQunumber,integer, register,decimalpoint( . ), identifier,or' left-anglebracket( < ).hUserAction:8hChecktheitemflaggedbythe assembler.! BOIREGDEF,,Youcannotdefineanintegerregisterin1(termsofafloating-point register.Warning:7`Youare attemptingtodefineanintegerGregistersymbolintermsofafloating-point register.uIREGDEFUserAction:=Specifyeitheranintegerregisteroranex-Jhpressionwithintherangeof0to31withthe.DEFINE_IREG directive.$w)O LABELNOTDEF,, Undefinedlabel.kError:4kThelabelyou specifiedis undefined.UserAction:SeeChapters 2 $and 4 for descriptionsof^thevalidlabels.*-?l*,?I9O LABELREDECL,,Illegal redefinitionoflabel.kError:BkYouhave illegallydefinedthislabelinmultiple+placesinthisassemblyunit.^UserAction:;^Checkall referencestothislabelinyoursourcecode. :OLABNOTINPSECT,,Labelmustbedeclaredina(PSECT.Error:BYouare attemptingtodeclarea temporary,local,Dorgloballabelwithoutfirst establishingapsect.UserAction:2Makesureyouenterthe appropriateL.PSECT directivebefore declaringthelabelinyoursourcehstream.|! R8OLEXOPEDITSPEC,- Unrecognizededit specifier.kError:DkThe assemblerdoesnot recognizetheedit specifier-forthe%EDITlexical operator.^UserAction:-^Checkyoursourcecodeandsee^Chapter3Afor informationaboutthe%EDITlexical operator.*!lO AO LEXOPENDM,-Illegal modificationof.ENDM directive*(keywordbylexical operation.Error:<Whileyourmacro definitioncontainsa.ENDMI directivethatendsthemacro definition,the.ENDMdi-PurectiveismodifiedbyalexicaloperatorsothatitcannoIlongerbe recognizedasa.ENDM directivekeywordafter&lexical processing.UserAction:6Changethe statementtoavoid modifyingGthe.ENDM directivekeywordwithlexicaloperatorpro-rcessing.'SeerChapter31rfor informationaboutusinglexical operators.*5lO AO LEXOPENDR,,Illegal modificationof.ENDR directive*(keywordbylexical operation.Error:=Whileyourrepeatrangecontainsa.ENDRdi-Irectivethatendstherepeatblock,the.ENDR directiveOuismodifiedbyalexicaloperatorsothatitcannolongerJbe recognizedasa.ENDR directivekeywordafterlexical& processing.UserAction:6Changethe statementtoavoid modifyingGthe.ENDR directivekeywordwithlexicaloperatorpro-rcessing.'SeerChapter31rfor informationaboutusinglexical operators.*5lO )hBO LEXOPSYNTAX,,Illegallexicaloperatorsyntax(miss-A(ingleftorright parenthesis,missingcomma,or3otherlexicaloperatorsyntaxerror).Error:CThe indicatedlexicaloperatorhasasyntaxerror.UserAction:7Checkthesourcecodetoinsurecorrectsyntax.! )AOLEXSYM,,XXXXXisalreadyalexicalstringsymbol@(name;itcannotalsobeanumericsymbolname.Error:AYoucannotdefinealexicalstringsymbolanda/numericsymbolbythesamename.UserAction:8CheckyoursourcecodeandremoveeitherEthelexicalstringorthenumericsymbol definition.)l3OLIBMOD_BADFORMAT,-LibrarymoduleXXXXX>(containsillegalsyntax(missing.MACROorla-=bel preceding.MACRO,missingornotmatching3.ENDM,orothermacrosyntaxerror).uError:7uThe assembler encounteredillegalsyntax.UserAction:-Checkthesyntaxofthemacro.w;O LIBMOD_EMPTY,,LibrarymoduleXXXXXisempty.kWarning:9`kThe assembler encounteredanemptylibrarymodule.^UserAction:(^Replacethelibrarymodule.9O LIBMOD_EXTRA,,LibrarymoduleXXXXXcontains>( extraneoustextafter.ENDM;the assemblerig-"norestheextratext.Warning:7`The assembler encountered extraneoustextCuafteran.ENDM directiveinalibrarymodule..The) assemblerignoresthistext.hUserAction:(hCorrectthelibrarymodule.A )8OLIBMOD_NOT_FOUND,,LibrarymoduleXXXXXnot(found.Error:CThe assemblercouldnotfindthe indicatedlibrarymodule.UserAction:7Checkthespellingofthemacrolibraryandmodulenames.  (using different alphabeticcasethanin.MCALL+ directiveormacro invocation.Error:>Thereisan alphabeticcase differencebetweenMuthat specifiedinthemacrolibraryandwhatyou specified forthemacroname.hUserAction::hCheckthecaseofthemacronameinyourJsourcecodeandthecaseofthemacrointhe specifiedmacrolibrary.  )V9O MACEXPNEST,-Macro expansionexceedsmaximum<(nestingdepth(macro recursionnot detected).Error:BThemacroisnot recursivebutexceedsthemaxi-+mum allowable expansiondepth.UserAction:7Checkyoursourcecodeforpossiblere- structuring. z?OMACPARAMGENDEF,,Youcanspecifya generatedla-G(beldefaultvalueoradefaultstringvalue,butnotboth.Error:AYou specifiedbothadefaultstringvalueandaIu generatedlabeldefaultvaluewhenyoucanonlyspecifyone.hUserAction:&hExamineyoursourcecode. )b:OMACPARAMSYNTAX,,Illegalmacro parametersyn-=(tax.' AssemblerfoundXXXXXwhen expectingoneofXXXXX.Error:0Macro parametersyntaxisinvalid.UserAction:3Try replacingthe unexpectedargument0withoneofthoseitemscitedasI expected c.! )V9O MACRECURSE,, Recursivemacroexceedsmaximum+(macro expansionnestingdepth.Error:=Themacrois recursiveandexceedsthemaxi-)mum expansionnestingdepth.UserAction:;Checkyoursourcecodeforamissingbasis*stepinthe recursivemacro. ?OMACZERO,, Assemblercannotevaluate expression.)A,(0 expressionvalueisassumed.Informational:5KThe assemblercannotevaluatethisex-Gpressionduetoerrorsit encountered., Therefore,a0uvalueisassumed.UserAction:2Checkthe expressionforforwardorhexternal references.9 BOMAXIF,-Maximumnestingof.IF directives exceeded.kError:@kThemaximumdepthnestingof.IF directiveshasbeen exceeded.^UserAction:7^Checkyoursourcecodeforpossiblere- structuring.6 F ?O MAXLEXOP,,MorethanNlexical operatorsencoun-D(tered;checkfora recursivelexicalstringsymbol.Error:AYoursourcelinecontainsan excessivenumberofJlexical operators.)A recursivelexicalstringsymboldef-Kuinitionoccurswhenyou initiallydefinealexicalstringOsymbolintermsofitselfusingthelexical substitutionop-G&erator.)Whilethe assemblernormally interpretslexicalH~ substitution operatorsduringlexicalstringsymboldef-Minition,itcannotinthiscasebecausethelexicalstringJ/symbolisnotyetdefined.)Whenthe assemblerlaterex-Lpandssuchalexicalstringsymbolwiththeimbeddedself3 reference,infinite recursionresults.{UserAction:9{Checkyoursourcecodefor recursivelex-Kicalstringsymbol definitionsandredefinethemtoavoid- recursion. w2O MISSENDC,,Missing.ENDC directive(s).kWarning::`kThe assemblercouldnotfinda terminating(.ENDC conditional directive.^UserAction:$^Checkyoursourcecode.w2O MISSINGENDM,-Missing.ENDM directive.kError::kThe assemblercouldnotfinda terminating<.ENDM directivetomatcha.MACRO directive.^UserAction:$^Checkyoursourcecode.w2O MISSINGENDR,,Missing.ENDR directive.kError:@kThe assemblercouldnotfindan.ENDR directive7to terminatean.IRPora.REPEATblock.^UserAction:$^Checkyoursourcecode.p )F?O MISSQUOTE,,Missingclosing double-quote character(instringliteral.Error:<Theclosing double-quoteismissingfromthestringliteral.UserAction:3Checkyoursourcecodeandinserta9closing double-quoteforastringliteral.r 2H>O MODCODLOCCTR,, RestoringthelocationcounterinB(thecurrentcontextcausesanillegal modificationCofthelocationcounterforapsectwiththeEXE!andNOMIX attributes.uError:CuYoucannotmodifythelocationcounterinapsect1withtheEXEandNOMIX attributes.hUserAction:<hIfyouneedtomodifythelocationcounter,3specifytheMIXpsect attribute.-SeeChapter5fora6 descriptionoftheMIXpsect attribute.*nO;9ONOBEGEX,- Assembler encounteredan unmatched ( .END_EXACT directive.Error:5The assembler encounteredan .END_EXACT8 directivebeforea .BEGIN_EXACT directive.UserAction:$Checkyoursourcecode. DONOCA,,Youdidnotspecifyacodeaddressasargu-/(ment2with.PROCEDURE_DESCRIPTOR.Error:CYoudidnotspecifyacodeaddressasthesecond>argumenttothe.PROCEDURE_DESCRIPTOR directive.UserAction:4Thecodeaddressmustbea nontempo-GrarylabeldefinedinapsectwiththeEXEorNOMIX0h attribute.'Checkyoursourcecode.w )MDONOQUAL,- Instruction qualifiersareinvalidwiththis(opcode.Error:CYoucannotspecify instruction qualifierswiththisopcode.UserAction: SeeAppendixA$;foracompletelistof7opcodesandvalid instruction qualifiers.*zOg)sAO NOTAQUAL,,Anitemyou specifiedinthe qualifier0(listisinvalidwiththisopcode.Error:@The instruction qualifieryou specifiedwiththeopcodeisinvalid.UserAction: SeeAppendixA$;foracompletelistof7opcodesandvalid instruction qualifiers.*zOga)7:ONOTENOUGHARGS,-Notenough argumentsforin-( struction.Error:<The instructionneedsoneormore additional arguments.UserAction:1Checktheargumentnumbersandre-,quiredformatsas specifiedinChapter5.*lOa )79O NOTINMACRO,-This statementmustoccuronly(withinamacro.Error:CThe statementyou specifiedisonlyallowedwithinamacro.UserAction: SeeChapter2& fora descriptionofthe statement specified.*zoOl5O NOTINSEM,,Missing functionalityinSEM.kError:?kThis functionalityismissinginthe assembler.UserAction:4PleasereporttheproblemtoDigital.! )@ONUMSYM,,XXXXXisalreadyanumericsymbolname;A(itcannotalsobealexicalstringsymbolname.Error:BYoucannotdefineanumericsymbolandalexical.stringsymbolbythesamename.UserAction:8CheckyoursourcecodeandremoveeitherEthenumericorthelexicalstringsymbol definition. \>OOPTIGN,,The assemblerisignoringoneormore(VAXMACROoptions.Informational:3KThe assemblerdetectedandignoredaVAXMACROoption.UserAction:0RemovetheVAXMACROoptionsfrom?yourMACRO-64 AssemblerforOpenVMSAXPSystemshprogram.>OOVERLAP,, Assemblerdetected overlappinginitial-E(izersatoffsetNN.ThisinitialvalueoverlapsbutDisnotanexact replacementforapreviousinitialvalue.uError:@uYouaretryingtoassignor initializemultipleCvaluestothesame location.'Thisisnotallowed.hUserAction:$hCheckyoursourcecode.;OPSECTALIGNCON,,PSECT alignment conflictswith(earlier declaration.Error:?A previously specifiedpsect alignment attribute: conflictswiththeflaggedpsect attribute.UserAction:8Checkall declarationsofthepsect.+SeeChapter5>Zfora descriptionofthe.PSECT directiveandhpsect attributes.*mO :O PSECTATTRCON,-PSECT attribute conflictswith(earlier declaration.Error:EA previously specifiedpsect attribute conflictswith)theflaggedpsect attribute.UserAction:8Checkall declarationsofthepsect.+SeeChapter5>Zfora descriptionofthe.PSECT directiveandhpsect attributes.*mOU  2f@O REGREDEF,,You attemptedtoredefinea previously?(definedregistersymbolwitha differentvalue.Warning:?`Youare attemptingtochangethe definitionofKaregistersymbolthateitheryouhave previouslydefined.uorthatMACRO-64has predefined.UserAction:5Checkfor conflictswiththe register-Fhsymbol identifieryouhave specified..IfyouwishtoGredefinearegistersymbol,youmustfirstcancelitsDprevious definitionwiththe .UNDEFINE_REG directive.[ 1The instructioncontainsoneormore argumentsthan necessary.UserAction:1Checktheargumentnumbersandre-,quiredformatsas specifiedinChapter5.*lO)b9OTOOMANYMACARG,,You specifiedmore arguments/(thanaredefinedforthismacro.Error:?You specifiedmore argumentsonthemacrocall6thanwere specifiedforits definition.UserAction:7Checkthemacro definitionandpointof'callinyoursourcecode.w6OTOOMANYMACPARAMS,,Toomanymacroparame-(ters.Error:7You specifiedtoomanymacro parameters.^UserAction:$^Checkyoursourcecode.E 0O TRUNCDATA,,Data truncationwarning.kWarning:B`kYou specifiedadatavaluethatisoutofrangeLforthe specified directive,whichresultsindatatrunca-tion.UserAction:%Specifyasmallervalue. >OUNDCA,,You specifiedan undefinedcodeaddress+(withthe procedure descriptor.Error:BThecodeaddressyou specifiedasthesecondar-?gumenttothe.PROCEDURE_DESCRIPTOR directiveisu undefined.UserAction:4Thecodeaddressmustbea nontempo-GhrarylabeldefinedinapsectwiththeEXEorNOMIX0 attribute.'Checkyoursourcecode.u=O UNDEFSYM,, Undefinedsymbolorlabel.) Assembler-(assumesan .EXTERNAL definition.Warning:=`The referencedlabelorsymboldoesnothaveJanexplicit definitionandanexternal definitionisas-usumed.UserAction:5Usethe .EXTERNAL directivetodeclarehthesymbol. w )M3O UNEXPELSE,- Unexpected.ELSE directive.kError:<kThe assembler encounteredan unexpected.ELSE directive.^UserAction:8^Checktheuseofthe.ELSE directiveinKyoursourcecodetoinsureproper positioningwitha.IF and.ENDC directive.)w3O UNEXPENDC,, Unexpected.ENDC directive.kError::kThe assemblercouldnotfinda terminatingG.ENDCforamacro conditional directive,suchas.IF.^UserAction:$^Checkyoursourcecode.$3O UNEXPENDM,, Unexpected.ENDM directive.kError:5kThe assembler encounteredan unexpected.ENDM directive.^UserAction:2^Checkyoursourcecodeformatching .MACRO/.ENDMpairs.A! 3O UNEXPENDR,- Unexpected.ENDR directive.kError:<kThe assembler encounteredan unexpected.ENDR directive.^UserAction:2^Checkyoursourcecodeformatching; .REPEAT/.ENDRand .IRP/.ENDR directivepairs.T *>O UNEXPIFF,, Unexpected .IF_FALSE(.IFF) directive.kError:;kThe assembler encounteredan unexpected.IF_FALSE directive.^UserAction:;^Checkyoursourcecodetoinsurethatthis4 directiveoccurswithinan.IFblock.R (=O UNEXPIFT,- Unexpected.IF_TRUE(.IFT) directive.kError:;kThe assembler encounteredan unexpected.IF_TRUE directive.^UserAction:;^Checkyoursourcecodetoinsurethatthis4 directiveoccurswithinan.IFblock.h )>9O UNEXPIFTF,, Unexpected.IF_TRUE_FALSE(.IFTF)( directive.Error:;The assembler encounteredan unexpected.IF_  TRUE_FALSE directive.UserAction:;Checkyoursourcecodetoinsurethatthis4 directiveoccurswithinan.IFblock.w5O UNEXPMEXIT,, Unexpected.MEXIT directive.kError:5kThe assembler encounteredan unexpected.MEXIT directive.^UserAction:$^Checkyoursourcecode.q )G7OUNKDIR,, Assemblerfoundunknown directive(XXXXX.Error:,Aninternalerrorhasoccured.^UserAction:5^Gatherasmuch informationaspossibleGaboutthe circumstancesunderwhichtheerroroccurred1andreporttheproblemtoDigital.V ),6OUNKENDISOPTION,,You specifiedanunknown#(.ENABLE/.DISABLEoption.Error:<Theoptionyou specifiedfor.ENABLE/.DISABLEis incorrect.UserAction:2Checktheoption specifiedwiththe&.ENABLE/.DISABLE directive.W -2O UNKNOWNATTR,,UnknownPSECT attribute.kError:>kThe assemblerdoesnot recognizethe specifiedpsect attribute.^UserAction: ^See^Chapter5& ^fora descriptionofthe4.PSECT directiveandpsect attributes.* !oO@ 9O UNTERMEX,- AssemblerdetectedN unterminated7( .BEGIN_EXACT directive(s)inpsectXXXXX.Error:6 Unmatched .BEGIN_EXACT directive(s)occur%forthe indicatedpsect.UserAction:$Checkyoursourcecode. / +OExampleF-1:7MainSourceFile!OB.title%LIST% "Example"O.ident%"V1.0"'O.show%include,% conditionalsO.show% expansionsOb.enable& align_data&O.enable& peephole,%schedule"O .subtitle% "Definitions"%O[.include%"DEFINITIONS.M64"O.noshow& expansionsO- .subtitle% "Linkage"Ou$linkage_sectionO DATA_PTR: O.address% DEFAULT_DATAOM.if%eq,&OPTION,%1.%=%DATA_PTR!.address& OPTIONAL_DATAO%.endc$O .subtitle%"Routine%ZING"O.show%binary%O$routine%ZING,% kind=stackf.base&r27,$lsaddqK r16,r17,r22addqK r1,r18,r22>addqK r19,r20,r23addqK r21,r22,r23ldqp r0,DATA_PTR  .begin_exact^ stq& r31,0(r0) stq& r22,8(r0) stq& r23,16(r0)6  .end_exact} $returnO  $end_routine%ZINGO/ .ends.OExampleF-2:7IncludeSourceFile5O.macro%DEFINE&SYMBOL,%VALUE,& SOFT=FALSE*X.if% identical,&,%.if&defined,&SYMBOL:/.print%"Using& /DEFINE=SYMBOL=%integer(SYMBOL)"/0.mexitx.endc.endcSYMBOL%=&VALUEOO.endm%DEFINE.ODEFINE%OPTION,%VALUE=0,% SOFT=TRUE  T%1OExampleF-3:7ExampleListingOutputOLISTpExample [18 26-AUG-1993%11:38:22pMACRO-64&V1.1pPagep1O]V1.0p Definitions4] 26-AUG-1993&11:38:17p[PROJ]EXAMPLE.M64;3 2$b1%.title&LIST% "Example"D2%.ident%"V1.0"*DV3%.show%include,% conditionals V3D4%.show% expansions D5%.enable& align_data)D.6%.enable& peephole,%schedule Dv7%D8% .subtitle% "Definitions"(D9%.include%"DEFINITIONS.M64" N4<7N110%.macro&DEFINE%SYMBOL,&VALUE,% SOFT=FALSE1111p.if% identical,&,%&112.if&defined,&SYMBOL&1132o&.print%"Using&/DEFINE=SYMBOL=%integer(nSYMBOL)" n5114o.mexit115.endcE116p.endc!117pSYMBOL%=&VALUE118%.endm%DEFINE1195e120%DEFINE%OPTION,%VALUE=0,% SOFT=TRUE 1OO%MACRO64-I-GENPRINT,%(1)% Generated&PRINT:%Using%/DEFINE=OPTION=1 6dO^%MACRO64-I-MACAUXMSG1,&(1)%This& condition%occurred%in%the% expansion&of&macro&DEF0OINE%at%line%3&of&its% definition./O\.print&"Using%/DEFINE=OPTION=1"\ [W 7W 1K1*W .if% identical,%,& 1K1$ .if&defined,&OPTION 1K12o .print%"Using&/DEFINE=OPTION=%integer(/ OPTION)"Ow *INFO* vw 8w 1K1* w 9+w .print&"Using%/DEFINE=OPTION=1" 1K1o .mexit  21!O 22%.noshow& expansions vO 10  23" 24% .subtitle% "Linkage"' 25%$linkage_sectiono 0000 o 11<o 757& DATA_PTR: O XXXXXXXXXXXXXXXX&0000  12%< 758&.address& DEFAULT_DATA O 0000000000000001&0008  13#< 759&.if%eq,%OPTION,%1 OG 0000000000000001&0008O 0000000000000000'0000  14< 760p.%=&DATA_PTRO 0000000000000000'0000& 761p.address& OPTIONAL_DATA0008762%.endcg0008 g7630008)764% .subtitle%"Routine%ZING"0008765%.show%binary 15>0008*>766%$routine%ZING,% kind=stack O16V00000000K2p*5.psect%#$DATA$,OCTA,NOPIC,CON,REL,LCL,NOSHR ,NOEXE,RD,WRT4700000008K2p*57.psect%#$LINK$,OCTA,NOPIC,CON,REL,LCL,NOSHR,NOEXE,RD,NOWRT3089&0008K25.word&MACRO64$PD_KIND%!&MACRO64$PD_FLAGS0008&000AK2.word& $RSA_OFFSETZW00&000CK2W.byte&0Z00&000DK25.byte&$!<@4>/0001&000EK2*/.word&MACRO64$DEFAULT_SIGNATURE"Ow0000000000000000'0010K2%w.address&OLISTpExample8 26-AUG-1993&11:38:22pMACRO-64%V1.1pPagep2O(V1.0pRoutine%ZING4( 26-AUG-1993&01:29:34p[PROJ]EXAMPLE.M64;3z00000020&0018K2.long&$SIZE0000&001CK2.word&0!0014&001EK25!.word&$MACRO64$END_PROLOGUE_0-MACRO64$ENTRY i_0z20000000&0020K2(.long&MACRO64$SAVED_IREG_MASKz00000000&0024K2(.long&MACRO64$SAVED_FREG_MASK4A00000000K2p*5A.psect%#$CODE$,OCTA,PIC,CON,REL,LCL,SHR,EXE ,NORD,NOWRTz23DEFFE0&0000K3 LDA%$SP,& -$SIZE($SP)zB77E0000&0004K26.iif%ne,&!,%STQ%$PV,%($SP)zB75E0008&0008K2%STQJ$RA,%$RSA_OFFSET($SP)zB7BE0010&000CK3p*4STQJ%MACRO64$R29,$RSA_OFFSET+($SP)z47FE041D&0010K2MOVK$SP,%$FPz 00000008'00142090p.base&r27,$ls/ *Optimized* 17!2091paddqJ r16,r17,r22/Y *Optimized* Y2092paddqK r1,r18,r22/ *Optimized*!2093paddqK r19,r20,r23/ *Optimized*!2094paddqK r21,r22,r23/0 *Optimized* 02095pldqp r0,DATA_PTRx2096p .begin_exactzB7E00000&00282097stq& r31,0(r0)zB6C00008&002C2098stq& r22,8(r0)zPB6E00010&0030P2099stq& r23,16(r0)2100p .end_exact00342101p$return/( *Optimized*14$(.iif%ne,%,&MOV%$FP,&$SP/ *Optimized*1-$LDQK MACRO64$R28,%$RSA_OFFSET($SP)/ *Optimized*1+$LDQK$FP,&MACRO64$FP_OFFSET($SP)/H *Optimized*2$HLDA&$SP,% $SIZE($SP)/ *Optimized*1$RETK (MACRO64$R28)"2205% $end_routine%ZING 0048 2206h2207%.endOLIST +18PMachine&Code%ListingJ 26-AUG-1993%11:38:22pMACRO-64%V1.1pPagep3OV1.0p$CODE$4 26-AUG-1993&11:38:17p[PROJ]EXAMPLE.M64;3?.PSECTJ$CODE$,%OCTA,%PIC,&CON,%REL,%LCL,&SHR,-$EXE,%NORD,%NOWRT4300003ZING::4{0000{MACRO64$ENTRY_0:O23DEFFE0 19w0000 S20 021,LDASP,%-32(SP)p;%SP,%-32(SP) " 22 ;%000766O B77E00000004( STQR27,%(SP);&R27,%(SP)OS B75E00080008*S STQR26,%8(SP);&R26,%8(SP)O B7BE0010000C* STQFP,&16(SP);&FP,%16(SP)O 47FE041D0010 MOVSP,&FP/ ;&SP,%FP4+!0014!+!MACRO64$END_PROLOGUE_0:Os!421104160014>s!ADDQR16,%R17,&R22%;&R16,%R17,%R22K;%002091O!A41BFFF800187!LDQR0,&-8(R27)p;&R0,%-8(R27);%002095O"40320416001C<"ADDQR1,&R18,%R22K;&R1,%R18,&R22p;%002092OK"427404170020>K"ADDQR19,%R20,&R23%;&R19,%R20,%R23K;%002093O"42B604170024>"ADDQR21,%R22,&R23%;&R21,%R22,%R23K;%002094O"B7E0000000283"STQR31,%(R0);&R31,%(R0);%002097O"#B6C00008002C5"#STQR22,%8(R0);&R22,%8(R0);%002098Oj#B6E0001000307j#STQR23,%16(R0)p;&R23,%16(R0);%002099O#47FD041E0034#MOVFP,&SP/#;&FP,%SP #;%002101O#A79E00080038*#LDQR28,%8(SP);&R28,%8(SP)OB$A7BE0010003C*B$LDQFP,&16(SP);&FP,%16(SP)O$23DE00200040*$LDASP,&32(SP);&SP,%32(SP)O$6BFC80010044$RETR28/$;&R28EO;%Routine&Size:&72&bytes,Routine&Base:&$CODE$%+&0000 v;%23 P;.PSECTJ$LINK$,%OCTA,%NOPIC,%CON,%REL,&LCL,-$$fNOSHR,&NOEXE,%RD,%NOWRTO000000000000!.ADDRESSK OPTIONAL_DATA30890008.WORDpX^3089>0008000A>.WORDpX^0008/00000C.BYTEpX^00/00000D.BYTEpX^000001000E.WORDpX^0001O^000000000010#^.ADDRESSKMACRO64$ENTRY_0O000000200018.LONGp X^000000200000001C.WORDpX^000060014001E6.WORDpX^0014O~200000000020~.LONGp X^20000000O000000000024.LONGp X^00000000JOPCommand:%-MACRO/ALPHA/LIST/MACHINE_CODE/DEFINE=OPTION=1%EXAMPLE P24})gINDEXINDEXYS&&9 %%-Lexicalescapeoperator%%-Lexical escape operator2!i  iAAJS8 Absolute expressionAbsolute expressionDS8 AccessingmemoryAccessing memory-S8 AddressAddressOS!!N9 baseregister(.BASE)base register (.BASE)'-SN9 labellabel3H)N8 localcodestorage directive (.LOCAL_CODE_ADDRESS)local code storage directive (.LOCAL_CODE_ADDRESS)Fr#7%N8 storage directive(.CODE_ ADDRESS)storage directive (.CODE_ ADDRESS)ULS8 .ADDRESS directive.ADDRESS directivenS%118 Addressstorage directive (.ADDRESS)Address storage directive (.ADDRESS)3S 8 AddressingAddressingNS  N8 controlling alignmentcontrolling alignmentISN8 tolinkagesectionto linkage section DS9 .ALIGN directive.ALIGN directiveLS9 /ALIGNMENT qualifier/ALIGNMENT qualifier&<S 8 ANDoperatorAND operatorgS"--8 Architecture instructions,commonArchitecture instructions, common'S8 ARGSARGS5S N8 argumentsarguments7S N9 parametersparameters/S 9 ArgumentArgument/SN8 actualactualHSN8 determininglengthdetermining length/SN8 formalformal9S N8 inamacroin a macro6S N9 numberofnumber ofWS%%8 ArithmeticshiftoperatorArithmetic shift operatorDS9 .ASCIC directive.ASCIC directiveHS9 .ASCID directive.ASCID directive DS8 .ASCII directive.ASCII directive^S++8 ASCIIstringstorage directiveASCII string storage directiveDSN8 counted(.ASCIC)counted (.ASCIC)BSN8 string(.ASCII)string (.ASCII)YS&&N9 string descriptor(.ASCID)string descriptor (.ASCID) TS##N9 zero-terminated(.ASCIZ)zero-terminated (.ASCIZ) DS8 .ASCIZ directive.ASCIZ directive LS8 Assembler directivesAssembler directivesJS8 Assembler,invokingAssembler, invokingpS&228 Assembly termination directive(.END)Assembly termination directive (.END)PS9 Assignment statementAssignment statementFS9 Automatic alignmentAutomatic alignment9S N8 controllingcontrollingcS ++N8 default command-line qualifiersdefault command-line qualifiers]M**2 Automatic alignment directivesAutomatic alignment directives<MN3 SeeTableB-2See Table B- 2QS$$8 Automaticdata alignmentAutomatic data alignmentKSN8 label addressesandlabel addresses and!i  iBBFS8 .BASE directive.BASE directive'>S9 BaseregisterBase registerDSN9 definingaddressdefining addressdS ,,8 Baseregister directive(.BASE)Base register directive (.BASE)'RS  8 $BEGIN_EPILOGUEmacro$BEGIN_EPILOGUE macroPS!!8 .BEGIN_EXACT directive.BEGIN_EXACT directive;KS8 BinarylistingfileBinary listing fileBS9 BinaryoperatorBinary operatorBS9 .BLKA directive.BLKA directiveBS8 .BLKD directive.BLKD directiveBS8 .BLKF directive.BLKF directiveBS8 .BLKG directive.BLKG directiveBS8 .BLKL directive.BLKL directiveBS9 .BLKO directive.BLKO directiveBS9 .BLKQ directive.BLKQ directiveBS8 .BLKS directive.BLKS directiveBS9 .BLKT directive.BLKT directiveBS8 .BLKW directive.BLKW directiveUS,8 .BLK T8x8 directive.BLK x directiveDS-L68 Blockstorage allocation directive(.BLK a8x 8 )Block storage allocation directive (.BLK x )DBS8 .BYTE directive.BYTE directiveNbS++9 Bytestorage directive(.BYTE)Byte storage directive (.BYTE)N!i  iCC)S8 $CALL$CALLSS##N8 callingsystemservicescalling system servicesFS 8 $CALLmacro$CALL macroLSN8 instructionsequenceinstruction sequenceOS##9 CallingsystemservicesCalling system services:S N9 using$CALLusing $CALLNS""8 Calling-standardmacrosCalling-standard macrosKSN8 effectsonassemblyeffects on assembly:S8 CharactersetCharacter setKSN8 insource statementin source statementZS''N9 insource statement(tab.)in source statement (tab.)@S8 CharacterstringCharacter stringHSN8 determininglengthdetermining length>S9 $CODE$symbol$CODE$ symbol`VS""9 .CODE_ADDRESS directive.CODE_ADDRESS directiveUJS8 $CODE_SECTIONmacro$CODE_SECTION macro8S 8 Colon( : )Colon ( : )ASN8 inlabelfieldin label field{BS8 CommentfieldComment fieldpFS9 Common architectureCommon architecture;S N9 instructionsinstructions1SN8 opcodesopcodes9S8 CompatibilityCompatibilityASN8 withVAXMACROwith VAX MACRO3HS8 Complex expressionComplex expressionjS%119 Conditionalassemblyblock directiveConditional assembly block directive-SN9 .ELSE.ELSE|-SN8 .ENDC.ENDC)S  N8 .IF.IFOS##8 Created temporarylabelCreated temporary label-SN8 rangerange-SN8 usingusing<S 8 $CSsymbol$CS symbolx`US$$9 CurrentlocationcounterCurrent location counter !i  iDD<S8 Data alignmentData alignmentHSN8 natural boundariesnatural boundaries8S 8 DataStorageData Storage7S N8 ALIGN_DATAALIGN_DATAFS9 Data structuresData structuresi<S N9 linkagepairlinkage pairLSN8 procedure descriptorprocedure descriptorBSN8 signatureblocksignature block>S8 $DATA$symbol$DATA$ symbol`JS8 $DATA_SECTIONmacro$DATA_SECTION macroLS""9 DateandtimelexicalDate and time lexical-SN9 %TIME%TIMEDS9 /DEBUG qualifier/DEBUG qualifier*ZS&&9 Decodablepseudo-operationsDecodable pseudo-operations|<S8 DefaultvaluesDefault values-SN8 usingusing?V38 Definefloatingpointregistersymbol#- directive(.DEFINE_FREG)Define floating point register symbol directive (.DEFINE_FREG)c8N68 Defineintegerregistersymbol directive- (.DEFINE_IREG)Define integer register symbol directive (.DEFINE_IREG)lFS9 /DEFINE qualifier/DEFINE qualifier.PS!!9 .DEFINE_FREG directive.DEFINE_FREG directivecPS!!8 .DEFINE_IREG directive.DEFINE_IREG directivel1S 8 DelimiterDelimiterBSN8 stringargumentstring argumentNS  8 /DIAGNOSTIC qualifier/DIAGNOSTIC qualifier:5S 9 DifferencesDifferencesASN9 fromVAXMACROfrom VAX MACRO3_S''8 Direct assignment statementDirect assignment statement;S 8 DirectivesDirectives<S N8 as operatorsas operatorsISN8 forauto alignmentfor auto alignmentNSN8 general assemblergeneral assembler5SN8 macromacro1F29 Disable assembler functions directive- (.DISABLE)Disable assembler functions directive (.DISABLE)vHS9 .DISABLE directive.DISABLE directivev]S**8 Displaying diagnosticmessagesDisplaying diagnostic messages4S N8 withLSEwith LSE2SS%%8 DisplayingerrormessagesDisplaying error messages4S N8 withLSEwith LSE2FS9 .DOUBLE directive.DOUBLE directive\/D19 Double-precisionIEEE directive(.T_- FLOATING)Double-precision IEEE directive (.T_ FLOATING)7<S 8 $DPsymbol$DP symbolx`<S 8 $DSsymbol$DS symbolx`DS8 .DSABL directive.DSABL directivevRS  8 .D_FLOATING directive.D_FLOATING directive\!i  iEE>S9 %EDITlexical%EDIT lexicalBUS&&9 Element extractionlexicalElement extraction lexical3S N8 %ELEMENT%ELEMENTMDS9 %ELEMENTlexical%ELEMENT lexicalMBS8 .ELSE directive.ELSE directive|DS8 .ENABL directive.ENABL directiveYS&&8 Enable assembler functionsEnable assembler functionsFS8 .ENABLE directive.ENABLE directive*?/9 End conditionalassembly directive- (.END)End conditional assembly directive (.END)@S9 .END directive.END directivesS'448 Endmacro definition directive(.ENDM)End macro definition directive (.ENDM)BS8 .ENDC directive.ENDC directiveBS8 .ENDM directive.ENDM directiveBS8 .ENDR directive.ENDR directiveNS9 $END_EPILOGUEmacro$END_EPILOGUE macroLS9 .END_EXACT directive.END_EXACT directiveNS8 $END_PROLOGUEmacro$END_PROLOGUE macroHS8 $END_ROUTINEmacro$END_ROUTINE macroPS!!8 /ENVIRONMENT qualifier/ENVIRONMENT qualifier=NS8 EpiloguesequenceEpilogue sequence+5S N9 beginningbeginningDS8 .ERROR directive.ERROR directive@S9 ErrormessagesError messagesnBS9 .EVEN directive.EVEN directiveOS##8 Exact instructionblockExact instruction blockTS##N8 beginning(.BEGIN_EXACT)beginning (.BEGIN_EXACT);JSN8 ending (.END_EXACT)ending (.END_EXACT)OS!!8 ExclusiveORoperatorExclusive OR operator7S 9 ExpressionExpression3S N9 absoluteabsolute1SN8 complexcomplex>SN8 evaluationofevaluation of3S N8 externalexternal/SN8 globalglobal=S N9 relocatablerelocatableKSN9 unary operatorsforunary operators forJS8 .EXTERNAL directive.EXTERNAL directiveJS8 External expressionExternal expressionBS8 ExternalsymbolExternal symbolTcS ++N8 attribute directive (.EXTERNAL)attribute directive (.EXTERNAL)7S N8 definingdefiningDS8 %EXTRACTlexical%EXTRACT lexicalVDS9 .EXTRN directive.EXTRN directive!i  iFF\S((8 F-PcontrolregisterformatF-P control register formatz+S8 FieldsFields5SN8 commentcommentp1SN8 labellabelpw5SN9 operandoperandp7S N9 operatoroperatorp~DS8 .FLOAT directive.FLOAT directivegS$//8 Floating-point arithmetic directiveFloating-point arithmetic directive9S N8 .S_FLOATING.S_FLOATING9S N8 .T_FLOATING.T_FLOATING7qS'229 Floating-point constants (.D_FLOATING)Floating-point constants (.D_FLOATING)\JS  9 Floating-pointnumberFloating-point number;S N8 arithmeticarithmetic7BSN9 data structuresdata structuresi/SN8 formatformat9S N8 .F_FLOATING.F_FLOATING9S N8 .G_FLOATING.G_FLOATINGKSN8 insource statementin source statement1SN8 storagestorage\5SN9 storingstoring9S N9 .S_FLOATING.S_FLOATING9S N8 .T_FLOATING.T_FLOATING7nS'338 Floating-pointregisternumberlexicalFloating-point register number lexical-SN8 %FREG%FREG_aS!,,8 Floating-pointstorage directiveFloating-point storage directive9S N9 .D_FLOATING.D_FLOATING\9S N9 .F_FLOATING.F_FLOATING9S N8 .G_FLOATING.G_FLOATINGBS8 FormalargumentFormal argument>S8 %FREGlexical%FREG lexical_LS8 FUNC_RETURNargumentFUNC_RETURN argumentRS  8 .F_FLOATING directive.F_FLOATING directive!i  iGG]S((9 General assembler directivesGeneral assembler directivesFS9 Global expressionGlobal expression<S 8 GloballabelGlobal label|BS8 GlobalsymbolGlobal symbolT3S N8 definingdefiningRS  8 .G_FLOATING directive.G_FLOATING directive!i  jIIDS9 .IDENT directive.IDENT directivegS"--8 Identification directive(.IDENT)Identification directive (.IDENT)>S8 .IF directive.IF directiveJS8 .IF_FALSE directive.IF_FALSE directiveHS8 .IF_TRUE directive.IF_TRUE directiveTS##9 .IF_TRUE_FALSE directive.IF_TRUE_FALSE directiveUS,9 .IF_ :9xp9 directive.IF_ x directive@S8 .IIF directive.IIF directive6L18 Immediate conditionalassemblyblock- directive(.IIF)Immediate conditional assembly block directive (.IIF)HS8 .INCLUDE directive.INCLUDE directiveOS!!8 InclusiveORoperatorInclusive OR operator}S,998 Indefiniterepeatargument directive(.IRP)Indefinite repeat argument directive (.IRP).C28 Indefiniterepeat character directive- (.IRPC)Indefinite repeat character directive (.IRPC)!/S 9 InliningInlining/SN9 manualmanual);S N8 optimizationoptimization&NS  8 Instruction directiveInstruction directive TS!!8 .INSTRUCTION directive.INSTRUCTION directive YS&&8 Instructionformats(fig.)Instruction formats (fig.)k]S((9 InstructionoperandnotationInstruction operand notationraS**9 Instruction qualifiernotationInstruction qualifier notationxFS8 InstructionsummaryInstruction summaryBSN8 OpenVMSPALcodeOpenVMS PALcode7S 8 InstructionsInstructions<S N8 as operatorsas operatorsJSN9 common architecturecommon architecture-S9 IntegerIntegerBSN9 data structuresdata structuresiKSN9 insource statementin source statement@S8 IntegerdivisionInteger division3S N8 longwordlongword3S N8 quadwordquadwordDS8 %INTEGERlexical%INTEGER lexicalf`S ,,9 IntegerregisternumberlexicalInteger register number lexical-SN9 %IREG%IREGmHS8 Invoking assemblerInvoking assembler>S8 %IREGlexical%IREG lexicalm@S8 .IRP directive.IRP directiveBS8 .IRPC directive.IRPC directive!!i  jKKDS9 KeywordargumentKeyword argumentBS8 KINDargumentKIND argument|!i  iLL)S8 LabelLabelFSN8 created temporarycreated temporary/SN8 globalglobal|-SN8 locallocal|5S N8 temporarytemporary|TS!!N9 user-defined temporaryuser-defined temporaryBS9 Label addressesLabel addresses>S 8 LabelfieldLabel fieldpwIS8 Labelfield(tab.)Label field (tab.)qDS8 Labeling directiveLabeling directived/N8 .LOCAL_PROCEDURE_ DESCRIPTOR.LOCAL_PROCEDURE_ DESCRIPTORTMSN9 .PROCEDURE_DESCRIPTOR.PROCEDURE_DESCRIPTORUS&&9 Length DetermininglexicalLength Determining lexical1SN8 %LENGTH%LENGTHtBS8 %LENGTHlexical%LENGTH lexicalt^S))8 Lexicalescapeoperator(%%)Lexical escape operator (%%)2FS8 Lexical operatorsLexical operators/SN9 escapeescape2+SN9 listlist>7S N8 processingprocessingGSN8 summaryof(tab.)summary of (tab.)><S N8 syntaxrulessyntax rules-SN8 usingusing;US$$8 Lexical operators(tab.)Lexical operators (tab.)>OS!!8 LexicalstringsymbolLexical string symbol*ZS''N9 withquotedstringliteralwith quoted string literal*HS9 .LIBRARY directive.LIBRARY directive.HS8 /LIBRARY qualifier/LIBRARY qualifier@>S8 $LINK$symbol$LINK$ symbol`VS""8 .LINKAGE_PAIR directive.LINKAGE_PAIR directive9JS8 $LINKAGE_PAIRmacro$LINKAGE_PAIR macroPS!!9 $LINKAGE_SECTIONmacro$LINKAGE_SECTION macrogS"--9 Linking directive(.LINKAGE_PAIR)Linking directive (.LINKAGE_PAIR)9BS8 .LIST directive.LIST directive@BS8 /LIST qualifier/LIST qualifierDSS%%8 Listingcontrol directiveListing control directive/SN8 .IDENT.IDENT-SN9 .LIST.LIST@/SN9 .NLIST.NLIST1SN9 .NOSHOW.NOSHOWlS"..9 Listing directive(.SHOW,NOSHOW)Listing directive (.SHOW, NOSHOW)<S8 ListingformatListing format/SN8 binarybinaryXS&&8 ListingtableofcontentsListing table of contents26K,8 Localaddressstorage directive- (.LOCAL_CODE_ADDRESS)Local address storage directive (.LOCAL_CODE_ADDRESS)FDS9 LOCALargumentLOCAL argument:S 9 LocallabelLocal label|/SN8 savingsaving CS8 LocallabelblockLocal label block/SN8 endingending3S N8 startingstarting/D-9 Locallinking directive(.LOCAL_- LINKAGE_PAIR)Local linking directive (.LOCAL_ LINKAGE_PAIR)M<S 9 LocalsymbolLocal symbolbS((8 .LOCAL_CODE_ADDRESS directive.LOCAL_CODE_ADDRESS directiveFbS((8 .LOCAL_LINKAGE_PAIR directive.LOCAL_LINKAGE_PAIR directiveMz&8%8 .LOCAL_PROCEDURE_DESCRIPTOR- directive.LOCAL_PROCEDURE_DESCRIPTOR directiveTBS8 %LOCATElexical%LOCATE lexical{US&&8 Locationcontrol directiveLocation control directive/SN8 .ALIGN.ALIGN8SN9 .BLK 9x.BLK xD@S9 LocationcounterLocation counterYS&&N8 assigningbefore alignmentassigning before alignment/S N8 changingchangingaS++8 withEXEandNOMIX attributeswith EXE and NOMIX attributes_S**8 withEXEorNOMIX attributeswith EXE or NOMIX attributes1SN9 currentcurrent 1SN9 settingsetting,A18 Locationcounter alignment directive- (.ODD)Location counter alignment directive (.ODD)+@/8 Locationcountercontrol directive- (.EVEN)Location counter control directive (.EVEN)IM  2 LogicalANDoperatorLogical AND operatorAMN3 SeeANDoperatorSee AND operator\M**3 Logical exclusiveORoperatorLogical exclusive OR operatorTM&&N3 See ExclusiveORoperatorSee Exclusive OR operator\M**3 Logical inclusiveORoperatorLogical inclusive OR operatorTM&&N2 See InclusiveORoperatorSee Inclusive OR operatorFS8 .LONG directive.LONG directive\jS#//8 Longwordstorage directive(.LONG)Longword storage directive (.LONG)Z<S8 Loop unrollingLoop unrolling/SN9 manualmanual';S N9 optimizationoptimization&+@)N8 with schedulingandpeephole optimizationswith scheduling and peephole optimizations(:S 9 LSargumentLS argument@S 8 $LSsymbol$LS symbolx`%S  8 LSELSEaS**N8 displaying diagnosticmessagesdisplaying diagnostic messages2WS%%N8 displayingerrormessagesdisplaying error messages22H#N9 replicatingOpenVMSVAX% operatingsystembehaviorreplicating OpenVMS VAX operating system behavior0KSN9 usingwithMACRO-64using with MACRO-64-!i  iMMRS""8 /MACHINE_CODE qualifier/MACHINE_CODE qualifierHBS8 Macro argumentsMacro arguments/SN8 actualactual/SN9 ARGSARGSBSN9 ARGS parametersARGS parameters;S N8 concatenatedconcatenated5S N8 delimiteddelimited/SN8 formalformal9S N8 FUNC_RETURNFUNC_RETURN1SN9 keywordkeyword/SN8 KINDKIND|1SN9 LOCALLOCAL'S  N9 LSLS-SN8 NAMESNAMES9S N8 NONSTANDARDNONSTANDARD7S N8 positionalpositional-S  N8 RlsRls1SN9 RSA_ENDRSA_ENDx7S N9 RSA_OFFSETRSA_OFFSETx7S N8 SAVED_REGSSAVED_REGS?S N8 SCRATCH_REGSSCRATCH_REGS;S N8 SET_ARG_INFOSET_ARG_INFOASN8 SIGNATURE_BLOCKSIGNATURE_BLOCK/SN9 SIZESIZExGSN9 STACK_RETURN_VALUESTACK_RETURN_VALUEESN8 STANDARD_PROLOGUESTANDARD_PROLOGUE/SN8 stringstring)S  N8 TIETIECSN8 USES_VAX_ARGLISTUSES_VAX_ARGLIST`S**8 Macrocall directive(.MCALL)Macro call directive (.MCALL)x:S 8 MacrocallsMacro calls<S N9 as operatorsas operators/SN9 nestednestedlKSN8 numberof argumentsnumber of argumentsUS$$8 MACROcommand qualifiersMACRO command qualifiers$LSN8 /ALIGNMENT qualifier/ALIGNMENT qualifier&/SN8 /DEBUG/DEBUG*1SN9 /DEFINE/DEFINE.9S N9 /DIAGNOSTIC/DIAGNOSTIC:;S N8 /ENVIRONMENT/ENVIRONMENT=3S N8 /LIBRARY/LIBRARY@-SN8 /LIST/LISTD=SN8 /MACHINE_CODE/MACHINE_CODEH/SN9 /NAMES/NAMESJ1SN9 /OBJECT/OBJECTN5S N8 /OPTIMIZE/OPTIMIZERGSN9 /PREPROCESSOR_ONLY/PREPROCESSOR_ONLYW-SN8 /SHOW/SHOWe5S N8 /WARNINGS/WARNINGSiDS8 Macro definitionMacro definition>SN8 defaultvaluedefault value/SN8 endingending:S N9 labelinginlabeling inlS$008 Macro definition directive(.MACRO)Macro definition directive (.MACRO)clS$008 Macrodeletion directive (.MDELETE)Macro deletion directive (.MDELETE)BS8 MACRO directiveMACRO directiveDS8 .MACRO directive.MACRO directivec`S**8 Macroexit directive(.MEXIT)Macro exit directive (.MEXIT)BS9 Macro expansionMacro expansion3S N9 printingprinting9S N8 terminatingterminatingjS#//8 Macroinclude directive (.INCLUDE)Macro include directive (.INCLUDE)jS#//8 Macrolibrary directive (.LIBRARY)Macro library directive (.LIBRARY).<S 8 MacronameMacro name+A+8 MACRO-64 AssemblerforOpenVMS- AXPSystemsMACRO-64 Assembler for OpenVMS AXP Systems;S N8 introductionintroductionBS9 MACRO-64featuresMACRO-64 featuresBSN9 notinVAXMACROnot in VAX MACROBS8 .BASE directive.BASE directive8BS8 .ELSE directive.ELSE directive;<S 8 $OPDEFmacro$OPDEF macroIBSN8 notinVAXMACROnot in VAX MACRO]S((9 additionallexical operatorsadditional lexical operators@US$$9 automaticdata alignmentautomatic data alignmentGPS!!8 .BEGIN_EXACT directive.BEGIN_EXACT directiveMRS""8 .CODE_ADDRESS directive.CODE_ADDRESS directive;LS8 .END_EXACT directive.END_EXACT directiveMHS8 .INCLUDE directive.INCLUDE directive=PS!!9 .INSTRUCTION directive.INSTRUCTION directiveLSS##9 lexicalescapeoperatorlexical escape operatorBQS""8 lexicalstringsymbolslexical string symbolsA_S))8 lexical substitutionoperatorlexical substitution operatorCRS""8 .LINKAGE_PAIR directive.LINKAGE_PAIR directive:f08 .LOCAL_CODE_ADDRESS7 directive.LOCAL_CODE_ADDRESS directive;f08 .LOCAL_LINKAGE_PAIR7 directive.LOCAL_LINKAGE_PAIR directive:y':8 .LOCAL_PROCEDURE_7 DESCRIPTOR directive.LOCAL_PROCEDURE_ DESCRIPTOR directive9BS9 MACRO64$symbolMACRO64$ symbolFNS  9 /[NO]DEFINE qualifier/[NO]DEFINE qualifierN=S8 optimizationsoptimizationsHWS%%8 optionalcase sensitivityoptional case sensitiviP_ P_ty?JS8 preprocessoroutputpreprocessor outputOj 28 .PROCEDURE_DESCRIPTOR7 directive.PROCEDURE_DESCRIPTOR directive9SS##9 registersymbolchangesregister symbol changesQVS$$9 value-of-operatorchangesvalue-of-operator changesD]S**8 Macro-definedregistersymbolsMacro-defined register symbols+SN8 listlistu/S8 MacrosMacrosYS&&N8 $CALL instructionsequence$CALL instruction sequenceDSN9 callingroutinescalling routinesISN9 definingaroutinedefining a routineBSN9 endingroutinesending routinesjMS  N9 forcallingroutinesfor calling routinesjQS  N8 inepiloguesectionsin epilogue sectionsQS  N8 inprologuesectionsin prologue sections~ASN8 insourcecodein source codeFSN8 MACRO-64suppliedMACRO-64 suppliedeWS%%N9 MACRO-64suppliedlibraryMACRO-64 supplied librarydOS!!N9 makingmultiplecallsmaking multiple calls3SN8 nestednestedlVS%%N8 passingnumericvaluetopassing numeric value to5S N8 recursiverecursivel7S N8 redefiningredefininglx&:)N9 replacing predefinedregister symbolsreplacing predefined register symbols3S N9 suppliedsuppliedLSN8 switchingpsectsswitching psectspq<S N8 syntaxrulessyntax rulesu#:*N8 withsamenameasAlphaAXP opcodewith same name as Alpha AXP opcodelWS%%N8 with user-definedsymbolswith user-defined symbolsBSN8 withinroutineswithin routineshDS8 .MCALL directive.MCALL directivexHS8 .MDELETE directive.MDELETE directive+S9 MemoryMemory5S N9 accessingaccessingSS%%8 Messagedisplay directiveMessage display directive/SN8 .ERROR.ERROR/SN8 .PRINT.PRINT*?.8 Messagewarningdisplay directive- (.WARN)Message warning display directive (.WARN)M/S 9 MessagesMessages/SN9 errorserrorsnDS8 .MEXIT directive.MEXIT directive1S 8 MigrationMigration8N&N8 alternativestousingVAX( instruction-generatingmacrosalternatives to using VAX instruction-generating macroscS ++N8 avoiding misleading diagnosticsavoiding misleading diagnostics,A%N9 avoidingVAX instruction- generatingmacrosavoiding VAX instruction- generating macros!i  iNN@S8 NAMESargumentNAMES argumentDS9 /NAMES qualifier/NAMES qualifierJBS8 .NARG directive.NARG directiveBS8 .NCHR directive.NCHR directiveDS8 .NLIST directive.NLIST directiveLS8 NONSTANDARDargumentNONSTANDARD argumentJS9 .NOSHOW directive.NOSHOW directive+S9 NumberNumberCd-N3 SeealsoInteger,Floating-point' number,andPackeddecimal stringSee also Integer, Floating-point number, and Packed decimal stringKSN8 insource statementin source statementqS&338 Numberof arguments directive(.NARG)Number of arguments directive (.NARG)sS'448 Numberof characters directive(.NCHR)Number of characters directive (.NCHR)[S''8 Numeric complementoperatorNumeric complement operator<S9 NumericsymbolNumeric symbolZS''N9 withlexicalstringsymbolwith lexical string symbol-BS8 NumericsymbolsNumeric symbols(!i  iOO:S8 ObjectmoduleObject module9S N8 identifyingidentifying/SN9 namingnaming>-SN8 titletitle>FS9 /OBJECT qualifier/OBJECT qualifierN[S))9 Obtaining informationlexicalObtaining information lexical-SN8 %TYPE%TYPESS%%8 ObtainingregisternumberObtaining register numberPS!!N8 floating-point(%FREG)floating-point (%FREG)_BSN8 integer(%IREG)integer (%IREG)mFS9 .OCTA directive.OCTA directivejS#//9 Octawordstorage directive(.OCTA)Octaword storage directive (.OCTA)@S8 .ODD directive.ODD directive@S8 One's complementOne's complement>SN8 of expressionof expression+S8 OpcodeOpcodeJSN9 common architecturecommon architecture7S N9 redefiningredefininglcS--N8 withthesamenameasamacrowith the same name as a macrol<S 8 $OPDEFmacro$OPDEF macrolS$008 OpenVMSPALcode instructionsummaryOpenVMS PALcode instruction summary1S8 OperandOperandLSN8 instructionnotationinstruction notationrBS8 OperandfieldOperand fieldpESN9 usingsymbolsinusing symbols in3S 9 OperatorOperator)S  N8 ANDANDDSN8 arithmeticshiftarithmetic shift/SN8 binarybinary7S N8 complementcomplement<S N9 exclusiveORexclusive OR<S N9 inclusiveORinclusive OR>SN8 radixcontrolradix control-SN8 unaryunaryDS8 OperatorfieldOperator fieldp~ESN8 usingsymbolsinusing symbols in;S 8 OptimizationOptimizationUS$$N9 automaticcode alignmentautomatic code alignmentUS$$N9 automaticdata alignmentautomatic data alignment9S N9 controllingcontrollingcS ++N9 default command-line qualifiersdefault command-line qualifiers3S N8 inlininginlining&@SN8 loop unrollingloop unrolling&7S N8 peepholingpeepholing7S N8 schedulingschedulingBSN9 viewingresultsviewing results*JS9 /OPTIMIZE qualifier/OPTIMIZE qualifierRBS8 OTS$DIV_IroutineOTS$DIV_I routinenS%11N8 performinglongwordintegerdivisionperforming longword integer divisionBS8 OTS$DIV_LroutineOTS$DIV_L routinenS%11N8 performingquadwordintegerdivisionperforming quadword integer division!i  jPPOS!!9 PackeddecimalstringPacked decimal stringFS8 .PACKED directive.PACKED directive>S8 .PACKEDmacro.PACKED macro jS#//8 Packedstorage directive (.PACKED)Packed storage directive (.PACKED)BS8 .PAGE directive.PAGE directivedS ,,8 Pageejection directive(.PAGE)Page ejection directive (.PAGE)4S 8 Period(.)Period (.)US$$N9 currentlocationcountercurrent location counter DS9 PermanentsymbolPermanent symbolFS8 PermanentsymbolsPermanent symbolsHS8 PortabilityissuesPortability issues3JS8 PositionalargumentPositional argumentHS8 PredefinedsymbolsPredefined symbols\S''9 /PREPROCESSOR_ONLY qualifier/PREPROCESSOR_ONLY qualifierWDS9 .PRINT directive.PRINT directivefS **8 .PROCEDURE_DESCRIPTOR directive.PROCEDURE_DESCRIPTOR directiveZS&&8 $PROCEDURE_DESCRIPTORmacro$PROCEDURE_DESCRIPTOR macro>S8 ProgramsectionProgram section7S N8 attributesattributes+SN9 codecodel+SN9 datadatal3S N8 definingdefining1S N8 directivedirective/S8 .PSECT.PSECT?S8 .RESTORE_PSECT.RESTORE_PSECT9S 8 .SAVE_PSECT.SAVE_PSECT 1SN8 linkagelinkagel+SN9 namenameMS  N9 restoringcontextofrestoring context ofGSN8 savingcontextofsaving context of ISN8 savinglocallabelsaving local label FS8 ProgramminghintsProgramming hintsDSN8 exampleprogramsexample programsJS9 ProloguesequencePrologue sequence/SN9 endingending1S 8 ProloguesProloguesASN8 entryandexitentry and exitDS8 .PSECT directive.PSECT directiveAS8 Pseudo-operationsPseudo-operations5S N9 decodabledecodable|!i  iQQFS8 .QUAD directive.QUAD directivejS#//9 Quadwordstorage directive(.QUAD)Quadword storage directive (.QUAD)KS!!8 QuotedstringliteralQuoted string literalZS''N8 withlexicalstringsymbolwith lexical string symbol*!i  iRRSS##8 Radixcontrol operatorsRadix control operatorsQS$$9 Range extractionlexicalRange extraction lexical3S N9 %EXTRACT%EXTRACTVBS8 RegisternameRegister name@S8 RegistersymbolsRegister symbols@SN8 definitionsofdefinitions ofu=SN8 macro-definedmacro-defineduCSN8 usinginmacrosusing in macros<S9 RegisterusageRegister usage9S N9 conventionsconventionslPS!!8 Relocatable expressionRelocatable expression8S 8 RepeatblockRepeat blockNS  N8 argument substitutionargument substitutionPS!!N8 character substitutioncharacter substitution!PS!!N8 terminating repetitionterminating repetitionfS!--8 Repeatblock directive (.REPEAT)Repeat block directive (.REPEAT)FS9 .REPEAT directive.REPEAT directiveBS9 %REPEATlexical%REPEAT lexicalkS#008 Repeatrangeend directive(.ENDR)Repeat range end directive (.ENDR)BS8 .REPT directive.REPT directiveLS8 $RESET_LP_LISTmacro$RESET_LP_LIST macro"HS8 .RESTORE directive.RESTORE directiveTS##9 .RESTORE_PSECT directive.RESTORE_PSECT directiveBS9 $RETURNmacro$RETURN macro)@S 8 RlsargumentRls argumentDS8 $ROUTINEmacro$ROUTINE macro~07S N8 qualifiersqualifiers43S 8 RoutinesRoutines<MN3 SeeTableB-1See Table B- 19S N9 bound-framebound-frameRS##N9 definingtypebymacrodefining type by macro{7S N8 null-framenull-frame9S N8 performanceperformance?SN8 register-frameregister-frame9S N8 stack-framestack-frameFS8 $RSA_ENDsymbol$RSA_END symbolx`PS8 $RSA_OFFSETsymbol$RSA_OFFSET symbolx`!i  jSSBS9 .SAVE directive.SAVE directive JS8 SAVED_REGSargumentSAVED_REGS argumentNS  8 .SAVE_PSECT directive.SAVE_PSECT directive DS8 .SBTTL directive.SBTTL directive0RS  8 SCRATCH_REGSargumentSCRATCH_REGS argumentNS  9 SET_ARG_INFOargumentSET_ARG_INFO argument@S9 ShiftoperatorShift operatorBS8 .SHOW directive.SHOW directiveBS8 /SHOW qualifier/SHOW qualifiereTS##8 SIGNATURE_BLOCKargumentSIGNATURE_BLOCK argument+A28 Signedbytedata directive (.SIGNED_- BYTE)Signed byte data directive (.SIGNED_ BYTE)".D59 Signedwordstorage directive (.SIGNED_- WORD)Signed word storage directive (.SIGNED_ WORD))PS!!9 .SIGNED_BYTE directive.SIGNED_BYTE directive"TS!!9 .SIGNED_WORD directive.SIGNED_WORD directive)_S ++9 Single-precisionIEEE directiveSingle-precision IEEE directive9S N8 .S_FLOATING.S_FLOATINGDS 8 $SIZEsymbol$SIZE symbolx`@S8 Source statementSource statementESN8 charactersetincharacter set in/SN9 formatformatlESN9 rulesforcodingrules for codingtPS!!8 $STACK_ARG_SIZEsymbol$STACK_ARG_SIZE symbolzZS&&8 STACK_RETURN_VALUEargumentSTACK_RETURN_VALUE argumentXS%%8 STANDARD_PROLOGUEargumentSTANDARD_PROLOGUE argument3S 8 StatementsStatements>SN9 charactersetcharacter set1SN9 commentcommentBSN8 continuationofcontinuation ofs-SN8 fieldfieldo/SN8 formatformatl-SN8 labellabelw1SN8 operandoperand3S N8 operatoroperator~ESN8 rulesforcodingrules for codingt-SN9 typestypesDS9 String argumentsString argumentsMS""8 StringeditinglexicalString editing lexical-SN8 %EDIT%EDITBBS8 %STRINGlexical%STRING lexicalOS##8 StringlocatinglexicalString locating lexical1SN9 %LOCATE%LOCATE{QS$$9 String repeatinglexicalString repeating lexical1SN8 %REPEAT%REPEAT-S8 StringsStringsWS%%N8 date/timelexical(%TIME)date/time lexical (%TIME)]S((N8 determininglength (%LENGTH)determining length (%LENGTH)tSS##N9 editinglexical(%EDIT)editing lexical (%EDIT)BaS**N9 extractingelements (%ELEMENT)extracting elements (%ELEMENT)M[S''N8 extractingrange (%EXTRACT)extracting range (%EXTRACT)VYS&&N9 locatinglexical (%LOCATE)locating lexical (%LOCATE){x&:)N8 obtaining informationlexical (%TYPE)obtaining information lexical (%TYPE)hS"..N8 obtainingvaluelexical (%STRING)obtaining value lexical (%STRING)[S''N8 repeatinglexical (%REPEAT)repeating lexical (%REPEAT)pS(448 Subconditionalassemblyblock directiveSubconditional assembly block directive5S N9 .IF_FALSE.IF_FALSE3S N9 .IF_TRUE.IF_TRUE?SN8 .IF_TRUE_FALSE.IF_TRUE_FALSEJS8 .SUBTITLE directive.SUBTITLE directive0/D/8 Subtitlelistingcontrol directive- (.SUBTITLE)Subtitle listing control directive (.SUBTITLE)0jS#//8 Symbol attribute directive(.WEAK)Symbol attribute directive (.WEAK)T1S9 SymbolsSymbolsESN9 definedby$CALLdefined by $CALLzKSN8 definedby$ROUTINEdefined by $ROUTINEwSS##N8 definingregisternamesdefining register namesSS##N8 deletingregisternamesdeleting register namesMS  N8 determiningvalueofdetermining value of7S N9 externalexternalT3SN8 globalglobalTESN9 inoperandfieldin operand fieldGSN9 inoperatorfieldin operator field-SN8 locallocal<S N8 macronamemacro name9S N8 permanentpermanent7S N8 predefinedpredefinedBSN9 registernameregister name5S N9 undefinedundefined?S N8 user-defineduser-definedRS  8 .S_FLOATING directive.S_FLOATING directive!i  iTT2S 8 TabstopsTab stopsKSN9 insource statementin source statementqBS9 TemporarylabelTemporary label|;S N8 user-defineduser-definedTS$$8 TerminMACRO statementTerm in MACRO statement<S 8 TIEargumentTIE argument>S8 %TIMElexical%TIME lexicalDS8 .TITLE directive.TITLE directive>wS)668 Titlelistingcontrol directive(.TITLE)Title listing control directive (.TITLE)>>S9 %TYPElexical%TYPE lexicalRS  9 .T_FLOATING directive.T_FLOATING directive7!i  iUUBS8 Unary operatorsUnary operators3H/8 Undefineregistersymbol directive- (.UNDEFINE_REG)Undefine register symbol directive (.UNDEFINE_REG)FRS""8 .UNDEFINE_REG directive.UNDEFINE_REG directiveF[S))9 User-definedregistersymbolsUser-defined register symbols6S N9 inmacrosin macrosPS8 User-definedsymbolsUser-defined symbols]S((8 User-defined temporarylabelUser-defined temporary label-SN8 rangerangeVS$$8 USES_VAX_ARGLISTargumentUSES_VAX_ARGLIST argument!i  iVVQS$$9 Value conversionlexicalValue conversion lexical3S N8 %INTEGER%INTEGERfOS##9 Value obtaininglexicalValue obtaining lexical1SN9 %STRING%STRING+S8 ValuesValuesNS  N8 converting (%INTEGER)converting (%INTEGER)f1SN8 defaultdefaultES8 VAXMACROfeaturesVAX MACRO featuresCSN9 notinMACRO-64not in MACRO-64Sl 4!9 argumentsto.DISABLE7 directivearguments to .DISABLE directive_bS++8 argumentsto.ENABLE directivearguments to .ENABLE directive_-C&8 count specifiersondata-7 storage directivescount specifiers on data- storage directives[DS8 .CROSS directive.CROSS directive\DS8 .DEBUG directive.DEBUG directive]HS9 .DEFAULT directive.DEFAULT directive^YS&&9 .END directive differences.END directive differencesa[S''8 .ENDM directive differences.ENDM directive differencesm[S''8 .ENDR directive differences.ENDR directive differencesmDS8 .ENTRY directive.ENTRY directivebNS  8 EXE/NOEXE restrictionEXE/NOEXE restrictionUFS8 .GLOBAL directive.GLOBAL directivecNS  8 .H_FLOATING directive.H_FLOATING directivedBS9 .LINK directive.LINK directiveeBS9 .MASK directive.MASK directivefHS8 .NOCROSS directive.NOCROSS directive\DS8 .NTYPE directive.NTYPE directivegDS8 .OPDEF directive.OPDEF directiveh~)='8 overlappingand replacement7 initializersoverlapping and replacement initializersWq"7$9 PAGEargumentto.ALIGN7 directivePAGE argument to .ALIGN directiveZ]S((9 .PSECT directive differences.PSECT directive differencesiOS!!8 radixunary operatorsradix unary operatorsXDS8 .REFn directives.REFn directivesjQS""8 registermaskoperatorregister mask operatorYaS**8 .RESTORE directive differences.RESTORE directive differenceskfS!--9 settingcurrentlocationcountersetting current location counterVJS9 .TRANSFER directive.TRANSFER directivel!i  iWWBS8 .WARN directive.WARN directiveMJS8 /WARNINGS qualifier/WARNINGS qualifieriBS8 .WEAK directive.WEAK directiveTFS8 .WORD directive.WORD directive\bS++8 Wordstorage directive(.WORD)Word storage directive (.WORD)\-  >OVAXDIR,,The assemblerisignoringoneormore9(VAXMACRO directivesoroptions.- Assembler7 continues processingwiththenextline.Informational:3KThe assemblerdetectedandignoreda,uVAXMACRO directiveoroption.UserAction:3RemovetheVAXMACRO directivesfrom?hyourMACRO-64 AssemblerforOpenVMSAXPSystemsprogram. ! ?O VMACELSE,-Youcannotspecify.ELSEinthesame@(.IFblockwitheither .IF_FALSE(.IFF),.IF_TRUE/(.IFT),or.IF_TRUE_FALSE(.IFTF).Error:;The assembler encounteredan.ELSE directiveFuwithinthesame.IFblockasan .IF_FALSE, .IF_TRUE,#or .IF_FALSE directive.hUserAction:8hCheckyoursourcecodeandremoveeither;the.ELSE directiveorthe.IF_x directive.! 8O WRONGMACID,-Macronamein.ENDMdoesnot'(match corresponding.MACRO.Error:BThemacronameyou specifiedastheoptionalar-Hgumenttothe.ENDM directivedoesnotmatchthenameFuyou specifiedwiththe corresponding.MACRO directive.UserAction:1Checkyoursoucecodeformatching)h .MACRO/.ENDM directivepairs.9?OWRONGPL,,Thecodeaddressyouspecifywiththe7(.PROCEDURE_DESCRIPTOR directivemustoccurCBEFOREits definitionasalocalorgloballabel.Error:@Thecodeaddressyouspecifyasthesecondar-;ugumenttothe.PROCEDURE_DESCRIPTOR directiveJmustoccurbeforeits definitionasa nontemporarylabelF&definedinapsectwiththeEXEorNOMIX attribute.UserAction:$Checkyoursourcecode.Q#~T'O F."MACRO-64!Listing!FormatAOThisappendixcontainsasampleMACRO-64program,!O comprisedofExamples F-1 QandF-2,#thatshowsthelistingOBfileformat.BExampleF-31Bshowsthe resultingoutputfilein"Obinarylistingformat.*?*?*ONMOFormore informationaboutcontrolofthelistingfileandNOits contents,seethe descriptionofthe.SHOW directiveinO5Chapter5.*OlOm 1GEachpageofthelistingbeginswithatwo-linepageMheader.)Fromlefttoright,thefirstheaderlinecontains"Tthe followingsfields:! }J1.:Themodulenameas specifiedwiththefirstargument%Y(tothe.TITLE directive.K2.:Themodule'stitleas specifiedwiththesecondargu-+Ymenttothe.TITLE directive.63.:Thedateandtimeofthe assembly.B4.:TheMACRO-64identificationandversionstring. ~5.:Thepagenumber.*gJbFromlefttoright,thesecondheaderlinecontainsthe followingsfields: dHYbThemoduleidentificationstring,as specifiedwiththeY.IDENT directive.~TEYbThe subtitle,as specifiedwiththe .SUBTITLEdirec-Ytive.`{66YbThedateandtimeofthesourcefile.*! 6&+YbThesourcefilespecification. 2REachsourcelineisshowninthelistingtotherightofitsK:listinglinenumber.)ThelistinglinenumberisshowninKdecimalradix.)Itstartsatoneand incrementsforeveryJsourcelineandeverymacrolibrarylinewhetherornot<Dthatlineisactuallyshowninthelisting. 3CThe.SHOW directivecontrolsthetypesofinforma-Ftionshowninthelisting.*TheINCLUDEoptioncausesDtMACRO-64toshowincludefiles(filesthatarein-Icludedwiththe.INCLUDE directive)inthelisting.)The:% CONDITIONALSoptioncausesMACRO-64toshowM~blocksofcodeinthelistingthathavebeen conditionallyAexcludedfromthe assembly.)The EXPANSIONSoptionF/causesMACRO-64toshowmacro expansionlinesinthelisting.'SeeoChapter52for additional informationaboutthe.SHOW directive. _4@_Thisfieldshowsthe include-filenestinglevel. 5CWithlonglines,MACRO-64showsasmany charactersL7ascanfitwithinthe 132-columnlistingwidth.' AdditionalI charactersareshownononeormore continuationlines,2 beginninginthesourcetextfield. h6@hMACRO-64shows diagnosticmessagesin associationOwiththesourcecodethatcausedthe diagnostic.'Ifthedi-E agnosticoccursinamacro expansion,MACRO-64showsHq theprimary diagnosticcitationin associationwiththeG macro invocation statement.)In addition,iftheBINARYD" or EXPANSIONSlistingoptionisineffect,MACRO-64J{ showsa secondary diagnosticcitationin associationwithJ themacro expansion statementthatcausedthe diagnostic, , asshownincallout , 8 , . 7E Thisfieldshowsthemacro invocationnestinglevel. + 8&+ As describedwithcallout + 6%+ ,MACRO-64showsasec-I ondary diagnosticcitationin associationwithmacroex-D pansionlinesthatcause diagnostics.)MACRO-64showsH4 theprimary diagnosticcitationin associationwiththe' macro invocation statement. 9D MACRO-64 indicateslinesthathavebeenmodifiedby:elexical operatorsbyplacinganasterisk( q*e)inthisfield.GMACRO-64also indicatesmacrolibrarylinesbyplacing*theletterLinthisfield. 10DThis statementdisablesthe EXPANSIONSoption,whichAcausesMACRO-64tosuppressmacro expansionlinesFfromthelisting. 11HThisfieldshowsthecurrentpsectoffset.,The.PSECT,= .SAVE_PSECT,and.RESTORE_PSECT directivesshowNwthefull32-bitoffsetusingeight hexadecimaldigits.'WhileGMACRO-64 maintainsa32-bitpsectoffset,otherstate-L(mentsshowonlythe low-order16-bitsoftheoffsetusing$four hexadecimaldigits. 12GMACRO-64showsdatainitialvaluesthathavebeenre-JXplacedusingaseriesofXswherethedatavaluewould+ otherwisehavebeen displayed. 013E0MACRO-64showsdatainitialvaluesandotherassoci-Iatedvaluesintheleftmargin.)QuadworddataisshownEas16 hexadecimaldigits.,LongworddataisshownasF:eight hexadecimaldigits.,WorddataisshownasfourL hexadecimaldigits.)Bytedataisshownasapairofhex-Gadecimaldigits.-OctaworddataisshownasapairofDC quadwords.*MACRO-64places additionallinesintotheIlistingto accommodatethedisplayofdataintheleft marginas necessary. t14MtMACRO-64usesthesinglequote( ' )toindicatearelo-Fcatablevaluethatcannotbeboundatassemblytime. L15ELThis statementenablestheBINARYlistingoption.-ItFcausesMACRO-64toincludeinthelistingonlythoseGmacro expansionlinesthatproduceabinaryresultinCUtheobjectmodule..Othermacro expansionlinesareLnotincludedinthelisting.*Regularsourcelinesarenot affected. 16DWhilethe$ROUTINEmacroexpandstoseveralhundredGassembly statements,onlythosethatgenerateabinaryG7resultareshowninthelistingwhilethetheBINARY!optionisineffect. 17IThereisnowayforMACRO-64to correlatetheinstruc-Hgtions resultingfrom optimizationona one-to-onebasisDwithyoursource statements.)Instead,MACRO-64indi-Kcates instructionsthatcanbe transformedby optimization qby displayingthe" k}*q Optimized }*$!q"stringwherethein-F struction hexadecimalrepresentationwould otherwisebe0" displayed.)MACRO-64displaysthe" .*(" Optimized .*""stringK{onlyforthose sequencesof instructionswhere optimzationisenabled. S18HSThisistheMachineCodeListingsectionofthelist-Fing.- IdenticalinformattotheMachineCodeListingF sectionproducedbymanyof Digital'sotherAXPlan-K\ guage processors,itisusefulinviewingtheresultsof  optimization. 4!19E4!Thisfieldshowsa hexadecimalrepresentationofthe+! instructionordata directive. "20O "Thisfieldshowsthe low-order16bitsofthecurrentpsect,e"offsetusing hexadecimalradix. "21G"Thisfieldshowsamnemonicrepresentationofthein-)<# structionordata directive. #22N#Thisfieldshowsthelistinglinenumberthatis associatedM$withthe instructionordata directiveusingdecimalradix. $23H$Aftereachroutine,MACRO-64showstheroutinesizeinM$bytesusingdecimalradix;itshowsthestartingoffsetofCE%the routine'scodesectionusing hexadecimalradix. %24F%Attheendofthelisting,MACRO-64echoesthecom-1&mandlineusedtoinvoke MACRO-64.*oKlO*   !!!!!!!!!!!"##$$$$$$$$$$$$$%%%%%%%&&&''(''')''*+,-.///////////000000000111111111222222233333334444444555555566666666777777778888888999999::::::;::::::<<<<<<<=====>>>>?????@@@@@@@@@@@@@@@@@@@@@@AAAAAAABBBBCCCCCCDEEEEEEEEFFGGHHGIGJJJJJJJKKKKKKKKKKKKKLLLLLLLLMMMMMMMMMMNNNNNNNOOOOOOOPPPPPPPPPPPPPPPPPPPPQQQQQQQQQRRRRRRRRRRSSSSSSSTTTTTTTUUUUUUUVVVVVVVVVWWWWWWWWWWXXXXXXYYYYYYYYZZZZZ[[[[ZZZZZZZZZZZ\\\\\\\]]]]]^^^^^^_____`````aaaaaaaabbbbbcccccccdddddddeeeeeeefffffffggggggghgggggggggiiiiiiiiiiiiijjjjjjjjjjjkkkkkkklllllllmmmmmmmmmmmmmnnnnnnnnnnnnnooooooooooopppppppqqqqqqrrrrrrrsssssssttttttttuuuuuuuvvvvvvvvvvvvvvvvvvvvvwwwwwwwwxxxxxxxyyyyyyyyyyzzzzzzzzzz{{{{{{{{{{||||||}}}}}}~~~~~~~}PrefacePrefacePrefacePrefacePrefacePrefacePrefacePrefacePrefacePrefacePreface1. Introduction1.1 Language Features1.1 Language Features/1.1.1 Alpha AXP Native-Mode Instructions)1.1.2 Direct Assignment Statements!1.1.3 Assembler Directives!1.1.3 Assembler Directives+1.1.3.1 General Assembler Directives+1.1.3.1 General Assembler Directives1.1.3.2 Macro Directives/1.2 Invoking MACRO-64 on OpenVMS Systems/1.2 Invoking MACRO-64 on OpenVMS Systems/1.2 Invoking MACRO-64 on OpenVMS Systems/1.2 Invoking MACRO-64 on OpenVMS Systems/1.2 Invoking MACRO-64 on OpenVMS Systems/1.2 Invoking MACRO-64 on OpenVMS Systems$1.2.1 Command-Line Qualifiers$1.2.1 Command-Line Qualifiers$1.2.1 Command-Line Qualifiers$1.2.1 Command-Line Qualifiers$1.2.1 Command-Line Qualifiers$1.2.1 Command-Line Qualifiers$1.2.1 Command-Line Qualifiers$1.2.1 Command-Line Qualifiers$1.2.1 Command-Line Qualifiers$1.2.1 Command-Line Qualifiers$1.2.1 Command-Line Qualifiers$1.2.1 Command-Line Qualifiers$1.2.1 Command-Line Qualifiers$1.2.1 Command-Line Qualifiers$1.2.1 Command-Line Qualifiers$1.2.1 Command-Line Qualifiers$1.2.1 Command-Line Qualifiers$1.2.1 Command-Line Qualifiers$1.2.1 Command-Line Qualifiers$1.2.1 Command-Line Qualifiers$1.2.1 Command-Line Qualifiers$1.2.1 Command-Line Qualifiers$1.2.1 Command-Line Qualifiers$1.2.1 Command-Line Qualifiers$1.2.1 Command-Line Qualifiers$1.2.1 Command-Line Qualifiers$1.2.1 Command-Line Qualifiers$1.2.1 Command-Line Qualifiers$1.2.1 Command-Line Qualifiers$1.2.1 Command-Line Qualifiers$1.2.1 Command-Line Qualifiers$1.2.1 Command-Line Qualifiers$1.2.1 Command-Line Qualifiers$1.2.1 Command-Line Qualifiers$1.2.1 Command-Line Qualifiers$1.2.1 Command-Line Qualifiers$1.2.1 Command-Line Qualifiers$1.2.1 Command-Line Qualifiers$1.2.1 Command-Line Qualifiers$1.2.1 Command-Line Qualifiers$1.2.1 Command-Line Qualifiers$1.2.1 Command-Line Qualifiers$1.2.1 Command-Line Qualifiers$1.2.1 Command-Line Qualifiers$1.2.1 Command-Line Qualifiers$1.2.1 Command-Line Qualifiers$1.2.1 Command-Line Qualifiers$1.2.1 Command-Line Qualifiers$1.2.1 Command-Line Qualifiers$1.2.1 Command-Line Qualifiers$1.2.1 Command-Line Qualifiers$1.2.1 Command-Line Qualifiers$1.2.1 Command-Line Qualifiers$1.2.1 Command-Line Qualifiers$1.2.1 Command-Line Qualifiers$1.2.1 Command-Line Qualifiers$1.2.1 Command-Line Qualifiers$1.2.1 Command-Line Qualifiers$1.2.1 Command-Line Qualifiers$1.2.1 Command-Line Qualifiers$1.2.1 Command-Line Qualifiers$1.2.1 Command-Line Qualifiers$1.2.1 Command-Line Qualifiers$1.2.1 Command-Line Qualifiers$1.2.1 Command-Line Qualifiers$1.2.1 Command-Line Qualifiers$1.2.1 Command-Line Qualifiers$1.2.1 Command-Line Qualifiers$1.2.1 Command-Line Qualifiers$1.2.1 Command-Line Qualifiers$1.2.1 Command-Line Qualifiers$1.2.1 Command-Line Qualifiers22. Components of MACRO-64 Source Statements22. Components of MACRO-64 Source Statements22. Components of MACRO-64 Source Statements"2.1 Source Statement Format"2.1 Source Statement Format"2.1 Source Statement Format6Table 2- 1: Using Tab Stops in Statement Fields"2.1 Source Statement Format"2.1 Source Statement Format"2.1 Source Statement Format"2.1 Source Statement Format2.1.1 Label Field2.1.1 Label Field2.1.1 Label Field2.1.1 Label Field2.1.1 Label Field2.1.1 Label Field2.1.1 Label Field2.1.2 Operator Field2.1.2 Operator Field2.1.2 Operator Field2.1.2 Operator Field2.1.3 Operand Field2.1.3 Operand Field2.1.3 Operand Field2.1.3 Operand Field2.1.3 Operand Field2.1.3 Operand Field2.1.3 Operand Field2.1.4 Comment Field2.1.4 Comment Field2.1.4 Comment Field2.1.4 Comment Field2.2 Character Set2.2 Character Set2.2 Character SetATable 2- 2: Special Characters Used in MACRO-64 StatementsATable 2- 2: Special Characters Used in MACRO-64 Statements2.3 Numbers2.3.1 Integers2.3.1 Integers2.3.1 Integers2.3.1 Integers2.3.1 Integers2.3.1 Integers#2.3.2 Floating-Point Numbers#2.3.2 Floating-Point Numbers#2.3.2 Floating-Point Numbers#2.3.2 Floating-Point Numbers#2.3.2 Floating-Point Numbers#2.3.2 Floating-Point Numbers#2.3.2 Floating-Point Numbers2.4 Quoted Literals2.4 Quoted Literals2.4 Quoted Literals2.4 Quoted Literals2.4 Quoted Literals2.5 Symbols2.5.1 Permanent Symbols2.5.2 Predefined Symbols2.5.2 Predefined Symbols2.5.2 Predefined Symbols2.5.2 Predefined Symbols2.5.2 Predefined Symbols2.5.2 Predefined Symbols12.5.3 User-Defined Symbols and Macro Names12.5.3 User-Defined Symbols and Macro Names12.5.3 User-Defined Symbols and Macro Names12.5.3 User-Defined Symbols and Macro Names12.5.3 User-Defined Symbols and Macro Names12.5.3 User-Defined Symbols and Macro Names12.5.3 User-Defined Symbols and Macro Names&2.5.4 Determining Symbol Values22.5.4.1 Using Symbols in the Operator Field22.5.4.1 Using Symbols in the Operator Field22.5.4.1 Using Symbols in the Operator Field22.5.4.1 Using Symbols in the Operator Field12.5.4.2 Using Symbols in the Operand Field12.5.4.2 Using Symbols in the Operand Field12.5.4.2 Using Symbols in the Operand Field12.5.4.2 Using Symbols in the Operand Field12.5.4.2 Using Symbols in the Operand Field12.5.4.2 Using Symbols in the Operand Field12.5.4.2 Using Symbols in the Operand Field.2.6 Temporary Labels Within Source Code.2.6 Temporary Labels Within Source Code.2.6 Temporary Labels Within Source Code.2.6 Temporary Labels Within Source Code.2.6 Temporary Labels Within Source Code.2.6 Temporary Labels Within Source Code.2.6 Temporary Labels Within Source Code.2.6 Temporary Labels Within Source Code.2.6 Temporary Labels Within Source Code.2.6 Temporary Labels Within Source Code.2.6 Temporary Labels Within Source Code.2.6 Temporary Labels Within Source Code.2.6 Temporary Labels Within Source Code.2.6 Temporary Labels Within Source Code2.7 Label Addresses>2.7.1 Label Addresses, Optimization, and Code Alignment>2.7.1 Label Addresses, Optimization, and Code Alignment>2.7.1 Label Addresses, Optimization, and Code Alignment>2.7.1 Label Addresses, Optimization, and Code Alignment92.7.2 Label Addresses and Automatic Data Alignment92.7.2 Label Addresses and Automatic Data Alignment92.7.2 Label Addresses and Automatic Data Alignment92.7.2 Label Addresses and Automatic Data Alignment92.7.2 Label Addresses and Automatic Data Alignment92.7.2 Label Addresses and Automatic Data Alignment92.7.2 Label Addresses and Automatic Data Alignment92.7.2 Label Addresses and Automatic Data Alignment 2.8 Terms and Expressions 2.8 Terms and Expressions 2.8 Terms and Expressions 2.8 Terms and Expressions 2.8 Terms and Expressions 2.8 Terms and Expressions 2.8 Terms and Expressions 2.8 Terms and Expressions 2.8 Terms and Expressions 2.8 Terms and Expressions 2.8 Terms and Expressions 2.8 Terms and Expressions 2.8 Terms and Expressions 2.8 Terms and Expressions 2.8 Terms and Expressions 2.8 Terms and Expressions 2.8 Terms and Expressions 2.8 Terms and Expressions 2.8 Terms and Expressions 2.8 Terms and Expressions 2.8 Terms and Expressions 2.8 Terms and Expressions42.9 Unary Operators for Terms and Expressions-Table 2- 3: Summary of Unary Operators$2.9.1 Radix Control Operators$2.9.1 Radix Control Operators$2.9.1 Radix Control Operators$2.9.1 Radix Control Operators$2.9.1 Radix Control Operators(2.9.2 Numeric Complement Operator(2.9.2 Numeric Complement Operator(2.9.2 Numeric Complement Operator2.10 Binary Operators.Table 2- 4: Summary of Binary Operators2.10 Binary Operators2.10 Binary Operators2.10 Binary Operators'2.10.1 Arithmetic Shift Operator"2.10.2 Logical AND Operator+2.10.3 Logical Inclusive OR Operator+2.10.4 Logical Exclusive OR Operator(2.11 Direct Assignment Statements(2.11 Direct Assignment Statements(2.11 Direct Assignment Statements(2.11 Direct Assignment Statements(2.11 Direct Assignment Statements(2.11 Direct Assignment Statements(2.11 Direct Assignment Statements(2.11 Direct Assignment Statements(2.11 Direct Assignment Statements$2.12 Current Location Counter$2.12 Current Location Counter$2.12 Current Location Counter$2.12 Current Location Counter$2.12 Current Location Counter$2.12 Current Location Counter$2.12 Current Location Counter$2.12 Current Location Counter$2.12 Current Location Counter$2.12 Current Location Counter$2.12 Current Location Counter$3. MACRO-64 Lexical Operators,3.1 Processing with Lexical Operators,3.1 Processing with Lexical Operators"3.2 Lexical Operator Syntax"3.2 Lexical Operator Syntax"3.2 Lexical Operator Syntax"3.2 Lexical Operator Syntax"3.2 Lexical Operator Syntax"3.2 Lexical Operator Syntax"3.2 Lexical Operator Syntax"3.2 Lexical Operator Syntax"3.2 Lexical Operator Syntax"3.2 Lexical Operator Syntax"3.2 Lexical Operator Syntax"3.2 Lexical Operator Syntax"3.2 Lexical Operator Syntax53.3 Numeric Symbols and Lexical String Symbols53.3 Numeric Symbols and Lexical String Symbols53.3 Numeric Symbols and Lexical String Symbols53.3 Numeric Symbols and Lexical String Symbols53.3 Numeric Symbols and Lexical String Symbols53.3 Numeric Symbols and Lexical String Symbols53.3 Numeric Symbols and Lexical String Symbols(3.4 Lexical Substitution Operator(3.4 Lexical Substitution Operator(3.4 Lexical Substitution Operator"3.5 Lexical Escape Operator"3.5 Lexical Escape OperatorCExample 3- 1: Lexical Processing Without the Escape Operator"3.5 Lexical Escape Operator"3.5 Lexical Escape Operator"3.5 Lexical Escape Operator<Example 3- 2: Lexical Processing with Escape Operator"3.5 Lexical Escape Operator"3.5 Lexical Escape Operator"3.6 Using Lexical Operators,Example 3- 3: Using Lexical Operators<Example 3- 4: Source Statements After Macro Expansion3.7 Lexical Operators/Table 3- 1: Summary of MACRO-64 Lexicals %EDIT %EDIT %EDIT %EDIT %EDIT %EDIT %EDIT %EDIT %EDIT %EDIT %EDIT%ELEMENT%ELEMENT%ELEMENT%ELEMENT%ELEMENT%ELEMENT%ELEMENT%ELEMENT%ELEMENT%EXTRACT%EXTRACT%EXTRACT%EXTRACT%EXTRACT%EXTRACT%EXTRACT%EXTRACT%EXTRACT %FREG %FREG %FREG %FREG %FREG %FREG %FREG%INTEGER%INTEGER%INTEGER%INTEGER%INTEGER%INTEGER%INTEGER %IREG %IREG %IREG %IREG %IREG %IREG %IREG%LENGTH%LENGTH%LENGTH%LENGTH%LENGTH%LENGTH%LENGTH%LOCATE%LOCATE%LOCATE%LOCATE%LOCATE%LOCATE%LOCATE%LOCATE%REPEAT%REPEAT%REPEAT%REPEAT%REPEAT%REPEAT%REPEAT%REPEAT%STRING%STRING%STRING%STRING%STRING%STRING%STRING %TIME %TIME %TIME %TIME %TIME %TIME %TYPE %TYPE %TYPE %TYPE %TYPE %TYPE#Table 3- 2: %TYPE Attributes %TYPE %TYPE %TYPE %TYPE %TYPE %TYPE4. Macro Arguments4. Macro Arguments4. Macro Arguments4. Macro Arguments4. Macro Arguments4. Macro Arguments4. Macro Arguments 4.1 Using Macro Arguments 4.1 Using Macro Arguments 4.1 Using Macro Arguments 4.1 Using Macro Arguments 4.1 Using Macro Arguments4.2 Using Default Values4.2 Using Default Values4.2 Using Default Values4.2 Using Default Values"4.3 Using Keyword Arguments"4.3 Using Keyword Arguments"4.3 Using Keyword Arguments"4.3 Using Keyword Arguments"4.3 Using Keyword Arguments!4.4 Using String Arguments!4.4 Using String Arguments!4.4 Using String Arguments!4.4 Using String Arguments!4.4 Using String Arguments!4.4 Using String Arguments!4.4 Using String Arguments!4.4 Using String Arguments!4.4 Using String Arguments!4.4 Using String Arguments!4.4 Using String Arguments!4.4 Using String Arguments!4.4 Using String Arguments!4.4 Using String Arguments!4.4 Using String Arguments!4.4 Using String Arguments!4.4 Using String Arguments!4.4 Using String Arguments!4.4 Using String Arguments!4.4 Using String Arguments!4.4 Using String Arguments!4.4 Using String Arguments!4.5 Argument Concatenation!4.5 Argument Concatenation!4.5 Argument Concatenation!4.5 Argument Concatenation!4.5 Argument Concatenation!4.5 Argument Concatenation!4.5 Argument Concatenation,4.6 Passing Numeric Values of Symbols,4.6 Passing Numeric Values of Symbols,4.6 Passing Numeric Values of Symbols,4.6 Passing Numeric Values of Symbols)4.7 Using Created Temporary Labels)4.7 Using Created Temporary Labels)4.7 Using Created Temporary Labels)4.7 Using Created Temporary Labels)4.7 Using Created Temporary Labels)4.7 Using Created Temporary Labels'5. MACRO-64 Assembler Directives5.1 Program Sections5.1 Program Sections5.1 Program Sections5.1 Program Sections5.1 Program Sections5.1 Program Sections5.1 Program Sections5.1 Program Sections#5.2 Automatic Data Alignment#5.2 Automatic Data Alignment5.3 Directives5.3 Directives:Table 5- 1: Summary of General Assembler Directives:Table 5- 1: Summary of General Assembler Directives5.3 Directives.Table 5- 2: Summary of Macro Directives5.3 Directives.ADDRESS.ADDRESS.ADDRESS.ADDRESS.ADDRESS.ADDRESS.ADDRESS .ALIGN .ALIGN .ALIGN .ALIGN .ALIGN .ALIGN .ALIGN .ALIGN .ALIGN .ALIGN .ALIGN .ALIGN .ALIGN .ASCIC .ASCIC .ASCIC .ASCIC .ASCIC .ASCIC .ASCIC .ASCIC .ASCID .ASCID .ASCID .ASCID .ASCID .ASCID .ASCID .ASCID .ASCID .ASCID .ASCII .ASCII .ASCII .ASCII .ASCII .ASCII .ASCII .ASCIZ .ASCIZ .ASCIZ .ASCIZ .ASCIZ .ASCIZ .ASCIZ .BASE .BASE .BASE .BASE .BASE .BASE .BASE .BASE .BASE .BASE .BASE .BASE .BASE .BASE .BASE .BASE .BASE .BASE .BASE .BASE.BEGIN_EXACT.BEGIN_EXACT.BEGIN_EXACT.BEGIN_EXACT.BEGIN_EXACT.BEGIN_EXACT.BEGIN_EXACT.BEGIN_EXACT.BEGIN_EXACT .BLK x .BLK x .BLK x .BLK x .BLK x .BLK x .BLK x .BLK x .BLK x .BLK x .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE.CODE_ADDRESS.CODE_ADDRESS.CODE_ADDRESS.CODE_ADDRESS.CODE_ADDRESS.CODE_ADDRESS.CODE_ADDRESS.D_FLOATING.D_FLOATING.D_FLOATING.D_FLOATING.D_FLOATING.D_FLOATING.D_FLOATING.DEFINE_FREG.DEFINE_FREG.DEFINE_FREG.DEFINE_FREG.DEFINE_FREG.DEFINE_FREG.DEFINE_FREG.DEFINE_FREG.DEFINE_FREG.DEFINE_IREG.DEFINE_IREG.DEFINE_IREG.DEFINE_IREG.DEFINE_IREG.DEFINE_IREG.DEFINE_IREG.DEFINE_IREG.DEFINE_IREG.DEFINE_IREG.DISABLE.DISABLE.DISABLE.DISABLE.DISABLE.DISABLE .ELSE .ELSE .ELSE .ELSE .ELSE .ELSE .ELSE .ELSE.ENABLE.ENABLE.ENABLE.ENABLE.ENABLE:Table 5- 3: .ENABLE and .DISABLE Symbolic Arguments:Table 5- 3: .ENABLE and .DISABLE Symbolic Arguments:Table 5- 3: .ENABLE and .DISABLE Symbolic Arguments:Table 5- 3: .ENABLE and .DISABLE Symbolic Arguments.ENABLE.ENABLE.ENABLE.ENABLE.ENABLE.ENABLE.ENABLE.ENABLE.ENABLE.ENABLE.ENABLE .END .END .END .END .END .END .END .ENDC .ENDC .ENDC .ENDC .ENDC .ENDM .ENDM .ENDM .ENDM .ENDM .ENDM .ENDR .ENDR .ENDR .ENDR .ENDR.END_EXACT.END_EXACT.END_EXACT.END_EXACT.END_EXACT .ERROR .ERROR .ERROR .ERROR .ERROR .ERROR .ERROR .ERROR .EVEN .EVEN .EVEN .EVEN .EVEN.EXTERNAL.EXTERNAL.EXTERNAL.EXTERNAL.EXTERNAL.EXTERNAL.EXTERNAL.F_FLOATING.F_FLOATING.F_FLOATING.F_FLOATING.F_FLOATING.F_FLOATING.F_FLOATING.G_FLOATING.G_FLOATING.G_FLOATING.G_FLOATING.G_FLOATING.G_FLOATING.G_FLOATING .IDENT .IDENT .IDENT .IDENT .IDENT .IDENT .IDENT .IF .IF .IF .IF .IF .IF .IFFTable 5- 4: Condition Tests for Conditional Assembly Directives .IF .IF .IF .IF .IF .IF .IF .IF .IF .IF_x .IF_x .IF_x .IF_x .IF_x .IF_x .IF_x .IF_x .IF_x .IF_x .IF_x .IF_x .IF_x .IIF .IIF .IIF .IIF .IIF .IIF .IIF .IIF .IIF .IIF .IIF.INCLUDE.INCLUDE.INCLUDE.INCLUDE.INCLUDE.INCLUDE.INCLUDE.INSTRUCTION.INSTRUCTION.INSTRUCTION.INSTRUCTION.INSTRUCTION.INSTRUCTION.INSTRUCTION .IRP .IRP .IRP .IRP .IRP .IRP .IRP .IRP .IRP .IRP .IRP .IRP .IRP .IRPC .IRPC .IRPC .IRPC .IRPC .IRPC .IRPC .IRPC .IRPC .IRPC .IRPC .IRPC .IRPC.LIBRARY.LIBRARY.LIBRARY.LIBRARY.LIBRARY.LIBRARY.LIBRARY.LIBRARY.LIBRARY.LIBRARY.LIBRARY.LINKAGE_PAIR.LINKAGE_PAIR.LINKAGE_PAIR.LINKAGE_PAIR.LINKAGE_PAIR.LINKAGE_PAIR.LINKAGE_PAIR .LIST .LIST .LIST .LIST .LIST .LIST.LOCAL_CODE_ADDRESS.LOCAL_CODE_ADDRESS.LOCAL_CODE_ADDRESS.LOCAL_CODE_ADDRESS.LOCAL_CODE_ADDRESS.LOCAL_CODE_ADDRESS.LOCAL_CODE_ADDRESS.LOCAL_LINKAGE_PAIR.LOCAL_LINKAGE_PAIR.LOCAL_LINKAGE_PAIR.LOCAL_LINKAGE_PAIR.LOCAL_LINKAGE_PAIR.LOCAL_LINKAGE_PAIR.LOCAL_LINKAGE_PAIR".LOCAL_PROCEDURE_DESCRIPTOR".LOCAL_PROCEDURE_DESCRIPTOR".LOCAL_PROCEDURE_DESCRIPTOR".LOCAL_PROCEDURE_DESCRIPTOR".LOCAL_PROCEDURE_DESCRIPTOR".LOCAL_PROCEDURE_DESCRIPTOR".LOCAL_PROCEDURE_DESCRIPTOR".LOCAL_PROCEDURE_DESCRIPTOR .LONG .LONG .LONG .LONG .LONG .LONG .LONG .MACRO .MACRO .MACRO .MACRO .MACRO .MACRO .MACRO .MACRO .MACRO .MACRO .MACRO .MACRO .MACRO .MACRO .MACRO .MACRO .MACRO .MACRO .MACRO .MACRO .MACRO .MCALL .MCALL .MCALL .MCALL .MCALL .MCALL .MCALL .MCALL.MDELETE.MDELETE.MDELETE.MDELETE.MDELETE.MDELETE.MDELETE .MEXIT .MEXIT .MEXIT .MEXIT .MEXIT .MEXIT .MEXIT .MEXIT .MEXIT .MEXIT .NARG .NARG .NARG .NARG .NARG .NARG .NARG .NARG .NARG .NARG .NCHR .NCHR .NCHR .NCHR .NCHR .NCHR .NCHR .NCHR .NCHR .NCHR .NLIST .NLIST .NLIST .NLIST .NLIST .NLIST.NOSHOW.NOSHOW.NOSHOW.NOSHOW.NOSHOW.NOSHOW .OCTA .OCTA .OCTA .OCTA .OCTA .OCTA .OCTA .ODD .ODD .ODD .ODD .ODD.PACKED.PACKED.PACKED.PACKED.PACKED .PAGE .PAGE .PAGE .PAGE .PAGE .PAGE .PRINT .PRINT .PRINT .PRINT .PRINT .PRINT .PRINT.PROCEDURE_DESCRIPTOR.PROCEDURE_DESCRIPTOR.PROCEDURE_DESCRIPTOR.PROCEDURE_DESCRIPTOR.PROCEDURE_DESCRIPTOR.PROCEDURE_DESCRIPTOR.PROCEDURE_DESCRIPTOR .PSECT .PSECT .PSECT .PSECT .PSECT .PSECT .PSECT-Table 5- 5: Program Section Attributes-Table 5- 5: Program Section Attributes-Table 5- 5: Program Section Attributes5Table 5- 6: Default Program Section Attributes .PSECT .PSECT .PSECT .PSECT .PSECT .PSECT .PSECT .PSECT .PSECT .QUAD .QUAD .QUAD .QUAD .QUAD .QUAD .QUAD.REPEAT.REPEAT.REPEAT.REPEAT.REPEAT.REPEAT.REPEAT.REPEAT.REPEAT.REPEAT.REPEAT.REPEAT.REPEAT.REPEAT.REPEAT.REPEAT.REPEAT.REPEAT.REPEAT.RESTORE_PSECT.RESTORE_PSECT.RESTORE_PSECT.RESTORE_PSECT.RESTORE_PSECT.RESTORE_PSECT.SAVE_PSECT.SAVE_PSECT.SAVE_PSECT.SAVE_PSECT.SAVE_PSECT.SAVE_PSECT.SAVE_PSECT.S_FLOATING.S_FLOATING.S_FLOATING.S_FLOATING.S_FLOATING.S_FLOATING.S_FLOATING .SHOW .SHOW .SHOW .SHOW .SHOW7Table 5- 7: .SHOW and .NOSHOW Symbolic Arguments .SHOW .SHOW .SHOW .SHOW.SIGNED_BYTE.SIGNED_BYTE.SIGNED_BYTE.SIGNED_BYTE.SIGNED_BYTE.SIGNED_BYTE.SIGNED_BYTE.SIGNED_WORD.SIGNED_WORD.SIGNED_WORD.SIGNED_WORD.SIGNED_WORD.SIGNED_WORD.SIGNED_WORD.SUBTITLE.SUBTITLE.SUBTITLE.SUBTITLE.SUBTITLE.SUBTITLE.SUBTITLE.T_FLOATING.T_FLOATING.T_FLOATING.T_FLOATING.T_FLOATING.T_FLOATING.T_FLOATING .TITLE .TITLE .TITLE .TITLE .TITLE .TITLE .TITLE .TITLE.UNDEFINE_REG.UNDEFINE_REG.UNDEFINE_REG.UNDEFINE_REG.UNDEFINE_REG.UNDEFINE_REG.UNDEFINE_REG .WARN .WARN .WARN .WARN .WARN .WARN .WARN .WEAK .WEAK .WEAK .WEAK .WEAK .WEAK .WEAK .WEAK .WORD .WORD .WORD .WORD .WORD .WORD .WORD"6. MACRO-64 Supplied Macros"6. MACRO-64 Supplied Macros$6.1 MACRO-64 Supplied Library$6.1 MACRO-64 Supplied Library$6.1 MACRO-64 Supplied Library$6.1 MACRO-64 Supplied Library$6.1 MACRO-64 Supplied Library%6.2 Routines and Lexical Scope%6.2 Routines and Lexical Scope%6.2 Routines and Lexical Scope*6.2.1 Routines and Program Sections*6.2.1 Routines and Program Sections*6.2.1 Routines and Program Sections*6.2.1 Routines and Program Sections*6.2.1 Routines and Program Sections36.3 Using Macros to Control Program Sections&6.3.1 Defining Program Sections&6.3.1 Defining Program Sections&6.3.1 Defining Program Sections&6.3.1 Defining Program Sections(6.3.2 Using Macro-Defined Symbols(6.3.2 Using Macro-Defined Symbols(6.3.2 Using Macro-Defined Symbols(6.3.2 Using Macro-Defined Symbols(6.3.2 Using Macro-Defined Symbols(6.3.2 Using Macro-Defined Symbols$6.3.3 Defining Procedure Type$6.3.3 Defining Procedure Type$6.3.3 Defining Procedure Type.6.3.4 Using Macros in Prologue Sections.6.3.4 Using Macros in Prologue Sections.6.3.4 Using Macros in Prologue Sections.6.3.5 Using Macros in Epilogue Sections.6.3.5 Using Macros in Epilogue Sections56.4 Programming Examples Using Supplied Macros2Example 6- 1: Program Using Supplied Macros56.4 Programming Examples Using Supplied Macros 6.5 Using the $CALL Macro 6.5 Using the $CALL Macro 6.5 Using the $CALL Macro 6.5 Using the $CALL Macro 6.5 Using the $CALL Macro 6.5 Using the $CALL Macro'6.5.1 Using $CALL in Source Code(Example 6- 2: Program Using $CALL'6.5.1 Using $CALL in Source Code%6.6 Programming Considerations86.6.1 Making Multiple Calls From the Same Routine86.6.1 Making Multiple Calls From the Same Routine86.6.1 Making Multiple Calls From the Same Routine 6.6.2 Nonstandard Linkage!6.6.3 Routine Restrictions!6.6.3 Routine Restrictions.6.7 Macro Descriptions and Syntax Rules.6.7 Macro Descriptions and Syntax Rules.6.7 Macro Descriptions and Syntax Rules$BEGIN_EPILOGUE$BEGIN_EPILOGUE$BEGIN_EPILOGUE$BEGIN_EPILOGUE$BEGIN_EPILOGUE$BEGIN_EPILOGUE$BEGIN_EPILOGUE$BEGIN_EPILOGUE $CALL $CALL $CALL $CALL $CALL $CALL $CALL $CALL $CALL $CALL $CALL!Table 6- 1: ARGS Arguments $CALL $CALL $CALL $CALL $CALL $CALL $CALL $CALL $CALL $CALL $CALL $CALL $CALL $CALL $CALL $CALL $CALL $CALL$CODE_SECTION$CODE_SECTION$CODE_SECTION$CODE_SECTION$CODE_SECTION$CODE_SECTION$DATA_SECTION$DATA_SECTION$DATA_SECTION$DATA_SECTION$DATA_SECTION$DATA_SECTION$END_EPILOGUE$END_EPILOGUE$END_EPILOGUE$END_EPILOGUE$END_EPILOGUE$END_EPILOGUE$END_EPILOGUE$END_EPILOGUE$END_PROLOGUE$END_PROLOGUE$END_PROLOGUE$END_PROLOGUE$END_PROLOGUE$END_PROLOGUE$END_PROLOGUE$END_ROUTINE$END_ROUTINE$END_ROUTINE$END_ROUTINE$END_ROUTINE$END_ROUTINE$END_ROUTINE$LINKAGE_PAIR$LINKAGE_PAIR$LINKAGE_PAIR$LINKAGE_PAIR$LINKAGE_PAIR$LINKAGE_PAIR$LINKAGE_PAIR$LINKAGE_PAIR$LINKAGE_PAIR$LINKAGE_SECTION$LINKAGE_SECTION$LINKAGE_SECTION$LINKAGE_SECTION$LINKAGE_SECTION$LINKAGE_SECTION $OPDEF $OPDEF $OPDEF $OPDEF $OPDEF $OPDEF $OPDEF $OPDEF $OPDEF $OPDEF $OPDEF $OPDEF $OPDEF $OPDEF $OPDEF $OPDEF $OPDEF $OPDEF $OPDEF $OPDEF $OPDEF $OPDEF $OPDEF $OPDEF $OPDEF $OPDEF $OPDEF $OPDEF $OPDEF.PACKED.PACKED.PACKED.PACKED.PACKED.PACKED.PACKED.PACKED.PACKED.PACKED.PACKED.PACKED.PACKED.PACKED$PROCEDURE_DESCRIPTOR$PROCEDURE_DESCRIPTOR$PROCEDURE_DESCRIPTOR$PROCEDURE_DESCRIPTOR$PROCEDURE_DESCRIPTOR$PROCEDURE_DESCRIPTOR$PROCEDURE_DESCRIPTOR$RESET_LP_LIST$RESET_LP_LIST$RESET_LP_LIST$RESET_LP_LIST$RESET_LP_LIST$RESET_LP_LIST$RESET_LP_LIST$RETURN$RETURN$RETURN$RETURN$RETURN$RETURN$RETURN$ROUTINE$ROUTINE$ROUTINE$ROUTINE$ROUTINE$ROUTINE$ROUTINE$ROUTINE$ROUTINE$ROUTINE$ROUTINE$ROUTINE$ROUTINE$ROUTINE$ROUTINE$ROUTINE$ROUTINE$ROUTINE$ROUTINE$ROUTINE$ROUTINE$ROUTINE$ROUTINE$ROUTINE$ROUTINE$ROUTINE$ROUTINE$ROUTINE$ROUTINE$ROUTINE$ROUTINE$ROUTINE$ROUTINE$ROUTINE$ROUTINE$ROUTINE$ROUTINE$ROUTINE$ROUTINE$ROUTINE$ROUTINE$ROUTINE$ROUTINE$ROUTINE$ROUTINE$ROUTINE$ROUTINE$ROUTINE$ROUTINE$ROUTINE$ROUTINE$ROUTINE$ROUTINE$ROUTINE$ROUTINE9A. MACRO-64 Alpha AXP Architecture Quick Reference9A. MACRO-64 Alpha AXP Architecture Quick Reference9A. MACRO-64 Alpha AXP Architecture Quick Reference#Figure A- 1: Data Structures'Figure A- 2: Instruction Formats%A.1 Register Usage Conventions=Table A- 1: Register Usage Conventions for OpenVMS AXP=Table A- 1: Register Usage Conventions for OpenVMS AXP=Table A- 1: Register Usage Conventions for OpenVMS AXP=Table A- 1: Register Usage Conventions for OpenVMS AXP=Table A- 1: Register Usage Conventions for OpenVMS AXP'A.2 Instruction Operand Notation/Table A- 2: Instruction Operand Notation/Table A- 2: Instruction Operand Notation/Table A- 2: Instruction Operand Notation/Table A- 2: Instruction Operand Notation/Table A- 2: Instruction Operand Notation)A.3 Instruction Qualifier Notation1Table A- 3: Instruction Qualifier Notation-A.4 F-P Control Register (FPCR) Format5Table A- 4: F-P Control Register (FPCR) Format&A.5 Decodable Pseudo-Operations.Table A- 5: Decodable Pseudo-Operations.Table A- 5: Decodable Pseudo-Operations.Table A- 5: Decodable Pseudo-Operations.Table A- 5: Decodable Pseudo-Operations.Table A- 5: Decodable Pseudo-Operations9A.6 Common Architecture Opcodes in Numerical OrderATable A- 6: Common Architecture Opcodes in Numerical OrderATable A- 6: Common Architecture Opcodes in Numerical OrderATable A- 6: Common Architecture Opcodes in Numerical OrderATable A- 6: Commjn^ n^on Architecture Opcodes in Numerical OrderATable A- 6: Common Architecture Opcodes in Numerical OrderATable A- 6: Common Architecture Opcodes in Numerical OrderATable A- 6: Common Architecture Opcodes in Numerical OrderATable A- 6: Common Architecture Opcodes in Numerical OrderATable A- 6: Common Architecture Opcodes in Numerical OrderATable A- 6: Common Architecture Opcodes in Numerical OrderATable A- 6: Common Architecture Opcodes in Numerical Order.A.7 OpenVMS PALcode Instruction Summary<Table A- 7: OpenVMS Unprivileged PALcode Instructions<Table A- 7: OpenVMS Unprivileged PALcode Instructions<Table A- 7: OpenVMS Unprivileged PALcode Instructions<Table A- 7: OpenVMS Unprivileged PALcode Instructions<Table A- 7: OpenVMS Unprivileged PALcode Instructions:Table A- 8: OpenVMS Privileged PALcode Instructions:Table A- 8: OpenVMS Privileged PALcode Instructions:Table A- 8: OpenVMS Privileged PALcode Instructions:Table A- 8: OpenVMS Privileged PALcode Instructions:Table A- 8: OpenVMS Privileged PALcode Instructions-A.8 PALcode Opcodes in Numerical Order5Table A- 9: PALcode Opcodes in Numerical Order5Table A- 9: PALcode Opcodes in Numerical Order5Table A- 9: PALcode Opcodes in Numerical Order5Table A- 9: PALcode Opcodes in Numerical Order5Table A- 9: PALcode Opcodes in Numerical Order5Table A- 9: PALcode Opcodes in Numerical Order5Table A- 9: PALcode Opcodes in Numerical Order+A.9 Common Architecture Instructions4Table A- 10: Common Architecture Instructions4Table A- 10: Common Architecture Instructions4Table A- 10: Common Architecture Instructions4Table A- 10: Common Architecture Instructions4Table A- 10: Common Architecture Instructions4Table A- 10: Common Architecture Instructions4Table A- 10: Common Architecture Instructions4Table A- 10: Common Architecture Instructions4Table A- 10: Common Architecture Instructions4Table A- 10: Common Architecture Instructions4Table A- 10: Common Architecture Instructions4Table A- 10: Common Architecture Instructions4Table A- 10: Common Architecture Instructions4Table A- 10: Common Architecture Instructions4Table A- 10: Common Architecture Instructions4Table A- 10: Common Architecture Instructions4Table A- 10: Common Architecture Instructions4Table A- 10: Common Architecture Instructions#B. Programming with MACRO-64#B. Programming with MACRO-64#B. Programming with MACRO-64#B. Programming with MACRO-64%B.1 MACRO-64 Programming Hints%B.1 MACRO-64 Programming Hints%B.1 MACRO-64 Programming Hints)B.1.1 STARLET.MLB Migration Macros)B.1.1 STARLET.MLB Migration Macros)B.1.1 STARLET.MLB Migration Macros)B.1.1 STARLET.MLB Migration Macros)B.1.1 STARLET.MLB Migration MacrosB.1.2 Integer Division5B.1.3 User-Defined Register Symbols and Macros'B.2 The OpenVMS Calling Standard'B.2 The OpenVMS Calling Standard'B.2 The OpenVMS Calling Standard'B.2 The OpenVMS Calling Standard'B.2 The OpenVMS Calling Standard'B.2 The OpenVMS Calling Standard)Example B- 1: Routine Call ExampleHB.2.1 Effects on Assembly-Time when Using Calling-Standard MacrosHB.2.1 Effects on Assembly-Time when Using Calling-Standard Macros/B.3 Accessing Memory with Base Registers/B.3 Accessing Memory with Base Registers/B.3 Accessing Memory with Base Registers5Figure B- 1: Base-Register Memory Displacement/B.3 Accessing Memory with Base Registers/B.3 Accessing Memory with Base Registers/B.3 Accessing Memory with Base Registers/B.3 Accessing Memory with Base Registers/B.3 Accessing Memory with Base Registers/B.3 Accessing Memory with Base Registers/B.3 Accessing Memory with Base Registers/B.3 Accessing Memory with Base Registers/B.3 Accessing Memory with Base Registers/B.3 Accessing Memory with Base Registers/B.3 Accessing Memory with Base Registers/B.3 Accessing Memory with Base Registers/B.3 Accessing Memory with Base Registers;Figure B- 2: Accessing Memory Through Base Addresses/B.3 Accessing Memory with Base Registers/B.3 Accessing Memory with Base Registers/B.3 Accessing Memory with Base Registers/B.3 Accessing Memory with Base Registers/B.3 Accessing Memory with Base Registers/B.3 Accessing Memory with Base Registers&Figure B- 3: Program Call Chain/B.3 Accessing Memory with Base Registers/B.3 Accessing Memory with Base Registers#B.4 Types of Data Structures#B.4 Types of Data Structures#B.4 Types of Data Structures!B.4.1 Procedure Descriptor!B.4.1 Procedure Descriptor!B.4.1 Procedure Descriptor!B.4.1 Procedure Descriptor!B.4.1 Procedure DescriptorB.4.2 Signature BlockB.4.3 Linkage PairB.4.3 Linkage PairB.4.3 Linkage PairB.4.3 Linkage Pair2Example B- 2: Routine Without Linkage PairsB.4.3 Linkage PairB.4.3 Linkage PairB.4.3 Linkage PairB.4.3 Linkage Pair/Example B- 3: Routine With Linkage PairsB.4.3 Linkage PairB.4.3 Linkage PairB.5 Types of RoutinesB.5 Types of RoutinesB.5 Types of RoutinesB.5 Types of RoutinesB.5 Types of RoutinesB.5 Types of RoutinesB.5 Types of RoutinesB.5 Types of Routines!B.5.1 Routine Capabilities!B.5.1 Routine Capabilities#Table B- 1: Frame Attributes!B.5.1 Routine Capabilities7B.5.2 Entry Prologue and Exit Epilogue Sequences7B.5.2 Entry Prologue and Exit Epilogue Sequences7B.5.2 Entry Prologue and Exit Epilogue Sequences7B.5.2 Entry Prologue and Exit Epilogue Sequences7B.5.2 Entry Prologue and Exit Epilogue Sequences+B.6 Establishing Self-Addressability+B.6 Establishing Self-Addressability+B.6 Establishing Self-Addressability0Example B- 4: Establishing a Base Address+B.6 Establishing Self-Addressability/B.7 Optimization and Automatic Alignment/B.7 Optimization and Automatic Alignment/B.7 Optimization and Automatic Alignment/B.7 Optimization and Automatic Alignment/B.7 Optimization and Automatic Alignment/B.7 Optimization and Automatic Alignment%B.7.1 Automatic Data Alignment)B.7.1.1 Controlling Data Alignment:Example B- 5: Enabling and Disabling Data Alignment)B.7.1.1 Controlling Data Alignment6B.7.1.2 Directives for Automatic Data Alignment7Table B- 2: Directives Using Automatic Alignment7Table B- 2: Directives Using Automatic Alignment6B.7.1.2 Directives for Automatic Data Alignment+B.7.2 Automatic Code Label Alignment+B.7.2 Automatic Code Label Alignment+B.7.2 Automatic Code Label Alignment$B.7.3 Scheduling Optimization$B.7.3 Scheduling Optimization"B.7.4 Peephole Optimization"B.7.4 Peephole Optimization+B.7.5 Using MACRO-64 for Performance+B.7.5 Using MACRO-64 for Performance+B.7.5 Using MACRO-64 for Performance+B.7.5 Using MACRO-64 for Performance)B.7.6 Viewing Optimization Results)B.7.6 Viewing Optimization Results!C. Using LSE with MACRO-64C.1 Invoking LSEC.1 Invoking LSEC.1 Invoking LSEC.1 Invoking LSEC.2 Running DiagnosticsC.2 Running Diagnostics$D. Differences from VAX MACRO$D. Differences from VAX MACRO$D. Differences from VAX MACRO)D.1 Assembler Features in MACRO-64)D.1 Assembler Features in MACRO-64)D.1 Assembler Features in MACRO-64)D.1 Assembler Features in MACRO-64)D.1 Assembler Features in MACRO-64)D.1 Assembler Features in MACRO-64)D.1 Assembler Features in MACRO-64)D.1 Assembler Features in MACRO-64)D.1 Assembler Features in MACRO-64)D.1 Assembler Features in MACRO-64)D.1 Assembler Features in MACRO-64)D.1 Assembler Features in MACRO-64)D.1 Assembler Features in MACRO-64)D.1 Assembler Features in MACRO-64)D.1 Assembler Features in MACRO-64)D.1 Assembler Features in MACRO-64)D.1 Assembler Features in MACRO-64)D.1 Assembler Features in MACRO-64)D.1 Assembler Features in MACRO-64)D.1 Assembler Features in MACRO-64)D.1 Assembler Features in MACRO-64)D.1 Assembler Features in MACRO-64)D.1 Assembler Features in MACRO-64)D.1 Assembler Features in MACRO-64)D.1 Assembler Features in MACRO-64)D.1 Assembler Features in MACRO-64)D.1 Assembler Features in MACRO-64)D.1 Assembler Features in MACRO-64)D.1 Assembler Features in MACRO-645D.2 VAX MACRO Features Not Present in MACRO-645D.2 VAX MACRO Features Not Present in MACRO-645D.2 VAX MACRO Features Not Present in MACRO-645D.2 VAX MACRO Features Not Present in MACRO-645D.2 VAX MACRO Features Not Present in MACRO-645D.2 VAX MACRO Features Not Present in MACRO-645D.2 VAX MACRO Features Not Present in MACRO-645D.2 VAX MACRO Features Not Present in MACRO-645D.2 VAX MACRO Features Not Present in MACRO-645D.2 VAX MACRO Features Not Present in MACRO-645D.2 VAX MACRO Features Not Present in MACRO-645D.2 VAX MACRO Features Not Present in MACRO-645D.2 VAX MACRO Features Not Present in MACRO-645D.2 VAX MACRO Features Not Present in MACRO-645D.2 VAX MACRO Features Not Present in MACRO-645D.2 VAX MACRO Features Not Present in MACRO-645D.2 VAX MACRO Features Not Present in MACRO-645D.2 VAX MACRO Features Not Present in MACRO-645D.2 VAX MACRO Features Not Present in MACRO-645D.2 VAX MACRO Features Not Present in MACRO-645D.2 VAX MACRO Features Not Present in MACRO-645D.2 VAX MACRO Features Not Present in MACRO-645D.2 VAX MACRO Features Not Present in MACRO-645D.2 VAX MACRO Features Not Present in MACRO-645D.2 VAX MACRO Features Not Present in MACRO-645D.2 VAX MACRO Features Not Present in MACRO-645D.2 VAX MACRO Features Not Present in MACRO-64E. Error MessagesE. Error MessagesADDTRUNC, Storing an address expression into a storage allocation less than the size of an address results in data truncation.vALIGNFILLIGN, The optional .ALIGN fill pattern argument is ignored in psects with the EXE and NOMIX attributes.ALIGNFILLTRUNC, The value you specify for the .ALIGN optional fill pattern must be an integer in the range of 0 . . . 255. Data truncation occurs with the currently specified fill pattern in a byte storage location.XALIGNLABELIGN, The ALIGN_LABEL option has been replaced by the ALIGN_CODE option.>ALIGNTOBIG, Specified alignment is too large for PSECT.SASCIITRUNC, ASCII constant contains too many characters; value is truncated.5BADALIGN, Alignment specifier is out of range.1BADENDARG, Bad argument to .END directive.?BADINSARG, Argument N is invalid for this instruc- tion.0BADLIB, Error opening library file XXXXX.5BADMACPARAMNAME, Illegal macro parameter name.(BADMACRONAME, Illegal macro name.5BADOPERAND, Invalid operand type for operator.-BADPARAMSTR, Illegal parameter string.3BADSYSCALL, Internal error. Bad system call.BASEFAIL, Argument N is invalid. The assembler failed to find a base register specified with a pre- vious .BASE directive to form a register expression of the form offset(Rn).BASERANGE, Argument N invalid. The assembler at- tempted to use base register Rn to form a register expression of the form offset(Rn). However, the argument offset exceeds the allowable range of 32,768 to +32,767.XBEGEXPSC, .BEGIN_EXACT is invalid in a psect with the NOEXE and NOMIX attributes.VBYTEALIGNIGN, The BYTE_ALIGN option has been replaced by the ALIGN_DATA option.3CONPSECTATTR, Contradictory PSECT attribute.JCONTEOF, Assembler encountered end of file after line continuation.CDATAALIGNTOBIG, Data requires alignment too large for PSECT.\DATANOTINNOEXE, Data declarations must be in a psect with the MIX or NOEXE attribute.SDIRNOTINNOEXE, Directive must be in a psect with the MIX or NOEXE attribute.CDISPTOOLGE, Branch offset is too large for this instruction.<DUPLEXTERN, External item has multiple defini- tions.)DUPLGLOBAL, Duplicate global name.7DUPMACPARAMNAME, Duplicate macro parameter name.VENDEXPSC, .END_EXACT is invalid in a psect with the NOEXE and NOMIX attributes.1EOLEXP, Assembler expected an end of line.[ESCAPE, Illegal escape sequence in string literal; assembler expected \, ", x, or X.EXP32BITTRUNC, Assembler expected an integer in the range 0 . . . (2^32) 1 for an unsigned expression OR (2^31) . . . +(2^31) 1 for a signed expression. Data truncation to 32 bits.EXP32BITTYPE, Assembler expected an integer in the range 0 . . . (2^32) 1 for unsigned expression OR (2^31) . . . +(2^31) 1 for signed expression.hEXPBINEXPTERM, Assembler found XXXXX when expecting a binary operator or expression termi- nator.WEXPFPREG, Argument N is invalid. Assembler ex- pected a floating point register.OEXPGENREG, Argument N is invalid. Assembler expected a general register.kEXPIDPROC, Argument N is invalid. Assembler ex- pected an identifier representing a procedure value.KEXPINTPAL, Assembler expected an integer expres- sion or PAL opcode.[EXPLAB, Argument N is invalid. Assembler expected a label defined in the same psect.zEXPLITVAL, Argument N is invalid. Assembler ex- pected an integer literal value in the inclusive range 0 . . . 255.;EXPMACRONAME, Assembler expected a valid macro name.EXPPALOPLIT, Argument N is invalid. Assembler expected an integer literal value in the inclusive range 0 . . . 67108863.sEXPREGOFF, Argument N is invalid. Assembler ex- pected a general register expression of the form offset(Rn).EXPRESEXP, Argument N is invalid. Assembler ex- pected an expression with no forward references resolvable to psect +/ offset.<EXPSTACKOVER, Internal SEM expression stack overflow.<EXPTOOCMPLX, Expression is too complex to evalu- ate.vEXPZEROFF, Argument N is invalid. Assembler ex- pected a general register expression of the form 0(Rn) or (Rn).TFOUNDEXP, Assembler found XXXXX when expect- ing one of the following: XXXXX.^FREGDEF, You cannot define a floating-point regis- ter in terms of an integer register.!GENERROR, Generated ERROR:!GENPRINT, Generated PRINT:"GENWARN, Generated WARNING:EHEXSTR, Illegal hexadecimal escape sequence in string literal.{IDENTTRUNC, The string length of the module IDENT is greater than 31 characters. It is trun- cated to 31 characters.IDFOUND, Assembler found identifier in the opcode field when expecting one of the following: opcode, directive, macro invocation, or symbol definition.:IDTOOLONG, Identifier is longer than 31 characters.(ILLASCII, Illegal ASCII constant.'ILLBIN, Illegal binary constant.(ILLDEC, Illegal decimal constant.?ILLEXPON, Illegal exponent in floating-point con- stant.1ILLFLOAT, Illegal floating-point constant.,ILLHEX, Illegal hexadecimal constant.%ILLIFOP, Illegal .IF operator.4ILLINCL, Illegal .INCLUDE file specification.&ILLOCT, Illegal octal constant.<ILLOPERANDMIX, Illegal operand mixing for opera- tor.~ILLPROCRET, Illegal procedure return; linkage reg- ister (argument 1) must be R31 when software hint (argument 3) is 1.\ILLRADIX, Illegal radix specifier in numeric con- stant; specify A, B, C, D, O, or X.NINCLDEPTH, .INCLUDE nest depth exceeds N - check for circular .INCLUDE.*INCLOPEN, .INCLUDE file open error.XINSNOTINPSC, Instructions must be in a MIX, NOEXE; MIX, EXE; or NOMIX, EXE PSECT.PINTERNAL, Internal assembler error. Please report the problem to Digital.cINTERR, Internal processing error in the SYN facility. Please report the problem to Digital.^INVALIGNFILL, You specified an invalid optional fill pattern with the .ALIGN directive.:INVBASEEXP, Invalid expression for .BASE directive.VINVBASEREG, Invalid base register. Base register must be one of R0 through R30.INVBRTGT, Invalid branch target. Branch target la- bel must be defined in same psect as the branch instruction which references the label.INVCA, You specified an invalid code address with the procedure descriptor. The code address must be a nontemporary label defined in a psect with the EXE or MIX attribute after its use with .PROCEDURE_DESCRIPTOR.GINVEXP, Assembler found XXXXX when expecting a valid expression.>INVEXPRFORDIR, Invalid expression type for direc- tive.;INVEXPRFORSYM, Invalid expression type for sym- bol.`INVFPCONST, Invalid floating-point value. Check value range for floating-point data type.VINVINSQUAL, You specified an invalid instruction qualifier list for the opcode.aINVLCA, Assembler found an invalid or undefined code address for the procedure descriptor.UINVLISTOPT, You specified an invalid option with the .LIST or .SHOW directive.,INVLPD, Invalid procedure descriptor.YINVNLISTOPT, You specified an invalid option with the .NLIST or .NOSHOW directive.INVOFF, You attempted to specify data intializa- tion with a current psect offset that is outside the range of 0 to 2147483647.INVREGNUMEXP, Invalid register-number expres- sion. Specify an integer expression between 0 and 31 or a previously defined or predefined register.INVREPCOUNT, The integer value of the .REPEAT expression is not within the inclusive range of 0 . . . 65535. A 0 value is assumed.RINVSAVEOPT, You specified an invalid option with the .SAVE_PSECT directive.2INVTEMPLAB, Invalid use of temporary label.IINVTERM, Assembler found N when expecting a valid expression term.\IREGDEF, You cannot define an integer register in terms of a floating-point register.$LABELNOTDEF, Undefined label.2LABELREDECL, Illegal redefinition of label.8LABNOTINPSECT, Label must be declared in a PSECT.2LEXOPEDITSPEC, Unrecognized edit specifier.WLEXOPENDM, Illegal modification of .ENDM directive keyword by lexical operation.WLEXOPENDR, Illegal modification of .ENDR directive keyword by lexical operation.LEXOPSYNTAX, Illegal lexical operator syntax (miss- ing left or right parenthesis, missing comma, or other lexical operator syntax error).fLEXSYM, XXXXX is already a lexical string symbol name; it cannot also be a numeric symbol name.LIBMOD_BADFORMAT, Library module XXXXX contains illegal syntax (missing .MACRO or la- bel preceding .MACRO, missing or not matching .ENDM, or other macro syntax error).3LIBMOD_EMPTY, Library module XXXXX is empty.wLIBMOD_EXTRA, Library module XXXXX contains extraneous text after .ENDM; the assembler ig- nores the extra text.8LIBMOD_NOT_FOUND, Library module XXXXX not found.bLOCCTRNOTDATA, Location counter cannot be set in a psect with the EXE and NOMIX attributes.MACCASEMATCH, Library macro name is spelled using different alphabetic case than in .MCALL directive or macro invocation.`MACEXPNEST, Macro expansion exceeds maximum nesting depth (macro recursion not detected).qMACPARAMGENDEF, You can specify a generated la- bel default value or a default string value, but not both.kMACPARAMSYNTAX, Illegal macro parameter syn- tax. Assembler found XXXXX when expecting one of XXXXX.QMACRECURSE, Recursive macro exceeds maximum macro expansion nesting depth.VMACZERO, Assembler cannot evaluate expression. A 0 expression value is assumed.9MAXIF, Maximum nesting of .IF directives exceeded.jMAXLEXOP, More than N lexical operators encoun- tered; check for a recursive lexical string symbol.,MISSENDC, Missing .ENDC directive(s).,MISSINGENDM, Missing .ENDM directive.,MISSINGENDR, Missing .ENDR directive.KMISSQUOTE, Missing closing double-quote character in string literal.MODCODLOCCTR, Restoring the location counter in the current context causes an illegal modification of the location counter for a psect with the EXE and NOMIX attributes.HNOBEGEX, Assembler encountered an unmatched .END_EXACT directive.\NOCA, You did not specify a code address as argu- ment 2 with .PROCEDURE_DESCRIPTOR .CNOQUAL, Instruction qualifiers are invalid with this opcode.YNOTAQUAL, An item you specified in the qualifier list is invalid with this opcode.=NOTENOUGHARGS, Not enough arguments for in- struction.ANOTINMACRO, This statement must occur only within a macro..NOTINSEM, Missing functionality in SEM.fNUMSYM, XXXXX is already a numeric symbol name; it cannot also be a lexical string symbol name.GOPTIGN, The assembler is ignoring one or more VAX MACRO options.OVERLAP, Assembler detected overlapping initial- izers at offset NN. This initial value overlaps but is not an exact replacement for a previous initial value.IPSECTALIGNCON, PSECT alignment conflicts with earlier declaration.HPSECTATTRCON, PSECT attribute conflicts with earlier declaration.gREGREDEF, You attempted to redefine a previously defined register symbol with a different value.^REDUNDELSE, You cannot specify more than one .ELSE directive within a single .IF block.3RESTOREWOSAVE, PSECT .RESTORE without .SAVE.>SAVESTACKOVER, Internal SEM PSECT .SAVE stack overflow.*SRCREAD, Error reading source file.4SYMBOLREDECL, Illegal redefinition of symbol.9TOOMANYARGS, Too many arguments for instruc- tion.STOOMANYMACARG, You specified more arguments than are defined for this macro.5TOOMANYMACPARAMS, Too many macro parame- ters.*TRUNCDATA, Data truncation warning.TUNDCA, You specified an undefined code address with the procedure descriptor.VUNDEFSYM, Undefined symbol or label. Assembler assumes an .EXTERNAL definition.-UNEXPELSE, Unexpected .ELSE directive.-UNEXPENDC, Unexpected .ENDC directive.-UNEXPENDM, Unexpected .ENDM directive.-UNEXPENDR, Unexpected .ENDR directive.7UNEXPIFF, Unexpected .IF_FALSE (.IFF) directive.6UNEXPIFT, Unexpected .IF_TRUE (.IFT) directive.>UNEXPIFTF, Unexpected .IF_TRUE_FALSE (.IFTF) directive./UNEXPMEXIT, Unexpected .MEXIT directive.7UNKDIR, Assembler found unknown directive XXXXX.HUNKENDISOPTION, You specified an unknown .ENABLE/.DISABLE option.,UNKNOWNATTR, Unknown PSECT attribute.\UNTERMEX, Assembler detected N unterminated .BEGIN_EXACT directive(s) in psect XXXXX.VAXDIR, The assembler is ignoring one or more VAX MACRO directives or options. Assembler continues processing with the next line.VMACELSE, You cannot specify .ELSE in the same .IF block with either .IF_FALSE (.IFF), .IF_TRUE (.IFT), or .IF_TRUE_FALSE (.IFTF).KWRONGMACID, Macro name in .ENDM does not match corresponding .MACRO.WRONGPL, The code address you specify with the .PROCEDURE_DESCRIPTOR directive must occur BEFORE its definition as a local or global label.!F. MACRO-64 Listing Format!F. MACRO-64 Listing Format%Example F- 1: Main Source File(Example F- 2: Include Source File+Example F- 3: Example Listing Output+Example F- 3: Example Listing Output!F. MACRO-64 Listing Format!F. MACRO-64 Listing Format!F. MACRO-64 Listing Format!F. MACRO-64 Listing Format!F. MACRO-64 Listing Format!F. MACRO-64 Listing Format!F. MACRO-64 Listing Format!F. MACRO-64 Listing Format!F. MACRO-64 Listing Format  front_prefaceintro_chapintro_featnat_mode_dir_assign_statementsasmb_dirgen_asmb_dirmac_dirintro_invoke$comm_line_quallsource_chapo 2_source_statement_formatruse_tabs_fieldstru_cod_sourcewlabel_sec~0_operatorfield1_operandfield2_commentfield0_charactersetmacro_chars_tab1_numbers2_integers2_subform1fpnumbers_sec2_subform22_quoted_literalssymbols_sec4_permanentsymbolspredef_sym_secmacro_name_secsymbol_val_secus_op_fieldus_opand_fieldlocal_labels2_subform3label_addresseslabel_addresses_optlab_addr_auto_alignterms_secop_form_term_opunary_secunary_oper_tabradix_oper_sec2_subform4numeric_oper_sec2_subform7binary_secbinary_ops_tab 8_arithmeticshiftoperator9_logicalandoperator$10_logicalinclusiveoroperator$11_logicalexclusiveoroperatorassign_sec2_subform8 loca_counter_sec2_subform9alpha_lexicalsproc_lex_oplex_op_syntax(numeric_symb/lex_sub_oper2lex_exc_oper4l_p_w_e_o8l_p_with_e_o; using_lexical_operators<examp_using_lex=exa_aft_exp>lexical_operators_1?summ_alph_lex@bk_added_6I3_edit_1J3_edit_2Kbk_added_7Tbk_added_8]bk_added_61dbk_added_9kbk_added_62rbk_added_10ybk_added_11bk_added_12bk_added_13bk_added_14bk_added_15type_attributesargu_chapzero_args1_defaultvalueskeyword_argumentsstring_arguments 2_argumentconcatenation(3_passingnumericvaluesofsymbols3_plocal_labels_secdirect_chapprogram_sections5_auto_data_alignmentdir_ectives assembler_directives_tabmacro_dirsbk_added_65bk_added_665_align_15_align_25_align_3bk_added_68 5_ascid_directive5_ascid_15_ascid_2bk_added_69bk_added_70%bk_added_713bk_added_726bk_added_739begin_exact_directiveBblk_book_refLbk_added_74Sbk_added_76Zbk_added_77abk_added_162jbk_added_163tbk_added_79zbk_added_80bk_added_81enable_disablebk_added_83bk_added_84bk_added_85bk_added_86bk_added_87bk_added_89bk_added_90bk_added_92end_exact_directivebk_added_94bk_added_95bk_added_97bk_added_99bk_added_101bk_added_102bk_added_104cond_asmb_dirs5_if_15_if_25_if_35_if_45_if_5bk_added_1065_ifx_15_ifx_25_ifx_35_ifx_4bk_added_108bk_added_110 5_instructionbk_added_112bk_added_113,bk_added_1147bk_added_115>bk_added_116D5_local_code_addressK5_local_linkage_pairR$5_local_procedure_descriptorZbk_added_117abk_added_118n5_macro_1s5_macro_2u5_macro_3vbk_added_120~bk_added_121bk_added_1225_mexit_15_mexit_2bk_added_1245_narg_15_narg_2bk_added_1265_nchr_15_nchr_2bk_added_127bk_added_128bk_added_129bk_added_131bk_added_1170bk_added_133bk_added_134bk_added_136bk_added_138progsec_attrdefprogbk_added_140bk_added_1415_repeat_15_repeat_25_repeat_3bk_added_143bk_added_145bk_added_147bk_added_148show_args bk_added_150'bk_added_151.bk_added_1525bk_added_154<bk_added_155Dbk_added_164Kbk_added_157Rbk_added_159Zbk_added_160asupplied_macroscmac64_supp_libhrout_and_lexkrout_and_psectsp6_using_macq6_def_progudefined_sym{procedure_types~use_mac_prouse_mac_epmacro_prog_examplprog_use_macrosuse_call_macuse_call_sourceprog_using_callprog_considerationsmult_callnon_std_linkrout_restrictionmacro_descriptions6_begin_epiloguecall_symbargs_argex_link_1ex_link_2code_section_symbdata_section_symbend_epilogue_symbend_prologue_symbend_routine_symblinkage_pair_symblinkage_section_symbopdef_symbol packed_symb procedure_descriptor_symb"reset_lp_list_symb)return_symb0routine_symbgrte_appendixjdata_struct_figkinst_format_figlreg_use_convmreg_use_conv_tbloreg_use_convqreg_use_convrinst_op_notatsinst_op_notat_tbluinst_op_notatwinst_op_notatxinst_qual_notatyinst_qual_notat_tblzfpcr_format{fpcr_format_tbl|decode_pseudo_op}decode_pseudo_op_tbldecode_pseudo_opdecode_pseudo_opcommon_arch_op_num common_arch_op_num_tblcommon_arch_op_numcommon_arch_op_numpalcode_inst_summ unpriv_palcode_inst_tblpalcode_inst_summpalcode_inst_summpriv_palcode_inst_tblpalcode_inst_summpalcode_inst_summpalcode_ops_numpalcode_ops_num_tblpalcode_ops_numpalcode_ops_numcommon_arch_instcommon_arch_inst_tblcommon_arch_instcommon_arch_instget_start_alpha64prog_hintsstarlet_fileint_divius_sys_mac alpha_32_calling_standardrout_call_exassemb_call_macros$accessing_memory_with_basebase_reg_membasd_reg_archp_valueproc_descr_alink_sect_subrw_conceptsm_p_c_cprog_startdat_strproc_descsig_blocklink_pairusing_linkedno_linkwith_linked_pairtype_routrout_permframe_attrentr_pro_exit estab_self_addreest_base_exoptimoauto_data_aligncntrl_dat_aligne_d_datadir_aut_aligndir_using_aut_alauto_code_align"scheduling$peephole&performance*viewing_optimo,use_lse_64-invoke_lse1lse_diag3diff_appendix6 newSnot_plnerr_messbinary_list_appendixlist_source_mainlist_source_includeoutput_list_ex A@-ADOBE-Helvetica-Bold-R-Normal--*-180-*-*-P-*-ISO8859-1@-ADOBE-Helvetica-Bold-R-Normal--*-120-*-*-P-*-ISO8859-1O-ADOBE-New Century Schoolbook-Medium-R-Normal--*-120-*-*-P-*-ISO8859-1O-ADOBE-New Century Schoolbook-Medium-I-Normal--*-120-*-*-P-*-ISO8859-1@-ADOBE-Helvetica-Bold-R-Normal--*-100-*-*-P-*-ISO8859-1M-ADOBE-New Century Schoolbook-Bold-R-Normal--*-100-*-*-P-*-ISO8859-1O-ADOBE-New Century Schoolbook-Medium-R-Normal--*-100-*-*-P-*-ISO8859-1@-ADOBE-Helvetica-Bold-R-Normal--*-140-*-*-P-*-ISO8859-1O-ADOBE-New Century Schoolbook-Medium-R-Normal--*-140-*-*-P-*-ISO8859-1B -ADOBE-Helvetica-Medium-R-Normal--*-120-*-*-P-*-ISO8859-1O -ADOBE-New Century Schoolbook-Medium-I-Normal--*-140-*-*-P-*-ISO8859-1/ -ADOBE-Symbol-*-R-*--*-140-*-*-P-*-*-*M -ADOBE-New Century Schoolbook-Bold-R-Normal--*-120-*-*-P-*-ISO8859-1B -ADOBE-Helvetica-Medium-R-Normal--*-140-*-*-P-*-ISO8859-1@-ADOBE-Courier-Medium-R-Normal--*-120-*-*-M-*-ISO8859-1L-ADOBE-Interim DM-Medium-I-Normal--*-140-*-*-P-*-DEC-DECMATH_SYMBOL>-ADOBE-Times-Medium-R-Normal--*-140-*-*-P-*-ISO8859-1@-ADOBE-Courier-Medium-R-Normal--*-140-*-*-M-*-ISO8859-1>-ADOBE-Courier-Bold-R-Normal--*-120-*-*-M-*-ISO8859-1@-ADOBE-Helvetica-Bold-O-Normal--*-180-*-*-P-*-ISO8859-1M-ADOBE-New Century Schoolbook-Bold-R-Normal--*-140-*-*-P-*-ISO8859-1L-ADOBE-Interim DM-Medium-I-Normal--*-140-*-*-P-*-DEC-DECMATH_ITALICB-ADOBE-Helvetica-Medium-O-Normal--*-120-*-*-P-*-ISO8859-1!  frOPrefaceEOThismanual describestheMACRO-64assembly language.OMIntendedAudience bnDOAThismanualisintendedforall programmerswritingBOMACRO-64 programs.,Beforereadingthismanual,youFOshouldbefamiliarwithassemblylanguage programming,IOKtheAlphaAXP architectureand instructionset,andthe programming language..Formore information,see Athe'^A Alpha ArchitectureHandbook |A. ` AppendixB5provides informationonhowtoprogram=more effectivelyusingtheMACRO-64 assembler. ` AppendixC8explainshowtoinvoketheDEC Language-B SensitiveEditor(LSE)withtheMACRO-64 language. `p p AppendixD3p  describesthe differencesbetweenVAX) MACROandMACRO-64 features. `H H AppendixE<H  describestheerrormessagesproducedbythe MACRO-64 assembler. `  AppendixF8 providesaMACRO-64binarylistingformaty example.O  Associated Documents* nO* klOl* CnO* slO* mO* #pOa* Og* O* [O,* 3 O3* On* O ! rKOAFormore informationon MACRO-64,seethe followingguide'Ointhis documentationset:Aa ` 9 MACRO-64 AssemblerforOpenVMSAXPSystems( InstallationGuidebIOFormore informationontheAlphaAXP architecture,seeOthe following:   ` 0 Alpha Architecture ReferenceManual `O 'O Alpha ArchitectureHandbook ` : AlphaAXP AchitectureQuick ReferenceGuide `N $N OpenVMSCallingStandardO ConventionspFCOAInthismanual,!everyuseofAlphaVMSmeanstheDOOpenVMSAXP operatingsystem,everyuseofVAXVMSGOmeanstheOpenVMSVAX operatingsystem,andeveryuseDOKofVMSmeansboththeOpenVMSAXP operatingsystem4OandtheOpenVMSVAX operatingsystem.mCCOThe following conventionsareusedinthismanual:! iOCtrl/ x&KAsequencesuchasCtrl/ \x indicatesthatyou?K0mustholddownthekeylabeledCtrlwhileyou?K~pressanotherkeyorapointingdevicebutton. OPF1 x$KAsequencesuchasPF1 Yx indicatesthatyou=KEmustfirstpressandreleasethekeylabeled>KPF1,thenpressandreleaseanotherkeyora#Kpointingdevicebutton. O OTbW Return 3T Op;KZIn examples,akeynameenclosedinaboxAK indicatesthatyoupressakeyonthe keyboard.CK(Intext,akeynameisnotenclosedinabox.)jn ...:KnA horizontalellipsisinexamples indicates1Koneofthe followingpossibilities: \A 0A Additionaloptional argumentsina) statementhavebeenomitted. \ 2The precedingitemoritemscanbe)[repeatedoneormoretimes. \ 5 Additional parameters,values,orother(( informationcanbeentered. & . t .  .9KAverticalellipsis indicatestheomission8K&ofitemsfromacodeexampleorcommand?Ktformat;theitemsareomittedbecausetheyare;Knot importanttothetopicbeing discussed.O; ():K; Informat descriptions, parenthesesindicate?K that,ifyouchoosemorethanoneoption,you7K mustenclosethechoicesin parentheses.OP []7KP Informat descriptions,bracketsindicate5K optional elements.(Youcanchooseone,@K none,oralloftheoptions.# (Bracketsarenot@K8  optional,however,inthesyntaxofa directory=K nameinaVMSfilespecification,orinthe9K syntaxofa substring specificationinan!K!  assignment statement.)O {}8K Informat descriptions,bracessurrounda;K requiredchoiceofoptions;youmustchoose(K6 oneoftheoptionslisted.O boldfacetext>K Boldfacetext representsthe introductionofa9K newtermorthenameofan argument,an$KJ attribute,orareason.?KBoldfacetextisalsousedtoshowuserinput0Kinonlineversionsofthemanual.Oitalictext5KItalictext emphasizes importantinfor-8Kmation, indicates variables,and indicatesK indicatestherightmousebutton.!(Thebuttons-K_canbe redefinedbytheuser.)ROPB1,PB2,PB3,PB4PB1,PB2,PB3,andPB4indicatebuttonsonK&thepuck.OSB,SB:KSBandSBindicatebuttonsonthestylus.OMACRO-643KMACRO-64referstoMACRO-64 Assembler%KgforOpenVMSAXPSystems.   !O1.1BLanguageFeaturesJOUMACRO-64sourceprogramsconsistofasequenceofsourceGO statements.-Thesesource statementsmaybeanyoftheO following: ` /AlphaAXP native-mode instructions `O (ODirect assignment statements `  Assembler directives6O1.1.1BAlphaAXP Native-Mode InstructionsIO4 Instructions manipulatedata.(Theyperformsuch functionsGOas addition, data conversion, andtransfer ofcontrol.JO Instructionsareusuallyfollowedinthesource statementNO=by operands,whichcanbeanykindofdataneededfortheOO operationofthe instruction.,Forabrief descriptionofthe'OAlpha instructionset,seeAppendixA. ForamoredetailedJOG descriptionoftheAlpha native-mode instructionset,see Othe0 Alpha Architecture ReferenceManualCorthe9 Alpha O ArchitectureHandbook ~.*Og/O1.1.2BDirect Assignment StatementsFO4Direct assignment statementsequatesymbolstovalues.JOFormore informationondirect assignment statements,seeOSection2.11.*O?!&O1.1.3B Assembler DirectivesLO4 Assembler directivesguidetheassemblyprocessandprovideKOtoolsforusingthe instructions.+Formore informationon%O assembler directives,seeChapter5.*lOGOTherearetwoclassesof assembler directives:/general8O assembler directivesandmacro directives.1O1.1.3.1CGeneral Assembler DirectivesIO)Youcanusegeneral assembler directivestoperformthe O following operations:! n ` >Storedataorreservememoryfordatastorage `O JOControlthe alignmentofpartsoftheprograminmemory ` ISpecifythemethodsof accessingthesectionsofmemory3'inwhichtheprogramwillbestored ` 1Specifya procedureintheprogram `& E&Specifythewayinwhichsymbolswillbe referenced ` OSpecifythatapartoftheprogramistobe assembledonly$undercertain conditions `} ;}Display informationaland diagnosticmessages ` JControlthe assembleroptionsthatareusedto interpretUthesourceprogram! $O1.1.3.2CMacro DirectivesPO)Macro directivesareusedtodefinemacrosandrepeatblocks.MOTheyallowyoutorepeat identicalorsimilar sequencesofHOsource statements throughoutaprogramwithout rewritingHO3those sequences..UseofmacrosandrepeatblockshelpsCOminimize programmererrorsandspeedsthe debuggingOprocess.CS> 7O1.2BInvokingMACRO-64onOpenVMSSystems@OUToinvoke MACRO-64,entertheMACROcommandandJOthe /Alpha_AXP command-line qualifier,usingthe followingOsyntax:&O MACRO/Alpha_AXPM file-spec[,... n ] NFOYoumustspecifythe /Alpha_AXP command-line qualifierNObeforeanyother command-line parameters, qualifiers,orfileO5specifications.K !!O file-spec[,...]!! YOIfyoudonotspecifyafiletypeforaninputfile,the assembler3Ousesthedefaultfiletypeof.M64.r"! HQOYoucanspecifyoneormoresourcefilestobe assembled.(ToSOassemblefiles individually,separatethefilespecificationswithLO5commas.*To concatenateandassemblethefilesasasingleXOinputfile,separatethefilespecificationswithplussigns( + ).#?O Command-line qualifiers control special assemblerCOoptions.4 Assembler options!can apply to!the entireAO5MACRO/Alpha_AXP command-line,ortothe individualEOfilebeing assembled.2Whenthe qualifierfollowstheIOMACRO/Alpha_AXPcommand,itappliestoallfileslisted.DO>Formore informationon command-line qualifiers,seeOSection1.2.1.*#OZ?$$)O1.2.1B Command-Line QualifiersMO4Thissection describesthecommand qualifiersusedwiththe#OMACRO/Alpha_AXPcommand.I%O/[NO]ALIGNMENT=optionx&NNOControlsthe alignmentofcodeanddata.'Validoptionsare:' OOOptionFunction O?ObCODE Alignmentofcertainbranchtargetlabels.4ODATANatural alignmentofdataitems. O<(POIfyouomitthe qualifierfromthecommandline,thedefault=Ooptionsare/NOALIGNMENT=(CODE,DATA).IfmoreQO5thanoneoptionis specified,theoptionsmustbeenclosedin4O parenthesesand separatedbyacomma.J)  O/[NO]DEBUG[=(options)]d*::O SpecifiesDEBUGsupport.'Validoptionsare:G+  OOOptionFunction O8ObSYMBOL Generatesdebugsymbol information.7O TRACEBACK Generates traceback information. OVALL7V Generatesallpreviousdebug information.2ONONE Generatesnodebug information. O, DOThedefault qualifieris /NODEBUG.WhenyouspecifyKO/DEBUGwithnooptions,thedefaultoptionis /DEBUG=ALL.Y-//O/[NO]DEFINE=(symbol[=[=]value],...).GOPerformsthesamefunctionasdirectsymbol assignmentHOinyoursourceprogram.-Thatis,the/DEFINE qualifierJO5definesanumericsymbol.+For additional information,seeOSection2.11.*.OP?/ JOTheDigitalCommandLanguage(DCL)convertsallinputtoHO uppercaseunlessyouencloseitwithin quotationmarks.0! WPOUseasingleequalsignbetweenthesymbolandthevaluetoQOdefinealocalsymbol.'UsetwoequalsignsbetweenthesymbolSO5andthevaluetodefineaglobalsymbol.(ThefinalvalueofaQOglobalsymbolisoutputtotheobjectmoduleandis availableOOduringthelinkingprocess.*Alocalsymbolisonly available)O>duringtheassemblyprocess.:1 IOYoucannotdefinealexicalstringsymbolwith/DEFINE.SOThevalueyouspecifyforasymbolmustbeanintegerliteral.QO5Youcanspecifythisvalueusingabinary,octal,decimal,orMO hexadecimalradix.)Thedefaultradixisdecimal.)Tospecify@Oan alternateradix,usetheformat describedinSection2.9.1.KO>Ifyouspecifyan alternateradix,youmustuseMACRO-642Oradixsyntax,notDCLradixsyntax.*1?2VVOIfyoudonotspecifyavalueforthesymbol,itdefaultsto1.3!aKOThesimplestformofa/DEFINE definitionisasfollows: /DEFINE=TRUE4![KOThis definitionis equivalenttothe following definition:TRUE=15 zPOYoucanalsospecifymorethanonesymbol definitionaswith"Othe followingcommand:(a/DEFINE=(CHIP==21064,UNROLL=4)6isLOThis definitionis equivalenttothe following definitions: CHIP==21064PUNROLL=47NIOWhenmorethanone/DEFINE qualifierispresentontheGOMACROcommandlineorinasingleassemblyunit,the0O5 assemblerusesonlythelastone.[811OThedefault qualifieris /NODEFINE.O9%%O/[NO]DIAGNOSTIC[=file-spec]w:! MLOControlswhether diagnosticsarecreatedandstoredintheTO specifiedoptionalfile.+Ifafile specificationisnot supplied,NO5the assemblercreatesa diagnosticfileusingthesamenameNOasthesourcefile..Forexample,ifyouuseasourcefileGOnamedXXX.M64,the assemblercreatesa diagnosticfileLO>namedXXX.DIA.Youcanusethe diagnosticfilewithotherRODigitallayeredproducts including,butnotlimitedto,theDEC,OLanguage-SensitiveEditor(LSE)._;55OThedefault qualifieris/NODIAGNOSTIC.J<  O/ENVIRONMENT=[NO]FLOAT=NKOControlswhetherthe assembler generatesfloating-pointin-IO structionswhen optimizingcodeand performing code-labelO5 alignment.:> KO Currently,theonlyfloating-point instruction generatedbyHOthe assemblerduring optimizationand alignmentprocess-IO5ingisFNOP,thefloating-point no-operation instruction.>OIfyouspecify/ENVIRONMENT=NOFLOAT,theassem-POblerdoesnotgenerateanyfloating-point instructionsaspartGO>of optimizationand alignment processing.,Floating-pointJO instructionsthatyouspecifyinyoursourceprogramareO unaffected.<?O/LIBRARYj@@@OSearchesmacro librariesinthe followingorder:[A z1E`1.:Thelibrary designatedbythe/LIBRARY qualifier.(`O2.:The.LIBRARY directives.G`3.:The MACRO64.MLBlibrary.'The assemblersearchesforC'the MACRO64.MLBmacrolibraryinthe followinglo-9cations:)MACRO64$LIBRARY,ALPHA$LIBRARY,andfinally SYS$LIBRARY.G`W4.:The STARLET.MLBlibrary.(The assemblersearchesforCthe STARLET.MLBmacrolibraryinthe followinglo-9 cations:)MACRO64$LIBRARY,ALPHA$LIBRARY,andafinally SYS$LIBRARY.BNJOIn addition,youcanplacethemacrolibrary definitionsIOinthelistingfilebyusingthe command-line qualifierO5/SHOW=LIBRARY.ICO/[NO]LIST[=file-spec] D NKOControlswhetheralistingiscreatedand optionallypro-XOvidesanoutputfile specificationforthelistingfile.'Donotuse>O5wildcard charactersinthisfilespecification.EaAOIfyouentertheMACRO/Alpha_AXPcommandinterac-OOtively,thedefault qualifieris/NOLIST.The assemblersendsPO5outputtothecurrentoutputdeviceratherthantoalistingGOfile.(IfyouexecutetheMACRO/Alpha_AXPcommandina:Obatchjob,thedefault qualifieris/LIST.WF-ROIfyoudonotspecifyafilespecification,the assemblercre-POatesalistingfileusingthesamenameasthesourcefile.LO5Forexample,ifyouuseasourcefilenamedXXX.M64,the?O assemblercreatesalistingfilenamedXXX.LIS.EGO/[NO]MACHINE_CODEHNIOProducesabinarymachinecodelistingafterthesourceQOtextifalistingfileis requested.-Thedefault qualifierisO5/NOMACHINE_CODE.FIO/NAMES=case_optionJzOO Specifiesthe alphabeticcasingof identifiersinsourcecode+O statements.'Validoptionsare:Kxc OOOptionFunction OObUPPER_OCASEBbConvertsall identifierstoupper alphabeticcase.O)LOWER_OwCASEB)Convertsall identifierstolower alphabeticcase.NOAS_ISCausesall identifierstoremaininthecaseusedin>source statements. OY L! NJOIfyouusethe/NAMES qualifierinacommandline,youQOmustsupplya case_option.(Ifyouomitthe qualifierfromtheFO5commandline,thedefaultoptionis/NAMES=UPPER_CASE.KM!!O/[NO]OBJECT[=file-spec]N NQOControlswhetheranobjectfileiscreatedand optionallypro-POvidesafilespecification.)Donotusewildcard charactersin$O5thisfilespecification.WO-ROIfyoudonotspecifyafilespecification,the assemblercre-POatesanobjectfileusingthesamenameasthesourcefile.LO5Forexample,ifyouuseasourcefilenamedXXX.M64,the?O assemblercreatesanobjectfilenamedXXX.OBJ.YP//OThedefault qualifieris/OBJECT.QQ''O/[NO]OPTIMIZE[=(option-list)]RjOO Specifiesoptional assembleroptimizations.(ValiditemsintheO option-listare:S OOOptionFunction O7ObSCHEDULEF Specifies instruction scheduling.*OPEEPHOLEQ Specifies peepholing. OT|MO Specifying /OPTIMIZEwithnooptionsisthesameasspeci-/Ofying/OPTIMIZE=(PEEPHOLE,SCHEDULE).U8OThedefault qualifieris /NOOPTIMIZE.SeeSectionB.7 *for)O informationonoptimizations.*UF?SV))O/PREPROCESSOR_ONLY [=filespec]9W TOCausesthe assemblertooutputasourcefilethatistheresultPOoftheinputsourcefileafterpreprocessing.( Suppressesdiag-KO5nosticmessagesanddoesnotproduce diagnostic(.ANA)or Oobject(.OBJ)files.X tGOOperandsfor instructionsidentifythememory locationsKOorthe registersthatareusedbythemachine operation.KO5Theoperandfieldforaspecific instructionmustcontainKOthecorrectnumberandtypeofoperandsrequiredbythatO instruction.NIO Argumentsfora directivemustmeettheformatrequire-%Omentsofthat directive.Chapter5$@ describesthe directives1O5andtheformatoftheir arguments.*nONKOOperandsforamacromustmeetthe requirements specifiedMOinthemacro definition.)Seethe descriptionofthe.MACROO5 directivein5Chapter5.*lOPOUseacomma( , )toseparateoperandsfor instructionsandO directives.'(SeeSection2.8/fora discussionof expressions.)*|? NLOThe semicolonthatstartsthecommentfield terminatesthePOoperandfield.+Ifalinedoesnothaveacommentfield,theFO5operandfieldis terminatedbytheendoftheline. zOOInthe followingsource statementexample,50istheoperandOG informationonunaryandbinary operators,seeGSection2.9 OandSection2.10.*AnO* }?*b?`MOYoucanspecifyafloating-pointnumberwithorwithoutanO exponent.xoOFORMAT4O4Floating-pointnumberwithout exponent: O snnO snn.nnO_ snn.m6OFloating-pointnumberwithexponent(E):O snnEsnnOa snn.nnEsnnO snn.EsnnR1( OsOAnoptionalsign.}1S OnnGOAstringofdecimaldigitsintherangeof0to9.x NMOThedecimalpointcanappearanywheretotherightoftheQOfirstdigit.(Afloating-pointnumbercannotstartwithadeci-JO5malpointbecauseMACRO-64treatsthenumberasauser-MOdefinedsymbol.'For informationon user-definedsymbols,seeOSection2.5.3.*O?*$ dO2.5BSymbolsGOUYouusesymbolsinMACRO-64source statementstorep-POresentan instruction, directive,registername,orvalue.(YouHOcanusefourtypesofsymbolsinMACRO-64sourcepro-IO^grams:' permanentsymbols, predefinedsymbols, user-defined&Osymbols,andmacronames.! #O2.5.1B PermanentSymbolsDO4 PermanentsymbolsconsistofMACRO-64 directivesandJO instruction mnemonics.*Youneednotdefine directivesbe-IOforeyouusethemintheoperatorfieldofaMACRO-64SO=source statement.'Itisalsonot necessarytodefine instructionKO mnemonicsbeforeusingtheminthe instruction statements.k! VA$O2.5.2B PredefinedSymbolsEO4 PredefinedsymbolsareMACRO-64registersymbolsthatOarenotg permanently:; reserved.&Youcandeletethe definitionofPOanyofthese predefinedregistersymbols.(Youcanalsodefine'O=yourownregistersymbols. NQOYoucanexpressthe32general registersandthe32 floating-IOpoint registersoftheAlphaAXP processorinasourceO5programasfollows: +  OORegisterO+Name Description OF OR0Generalregister0. O)R1)Generalregister1. O. . O. . O. .OR29or O^FPNGeneralregister29orframepointer.#IfyouuseR29asaH^framepointer,Digital recommendsyouusethenameFP.KIfyouuseR29asageneral register,Digital recommends#youusethenameR29.OsR30or OSPNsGeneralregister30orstackpointer.$IfyouuseR30asaMstackpointer,thenameSPis recommended;ifyouuseR30Easageneral register,thenameR30is recommended.%OR31Generalregister31. OF0&Floating-pointregister0. O{. {. O. . On. n.,OF31Floating-pointregister31. O  _U Note  _4 WhenMACRO-64operatesin /NAMES=AS_ISHl mode,allofthepreviousregistersymbolsaredefined2 inall uppercaseandall lowercase.  z PEOTodefineyour ownregister symbols,!use eithertheCO .DEFINE_FREGor .DEFINE_IREG directivefor floating-OO5pointorinteger registers, respectively.(Formore informationFOaboutthe .DEFINE_FREGor .DEFINE_IREG directives,seeOthe descriptioninChapter5.*lO FOYoucandeletearegistersymbol definitionwiththeBO .UNDEFINE_REG directive.+Formore informationaboutCO5the .UNDEFINE_REG directive,seethe descriptioninOChapter5.*OPlO UOWhilean identifierisdefinedasaregistersymbol,itcanonlyBObeusedinthosecontextsthatallowa register. V}9O2.5.3B User-DefinedSymbolsandMacroNamesQO4Youcanusesymbolstodefinelabels,oryoucanequatethemMOtoaspecificvaluebyadirect assignment statement.+(SeeOSection2.11.)?MYoucanalsousethesesymbolsin expressions.7O=Formore informationon expressions,see*=Section2.8.*O?**|?rHHOUsethe followingrulestocreate user-definedsymbols:_! H5 ` EUse alphanumeric characters, underscores( _ ),dol-M(larsigns( $ ),andperiods( . )..Anyother character" terminatesthesymbol. ` FThefirst characterofasymbolcannotbeanumber. ` JThesymbolmustbenomorethan31 characterslongandmustbeunique. `W 8WThesymbolmustnotbearegistername. ` KThesymbolcannotbeoneofthe following conditionalor/macro directives:qh.ELSE.ENDC.ENDM].ENDR ].IF] .IF_FALSE(.IFF)*$.IF_TRUE(.IFT).IF_TRUE_FALSEq(.IFTF)$.IIF.INCLUDE.IRP.IRPCe.LIBRARYe.MACROe.MCALL.MDELETE.MEXIT.NARGX.NCHARX.REPEAT[11OIn addition,byDigital convention:/  ` KThedollarsign( $ )isreservedfornamesdefinedbyD.Digital.,This conventionensuresthata user-definedIname(thatdoesnothaveadollarsign)willnotcon-MflictwithaDigital-definedname(thatdoeshaveadollar7sign). ` PDonotusetheperiod( . )inanyglobalsymbolnamebe-Ecausemany languages,suchasFortran,donotallow%hperiodsinsymbolnames.! WMOMacronamesfollowthesamerulesand conventionsasuser-NOdefinedsymbols.(Seethe descriptionofthe.MACRO directive O5in5Chapter5:45formore informationonmacronames.)User-LOdefinedsymbolsandmacronamesdonot conflict;thatis,NOyoucanusethesamenamefora user-definedsymbolandaO>macro.*mOw VM,O2.5.4B DeterminingSymbolValuesMO4Thevalueofasymboldependsonitsuseintheprogram.JOMACRO-64usesa differentmethodto determinethevaluesSOofsymbolsintheoperatorfieldthanitusesto determinethe7O=valuesofsymbolsintheoperandfield.* ;O2.5.4.1CUsingSymbolsintheOperatorFieldLO)Asymbolintheoperatorfieldcanbeeithera permanentIOsymboloramacroname.'MACRO-64searchesforasymbol0O definitioninthe followingorder:\22`1.:Macroand conditional directives:(.ELSE.ENDC.ENDM].ENDR ].IF] .IF_FALSE(.IFF).IF_TRUE$(.IFT).IF_TRUE_FALSE$(.IFTF).IIF.INCLUDE.IRP.IRPC.LIBRARY.MACRO.MCALL.MDELETE.MEXIT.NARG .NCHAR.REPEAT/`2.: PreviouslydefinedmacronamesH`3.: Permanentsymbols (instructionsandother directives)}! SHOThissearchorderallowsmost permanentsymbols,exceptQO conditional directivesandmacro directives,tobe redefinedasRO5macronames.(IfasymbolintheoperatorfieldisnotdefinedOOasamacroora permanentsymbol,the assemblerdisplaysanOerrormessage.:O2.5.4.2CUsingSymbolsintheOperandFieldOO)Asymbolintheoperandfieldmustbeeithera user-defined=Onumericsymbol,alabel,oraregistername.= MO User-definednumericsymbolsandlabelscanbeeitherlocalMO (internal)symbolsorglobal (external)symbols.'Whethernu-QO5mericsymbolsandlabelsarelocalorglobaldependsontheir(Ouseinthesourceprogram. WROYoucan referencealocalnumericsymbolorlabelonlyintheSOmoduleinwhichitisdefined.'Iflocalnumericsymbolsorla-MO5belswiththesamenamesaredefinedin differentmodules,MOthesymbolsandlabelsare completely independent.(Thedef-POinitionofaglobalnumericsymbolorlabel,however,canbe:O> referencedfromanymoduleintheprogram. NIOMACRO-64treatsall user-definednumericsymbolsandla-UObelsaslocalunlessyou explicitlydeclarethemtobeglobalby)O5doingoneofthe following:J ` OUsethedoublecolon( :: )indefiningalabel.+Formore'( informationonlabels,seeq(Section2.1.1. ` JUsethedoubleequalsign(= =)inadirect assignmentD statement.*Formore informationondirect assignmentY statements,seeYSection2.11. ` FUsethe.WEAK directive.*Formore informationonthe 1.WEAK directive,see1Chapter5.*q?w*?*lO6 KOYoucanonlyuse user-definedlexicalstringsymbolswithMOthelexicalstring operators.*Formore informationonlexi-&O5calstring operators,see5Chapter3.$Z5YoucandefineamacroLOusingthesamenameasa previouslydefinedlocalnumericLOsymbol,globalnumericsymbol,oralexicalstringsymbol.KO>However,youcannotdefinealexicalstringsymbolanda2Onumericsymbolusingthesamename.*mO4  OOIn addition,youcannotusethesamenameforbothalocalLOandglobalnumericsymbol.'YoucannotusethesamesymbolQO5nameforbothanumericsymbol(localorglobal)andalabelO(localorglobal).;6O2.6B TemporaryLabelsWithinSourceCodeOOUUse temporarylabelstoidentify addresseswithinablockofOsourcecode.KB!OFormatO) nnnnn$:1 ~OnnnnnAOAdecimalintegerintherangeof1to65,535.POInmostcases,youcanuse temporarylabelsinthesamewayQO youuseotherlabelsthatyoudefine;however,therearesomeOe differences:+!  ` G Temporarylabelscannotbe referencedoutsidethetem-?(porarylabelblockinwhichtheyare declared. ` H Temporarylabelscanbe redeclaredinanotherblockofsourcecode. ` J TemporarylabelsthatoccurwithinapsectwiththeMIXHorNOMIX attributedonotappearinthedebuggersym-K1boltable;thus,theycannotbeaccessedbythesymbolic= debugger.'Formore informationonpsects,seekChapter5. `  @  Temporary labelscannot beused in the .ENDor7a.PROCEDURE_DESCRIPTOR directives..Formore5 informationonthe.END directive,seeJChapter5.*kLlO*J}kO! dNOBy convention, temporarylabelsare positionedlike statementNOlabels:*left-justifiedinthesourcetext.)Although temporaryQO5labelscanappearintheprograminanyorder,by convention,ROthe temporarylabelsinanyblockofsourcecodeshouldbein%O increasingnumericorder.! JO Temporarylabelsareusefulasbranch addresseswhenyouPOusetheaddressonlywithintheblock.&Youcanuse temporaryLO5labelsto distinguishbetween addressesthatare referencedPOonlyinasmallblockofcodeand addressesthatarerefer-LOenced elsewhereinthemodule.'A disadvantageof temporaryMO>labelsisthattheirnumericnamesdonotprovideanyin-MOdicationoftheirpurpose.* Consequently,youshouldnotuseLO temporarylabelstolabel sequencesof statementsthatareHOH logically unrelated;youshoulduse user-definedsymbolsOinstead.dKODigital recommendsthatuserscreate temporarylabelsonlyLOintherangeof0$to29999$becausethe assemblerauto-OO5 maticallycreates temporarylabelsintherangeof30000$toKO65535$foruseinmacros.)Formore informationontempo-Orarylabels,seewSection4.7.*w|?! QOThe temporarylabelblockinwhicha temporarylabelisvalid8Ois delimitedbythe following statements:!  ` 5A user-definedlabel:&globalorlocal. `O HOA.PSECT directive.&Formore informationonthe.PSECT directive,seeChapter5.*klO1 iEbAnexampleshowingthecorrectand incorrectuseof% temporarylabelsfollows: @A:ADDQ&R1,%R2,%R3BEQ%R3,&2$y;%correct&useMULQ&R2,%R3,%R4F2$:pADDQ&R1,%R4,%R5;% definition&of& temporary%label_B:BNE%R5,&2$y_;%illegal C:SUBQ&R2,%R4,%R6% KbInthisexample,2$isa temporarylabeldefinedintheHblockbetweenA:andB:.+Theforward referenceintheNsecond instructionisproperly resolved.'ThelinelabeledB:Nlalso references2$,butthelabelBhasalreadyclosedtheJrange.*The temporarylabel2$canbeusedlaterintheIprogram,butits definitionmustappearwithinthesame vblockasthelabel. ` >The.ENABLEand.DISABLE directives,whichcanFMextendalocallabelblockbeyond user-definedlabelsCand.PSECT directives.-Formore informationonthe2.ENABLEand.DISABLE directives,seepChapter5.*plOLOA temporarylabelblockisusually delimitedbytwouser-?Odefinedlabels..However,the.ENABLE LOCAL_BLOCKTO5 directivestartsalocalblockthatis terminatedbyoneoftheO following: ` 4Asecond.ENABLE LOCAL_BLOCK directive `O >OA.DISABLE LOCAL_BLOCK directivefollowedbya7 user-definedlabelora.PSECT directiveT' *LO Temporarylabelscanbe preservedwiththecontextoftheNOprogramsectioninwhichtheyaredefinedforfuturerefer-LO5ence.'Formore informationonthe .SAVE_PSECT [LOCAL_BLOCK]/Oand.RESTORE_PSECT directives,seeChapter5.*PlO'j! @O2.7BLabel AddressesNOUIntheabsenceof optimizationand automaticdata alignment,ROlabel addressesaredefinedtobethepsectandoffsetofthe*Ocurrentlocationcounter(seemSection2.11)LatthepointwhereMO^thelabelisdefined.*Wheneither optimizationor automaticOOdata alignmentareenabled,the following additional consider-Oationsapply.'SeeSectionB.7-_for informationon optimizations$Ohand automatic alignment.*m?*?f <GO2.7.1BLabel Addresses, Optimization,andCode AlignmentIO4 Optimizationandcode alignmentcanaffectthe addressesIOassignedtolabelsdefinedinpsectsthathavetheEXEBOandNOMIX attributes./ Optimizationandcodealign-MO=mentaredisabledbydefault,andcanbeenabledwiththe:O /OPTIMIZEand /ALIGNMENT command-linequali-Ofiers(seeSection1.2.1),andthe.ENABLE directive(seeOGSection5.1).@"GIngeneral,the assemblerassignsthepsectandOOoffsetofthecurrentlocationcounterbefore optimizationorOO alignmentofcodelabels.'However,the assembleradjustsref-ROQerencestolabelsinbranch instructionstotheaddressoftheLOlabelafter optimizationandcode alignment processing.)TheQO assemblerdoesnotadjust referencestolabelswherethelabelMOZ referenceoccursinan expressionwithmorethanoneterm./OThe followingexampleshowsthis:$z8.PSECT%CODE,%EXE,&NOMIXzBSRR0,&10$,j;%R0%->%10$&(postoptimization)HO10$:LDAR1,& 20$-10$(R0);%R1%->%20$&(preoptimization)zJMP(R1)zW[...]O20$:*?$*O }?! kPOInthepreviousexample,the assembleradjuststhetargetad-QOdressoftheBSR instructiontobethelocationof10$afterMO5 optimizationandcode alignmenthavetakenplace.'Thus,theMObranchto10$ functionsas expected.&However,whenprocess-LOingtheLDA instruction,the assemblercomputestheoffsetMO>between20$and10$before optimizationandcode alignment.ROThus,theaddressof20$thatisstoredinR1istheaddressLOpriorto optimizationandcode alignment.) DependingontheKOHsequenceof instructionsbetween10$and20$,theaddressLObefore optimizationandcode alignmentmaydifferfromtheKOaddressafter optimizationandcode alignmentandtheJMPOOR instructionmaynottransfercontroltotheexpectedaddress. $LONotealsothatthe assembleronlyperformspostoptimizationQO adjustmentoflabel addresseswhenthelabelistheonlyterm-O5inthe expression.'Forexample:$z.PSECT%CODE,%EXE,&NOMIXz.BASE& R27,LINKAGE"zILDQR26,% ROUTINE1_ADDRzJSRR26,%(R26)"zLDQR26,% ROUTINE2_ADDRz!JSRR26,%(R26)ziRETR28 zNOP zNOPOb ROUTINE1:zRET(R26)O ROUTINE2:z:RET(R26)!z.PSECT%LINKAGE,%NOEXEOLINKAGE:O3ROUTINE1_ADDR:z{.ADDRESS&ROUTINE1OROUTINE2_ADDR:z .ADDRESS& ROUTINE2+0HOInthepreviousexample,the assembleradjuststhead-EOdressstoredwiththe.ADDRESSROUTINE1 directivetoKO5theaddressoflabelROUTINE1after optimizationandcodeIO alignment.)However,sincethe expressioninthe.ADDRESSJO ROUTINE2+0 directiveisnotasingleterm,the assemblerLO>addstheoffset0andtheaddressofROUTINE2beforeop-LO timizationandcode alignmentandstorestheresult.+SinceKOtheaddressstoredistheaddressbefore optimizationandMOHcode alignment,thesecondJSR instructionmaynottransfer8Ocontroltotheaddressthatis expected.d `:BO2.7.2BLabel Addressesand AutomaticData AlignmentFO4 Automaticdata alignmentcanaffectthe addressesas-DOsigned to labels in psects thathave the NOEXEor?OMIX attributes.4 Automatic data! alignment!is en-CO=abledwiththe.ENABLE ALIGN_DATA directiveorthe@O/ALIGNMENT=data command-lineoption.*Formorein-3O formationon automatic alignment,seeSection5.2.Formore8OG informationonthe.ENABLE directive,see_GSection5.3.*|?*_ |? kQOAlabelthatoccursina statementwitha data-storagedirec-ROtiveisassignedthepsectandoffsetofthestorage allocatedMO5bythe data-storage directive.*Ifthe data-storage directiveNOrequires automatic alignment,theaddressisassignedtothe-Olabelafter automatic alignment.z PQOThesameistrueoflabelsthatoccurin statementsbythem-QOselvesandthatarefollowedbyadata directiveinasubse-MO5quent statement.*However,ifalabeloccursina statementRObyitselfandisfollowedbya statementthatisnotadata-OOstorage directive,amacro directive,a conditional directive,NO>oralexical-stringsymbol assignment,thelabelisassignedSOthepsectandoffsetofthecurrentlocationcounterbeforeanyO automatic alignment.a! 7MOThe assembleronlyassigns addressestolabelsafteralign-NOmentunderthe conditions previously describedandonlywithLO5 automatic alignment.*Ifyouplacealabelbeforea.ALIGNMO directivethatmanuallyalignsthecurrentlocationcounter,QOthe assemblerassignstheaddressofthelabelbeforeperform-KO>ingthemanual alignment.'The followingexampleshowstheKO interactionoflabeladdress assignmentand automaticdataO alignment:t.ENABLE% ALIGN_DATA.PSECT&DATA,&NOEXE.BYTEp1B:;%The&byte%is%stored&in&psect&data%at%offset&0HOLA:J.PRINT&"Not%aligned"%;%Any% non-macro,%nonconditional;:;% statement,% including%this%.PRINT% directive=4;%prevents%A&from%being% automatically%aligned+:$;%--%A%is%assigned%offset%1 OlB:9:l;%B%is% automatically&aligned%to%offset&4OC:J.LONGp29:;%C%is% automatically&aligned%to%offset&4OD:J.ALIGN&08:;%The&.ALIGN%global% directive&prevents&D4:D;Kfrom%being% automatically%aligned&--'/;KD&is&assigned&offset%8OE:J.OCTA%3::;%E%is% automatically&aligned%to%offset&16 DO Automaticdata alignmentand label-address assignmentGOcanbean important considerationwhen calculatingtheOO5 differencebetweentwolabels.(Forexample,considerthefol-OOlowingmacro,whichstoresastringprecededbyawordthat*Ocontainsthestring'slength:3zk.MACRO%VARYING_STRING%STRING%?L1,%?L2.WORD%L2-L1L1:%.ASCII&"STRING" BL2:z.ENDM&VARYING_STRINGf FOIfan invocationoftheVARYING_STRINGmacroisfol-JOlowedbya data-storage directivethatrequires automaticGO5 alignment,theVARYING_STRINGmacrowillnotstorethe1Ocorrectstringlength.'Forexample:&z.PSECT%DATA,%NOEXE,%.OCTAzZ.ENABLE% ALIGN_DATAFzVARYING_STRING&%;&25&bytesOF:.OCTA&4R (ROInthisexample,the intentionistomaketheL2labelgener-IOatedbytheVARYING_STRINGmacrobeassignedtheoffsetQO527,2forthe.WORD directive,plus25forthe.ASCIIdirec-UOtive.)Instead,itisassignedtheoffset32alongwiththelabelKOFbecausethe.OCTA directiverequires automatic alignmentSO>tooffset32.( Therefore,thestringlengthis incorrectlystoredMOas30rather25.*Tomakethismacroworkasdesired,youPOmustinclude,inthemacro definition,amacro directivethatSOHisnota data-storage,macro,or conditional directiveaftertheOO generatedlabelL2.(Inthe followingexample,.ALIGN0isaTOgoodchoiceasitreflectstheideathatthe precedinglabelisORnotaligned:3t.MACRO&VARYING_STRING&STRING%?L1,&?L2/.WORD%L2-L1 fL1:%.ASCII%"STRING" L2:%.ALIGN%0t.ENDM%VARYING_STRINGp! FSOWiththischange,the generatedlabelL2isassignedtheoffsetJO27beforethe assemblerperforms automaticdata alignmentJO5forthe.OCTA directive.'Asaresult,theVARYING_STRINGNOmacroworksasdesiredandstoresthecorrectstringlengthOof25.$nZ&O2.8BTermsand Expressions4OUAtermcanbeanyofthe following:c ` Anumber. `O OAnumericsymbol. ` Alabel. `N FNThecurrentlocationcounter.)Formore informationon/thecurrentlocationcounter,seepSection2.12. `& H&Anyofthe previouslynoteditemsprecededbyaunary~ operator.*pi? }S )PO>tochangetheorderof evaluation.(Anypartofan expressionVOthatisenclosedinanglebracketsisfirst evaluatedtoasingleOOvalue,whichisthenusedin evaluatingthecompleteexpres-3OHsion.'Forexample,the expressionsA jT*HB+CandA T*CHareRO different.)Inthefirstcase,AandBare multipliedandthenQOCisaddedtotheproduct.*Inthesecondcase,BandCareRORaddedandthesumis multipliedbyA.YoucanalsouseangleNObracketstoapplyaunaryoperatortoanentire expression,Osuchas s.*z? NRO Expressionsfallintofour categories:' relocatable, absolute,ex-NOternal (global),andcomplex.)Youcan determinethetypeof0O5 expressionbythe followingrules:! H ` RAn expressionis relocatableifitsvalueisfixedrelativetoK(thestartofthepsectinwhichitappears.+ThecurrentHlocationcounteris relocatableina relocatablepsect. ` MAn expressionisabsoluteifitsvalueisan assembly-timeDY constant.+An expressionwhosetermsareallnumbersKis absolute.+An expressionthatconsistsofa relocatableB termminusanother relocatabletermfromthesameNcpsectis absolute,becausesuchan expressionreducestoan" assembly-time constant. `: P:An expressionisexternalifitisnotcomplex,anditcon-Itainsoneormoresymbolsthatarenotdefinedinthecurrentmodule. `k KkAn expressioniscomplexifitcontainsa relocatableorIexternaltermor subexpressionthatisoperateduponbyManoperatorotherthantheplussign( + )ortheminususign( uGu).(An expressionisalsocomplexifitcontainsmoreLthanonetermor subexpressionthatis relocatableorex-N&ternal.(An exceptiontothisruleisthe differencebetweenI~two relocatablesubexpressionsortermswherebothrelo-Mcatablevaluesoccurinthesamepsect.*Inthiscase,the#/ expressionis absolute.XIOComplex expressionsare constrainedtousethe followingOform:XB.OFORMATO) termoperatortermx<NOterm@O#Termisa relocatableorexternalsubexpression. OoperatorHO#OperatorisanyoftheMACRO-64 operators describedinO|Section2.10.MONeithertermcanitselfbeacomplexsubexpression.+IfyouOOospecifyacomplex expressionthatdoesnotmatchthecorrectMOform,the assemblerissuesa diagnosticerrormessageindi-QO catingthatthe expressionistoocomplex.)NotealsothattheKOy assemblerdoesnotattempttoreorder expressionstomakeKOyour expressionsmatchthecorrectform.)Forexample,the2O* following expressionistoocomplex:t .external&E1,%E2+t.quad% E1+5+E2+6K;&too%complex*O??6 $ LOBecausethe assemblerhasno precedencerules,itattemptsGOtoevaluatetheprevious expressionas<<+E2>+6>.LO5Since <+E2>isitselfacomplexterm,<<+E2>+6>GOdoesnotmatchthepreviousformandistoocomplex.LOHowever,youcanregroupthe expressionusinganglebrack-AO>ets(<>)tomatchtherequiredformasfollows:t .external&E1,%E2=t .quad% +J;%legal%complex& expression, LOInthiscase,bothandaresimple,externalJOterms.-Sincenoneofthetermsarecomplex,theexpres-NO5sionmatchesthecorrectformandthe assembleracceptstheOcomplex expression. NFOYoucanuseanytypeof expressioninmostMACRO-64PO statements,but restrictionsareplacedon expressionsusedin#O5the following contexts:  ` .BASE directive. `O O.BLK O x*Ostorage allocation directives. ` 8.IF conditionalassemblyblock directives. `N -N.REPEATrepeatblock directives. ` )Direct assignment statements. `L GLLexicalstringoperator arguments.&Formore information2ondirect assignment statements,seeSection2.11.*h?| OSeeChapter5Agfor descriptionsofthe directiveslistedintheO precedinglist.*FnO NJO Expressionsusedinthesecontextscancontainonlysym-SObolsorlabelsthathavebeen previouslydefinedinthecurrentO5module. WNOThe.BASE directiveaccepts expressionsthatcontainexternalEOsymbols previouslydeclaredwiththe .EXTERNALdirec-LO5tive.*Theothercontexts previously describedcannotacceptJO expressionsthatcontainexternalsymbols.*SymbolsdefinedOOlaterinthecurrentmodulecannotbeusedinanyoftheseO> contexts.+LO Expressionsinthe.IF conditional directives,.REPEATcon-OOditional directives,andlexicalstringoperator argumentsareIO5 relocatable.,However, expressionsinthe.BLKx directivesOmustbe absolute.j @EO Expressionscannotcontainfloating-pointnumbers..TheMOfloating-point data-storage directivesacceptconstantvalues.MO5Theydonotacceptfloating-point expressions.(Formorein-LO formationonthefloating-point data-storage directives,seeOChapter5.*OlOf a<DOThe followingexampleshowstheuseof expressions:OA&=%2*1000;%2*100%is%an%absolute% expressionAzP.BLKBpA+50;%A+50%is%an%absolute% expression&and-;pcontains%no% undefined%symbolsOLAB:.BLKWpA!;%LAB&is& relocatableO(HALF&=% LAB+*(;% LAB+&is&a% relocatable*p;p expression&and%contains%no;p undefined%symbolsKOLAB2:p.BLKBpLAB2-LABK;%LAB2-LAB%is%an%absolute% expression2H;pand%contains%no% undefined&symbols  !m wC.O2.11CDirect Assignment StatementsOOUAdirect assignment statementequatesasymboltoaspecificSOvalue.'Unlikeasymbolthatyouuseasalabel,youcanrede-NOfineasymboldefinedwithadirect assignment statementas%O^manytimesasyouwant.biOFORMATSO) symbol=expressionO symbol= =expressionOI symbol=quoted-literal\A2Osymbol"O(A user-definedsymbol.  O expressionKO(An expressionthatdoesnotcontainany undefinedsymbolsJOorforward references.)Formore informationontermsandO expressions,seeSection2.8.0@Theresultmustbeeitheranab-LO2soluteor relocatablevalue,whosevaluecanbe determinedMOatthecurrentpointinthe assembly.,ThisformdefinesaOnumericsymbol.UO~Theformatwithasingleequalsign( = )definesalocalsym-RObol,andtheformatwithadoubleequalsign(= =)definesaLO/globalsymbol.*Formore informationaboutlocalandglobalOsymbols,seeSection2.5.4.*|?*K? ePOThe followingthree syntacticrulesapplytodirect assignmentO statements:H   ` OAnequalsign( = )ordoubleequalsign(= =)mustsep-G(aratethesymbolfromthe expressionthatdefinesitsHvalue.+Spaces precedingor followingthedirectassign-Ement operatorshaveno significanceinthe resulting2value. ` MOnlyonesymbolcanbedefinedinasingledirectassign- ment statement. ` JAdirect assignment statementcanbefollowedonlybyacommentfield.B  OOForbestresults,Digital recommendsyouplacethesymbolinQOadirect assignment statementinthelabelfield.'Forexample:OaA&==&1+a;&The%symbol%'A'&is&globally';pequated%to%the%value%1OB&=%A@5*;&The%symbol%'B'&is&equated!Z;pto%1@5&or&32(dec)OC&=%127*10*;&The%symbol%'C'&is&equated ;pto% 1270(dec)OtD&=% ^X100/^X10*t;&The%symbol%'D'&is&equated;pto%10(hex) Oquoted-literalNO(Aliteralwithindoublequotes.,ThisformdefinesalexicalNOstringsymbol.)Youcanonlyuselexicalstringsymbolswith%Olexicalstring operators. [FOFormore informationon lexicalstring operators,!seeOChapter3.* OlO! "X  .*O2.12CCurrentLocationCounterOOUThecurrentlocationcounterisacounterkeptbyanassem-NOblerto determinetheaddressassignedtoan instructionorOOconstantthatisbeing assembled.'ThesymbolforthecurrentVO^locationcounter,theperiod( . ), representstheaddressoftheIOcurrentbyte.)MACRO-64setsthecurrentlocationcounterSOto0atthe beginningoftheassemblyandatthe beginningof&Oheachnewprogramsection.e ;COEveryMACRO-64source statementthat allocatesmem-POoryintheobjectmodule incrementsthevalueofthecurrentOO5locationcounterbythenumberofbytes allocated.'Forexam-MOple,the directive,.LONG0 incrementsthecurrentlocationQOcounterby4.'However,withthe exceptionofthespecialformPO> describedlaterinthissection,adirect assignment statementKOdoesnotincreasethecurrentlocationcounterbecauseno Omemoryis allocated.wMPOThecurrentlocationcountercanbe explicitlysetbyaspe-LOcialformofthedirect assignment statement.*ThelocationGO5countercanbeeither incrementedor decremented.,ThisNOmethodofsettingthelocationcounterisoftenusefulwhenGOdefiningdata structures.- Data-storageareasshouldnotMO>bereservedby explicitlysettingthelocationcounter;useOthe.BLK  x< directives.,Formore informationonthe.BLKO directive,see-Chapter5.*-lOPB&OFORMATO) .=expression@ O expressionKO(An expressionthatdoesnotcontainany undefinedorex-IOternalsymbols.-Formore informationon expressions,seeOSection2.8.SOuIna relocatablepsect,the expressionmustbe relocatable;thatROis,the expressionmustberelativetoanaddressinthecur-OO&rentpsect.-Italsomayberelativetothecurrentlocation!O~counter.'Forexample:O.&=%.+40.;%Moves%location%counter&forward*O|?  NPOWhenapsectthatyoudefinedinthecurrentmoduleiscon-UOtinued,thecurrentlocationcounterissettothelastvalueof;O5thecurrentlocationcounterinthatpsect.i??OInapsectwiththeEXEandNOMIX attributes:  ` 6Thelocationcountercannotbechanged. `O LOIf optimizationisenabled,thelocationcounter represents.thelocationbefore optimization.]JOInapsectwitheithertheEXEorNOMIX(orboth)at-O tributes:! - ` 3Thelocationcountercanbechanged. `O OOIfyoustoreaninitialdataor instructionvalueinmemoryHwithadata directivesuchas.BYTE,.WORD,.LONG,orI.QUADorwithan instruction statement,youcanreplaceRYthatinitialvaluewitha differentinitialvaluelaterintheGassemblyby assigningthe appropriateaddressvaluetoG thecurrentlocationcounterandenteringanotherdataDc directiveor instruction statement.-However,thenewNvaluemustbethesamesizeandmuststartatexactlythe6sameaddressasthevalueit replaces.{Q8OFormore informationon optimization,seeOSection2.7.1.*OF?^$#% (O3.2BLexicalOperatorSyntaxQOUYouinvokealexicalstringoperatorwithapercentsignfol-ROlowedbythelexicaloperatorname,aleft parentheses,alistLOof arguments separatedbycommas,andaright parentheses.IO^The followingexampleshowsthelexicaloperatorsyntax:*O .print"%EDIT(,)"KOSpacesareallowedbetweensyntaxelementsinthegeneralLOlexicaloperatorsyntax.+Forexample,the followingsyntax,*O5 includingspaces,isallowed:4O .print"%EDIT(,)"D OOSpacesarealsoallowedbetweentheopeningandclosingper-COcentsignsinalexical substitution operator.*SeeSection3.4EO5for informationonthelexical substitution operator.-O .print"%lexical_symbol_name%"*}?/ NKOSpacesarenotallowedbetweenthepairofpercentsigns8O indicatingalexicalescape operator..SeeSection3.5 for:O5 informationonthelexicalescape operator.*?2lMOYoucanspecifylexicaloperator argumentsinthesamewayOasmacro arguments: ! | ` DAnumericsymbolnameprecededbya backslash(\).M(This constructresultsinthedecimalvalueofthenumeric:symbol,asshowninthe followingexample: D\N ` IAnystringof characters surroundedbyleft-andright-Cangle brackets,asshowninthe followingexample:c)!kCbYoucannestanglebrackets( <> ).&Forexample: <*17> `f CfAnystringof characters surroundedbya delimiterH specifiedafteracaret character(^).,Youcannotnest$ delimiters.'Forexample:^%Foo%bar%thud% ` IAny undelimitedstringof charactersnot separatedbyaItspace,tab,formfeed,comma,equalsign, semicolon,or'endofline.&Forexample:RA+B+C"! POInadditiontotheformatsallowedforamacro argument,youHOcanalsospecifylexicaloperator argumentsasfollows:C# - ` EAn undelimitedstringof charactersmayalsocontainG(astringof charactersenclosedwithinleftandrightG parentheses.*The charactersbetweentheleftandrightI parenthesesmaycontainspace,tab,orcomma delimiters.2Forexample:16(%R27&) `6 L6Youcanusealexicaloperatorasanargumenttoanother+lexical operator.'Forexample:D %EXTRACT(% %LOCATE($,X),% %LENGTH(X)&-% %LOCATE($,X)&,X)$ NNOExceptforthe%TYPElexical operator,astringsymbolnameOOsuppliedasalexicaloperatorargumentisreplacedwiththe)O5valueofthestringsymbol.%NKOEachlexicaloperatoracceptsagivennumberof argumentsIOandeachargumenthasaspecifictype.-TherearethreeGO5 differenttypesofarguments-string,integer,andname:&!  ` DAstringargumentcanbeany arbitrarysequenceof( characters. ` HAnintegerargumentmustbeanabsoluteor relocatableL expressionthatcanberesolvedatthatpointintheas-HYsembly.*A relocatable expression representsapsectandQanoffsetwithinthatpsect.&Ifyouspecifya relocatableex-K pressionforaninteger argument,the assemblerusesonlyNcthevalueoftheoffsetwithinthepsect.*TheoffsetvalueJis determinedbefore optimizationandcode alignment,but!afterdata alignment. ` CThenameargumenttypeisusedonlybythe%TYPEIlexical operator.(The%TYPElexicaloperatoracceptstheLDnameofanumericsymbol,stringsymbol,label,psect,orFa permanentsymbolasits argument.*UnliketheotherMlexical operators,ifastringsymbolnameis specifiedasKNanargumentto%TYPE,thevalueofthestringsymbolisInot substitutedforitsname.)Instead, informationabout"thenameis returned.c'! 9TOIfyouomitastring argument,thedefaultistheemptystring.POAnemptystringisastringwithno characters.)IfyouomitKO5anintegerargumentorspecifyanillegal expression,theNOdefaultvalueis0.+The assemblerdoesnotissue diagnosticOOmessagesforillegal expressionsusedas argumentstolexicalPO> operators.'Ifyouomitthenameargumentorspecifyanille-MOgalnametothe%TYPElexical operator,%TYPEreturnsa0Ovalue.L <:=O 4.2Macro! ArgumentsMOByusingmacros,youcanuseasinglesource statementtoHOinsertasequenceofsource statementsintoaprogram.JOAmacro definitioncontainsthesource statementsoftheGOmacro.*Themacro definitionmayhaveformal arguments.GOiYoucanusetheseformal arguments throughoutthese-MOquenceofsource statementswithinthe definition.(WhentheLOmacroiscalled,theformal argumentsarereplacedbythe6Oractual argumentswithinthemacrocall.Z! 0QOThemacrocallisasinglesource statement consistingoftheGOmacroname, optionallyfollowedby arguments.+WhentheMO5macroiscalled,the assemblerreplacestheline containingOOthemacrocallwiththesource statementsinthemacrodef-JOinition.+The assemblerreplacesany occurrencesofformalMO> argumentsinthemacro definitionwiththeactual argumentsQO specifiedinthemacrocall.)ThisprocessiscalledthemacroO expansion. WMOBydefault,macro expansionsarenotprintedintheassem-OOblylisting.)Toprintthemacro expansions,youmustspecifyBO5the/SHOW=EXPANSIONS qualifierandargumentintheJOcommandline.(Notethattheexamplesofmacro expansionsSOusedinthischapterarelistedastheywouldappearusingthe5O>/SHOW=EXPANSIONS qualifierand argument.NAOUse.SHOWwithasymbolicargumentof EXPANSIONSNOinthesourcetextofaprogramtospecifythelistingofO5 expansions. KOMACRO-64providesspecific directivesfor controllingmacroCO execution.'For informationonthese directives,seekTable5-2.*kb? aJOThischapter describesmacro argumentsandcreatedtempo-Orarylabels. =<>I &O4.1BUsingMacro ArgumentsHOUMacroshavetwotypesof arguments:+actualandformal.OOActual argumentsarethetextgiveninthemacrocallafterKOthenameofthemacro.)Formal argumentsare specifiedbyOO^nameinthemacro definition;thatis,afterthemacronameJOinthe.MACRO directive.)Actual argumentsinmacrocallsLOandformal argumentsinmacro definitionscanbe separated2Ohbycommas( , ),tabs,orspaces. VKOThenumberofactual argumentsinthemacrocallcanbeKOlessthanorequaltothenumberofformal argumentsinMO5themacro definition.)Ifthenumberofactual argumentsisLOgreaterthanthenumberofformal arguments,the assembler'Odisplaysanerrormessage.GOFormalandactual argumentsnormallymaintainastrictLO positional relationship.,Thatis,thefirstactualargumentPO5inamacrocallreplacesall occurrencesofthefirstformalNOargumentinthemacro definition.)Thisstrict positionalre-IO lationshipcanbe overriddenbyusingkeyword arguments.EO>Formore informationonusingkeyword arguments,seeOSection4.3.*OZ|?tJIOAnexampleofamacro definitionusingformal argumentsOfollows:'Oa.MACROKSTOREKARG1,ARG2,ARG3O.LONGpARG1&;&ARG1%is%first%argumentO.WORDpARG3&;&ARG3%is%third%argumentO9.BYTEpARG2'9;&ARG2%is%second&argumentO.ENDMpSTOREL"KOThe followingtwoexamplesshowpossiblecallsandexpan-5Osionsofthemacro previouslydefined:OaSTOREp3,2,1a;&Macro&callO.LONGp3#;&3%is%first%argumentO.WORDp1#;&1%is%third%argumentO9.BYTEp2$9;&2%is%second&argumentOSTOREpX,X-Y,Z;&Macro&callO.LONGpX#;&X%is%first%argumentO2.WORDpZ#2;&Z%is%third%argumentOz.BYTEpX-Y&z;&X-Y%is%second%argumentE DF!  O5.1BProgramSectionsJOUMACRO-64allowsyoutodivideyourprogramintosectionsROcalledpsectsusingthe.PSECT directive.'PsectsareusefulforMO organizingyourprogram,andfor low-levelcontrolovertheRO^linkingprocess.&More importantly,eachpsectfallsintooneof,Othe followingthree categories:S_ ` ECODEpsectscancontainonly instructions.*Theycon-J(tainnodata.*PsectsinthiscategoryhavetheEXEand#NOMIXpsect attributes. ` IDATApsectscancontainonlydata.(Theycontainnoin-HY structions.(PsectsinthiscategoryhavetheNOEXEandNOMIX attributes. `1 F1MIXEDpsectscancontain instructions,data,orboth.DPsectsinthiscategoryhavetheMIX attribute./InA addition,theymayhaveeithertheEXEorNOEXE: attribute.[11OMACRO-64 categorizespsectsbecause:! 6 ` HThereisa significant performance compromise associatedG(withmixing instructionsanddatainthesameprogramHsectionwithintheAlphaAXP architecture.*Thisisbe-DcausetheAlphaAXP architecture typically maintainsA2separatememorycachesfor instructionsanddata. ` PIfyoumix instructionsanddata,itislikelythatinstruc-M tionswillmigrateintothedatacacheandthatdatawillIcmigrateintothe instructioncache.*Whilethis situationOstillyieldscorrectresults,thebenefitsofthe instructionJanddatacachesare diminished.)Placingdatainthein-Kl structionstreamcanalsohave detrimentaleffectsontheF instructionpipelineandthemultipleinstruction-issue@ capabilitiesthatmostAlphaAXPsystemsemploy.aLOSinceacodepsectcancontainonly instructionsandcan-OOnotcontain arbitrarydata, instructionsyouplaceinaCODEOO5psectcanbeanalyzedbythe assembler optimizerandbytheJOsymbolic debugger.+Sinceamixedpsectcancontainarbi-SOtrarydataaswellas instructions, instructionsyouplaceinaMO>mixedpsectarenotanalyzedbythe assembler optimizerorLObythesymbolic debugger.)Instead,the assembler internallyOOconverts instructionsinamixedpsecttoan equivalentdataOHrepresentation.IOBecauseofthe compromises associatedwithmixedpsects,HObydefaultthe assemblercreatespsectswiththeNOMIXTO5psect attribute.)IfyouneedtoplacedatainapsectthathasQOtheEXE attribute,orifyouneedtoplace instructionsinaLOpsectthathastheNOEXE attribute,youmustalsospecifyMO>theMIX attributeinthepsect's definition.+Notethatun-ROliketheotherpsect attributes,theMIXpsect attributeisanJO assembly-time attribute.*TheMIXpsect attributedoesnotPOHappearinthepsect definitionsinyourobjectmoduleandit3Odoesnotaffectthelinkingprocess.NOYoucanuseall assembler directivesand instructionswithinEOmixedpsects./Whilemany assembler directivescanbeLO5usedwithinbothcodeanddatapsects, data-storagedirec-KOtivescannotbeusedincodepsectsand instructionsandNOinstruction-storage directivescannotbeusedindatapsects.OO>Ifyouplace instructionsorinstruction-storage directivesinTOadatapsect,orifyouplace data-storage directivesinacodeAOpsect,the assemblerissuesa diagnosticmessage.9Section5.3OOH indicatesthe applicabilityofeach directivewithincodeandOdatapsects.*9}?a 7KOInsummary,codepsectsmaycontainonlystorageforin-OO structionsandstoragecreatedby instruction directives.(DataMO5psectsmaycontainonlystoragecreatedbydata directives.MOMixedpsectsmaycontaineitherstoragefor instructionsorTOdataorboth.(Thereareno restrictionsontheuseofdatadi-LO>rectivesinamixedpsect.)However,the assemblerconvertsLO instructionsyouplaceinamixedpsecttoadatarepre-MO sentation.+ Therefore, instructionsinamixedpsectarenotOOHanalyzedas instructionsbyeitherthe assembler optimizerorKOthesymbolic debugger.'Formore informationonthe.PSECTO directive,see-Section5.3.*-|?/XWYLtv"O.DISABLEO].DSABL*u\v22ODisable assembler functions directivezwPOFormat!Os .DISABLEN argument-listO .DSABLM argument-listxFvO ParameterOs argument-listAOOneormoreofthesymbolic argumentslistedin:Table5-3KO$underthe descriptionof.ENABLE.YoucanuseeithertheLO|longortheshortformofthesymbolic arguments.+IfyouDOspecifymultiple arguments,separatethembycommas,O-spaces,ortabs.*x:b?yO DescriptionLOs.DISABLEdisablesthe specified assembler function.)Seethe;O descriptionof.ENABLEformore information.9OfThe alternateformof.DISABLEis.DSABL. ZY\Kv!O.ENABLEO].ENABL*[11OEnable assembler functions directiveyOOFormat Os .ENABLEM argument-listO .ENABLM argument-listXO ParameterOs argument-listAOOneormoreofthesymbolic argumentslistedin8Table5-3.OO$YoucanuseeitherthelongformortheshortformoftheO|symbolic arguments.FOIfyouspecifymultiple arguments,separatethemwith%Opcommas,spaces,ortabs.*8b?O DescriptionHOF.ENABLEenablesthe specifiedassembly function.(.ENABLELOanditsnegativeform, .DISABLE,controlthe followingas-Osembler functions:. ` (Creatinglocallabelblocks `O HO Specifyingthat undefinedsymbol referencesareexternal references `' I'Enablingor disablingspecific optimizationsfortheas-semblyunit sPOYoucanenableoneormorespecific optimizationoptionswithGOeitherthe.ENABLE directiveorthe /OPTIMIZEcommand-KOiline qualifier,orboth.)Formore informationoncommand- Oline qualifiers,seeSection1.2. SeeSectionB.7for informationSOonoptimizations.'Ifyou explicitlydisableoneormorespecificNOr optimizationoptionswiththe.DISABLE directive,thoseopti-MOmizationoptionsaredisabled regardlessofthe command-line O#optionsyouspecify.ONotes*|?*?mC ` 8The alternateformof.ENABLEis.ENABL.<OExamplesY/Example1B4The followingexampleshowsthe ALIGN_DATAoption:.PSECT%A,%NOEXE4.ENABLE& ALIGN_DATAK;%Align%on%natural I;%natural% boundariesA:%.BYTE%1 ;B:%.QUAD%1000!;%B%is% allocated%at$!;%a%natural&boundary&-&h;% specifically&at&A%+%7!.DISABLE% ALIGN_DATA&;C:%.BYTE%2 ;@D:%.QUAD%1001!@;%D%is% allocated%at';%an% unaligned&boundary&-";% specifically&C%+%1Example2C4The followingexampleshowstheGLOBALoptiondis-abled:.DISABLE%GLOBALY.ADDRESS%X*Y;% Assembler%issues&a%warning.END \Example3B4The followingexampleshowsthe LOCAL_BLOCKoptionenabled:.ENABLE& LOCAL_BLOCK{.PSECT%A,NOEXEA1::E 5$:p.PROCEDURE_DESCRIPTOR%PROC_1p;% Temporary%label%5$R.blkb%32A2::.address%5$*;%By%default%the% declaration,*;%of%A2%would%have%ended%the)r;% temporary&label&block&and*;%made%this& reference%to%5$.;%illegal.KHowever,&this%default,J;%behavior%has&been% overridden4;%by%the&use%of%.ENABLE& LOCAL_BLOCK..DISABLE% LOCAL_BLOCKC.END3Example4C4The followingexampleshowsan unoptimizedandop-Ctimizedlistof instructionswiththeSCHEDULEand%PEEPHOLEoptionsenabled:$j.ENABLE&PEEPHOLE,SCHEDULE,.psect% A,EXE,QUAD;% unoptimizedTRAPBBA::ADDF&F1,F2,F3DADDF&F4,F5,F6DADDL&R1,R2,R3DADDL&R4,R5,R6"GThisexampleshowsthe optimizedlistof instructions:$<.ENABLE&PEEPHOLE,SCHEDULE*.psect% A,EXE,QUAD;% optimizedA::ADDF&F1,F2,F3DADDL&R1,R2,R3D\ADDF&F4,F5,F6DADDL&R4,R5,R6qGJThe followingexampleshowsarepeatblockthatinitial-Nizesablockof1000 longwordstothevaluesof0through75999.,The.DISABLEPREPROCESSOR_OUTPUTdi-Drective suppressesfromthe preprocessoroutputfileFthose statementsthatare incompatiblewiththeOSF/1> Assembler.'.DISABLE%PREPROCESSOR_OUTPUT I=0S.REPEAT&1000&D.ENABLE&PREPROCESSOR_OUTPUTD.LONG% %INTEGER(I)'D+.DISABLE%PREPROCESSOR_OUTPUTDsI&=%I%+&1.ENDRqpr9>O.LIST*?F@OListing directiveZA0OFormat Os .LISTN[argument-list]B! FO ParameterOs argument-listBOOneormoreofthesymbolic argumentsdefinedinyTable5-7.PO$(Seethe.SHOW directiveforthistable.))YoucanuseeitherRO|thelongformortheshortformofthe arguments.'IfmultipleLO argumentsare specified,separatethemwithcommas,spaces,O-ortabs.*Bya?CO DescriptionMOs.LISTis equivalentto.SHOW.Seethe descriptionof.SHOW!Oformore information. t suOR%%O.LOCAL_PROCEDURE_DESCRIPTOR*S^T44O Procedure descriptorlabeling directiverUHOFormat8Os .LOCAL_PROCEDURE_DESCRIPTORNpd-name,ca-nameV=O ParametersOspd-nameMOThenameofthe procedure descriptor.(ThisnamecanbeupIO$to31 characterslong.'Itcannotbea temporarylabel.W! ~Oca-nameMOThenameofthecodeaddressthat correspondstothepro-LOqcedure descriptor.+ThisnamemustbedefinedlaterintheNOprogramasalabelinapsectthathaseithertheEXEorQO"MIX attribute,orboth.'Thisnamecanbeupto31 characters5O{long.'Itcannotbea temporarylabel.X! O Description9Os.LOCAL_PROCEDURE_DESCRIPTORdefinesabival-SOuedlocal identifierthatisusedto representalocalroutine.LO$Thefirstvalueisthe procedurevalue,whichisthead-NO|dressofthe procedure descriptor.+ThisvalueisdefinedasOOthecurrentlocationcounteratthepointwhereyouusethe  tributes).&Formore informationonpsects,seeP Section5.1. `$ G$ If automaticdata alignmentisenabled,this directiveL| alignsthecurrentlocationcountertoaquadword(64-bit)A boundarybeforedefiningthe procedure identifier.*Xd-}?*XPg |?hY{>OExample-b.LOCAL_PROCEDURE_DESCRIPTOR%LP1,C1|{}:O.NLIST*Q''OListing exclusion directive[1OFormat!Os .NLISTM[argument-list]FuO ParameterOs argument-listAOOneormoreofthesymbolic argumentslistedin8Table5-7.QO$(Seethe.SHOW directiveforthistable.))UseeitherthelongKO|formortheshortformofthe arguments.,IfyouspecifyJOmultiple arguments,separatethemwithcommas,spaces,orO-tabs.*8b?O DescriptionIOs.NLISTis equivalentto.NOSHOW.Seethe descriptionof(O.SHOWformore information.}|~;O.NOSHOW*Q''OListing exclusion directive\2OFormat"Os .NOSHOWN[argument-list]]O ParameterOs argument-listAOOneormoreofthesymbolic argumentslistedin:Table5-7LO$inthe descriptionof.SHOW.UseeitherthelongformorKO|theshortformofthe arguments.,IfyouspecifymultipleGO arguments,separatethemwithcommas,spaces,ortabs.*:b?! O DescriptionOOs.NOSHOW specifieslistingcontroloptions.'Seethe description,Oof.SHOWformore information.j;O.PACKED*_55OPackeddecimalstringstorage directived:OFormat*Os .PACKEDMdecimal-string[,symbol]=O DescriptionGOs.PACKEDissuppliedasalibrarymacrowith MACRO-64.NOFor informationaboutthis directive,seethe descriptionofO$.PACKEDin($Chapter6.*(lOa  IO.PROCEDURE_DESCRIPTOR*^44O Procedure descriptorlabeling directivelBOFormat2Os .PROCEDURE_DESCRIPTORNpd-name,ca-name=O ParametersOspd-nameMOThenameofthe procedure descriptor.(ThisnamecanbeupIO$to31 characterslong.'Itcannotbea temporarylabel.! ~Oca-nameMOThenameofthecodeaddressthat correspondstothepro-LOqcedure descriptor.+ThisnamemustbedefinedlaterintheNOprogramasalabelinapsectthathaseithertheEXEorQO"MIX attribute,orboth.'Thisnamecanbeupto31 characters5O{long.'Itcannotbea temporarylabel. O Description=Os.PROCEDURE_DESCRIPTORdefinesabivaluedglobalMO identifierthatisusedto representaglobalroutine.-TheKO$firstvalueisthe procedurevalue,whichistheaddressLO|ofthe procedure descriptor.-ThisvalueisdefinedastheJOcurrentlocationcounteratthepointwhereyouusethe?O-.PROCEDURE_DESCRIPTOR directive.*ThesecondvalueQOisthecodeaddress,whichisthecode entry-pointaddressofNOthe procedure.(ThisvalueisdefinedbythesecondargumentEO7tothe.PROCEDURE_DESCRIPTOR directive.'NostorageisO allocated.O6Notes ` Seethe$ OpenVMSCallingStandard#forafull description%of procedure descriptors. ` ;Youmustspecify.PROCEDURE_DESCRIPTORbefore5thecodeoftheroutineit describes. `j  jSeeajSection6.7=jfora descriptionofthe$PROCEDURE_DESCRIPTOR@and$ROUTINElibrarymacros.*ThesemacrosdefineIthe procedure identifieranddefinethestorageforthe t procedure descriptor. ` GYoucanonlyusethis directivewithindataormixedBL psects(psectsthathaveeithertheNOEXEorMIX4  attributes).'Formore information,see= Section5.1 `$ G$ If automaticdata alignmentisenabled,this directiveL| alignsthecurrentlocationcountertoaquadword(64-bit)A boundarybeforedefiningthe procedure identifier.*a-y?*=g {?Mea;(O 6.2MACRO-64!Supplied!MacrosMOThischapter describesthelibrarymacrossuppliedwiththeGOMACRO-64 assembler.)ThesemacrosmakeiteasyforyouSOBtodefineandcall routines.(Foradetailed descriptionofeachOmacro,seeSection6.7.*a^|?b )zLOThischapteralso describesthe$OPDEFmacro,whichallows.Oyoutodefineyourownopcodes.?c )*O6.1BMACRO-64SuppliedLibraryJOUTheMACRO-64 assemblerprovidesalibraryofmacrosthatEOhelpyoutoprogramin conformancewiththeOpenVMSJOCalling Standard.-ThislibraryalsoallowsyoutodefineHO^yourownopcodesandpackeddecimaldata.,Thelibrary,JOcalled MACRO64.MLB,is installedonyoursystemwiththeOMACRO-64 assembler.@dexplainshowtoprogrammore effectivelyusingGOtheMACRO-64assemblylanguagewithinthe frameworkof*O5theOpenVMSCalling Standard.*gOFO#pcurrentpsect.+ Similarly,invoking$LINKAGE_SECTIONMOmakesthelinkagepsect associatedwiththecurrentroutineOthecurrentpsect.tNIOYoucanalsocontrolthepsectnameand attributesforLOeachoftheprogramsectionsbydefining argumentstothe8O5$ROUTINEmacro.&Formore information,see5Section6.7.*t|?u .O6.3.2BUsing Macro-DefinedSymbolsMO4Whenyouuseanyofthesuppliedmacros describedinthisOOchapter,withthe exceptionof$OPDEF,the followingregister*Osymbolsaredefinedforyou:v : .DEFINE_IREG$IA0R16;Integerargument0:. .DEFINE_IREG$IA1R17;Integerargument1: .DEFINE_IREG$IA2R18;Integerargument2: .DEFINE_IREG$IA3R19;Integerargument3:7 .DEFINE_IREG$IA4R20;Integerargument4: .DEFINE_IREG$IA5R21;Integerargument5A .DEFINE_FREG$FA0F16;Floating-pointargument0AA .DEFINE_FREG$FA1F17;Floating-pointargument1A .DEFINE_FREG$FA2F18;Floating-pointargument2A .DEFINE_FREG$FA3F19;Floating-pointargument3AK .DEFINE_FREG$FA4F20;Floating-pointargument4A .DEFINE_FREG$FA5F21;Floating-pointargument5A .DEFINE_IREG$AIR25;Argument-informationregis- Tter= .DEFINE_IREG$RAR26;Return-addressregister> .DEFINE_IREG$PVR27;Procedure-valueregister3^ .DEFINE_IREG$FPR29;Framepointer3 .DEFINE_IREG$SPR30;Stackpointer 9_U<Note 9_7SPandFPremain predefinedbyMACRO-64;whetherornotyouusetheOpenVMSCallingArStandardmacros.+$SPand$FParedefinedbythe>OpenVMSCallingStandardmacrosfor consistencyG# withtheotherregister definitionsthat correspondto<{ OpenVMSCallingStandardregister conventions. "w JOThe followingsymbolsaredefinedbythe$ROUTINEmacro.DOThesesymbolsareusefulwhile programmingwiththeHO5calling-standardmacrostoreferto particulardataand"Olinkagesectionitems.zx! P ` K$CS-Theaddressofthe beginningofthecurrent routine's.codesection. ` K$LS-Theaddressofthe beginningofthecurrent routine'slinkagesection. ` K$DS-Theaddressofthe beginningofthecurrent routine'sdatasection. `] B]$DP-Thelinkagesectionaddresswherethe$ROUTINEHmacroplacesthe.ADDRESS$DStoenableaccesstotheIdatasectionfromthelinkagesection(thisvariableisf optional). ` L $SIZE-Thesizeofthe fixed-stackareainbytes.'$SIZEisK>definedusingthevalue specifiedwiththeSIZE argument. ` E$RSA_OFFSET-Theoffsetwithinthe fixed-stackareatoEotheregistersavearea.* $RSA_OFFSETisdefinedusingAthevalue specifiedwiththe RSA_OFFSET argument. `G GG $RSA_END-Theoffsetwithinthe fixed-stackareatotheGfirstbytebeyondtheendoftheregistersavearea.y! oLOFormore information,seethe descriptionforthe$ROUTINE#Omacrointhischapter.z a@OThe$CALLmacroalsodefinesthe$STACK_ARG_SIZELOsymbol.,Thissymbol specifiesthenumberofbytesusedtoRO5store argumentsonthestack.'Thisvalueisusefulaftercall-TOingaroutinethatreturnsavalueonthestack.)Inthiscase,FO$CALLcannotremovethe argumentsfromthestackbe-LO>causeyoumustfirstretrievethereturnedvaluefromtheGOstack.+ Subsequently,youcanremovethe argumentsfromEOthestackusingthe$STACK_ARG_SIZEsymbol.*FormoreLOH information,seethe descriptionof$CALLinthischapter.r{! VH*O6.3.3BDefining ProcedureTypeIO4TheOpenVMSCallingStandarddefinesfourtypesofrou-OOtines;stack, register,null,andbound.)Formore information'Oontypesof routines,seeSectionB.5Sandthe{ OpenVMSCallingO= Standard =.*{?|Z MOYoucandefinetheroutinetypebyusingtheKINDkeyword=Oargumentwith$ROUTINEor$PROCEDURE_DESCRIPTORGO5macros.+Thevalidityandvaluesofother$ROUTINEand7O$PROCEDURE_DESCRIPTORmacro parametersareLO determinedbythetypeofroutinebeing declared.+Forex-RO>ample,anull proceduretypehasnostacksize; therefore,thePOSIZE parameterisinvalidandcannotbe specifiedforanullFO proceduretype.+WhenusingtheKINDkeywordwiththeOby specifyingtheSTANDARD_PROLOGUEargumentas@O5FALSEandusingthe $END_PROLOGUEmacrotomarkLOtheendofyourprologue sequence.,Inthiscase,youmayHOwishtousethe$SIZEand $RSA_OFFSETsymbolstosym-OO> bolicallyspecifythe fixed-stacksizeandregistersavearea Ooffset, respectively.NKOFormore informationontheprologuesequenceofinstruc-KOtionsthatmustoccuratthe beginningofallstackand'O5register routines,seethe$5 OpenVMSCallingStandard 5. 6O6.3.5BUsingMacrosinEpilogueSectionsLO4Withstackandregister routines,youcanusethe$RETURNFOmacrotogenerateanepilogue sequence./Alternatively,COyoucan code yourown epiloguesequenceusingthe9O=$BEGIN_EPILOGUEand $END_EPILOGUEmacrostoHOmarkthe beginningandendofyourepilogue sequences.NIOTheOpenVMSCallingStandardalso describestheepilogueNOsequenceof instructionsthatmustbeexecutedeverytimeaAO5stackorregisterroutinereturnstoitscaller.g   *O6.6B ProgrammingConsiderationsJOUThissection discussessome programmingconsiderationsyouNOneedtobeawareofwhenusingthecalling-standardmacros.F JBO6.6.1BMakingMultipleCallsFromtheSameRoutineHO4The$CALLmacro generatesthe following instructionse-Oquence:-tLDQ&R26,%code_address_offset(Rls) O;&load%code%addressQtYLDQ&R27,%(procedure_descriptor_address_offset(Rls)%;&load% procedure; descriptor;addresst1JSR&R26,%R26 1;' QOThecontentsofR26andR27areerasedasaresultofusingNOthe$CALLmacro.(Thisis importantsinceRlsintheprevi-QOioussequenceis typicallyR27.'Thus,ifyourequire subsequentMOaccesstoyourlinkagesection,suchaswhenmakingsubse-POquentcalls,youneedtomakeaworkingcopyofR27touse"Orafterthefirstcall.rExample6-2)rshowshowthis techniqueisOused.*5O7 JONotethat$CALLalso overwritesthevaluesintheargu-LOment registers,andthescratch registers specifiedortheCO5defaultsetbythe SCRATCH_REGS argument,whenyou4Opass argumentstothecalledroutine.E%O6.6.2B NonstandardLinkageHO4Undercertaincircumstances,theremaybe advantagesinKOusinga nonstandardroutinelinkage.(Formore information, OseeAppendixBandthe$ OpenVMSCallingStandard .*O]&O6.6.3BRoutine RestrictionsLO4 Differentroutinetypeshave different capabilitiesandre-NO strictions.+Forexample,onlyastackroutinethat specifies?OBASE_REG_IS_FP=TRUEcanmakestandardcalls.+ForLO=more information,seethe descriptionfor$ROUTINEinthisOchapter.NROFora descriptionofthe different capabilitiesand restrictions5O associatedwitheachroutinetype,seeSectionB.5Qandthe$O5 OpenVMSCallingStandard C5.*?J Z0)OB.! Programming"with!MACRO-64GOdThisappendixcontains informationtohelpyouprogramEOmore effectivelyusingtheMACRO-64assemblylanguageJOwithinthe frameworkoftheOpenVMSCalling Standard.(It1On discussesthe following information:B `  Programminghints(SectionB.1) `O ,OTheOpenVMSCallingStandard(OSectionB.2) ` 5 Accessingmemorywithbase registers(tSectionB.3) `N (NTypesofdata structures(NSectionB.4) `  Typesofroutines(SectionB.5) `L .L Establishingself-addressability(lLSectionB.6) ` 4 Optimizationand automatic alignment(SectionB.7)*?*?*t?*?*?*l? *?)IOFormore informationontheAXP environment,youshould:Obecomefamiliarwiththe followingmanuals: ` 0 Alpha Architecture ReferenceManual `O $O OpenVMSCallingStandard ` "AlphaAXP architectureY1w/#OC.2BRunning DiagnosticsIOUYoucanrun diagnosticsinLSEtodebugprogramswith-LOoutleavingtheLSEeditor.*Formore information,seetheBO GuidetoLanguage-SensitiveEditorforVMSSystems and(O^theMACRO-64releasenotes.2DOWhenrunning diagnosticsinanLSEeditingsession,DOMACRO-64displayserrormessagesof differentsever-IO5itylevels.-Formore informationonerror messages,seeOAppendixE.*2OPOn<3 +O D.! Differences!from!VAX!MACROIOMACRO-64isanewproductthatprovidesamacroassem-MOblylanguageforthenativeAlphaAXP instructionset.)TheJOBMACRO-64 instructionsetis completely differentfromtheHOVAXMACRO instructionset.)Althoughmanyofthedirec-DOtivesarethesamebetweenVAXMACROand MACRO-64,JOLitwouldnotbe practicaltoshare instruction sequences1Obetweenthetwoassembly languages.4! WBOWhileMACRO-64is compatiblewithVAXMACRO,evenEOallowingsharedsourcemodulesbetweenVAXMACROandFO5MACRO-64usingcommon assembler directivesandthroughNO conditional assembly,several differencesexist.(ThisappendixMOcontainstwosections describingthe differencesinassembly1O> directivesandfeaturesasfollows:+5 ` SectionD.16{ describesnewfeaturesinMACRO-64that,(arenotpresentinVAXMACRO. ` SectionD.28z describesfeaturesinVAXMACROthatare%notpresentin MACRO-64.*5?6*5k?S j\N\A24s+G(.+,* `"!7SpB wC%)8l> 8 |Ab*;<'*$H DOP G: V$V ^X ]KfpE\z]~sp`Bd,Aqmr wNzz} D*Yp8 L H >:IT% ,&"fT" x  JV.X4k,z DJ fV -6//h f$()L+-E.2R^35_:@DjB=HP\: bOe(yhrJ{.>n9xJb; x'&P$ Dy @BhFYDjd|En 4 s<oZD|<0X/ L >D4zKnML? O#!f '$ ag 0 59O=3X FYRFZ _ce j0rk3B#S2 0ZoA"e:eGv?\OI(FCKZHPjIpkLJ zQb4Lls "zwB{fjJt( 2[+B 0aCrgJN/0ZbGhx "Xj|D(t7u dnikfK*jDZzj !x+&U4~Z-Q#<0 >@> N>