DECBLISS32  "h BLISS Language Reference Manual `24358PROBOOKBROWSER  Contents  Tables Index:$B*$VAX DOCUMENT V2.1K0Kjuk,! ,z DK Bg}/ gCONTENTSCONTENTS8 E\TitlePageTitle Page@E\ CopyrightPageCopyright Page1xE\PrefacePreface @g$K1 Introduction1 IntroductionQg& $K1.1&KBLISSDialects1.1 BLISS Dialectsw,A $K1.24&KLanguage ObjectivesandCharacteristics1.2 Language Objectives and CharacteristicsSl##$A1.2.1Design Objectives1.2.1 Design ObjectivesSl##$A1.2.2LanguageOverview1.2.2 Language Overview![w+ $K1.3&KProgram Development1.3 Program Development&lg5 $K1.4(&KTheMainFeaturesofBLISS1.4 The Main Features of BLISS*8\ $A1.4.1Data1.4.1 Data+Sl##$A1.4.2Memory Addressing1.4.2 Memory Addressing.Ol!!$@1.4.3FetchingValues1.4.3 Fetching Values1Ql""$@1.4.4 AssigningValues1.4.4 Assigning Values6Fl$@1.4.5 Expressions1.4.5 Expressions;<\ $A1.4.6Blocks1.4.6 Blocks@H\$A1.4.7 Declarations1.4.7 DeclarationsLD\$A1.4.8 Structures1.4.8 StructuresUP\""$@1.4.9FlowofControl1.4.9 Flow of ControlZ<l $@1.4.10Loops1.4.10 Loops`Tl$$$@1.4.11BindingofNames1.4.11 Binding of Namesdew0 $L1.5#&LProgramTransportability1.5 Program Transportabilitykdw0 $K1.6#&KEffectsof Optimization1.6 Effects of Optimizationoow!6 $K1.7)&KTheBLISS ProgrammingSystem1.7 The BLISS Programming SystemrSl##$@1.7.1System Components1.7.1 System ComponentsuYl&&$@1.7.2Constant Expressions1.7.2 Constant Expressions}Zw+ $K1.8&KACompleteProgram1.8 A Complete Programzw*88$L2Lexical DefinitionsandSyntaxNotation2 Lexical Definitions and Syntax Notationfg1 $K2.1$&K Charactersand Linemarks2.1 Characters and LinemarksD\$A2.1.1 Characters2.1.1 CharactersB\$A2.1.2 Linemarks2.1.2 LinemarksZw+ $K2.2&KLexemesandSpaces2.2 Lexemes and Spaces>\$@2.2.1Lexemes2.2.1 LexemesXl&&$@2.2.2SpacesandComments2.2.2 Spaces and Comments^w- $K2.3 &KThe SeparationRules2.3 The Separation Rules\w, $L2.4&LTheSyntaxNotation2.4 The Syntax NotationOl!!$A2.4.1 SyntacticRules2.4.1 Syntactic Rulesl-;;$A2.4.2 SyntacticNamesand SyntacticLiterals2.4.2 Syntactic Names and Syntactic LiteralsL\$@2.4.3Concatenations2.4.3 ConcatenationsHl$@2.4.4 Disjunctions2.4.4 DisjunctionsHl$@2.4.5 Replications2.4.5 Replications[\''$A2.4.6 Dialectal Differences2.4.6 Dialectal Differencesvw(66$L3BLISSValuesandDataRepresentations3 BLISS Values and Data RepresentationsMg$ $K3.1&KBLISSValues3.1 BLISS ValuesO\!!$A3.1.1FullwordValues3.1.1 Fullword ValuesI\$@3.1.2FieldValues3.1.2 Field ValuesQl""$A3.1.3 ExtendingValues3.1.3 Extending ValuesOw% $K3.2&KDataSegments3.2 Data Segmentsl2BB$@3.2.1 AddressableUnitsandUnitsperBLISSValue3.2.1 Addressable Units and Units per BLISS Value>\$A3.2.2Scalars3.2.2 Scalars!S\##$A3.2.3VECTOR Structures3.2.3 VECTOR Structures6Y\&&$A3.2.4 BITVECTOR Structures3.2.4 BITVECTOR StructuresCQ\""$A3.2.5BLOCK Structures3.2.5 BLOCK StructuresJ]\(($@3.2.6 BLOCKVECTOR Structures3.2.6 BLOCKVECTOR StructuresR[l''$@3.2.7 Programmed Structures3.2.7 Programmed StructuresZdw0 $L3.3#&L CharacterSequenceData3.3 Character Sequence Data[rl'33$A3.3.1General CharacterRepresentation3.3.1 General Character Representation^ll$00$A3.3.2 CharacterSequence Operations3.3.2 Character Sequence Operationsetl(44$A3.3.3BLISS-16 CharacterRepresentation3.3.3 BLISS-16 Character Representationktl(44$@3.3.4BLISS-32 CharacterRepresentation3.3.4 BLISS-32 Character Representationotl(44$@3.3.5BLISS-36 CharacterRepresentation3.3.5 BLISS-36 Character Representations]w, $L3.4&LStorage Organization3.4 Storage OrganizationxC\$A3.4.1TheStack3.4.1 The Stack|Kl$A3.4.2The Registers3.4.2 The Registers~ll#11$A3.4.3StorageforaProgramModule3.4.3 Storage for a Program ModuleOw!!$K4Primary Expressions4 Primary ExpressionsFg  $K4.1&K Primaries4.1 Primaries<l $@4.1.1Syntax4.1.1 SyntaxB\$@4.1.2 Semantics4.1.2 SemanticsTg' $L4.2&LNumeric-Literals4.2 Numeric-Literals<l $A4.2.1Syntax4.2.1 SyntaxH\$A4.2.2 Restrictions4.2.2 Restrictions@\$A4.2.3Defaults4.2.3 DefaultsB\$@4.2.4 Semantics4.2.4 SemanticsSw' $K4.3&KStringLiterals4.3 String Literals<l $A4.3.1Syntax4.3.1 SyntaxH\$A4.3.2 Restrictions4.3.2 Restrictions@\$A4.3.3Defaults4.3.3 DefaultsB\$A4.3.4 Semantics4.3.4 Semantics>g  $K4.4&KPLITs4.4 PLITs<l $@4.4.1Syntax4.4.1 SyntaxH\$A4.4.2 Restrictions4.4.2 Restrictions@\$@4.4.3Defaults4.4.3 DefaultsB\$@4.4.4 Semantics4.4.4 SemanticsDl$A4.4.5 Pragmatics4.4.5 Pragmatics>g  $K4.5&KNames4.5 Names<l $A4.5.1Syntax4.5.1 SyntaxH\$@4.5.2 Restrictions4.5.2 RestrictionsB\$@4.5.3 Semantics4.5.3 Semantics@g  $K4.6&KBlocks4.6 Blocks\g+ $L4.7&LStructure-References4.7 Structure-ReferencesNg$ $K4.8&K Routine-Calls4.8 Routine-CallsTg' $K4.9&KField-References4.9 Field-References Qg&$K4.10&KCodeComments4.10 Code Comments >l$@4.10.1Syntax4.10.1 Syntax D\$@4.10.2 Semantics4.10.2 Semantics[w''$L5 Computational Expressions5 Computational Expressions\w+ $K5.1&KOperator-Expressions5.1 Operator-Expressions<l $A5.1.1Syntax5.1.1 SyntaxH\$@5.1.2 Restrictions5.1.2 Restrictions@\$A5.1.3Defaults5.1.3 Defaults#B\$@5.1.4 Semantics5.1.4 Semantics+Wl%%$@ 5.1.4.1Fetch Expressions5.1.4.1 Fetch Expressions4dl ,,$@ 5.1.4.2PrefixSign Expressions5.1.4.2 Prefix Sign Expressions9Ul$$$A 5.1.4.3Shift Expression5.1.4.3 Shift Expression=al**$A 5.1.4.4 Arithmetic Expressions5.1.4.4 Arithmetic ExpressionsJal**$A 5.1.4.5 Relational Expressions5.1.4.5 Relational ExpressionsV[l''$A 5.1.4.6Boolean Expressions5.1.4.6 Boolean Expressionscal**$@ 5.1.4.7 Assignment Expressions5.1.4.7 Assignment ExpressionsoDl$@5.1.5 Pragmatics5.1.5 Pragmaticssgl"--$A 5.1.5.1ExplicitParenthesization5.1.5.1 Explicit Parenthesizationte\ --$A 5.1.5.2TheOrderof Evaluation5.1.5.2 The Order of Evaluationzl2AA$A 5.1.5.3 OperationsonFieldValuesin BLISS-16/325.1.5.3 Operations on Field Values in BLISS-16/32\g+ $K5.2&KExecutable-Functions5.2 Executable-Functions<l $@5.2.1Syntax5.2.1 SyntaxB\$@5.2.2 Semantics5.2.2 Semanticsc\,,$A 5.2.2.1SIGNandABS Functions5.2.2.1 SIGN and ABS Functionsa\++$A 5.2.2.2MAXandMIN Functions5.2.2.2 MAX and MIN FunctionsX\&&$A 5.2.2.3The%REFFunction5.2.2.3 The %REF FunctionDl$A5.2.3 Pragmatics5.2.3 PragmaticsOw!!$K6Control Expressions6 Control Expressionsbw. $K6.1!&KConditional-Expressions6.1 Conditional-Expressions<l $@6.1.1Syntax6.1.1 SyntaxH\$@6.1.2 Restrictions6.1.2 RestrictionsB\$A6.1.3 Semantics6.1.3 SemanticsDl$A6.1.4 Pragmatics6.1.4 Pragmatics{l+88$A 6.1.4.1Nestingof Conditional Expressions6.1.4.1 Nesting of Conditional Expressionso\%22$A 6.1.4.2UsedVersus DiscardedValues6.1.4.2 Used Versus Discarded Valuesl3AA$@ 6.1.4.3CompleteVersus IncompleteTest Evaluation6.1.4.3 Complete Versus Incomplete Test EvaluationTw' $K6.2&KCase-Expressions6.2 Case-Expressions<l $A6.2.1Syntax6.2.1 SyntaxH\$A6.2.2 Restrictions6.2.2 RestrictionsB\$A6.2.3 Semantics6.2.3 SemanticsDl$A6.2.4 Pragmatics6.2.4 PragmaticsXw) $K6.3&KSelect-Expressions6.3 Select-Expressions<l $@6.3.1Syntax6.3.1 SyntaxH\$@6.3.2 Restrictions6.3.2 RestrictionsB\$@6.3.3 Semantics6.3.3 Semanticsdw/ $L6.4"&LIndexed-Loop-Expressions6.4 Indexed-Loop-Expressions<l $A6.4.1Syntax6.4.1 SyntaxH\$A6.4.2 Restrictions6.4.2 Restrictions@\$A6.4.3Defaults6.4.3 Defaults B\$@6.4.4 Semantics6.4.4 Semantics Dl$@6.4.5 Pragmatics6.4.5 Pragmaticsbw. $L6.5!&LTested-Loop-Expressions6.5 Tested-Loop-Expressions<l $A6.5.1Syntax6.5.1 SyntaxH\$A6.5.2 Restrictions6.5.2 RestrictionsB\$A6.5.3 Semantics6.5.3 SemanticsDl$@6.5.4 Pragmatics6.5.4 PragmaticsTw' $K6.6&KExit-Expressions6.6 Exit-Expressions"<l $@6.6.1Syntax6.6.1 Syntax$H\$A6.6.2 Restrictions6.6.2 Restrictions&B\$A6.6.3 Semantics6.6.3 Semantics(Vl$$$A 6.6.3.1Leave-Expressions6.6.3.1 Leave-Expressions)\l''$A 6.6.3.2Exitloop-Expressions6.6.3.2 Exitloop-Expressions+Dl$A6.6.4 Pragmatics6.6.4 Pragmatics-Xw) $K6.7&KReturn-Expressions6.7 Return-Expressions3<l $@6.7.1Syntax6.7.1 Syntax4H\$@6.7.2 Restrictions6.7.2 Restrictions6B\$A6.7.3 Semantics6.7.3 Semantics7Qw""$K7Constant Expressions7 Constant Expressions:xw&: $K7.1-&K Compile-TimeConstant Expressions7.1 Compile-Time Constant Expressions=<l $@7.1.1Syntax7.1.1 SyntaxEH\$@7.1.2 Restrictions7.1.2 RestrictionsGB\$@7.1.3 Semantics7.1.3 SemanticsQrw#7 $L7.2*&L Link-TimeConstant Expressions7.2 Link-Time Constant ExpressionsR<l $A7.2.1Syntax7.2.1 SyntaxYH\$A7.2.2 Restrictions7.2.2 Restrictions[B\$@7.2.3 Semantics7.2.3 SemanticsdXg&&$K8Blocksand Declarations8 Blocks and Declarationsh@g  $K8.1&KBlocks8.1 Blocksj<l $A8.1.1Syntax8.1.1 SyntaxqH\$@8.1.2 Restrictions8.1.2 RestrictionsuB\$A8.1.3 Semantics8.1.3 SemanticsxD\$A8.1.4 Discussion8.1.4 DiscussionLg# $K8.2&K Declarations8.2 Declarations<l $A8.2.1Syntax8.2.1 SyntaxH\$@8.2.2 Restrictions8.2.2 RestrictionsB\$@8.2.3 Semantics8.2.3 SemanticsD\$A8.2.4 Discussion8.2.4 Discussion<g $L9 Attributes9 Attributes~w)= $K9.10&KTheAllocation-Unit-BLISS-16/32Only9.1 The Allocation-Unit-BLISS-16/32 Only<l $A9.1.1Syntax9.1.1 Syntax>\$@9.1.2Default9.1.2 DefaultF\$@9.1.3 Restriction9.1.3 RestrictionB\$A9.1.4 Semantics9.1.4 Semanticsw-A $L9.24&LTheExtension-Attribute-BLISS-16/32Only9.2 The Extension-Attribute-BLISS-16/32 Only<l $A9.2.1Syntax9.2.1 SyntaxF\$A9.2.2 Restriction9.2.2 Restriction>\$@9.2.3Default9.2.3 DefaultB\$A9.2.4 Semantics9.2.4 Semanticscg/ $K9.3"&KTheStructure-Attribute9.3 The Structure-Attribute[g+ $K9.4&KTheField-Attribute9.4 The Field-Attribute<l $A9.4.1Syntax9.4.1 Syntax>\$A9.4.2Default9.4.2 DefaultB\$A9.4.3 Semantics9.4.3 Semanticsw-A $K9.54&KTheAlignment-Attribute-BLISS-16/32Only9.5 The Alignment-Attribute-BLISS-16/32 Only<l $@9.5.1Syntax9.5.1 SyntaxH\$@9.5.2 Restrictions9.5.2 Restrictions>\$A9.5.3Default9.5.3 DefaultB\$A9.5.4 Semantics9.5.4 SemanticsD\$A9.5.5 Discussion9.5.5 Discussion_g- $K9.6 &KTheInitial-Attribute9.6 The Initial-Attribute<l $@9.6.1Syntax9.6.1 SyntaxF\$@9.6.2 Restriction9.6.2 Restriction>\$A9.6.3Default9.6.3 DefaultB\$A9.6.4 Semantics9.6.4 SemanticsDl$A9.6.5 Pragmatics9.6.5 Pragmatics]g, $L9.7&LThePreset-Attribute9.7 The Preset-Attribute<l $A9.7.1Syntax9.7.1 SyntaxF\$A9.7.2 Restriction9.7.2 Restriction>\$@9.7.3Default9.7.3 DefaultB\$@9.7.4 Semantics9.7.4 SemanticsDl$@9.7.5 Pragmatics9.7.5 Pragmaticsrg#7 $L9.8*&LThePsect-Allocation Attribute9.8 The Psect-Allocation Attribute<l $A9.8.1Syntax9.8.1 SyntaxH\$A9.8.2 Restrictions9.8.2 Restrictions@\$@9.8.3Defaults9.8.3 DefaultsB\$@9.8.4 Semantics9.8.4 SemanticsDl$@9.8.5 Pragmatics9.8.5 Pragmatics ag. $L9.9!&LTheVolatile-Attribute9.9 The Volatile-Attribute <l $A9.9.1Syntax9.9.1 SyntaxB\$A9.9.2 Semantics9.9.2 Semanticsag.$K9.10 &KTheNovalue-Attribute9.10 The Novalue-Attribute>l$@9.10.1Syntax9.10.1 SyntaxJ\$@9.10.2 Restrictions9.10.2 RestrictionsD\$@9.10.3 Semantics9.10.3 Semanticsaw.$K9.11 &KTheLinkage-Attribute9.11 The Linkage-Attribute>l$A9.11.1Syntax9.11.1 Syntax!J\$A9.11.2 Restrictions9.11.2 Restrictions#B\$A9.11.3Defaults9.11.3 Defaults%D\$@9.11.4 Semantics9.11.4 Semantics&]w,$K9.12&KTheRange-Attribute9.12 The Range-Attribute'>l$@9.12.1Syntax9.12.1 Syntax.H\$A9.12.2 Restriction9.12.2 Restriction0@\$A9.12.3Default9.12.3 Default1D\$A9.12.4 Semantics9.12.4 Semantics2w4H$K9.13:&KThe%Addressing-Mode-Attribute-BLISS-16/32Only9.13 The Addressing-Mode-Attribute-BLISS-16/32 Only3>l$@9.13.1Syntax9.13.1 Syntax6@\$@9.13.2Default9.13.2 Default8D\$A9.13.3 Semantics9.13.3 Semantics>xw&:$L9.14,&LTheWeak-Attribute-BLISS-32Only9.14 The Weak-Attribute-BLISS-32 OnlyA>l$A9.14.1Syntax9.14.1 SyntaxCD\$A9.14.2 Semantics9.14.2 SemanticsErw"8$K9.15*&KASummaryof AttributeUsage9.15 A Summary of Attribute UsageFMg  $K10Data Declarations10 Data DeclarationsGVg($K10.1&KOwn-Declarations10.1 Own-DeclarationsN>l$@10.1.1Syntax10.1.1 SyntaxQJ\$A10.1.2 Restrictions10.1.2 RestrictionsSD\$A10.1.3 Semantics10.1.3 Semantics[\g+$K10.2&KGlobal-Declarations10.2 Global-Declarationsb>l$A10.2.1Syntax10.2.1 SyntaxeJ\$@10.2.2 Restrictions10.2.2 RestrictionsgD\$@10.2.3 Semantics10.2.3 Semanticsi^g,$L10.3&LForward-Declarations10.3 Forward-Declarationsl>l$A10.3.1Syntax10.3.1 SyntaxoJ\$A10.3.2 Restrictions10.3.2 RestrictionsqD\$A10.3.3 Semantics10.3.3 Semanticst`g-$K10.4&KExternal-Declarations10.4 External-Declarationsu>l$@10.4.1Syntax10.4.1 SyntaxvJ\$A10.4.2 Restrictions10.4.2 RestrictionsxD\$A10.4.3 Semantics10.4.3 Semantics|Zg*$L10.5&LLocal-Declarations10.5 Local-Declarations>l$A10.5.1Syntax10.5.1 SyntaxJ\$A10.5.2 Restrictions10.5.2 RestrictionsD\$A10.5.3 Semantics10.5.3 SemanticsFl$@10.5.4 Pragmatics10.5.4 Pragmaticsdg/$K10.6!&KStacklocal-Declarations10.6 Stacklocal-Declarations>l$A10.6.1Syntax10.6.1 SyntaxJ\$A10.6.2 Restrictions10.6.2 RestrictionsD\$A10.6.3 Semantics10.6.3 Semantics`w-$K10.7&KRegister-Declarations10.7 Register-Declarations>l$@10.7.1Syntax10.7.1 SyntaxJ\$@10.7.2 Restrictions10.7.2 RestrictionsD\$A10.7.3 Semantics10.7.3 SemanticsFl$A10.7.4 Pragmatics10.7.4 Pragmaticsnw"4$K10.8&&KGlobal-Register-Declarations10.8 Global-Register-Declarations>l$A10.8.1Syntax10.8.1 SyntaxJ\$@10.8.2 Restrictions10.8.2 RestrictionsD\$@10.8.3 Semantics10.8.3 Semanticsrw$6$K10.9(&KExternal-Register-Declarations10.9 External-Register-Declarations>l$@10.9.1Syntax10.9.1 SyntaxJ\$@10.9.2 Restrictions10.9.2 RestrictionsB\$A10.9.3Defaults10.9.3 DefaultsD\$A10.9.4 Semantics10.9.4 SemanticsXw)$K10.10&KMap-Declarations10.10 Map-Declarations@l$@10.10.1gSyntax10.10.1 SyntaxL\$@10.10.2g Restrictions10.10.2 RestrictionsF\$@10.10.3g Semantics10.10.3 SemanticsIg$L11Data Structures11 Data Structureswg%:$K11.1,&K IntroductiontoData Structures11.1 Introduction to Data Structures\2AA$A11.1.1TheAbstract DefinitionofData Structures11.1.1 The Abstract Definition of Data Structuresl6EE$@11.1.2TheConcreteRepresentationofData Structures11.1.2 The Concrete Representation of Data Structuresl5DD$@11.1.3The Programmed DescriptionofData Structures11.1.3 The Programmed Description of Data StructuresV\$$$@ 11.1.3.1Field-References11.1.3.1 Field-Referencesb\ **$A 11.1.3.2Structure-Declarations11.1.3.2 Structure-Declarations_\))$A 11.1.3.3 Structure Allocation11.1.3.3 Structure Allocation^\(($A 11.1.3.4Structure-References11.1.3.4 Structure-ReferencesS\##$@ 11.1.3.5REF Structures11.1.3.5 REF Structuresl0;;$A 11.1.3.6InterchangeableStructure-Declarations11.1.3.6 Interchangeable Structure-Declarationsl7GG$@ 11.1.3.7DecimalDigitArraysinBLISS-16andBLISS-3611.1.3.7 Decimal Digit Arrays in BLISS-16 and BLISS-36F\$@11.1.4 Conclusion11.1.4 Conclusion$Vg($K11.2&KField-References11.2 Field-References)>l$A11.2.1Syntax11.2.1 Syntax-J\$A11.2.2 Restrictions11.2.2 Restrictions9@\$A11.2.3Default11.2.3 DefaultID\$A11.2.4 Semantics11.2.4 SemanticsJF\$@11.2.5 Discussion11.2.5 DiscussionbFl$@ 11.2.5.1Examples11.2.5.1 Examplesd\4@@$A 11.2.5.2Field-ReferencesinStructure-Declarations11.2.5.2 Field-References in Structure-Declarationskl5CC$A 11.2.5.3Field-Referencesand ExpressionsinGeneral11.2.5.3 Field-References and Expressions in Generalp|l+99$A 11.2.5.4 OperationsonScalarFieldValues11.2.5.4 Operations on Scalar Field Valuesybg.$K11.3 &KStructure-Declarations11.3 Structure-Declarations>l$@11.3.1Syntax11.3.1 SyntaxJ\$@11.3.2 Restrictions11.3.2 RestrictionsD\$A11.3.3 Semantics11.3.3 Semanticsw1F$L11.48&LStructure-AttributesandStorage Allocation11.4 Structure-Attributes and Storage Allocation>l$A11.4.1Syntax11.4.1 SyntaxJ\$A11.4.2 Restrictions11.4.2 RestrictionsD\$A11.4.3 Semantics11.4.3 SemanticsZg*$K11.5&KField-Declarations11.5 Field-Declarations>l$@11.5.1Syntax11.5.1 SyntaxJ\$@11.5.2 Restrictions11.5.2 RestrictionsD\$A11.5.3 Semantics11.5.3 SemanticsVg($L11.6&LField-Attributes11.6 Field-Attributes>l$A11.6.1Syntax11.6.1 SyntaxJ\$A11.6.2 Restrictions11.6.2 RestrictionsD\$@11.6.3 Semantics11.6.3 Semanticspw#5$K11.7'&KOrdinary-Structure-References11.7 Ordinary-Structure-References>l$A11.7.1Syntax11.7.1 SyntaxJ\$A11.7.2 Restrictions11.7.2 RestrictionsD\$A11.7.3 Semantics11.7.3 SemanticsF\$A11.7.4 Discussion11.7.4 Discussionng"4$K11.8&&KDefault-Structure-References11.8 Default-Structure-References>l$@11.8.1Syntax11.8.1 SyntaxJ\$@11.8.2 Restrictions11.8.2 RestrictionsD\$@11.8.3 Semantics11.8.3 SemanticsF\$A11.8.4 Discussion11.8.4 Discussionng"4$L11.9&&LGeneral-Structure-References11.9 General-Structure-References>l$A11.9.1Syntax11.9.1 SyntaxJ\$A11.9.2 Restrictions11.9.2 RestrictionsD\$@11.9.3 Semantics11.9.3 SemanticsF\$@11.9.4 Discussion11.9.4 Discussioneg0$L11.10!&L Predeclared Structures11.10 Predeclared StructuresW\%%$A11.10.1gVECTOR Structures11.10.1 VECTOR Structures]\(($A11.10.2g BITVECTOR Structures11.10.2 BITVECTOR StructuresU\$$$A11.10.3gBLOCK Structures11.10.3 BLOCK Structures l2@@$@ 11.10.3.1~ATypical Byte-OrientedBLOCK Structure11.10.3.1 A Typical Byte-Oriented BLOCK Structuree\!,,$@ 11.10.3.2~BLOCKField-References11.10.3.2 BLOCK Field-ReferencesY\&&$@ 11.10.3.3~BLOCK Allocation11.10.3.3 BLOCK Allocationm\%00$A 11.10.3.4~BLOCKStructure-References11.10.3.4 BLOCK Structure-References!i\#..$A 11.10.3.5~BLOCKField-Declarations11.10.3.5 BLOCK Field-Declarations)a\**$A11.10.4g BLOCKVECTOR Structures11.10.4 BLOCKVECTOR Structures1Yg*$K11.11&KOther Structures11.11 Other Structures9vl)55$A11.11.1g``One-Origin''Vector Structures11.11.1 ``One-Origin'' Vector Structures;l.;;$@11.11.2g``Bounds Checking''Vector Structures11.11.2 ``Bounds Checking'' Vector Structures>vl)55$@11.11.3gTwo-DimensionalArray Structures11.11.3 Two-Dimensional Array Structures@jl#//$@11.11.4g SymmetricArray Structures11.11.4 Symmetric Array StructuresEr\'33$A11.11.5g NoncontinuousBlock Structures11.11.5 Noncontinuous Block StructuresRpl&22$A11.11.6g PartiallyOverlaid Structures11.11.6 Partially Overlaid Structures`D[G$A11.11.7gGeneral-Purpose StructuresforDefault Structurep References11.11.7 General-Purpose Structures for Default Structure Referencesl:g $K12Routines12 Routinestbw.$K12.1 &KOrdinary-Routine-Calls12.1 Ordinary-Routine-Callsx>l$@12.1.1Syntax12.1.1 SyntaxJ\$A12.1.2 Restrictions12.1.2 RestrictionsD\$A12.1.3 Semantics12.1.3 SemanticsFl$A12.1.4 Pragmatics12.1.4 Pragmatics`g-$K12.2&KGeneral-Routine-Calls12.2 General-Routine-Calls>l$@12.2.1Syntax12.2.1 SyntaxJ\$@12.2.2 Restrictions12.2.2 RestrictionsD\$A12.2.3 Semantics12.2.3 Semantics^g,$K12.3&KRoutine-Declarations12.3 Routine-Declarations>l$A12.3.1Syntax12.3.1 SyntaxD\$A12.3.2 Semantics12.3.2 Semanticspw#5$K12.4'&KOrdinary-Routine-Declarations12.4 Ordinary-Routine-Declarations>l$A12.4.1Syntax12.4.1 SyntaxJ\$@12.4.2 Restrictions12.4.2 RestrictionsB\$@12.4.3Defaults12.4.3 DefaultsD\$A12.4.4 Semantics12.4.4 SemanticsFl$A12.4.5 Pragmatics12.4.5 PragmaticsYl&&$A 12.4.5.1 ParameterPassing12.4.5.1 Parameter Passingl1??$A 12.4.5.2 Allocationof Formal-NameDataSegments12.4.5.2 Allocation of Formal-Name Data Segmentsn\%11$@ 12.4.5.3 Attributesfor Formal-Names12.4.5.3 Attributes for Formal-Namesll$00$@ 12.4.5.4ComputedRoutine Addresses12.4.5.4 Computed Routine Addresseslg!3$L12.5%&LGlobal-Routine-Declarations12.5 Global-Routine-Declarations>l$A12.5.1Syntax12.5.1 SyntaxJ\$A12.5.2 Restrictions12.5.2 RestrictionsB\$A12.5.3Defaults12.5.3 DefaultsD\$@12.5.4 Semantics12.5.4 Semanticsng"4$K12.6&&KForward-Routine-Declarations12.6 Forward-Routine-Declarations>l$@12.6.1Syntax12.6.1 SyntaxJ\$@12.6.2 Restrictions12.6.2 RestrictionsD\$A12.6.3 Semantics12.6.3 Semanticspg#5$L12.7'&LExternal-Routine-Declarations12.7 External-Routine-Declarations>l$A12.7.1Syntax12.7.1 SyntaxJ\$A12.7.2 Restrictions12.7.2 RestrictionsD\$@12.7.3 Semantics12.7.3 Semantics:w $K1D}w }w3Linkages13 Linkagesw*>$L13.10&L IntroductiontoLinkage-Declarations13.1 Introduction to Linkage-DeclarationsOl!!$A13.1.1RegisterUsage13.1.1 Register UsageWl%%$A 13.1.1.1SpecialPurposes13.1.1.1 Special PurposesWl%%$A 13.1.1.2GeneralPurposes13.1.1.2 General PurposesSl##$@ 13.1.1.3OtherPurposes13.1.1.3 Other PurposesYl&&$@ 13.1.1.4MultiplePurposes13.1.1.4 Multiple PurposesOl!!$A13.1.2TypicalSyntax13.1.2 Typical SyntaxJ\$A13.1.3 Restrictions13.1.3 RestrictionsD\$A13.1.4 Semantics13.1.4 Semantics Pl!!$A 13.1.4.1 Linkage-Types13.1.4.1 Linkage-Types\\''$A 13.1.4.2Parameter-Locations13.1.4.2 Parameter-Locationsjl#//$A 13.1.4.2.1ArgumentPointerMethod13.1.4.2.1 Argument Pointer Methodyl*77$@ 13.1.4.2.2ImplicitStackLocationMethod13.1.4.2.2 Implicit Stack Location Methodal**$@ 13.1.4.2.3Register Parameters13.1.4.2.3 Register ParametersPl!!$@13.1.5Linkage-Options13.1.5 Linkage-Optionsqw#6$L13.2(&LBLISS-16Linkage-Declarations13.2 BLISS-16 Linkage-Declarations&>l$A13.2.1Syntax13.2.1 Syntax*J\$A13.2.2 Restrictions13.2.2 Restrictions,B\$@13.2.3Defaults13.2.3 Defaults8D\$@13.2.4 Semantics13.2.4 Semantics@cl ++$@ 13.2.4.1 INTERRUPT Linkage-Type13.2.4.1 INTERRUPT Linkage-TypeJzl*88$A 13.2.4.2EMT,TRAP,andIOT Linkage-Types13.2.4.2 EMT, TRAP, and IOT Linkage-TypesM_l))$A 13.2.4.3RSX_AST Linkage-Type13.2.4.3 RSX_AST Linkage-TypeOxl*66$A13.2.5BLISS-16 Predeclared Linkage-Names13.2.5 BLISS-16 Predeclared Linkage-NamesRqw#6$K13.3(&KBLISS-32Linkage-Declarations13.3 BLISS-32 Linkage-DeclarationsT>l$@13.3.1Syntax13.3.1 SyntaxVJ\$@13.3.2 Restrictions13.3.2 RestrictionsYB\$@13.3.3Defaults13.3.3 DefaultscD\$@13.3.4 Semantics13.3.4 SemanticskWl%%$A 13.3.4.1JSB Linkage-Type13.3.4.1 JSB Linkage-Typeucl ++$A 13.3.4.2 INTERRUPT Linkage-Type13.3.4.2 INTERRUPT Linkage-Type{xl*66$A13.3.5BLISS-32 Predeclared Linkage-Names13.3.5 BLISS-32 Predeclared Linkage-Namesqw#6$K13.4(&KBLISS-36Linkage-Declarations13.4 BLISS-36 Linkage-Declarations>l$@13.4.1Syntax13.4.1 SyntaxJ\$@13.4.2 Restrictions13.4.2 RestrictionsB\$A13.4.3Defaults13.4.3 DefaultsD\$A13.4.4 Semantics13.4.4 Semantics[l''$A 13.4.4.1PUSHJ Linkage-Type13.4.4.1 PUSHJ Linkage-TypeYl&&$@ 13.4.4.2JSYS Linkage-Type13.4.4.2 JSYS Linkage-TypeWl%%$@ 13.4.4.3F10 Linkage-Type13.4.4.3 F10 Linkage-Typeil#..$@ 13.4.4.4 PS_INTERRUPT Linkage-Type13.4.4.4 PS_INTERRUPT Linkage-Typexl*66$A13.4.5BLISS-36 Predeclared Linkage-Names13.4.5 BLISS-36 Predeclared Linkage-Namesxw&:$L13.5,&LCommon Predeclared Linkage-Names13.5 Common Predeclared Linkage-NamesXl&&$A13.5.1TheBLISSLinkages13.5.1 The BLISS Linkages\l(($A13.5.2TheFORTRANLinkages13.5.2 The FORTRAN LinkagesXw)$K13.6&KLinkage-Functions13.6 Linkage-Functionscl ++$A13.6.1CommonLinkage-Functions13.6.1 Common Linkage-FunctionsJ\$@ 13.6.1.1 Definition13.6.1.1 DefinitionFl$@ 13.6.1.2Examples13.6.1.2 Examplesl/<<$A13.6.2BLISS-16andBLISS-32Linkage-Functions13.6.2 BLISS-16 and BLISS-32 Linkage-Functionsw0G$L13.79&LGlobalRegisterDataSegmentsandLinkages13.7 Global Register Data Segments and LinkagesF\$A13.7.1 Discussion13.7.1 Discussionb\++$A13.7.2 GuidelinesforBLISS-1613.7.2 Guidelines for BLISS-16b\++$@13.7.3 GuidelinesforBLISS-3213.7.3 Guidelines for BLISS-32b\++$@13.7.4 GuidelinesforBLISS-3613.7.4 Guidelines for BLISS-368w $L14Binding14 Binding ^g,$L14.1&LLiteral-Declarations14.1 Literal-Declarations>l$A14.1.1Syntax14.1.1 SyntaxJ\$A14.1.2 Restrictions14.1.2 RestrictionsB\$@14.1.3Defaults14.1.3 DefaultsD\$@14.1.4 Semantics14.1.4 Semantics[\''$A14.1.5 PredeclaredLiterals14.1.5 Predeclared Literalspg#5$L14.2'&LExternal-Literal-Declarations14.2 External-Literal-Declarations">l$A14.2.1Syntax14.2.1 Syntax$J\$A14.2.2 Restrictions14.2.2 Restrictions&B\$A14.2.3Defaults14.2.3 Defaults(D\$A14.2.4 Semantics14.2.4 Semantics)bg.$K14.3 &KBind-Data-Declarations14.3 Bind-Data-Declarations+>l$@14.3.1Syntax14.3.1 Syntax/J\$A14.3.2 Restrictions14.3.2 Restrictions1B\$A14.3.3Defaults14.3.3 Defaults7D\$A14.3.4 Semantics14.3.4 Semantics9hg1$K14.4#&KBind-Routine-Declarations14.4 Bind-Routine-Declarations;>l$@14.4.1Syntax14.4.1 Syntax@J\$@14.4.2 Restrictions14.4.2 RestrictionsB@\$A14.4.3Default14.4.3 DefaultFD\$A14.4.4 Semantics14.4.4 SemanticsGMg  $K15Lexical Functions15 Lexical FunctionsI}w(=$K15.1/&K IntroductiontoLexical Processing15.1 Introduction to Lexical ProcessingNi\"//$@15.1.1From CharacterstoLexemes15.1.1 From Characters to LexemesOil#..$@15.1.2Lexeme-by-Lexeme Processing15.1.2 Lexeme-by-Lexeme ProcessingT@l$@15.1.3Binding15.1.3 BindingZDl$@15.1.4 Expansion15.1.4 Expansion]vl(66$@15.1.5AnExampleofLexical Processing15.1.5 An Example of Lexical ProcessingiHr!$L15.2&L Quotation15.2 QuotationzK\$A15.2.1QuoteLevels15.2.1 Quote LevelsQ\""$A15.2.2 QuotationRules15.2.2 Quotation Rules\w+$K15.3&KLexical-Expressions15.3 Lexical-Expressions>l$@15.3.1Syntax15.3.1 SyntaxD\$@15.3.2 Semantics15.3.2 Semanticsjl#//$A 15.3.2.1TypesofNumeric-Literals15.3.2.1 Types of Numeric-Literalshl"..$A 15.3.2.2TypesofString-Literals15.3.2.2 Types of String-Literalspl&22$A 15.3.2.3Numeric-andString-Literals15.3.2.3 Numeric- and String-LiteralsF\$@15.3.3 Discussion15.3.3 DiscussionFl$@15.3.4 Pragmatics15.3.4 Pragmaticspg"6$K15.4(&KLexical-FunctionsinGeneral15.4 Lexical-Functions in General>l$A15.4.1Syntax15.4.1 SyntaxJ\$A15.4.2 Restrictions15.4.2 RestrictionsD\$A15.4.3 Semantics15.4.3 Semanticskw 3$K15.5%&KSpecificLexical-Functions15.5 Specific Lexical-Functions\2??$A15.5.1QuoteLevelsforLexical-Actual-Parameters15.5.1 Quote Levels for Lexical-Actual-ParametersRl""$@15.5.2String-Functions15.5.2 String-FunctionsJ\$@ 15.5.2.1 Definition15.5.2.1 DefinitionFl$@ 15.5.2.2Examples15.5.2.2 Examples X\%%$A15.5.3Delimiter-Functions15.5.3 Delimiter-Functions J\$A 15.5.3.1 Definition15.5.3.1 Definition Fl$A 15.5.3.2Examples15.5.3.2 Examples N\  $A15.5.4Name-Functions15.5.4 Name-Functions$ J\$@ 15.5.4.1 Definition15.5.4.1 Definition% Fl$@ 15.5.4.2Examples15.5.4.2 Examples, `l))$A15.5.5Sequence-Test-Functions15.5.5 Sequence-Test-Functions: J\$A 15.5.5.1 Definition15.5.5.1 Definition< Fl$A 15.5.5.2Examples15.5.5.2 ExamplesB dl!++$A15.5.6Expression-Test-Functions15.5.6 Expression-Test-FunctionsE J\$@ 15.5.6.1 Definition15.5.6.1 DefinitionG Fl$@ 15.5.6.2Examples15.5.6.2 ExamplesQ N\  $A15.5.7Bits-Functions15.5.7 Bits-FunctionsS J\$@ 15.5.7.1 Definition15.5.7.1 DefinitionT Fl$A 15.5.7.2Examples15.5.7.2 Examplese Z\&&$A15.5.8Allocation-Functions15.5.8 Allocation-Functionsg J\$A 15.5.8.1 Definition15.5.8.1 Definitioni Fl$A 15.5.8.2Examples15.5.8.2 Examplesq Zl&&$@15.5.9Fieldexpand-Function15.5.9 Fieldexpand-Functiont J\$@ 15.5.9.1 Definition15.5.9.1 Definitionv Fl$A 15.5.9.2Examples15.5.9.2 Examples} ^\(($A15.5.10gCalculation-Functions15.5.10 Calculation-Functions L\$A 15.5.10.1~ Definition15.5.10.1 Definition Fl$A 15.5.10.2~Example15.5.10.2 Example dl!++$@15.5.11gCompiler-State-Functions15.5.11 Compiler-State-Functions N\  $@ 15.5.11.1~ Definitions15.5.11.1 Definitions Hl$A 15.5.11.2~Examples15.5.11.2 Examples Xl%%$A15.5.12gAdvisory-Functions15.5.12 Advisory-Functions N\  $A 15.5.12.1~ Definitions15.5.12.1 Definitions Hl$A 15.5.12.2~Examples15.5.12.2 Examples Vl$$$@15.5.13gTitling-Functions15.5.13 Titling-Functions L\$A 15.5.13.1~ Definition15.5.13.1 Definition Hl$@ 15.5.13.2~Examples15.5.13.2 Examples R\""$@15.5.14gQuote-Functions15.5.14 Quote-Functions N\  $A 15.5.14.1~ Definitions15.5.14.1 Definitions Hl$A 15.5.14.2~Examples15.5.14.2 Examples R\""$A15.5.15gMacro-Functions15.5.15 Macro-Functions L\$A 15.5.15.1~ Definition15.5.15.1 Definition Hl$@ 15.5.15.2~Examples15.5.15.2 Examples Tl##$@15.5.16gRequire-Function15.5.16 Require-Function L\$A 15.5.16.1~ Definition15.5.16.1 Definition Hl$A 15.5.16.2~Examples15.5.16.2 Examples nl%11$A15.5.17gSummaryofLexical-Functions15.5.17 Summary of Lexical-Functions ^g,$K15.6&KLexical-Conditionals15.6 Lexical-Conditionals >l$@15.6.1Syntax15.6.1 Syntax# J\$@15.6.2 Restrictions15.6.2 Restrictions% D\$@15.6.3 Semantics15.6.3 Semantics( iw2$L15.7$&L Compile-Time Declarations15.7 Compile-Time Declarations- >l$A15.7.1Syntax15.7.1 Syntax. D\$A15.7.2 Semantics15.7.2 Semantics0 6g $K16Macros16 Macros3 dg0$K16.1"&K IntroductiontoMacros16.1 Introduction to Macros6 m\$11$@16.1.1Macro DeclarationsandCalls16.1.1 Macro Declarations and Calls9 `\**$@16.1.2Macroswith Parameters16.1.2 Macros with Parameters@ h\"..$@16.1.3ParenthesizationofMacros16.1.3 Parenthesization of MacrosE i\"//$A16.1.4 QuotationRulesandMacros16.1.4 Quotation Rules and MacrosJ l1AA$A16.1.5ASurveyofMacrosandRelated Facilities16.1.5 A Survey of Macros and Related FacilitiesU Zg*$K16.2&KMacro-Declarations16.2 Macro-Declarationsb >l$@16.2.1Syntax16.2.1 Syntaxo J\$@16.2.2 Restrictions16.2.2 Restrictionss D\$@16.2.3 Semantics16.2.3 Semanticsx l1>>$A 16.2.3.1Lexical ProcessingofMacro-Definitions16.2.3.1 Lexical Processing of Macro-Definitionsz ~l-99$A 16.2.3.2InterpretationofMacro-Definitions16.2.3.2 Interpretation of Macro-Definitions W\%%$A16.2.4 PredeclaredMacros16.2.4 Predeclared Macros Lg#$K16.3&K Macro-Calls16.3 Macro-Calls >l$@16.3.1Syntax16.3.1 Syntax J\$@16.3.2 Restrictions16.3.2 Restrictions D\$@16.3.3 Semantics16.3.3 Semantics {l+88$@ 16.3.3.1Lexical Processingof Macro-Calls16.3.3.1 Lexical Processing of Macro-Calls ml$11$A 16.3.3.2 ExpansionofSimpleMacros16.3.3.2 Expansion of Simple Macros wl)66$A 16.3.3.3 Expansionof ConditionalMacros16.3.3.3 Expansion of Conditional Macros rl'33$A 16.3.3.4 ExpansionofIterative-Macros16.3.3.4 Expansion of Iterative-Macros nl%11$A 16.3.3.5 ExpansionofKeyword-Macros16.3.3.5 Expansion of Keyword-Macros F\$@16.3.4 Discussion16.3.4 Discussion al**$@ 16.3.4.1 IntroductoryExamples16.3.4.1 Introductory Examples ]\(($A 16.3.4.2Default Punctuation16.3.4.2 Default Punctuation \w,$L16.4&LExamplesofMacros16.4 Examples of Macros l1@@$A16.4.1Macrosfor InitializingaBLOCK Structure16.4.1 Macros for Initializing a BLOCK Structure Zl''$A16.4.2A ComplicatedMacro16.4.2 A Complicated Macro b\++$@16.4.3NestedMacro Definition16.4.3 Nested Macro Definition h\"..$@16.4.4 DeclarationsWithinMacros16.4.4 Declarations Within Macros ^w,$L16.5&LRequire-Declarations16.5 Require-Declarations >l$A16.5.1Syntax16.5.1 Syntax J\$A16.5.2 Restrictions16.5.2 Restrictions D\$A16.5.3 Semantics16.5.3 Semantics ^w,$K16.6&KLibrary-Declarations16.6 Library-Declarations >l$A16.6.1Syntax16.6.1 Syntax J\$@16.6.2 Restrictions16.6.2 Restrictions D\$@16.6.3 Semantics16.6.3 Semantics Ow!!$L17 ConditionHandling17 Condition Handling+ }w(=$L17.1/&L Introductionto ConditionHandling17.1 Introduction to Condition Handling- B\$A17.1.1Routines17.1.1 Routines. @l$A17.1.2Signals17.1.2 Signals1 Fl$@17.1.3 Processing17.1.3 Processing3 \g+$K17.2&KEnable-Declarations17.2 Enable-Declarations9 >l$A17.2.1Syntax17.2.1 Syntax< J\$A17.2.2 Restrictions17.2.2 Restrictions> D\$A17.2.3 Semantics17.2.3 SemanticsE Hw!$K17.3&K Signaling17.3 SignalingI S\##$@17.3.1 ConditionValues17.3.1 Condition ValuesK Sl##$@17.3.2ExplicitSignals17.3.2 Explicit SignalsN Sl##$A17.3.3ImplicitSignals17.3.3 Implicit SignalsY Ol!!$A17.3.4UnwindSignals17.3.4 Unwind SignalsZ mw!4$K17.4&&KCondition-HandlingRoutines17.4 Condition-Handling Routines\ J\$A17.4.1 Restrictions17.4.1 Restrictionsc F\$A17.4.2 Parameters17.4.2 Parametersh `l**$A 17.4.2.1TheSignal Parameter17.4.2.1 The Signal Parameterk f\!--$@ 17.4.2.2The Mechanism Parameter17.4.2.2 The Mechanism Parametern `\**$@ 17.4.2.3TheEnable Parameter17.4.2.3 The Enable Parameterr Ql""$A17.4.3HandlerOptions17.4.3 Handler Optionsu N\  $A 17.4.3.1 Continuation17.4.3.1 Continuation| Ll$A 17.4.3.2 Resignaling17.4.3.2 Resignaling Hl$A 17.4.3.3 Unwinding17.4.3.3 Unwinding }w(=$K17.5/&KCondition-HandlingFlowofControl17.5 Condition-Handling Flow of Control F\$@17.5.1 Definition17.5.1 Definition e\ --$@ 17.5.1.1NormalFlowofControl17.5.1.1 Normal Flow of Control l5EE$A 17.5.1.2ModifiedFlowofControlforNestedSignals17.5.1.2 Modified Flow of Control for Nested Signals F\$A17.5.2 Discussion17.5.2 Discussion pl%33$A 17.5.2.1ExamplesofFlowofControl17.5.2.1 Examples of Flow of Control [\''$@ 17.5.2.2 RecursiveHandlers17.5.2.2 Recursive Handlers l5CC$@ 17.5.2.3 ConditionHandlingandLinkage Interactions17.5.2.3 Condition Handling and Linkage Interactions Fw $K17.6&KExamples17.6 Examples l/==$@17.6.1 AccessingandDefining ConditionValues17.6.1 Accessing and Defining Condition Values q\&33$@ 17.6.1.1 ConditionValuesinBLISS-1617.6.1.1 Condition Values in BLISS-16 q\&33$A 17.6.1.2 ConditionValuesinBLISS-3217.6.1.2 Condition Values in BLISS-32 q\&33$A 17.6.1.3 ConditionValuesinBLISS-3617.6.1.3 Condition Values in BLISS-36 h\"..$A17.6.2ARecursive-DescentParser17.6.2 A Recursive-Descent Parser a\**$@17.6.3 Performance Measurement17.6.3 Performance Measurement l7FF$@17.6.4Target OperatingSystemsand ConditionHandling17.6.4 Target Operating Systems and Condition Handling hl"..$@ 17.6.4.1PDP-11 OperatingSystems17.6.4.1 PDP-11 Operating Systems il"//$A 17.6.4.2TheVMS OperatingSystem17.6.4.2 The VMS Operating System l/==$A 17.6.4.3TOPS-10andTOPS-20 OperatingSystems17.6.4.3 TOPS-10 and TOPS-20 Operating Systems Kw$K18SpecialFeatures18 Special Features Zg*$K18.1&KPsect-Declarations18.1 Psect-Declarations >l$@18.1.1Syntax18.1.1 Syntax J\$@18.1.2 Restrictions18.1.2 Restrictions B\$A18.1.3Defaults18.1.3 Defaults D\$A18.1.4 Semantics18.1.4 Semantics& Tl##$A 18.1.4.1Storage-Classes18.1.4.1 Storage-Classes) V\$$$A 18.1.4.2Psect-Attributes18.1.4.2 Psect-Attributes, L\$A 18.1.4.3 Psect-Names18.1.4.3 Psect-Names8 Rl""$A 18.1.4.4Interpretation18.1.4.4 Interpretation: F\$@18.1.5 Discussion18.1.5 Discussion; `g-$K18.2&KSwitches-Declarations18.2 Switches-DeclarationsB >l$A18.2.1Syntax18.2.1 SyntaxH J\$A18.2.2 Restrictions18.2.2 RestrictionsL B\$A18.2.3Defaults18.2.3 DefaultsO D\$A18.2.4 Semantics18.2.4 SemanticsR \\''$@ 18.2.4.1On-Off-Switch-Items18.2.4.1 On-Off-Switch-ItemsT ^l(($@ 18.2.4.2Special-Switch-Items18.2.4.2 Special-Switch-ItemsV Nl  $A 18.2.4.3 List-Options18.2.4.3 List-OptionsX F\$A18.2.5 Discussion18.2.5 Discussion] `g-$K18.3&KBuilt-In-Declarations18.3 Built-In-Declarationsc >l$A18.3.1Syntax18.3.1 Syntaxe J\$@18.3.2 Restrictions18.3.2 Restrictionsg D\$@18.3.3 Semantics18.3.3 Semanticsi Zg*$L18.4&LLabel-Declarations18.4 Label-Declarationsk >l$A18.4.1Syntax18.4.1 Syntaxl D\$A18.4.2 Semantics18.4.2 Semanticsn bg.$L18.5 &LUndeclare-Declarations18.5 Undeclare-Declarationsp >l$A18.5.1Syntax18.5.1 Syntaxs D\$A18.5.2 Semantics18.5.2 Semanticsu Fl$@18.5.3 Pragmatics18.5.3 Pragmaticsx Tw$$$K19ModulesandPrograms19 Modules and Programsz Dg $L19.1&LModules19.1 Modules| >l$A19.1.1Syntax19.1.1 Syntax J\$A19.1.2 Restrictions19.1.2 Restrictions D\$A19.1.3 Semantics19.1.3 Semantics Tg'$K19.2&KModule-Switches19.2 Module-Switches >l$@19.2.1Syntax19.2.1 Syntax J\$A19.2.2 Restrictions19.2.2 Restrictions B\$A19.2.3Defaults19.2.3 Defaults D\$A19.2.4 Semantics19.2.4 Semantics Vl$$$A 19.2.4.1Special-Switches19.2.4.1 Special-Switches T\##$@ 19.2.4.2On-Off-Switches19.2.4.2 On-Off-Switches Wg)$K19.3&K PredefinedNames19.3 Predefined Names Fw $K19.4&KPrograms19.4 Programs cw ++$K20Character-Handling Functions20 Character-Handling Functions _w-$K20.1&K FundamentalConcepts20.1 Fundamental Concepts bl++$A20.1.1 CharacterSequenceData20.1.1 Character Sequence Data nl%11$A20.1.2 CharacterSequence Operations20.1.2 Character Sequence Operations Hg!$K20.2&K Functions20.2 Functions [\''$@20.2.1 Allocation Functions20.2.1 Allocation Functions J\$@ 20.2.1.1 Definition20.2.1.1 Definition Fl$@ 20.2.1.2Examples20.2.1.2 Examples U\$$$A20.2.2Pointer Functions20.2.2 Pointer Functions J\$A 20.2.2.1 Definition20.2.2.1 Definition Fl$A 20.2.2.2Examples20.2.2.2 Examples il#..$@20.2.3Character-Reading Functions20.2.3 Character-Reading Functions J\$@ 20.2.3.1 Definition20.2.3.1 Definition Fl$@ 20.2.3.2Examples20.2.3.2 Examples il#..$A20.2.4Character-Writing Functions20.2.4 Character-Writing Functions J\$A 20.2.4.1 Definition20.2.4.1 Definition Fl$A 20.2.4.2Examples20.2.4.2 Examples gl"--$A20.2.5Sequence-Writing Functions20.2.5 Sequence-Writing Functions J\$A 20.2.5.1 Definition20.2.5.1 Definition! Fl$@ 20.2.5.2Examples20.2.5.2 Examples- kl$//$@20.2.6Sequence-Comparing Functions20.2.6 Sequence-Comparing Functions6 J\$@ 20.2.6.1 Definition20.2.6.1 Definition9 Fl$A 20.2.6.2Examples20.2.6.2 ExamplesB kl$//$A20.2.7Sequence-Searching Functions20.2.7 Sequence-Searching FunctionsJ J\$A 20.2.7.1 Definition20.2.7.1 DefinitionM Fl$A 20.2.7.2Examples20.2.7.2 ExamplesX ol&11$@20.2.8Sequence-Translating Functions20.2.8 Sequence-Translating Functions] J\$@ 20.2.8.1 Definition20.2.8.1 Definition` Fl$A 20.2.8.2Examples20.2.8.2 Examplesk ]x, $\A!\ Predefined IdentifiersA Predefined Identifiersr Q& $\B\String EncodingsB String Encodings Qw& $KB.1&KASCIIEncodingB.1 ASCII Encoding Ww) $KB.2&KRadix-50EncodingB.2 Radix-50 Encoding Sl##$@B.2.1RAD50_11EncodingB.2.1 RAD50_11 Encoding Sl##$AB.2.2RAD50_10EncodingB.2.2 RAD50_10 Encoding Sw' $KB.3&KSixbitEncodingB.3 Sixbit Encoding c/ $\C$\TransportabilityCheckingC Transportability Checking rw#7 $LC.1*&LFullTransportabilityCheckingC.1 Full Transportability Checking xw&: $KC.2-&KBLISS-16/BLISS-32SubsetCheckingC.2 BLISS-16/BLISS-32 Subset Checking Ux( $\D\Built-In FunctionsD Built-In Functions |w(< $KD.1/&KBLISS-16Machine-Specific FunctionsD.1 BLISS-16 Machine-Specific Functions jl#//$@D.1.1Memory Management OperationsD.1.1 Memory Management Operations hl"..$AD.1.2 ProcessorStatus OperationsD.1.2 Processor Status Operations hl"..$AD.1.3Bit Manipulation OperationsD.1.3 Bit Manipulation Operations [l''$AD.1.4 Arithmetic OperationsD.1.4 Arithmetic Operations rl'33$AD.1.5 Arithmetic Comparison OperationsD.1.5 Arithmetic Comparison Operations rl'33$@D.1.6 Arithmetic Conversion OperationsD.1.6 Arithmetic Conversion Operations hl"..$@D.1.7 ProcessorAction OperationsD.1.7 Processor Action Operations al**$AD.1.8 Miscellaneous OperationsD.1.8 Miscellaneous Operations |w(< $LD.2/&LBLISS-32Machine-Specific FunctionsD.2 BLISS-32 Machine-Specific Functions ll$00$AD.2.1 ProcessorRegister OperationsD.2.1 Processor Register Operations pl&22$AD.2.2 Parameter Validation OperationsD.2.2 Parameter Validation Operations dl ,,$@D.2.3ProgramStatus OperationsD.2.3 Program Status Operations Ql""$AD.2.4Queue OperationsD.2.4 Queue Operations hl"..$@D.2.5Bit Manipulation OperationsD.2.5 Bit Manipulation Operations [l''$@D.2.6 Arithmetic OperationsD.2.6 Arithmetic Operations rl'33$AD.2.7 Arithmetic Comparison OperationsD.2.7 Arithmetic Comparison Operations rl'33$AD.2.8 Arithmetic Conversion OperationsD.2.8 Arithmetic Conversion Operations hl"..$AD.2.9 CharacterString OperationsD.2.9 Character String Operations fl!--$AD.2.10DecimalString OperationsD.2.10 Decimal String Operations jl#//$@D.2.11 ProcessorAction OperationsD.2.11 Processor Action Operations cl ++$@D.2.12 Miscellaneous OperationsD.2.12 Miscellaneous Operations |w(< $LD.3/&LBLISS-36Machine-Specific FunctionsD.3 BLISS-36 Machine-Specific Functions Ul$$$AD.3.1Logical OperationsD.3.1 Logical Operations jl#//$AD.3.2Byte Manipulation OperationsD.3.2 Byte Manipulation Operations [l''$AD.3.3 Arithmetic OperationsD.3.3 Arithmetic Operationsrl'33$@D.3.4 Arithmetic Comparison OperationsD.3.4 Arithmetic Comparison Operationsrl'33$@D.3.5 Arithmetic Conversion OperationsD.3.5 Arithmetic Conversion Operationsul(55$@D.3.6MachineCode Insertion OperationsD.3.6 Machine Code Insertion Operationshl"..$AD.3.7System Interface OperationsD.3.7 System Interface Operations+gTABLESTABLESO\!!=AB-1ASCIICodeTableB- 1 ASCII Code Table Ul$$=AB-2RAD50_11CodeTableB- 2 RAD50_11 Code Table Ul$$=AB-3RAD50_10CodeTableB- 3 RAD50_10 Code Table Ul$$=@B-4RAD50_10CodeTableB- 4 RAD50_10 Code Table hl"..=@B-5SIXBITCodeTable sixbit_tabB- 5 SIXBIT Code Table sixbit_tab uo\'Digital Equipment Corporation1978,1980,1982,1983,1987.AllRights' Reserved.h>O]BLISS O%OLanguage ReferenceManualOMay1987POkThisdocumentisacombinedtutorialand referencemanualforPOtheBLISS programming language,whichconsistsofthedialectsNO BLISS-16, BLISS-32,and BLISS-36.,This language,designedforLOT transportable system-level programming,is primarilyintendedMOfor knowledgeableusersofitstargetsystems:/PDP-11,VAX,+O DECsystem-10,and DECSYSTEM-20.y'ORevision/Update Information:)^Thisdocument supersedesthe ^BLISSLanguageGuidet(Order^`Number AA-H275D-TK).y*O OperatingSystemandVersion:%^VMSVersion3orhigher ^TOPS-10Version7.01^`TOPS-20Version5OSoftwareVersion:^BLISS-16Version4 ^BLISS-32Version4.3^`BLISS-36Version4)ODigital Equipment Corporation!OMaynard, Massachusetts |! fR O)OFirst Printing,October1978!O Revised,January1980!ObRevised,January1982!ORevised,January1983ORevised,May1987^ODigital Equipment Corporationmakesnorepresentationsthattheuseofits^Oproductsinthemanner describedinthis publicationwillnotinfringeon`Oexistingorfuturepatentrights,nordothe descriptions containedinthiscOI publicationimplythegrantingoflicensestomake,use,orsell equipmentor;Osoftwarein accordancewiththe description.]O& Possession,use,orcopyingofthesoftware describedinthis publication_Oiis authorizedonlypursuanttoavalidwrittenlicensefromDigitaloran"O authorized sublicensor.\OFDigital Equipment Corporation1978,1980,1982,1983,1987.-AllRightsO Reserved.ZO$The followingare trademarksofDigital Equipment Corporation:"DEC,DECTOf/CMS,DEC/MMS,DECnet, DECsystem-10, DECSYSTEM-20,DECUS, DECwriter,TODIBOL, EduSystem,IAS,MASSBUS,PDP,PDT,RSTS,RSX,UNIBUS,VAX,:O VAXcluster,VMS,VT,andtheDIGITALlogo.:ZK4538LOMThisdocumentwaspreparedusingVAXDOCUMENTVersion2.1.*,  O 1.2 IntroductionDOBLISSisasystemimplementationlanguageforthree&ODIGITALcomputer families: ` PDP-11(16-bit) `O OVAX(32-bit) ` 3 DECsystem-10and DECSYSTEM-20(36-bit)9KOBecauseofthedissimilaritiesamongthesetargetsystems,IOBLISShasthree dialects:( BLISS-16, BLISS-32,andBLISS-QO536.*Thenumericsuffix indicatesthewordlength,inbits,of*Othe respectivetargetsystem. IOBLISSis classifiedasasystemimplementation language-IOratherthananapplication-orientedlanguage-becauseBLISSIO5is primarilyintendedforbuildingsystem software,suchIOas operatingsystems, compilers, utilities,and real-timeJO processors.,Suchsoftwareisoftenlargeand complicated,QO>isoftenclosetothe hardware,andisusuallyvery sensitiveJOto efficiency..In addition,mostsystemsoftwareisveryMO frequentlyusedbymany individuals(insomecaseswithanMOH unpredictablevarietyofinputdata),and thereforemustbeOhighly dependable.hKOThischapter discussesBLISSconceptsand introducesBLISSOlanguage features.k(O1.5BProgramTransportabilityMOUTransportabilityofsoftwareistheuseofthesamesourceFOprograminmorethanonesystem environment.+Theba-MOsisfor transportable programminginBLISSisthe extensiveIO^languagebasereferredtoasCommonBLISS.In addition,OOBLISSprovidesmanyspecific facilitiesthataidin achievingJOtransportabilityalongwith efficiency,eitherthroughpa-IOhrameterizationofCommonBLISS constructs,or conditionalIOor compartmenteduseofdialect-specificcode.*ThemajorIO facilitiesthatsupport transportable programmingaretheOr following:ul! K ` ? Predefineddata structures(forexample,VECTOR,>( BITVECTOR,andBLOCK)thatallowcommonlyusedMdata structurestobe allocatedandaccessed efficientlyin$eachtarget environment. `Y MY Predefinedliteralsthatreflectthe parametersofthetar-Lget architecturesintermsofbits.*TheseliteralscanbeI used,forexample,to parameterizedata declarationsandLcstorage referencesforgreatest efficiencyoneachintendedtargetsystem.mtLbAlistingofthe predefinedliteralsandtheirvaluesfor(eachtargetsystemfollows. n!   nValuein:mNameMeaning BLISS- m16T BLISS- Tm32mBLISS-36 "%BPVALcBitsperBLISS\?value 16 T32 36&%BPUNITCBitsperaddress-\ableunit 8 T8 36%%BPADDR3Bitsperaddress\value 16 T3218or30 d1#H%UPVALXUnitsperBLISS\value H2 TH4 H1  11: Dependingonthe target-systemCPU. ` ` DUser-definabledata structuresandnamedfields.+TheJ> structure definitionisarepresentationofthe accessingJ algorithm,anditcanmakeuseofthe predefinedliter-PalstoprovidefieldpackingthatisoptimalforeachtargetG architecture. ` FCharacter-string functionsthatpermit efficientmanip-Lulationofstringdata regardlessoftherepresentationonCxthetarget architecture.+ Examples:+CH$PTRcreatesaBcharacter-stringpointer,CH$MOVEmovesa characterA) string,and CH$COMPAREcomparesthevalueoftwo4 strings.'Thereare25such functions. ` I  Compile-time conditionalsthatallowcompiledcodetobeGY  explicitly differentfor differenttargetarchitectures. ` I Apowerfulmacrofacilitythatallowsfor differentex-C1 pansionsfor differenttargetsystems; forexample,= %BLISS32(BYTE)expandstoits parameters(BYTEM inthiscase)onlyifbeingcompiledbytheBLISS-32com-M; piler.'Macroscanalsobeusedto segregatecode sequences0 thatdifferforeach architecture. ` B REQUIREandlibraryfiles.-Setsofcommondefini-Ok tionscanbekeptinfilesthatare selectivelyincludedinC  compilationsthroughuseoftheREQUIREorlibraryH declarations.,Thisisasimpleand efficientmethodofFusharingcommondata structuresand definitionsbetweenLmodulesina conditionalfashion.'Italsopermitscompile-E&time conditionalsand parameterized definitionstobeD maintained separatelyfromthecodeinthemodules.!l B#O1.8BACompleteProgramKOUAnexampleofacompleteprogramfollows.)ThepurposeofQOtheexampleisto illustratetheoverall structureofaBLISSOOprogram.'Theexampleisnota realisticprogram,althoughitMO^is executable.'A realisticprogramwouldrequiremanypagesROforitslistingaswellasmanypagesof explanation.)Instead,KOtheexampleisashortprogramthatreadsanumberfromJOhthe terminal,adds1toit,andprintsouttheresult.;  KOTheprogramiscomposedoftwomodules,TIOandE1.(ThePOfirstmodule,TIO,isassumedtobeageneral-purposelibraryNO5modulethatperforms input/outputattheuser's terminal.(ItHOincludesaninputroutine,GETNUM,thatreadsanumberQOthathasbeenenteredatthe terminal,andanoutputroutine,JO>PUTNUM,thatprintsagivennumberatthe terminal.(TheQOmoduleTIOisnotlistedhere.(Thesecondmodule,E1,istheMO specializedportionoftheexampleprogram.*ItcontrolstheNOHentireprocessandperformsthe specified operation(thead-SOditionof1)onthegivendata.(Thismoduleis presentedhere.(O~ MODULE%E1%(MAIN%=%CTRL)%=O BEGINO/ FORWARD&ROUTINEw CTRL, STEP;O( ROUTINE&CTRL%= O !+EO !pThis%routine&inputs%a&value,%operates%on%it,%and(O! !pthen%outputs&the%result. Oi !- BEGIN EXTERNAL%ROUTINE6zb GETNUM,!%Input%a%number%from%terminal5z PUTNUM;!%Output&a%number&to&terminal LOCAL z: X,':: !%Storage%for%input%value z Y;(: !%Storage%for%output&value GETNUM(X); Y%=& STEP(.X);Z PUTNUM(.Y) END;O ROUTINE&STEP(A)%= Ot !+;O !pThis%routine&adds%1%to%the%given%value. O !-L (.A+1); O ENDO ELUDOMF OOAninformal discussionofthismodulefollows.'OnlythemainLOfeaturesare mentioned,andsomenew terminologyisintro-RO5duced.'Thepurposeistogiveageneralideaofhowamodule/Ois constructedandhowitworks.p! FIOThemoduleincludes comments,eachofwhichbeginswithMOan exclamationmark.'Not included,however,isalongcom-OO5mentthatnormallyappearsatthe beginningofamoduleandKOprovides informationabout copyright, authorship, revisions,Oandsoon.bBOTheouter structureofthemoduleisasfollows:(O MODULE%E1%(MAIN%=%CTRL)%=OP BEGIN O ... O ENDOI ELUDOM| RTOThefirstlinegivesthenameofthemodule,E1.'Italsospec-OOifiesthatthemainroutinefortheentireprogramisCTRL;MO5 therefore,whentheprogramis executed,the operatingsys-QOtemwillcallCTRL.Thethreedots representthebodyoftheOmodule.B GOThebodyofthemodulebeginswithaforward-routine-NO declaration,whichliststhenamesoftheroutinesthatarePO5declaredinthemodule.'The remainderofthebodyisdevoted3Otothe declarationsofthe routines.!hNOThefirstroutine-declarationbeginswiththe followingline:O ROUTINE&CTRL%=lBIOThislinegivesthenameoftheroutine,CTRL.BecauseNOCTRLisnotfollowedbya parenthesizedlistofnames,theLO5routineisnotcalledwith parameters.,ThepurposeoftheLOroutineistocontrolprogram executionandtocallotherO routines.! aKOThebodyoftheroutineCTRLisgivenafterthecommentOOthat describestheroutine.*Itcontainstwo declarationsfol-KO5lowedbythree expressions.+The declarationsdonotcauseMOactions directly;instead,theydescribethenamesthatareMOusedintheroutine.'Thefirst declaration describesGETNUMGO>andPUTNUMasnamesofroutinesthataredeclaredinJOanothermodule.)Thesecond declaration describesXandYLOasthe addressesofstoragesegmentsthatareusedduring'OH executionofthisroutine.u4OThethree expressionsareasfollows:O GETNUM(X);OP Y&=% STEP(.X);O PUTNUM(.Y)0 POThefirsttwo expressionsare terminated (followedbyasemi-NOcolon);thethirdisnot.+These expressionsspecifyseparateNO5actions,andareexecuted(ormore precisely, evaluated)oneROafteranother,intheorderwritten.(Thefirst expressioncallsFOtheroutineGETNUMtoreadanumberfromtheuser'sLO>terminalandstoreitataddressX.Thesecond expressionNOcallstheroutineSTEPtoadd1tothecontentsofXandTOthenassignstheresulttoY.(Thevaluesofthefirsttwoex-QOH pressionsare discarded;thus,these expressionsareusedinaCOstatement-likeway,solelyfortheirside effects.) `FOThethird,non-terminated expressioncallstheroutineLOPUTNUMtoprintthecontentsoflocationYattheuser'sOO5 terminal,butalsotoprovideavaluefortheroutineasaNOwhole.,Thisisthevalueoftheroutinecall, presumablyaHO completioncodereturnedbyPUTNUM.(Onetargetoperat-QO>ingsystem,VMS,requiressuchavaluetobereturnedbytheOOmainroutine.(Inthecaseofothertarget operatingsystems,IOthe main-routinereturnvalue,if provided,is ignored.)! !lOOThesecondroutine-declarationbeginswiththe followingline:O ROUTINE&STEP(A)%=! SOThislinegivesthenameoftheroutineSTEP.ItalsogivesaPOformalname,A,that representsthe parameteroftheroutine.OO5BecausethereisnoNOVALUE attribute,thisroutinealsore-OOturnsavalue.*ThebodyoftheroutineSTEPisgivenafterTOthecommentthat describestheroutine.(Itisasingleline,asO>follows:O (.A+1)%; WSOThisline specifiesthatwhenthisroutineiscalled,thevalueQOitreturnsis calculatedbyadding1tothecontentsoffor-KO5mallocationA,thevalueofthe parameter.,ObservethatOOthe semicolonhereisthe terminatoroftheroutinedeclara-SOtion,andassuchdoesnot terminatethe expression.'IthasnoHO>effectonwhetherornottheroutinereturnsavalue.F TNOThe expressionthat constitutestheroutinebodyisenclosedPOin parenthesesforaddedclarity;theeffectwouldbeexactlyOO5thesamewithoutthe parenthesesinthiscase.'An equivalentNOwayof expressingthisroutine declaration,whichshowsmoreFOclearlytheroleofthe semicolon,isthe following:Ok ROUTINE&STEP(A)%= O !+;O !pThis%routine&adds%1%to%the%given%value. Od !- BEGIN .A+1; END; OSection1.4.6A discussesthe equivalenceofthe parenthesispairCOandthe BEGIN-ENDpairasusedinthese examples.*OF?@9! 7O 3.2BLISS!Values"and!Data!RepresentationsLOTherangeofdatavalues permittedandthekindsofdataLOrepresentations availableare importantcharacteristicsofaFOB programming language.+BecausetheBLISSlanguageisaIOsystemsimplementation language,itsvalueanddatarep-PO resentationsarecloselyrelatedtothosedirectlyprovidedorPOL efficientlyhandledbythemachine architectureofeachtargetOsystem.WKOThischapter describesthevaluesanddatarepresentationsIOprovidedbyeachBLISSdialect.,BecausethethreeBLISSHO5targetsystemshave substantially different architecturesLO(wordsizes, addressableunits, characterstring representa-SOtions,andsoforth),portionsofthischapterare, necessarily,O>system specific.  "O 4.2Primary! Expressions5OInmost high-level languages,theterm expressionxreferstoOOthekindsof constructthatperform calculation,suchastheKOBadditionoftwonumbersor,perhaps,the concatenationofQOtwostrings.)Such expressionshavevalues;infact,theirsole-Opurposeisto calculatevalues.L"ROInBLISS,theterm expressionappliestoall constructsoftheHOlanguageexcept declarations.+Forexample,the constructPO5thatassignsavaluetoadatasegmentisan expressionandKOhasavalue.+Asanotherexample,the constructthatcon-SOtrolsan executionloopisalsoan expressionandhasavalue.RO>Thusitis possible,althoughunusual,toaddthevalueofanHOassignment-expressiontothevalueofaloop-expression. kQOTherearefourkindsof expression,asshowninthe followingOsyntaxdiagram:O0 expression 8 w< :primary4operator-expressionexecutable-functioncontrol-expression 9 w= ;"OThischapter describes primary expressions#V.)ItisthefirstofOOfourchaptersthatdescribethevariouskindsof expressions. NSOThefirstsectionofthischapter discusses primariesinagen-KOeralway.,Eachofthe remainingsectionsofthischapter>O5 describesonekindofprimaryinmoredetail.z "g u =O numeric-literal K8 Kw< K:decimal-literalAinteger-literal ~character-code-literal float-literal 9 w= ;Odecimal-literalK decimal-digit...O decimal-digit KfA0|1|2|3|4|5|6|7|8|9 gO,integer-literal K,8 K< K: !%B ^%O%DECIMAL %X ,9 = ; I{'!|{opt-sign integer-digit{... <{'Oopt-sign#K{+|-|nothing}O integer-digit K'nA0|1|2|3|4|5|6|7|8|9):A|B|C|D|E|F 'o$O: character-code-literal%C : ': quoted-character : 'Ok quoted-character Kk 8 K < K; :.` $printing-character-except-apostrophe blank  tab  '' k 9  = ; ;O float-literal K 8 K < K\ :(| single-precision-float-literal( double-precision-float-literal: 0extended-exponent-double-precision-float-literal<2 2extended-exponent-extended-precision-float-literal $ 9 $ = $ \ ;P !OLsingle-precision-float-Oliteral Kc%E c'cmantissa on8AEexponent8~nothing ~oo c'!Odouble-precision-float-Oliteral K%D 'mantissa n=xDexponent=nothing o 'Oextended-exponent-!Odouble-precision-float-O4literal KF%G F'Fmantissa 8 _< :HGexponentHBQexponentHnothing 9 _= ;  (z 36Only H' "H(H32Only ' "(32/36Oextended-exponent-#Oextended-precision-float-OUliteral K%H 'mantissa nCQexponentC nothing o ' (e32OnlyOmantissaKopt-sign 88 8< 8U:udigitsdigits..digits,digits.digits %9 %= %U;Oi exponentKi opt-signdigitsO] digitsK] decimal-digit] ...OP opt-sign#KP {+|-|nothing} !GwO4.1B PrimariesKOUEvery expressionisbuiltupfromoneormore primaries.LOThesimplestformof expressionisasingleprimary.*MoreGO complicated expressionsare constructedof primariesin'O^ combinationwith operators.l _KOThereis considerablevarietyamongthe primaries.*Apri-OOmarycanbesimplyanumeric-literal,suchas4,oritcanNO5beablockof considerablelengthand complexity.(AprimaryNOcanspecifyavery elementary operation,suchastheforma-VOtionofastorageaddress,oritcancallalongand complicatedLO>routine.'The followingareexamplesofprimary expressions: O 52 !A%numeric-literal&whose&value&is&5QO, 'Enter%data:'!A%string-literal%composed%of%11%ASCII% charactersO PLIT&(5,4)0 !A%pointer%to%a&pair%of%literalsO TOP_OF_LIST !A%name Oh F()8h !A%call%to%routine&F%with%no% parametersKO G(5,& PLIT(5,4))!A%call%to%routine&G%with%two% parametersMO: X[ACCESS_LEVEL]!A%structure-reference%to%a&field&of&a%data !structure%named%XO BETA<2,6>A !A%field-reference&to&the%six% high-order%bits&of3 !the%byte&at&BETAO (.X%+%.Y)@ !A%simple&kind%of%block,&called%a& parenthesized !expressionOM BEGIN;M !A%more% complicated%block,%which%contains%aO LOCAL%T;- !declaration&and%two% expressionsO T=0;O% G(T,5); Om ENDAO4.1.1BSyntaxhOprimary 8 > > W< > 7> : numeric-literalZstring-literalplitnameBblockstructure-reference routine-call+field-referencex codecomment 9 > > W= > 7> ;O4.1.2B SemanticsQO4The semanticsof primariesisgiveninthe following sections,GOwhereeachkindofprimaryis considered individually.K%  n`PLIT` UPLIT >oO plit 8 4< :allocation-unitpsect-allocation+6psect-allocationallocation-unitsnothing 9 4= ; (U16/32 Z(UZ16/32 (plit-item,... :)Opsect-O4 allocationPSECT (psect-name)O' psect-namenameOX plit-item X8 < (:kf plit-groupkplit-expressionk plit-string X9 = (;Oy plit-group y 8  < I :k allocation-unitk REP replicatorOF.k REP replicatorOFallocation-unit y 9  = I ;  ( 16/32  ( 16/32 (plit-item, ... U )O 16/32Only y ){QO allocation-OLunit 8 w< :k#LONGk`WORDkBYTE T9 Tw= T; A( A32Only6O replicator compile-time-constant-expressionOplit-O# expression'link-time-constant-expression%O plit-stringstring-literal +*,( O4.10CCodeCommentsNOUAcodecommentplacesacommentintheobjectpartoftheNO compilationlistingofthemoduleinwhichitappears.)ThusDOcodecommentspermit annotationoftheobjectcode. NOIn addition,acodecommentactsasabarrierto optimiza-MOtionsthatarenormally performedbythe compiler,inthatLO5such optimizationsdonotcrossthecodecomment.*ThusitROdividesthesourcelistingandtheobjectlistingintoportionsLOthatcontainmutually correspondingsourceandobjectcode.B O4.10.1CSyntaxIlOcodecom-O0ment'4 CODECOMMENT quoted-string,[...:!blockzO4.10.2C SemanticsOO4Thevalueofacodecomment expressionisthevalueoftheOblock.NOAcodecommentplacesthegiven quoted-stringintheobjectLOcodelistingintheformofanassemblylanguagecomment.A! EOAcodecomment expressionpreventscodemotion.-ThatLOis, expressionsinthesourcethatappearbeforethecodeNO5comment expressionarecompiledinto instructionsintheob-JOjectcodethatprecedethe generatedcomment,andsourceHO expressionsthatfollowthecodecomment expressionareJO>compiledinto instructionsthatfollowthe generatedcom-NOment.'Acodecommenthasothereffectson optimization.'ForLOexample,thecompilerwillnotplaceavaluein temporaryOOHstorage(suchasa register)beforeacodecommentandthenPOfetchthevalueafterthecodecomment.&Instead,thecompiler#O recalculatesthevalue.zMOAgeneral descriptionof optimizationisgivenintheuser-OmanualforeachBLISS compiler.g.  AssociatesfromO] operator- expressionb].e2]righttoleft b r+ -  !e2righttoleftbe15^5e2lefttorightO decreasingpriority b(e1 8 B< : MOD 3* g/ 9 B= ; (e2lefttoright be1  + - 9 ie2lefttoright be1 b 8 by < b :EQL|EQLU|EQLA NEQ|NEQU|NEQA@ LSS|LSSU|LSSA} LEQ|LEQU|LEQA GTR|GTRU|GTRA GEQ|GEQU|GEQA e 9 ey = e ; _ e2Tlefttorightb NOT5e2 righttoleftb e15AND6e2 lefttorightb e15OR6e2 lefttorightrH bce1 on FEQV XOR oo ce2Llefttorightbe1=e2righttoleft On qe1 e2 o b8 b< b:primaryoperator-expression>executable-function 9 = ;B,+-e(O 5.2 Computational! ExpressionsIOThe computational expressionsofBLISSprovidetheoper-JOationsofthe language.+Asingle computational expressionQOBperformsasinglebasic operation,likeadditionorthefetch-MOingofavalue.*A combinationof computational expressions,LOnestedonewithinanother,canperformalongandcompli-*OLcatedsequenceof operations./! LO Computational expressionsare classifiedaseither operator-GO expressionsorexecutable-functions.-Atypical operator-SO5 expressionisA=0;itassignsavalue,thatis,placesavalueSOinstorage.-Itis identifiedbytheequalsign( = )operatorMOthatappearsbetweenthetwo operands,Aand0.*AtypicalLO>executable-functionisMAX(.X,.Y,.Z);itselectsthemaximumNOofseveralvalues,anditis identifiedbythekeywordMAXQOthatprecedesthe parameters.X,.Y,and.Z.All computationalNOH expressions, regardlessoftheirsyntax,performa predefinedFO operationongivenvaluestoproducearesultvalue.p$1 02) &O6.1BConditional-ExpressionsNOUAconditional-expressionperformsagiventestandthen,de-ROpendingonwhetherornotthetestis satisfied, evaluatesthe9Ofirstorsecondoftwogiven expressions.!t>OAnexampleofaconditional-expressionfollows:6O IF%.X%GTR%XMAX%THEN&F(.X)&ELSE%G(.X);NOOInthisexamplethecontentsofXiscomparedwithavalueLOXMAX.If.XisgreaterthanXMAX,thentheroutineFis6O5called; otherwise,routineGiscalled.AO6.1.1BSyntax O conditional-0 expression 8 w< :8 IFtestTHEN consequenceELSE alternative%IFtestTHEN consequence 9 w= ; O8 O< O:#testp consequence alternative R9 R= R; expressionTOInadditiontothese syntacticrules,the followingrulealsoisO required:ArDAnELSE alternativealwaysmodifiestheclosestIF-.(THENinaconditional-expression.zIOAnexampleofan expressiontowhichthisruleappliesOfollows:MOa IF%.A%EQL%0%THEN&IF&.B&EQL%0&THEN%X%=&5%ELSE%X&=%6;!9OThis expressionis interpretedasfollows:OO IF%.A%EQL%0%THEN&(IF%.B%EQL%0%THEN&X%=%5&ELSE%X%=&6);O6.1.2B RestrictionsKO4Aconditional-expressionthatlacksan``ELSE alternative''HOmustnotbeusedinacontextthatrequiresavalue.F O6.1.3B Semantics O4The#4 satisfactionofatest.4dependsonthe low-order(right-ZOmost)bitofthevalueofthetest.(Ifthe low-orderbitis1,theJOtestis satisfied; otherwise,thetestisnot satisfied.Q'OO Expressionsusedastest expressionsaresubjecttoaneval-OOuationrulethatismoreflexible(for optimization purposes)LO5thantheruleappliedinother contexts.. Specifically,the=Otest-expression evaluationruleisasfollows: MWithinatest expression,an expressionthatisnotneededO(to determinethevalueofthetest expressionisnotneces-sarily evaluated.zROAtest expressionthatissubjecttothisruleappearsinthe,O followingconditional-expression:*Oa IF%.A%OR%F(.B)%THEN&X%=%0tUOIfthecontentsofAis1(true),thenthevalueoftheentireQOtest expressionis1(true) regardlessofthevalueofF(.B).LO5 Consequently,thecallonroutineFmaynotbe evaluated.MOWritingthetestinthereverseorderdoesnotchangetheO situation.'(See`Section6.1.4.3)*`?POGiventhe preceding descriptionoftest evaluation,theinter-MO pretationofanentireconditional-expressionisasfollows:J"`1.:Evaluatethetest.Q`O2.:Ifthetestis satisfied,evaluatethe consequenceanduseGthatvalueasthevalueoftheconditional-expression.W`'3.:Ifthetestisnot satisfiedandifan alternativeispresent,Kevaluatethe alternativeandusethatvalueasthevalueHoftheconditional-expression.-Ifan alternativeisnotC1present,thevalueofthe expressionis undefined. O6.1.4B PragmaticsOO4The followingconcernsthenestingof conditional expressions,IOtheuseofreturnedvalues,andpropertest evaluation.! }8O6.1.4.1CNestingof Conditional ExpressionsMO) Conditional expressionsprovideawaytochooseoneoftwoJOmutually exclusiveactions, dependingona specifiedtestO condition.'Thej test , consequence,or@ alternativecanbeanyex-NO3 pression.)Itiscommon,forexample,forthe consequenceorTO alternativetobeasequenceof expressions(writtenasablock)!Oasinthe following:Oh IF%.X%EQL%0*O THEN&(Y&=%.Y+1;%F(.Y);&G())#O ELSE&(G();&Y%=%.Y-1); POControl expressionscanalsobeincludedinthese expressions.OForexample:5Oa IF%(IF%.X%EQL&0%THEN%.Y%ELSE&F(.Y))O THEN Z%=&G()%+&5;IOInthisexample,the followingconditional-expressionap-NOpearsasthetest expressionofanother,larger conditional-O5 expression:/O IF%.X%EQL%0%THEN&.X&ELSE%F(.Y)NIOTheinnertest(.XEQL0) determineswhichofthetwoPO expressions(.YorF(.Y))isusedasthetestfortheouterO5 conditional.G2O6.1.4.2CUsedVersus DiscardedValuesLO)EveryBLISS expressionhasavalue;however,insomecon- Otextsthatvalueis used!andinothersitisC discarded.+ThisLOaspectofBLISSis discussedherebecausethe conditional-KO3 expressionisagoodexampleofan expressionthatworksMOaswellinboth contexts.+However,the following discussionHOappliestothevalueofanykindofBLISS expression.zFOAnexampleofaconditional-expressionwhosevalueis usedOisasfollows:6Oa D&=%(IF&.I&EQL%.J%THEN&20&ELSE%30); WOIf.Iand.Jareequal,then20(whichisthevalueofthecon-IO sequence)becomesthevalueoftheconditional-expressionOO5andisassignedtoD.Notethat,becausethe assignmentex-TOpressionisfollowedbya semicolon,itsvalueis discarded,but=Oonlyafterthe assignmenthasbeen performed.zFOAnexampleofaconditional-expressionwhosevalueis dis-O carded^isasfollows::Oa IF%.I%EQL%.J%THEN%D&=%20%ELSE%D&=%30; WROAssumethat.Iand.Jareagainequal;thenthe evaluationofROthe consequencecauses20tobeassignedtoDandalsocausesNO520tobethevalueoftheconditional-expression.,SincetheQOconditional-expressionisfollowedbya semicolon,itsvalueisO discarded.! NQOThetwo expressionsjustgivenare equivalentin function,andSOarecloseenoughintheircostthatthechoicebetweenthetwoFO5examplesis ordinarilyamatterof programmingstyle. AO6.1.4.3CCompleteVersus IncompleteTest Evaluation O)As)Section6.1.3;)stated,atestmaynotbefully evaluated.LO Furthermore, different occurrencesofthesametestmaybePO evaluatedin differentways.(These variationsreflectthefactMO3thattheBLISScompilerperformsa far-reachinganalysisofNOthecontextinwhichatestappearsandthenproducescodeOOthatis optimizedforthatcontext.+Forthisreason,anex-RO<pressionthatmustbe evaluated(becauseitsetsvaluesorhasBOothersideeffects)mustnotbepartofatest.*?Z +0POIfan assignmentor routine-callmustbe evaluated,itsvalueMOshouldbeassignedtoa temporary variable.*ThenthevalueQO5ofthe temporaryvariablecanbeusedinthetest expression.OForexample:+O IF%.A%OR%F(.B)%THEN&X%=%0;in0OThiscanbe rewrittenasfollows:O T&=%F(.B);(OP IF%.A%OR%.T%THEN&X%=%0; 213 ! O6.2BCase-ExpressionsOOUAcase-expression evaluatesanindexandthenusesthevalueROofthatindextochooseone expressiontobe evaluatedfromaOsetof expressions.:?OAnexampleofacase-expressionisasfollows:)O CASE&.X+1%FROM%-1%TO%8&OF P SET [1]: F1(); [2%TO%4]:F2();( [5,&7,&-1]:pF3();p [INRANGE]:F4(); [OUTRANGE]:pF5();  TESQOInthisexample,thevalueof.X+1isusedtochooseoneof6Ofiveroutinestobecalledasfollows:^a OOValueof.X+1RoutineCalled O Ob-1 bF3 o0 F4 oV1 VF1 o2 F2 oI3 IF2 o4 F2 o=5 =F3 o6 F4 o07 0F3 o8 F4O$(allothervalues) $F5 O?AO6.2.1BSyntaxv+Ocase-expression{CASE case-index-0FROM low-boundTO high-boundOF ~SET case-line... TESO  case-line [ case-label,l ... ]:! case-action;OM case-label ,8 < :  single-value#Y low-valueTO high-valueINRANGEOUTRANGE Y,9 Y= Y; O'n case-indexF case-action 'o expression Ov8 O< OG:' low-boundt high-bound single-value low-value] high-value Wv9 W= WG;* compile-time-constant-expression_O6.2.2B RestrictionsIO4Everyvaluewithintherange specifiedbythe low-boundIOand high-bound expressionsmustbe accountedforexactlyOOonceinacase-expression.*IfanintegervalueintherangeOO=isnot explicitlygiven,a case-actionmustbe specifiedforOINRANGE.MOIfthe case-indexcanassumeavalueoutsidethe specifiedEOrange,a case-actionmustbe specifiedfor OUTRANGE.OOIftheINRANGE case-labelisused,itmustappearafterall:O case-labelsofoneofthe followingforms:Oa single-value#O low-value%TO% high-valueYFOThus,theonly case-labelthatcanfollowINRANGEisO OUTRANGE.VYO6.2.3B Semantics O4The4 matching<`4ofthe case-indextoa case-label determinesKOthe case-actiontobe evaluated.+ThesyntaxprovidesfourSOkindsof case-label.(The followinglistgives,foreachkindofFO= case-label,the conditionunderwhichamatchoccurs.! / OO Case-Label"3 ConditionforaMatch OOb single-value43bAmatchoccursifthevaluesofthe13 case-indexandthe single-valueare3equal.NOw low-valueTO high-valueAmatchoccursifthevalueofthe33 case-indexisintherange specified23bythevaluesofthe low-valueand23_ high-value expressions(thatis,the/3 followingsigned comparisonshold:3 low-value ~ case-index *j high-value).OtINRANGE33tAmatchoccursifthevalueofthe33 case-indexisintherange specified23bythevaluesofthe low-boundand23\ high-bound expressions(thatis,the/3 followingsigned comparisonshold:3 low-bound  case-index Ihigh-13Ebound)andthe case-indexdoesnot(3matchanyother case-label.O OUTRANGE33 Amatchoccursifthevalueofthe43Z case-indexisoutsidetherangespec-43ifiedbythevaluesofthe low-bound'3and high-bound expressions. O OOGiventhe preceding definitionof matching,theinterpretation;Oofanentirecase-expressionisasfollows:> (`1.:Evaluatethe case-index.L`O2.:Evaluatethe case-actioninthe case-linethatcontains8the case-labelmatchedbythe case-index.S`'3.:Usethevalueofthe case-actionasthevalueofthecase- expression. tpOOThecase-expressionisdesignedforaspecial,very efficientLOimplementation.*InordertomakeadecisionaboutusingaGO5case-expression,youneedto understandits implementa-POtion.(Briefly,theboundsand case-labelsofacase-expressionJOareall!compile-time-constant-expressionsandcan thereforeNO>be evaluatedbythe compiler.)Forthisreason,thecompilerOcanprepareaa transfervector.foruseinthe evaluationofaIOcase-expression.,ThetransfervectorhasoneelementforKOHeachvalueofthe case-indexintherangefrom low-boundNOto high-bound.)ThefirstelementofthevectorprovidestheOOaddressoftheobjectcodeforthe case-actionthatisper-GORformedwhenthe case-indexisequalto low-bound.,TheROsecondelementprovidestheaddressoftheobjectcodefortheLO case-actionthatis performedwhenthe case-indexisequal/O[to low-boundplus1;andsoon. pGOWhenacase-expressionis evaluatedduringprogramex-NOecution,onlyasingle operationisrequiredtogettotheQO5 appropriate case-action.'Thatis,the case-indexisusedasanMOindexintothetransfervector.)Thusacase-expressiondoes=Onotrequireasearchthroughthe case-labels.2O6.2.4B PragmaticsJO4Acase-expressionismostusefulwhenthe case-indexas-NOsumesvaluesinasmallrange.)Anexampleofthe effective/Ouseofacase-expressionfollows:-Oi CASE& .TYPECODE%FROM&0%TO%3%OF  SET [0]:% LITERAL();A [1]:% IDENTIFIER(); [2]:% KEYWORD(); [3]:% PREDCL(); TES;W -ROThiscase-expressionisusedtochoosetheroutinetobeeval-JOuatedbasedonthevalueof .TYPECODE.ThedatasegmentHO5namedTYPECODEcontainsacodethatissetearlierinBOtheprogram.,SinceTYPECODEcannotassumeavalueNOoutsidethe specifiedrange,a case-actionisnotgivenforIO>OUTRANGEandsinceeachofthevalueswithintherangeROis associatedwithaspecific case-action,a case-actionisnotOgivenforINRANGE..vectorsizecitedarenot appropriateforalltargetsystems,ofQOcourse,butdoconveythe essential differencesbetweenselect-'Oandcase-expressionusage.)AO6.3.1BSyntax Oselect-expression n(hSELECT!|!SELECTU"|!SELECTA1h SELECTONE!|! SELECTONEU"|! SELECTONEA o select-indexOF SET3 select-line|3... TESOt select-linet[ select-label,t... pt]:! select-action;O select-label 8 < d:ssselector)s low-selectorTO high-selectors  OTHERWISEs[ALWAYS @9 @= @d; O8 O< O:_ select-index select-actionselectorH low-selector high-selector r9 r= r; expressionO6.3.2B RestrictionsFO4The select-labelALWAYScannotbeusedinanexpres-?Osionthatbeginswith SELECTONE, SELECTONEU,orO SELECTONEA. O6.3.3B Semantics O4The4 matching@^4ofthe select-indextoa select-label determinesNOwhetherornotthe select-actioninthe select-linecontain-MOingthe select-labelis evaluated.+ThesyntaxprovidesfourUO=kindsof select-label.(The followinglistgives,foreachkindofHO select-label,the conditionunderwhichamatchoccurs. OO Select-Label"y ConditionforaMatch OObselector=ybAmatchoccursifthevaluesoftheselect-+yindexandselectorareequal.O) low-selectorTOw high-selectorO determinesthekindof comparison,asfollows:6ONoaddedletter:Usesigned comparison.:O]LastletterisU:Useunsigned comparison.9OLastletterisA:Useaddress comparison. IOGiventhe preceding discussionofmatchingand keywords,SOtheinterpretationforanentireselect-expressionisasfollows:! f*`1.:Evaluatethe select-index.O`O2.:Letthefirst select-lineoftheselect-expressionbethe current select-line.M`'3.:Evaluatethe select-labelsonthecurrent select-linetoD determinewhetheratleastoneofthemmatchesthe select-index.S`W4.:Ifamatchisfound,thenevaluatethe select-actionofthe=current select-line.' Otherwise,gotostep6.K`/5.:Iftheselect-expressionisaformof SELECTONE,thengotostep8.V`6.:Ifthecurrent select-lineisthelast select-line,thengoto`step8.Q`7.:Letthe select-linethatfollowsthecurrent select-linebe?8thenewcurrent select-lineandgotostep3.P`8.:Usethevalueofthemostrecently evaluated select-actionLasthevalueoftheselect-expression.)Ifno select-actionJhhasbeen evaluatedduringthis evaluationoftheselect-K expression,use-1asthevalueoftheselect-expression. SOInstep3ofthisinterpretation,the select-labelsinasingleHO select-linemaybe evaluatedinanyorder.+ Furthermore,PO5theyaresubjecttopartial evaluationinthesamewayasa3Otestinaconditional-expression(seebSection6.1.3).n Therefore,MOa select-labelmustnotcontain assignmentsor routine-callsIO>thatmustbe evaluatedbecausetheyhave importantsideOeffects.*bP?98:@:#O 7.2Constant! Expressions OA constant expression6oisan expressionthatcanbe evaluatedMObeforeprogram executionbegins.(The practicaland efficientJOBimplementationofBLISSrequiresthatconstant expressionsOObeusedincertain contexts,as specifiedinthesyntaxdi-KOagrams.,An expressionisaconstant expressionifcertainQOL restrictionsaremet,andthose restrictionsaregiveninthisOchapter./;! JOTherearetwokindsofconstant expression.+Thecompile-QOtimeconstant expressionisthemoreheavily restrictedofthePO5two,andcanbe evaluatedduringthe compilationofthemod-LOuleinwhichitappears.*The link-timeconstant expressionKOincludesthe compile-timeconstant expressionasaspecialOO>case,andcanbe evaluatedbythe compiler,thelinker,and4Othe operatingsystemworking together.<ePOThischapterhastwo sections,oneforeachkindofconstantO expression.;<;=h! z'O 8.2Blocks!and! DeclarationsQOThischapter describesthegeneral structureanduseofblocksLOand declarations.'Blocksand declarationsarethe fundamen-OOBtal structuralfeaturesofBLISS.TheyareinterdependentandOOcomplementary.(Ablockisusedtogatherasequenceofdec-QO larationsand expressionsintoasingle construct.(In contrast,SOLa declarationisusedto distributeasinglesetof informationQOtomanyplacesinablock,thatis,toeachplacewherethe#Odeclarednameisused.}i SSOLaterchaptersdescribespecifictypesof declarationsindetail.~?>@ O 9.2 AttributesPOMany declarationsareusedto associate attributeswithade-TOclaredname,aswellas declaringthenametobeofaspecificIOBkind.*Some attributesarecommontomanyformsofdec-OO larations,andsomeapplytoonlyafewforms.)Thischapter1O describesthe attributes themselves.lBBOThe followingsyntaxdiagramliststhe attributes:5x O attribute 8 > > _> > 7< > > > > _:-*allocation-unit-xextension-attribute-structure-attribute-field-attribute-`alignment-attribute-initial-attribute-preset-attribute-Ipsect-allocation-volatile-attribute-novalue-attribute-1linkage-attribute-range-attribute -address-mode-attribute-weak-attribute ?9 ?> ?> ?_> ?> ?7= ?> ?> ?> ?> ?_; "("16/32 p(p16/32 X(X16/32 (16/32Only (32Only NVOEach attributeis describedinasectionofthischapter.'AfinalMOsection summarizestheusageof attributesbyshowingwhichGO5 attributecanbeusedwithwhichkindof declaration.CF) 8Oinitial-attributesINITIAL( initial-item,... g)O initial-item b8 b{< b:" initial-group_initial-expressioninitial-string 9 {= ;O initial-group b48 b< b:Callocation-unitREP replicatorOF.REP replicatorOFallocation-unit h49 h= h; H(5H16/32 (516/32b( initial-item,... j)O16/32Only y)O allocation-unit bI8 b< b:\LONGWORDBYTE I9 = ; \(m\32OnlyO- replicator*b- compile-time-constant-expressionO initial-O] expressionb* expression x 1(OQ initial-stringstring-literal O  O 1fm The initial-itemcanbean executable expression,butis restrictedinusetoa\O' link-timeconstant expressionforOWNandGLOBAL declarations.ForLOCAL,LOj STACKLOCAL, REGISTER,GLOBAL REGISTER,andEXTERNALREGISTEROO declarationsthe initial-itemcanbean executable expression. EDG%O9.6BTheInitial-AttributeDOUAninitial-attributecanbeusedinanOWN,LOCAL,2O STACKLOCAL, REGISTER, GLOBAL-REGISTER,;OEXTERNAL-REGISTER,orGLOBALdata-declaration.NNOAninitial-attributesuppliesoneormoreinitializationval-MOues,whichareassignedtothedatasegmentbeforeprogramO5 executionbegins.3l  AOExamplesoftheuseofinitial-attributesfollow:O OWN%X:% INITIAL(2);%j !X&is& initialized&to&2.Oq GLOBAL%Y:% VECTOR[6]0jq !Each&element%of%Y%is% initialized$ INITIAL(REP%6%OF%(-1));j !to%-1. O16/32Only:%O GLOBAL%Z:%VECTOR[20,BYTE]+j !The%first%4%bytes%of%Z&areP INITIAL(BYTE('STOP',+jP !initialized%to%S,%T,%O,%and@ REP%16%OF%(0)));K!P;%the%last%16%bytes%to%0.oMEO9.6.1BSyntax.O4SYNTAX:4ClicktodisplaySyntax.*OO xO9.6.2B RestrictionOOThe initial-itemvaluesmustnotoccupymorestoragethanis-O_ allocatedforthedatasegment.MOIfa declarationcontainsbothastructure-attributeandanKOinitial-attribute,thenthestructure-attributemustprecede!Oitheinitial-attribute. NPOIfa declarationcontainsbothanallocation-unit(usedasanMO attribute)andaninitial-attribute,thentheallocation-unitEO5mustprecedetheinitial-attribute (BLISS-16/32only).BO9.6.3BDefault O BLISS-16/32ONLYQO4Ifaninitial-attributeappearsinthe declarationofascalarNOnamewithoutastructure-attributebeingpresent,thedefaultROallocation-unitforthe initial-itemsintheinitial-attributeisNO>theallocation-unitofthescalarname.( Otherwise(withoutaMOstructure-attribute),thedefaultallocation-unitisWORDfor-OBLISS-16andLONGfor BLISS-32.! O9.6.4B SemanticsOO4Withthe exceptionofthecasewhereaLOCAL declarationisPOhandlinganon-PLITitem,thelistof initial-itemsisevalu-VOatedasitwouldbeinaPLIT.The resultingvalueisplacedinVO=thedatasegmentatthetimeitis allocated.'Ifthe initial-itemQOoccupieslessstoragethanthedatasegment,thetrailingbits>Oofthedatasegmentare initializedtozeros.tVJO9.6.5B PragmaticsKO4TheuseoftheINITIAL attributeisthe preferredmethodNOfor initializingscalardata segments,whiletheuseofthe/OPRESET attribute(as describedin8Section9.7)isthebest9O=methodfor initializing structuredstorage.*8~?SJ IK&O9.10CTheNovalue-AttributeKOUThenovalue-attributecanbeusedinaroutine-declarationNOorabind-routine-declaration.)It specifiesthatthedeclared/Oroutinedoesnotreturnavalue.OOItisusuallypossibleto determineby inspectionwhetherorNOnotaroutinereturnsavalue.+However,inordertofacil-LO5itate optimizationandtoprovidecleardocumentation,thisOO informationmustbegivenaspartofthe declarationoftheHO routine-name.+ Specifically,thenovalue-attributemustorNO>mustnotbeused dependingonwhethertheroutinedoesnot%Oordoesreturnavalue.l *ROAnexampleofaroutinethatdoesnotreturnavaluefollows:VOa ROUTINE& EXCH(X,Y):%NOVALUE%=p!There&is&a%NOVALUE% attribute,&so&the BEGIN0 !routine%does%not%return&a%value; LOCAL%TEMP;2 !instead,&its%effect%is%to%exchange9 TEMP%=&..X;&9 !the%values%of%X%and%Y. .X%=%..Y; .Y%=%.TEMP; END;> HOThisroutine,havingnoRETURN expression,returnscon-LOtrolaftercomplete evaluationofthe routine-body.*BecauseMO5the routine-bodyisablockthatconsistssolelyofblock-LOactions (expressions terminatedbya semicolon)andhasnoIO block-value,novalueis returned.)TheNOVALUE attribute=O>affirmsthisprocedure-likecharacteristic.(See>Section8.1 x>for>Oa discussionof block-actionsand block-values.*|?jS)HONotethatifroutineEXCHdidnotcontaintheNOVALUEMO attribute,thecompilerwouldassumethatanull expressionLO5(namelythe block-value expression)existsbetweenthelastIO expressionshownandtheblock terminator.,ThisinturnMOwouldcausethe compilation diagnostic``Null expressionap-KO>pearsinvalue-required context''.+WhensucharoutineisOOcalled,itmayappeartoreturnavalue,butthatvalueisOunpredictable.^ 4POAlternatively,ifthelast assignment expressionwerenotter-IOminatedbya semicolon(andNOVALUEwas specified),theKO5routinewouldindeedhaveablock-value-thevalueofthatIO assignment expression.*However,thatvaluewouldbedis-KOcardedpriortoreturnofcontrolbecauseoftheNOVALUEFO> attribute.-Thus,aroutinewiththeNOVALUE attributeIOneverhasareturnvalue,nomatterwhatvalue-implying-O expressionsappearinitsbody.BO9.10.1CSyntaxN$$Onovalue-attributeNOVALUEO9.10.2C RestrictionsOO4Aroutinethatisdeclaredwithanovalue-attributemustnot?Obecalledinacontextthatrequiresavalue.O9.10.3C SemanticsMO4Thevalueofaroutinethatisdeclaredwiththenovalue-#O attributeis undefined. ONPl Fl B 0O9.15CASummaryof AttributeUsageUOUEach attribute descriptioninthischapterincludesalistoftheOO declarationsinwhichthe attributecanbeused.(Thatinfor-OOmationisgatheredtogetherinthe followingtable,whereanPO^``x''markseach attributethatcanbeusedineachkindofO declaration.< Allocation-Unit |K Extension |K|K Structure |K|K|KField\ |K|K|K|K Alignment  |K|K|K|K|KInitial" |K|K|K|K|K|KPreset/3 |K|K|K|K|K|K|KPsect-Allocation*{ |K|K|K|K|K|K|K|KVolatile, |K|K|K|K|K|K|K|K|KNovalue/  |K|K|K|K|K|K|K|K|K|KLinkage0S |K|K|K|K|K|K|K|K|K|K|KRange= |K|K|K|K|K|K|K|K|K|K|K|KAddressing-Mode5 |K|K|K|K|K|K|K|K|K|K|K|K|KWeak2+ |K|K|K|K|K|K|K|K|K|K|K|K|K| O OWN2 XKXKXKXKXKXKXKXKXK.K.K.KXK.O GLOBAL2 XKXKXKXKXKXKXKXKXK.K.K.KXKXO$ FORWARD2$ XKXKXKXK.K.K.KXKXK.K.K.KXK.Ol EXTERNAL2l XKXKXKXK.K.K.KXKXK.K.K.KXKXO LOCAL2 XKXKXKXKXKXKXK.KXK.K.K.K.K.O STACKLOCAL2 XKXKXKXKXKXKXK.KXK.K.K.K.K.Oe REGISTER2e XKXKXKXK.KXKXK.K.K.K.K.K.K.@O GLOBAL%REG.XKXKXKXK.KXKXK.K.K.K.K.K.K.BO EXTERNAL%REG.XKXKXKXK.KXKXK.K.K.K.K.K.K. O^ MAP2^ XKXKXKXK.K.K.K.KXK.K.K.K.K.O BIND2 XKXKXKXK.K.K.K.KXK.K.K.K.K.@O GLOBAL%BINDXKXKXKXK.K.K.K.KXK.K.K.K.KXOy ROUTINE2y .K.K.K.K.K.K.KXK.KXKXK.KXK.O GLOBAL%RTN2 .K.K.K.K.K.K.KXK.KXKXK.KXKX@O FORWARD&RTN.K.K.K.K.K.K.KXK.KXKXK.KXK.AOP EXTERNAL%RTN.K.K.K.K.K.K.KXK.KXKXK.KXKXAO BIND&ROUTINE.K.K.K.K.K.K.K.K.KXKXK.K.K.EO GLOBAL%BIND%RTNK.K.K.K.K.K.K.K.K.KXKXK.K.KXOk LITERAL2k .K.K.K.K.K.K.K.K.K.K.KXK.K.O GLOBAL%LIT2 .K.K.K.K.K.K.K.K.K.K.KXK.KXAO EXTERNAL%LIT.K.K.K.K.K.K.K.K.K.K.KXK.KX S RTl$O10.3CForward-DeclarationsLOUAforward-declarationisusedtogivethe attributesofaLOnamebeforestorageis allocatedforthename.*Aforward-HO declarationisalwaysusedin conjunctionwithanown-PO^ declarationoraglobal-declaration;itisusedtoavoidwhatCOwould otherwisebeacircular definitionofnames.m OOAsanexample,supposethatXandYare pointers;thatis,OOXandYareeachthenameofadatasegmentthatcontainsMO5theaddressofanotherdatasegment.)Suppose,also,thatXSOandYmustbe initializedtopointtoeachother.'Therequired)O declarationsareasfollows:Ok FORWARD  Y; O OWNB X:% INITIAL(Y), Y:% INITIAL(X);nPOTheforward-declarationdeclaresYsothatitcanbeusedtoHO initializeXwhich,inturn,isusedto initializeY.BoO10.3.1CSyntaxp7Oforward-declarationFORWARD forward-item,... /;O forward-itemKQ forward-name ,8 ,k< ,:':!forward-attribute'...unothing 9 k= ;O forward-nameKnameOforward-attribute K8 Kv> K< KN> K:allocation-unit'extension-attributetstructure-attributefield-attributepsect-allocation]volatile-attribute#addressing-mode-attribute 9 v> = N> ; h(16/32Only h_(_16/32Only h(32OnlyqO10.3.2C RestrictionsJO4Eachnamethatisdeclaredbyaforward-declarationmustOOalsobe declared,asecondtime,byanown-declarationora=Oglobal-declarationthatisinthesameblock.orEOOAfterthedefault attributeshavebeenfilledin,aforward-IO declarationofanameandthe associatedown-declarationJO5orglobal-declarationofthesamenamemustbe identicalMOwithrespecttoallthe attributesallowedintheforward-O declaration.s 6OAllthe attribute restrictionsgivenin}Section10.1.2valsoapply$OtoFORWARD declarations.*s}F?StO10.3.3C SemanticsIO4Theforward-declaration associates attributeswithaname=Owithout allocatingthestorageforthatname.sT SUuu K%O10.4CExternal-DeclarationsIOUAnamethatisdeclaredEXTERNALisassumedtobede-GOclaredGLOBAL somewhereelseinthesameprogram.)TheKOlinkertreatseach occurrenceofthenamegovernedbyanLO^external-declarationasifitweregovernedbytheglobal-MO declarationofthesamename.(Thustheexternal declarationNOdoesnotcausethe allocationofadatasegmentbutratherPOhextendsthe accessibilityofadatasegmentthatis allocatedO elsewhere.BvO10.4.1CSyntax7w :Oexternal-declarationEXTERNAL external-item,)... ;O external-item external-name V8 < &:z:"external-attributezz...nothing V9 = &;O: external-name:nameOexternal-attribute a8 > 9< > :allocation-unitcextension-attributestructure-attributefield-attributeKpsect-allocationvolatile-attribute#addressing-mode-attribute4weak-attribute ua9 u> u9= u> u; t(%t16/32Only (%16/32Only E (%E 32Only  (% 32OnlyExVO10.4.2C RestrictionsIO4AnamethatisdeclaredEXTERNALmustalsobedeclaredFOGLOBAL somewhereelseinthesameprogram.)InBLISS-KO32,this restrictiondoesnotapplyiftheEXTERNALname#O=hastheweak-attribute.y:OAllofthe attribute restrictionsgiveninSection10.1.2also,OapplytoEXTERNAL declarations.*yF?SzNROAfterdefault attributeshavebeenfilledin,the followingat-GOtributesoftheEXTERNALandGLOBAL declarationsofa+O5givennamemustbe identical:{Kallocation-unit(extension-attributestructure-attributefield-attribute2volatile-attribute|O10.4.3C SemanticsOO4Thelinker generatesandusesalistofallnamesthatareFOdeclaredGLOBALintheentireprogram.,ForeachsuchPOname,thelistshowsthevalueofthenameandsomeofthePO= attributesofthename.*Thislistisusedin determiningthe;OvalueofagivenEXTERNALnameasfollows:}! W ` MThelistissearchedforanentryforthegivenname.)IfN(suchanentryisfound,thenitsuppliesthevalueofthe givenEXTERNALname. ` NInBLISS-32only,ifnoentryforthegivennameisfoundJYandthegivennamehastheweak-attribute,thenzerois5usedasthevalueofthegivenname. `1 I1Ifnoentryforthe given-nameisfoundandthegivenFnamedoesnothavetheweak-attribute,thenthepro-gramisnotvalid.]~! 3HOInBLISS-32only,whenanEXTERNALnamehasthevalueLOzero (determinedbecausenoentrywasfoundandtheweak-NO5 attributewas present),theprogramcanbeexecutedprovidedQOanattemptisnotmadetousethegivennameasanaddress.NEOAnEXTERNALnamealreadydeclaredcanbe encounteredEOinaGLOBALorFORWARD declaration.,IfsuchacaseAO5arisesduring compilation,the followingisdone:@&`1.:Parsethe declaration.F`O2.:Comparethe attributesoftheEXTERNAL declarationAwiththoseoftheGLOBALorFORWARD declaration.F`'3.:Ifamismatchoccurs,generateawarningmessage.UTV "O10.5CLocal-DeclarationsJOUThestorageforaLOCALdatasegmentis temporary;thatVOis,itexistsonlyduringthe executionoftheblockinwhichitROis declared.(Thedatasegmentis allocatedeitherinthestackRO^framefortheblockinwhichitis declared,orinageneral#Oregisterthatisfree.rHFOThescopeofaLOCALdata-declarationisitsimmedi-JOately containingblock excludingany lower-level containedJO5 routines.+Thatis,unlikeOWNdata segments, ``up-level''GO referencestoaLOCALdatasegmentfroma lower-level'Oroutinearenot permitted.BO10.5.1CSyntaxj1Olocal-declarationLOCAL local-item,... &;O local-itemQ local-name 8 k< :':"local-attribute'...unothing 9 k= ;O local-namenameOlocal-attribute9allocation-unit9extension-attribute9]structure-attribute9field-attribute9alignment-attribute9Finitial-attribute9preset-attribute9volatile-attribute (k16/32Only (k16/32Only (k16/32OnlyMgO10.5.2C RestrictionsIO4Alocal-declarationmustbe containedina routine-body.! WOOSupposethe routine-bodyofagivenroutine,routineA,con-ROtainsthe declarationofanotherroutine,routineB.IfanameRO5isdeclaredLOCALinroutineAandisnotdeclaredinroutineNOB,thenthenamecannotbeusedinroutineB.(SuchusageMOwouldbean ``up-level'' reference,whichis prohibitedforO> local-names.){NOAprogrammustnotdependontherelative positionsoftwo-OLOCALdatasegmentsinstorage.:OAllofthe attribute restrictionsgiveninSection10.1.2also)OapplytoLOCAL declarations.*F?S NKOBLISS-32only:'Analignment-attributeusedinthedeclara-LOtionofaLOCALnamemustnothaveaboundary expression-O5whosevalueisgreaterthan2.iV?O10.5.3C SemanticsLO4ThedatasegmentforaLOCALnameis allocatedeitherinOOthecurrentstackframeorinageneral register.*IneitherMOofthe following situations,agivenLOCALdatasegmentis } <  > U :allocation-unitextension-attribute: structure-attribute field-attribute initial-attribute" preset-attribute 9  > } =  > U ; (f16/32Only (f16/32OnlyV! V,O10.9.2C RestrictionsKO4Theregisternumber,ifgiven,mustbethesameasthatIO specifiedintheGLOBALlinkage-optionofthe containingPO routine'slinkage definition.'Aregisterdatasegmentmustnot*O=occupymorethana fullword.NHOAnexternal-register-declarationmustbe containedwithinMOaroutine declarationwhoselinkage definition specifiesthe)O5namedglobal-register-segment. WOOSupposethe routine-bodyofagivenroutine,routineA,con-ROtainsthe declarationofanotherroutine,routineB.IfanameHO5isdeclaredEXTERNALREGISTERinroutineAandisnotPOdeclaredinroutineB,thenthenamecannotbeusedinrou-POtineB.Suchusagewouldbean ``up-level'' referenceandis8O>not permittedforregisterdata segments.:OAllofthe attribute restrictionsgiveninSection10.1.2also5Oapplytoexternal-register declarations.*F?S! jLOAnamedeclaredinanexternal-register-declarationmustbeTOusedonlyastheoperandofafetch expressionorasthefirstLO5operandofan assignment expression.)(This restrictiondoesIOnotapplytocertainmachine-specific-function parameters;5Oseethe applicableBLISSusermanual.)!O10.9.3CDefaultsLO4Ifanexternal-register-declarationdoesnotspecifyareg-KOisternumber,theregister-numbergivenforthat external-FO register-nameintheGLOBALlinkage-optionisassumed. ! O10.9.4C SemanticsOO4Anexternal-register-declaration specifiesthataglobalregis-ROterdatasegmentcreatedinacallingroutineis availableforOOuse.*Thedeclarednamemustalsobe specifiedinthecalledTO= routine'slinkage definition;however,notalloftheglobalreg-POisterdatasegments specifiedinthelinkageneedbedeclared0Oinanexternal-register-declaration.m WCO BLISS-16/36ONLYRO4Ifaglobal-register-segmentis specifiedinthe routine'slink-EOagebutisnotdeclaredEXTERNAL REGISTER,thentheOOcontentsoftheregisterare preservedbythecalledroutineBO>andtheregisteris availableforother purposes.T `*OBLISS-32ONLYRO4Ifaglobal-register-segmentis specifiedinthe routine'slink-GOagebutisnotdeclaredEXTERNAL REGISTER,theninaMOroutinewithCALL linkage-typethecontentsoftheregisterRO>are preservedbythecalledroutineandtheregisterisavail-OOableforother purposes.)InaroutinewithJSB linkage-type,OOhowever,thecontentsofsucharegistercannotbe preserved references.U+OOThefinaltwosectionsreturntothe descriptionofspecificQOdata structures.)Onesectiongivesthefull definitionofeachJO5oftheBLISS predefined structures.*The remainingsectionAOgivesseveralexamplesof user-defined structures.^.Ofield-referenceaddress nfield-selectornothing aoO address primary4executable-function $O-field-selectorD<position,size _Pn ",sign-extension-flag_nothing Po XD> OvRpositionsize vd expression?Osign-extension-flagF compile-time-constant-expressionRa8& Ostructure-attribute n REFnothing o$structure-name n!^[allocation-actual,~... ]^nothing oOstructure-namenameOallocation-actual 8 _< :* compile-time-constant-expression$allocation-unitaextension-attributenothing 9 _= ; .(16/32 .Q(Q16/32O16/32OnlyOUallocation-unit 8 < b:LONGWORDBYTE 9 = b; ^(32OnlyOv16/32OnlyOextension-attribute  nSIGNED& UNSIGNED ^ o"dce )-O11.7COrdinary-Structure-ReferencesROUAstructure-referenceisusedtoaccessapartofa structuredROdatasegment.'Thepartofthesegmentthatisaccessedisde-KOterminedbythe access-actual parametersinthe structure-KO^ reference.*Forexample,astructure-referenceforavectorOOhasone access-actual parameterthat specifiestheelementof(Othevectortobe accessed.! JOThreekindsofstructure-referenceare provided:) ordinary,HOdefault,andgeneral.+Theordinary-structure-referenceisMO5byfarthemostcommonlyusedform.*ItgivesthenameofNOadatasegmentandreliesonthecompilerto determinetheJO appropriate structurefromthe declarationofthesegmentLO>name.(Adefault-structure-referenceissimilar,butthead-NOdressofthedatasegmentisgivenbyan expression,oftenHOa preceding ordinary-ordefault-structure-reference,andMOHreliesonthecompilerto determinethe structurefromtheOOdefault structure specificationgiveninaswitches-declarationGOormodule-switch.+Ageneral-structure-referenceisself-KOR contained..Itgivesallthe information necessaryfortheOaccess.!ZrationofAandtheaccess-actualsinthestructure-referenceJOto determinethefield-referenceforthe appropriateele-POmentofthevector.(Supposethe followingsetof declarationsOHisgiven:O OWN%A:K VECTOR[10];,O SWITCHES% STRUCTURE%(BLOCK&[1]);)O] FIELDJFL%=%[0,0,%BPVAL/2,0],)T FR%=%[0,%BPVAL/2,%BPVAL/2,0];!VCOAnexampleofadefault-structure-referencefollows:O A[.J][FL]! VEOThecompiler processestheinitialordinary-structure-QO reference,A[.J].Thefield-referencethatresultsisthenusedNO5astheaddresspartofa subsequentstructure-reference.'TheROcompilerusesthe specificationofthedefault structureintheSOswitches-declarationtofindthekindof structurethatisbeingHO> accessed.*Inthisexamplethedefault-structure-referenceOOisablockthatconsistsofone fullword.)Thestructure-bodySOthatisdeclaredfortheblockisusedin combinationwiththeQOHallocation-actualsinthedefault structure specificationintheIOSWITCHES declarationto determinethefield-referenceforIOthe appropriatefieldinthejthelementofsegmentA.!`COAnexampleofageneral-structure-referencefollows:O VECTOR[A,%.J;&10]yDOThisgeneral-structure-referenceis equivalenttothe5Oordinary-structure-referencegivenabove.NKOOrdinary-structure-referencesare describedinthissection.IODefault-andgeneral-structure-referencesare describedin#O5thenexttwo sections.BO11.7.1CSyntax&=O0structure-reference y8 yw< y:& ordinary-structure-reference%Zdefault-structure-reference%general-structure-reference 9 w= ;Oordinary-structure-A reference+y segment-name[ access-actual,... ]O4 segment-namey4nameOu access-actual yT8 y< y$:R field-name expressionnothing VT9 V= V$;xO11.7.2C RestrictionsKO4Astructure-attributemustbe associatedwiththesegment-Oname.WMOIf field-namesareusedasaccess-actualsinthe structure-JO reference,thenafield-attribute designatingthosefield-CO5namesmustbe associatedwiththe segment-name.-AnGO access-actual parametermustbegivenforeachaccess-GOformalnamethatappearsinthestructure-bodyofthe+O> associatedstructure-definition.MdO11.7.3C SemanticsIO4Anordinary-structure-referenceis interpretedasfollows:D |I`1.:Usethe segment-nametoobtainthestructure-bodyofK(the associatedstructure-definitionandtoobtaintheval-Kues associatedwitheachoftheallocation-namesforthat segment-name.P`Y2.:Ifthestructure-attributeforthesegmentdidnotincludeHthekeywordREF,then determinethevalueofthedataJ segmentname(whichistheaddressofthedatasegment)Bcand associatethatvaluewiththe structurename.! IbIfthe structure attributedidincludethekeywordREF,Ethenfetchthefullwordcontentsofthe segment-nameBand associatethatvaluewiththe structurename.L`3.:Ifoneormoreaccess-actualsisa field-name,replaceDeach field-namewithitsdefinedsequenceoffield-CD componentvalues.*This replacementmayincreasetheDnumberof access-actual expressionsinthe resultingstructure-reference.L`t4.:Evaluatethe access-actual expressionsand associatetheHith access-actualvaluewiththeith access-formalnameN%inthe structure definition.(Theorderof evaluationofthe<~ access-actual expressionsisnotdefined(see ~Section5.1.4).F`5.:Evaluatethestructure-bodyusingthevaluesasso-EVciatedwitheachoftheallocation-formalnames,the: access-formalnames,andthestructure-name.O`.6.:Usethe resulting expression(whichis typicallyafield-> reference)inplaceofthestructure-reference.* A?+eO11.7.4C DiscussionKO4An importantcharacteristicofstructure-referencesisthatJOthe access-actual expressionsinastructure-referenceareJOeach evaluatedexactlyonce.-The resultingvalueisusedIO=inthestructure-body evaluationineachplacethatthe!O access-formalappears.a1OConsiderthe following declarations:O EXTERNAL%ROUTINE P X,  Y,  F;O( STRUCTUREp XYZ[A;B]%= z [B]z (XYZ+X(A)+Y(A));OH OWN%ABC:%XYZ[4]; OOGiventhese declarations,thestructure-referenceABC[F( )]is4O logically equivalenttothe following:Oa BEGINO LOCAL%TEMP;O TEMP&=%F();O9 X(.TEMP)%+&Y(.TEMP) O ENDIOTheroutineFiscalledonceinthestructure-referenceBOABC[F( )]andthe resultingvalueisusedtwice. WLOBecausestructure-referencesarehandledbythecompilerinOOamannersimilartomacro expansionsandtheyare,infact,QO5compiledtoinlinecode,itisnaturaltothinkof structure-MO referencesasmacrocalls;however,thisexampleshowsthatQOtheinterpretationoftheactual parametersismoresimilarto#O>thatforroutine-calls.pgJfh (O11.10C Predeclared StructuresHOUThe structuresmostcommonlyusedinsystem programmingOOare predeclaredinBLISS.TheuseandinterpretationofeachCOofthese structureshasalreadybeen introducedingChapter3PO^andusedin examples.)Thissectionpresentsthe definitionof&Oeachofthese structures.*glOI QOItispossibletowritestructure-declarationsthatareequiva-OOlenttothefour predeclared structures;theyare predeclaredOO5inBLISSasa convenienceandtofostertheuseofuniform0Onamesforthesecommon structures.f<BLOCK0>Asequenceof varying-sizedfields,O BLOCKVECTORBAvectorofblocks OWIOThe declarationanduseofthe predeclaredBLOCKstruc-NOtureis discussedhereindetailbecauseofits fundamentalEO5nature(alongwithVECTOR, discussed previously).-TheAO BITVECTORand BLOCKVECTOR structuresare discussedLOmorebrieflybecausetheyarestraightforward variationsof.O>theVECTORandBLOCK structures. %O11.10.1CVECTOR StructuresLO4AVECTOR structureisasequenceofelementsofthesameVOsize.(Thenumberofelements( n )istheextentofthevector.KOTheelementsarenumberedfrom0ton-1.)The generalized@O=formofthestructure-declarationisasfollows:O STRUCTURE0  VECTOR[I;&N,& UNIT=%UPVAL,%EXT=0]%=zR [N*UNIT].z $(VECTOR+I*UNIT)<0,%BPUNIT*UNIT,EXT>;! NQOWhenthis generalized declarationismadedialect specific,theJO resulting(actual)structure-declarationofVECTORineach#O5dialectisasfollows: ` In BLISS-16-U STRUCTURE+i VECTOR[I;&N,&UNIT=2,%EXT=0]&= [N*UNIT](- (VECTOR+I*UNIT)<0,8*UNIT,EXT>; ` In BLISS-32-1 STRUCTURE+y VECTOR[I;%N,%UNIT=4,%EXT=0]%=i [N*UNIT](  (VECTOR+I*UNIT)<0,8*UNIT,EXT>; ` In BLISS-36-  STRUCTUREiU VECTOR[I;&N]&=  [N] (VECTOR+I)<0,36>;eGOTheformalnamesofthestructure-declarationhavetheO following meanings:  OOFormalNameMeaning O ObI<bThenumberoftheelementtobe referenced. ON5Thenumberofelementsinthevector.OVUNIT@VThenumberofaddressable-unitsineachelement.AThevalidvaluesvarywiththetargetsystem:&1@or2for BLISS-16,and1through4forBLISS-B>32.'(Becausetheonlyvalidvaluewouldbe1inC BLISS-36,theformalnameUNITisomittedinthat> dialect.)%Thedefaultvalue,%UPVAL,impliesa& fullword. OEXTFThesign-extensionruletobeusedforfetchingele-Gments."Thevalidvaluesare0and1."ThedefaultisD;0,thatis, unsigned.#(Sign-extensionofafullwordAisnot meaningful;thus,theformalnameEXTis!omittedin BLISS-36.) OsJOExampleusesofthis structureasstructure-attributesin)O declarationsareasfollows:"  OOExampleInterpretation OOb VECTOR[10]&bAvectorof10 fullwordsOVECTOR[10,WORD]0Avectorof10unsignedwordsin) BLISS-16/32FOVECTOR[20,BYTE,SIGNED]Avectorof20signedbytesin BLISS-16/32OjREF VECTOR[5]3jA referencetoavectorof5full-wordsO2 VECTOR[20,3]22Avectoroftwenty3-byte elements,inBLISS-32only O' (O11.10.2C BITVECTOR StructuresIO4A BITVECTORisasequenceofone-bitelementsthatareOOdenselypackedinstorage.+Thenumberofelements( n )isNOtheextentofthe bitvector.'TheelementsarenumberedfromMO=0ton-1.(The generalizedformofthestructure-declarationOisasfollows:O STRUCTUREc BITVECTOR[I;&N]&=#z [(N+(%BPUNIT-1))/%BPUNIT]5z (BITVECTOR+I/%BPUNIT);mEOTheactual,!dialect-specificforms ofthis structure-(O declarationareasfollows:d: ` In BLISS-16:U STRUCTUREi BITVECTOR[I;&N]&= [((N+7)/8)],- (BITVECTOR+(I^-3)); ` JInBLISS-32the following variationisusedtotakead-Lvantageoftheless restrictivefield-referencesforbetter]codequality: STRUCTUREi* BITVECTOR[I;&N]&=r [(N+7)/8] BITVECTOR; `9 9In BLISS-36: STRUCTUREi BITVECTOR[I;&N]&=N [(N+35)/36]+ (BITVECTOR+I/36);ZGOTheformalnamesofthis structurehavethe followingO meanings: OOFormalNameMeaning O ObI;bThenumberoftheelementtobe referenced ON4Thenumberofelementsinthevector OxOOExamplesofusesofthis structureasstructure-attributesin)O declarationsareasfollows:d OOExampleyInterpretation OPObREF BITVECTOR[8]A referencetoavectorofeight1-bitele-ymentsO) BITVECTOR[60]/y)Avectorofsixty1-bitelements OEWIOObservethattheseconddatasegmentwouldoccupyeightLObytesofPDP-11orVAXstorage,andwouldleavethefourMO5 high-orderbitsofthelastbyteunused.(Onthe DECsystem-NO10/20thefirstdatasegmentwouldoccupyonewordwith28KO high-orderbitsunused;thesecondwouldoccupytwowordsDO>with12 high-orderbitsofthesecondwordunused. Z$O11.10.3CBLOCK StructuresIO4ABLOCK structureisasequenceof components.+Thein-OOdividual componentsofablockcanbeofvarioussizes.)TheMO generalizedformofthestructure-declarationisasfollows:Oi STRUCTURE4 BLOCK[O,%P,%S,%E;%BS,& UNIT=%UPVAL]%=z [BS*UNIT] zA (BLOCK+O*UNIT); mEOTheactual,!dialect-specificforms ofthis structure-(O declarationareasfollows:  ` In BLISS-16:U STRUCTURE/i BLOCK[O,%P,%S,%E;%BS,&UNIT=2]%= [BS*UNIT] - (BLOCK+O*UNIT); ` In BLISS-32:1 STRUCTURE/iy BLOCK[O,%P,%S,%E;%BS,&UNIT=4]%= [BS*UNIT]   (BLOCK+O*UNIT); ` In BLISS-36:  STRUCTURE&iU BLOCK[O,%P,%S,%E;%BS]&= [BS] (BLOCK+O); ZGOTheformalnamesofthis structurehavethe followingO meanings:!   OOFormalNameMeaning O ObOGbTheoffsettotheaddressable-unitinwhichthefieldbegins. O)PG)Thebitoffsetfromtheaddressable-unittothefieldw beginning. OSIThesizeofthefieldinbits.%Validvaluesare0to>%BPVAL. OEAThe extensionflag.&Validvaluesare0forzero2 extensionand1forsign extension. OBSCThenumberof allocationunitsneededto represent4theblock(thatis,theblocksize).OFUNITIFThesizeoftheallocation-unitandoffsetintermsofE addressableunits.!ValidvaluesvarywiththetargetGsystem:!1or2for BLISS-16,1through4forBLISS-B/32,and1onlyinBLISS-36(the formal-nameUNITE|isomittedinthat dialect)."Thedefaultis%UPVAL,!thatis,a fullword. O NPOBlocksareconventionally allocatedinfullwordunitsformostMO efficient operationofthe hardware.)(UsingdefaultfullwordPO5 allocationalso facilitatestransportabilityofBLISS programs.)a! _7@O 11.10.3.1CATypical Byte-OrientedBLOCK StructurePO)Anexampleofatypicalblockona byte-orientedtargetsys-POtem(PDP-11orVAX)is consideredindetailinthe followingIO paragraphs.(TheblockisnamedALPHAandhasfivecom-LO3ponents,namedA,B,C,D,andE.TheVAXtargetsystemLOandBLISS-32dialectareassumedforthepurposesofthisOOexampleastheyprovidetherichestbasisfor explanationofFO<the underlyingBLISS structure mechanisms.*(ABLISS-36KOexamplewouldbesomewhatsimplerbecause addressablebyteLO boundariesarenot considered.' Analogouscode fragmentsforJOFBLISS-36areshowninthis discussionwhere appropriate.)| RROThelayoutoftheexampleblockinVAXstorageisasfollows:*lO BKKhbxx  x  xx@!Q@"!"!  ?  ! !@Q  @P' z @ <@8<D`DB@D@dx@X@@D@DBandoccupiesthe5 low-orderbitsofthebyteatALPHA+5.IO ComponentDcontains19bitsandoccupiesthe remainingPObitsofthebyteatALPHA+5aswellasthenexttwobytes.6OH ComponentEoccupiesthenext longword.,O 11.10.3.2CBLOCKField-ReferencesNO)Each componentofablockhasafield-reference.)Thefield-1O referencesforDCBareasfollows: O$O ComponentField-Reference!AnalogueforBLISS-36 O(ALPHA+0)<0,36,0>(OBofALPHA(ALPHA+4)<0,8,0>(ALPHA+1)<0,8,0>(OVCofALPHA(ALPHA+4)<8,5,0>V(ALPHA+1)<8,5,0>>ODofALPHA(ALPHA+4)<13,19,0>(ALPHA+1)<13,23,0>(ALPHA+2)<0,36,0> Od! dLOForexample,thefield-reference expressionfor componentDMOofALPHAis interpretedbylocatingthebytewhoseaddressLO5is (ALPHA+4)andthenapplyingthefield-selector <13,19,0>OOatthatpositioninmemory.*Thefield-selectorstartsattheRO low-order (rightmost)bitofthe designatedbyte,thenskips13VO>bits(first parameter)totheleft,thenselectsthenext19bitsLO(second parameter),and,finally,appliesunsigned extensionshowthisbiasfollows:O (ALPHA+5)<5,19,0>& !No&analogue&in& BLISS--36MOThisfield-referenceis differentfromthatgiven previouslyBOforD,butitselectsthesamebitsofstorage.#NOAnyofthefield-referencescanbeusedforeitherafetchOOorastore operation.-Forexample,toplacethevalue7in:O5 componentDofALPHA,writethe following:"O (ALPHA+4)<13,19,0>%=%7! q&O 11.10.3.3CBLOCK AllocationLO)Aspecificblockdatasegmentis allocatedbymeansofaLOBLOCKstructure-attribute.'The attributeprovidesvaluesforIOtheallocation-formalsoftheBLOCKstructure-declaration.OO3The following declaration allocatesstoragefortheDCBblockOnamedALPHA: O OWNX ALPHA:& BLOCK[3,4];)! OOThestructure-attributeinthisexampleis BLOCK[3,4],anditPOprovidesthevalues3and4fortheallocation-formalsNandIO5UNIT, respectively.*Whenstorageis allocatedforALPHA,NOthestructure-size expressioninthe declarationofBLOCKis-O evaluated.'That expressionisN *+UNITanditsvalueisthere-QO>fore12.)Thus12bytesofstorage(3 fullwords)are allocatedOforALPHA.f iBOAn equivalent declarationofALPHAisasfollows: O OWNP ALPHA:& BLOCK[3];%P !Also%valid%in% BLISS--36yONOInthis declaration,thestructure-attributedoesnotgiveaPOvalueforUNIT,sothedefaultvalueisused.)(Thisdeclara-PO5tionresultsinthe allocationofthree fullwordsinBLISS-36NOalso,whereasthepriorversionwouldnotbevalidinthatO dialect.)Awill eventuallybeusedfortheblock diagrammedatthe'O beginningofthissection.!L`0O 11.10.3.4CBLOCKStructure-ReferencesQO)Aspecific componentofadatablockisaccessedbymeansofIOastructure-reference.)Thestructure-referencebeginswithOOthenameofthedatasegmentandthengivesvaluesfortheGO3fouraccess-formalsoftheBLOCK structure declaration." OOThe followingexampleendsby assigning7to componentDofOALPHA:Oa LITERAL DCB_SIZE%=%3; O OWN"9 ALPHA:&BLOCK[DCB_SIZE]; O ...!O ALPHA[1,13,19,0]&=%7;#\JOThestructure-referenceinthisexampleis interpretedasOfollows:$zNOFirst,makethe followingcopyofthestructure-bodyofthe!O declarationofBLOCK:Oa (BLOCK+O*UNIT)%zBONext,replacethe formal-nameBLOCKwiththename,OALPHA, providingthe following:Oa (ALPHA+O*UNIT)&zKONext,replacetheallocation-formalUNITwith4, providingOthe following:Oa (ALPHA+O*4) ' ROFinally,replacethefouraccess-formals,O,P,S,andE,withNOthe corresponding access-actual parameters1,13,19,and0,$O5 providingthe following:O (ALPHA+4)<1,13,19,0>(zNOThisisthesameasthefield-referencegivenfor componentODinSection 11.10.3.2.*(F?)LY.O 11.10.3.5CBLOCKField-DeclarationsGO)The referenceto componentDofALPHAisimprovedbyMOtheuseoftheBLOCKstructure-name,butitstillrequiresSOalistofinteger parameters, [1,13,19,0],thatbearsnoobviousDO3relationtothe description ``componentDofDCB''.* ROYoucouldsolvethisproblembydefiningamacro,suchastheO following:Oa MACRO! DCB_D%=% 1,13,19,0%%;+>OHowever,!BLISSprovidesaspecialfeature,!the field-O declaration ,forthispurpose.<, HOThe followingprogramfragmentshowsthecompletemech-2OanismforhandlingtheblockALPHA:Oa LITERAL DCB_SIZE%=%3;O FIELD9 DCB_FIELDS%= z SETz DCB_A&=% [0,0,32,0],z DCB_B&=% [1,0,8,0],zY DCB_C&=% [1,8,5,0], z DCB_D&=% [1,13,19,0],z DCB_E&=% [2,0,32,0]z0 TES;Ox MACRO8 DCB&=%BLOCK[DCB_SIZE]&FIELD(DCB_FIELDS)&%; O OWNP ALPHA:&DCB; O ...O ALPHA[DCB_D]%=%7;-NMOThefield-declarationdefinesthe four-integercodeforeachKO componentandalsogivesaname, DCB_FIELDS,tothefive&O5 field-namesthus declared..NJOThe declarationofthe macro-nameDCBisthefinalcon-PO venience;itpermitstheblocklayoutthatis associatedwith?O5ALPHAtobe designatedbyasinglename,DCB./ MOWhenthe macro-callonDCBis expanded,the declarationof)OALPHAbecomesthe following: Oa OWN5 ALPHA:&BLOCK[DCB_SIZE]%FIELD(DCB_FIELDS);0NJOThefield-attributeallowsthefive field-names associatedGOwith DCB_FIELDStobeusedinstructure-referencesforO5ALPHA.1! *O11.10.4C BLOCKVECTOR StructuresJO4A BLOCKVECTOR structureisavectorofblocks.'Thenum-WOberofelements( n )istheextentofthevector,andthesizePOofeachelementisthesizeofasingleblock.+TheelementsKO=arenumberedfrom0ton-1.(Thestructure-declarationfor:O BLOCKVECTORineachdialectisasfollows:32  ` In BLISS-16:U STRUCTURE=i BLOCKVECTOR[I,%O,%P,%S,%E;%N,%BS,&UNIT=2]%= [N*BS*UNIT]-- #(BLOCKVECTOR+(I*BS+O)*UNIT); ` In BLISS-32:1 STRUCTURE=iy BLOCKVECTOR[I,%O,%P,%S,%E;%N,%BS,&UNIT=4]%= [N*BS*UNIT]-  #(BLOCKVECTOR+(I*BS+O)*UNIT); ` In BLISS-36:  STRUCTURE4iU BLOCKVECTOR[I,%O,%P,%S,%E;%N,%BS]&= [N*BS]( (BLOCKVECTOR+(I*BS+O));3eGOTheformalnamesofthestructure-declarationhavetheO following meanings:z4! P OOFormalNameMeaning O ObICbThenumberoftheblockelement."Validvaluesare0throughn-1. O)OI)Theoffsettoafield.!Validvaluesare0throughBS- w1. OPFBitoffsetfromtheaddressable-unittothe beginning>ofthefield. OSISizeofthefieldinbits.#Validvaluesare0through%BPVAL. OE= Extensionrule.)Validvaluesare0forzero-1 extensionand1forsign-extension. OFN<FThenumberofblockelementsinthevector. OBSBThenumberofallocation-unitsineachblockele-ment.OUNITBThenumberofaddressable-unitsinthe allocation-unit. O5 NIOThe BLOCKVECTOR structureisa combinationoftheallo-IOcationandaccess definitionsfromtheBLOCKandVECTORO5 structures.:6IOUsingthis structure,a declarationofavectorofDCBGOblocks(usedasanexampleoftheBLOCK structureinO5Section11.10.3)#5iswrittenasfollows:BO OWN%XXX:%BLOCKVECTOR[100,DCB_SIZE]&FIELD(DCB_FIELDS);*6O ? i7! +?QOThis declaration allocatesstoragefor100DCBblocks,eachofTOwhichisthree fullwordsinsize.(IfthecontentsofavariableZO5Jis2,thenthe followingfetchesthevalueoftheDfieldofthe(Othirdblockinthevector: .XXX[.J,DCB_D]8NMOObservethatthesamefield-declarationusedwiththeblockO discussedinSection11.10.3,=isusedwiththeblockvectorO5 discussedhere.*8? lOgeneral-routine- call linkage-name(routine-address ]8 < -: Bn&Q,input-actual-parameter,...QPnothing Bo n'Q;output-actual-parameter,2...Qnothing oEnothing ]9 = -; `)OH linkage-namename%O<routine-address expressionO/input-lactual-parameter Sn" expression_nothing 9SoOgoutput-actual-parameter nY expressionnothing 9ooR Oordinary-routine-  declaration(ROUTINEroutine-definition,... 1;*Oroutine-definitionZ routine-name 8 7< :( input-list)(; output-list)*9( input-list; output-list)vnothing 9 7= ; hn::routine-attribute:...vnothing Iho= routine-bodyO routine-namenameO input-list#input-formal-parameter,G...O output-list$output-formal-parameter,W...Oinput-formal-O( parameterOe output- formal-O parameter( formal-itemO formal-item formal-name  n"R :formal-attribute-listR nothing  oO formal-namenameO formal-9 attribute-list& {map-declaration-attributew ...  }~Omap-declaration- attribute 8 < Y:`allocation-unitextension-attributestructure-attributefield-attributeSvolatile-attribute 9 = Y; g`(`16/32Only g(16/32OnlyOroutine-attribute 8 < z:novalue-attributelinkage-attributepsect-allocation#7addressing-mode-attributetweak-attribute 9 = z; <;(;16/32Only <x(x32Only"O routine-body expressionqnOglobal-routine-  declaration7KGLOBALROUTINEglobal-routine-definition,M... ;Oglobal-routine-P definitionK routine-name K8 K< Kc: ( n#|input-formal-parameter,|...nothing Oo 1n%;output-formal-parameter,...?nothing M1o $) 9 = c; Kn%:global-routine-attributeM...nothing oK[= routine-bodyOZ routine-nameKZnameOglobal-routine- attribute K8 K< KZ:anovalue-attributelinkage-attributepsect-allocation#addressing-mode-attributeTweak-attribute 9 = Z; ([16/32Only X([X32OnlyOn routine-bodyKn expressiontsZk0Oforward-routine-  declaration3bFORWARDROUTINEforward-routine-item,P... ;Oforward-routine-Pitemb* routine-name 6n"0:fwd-routine-attribute...0Enothing %6oOJ fwd-routine- attribute b8 b< bW:wnovalue-attributelinkage-attributepsect-allocation#.addressing-mode-attribute 9 = W; 7(s716/32OnlyOk routine-namenameR pnr?! +O12.5CGlobal-Routine-DeclarationsIOUAglobal-routine-declarationprovidesthesame informationLOastheordinary-routine-declaration.'Theonly differencebe-NOtweenthesetwo declarationsistheirscope.*AroutinethatGO^isdeclaredinanordinary-routine-declarationcanonlyOObecalledintheblockinwhichthe declarationisgiven(OSection8.2.4).@\Aroutinethatisdeclaredinaglobal-routine-SOh declarationcanbecalledoutsidetheblockinwhichitisde-OOclared.'Thescopeofthe routine-nameisextendedbeyondtheLOblockbymeansofoneormoreexternal-routine-declarations)Orinotherblocksormodules.*O?rHJOTheonly differencesbetweenthesyntaxofthe ordinary-HOroutine-declarationandtheglobal-routine-declarationareIO5thattheGLOBALkeywordisrequiredinthelatterand,HOinBLISS-32only,theweak-attributeis permittedina%Oglobal-routine-declaration.pMFO12.5.1CSyntax.O4SYNTAX:4ClicktodisplaySyntax.*OO xO12.5.2C Restrictions&OThe restrictionsgiveninSection12.4.2 forordinary-routine-EO_ declarationsalsoapplytoglobal-routine-declarations.*?)HOBLISS-16andBLISS-36 restrictionsonnamesdeclaredas OglobalaregiveninSection4.5.2.*?O12.5.3CDefaults"O4Thedefaultsgivenind4Section12.4.3 a4forordinary-routine-EO declarationsalsoapplytoglobal-routine-declarations.*d?O12.5.4C SemanticsIO4Thecompilermakesuseofthe informationinaglobal-+Oroutine-declarationasfollows: K`1.:Theglobalnatureoftheroutineis recorded.-Anin-I(dicatorissetforthelinkertoshowthatthisisaEglobal-declaration.,Iftheroutine-declarationhastheIweak-attribute,another indicatorissetforthelinker.O`Y2.:The semanticsarethenthesameasthe semanticsforan2ordinary-routine-declaration,giveninWSection12.4.4.*Wt?usO external-O routine-] declaration5bEXTERNALROUTINEexternal-routine-item,e... ;OP external- routine-itembg routine-name sn"0E:ext-routine-attributeE...0nothing soO routine-namenameO ext-routine- attribute b8 b < b:novalue-attributelinkage-attributepsect-allocation#Eaddressing-mode-attributeweak-attribute 9  = ; I(sI16/32Only (s32Only* r pt ! ),O12.6CForward-Routine-DeclarationsLOUEveryroutinemustbedeclaredbyan ordinary-orglobal-LOroutine declaration.* Sometimes,however,itis necessarytoSOusethe routine-namebeforeitsfull definitionisgiven.'BeforeHO^youusethename,aforward-routine-declarationmustbeOOusedtodeclarethenameasa routine-nameandto associate4Oalimitedsetof attributeswithit.! LOAsanexampleoftheuseofaforward-routine-declaration,NOconsiderthetworoutinesAandB.RoutineAcallsroutineLO5BandroutineBcallsroutineA.Iftheordinary-routine-PO declarationforAisgivenfirst,aforward-routine-declarationOOmustbegivenforB.Iftheordinaryroutine-declarationforOO>Bisgivenfirst,aforward-routine-declarationmustbegivenOforA. OOIngeneral,theuseofaforward-routine declaration(attheRO beginningofablock)tospecifyallofthe routine-namesthatRO5aredeclaredinthe remainderoftheblockservesasausefulVO``tableof contents''andallowstheroutinestobewritteninanJOorderthatis independentoftheircallingrelationships.pMFO12.6.1CSyntax.O4SYNTAX:4ClicktodisplaySyntax.*OOO12.6.2C RestrictionsGOA routine-namedeclaredinaforward-routine-declarationIO_mustappearinan ordinary-orglobal-routine-declaration&Olaterinthesameblock.@! POAfteranydefault attributesarefilledin,aforward-routine-KO declarationmustagreewithits corresponding ordinary-orQOiglobal-routine-declarationwithrespecttothesetof attributes*Oallowedinboth declarations.6` O12.6.3C SemanticsFO4Aforward-routine-declarationdeclaresanametobeaJO routine-namewhose definitionisgivenlaterinthesameMOblock,and associateswiththatnamethesetof attributesPO=neededfor generationofcallstothenamedroutine.(These-GOmanticsoftheBLISS-32addressing-mode-attribute(whichNOisnotoneoftheordinaryorglobalroutine-attributes)isOG describedin GSection9.13.*  ?3 t rv we-O12.7CExternal-Routine-DeclarationsNOUOftenaroutinemustbedefinedinoneblockofaprogramPOandcalledinotherblocksofthesameprogram.(UsuallythisLO situationarisesfromthe organizationoftheprogramintoNO^ separatelycompiledmodules,butthisneednotbethecase. WPOInordertoprovideforthelinkagebetween routine-callsandOOroutine definitionsthatoccurin differentscopes(forexam-IO5ple, different modules),external-routine-declarationsmustLObeused.+ Specifically,the routine-nameisdeclaredinoneOOblockbyaglobal-declaration(whichdefinestheroutine)andJO>isdeclaredintheotherblocksbyexternal-declarations.pMFO12.7.1CSyntax.O4SYNTAX:4ClicktodisplaySyntax.*OO O12.7.2C RestrictionsMOAnamemustnotbedeclaredanexternalroutineunlessitRO_isdeclaredaglobalroutineoraglobalbindroutineinsomeMOotherblockofthesameprogram.+This restrictiondoesnotQOapply,however,toanexternalnamethatisdeclaredwiththe/Oiweak-attribute (BLISS-32only;seefiSection9.14).*f,?AZ `0O12.7.3C SemanticsHO4Anexternal-routine-declarationinformsthecompilerthatKOthe definitionofthe routine-nameisnotinthecurrentQOblock.)Thecompilertakesnoteofthe attributesgivenintheKO=external-routine-declaration.*Then,eachtimeauseoftheLOdeclared routine-nameis encountered,thecompilerleavesaQOblankspaceintheobjectcodefortheroutine-address.(Later,IOGthelinkerfillsintheblankwithaspecificaddress. HOThe attributesinanexternal-routine-declarationprovideMOthe informationthecompilerandlinkerneedtoproceedinPOitheabsenceofafullroutine-declarationinthesamemodule.KOThelinkage attributegivesthecompiler informationaboutTOthetypeofcalltogeneratefortheroutineandthe availabil-OOrityandusesof registerswithintheroutine.+In particular,MOthenovalue-attributepermitsthecompilertodetectanin-QO#validcallontheroutine(acallthatexpectsavalue).+TheCO|addressing-mode-attributeandweak-attribute (BLISS-32#Oonly)are describedinlChapter9.*llOv tw# nO 13.2Linkages OA linkageAisthe particularcalling-sequence conventionusedMOincallingaroutine,andtheregister-management disciplineQOBusedduring executionoftheroutinethatiscalled.)ThetypeNOofobjectcode generatedbythecompilerfora routine-call!Ois determinedbytheH linkage-definition associatedwiththePOLcalledroutine.(Thelinkage-definitionalsocontrolstheobjectOOcode generatedfortheentryandexit sequencesoftherou-TOtinewithwhichitis associated.(Thus,alinkageservesastheJOUbridgebetweenaroutineandanyroutinesthatcallit.W-EOAlinkage-definitionmaybe explicitlydeclaredina linkage-O declarationB.(EachBLISSdialectalsoprovidesseveralprede-LO5fined linkages:*onedesignedfor standardizedcallsbetweenFOBLISS-compiledroutines(usedasthedefault linkage),IOandothersforcallsbetweenBLISS-compiledroutinesandFO>FORTRAN-compiled routines.*Inthecaseof BLISS-36,aKO predefinedlinkageisalsoprovidedfor compatibilitywithO BLISS-10. lMOEachlinkage-definition,whether predefinedor explicitlyde-(Oclared,is identifiedbya linkage-name .,Everyroutine,inMO5turn,hasa linkage-name associatedwithit,eitherbyde-SOfaultorbyexplicit specificationofalinkage-attributeinthe!O routine's declaration.zPPOTheBLISSlinkagefacilityconsistsofthe following features:2 ` Linkage-declarations `O $O Predeclared linkage-names ` ALinkage-functions(aclassofexecutable-functions) `N &NGlobal-register-declarations ` (External-register-declarationsW-OOThischapter describesthefirstthreelanguage features,andOOthen discussestheirusein conjunctionwiththeglobal-andIO5external-register-declarations.*Primary descriptionsofthe0Oregister declarationsaregiveninChapter10.*POG/! ROIngeneral,theBLISSlinkagefacilityprovidesatypeofcon-SOtroloverthecompiledcodethatisquiteunusualin high-levelNO5 languages,butwhichisoftenneededforefficiency-sensitiveLOsystem applications.+Itallows,when necessary,ahighde-NOgreeofcontroloverthekindofcallingsequence generatedNO>bythe compiler,andtheregister-usage conventionsthatare*Oobservedbyrelated routines._QOThiscontrolmightbe exercised,forexample,inordertoop-LOtimizeagivenroutineorgroupofroutines(forexample,NO5a subsystem)intermsofeithersizeor executiontime,orLOtoproduceaBLISSroutinesuitableforusewithsoftware(Owritteninother languages.zWo  jOlinkage-declaration(3LINKAGElinkage-definition,... ;Olinkage-definition'3 linkage-name= linkage-type 3f8 3> 3F> 3< 3> 3> 3: ( k8 < ;:% input-parameter-location,w... nothing  k9  =  ;; 8 C< :);output-parameter-location,...Mnothing e 9 e C= e ; *)nothing f9 > F> = > > ; 8 < f:`:!linkage-optionv...`nothing 9 = f;Oz32Only Kz) linkage-type&3{CALL"|!JSB!|! INTERRUPT}Oinput-parameter- location 38 3O < 3 :&REGISTER=register-number3 STANDARD nothing m9 mO = m ;O output-  parameter-f location)3f  {REGISTER=registernumber}X $O32Only K)O~linkage-option 38 3> 3< 3W> 3:-GLOBAL(GLOBAL-register-segment,p ... ) 8  < r:PRESERVE NOPRESERVECNOTUSED 9  = r;-(register-number, ...  ) W 9 W > W = W W> W ;Oglobal-register- segment.3global-register-name=register-3 number O@8 O< O:>global- register-name linkage-name @9 = ;3anameO$register-number*3$ compile-time-constant-expression|{}Fw2O13.5CCommon Predeclared Linkage-NamesIOUTwo linkage-namesare predeclaredinallBLISS dialects,=O FORTRAN_SUBand FORTRAN_FUNC.In addition,theBO linkage-namesBLISSandFORTRANare predeclaredin"O^BLISS-16and BLISS-32.! LOThecomplete semanticsforthese linkage-namesisgiveninROtheearliersectionsonthelinkage-declarationforeachdialectO5(see5Section13.2.55for BLISS-16,5Section13.3.55for BLISS-32, OandSection13.4.54for BLISS-36).)Thissection summarizesFOthecommoncharacteristicsthatapplyacross dialects.*?R*?*P? Vw&O13.5.1CTheBLISSLinkagesMO4InBLISS-16and BLISS-32,theBLISSlinkageisthedefaultOOlinkageintheabsenceofanyotherspecification.)InBLISS-OO36,thedefaultlinkageis BLISS36C.The semantics associated8O=withtheselinkagesisgiveninSections=12.4~=through=12.7.*?*? NQOInlightofthe defaults,thewaytoobtaina compatibleandUO transportableBLISSlinkageinalldialectsistousenoexplicit*O5linkage specificationatall.! l(O13.5.2CTheFORTRANLinkagesEO4TheFORTRAN-relatedlinkagesprovidea compatibleandFO transportablemeansto interfacewithFORTRANcompiledNOroutinesoneachofthetargetsystems.&UseoftheFORTRANOO=linkagesisquitesimilartouseoftheBLISSlinkageswithOthese exceptions: # ` DEachformal parametermustbeassumedtocontainaN(valuethatisanaddress.'ThebodyoftheroutinemustbeIwrittenappropriately.((In BLISS-32,this restrictioncanJberelaxedthroughuseofthe%VALbuilt-infunctionof2VAX FORTRAN.) ` GEachactual-parametermustbeavaluethatisanad- dress.l! aBIOThereareseveralFORTRANlinkagesbecause,inthecase=Oof FORTRAN-10ontheDECsystem-10/20,FORTRAN-BO510compiled SUBROUTINE subprogramsusethemachineFO registersina differentwaythan FORTRAN-10compiledFOFUNCTION subprograms.+(This differenceis reflectedinAO>the declarationsforthe FORTRAN_SUBandFORTRAN_7OFUNC linkage-namesgivenforBLISS-36inSection13.4.5.)IOThereisnosuch differenceforPDP-11andVAXFORTRANOHsystems.*Z?EOToobtain compatibleand transportable interfacingtoJOFORTRANwithallthreeBLISS dialects,dothe following: ` @Usethe FORTRAN_SUB linkage-nameinthedeclara-I(tionofanyroutinewhichistobeusedasaFORTRAN! SUBROUTINE subprogram.! sBbThisappliestoallEXTERNALROUTINE declarations,Iforexample, regardlessofwhethertheroutineisactu-FallywritteninBLISSorFORTRAN.Thisalsoapplies,Al obviously,totheROUTINEorGLOBALROUTINEdec-SlarationiftheroutineiswritteninBLISS.Inbothcases,itKisalsohighly desirabletousetheNOVALUE attributeasvwell. ` ?Usethe FORTRAN_FUNC linkage-nameinthedecla-KMrationofanyroutinewhichistobeusedasaFORTRANFUNCTION subprogram.,AbAswiththe FORTRAN_SUBlinkage,thisappliesto;EXTERNALROUTINE declarationsaswellasto6ROUTINEandGLOBALROUTINE declarations.9 KOIf compatibleand transportable interfacingtoonlyPDP-11FOandVAXFORTRANsystemsisdesired,thentheFORTRANAO5 linkage-namecanbeusedforboth SUBROUTINEand=OFUNCTION subprogramsinBLISS-16and BLISS-32.#}|~)!O13.6CLinkage-FunctionsOU Linkage-functions)Uareexecutable-functions(see$USection5.2)FOthatprovide specialized informationabouttheactual-JO parametersusedtocallaroutine.,Forexample,linkage-OO^ functionscanbeusedtocodearoutinethatcanbecalledHOwith differentnumbersofactual-parametersin differentOroutine-calls.*$}?+O13.6.1CCommonLinkage-Functions>O4There are threecommonBLISS linkage-functions:5O ACTUALCOUNT,ACTUALPARAMETERandARGPTR.GOThese functionscanbeusedwithalloftheFORTRAN-NO=related predeclaredlinkagesinallBLISS dialects.(TheycanIOalsobeusedwithsomeofthe BLISS-related predeclaredO linkages.BbO13.6.1.1B DefinitionDO)Thecommonlinkage-functionsaredefinedasfollows:N$ `  ACTUALCOUNT()d:b Restriction;Ob.(MustbedeclaredBUILTINwithinthebodyKofaroutinewhoselinkage-attributeisdefinedwithcer-Etainlinkage-types.+Thelinkage-types,andtheprede-Hlclaredlinkagesthatare consequently permitted,areasfollows:waM 6Dialect Linkage-Type PredeclaredLinkages bBLISS-16CALLbFORTRAN FORTRAN_SUB FORTRAN_FUNCwBLISS-32CALLwBLISSFORTRAN FORTRAN_SUB_ FORTRAN_FUNCBLISS-36F10 FORTRAN_SUB& FORTRAN_FUNC B2! b Value?b.)Returnthenumberofactual-parameterspassedAtotheroutineusingSTANDARDparameter-locations;B parameterspassedusingREGISTERparameter-locations7larenotincludedinthereturnedvalue.A KbForthe predeclaredlinkagesinall dialects,allparame-AtersarepassedusingSTANDARDparameter-locations@and, consequently, ACTUALCOUNTreturnsthenumber lofactual-parameters. `  ACTUALPARAMETER(i) b Restrictions:tb.'Thefirst restrictionforACTUALPARAMETER5isthesameasfor ACTUALCOUNTabove.x{ {NNbThevalueofimustbeintherange1to ACTUALCOUNT( ).4  b ValueEb.'Returnthevalueoftheithactual-parameterthatAwaspassedusingSTANDARDparameter-locations;pa-@rameterspassedusingREGISTERparameter-locations5larenot obtainablewiththis function.M#KbForthe predeclaredlinkagesinall dialects,allactual-> parametersarepassedusingSTANDARD parameter-= locations,and, consequently,ACTUALPARAMETER(i)>lreturnsthevalueoftheithactual-parameter. ` ARGPTR()tb Restriction=Ob.*The restrictionforARGPTRisthesameas"for ACTUALCOUNTabove.u{Kb Value<b.&Returntheaddressoftheargumentblock. @O13.6.1.2BExamplesPO)Theuseofthelinkage-functionspermitsroutinestobewrit-NOteninamoregeneralway.) Consider,forexample,agener-2O alizationoftheroutineAVERAGE3(Section12.4.5,)whichHO3acceptsthree parameters,totheroutineAVERAGE,which/Oacceptsanynumberof parameters:O ROUTINE&AVERAGE%=X BEGIN BUILTINz ACTUALCOUNT,z0 ACTUALPARAMETER;x LOCAL z L; L%=&0;1P INCR%I&FROM%1%TO% ACTUALCOUNT()&DO+z L%=%.L%+&ACTUALPARAMETER(.I); .L/ACTUALCOUNT()' END;*?nLOSomecallsontheroutineAVERAGEandthevalueofthese"Ocallsareasfollows:  OOCallyValue OObAVERAGE(1,2,3) yb2 OAVERAGE(2,4,6,8,10)6OV AVERAGE(8) yV8OAVERAGE( )y???" (Invalid) O BQOInsomecasesaroutinehasafixedandvariablesetofpa-MO rameters.(Forexample,considerthe followingroutine,whichPO5 calculatesthe differencebetweenanexpectedvalue(thefixedROpart)andtheaverageofasetofvalues(thevariablepart):-O ROUTINE&DELTA_AVERAGE(EXPECTED)&=Z BEGIN BUILTINz ACTUALCOUNT,z2 ACTUALPARAMETER;z LOCAL z L;  L%=&0;1R INCR%I&FROM%2%TO% ACTUALCOUNT()&DO+z L%=%.L%+&ACTUALPARAMETER(.I);, .EXPECTED&-%.L/(ACTUALCOUNT()-1)) END;i??OSomecallsontheroutine DELTA_AVERAGEfollow:%  OOCallJValue O ObDELTA_AVERAGE(3,1,2,3) Jb1%ODELTA_AVERAGE(6,2,4,6,8,10) J0OVDELTA_AVERAGE(7)JV???" (Invalid)ODELTA_AVERAGE( )J???" (Invalid) OWGOObserveinthisexamplethatexplicitformal-parametersFOare notdistinctfrom the parametersaccessedbytheFO5linkage-functions., Specifically, .EXPECTEDis equivalentAOtoACTUALPARAMETER(1).+ Consequently,theloopini-\Otialvalueis2,not1,andthedivisorinthenexttolastlineis3O> ACTUALCOUNT( )-1,not ACTUALCOUNT( ).GOTheARGPTRlinkage-functionreturnstheaddressoftheLOargumentblockofa routine-call.*Insomecasestheargu-LO5mentblockaddresspassedintheargumentpointerregisterOOmaynotbeleftinthatsameregister throughouttheexecu-POtionofthecalledroutine.*Forexample,inBLISS-36thisisQO>usuallydoneinthecodecompiledforaroutinewiththeF10LO linkage-typethatcallsanotherroutinewhichalsohastheFOF10 linkage-type.*TheARGPTRfunctionprovidesacom-POHpatiblemeanstoobtaintheaddressoftheargumentblockinOall dialects.thanthenumberbuttheithactual-parameterhasthePOvalue-1inBLISS-16or0in BLISS-32; otherwise,azeroisO returned.~  O 14.2BindingGOBound-declarationsare differentfrommostofthedec-HO larations discussedthusfarbecauseabound-declarationMOBdefinesanameintermsofothernamesandvalues.(Bound-QO declarationsdonotinvolvethe allocationofstorage.)Instead,NOtheyprovideanameforaconstantvalue,oran additionalKOLnameand sometimesa differentinterpretationforexistingOstorage. uFOAbound-declarationdefinesaname./The definitionofPOanameconsistsofitsscope,itsvalue,andits attributes.LO5Thescopeand attributesare determinedintheusualway.GOHowever,thevalueofthenamedefinedinthebound-LO declarationis determinedfromthevalueofan expression. ! NROAnamecanbedefinedbyabound-declarationtobealiteral-JOname,a data-name,ora routine-name.'Thesyntaxdiagram3O5forbound-declarationsisasfollows: O0bound-declaration 8 w< :sliteral-declaration&s<external-literal-declarationsbind-data-declaration"sbind-routine-declaration 9 w= ;! MOThesyntaxand semanticsforeachkindofbound-declaration3Oaregiveninthe following sections.  }" wS-O14.2CExternal-Literal-DeclarationsMOUAnexternal-literal-declarationgivesalistof literal-namesJOthataredeclaredinother, separately compiled,modules.NOWhentheprogramthatcontainsthesemodulesislinked,theAO^valueoftheexternal-literal-namesis determined.a#s7DOExternal-literal-declarationsareusefulfor providingHOmnemonicnamesforconstant expressionsthatarecommonKO5tothemodulesofaprogram.+Anexampleofan external-(Oliteral declarationfollows:O EXTERNAL%LITERALZ BLKSIZ:% SIGNED(8);B$O14.2.1CSyntax%Oexternal-literal-?0 declarationEXTERNALLITERALexternal-literal-item ~,L~... ~;Oqexternal-literal-item literal-name 8 < n::!literal-attributeO...nothing 9 = n;O literal-namenameOuliteral-attribute nhtrange-attributehweak-attribute to (=32Only& O14.2.2C RestrictionsBO4AnamemustnotbedeclaredEXTERNALLITERALun-MOlessitisdeclaredGLOBALLITERALinsomeotherblockorOOmoduleofthesameprogram.(This restrictiondoesnotapply,NO=however,toanamethatisdeclaredwiththeweak-attributeOinBLISS-32(seeSection9.14).*&Y?A'NEOTherange-attributeforanEXTERNAL literal-namemustLO accommodatethevaluegivenfortheliteralinitsGLOBAL>O5literal-declaration.'Forfurther discussion,see5Section9.10.*'?(wO14.2.3CDefaultsKO4Ifarange-attributeisnotgiven,thenSIGNED(%BPVAL)isOassumed.)}O14.2.4C SemanticsLO4Anexternal-literal-declarationis processedbythecompilerOasfollows: *! I`1.:Eachnameinthelistis identifiedasanEXTERNAL( literal-name.S`2.:IftheWEAK attributeis specified,an indicatorisprovided-forthelinker (BLISS-32only).+]&O14.3CBind-Data-DeclarationsLOUAbind-data-declarationisusedtodefineanothernameforPOadatasegment,orpartofadatasegment,thatalreadyex-MOists.)Theboundnamecanhave different attributesandcanOO^ thereforedepartfromtheoriginalinterpretationofthedataJOsegment.(Anexampleofabind-data-declarationappearsin,Othe followingprogram fragment: O OWN ALPHA:& VECTOR[20];O$ BINDl A%=& ALPHA[8]; O ...&O INCR&I%FROM%0&TO&20&DO*D ALPHA[.I]&=% .ALPHA[.I]%*&.A;],! 3NOThenameAisdefinedbythebind-data-declarationtobeaQOfullwordscalarwiththesameaddressastheninthelementofOO5thevectorALPHA.A referencetoA, therefore,is equivalentEOto,butmoreconcisethan,a referenceto ALPHA[8].-{POIntheexamplejustgiven,thevalueofAcanbe determinedOOatthetimetheprogramislinkedsincetheaddressoftheLO5ninthelementofthevectorALPHAisknownatlinktime.MOAnexampleofabindingthatcannotbe determinedatlink Otimeisasfollows:#Ok BIND&B%=% ALPHA[2*.J-1]2.! SOThecontentsofJisnotknownatlinktimeandsothebind-UOingofBisdeferredto executiontime.' Specifically,thebindingOO5occursjustbeforethe evaluationoftheblockinwhichtheMO declarationappears.)The introductionofthenameBcanbeNO efficientbecausenomatterhowoftenBisusedduringthe9O> evaluationoftheblock,the expression2 J*>.J-1is evaluatedOonlyonce.B/O14.3.1CSyntaxC0O bind-data-0 declaration nhBINDhGLOBALBIND uobind-data-item,... ; < 0> :sallocation-units7extension-attributesstructure-attributesfield-attributesvolatile-attributesmweak-attribute 9 X> = 0> ; b(16/32 b/(/16/32 be(e32Only1O14.3.2C RestrictionsIO4Thedata-name-value expressionmustbetheaddressofaMOdatasegmentthatcanbeaccessedwithinthescopeoftheO declaration.R2(HOThedata-name-value expressionmustbea link-timecon-KOstant expressionifthe declarationbeginswithGLOBALorRO5the declarationisatthe outermostlevelofamodule(andisCOnot, therefore, containedinaroutine-declaration).3! EOThedata-name-value expressioninaGLOBAL bind-data-RO declarationislimitedtoa restrictedsubsetof link-timecon-RO5stant expressions,inthatitmustnotcontainanamedeclared5O EXTERNAL,EXTERNALROUTINE,orEXTERNALKOLITERALunlessthatnameisanoperandofa compile-time$O>constant expression(see>Section7.1.2,!>item7).( Furthermore,GOthedata-name-value expressionmustnotcontainaname  evaluationofthe immediately containingblock.;))O14.4CBind-Routine-DeclarationsJOUAbind-routine-declarationisusedtodefineanothernameNOforanexistingroutine.*Aftera routine-nameisdefinedinOOthisway,itcanbeusedinthescopeofthe bind-routine-MO^ declarationeitherbyitselfto designatethevalueoftheLO routine-nameorwitha parenthesizedlistof parametersto.Oindicateacallontheroutine.<!o@OAnexampleofabind-routine-declarationfollows:/O BIND&ROUTINE%CALC%=& CALCULATION4;=NIOItisassumedthat CALCULATION4isthenameofarou-MOtinethatisdeclared elsewhere,andunderthis assumption,DO5thevalueofCALCcanbe determinedatlinktime.>!EOAnotherexampleofabind-routine-declarationfollows:IO BIND&ROUTINE%SR%=%(IF%.A%LSS&0%THEN%SNEG&ELSE%SPOS);?JOItisassumedthatSNEGandSPOSarenamesofroutinesLOthataredeclared elsewhere.*Becausethe expressiontotheUO5rightoftheequalsign( = )operatorisnota link-timecon-NOstant expression,thevalueofSRis determinedjustbeforeMOeach evaluationoftheblockthatcontainsthe declaration.B@O14.4.1CSyntaxA.O bind-routine-0 declaration nhBINDROUTINEhGLOBALBINDROUTINE o\bind-routine-item,... `;EObind-routine-itembind-routine-name=routine-name-value sN8 s< s:#r:!bind-routine-attributer...nothing hN9 h= h;!O2bind-routine-namemname(O%routine-name-valueM expressionO bind-routine-f attribute E8 < :sKnovalue-attributeslinkage-attributesweak-attribute E9 = ; ,(32Only B O14.4.2C RestrictionsLO4Thevalueoftheroutine-name-value expressionmustbetheUOaddressofaroutinethatcanbecalledwithinthescopeofthe#Obind-routine-declaration.RC! (EOTheroutine-name-value expressionmustbea link-timeNOconstant expressionifthe declarationbeginswithGLOBALorRO5the declarationisatthe outermostlevelofamodule(andisCOnot, therefore, containedinaroutine-declaration).DCOTheroutine-name-value expressioninaGLOBALbind-POroutine-declarationislimitedtoa restrictedsubsetoflink-KO5timeconstant expressions,inthatitmustnotcontaina;Onamedeclared EXTERNAL,EXTERNALROUTINE,or@OEXTERNALLITERALunlessthatnameisanoperand9O>ofa compile-timeconstant expression(seeh>Section7.1.2,FOitem7).* Furthermore,theroutine-name-value expressionEOmustnotcontainanamedeclaredBIND,GLOBALBIND,@OHBINDROUTINE,orGLOBALBINDROUTINEunlesstheIO definitionofthatname satisfiesthissame restriction.*Dh?GE{FOTheWEAK attributemustbegivenonlywithaGLOBAL5Obind-routine-declaration (BLISS-32only).F`O14.4.3CDefaultKO4Ifalinkage-attributeisnotgivenandthe bind-routine-MO declarationisinthescopeofaLINKAGEswitch,thentheKOdefaultlinkage-attributeisthe linkage-namegivenintheGO=linkage-switch(seeSections18.2and19.2).. Otherwise,IOthedefaultlinkage-attributeisthe predeclaredlinkage-EOnameBLISSinBLISS-16and BLISS-32,orBLISS36CinOG BLISS-36.GM]O14.4.4C SemanticsBO4Abind-routine-declarationis processedasfollows:%H#K`1.:Thebind-routine-nameis associatedwiththe attributesK(giveneither explicitlyorbydefaultinthe declaration.E`2.:Thevalueofthebind-routine-nameis determined.IThetimeof evaluationdependsonthekindofroutine-IY name-value expressiongiven.)Ifthe expressionisnotaK link-timeconstant expression,itis evaluatedjustbeforeC the evaluationofthe immediately containingblock.8&wV.O15.4CLexical-FunctionsinGeneralMOUAlexical-functionis processedbythe compiler.*TheresultOisasequenceof lexemes5thatisthe expansionofthelexical-LO function.)The expansionthenbecomesinputtothecompiler,O^andis processedinitsturn. W:OItis importantto distinguishbetweenthe< evaluationofa-O computational expressionandthe! expansionofalexical-OO5 function.(A computational expressionyieldsavalue,andthatPOvaluecanbeusedinthe evaluationofother expressions.)InPO contrast,alexical-functionyieldsasequenceoflexemes,andFO>thatsequencecanbeusedasinputtothe compiler.%KOItisalsousefulto distinguishbetweenlexical-functionsIOand macro-calls.,Bothreturnasequenceoflexemes,butLO5alexical-functioninvokesan operationthatisbuiltintoFOBLISS,whereasa macro-callinvokesan operationthatGOmustbedefinedinamacro-declaration..Thus,lexical-MO> functionsand macro-callsarerelatedinthesamewaythatAOexecutable-functionsand routine-callsarerelated.X.KOCertain parametersoflexical-functionscanbe expressions,GObuteverysuch expressionmustbea compile-timecon-OO5stant expression.,This restrictionreflectsthefactthatallMOlexical-functionsmustbefully processedduring compilation. NLOEachlexical-functionbeginswithakeywordthat,inturn,KObeginswithapercent character;forexample,%STRINGandO5%CHAR.d::OAfewexamplesoflexical-functionsfollow:ZW0 O%OLexical-Function Expansion OOb%STRING( b ' bA b ' *b, ?b ' dbB b ' b, b ' bC b ' Db) b ' BbABC b 'O%STRING(  ' X  '$,24)  ' BX24  'OV %CHARCOUNT( _V ' VABC V ' :V) V3O%NUMBER(  ' -O00062  ' )5-62(written internallyasonelexeme) O8LOThesearesimple examples:*the expansionofeachofthese3Olexical-functionsisasinglelexeme.KOSomelexical-functionscanreturnasequencethatismoreFOthanonelexemeinlength.'Asimpleexamplefollows: O%OLexical-Function Expansion OOb %EXPLODE( b ' bABC b ' b) b ' BbA wb ' b, b ' bB b ' 'b,C lb ' O} NOInthiscase,the expansionconsistsoffivelexemes(threeJOquoted-stringsandtwocommas).'Somelexical-functionsareOO5replacedbynothing(thatis,anemptysequenceof lexemes).OOForexample,the followingtwolinesproducethesameobjectOcode:2Ok Y&=%.A+%PRINT('CHECK%POINT% 20')F(X);O Y&=%.A+F(X);NLOHowever,thefirstversioncausesthe informationalmessageOOCHECKPOINT20tobeincludedintheoutputlistingoftheO5 compiler.!qEOLexical functionscanbenested.'Anexamplefollows:,O "%STRING('A',%CHARCOUNT('XYZ'),'B') zKO Expansionofthis%STRINGfunctionbeginswiththeexpan-COsionofthenested %CHARCOUNTfunctionasfollows:Oa %STRING('A',3,'B')!YJOThe%STRINGfunctionitselfisthenexpandedasfollows:O 'A3B' fROThis quoted-stringisthefinal expansionofthenestedlexicalO functions.NQOThissectiongivesthegeneral definitionoflexical functions,NOwithoutdefiningany particular function.)Specific definitions-O5aregiveninthenextsection.BO15.4.1CSyntax=1Olexical-functionlexical-function-name S8 S< S:&(lexical-actual-parameter,... )lexemeHnothing 9 = ;Olexical- function-name]%nameOlexical-actual-" parameter T8 < $:sylexemehy...snothing T9 = $;H! `O15.4.2C RestrictionsMO4Alexical-functionmustconform syntacticallytooneofthelexical-function.L "OOMostlexical-functionsrequirea parenthesizedlistofactual-NO parameters.)That parameterlistcan,itself,containlexical-OO5 functionsor macro-calls;itisno differentinthatrespect6OthanotherportionsofaBLISSmodule.! YLOEachactual-parameterofalexical-functionis processedatIOeither name-quotelevelor normal-quotelevel.)Forexam-IO5ple,thefirsttwoactual-parametersofthe %EXACTSTRINGHOfunctionareat normal-quotelevel,whilethe remainingKOactual-parametersareat name-quotelevel.)Intheindivid-O>ual definitionsin>Section15.5,.>youindicatethis distinctionbyOOplacinganumbersign( # ) characterbeforeeach parameter5Othatis processedat name-quotelevel.*?8JOOncetheactual-parametershavebeen processed,theymustNOsatisfycertain restrictions.+The definitionofeachlexical-JO5functiongives restrictionsthatapplytoits parameters.NOButone restrictionappliestoalllexical-functions:*whenaMO parametercanbean expression,itmustbea compile-time-IO>constant-expression.+This restrictionis necessarybecauseHOlexical-functionsarealwaysexpandedduring compilation.! ROAfewlexical-functionscausethecompilertoskipoveralex-MOemesequencethatcould otherwisebe compiled.'Forexample,CO5 %ERRORMACROwill,undercertaincircumstances,abortIOevery macro-call expansionthatisin progress.+However,NOsuchlexical-functionsnevercauseaportionoftheunparsedMO>inputstreamtobeskipped;instead,theydiscard secondaryJOsourcesoflexemes(macro-bodies)andproceedasifeachGOofthose macro-bodieshadended.,Suchlexical-functionsOHaredefinedincHSection15.5.12H (%ERRORMACRO)andOSection15.5.15,s(%EXITITERATIONand %EXITMACRO).*c ? *Oc ?   $O15.6CLexical-ConditionalsKOUAlexical-conditional evaluatesa compile-timeconstantex-POpressionandthen, dependingonthevalueofthat expression,LOskipsoneortheotheroftwogivenlexeme sequences.,InLO^someother programming languages,thiskindoffacilityis/Ocalled ``conditionalcompilation''.! ! WPOLikethelexical-functions,alexical-conditionalisfullypro-GOcessedat compile-time.,However,thelexical-conditionalMO5differsfromalexical-functionintwo respects.-First,itsROsyntaxis different;thatisjustamatterof programmingcon-PO venience.(Second,andmore important,itcanbeusedtoskip)O>overasequenceoflexemes."  Z@OAnexampleofalexical-conditionalisgiveninSection15.1.5.*" F?iB# O15.6.1CSyntaxd$ F:0Olexical-conditional%IF lexical-test$~%THENlexical-consequence K8 < :$<o%ELSElexical-alternative<nothing K9 = ; (%FIO lexical-test*K compile-time-constant-expression On]lexical-consequencelexical-alternative 7o K8 K < Kr:lexeme...nothing /9 / = /r;O-The syntacticname-- lexeme1-isdefinedin-Section2.2.*$ |?%  mO15.6.2C RestrictionsNO4Ifa macro-bodycontainsthelexeme%IF,thenitmustalsoIOcontainthematching%THEN,%ELSE(if present),and%FIPOofthesamelexical-conditional.'This restrictionmustbesat-TO=isfiedbythesourcefilebeforeanylexical processinghasbeenO performed.&  fJOThe restrictionjustgivenappliesnotonlytoamacro-GObody,butalsotoanactual-parameterina macro-callKO5orlexical-function, tothefilethatis designatedbyaNOrequire-declaration,ortothelexical-consequenceorlexical-canbenearlyanysequenceoflexemes. !f=OAnexampleofapositional-macro-callfollows:)O ALPHA(A,.B+3,'qrs'%16%MODULE)j @JOInthisexample,the macro-nameisALPHA.ThefirstandFOsecondactual-parametersareAand.B+3,whichhappenLO5tobevalidBLISS expressions;however,theyarenotcom-MOpiledassuchuntilafterthecallhasbeen expanded.,TheLOthirdactual-parameterisasequenceofthreelexemesthatMO>doesnotappeartomakesenseinBLISS;however,thereisOOnothing inherentlywrongwiththeuseofthissequenceasaLOmacroactual-parameter.)InorderforthisexampletobeaSOHvalid macro-call,itmustliewithinthescopeofa declarationLOofALPHAasa positionalmacro;andthat declarationmustDOmakesomevaliduseofthegivenactual-parameters. x OA keyword-macro-call3issimilartoapositional-macro-callJOexceptthatanamemustbe associatedwitheachactual-FO5 parameter.)Thenameandactual-parameterare separatedKObyanequalsign.*Thenamemustbeoneofthekeyword-CO formal-namesinthe definitionofthegivenmacro. !_BOAnexampleofakeyword-macro-callisasfollows:O GAMMA(X=Q(R,1),Y=3) ! NWOItisassumedthatthiscalloccursinthescopeofa declarationCOofGAMMAasa keyword-macroname.+That declaration2O5musthaveXandYas formal-names.B O16.3.1CSyntax{  QO macro-call K8 Kw< K:4positional-macro-callkeyword-macro-call x9 xw= x;O positional-%A macro-callKn macro-name 8 < :R( macro-actuals)RD[ macro-actuals]R< macro-actuals>Rnothing 9 = ;O macro-actuals K08 K< K:#Tmacro-actual-parameter,T...nothing 09 = ;Okeyword-%a macro-callK macro-name @8 < :#R>(keyword-assignments)#R[keyword-assignments]#R<keyword-assignments> @9 = ;O$ keyword-%r  assignments KP 8 K < K! :u keyword-assignment,wu ... nothing P 9  = ! ;O4 keyword-%  assignment/K4 keyword-formal-name= macro-actual-K  parameterOu  macro-actual%  parameter K 8 K < Kr : lexeme ... nothing / 9 / = /r ;O macro-nameOkeyword-%! formal-nameKnameOThe syntacticname- lexeme1isdefinedinSection2.2.* |?C VO16.3.2C RestrictionsFO4The macro-nameinapositional-macro-callmustbede-GOclaredinapositional-macro-declaration.- Similarly,theGO macro-nameinakeyword-macro-callmustbedeclaredin'O=akeyword-macro-declaration.0  COEachkeyword-assignmentinakeyword-macro-callmustNObeginwitha formal-namefromthe declarationofthedesig-EO5natedkeyword-macro.)No formal-namecanbeusedmore0Othanonceinakeyword-macro-call. WCOAmacro-actual-parametermustnotcontain unbalancedTO parenthesesorbrackets(<>or[ ]).(Thatis,everyleftparen-GO5thesismustbefollowed (somewhereinthesamemacro-HOactual-parameter)byamatchingright parenthesis;everyOOleftsquarebracket,byamatchingrightsquarebracket;andNO>everyleftanglebracketbyamatchingrightanglebracket. ~LOAcomma( , )inamacro-actual-parametermustbequotedSOorparenthesized.'Itisquotedifit immediatelyfollowsanoddPO5numberof%QUOTE functions.'Itis parenthesizedifitisen-QOclosedinabalancedpairof parenthesesorbracketsthatis,>Oitself, containedinthemacro-actual-parameter.  NHOAmacro-actual-parametermustnotendwithanoddnum-HOberof%QUOTE functions.) Otherwise,the followingcommaO5wouldbequoted. ! WKOIfthe macro-nameofa macro-callisdeclaredasasim-JOplemacrowithno formal-names,thenthe macro-callmustPO5consistofjustthe macro-name.'(ThisdoesnotmeanthattheLO macro-namecannotbefollowedby somethingthatlookslikeTOa parenthesizedlistofactuals;itonlymeansthatthecompilerNO>willnotprocessthat constructaspartofthe macro-call.) bKOIfthe macro-nameofa macro-callisdeclaredotherthanGOasasimple macro-callwithno formal-names,thentheMO5 macro-callmusthavea parenthesized(or bracketed)listofMOactual-parameters.+(Thelistcanbeempty,butthepairof6O parenthesesorbracketsmustbethere.)  tO16.3.3C SemanticsPO4A macro-callisfirst subjectedtolexical-processingandthenNO expanded.'Lexical-processingisthesameforall macro-calls,OOandis describedinthenextsection.* Expansionis differentOO=forthe differentkindsofmacros,andis describedinfourOseparate sections. NGOThe expansionofa macro-callcanbecutshortbya;O%EXITITERATIONor %EXITMACROlexical-function;.O5these functionsare describedin5Section15.5.15.*  ?  8O16.3.3.1BLexical Processingof Macro-CallsIO)The processingofa macro-callbeginswhena macro-name.Oisboundtoamacro-declaration.  NHOOncea macro-namehasbeenbound,theactual-parametersRO(ifany)are processedat name-quotelevel.)Atthislevel,the3O5compilertakesthe followingactions: hn ` "Binds macro-namesonly `O 6OExpandslexical-functionsand macro-calls WIOBecausethecompilerexpandslexical-functionsandmacro-MOcallsatthislevel,an expansioncanoccurwithinanotherJO5 expansion.(Theactual-parametersofa macro-callaresep-GOaratedbycommas.-However,acommathatisquotedor6O parenthesizedistreated literally.*(SeeSection16.3.2forthe?O> definitionofaquotedor parenthesizedcomma.)* ?  NJOThelistofactual-parametersis terminatedbytherightMO parenthesisorbracketthatmatchestheleft parenthesisor+O5bracketthatbeginsthelist. tNOThe followinglistgivessome macro-callsand identifiestheEOactual-parametersinthesecalls..Becausesomemacro-KO5callsareincludedintheactual-parameters,the following/Omacro-definitionsaregivenfirst:O MACRO.Z M1(F1,F2)&=%F1,&F1/F2,%F1*F2%%,  M2Z =%A,%B,%C,%D%%; 9OTheidentificationoftheactual-parameters  a1 ,  a2 l, ... (is*Ogiveninthe followinglist: w OO Macro-Calla1Ta2ra3a4 OOb M3(X,Y,Z)bXoY rbZOM3(X,Y%QUOTE,Z,W)XoY,Z rWOV M3(1(X,Y))VXoX/Y rVX `* VYOM3(M2)AjBrCD!OI M3(X,%QUOTE M1(X,Y),Z)IXoM1(X,Y) rIZO M3(X,(Y,Z),W)Xo(Y,Z) rWO= M3(X,F[M2],Y)=Xo F[A,B,C,D]Y OX 1O16.3.3.2B ExpansionofSimpleMacrosKO)Thecompilerusesthe following algorithmfor expandingaOsimple macro-call:D !  `1.+ Associateactualswithformals+$.& Associatethefirstactual-C( parameterwiththefirst formal-nameofthecorre-Isponding definition,thesecondactual-parameterwiththe,second formal-name,andsoon.# +Fa.:Iftherearetoomanyactual-parameters,savethe@Y(extraactual-parametersforuseinthevalueofY %REMAINING.Jb.?Iftherearetoofewactual-parameters, associatethe@YYemptylexemesequencewitheach formal-namethat0Ydoesnothaveanactual-parameter. `12.1 Prepare macro-body/1.+Makeacopyofthe macro-bodyFofthe corresponding definition./Inthecopy,replaceCeachunquoted occurrenceofa formal-namewiththe*: correspondingactual-parameter. `3.! Expandmacro-functions'].0Replacecertainlexical-E functionsinthecopyofthe macro-bodyasfollows:% rCa.:%LENGTHbecomesanunsignedinteger-literalthatDY( representsthenumberof parametersinthelistofYactual-parameters.Cb.? %REMAININGbecomesalistoftheextraactual-YY parameters.] 3@YbIfthemacro-definitionhasn formal-names,then>Y %REMAININGisreplacedbythe followinglexeme?Y sequence:+the(n+1)thactual-parameter,acomma,BYlthe(n+2)thactual-parameter,acomma,andsoon,4Yendingwiththelastactual-parameter.h +>CYbIftherearenoextraactual-parameters, %REMAINING9Yisreplacedbytheemptylexeme sequence.$:c.?%COUNTbecomeszero. `4.& Place expansioninstream0.'Placethemodifiedcopyofthe< macro-bodyattheheadoftheinputstream. 6O16.3.3.3B Expansionof ConditionalMacrosKO)Thecompilerusesthe following algorithmfor expandinga"O conditional macro-call:  YPO(The semanticsofconditional-macrosisquitesimilartothoseLOofsimple-macros.,Inthe following,eachitemthatdiffers@O5from simple-macrosismarkedwithanasterisk( V@* 5).)D !  `1.+ Associateactualswithformals+$.& Associatethefirstactual-C( parameterwiththefirst formal-nameofthecorre-Isponding definition,thesecondactual-parameterwiththe,second formal-name,andsoon./  Fa.:Iftherearetoomanyactual-parameters,savethe@Y(extraactual-parametersforuseinthevalueofY %REMAINING. b. Y *@~Iftherearetoofewactual-parameters,usethe>YYemptylexemesequenceasthe expansionofthe7Y macro-callandexitfromthis algorithm. 1c. Y=*G~1Iftherearenoactual-parametersinthecallandnoCY formal-namesinthemacro-definition,usetheemptyCYlexemesequenceasthe expansionofthe macro-call+Y:andexitfromthis algorithm. `2. Prepare macro-body/.+Makeacopyofthe macro-bodyFofthe corresponding definition./Inthecopy,replaceCkeachunquoted occurrenceofa formal-namewiththe* correspondingactual-parameter. `C3.!C Expandmacro-functions']C.0Replacecertainlexical-0 functionsinthecopyasfollows:% rCa.:%LENGTHbecomesanunsignedinteger-literalthatDY( representsthenumberof parametersinthelistofYactual-parameters.Cb.? %REMAININGbecomesalistoftheextraactual-YY parameters.] 3@YbIfthemacro-definitionhasn formal-names,then>Y %REMAININGisreplacedbythe followinglexeme?Y sequence:+the(n+1)thactual-parameter,acomma,BYlthe(n+2)thactual-parameter,acomma,andsoon,4Yendingwiththelastactual-parameter.4  CYbIftherearenoextraactual-parameters, %REMAINING0Ybecomestheemptylexeme sequence. :c. YF*>~:%COUNTbecomesanunsignedinteger-literalthatBY representsthedepthof recursionforthismacro. ,AYbIfthemacro-definitionhasno formal-names,then=Y recursionisnot permitted,and%COUNTalwaysYbecomes0.  { bTheyb depthof recursion3bisthenumberofcallsonthesameOmacrothatoccurredpriortothecurrentcallandarestill0intheprocessofbeing expanded. `4.& Place expansioninstream0.'Placethemodifiedcopyofthe< macro-bodyattheheadoftheinputstream. 3O16.3.3.4B ExpansionofIterative-MacrosLO)Thecompilerusesthe following algorithmfor expandingan O iterative macro-call:] K3 `1.1 Associateactualswith fixed-formals".) Associatethefirst?(actual-parameterwiththefirstfixed-formal-nameEofthemacro-definition, associatethesecondactual-C parameterwiththesecondfixed-formal-name,andso 2on. ZFa.:Ifthereareoneormoreextraactual-parameters,Y(callthemthe P( remaining-actuals-list(,andgotostep Y2.Db.? Otherwise,usetheemptylexemesequenceastheFYY expansionofthe macro-callandexitfromthisalgo-Yrithm. `12.#1 Preparefixed-macro-body+1.)Makeacopyofthemacro-Gbodyofthe designatedmacro-definition.+Inthatcopy,Creplaceeachunquoted occurrenceofa fixed-formal-D:namebythe correspondingactual-parameter.*CalltheresulttheB fixed-macro-body . `3.) Expand%LENGTHmacro-function.2Replaceany@k%LENGTHlexical-functioninthe macro-bodywith'its expansion,asfollows: Ca.:%LENGTHbecomesanunsignedinteger-literalthatDY( representsthenumberof parametersinthelistofYactual-parameters.# SO(Thenextfoursteps,step4throughstep7,arealoop.)EachLOpassthroughtheloop generatesanewcopyofthemacro-MO5body.,Thesecopiesareplacedontheinputstreaminstep O8.) ! K^ `4.5 Associateactualswithiterative-formalsx.+ AssociatetheH(firstactual-parameteroftheremaining-actuals-listwithGthefirstiterative-formal-nameofthemacro-definition,E associatethesecondactual-parameterwiththesecond.2iterative-formal-name,andsoon.z ! PJbAseachactual-parameteris associatedwithan iterative-F formal-name,removeitfromtheremaining-actuals-list.FIftherearetoofewactual-parameters, associatetheDlemptylexemesequencewitheachiterative-formal-name6thatdoesnothaveanactual-parameter. ! >NbSteps1aand7ofthis algorithm guaranteethattherewillJalwaysbeatleastone remainingactual-parameteratthe$ beginningofthisstep. `5.) Prepareiterative-macro-bodies#<.-MakeacopyoftheGfixed-macro-body (obtainedinsteps2and3).,InthatHDcopy,replaceeachunquoted occurrenceofan iterative-B formal-namebyits associatedactual-parameter(ob-tainedinstep4). `t6."t Expandother functions/t.)Replaceany occurrencesofthe?%COUNTor %REMAININGfunctioninthe iterative-"% macro-bodyasfollows: A<a.:%COUNTbecomesanunsignednumeric-integerHY(that representsthe iterationcountforthis iteration.Z [0 YbTheb iterationcount/bisthenumberof completediter-LYations;thusthecountis0thefirsttimethisstepis8Y executed,1thesecondtime,andsoon.?b.? %REMAININGbecomestheremaining-actuals-list. `7. EndtestA.*Iftheremaining-actuals-listisnotempty,gokbacktostep4. `8.& Place expansioninstream,.(Placethe followingsequence=Boflexemesattheheadoftheinputstream:; 4a.:Thedefaultleftgrouper,ifany.EOb.?Thecopiesofthe macro-bodypreparedinstep4BYthroughstep6.,Placeadefault separatorbetween!Yeachpairofcopies.5c.?Thedefaultrightgrouper,ifany.  NEOThefinalstepofthe algorithmjustgivenrequirest defaultO punctuationF.( Specifically,step8brequiresadefault separator,CO5andstep8aandstep8crequiredefault groupers. ZMOThe selectionofdefault punctuationforagiven macro-callMOdependsontheoneortwolexemesthat immediatelyprecedeandTESas groupers.  NSOTheleftcontextforeachofthefive combinationsisgiveninPOthe followinglist,togetherwithremarksthatshowwhythose%O5defaultsare appropriate.  `1.* Comma separators,nogroupers'[.)Inthe followingcases,G(thedefault separatorisacommaanddefaultgroupersarenotused:_ 5 LeftContextsRemarks  b( [ <:sbThe expansionservesasalistofactual-5s parameters, formal-names,or plit-items.wThekeywordphraseatthe beginningofa_ declaration1swThe expansionservesasalistofsdeclaration-items.,(comma);sThe expansionservesasthe continuationof8s&alistofactual-parameters, formal-names,-st plit-items,ordeclaration-items. x  NObThiscasedoesnotapplytoaleft parenthesisthatisthe:firstlexemeofablockoran expression. `:2..: Semicolon separators,nogroupers':.'Inthe followingcases,Kthedefault separatorisa semicolonanddefaultgroupersarenotused:    LeftContextRemarks bBEGIN (:DbThe expansionservesasthecontentsofa DblockasdefinedinSection8.1.1. )SETLeadingkey-wordofcontrol- expression$D>(Notauseful default.)1S CODECOMMENTK(Notauseful default.)L ;(semicolon)The expansionservesasthe continuationofa !   LeftContextRemarks bnameliteral attributeKpsect-attributeswitch list-option3 linkage-typelinkage-modifier ) ] i> END TESSecond,itshowsthatthe iterationsare separatedbyalex-MOeme(acommainthisexample)thatdependsonthecontext'O(aPLITinthis example).# 6OAnexampleofakeywordmacrofollows:O KEYWORDMACRO(P COPYVECTOR(DEST,SOURCE,N=1)&=%z INCR%I%FROM&1%TO%N%DO& DEST[.I]%=& .SOURCE[.I]&%; O( ...-Op #COPYVECTOR(N=10,DEST=V2,SOURCE=V1); iIOThe expansionofthecallon COPYVECTORisasfollows:&O INCR&I%FROM%1&TO&10&DOP V2[.I]&=%.V1[.I]; WIOThemain advantageofkeywordmacrosoversimplemacrosOOisthattheactual-parametersneednotbegiveninthesameOO5orderasthe formal-names.'ThisisusefulwhentheorderofMOtheformalnamesishardto remember,thatis,whenthereIOaremany parametersorwhenthereisnonaturalorder.9O>ThisexampCt le illustratessucha situation. (O16.3.4.2BDefault PunctuationO)Section16.3.3.4=)definesthedefault punctuationfor iterative-MOmacros.*Thissectionfurther discussesthataspectofBLISS%Oandgivessome examples.* O? % ! QOThedefault punctuationofan iterative macro-callisbasedonLOan examinationofthecontextinwhichthe macro-callap-OO5pears.)Thecontextusedbythecompilerisminimal(theoneROortwolexemesthatprecedethecall),butitusuallyprovides0Otheresultyouwant.&Forexample:Ok MACRO  SHIFT[A,B]%=&A^B%%;O BINDB PTR&=%PLIT(z SHIFT(1,2,3,4,5,6),z 0+SHIFT(1,2,3,4));! JOInthisexample,themacroSHIFTiscalledtwice..AfterKO expansionofthese macro-calls,theBIND expressionisasO5follows:O BIND PTR&=%PLIT(zI 1^2,3^4,5^6,z 0+1^2+3^4);0 IOThefirst macro-callappearsafterthelexemePLIT,andIOshouldsupplyoneormore plit-items; therefore,commas,RO5whicharethe separatorsinalistof plit-items,aresuppliedJOasdefault punctuation.*Thesecond macro-callappearsaf-ROtertheplussign( + )lexeme,andshouldsupplyasequenceTO>of operands; therefore,theplussign operator,inthiscase,is2Osuppliedasthedefault punctuation.$ KOThedefault punctuationisnotalwaysthe punctuationyouNOwant.)Ifyouwant something different,youcaneitheravoidMO5theuseofan iterativemacroorelsechangethecontext.KOThesecond macro-callinthe precedingexampleisanex-OOampleofachangeofcontext:*the zero-plus(0+)beforetheMO>callchangesitscontextwithoutchangingthevalueofthe-O plit-itemprovidedbythecall.  KOConsideraniterative-macro-callthatoccursatthebegin-IOningofamacro-actual-parameterinalarger macro-call.MO5Theiterative-macro-callisexpandedpriortothe containingOO macro-call; therefore,itscontextisjusttheleft parenthe-OOsis,leftbracket,orcommathatprecedesitintheactual-FO> parameterlist./Later,theactual-parameterreplacesaLO formal-nameina macro-body,butthatistoolatetoaf-IOfectthe expansionoftheembeddediterative-macro.,ThisNOHaspectofmacro-expansionlimitsthe usefulnessof iterative-O macro-calls. !NOAnexampleofdefault punctuationthatusesdefaultbracketsAOarisesinthe processingofthe followingblock.Oa BEGINO MACRO CASEGEN(INDEX)[&]%=z9 BEGINz MACRO CASELINE[ACTION]&=' [%COUNT]:&ACTION%%QUOTE%%;1zY CASE%INDEX%FROM%0&TO& %LENGTH-2%OF CASELINE(%REMAINING)z END%; O0 ...%Ox CASEGEN(.I,%Q1,%Q2,&Q3); O ...O END;8 9AOAftermacro expansion,thisblockisasfollows:O BEGIN OP ... BEGIN( CASE%.I%FROM&0%TO%4-2&OF z( SETzp [0]:%Q1;z [1]:%Q2;z [2]:%Q3 zH TES  END O ...O  END; NJOThedefault brackets,SETandTES,weresuppliedbytheDOcompilerbecausethe macro-callonCASELINEwasex-IO5pandedintheleftcontextofOFinacase-expression.  \LOObservethata containingblockis generatedbythemacroFOCASEGENbecauseitcontainsanestedmacro-definition.RO5The generationofa containingblockis advisablefortworea-LOsons.*First,themacroCASEGENcanthenbecalledinanyQOcontext,notjustattheendofthe declarationsinablock.QO>Second,thenameofthenestedmacroisthenconfinedtothePOscopeofthe generatedblockandis, therefore,notknownat:OthesameblocklevelasthenameCASEGEN.$ $O16.4CExamplesofMacrosKOUThissectionprovidessome relativelyadvancedexamplesofSOtheuseofmacros.)Itgivessomeideaofthevarietyoftasks$Othatmacroscanhandle.=  @O16.4.1CMacrosfor InitializingaBLOCK StructurePO4WhenaBLOCK structureisusedinaprogram,itsfieldscanNObe initialized convenientlybymeansofamacro.'Anexample5Oofthis applicationofmacrosfollows. jKOSupposeaBLISS-32block structurethathasthe followingOlayoutis required:* W  Of KK%CR@H@R@HDBb@HDAA"""I3)H)I@8r.y HB(I1 OOLetthis structurebecalledaQVALblock,andsupposethat8Oitsfieldshavethe following properties:   O,OFieldSize(inBits)l Extension OObOFFSET16bUNSIGNED OF 3UNSIGNEDOVCNT13VSIGNEDOVAL32SIGNED O  WPOThefieldsarelaidoutintheorderof increasingbytead-NOdresses,withOFFSETfirst,thenF,andsoon.'ThusOFFSETOO5occupiesthefirstword,Foccupiesthe low-orderthreebitsOOofthesecondword,CNToccupiesthe remainingbitsofthatKOword,andVALoccupiesthethirdandfourth16-bitwords*O>(theentiresecond fullword).8 f LOThe following simple-macroprovidesforinitializationofaOQVALblock:Oa MACRO( INIT_QVAL(OFFSET,F,CNT,VAL)&= z INITIAL(& WORD(OFFSET,=9 ((F)%AND%%O'7')&OR&((CNT)^3&AND% %O'177770')), LONG(VAL))%%;# ! TOThismacropacksfourvalues,oneforeachfield,intothecor-OOrectlayoutforaQVALblock.)Considerthe followinguseofO5themacro: O OWN4 X:%BLOCK[QVAL_SIZE]%INIT_QVAL(0,3,-1,2); IOWhenthemacrois expanded,the declarationbecomestheO following: Oa OWNH X:%BLOCK[QVAL_SIZE]%INITIAL(%WORD(0,%O'177773'),& LONG(2));&  NOObservethatthevaluesforFandCNTarepackedintotheNOsecondwordbymaskingtheirvalues,shiftingtheCNTvalueMO5threebitsleft,andthen combiningthevalueswithanORO operator. NHOTheuseofmacros describedheresupportsthedeclara-KOtionand referencingoftheBLOCK structures describedinO5Chapter11.* OOg R='O16.4.2CA ComplicatedMacroOO4 Sometimesitis appropriatetouseamacrofora relativelyLO specializedand complicatedpurpose.(AnexampleofsuchanO applicationfollows:Oi MACRO  BLOCKSETUP%(A)%[]%=z OWN%A:% BLOCK[10];2zA ROUTINE%%NAME% (A,'_INIT'):&NOVALUE%= BEGIN: INCR&I%FROM%0&TO&9%DOK!%Zero%the%block( %NAME%(A)& [.I,0,32,0]&=%0;0a FILL&(A,% %REMAINING)J!%Set%fields END; z %,#9 FILL%(A)[B]%=%A&B%%; WGOThesemacrosdeclareagivenname (representedbytheEOformal-parameterA)asanOWNBLOCKcomposedoftenKO5 longwords.+In addition,theydeclarearoutinethat,whenSOcalled, initializestheblock.*TheroutinebeginsbysettingallLOten longwordstozeroandthen initializinganynumberof0O> specifiedfieldswithintheblock.  MOSupposethattwoofthefieldswithintheblockaregivenOnamesasfollows:Oa MACRO ALPHA%=% 0,8,8,0%, BETA%=& 5,0,16,1%;+ ! OOItisassumedthatALPHAandBETAaretheonlyfieldsthatROrequireinitialization.'Thenanexampleofacallonthemacro&O5 BLOCKSETUPisasfollows::O BLOCKSETUP(QQ,%[ALPHA]&=%25,&[BETA]%=&32);D *OThe expansionisasfollows: O OWNP QQ:& BLOCK[10];O ROUTINE QQ_INIT:%NOVALUE%=z( BEGIN%zp INCR%I%FROM&0%TO%9%DO QQ[.I,0,32,0]&=%0;z QQ[0,8,8,0]&=%25;zH QQ[5,0,16,1]%=&32;z END; JOGiventhese declarations,acallonQQ_INIT(withoutanyMOactual-parameters)willzeroQQandsettwoofitsfields.|  R+O16.4.3CNestedMacro DefinitionQO4Amacro definitioncanbegivenwithinamacro definition,asOfollows:O MACROY M1(F1,F2)[]%=z OWN%F1,%F2;z MACRO& NM1[F3,F4]%==1 LOCAL%%NAME(F3,'_1'),%%NAME(F4,'_1');&%QUOTE%%;zy NM1(F1,F2,%REMAINING) z %;r ! +HHOThe%QUOTElexical-functionpreventsthepercent( % )OOlexemefrombeing lexicallyboundandthusfrombeinginter-NO5pretedasthe terminationlexemeforthemacrobodyofM1.@OAnexampleofacallonthemacroM1follows:#O M1(A,%B,%C,%D,%E,%F) EOTheresultofthiscallisthe following expansion:O OWN%A,B;OP LOCAL%A_1,B_1;O LOCAL%C_1,D_1;O LOCAL%E_1,F_1;  A^.O16.4.4C DeclarationsWithinMacrosLO4 Declarationswithinmacroscanleadto problems.'Forexam-Ople:O BEGINOY MACRO S(A,B)&=z BEGINz1 LOCAL&C;zy C%=%.A%+&.B; z .Cz  END%%;OQ OWN%C,X;O S(C,X);O S(%UNQUOTE&C,X); O( END{  QTOInthefirstcallonS,the substitutionoftheactual-parameterPOCinthemacrobodycausesittobe interpretedasthelo-KO5calvariabledeclaredinthemacrobody.-ThesecondcallGOonSavoidsthisproblembytheuseofthe%UNQUOTEOlexical-function.   $O16.5CRequire-DeclarationsOOUArequire-declaration specifiesthenameofafile.(WhenthePOmoduleis compiled,therequire-declarationisreplacedbytheSOcontentsofthefile.'Textthatiscommontoanumberofsep-TO^aratemodulescanbemadeintoasinglefileand,inthisway,0Oincludedineachmodule(seealsoSection 15.5.16).* z ? L  "MOThemostcommonuseofarequire-declarationisinconnec-NOtionwithafilethatcontainsstructure-declarations,field-GO5 declarations,macro-declarations,andliteral-declarations@Ocommontoseveralrelatedmodulesofaprogram.B O16.5.1CSyntax :Orequire-declarationREQUIREfile-designator;O]file-designatorK] quoted-stringOThe syntacticname- quoted-string1isdefinedinSection4.3.* |? O16.5.2C RestrictionsKO4Thefile-designatorgiveninarequire-declarationmustbeMOavalidfilenameonthesystemonwhichthecompilerisOrunning. IOTheresultof replacingtherequire-declarationwiththe6O specifiedfilemustbeavalidmodule.  NROIftherequiredfilecontainsa%IFlexeme,itmustalsocon-LOtainthematching%THEN,%ELSE(ifused),and%FIofthe#O5samelexical condition. NPODuringthe expansionofarequiredfile (declarationorfunc-UOtion)afatalerrorwilloccuriftheendofthefileisfound6O5whileamacroisstillbeing declared. zKOArequiredfile (declarationor function)mustnotappear/Oduringthe expansionofamacro. O16.5.3C SemanticsRO4The specifiedfileisplacedattheheadoftheinputstream.2OThe followingactionsare performed:  pQ`1.:Locatethefile specifiedbythefile-designator.(FilenameG(defaultrulesaregiveninthe appropriateBLISSusermanual.A`2.:Suspendinputfromthecurrentlexemesource.L`3.:Adoptthe specifiedfileasthecurrentlexemesource.N`4.:Whenthe specifiedfileisempty,resumeinputfromthe<Wlexemesourcethatwas suspendedinstep2.+ ! e"O 17.2 Condition!HandlingO Conditionhandling=istheresponsetoanunusualeventthatisKOsignaledduring executionofaprogram.(TheunusualeventYOBisoftenthe detectionofanerror,butneednotbe;itcould,forNOexample,bepartofaschemetomeasurethe performanceofOOaprogram.(Thischapter describesthefeaturesofBLISSthat'OLsupport condition handling.o, EGO ConditionhandlinginvolvestheBLISSlanguagetogetherGOwiththetargethardwareandsoftwaresystem.,Forad-IO5ditionalsystemdetails,seethe respectivehardwareandOO operatingsystem referencemanuals,aswellasthe respectiveOBLISSusermanuals. -  5O17.1C Introductionto ConditionHandlingOOU Conditionhandlingbeginswhenaneventor situationissig-POnaledbyacallononeoftheexecutable-functionsSIGNALorOO SIGNAL_STOP.ThesignalisdirectedtoapartofthesystemKO^calledthe ConditionHandlingFacility(CHF).TheCHFre-ROtainscontroluntiltheunusualeventhasbeendealtwith;butPOtheCHFcan,andusuallydoes,calluserroutinesforassis-IOhtance.)Then, dependingontheoutcome,program execution(O continuesoris terminated..  O17.1.1CRoutinesOO4 Conditionhandlinginvolvesthe interactionofthreekindsof!O routines.(Firstisa signalerroutine(0,whichcontainscodethatOO generatesthesignal,either explicitlyor implicitily.+Second O=are= handlerroutines38=,whicharecalleduponbytheCHFIOtoprovidethedesiredresponsetoasignal.,Thirdare  es-O tablisherroutines6thatcontainaspecial declaration,theOG enable-declaration=G,that associatesahandlerroutinewiththeO establisherroutine./ ! vPOThesethreekindsofroutinesarenotnew;theyareroutinesTOthatareusedinanewway,toplayspecialrolesin conditionTO5 handling.'AsingleroutinecanplaytwoorthreeoftheserolesWOatthesametime;infact,aroutinecaneven establishitselfas'Oitsown conditionhandler.0 ! NLO Furthermore,asingleroutinecanbeusedinmanyplaces;SOforexample,asingleroutinecanbe establishedasthehandler3O5routinebymany establisher routines.1  jO17.1.2CSignalsQO4Asignalcanbe generatedinthreeways.)First,asignalcanNObe explicitly generatedbyacallontheexecutable-functionHOSIGNALor SIGNAL_STOP.Second,asignalcanbeimplic-KO=itly generatedbythehardwareorthesoftwaresystemasLOaresultofa conditiondetectedduringprogram execution.SOThird,aspecialkindofsignal,theunwindsignal,canbein-ROGdirectly generatedbyahandlerroutinebymeansofacallon.Otheexecutable-function SETUNWIND.2 ! aHOWhenasignalis generated,adatasegmenttermedthe signalO vectorL4isusedtodescribethe condition.'ThisvectorcontainsaO5 conditionvalue@d5,whichisanencodingoftheprimarydescrip-QOtionofthe conditionthatcausedthesignal.)TheencodingofPOthe conditionvalueisdefinedbysoftware conventionsandisMO>thesameforall conditions.*The remainingelementsoftheHOsignalvectorprovide suplementary informationabouttheLO condition;this informationcanvaryfromone conditiontoOHanother.3 ! ^O17.1.3C ProcessingLO4When conditionhandlingis initiated,theCHFsearchesthePOstackofroutinecallsforthemostrecently establishedhan-POdler.'ThehandleriscalledbytheCHFwiththree parametersNO=giving, respectively,valuesfromthesignaler(oneofwhichQOisa conditionvalue),valuesfromtheCHFitself,andvaluesROfromthe establisherofthehandler.&Thehandlerusesthisin-QOG formationto determinewhatactiontotakeinresponsetotheO condition.y4 OIOThehandler indicatestotheCHFhow conditionhandlingROforthesignalshouldproceedafterthehandlerreturnstotheNO5CHF.Inthesimplestcase,thehandlerrequeststheCHFtoOOreturntothe signaler.(This completes conditionhandlingforOthatsignal.w5 MNOThehandlercanalsorequest resignaling.)Inthiscase,CHFOOsearchesforthenexthandlerinthestackofroutinecallsOO5andcallsit.*Thesearchforandcallingof successivehan-KOdlers continuesaslongaseachhandlerinturnrequestsO resignaling.Q6 'EOFinally,thehandlercanrequest unwinding.- UnwindingKOcausesthe executionofvariousroutinestobe terminatedKO5byremovingeach routine'sstackframefromthestackofLOroutinecallsasthoughtheroutinehadreturned normally.7  aMODuring unwinding,thehandlerofanyroutinethatisbeingPO terminatediscalled(asecondtime)togiveeachhandleranPO5 opportunitytoperformanyactions necessaryonbehalfofthePO establisherinorderforthe establishertocomplete properly.POExamplesofsuchactionsareclosingfilesopenedbythees-LO> tablisher, releasing dynamically allocatedstorage, adjustingNOcountersandflags,andsoon.'Normal executionresumesaf-QOterthecalltothe establisherofthehandlerthat requestedNOH unwinding.'This completes conditionhandlingforthatsignal.z8  PPOThe descriptionof conditionhandlingisgiveninfiveparts.KOThefirstthreepartspresenttheBLISSlanguagefeaturesPO5relevanttothethreekindsofroutinesinvolvedin conditionNO handling.(First,enable-declarations,usedin establisherrou-OOtines,are described.(Second,signalsandthemeansbywhichOO>asignalerroutine initiates conditionhandlingare described.HOThird,handler routines,their parametersandthemeansJObywhichahandlerdirectsCHF processingare described.QOHThefourthpart describestheflowofcontrolduring conditionMOhandlingamongthethreekindsof routines.*ThefifthpartIOgivesexamplesofthe applicationof condition handling.}0  5O17.5CCondition-HandlingFlowofControlKOUCondition-handlingflowofcontrolreferstotheorderinNOwhich conditionhandlingroutinesarecalledduring conditionQO handling.(Theorderisdefinedintermsofthestackofrou-UO^tinecallsthatareactiveatthetimeasignalis generatedin;O combinationwith subsequenthandler requests.  O17.5.1C DefinitionNO4The definitionofcondition-handlingflowofcontrolhastwoSOparts.*ThefirstpartdefinestheflowofcontrolforasignalPOthatis generatedwhen conditionhandlingisnotin progress.OO=TheseconddefinesthemodifiedflowofcontrolthatresultsQOforasignalthatis generatedwhile conditionhandlingfora4Oprevioussignalisstillin progress.  -O17.5.1.1BNormalFlowofControlSO)The generationofasignalbeginsasequenceofeventsthatis:OcarriedoutunderthecontroloftheCHF.l ! BNOFirst,theCHFcreatesthesignalvectorand mechanismvec-UOtorforuseincallingahandler.(Ifthesignalis generatedbyPO5a SIGNAL_STOPcall,theseverityfieldofthe conditionvalueOOinthesignalvectorisassignedthecodeforsevereerror. ! WOONext,thestackofroutinecallsis searched, beginningwithROtheroutinethat generatedthesignal.)IfthatroutinedidnotSO5 establishahandler,thentheroutinethatcalleditisconsid-UOered,andsoon,untilthemostrecentlycalledroutineisfoundSOthatdid establishahandler.'Thishandleriscalledwiththree(O> parameters,as describedin6>Section17.4.2.* 6?h  JO Followingthereturnfromthehandler, processingdepends?Ouponwhichoptionis requestedbythehandler. LOIf continuationis requested,thentheCHFreturnstotheOOsignalerand conditionhandlingforthatsignalis completed.  yOOIf resignalingis requested,thentheCHF continues searchingVOthestackpriortothe establisherofthehandlerjustcalled.(IfPO5anotherhandlerisfound,thenitiscalledinthesamewayMOastheprevioushandler.*Thisprocessof searchingforandOOcalling successivehandlers continuesaslongaseachhandlerJO>requests resignaling.-Ifeveryhandler indicates resignal-TOing,thatis,nohandlerisfoundthatcauses completionoftheJOsignal,thensystemdefinederror processingtakesplace. NMOIn BLISS-16,ifnohandlerisfoundtheprogramexits.+InNO BLISS-36,ifnohandlerisfoundamessageis displayedon:O5theuser'sterminalandtheprogramexits.  wLOIn BLISS-32,theVMSsystem establishesacatchallhandlerQOtoprovidedefaulthandlingforallsignals.( Consequently,thisTO5handlerwillbecalledifnouserhandlerisfoundorifeveryOOuserhandlerrequests resignaling.(TheactionofthishandlerOis describedin]Section 17.6.4.2.* ]?  ! t^NOIf unwindingis requested,thenthehandlerjustcalledandNOits establisherare rememberedandanewsearchisstarted.NO5ThissearchstartsoveratthesignalerroutinejustasinOOthefirstsearch.*Thistime,however,eachroutineistermi-OOnatedbyremovingitsstackframefromthestackofroutineRO>calls.)Iftheroutinehasahandler,theroutineis terminatedQOafterthehandleriscalledwitha conditionvaluethatindi-LOcatesthat unwindingisin progress.,ThehandlerdoesnotMOHhavethethreeoptionsthatare availableduringthefirstHOsearch:* SETUNWINDmustnotbecalledandthevalueofLOthehandlerisignored.+Thissecondsearch completesafterRORthehandlerthat initiated unwindingiscalledthesecondtime.NOWhenthathandlerreturns,the establisheris terminatedandKOnormal executionresumes immediately followingthecalltoO[the establisher.u  UKEO17.5.1.2BModifiedFlowofControlforNestedSignals O)A) nestedsignal>)isasignalthatis generatedwhile conditionPOhandlingforaprevioussignalisin progress.+Anestedsig-NOnaloccurs,forexample,ifahandlerroutinecallsSIGNAL.PO3Whenanestedsignalis generated, conditionhandlingfortheOOprevioussignalis suspendeduntil conditionhandlingfortheMOnestedsignalis completed.)Then processingresumesfortheO<previoussignal.<  QO Processingofanestedsignalisthesameasfora nonnestedQOsignalwithone exception:(thesearchforhandlersismodifiedPO5toexcludeanyhandlersthathavebeencalledfortheprevi-QOoussignal.(ThehandlerthatisactivewhenthenestedsignalOOis generatedisexcludedbythisrule.*However,thishandlerRO>canitselfhaveahandlerandifso,this(second)handleris.Oincludedinthemodifiedsearch. ! ROIfthehandlerofaprevioussignalis terminated(sothatitIOcannotrequestCHF processing)becauseofanunwindre-RO5questforanestedsignal,thenalloftheroutines consideredQOduring conditionhandlingoftheprevioussignalarealsoter-NOminated.)ThehandlersofthecombinedsetofroutinesbeingOO> terminatedareallcalledwiththeunwindsignalinthein-LOverseordertowhichtheywere established.)MorethanoneMOprevioussignalcanbeaffectedinthisway.+ CompletionofPOH unwinding completes conditionhandlingforalloftheaffectedOsignals. sO17.5.2C DiscussionQO4Severalaspectsof conditionhandlingflowofcontrolaredis-LOcussed.,First,examplesofthedetailedsequenceofeventsKOare illustrated.+Second, recursivehandlersare considered.LO=Finally, interactionsbetween conditionhandlingandroutine#Olinkagesare discussed. 3O17.5.2.1BExamplesofFlowofControlOO)Example sequencesofflowofcontrolduringsignal processing;Oare illustratedusingthe followingdiagram:* \ 4 O+X4KK @ @ @ @ PP @ @ @ @??~x>      @ @ @ @ @ @ @??~x8 |# $ <?   x $# @@ @@@ @@@  @@9>?|?~8~ x2(#"2(#R$%!R$%! R%)!""")!"#"1#"1@ @ @ @>?B B EEH O XPX'8!%b'%dx)%E )%D'8  ROInthisdiagram,adiagonalline indicatesthattheupperrou-VOtinecallsthelowerroutine,forexample,AcallsB,BcallsC,UO5andsoon.(A horizontalline indicatesthattheleftroutinees-QO tablishestherightroutineasahandler;forexample,routine8OC establishesroutineCHasitshandler.  NNOTheexamplebeginsbyassumingthatroutineAis executing,SOthatis,AhasbeencalledbysomeotherroutinenotshowninO5thediagram.  QORoutineAdoesnot establishahandler.*AtsomepointinitsNO executionAcallsroutineB.B establishesroutineBHasaSO5handler;BHisnotcalledwhenitis established.(Bcallsrou-QOtineC.RoutineC establisheshandlerCHandthencallsD.DKOdoesnot establishahandlerbutdoesgenerateasignal.D XOAtthispointthestackofroutinecallsconsistsofA,B,C,andQOD,withDbeingthemostrecentlycalled(thecalltoSIGNALOO5doesnotcount).(RoutinesBandChave established handlers,"ObutAandDdonot. WKOTheCHFsearchesforahandler.,FirstroutineDiscon-MOsidered,butnohandleris established.-Next,routineCisPO5 considered.*Ahandleris establishedand,thus,CHiscalled.LOCHcallsanotherroutineEwhichreturnstoCHwhichre-MOturnstotheCHF.WhathappensnextdependsontheoptionO> requestedbyCH. ! NROFirst,supposethatCHrequests continuation.'Inthiscase,theNOCHFreturnstoDandD continues.&Thecompletesequenceof.O5eventsis summarizedasfollows: XAcallsB%(B establisheshandlerBHBcallsC%C establisheshandlerCH2CcallsDDcallsSIGNALCHFcallsCH<CHcallsEEreturnstoCH8CHreturnstoCHF requesting continuationECHFreturnstoDD continues: ! MONext,supposethatCHrequests resignaling(insteadofcon-NO tinuation).*Inthiscase,theCHF continues searchingforaQO5handlerby consideringroutineB.Bhasahandler,and,thus,LOBHiscalled.'BHcallsFandFcalls SETUNWIND.TheCHFOOrecordsthefactthatanunwindis requestedandreturnstoPO>F.FreturnstoBHandBHreturnstoCHF.ThevalueofBHKOisnotusedbyCHFbecause unwindinghasbeen requested.OOAtthispoint,thesecondsearchstarts.,DdoesnothaveaJOHhandlerandis terminated.+CHFcallCHwhichreturnstoLOCHF.Cis terminated.(CHFcallsBHwhichreturnstoCHF.MOThis completesthesecondsearch.*Bis terminated.*Finally,MORCHF ``returns''toAusingthereturned-valueobtainedfromJOthe mechanismvectorasthoughBhadreturnedinnormal%OfashionandA continues. MOThesequenceofeventsis summarizedasfollows(thefirstEOnineeventsarethesameasthe preceding summary):d  :AcallsB%(B establisheshandlerBHBcallsC%C establisheshandlerCH2CcallsDDcallsSIGNALCHFcallsCH<CHcallsEEreturnstoCH7CHreturnstoCHF requesting resignalingECHFcallsBHBHcallsFFcalls SETUNWIND,OCHFrecordstheunwindrequestCHFreturnstoFFreturnstoBHYBHreturnstoCHFDis terminated3 CHFcallsCHwiththeunwindsignalbCHreturnstoCHFCis terminated3CHFcallsBHwiththeunwindsignallBHreturnstoCHFBis terminated? CHF ``returns''toAasthoughBhadreturnedv A continues@ ! OOObserveinthisexamplethathandlerBHmustassignthere-UOturnvalueofBforthecallfromAwhenBHiscalledfortheQO5unwindsignal.'IfBHassignedthereturnvaluethefirsttimeTOitwascalled,thereisthe possibilitythatsomeotherhandler,POsuchasCHinthisexample,willassignareturnvaluewhenQO>itiscalledwiththeunwindsignal.(Thus,thereturnedvalue,OintendedbyBHwouldbelost. gKOForanexampleofnestedsignal processing,the followingOdiagramisused:* 6 l+ i{+KK @ @ @ @ @ |@PP  <    @ @ @ @??~xDB DB <~?DB DB DBx < D  xD< @ @ @ @ @ @ @??~x8 ##!@$!#" !@ % (Q#% (Q$1) I@$!)" I@$1"#.q=I3)@HI@8^Jx H@JI1 OOTheinitialsequenceofeventsisapparentfromthepreviousfirstsignal.( Processingofthefirstsignalmust, consequently,LObe terminatedaswell.,Ineffect,theunwind requestedbyQOAHforthenestedsignalalsoappliestotheprevioussignal.QOH(ThiscanapplytoyetathirdsignaliftheprevioussignalQOwasitselfanestedsignal,andsoon.)*ThesecondsearchofQOthestack considersalloftheroutinesthatarebeingtermi-SORnated includingthosesofar consideredbythefirstsignal.(InUOthisexample,theorderof considerationisD,BH,C,B,andA.IOEventsproceedasfollows (startingwhenAHiscalled): #AHcalls SETUNWIND'(CHFrecordsunwindrequestCHFreturnstoAHAHreturnstoCHF32CHFcallsDHwiththeunwindsignalDHreturnstoCHFDis terminated4<CHFcallsBHHwiththeunwindsignalBHHreturnstoCHFBHis terminatedECis terminated3CHFcallsBHwiththeunwindsignalBHreturnstoCHFOBis terminated3CHFcallsAHwiththeunwindsignalAHreturnstoCHFYAis terminated9CHF ``returns''toA'scaller(notshown) A'scaller continues ! 'O17.5.2.2B RecursiveHandlers O)A) recursivehandler8+)routineisahandlerroutinethatestab-UOlishesitselfasahandlerorthatcalls (directlyor indirectly)QOanotherroutinethat establishesitasahandler.' Consequently,RO3itispossibleduringthe executionofsuchahandlerthatitGOwillbe recursivelycalledtohandleanestedsignal. ! WLO Programminga recursivehandlercanbemore difficultthanGO programminga nonrecursivehandler,justas programmingOO5any recursiveroutinecanbemore difficultthana nonrecur-NOsiveroutine.)YoumustconsiderthesequenceofeventsthatROmayresultfromthe combinationofthetwo(ormore)callsofO>thesameroutine. jNOObservethateachcallofthehandlerwillbecausedbyaO differentsignal. CO17.5.2.3B ConditionHandlingandLinkage InteractionsPO)Theflowofcontrolduringthe processingofasignalcausesNOvariousroutinestobecalledinanorderthatmaynotbeDOapparentwhen examiningaprogram.+TheCHFsoftwareNO3dependsoncallingsequence conventionstoensureproperac-MOcountingforthemachine registersandothermachinestatus(Ovaluesduringthisprocess.  s(OThelinkage-declaration(seeoSection13.3)Oprovidestheabil-POitytochoosemanycallingsequence variationsotherthantheDO5 predefinedlinkagesBLISSandFORTRAN.WhenyouuseKOsuch nonstandard linkages,therearevariouscomplexrules6Oand restrictionsthatmustbe followed.* oF?T WMOIn BLISS-32,notethataroutinewhoselinkage-attributeisKOdefinedwithJSB linkage-typemustnotcontainanenable-JO5 declarationandmustnotbedeclaredasahandler.,SuchIOroutinescannotdirectlyinteractwiththeCHF software,EOexcepttocallthe functionsSIGNAL, SIGNAL_STOP,orO> SETUNWIND.}S  O17.6CExamplesIOUThe followingsectionsgiveexamplesofapplyingvariousIOaspectsof condition handling.+Because conditionhandlingMOinvolvesthe interactionofseveral routines,completeexam-NO^plesare necessarilyquitelengthy.(TheexamplesgivenbelowPOleaveoutmanydetailsinordertobeasbriefas possible. NJOThefirstsectionpresents declarationsthataresuitableKOfor accessingandcreating conditionvalues.+The followingFO5sections illustrate applicationsof condition handling.  =O17.6.1C AccessingandDefining ConditionValuesNO4 Conditionvalueshavesimilarbutnot identical encodingsinLOBLISS-16and BLISS-32.'The followingtwosectionsgivetheJO encodingsusedand declarationsfor conveniently accessingHO=anddefining conditionvalues,inBLISS-16andBLISS-32O respectively.]  L33O17.6.1.1B ConditionValuesinBLISS-16RO)In BLISS-16,a conditionvalueisasinglefullwordvaluethatOOisencodedwithtwoprimaryfields:,aseverityfieldinthePO low-order3bits,andanidentityfieldinthe high-order13O3bits.  WOTheidentityfieldisitselfdividedintotwofields:(the conditionFOidentificationfieldandthecustomer definitionflag. ! NSOThetwelve low-orderbitsoftheidentityfield(bits3throughUO14ofthe conditionvalue)arethe conditionidentificationfield.KO5Thisfieldencodesthespecific conditionforthesignal.l  BVOThe high-orderbitoftheidentityfield(bit15ofthe conditionQOvalue)isthecustomer definitionflag.(It distinguishescondi-MO5tionidentificationvaluesforDIGITAL-suppliedsoftware(bitNOsetto0)andnon-DIGITAL-suppliedsoftware(bitsetto1).  NIO Conditionvaluesdefinedfor applicationusemustalwaysSOhavebit15setto1inordertoavoidconflictwithDIGITAL-O5definedvalues. BOA conditionvalueisaBLOCKdata structure(see=Section 11.10.3).QOThe following declarationscanbeusedtodescribethisstruc-O5ture:O FIELD CONDIT_FIELDS%= zI SET;z STS$V_SEVERITY&=% [0,0,3,0],J!%Severity%field9z STS$V_SUCCESSK=% [0,0,1,0],J!%Success&field;z! STS$V_COND_IDK=% [0,3,13,0],%!%Identity%fieldCzi STS$V_CODE=% [0,3,12,0],%!%Code&for% condition%onlyFz STS$V_CUST_DEF&=% [0,15,1,0]J!%Customer% definition&flagz TES;OA MACRO@ CONDITION_VALUE&=%BLOCK[1]%FIELD(CONDIT_FIELDS)%%;* =F ?  :IOThe followingliteral-declarationcanbeusedtodeclareSOnamesforthecodesusedfortheseverityfieldofa conditionO5value:O LITERAL* STS$K_WARNINGJ=%0,p!%Warning9I STS$K_SUCCESSJ=%1,p!% Successful% Completion& STS$K_ERROR=%2,p!%Error+ STS$K_INFO=%3,p!% Information/! STS$K_SEVEREp=%4;p!%Severe&ErrorC ! SOObservethatthesecodesarechosensothattestingofthelowVOorderbitoftheseverityfieldwill distinguisha successfulcon-SO5dition(lowbitequalto1)froman unsuccessful condition(lowObitequalto0).  NMOIntheabove declarations,thenamesusedarethesameas.OthenamesusedinBLISS-32(seeSection 17.6.1.2),zwhichareBO5basedonnamesusedintheVMS operatingsystem.* ?  IIOAs an aid tocreating a conditionvalue,!the following2Okeyword-macro- declarationisuseful:Oa KEYWORDMACRO STS$VALUE(Cz SEVERITY&=% STS$K_SEVERE,!&default%is%severe&errorz9 CODE,9 !&no&defaultz CUST_DEF&=%1^15%)=* !&default%is%user% definition  (SEVERITY%AND&7)&OR% (CODE%AND% %O'7777')^3%ORY IF%CUST_DEF%NEQ%0 THEN%1^15 ELSE%0) 0 %;m bCLO Comparingtwo conditionvaluesto determineiftheyrepre-OOsentthesame conditionmustexcludetheseverityfield.(The;O5 followingmacroisusefulforthispurpose:O MACRO STS$MATCH(A,B)%=CzI (((A)&AND% %O'177770')%EQL%((B)%AND% %O'177770'))&%; rKOThemacroreturnstrueiftwogiven conditionvaluesare'Oequalandfalse otherwise.V s,NOThe CHF-defined conditionvalueneededinordertotestforOOanunwindsignalisprovidedasagloballiteralvalue.+TheQO5 following declarationcanbeusedtodeclarethenameofthisOliteral:O EXTERNAL%LITERALZ SS$UNW; ! L3O17.6.1.2B ConditionValuesinBLISS-32RO)In BLISS-32,a conditionvalueisasinglefullwordvaluethatLOisencodedwiththreeprimaryfields (proceedingfromlow-XOorderto high-order):'aseverityfieldof3bits,anidentityfieldZO3of25bits,andafieldof4bitsthatisreservedforsystemuse. SOTheidentityfieldisitselfdividedintotwomajorfields:+theBOmessagenumberfieldandthefacilitycodefield.   WSOThe13 low-orderbitsoftheidentityfield(bits3through15MOofthe conditionvalue)arethemessagenumberfield.+ThisTO5field identifiesthespecific conditionforthesignal.(Thehigh-VOorderbit(bit15) distinguishessystemwidecodes(bitsetto0)KOthatarecommontoallsoftware (includinguser programs)JO>and facility,specific (component)codes(bitsetto1). WQOThe12 high-orderbitsoftheidentityfield(bits16throughPO27ofthe conditionvalue)arethefacilitycode.-ThisfieldNO5 identifiesthespecificsoftware componentinwhichthesig-MOnalis generated.,The high-orderbit(bit27) distinguishesNODIGITAL-suppliedsoftware facilities(bitsetto0)andnon-:O>DIGITAL-supplied facilities(bitsetto1).  ZIO Conditionvaluesdefinedfor applicationusemustalwaysSOhavebothbits15and27setto1inordertoavoidconflictIO5withDIGITAL-definedvalues.' ApplicationprogramscanuseHO systemwidemessagenumbervaluesprovidedtheyareused-OasdefinedfortheVMSsystem. jBOA conditionvalueisaBLOCKdata structure(see=Section11.9.3).QOThe following declarationscanbeusedtodescribethisstruc-O5ture:O FIELD CONDIT_FIELDS%= zI SET;z STS$V_SEVERITYK=& [0,0,3,0],p!&Severity&field9z STS$V_SUCCESSp=& [0,0,1,0],p!&Success%field%! !& (subfield%of% severity);zi STS$V_COND_IDp=& [0,3,25,0],K!&Identity&fieldAz STS$V_MSG_NO=& [0,3,13,0],K!&Message%number&fieldBz STS$V_FAC_SP=& [0,15,1,0],K!&Facility-specific&flagCzA STS$V_CODE=& [0,3,12,0],K!&Code%for& condition%only:z STS$V_FAC_NO=& [0,16,12,0],%!&Facility&codeFz STS$V_CUST_DEFK=& [0,27,1,0]p!&Customer& definition%flagz TES;Oa MACRO@ CONDITION_VALUE&=%BLOCK[1]%FIELD(CONDIT_FIELDS)%%;* =F? :IOThe followingliteral-declarationcanbeusedtodeclareSOnamesforthecodesusedfortheseverityfieldofa conditionO5value:O LITERAL* STS$K_WARNING%=&0,K!&Warning9I STS$K_SUCCESS%=&1,K!& Successful% Completion& STS$K_ERRORp=&2,K!&Error+ STS$K_INFO=&3,K!& Information/! STS$K_SEVEREK=&4;K!&Severe%Error> NOObservethatthesecodesarechosensothattestingoftheSOloworderbitoftheseverityfieldwill distinguisha successfulPO5 condition(lowbitequalto1)froman unsuccessful condition#O(lowbitequalto0). IOAs an aid tocreating a conditionvalue,!the following2Okeyword-macro- declarationisuseful:Oa KEYWORDMACRO STS$VALUE&(Cz SEVERITY&=% STS$K_SEVERE,J!%default&is&severe%errorz9 CODE,D9 !%no%defaultz FAC_SP%=&1^15,,D !%default&is&facility&specificz FAC_NO%=&0,D !% arbitrary%defaultz CUST_DEF&=%1^27)%=*D !%default&is&user% definition Y (SEVERITY%AND&7)&OR% (CODE%AND% (1^13-1))^3%OR (IF%FAC_SP&NEQ%00 THEN%1^15x ELSE%0)%OR( (FAC_NO&AND% (1^12-1))^16%OR (IF%CUST_DEF%NEQ&0P THEN&1^27 ELSE&0) 4 %; f zYJO Comparingtwo conditionvaluesto determineiftheyrep-NOresentthesame conditiontakesseveralsteps.)The following'O5macroservesthispurpose:O MACRO STS$MATCH(A,B)=zI BEGINz LOCAL" QQQQA:%CONDITION_VALUE,"! QQQQB:%CONDITION_VALUE;zi QQQQA&=%(A);z QQQQB&=%(B);Cz IF&NOT%(.QQQQA[STS$V_FAC_SP]%OR%.QQQQB[STS$V_FAC_SP])zA THEN5 .QQQQA[STS$V_CODE]%EQL&.QQQQB[STS$V_CODE]z ELSE; .QQQQA[STS$V_COND_ID]%EQL&.QQQQB[STS$V_COND_ID]za END%%; sLOThismacroreturnstrueiftwogiven conditionvaluesare'Oequalandfalse otherwise.Z s0NOThe CHF-defined conditionvalueneededinordertotestforOOanunwindsignalisprovidedasagloballiteralvalue.+TheQO5 following declarationcanbeusedtodeclarethenameofthisOliteral:O EXTERNAL%LITERALZ SS$_UNWIND;  3O17.6.1.3B ConditionValuesinBLISS-36LO)In BLISS-36,a conditionvalueisasinglefullwordvalueLOthatisencodedwiththreeprimaryfields (proceedingfromSOloworderto highorder):*aseverityfieldof3bits,anidentity[O3fieldof29bits,andafieldof4bitsthatisreservedforfutureOuse.D  NO(Notethat,inthe following descriptions,bit positionsareJO expressedin accordancewiththeBLISS bit-numberingcon-TO5vention:*bit0isthe low-orderor rightmostbitandbit35is.Othe high-orderorleftmostbit.) SOTheidentityfieldisitselfdividedintotwomajorfields:+theBOmessagenumberfieldandthefacilitycodefield. iSOThe15 low-orderbitsoftheidentityfield(bits3through17MOofthe conditionvalue)arethemessagenumberfield.+ThisQO5field identifiesthespecific conditionforthesignal.)MessageNOnumberswiththe high-orderbit(bit17)cleararereserved*OforDIGITAL-supplied software. WQOThe14 high-orderbitsoftheidentityfield(bits18throughPO31ofthe conditionvalue)arethefacilitycode.-ThisfieldNO5 identifiesthespecificsoftware componentinwhichthesig-MOnalis generated.,The high-orderbit(bit31) distinguishesNODIGITAL-suppliedsoftware facilities(bitsetto0)andnon-:O>DIGITAL-supplied facilities(bitsetto1). NIO Conditionvaluesdefinedfor applicationusemustalwaysSOhavebothbits17and31setto1inordertoavoidconflict(O5withDIGITAL-definedvalues. MOThefour high-orderbits(bits32through35)arereserved;Oforfutureuseandshouldbesettozero.] i3OOThe following declarationscanbeusedtoaccessthevarious6OfieldsoftheBLISS-36 conditionvalue:Oa FIELD CONDIT_FIELDS%= z SET;z9 STS$V_SEVERITY&=% [0,0,3,0],p!%Severity%field9z STS$V_SUCCESSK=% [0,0,1,0],p!%Success%field% !% (subfield&of& severity);z STS$V_COND_IDK=% [0,3,29,0],K!%Identity%fieldAzY STS$V_MSG_NOp=% [0,3,15,0],K!%Message%number%fieldCz STS$V_FAC_SPp=% [0,17,1,0],K!%Facility%specific%flagCz STS$V_CODE=% [0,3,14,0],K!%Code%for% condition&only:z0 STS$V_FAC_NOp=% [0,18,14,0],&!%Facility%codeFzx STS$V_CUST_DEF&=% [0,31,1,0]p!%Customer% definition%flagz TES;O MACRO@P CONDITION_VALUE&=%BLOCK[1]%FIELD(CONDIT_FIELDS)%%; :IOThe followingliteral-declarationcanbeusedtodeclareSOnamesforthecodesusedfortheseverityfieldofa conditionO5value:O LITERAL* STS$K_WARNING&=%0,K!%Warning9I STS$K_SUCCESS&=%1,K!% Successful% Completion& STS$K_ERROR%=&2,K!&Error+ STS$K_INFO&=%3,K!% Information/! STS$K_SEVERE%=%4;J!%Severe%ErrorC ! SOObservethatthesecodesarechosensothattestingofthelowVOorderbitoftheseverityfieldwill distinguisha successfulcon-SO5dition(lowbitequalto1)froman unsuccessful condition(lowObitequalto0).  l IOAs an aid tocreating a conditionvalue,!the following2Okeyword-macro- declarationisuseful:Oa KEYWORDMACRO STS$VALUE&(Cz SEVERITY&=% STS$K_SEVERE,!%default%is%severe%errorz9 CODE,9 !%no%defaultz FAC_SP%=&1^17,, !%default%is%facility%specificz FAC_NO%=&0, !% arbitrary&defaultz CUST_DEF&=%1^31)%=* !%default%is%user& definition$Y (SEVERITY%AND&$O'7')%OR& (CODE%AND% %O'37777')^3&OR (IF%FAC_SP&NEQ%00 THEN%1^17x ELSE%0)%OR) (FAC_NO&AND% %O'37777')^18&OR (IF%CUST_DEF%NEQ&0P THEN&1^31 ELSE&0) z %; f zbJO Comparingtwo conditionvaluesto determineiftheyrep-NOresentthesame conditiontakesseveralsteps.)The following0O5macroisusefulforthispurpose:O MACRO STS$MATCH(A,B)=zI BEGINz LOCAL" QQQQA:%CONDITION_VALUE,"! QQQQB:%CONDITION_VALUE;zi QQQQA&=%(A);z QQQQB&=%(B);Cz IF&NOT%(.QQQQA[STS$V_FAC_SP]%OR%.QQQQB[STS$V_FAC_SP])zA THEN5 .QQQQA[STS$V_CODE]%EQL&.QQQQB[STS$V_CODE]z ELSE; .QQQQA[STS$V_COND_ID]%EQL&.QQQQB[STS$V_COND_ID]za END%%; rKOThemacroreturnstrueiftwogiven conditionvaluesare'Oequalandfalse otherwise.V s,NOThe CHF-defined conditionvalueneededinordertotestforOOanunwindsignalisprovidedasagloballiteralvalue.+TheQO5 following declarationcanbeusedtodeclarethenameofthisOliteral:O EXTERNAL%LITERALZ SS$UNW; ! `U.O17.6.2CARecursive-DescentParserQO4Arecursive-descentparserisaparserinwhichthereisgen-HOerallya one-to-onecorrespondencebetweenthe syntacticNOrulesofthelanguageandroutinesthatparse constructsofPO=the language.&Eachroutineisdesignedtoprocessonesyntac-OOticnameandcallsotherroutinestoparse non-literalpartsQOofthe syntacticrule.(TheBLISSlanguageisanexampleofaPOGlanguagethatissuitableforthiskindofparsing technique.  OOTobeginthisexample,assumethatthe followingtwosyntac-AOticrulesarepartofalanguagetobeparsed. 7O if-statementIF expressionTHEN statementO expression b8 bk< b:nameFname+ expression( expression) 69 6k= 6;G  IOFurther,assumethataroutinenamedREAD_LEXisavail-QOablethatreadstheinputfortheparser, identifiesthenextQO5lexeme,andassignsacodeforthekindoflexemetoadataGOsegmentnamedLEXTYPE.(Thisdatasegmentmustbede-NOclaredwiththeVOLATILE attributebecause,aswillbeseenQO>later,itscontentsmaybechangedbyahandler routine.)'TheLO followingnamesoflexicalcodesareusedintheexample:f < OONameofCodeUsage OObLEX_IFbKeywordIFOLEX_THENKeywordTHENOVLEX_NAMEVAnameOLEX_PLUSPlusoperator``+''.OI LEX_LPARENLeft parenthesis``(''/O LEX_RPARENRight parenthesis``)'' O oQOTheactualvaluesforthecodesarenot importantsolongasOtheyare distinct. mQOAroutinetoparsean if-statementcanbewrittenasfollows:#O ROUTINE&SIF:%NOVALUE%=P BEGIN READ_LEX(); SEXPRESSION();%( IF%.LEXTYPE%NEQ&LEX_THENp THENz BEGIN#z ERROR& ('Missing%THEN');zH RETURNz END; READ_LEX();  SSTATEMENT();h END; ! NOInthisroutine,theIFlexemeis recognizedbysomeotherFOparseroutine, whichthencallsSIF.SIFcallsREAD_FO5LEXtogetthenextlexemeintheinputstreamandDOthencalls SEXPRESSIONtoparsean expression.,WhenMO SEXPRESSIONreturns,thecodeforthefirstlexemenotac-RO>ceptedaspartofan expressionisstill containedinLEXTYPE.EONextSIF determineswhetherthatlexemeisthekey-LOwordTHEN.Ifnot,anerrorisreportedandSIFreturns.HOH Otherwise,READ_LEXisagaincalledtogetanewlex-JOeme, SSTATEMENTiscalledtoparsea statement,andSIFOreturns. NMOTheroutineSIF illustratestheclosecorrespondencebetweenLOthe syntacticruleforthe if-statementandthecodethat!O5performstheparsing.u ! [ KOOThecodetoparsean expressionismore complicated,butisHObasedonthesamekindofcorrespondence.+However,theNO5nameoftheroutinegivennext,whichdoestheparsingforFOan expression,is SEXPRESSION1insteadof SEXPRESSION.TOThereasonforthisis discussedlater.&Thecodeisasfollows:Ok LITERAL. EXP_ERROR&=%STS$VALUE(CODE%=%1);,O ROUTINE& SEXPRESSION1:%NOVALUE%=d BEGIN! SELECTONE&.LEXTYPE&OF z SETz; [LEX_LPAREN]: BEGIN READ_LEX(); SEXPRESSION1();[ READ_LEX();' IF%.LEXTYPE%NEQ% LEX_RPAREN THEN3 BEGIN"{ ERROR('Missing%")"')%; SIGNAL(EXP_ERROR)  END;S END; [LEX_NAME]:4 BEGIN4+ READ_LEX();%4s IF%.LEXTYPE%EQL&LEX_PLUS4 THEN BEGINK READ_LEX(); SEXPRESSION1(); END;4" END;j [OTHERWISE]:'4 ERROR('Missing% expression'); TES; B END;  eTOAn importantaspectofthisroutineisthatit recursivelycallsOitself.? sCOConsiderwhatmighthappenif SEXPRESSION1hasre-NOcursedseverallevelswhenanerroris detected.)ThiswouldNO5happen,forexample,forthe followinginvalidinputforanO expression:O (+Y+((Z(+Q)) TZ ^ hOOTheleft parenthesismarkedbythe circumflex( ^ )istheNOpointoferror(aleft parenthesiswherethereshouldbeaJO5right parenthesis).)Atthispoint SEXPRESSION1hascalledOOitselfthreetimes.+TheproblemishowtoproceedaftertheROerrorina reasonableway.(Onesimplestrategyistostopex-LO>pressionparsing,discardany subsequentlexemesthatcouldRObepartofan expression,andthenreturntotheroutinethatBOcalledfor expressionparsinginthefirstplace.  GOAmeanstodothisusing conditionhandlingisshownGOin the following pair of routines.3The first routine,GO5 SEXPRESSION,isthe establisherroutine.+Theonlypur-IOposeof SEXPRESSIONisto establishthesecondroutine,DO SEXP_ERROR,asahandlerandthencall SEXPRESSION1PO>todotheactual expressionparsing.(TheroutinesarewrittenOasfollows:+O ROUTINE& SEXPRESSION:%NOVALUE&=d BEGIN ENABLE& SEXP_ERROR; SEXPRESSION1();; END;3O ROUTINE&SEXP_ERROR(SIG,%MECH,%ENAB)%= BEGIN 5 MAPz| SIG:%REF&VECTOR; BIND,z  COND%=%SIG[1]:&CONDITION_VALUE;;v !%Resignal%all%but& EXP_ERROR,%ignore&unwind/ IF%NOT&STS$MATCH(.COND,% EXP_ERROR)' THEN%RETURN%0;I !%Skip&all%lexemes&that%can&be&part%of%an% expression,* !%Stop&on&any%other%lexeme.  WHILE"zh (SELECTONE%.LEXTYPE%OF z SET>z [LEX_LPAREN,% LEX_RPAREN,% LEX_NAME,% LEX_PLUS]:%1;z@ [OTHERWISE]:%0;z TES) DOz READ_LEX();_ SETUNWIND(); RETURN&0 END;  mCOThecodingfor SEXP_ERRORfollowsthetemplatefor(O conditionhandlersgivenin9Section17.4.2,Fbutis simplifiedOO5becausenotallofthe parametersareused.)Thecodingalso/Oassumesthe declarationsgiveninSection17.6.1for accessingO conditionvalues.* 9?h * P?   NKOIf SEXPRESSION1callsSIGNAL,thenCHFskipsoverallofLOthecallsto SEXPRESSION1sincenohandleris established,!O5andcalls SEXP_ERROR.~ ! tTKO SEXP_ERRORfirsttestswhetherthe conditionvalueisthePOoneforan expressionerror.+Ifnot,then resignalingisre-OO5quested.(ThesamecodingalsocausesanunwindsignaltobeTOignored.*ItisvalidinthiscasenottoassignareturnvalueLOforthe establisherroutineinthe mechanismvectorduringFO> unwindingbecausethe establisherroutine, SEXPRESSION,QOdoesnotreturnavalue.)Ifthe conditionvaluedoesindicateIOan expressionerror,thentheWHILEloopcauseslexemesMOHthatcouldbepartofthe erroneous expressiontobereadGOandignored.*(RecallthatcallingREAD_LEXchangestheLOcontentsofLEXTYPE.Becausethischangeresultsfromexe-MORcutionofahandlerroutine,LEXTYPEmustbedeclaredwithEOtheVOLATILE attribute.)*Finally, SETUNWINDiscalledNOtocauseallofthecallsto SEXPRESSION1andthecallto*O[ SEXPRESSIONtobe terminated.v ! VL*O17.6.3C Performance MeasurementOO4Insomecases conditionhandlingis convenientfor conductingJOcertainkindsof performance measurement.)Thisispartic-MOularlytruewhentheanalysistobe performedinvolvesthe NOItmayalsobeprudenttomodifythemainroutinetohaveOOahandlerforthesignalfromRaswell.+ThishandlerwillSO5becalledifRsignalswhenC1orC2isnotinthestackof$O executingroutinecalls. OOObservethatwiththis arrangement,ifC1callsC2callsR,BOthenthehandlerforC2willbetheonecalled.W -QOItis,ofcourse,possibletogetthesame frequencydatabyIO modifyingtheroutinestosetandtestvariouscountersQO5andflags directly.*But,incasessuchasthisone, conditionBOhandlingmaywellbesimplerandmore convenient. FO17.6.4CTarget OperatingSystemsand ConditionHandlingKO4Target operatingsystemsupportanduseof conditionhan-FOdlingis discussedbrieflyinthe following sections. .O17.6.4.1BPDP-11 OperatingSystemsGO)In BLISS-16,PDP-11 operatingsystems generallydonotMOsupport conditionhandlingas describedinthismanual,norMOdotheyuse conditionhandlingintheirinternal operation.MO3 ConditionhandlingforBLISS-16is supportedbytheCHFin+OtheBLISS-16Run-TimeLibrary. l/O17.6.4.2BTheVMS OperatingSystemNO)In BLISS-32, conditionhandlingisdirectly supportedbytheKO conditionhandling facilitiesoftheVMS operatingsystem.LOTheVMSsystemuses conditionhandlinginseveralwaystoIO3achievemodularsoftware componentsthatcanbeflexiblyOused.  dLO Conditionhandlingplaysacentralrolein reportingerrorLO messages.*Allerror conditionsaresignaledusing conditionMO5valuesand additional parametersthatencodetheerrormes-MOsagetobe reported.*WhenDCLstartsauser'sprogram,itNO establishesitsownhandler,termedthecatchallhandler,inMO>astackframepriortothestackframeforthemainrou-ROtine.( Consequently,thecatchallhandlerwillbecalledforanyEOsignalsthatarenothandledbytheuser'sprogram. ! wNOThecatchallhandleris programmedto interpretthesystem'sLO conditionvaluesandoutputthe appropriateerror messages.QO5In addition,thecatchallhandler interpretstheseverityfieldOOasfollows:+Ifsevereerrorisgiven,thentheuserprogramLOimageis terminated; otherwise,thehandlerreturnstoCHFNO> requesting continuation.)Observethatifthesignalwasgen-KOeratedusing SIGNAL_STOP,theseveritywill necessarilybe'Osevereerror(seeSections17.3.2 andu 17.4.3.2).* ?N * u?   knOOThisdesignprovides considerable flexibilityinadaptingsys-KOtemsoftwaretovarious applications.-Ontheonehand,aKO5programthatdoesnot establishanyhandlerswillreceiveLOstandardsystemerror messages.(Ontheotherhand,apro-QOgramcan establishahandlerthatwillmodifysomeorallofPO>thesystem conditionvaluesinordertoprovidemessagesthatNOaremore appropriateto particulargroupsofusers.)Forex-OOample,inadatabaseinquiry applicationusedby nontechnicalPOHusers,a conditionvalueforasubtledisk allocationproblemOOcanbereplacedbya conditionvalueforamessagesuchasIO``System malfunction.,Pleasecallcomputer operationsforOR assistance.'')  $OTheVMSsystemprovides exceptionvectorsythatprovideaMOmeansto establishhandlersthatwillbecalledbeforeCHFOO5begins searchingthestackofroutinecallsforhandlersandIOforcertaincaseswhereCHF encountersaninvalidstackGOframe.*TheVMSDebuggermod" uleusesan exceptionvec-TO>torto establishahandlerto interceptsignalsforanalysisand%Oprogramtesting purposes.4  GOIncertainspecialcases,theFORTRANRun-TimeLibraryCO establishesahandlerbetweenthecommand processorLO5catchallhandlerandtheuser'smainprogramtodealwith4Ovarious conditionsspecifictoitself. ! WGOWhenreadingtheVMSmanuals concerning conditionhan-QOdling,observethattheVMSsoftwarecallsahandlerwithtwoKO5 parameters,thesignalvectorand mechanismvector,rather4Othanthree parametersas describedinSection17.4.2. TheMOBLISSsystemitselfprovidestheenablevector parameterin>O>additiontothetwoprovideddirectlybyVMS.* P?h   =O17.6.4.3BTOPS-10andTOPS-20 OperatingSystemsDO)In BLISS-36,theTOPS-10andTOPS-20 operatingsys-OOtems generallydonotsupport conditionhandlingas describedOOinthismanual,nordotheyuse conditionhandlingintheirLO3internal operation.( ConditionhandlingforBLISS-36issup-EOportedbytheCHFsoftwareintheBLISS-36Run-timeOLibrary.  e O 18.2Special!FeaturesKOThe precedingchaptersdescribe declarationsforthenamesQOofdata, structures, routines, conditions,boundvalues,lexicalJOB functions,andmacros.*Thischapter describestheremain-KOing declarationsofBLISS.These declarationsmakeuseofLOthegeneral declaration mechanismofBLISSforsomerather9OL specialized purposes.&Theyareasfollows: !  ` IThepsect-declaration,which specifiestherequiredprop-B(ertiesoftheprogramsectionsusedinaprogram ` JTheswitch-declaration,whichpermitsthe specificationof=compilerswitchesforanyblockofaprogram ` FThebuilt-in-declaration,whichmakes availablecertain=namesthatare predefinedbutnot predeclared `W HWThelabel-declaration,whichisusedin connectionwiththeexit-expressions `/ F/Theundeclare-declaration,whichcancelstheeffectof@anyotherkindof declarationforagivennameTI 8 O switches-O0 declaration"SWITCHES switch-item,*... ;O$ switch-item P8 <  :Duon-off-switch-itemDspecial-switch-item P9 =  ;Oon-off-switch-item d8 < 4:DERRS!|!NOERRS!DjOPTIMIZE"|! NOOPTIMIZEDSAFE!|!NOSAFEDUNAMES!|!NOUNAMESDRZIP!|!NOZIP d9 = 4;O4special-switch-Oitem w8 > W> < /> >  :DADDRESSING_MODEy (mode-spec,%... )#D.LANGUAGE(language-list)!D|LINKAGE(linkage-name)DLIST (list-option,... )D STRUCTURE!id({structure-attribute}) {nothing} w9 > W> = /> >  ; /K(K32OnlyOi  language-list G 8  <  :DE COMMOND  language-name, ...D nothing G 9  =  ;:O+  language-name{BLISS16!|!BLISS32"|!BLISS36}O  linkage-namenameJJ   Of list-option 8 > > W< > 7> :DSOURCE"|!NOSOURCED3REQUIRE!|! NOREQUIREDEXPAND!|!NOEXPANDDTRACE!|!NOTRACEDLIBRARY!|! NOLIBRARYDiOBJECT"|!NOOBJECT!DASSEMBLY"|! NOASSEMBLY!DSYMBOLIC!|! NOSYMBOLICDQBINARY!|!NOBINARY%D COMMENTARY"|! NOCOMMENTARY M9 M> M> MW= M> M7> M;O32Only K)O mode-spec n9EXTERNAL=mode9; NONEXTERNAL=mode moO32Only K)OVmode :8 <  :DGENERALDaABSOLUTED LONG_RELATIVED WORD_RELATIVE :9 =  ;g@c ! w9"O18.1CPsect-DeclarationsMOUThepsect-declarationallowsyoutoinformthelinkeraboutOOthestoragecharacteristicsrequiredfor differentsectionsofQOyourprogram,andallowsyoutogroupvariouskindsofobject*O^codeinan efficientmanner. ! WQOYoucan,forexample,requestthatagivenprogramsectionbeNOwrite-protected(whichitnormallymightnotbe),orrequestNO5thatagivensectionbe allocatedinthesamememoryspaceOOasasectionbythesamenamefromanothermodule.(AlsoonOOsometargetsystemsyoucanrequestthatagivensectionbe7O> shareablebyseveral different processes.O %KOMostoftheprogramsectioncharacteristics,calledpsect-KO attributes,arevery target-system specific.+ Therefore,theOO5psect-declarationisingeneralnottransportable,althoughit@Ocanbeused transportablyinalimitedfashion.  WOOApsect-declarationcanbeusedtoallowaBLISSprogramtoLOsharedatawithaprogramwritteninanother language.(InNO5theVAX environment,forexample,anotheruseofthepsect-KO declarationallowsasetofmodulestosharea workspaceROwhosesizeis determinedbythelinker,basedontheneedsof5O>the particularsetofmodulespresent.E  ROApsect-declarationcanalsobeusedtoprovideasecondlevelPOofcontroloverprogram organization.(Thefirstlevelofcon-PO5trolis specifiedbythedivisionofaprogramintomodules.QOAsecondlevelofcontrolis sometimes necessaryifthedivi-LOsionintomodules(andthedefaultprogram sections,wherePO> supplied)doesnotbyitselfprovidethebest organizationofwhichcanbe executed. ! NMOBLISSisunusualifnotuniqueamong higher-level languagesNOin providingthekindofstorage-allocationcontrol permitted%O5bythepsect-declaration.B O18.1.1CSyntax  Opsect-declarationPSECT psect-item,S... ;O] psect-item&] storage-class= psect-name )8 < :cN(psect-attribute,N... N)cnothing G)9 G= G;O storage-class =8 <  : -OWN-CGLOBAL-PLIT-CODE-+ NODEFAULT =9 =  ;O$ psect-name$nameOpsect-attribute D8 > < > :->WRITE!|!NOWRITE-EXECUTE!|" NOEXECUTE!-OVERLAY!|! CONCATENATE-&b16-psect-attribute-tb32-psect-attribute-b36-psect-attribute +D9 +> += +> +; (g16Only ;(g;32Only (g36OnlyO 16Only K )1) b16-psect-attribute{LOCAL"|!GLOBAL}O 32Only K )& b32-psect-attribute p 8  > H <  >  :-C READ!|"NOREAD- SHARE!|!NOSHARE- PIC!|!NOPIC-+ LOCAL!|!GLOBAL-y VECTOR- alignment-attribute#- addressing-mode-attribute p 9  > H =  >  ;O 36Only K )Ub36-psect-attribute 98 <  :-^READ!|"NOREAD$-ORIGIN(address-expression) 99 =  ;Oaddress-expression compile-time-constant- expression5OThealignment-attributeis describedinSection9.5andthe6Oaddressing-mode-attributeis describedinASection9.13.* O}?* A?3  `O18.1.2C RestrictionsOO4Inthe definitionofthepsect-attribute,most attributesareFOgiveninmutually exclusivepairs:)WRITEandNOWRITE,=OOVERLAYand CONCATENATE,andsoon.-Youcan-NO=notusebothmembersofsuchapairin declaringasingleGO psect-name.'Thealignment-attribute,theaddressing-mode-NO attribute,andtheORIGIN attributearenotmembersofsuchOGpairs.> KOAll declarationsofagiven psect-nameinaprogrammustNOprovidethesamesetofpsect-attributesforthename.)ThisOO5 restrictionisappliedafteranymissing attributeshavebeen,Osuppliedbythedefaultrules. OBLISS-32ONLYGO4Thevalueoftheboundary expressioninan alignment-JO attributeforaprogramsectionmustbeintherange0Othrough9.* MOThevalueofthatboundary expressionmustnotbeexceededKObythevalueoftheboundary expressioninan alignment-PO5 attributeforanydatasegmentthatis allocatedinthepro-Ogramsection. OBLISS-36ONLYIO4A psect-namemustbeuniqueamongallother psect-names.Owithinitsfirstsix characters.$  GOIfa declarationofa psect-nameotherthan$LOW$orOO$HIGH$appearsinamodule,thefirst(oronly)suchdecla-LO5rationmustappearbeforeanydata-orroutine-declarationsMO(otherthantheexternalorforwardforms),andbeforeanyLO expression containingaPLIT.Thatis,itmustappearbe-UO>forethefirst declarationthatcausesstoragetobe allocatedor*Oobjectcodetobe generated.  MOThevalueoftheaddress-expressionintheORIGIN attribute-Omustbeintherange0to(2 9**18)-1 inclusive.D O18.1.3CDefaults f JOBLISS-16ONLYKO4The followingpsect-declarationisassumedtoappearina/Oblockthat surroundseachmodule:O PSECT=Y OWN=%$OWN$$(WRITE,NOEXECUTE,CONCATENATE,LOCAL),C GLOBAL&=%$GLOBAL$K$(WRITE,NOEXECUTE,CONCATENATE,LOCAL),A PLITp=%$PLIT$&(NOWRITE,NOEXECUTE,CONCATENATE,LOCAL),?1 CODEp=%$CODE$$(NOWRITE,EXECUTE,CONCATENATE,LOCAL);+ ! NOThis declarationprovidesadefaultprogramsectionnameforLOeachofthefourstorage-classes.+Thepsect-attributesusedSO5arethedefaultpsect-attributesthataregiveninthe followingO paragraph. NIOIfa psect-itemcontainsa parenthesizedlistofpsect-TO attributes,thenanymissing attributesarefilledinbydefault.*O5Thedefaultsareasfollows:= W OO AttributeDefault OObWRITE"|"NOWRITEbWRITEOEXECUTE!|! NOEXECUTE" NOEXECUTE(EXECUTEfor)CODE).OOVERLAY"|" CONCATENATE CONCATENATEOLOCAL!|!GLOBALLOCAL O8 f OBLISS-32ONLYKO4The followingpsect-declarationisassumedtoappearina/Oblockthat surroundseachmodule:O PSECTY OWN=%$OWN$(?Y (READ,WRITE,NOEXECUTE,NOSHARE,+d !NOPIC,CONCATENATE,LOCAL,ALIGN(2),*d ADDRESSING_MODE(WORD_RELATIVE)),=1 GLOBAL&=%$GLOBAL$(READ,WRITE,NOEXECUTE,NOSHARE,+dy !NOPIC,CONCATENATE,LOCAL,ALIGN(2),*d ADDRESSING_MODE(WORD_RELATIVE)),  PLITp=%$PLIT$*?  (READ,NOWRITE,NOEXECUTE,NOSHARE,+dQ !NOPIC,CONCATENATE,LOCAL,ALIGN(2),*d ADDRESSING_MODE(WORD_RELATIVE)), CODEp=%$CODE$(? (READ,NOWRITE,EXECUTE,NOSHARE,+d) !NOPIC,CONCATENATE,LOCAL,ALIGN(2),*dq ADDRESSING_MODE(WORD_RELATIVE));+ ! NOThis declarationprovidesadefaultprogramsectionnameforLOeachofthefourstorage-classes.+Thepsect-attributesusedSO5arethedefaultpsect-attributesthataregiveninthe followingO paragraph. NIOIfa psect-itemcontainsa parenthesizedlistofpsect-TO attributes,thenanymissing attributesarefilledinbydefault.*O5Thedefaultsareasfollows:b ! S8 OO AttributeDefault OObREAD!|!NOREADbREADOWRITE"|"NOWRITE(WRITE(NOWRITEforPLITor)CODE)OEXECUTE!|! NOEXECUTE" NOEXECUTE(EXECUTEforCODE)OjSHARE!|!NOSHAREjNOSHAREOPIC!|!NOPICNOPIC.O^OVERLAY"|" CONCATENATE CONCATENATEOLOCAL!|!GLOBALLOCALOQalignment-attributeQALIGN(2)#Oaddressing-mode-attributeADDRESSING_MODE(WORD_ RELATIVE) O40  jOBLISS-36ONLYKO4The followingpsect-declarationisassumedtoappearina/Oblockthat surroundseachmodule:O PSECTY OWN=%$LOW$*Y (READ,WRITE,EXECUTE,CONCATENATE, ORIGIN(0)), GLOBAL&=%$LOW$* (READ,WRITE,EXECUTE,CONCATENATE,1 ORIGIN(0)),=y PLITp=%$HIGH$"(READ,NOWRITE,EXECUTE,CONCATENATE, ORIGIN(%O'400000')),=  CODEp=%$HIGH$"(READ,NOWRITE,EXECUTE,CONCATENATE,Q ORIGIN(%O'400000'));*! ! MOThis declarationprovidesadefaultprogram-sectionnameforLOeachofthefourstorage-classes.+Thepsect-attributesusedSO5arethedefaultpsect-attributesthataregiveninthe followingO paragraph." NIOIfa psect-itemcontainsa parenthesizedlistofpsect-TO attributes,thenanymissing attributesarefilledinbydefault.*O5Thedefaultsareasfollows:C# ! W OO AttributeDefault OObREAD!|!NOREADbREADOWRITE"|"NOWRITE(WRITE(NOWRITEforPLITor)CODE)OEXECUTE!|! NOEXECUTEEXECUTE.OOVERLAY"|" CONCATENATE CONCATENATE O8$ ! XVOThereisnodefaultfortheORIGIN attribute:&ifitisnotspec-MOified,thenthe correspondingprogram-sectionoriginmustbeOO5 specifiedatlinktime(/SET qualifieroftheLINK command).ROFurther,thereisnodefaultfortheaddress-expressionofthisO attribute.Z% ! 0SOIfa psect-itemdoesnotcontaina parenthesizedlistofpsect-PO attributesandifaprevious declarationofthe psect-nameisPO5giveninthemodule,thenthepsect-attributesaretakenfrom=Othefirst declarationofthesame psect-name.x& NO18.1.4C SemanticsFO4 NODEFAULTisaspecial storage-classwhichallowsthePO declarationofapsectwithout overridingcurrentdefaultsforIOOWN,GLOBAL,PLIT,orCODEdata;thus,thecurrentde-QO=faultsneednotbeeitherknownor restored.'Forexample,theNO following declarationsallowalongwordtobesharedbetween#OBLISS-32andVAXPL/I:Os PSECTO NODEFAULT&=%7PLI_DATA(ADDRESSING_MODE(ABSOLUTE),OVERLAY,READ,WRITE); O$ OWN'l PLI_DATA%:%PSECT(PLI_DATA);'  NROWiththelast declaration,PL/IwillexpectglobalandexternalROsymbolstobedeclaredinanoverlaidpsectofthesamename;QO5 moreover,ithasnotbeen necessaryto redeclarethe defaults.( ! vHOInthe following sections, the semanticsofthepsect-QO declarationaregiveninfourparts.'First,thestorage-classesPO5are described.'Next,theprogramsection attributesaregiven.OOThen, psect-namesandtheirscopeare discussed.'Finally,the>Ointerpretationofapsect-declarationisgiven.k) ! LA#O18.1.4.1BStorage-ClassesPO)The storage-classina psect-item determinesthekindofdataMOthatis allocatedinthe correspondingprogramsection.*TheQO followinglist indicatesthe declarationsor primariesthatare0O3 associatedwitheachstorage-class./*   O"O DeclarationorPrimary Storage-Class OObOWN declarations bOWNOGLOBAL declarationsGLOBALOVPLITsVPLIT;OROUTINEandGLOBALROUTINE declarationsCODE O+  WNOInotherwords,anydatasegments allocatedbythecompilerHOin processingOWN declarationsare allocatedinprogramLO5sectionsdeclaredforthe storage-classOWN;anydataseg-KOments allocatedin processingGLOBALdata declarationsareLO allocatedinprogramsectionsforthe storage-classGLOBAL;O>andsoon., $O18.1.4.2BPsect-AttributesKO)The following attributesofaprogramsectionprovidein-LO formationtothelinkeraboutthewaytheprogramsection-Oshouldbe allocatedinstorage:9- OREAD+|+NOREAD 3(32/36OnlyO]WRITE,|+NOWRITEOEXECUTE+|+ NOEXECUTE!OPOVERLAY,|+ CONCATENATEOSHARE+|+NOSHARE 3(32OnlyODPIC+|+NOPIC 3D(D32OnlyOLOCAL+|+GLOBAL 3(16/32OnlyO7VECTOR 37(732OnlyOALIGN(boundary) 3(32OnlyO+ADDRESSING_MODE(mode) 3+(+32OnlyOORIGIN(address) 3(36Only. ! AOTheREAD,WRITE,andEXECUTE attributes determineNOwhichkindsofaccesstotheprogramsectionare permitted.MO5Basedonthese attributes,thelinker establishesthehard-DOwarememory-managementaccesscontrolneededfortheNOstorageoftheprogramsection,assumingthatatargetsys-HO>tem'shardware/software environmentdoesinfactprovideROtherequired facilities.((Thatis,fortransportability purposes,RO attributes designatedforagivensystemthathaveno effectiveMOHmeaninginanotherareallowedinthe correspondingdialect,Obecausetheywillbe ignored.)/ ! WHOTheOVERLAY attributecausesprogramsectionsthathaveMOthesamenamebutcomefrom differentmodulestobeallo-HO5catedinthesamestorage(likeFORTRANCOMMONblocks,COfor example).+The CONCATENATE attributecausespro-MOgramsectionswiththesamenamefrom differentmodulestoDO>be allocated contiguously,eachinitsownstorage. 0 ! O BLISS-16/32ONLYGO4TheLOCALandGLOBAL attributesprovide indicatorsforJOthe target-systemlinker,whichusestheminthealloca-KOtionand managementofphysicalmemoryforaprogram.'InNO> BLISS-16,these indicatorsdirectthe constructionofprogramPO overlays.'In BLISS-32,these indicatorsdirectthegroupingofNOpageswithinaprogramimagesoastooptimize performance.1 OBLISS-32ONLYLO4TheSHARE attribute specifiesthattheprogramsectioncan5Obeaccessedbymorethanoneprocess.2 NLOThePIC(position-independentcode) attribute indicatesthatLOtheprogramsectioncanbe relocatedwithout affectingitsO5 validity.g3 ! =KOThealignment-attributecausesthestoragefortheprogramROsectiontobeginwithabytewhoseaddressendswithatleastUO5nzerobits,wherenisthevalueoftheboundary expressioninNOthealignment-attribute.(This attributealsocausesthestor-ROagefortheprogramsectiontobe extended,if necessary,withVO>unusedbytesuntilitslastbyteisjustbeforeabytewhosead-POdressendswithatleastnzerobits.,Thus,forexample,anJOALIGN(1) attributecausesaprogramsectiontobeginandHOHendatword boundaries,anALIGN(2)atlongwordbound-POaries,andsoon.&Thealignment-attributeisfurther described OinSection9.5.*3 |?4 EOTheaddressing-mode-attribute determinesthe addressingKOmodeforeachdatasegment allocatedintheprogramsec-LO5tion..The significanceofthe addressingmodeisgiveninOSection9.13.*4 OP?35  IOTheVECTORpsect-attributecauses generationofanindi-POcationtothelinkerthattheprogramsectioncontainsentry-MO5pointvector informationforaVMS privilegedsharedimage,NOusedinthe constructionofsharedrun-time libraries.)(ThisMO attributeis analogoustotheVEC attributeinVAXMACRO.)6 ! OBLISS-36ONLYBO4TheORIGIN attribute specifiesthe machineaddressGOat which a program sectionis tostart.2Forexample,O ORIGIN(%O 'O400000 O'2)willcausethe correspondingpro-NO>gramsectiontostartatthestandard high-segment beginningROaddress,400000octal.(Notethattheuseofthis attributecanMOresultin unallocatedstorageleftbetweentwoprogramsec-POGtions,orin overlappingprogram sections.)ProperuseofthisSO attributemustbeguidedby familiaritywiththelinkerforthe'Otargetsystemin question.7 ! WJOAcomplete understandingoftheprogram-section attributesPOrequires knowledgeofthewaystorageisorcanbelaidoutRO5bythelinker.( Informationonthe allocationofstoragecanbeLOfoundinthe appropriatelinker(or task-builder) referenceOOmanualforthetargetsystem.'Seealsothe appropriateBLISS5O>usermanualfor additional information.8  rO18.1.4.3B Psect-NamesKO)A psect-nameis interpretedbythelinkerandis,neces-POsarily,globaltoamodule.,Thefirst declarationofagivenKO psect-namewithinamoduleservestwo purposes.+First,itOO3 establishesthenameanddefinesthe attributesforthepro-OOgramsection associatedwiththatnameforthescopeoftheLOmodule.,Second,thefirst declarationofagivennamees-HO< tablishestheprogramsection associatedwiththatnameOOasthecurrentprogramsectionforthestorageclassintheJOscopeinwhichitis declared.*Thus,unlessa NODEFAULTOOFstorageclassisusedtopreventanoverrideofthedefaultJO attributes, subsequent declarationsofthe psect-namewillQOserveonlythesecondpurpose,whichisto establishthecur-OOPrentprogramsectionforastorage-class.)All declarationsofIOa particular psect-namewithinamodulemustbeequiva-QOlent.(Psect-declarationsare equivalentifoneofthe followingOYapplies:9   ` ,The declarationsare identical. `O MOThe declarationshavethesamesetof attributesaftertheCmissing attributeshavebeenfilledinbydefault. `' I'Thesecondofthetwo declarationshasno parenthesizedTlistof attributes.'(Inthiscase,the attributesfromthefirst< declarationapplytothesecond declaration.): ! "O18.1.4.4BInterpretationPO)Everyuseofthesame psect-nameinaprogramreferstotheOOsameprogramsection.'Apsect-declarationnotonlystates(orQO restates)thepsect-attributesforagivenprogramsection,butQO3alsoselectsthatprogramsectionforusewithinthescopeof9Othe declarationforagivenstorage-class.;  #O18.1.5C DiscussionPO4Thesimplestwaytoensurethatall declarationsofapsect-OOnameinagivenmoduleare equivalentistousethesimpleQOformofapsect-declaration,inwhichno parenthesizedlistofRO= attributesisgiven,forallpsect-declarationsexceptthefirst;Oone.'Considerthe followingprogramsegment:O BEGINOc ROUTINE&S= BEGIN* PSECT%OWN&=%ALPHA% (NOWRITE);: OWN&S1;  ...  ENDO OWN%A,%B;OZ PSECT%OWN%=%BETA;O OWN%C; O ...O2 PSECT%OWN%=%ALPHA;Oz OWN%D; O ... O  ENDo< f EKOThefirst declarationofthe psect-nameALPHAdefinesthePOnameand establishesits attributes;in BLISS-32,forexample,*O5thecodecanbeasfollows:MO READ,%NOWRITE,% NOEXECUTE,&NOSHARE,&NOPIC,% CONCATENATE,%LOCAL,3O ALIGN(2),%ADDRESSING_MODE(WORD_RELATIVE)=  IOTheNOWRITE attributeisgiven explicitlyinthepsect-LO declarationandtheother attributesare determinedbyde-JO5fault.(The subsequent declarationofthe psect-nameALPHASOdoesnothavea parenthesizedlistof attributes; therefore,thePOlist associatedwiththeprevious declarationisassumed.(NoteRO>thatgivingthese declarationsintheoppositeorderresultsinOanerror.@>  }HODataandroutinesfrom differentstorage-classescanbeMO allocatedinthesameprogramsectionbymeansoftheap-KO5 propriatepsect-declarations.*Forexample,supposethatallPOPLITsforagivenmodulemustbe allocatedinthesamepro-OOgramsectionthatisusedfortheobjectcodefor routines.MO>Thenthe following declarationcanbewrittenintheouter!Oblockofthemodule:O PSECTd PLIT%=&$CODE$;? NGOThis declaration overridesthedefaultpsect-declarationJOforthePLITstorage-class,which allocatesPLITsinthe*O5programsectionnamed$PLIT$.@ MOSupposethe following declarationappearsinaninnerblock8Oofthemoduleintheprevious paragraph:Oa PSECT PLIT%=&$PLIT$;,A  OOWithintheblockinwhichthis declarationappear,PLITsareRO allocatedinthedefaultprogramsectionforPLITs,justasifJO5the declaration mentionedinthe preceding paragraphwereOnotpresent.k  wY"O18.4CLabel-DeclarationsSOUTheuseoflabelsisvery restrictedinBLISS.LabelsareusedOOonlytoidentifyablocksothataLEAVE expressioncanbeSOusedto terminatethe evaluationoftheblock.'WhenalabelisBO^used,itmustbedeclaredbyalabel-declaration.Bl O18.4.1CSyntaxm vo1Olabel-declarationLABEL label-name,... ;O] label-name]namen ! O18.4.2C SemanticsQO4Alabel declarationinformsthecompilerthatthenameslisted9Oareusedaslabelsinthecurrentblock.o zJOTheuseoflabelsis discussedin connectionwithexit-O expressionsinXSection6.6.*o X|?"  p ! )&O18.5CUndeclare-DeclarationsQOUAnundeclare-declarationisusedtolimitthescopeofadec-NO laration.'Anundeclare-declarationinaninnerblockpreventsMO referencestonamesdeclaredinouterblocks.(An undeclare-UO^ declarationmayalsobeusedinalibrarysourcefiletopreventHOanamefrombeingenteredintothe precompiledlibraryObinaryfile(seerSection16.6).*p r? q >OAnexampleofanundeclare-declarationfollows:O BEGINOP OWN%A,B,C; O ...O BEGINO( UNDECLARE%A,C; Op ... O END O ENDr  NNOIntheinnerblock,thenameB designatestheOWNvariablePOdeclaredintheouterblock,butthenamesAandChavenoO5meaning.Bs O18.5.1CSyntaxt O undeclare-O0 declaration' UNDECLAREundeclared-name,*... ;Oundeclared-nameonameu O18.5.2C SemanticsGO4Anundeclare-declarationinformsthecompilerthateachKO undeclared-nameinthelisthasnodeclaredmeaningfor.Othescopeofthecurrentblock.v MOAnamethatis undeclaredmaybe subsequentlydeclaredforEOsomeotherusewithinthescopeofthe declaration.w NOOAnamethatis undeclaredattheendofalibrarycompila-SOtionisnotenteredinthelibrarybinaryfileproducedbytheO5 compiler.'x O18.5.3C PragmaticsKO4Inorderto redeclarea macro-nameitmustbe ``quoted''5Ousingthelexicalfunction%QUOTE(seeSection 15.5.14).NO Effectivelythisinhibits expansionofthe macro-nameattheLO=pointofredeclaration.)Forexample,to undeclarethenameDOZYXdeclaredasa macro-name elsewhereinthesameGOmodule,the followingformof declarationis required: Os UNDECLAREK%QUOTE%ZYX*x O? y iJOThis requirementappliestoanyother redeclarationofaO macro-nameaswell.cpz ! F%O 19.2Modules!and!ProgramsKOThischapter describesmodulesand programs.&Nonewfunc-ROtional capabilityis introducedhere;instead,thewayinwhichOOBaprogram interfaceswiththecompilerin particularandthe5Otargetsystemingeneralis described.{  WMOThischapterhasfour sections.+Thefirstsection describesMOmodulesinageneralway.(Thesecondsection completestheLO5 descriptionofmodulesbydefiningthemodule-switches.(TheLOthirdsection describesthe predefinednames,whichprovideIOoneformof connectionbetweenprogramsandthesystem.4O>Thefourthsection describes programs.cr|  HO19.1CModulesOOUThemoduleisthe compilationunitofBLISS.EachmoduleisLOcompleteforpurposesof compilation.)However,amoduleisOOusually incompleteforpurposesof executionbecauseitoftenKO^dependson informationsuppliedbytheothermoduleswithLOwhichitislinkedtoformaprogram.*TheuseofGLOBALHOandEXTERNAL declarationsallowsthesepointsofcommu-SOhnicationtobe identifiedsothattheir resolutioncanoccuratOlinktime.} ! POThedivisionofaprogramintomoduleshelpsdefinethefun-GOdamental organizationoftheprogram., DeclarationsthatKO5havesomepropertyincommoncanbegroupedintoasin-IOglemodule.,Forexample,iftworoutine-declarationsareKOalwaysused together,thengroupingtheminamoduleen-NO>suresthattheyare allocated together.(Foranotherexample,NOifsome declarationsaresubjecttochangewhenanewver-OOsionoftheprogramis produced,thengroupingthemtogetherPOHinamodulemakesitpossibletochangetheprogrambyonly)O recompilingasinglemodule.~ ^6OAnexampleofamoduleisasfollows:2O MODULE%COMPOOL%(IDENT%=% '000015')%=OP BEGINO GLOBAL%LITERAL BUFSIZ&=%226,( PAGESIZ%=&132,$p FACTOR&=%33:& SIGNED(9);BO GLOBAL%BIND%X&=%PLIT%(0,1,2,3,4,5,6,7,8,9,10,11,12) :% VECTOR[13]; OH ENDO ELUDOM  }NOThismodulecontainstheconstant declarationsthatareused/Oinothermodulesoftheprogram. 3OAnotherexampleofamodulefollows:.O MODULE%STK&(IDENT%=& '000001')%=OP BEGIN"O OWN%STK:% VECTOR[1000];#O OWN%STKPTR:% INITIAL(0);O( EXTERNAL%ROUTINEp STKERR1, STKERR2;/O GLOBAL%ROUTINE%PUSH(X):%NOVALUE&=H BEGIN2 IF%.STKPTR%GEQ%1000%THEN& STKERR1();# STKPTR&=%.STKPTR%+&1;  STK[.STKPTR]&=%.X;h END;.O GLOBAL%ROUTINE%POP(X):&NOVALUE%= BEGIN/@ IF%.STKPTR%LSS%0%THEN& STKERR2(); .X%=%.STK[.STKPTR]; STKPTR&=% .STKPTR-1; END; O_ ENDO ELUDOM _HOThismodulecontainsbothdata-declarationsandroutine-O declarations.B O19.1.1CSyntaxl BOmodule bMODULE module-head=0 module-body~ELUDOMOq module-headb module-name 38 3< 3n:( module-switch,... S)nothing 9 = n;O module-nameXnameO module-bodyblock  O19.1.2C RestrictionsJO4A module-body's outermostlevelcancontainonlydeclara-SOtions;thatis,itmustbeasequenceof declarationswithinaJO BEGIN-ENDor parenthesispair.'Someofthese declarationsPO=canberoutine-declarations,andthesedefinetheactionsthat.Ocanbe performedbythemodule. ! tMOSome declarationsmustnotbegivenatthe outermostlevelJOofamodule,namely, declarationsof temporarydataseg-KO5mentsandlinkage-functions.(Thesearelocal-declarations(OSection10.5),$=stacklocal-declarations(Section10.6), register-O declarations(PSection10.7),'Fandbuilt-in-declarations(O>Section18.3)?0>thatgiveanyofthe predefinedregisternames O(Section10.7.4);oranyofthenamesoflinkage-functions(OSection13.6.)* OP?* P?* P?* O?c * Z?* O? M\O19.1.3C SemanticsAO4Amoduleprovidesthecompilerwiththreeitems: !  `  They module-name9y,whichisusedinsomecontextsbytheF(compilertoidentifytheobjectcodeforthemodule. `  Thex module-switches5,whichselectvariousoptionsofferedbythe compiler. `  The{ module-body5P,whichis translatedbythecompiler4fromBLISSintoanobjectcodefile.uW ! -O19.4CProgramsIOUAprogramismadeupofobjectmodulesthathavebeenOOlinkedtogethertoformasingle executableunit.*TheobjectMOmodulesthatmakeuptheprogramareproducedasaresultTO^ofthe translationofasourcemodulebyoneofthe translatorsGOinthesystem.-Forexample,theBLISScompilertrans-IOlatesBLISSmodulesintoobjectmodulesandtheFORTRANIOhcompiler translatesFORTRANprogramsintoobjectmodules.OOEach translatorproducesanobjectmodulewithauniformsetQOof indicatorsforthelinker.)Thelinkerusesthese indicatorsMOrtoallocatethemodulesandresolvepointsof communicationOamongthem.  ZNOConsideraprogramthatinputsvalues,sortsthem,andthenNOoutputsthesamevaluesinsortedorder.'ThisprogramcouldJO5consistofaFORTRANprogramtodo input/outputandthe$O followingBLISSmodules:.O MODULE%TREESORT%(IDENT&=%'0002')OZ BEGIN%O ROUTINE&EXCHANGE(F1,F2)%= ...;-O2 GLOBAL%ROUTINE%TREESORT(F1,F2)%=z ...; O ENDO  ELUDOMAOs MODULE%PROCESS%(IDENT%=% '0002',MAIN%=&PROCESS)&=O BEGINO EXTERNAL%ROUTINEK INPUT:&FORTRAN, OUTPUT:%FORTRAN, TREESORT;O# ROUTINE&PROCESS%=j BEGIN PSECT%OWN&=%ALPHA; OWN&A:& VECTOR[100];B INPUT(A); TREESORT(A,100); OUTPUT(A) END; Ob ENDO ELUDOM VOOThelinkerlinksthetwoobjectmodulesproducedbyaBLISSHOcompilerandtheFORTRANobjectmoduleproducedbytheIO5FORTRANcompilertoformasingleunit.)Then, executionPObeginsatthe specifiedpoint.+Inthiscase, executionbegins&OwiththeroutinePROCESS.J  e,O 20.2Character-Handling! Functions8OAmajorpartof computingisdevotedto characterhan-O dlingI;thatis,the manipulationof sequencesof characters.OOB CharacterhandlingisrequiredfortheinterpretationofuserKO commands,forthe preparationofoutput listings,fortheQO managementofsymboltables,fortheeditingoftext,andfor&OLthe maintenanceoffiles. ! a}NOThischapter describestheBLISS functionsthataredesignedHOfor character handling.,Someofthese functionsperformNO5abasic operation,suchas allocatingstorageforacharac-NOter sequence,orcreatingapointerthatcanmovebackandPOforththrougha character sequence,orwriting(orreading)aOO> characteratagivenpositionina character sequence.(OtherKO functionsperforman operationonanentire characterse-NOquence,suchasmoving,copying, comparing,or searchingtheOH sequence.C ! SOThe functions describedinthischapterarepartofthesetof!O supplementary-functions#thatwas introducedin*Section5.2.PO5Acallononeofthese functionsusuallydoesnotproduceaOO subroutinecall;instead,itiscompiledintoafewhardwareLO instructionsthatare speciallydesignedfor characterhan-OO>dling.'These functionsprovideawayofusingthesehardwareFO instructionswithoutcausingaprogramtobemachine-IO dependent.+Aprogramthatusesthese functions correctlyFOH(andthatdoesnothavemachine dependence elsewhere)KOcanbe transportedwithoutchangetoanotherBLISStargetOsystem.* *}?  ! NTOThefirstsectionofthischapterpresentstheconceptsthatareNO necessaryfora discussionof character handling.'Thesecond@O5sectiondefinesthe characterhandling functions._F w%O20.1C FundamentalConceptsLOUA discussionofthe fundamentalconceptsof characterhan-QOdlingfollows.(First characterdatais described,andthentheJO operationsthatareappliedto characterdataaresumma-O^rized.  +O20.1.1C CharacterSequenceData O4A4 charactercode?4isasequenceofbitsthat representsachar-MOacter.+UsuallytheASCIIencodingof charactersisusedinLOBLISS.However,aslongasaprogrammakes consistentuseOO=ofagiven character encoding,itdoesnotmatterwhatthatOencodingis.  W OA characterposition<2isthestorageforasingle charactercode.POForagivenimplementationofBLISS,thesizeofa characterQO5positionis determinedbytwofactors:'the requirementsoftheLO charactersetandthe organizationofthecomputermemory.OOAprogramcanbewritteninawaythatdoesnotdependonPO>thespecific charactersizeusedbyaspecificimplementation.   OA' characterpositionsequence/isaportionofstoragethatisLOusedforoneormore character positions.+SuchasequenceWO5hasafirstandlast position.'Foreachpositionexceptthefirst,ROthereisaprevious position,andforeachpositionexceptthe.Olast,thereisanext position.  X OA" characterdatasegment.isa characterpositionsequenceROthatis allocatedasasingleportionofstorage.+Inthesim-SO5pler applicationsof character handling,itispossibletotreatOOeach characterdatasegmentasaseparateunit, allocatedinIOthesamewayotherdatasegmentsare.)InmoreadvancedKO> applications,asingle characterpositionsequencemayex-NOtendacrossseveraldatasegmentsandmaybe reorganizedas'Oprogram execution proceeds.  k OA characterpointer6isavaluethat designatesa characterNO position., Sometimesa characterpointerissettothefirstMO5 characterpositionofasequenceandremainsthere,provid-ROingaccesstotheentire sequence.(Inothercases,a characterROpointerisusedtoscanbackandforthina sequence,select-NO>ingonepositionafteranother.)A characterpointeroccupiesLOa fullword.+ItcanbemovedfromonefullwordtoanotherROorcanbepassedasa parameterofaroutine,likeanyotherJOHfullwordvalue.+However,a characterpointercanbecor-IOrectly interpretedonlybyacharacter-handling function.KOForexample,a characterpointermustbeadvancedbytheJORCH$PLUS function,notbytheplussign( + ) operator. W OA nullpointer?Pisareturnedvaluethat indicatestheabsenceQOofavalid characterpointer.)AnullpointerresultsfromtheNO5 unsuccessfulsearchforoneormore characterswithinase-MOquence.,ThepresenceofanullpointercanonlybetestedNOforbyaCH$FAIL function,andanullpointermustnotbe6O>passedtoanyother character function.O  % OThe lengthCofa characterpositionsequenceisthenumberofPO character positionsinthe sequence.'ThelengthofasequenceWO5isnotincludedaspartofthesequenceitself.(InordertofullyOOspecifya characterposition sequence,bothitslengthandaSOpointertoitsfirstpositionmustbegiven.) Typically,thepa-NO>rametersofthe characterhandling functionsoccurinpairs,.Oalengthfollowedbyapointer.  WHO Characterhandlingcanbe programmedontwolevels.)OnNOthesimplerlevel,allthedataisdividedinto independentLO5 characterdata segments,andthesegmentsare allocatedinHOtheusualwayforOWNorLOCAL segments.(Inmoread-NOvanced applications,datacanbe allocated dynamically,underO>programcontrol.t ! `J1O20.1.2C CharacterSequence OperationsJO4Thebasic operationsof characterhandlingare summarizedPOhere.(These operationsarethe allocatingofstorage,creatingQOofapointer,movingapointer,fetchingorstoringacharac-MO=tercode,and comparingof character sequences.(A characterPOdatasegmentis allocatedinaspecialway.* Specifically,thePOamountofstoragerequiredis expressedintermsof characterAOG positionsratherthan longwords,words,orbytes.P &KOA characterpointeriscreatedfromagivendatasegmentKOaddress.*Thedatasegmentmustbeonethatwas allocatedGO5asa charactersequencesegment.,The characterpointerIO designatesthefirst characterpositionofthe sequence. ! aPOA characterpointerthat designatesagiven characterpositionOOismovedforwardbychangingitto designatethenextchar-PO5acterpositionofthe sequence.( Similarly,a characterpointerKOismovedbackwardbychangingitto designatetheprevi-MOous characterpositionofthe sequence.*A characterpointerKO>shouldnotbemovedbeyondthe characterdatasegmentinROwhichit originatedunlessyouarequitesurewhatliesbeyondMOthatsegmentoryouintendtomoveitbackintothesame%OHsegmentbeforeusingit. NOThecontentsofa characterpositionmustalwaysbefetchedQOorstoredbymeansofa characterpointerthat designatestheMO5 character position.+In contrast,a characterpointercanbePOfetchedorstoredlikeanyotherfullwordvalue(bymeansofQOthefetchoperator( . )orthe assignmentoperator( = )). NHO Character sequencesand characterpointersmustbecom-IOparedonlybymeansofthe characterhandling functions'O5designedforthatpurpose.} O20.2C FunctionsMOUForthepurposeof definition,the characterhandlingfunc-AOtionsarearrangedineightclasses,asfollows:M U# Allocation functions(Pointer functions&Character-reading functions&Character-writing functions%2Sequence-writing functions'Sequence-comparing functions'Sequence-searching functions)<Sequence-translating functions cPOEachclassof functionsis describedinoneofthe followingO sections.O %JOThenameofeach characterhandlingfunctionconsistsofHOtheprefixCH$followedbyamnemonicname;forexam-EO5ple, CH$ALLOCATIONisthenameofthefunctionthatNOcomputesthestoragethatmustbe allocatedfora sequence.  'O20.2.1C Allocation FunctionsNO4The allocation functions determinetheamountofstoragere-EOquiredfor characterdata.(Thefunction CH$ALLOCATIONNOreturnsthenumberof fullwordsrequiredforagivennumberKO=of characters.(ThefunctionCH$SIZEreturnsthenumberof4Obitsrequiredforasingle character. B^O20.2.1.1B Definition@O)The allocation functionsaredefinedasfollows:M ##O CH$ALLOCATION(n,cs)" ! WO Interpret  nEasanunsignedinteger(thelengthofthe allocatedO sequence).) Interpret C cs2asanunsignedinteger(thecharac-NO5tersize).(Imaginea characterpositionsequencecomposedof O n: character positions,eachofwhichoccupies  csbits.)ReturnQOthenumberof fullwordsthatwouldberequiredforstorageof1O>sucha characterposition sequence.  "O Default charactersize4c.(Thecharacter-size parametercanbe8Oomitted;thatis,theformCH$ALLOCATION(  n)ispermit-TO5ted.)Inthiscase,thesystemdefaultforthe charactersizeisOusedfor  csC.)InBLISS-16andBLISS-32thisdefaultis8;in)O BLISS-36,thedefaultis7.D O CH$SIZE(ptr);  O Interpret  ptr?2asapointertoa characterposition sequence.NOReturnthe charactersizeforthe sequence;thatis,returnQO5thenumberofbitsoccupiedbyeach characterpositionoftheO sequence. N"O Default charactersize4e.(Thepointer parametercanbeomit-ROted;thatis,theformCH$SIZE( )is permitted.+Inthiscase,CO5thesystemdefaultfor charactersizeis returned. ^IOThe charactersize(cs)mustbea compile-timeconstantO expression. NEOThe CH$ALLOCATIONfunctionisa compile-timeconstantJO expressionifthelength parameter(n)isa compile-timeO5constant expression.  KOTheCH$SIZEfunctionisa compile-timeconstant expression:Oifthepointer parameter(ptr)isomitted.3   NOInBLISS-16and BLISS-32,afunctionthat specifiesachar-TOactersizeotherthan8isinvalid.)Thus,the charactersizeisHO5aconstantinBLISS-16and BLISS-32.*Whilethecharac-POtersizeinBLISS-36 variable,witharangeof1through36PObits,any departurefromthedefault7-bit charactersizeforMO>ASCII encodingsorthe6-bit charactersizefortheSIXBIT2Oencodingmustbeusedwithcaution.  gO20.2.1.2BExamplesGO)The CH$ALLOCATIONfunctionisnormallyusedwithintheDOVECTOR attribute.'Anexampleofthisusagefollows: O OWN)N S3:&VECTOR[CH$ALLOCATION(80)]; LOThis declaration allocatesa characterdatasegmentforS3;Othatiscomposedof80 character positions. ! aEOTheuseof CH$ALLOCATIONwithintheVECTOR attributeLOisawayof extendingtheBLISSlanguagetohandlechar-KO5acterdatawithoutmakingmajorchangesinthedesignofMOthe language.) Specifically,theuseoftheVECTOR attributeOOisawayof allocatingstoragefora characterpositionse-OO>quence.+Itfollowsthatstorage allocatedinthiswayshouldPOnotbeaccessedasavector,eventhoughthatis technicallyRO possible.'Instead,thestorageshouldalwaysbeaccessedbythe(OHcharacter-handling functions.6  GOInfact, the combinationoftheVECTOR attributewithIO CH$ALLOCATIONshouldbethoughtofasasinglelanguage4O5 construct,asinthe followingmacro:O MACRO9 CH$SEQUENCE(N)%=%VECTOR[CH$ALLOCATION(N)]%%;4  FOWithinthescopeofthis declaration, CH$SEQUENCEcanLObeusedasifitwereacharacter-sequence attribute.,ForLO5example,the declarationofS3canbewrittenasfollows: O OWN S3:&CH$SEQUENCE[80];I  GOThe CH$SEQUENCEmacrojustgivenisnota predeclaredPOpartoftheBLISS language.*Itisgivenhereasa suggestedRO5 user-declaredmacro.'Ifitisusedinaprogram,thenitmust6Obe explicitlydeclaredinthatprogram.0 ?OWhenthe CH$ALLOCATIONfunctionisusedintheLOVECTOR attribute(asisnormallythecase),the parameters=O5of CH$ALLOCATIONmustbecompile-time-constant-MO expressions.,This restrictionfollowsfromthe definitionof,OtheVECTOR attribute(giveninSection11.4.1,whichre-PO>quiresthatan expressionthatisanactual parameteroftheGOVECTOR attributebea compile-timeconstant expression.* ? NPOThe declarationofS3,givenabove, satisfiesthis requirementKObecauseitslength parameteris80anditscharacter-size O5 parameterisabsent.q ! GAOInadvanced programming applications, CH$ALLOCATIONPOisusedwitha nonconstantlength.'Forexample,inaprogramOO5thatperformsdynamic allocationofstoragefor characterse-GOquences, CH$ALLOCATIONisusedto determinetheamount Oofstorage required./  `$O20.2.2CPointer FunctionsLO4Thepointer functionscreateor manipulate characterpoint-KOers.(TheCH$PTRfunctionreturnsa characterpointerthatKO designatesa character position.'TheCH$PLUSfunctioncre-MO=atesa characterpointerthatisoffsetbyagivennumberKOof character positionsfromanother characterpointer.*TheIOCH$DIFFfunction determinestheoffsetbetweentwogivenOG character pointers. B[O20.2.2.1B Definition=O)Thepointer functionsaredefinedasfollows:M ##O CH$PTR(addr,i,cs) ! WO Interpret addr<astheaddressofadatasegment(thebaseO address).' Interpret  i:=asasignedinteger(theindex).' Interpret O5 csJ5asanunsignedinteger(the charactersize).)AssumethatOOthegivensegmentisa characterpositionsequencethatuses O csNbitsforeach character position.'Returna characterpointerO>tothe( O> iFd>+1)th characterpositionofthesequence containedinOthesegmentat} addr 2.  ]"O Default charactersize4c.(Thecharacter-size parametercanbeLOomitted;thatis,theformCH$PTR(addr,i)is permitted.*InUO5thiscase,thesystemdefaultisusedforthe charactersize.'InMOBLISS-16and BLISS-32,thisdefaultis8;in BLISS-36,theOdefaultis7.s ! IO Defaultindexasasignedinteger(theindex).)Supposethat > ptrNO5 designatesthekth characterpositionofthegiven sequence.6OReturnapointerthat designatesthe(  i!+k)th characterposi-)Otionofthegiven sequence.L ""O CH$DIFF(ptr1,ptr2) |O Interpret ptr1 ]and ptr20as characterpointersofthesameLO charactersize(bitsper character)pointingintothesameKO5 characterposition sequence.*Supposethepointers designateMOthen1thandn2th character positions, respectively,ofthe,Ogiven sequence.&Return(n1-n2). NJOThe charactersize(cs)inaCH$PTRfunctionmustbeaEO compile-timeconstant expression,andinBLISS-16and,O5BLISS-32itsvaluemustbe8., NKOTheCH$PTRfunctionisa link-timeconstant expressionifO addr5 isa link-timeconstant expressionand  i and p csare,if>O5given,eacha compile-timeconstant expression. MOInBLISS-16andBLISS-32afunctionthat specifiesachar-@Oactersizeotherthaneightbitsisnotvalid. WO20.2.2.2BExamplesJO)A characterdatasegmentis allocatedwithanamewhoseLOvalueisanaddress.*Becausea characterpositionsequenceJOmustbeaccessedthrougha characterpointer,somemeansLO3forcreatingapointeris required.-TheCH$PTRfillsthisOneed.N a$HOAnexampleoftheuseoftheCH$PTRfunctionfollows:O LITERALP BUFFSIZE%=%80; O OWN( QADDR:&CH$SEQUENCE[BUFFSIZE],( QBEGIN,p QEND; O ...#O QBEGIN%=%CH$PTR(QADDR);,OH QENDp=%CH$PTR(QADDR,BUFFSIZE-1);J   JOThetwo assignmentssetthecontentsofQBEGINandQENDVOtopointerstothefirstandlast character positionsoftheseg-AO5mentQADDR. (CH$SEQUENCEisa user-declaredmacro"Othatwas describedin\Section 20.2.1.2.)* \P? r  BHMOGivenapointertoa character position,theCH$PLUSfunc-NOtioncanproduceamodifiedpointerthat designatesachar-RO5acterpositionthatisacertainnumberof positionsbeforeor8Oaftertheoriginal position.'Forexample:O LITERALZ BUFFSIZE%=%80; O OWN$ X:%CH$SEQUENCE[BUFFSIZE],2 PTR1; Oz ...O PTR1&=% CH$PTR(X);.O  INCR&I%FROM%0&TO& BUFFSIZE-1%DOR BEGIN ...!% Operation&#1$ PTR1%=&CH$PLUS(.PTR1,1);) END;U  +QOThisloop evaluates Operation#1(whichisnot specifiedhere)GOBUFFSIZEtimes.)Duringeach evaluation,PTR1 designatesQO5a different characterpositionwithinX,startingatthefirstBOpositionand advancingbyonepositioneachtime. ZzKOGiventwo pointers,thenumberof charactersbetweenthemHOcanbeobtainedbymeansoftheCH$DIFF function.-ForO5example: O OWN M:%CH$SEQUENCE[100];I PTR1, PTR2,  N; O! ... Oi PTR1&=% CH$PTR(M,25); O PTR2&=% CH$PTR(M,75); O ...%OA N&=%CH$DIFF(.PTR2,.PTR1); rOOThisprogramfragmentsetsNto50,whichistheoffsetof#OPTR2relativetoPTR1. ! MOTheCH$DIFFfunctionistheonlyvalidwaytocomparetwoNO character pointers.+Suppose,forexample,itis necessarytoTO5calltheroutineREXifthepointer containedinXisthesamePOasthepointer containedinY.Thisactioncanbe programmedOasfollows:2Ok IF%CH$DIFF(.X,.Y)%EQL%0%THEN&REX(); .O20.2.3CCharacter-Reading FunctionsJO4Eachofthecharacter-reading functionsreturnsacharac-NOtercode.* Specifically,eachfunctionusesagiven characterOOpointertolocatea character position,andthenfetchestheJO= charactercodethatis containedinthat characterposi-LOtion.+The functionsoperateonthegiven characterpointerJOin differentways:)CH$RCHARdoesnotchangethepointer,EOG CH$A_RCHARadvancesthepointerbyone characterpo-HOsitionbeforefetchinga charactercode,and CH$RCHAR_A2Oadvancesthepointerafter fetching. BeO20.2.3.1B DefinitionGO)Thecharacter-reading functionsaredefinedasfollows:E O CH$RCHAR(ptr) ! NO Interpret  ptrC-asa characterpointer.'FetchthecontentsoftheQO characterpositionthatis designatedbythe characterpointer.&O5Returnthefetchedvalue.H O CH$A_RCHAR(addr)q GO Interpret addr6astheaddressof a characterpointer.KOAdvancethe characterpointertothenext characterposi-MO5tionandthenfetchthecontentsofthe characterpositionHO designatedbythe characterpointer..ReturnthefetchedOvalue.H O CH$RCHAR_A(addr)i  ?O Interpret addr=astheaddressofa characterpointer.*FetchQOthecontentsofthe characterposition designatedbythechar-NO5acterpointerandthenadvancethe characterpointertotheBOnext character position.'Returnthefetchedvalue. NDONotethatthe parameterofCH$RCHARisa character@Opointer,whereasthe parameterof CH$A_RCHARandBO5 CH$RCHAR_Aistheaddressofa characterpointer. O20.2.3.2BExamplesNO)Forsomeexamplesofthese functions,considerthe followingOprogram fragment:E 2OCP= CH$PTR(UPLIT(  '+ABCD  ' )); O0CV1=CH$RCHAR(.CP);!O~CV2=CH$A_RCHAR(CP);!OCV3=CH$RCHAR_A(CP); OCV4=CH$RCHAR(.CP);*!Createspointerto sequence.0!SetsCV1to%C 0 ' 0A @0 ' e0.~!SetsCV2to%C ~ ' ~B 5~ ' Z~.!SetsCV3to%C  ' B 5 ' Z.!SetsCV4to%C  ' C : ' `.  .O20.2.4CCharacter-Writing FunctionsIO4Eachofthecharacter-writing functionsstoresacharac-NOtercode.* Specifically,eachfunctionusesagiven characterLOpointertolocatea character position,andthenstoresaJO=givencharacter-codeinthat character position.+LiketheKOcharacter-reading functions,these functionsoperateontheCOgiven characterpointerin differentways:,CH$WCHAREOGdoesnotchangethepointer, CH$A_WCHARadvancestheQOpointerbyonepositionbeforestoringthe charactercode,and=O CH$WCHAR_Aadvancesthepointerafterstoring. BeO20.2.4.1B DefinitionGO)Thecharacter-writing functionsaredefinedasfollows:I O CH$WCHAR(c,ptr): NO Interpret  c0asa charactercodeand interpret  ptr7asachar- Oacterpointer.(Store " c6]inthe characterposition designatedby>O5the characterpointer.'Donotreturnavalue.L ""O CH$A_WCHAR(c,addr) ! O Interpret  c0asa charactercodeand interpret addr|asthead-MOdressofa characterpointer.)Advancethe characterpointer:O5tothenext character position,thenstore 5 cV5inthe characterPOposition designatedbythe characterpointer.(DonotreturnaOvalue.L ""O CH$WCHAR_A(c,addr) ! O Interpret  c0asa charactercodeand interpret addr|asthead-2Odressofa characterpointer.'Store 5 c&ointhe characterpositionMO5 designatedbythe characterpointer,thenadvancethechar-QOacterpointertothenext character position.(DonotreturnaOvalue.,  )OIneachofthese functions,  c/SmustbeinarangesuitableforPOuseasa charactercode.'Becausenoneofthese functionsre-QO5turnavalue,theymustnotbeusedincontextsthatrequireKOavalue.+Aswiththecharacter-reading functions,thepa-IOrameterofCH$WCHARisa characterpointer,whereasthe=O> parameterof CH$A_WCHARand CH$WCHAR_Aisthe-Oaddressofa characterpointer.i ?O20.2.4.2BExamplesMO)Anexampleoftheuseofthese functionsisthe followingOprogram fragment: O OWNN S4:&CH$SEQUENCE[5]," P:%INITIAL(CH$PTR(S4)); O ...O& CH$WCHAR(%C'P',.P);%On INCR&I%FROM%1&TO&4%DO CH$A_WCHAR(%C'Q',P); \,OThisexamplefillsS4upwith z'PQQQQ ' . -O20.2.5CSequence-Writing FunctionsPO4Eachofthesequence-writing functionssetsthecontentsofaHO characterposition sequence.(TheCH$MOVEfunctioncopiesNOa specifiednumberof charactersfromone characterpositionNO=sequenceintoanother.(TheCH$FILLfunctionsetsalloftheOO character positionsofasequencetoagiven charactercode;POforexample,itcan initializeasequencetoallblanks.,TheMOGCH$COPYfunctionis relativelycomplex;itcancopyseveralJOseparate character sequencesintoagiven characterposi-QOtionsequenceandthenfillinany remaining positionswithaKOQgivenfill character.)ThusasingleCH$COPYfunctionactsKOlikeaseriesofCH$MOVE functionsfollowedbyaCH$FILLO function.! BdO20.2.5.1B DefinitionFO)Thesequence-writing functionsaredefinedasfollows:P" &&O CH$MOVE(n,sptr,dptr)#  UO Interpret  nCasanunsignedinteger(thelengthofbothsource'Oand destination).+ Interpret. sptr andw dptr(as pointers.,UsePO5thesepointerstolocatetwo characterposition sequences(the8Osourceandthe destination,respectively).q$  GOCopy  nFi charactersfromthesourceintothe destination.(ThatPOis,copythecontentsofthefirst characterpositionoftheTO5sourceintothefirst characterpositionofthe destination,copyNOthecontentsofthesecond characterpositionofthesourcePOintothesecond characterpositionofthe destination,andsoPO>on,untiln charactershavebeencopied.)ReturnapointertoOthe(  n;$+1)th characterpositionofthe destination.Q% ''O CH$FILL(fill,dn,dptr)& ! fO Interpret fill,(asa charactercode., Interpret  dnasanun-JOsignedinteger(thelengthofthe destination).) Interpret  dptrSO5asa characterpointer.&Usethepointertolocatethe beginningMOpositionofa characterpositionsequence(the destination).' NOCopy  fillintothefirst o n1 character positionsofthedestina-/Otion.*Returnapointertothe(  dn(+1)th characterpositionofO5the destination.y( OOO CH$COPY(sn1,sptr1,sn2,sptr2,...,fill,dn,dptr))  O Interpret sn1,sn2, ...,and s dn&asunsignedintegers(theGOlengthsofthesourcesandthe destination).) Interpret sptr1,O5 sptr2,95 ...5, and5 dptr'N5as character pointers.0Use45 sptr1,O sptr2,9 ...,and dptr9@tolocatethe beginning positionsofsomeKO characterposition sequences(thefirstsource,thesecondO>source,c> ...>>,andthe destination,respectively).) InterpretN> fill!Oasa charactercode.*  OCopy  sn1F charactercodesfromthefirstsourceintothefirst O sn1; character positionsofthe destination,copy  sn2charac-@O5tercodesfromthesecondsourceintothenext 5 sn2w5 characterHO positionsofthe destination,andsoon.)Iflessthan a dnchar-AOactershavebeencopied,copythe charactercode6 fillintotheKO> remaining character positionsofthe destination.+ReturnaOpointertothe( b dn;+1)th characterpositionofthe destination.s+ I#OIfthesourcelengths,_ sn1,sn2,*andsoon,areallcompile-,Otimeconstant expressions,then sn1+sn2+?...mustnotbeO5greaterthan 45 dn>5.,Ifthelengthsofthesourcesarenotall/O compile-time expressions,thentheP sn1+sn2+...^canex-Oceed  dnCg,butany charactercodethatwouldbestoredinLO>a characterpositionbeyondtheendofthe destinationisO discarded.Z, 0FOThe destinationofaCH$MOVEfunctionmustnotover-QOlapthesource;thatis,thetwo sequencesmustnothaveanyMO5 character positionsincommon.) Similarly,the destinationofLOtheCH$COPYfunctionmustnotoverlapanyofitssources.-  |O20.2.5.2BExamplesHO)Thesequence-writing functionsarea conveniencebecauseLOtheycombineinasinglefunctionwhatwouldrequiremanyKOCH$WCHAR functions.(Also,they contributeto efficiencybyKO3makinguseofthespecialhardware instructions especially6Odesignedformoving character sequences.. COAnexampleoftheuseoftheCH$MOVEandCH$FILLO functionsfollows: Oa OWN  X:&CH$SEQUENCE[20],  P;O9 BIND  S%=%UPLIT('ABCD'); O ...O P&=% CH$PTR(X);%OY INCR&I%FROM%1&TO&4%DO BEGIN- P%=& CH$MOVE(.I,& CH$PTR(S),%.P);+0 P%=&CH$FILL(%C'-',&5-.I,&.P);x END;/ !sSOAttheendofthis fragment,thecontentsofXisasfollows: O 'A----AB---ABC--ABCD-' 0  NTOThefinalvalueofPisapointertothe twenty-first characterROpositionofX;thatis,the unspecified characterpositionthat9O5followsthelast characterpositionofX.R1 (IOAnexampleoftheuseoftheCH$COPYfunctionfollows: O OWN"P ALPHA:&CH$SEQUENCE[10];O BIND" Q%=&UPLIT('ABCDEFGH'); O( ...Op CH$COPY( 3,% CH$PTR(Q,5), 5,% CH$PTR(Q),H %C'&', 10,&CH$PTR(ALPHA));2 z~NOAttheendofthisprogram fragment,thecontentsofALPHAOisasfollows:Oa 'FGHABCDEK'3 GOThisexampleassignsa relatively complicatedvalueto:OALPHAbymeansofasinglefunctioncall.H4 GOTheCH$COPYfunctiondoesnotdoanythingthatcannotFObedonebya combinationoftheCH$MOVEandCH$FILLEO5 functions..Forexample,thepreviousprogramfragment2Ocouldbereplacedbythe following: O OWN"Z ALPHA:&CH$SEQUENCE[10],  PA;O BIND"2 Q%=&UPLIT('ABCDEFGH'); Oz ...O PA%=&CH$PTR(ALPHA);0O  PA%=& CH$MOVE(3,% CH$PTR(Q,5),&.PA);.OR PA%=& CH$MOVE(5,% CH$PTR(Q),%.PA);$O CH$FILL(%C'%',%2,%.PA);5 ! xTOThisversionislesscompactandless efficientthantheversionMOthatusesCH$COPY.TheuseofPAas temporarystorageforSO5thepointercouldbe eliminatedbyanestingoffunctioncalls;RO nevertheless,thisversionwouldrequirethreefunctioncallsto2OreplacethesinglecallonCH$COPY.6 /O20.2.6CSequence-Comparing FunctionsEO4Eachofthesequence-comparing functionscomparestheNOcontentsofone characterpositionsequencetoanother.'WithJOthe exceptionof CH$COMPARE,these functionsreturn1ifPO=the comparisonis satisfiedandreturn0 otherwise;thustheyLOserve character sequencesinthesameway relationaloper-;Oatorsserveintegerandaddressvalues(seejSection 5.1.4.5).POGIfoneofthe character sequencesisshorterthantheother,OOitisextended(forpurposesofthe comparisononly)bythe7Oadditionoffill charactersattheend.*6 j?V7  GOTheCH$EQLfunction determineswhetherornotthetwoKOgiven sequencesare identical,andtheCH$NEQfunctionisFO5thenegationofCH$EQL.Theremaining-sequencecompar-NOing functionsdependontheorderingof character sequences.QOThatorderingis determinedbyrulessimilartothoseforar-LO>rangingthewordsandphrasesina dictionary.'TheCH$LSSGOfunction determineswhetherornotthefirst parameterLOoccursbeforethesecond parameterintheorderingofse-AOHquences.+TheCH$LEQ,CH$GTR,andCH$GEQ functions"Oare similarlydefined.8 DOThe CH$COMPAREfunction determineswhetherthefirstLO parameteroccursbefore,isequalto,oroccursaftertheJO5second parameter.-Thefunctionreturns-1,0,or1,re-NO spectively.+Thisfunctioncanbeusedasa case-indexinaOOcase-expressiontoprovide,inaclearand efficientway,anNO>actionforeachofthethreepossible relationsbetweentwoO sequences.9 BfO20.2.6.1B DefinitionHO)Thesequence-comparing functionsaredefinedasfollows:\: 22O CH$xxx(n1,ptr1,n2,ptr2,fill)?; WROInthis definition, ``CH$xxx''standsforanyoneofthesevenCOfunctionnamesgiveninthetablebelow.+ Interpret  n1 and O5 n2L5asunsignedintegers(thelengthsofthegiven sequences).O Interpret ptr1 _and ptr2.as character pointers.-UsetheseMOpointerst@L @Lolocatethe beginning positionsoftwo character)O>position sequences.' Interpretd> fill!>asa charactercode.m<  C OIf n1isnotequalto " n27(sothatthe sequencesareof differentVO lengths),treattheshorteroneasifithad sufficient additionalJO5 character positionsandeach additional characterpositionO contained fill .=  ZKOLookthroughthetwo sequencesin parallel,one characterXOpositionatatime.'Thatis,selectthefirstpositionofeachse-PO5quence,thenselectthesecondpositionofeach sequence,andTOsoon.(ProceedinthismanneruntilapositionisselectedthatOOcontainsone charactercodeforonesequenceanda differentTO> charactercodefortheother.'Ifnosuchpositionisfound(be-SOcausethe sequencesare identical),proceedtothelastpositionOofthe sequences.>  SOCallthe charactercodesintheselected positionsofthefirstOandsecondsequence H c1 and M c2,, respectively.'These characterOO5codesare integers,andaresubjectto arithmetic comparison.MOOnthebasisofthefunctionnameandthe charactercodes  c1 Oand  c2;9,obtainavaluefromthe followingtable:*? ? OOFunctionO+Namebc1lessb+thanc2c1equal+toc2c1greater+thanc2 OFOCH$EQLOCH$NEQ b0 b1 1 0 0 1OwCH$LSSOCH$LEQ bw1 b1 w0 1 w0 0O>CH$GTROCH$GEQ b>0 b0 >0 1 >1 1O CH$COMPARE3-1 0 1 O W@ --OReturnthevaluethus obtained.A N"O Defaultfill character4=.,Thelast parametercanbeomitted;NOthatis,theformCH$(n1,ptr1,n2,ptr2)is permitted.*Inthis3O5case,zeroisusedasthevalueof5 fill C5.@B O20.2.6.2BExamplesBO)Assumethe following declarationsinthe examples:O BIND- P_ALPHA&=%CH$PTR(UPLIT('ALPHA')),+> P_BETAK=%CH$PTR(UPLIT('BETA')),+ P_BEARK=%CH$PTR(UPLIT('BEAR')),' P_BE=%CH$PTR(UPLIT('BE'));TC **OTheexamplesareasfollows:XD ..`1.: CH$LSS(5,P_ALPHA,4,P_BETA)E ]FbWhen corresponding charactersare compared,itisde-Fterminedthatthefirst charactersofthe parameters, ' A 9' and %' UB '<,are different.)BecausetheASCIIcodefor l' lA 9l'/lislessthantheASCIIcodefor l' lB Cl' sl,thevalueofthefunctionis1.-`D2.: CH$GTR(4,P_BETA,4,P_BEAR)F  LbItis determinedthatthethird charactersoftheparame-ters t' T ' $and ' A )'4tare different.)BecausetheASCIIcode for T' T '-comesaftertheASCIIcodefor q' A ',thevalueoflthefunctionis1.+`3.: CH$GTR(4,P_BEAR,2,P_BE)EG  KbThefill characteraddedtothesecond parameterplaysaOdecisiverole.)Thatis,thefirsttwo charactersofthepa-/rametersarethesame,soitis ,' \A '#andthefill characterOlthatare different.(Thedefaultfill characteris0.'BecausetheASCIIcodefor ' A '46isgreaterthan0,thevalueofthefunctionis1.1`4.: CH$GTR(4,P_BEAR,2,P_BE,127)[H  1QbThefill characterisgiven explicitlyas127,whichisequalHtothehighestASCIIcode.+BecausetheASCIIcodefor ' A 9'Eislessthan127,thevalueofthefunctionis0.2`5.: CH$COMPARE(5,P_ALPHA,4,P_BETA)I 8bBecausethevalueoftheASCIIcodefor b' bA b'5bislessthantheASCIIcodefor ' B '3,thevalueofthefunctionis-1.J V^/O20.2.7CSequence-Searching FunctionsLO4Thesequence-searching functionsareusedtofindasingleNO characterorasequenceof characterswithinalargerchar-MOacter sequence.* SearchingisalwaysdonefromfromlefttoHO=right(fromthefirst characterpositiontothelast).K VGOThe CH$FIND_CHfunctionlooksfora characterpositionFOthatcontainsagiven character,whereastheCH$FIND_JO5NOT_CHlooksfora characterpositionthatcontainsany-FOthingbutagiven character.*The CH$FIND_SUBfunction9Olooksforagivensequenceof characters.L yFOIfthedesired characteror charactersequencecannot-Obefoundbythese functions,a nullpointerJis returned.,AEO5CH$FAILfunctionthen determineswhetherthereturnedVOpointerisorisnotanullpointer.)Anullpointermustnotbe:OpassedtoanyCH$functionexceptCH$FAIL.M BfO20.2.7.1B DefinitionHO)Thesequence-searching functionsaredefinedasfollows:RN ((O CH$FIND_CH(n,ptr,char)lO  BO Interpret  n@asanunsignedinteger(thelengthofthecon-Otext).) Interpret  ptr/ asa characterpointer.( Interpret char as"O5a charactercode.(Use 5 ptr25tolocatea character sequence,theOcontext.IP ! NOSearchthefirst  n= character positionsofthecontextforapo- Ositionthatcontains  char9,andreturnapointertothat position.TO5Ifnosuch characterpositionisfound,returnthenullpointer.VQ ,,O CH$FIND_NOT_CH(n,ptr,char)R NEOProceedasfor CH$FIND_CHabove.+However,searchtheQOgivensequenceforapositionwhosecontentsarenotequaltoO5char.ZS 00O CH$FIND_SUB(cn,cptr,pn,pptr)T ! pO Interpret  cn and  pn8+asunsignedintegers(thelengthsofthe;Ocontextandpattern,respectively).) Interpret cptr 3and pptr xasPO5 character pointers.'Usethesepointerstolocatetwo character@Oposition sequences,thecontextandthepattern.nU  DSOStartatthefirst characterpositionofthecontextandsearchROforasequenceof positionsthatcontainsthepattern.)IfsuchPO5asequenceisfound,returna characterpointertothefirstOOpositionofthe sequence.' Otherwise,returnthenullpointer.DV O CH$FAIL(ptr)W O Interpret  ptrD1asapointer.*Ifthepointeristhenullpointer,2Othenreturn1; otherwise,return0.*X GO20.2.7.2BExamplesCO)Asanexampleoftheuseofthe CH$FIND_CHARand@OCH$FIND_NOT_CHAR functions,considerthe followingOroutine:3O_ ROUTINE& FIND_WORD(N,%LINE):%NOVALUE%= BEGIN EXTERNAL%ROUTINE7 PROCESS_WORD; O OWN  LE,  RE;5OV LE%=&CH$FIND_NOT_CH(.N,%.LINE,%%C'&');BO RE%=&!CH$FIND_CH(.N-CH$DIFF(.LE,.LINE),%.LE,&%C'%');/O PROCESS_WORD(CH$DIFF(.RE,.LE),%.LE);O. END; Y  NYOThisroutinefindsthefirstfull``word''inagivenlineoftext.OOForpurposesofthisroutine,a``word''isanysequenceof9O5 charactersthatdoesnotcontainaspace.vZ LLOThetwo parametersoftheroutinearedefinedasfollows:.[ PO.NThenumberof positionsinthe characterpositionsequence*z0thatcontainsthegiventextXO.LINEkApointertothefirstpositionofthe characterpositionse-2zquencethatcontainsthegiventext\ gQOThefirst assignmentintheroutinesets.LEtopointtotheNOfirst characteroftheword.(Thesecond assignmentsets.RESO5topointtothefirstspaceaftertheword.*Finally,aroutineKOthat processesthewordiscalled;thatroutine,PROCESS_*OWORD,isnot specifiedhere.]  1O20.2.8CSequence-Translating FunctionsHO4Thesequence-translating functionsareusedto translateHOa charactersequencefromoneencodingtoanother.,TheHO CH$TRANSTABLEfunctionbuildsatablethatcontrolstheIO= translation.(The CH$TRANSLATEfunctionusesthetabletoBO translateagivensequenceintothenew encoding.^  c OThe' character translationtable)is,itself,a characterpo-LOsition sequence.,Suppose,forexample,thecontentsoftheVO5first characterpositionofsuchatableis7;thismeansthataTO charactercodewhosevalueis0willbe translatedto7bytheOtable.w_ ! MOOThetablecontainsonepositionforeachcharacter-codevalueOOinthesourcecharacter-codeset.(Forexample,ifthesourceJO5 charactersequenceisASCIIencoded,thenthe translationOOtablemustcontain128 positions,oneforeachvalueintheAO(7-bit)ASCIIcharacter-codeset.,The CH$TRANSLATEOO>functionusesthevalueofagivensource characterpositionTOasa zero-basedindexintothetable,fromwhichitobtainsthe2O corresponding destinationcodevalue.` ! O20.2.8.1B DefinitionTO)Thecontentsofa character translationtableisgivenasapa-EOrameterofthe CH$TRANSTABLE function.*ThesyntaxofOthis parameteris:a  a1Otranslation-stringtranslation-item,...Otranslation-item K8 Kk< K:'translation-code7uREP replicatorOF(translation-string) 9 k= ;O replicator*K compile-time-constant-expression4Otranslation-codesingle-character-literaltb JJOThesequence-translating functionsaredefinedasfollows:Ic O CH$TRANSTABLE(ts)wd ! MO(Thesymbol  tsy representsaI translation-string,whichisde-JOscribedabove.)'Createthe translationtable specifiedby  ts jandKO5placeitinthecurrentPLITprogramsection.,Returnthe/Oaddressofthe translationtable.he >>O CH$TRANSLATE(tab,sn,sptr,fill,dn,dptr)kf  WAO Interpret  tabA;asanaddressanduseittolocatea character(O translationtable.* Interpret + sn and = dn asunsignedintegersPO5(thelengthsofthesourceandthe destination,respectively).O Interpret sptr Sand dptr7aspointersandusethemtolocatetheMO beginning positionsoftwo characterposition sequences(the4O>sourceandthe destination).' Interpret> fill!">asa charactercode.%g   OLet n ,be  sn or j dn:(thelengthofthesourceorthedestina-NOtion), whicheverissmaller.(Performthe followingstepsfor  iO5=1,2,H5 ... 5, 5 n*05:'fetchthecontentsofthe 5 i!5th characterposition1Oofthesource,andcallitsvalue  c,.&Fetchthecontentsofchar-Oacterposition D c?~ofthe character translationtable(whosefirst?O>positionisnumberedzero),andcallthevalue > tc>.)Store > tc d>in Othe  i8th characterpositionofthe destination.Lh " OIf snisgreaterthan L dn3(thatis,thesourceislongerthan5Othe destination),thenignorethelast  sn -  dn positionsoftheO5source.)If 5 sn25islessthan 5 dn$75,thensetthelast( 5 dn 25- b5 sn5)char-4Oacter positionsofthe destinationtoC fill.*ObservethattheE fill/O charactercodeisnot translated.i w(OReturnapointertothe(  dn-,+1)th characterpositionoftheO destination.j  WCOThe CH$TRANSTABLEfunctionisalwaysa compile-timeSOconstant expression.'Infact,thetableiscreatedand allocatedOO5bythecompilerinthesamewayaPLITiscreatedandal-HOlocated.+The destinationofacallonthe CH$TRANSLATENOfunctionmustnotoverlapthesource;thatis,thetwose-JO>quencesmustnothaveany character positionsincommon.k & rO20.2.8.2BExamplesMO)Asanexampleoftheuseofthesequence-translatingfunc-4Otions,considerthe followingroutine:6O ROUTINE&R(N,%LINE,% WORK_BUF):%NOVALUE&=N BEGIN BINDZ TAB%=& CH$TRANSTABLE(n REP&32&OF&(%C'*'), %C'&', REP&10&OF&(%C'*'),F %C'+', REP&1%OF%(%C'*'), %C'-', REP&2%OF%(%C'*'),0f %C'0',&%C'1',%%C'2',%%C'3',&%C'4',0 %C'5',&%C'6',%%C'7',%%C'8',&%C'9',  REP&70&OF& (%C'*')); O> ...O CH$TRANSLATE(Z TAB,Z .N,%.LINE, Z] 0,Z .N,% .WORK_BUF);6O STAR&=%CH$FIND_CH(.N,% .WORK_BUF,%%C'*');O5 IF%CH$FAIL(.STAR)#} THEN% PROCESS(.N,%.LINE)? ELSE% ERROR(.N,%.LINE,&CH$DIFF(.STAR,& .WORK_BUF));O END;l  ZLOThisroutineperformsa preliminarycheckofagivenlineOOoftextthatisexpectedto representoneormore integers.NO5Forpurposesofthisroutine,thepresenceofany characterOOotherthanaspace,asign,oradigitmakesthelinein-SOvalid.+Ifthelineisvalid,thenaroutinetofurtherprocessUO>thelineifcalled;thatroutine,PROCESS,isnot specifiedhere.NO Otherwise,aroutinetohandleaninvalidline,ERROR,also,Onot specifiedhere,iscalled.xm NNOThethree parametersoftheroutinearedefinedasfollows:n   O.NB4Thenumberof positionsinthe characterposition440sequencethatcontainsthegiventextO.LINEL4Apointertothefirstpositionofthe characterposition44sequencethatcontainsthegiventextWOq .WORK_BUFJApointertothefirst characterpositionofaworkarea:4thatistoreceivethe translatedsequenceoo EEOA step-by-step descriptionoftheroutineRfollows: p ! R`1.:A translationtableisdefinedanditsaddressisboundtoK(TAB.Thetableisdesignedtoleave unchangedanyspace,Msign,ordecimaldigit,buttoreplaceanyother characterwithanasterisk( Y* ).L`Y2.:Thegiven characterpositionsequenceis translated.,IfQitisvalid,itis unchanged.,Ifitisinvalid,eachinvalid4  characterisreplacedbyan asterisk.N`3.:The translatedsequenceissearchedforan asterisk,and:the resultingpointerisassignedtoSTAR.N`a4.:ThepointerinSTARischeckedbymeansofCH$FAIL.IfSitisnull,thennoasteriskwasfoundandthetextispassedQtotheroutinePROCESS.Ifthepointerisnotnull,thelineMkispassedtotheerrorroutinetogetherwiththeindexof)thefirstinvalid character.1q  HOThisprogramfragmentis relatively complicated,butitKOisvery efficient.-Withoutthe translating functions,somePO5methodofchecking individuallyforeachofthevalidcharac-$Oterswouldbe required.}r  t%O A.! Predefined! Identifiers OA  predefined identifier3isan identifierthathasaspecialIOmeaninginoneormoredialectsofBLISS.Forexample,POB``IF'' indicatesthe beginningofaconditional-expression,andEO``MAXU'' designatesthe ``unsigned maximum'' standard-O function.s  ROTherearefourkindsof predefined identifiersthatareclassi-Ofiedaseither: keywords or predefinednames{.)EachkeywordO5iseither5 reserved 5or-5 unreserved,5,andeach predefinednameisOeither9 predeclared orM built-in ].t NOOTheuseofa predefined identifierasan explicitlydeclaredPOnameismoreorless restricted, dependingonthe classifica-JO5tionofthe identifier.'The restrictionsareasfollows:u   `  A& reservedkeyword1mustnotbeusedasan explicitly4(declarednameunderanycircumstances. `  AnT unreservedkeyword05canbeusedfreelyasanexplic-Kitlydeclaredname,justasifitwerenota predefinedJY identifier.,Theonly disadvantageisthatareaderofaGprogrammaybeconfusedtoseeafamiliarBLISSkey-D word(suchasMAIN,forexample)beingusedasan%c explicitlydeclaredname. `  A' predeclaredname0canbeusedasan explicitlyde-F:claredname.+However,suchausemakesit impossibleLtousethenameinits predefinedsensewithinthescopeGoftheexplicit declaration.+Forexample,whereverABSHDis explicitlydeclared(forexample,asadatasegmentHname),itcannotbeusedasthenameoftheabsolute#valuestandard-function. `u  uA$u built-inname65umustalwaysappearinanexplicitdec-R laration.(Ifitisdeclaredbyabuilt-in declaration,thenitK&hasits predefinedmeaning; otherwise,ithasthemeaningT~givenitbytheexplicit declaration,justasifitwerenota! predefined identifier. v  NNOThese restrictionscanbe summarizedasfollows:(InchoosingNOaname,neveruseareservedkeywordandavoidtheuseofGO5any predefinednameifitsusecouldcause confusion.w xLOThe followinglistincludes identifiersthatare predefinedNOintheversionsofBLISS describedinthismanual,aswellOO5asanumberof identifiersthatwillbe predefinedinlaterMOversionsofBLISS.The applicabledialectsare indicatedbyBO parenthesizednumbersintheclassificationcolumn.Mx  # OO IdentifieryClassification^Usage O ObABSyb predeclaredname^b standard-^functionO)ABSOLUTE1y) unreservedkeyword(16,32) addr.-mode,^w object-optionO ACTUALCOUNTybuilt-inname^linkage-^>function)OACTUALPARAMETERObuilt-inname^linkage-^function,OADDRESSING_MODEoreservedkeyword^addr.-^ mode-attr.,^-switchOALIGNyreservedkeyword^ alignment-^ attributeO[ALWAYSy[reservedkeyword^[ select-label OANDyreservedkeyword^ operator-^" expression OAPybuilt-in name(32,36)^ register-^nameyy O OO IdentifieryClassification^Usage Onz QDO>ARGPTRy>built-inname^>linkage-^functionOASSEMBLYy unreservedkeyword^ list-optionOBEGINyreservedkeyword^blockOrBINARYyr unreservedkeyword^r list-optionOBINDyreservedkeyword^bind-^: declaration OBITyreservedkeyword^(Future^BLISS)O{ BITVECTORy{ predeclaredname^{ structure-^nameOBBLISSyB predeclaredname^Blinkage-^nameO BLISS10y  predeclaredname(36)^  environment-^WoptionO BLISS10_OTS!y unreserved keyword(36)^ environment-^optionOBLISS16y unreservedkeyword^ language-^nameO_BLISS32y_ unreservedkeyword^_ language-^nameO& BLISS36y&  unreservedkeyword^&  language-^t nameO BLISS36Cy  predeclaredname(36)^ linkage-^; nameO  BLISS36C_OTS!y  unreserved keyword(36)^  environment-^ optionO| BLOCKy|  predeclaredname^|  structure-^ nameOC  BLOCKVECTORyC  predeclaredname^C  structure-^ nameO BUILTINy reservedkeyword^  built-in-^X  declaration O BYy reservedkeyword^  indexed-loopOKBYTEyKreservedkeyword^K allocation-^unitOCALL2y unreservedkeyword(16,32) linkage-typeOCASEyreservedkeyword^case-^T expressionO CH$A_RCHARy predeclaredname^supplementary-^functionO CH$A_WCHARy predeclaredname^supplementary-^function*O\ CH$ALLOCATION predeclaredname^\supplementary-^functionO# CH$COMPAREy# predeclaredname^#supplementary-^qfunctionOCH$COPYy predeclaredname^supplementary-^8functiony{ O OO IdentifieryClassification^Usage O | c O>CH$DIFFy> predeclaredname^>supplementary-^functionOCH$EQLy predeclaredname^supplementary-^SfunctionOCH$FAILy predeclaredname^supplementary-^functionOCH$FILLy predeclaredname^supplementary-^functionO[ CH$FIND_CHy[ predeclaredname^[supplementary-^function+O"CH$FIND_NOT_CH predeclaredname^"supplementary-^pfunctionO CH$FIND_SUBy predeclaredname^supplementary-^7functionOCH$GEQy predeclaredname^supplementary-^functionOxCH$GTRyx predeclaredname^xsupplementary-^functionO?CH$LEQy? predeclaredname^?supplementary-^functionOCH$LSSy predeclaredname^supplementary-^TfunctionOCH$MOVEy predeclaredname^supplementary-^ functionO CH$NEQy  predeclaredname^ supplementary-^ functionO\ CH$PLUSy\  predeclaredname^\ supplementary-^ functionO# CH$PTRy#  predeclaredname^# supplementary-^q functionO CH$RCHARy  predeclaredname^ supplementary-^8 functionO  CH$RCHAR_Ay  predeclaredname^ supplementary-^ functionOy CH$SIZEyy  predeclaredname^y supplementary-^ functionO@ CH$TRANSLATEy@ predeclaredname^@supplementary-^function*O CH$TRANSTABLE predeclaredname^supplementary-^UfunctionOCH$WCHARy predeclaredname^supplementary-^functionO CH$WCHAR_Ay predeclaredname^supplementary-^functionO] CLEARSTACK.y] unreservedkeyword(16,36)linkage-^optionO%CODEy% unreservedkeyword^%module-^rswitchO CODECOMMENTyreservedkeyword^ codecomment^9blockO COMMENTARYy unreservedkeyword^ list-optionO- COMPILETIMEy-reservedkeyword^-compile-^ztime-^ declarationOB CONCATENATEyB unreservedkeyword^Bpsect-^ attributeODEBUGy unreservedkeyword^module-^switchOJDECRyJreservedkeyword^J indexed-loopy} O OO IdentifieryClassification^Usage O~ @ O>DECRAy>reservedkeyword^> indexed-loopODECRUyreservedkeyword^ indexed-loop O1DOy1reservedkeyword^1loop-^ expressionOrELSEyrreservedkeyword^r conditional-^ expressionO:ELUDOMy:reservedkeyword^:module OEMT!y unreserved keyword(16)^linkage-^optionO{ENABLEy{reservedkeyword^{enable-^ declaration OBENDyBreservedkeyword^BblockOENTRY!y unreserved keyword(36)^module-^ switchO ENVIRONMENT!y unreserved keyword(36)^module-^switch OJEQLyJreservedkeyword^J operator-^ expressionOEQLAyreservedkeyword^ operator-^_ expressionOEQLUyreservedkeyword^ operator-^&  expression O EQVy reservedkeyword^  operator-^  expressionOg ERRSyg  unreservedkeyword^g  switch-item,^ module-^ switchO| EXECUTEy|  unreservedkeyword^| psect-^  attributeOC EXITLOOPyC reservedkeyword^C  exitloop-^  expressionO EXPANDy  unreservedkeyword^  list-optionO EXTENDED!y  unreserved keyword(36)^  environment-^ optionOKEXTERNALyKreservedkeyword^Kaddress-^mode-^switchOFIELDyreservedkeyword^field-^' declaration,^u -attributeOFORTRAN,y predeclared name(16,32)linkage-^<name)O FORTRAN_FUNC predeclaredname^linkage-^nameO} FORTRAN_SUBy} predeclaredname^}linkage-^nameODFORWARDyDreservedkeyword^Ddata-,^routine-^ declaration OYFPyYbuilt-in name(32,36)^Y register-^nameO FROMy reservedkeyword^ indexed-^nloop,case-^ expression O5F10y5 predeclaredname(36)^5linkage-^namey O OO IdentifieryClassification^Usage O @ ~+OGENERAL!y unreserved keyword(32)^ addressing-^mode OGEQyreservedkeyword^ operator-^ expressionOFGEQAyFreservedkeyword^F operator-^ expressionO GEQUy reservedkeyword^  operator-^[ expressionOGLOBALyreservedkeyword^linkage-^"option,^ppsect-^ attribute O7GTRy7reservedkeyword^7 operator-^ expressionOGTRAyreservedkeyword^ operator-^L expressionOGTRUyreservedkeyword^ operator-^ expressionOIDENTy unreservedkeyword^module-^switch OTIFyTreservedkeyword^T conditional-^ expressionO INCRy reservedkeyword^  indexed-loopO INCRAy reservedkeyword^  indexed-loopO INCRUy reservedkeyword^  indexed-loopO INDIRECT!y  unreserved keyword(36)^  addressing-^ modeOP INITIALyP reservedkeyword^P initial-^  attributeO INRANGEy reservedkeyword^  case-labelO  INTERRUPT2y  unreservedkeyword(16,32) linkage-typeO IOPAGEy reservedkeyword^ (Future^X BLISS) O IOT!y  unreserved keyword(16)^  linkage-type OJSB!y unreserved keyword(32)^ linkage-type O?JSR!y? unreserved keyword(16)^? linkage-typeOJSYS!y unreserved keyword(36)^ linkage-type)O KEYWORDMACROreservedkeyword^keyword-^macro-^G declarationOKA10!y unreserved keyword(36)^ environment-^optionOKC10!y unreserved keyword(36)^ environment-^optionOPKI10!yP unreserved keyword(36)^P environment-^optionOKL10!y unreserved keyword(36)^ environment-^doptionOKS10!y unreserved keyword(36)^ environment-^,optionOLABELyreservedkeyword^label-^m declarationOLANGUAGEy unreservedkeyword^ switch-item,^4module-^switchOLEAVEyreservedkeyword^leave-^I expression OLEQyreservedkeyword^ operator-^ expressionOLEQAyreservedkeyword^ operator-^ expressionOQLEQUyQreservedkeyword^Q operator-^ expressionOLIBRARYyreservedkeyword^ list-option,^flibrary-^ declarationO-LINKAGEy-reservedkeyword^-switch,^zlinkage-^ declarationOB LINKAGE_REGS!yB unreserved keyword(36)^Blinkage-^optionO LISTy  unreservedkeyword^  switch-item,^Vmodule-^switchOLITERALyreservedkeyword^literal-^k declarationOLOCALyreservedkeyword^local-^2  declaration,^ psect-^  attributeOG!LONGyG!reservedkeyword^G! allocation-^!unit0O" LONG_RELATIVE unreserved keyword(32)^" addressing-^\"modeO"LSI11!y" unreserved keyword(16)^" environment-^##option O#LSSy#reservedkeyword^# operator-^# expressionOd$LSSAyd$reservedkeyword^d$ operator-^$ expressionO+%LSSUy+%reservedkeyword^+% operator-^y% expressionOl&MACROyl&reservedkeyword^l&macro-^& declarationO4'MAINy4' unreservedkeyword^4'module-^'switch O'MAPy'reservedkeyword^'map-^H( declaration O(MAXy( predeclaredname^( standard-^)functionO)MAXAy) predeclaredname^) standard-^)functionOQ*MAXUyQ* predeclaredname^Q* standard-^*function O+MINy+ predeclaredname^+ standard-^e+functiony O OO IdentifieryClassification^Usage Oi ,?O>MINAy> predeclaredname^> standard-^functionOMINUy predeclaredname^ standard-^Sfunction OMODyreservedkeyword^ operator-^ expressionOMODULEyreservedkeyword^module ONEQyreservedkeyword^ operator-^ expressionONNEQAyNreservedkeyword^N operator-^ expressionONEQUyreservedkeyword^ operator-^c expressionO NOASSEMBLYy unreservedkeyword^ list-optionOWNOBINARYyW unreservedkeyword^W list-optionONOCODEy unreservedkeyword^module-^switch+O NOCOMMENTARY unreservedkeyword^ list-optionONODEBUGy unreservedkeyword^module-^_switchO NODEFAULTy unreservedkeyword^psect-^&  attributeO NOERRSy  unreservedkeyword^  switch-item,^ module-^; switchO  NOEXECUTEy  unreservedkeyword^ psect-^  attributeO| NOEXPANDy|  unreservedkeyword^|  list-optionO  NOINDIRECT!y  unreserved keyword(36)^  addressing-^C modeO  NOLIBRARYy  unreservedkeyword^  list-optionO7  NONEXTERNAL!y7  unreserved keyword(32)^7  addressing-^ mode-^ switchOKNOOBJECTyK unreservedkeyword^K list-optionO NOOPTIMIZEy unreservedkeyword^ switch-item,^module-^`switchONOPICy unreservedkeyword^psect-^' attributeO NOPRESERVEy unreservedkeyword^linkage-^optionOhNOREADyh unreservedkeyword^hpsect-^ attributeO0 NOREQUIREy0 unreservedkeyword^0 list-optionONOSAFEy unreservedkeyword^ switch-item,^module-^DswitchONOSHAREy unreservedkeyword^psect-^  attributeONOSOURCEy unreservedkeyword^ list-optionO NOSYMBOLICy unreservedkeyword^ list-option OyNOTyyreservedkeyword^y operator-^ expressionO@NOTRACEy@ unreservedkeyword^@ list-optionONOTUSED!y unreserved keyword(32)^linkage-^optionONOUNAMESy unreservedkeyword^ switch-item,^module-^switchONOVALUEyreservedkeyword^novalue-^ attributeO]NOWRITEy] unreservedkeyword^]psect-^ attributeO%NOZIPy% unreservedkeyword^% switch-item,^rmodule-^switch.O9 NULLPARAMETERbuilt-in name(16,32)^9linkage-^functionOzOBJECTyz unreservedkeyword^z list-option,^module-^switch OOFyreservedkeyword^case-,^select-^* expression;^wplitOOPTIMIZEy unreservedkeyword^ switch-item,^?module-^switchO OPTLEVELy  unreservedkeyword^ module-^S switch O ORy reservedkeyword^  operator-^! expressionO!ORIGIN!y! unreserved keyword(36)^!psect-^! attributeO\" OTHERWISEy\"reservedkeyword^\" select-label O"OTS!y" unreserved keyword(36)^"module-^##switchO# OTS_LINKAGE!y# unreserved keyword(36)^#module-^#switchOd$OUTRANGEyd$reservedkeyword^d$ case-labelO$OVERLAYy$ unreservedkeyword^$psect-^+% attribute O%OWNy%reservedkeyword^%own-^% declaration O&PCy&built-in name(16,32)^& register-^4'name O'PICy' unreservedkeyword^'psect-^' attributeOu(PLITyu(reservedkeyword^u(plitO(PORTAL!y( unreserved keyword(36)^(linkage-^<)optionO)PRESERVEy) unreservedkeyword^)linkage-^*optionO}*PRESETy}*reservedkeyword^}*preset-^* attributeOD+PSECTyD+reservedkeyword^D+psect-^+ declaration,^+ -allocationOY, PS_INTERRUPT!yY, unreserved keyword(36)^Y, linkage-typeO,PUSHJ!y, unreserved keyword(36)^, linkage-typey O OO IdentifieryClassification^Usage O @ 0OREADy unreservedkeyword^psect-^ attributeORECORDyreservedkeyword^(Future^BLISS) OFREFyFreservedkeyword^F structure-^ attributeO REGISTERy reservedkeyword^  register-,^[linkage-^ declarationO"RELATIVE!y" unreserved keyword(16)^" addressing-^pmodeO RELOCATABLE!y unreserved keyword(16)^ object-option OcREPycreservedkeyword^cplitOREQUIREyreservedkeyword^ list-option,^*require-^x declarationORETURNyreservedkeyword^return-^? expressionOROUTINEyreservedkeyword^routine-^ declarationORSX_AST!y unreserved keyword(16)^ linkage-type ORTT!y unreserved keyword(16)^linkage-^G option O R0y built-in name(16,32)^  register-^ name O R1y built-in name(16,32)^  register-^ name OP R2yP built-in name(16,32)^P  register-^ name O R3y built-in name(16,32)^  register-^d name O R4y built-in name(16,32)^  register-^, name O R5y built-in name(16,32)^  register-^ name OmR6ymbuilt-inname(32)^m register-^name O4R7y4built-inname(32)^4 register-^name OR8ybuilt-inname(32)^ register-^Iname OR9ybuilt-inname(32)^ register-^name OR10ybuilt-inname(32)^ register-^name OQR11yQbuilt-inname(32)^Q register-^nameOSAFEy unreservedkeyword^ switch-item,^module-^-switchOSELECTyreservedkeyword^select-^ expressionOnSELECTAynreservedkeyword^nselect-^ expressionO5 SELECTONEy5reservedkeyword^5select-^ expressionO SELECTONEAyreservedkeyword^select-^J expressionO SELECTONEUyreservedkeyword^select-^ expressionOSELECTUyreservedkeyword^select-^ expression ORSETyRreservedkeyword^Rcase-,^select-^ expression;^;field-^ declarationO SETUNWINDy predeclaredname^ condition-^O handling-^functionOSHAREy unreservedkeyword^psect-^d attributeOSHOWyreservedkeyword^(Future^+BLISS)OSIGNy predeclaredname^ standard-^functionOlSIGNALyl predeclaredname^l condition-^ handling-^functionO SIGNAL_STOPy predeclaredname^ condition-^ handling-^ functionO SIGNEDy reservedkeyword^  extension-,^ range-^1! attributeO!SKIP!y! unreserved keyword(36)^!linkage-^!optionOr"SOURCEyr" unreservedkeyword^r" list-option O"SPy"built-inname^" register-^9#nameO#STACK!y# unreserved keyword(36)^# environment-^$optionOz$ STACKLOCALyz$reservedkeyword^z$ stacklocal-^$ declarationOA%STANDARDyA% unreservedkeyword^A%linkage-^% declaration/O & STANDARD_OTS unreserved keyword(36)^ & environment-^V&optionO& STRUCTUREy&reservedkeyword^& structure-^' declaration,^k'switchO'SWITCHESy'reservedkeyword^' switches-^2( declarationO(SYMBOLICy( unreservedkeyword^( list-option O)T11.y)unreserved-keyword(16) environment-^)option Og*TESyg*reservedkeyword^g*case-,^*select-^+ expression;^O+field-^+ declarationO,THENy,reservedkeyword^, conditional-^d, expression O,TOy,reservedkeyword^,loop,case-^+- expression,^y- select-labelO-TOPS10!y- unreserved keyword(36)^- environment-^@.optionO.TOPS20!y. unreserved keyword(36)^. environment-^/optionO/TRACEy/ unreservedkeyword^/ list-optionO/TRAP!y/ unreserved keyword(16)^/ linkage-typey O OO IdentifieryClassification^Usage Os  I OUNAMESy unreservedkeyword^ switch-item,^module-^SswitchO UNDECLAREyreservedkeyword^ undeclare-^ declarationOUNSIGNEDyreservedkeyword^ extension-,^range-^/ attributeOUNTILyreservedkeyword^loop-^ expressionOpUPLITypreservedkeyword^pplitOc VALUECBIT!yc unreserved keyword(16)^clinkage-^optionO*VECTORy* predeclaredname^* structure-^xname,^ psect-attr.O?VERSIONy? unreservedkeyword^? switch-item,^module-^switchOTVOLATILEyTreservedkeyword^T volatile-^ attributeO WEAKy reservedkeyword^ weak-^  attributeO\ WHILEy\ reservedkeyword^\ loop-^  expressionO# WITHy# reservedkeyword^# leave-^q  expressionO WORDy reservedkeyword^  allocation-^8 unit,O  WORD_RELATIVE unreservedkeyword^  addressing-^ modeOy WRITEyy  unreservedkeyword^y psect-^  attribute OXORyreservedkeyword^ operator-^ expression OZIPy unreservedkeyword^ switch-item,^Imodule-^switchO$CODE$y predeclaredname^ psect-nameO$GLOBAL$y predeclaredname^ psect-nameO}$HIGH$y} predeclaredname(36)^} psect-nameO$LOW$y predeclaredname(36)^ psect-nameOq$OWN$yq predeclaredname^q psect-nameO$PLIT$y predeclaredname^ psect-nameO %ALLOCATIONyreservedkeyword^ allocation-^,functionO%ASCIC"yreservedkeyword(16,32)^string-^literalOm%ASCIDymreservedkeyword^mstring-^literalO4%ASCIIy4reservedkeyword^4string-^literalO%ASCIZyreservedkeyword^string-^IliteralO%ASSIGNyreservedkeyword^ calculation-^function O%Byreservedkeyword^integer-^QliteralO%BLISSyreservedkeyword^ compiler-^state-^ffunctionO%BLISS16yreservedkeyword^ predeclared^-macroO%BLISS32yreservedkeyword^ predeclared^macroy O OO IdentifieryClassification^Usage O  x O>%BLISS36y>reservedkeyword^> predeclared^macroO%BPADDRyreservedkeyword^ predeclared^SliteralO%BPUNITyreservedkeyword^ predeclared^literalO%BPVALyreservedkeyword^ predeclared^literal O%Cyreservedkeyword^integer-^"literalO%CHARyreservedkeyword^string-^functionOc %CHARCOUNTycreservedkeyword^cstring-^functionO*%COUNTy*reservedkeyword^*macro-^xfunctionO%CTCEyreservedkeyword^ exp-test-^?function O3%Dy3reservedkeyword^3 float-literalO%DECIMALyreservedkeyword^integer-^literalOt  %DECLAREDyt reservedkeyword^t  compiler-^ state-^ function O %Ey reservedkeyword^  float-literalO| %ELSEy| reservedkeyword^| lexical-^  conditionalOC %ERRORyC reservedkeyword^C  advisory-^ function(O  %ERRORMACROreservedkeyword^  advisory-^X function)O  %EXACTSTRINGreservedkeyword^ string-^function+O%EXITITERATIONreservedkeyword^macro-^functionO` %EXITMACROy`reservedkeyword^`macro-^functionO'%EXPANDy'reservedkeyword^'quote-^ufunctionO%EXPLODEyreservedkeyword^ delimiter-^<function O0%FIy0reservedkeyword^0lexical-^} conditional)O %FIELDEXPANDreservedkeyword^ fieldexpand-^Dfunction O8%Gy8reservedkeyword^8 float-literal O,%Hy,reservedkeyword^, float-literalO %IDENTICALyreservedkeyword^ sequence-^m test-function O%IFyreservedkeyword^lexical-^4 conditionalO%INFORMyreservedkeyword^ advisory-^functionOu %ISSTRINGyureservedkeyword^u exp-test-^functionO%LENGTHyreservedkeyword^macro-^functionO}%LTCEy}reservedkeyword^} exp-test-^functiony O OO IdentifieryClassification^Usage O  1O%MESSAGEyreservedkeyword^ advisory-^functionO%NAMEyreservedkeyword^name-^FfunctionO%NBITSyreservedkeyword^ bits-functionO:%NBITSUy:reservedkeyword^: bits-functionO%NULLyreservedkeyword^ sequence-^ test-functionO{%NUMBERy{reservedkeyword^{ calculation-^function O%Oyreservedkeyword^integer-^ literal O%Pyreservedkeyword^string-^JliteralO%PRINTyreservedkeyword^ advisory-^functionO %QUOTEy reservedkeyword^ quote-^R functionO  %QUOTENAMEy reservedkeyword^ macro-^ name^g functionO[  %RAD50_10y[ reserved keyword(36)^[ string-^ literal' 'O"  %RAD50_11"y" reservedkeyword(16,32)^" string-^o literalO %REFy reservedkeyword^  standard-^7 functionO  %REMAININGy reservedkeyword^ macro-^ functionOx%REMOVEyxreservedkeyword^x delimiter-^functionO?%REQUIREy?reservedkeyword^?require-^functionO%SBTTLyreservedkeyword^title-^functionOG%SIXBITyGreserved keyword(36)^Gstring-^literalO%SIZEyreservedkeyword^ allocation-^\functionO%STRINGyreservedkeyword^string-^#functionO %SWITCHESyreservedkeyword^ compiler-^state-^8functionO,%THENy,reservedkeyword^,lexical-^y conditionalO%TITLEyreservedkeyword^title-^@functionO4%UNQUOTEy4reservedkeyword^4quote-^functionO%UPVALyreservedkeyword^ predeclared^IliteralO<%VARIANTy<reservedkeyword^< compiler-^state-^functionO%WARNyreservedkeyword^ advisory-^functiony O OO IdentifieryClassification^Usage O~ ?T O%Xyreservedkeyword^integer-^literal O   e)OTableB-1:8ASCIICodeTable O OFOctalOCode zFHexzCodeFASCIIChar.FOctalCode FHexCode&FASCII&Char.PFOctalPCode {FHex{Code FASCII Char. O "O00000NUL0532B+P12656V"O00101SOH0542C,P12757W"O 00202STX0552D-P 13058X"O00303ETX0562E.P13159Y"O00404EOT0572F/P1325AZ"Oz00505ENQ060300Pz1335B["O00606ACK061311P1345C\"Om00707BEL062322Pm1355D]!O01008BS063333P1365E^!Oa01109HT064344Pa1375F_!O0120ALF065355P14060!OT0130BVT066366PT14161a!O0140CFF067377P14262b!OH0150DCR070388PH14363c!O0160ESO071399P14464d!O; 0170FSI0723A:P; 14565e"O 02010DLE0733B;P 14666f"O/ 02111DC10743C<P/ 14767g"O 02212DC20753D=P 15068h"O" 02313DC30763E>P" 15169i"O 02414DC40773F?P 1526Aj.O 02515NAK10040@1536Bk.O 02616SYN10141A1546Cl"O 02717ETB10242BP 1556Dm.O 03018CAN10343C1566En   O OOctalO+Code zHexz+CodeASCII+Char.Octal+Code Hex+Code&ASCII&+Char.POctalP+Code {Hex{+Code ASCII +Char. OF -O03119EM10444D1576Fo"O?0321ASUB10545EP?16070p"O0331BESC10646FP16171q-O30341CFS10747G16272r-O0351DGS11048H16373s!O&0361ERS11149IP&16474t!O0371FUS1124AJP16575u0O04020space1134BK16676vO04121!1144CLP16777wO04222  " 1154DM17078xO04323# 1164EN17179yO04424$ 1174FO1727Az O{04525%12050PP{1737B{,O04626&12151Q1747C|On04727 n ' n12252R1757D}O05028(12353SP1767E~Ob 05129)b 12454TPb 1777FDELO 0522A  * 12555U O  O B.!String! EncodingsNOThisappendix describestheseveraltypesofcharacter-string4O encodingsusedintheBLISS dialects: h ` <InBLISS-16and BLISS-32:'ASCIIandRAD50_11 `O 7OIn BLISS-36:'ASCII, RAD50_10,andSIXBIT} G  ,OTableB-2:8RAD50_11CodeTable O FFirst CharacterFSecond CharacterFThird Character Ob 5OBlank000000Blank000000Blank000000 OEAE003100AE000050AE000001 OB006200B000120B000002 O8C8011300C8000170C8000003 OD014400D000240D000004 O,E,017500E,000310E,000005 OF022600F000360F000006 O G 025700G 000430G 000007 OH031000H000500H000010 OI034100I000550I000011 OJ037200J000620J000012 OK042300K000670K000013 OL045400L000740L000014 OM050500M001010M000015 OtNt053600Nt001060Nt000016 OO056700O001130O000017 Og Pg 062000Pg 001200Pg 000020 O Q 065100Q 001250Q 000021 O[ R[ 070200R[ 001320R[ 000022 O S 073300S 001370S 000023 OO TO 076400TO 001440TO 000024 O U 101500U 001510U 000025 OB VB 104600VB 001560VB 000026 O W 107700W 001630W 000027 O6 X6 113000X6 001700X6 000030 O Y 116100Y 001750Y 000031   O First CharacterSecond CharacterThird Character O  OxZx121200Zx002020Zx000032 O$124300$002070$000033 Ol.l127400.l002140.l0000348OUnused132500Unused002210Unused000035 O_0_1356000_0022600_000036 O114070010023301000037 OS2S1440002S0024002S000040 O314710030024503000041 OF4F1522004F0025204F000042 O515530050025705000043 O:6:1604006:0026406:000044 O716350070027107000045 O-8-1666008-0027608-000046 O917170090030309000047 O    ,OTableB-3:8RAD50_10CodeTable O BF Rightmost CharacterCode5FSecond CharacterfromRight'Third CharacterfromRight O GOBlankG 000000000000BlankG 000000000000BlankG 000000000000;O0 0000000000010 0000000000500 000000003100;O 1 0000000000021 0000000001201 000000006200;O2 0000000000032 0000000001702 000000011300;O3 0000000000043 0000000002403 000000014400;Oz4 0000000000054 0000000003104 000000017500;O5 0000000000065 0000000003605 000000022600;Om6 0000000000076 0000000004306 000000025700;O7 0000000000107 0000000005007 000000031000;Oa8 0000000000118 0000000005508 000000034100;O9 0000000000129 0000000006209 000000037200;OTA 000000000013A 000000000670A 000000042300;OB 000000000014B 000000000740B 000000045400;OHC 000000000015C 000000001010C 000000050500;OD 000000000016D 000000001060D 000000053600;O; E 000000000017E 000000001130E 000000056700;O F 000000000020F 000000001200F 000000062000;O/ G 000000000021G 000000001250G 000000065100;O H 000000000022H 000000001320H 000000070200;O" I 000000000023I 000000001370I 000000073300;O J 000000000024J 000000001440J 000000076400;O K 000000000025K 000000001510K 000000101500;O L 000000000026L 000000001560L 000000104600;O M 000000000027M 000000001630M 000000107700;O N 000000000030N 000000001700N 000000113000@   O B Rightmost+ CharacterCode5Second Character+fromRight'+Third CharacterfromRight OF ;OO 000000000031O 000000001750O 000000116100;O?P 000000000032P 000000002020P 000000121200;OQ 000000000033Q 000000002070Q 000000124300;O3R 000000000034R 000000002140R 000000127400;OS 000000000035S 000000002210S 000000132500;O&T 000000000036T 000000002260T 000000135600;OU 000000000037U 000000002330U 000000140700;OV 000000000040V 000000002400V 000000144000;OW 000000000041W 000000002450W 000000147100;OX 000000000042X 000000002520X 000000152200;OY 000000000043Y 000000002570Y 000000155300;OZ 000000000044Z 000000002640Z 000000160400;O{. 000000000045. 000000002710. 000000163500;O$ 000000000046$ 000000002760$ 000000166600;On% 000000000047% 000000003030% 000000171700 O    o ,OTableB-4:8RAD50_10CodeTable O Fourth Character;gfromRightcFifth CharactergfromRight'gSixth CharacterfromRight O GOBlankG 000000000000BlankG 000000000000BlankG 000000000000;Oe0 0000001750000 0000116100000 000606500000;O1 0000003720001 0000234200001 001415200000;OY2 0000005670002 0000352300002 002223700000;O3 0000007640003 0000470400003 003032400000;OM4 0000011610004 0000606500004 003641100000;O5 0000013560005 0000724600005 004447600000;O@6 0000015530006 0001042700006 005256300000;O7 0000017500007 0001161000007 006065000000;O48 0000021450008 0001277100008 006673500000;O9 0000023420009 0001415200009 007502200000;O'A 000002537000A 000153330000A 010310700000;OB 000002734000B 000165140000B 011117400000;OC 000003131000C 000176750000C 011726100000;OD 000003326000D 000210560000D 012534600000;O E 000003523000E 000222370000E 013343300000;O F 000003720000F 000234200000F 014152000000;O G 000004115000G 000246010000G 014760500000;O{ H 000004312000H 000257620000H 015567200000;O I 000004507000I 000271430000I 016375700000;Oo J 000004704000J 000303240000J 017204400000;O K 000005101000K 000315050000K 020013100000;Oc L 000005276000L 000326660000L 020621600000;O M 000005473000M 000340470000M 021430300000;OV N 000005670000N 000352300000N 022237000000C   O Fourth Character;+fromRightcFifth Character+fromRight'+Sixth CharacterfromRight OF ;OO 000006065000O 000364110000O 023045500000;O?P 000006262000P 000375720000P 023654200000;OQ 000006457000Q 000407530000Q 024462700000;O3R 000006654000R 000421340000R 025271400000;OS 000007051000S 000433150000S 026100100000;O&T 000007246000T 000444760000T 026706600000;OU 000007443000U 000456570000U 027515300000;OV 000007640000V 000470400000V 030324000000;OW 000010035000W 000502210000W 031132500000;OX 000010232000X 000514020000X 031741200000;OY 000010427000Y 000525630000Y 032547700000;OZ 000010624000Z 000537440000Z 033356400000;O{. 000011021000. 000551250000. 034165100000;O$ 000011216000$ 000563060000$ 034773600000;On% 000011413000% 000574670000% 035602300000 O  )OB.1CASCIIEncodingHOUAnASCIIstring-literalisacommonwayofencodingaMO character sequence.)ThesizeofanASCII characterpositionMOvarieswiththedialectasfollows:)InBLISS-16andBLISS-NO^32,one characteroccupiesan8-bitbyte;in BLISS-36,eachNO36-bitwordcontainsfiveASCII character positions,eachof'Owhichoccupiessevenbits. ! KOThecodevalueforeachASCII charactercanbefoundin _B-1Xa64T O12 z*37?X65UOT13+T40@XT66VO14,41AX67WOH15-H42BXH70XO16.43CX71YO; 17/; 44DX; 72ZO 200 45EX 73[O/ 211/ 46FX/ 74\O 222 47GX 75]O" 233" 50IX" 76^O 244 51JX 77_O 255 52K O<   ! ^!OB.2CRadix-50EncodingPO(ARadix-50string-literal specifiesa particularwayofencod-NOingandpackingasequenceof characters.(The charactersinLOthestring-literalmustbemembersoftheRadix-50charac-PO1terset,whichisa 40-charactersubsetoftheASCIIgraphicOO characters.*ThissubsetisthesameforallthreeBLISSdi-OOalects,butthedetailsofencodingandpackingvarybetweenAO;BLISS-16andBLISS-32ononehand (RAD50_11)andGOBLISS-36ontheother (RAD50_10).*Thesetwo variationsIOofRadix-50encodingare describedinthe followingtwoOE subsections.n VD#OB.2.1CRAD50_11EncodingGO4InBLISS-16and BLISS-32,Radix-50encodingisinvoked6Owiththe %RAD50_11stringfunction(seeBSection4.3).Ase-IOquenceofRadix-50 charactersispackedthree characters3O=per16-bitword,as describedbelow.* BO|?1 QOIf necessary,trailingblanksareaddedsothatthenumberofPO charactersinthesequenceisamultipleof3.*Thenthese-NOiquenceisdividedintogroupsofthree characters.*Thecode2Oforeach characterisobtainedfromdB-2, basedonboththeQO characteranditspositioninitsgroup.*ThentheoctalcodesQOrforeach characterinagroupareaddedtogethertoobtainaO16-bitvalue.* d? N N$;OForexample,ifthestring-literal %RAD50_11 ' AB d'iseval-COuated,atrailingblankisadded,giving %RAD50_11 ' AB L' |.DO5Thentheliteralisencodedandpackedasfollows:& #OA(asfirst character)=003100/O]B(assecond character)=0001202OBlank(asthird character)=000000 @P%RAD50_ O11  ' AB  'P=003220(octal))  aIOThe characterencodingtableisderivedasfollows..TheJORadix-50 charactersetiscomposedof50(octal)charac-RO5ters.(These charactersaretreatedasthedigitsofaradix-50KOnumbersystem.*Supposetheith characterofthesetmustOObeencoded.* Dependingonwhetheritisthefirst (leftmost),RO>second,orthird characterofa sequence,the characterisen-Ocodedas50 * 50 f*i,50 #*;Hi,ori(alloctal).*Thevalue50(octal)QOwaschosenastheradixbecauseitisthelargestvaluethatNOHpermitsthepackingofthree charactersintoa16-bitword.h )>#OB.2.2CRAD50_10EncodingCOIn BLISS-36, Radix-50encodingisinvokedwiththe+O_ %RAD50_10stringfunction(see_Section4.3)._AsequenceMOofRadix-50 charactersisencodedandpackedsix characters3Oper36-bitword,as describedbelow.* "~? <QOThesequenceisdividedintogroupsofsix characters.)IfthePOlast(oronly)groupcontainslessthansix characters,lead-UOiingblanksareaddedtothegroupinordertoextendittosixQO characters.'Foreachofthesegroups,thecodeforeachchar-#Oacterisobtainedfrom xB-3 "andB-4,&|whichlistcodesstartingOOrwiththe righthand character.((Notethatthistablehassev-MOeral differencesfromtheRAD50_11table.)(Thentheseoctal:O#codesareaddedtoobtaina36-bitvalue.* x? * ? J N ;OForexample,ifthestring-literal %RAD50_11 'ABCD ' GisJO evaluated,twoleadingblanksareadded,giving %RAD50-11 O5'5ABCD y5'G5.Thentheliteralisencodedandpackedasfollows:\ Z2'OD(as rightmost character)= 000000000016)O]C(assecond characterfromOright)]= 000000001010AO$B(asthird characterfromright)B= 000000045400)OA(asfourth characterfromOright)= 000002537000,OeBlank(asfifth characterfromOright)e= 000000000000,O,Blank(assixth characterfromOzright),= 000000000000 ; %RAD50_10 a 'OAABCD A '"= 000002605426(octal) ! aNOTheRAD50_10 characterencodingtableisderivedasfollows.OOTheRadix-50 charactersetiscomposedof50(octal)charac-RO5ters.(These charactersaretreatedasthedigitsofaRadix-50POnumbersystem.*Iftheith characterofthesetwhichislo-NOcatedasthenth characterfromtherightinagroupmust4O>beencoded,itis representedas(50 (J**s>(n-1)) XJ*}>i(wherenum-Obersareoctaland **2Xdenotesexponentiation).+ThusifsixNO charactersarenumberedfromrighttoleftinthe followingOHform:V ,,OC(6)C(5)C(4)C(3)C(2)C(1)% KOwhereC(n)istheoctalcodeforthenth character,theGORAD50_10representationofthe characterstringcanbe(O5 generatedbythe following:AO 7((((((C(6)*50)+C(5))*50+C(4))*50+C(3))*50+C(2))*50+C(1)T **Owhereallnumbersareoctal. ! JYOB.3CSixbitEncodingJO(In BLISS-36,SIXBITencodingisinvokedwiththe%SIXBIT Ostringfunction(seeSection4.3).'SIXBITencodingappliestoLOthe 64-charactergraphicsubsetoftheASCII characters.(AEO1sequenceofSIXBIT charactersisencodedasfollows.* C|?  POAcharacter-sequenceisdividedintogroupsofsix characters,TOwithtrailingblanksaddedtofillthefinal(oronly)groupofNOisix,if necessary.) Lowercaselettersare convertedtoupper-AOcaseandthenthe6-bit charactercodefoundin&TableB-5POisobtainedforeach character.)Thesesix6-bitcodesformaOrfullword (36-bits).* &m?    (OC.!Transportability"CheckingNOdThisappendix describesthetransportabilitycheckingthatisHO performedbyeachcompilerinresponsetotheLANGUAGE(Ospecial-switch.(SeeSectionsL18.2 and19.2Aforthe description7OnoftheLANGUAGEswitch,and particularlynSection18.2.5 nfor/Oageneral discussionofitsuse.* L?B * ? * 1?]  ! IOWhentransportabilitycheckingis performed,thecompilerOOscansthesourceinputforanyofthelanguagefeaturesde-KOiscribedbelow,andissuesawarningmessage reportinganyKO occurrenceofsuch features.+Twoclassesoftransportabil-KOitycheckingare currently provided, dependingonhowtheLOr language-listis specifiedintheLANGUAGEswitch.'Thetwo$Oclassesareasfollows:  AO`1.:FullTransportabilityCheckingis performedifanyoneofJ(the followingspecificationsappearsinthelanguage-list: cYCOMMONY(BLISS16,BLISS36YBLISS32,BLISS36!YBLISS16,BLISS32,BLISS36~ fTMbAll dialectal constructsarechecked,aswellasanyotherE constructlikelytocauseproblemsin transportinga6programbetweenanytwotargetsystems.D`2.:BLISS-16/BLISS-32SubsetCheckingis performedifGthe specificationBLISS16,BLISS32appearsinthelan-MDguagelist.)Thisisasomewhatrelaxedformoffull(thatFis,CommonBLISS) checking.)Certain dialectalfeaturesGthatarevalidinbothBLISS-16andBLISS-32arenot'Mcheckedforinthiscase.  aqDOWhennoLANGUAGEswitchappearsinthe module-head,QOorwhenaswitchthat specifiesorimpliesonlyone language-FO5nameappearsineitherthe module-headoraSWITCHESMO declaration,notransportabilitycheckingisdonewithintheMOmoduleorwithinthescopeofthe declaration, respectivelyUO>(exceptthattheswitchspecification,if explicit,ischeckedforJO validity).*If specified,theLANGUAGEswitchmustincludeKO(orimply)the language-name correspondingtothecompilerOHinuse. NKOThespecificlanguage constructsinvolvedinfullcheckingJOandinBLISS-16/BLISS-32subsetcheckingare describedin$O5separatesectionsbelow.> /OC.1BFullTransportabilityCheckingKOUThe dialectalor problematiclanguagefeaturescheckedforOOandreportedonunderfullcheckingare categorizedbelowinO alphabeticalorder.v LO Attributes8-The dialectal attributesareasfollows:9 G ` $Addressing-mode attribute `O OAlignment-attribute ` 3Allocation-unitsBYTE,WORD,andLONG `N <NExtension-attributesSIGNEDandUNSIGNED(when<usedasextension-attributes,seenotebelow) `& &Weak-attribute _UNote _</ThekeywordSIGNEDorUNSIGNEDwhenusedasIpartofarange-attributeinaliteral-declarationisa#CommonBLISS construct. + ,O Built-innamesand declarations-The occurrence,inBOaBUILTIN declaration,ofany built-in-nameexcept3O5 ACTUALCOUNTorACTUALPARAMETER(common+Olinkage-functions)is reported. N'O Conditionhandlingfeatures#A-AnyuseofanENABLEIO declaration expressionis reported.-Useof parametersto"O5 SETUNWINDis reported.  ZO Field selectorsC4-Anyfield-selectorthat specifiesafieldnoten-POtirely containedwithinafullwordis reported.*(Thatis,theLO5positionandsizevaluesmustnotexceed%BPVAL,andnei-POthermusttheirsum.)'Also,anyfield-referencethatdoesnotQOmodifyafetchorstore operationandwhosepositionvalueisOO>notzerois reported.)Notethatthefield-selector parametersKOmustbe compile-timeconstant expressionsforthecompiler&Otoperformthis checking. N&O GLOBALandEXTERNALnames# -The occurrenceofanyMOglobal-or external-namethatisnotunique (throughouttheEO5module)withinitsfirstsix charactersis reported. eO Linkage declarations36-Anyuseofalinkage-declarationisO reported.  5O Linkage switches andlinkage attributes-Theuseof:Oany linkage-nameotherthan FORTRAN_FUNCorGO5 FORTRAN_SUBinalinkage-switchorlinkage-attributeisO reported. iO LiteralsD_ -Occurrencesofthe followingkindsofliteralsareO reported: l ` E%E,%D,%G,and%Hnumeric-literals (floatingpoint)5(and%Pstring-literals(packeddecimal) ` KAnystring-literalusedasaprimary expression(thatis,nota plit-item) ` GAn alphanumericstring-literalwitha string-typeother#than%ASCIIor%ASCIZ. zO Module-switches8-The occurrencesofanyofthe following)Omodule-switchesare reported: bO PSECT declarations2'-AnyuseofaPSECT declarationisO reported.U ++OADDRESSING_MODEOTS OTS_LINKAGE vO Switches6-The occurrenceofADDRESSING_MODEina.OSWITCHES declarationis reported.] w32OC.2BBLISS-16/BLISS-32SubsetCheckingNOUTheslightlyless restrictivesetoflanguagefeatures(rel-LOativetofull checking)checkedforandreportedonunderIOBLISS-16/BLISS-32subsetcheckingis categorizedbelowinO^ alphabeticalorder. AO (Briefly, the allocation-unitsBYTE andWORD,theDOextension-unitsSIGNEDand UNSIGNED,andthestring-IO5type %RAD50_11are considered transportable constructsinOthiscase.)x NO Attributes:-The attributescheckedonareasfollows: g ` $Addressing-mode attribute `O OAlignment-attribute ` Allocation-unitLONG `N NWeak-attribute ,O Built-innamesand declarations-The occurrence,inCOaBUILTIN declaration, ofanybuilt-innameexcept3O5 ACTUALCOUNTorACTUALPARAMETER(common+Olinkage-functions)is reported. p&O Condition-handlingfeatures+O-AnyuseofanENABLEdecla-Orationis reported.  ZO Field selectorsC4-Anyfield-selectorthat specifiesafieldnoten-POtirely containedwithinafullwordis reported.*(Thatis,theLO5positionandsizevaluesmustnotexceed%BPVAL,andnei-POthermusttheirsum.)'Also,anyfield-referencethatdoesnotQOmodifyafetchorstore operationandwhosepositionvalueisOO>notzerois reported.)Notethatthefield-selector parametersKOmustbe compile-timeconstant expressionsforthecompiler&Otoperformthis checking. N&O GLOBALandEXTERNALnames# -The occurrenceofanyMOglobal-or external-namethatisnotunique (throughouttheEO5module)withinitsfirstsix charactersis reported. eO Linkage declarations36-Anyuseofalinkage-declarationisO reported.!  5O Linkageswitchesandlinkage attributes-Theuseofany?O linkage-nameotherthanBLISS,FORTRAN,FORTRAN_EO5FUNC,or FORTRAN_SUBinalinkage-switchorlinkage-"O attributeis reported. iO LiteralsD_ -Occurrencesofthe followingkindsofliteralsareO reported: } ` E%E,%D,%G,and%Hnumeric-literals (floatingpoint)5(and%Pstring-literals(packeddecimal) ` KAnystring-literalusedasaprimary expression(thatis,nota plit-item) ` DAn``alphanumeric''string-literalwitha string-type7otherthan%ASCII,%ASCIZ,or %RAD50_11. zO Module-switches8-The occurrencesofanyofthe following)Omodule-switchesare reported: bO PSECT declarations2'-AnyuseofaPSECT declarationisO reported.U ++OADDRESSING_MODEOTS OTS_LINKAGE vO Switches6-The occurrenceofADDRESSING_MODEina.OSWITCHES declarationis reported.g ! =!O D.!Built-In! FunctionsPOThisappendixliststhenamesofthebuilt-inmachine-specificOO functions predefinedforeachBLISSdialect.'Detaileddescrip-LOBtionsofthese functionsmaybefoundintheusermanual1O associatedwitheachBLISSdialect.   4OD.1BBLISS-16Machine-Specific FunctionsLOUThe followingliststhe predefinedBLISS-32machine-specific#O functionsby operation.Y //OD.1.1BMemory Management Operations 1OMFPDfMovefrompreviousdataspace/O]MTPDfMovetopreviousdataspace8OPMFPIvMovefromprevious instructionspace6OMTPIvMovetoprevious instructionspaceX ..OD.1.2B ProcessorStatus Operations i9OMFPSpMovebytefrom processorstatusword7O]MTPSpMovebyteto processorstatusword#OPSPLSetprioritylevelX ..OD.1.3BBit Manipulation OperationsZ v0OROTRotateO]SWABfSwapbytesQ ''OD.1.4B Arithmetic Operations7  )OADDDfAdd D-floatingoperands)O]ADDFkAdd F-floatingoperands(OADDMVAdd multiwordoperands,ODIVDvDivide D-floatingoperands,ODDIVF{Divide F-floatingoperands*O7EDIV{Extended-precisiondivide,OEMUL`Extended-precisionmultiply.OMULD[Multiply D-floatingoperands.OMULF`Multiply F-floatingoperands.OSUBDvSubtract D-floatingoperands.OSUBF{Subtract F-floatingoperands-OSUBMfSubtract multiwordoperands] 33OD.1.5B Arithmetic Comparison Operations -OCMPD`Compare D-floatingoperands-O]CMPFfCompare F-floatingoperands,OCMPMPCompare multiwordoperands] 33OD.1.6B Arithmetic Conversion OperationsV P,4OCVTDFnConvert D-floatingto F-floating4O]CVTFDnConvert F-floatingto D-floating1OPCVTDIyConvert D-floatingtointeger1OCVTIDyConvertintegerto D-floating1OCVTFI~Convert F-floatingtointeger1O7CVTIF~Convertintegerto F-floatingX ..OD.1.7B ProcessorAction Operations OBPT BreakpointtrapO]HALTkHalt processorONOPNo operation OPRESETVResethardwareOWAITk ProcessorwaitT **OD.1.8B Miscellaneous OperationsT **ODECXp Specializedroutinecall})gINDEXINDEX!i  iAAOS!!8 ABSstandardfunctionABS standard function/S 8 ABSOLUTEABSOLUTE\S''N8 inaddressing-mode-attributein addressing-mode-attribute7LSN8 inmodule-switch(16)in module-switch(16) LSN9 inmodule-switch(32)in module-switch(32) 6S N9 inswitchin switchI 9S8 Access-actualAccess-actual`S))N8 indefault-structure-referencein default-structure-reference`S))N8 ingeneral-structure-referencein general-structure-referencebS **N8 inordinary-structure-referencein ordinary-structure-referenceJSN8 inpreset-attributein preset-attribute=S8 Access-formalAccess-formal\S''8 ACTUALCOUNTlinkage-functionACTUALCOUNT linkage-functiondS!++9 ACTUALPARAMETERlinkage-functionACTUALPARAMETER linkage-function5S 9 ADAWI(32)ADAWI(32) ?S8 ADDD(16,32,36)ADDD(16,32,36) ?S8 ADDF(16,32,36)ADDF(16,32,36) 9S 8 ADDG(32,36)ADDG(32,36) 3S 8 ADDH(32)ADDH(32) FS9 AdditionoperatorAddition operatorP9S 9 ADDM(16,32)ADDM(16,32) -S8 AddressAddress`S))N8 indefault-structure-referencein default-structure-referenceHSN8 infield-referencein field-reference.<S8 AddressoffsetAddress offsetPS!!N9 inalignment-attributein alignment-attributeDS8 Address,encodedAddress, encoded>DS9 AddressableunitAddressable unit4S N9 usageofusage of03S 8 AddressingAddressingUS$$N8 dialectal differencesindialectal differences in.BSN8 introductiontointroduction to.US##8 Addressing-mode-attributeAddressing-mode-attribute7TS##N9 inexternal-routine-declin external-routine-declRS""N9 inforward-routine-declin forward-routine-decl^S.#8 Addressing-mode-attribute C *Addressing-mode-attribute *HSN8 aspsect-attributeas psect-attribute =S8 ADDRESSING_MODEADDRESSING_MODE<S N8 in attributein attribute7LSN9 inmodule-switch(16)in module-switch(16) LSN9 inmodule-switch(32)in module-switch(32) LSN8 inmodule-switch(36)in module-switch(36) 6S N8 inswitchin switchI IS8 Alignment-attributeAlignment-attributeRS(8 Alignment-attribute B *Alignment-attribute *HSN8 aspsect-attributeas psect-attribute LS8 %ALLOCATIONfunction%ALLOCATION functionj HS9 Allocation functionsAllocation functionsQS""N9 for characterhandlingfor character handling AS8 Allocation-actualAllocation-actual`S))N8 ingeneral-structure-referencein general-structure-referencePS!!N8 instructure-attributein structure-attributeGS8 Allocation-defaultAllocation-defaultES9 Allocation-formalAllocation-formal=S9 Allocation-unitAllocation-unit<S N8 as attributeas attribute`S))N8 ingeneral-structure-referencein general-structure-reference2SN8 inplitin plitPS!!N8 instructure-attributein structure-attribute9S 9 AlternativeAlternative[S''9 ALWAYSinselect-expressionALWAYS in select-expressionPS""8 ANDasinfixoperatorAND as infix operatord3S 9 ApostropheApostropheVS$$N8 incharacter-code-literalin character-code-literalDSN8 in float-literalin float-literalHSN8 ininteger-literalin integer-literalFSN8 instring-literalin string-literalRS""9 ARGPTRlinkage-functionARGPTR linkage-function@S9 ArgumentblockArgument blockDS8 ArgumentpassingArgument passingfS++8 Argumentpointer(AP)registerArgument pointer (AP) registeraS!,,8 Arithmetic comparison operationsArithmetic comparison operations-SN8 builtinbuiltinSS9 D-floating(16,32,36)D-floating(16,32,36) SS9 F-floating(16,32,36)F-floating(16,32,36) IS8 G-floating(32,36)G-floating(32,36) ?S8 H-floating(32)H-floating(32) GS8 multiword(16,32)multiword(16,32) )SN8 infixinfix1S9 addressaddressV@S8 signedintegersigned integerVDS8 unsignedintegerunsigned integerVaS!,,9 Arithmetic conversion operationsArithmetic conversion operationsMSN9 builtin(16,32,36)builtin(16,32,36) NS  8 Arithmetic expressionArithmetic expressionJJS  8 Arithmetic operationsArithmetic operations-SN8 builtinbuiltinSS8 D-floating(16,32,36)D-floating(16,32,36) SS9 F-floating(16,32,36)F-floating(16,32,36) IS9 G-floating(32,36)G-floating(32,36) ?S8 H-floating(32)H-floating(32) GS8 multiword(16,32)multiword(16,32) @SN8 signedintegersigned integerJWS''8 Arithmeticshift operationsArithmetic shift operations1SN9 ASH(36)ASH(36) 7S N9 packed(32)packed(32) 3S N8 quad(32)quad(32) /SN8 signedsigned=)S8 ArrayArrayQS""N8 (seeVECTOR structure)(see VECTOR structure)US$$8 %ASCICinstring-literal%ASCIC in string-literalUS$$8 %ASCIDinstring-literal%ASCID in string-literal)S9 ASCIIASCII8S N9 codetablecode table 3S N8 encodingencoding US$$8 %ASCIIinstring-literal%ASCII in string-literalUS$$8 %ASCIZinstring-literal%ASCIZ in string-literal1S8 ASH(36)ASH(36) 3S 9 ASHP(32)ASHP(32) 3S 9 ASHQ(32)ASHQ(32) /S 8 ASSEMBLYASSEMBLYDSN8 in module-switchin module-switch 6S N8 inswitchin switchI DS8 %ASSIGNfunction%ASSIGN function NS  9 Assignment expressionAssignment expressionoBSN9 introductiontointroduction to6=S9 AssociativityAssociativityMS  9 AsteriskasoperatorAsterisk as operatorK5S 8 AttributeAttributeBSN8 for formal-namefor formal-nameESN8 ina declarationin a declarationESN8 summaryofusagesummary of usageF>S 9 Attribute C *Attribute *BSN9 introductiontointroduction toO!i  iBBOS!!8 %Bininteger-literal%B in integer-literalAS8 BEGINinblockBEGIN in blockr7S 8 BICPSW(32)BICPSW(32) +S9 BINARYBINARYDSN9 in module-switchin module-switch 6S N8 inswitchin switchI DS8 Binary operatorsBinary operators-S8 BindingBindingSS##N8 inconstant expressionsin constant expressionsOS!!N8 inlexical processingin lexical processingZBSN8 introductiontointroduction tod7S 9 BISPSW(32)BISPSW(32) WS''9 Bit manipulation operationsBit manipulation operationsCSN8 builtin(16,32)builtin(16,32) @S8 Bit operationsBit operationsc1S 8 Bit-countBit-countHSN8 inrange-attributein range-attribute/PS!!9 bit-position numberingbit-position numberingHTS!!9 Bit-position numberingBit-position numbering^bAS8 BitspervalueBits per valueJS8 BITVECTOR structureBITVECTOR structure8S N8 exampleofexample ofCBS8 Blank characterBlank characterBS8 %BLISSfunction%BLISS function <S 9 BLISSSystemBLISS Systemr:S 9 BLISSvalueBLISS value/S 8 BLISS10CBLISS10CLSN9 inmodule-switch(36)in module-switch(36) 5S 8 BLISS10_OTSBLISS10_OTSLSN8 inmodule-switch(36)in module-switch(36) -S8 BLISS16BLISS16DSN8 in module-switchin module-switch 6S N9 inswitchin switchI -S9 BLISS32BLISS32DSN8 in module-switchin module-switch 6S N8 inswitchin switchI -S8 BLISS36BLISS36DSN8 in module-switchin module-switch 6S N9 inswitchin switchI 7S 9 BLISS36C_OTSBLISS36C_OTSLSN8 inmodule-switch(36)in module-switch(36) -S8 BlockBlockr8S N8 asprimaryas primary8S N8 exampleofexample of8S N9 purposeofpurpose ofjBS8 BLOCK structureBLOCK structure 8S N9 exampleofexample ofJ8S N9 macrosformacros for 6S8 Block oC *Block *BSN8 introductiontointroduction to@NS  8 BLOCKVECTOR structureBLOCKVECTOR structure18S N8 exampleofexample ofRHS9 Boolean expressionBoolean expressionc/S 9 BoundaryBoundaryPS!!N8 inalignment-attributein alignment-attributeVS$$8 Bounds-checking structureBounds-checking structure>LS8 %BPADDR literal-name%BPADDR literal-name7S 8 BPT(16,32)BPT(16,32) LS9 %BPUNIT literal-name%BPUNIT literal-nameJS9 %BPVAL literal-name%BPVAL literal-name>S8 Brace characterBrace characterCSN8 insyntaxrulesin syntax rules-S8 BracketBracketQS""N8 asdefault punctuationas default punctuation VS$$N8 inmacro-actual-parameterin macro-actual-parameter 3S 8 BUGL(32)BUGL(32) :S9 BuiltinnamesBuiltin namesWS$$N9 machine-specific-functionsmachine-specific-functions PS!!N8 predefined identifierspredefined identifiersr VS(8 Builtin-declaration B *Builtin-declaration *f OS!!8 BYinloop-expressionBY in loop-expressionLS8 BYTEallocation-unitBYTE allocation-unitYS((9 Byte manipulation operationsByte manipulation operations9S N9 builtin(36)builtin(36) @S 8 BytepointerByte pointerw !i  iCC]S((8 %Cincharacter-code-literal%C in character-code-literalXS##8 CALLlinkage-type(16,32)CALL linkage-type(16,32)Bk5S 9 CALLG(32)CALLG(32) @S9 CallingsequenceCalling sequence<S N8 controlovercontrol over<S N9 VAXstandardVAX standard^WS%%8 Carriagereturn characterCarriage return characterGS8 Case(ofletters)Case (of letters)>S8 CaseanalysisCase analysisAS8 Case-expressionCase-expressionJS$8 Case-expression B *Case-expression *BSN9 introductiontointroduction to]3S 9 Case-labelCase-labelHSN8 incase-expressionin case-expression1S 8 Case-lineCase-lineHSN8 incase-expressionin case-expressionPS!!8 CH$ALLOCATIONfunctionCH$ALLOCATION function JS9 CH$A_RCHARfunctionCH$A_RCHAR function JS9 CH$A_WCHARfunctionCH$A_WCHAR function JS8 CH$COMPAREfunctionCH$COMPARE function: DS8 CH$COPYfunctionCH$COPY function( DS8 CH$DIFFfunctionCH$DIFF function BS8 CH$EQLfunctionCH$EQL function: DS8 CH$FAILfunctionCH$FAIL functionV DS8 CH$FILLfunctionCH$FILL function% JS9 CH$FIND_CHfunctionCH$FIND_CH functionN RS""9 CH$FIND_NOT_CHfunctionCH$FIND_NOT_CH functionQ LS8 CH$FIND_SUBfunctionCH$FIND_SUB functionS BS8 CH$GEQfunctionCH$GEQ function: BS8 CH$GTRfunctionCH$GTR function: BS8 CH$LEQfunctionCH$LEQ function: BS9 CH$LSSfunctionCH$LSS function: DS9 CH$MOVEfunctionCH$MOVE function" BS8 CH$NEQfunctionCH$NEQ function: DS8 CH$PLUSfunctionCH$PLUS function BS8 CH$PTRfunctionCH$PTR function FS8 CH$RCHARfunctionCH$RCHAR function JS9 CH$RCHAR_AfunctionCH$RCHAR_A function FS9 CH$SEQUENCEmacroCH$SEQUENCE macro DS8 CH$SIZEfunctionCH$SIZE function NS  8 CH$TRANSLATEfunctionCH$TRANSLATE functione PS!!8 CH$TRANSTABLEfunctionCH$TRANSTABLE functionc FS8 CH$WCHARfunctionCH$WCHAR function JS8 CH$WCHAR_AfunctionCH$WCHAR_A function @S8 %CHARfunction%CHAR function5S 9 CharacterCharacter@S9 CharacterdataCharacter data HSN8 representationsofrepresentations of[HS8 CharacterhandlingCharacter handling 5S N8 functionsfunctions 7S N8 operationsoperations BS9 characterpointercharacter pointer9S N9 descriptiondescriptionbCSN8 representationrepresentationnvDS8 CharactersequenceCharacter sequenceCSN8 excessively-longexcessively-long=SN8 internal-onlyinternal-onlyWS''9 Characterstring operationsCharacter string operations9S N9 builtin(32)builtin(32) OS  9 Character-code-literalCharacter-code-literalZS&&9 Character-reading functionsCharacter-reading functions ZS&&8 Character-writing functionsCharacter-writing functions JS8 %CHARCOUNTfunction%CHARCOUNT function 3S 8 CHMx(32)CHMx(32) VS$$8 CLEARSTACKlinkage-optionCLEARSTACK linkage-optionE5S 9 CMPC3(32)CMPC3(32) 5S 9 CMPC5(32)CMPC5(32) ?S8 CMPD(16,32,36)CMPD(16,32,36) ?S8 CMPF(16,32,36)CMPF(16,32,36) 9S 8 CMPG(32,36)CMPG(32,36) 3S 8 CMPH(32)CMPH(32) 9S 9 CMPM(16,32)CMPM(16,32) 3S 9 CMPP(32)CMPP(32) 'S8 CODECODEDSN8 in module-switchin module-switch LSN8 inpsect-declarationin psect-declaration MS  8 $CODE$defaultpsect$CODE$ default psect 9S 8 CODECOMMENTCODECOMMENT)S8 ColonColonDSN8 in labeled-blockin labeled-blockr)S9 CommaCommaVS$$N9 inmacro-actual-parameterin macro-actual-parameter 1S8 CommentComment3S 8 COMMENTARYCOMMENTARYDSN8 in module-switchin module-switch 6S N8 inswitchin switchI +S9 COMMONCOMMONDSN9 in module-switchin module-switch 6S N8 inswitchin switchI _S))8 Comparing character sequencesComparing character sequences6 FS8 ComparisonoperatorComparison operatorz';&N8 (see arithmetic comparison operations)(see arithmetic comparison operations)V5S 9 CompilationCompilationBSN9 introductiontointroduction tovRS##N8 oflibrarysourcefileof library source file 2SN8 roleofrole of'_S!**8 Compile-time-constant-expressionCompile-time-constant-expression>SN8 definitionofdefinition ofF>SN8 discussionofdiscussion ofQ@SN8 motivationformotivation for>lS#5*9 Compile-time-constant-expression C *Compile-time-constant-expression *BSN9 introductiontointroduction toZS,!8 Compiletime-declaration C *Compiletime-declaration *ESN8 usewith%ASSIGNuse with %ASSIGN IS8 Compound-expressionCompound-expressionsBSN8 introductiontointroduction toEVS$$9 Computational expressionsComputational expressionsYS&&9 Computedroutine addressesComputed routine addresses5S 8 CONCATENATECONCATENATEASN8 psect-attributepsect-attribute 9S8 ConcatenationConcatenationISN8 insyntaxnotationin syntax notationHS9 ConditionhandlingCondition handling+ :S N9 examplesofexamples of CSN9 flowofcontrolflow of controlJSN9 flowofcontrolinflow of control in :S 8 examplesofexamples of /S N8 functionfunction5S 8 SETUNWINDSETUNWIND /S8 SIGNALSIGNALP 9S 9 SIGNAL_STOPSIGNAL_STOPU 0SN9 inVMSin VMS BSN8 introductiontointroduction to- BS8 ConditionvalueCondition valueK KSN8 asSIGNAL parameteras SIGNAL parameterP US$$N8 as SIGNAL_STOP parameteras SIGNAL_STOP parameterU BSN9 comparisonofcomparison of HSN9 declarationsfordeclarations for VS%%N8 elementofsignalvectorelement of signal vectork <S N8 structureofstructure of RS""8 Conditional compilationConditional compilation \S((8 ConditionalflowofcontrolConditional flow of controlOS  8 Conditional-expressionConditional-expressionXS+ 8 Conditional-expression B *Conditional-expression *BSN9 introductiontointroduction toZKS  9 Conditional-macro-callConditional-macro-call<S N8 expansionofexpansion of 9S 8 ConsequenceConsequence/S 8 constantconstant5S N8 charactercharacter?SN9 floating-pointfloating-point1SN9 integerinteger3SN8 stringstringES8 Constant-expressionConstant-expression;S N8 compile-timecompile-timeFBSN8 introductiontointroduction to}5S N8 link-timelink-timeZ7S 9 ContinuationContinuationOS!!N9 in conditionhandlingin condition handling| GS8 Control-expressionControl-expression7S 9 COPTNI(36)COPTNI(36) 7S 8 COPYII(36)COPYII(36) 7S 8 COPYIN(36)COPYIN(36) 7S 8 COPYNN(36)COPYNN(36) BS8 %COUNTfunction%COUNT function aS**N9 inconditional-macro expansionin conditional-macro expansion ]S((N9 initerative-macro expansionin iterative-macro expansion WS%%N8 in simple-macro expansionin simple-macro expansion <S 8 CountedPLITCounted PLIT<S8 CountedvectorCounted vector>SN8 definitionofdefinition ofh 1S9 CRC(32)CRC(32) @S9 %CTCEfunction%CTCE functionK AS8 CVTDF(16,32,36)CVTDF(16,32,36) AS8 CVTDI(16,32,36)CVTDI(16,32,36) 5S 8 CVTDL(32)CVTDL(32) AS8 CVTFD(16,32,36)CVTFD(16,32,36) ;S 9 CVTFG(32,36)CVTFG(32,36) 5S 8 CVTFH(32)CVTFH(32) AS9 CVTFI(16,32,36)CVTFI(16,32,36) ;S 9 CVTFI(32,36)CVTFI(32,36) 5S 8 CVTFL(32)CVTFL(32) ;S 8 CVTGF(32,36)CVTGF(32,36) 5S 8 CVTGL(32)CVTGL(32) 5S 8 CVTHF(32)CVTHF(32) 5S 9 CVTHL(32)CVTHL(32) AS9 CVTID(16,32,36)CVTID(16,32,36) AS8 CVTIF(16,32,36)CVTIF(16,32,36) ;S 8 CVTIF(32,36)CVTIF(32,36) 5S 8 CVTLD(32)CVTLD(32) 5S 8 CVTLF(32)CVTLF(32) 5S 9 CVTLG(32)CVTLG(32) 5S 9 CVTLH(32)CVTLH(32) 5S 8 CVTLP(32)CVTLP(32) 5S 8 CVTPL(32)CVTPL(32) 5S 8 CVTPS(32)CVTPS(32) 5S 8 CVTPT(32)CVTPT(32) 7S 8 CVTRDH(32)CVTRDH(32) 7S 8 CVTRDL(32)CVTRDL(32) 7S 9 CVTRFL(32)CVTRFL(32) 7S 9 CVTRGH(32)CVTRGH(32) 7S 8 CVTRGL(32)CVTRGL(32) 7S 8 CVTRHL(32)CVTRHL(32) 5S 8 CVTSP(32)CVTSP(32) 5S 8 CVTTP(32)CVTTP(32) !i  jDDKS9 %Din float-literal%D in float-literal>S8 DanglingELSEDangling ELSE:S8 DatasegmentsData segmentsBSN8 introductiontointroduction toBS8 Data structuresData structuresQS""N9 abstract definitionofabstract definition ofYS&&N9 concreterepresentationofconcrete representation ofBSN8 introductiontointroduction toU9S N9 predeclaredpredeclaredWS%%N8 programmed descriptionofprogrammed description of;S N8 user-defineduser-defined96S 8 DatavaluesData valuesFSN8 representationofrepresentation ofOS!!8 Data, introductiontoData, introduction to+CS9 Data-declarationData-declarationM)S8 DEBUGDEBUGDSN8 in module-switchin module-switch [S''8 %DECIMALininteger-literal%DECIMAL in integer-literalMS""8 DecimalstringliteralDecimal string literal?SN8 (seealso%P)(see also %P)SS%%9 Decimalstring operationsDecimal string operations9S N9 builtin(32)builtin(32) 1SN8 literalliteral=S8 Decimal-digitDecimal-digitAS8 Decimal-literalDecimal-literal9S 8 DeclarationDeclaration:S N8 examplesofexamples of<S N8 governsnamegoverns name>SN9 of loop-indexof loop-index4S N9 scopeofscope ofBS 8 Declaration C *Declaration *BSN8 introductiontointroduction toLHS8 %DECLAREDfunction%DECLARED function SS##8 DECRinloop-expressionDECR in loop-expressionUS$$9 DECRAinloop-expressionDECRA in loop-expressionUS$$9 DECRUinloop-expressionDECRU in loop-expression3S 8 DECX(16)DECX(16) FS8 Default punctuationDefault punctuation:S N8 examplesofexamples of ]S((N8 initerative-macro expansionin iterative-macro expansion YS%%9 Default-structure-referenceDefault-structure-reference]S((N9 comparedtoordinary-str-refcompared to ordinary-str-refBS N8 examplesofexamples ofl1S 8 DelimiterDelimiter<S N8 as characteras character6S N8 aslexemeas lexeme3S 8 DescriptorDescriptor/SN8 %ASCID%ASCIDZS''9 Design objectivesofBLISSDesign objectives of BLISSLS!!9 Dialectal distinctionsDialectal distinctionsCSN8 insyntaxrulesin syntax rulesCS8 DialectsofBLISSDialects of BLISSBSN8 introductiontointroduction toDS8 Direct recursionDirect recursionBS9 DiscardedvalueDiscarded value5S 9 DisjunctionDisjunctionISN8 insyntaxnotationin syntax notation;S 8 DisplacementDisplacement>?S8 DIVD(16,32,36)DIVD(16,32,36) ?S8 DIVF(16,32,36)DIVF(16,32,36) 9S 9 DIVG(32,36)DIVG(32,36) 3S 9 DIVH(32)DIVH(32) FS9 DivisionoperatorDivision operatorNSS!!9 DOinloop-expressionDO in loop-expression?S8 double-precisiondouble-precision=SN8 float-literalfloat-literal1S8 DPB(36)DPB(36) !i  iEEKS9 %Ein float-literal%E in float-literal7S 9 EDITPC(32)EDITPC(32) 9S 8 EDIV(16,32)EDIV(16,32) %S  8 EISEISLSN8 inmodule-switch(16)in module-switch(16) /S 8 EllipsisEllipsisISN9 insyntaxnotationin syntax notationaS**9 ELSEinconditional-expressionELSE in conditional-expressionES8 ELUDOMinmoduleELUDOM in module DS8 EmbeddedcommentEmbedded comment6S 8 EmptyblockEmpty block@SN8 restrictionofrestriction ofwLS8 EMTlinkage-type(16)EMT linkage-type(16)M9S 8 EMUL(16,32)EMUL(16,32) >S8 EnablevectorEnable vectorr 0SN9 inVMSin VMS JS"9 Enable-actual zC *Enable-actual *= TS'8 Enable-declaration C *Enable-declaration *= >S N8 examplesofexamples of: BS8 EncodedaddressEncoded address>=d} }S8 Encoding-typeEncoding-type>=S 9 ENDinblockEND in blockr)S9 ENTRYENTRYLSN8 inmodule-switch(36)in module-switch(36) 5S 8 ENVIRONMENTENVIRONMENTLSN8 inmodule-switch(16)in module-switch(16) LSN8 inmodule-switch(36)in module-switch(36) PS""9 EQLasinfixoperatorEQL as infix operatorWRS##9 EQLAasinfixoperatorEQLA as infix operatorWRS##8 EQLUasinfixoperatorEQLU as infix operatorW+S9 EqualsEqualsGSN8 asinfixoperatoras infix operatorpPS""8 EQVasinfixoperatorEQV as infix operatordBS8 %ERRORfunction%ERROR function LS8 %ERRORMACROfunction%ERRORMACRO function 'S9 ERRSERRSDSN9 in module-switchin module-switch 6S N8 inswitchin switchI JS8 EstablisherroutineEstablisher routine9 :S N8 examplesofexamples of: BSN8 introductiontointroduction to. @S9 EvaluationrulesEvaluation rules>SN9 discussionofdiscussion ofz8S N8 forblocksfor blocks|TS##N8 foroperator-expressionsfor operator-expressions/NS  8 %EXACTSTRINGfunction%EXACTSTRING functionHS8 ExceptionhandlingException handling+ IS9 Executable-functionExecutable-functionRS(8 Executable-function *B *Executable-function *5S N9 SETUNWINDSETUNWIND /SN9 SIGNALSIGNALP 9S N8 SIGNAL_STOPSIGNAL_STOPU -S8 EXECUTEEXECUTEASN8 psect-attributepsect-attribute OS!!8 ExecutionofprogramsExecution of programs'AS9 Exit-expressionExit-expression%RS""9 %EXITITERATIONfunction%EXITITERATION function IS8 Exitloop-expressionExitloop-expression%JS8 %EXITMACROfunction%EXITMACRO function +S8 EXPANDEXPANDDSN8 in module-switchin module-switch 6S N9 inswitchin switchI DS9 %EXPANDfunction%EXPAND function 1S 8 ExpansionExpansionOS!!N8 inlexical processingin lexical processing]VS$$N8 ofconditional-macro-callof conditional-macro-call RS""N8 ofiterative-macro-callof iterative-macro-call NS  N8 ofkeyword-macro-callof keyword-macro-call LSN8 ofsimple-macro-callof simple-macro-call FS9 %EXPLODEfunction%EXPLODE function 3S 9 ExponentExponent7S 8 ExpressionExpressionGSN8 control-expressioncontrol-expressiondS ,,N8 inrelationtofield-referencesin relation to field-referencespISN8 operator-expressionoperator-expression@S 9 Expression C *Expression *BSN9 introductiontointroduction to;/S 8 EXTENDEDEXTENDEDLSN8 inmodule-switch(36)in module-switch(36) ES8 Extension-attributeExtension-attribute<S N8 as attributeas attribute`S))N8 ingeneral-structure-referencein general-structure-referencePS!!N9 instructure-attributein structure-attribute/S 9 EXTERNALEXTERNAL6S N9 inswitchin switchI KS9 External-declarationExternal-declarationw=S8 External-nameExternal-namewFS"8 External-name B *External-name *BSN8 introductiontointroduction tow]S''8 External-register-declarationExternal-register-declarationWS$$9 External-routine-attributeExternal-routine-attribute[S&&9 External-routine-declarationExternal-routine-declaration1S 8 ExternalsExternalsRS##N8 inlibrarysourcefilein library source file!i  iFFLS8 F10linkage-type(36)F10 linkage-type(36)DS9 Fetch expressionFetch expression4BSN9 introductiontointroduction to11S8 FFC(32)FFC(32) 1S8 FFS(32)FFS(32) 6S 8 FieldvalueField valueBSN8 definitionofdefinition of<S N8 extensionofextension ofES8 Field-attributeField-attributeAS9 Field-componentField-componentES9 Field-declarationField-declaration:S N8 examplesofexamples of+NS&8 Field-declaration B *Field-declaration *>S N8 examplesofexamples of CS8 Field-definitionField-definition3S 9 Field-nameField-nameLSN9 indata-declarationsin data-declarationsLSN8 infield-attributein field-attributeLSN8 infield-declarationin field-declaration`S))N8 ingeneral-structure-referencein general-structure-referencebS **N8 inordinary-structure-referencein ordinary-structure-referenceAS9 Field-referenceField-reference.8S N9 asprimaryas primary :S N8 examplesofexamples ofhOS!!N8 in assignmentcontextin assignment contextUESN8 infetchcontextin fetch contextNGSN8 inothercontextsin other contextsYZS''N8 inrelationto expressionsin relation to expressionspVS$$N8 instructure-declarationsin structure-declarationskBSN9 introductiontointroduction to?S9 Field-selectorField-selector.1SN8 defaultdefaultw[S''N8 placementinstructure-declplacement in structure-declkKS8 Field-set-definitionField-set-definition;S8 Field-set-nameField-set-nameLSN9 infield-attributein field-attributeLSN9 infield-declarationin field-declarationNS  8 %FIELDEXPANDfunction%FIELDEXPAND functionw ;S 8 FIRSTONE(36)FIRSTONE(36) ?S8 Fixed-macro-bodyFixed-macro-bodyRS""N8 initerative-macro-callin iterative-macro-call =S9 Float-literalFloat-literalCS9 FlowofcontrolFlow of controlBSN8 introductiontointroduction toZ5S 9 Formal-nameFormal-nameTS##N8 inordinary-routine-declin ordinary-routine-declDS8 FORTRANlinkagesFORTRAN linkagesIS8 Forward-declarationForward-declarationpUS##8 Forward-routine-attributeForward-routine-attributeYS%%9 Forward-routine-declarationForward-routine-declaration\S((9 Framepointer(FP)registerFrame pointer (FP) register@S8 Free characterFree character'S8 FROMFROMHSN8 incase-expressionin case-expressionHSN8 inloop-expressionin loop-expression/S 8 FullwordFullword>SN9 definitionofdefinition ofBS9 FullwordvaluesFullword values!i  iGGKS8 %Gin float-literal%G in float-literal-S8 GENERALGENERAL\S''N8 inaddressing-mode-attributein addressing-mode-attribute7LSN8 inmodule-switch(32)in module-switch(32) 6S N8 inswitchin switchI WS%%9 Generalpurpose structureGeneral purpose structurelYS%%9 General-structure-referenceGeneral-structure-reference]S((N8 comparedtoordinary-str-refcompared to ordinary-str-refBS N8 examplesofexamples ofPS""8 GEQasinfixoperatorGEQ as infix operatorWRS##8 GEQAasinfixoperatorGEQA as infix operatorWRS##9 GEQUasinfixoperatorGEQU as infix operatorW+S9 GLOBALGLOBALQS""N8 aspsect storage-classas psect storage-class HSN8 aspsect-attributeas psect-attribute JSN8 indata-declarationin data-declarationfRS  8 GLOBALlinkage-optionGLOBAL linkage-optionQS$$9 GlobalregistersegmentsGlobal register segmentsWS%%N9 interactionwithlinkagesinteraction with linkagesGS8 Global-declarationGlobal-declarationf9S 8 Global-nameGlobal-namefYS%%8 Global-register-declarationGlobal-register-declarationSS""8 Global-routine-attributeGlobal-routine-attributeWS$$8 Global-routine-declarationGlobal-routine-declarationCS8 GOTO constructGO TO construct+S9 GovernGovernUS$$N9 declarationgovernsnamedeclaration governs namePS""8 GTRasinfixoperatorGTR as infix operatorWRS##8 GTRAasinfixoperatorGTRA as infix operatorWRS##8 GTRUasinfixoperatorGTRU as infix operatorW!i  iHHKS9 %Hin float-literal%H in float-literal9S 9 HALT(16,32)HALT(16,32) BS8 HandlerroutineHandler routine\ :S N8 examplesofexamples of BSN8 introductiontointroduction to. 8S N8 optionsofoptions ofu ;S 9 continuationcontinuation| 9S 9 resignalingresignaling 5S 9 unwindingunwinding 7S N9 parametersparametersh 5S N8 recursiverecursive MS  8 $HIGH$defaultpsect$HIGH$ default psect !i  iII)S8 IDENTIDENTDSN9 in module-switchin module-switch JS9 %IDENTICALfunction%IDENTICAL function? ]S((8 IFinconditional-expressionIF in conditional-expressionLS8 ImmediatelycontainsImmediately containsr<S8 ImplicitblockImplicit block8S N8 exampleofexample ofHS9 Implicit declarationImplicit declarationASN9 offormalnameof formal nameISN8 of loop-indexnameof loop-index name3S 8 INCP(36)INCP(36) SS##8 INCRinloop-expressionINCR in loop-expressionUS$$8 INCRAinloop-expressionINCRA in loop-expressionUS$$8 INCRUinloop-expressionINCRU in loop-expression5S 8 INDEX(32)INDEX(32) QS!!8 Indexed-loop-expressionIndexed-loop-expression/S 9 INDIRECTINDIRECTLSN9 inmodule-switch(36)in module-switch(36) HS8 Indirect recursionIndirect recursion?S8 Infix-operatorInfix-operatorDS8 %INFORMfunction%INFORM function ES8 Initial-attributeInitial-attribute7S 9 Initial-itemInitial-itemLSN9 ininitial-attributein initial-attributeKS  8 Input-actual-parameterInput-actual-parameterBSN8 in routine-callin routine-callKS  8 Input-formal-parameterInput-formal-parameterTS##N8 inordinary-routine-declin ordinary-routine-declYS&&9 INRANGEincase-expressionINRANGE in case-expression7S 9 INSQHI(32)INSQHI(32) /S8 INSQTIINSQTI /S9 INSQUEINSQUE AS8 Integer-literalInteger-literal9S8 Internal-onlyInternal-onlyHSN8 charactersequencecharacter sequence+SN8 namename^S((9 INTERRUPTlinkage-type(16,32)INTERRUPT linkage-type(16,32)CLS9 IOTlinkage-type(16)IOT linkage-type(16)MHS8 %ISSTRINGfunction%ISSTRING functionH >S8 IterationcountIteration countRS""N8 initerative-macro-callin iterative-macro-call @S8 IterativeflowIterative flowGS9 Iterative-macro-callIterative-macro-callJSN9 default punctuationdefault punctuation <S N8 expansionofexpansion of `S/$8 Iterative-macro-definition B *Iterative-macro-definition *:S N8 examplesofexamples ofg !i  iJJ>S9 JSB linkage(32)JSB linkage(32)3S N8 examplesexamplesuLS9 JSBlinkage-type(32)JSB linkage-type(32)mLS9 JSRlinkage-type(16)JSR linkage-type(16)A3S 8 JSYS(36)JSYS(36) !i  iKK'S8 KA10KA10LSN8 inmodule-switch(36)in module-switch(36) -S9 KeywordKeywordESN9 completelistofcomplete list ofr ESN8 ina declarationin a declarationPS'8 Keyword-macro-call DB *Keyword-macro-call *<S N8 expansionofexpansion of ^S.#8 Keyword-macro-declaration $B *Keyword-macro-declaration *>S N9 examplesofexamples ofk 'S9 KI10KI10LSN8 inmodule-switch(36)in module-switch(36) 'S8 KL10KL10LSN8 inmodule-switch(36)in module-switch(36) 'S8 KS10KS10LSN8 inmodule-switch(36)in module-switch(36) !i  iLL-S9 LabelLabelrHSN9 inexit-expressionin exit-expression%RS&8 Label-declaration C *Label-declaration *m =S8 Labeled-blockLabeled-blockr/S 8 LANGUAGELANGUAGEDSN8 in module-switchin module-switch 6S N9 inswitchin switchI QS""9 checking performedforchecking performed for 8S 8 meaningofmeaning of] FS"8 Language-list oB *Language-list *ESN8 inmoduleswitchin module switch 6S N8 inswitchin switchI 1S8 LDB(36)LDB(36) CS9 Leave-expressionLeave-expression%;S 8 Left-operandLeft-operandDS9 %LENGTHfunction%LENGTH function aS**N9 inconditional-macro expansionin conditional-macro expansion ]S((N8 initerative-macro expansionin iterative-macro expansion WS%%N8 in simple-macro expansionin simple-macro expansion PS""8 LEQasinfixoperatorLEQ as infix operatorWRS##8 LEQAasinfixoperatorLEQA as infix operatorWRS##9 LEQUasinfixoperatorLEQU as infix operatorW/S9 LetterLetter/S8 LexemeLexeme>SN8 processingofprocessing ofTDS8 Lexical processingLexical processing:S N8 examplesofexamples ofiBSN9 introductiontointroduction toNLSN9 oflexical-functionsof lexical-functionsRS##N8 oflibrarysourcefileof library source file ASN8 ofmacrocallsof macro calls JSN8 ofnumeric-literalsof numeric-literalsHSN8 ofstring-literalsof string-literals?S8 Lexical-functionLexical-function9S N8 %ALLOCATION%ALLOCATIONj 1SN9 %ASSIGN%ASSIGN /SN9 %BLISS%BLISS -SN8 %CHAR%CHAR7S N8 %CHARCOUNT%CHARCOUNT /SN8 %COUNT%COUNT -SN8 %CTCE%CTCEK 5S N9 %DECLARED%DECLARED /SN9 %ERROR%ERROR 9S N8 %ERRORMACRO%ERRORMACRO ;S N8 %EXACTSTRING%EXACTSTRING?SN8 %EXITITERATION%EXITITERATION 7S N8 %EXITMACRO%EXITMACRO 1SN9 %EXPAND%EXPAND 3S N9 %EXPLODE%EXPLODE ;S N8 %FIELDEXPAND%FIELDEXPANDw 7S N8 %IDENTICAL%IDENTICAL? 1SN8 %INFORM%INFORM 5S N8 %ISSTRING%ISSTRINGH 1SN8 %LENGTH%LENGTH -SN8 %LTCE%LTCEN 3S N9 %MESSAGE%MESSAGE -SN9 %NAME%NAME% /SN8 %NBITS%NBITS^ 1SN8 %NBITSU%NBITSUU -SN8 %NULL%NULL= 1SN8 %NUMBER%NUMBER /SN9 %PRINT%PRINT /SN9 %QUOTE%QUOTE 7S N8 %QUOTENAME%QUOTENAME% 7S N8 %REMAINING%REMAINING 1SN8 %REMOVE%REMOVE /SN8 %SBTTL%SBTTL -SN9 %SIZE%SIZEn 1SN9 %STRING%STRING8S N9 summaryofsummary of 5S N9 %SWITCHES%SWITCHES /SN8 %TITLE%TITLE 3S N8 %UNQUOTE%UNQUOTE 3S N8 %VARIANT%VARIANT -SN8 %WARN%WARN LS%9 Lexical-function C *Lexical-function *GSN9 generalrulesforgeneral rules forDSN8 quote-levelsforquote-levels for-S8 LIBRARYLIBRARYDSN8 in module-switchin module-switch 6S N8 inswitchin switchI KS8 LibrarybinaryfileLibrary binary file KS9 LibrarysourcefileLibrary source file SS##N9 declarationsallowedindeclarations allowed in OS!!N8 lexical processingoflexical processing of VS(8 Library-declaration B *Library-declaration * 3S 8 LinemarkLinemarkYS''8 Link-time-constant-expressionLink-time-constant-expression>SN8 definitionofdefinition ofZ>SN8 discussionofdiscussion ofe@SN9 motivationformotivation forSfS 2'9 Link-time-constant-expression tC *Link-time-constant-expression *BSN8 introductiontointroduction to-S8 LinkageLinkageOS!!N8 general definitionofgeneral definition of-S8 LINKAGELINKAGEDSN9 in module-switchin module-switch 6S N9 inswitchin switchI ES8 Linkage-attributeLinkage-attribute"RS(8 Linkage-declaration *B *Linkage-declaration *BSN8 introductiontointroduction toCS8 Linkage-definitionLinkage-definitionBSN9 introductiontointroduction toAS9 Linkage-functionsLinkage-functions/SN8 commoncommonNS!!N9 forBLISS-16and-32for BLISS-16 and -32DS!8 Linkage-name C *Linkage-name *6S N8 inswitchin switchI 5S N8 predeclaredpredeclared/S8 commoncommon<S 9 forBLISS-16for BLISS-16R<S 9 forBLISS-32for BLISS-32<S 8 forBLISS-36for BLISS-36HS#8 Linkage-option B *Linkage-option *BSN8 introductiontointroduction toDS!8 Linkage-type _B *Linkage-type *BSN9 introductiontointroduction to/S 9 LinkagesLinkages-SN8 BLISSBLISSASN8 FORTRAN-relatedFORTRAN-related;S N8 FORTRAN_FUNCFORTRAN_FUNC9S N8 FORTRAN_SUBFORTRAN_SUBZS&&9 LINKAGE_REGSlinkage-optionLINKAGE_REGS linkage-option+S8 LinkerLinker@SN9 externalnamesexternal names|ISN9 handlingofpsectshandling of psects 6SN8 roleofrole of'xLS  N8 useofIDENTswitchuse of IDENT switch PS""N8 useofVERSIONswitchuse of VERSION switch 'S8 LISTLISTDSN9 in module-switchin module-switch 6S N9 inswitchin switchI FS 8 List-option C *List-option *I )S8 LOCALLOCALASN8 psect-attributepsect-attribute ES8 Local-declarationLocal-declaration3S 9 LOCC(32)LOCC(32) DS9 Logical operationsLogical operations9S N8 builtin(36)builtin(36) LS8 LONGallocation-unitLONG allocation-unitXS&&8 LongevityofdatasegmentLongevity of data segmentK9S8 LONG_RELATIVELONG_RELATIVE\S''N8 inaddressing-mode-attributein addressing-mode-attribute7LSN8 inmodule-switch(32)in module-switch(32) AS8 Loop-expressionLoop-expressionJS$9 Loop-expression C *Loop-expression *BSN9 introductiontointroduction to`7S 8 loop-indexloop-index3S 8 Loop-indexLoop-index@SN8 declarationofdeclaration ofSS##N8 implicit declarationofimplicit declaration ofKS9 $LOW$defaultpsect$LOW$ default psect 1S9 LSH(36)LSH(36) )S8 LSI11LSI11LSN8 inmodule-switch(16)in module-switch(16) PS""8 LSSasinfixoperatorLSS as infix operatorWRS##8 LSSAasinfixoperatorLSSA as infix operatorWRS##9 LSSUasinfixoperatorLSSU as infix operatorW@S9 %LTCEfunction%LTCE functionN !i  iMMdS"..9 Machinecode insertion operationsMachine code insertion operations9S N8 builtin(36)builtin(36)VS$$8 Machine-specificfunctionMachine-specific function7S 8 MACHOP(36)MACHOP(36);S 8 MACHSKIP(36)MACHSKIP(36)@S 9 Macro-call C *Macro-call *OS!!N9 lexical processingoflexical processing of NS&8 Macro-declaration C *Macro-declaration *KSN8 forBLOCK structurefor BLOCK structure BSN8 introductiontointroduction tob /SN8 nestednested FS9 Macro-quotelevelMacro-quote level'S9 MAINMAINDSN8 in module-switchin module-switch <S 8 MainroutineMain routine'3S 8 MantissaMantissaAS8 Map-declarationMap-declaration7S 9 MATCHC(32)MATCHC(32) /S 8 MatchingMatching>SN9 of case-indexof case-indexBSN9 of select-indexof select-indexOS!!8 MAXstandardfunctionMAX standard functionQS""8 MAXAstandardfunctionMAXA standard functionQS""8 MAXUstandardfunctionMAXU standard functionDS8 MechanismvectorMechanism vectorn YS((9 Memory management operationsMemory management operations9S N9 builtin(16)builtin(16) FS8 %MESSAGEfunction%MESSAGE function 3S 8 MFPD(16)MFPD(16) 3S 8 MFPI(16)MFPI(16) 3S 8 MFPR(32)MFPR(32) 3S 9 MFPS(16)MFPS(16) OS!!9 MINstandardfunctionMIN standard functionQS""8 MINAstandardfunctionMINA standard functionQS""8 MINUstandardfunctionMINU standard function)S8 MinusMinusGSN8 asinfixoperatoras infix operatorKISN8 asprefixoperatoras prefix operator9DSN8 in float-literalin float-literalPS##9 Miscellaneous operationsMiscellaneous operationsCSN9 builtin(16,32)builtin(16,32) PS""8 MODasinfixoperatorMOD as infix operatorK'S8 ModeMode\S''N8 inaddressing-mode-attributein addressing-mode-attribute74S8 Mode tB *Mode *6S N9 asswitchas switchI <S 9 Module C *Module * 2SN8 roleofrole of'ESN8 smallexampleofsmall example ofFS 8 Module-body jB *Module-body * FS 8 Module-head jB *Module-head * JS"8 Module-switch B *Module-switch * 5S 9 MOVC3(32)MOVC3(32) 5S 8 MOVC5(32)MOVC5(32) 3S 9 MOVP(32)MOVP(32) 7S 9 MOVPSL(32)MOVPSL(32) 5S 8 MOVTC(32)MOVTC(32) 7S 8 MOVTUC(32)MOVTUC(32) 3S 8 MTPD(16)MTPD(16) 3S 8 MTPI(16)MTPI(16) 3S 9 MTPR(32)MTPR(32) 3S 9 MTPS(16)MTPS(16) ?S8 MULD(16,32,36)MULD(16,32,36) 3S 8 MULD(32)MULD(32) ?S8 MULF(16,32,36)MULF(16,32,36) 3S 8 MULF(32)MULF(32) 9S 9 MULG(32,36)MULG(32,36) 3S 9 MULH(32)MULH(32) RS""8 MultiplicationoperatorMultiplication operatorN!i  iNN+S8 NameName@SN8 declarationofdeclaration of4S N8 valueofvalue of@S8 %NAMEfunction%NAME function% :S N9 examplesofexamples of 4S9 Name tC *Name *=SN8 internal-onlyinternal-onlyDS8 Name-quotelevelName-quote levelBS8 %NBITSfunction%NBITS function^ DS8 %NBITSUfunction%NBITSU functionU PS""9 NEQasinfixoperatorNEQ as infix operatorWRS##9 NEQAasinfixoperatorNEQA as infix operatorWRS##8 NEQUasinfixoperatorNEQU as infix operatorWSS##8 Nestedmacro definitionNested macro definition >S8 NestedsignalNested signal :S N8 examplesofexamples of FS9 Newline characterNewline character3S 9 NOASSEMBLYNOASSEMBLYDd} }SN8 in module-switchin module-switch 6S N8 inswitchin switchI /S 8 NOBINARYNOBINARYDSN8 in module-switchin module-switch 6S N8 inswitchin switchI +S8 NOCODENOCODEDSN9 in module-switchin module-switch 7S 9 NOCOMMENTARYNOCOMMENTARYDSN8 in module-switchin module-switch 6S N8 inswitchin switchI -S8 NODEBUGNODEBUGDSN8 in module-switchin module-switch 1S 9 NODEFAULTNODEFAULTLSN9 inpsect-declarationin psect-declaration )S8 NOEISNOEISLSN8 inmodule-switch(16)in module-switch(16) +S8 NOERRSNOERRSDSN8 in module-switchin module-switch 6S N9 inswitchin switchI 1S 9 NOEXECUTENOEXECUTEASN9 psect-attributepsect-attribute /S 9 NOEXPANDNOEXPANDDSN8 in module-switchin module-switch 6S N8 inswitchin switchI 3S 8 NOINDIRECTNOINDIRECTLSN8 inmodule-switch(36)in module-switch(36) 1S 9 NOLIBRARYNOLIBRARYDSN9 in module-switchin module-switch 6S N8 inswitchin switchI TS##8 Non-contiguous structureNon-contiguous structureR5S 8 NONEXTERNALNONEXTERNAL6S N8 inswitchin switchI IS8 Nonprinting-characterNonprinting-characterFSN9 representationofrepresentation of/S 9 NOOBJECTNOOBJECTDSN8 in module-switchin module-switch 6S N8 inswitchin switchI 3S 8 NOOPTIMIZENOOPTIMIZEDSN8 in module-switchin module-switch 6S N8 inswitchin switchI 7S 8 NOP(16,32)NOP(16,32) )S9 NOPICNOPICASN9 psect-attributepsect-attribute VS$$8 NOPRESERVElinkage-optionNOPRESERVE linkage-option+S8 NOREADNOREADASN8 psect-attributepsect-attribute 1S 8 NOREQUIRENOREQUIREDSN9 in module-switchin module-switch 6S N9 inswitchin switchI HS8 Normal-quotelevelNormal-quote level+S8 NOSAFENOSAFEDSN8 in module-switchin module-switch 6S N8 inswitchin switchI -S9 NOSHARENOSHAREASN9 psect-attributepsect-attribute /S 8 NOSOURCENOSOURCEDSN9 in module-switchin module-switch 6S N8 inswitchin switchI 3S 8 NOSYMBOLICNOSYMBOLICDSN8 in module-switchin module-switch 6S N8 inswitchin switchI RS##9 NOTasprefixoperatorNOT as prefix operatordKS9 NotationforsyntaxNotation for syntax-S8 NOTRACENOTRACEDSN8 in module-switchin module-switch 6S N8 inswitchin switchI PS!!8 NOTUSEDlinkage-optionNOTUSED linkage-options/S 9 NOUNAMESNOUNAMESDSN9 in module-switchin module-switch 6S N8 inswitchin switchI ES8 Novalue-attributeNovalue-attribute8S N8 exampleofexample ofNS&8 Novalue-attribute B *Novalue-attribute *8S N9 exampleofexample ofP-S8 NOWRITENOWRITEASN9 psect-attributepsect-attribute )S9 NOZIPNOZIPDSN8 in module-switchin module-switch 6S N8 inswitchin switchI @S8 %NULLfunction%NULL function= `S))8 NULLPARAMETERlinkage-functionNULLPARAMETER linkage-functionDS9 %NUMBERfunction%NUMBER function 5S 9 Number-signNumber-signUS$$N8 inlexical-functiondef.in lexical-function def.AS8 Numeric-literalNumeric-literalJS$8 Numeric-literal B *Numeric-literal *OS!!N8 lexical processingoflexical processing of!i  jOOOS!!9 %Oininteger-literal%O in integer-literal+S8 OBJECTOBJECTDSN8 in module-switchin module-switch 6S N8 inswitchin switchI :S 8 ObjectfileObject filev%S  8 ODTODTLSN8 inmodule-switch(16)in module-switch(16) #S  8 OFOFHSN9 incase-expressionin case-expression2SN9 inplitin plitLSN8 inselect-expressionin select-expression+S8 OffsetOffsetFSN8 asvalueofnameas value of namePS!!N8 inalignment-attributein alignment-attributeNS"9 On-off-switch zC *On-off-switch *I [S''9 One-originvector structureOne-origin vector structure;1S8 OperandOperandIS8 Operator-expressionOperator-expression3S 8 Opt-signOpt-signYS$$8 Optimization,effectsofOptimization, effects ofo|/S 9 OPTIMIZEOPTIMIZEDSN9 in module-switchin module-switch 6S N9 inswitchin switchI /S 9 OPTLEVELOPTLEVELDSN8 in module-switchin module-switch NS!!8 ORasinfixoperatorOR as infix operatord[S&&8 Ordinary-routine-declarationOrdinary-routine-declaration[S&&8 Ordinary-structure-referenceOrdinary-structure-reference[S''N9 comparedtogeneral-str-refcompared to general-str-ref:S N9 examplesofexamples of+S8 ORIGINORIGINASN8 psect-attributepsect-attribute aS**8 OTHERWISEinselect-expressionOTHERWISE in select-expression%S  8 OTSOTSLSN9 inmodule-switch(36)in module-switch(36) 5S 9 OTS_LINKAGEOTS_LINKAGELSN8 inmodule-switch(36)in module-switch(36) MS!!8 Output-actual-parameterOutput-actual-parameterBSN8 in routine-callin routine-callMS!!8 Output-formal-parameterOutput-formal-parameterTS##N8 inordinary-routine-declin ordinary-routine-decl[S''8 OUTRANGEincase-expressionOUTRANGE in case-expression-S9 OVERLAYOVERLAYASN9 psect-attributepsect-attribute <S 8 OverlaydataOverlay dataI%S  8 OWNOWNLSN8 inpsect-declarationin psect-declaration KS8 $OWN$defaultpsect$OWN$ default psect AS9 Own-declarationOwn-declarationR!i  iPPMS  8 %Pinstring-literal%P in string-literal1S 8 ParameterParameter=SN8 enable-actualenable-actual= ESN8 ofhandlerroutineof handler routine>S9 enablevectorenable vectorr DS9 mechanismvectormechanism vectorn >S8 signalvectorsignal vectork FS8 ParameterpassingParameter passing8S N8 methodsofmethods ofKS8 byargumentpointerby argument pointer:S 8 byregisterby registerSS##8 implicitstacklocationimplicit stack location_S ++9 Parameter validation operationsParameter validation operations9S N9 builtin(32)builtin(32) PS'8 Parameter-location C *Parameter-location *>SN8 discussionofdiscussion of5S 8 ParenthesisParenthesisVS$$N8 inmacro-actual-parameterin macro-actual-parameter ?S9 ParenthesizationParenthesization>SN9 defaultrulesdefault rules#>SN8 discussionofdiscussion oftTS##8 Parenthesized expressionParenthesized expressiontBSN8 introductiontointroduction toI_S))8 Partially overlayed structurePartially overlayed structure`-S9 PercentPercent:S N9 beforenamebefore nameNS""8 Performance measurementPerformance measurementUS$$N9 using conditionhandlingusing condition handling +S9 PeriodPeriodKSN8 infetch expressionin fetch expression5DSN8 in float-literalin float-literal@S8 PermanentdataPermanent dataI%S  8 PICPICLSN9 inmodule-switch(16)in module-switch(16) ASN9 psect-attributepsect-attribute +S8 PlitPlit'S8 PLITPLIT2SN8 inplitin plitLSN8 inpsect-declarationin psect-declaration MS  9 $PLIT$defaultpsect$PLIT$ default psect 5S 9 Plit-itemPlit-item'S8 PlusPlusGSN8 asinfixoperatoras infix operatorKISN8 asprefixoperatoras prefix operator9DSN8 in float-literalin float-literal5S 8 POINT(36)POINT(36) BS8 Pointer functionsPointer functionsQS""N9 for characterhandlingfor character handling NS  9 PORTALlinkage-optionPORTAL linkage-option/S 8 PositionPositionFSN8 infield-selectorin field-selector.dS1&8 Positional-macro-declaration ?B *Positional-macro-declaration *:S N8 examplesofexamples ofc CS9 Post-tested-loopPost-tested-loopAS9 Pre-tested-loopPre-tested-loopSS##8 Precedenceof operatorsPrecedence of operators@S8 PredeclarednamePredeclared nameESN8 completelistofcomplete list ofr @SN8 declarationofdeclaration of:S N9 forliteralfor literal6S N9 formacrofor macro >SN8 for structurefor structure8S N8 summaryofsummary of PS!!8 Predefined identifiersPredefined identifiers FSN8 classificationofclassification ofr ESN8 completelistofcomplete list ofr QS""8 Prefixsign expressionPrefix sign expression9AS9 Prefix-operatorPrefix-operatorRS""9 PRESERVElinkage-optionPRESERVE linkage-optionCS8 Preset-attributePreset-attribute5S 8 Preset-itemPreset-itemJSN8 inpreset-attributein preset-attribute7S 8 Preset-valuePreset-valueJSN9 inpreset-attributein preset-attribute1S9 PrimaryPrimaryBS8 %PRINTfunction%PRINT function GS8 Printing-characterPrinting-characterBS8 PrioritylevelsPriority levels>SN8 discussionofdiscussion oft7S 9 PROBER(32)PROBER(32) 7S 9 PROBEW(32)PROBEW(32) 3S 9 ProceduresProcedures@SN9 (see routines)(see routines)tWS''8 Processoraction operationsProcessor action operationsCSN8 builtin(16,32)builtin(16,32) [S))8 Processorregister operationsProcessor register operations9S N8 builtin(32)builtin(32) WS''9 Processorstatus operationsProcessor status operations9S N9 builtin(16)builtin(16) 1S8 ProgramProgram @SN8 developmentofdevelopment of&<S N8 executionofexecution of'ESN8 smallexampleofsmall example of`S**8 Programcounter(PC)registerProgram counter (PC) register>S9 ProgramstackProgram stack|SS%%9 Programstatus operationsProgram status operations9S N8 builtin(32)builtin(32) BS8 ProgramstorageProgram storagex?S8 Psect-allocationPsect-allocation2SN8 inplitin plitXS%%8 Psect-allocation attributePsect-allocation attributeRS$8 Psect-attribute B *Psect-attribute * , RS&9 Psect-declaration C *Psect-declaration * 3S 9 Psect-namePsect-name_S))N8 inpsect-allocation attributein psect-allocation attribute@S 8 Psect-name :B *Psect-name *LSN8 inpsect-declarationin psect-declaration ^S((8 PS_INTERRUPTlinkage-type(36)PS_INTERRUPT linkage-type(36)FS9 PunctuationmarksPunctuation marksPS!!9 PUSHJlinkage-type(36)PUSHJ linkage-type(36)!i  iQQKS8 QuantityofstorageQuantity of storage@S8 Queue operationsQueue operations9S N8 builtin(32)builtin(32) 5S 9 QuotationQuotationz@SN9 in macro-callsin macro-calls 6S N8 inmacrosin macrosJ 6S N9 levelsoflevels ofNS  N8 lexical-functionsforlexical-functions for 6S N8 rulesforrules forBS8 %QUOTEfunction%QUOTE function >S N8 examplesofexamples ofN VS$$N9 inmacro-actual-parameterin macro-actual-parameter 9S 9 Quote-levelQuote-level:S N8 examplesofexamples of LSN8 inlexical-functionsin lexical-functions=S8 Quoted-stringQuoted-stringJS8 %QUOTENAMEfunction%QUOTENAME function% !i  jRR/S 9 RAD50_10RAD50_108S N8 codetablecode table 3S N8 encodingencoding [S''8 %RAD50_10instring-literal%RAD50_10 in string-literal/S 8 RAD50_11RAD50_118S N9 codetablecode table 3S N8 encodingencoding [S''9 %RAD50_11instring-literal%RAD50_11 in string-literalFS9 Radix-50encodingRadix-50 encoding AS8 Range-attributeRange-attribute/'S8 READREADASN8 psect-attributepsect-attribute HS8 Reading charactersReading characters +S9 RecordRecordOS!!N9 (seeBLOCK structure)(see BLOCK structure)SS##N8 (seeFIELD declaration)(see FIELD declaration)FS8 RecursiveroutineRecursive routine9S8 RedeclarationRedeclarationHSN8 bymap-declarationby map-declaration%S  9 REFREF_S))N9 effectonstructure-referenceeffect on structure-referenceBS8 introductiontointroduction to_S))N8 equivalentingeneral-str-refequivalent in general-str-refPS!!N8 instructure-attributein structure-attribute'S8 %REF%REFFSN8 standardfunctionstandard function/S 8 RegisterRegisterSS!!N8 argumentpointer(AP)argument pointer (AP)ISN9 framepointer(FP)frame pointer (FP)MS  N9 programcounter(PC)program counter (PC)ISN8 stackpointer(SP)stack pointer (SP)<S N8 valuereturnvalue return^S&&8 REGISTERparameter-locationREGISTER parameter-locationDmWS%%8 Registerusage categoriesRegister usage categoriesYS&&9 Registerusage conventionsRegister usage conventions /SN9 GLOBALGLOBAL$7S N8 NOPRESERVENOPRESERVE#3S N8 PRESERVEPRESERVE"KS8 Register-declarationRegister-declaration;S8 Register-namesRegister-names1SN9 builtinbuiltin3S N9 standardstandard5S 9 RegistersRegisters~BSN9 generalpurposegeneral purposeBS8 globallyusableglobally usable@S8 locallyusablelocally usable;S 8 nonpreservednonpreserved4S 8 notusednot used5S 9 preservedpreservedJSN9 multi-purposeusagemulti-purpose usageOS!!N8 passing parametersinpassing parameters inBSN8 specialpurposespecial purposeNS  8 Relational expressionRelational expressionV/S 8 RELATIVERELATIVE\S''N9 inaddressing-mode-attributein addressing-mode-attribute7LSN9 inmodule-switch(16)in module-switch(16) DS8 RelativeaddressRelative address@JS8 %REMAININGfunction%REMAINING function :S N8 examplesofexamples of aS**N8 inconditional-macro expansionin conditional-macro expansion ]S((N8 initerative-macro expansionin iterative-macro expansion WS%%N8 in simple-macro expansionin simple-macro expansion KS  9 Remaining-actuals-listRemaining-actuals-listRS""N9 initerative-macro-callin iterative-macro-call DS8 %REMOVEfunction%REMOVE function 7S 8 REMQHI(32)REMQHI(32) /S8 REMQTIREMQTI /S8 REMQUEREMQUE ;S 9 REPinplitREP in plit;S 9 REPLACEI(36)REPLACEI(36) ;S 8 REPLACEN(36)REPLACEN(36) 5S 8 ReplicationReplicationISN8 insyntaxnotationin syntax notation7S 8 ReplicatorReplicator-S9 REQUIREREQUIREDSN9 in module-switchin module-switch 6S N8 inswitchin switchI VS(8 Require-declaration $B *Require-declaration * :S8 ReservedwordReserved wordESN8 completelistofcomplete list ofr 5S 8 RESET(16)RESET(16) 9S 8 ResignalingResignaling :S N9 examplesofexamples of /S9 RETURNRETURN5DS8 Return characterReturn characterES8 Return-expressionReturn-expression5HS#8 Returned-value B *Returned-value *\S((N8 elementof mechanismvectorelement of mechanism vectoro QS""N9 of establisherroutineof establisher routineq =S9 Right-operandRight-operand=S8 ROT(16,32,36)ROT(16,32,36) 1S8 RoutineRoutinet9S N8 establisherestablisher9 1SN8 handlerhandler\ <S N9 mainroutinemain routine'3S N9 signalersignaler. ESN8 smallexampleofsmall example ofAS9 Routine-attributeRoutine-attributeTS##N9 inexternal-routine-declin external-routine-declRS""N8 inforward-routine-declin forward-routine-declPS!!N8 inglobal-routine-declin global-routine-declTS##N8 inordinary-routine-declin ordinary-routine-decl7S 8 Routine-bodyRoutine-body^S((N9 inglobal-routine-declarationin global-routine-declarationTS##N9 inordinary-routine-declin ordinary-routine-decl;S 8 Routine-callRoutine-callIS8 Routine-declarationRoutine-declaration@SN8 implicitblockimplicit blockGS8 Routine-designatorRoutine-designator7S 9 Routine-nameRoutine-nameTS##N9 inexternal-routine-declin external-routine-declRS""N8 inforward-routine-declin forward-routine-decl^S((N8 inglobal-routine-declarationin global-routine-declarationTS##N8 inordinary-routine-declin ordinary-routine-declDS!8 Routine-name tB *Routine-name *NS  N8 inenable-declarationin enable-declaration= XS##8 RSX_ASTlinkage-type(16)RSX_AST linkage-type(16)COHS9 RTTlinkage-optionRTT linkage-optionF!i  iSS'S8 SAFESAFEDSN8 in module-switchin module-switch 6S N8 inswitchin switchI MS  8 SatisfactionoftestSatisfaction of testBS9 %SBTTLfunction%SBTTL function KS9 ScalardatasegmentScalar data segment>SN8 allocationofallocation of!5S 8 SCANC(32)SCANC(32) 5S 8 SCANI(36)SCANI(36) 5S 8 SCANN(36)SCANN(36) MS  9 Scopeof declarationScope of declaration>S N9 examplesofexamples of_S))8 Searching character sequencesSearching character sequencesJ 7S 9 Segment-nameSegment-namebS **N8 inordinary-structure-referencein ordinary-structure-reference[S''8 SELECTinselect-expressionSELECT in select-expressionES8 Select-expressionSelect-expression7S 8 Select-labelSelect-labelLSN9 inselect-expressionin select-expression5S 9 Select-lineSelect-lineLSN8 inselect-expressionin select-expression]S((8 SELECTAinselect-expressionSELECTA in select-expressionaS**8 SELECTONEinselect-expressionSELECTONE in select-expressioncS ++8 SELECTONEAinselect-expressionSELECTONEA in select-expressioncS ++9 SELECTONEUinselect-expressionSELECTONEU in select-expression]S((9 SELECTUinselect-expressionSELECTU in select-expression1S 8 SemicolonSemicolon4S N8 inblockin blockr`S))N8 ingeneral-structure-referencein general-structure-referenceTS##N8 instructure-declarationin structure-declarationBSN9 significanceofsignificance of}DS8 SeparationrulesSeparation rulesJSN9 fornumeric-literalfor numeric-literal\S''9 Sequence-comparing functionsSequence-comparing functions6 \S''8 Sequence-searching functionsSequence-searching functionsJ `S))8 Sequence-translating functionsSequence-translating functions] XS%%8 Sequence-writing functionsSequence-writing functions BS8 SequentialflowSequential flow%S  9 SETSETHSN9 incase-expressionin case-expressionLSN8 infield-declarationin field-declarationLSN8 inselect-expressionin select-expressionHS8 SETUNWINDfunctionSETUNWIND function )S8 SHARESHAREASN8 psect-attributepsect-attribute @S9 ShiftoperatorShift operator=<S 9 SideeffectsSide effects>S8 SIGNfunctionSIGN functionIS8 Sign-extension-flagSign-extension-flag./S8 SignalSignal1 3S N8 implicitimplicitY /SN8 nestednested /SN8 unwindunwindZ BS9 SIGNALfunctionSIGNAL functionP ISN9 assigningvalueofassigning value ofp >S8 SignalvectorSignal vectork DS8 SignalerroutineSignaler routine. LS8 SIGNAL_STOPfunctionSIGNAL_STOP functionU +S8 SIGNEDSIGNEDPS!!N9 inextension-attributein extension-attributeHSN9 inrange-attributein range-attribute/QS""8 Signedvalue extensionSigned value extension AS8 Simple-macro-callSimple-macro-call<S N8 expansionofexpansion of ZS,!8 Simple-macro-definition B *Simple-macro-definition *:S N9 examplesofexamples ofd +S9 SIXBITSIXBIT8S N9 codetablecode table 3S N9 encodingencoding WS%%8 %SIXBITinstring-literal%SIXBIT in string-literal'S8 SizeSizeFSN8 infield-selectorin field-selector.@S8 %SIZEfunction%SIZE functionn 3S 9 SKPC(32)SKPC(32) GS9 SlashasoperatorSlash as operatorK+S8 SOURCESOURCEDSN8 in module-switchin module-switch 6S N8 inswitchin switchI :S 8 SourcefileSource filevQS""9 SourcelistingcounterSource listing counterZ -S9 SpaceSpace5S 8 SPANC(32)SPANC(32) FS8 Special characterSpecial characterTS#8 Special-switch B *Special-switch *I V 1S8 SPL(16)SPL(16) -S8 StackStack|)S8 STACKSTACKLSN9 inmodule-switch(36)in module-switch(36) :S 9 StackframeStack frame\S((8 Stackpointer(SP)registerStack pointer (SP) registerXS&&8 StackframeforLOCALdataStackframe for LOCAL dataOS  8 Stacklocal-declarationStacklocal-declarationES8 Standard-functionStandard-function1S 9 StatementStatementBSN9 block-actionasblock-action as}1S8 StorageStoragexDS8 Storage allocationStorage allocationVS$$N8 usingstructure-attributeusing structure-attributeFS"8 Storage-class tB *Storage-class *LSN9 inpsect-declarationin psect-declaration DS9 String encodingsString encodings -SN8 ASCIIASCII 3S N8 RAD50_10RAD50_10 3S N8 RAD50_11RAD50_11 3S N8 Radix-50Radix-50 /SN8 SIXBITSIXBIT DS8 %STRINGfunction%STRING functionBS8 String operationsString operatiod51 51ns7S N9 compile-timecompile-timeSS##8 (seeLexical Functions)(see Lexical Functions)I/S N8 run-timerun-timeUS$$8 (see Character Handling)(see Character Handling) ?S8 String-literalString-literalHS#8 String-literal ?B *String-literal *OS!!N9 lexical processingoflexical processing of9S 9 String-typeString-type5S 8 StructureStructureBSN8 introductiontointroduction toU5S N8 predeclaredpredeclared9S 8 BITVECTORBITVECTORC-S9 BLOCKBLOCK=S 9 BLOCKVECTORBLOCKVECTORR3S9 VECTORVECTOR6ESN9 predeclared>BLOCKpredeclared>BLOCKJWS N8 user-defineduser-definedZ9>@ER`l1S 8 STRUCTURESTRUCTUREDSN8 in module-switchin module-switch 6S N8 inswitchin switchI LS9 Structure allocationStructure allocationBSN9 introductiontointroduction toIS8 Structure-attributeStructure-attributeRS(8 Structure-attribute B *Structure-attribute *:S N8 inswitchin switchI ?S8 Structure-bodyStructure-bodyMS9 Structure-declarationStructure-declaration?SN9 interchangableinterchangableBSN8 introductiontointroduction to[S''N8 placementoffield-selectorplacement of field-selectork;S8 Structure-nameStructure-name`S))N8 ingeneral-structure-referencein general-structure-referencePS!!N8 instructure-attributein structure-attributeTS##N8 instructure-declarationin structure-declarationIS9 Structure-referenceStructure-reference8S N9 asprimaryas primary:S N8 examplesofexamples ofBSN8 introductiontointroduction to?S8 Structure-sizeStructure-size?S8 SUBD(16,32,36)SUBD(16,32,36) ?S9 SUBF(16,32,36)SUBF(16,32,36) 9S 9 SUBG(32,36)SUBG(32,36) 3S 8 SUBH(32)SUBH(32) 9S 8 SUBM(16,32)SUBM(16,32) BS8 SubroutineflowSubroutine flowLS8 SubtractionoperatorSubtraction operatorPRS""9 Supplementary functionsSupplementary functionsQS""N9 for characterhandlingfor character handling 3S 8 SWAB(16)SWAB(16) HS8 %SWITCHESfunction%SWITCHES function XS)8 Switches-declaration JC *Switches-declaration *I RS##N8 inlibrarysourcefilein library source file /S 8 SYMBOLICSYMBOLICDSN8 in module-switchin module-switch 6S N9 inswitchin switchI DS9 Symbolic constantsSymbolic constantsVS&&N8 (seeBIND-data-declaration,(see BIND-data-declaration,LS8 LITERAL declaration)LITERAL declaration) WS%%8 Symmetricarray structureSymmetric array structureEBS8 SyntaxnotationSyntax notation=SN9 concatenationconcatenationVS$$N9 dialect-specificfeaturesdialect-specific features9S N8 disjunctiondisjunction3S N8 ellipsisellipsis9S N8 replicationreplicationFSN8 syntacticliteralsyntactic literal@SN9 syntacticnamesyntactic name@SN9 syntacticrulesyntactic ruleWS''8 System interface operationsSystem interface operations9S N9 builtin(36)builtin(36)!i  iTT%S  8 T11T11LSN8 inmodule-switch(16)in module-switch(16) >S8 Tab characterTab character@S8 TargetsystemsTarget systemsVS$$9 Target-system differencesTarget-system differences@S9 TemporarydataTemporary dataI%S  8 TESTESHSN8 incase-expressionin case-expressionLSN8 infield-declarationin field-declarationLSN8 inselect-expressionin select-expression+S9 TestTestUS$$N9 incomplete evaluationofincomplete evaluation of=S8 TESTBITCC(32)TESTBITCC(32) ?S8 TESTBITCCI(32)TESTBITCCI(32) =S8 TESTBITCS(32)TESTBITCS(32) =S8 TESTBITSC(32)TESTBITSC(32) =S8 TESTBITSS(32)TESTBITSS(32) ?S8 TESTBITSSI(32)TESTBITSSI(32) OS  9 Tested-loop-expressionTested-loop-expressionaS**9 THENinconditional-expressionTHEN in conditional-expressionBS8 %TITLEfunction%TITLE function #S  8 TOTOHSN8 incase-expressionin case-expressionHSN8 inloop-expressionin loop-expressionLSN9 inselect-expressionin select-expression+S9 TOPS10TOPS10LSN8 inmodule-switch(36)in module-switch(36) +S8 TOPS20TOPS20LSN8 inmodule-switch(36)in module-switch(36) )S8 TRACETRACEDSN9 in module-switchin module-switch 6S N9 inswitchin switchI DS8 TrailingcommentTrailing commentBS9 TransfervectorTransfer vectorZS$$8 TransportabilitycheckingTransportability checking] NS  8 TRAPlinkage-type(16)TRAP linkage-type(16)MVS$$8 Two-dimensional structureTwo-dimensional structure@!i  iUU+S9 UNAMESUNAMESDSN9 in module-switchin module-switch 6S N8 inswitchin switchI BS8 Unary operatorsUnary operators@S8 UncountedPLITUncounted PLITZS*8 Undeclare-declaration oB *Undeclare-declaration *t VS%%9 UndefinedvalueofblockUndefined value of block~FS9 %UNQUOTEfunction%UNQUOTE function BS N8 examplesofexamples of  /S 8 UNSIGNEDUNSIGNEDPS!!N8 inextension-attributein extension-attributeHSN8 inrange-attributein range-attribute/US$$9 Unsignedvalue extensionUnsigned value extension US$$8 UNTILinloop-expressionUNTIL in loop-expression>S9 UnwindsignalUnwind signalZ 5S 9 UnwindingUnwinding :S N8 examplesofexamples of FS8 Up-arrowoperatorUp-arrow operator=?S8 UPLITinplitUPLIT in plitJS8 %UPVAL literal-name%UPVAL literal-nameRS""9 User-defined structuresUser-defined structures9VS$$N9 bounds-checking structurebounds-checking structure>WS%%N8 generalpurpose structuregeneral purpose structurelTS##N8 non-contiguous structurenon-contiguous structureR[S''N8 one-originvector structureone-origin vector structure;_S))N8 partially overlayed structurepartially overlayed structure`WS%%N8 symmetricarray structuresymmetric array structureEVS$$N9 two-dimensional structuretwo-dimensional structure@1S9 UUO(36)UUO(36) !i  iVV)S8 ValueValueBSN8 discardedvaluediscarded value<S N8 extensionofextension of9S N8 ofablockof a blockz4S N8 ofnamesof namesBSN9 undefinedvalueundefined value}OS!!9 ValuereturnregisterValue return registerTS##8 VALUECBITlinkage-optionVALUECBIT linkage-optionE+S8 ValuesValuesUS$$N8 normalrepresentationofnormal representation ofFS8 %VARIANTfunction%VARIANT function ^S))9 /VARIANTincompilercommand/VARIANT in compiler command MS  9 VAXcallingstandardVAX calling standard^+S8 VECTORVECTORLSN8 aspsect-attributeas psect-attribute 5 DS8 VECTOR structureVECTOR structure8S N8 exampleofexample of6-S9 VERSIONVERSIONDSN9 in module-switchin module-switch RS##9 VerticalbarinsyntaxVertical bar in syntax%S  9 VMSVMSOS!!N8 conditionhandlingincondition handling in GS8 Volatile-attributeVolatile-attributePS'8 Volatile-attribute B *Volatile-attribute *`S&&N8 usein conditionhandlinguse in condition handlingD g !i  jWW3S 9 WAIT(16)WAIT(16) @S8 %WARNfunction%WARN function ?S8 Weak-attributeWeak-attributeDTS##N8 inexternal-routine-declin external-routine-decl8S N8 purposeofpurpose of}US$$9 WHILEinloop-expressionWHILE in loop-expressionUS$$9 WITHinleave-expressionWITH in leave-expression%LS8 WORDallocation-unitWORD allocation-unit9S8 WORD_RELATIVEWORD_RELATIVE\S''N8 inaddressing-mode-attributein addressing-mode-attribute7LSN8 inmodule-switch(32)in module-switch(32) 6S N8 inswitchin switchI )S8 WRITEWRITEASN9 psect-attributepsect-attribute [S''9 Writing character sequencesWriting character sequences HS8 Writing charactersWriting characters !i  iXXOS!!8 %Xininteger-literal%X in integer-literal1S8 XFC(32)XFC(32) PS""9 XORasinfixoperatorXOR as infix operatord!i  iZZ%S  8 ZIPZIPDSN8 in module-switchin module-switch 6S N8 inswitchin switchI   4OD.2BBLISS-32Machine-Specific FunctionsLOUThe followingliststhe predefinedBLISS-32machine-specific#O functionsby operation.Z 00OD.2.1B ProcessorRegister Operations vb2OMFPRfMovefroma processorregister0O]MTPRfMovetoa processorregister\ 22OD.2.2B Parameter Validation Operations vY,OPROBERxProberead accessibility-O]PROBEWhProbewrite accessibilityV ,,OD.2.3BProgramStatus Operations i5OBICPSW}Bitclear processorstatusword3O]BISPSWBitset processorstatusword9OPMOVPSLhMovefrom processorstatuslongwordL ""OD.2.4BQueue Operations| PR>OINSQHIInsertentryinqueuehead, interlocked@O]REMQHIhRemoveentryfromqueuehead, interlocked>OPINSQTIInsertentryinqueuetail, interlocked@OREMQTIsRemoveentryfromqueuetail, interlocked*OINSQUE}Insertentryinqueue,O7REMQUE]RemoveentryfromqueueX ..OD.2.5BBit Manipulation Operations  OFFC!bFindfirstclearbit O]FFSb]Findfirstsetbit=OP TESTBITCCTestforbitclear,thenclearbit;O TESTBITCSTestforbitclear,thensetbit;O TESTBITSCTestforbitset,thenclearbit9O7 TESTBITSSTestforbitset,thensetbitKO+ TESTBITCCIxTestforbitclear,thenclearbit interlockedGO TESTBITSSITestforbitset,thensetbit interlockedQ ''OD.2.6B Arithmetic Operations  0OADAWI^Addalignedword interlocked)OADDDAdd D-floatingoperands)OPADDFAdd F-floatingoperands)OADDGAdd G-floatingoperands)ODADDHAdd H-floatingoperands(OADDMAdd multiwordoperands'OASHQ Arithmeticshiftquad,ODIVDDivide D-floatingoperands,ODIVFDivide F-floatingoperands,ODIVGDivide G-floatingoperands,ODIVHDivide H-floatingoperands*OEDIVExtended-precisiondivide,OEMULExtended-precisionmultiply.Os MULDMultiply D-floatingoperands.O MULFMultiply F-floatingoperands.Of MULGMultiply G-floatingoperands.O MULHMultiply H-floatingoperands.O SUBDSubtract D-floatingoperands.OM SUBFSubtract F-floatingoperands.O SUBGSubtract G-floatingoperands.OA SUBHSubtract H-floatingoperands-O SUBMSubtract multiwordoperands] 33OD.2.7B Arithmetic Comparison Operations  -OCMPD`Compare D-floatingoperands-O]CMPFfCompare F-floatingoperands-OCMPG[Compare G-floatingoperands-OPCMPH[Compare H-floatingoperands,OCMPMPCompare multiwordoperands] 33OD.2.8B Arithmetic Conversion Operations 44OCVTDFnConvert D-floatingto F-floating4O]CVTFDnConvert F-floatingto D-floating1OPCVTDIyConvert D-floatingtointeger1OCVTIDyConvertintegerto D-floating.OCVTDLnConvert D-floatingtolong.O7CVTLDnConvertlongto D-floating4O+CVTFGiConvert F-floatingto G-floating4OCVTGFiConvert G-floatingto F-floating4OCVTFHiConvert F-floatingto H-floating4OCVTHFiConvert H-floatingto F-floating1OCVTFI~Convert F-floatingtointeger1OCVTIF~Convertintegerto F-floating.Os CVTFLtConvert F-floatingtolong.O CVTLFtConvertlongto F-floating.O CVTLGiConvertlongto G-floating.OZ CVTGLiConvert G-floatingtolong.OM CVTLHiConvertlongto H-floating.O CVTHLiConvert H-floatingtolong>O CVTRDH4Convertrounded D-floatingto H-floating8O4CVTRDL>Convertrounded D-floatingtolong8OCVTRFLDConvertrounded F-floatingtolong>O(CVTRGH.Convertrounded G-floatingto H-floating8OCVTRGL9Convertrounded G-floatingtolong8OCVTRHL9Convertrounded H-floatingtolongX ..OD.2.9B CharacterString Operations 0OCMPC3nCompare characters3operand0O]CMPC5nCompare characters5operand3OPCRC Calculatecyclic redundancycheck!ODLOCCLocate characterOSKPCSkip character,OMOVC3dMove character3operand,O+MOVC5dMove character5operand-OMOVTCYMove translated characters4OMOVTUC$Move translateduntil character#OMATCHC$Match characters!OSCANCiScan characters!OSPANCnSpan charactersW --OD.2.10CDecimalString Operations 5OASHPp ArithmeticshiftandroundpackedOCMPPfComparepacked*OCVTLPFConvertlongtopacked*ODCVTPLFConvertpackedtolong@O7CVTPSKConvertpackedtoleadingseparatenumeric@OCVTSPKConvertleadingseparatenumerictopacked7OCVTPTFConvertpackedtotrailingnumeric7OCVTTPFConverttrailingnumerictopacked5OEDITPC+Editpackedto characterstringOMOVP[MovepackedY //OD.2.11C ProcessorAction Operations rOBPT BreakpointOCHM(x)6ChangemodeOHALTkHalt processorONOPNo operationU ++OD.2.12C Miscellaneous Operations D-OBUGLkBugcheckwithlongoperand-O]BUGWVBugcheckwithwordoperand4OPCALLG;CallwithgeneralargumentlistODINDEXKComputeindexO7ROTRotate'O+XFCExtendedfunctioncall   4OD.3BBLISS-36Machine-Specific FunctionsLOUThe followingliststhe predefinedBLISS-32machine-specific#O functionsby operation.N $$OD.3.1BLogical Operations  OASH)4ArithmeticallyshiftavalueDOFIRSTONEFindtheleftmostnonzerolistinavalue OLSH$4 Logicallyshiftavalue OROT4RotateavalueY //OD.3.2BByte Manipulation Operations  KOCOPYII Incrementbothsourceand destinationbytepointers40andcopyabyteIO$COPYIN IncrementasourcebytepointerandcopyabyteNOCOPTNI Incrementa destinationbytepointerandcopyabyteO COPYNNCopyabyte ODPB4DepositabyteOINCP%4 Incrementabytepointer OLDB4LoadabyteOPOINT24BuildaDECsystem-10/20bytepointerDOREPLACEI Incrementabytepointerandstoreabyte;O REPLACENpStoreabytegivenabytepointerO SCANI:4  Incrementabytepointerandfetchabyte8O SCANNFetchabytegivenabytepointerQ''OD.3.3B Arithmetic Operations=)OADDDfAdd D-floatingoperands)O]ADDFkAdd F-floatingoperands)OADDG`Add G-floatingoperands,ODIVDvDivide D-floatingoperands,ODDIVF{Divide F-floatingoperands,ODIVGpDivide G-floatingoperands.OMULD[Multiply D-floatingoperands.O+MULF`Multiply F-floatingoperands.OMULGVMultiply G-floatingoperands.OSUBDvSubtract D-floatingoperands.OSUBF{Subtract F-floatingoperands.OSUBGpSubtract G-floatingoperands]33OD.3.4B Arithmetic Comparison Operations-OCMPD`Compare D-floatingoperands-O]CMPFfCompare F-floatingoperands-OCMPG[Compare G-floatingoperands]33OD.3.5B Arithmetic Conversion Operations +4OCVTDFnConvert D-floatingto F-floating4O]CVTFDnConvert F-floatingto D-floating1OPCVTDIyConvert D-floatingtointeger1OCVTIDyConvertintegerto D-floating1OCVTFI~Convert F-floatingtointeger1O7CVTIF~Convertintegerto F-floating4O+CVTGFiConvert G-floatingto F-floating4OCVTFGiConvert F-floatingto G-floating1OCVTGItConvert G-floatingtointeger1OCVTIGtConvertintegerto G-floating_55OD.3.6BMachineCode Insertion Operations :OMACHOPExecuteaDECsystem-10/20 instructionNO]MACHSKIPjExecuteaDECsystem-10/20 instructionandrecordany4skipX..OD.3.7BSystem Interface Operations vc2OJSYSPerformaTOPS-20monitorcall1O]UUOPerformaTOPS-10monitorcall*  28  !!!!!!""!!!!!!!!!!!!!!!!!!!!!!#########################################$$$$%%$$$$$$$$$$$$$$$$$$&&&&&&&&&&&&''''''((()))))**++++++++,,--..--------------------------------------------------------------------------------------------------------------------//////////////////////////////////////////////0000000111111111111111111111111111111222222222222222222223333333333333334444544444444444466666666666666777777777777777778888888999:::::::::::::::::::::;;;;;;;;;;;;;;;;;;;;;;<<=========================>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>????@@@@@@@@@@@AAAAAAAABBBBBBBCCCCCCCDDDDDDDDDDDDDDDDDDDDDDEEEEEFEEEEEEEGGGGGGGGGGGGGGGGGGGGHHHHHHHHHHHHIIIIIIIIJJJJJJJJJJKKKKKKKKKLLLLLLLLLLLLMMMMMMMMMMMMMMNNNNNOPPPPPPPQQQQQQQQQQQQQQQQQQQQRRRRRRRRRRSSSSSSSSSTTTTTTTTTTTTUUUUUUUUUUUUUVVVVVWWWWWWWWWWWWWWWWWWXXXXXXXXXXXXXXXXXYYYYYYYYYYYYZZZZZZZZ[[[[[[\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\]]]]]^]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]_____________`````a`````````bbbbbbbbbbbbbcccccccccddddddddddddddddddddddeeeeeeeeeeeeeeeeeeeeeeffffffffffffffffffffffgggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggghhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhiiiijjjjjjjjjjjjjjjjjjjjjkkklkkkkkkkkkkmmmmmnnnnnnnnnnoonnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnpppqppppprrrrsrrrtttutttvvvvvvvvwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxyyyzzyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{||||||||||||}}}}}}}}}}}}}}}}}}}}}}}}}}}}~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}PrefacePrefacePrefacePrefacePrefacePrefacePrefacePrefacePrefacePrefacePrefacePrefacePreface1. Introduction1. Introduction1. Introduction1. Introduction1. Introduction1.1 BLISS Dialects1.1 BLISS Dialects21.2 Language Objectives and Characteristics1.2.1 Design Objectives1.2.1 Design Objectives1.2.1 Design Objectives1.2.2 Language Overview1.2.2 Language Overview1.2.2 Language Overview1.2.2 Language Overview1.2.2 Language Overview1.3 Program Development1.3 Program Development1.3 Program Development1.3 Program Development%1.4 The Main Features of BLISS1.4.1 Data1.4.1 Data1.4.1 Data1.4.2 Memory Addressing1.4.2 Memory Addressing1.4.2 Memory Addressing1.4.3 Fetching Values1.4.3 Fetching Values1.4.3 Fetching Values1.4.3 Fetching Values1.4.3 Fetching Values1.4.4 Assigning Values1.4.4 Assigning Values1.4.4 Assigning Values1.4.4 Assigning Values1.4.4 Assigning Values1.4.5 Expressions1.4.5 Expressions1.4.5 Expressions1.4.5 Expressions1.4.5 Expressions1.4.6 Blocks1.4.6 Blocks1.4.6 Blocks1.4.6 Blocks1.4.6 Blocks1.4.6 Blocks1.4.6 Blocks1.4.6 Blocks1.4.6 Blocks1.4.6 Blocks1.4.6 Blocks1.4.6 Blocks1.4.7 Declarations1.4.7 Declarations1.4.7 Declarations1.4.7 Declarations1.4.7 Declarations1.4.7 Declarations1.4.7 Declarations1.4.7 Declarations1.4.7 Declarations1.4.8 Structures1.4.8 Structures1.4.8 Structures1.4.8 Structures1.4.8 Structures1.4.9 Flow of Control1.4.9 Flow of Control1.4.9 Flow of Control1.4.9 Flow of Control1.4.9 Flow of Control1.4.9 Flow of Control1.4.10 Loops1.4.10 Loops1.4.10 Loops1.4.10 Loops1.4.11 Binding of Names1.4.11 Binding of Names1.4.11 Binding of Names1.4.11 Binding of Names1.4.11 Binding of Names1.4.11 Binding of Names1.4.11 Binding of Names#1.5 Program Transportability#1.5 Program Transportability#1.5 Program Transportability#1.5 Program Transportability"1.6 Effects of Optimization"1.6 Effects of Optimization"1.6 Effects of Optimization'1.7 The BLISS Programming System'1.7 The BLISS Programming System'1.7 The BLISS Programming System1.7.1 System Components1.7.1 System Components1.7.1 System Components1.7.1 System Components1.7.1 System Components1.7.1 System Components1.7.1 System Components1.7.1 System Components!1.7.2 Constant Expressions!1.7.2 Constant Expressions!1.7.2 Constant Expressions!1.7.2 Constant Expressions!1.7.2 Constant Expressions!1.7.2 Constant Expressions!1.7.2 Constant Expressions1.8 A Complete Program1.8 A Complete Program1.8 A Complete Program1.8 A Complete Program1.8 A Complete Program1.8 A Complete Program1.8 A Complete Program1.8 A Complete Program1.8 A Complete Program1.8 A Complete Program1.8 A Complete Program1.8 A Complete Program1.8 A Complete Program1.8 A Complete Program1.8 A Complete Program1.8 A Complete Program1.8 A Complete Program1.8 A Complete Program12. Lexical Definitions and Syntax Notation12. Lexical Definitions and Syntax Notation12. Lexical Definitions and Syntax Notation12. Lexical Definitions and Syntax Notation12. Lexical Definitions and Syntax Notation#2.1 Characters and Linemarks2.1.1 Characters2.1.1 Characters2.1.1 Characters2.1.1 Characters2.1.2 Linemarks2.1.2 Linemarks2.2 Lexemes and Spaces2.2.1 Lexemes2.2.1 Lexemes2.2.1 Lexemes 2.2.2 Spaces and Comments 2.2.2 Spaces and Comments 2.2.2 Spaces and Comments 2.2.2 Spaces and Comments 2.2.2 Spaces and Comments 2.2.2 Spaces and Comments 2.2.2 Spaces and Comments2.3 The Separation Rules2.3 The Separation Rules2.3 The Separation Rules2.3 The Separation Rules2.4 The Syntax Notation2.4 The Syntax Notation2.4 The Syntax Notation2.4.1 Syntactic Rules2.4.1 Syntactic Rules2.4.1 Syntactic Rules2.4.1 Syntactic Rules2.4.1 Syntactic Rules2.4.1 Syntactic Rules2.4.1 Syntactic Rules32.4.2 Syntactic Names and Syntactic Literals32.4.2 Syntactic Names and Syntactic Literals32.4.2 Syntactic Names and Syntactic Literals32.4.2 Syntactic Names and Syntactic Literals32.4.2 Syntactic Names and Syntactic Literals32.4.2 Syntactic Names and Syntactic Literals32.4.2 Syntactic Names and Syntactic Literals2.4.3 Concatenations2.4.3 Concatenations2.4.3 Concatenations2.4.3 Concatenations2.4.3 Concatenations2.4.3 Concatenations2.4.3 Concatenations2.4.3 Concatenations2.4.4 Disjunctions2.4.4 Disjunctions2.4.4 Disjunctions2.4.4 Disjunctions2.4.4 Disjunctions2.4.4 Disjunctions2.4.4 Disjunctions2.4.4 Disjunctions2.4.5 Replications2.4.5 Replications2.4.5 Replications2.4.5 Replications2.4.5 Replications2.4.5 Replications2.4.5 Replications2.4.5 Replications2.4.5 Replications"2.4.6 Dialectal Differences"2.4.6 Dialectal Differences"2.4.6 Dialectal Differences"2.4.6 Dialectal Differences"2.4.6 Dialectal Differences"2.4.6 Dialectal Differences"2.4.6 Dialectal Differences"2.4.6 Dialectal Differences"2.4.6 Dialectal Differences"2.4.6 Dialectal Differences"2.4.6 Dialectal Differences"2.4.6 Dialectal Differences/3. BLISS Values and Data Representations/3. BLISS Values and Data Representations3.1 BLISS Values3.1 BLISS Values3.1 BLISS Values3.1 BLISS Values3.1 BLISS Values3.1.1 Fullword Values3.1.1 Fullword Values3.1.1 Fullword Values3.1.1 Fullword Values3.1.1 Fullword Values3.1.1 Fullword Values3.1.1 Fullword Values3.1.1 Fullword Values3.1.1 Fullword Values3.1.1 Fullword Values3.1.1 Fullword Values3.1.1 Fullword Values3.1.1 Fullword Values3.1.1 Fullword Values3.1.1 Fullword Values3.1.1 Fullword Values3.1.1 Fullword Values3.1.1 Fullword Values3.1.1 Fullword Values3.1.1 Fullword Values3.1.1 Fullword Values3.1.2 Field Values3.1.2 Field Values3.1.2 Field Values3.1.3 Extending Values3.1.3 Extending Values3.1.3 Extending Values3.1.3 Extending Values3.1.3 Extending Values3.1.3 Extending Values3.1.3 Extending Values3.1.3 Extending Values3.1.3 Extending Values3.1.3 Extending Values3.1.3 Extending Values3.1.3 Extending Values3.1.3 Extending Values3.1.3 Extending Values3.1.3 Extending Values3.1.3 Extending Values3.1.3 Extending Values3.1.3 Extending Values3.2 Data Segments3.2 Data Segments3.2 Data Segments83.2.1 Addressable Units and Units per BLISS Value83.2.1 Addressable Units and Units per BLISS Value83.2.1 Addressable Units and Units per BLISS Value83.2.1 Addressable Units and Units per BLISS Value83.2.1 Addressable Units and Units per BLISS Value83.2.1 Addressable Units and Units per BLISS Value3.2.2 Scalars3.2.2 Scalars3.2.2 Scalars3.2.2 Scalars3.2.2 Scalars3.2.2 Scalars3.2.2 Scalars3.2.2 Scalars3.2.2 Scalars3.2.2 Scalars3.2.2 Scalars3.2.2 Scalars3.2.2 Scalars3.2.2 Scalars3.2.2 Scalars3.2.2 Scalars3.2.2 Scalars3.2.2 Scalars3.2.2 Scalars3.2.2 Scalars3.2.2 Scalars3.2.3 VECTOR Structures3.2.3 VECTOR Structures3.2.3 VECTOR Structures3.2.3 VECTOR Structures3.2.3 VECTOR Structures3.2.3 VECTOR Structures3.2.3 VECTOR Structures3.2.3 VECTOR Structures3.2.3 VECTOR Structures3.2.3 VECTOR Structures3.2.3 VECTOR Structures3.2.3 VECTOR Structures3.2.3 VECTOR Structures!3.2.4 BITVECTOR Structures!3.2.4 BITVECTOR Structures!3.2.4 BITVECTOR Structures!3.2.4 BITVECTOR Structures!3.2.4 BITVECTOR Structures!3.2.4 BITVECTOR Structures!3.2.4 BITVECTOR Structures3.2.5 BLOCK Structures3.2.5 BLOCK Structures3.2.5 BLOCK Structures3.2.5 BLOCK Structures3.2.5 BLOCK Structures3.2.5 BLOCK Structures3.2.5 BLOCK Structures3.2.5 BLOCK Structures#3.2.6 BLOCKVECTOR Structures#3.2.6 BLOCKVECTOR Structures#3.2.6 BLOCKVECTOR Structures#3.2.6 BLOCKVECTOR Structures#3.2.6 BLOCKVECTOR Structures#3.2.6 BLOCKVECTOR Structures#3.2.6 BLOCKVECTOR Structures#3.2.6 BLOCKVECTOR Structures"3.2.7 Programmed Structures"3.3 Character Sequence Data"3.3 Character Sequence Data"3.3 Character Sequence Data-3.3.1 General Character Representation-3.3.1 General Character Representation-3.3.1 General Character Representation-3.3.1 General Character Representation-3.3.1 General Character Representation-3.3.1 General Character Representation-3.3.1 General Character Representation*3.3.2 Character Sequence Operations*3.3.2 Character Sequence Operations*3.3.2 Character Sequence Operations*3.3.2 Character Sequence Operations*3.3.2 Character Sequence Operations*3.3.2 Character Sequence Operations.3.3.3 BLISS-16 Character Representation.3.3.3 BLISS-16 Character Representation.3.3.3 BLISS-16 Character Representation.3.3.3 BLISS-16 Character Representation.3.3.4 BLISS-32 Character Representation.3.3.4 BLISS-32 Character Representation.3.3.4 BLISS-32 Character Representation.3.3.4 BLISS-32 Character Representation.3.3.5 BLISS-36 Character Representation.3.3.5 BLISS-36 Character Representation.3.3.5 BLISS-36 Character Representation.3.3.5 BLISS-36 Character Representation.3.3.5 BLISS-36 Character Representation3.4 Storage Organization3.4 Storage Organization3.4 Storage Organization3.4 Storage Organization3.4.1 The Stack3.4.1 The Stack3.4.2 The Registers3.4.2 The Registers3.4.2 The Registers)3.4.3 Storage for a Program Module)3.4.3 Storage for a Program Module)3.4.3 Storage for a Program Module)3.4.3 Storage for a Program Module4. Primary Expressions4. Primary Expressions4. Primary Expressions4. Primary Expressions4. Primary Expressions4. Primary Expressions4.1 Primaries4.1 Primaries4.1.1 Syntax4.1.1 Syntax4.1.2 Semantics4.2 Numeric-Literals4.2 Numeric-Literals4.2 Numeric-Literals4.2 Numeric-Literals4.2 Numeric-Literals4.2.1 Syntax SYNTAX SYNTAX4.2.1 Syntax4.2.1 Syntax4.2.1 Syntax4.2.2 Restrictions4.2.2 Restrictions4.2.2 Restrictions4.2.2 Restrictions4.2.2 Restrictions4.2.2 Restrictions4.2.2 Restrictions4.2.2 Restrictions4.2.2 Restrictions4.2.2 Restrictions4.2.2 Restrictions4.2.3 Defaults4.2.3 Defaults4.2.4 Semantics4.2.4 Semantics4.2.4 Semantics4.2.4 Semantics4.2.4 Semantics4.2.4 Semantics4.3 String Literals4.3 String Literals4.3 String Literals4.3 String Literals4.3 String Literals4.3 String Literals4.3.1 Syntax4.3.1 Syntax4.3.1 Syntax4.3.1 Syntax4.3.1 Syntax4.3.1 Syntax4.3.2 Restrictions4.3.2 Restrictions4.3.2 Restrictions4.3.2 Restrictions4.3.2 Restrictions4.3.2 Restrictions4.3.2 Restrictions4.3.2 Restrictions4.3.2 Restrictions4.3.2 Restrictions4.3.2 Restrictions4.3.3 Defaults4.3.3 Defaults4.3.4 Semantics4.3.4 Semantics4.3.4 Semantics4.3.4 Semantics4.3.4 Semantics4.3.4 Semantics4.3.4 Semantics4.3.4 Semantics4.3.4 Semantics4.3.4 Semantics4.3.4 Semantics4.3.4 Semantics4.3.4 Semantics4.3.4 Semantics4.3.4 Semantics4.3.4 Semantics4.4 PLITs4.4 PLITs4.4 PLITs4.4.1 Syntax SYNTAX SYNTAX4.4.2 Restrictions4.4.2 Restrictions4.4.2 Restrictions4.4.3 Defaults4.4.4 Semantics4.4.4 Semantics4.4.4 Semantics4.4.4 Semantics4.4.4 Semantics4.4.4 Semantics4.4.4 Semantics4.4.4 Semantics4.4.4 Semantics4.4.4 Semantics4.4.4 Semantics4.4.5 Pragmatics4.4.5 Pragmatics4.4.5 Pragmatics4.5 Names4.5.1 Syntax4.5.1 Syntax4.5.2 Restrictions4.5.2 Restrictions4.5.2 Restrictions4.5.2 Restrictions4.5.2 Restrictions4.5.3 Semantics4.5.3 Semantics4.5.3 Semantics4.5.3 Semantics4.6 Blocks4.6 Blocks4.6 Blocks4.6 Blocks4.6 Blocks4.6 Blocks4.7 Structure-References4.7 Structure-References4.7 Structure-References4.8 Routine-Calls4.8 Routine-Calls4.8 Routine-Calls4.8 Routine-Calls4.8 Routine-Calls4.9 Field-References4.9 Field-References4.10 Code Comments4.10 Code Comments4.10.1 Syntax4.10.1 Syntax4.10.2 Semantics4.10.2 Semantics4.10.2 Semantics4.10.2 Semantics#5. Computational Expressions#5. Computational Expressions5.1 Operator-Expressions5.1.1 Syntax SYNTAX SYNTAX5.1.1 Syntax5.1.1 Syntax5.1.1 Syntax5.1.1 Syntax5.1.2 Restrictions5.1.2 Restrictions5.1.2 Restrictions5.1.2 Restrictions5.1.2 Restrictions5.1.2 Restrictions5.1.3 Defaults5.1.3 Defaults5.1.3 Defaults5.1.3 Defaults5.1.3 Defaults5.1.3 Defaults5.1.3 Defaults5.1.3 Defaults5.1.4 Semantics5.1.4 Semantics5.1.4 Semantics5.1.4 Semantics5.1.4 Semantics5.1.4 Semantics5.1.4 Semantics5.1.4 Semantics5.1.4 Semantics 5.1.4.1 Fetch Expressions 5.1.4.1 Fetch Expressions 5.1.4.1 Fetch Expressions 5.1.4.1 Fetch Expressions 5.1.4.1 Fetch Expressions&5.1.4.2 Prefix Sign Expressions&5.1.4.2 Prefix Sign Expressions&5.1.4.2 Prefix Sign Expressions&5.1.4.2 Prefix Sign Expressions5.1.4.3 Shift Expression5.1.4.3 Shift Expression5.1.4.3 Shift Expression5.1.4.3 Shift Expression5.1.4.3 Shift Expression5.1.4.3 Shift Expression5.1.4.3 Shift Expression5.1.4.3 Shift Expression5.1.4.3 Shift Expression5.1.4.3 Shift Expression5.1.4.3 Shift Expression5.1.4.3 Shift Expression5.1.4.3 Shift Expression%5.1.4.4 Arithmetic Expressions%5.1.4.4 Arithmetic Expressions%5.1.4.4 Arithmetic Expressions%5.1.4.4 Arithmetic Expressions%5.1.4.4 Arithmetic Expressions%5.1.4.4 Arithmetic Expressions%5.1.4.4 Arithmetic Expressions%5.1.4.4 Arithmetic Expressions%5.1.4.4 Arithmetic Expressions%5.1.4.4 Arithmetic Expressions%5.1.4.4 Arithmetic Expressions%5.1.4.4 Arithmetic Expressions%5.1.4.5 Relational Expressions%5.1.4.5 Relational Expressions%5.1.4.5 Relational Expressions%5.1.4.5 Relational Expressions%5.1.4.5 Relational Expressions%5.1.4.5 Relational Expressions%5.1.4.5 Relational Expressions%5.1.4.5 Relational Expressions%5.1.4.5 Relational Expressions%5.1.4.5 Relational Expressions%5.1.4.5 Relational Expressions%5.1.4.5 Relational Expressions%5.1.4.5 Relational Expressions"5.1.4.6 Boolean Expressions"5.1.4.6 Boolean Expressions"5.1.4.6 Boolean Expressions"5.1.4.6 Boolean Expressions"5.1.4.6 Boolean Expressions"5.1.4.6 Boolean Expressions"5.1.4.6 Boolean Expressions"5.1.4.6 Boolean Expressions"5.1.4.6 Boolean Expressions"5.1.4.6 Boolean Expressions"5.1.4.6 Boolean Expressions"5.1.4.6 Boolean Expressions%5.1.4.7 Assignment Expressions%5.1.4.7 Assignment Expressions%5.1.4.7 Assignment Expressions%5.1.4.7 Assignment Expressions5.1.5 Pragmatics(5.1.5.1 Explicit Parenthesization(5.1.5.1 Explicit Parenthesization(5.1.5.1 Explicit Parenthesization(5.1.5.1 Explicit Parenthesization(5.1.5.1 Explicit Parenthesization(5.1.5.1 Explicit Parenthesization&5.1.5.2 The Order of Evaluation&5.1.5.2 The Order of Evaluation&5.1.5.2 The Order of Evaluation&5.1.5.2 The Order of Evaluation&5.1.5.2 The Order of Evaluation&5.1.5.2 The Order of Evaluation&5.1.5.2 The Order of Evaluation&5.1.5.2 The Order of Evaluation&5.1.5.2 The Order of Evaluation&5.1.5.2 The Order of Evaluation&5.1.5.2 The Order of Evaluation&5.1.5.2 The Order of Evaluation85.1.5.3 Operations on Field Values in BLISS-16/3285.1.5.3 Operations on Field Values in BLISS-16/3285.1.5.3 Operations on Field Values in BLISS-16/3285.1.5.3 Operations on Field Values in BLISS-16/3285.1.5.3 Operations on Field Values in BLISS-16/3285.1.5.3 Operations on Field Values in BLISS-16/3285.1.5.3 Operations on Field Values in BLISS-16/325.2 Executable-Functions5.2 Executable-Functions5.2 Executable-Functions5.2 Executable-Functions5.2 Executable-Functions5.2 Executable-Functions5.2 Executable-Functions5.2 Executable-Functions5.2 Executable-Functions5.2 Executable-Functions5.2.1 Syntax5.2.1 Syntax5.2.2 Semantics5.2.2 Semantics%5.2.2.1 SIGN and ABS Functions%5.2.2.1 SIGN and ABS Functions%5.2.2.1 SIGN and ABS Functions%5.2.2.1 SIGN and ABS Functions%5.2.2.1 SIGN and ABS Functions%5.2.2.1 SIGN and ABS Functions%5.2.2.1 SIGN and ABS Functions%5.2.2.1 SIGN and ABS Functions$5.2.2.2 MAX and MIN Functions$5.2.2.2 MAX and MIN Functions$5.2.2.2 MAX and MIN Functions$5.2.2.2 MAX and MIN Functions$5.2.2.2 MAX and MIN Functions$5.2.2.2 MAX and MIN Functions$5.2.2.2 MAX and MIN Functions$5.2.2.2 MAX and MIN Functions$5.2.2.2 MAX and MIN Functions$5.2.2.2 MAX and MIN Functions$5.2.2.2 MAX and MIN Functions$5.2.2.2 MAX and MIN Functions$5.2.2.2 MAX and MIN Functions 5.2.2.3 The %REF Function 5.2.2.3 The %REF Function 5.2.2.3 The %REF Function 5.2.2.3 The %REF Function 5.2.2.3 The %REF Function 5.2.2.3 The %REF Function 5.2.2.3 The %REF Function 5.2.2.3 The %REF Function 5.2.2.3 The %REF Function 5.2.2.3 The %REF Function5.2.3 Pragmatics6. Control Expressions6. Control Expressions6. Control Expressions6. Control Expressions6. Control Expressions6. Control Expressions6. Control Expressions"6.1 Conditional-Expressions"6.1 Conditional-Expressions"6.1 Conditional-Expressions6.1.1 Syntax6.1.1 Syntax6.1.1 Syntax6.1.1 Syntax6.1.1 Syntax6.1.2 Restrictions6.1.3 Semantics6.1.3 Semantics6.1.3 Semantics6.1.3 Semantics6.1.3 Semantics6.1.3 Semantics6.1.3 Semantics6.1.4 Pragmatics16.1.4.1 Nesting of Conditional Expressions16.1.4.1 Nesting of Conditional Expressions16.1.4.1 Nesting of Conditional Expressions16.1.4.1 Nesting of Conditional Expressions+6.1.4.2 Used Versus Discarded Values+6.1.4.2 Used Versus Discarded Values+6.1.4.2 Used Versus Discarded Values+6.1.4.2 Used Versus Discarded Values+6.1.4.2 Used Versus Discarded Values+6.1.4.2 Used Versus Discarded Values96.1.4.3 Complete Versus Incomplete Test Evaluation96.1.4.3 Complete Versus Incomplete Test Evaluation96.1.4.3 Complete Versus Incomplete Test Evaluation6.2 Case-Expressions6.2 Case-Expressions6.2 Case-Expressions6.2 Case-Expressions6.2.1 Syntax6.2.1 Syntax6.2.2 Restrictions6.2.2 Restrictions6.2.2 Restrictions6.2.2 Restrictions6.2.3 Semantics6.2.3 Semantics6.2.3 Semantics6.2.3 Semantics6.2.3 Semantics6.2.3 Semantics6.2.4 Pragmatics6.2.4 Pragmatics6.2.4 Pragmatics6.2.4 Pragmatics6.3 Select-Expressions6.3 Select-Expressions6.3 Select-Expressions6.3 Select-Expressions6.3 Select-Expressions6.3.1 Syntax6.3.1 Syntax6.3.2 Restrictions6.3.3 Semantics6.3.3 Semantics6.3.3 Semantics6.3.3 Semantics6.3.3 Semantics6.3.3 Semantics6.3.3 Semantics#6.4 Indexed-Loop-Expressions#6.4 Indexed-Loop-Expressions#6.4 Indexed-Loop-Expressions6.4.1 Syntax SYNTAX6.4.2 Restrictions6.4.3 Defaults6.4.3 Defaults6.4.3 Defaults6.4.4 Semantics6.4.4 Semantics6.4.4 Semantics6.4.4 Semantics6.4.4 Semantics6.4.4 Semantics6.4.5 Pragmatics6.4.5 Pragmatics"6.5 Tested-Loop-Expressions"6.5 Tested-Loop-Expressions"6.5 Tested-Loop-Expressions"6.5 Tested-Loop-Expressions6.5.1 Syntax6.5.1 Syntax6.5.2 Restrictions6.5.3 Semantics6.5.3 Semantics6.5.3 Semantics6.5.3 Semantics6.5.4 Pragmatics6.5.4 Pragmatics6.5.4 Pragmatics6.6 Exit-Expressions6.6 Exit-Expressions6.6.1 Syntax6.6.1 Syntax6.6.2 Restrictions6.6.2 Restrictions6.6.3 Semantics 6.6.3.1 Leave-Expressions 6.6.3.1 Leave-Expressions#6.6.3.2 Exitloop-Expressions#6.6.3.2 Exitloop-Expressions6.6.4 Pragmatics6.6.4 Pragmatics6.6.4 Pragmatics6.6.4 Pragmatics6.6.4 Pragmatics6.6.4 Pragmatics6.7 Return-Expressions6.7.1 Syntax6.7.1 Syntax6.7.2 Restrictions6.7.3 Semantics6.7.3 Semantics6.7.3 Semantics7. Constant Expressions7. Constant Expressions7. Constant Expressions,7.1 Compile-Time Constant Expressions,7.1 Compile-Time Constant Expressions,7.1 Compile-Time Constant Expressions,7.1 Compile-Time Constant Expressions,7.1 Compile-Time Constant Expressions,7.1 Compile-Time Constant Expressions,7.1 Compile-Time Constant Expressions,7.1 Compile-Time Constant Expressions7.1.1 Syntax7.1.1 Syntax7.1.2 Restrictions7.1.2 Restrictions7.1.2 Restrictions7.1.2 Restrictions7.1.2 Restrictions7.1.2 Restrictions7.1.2 Restrictions7.1.2 Restrictions7.1.2 Restrictions7.1.2 Restrictions7.1.3 Semantics)7.2 Link-Time Constant Expressions)7.2 Link-Time Constant Expressions)7.2 Link-Time Constant Expressions)7.2 Link-Time Constant Expressions)7.2 Link-Time Constant Expressions)7.2 Link-Time Constant Expressions)7.2 Link-Time Constant Expressions7.2.1 Syntax7.2.1 Syntax7.2.2 Restrictions7.2.2 Restrictions7.2.2 Restrictions7.2.2 Restrictions7.2.2 Restrictions7.2.2 Restrictions7.2.2 Restrictions7.2.2 Restrictions7.2.2 Restrictions7.2.3 Semantics7.2.3 Semantics7.2.3 Semantics7.2.3 Semantics!8. Blocks and Declarations!8. Blocks and Declarations8.1 Blocks8.1 Blocks8.1 Blocks8.1 Blocks8.1 Blocks8.1 Blocks8.1 Blocks8.1.1 Syntax8.1.1 Syntax8.1.1 Syntax8.1.1 Syntax8.1.2 Restrictions8.1.2 Restrictions8.1.2 Restrictions8.1.3 Semantics8.1.3 Semantics8.1.3 Semantics8.1.3 Semantics8.1.3 Semantics8.1.3 Semantics8.1.3 Semantics8.1.4 Discussion8.1.4 Discussion8.1.4 Discussion8.1.4 Discussion8.2 Declarations8.2 Declarations8.2 Declarations8.2 Declarations8.2 Declarations8.2 Declarations8.2 Declarations8.2 Declarations8.2.1 Syntax8.2.1 Syntax8.2.1 Syntax8.2.1 Syntax8.2.1 Syntax8.2.2 Restrictions8.2.2 Restrictions8.2.2 Restrictions8.2.2 Restrictions8.2.3 Semantics8.2.3 Semantics8.2.3 Semantics8.2.4 Discussion8.2.4 Discussion8.2.4 Discussion8.2.4 Discussion8.2.4 Discussion8.2.4 Discussion8.2.4 Discussion8.2.4 Discussion8.2.4 Discussion8.2.4 Discussion8.2.4 Discussion8.2.4 Discussion8.2.4 Discussion9. Attributes9. Attributes9. Attributes9. Attributes/9.1 The Allocation-Unit-BLISS-16/32 Only/9.1 The Allocation-Unit-BLISS-16/32 Only9.1.1 Syntax9.1.1 Syntax9.1.2 Default9.1.3 Restriction9.1.3 Restriction9.1.3 Restriction9.1.4 Semantics9.1.4 Semantics9.1.4 Semantics39.2 The Extension-Attribute-BLISS-16/32 Only39.2 The Extension-Attribute-BLISS-16/32 Only9.2.1 Syntax9.2.1 Syntax9.2.2 Restriction9.2.3 Default9.2.4 Semantics9.2.4 Semantics"9.3 The Structure-Attribute"9.3 The Structure-Attribute"9.3 The Structure-Attribute"9.3 The Structure-Attribute"9.3 The Structure-Attribute"9.3 The Structure-Attribute"9.3 The Structure-Attribute9.4 The Field-Attribute9.4 The Field-Attribute9.4 The Field-Attribute9.4.1 Syntax9.4.1 Syntax9.4.2 Default9.4.3 Semantics39.5 The Alignment-Attribute-BLISS-16/32 Only39.5 The Alignment-Attribute-BLISS-16/32 Only39.5 The Alignment-Attribute-BLISS-16/32 Only39.5 The Alignment-Attribute-BLISS-16/32 Only39.5 The Alignment-Attribute-BLISS-16/32 Only9.5.1 Syntax9.5.1 Syntax9.5.2 Restrictions9.5.2 Restrictions9.5.2 Restrictions9.5.2 Restrictions9.5.3 Default9.5.3 Default9.5.4 Semantics9.5.5 Discussion9.5.5 Discussion9.5.5 Discussion9.5.5 Discussion9.5.5 Discussion9.5.5 Discussion9.5.5 Discussion9.5.5 Discussion 9.6 The Initial-Attribute 9.6 The Initial-Attribute 9.6 The Initial-Attribute 9.6 The Initial-Attribute9.6.1 Syntax SYNTAX9.6.2 Restriction9.6.2 Restriction9.6.2 Restriction9.6.3 Default9.6.3 Default9.6.4 Semantics9.6.5 Pragmatics9.7 The Preset-Attribute9.7 The Preset-Attribute9.7 The Preset-Attribute9.7 The Preset-Attribute9.7.1 Syntax9.7.1 Syntax9.7.2 Restriction9.7.2 Restriction9.7.2 Restriction9.7.2 Restriction9.7.2 Restriction9.7.2 Restriction9.7.3 Default9.7.4 Semantics9.7.5 Pragmatics9.7.5 Pragmatics9.7.5 Pragmatics9.7.5 Pragmatics9.7.5 Pragmatics9.7.5 Pragmatics)9.8 The Psect-Allocation Attribute)9.8 The Psect-Allocation Attribute)9.8 The Psect-Allocation Attribute9.8.1 Syntax9.8.1 Syntax9.8.2 Restrictions9.8.2 Restrictions9.8.3 Defaults9.8.4 Semantics9.8.4 Semantics9.8.5 Pragmatics9.8.5 Pragmatics!9.9 The Volatile-Attribute!9.9 The Volatile-Attribute!9.9 The Volatile-Attribute!9.9 The Volatile-Attribute9.9.1 Syntax9.9.1 Syntax9.9.2 Semantics9.9.2 Semantics!9.10 The Novalue-Attribute!9.10 The Novalue-Attribute!9.10 The Novalue-Attribute!9.10 The Novalue-Attribute!9.10 The Novalue-Attribute!9.10 The Novalue-Attribute9.10.1 Syntax9.10.1 Syntax9.10.2 Restrictions9.10.3 Semantics!9.11 The Linkage-Attribute!9.11 The Linkage-Attribute!9.11 The Linkage-Attribute9.11.1 Syntax9.11.1 Syntax9.11.2 Restrictions9.11.2 Restrictions9.11.3 Defaults9.11.4 Semantics9.12 The Range-Attribute9.12 The Range-Attribute9.12 The Range-Attribute9.12 The Range-Attribute9.12 The Range-Attribute9.12 The Range-Attribute9.12 The Range-Attribute9.12.1 Syntax9.12.1 Syntax9.12.2 Restriction9.12.3 Default9.12.4 Semantics:9.13 The Addressing-Mode-Attribute-BLISS-16/32 Only:9.13 The Addressing-Mode-Attribute-BLISS-16/32 Only:9.13 The Addressing-Mode-Attribute-BLISS-16/32 Only9.13.1 Syntax9.13.1 Syntax9.13.2 Default9.13.2 Default9.13.2 Default9.13.2 Default9.13.2 Default9.13.2 Default9.13.3 Semantics9.13.3 Semantics9.13.3 Semantics,9.14 The Weak-Attribute-BLISS-32 Only,9.14 The Weak-Attribute-BLISS-32 Only9.14.1 Syntax9.14.1 Syntax9.14.2 Semantics(9.15 A Summary of Attribute Usage10. Data Declarations10. Data Declarations10. Data Declarations10. Data Declarations10. Data Declarations10. Data Declarations10. Data Declarations10.1 Own-Declarations10.1 Own-Declarations10.1 Own-Declarations10.1.1 Syntax10.1.1 Syntax10.1.2 Restrictions10.1.2 Restrictions10.1.2 Restrictions10.1.2 Restrictions10.1.2 Restrictions10.1.2 Restrictions10.1.2 Restrictions10.1.2 Restrictions10.1.3 Semantics10.1.3 Semantics10.1.3 Semantics10.1.3 Semantics10.1.3 Semantics10.1.3 Semantics10.1.3 Semantics10.2 Global-Declarations10.2 Global-Declarations10.2 Global-Declarations10.2.1 Syntax10.2.1 Syntax10.2.2 Restrictions10.2.2 Restrictions10.2.3 Semantics10.2.3 Semantics10.2.3 Semantics 10.3 Forward-Declarations 10.3 Forward-Declarations 10.3 Forward-Declarations10.3.1 Syntax10.3.1 Syntax10.3.2 Restrictions10.3.2 Restrictions10.3.2 Restrictions10.3.3 Semantics!10.4 External-Declarations10.4.1 Syntax10.4.1 Syntax10.4.2 Restrictions10.4.2 Restrictions10.4.2 Restrictions10.4.2 Restrictions10.4.3 Semantics10.4.3 Semantics10.4.3 Semantics10.4.3 Semantics10.4.3 Semantics10.5 Local-Declarations10.5 Local-Declarations10} }.5.1 Syntax10.5.1 Syntax10.5.2 Restrictions10.5.2 Restrictions10.5.2 Restrictions10.5.2 Restrictions10.5.2 Restrictions10.5.3 Semantics10.5.3 Semantics10.5.3 Semantics10.5.4 Pragmatics#10.6 Stacklocal-Declarations10.6.1 Syntax10.6.1 Syntax10.6.2 Restrictions10.6.3 Semantics!10.7 Register-Declarations!10.7 Register-Declarations!10.7 Register-Declarations10.7.1 Syntax10.7.1 Syntax10.7.2 Restrictions10.7.2 Restrictions10.7.2 Restrictions10.7.2 Restrictions10.7.2 Restrictions10.7.2 Restrictions10.7.2 Restrictions10.7.2 Restrictions10.7.3 Semantics10.7.3 Semantics10.7.4 Pragmatics10.7.4 Pragmatics10.7.4 Pragmatics(10.8 Global-Register-Declarations(10.8 Global-Register-Declarations(10.8 Global-Register-Declarations10.8.1 Syntax10.8.1 Syntax10.8.2 Restrictions10.8.2 Restrictions10.8.2 Restrictions10.8.2 Restrictions10.8.2 Restrictions10.8.2 Restrictions10.8.2 Restrictions10.8.2 Restrictions10.8.2 Restrictions10.8.2 Restrictions10.8.3 Semantics10.8.3 Semantics*10.9 External-Register-Declarations10.9.1 Syntax10.9.1 Syntax10.9.2 Restrictions10.9.2 Restrictions10.9.2 Restrictions10.9.2 Restrictions10.9.2 Restrictions10.9.3 Defaults10.9.4 Semantics10.9.4 Semantics10.9.4 Semantics10.10 Map-Declarations10.10 Map-Declarations10.10.1 Syntax10.10.1 Syntax10.10.2 Restrictions10.10.2 Restrictions10.10.2 Restrictions10.10.3 Semantics11. Data Structures11. Data Structures11. Data Structures11. Data Structures11. Data Structures11. Data Structures+11.1 Introduction to Data Structures+11.1 Introduction to Data Structures+11.1 Introduction to Data Structures+11.1 Introduction to Data Structures811.1.1 The Abstract Definition of Data Structures811.1.1 The Abstract Definition of Data Structures811.1.1 The Abstract Definition of Data Structures811.1.1 The Abstract Definition of Data Structures811.1.1 The Abstract Definition of Data Structures811.1.1 The Abstract Definition of Data Structures811.1.1 The Abstract Definition of Data Structures<11.1.2 The Concrete Representation of Data Structures<11.1.2 The Concrete Representation of Data Structures<11.1.2 The Concrete Representation of Data Structures<11.1.2 The Concrete Representation of Data Structures<11.1.2 The Concrete Representation of Data Structures<11.1.2 The Concrete Representation of Data Structures<11.1.2 The Concrete Representation of Data Structures<11.1.2 The Concrete Representation of Data Structures<11.1.2 The Concrete Representation of Data Structures<11.1.2 The Concrete Representation of Data Structures<11.1.2 The Concrete Representation of Data Structures<11.1.2 The Concrete Representation of Data Structures<11.1.2 The Concrete Representation of Data Structures<11.1.2 The Concrete Representation of Data Structures<11.1.2 The Concrete Representation of Data Structures;11.1.3 The Programmed Description of Data Structures 11.1.3.1 Field-References 11.1.3.1 Field-References 11.1.3.1 Field-References 11.1.3.1 Field-References 11.1.3.1 Field-References 11.1.3.1 Field-References 11.1.3.1 Field-References 11.1.3.1 Field-References 11.1.3.1 Field-References 11.1.3.1 Field-References 11.1.3.1 Field-References 11.1.3.1 Field-References 11.1.3.1 Field-References&11.1.3.2 Structure-Declarations&11.1.3.2 Structure-Declarations&11.1.3.2 Structure-Declarations&11.1.3.2 Structure-Declarations$11.1.3.3 Structure Allocation$11.1.3.3 Structure Allocation$11.1.3.3 Structure Allocation$11.1.3.3 Structure Allocation$11.1.3.4 Structure-References$11.1.3.4 Structure-References$11.1.3.4 Structure-References$11.1.3.4 Structure-References$11.1.3.4 Structure-References$11.1.3.4 Structure-References11.1.3.5 REF Structures11.1.3.5 REF Structures11.1.3.5 REF Structures11.1.3.5 REF Structures11.1.3.5 REF Structures11.1.3.5 REF Structures11.1.3.5 REF Structures11.1.3.5 REF Structures611.1.3.6 Interchangeable Structure-Declarations611.1.3.6 Interchangeable Structure-Declarations611.1.3.6 Interchangeable Structure-Declarations611.1.3.6 Interchangeable Structure-Declarations611.1.3.6 Interchangeable Structure-Declarations611.1.3.6 Interchangeable Structure-Declarations611.1.3.6 Interchangeable Structure-Declarations611.1.3.6 Interchangeable Structure-Declarations611.1.3.6 Interchangeable Structure-Declarations611.1.3.6 Interchangeable Structure-Declarations=11.1.3.7 Decimal Digit Arrays in BLISS-16 and BLISS-36=11.1.3.7 Decimal Digit Arrays in BLISS-16 and BLISS-36=11.1.3.7 Decimal Digit Arrays in BLISS-16 and BLISS-36=11.1.3.7 Decimal Digit Arrays in BLISS-16 and BLISS-36=11.1.3.7 Decimal Digit Arrays in BLISS-16 and BLISS-36=11.1.3.7 Decimal Digit Arrays in BLISS-16 and BLISS-36=11.1.3.7 Decimal Digit Arrays in BLISS-16 and BLISS-36=11.1.3.7 Decimal Digit Arrays in BLISS-16 and BLISS-36=11.1.3.7 Decimal Digit Arrays in BLISS-16 and BLISS-36=11.1.3.7 Decimal Digit Arrays in BLISS-16 and BLISS-36=11.1.3.7 Decimal Digit Arrays in BLISS-16 and BLISS-36=11.1.3.7 Decimal Digit Arrays in BLISS-16 and BLISS-3611.1.4 Conclusion11.1.4 Conclusion11.1.4 Conclusion11.1.4 Conclusion11.1.4 Conclusion11.2 Field-References11.2 Field-References11.2 Field-References11.2 Field-References11.2.1 Syntax SYNTAX11.2.1 Syntax11.2.1 Syntax11.2.1 Syntax11.2.1 Syntax11.2.1 Syntax11.2.1 Syntax11.2.1 Syntax11.2.1 Syntax11.2.1 Syntax11.2.1 Syntax11.2.2 Restrictions11.2.2 Restrictions11.2.2 Restrictions11.2.2 Restrictions11.2.2 Restrictions11.2.2 Restrictions11.2.2 Restrictions11.2.2 Restrictions11.2.2 Restrictions11.2.2 Restrictions11.2.2 Restrictions11.2.2 Restrictions11.2.2 Restrictions11.2.2 Restrictions11.2.2 Restrictions11.2.2 Restrictions11.2.3 Default11.2.4 Semantics11.2.4 Semantics11.2.4 Semantics11.2.4 Semantics11.2.4 Semantics11.2.4 Semantics11.2.4 Semantics11.2.4 Semantics11.2.4 Semantics11.2.4 Semantics11.2.4 Semantics11.2.4 Semantics11.2.4 Semantics11.2.4 Semantics11.2.4 Semantics11.2.4 Semantics11.2.4 Semantics11.2.4 Semantics11.2.4 Semantics11.2.4 Semantics11.2.4 Semantics11.2.4 Semantics11.2.4 Semantics11.2.4 Semantics11.2.5 Discussion11.2.5 Discussion11.2.5.1 Examples11.2.5.1 Examples11.2.5.1 Examples11.2.5.1 Examples11.2.5.1 Examples11.2.5.1 Examples11.2.5.1 Examples:11.2.5.2 Field-References in Structure-Declarations:11.2.5.2 Field-References in Structure-Declarations:11.2.5.2 Field-References in Structure-Declarations:11.2.5.2 Field-References in Structure-Declarations:11.2.5.2 Field-References in Structure-Declarations;11.2.5.3 Field-References and Expressions in General;11.2.5.3 Field-References and Expressions in General;11.2.5.3 Field-References and Expressions in General;11.2.5.3 Field-References and Expressions in General;11.2.5.3 Field-References and Expressions in General;11.2.5.3 Field-References and Expressions in General;11.2.5.3 Field-References and Expressions in General;11.2.5.3 Field-References and Expressions in General;11.2.5.3 Field-References and Expressions in General111.2.5.4 Operations on Scalar Field Values111.2.5.4 Operations on Scalar Field Values111.2.5.4 Operations on Scalar Field Values111.2.5.4 Operations on Scalar Field Values111.2.5.4 Operations on Scalar Field Values111.2.5.4 Operations on Scalar Field Values111.2.5.4 Operations on Scalar Field Values111.2.5.4 Operations on Scalar Field Values"11.3 Structure-Declarations"11.3 Structure-Declarations"11.3 Structure-Declarations"11.3 Structure-Declarations"11.3 Structure-Declarations"11.3 Structure-Declarations11.3.1 Syntax11.3.1 Syntax11.3.2 Restrictions11.3.2 Restrictions11.3.3 Semantics11.3.3 Semantics11.3.3 Semantics711.4 Structure-Attributes and Storage Allocation711.4 Structure-Attributes and Storage Allocation711.4 Structure-Attributes and Storage Allocation711.4 Structure-Attributes and Storage Allocation11.4.1 Syntax SYNTAX11.4.2 Restrictions11.4.2 Restrictions11.4.2 Restrictions11.4.2 Restrictions11.4.2 Restrictions11.4.3 Semantics11.4.3 Semantics11.4.3 Semantics11.4.3 Semantics11.5 Field-Declarations11.5 Field-Declarations11.5 Field-Declarations11.5 Field-Declarations11.5.1 Syntax11.5.1 Syntax11.5.2 Restrictions11.5.2 Restrictions11.5.2 Restrictions11.5.3 Semantics11.5.3 Semantics11.5.3 Semantics11.5.3 Semantics11.6 Field-Attributes11.6 Field-Attributes11.6 Field-Attributes11.6 Field-Attributes11.6.1 Syntax11.6.1 Syntax11.6.2 Restrictions11.6.2 Restrictions11.6.3 Semantics)11.7 Ordinary-Structure-References)11.7 Ordinary-Structure-References)11.7 Ordinary-Structure-References)11.7 Ordinary-Structure-References)11.7 Ordinary-Structure-References)11.7 Ordinary-Structure-References)11.7 Ordinary-Structure-References)11.7 Ordinary-Structure-References)11.7 Ordinary-Structure-References)11.7 Ordinary-Structure-References11.7.1 Syntax11.7.1 Syntax11.7.2 Restrictions11.7.2 Restrictions11.7.3 Semantics11.7.3 Semantics11.7.3 Semantics11.7.4 Discussion11.7.4 Discussion11.7.4 Discussion11.7.4 Discussion11.7.4 Discussion(11.8 Default-Structure-References(11.8 Default-Structure-References11.8.1 Syntax11.8.1 Syntax11.8.2 Restrictions11.8.2 Restrictions11.8.2 Restrictions11.8.3 Semantics11.8.3 Semantics11.8.4 Discussion11.8.4 Discussion11.8.4 Discussion11.8.4 Discussion11.8.4 Discussion11.8.4 Discussion11.8.4 Discussion11.8.4 Discussion11.8.4 Discussion11.8.4 Discussion11.8.4 Discussion11.8.4 Discussion11.8.4 Discussion(11.9 General-Structure-References(11.9 General-Structure-References11.9.1 Syntax11.9.1 Syntax11.9.2 Restrictions11.9.2 Restrictions11.9.2 Restrictions11.9.3 Semantics11.9.3 Semantics11.9.3 Semantics11.9.3 Semantics11.9.3 Semantics11.9.4 Discussion11.9.4 Discussion11.9.4 Discussion11.9.4 Discussion11.9.4 Discussion11.9.4 Discussion11.9.4 Discussion11.9.4 Discussion11.9.4 Discussion11.9.4 Discussion#11.10 Predeclared Structures#11.10 Predeclared Structures#11.10 Predeclared Structures#11.10 Predeclared Structures#11.10 Predeclared Structures 11.10.1 VECTOR Structures 11.10.1 VECTOR Structures 11.10.1 VECTOR Structures 11.10.1 VECTOR Structures 11.10.1 VECTOR Structures 11.10.1 VECTOR Structures 11.10.1 VECTOR Structures#11.10.2 BITVECTOR Structures#11.10.2 BITVECTOR Structures#11.10.2 BITVECTOR Structures#11.10.2 BITVECTOR Structures#11.10.2 BITVECTOR Structures#11.10.2 BITVECTOR Structures#11.10.2 BITVECTOR Structures#11.10.2 BITVECTOR Structures11.10.3 BLOCK Structures11.10.3 BLOCK Structures11.10.3 BLOCK Structures11.10.3 BLOCK Structures11.10.3 BLOCK Structures11.10.3 BLOCK Structures811.10.3.1 A Typical Byte-Oriented BLOCK Structure811.10.3.1 A Typical Byte-Oriented BLOCK Structure811.10.3.1 A Typical Byte-Oriented BLOCK Structure811.10.3.1 A Typical Byte-Oriented BLOCK Structure811.10.3.1 A Typical Byte-Oriented BLOCK Structure811.10.3.1 A Typical Byte-Oriented BLOCK Structure'11.10.3.2 BLOCK Field-References'11.10.3.2 BLOCK Field-References'11.10.3.2 BLOCK Field-References'11.10.3.2 BLOCK Field-References'11.10.3.2 BLOCK Field-References'11.10.3.2 BLOCK Field-References!11.10.3.3 BLOCK Allocation!11.10.3.3 BLOCK Allocation!11.10.3.3 BLOCK Allocation!11.10.3.3 BLOCK Allocation!11.10.3.3 BLOCK Allocation!11.10.3.3 BLOCK Allocation+11.10.3.4 BLOCK Structure-References+11.10.3.4 BLOCK Structure-References+11.10.3.4 BLOCK Structure-References+11.10.3.4 BLOCK Structure-References+11.10.3.4 BLOCK Structure-References+11.10.3.4 BLOCK Structure-References+11.10.3.4 BLOCK Structure-References+11.10.3.4 BLOCK Structure-References)11.10.3.5 BLOCK Field-Declarations)11.10.3.5 BLOCK Field-Declarations)11.10.3.5 BLOCK Field-Declarations)11.10.3.5 BLOCK Field-Declarations)11.10.3.5 BLOCK Field-Declarations)11.10.3.5 BLOCK Field-Declarations)11.10.3.5 BLOCK Field-Declarations)11.10.3.5 BLOCK Field-Declarations%11.10.4 BLOCKVECTOR Structures%11.10.4 BLOCKVECTOR Structures%11.10.4 BLOCKVECTOR Structures%11.10.4 BLOCKVECTOR Structures%11.10.4 BLOCKVECTOR Structures%11.10.4 BLOCKVECTOR Structures%11.10.4 BLOCKVECTOR Structures%11.10.4 BLOCKVECTOR Structures11.11 Other Structures11.11 Other Structures/11.11.1 ``One-Origin'' Vector Structures/11.11.1 ``One-Origin'' Vector Structures/11.11.1 ``One-Origin'' Vector Structures411.11.2 ``Bounds Checking'' Vector Structures411.11.2 ``Bounds Checking'' Vector Structures/11.11.3 Two-Dimensional Array Structures/11.11.3 Two-Dimensional Array Structures/11.11.3 Two-Dimensional Array Structures/11.11.3 Two-Dimensional Array Structures/11.11.3 Two-Dimensional Array Structures)11.11.4 Symmetric Array Structures)11.11.4 Symmetric Array Structures)11.11.4 Symmetric Array Structures)11.11.4 Symmetric Array Structures)11.11.4 Symmetric Array Structures)11.11.4 Symmetric Array Structures)11.11.4 Symmetric Array Structures)11.11.4 Symmetric Array Structures)11.11.4 Symmetric Array Structures)11.11.4 Symmetric Array Structures)11.11.4 Symmetric Array Structures)11.11.4 Symmetric Array Structures)11.11.4 Symmetric Array Structures-11.11.5 Noncontinuous Block Structures-11.11.5 Noncontinuous Block Structures-11.11.5 Noncontinuous Block Structures-11.11.5 Noncontinuous Block Structures-11.11.5 Noncontinuous Block Structures-11.11.5 Noncontinuous Block Structures-11.11.5 Noncontinuous Block Structures-11.11.5 Noncontinuous Block Structures-11.11.5 Noncontinuous Block Structures-11.11.5 Noncontinuous Block Structures-11.11.5 Noncontinuous Block Structures-11.11.5 Noncontinuous Block Structures-11.11.5 Noncontinuous Block Structures-11.11.5 Noncontinuous Block Structures,11.11.6 Partially Overlaid Structures,11.11.6 Partially Overlaid Structures,11.11.6 Partially Overlaid Structures,11.11.6 Partially Overlaid Structures,11.11.6 Partially Overlaid Structures,11.11.6 Partially Overlaid Structures,11.11.6 Partially Overlaid Structures,11.11.6 Partially Overlaid Structures,11.11.6 Partially Overlaid Structures,11.11.6 Partially Overlaid Structures,11.11.6 Partially Overlaid Structures,11.11.6 Partially Overlaid StructuresJ11.11.7 General-Purpose Structures for Default Structure ReferencesJ11.11.7 General-Purpose Structures for Default Structure ReferencesJ11.11.7 General-Purpose Structures for Default Structure ReferencesJ11.11.7 General-Purpose Structures for Default Structure ReferencesJ11.11.7 General-Purpose Structures for Default Structure ReferencesJ11.11.7 General-Purpose Structures for Default Structure ReferencesJ11.11.7 General-Purpose Structures for Default Structure ReferencesJ11.11.7 General-Purpose Structures for Default Structure References12. Routines12. Routines12. Routines12. Routines"12.1 Ordinary-Routine-Calls"12.1 Ordinary-Routine-Calls"12.1 Ordinary-Routine-Calls"12.1 Ordinary-Routine-Calls"12.1 Ordinary-Routine-Calls"12.1 Ordinary-Routine-Calls"12.1 Ordinary-Routine-Calls12.1.1 Syntax12.1.1 Syntax12.1.2 Restrictions12.1.2 Restrictions12.1.2 Restrictions12.1.2 Restrictions12.1.2 Restrictions12.1.2 Restrictions12.1.2 Restrictions12.1.2 Restrictions12.1.3 Semantics12.1.3 Semantics12.1.3 Semantics12.1.4 Pragmatics!12.2 General-Routine-Calls!12.2 General-Routine-Calls12.2.1 Syntax SYNTAX12.2.2 Restrictions12.2.2 Restrictions12.2.2 Restrictions12.2.2 Restrictions12.2.2 Restrictions12.2.2 Restrictions12.2.2 Restrictions12.2.2 Restrictions12.2.2 Restrictions12.2.3 Semantics 12.3 Routine-Declarations 12.3 Routine-Declarations12.3.1 Syntax12.3.1 Syntax12.3.2 Semantics)12.4 Ordinary-Routine-Declarations)12.4 Ordinary-Routine-Declarations)12.4 Ordinary-Routine-Declarations)12.4 Ordinary-Routine-Declarations)12.4 Ordinary-Routine-Declarations)12.4 Ordinary-Routine-Declarations)12.4 Ordinary-Routine-Declarations)12.4 Ordinary-Routine-Declarations)12.4 Ordinary-Routine-Declarations12.4.1 Syntax SYNTAX SYNTAX12.4.2 Restrictions12.4.2 Restrictions12.4.2 Restrictions12.4.2 Restrictions12.4.2 Restrictions12.4.2 Restrictions12.4.2 Restrictions12.4.2 Restrictions12.4.3 Defaults12.4.3 Defaults12.4.4 Semantics12.4.4 Semantics12.4.5 Pragmatics!12.4.5.1 Parameter Passing!12.4.5.1 Parameter Passing!12.4.5.1 Parameter Passing!12.4.5.1 Parameter Passing!12.4.5.1 Parameter Passing!12.4.5.1 Parameter Passing!12.4.5.1 Parameter Passing!12.4.5.1 Parameter Passing!12.4.5.1 Parameter Passing!12.4.5.1 Parameter Passing!12.4.5.1 Parameter Passing!12.4.5.1 Parameter Passing!12.4.5.1 Parameter Passing712.4.5.2 Allocation of Formal-Name Data Segments+12.4.5.3 Attributes for Formal-Names+12.4.5.3 Attributes for Formal-Names*12.4.5.4 Computed Routine Addresses*12.4.5.4 Computed Routine Addresses*12.4.5.4 Computed Routine Addresses*12.4.5.4 Computed Routine Addresses'12.5 Global-Routine-Declarations'12.5 Global-Routine-Declarations12.5.1 Syntax SYNTAX12.5.2 Restrictions12.5.2 Restrictions12.5.3 Defaults12.5.4 Semantics12.5.4 Semantics(12.6 Forward-Routine-Declarations(12.6 Forward-Routine-Declarations(12.6 Forward-Routine-Declarations12.6.1 Syntax SYNTAX12.6.2 Restrictions12.6.2 Restrictions12.6.3 Semantics)12.7 External-Routine-Declarations)12.7 External-Routine-Declarations12.7.1 Syntax SYNTAX12.7.2 Restrictions12.7.3 Semantics12.7.3 Semantics13. Linkages13. Linkages13. Linkages13. Linkages13. Linkages13. Linkages13. Linkages13. Linkages013.1 Introduction to Linkage-Declarations013.1 Introduction to Linkage-Declarations013.1 Introduction to Linkage-Declarations013.1 Introduction to Linkage-Declarations13.1.1 Register Usage 13.1.1.1 Special Purposes 13.1.1.1 Special Purposes 13.1.1.1 Special Purposes 13.1.1.1 Special Purposes 13.1.1.1 Special Purposes 13.1.1.1 Special Purposes 13.1.1.1 Special Purposes 13.1.1.1 Special Purposes 13.1.1.2 General Purposes 13.1.1.2 General Purposes 13.1.1.2 General Purposes 13.1.1.2 General Purposes 13.1.1.2 General Purposes 13.1.1.2 General Purposes 13.1.1.2 General Purposes 13.1.1.2 General Purposes13.1.1.3 Other Purposes13.1.1.3 Other Purposes!13.1.1.4 Multiple Purposes!13.1.1.4 Multiple Purposes13.1.2 Typical Syntax13.1.2 Typical Syntax13.1.3 Restrictions13.1.3 Restrictions13.1.3 Restrictions13.1.3 Restrictions13.1.4 Semantics13.1.4 Semantics13.1.4 Semantics13.1.4 Semantics13.1.4 Semantics13.1.4.1 Linkage-Types13.1.4.1 Linkage-Types13.1.4.1 Linkage-Types#13.1.4.2 Parameter-Locations#13.1.4.2 Parameter-Locations#13.1.4.2 Parameter-Locations)13.1.4.2.1 Argument Pointer Method)13.1.4.2.1 Argument Pointer Method)13.1.4.2.1 Argument Pointer Method013.1.4.2.2 Implicit Stack Location Method%13.1.4.2.3 Register Parameters%13.1.4.2.3 Register Parameters13.1.5 Linkage-Options13.1.5 Linkage-Options13.1.5 Linkage-Options13.1.5 Linkage-Options13.1.5 Linkage-Options13.1.5 Linkage-Options13.1.5 Linkage-Options13.1.5 Linkage-Options13.1.5 Linkage-Options)13.2 BLISS-16 Linkage-Declarations)13.2 BLISS-16 Linkage-Declarations)13.2 BLISS-16 Linkage-Declarations)13.2 BLISS-16 Linkage-Declarations13.2.1 Syntax13.2.1 Syntax13.2.2 Restrictions13.2.2 Restrictions13.2.2 Restrictions13.2.2 Restrictions13.2.2 Restrictions13.2.2 Restrictions13.2.2 Restrictions13.2.2 Restrictions13.2.2 Restrictions13.2.2 Restrictions13.2.2 Restrictions13.2.2 Restrictions13.2.3 Defaults13.2.3 Defaults13.2.3 Defaults13.2.3 Defaults13.2.3 Defaults13.2.3 Defaults13.2.3 Defaults13.2.3 Defaults13.2.4 Semantics13.2.4 Semantics13.2.4 Semantics13.2.4 Semantics13.2.4 Semantics13.2.4 Semantics13.2.4 Semantics13.2.4 Semantics13.2.4 Semantics13.2.4 Semantics&13.2.4.1 INTERRUPT Linkage-Type&13.2.4.1 INTERRUPT Linkage-Type&13.2.4.1 INTERRUPT Linkage-Type013.2.4.2 EMT, TRAP, and IOT Linkage-Types013.2.4.2 EMT, TRAP, and IOT Linkage-Types$13.2.4.3 RSX_AST Linkage-Type$13.2.4.3 RSX_AST Linkage-Type$13.2.4.3 RSX_AST Linkage-Type013.2.5 BLISS-16 Predeclared Linkage-Names013.2.5 BLISS-16 Predeclared Linkage-Names)13.3 BLISS-32 Linkage-Declarations)13.3 BLISS-32 Linkage-Declarations13.3.1 Syntax SYNTAX SYNTAX13.3.2 Restrictions13.3.2 Restrictions13.3.2 Restrictions13.3.2 Restrictions13.3.2 Restrictions13.3.2 Restrictions13.3.2 Restrictions13.3.2 Restrictions13.3.2 Restrictions13.3.2 Restrictions13.3.3 Defaults13.3.3 Defaults13.3.3 Defaults13.3.3 Defaults13.3.3 Defaults13.3.3 Defaults13.3.3 Defaults13.3.3 Defaults13.3.4 Semantics13.3.4 Semantics13.3.4 Semantics13.3.4 Semantics13.3.4 Semantics13.3.4 Semantics13.3.4 Semantics13.3.4 Semantics13.3.4 Semantics13.3.4 Semantics 13.3.4.1 JSB Linkage-Type 13.3.4.1 JSB Linkage-Type 13.3.4.1 JSB Linkage-Type 13.3.4.1 JSB Linkage-Type 13.3.4.1 JSB Linkage-Type 13.3.4.1 JSB Linkage-Type&13.3.4.2 INTERRUPT Linkage-Type&13.3.4.2 INTERRUPT Linkage-Type&13.3.4.2 INTERRUPT Linkage-Type&13.3.4.2 INTERRUPT Linkage-Type&13.3.4.2 INTERRUPT Linkage-Type&13.3.4.2 INTERRUPT Linkage-Type&13.3.4.2 INTERRUPT Linkage-Type&13.3.4.2 INTERRUPT Linkage-Type&13.3.4.2 INTERRUPT Linkage-Type013.3.5 BLISS-32 Predeclared Linkage-Names013.3.5 BLISS-32 Predeclared Linkage-Names)13.4 BLISS-36 Linkage-Declarations)13.4 BLISS-36 Linkage-Declarations13.4.1 Syntax13.4.1 Syntax13.4.2 Restrictions13.4.2 Restrictions13.4.2 Restrictions13.4.2 Restrictions13.4.2 Restrictions13.4.2 Restrictions13.4.2 Restrictions13.4.2 Restrictions13.4.2 Restrictions13.4.2 Restrictions13.4.2 Restrictions13.4.2 Restrictions13.4.2 Restrictions13.4.2 Restrictions13.4.3 Defaults13.4.3 Defaults13.4.3 Defaults13.4.3 Defaults13.4.3 Defaults13.4.3 Defaults13.4.3 Defaults13.4.3 Defaults13.4.3 Defaults13.4.3 Defaults13.4.3 Defaults13.4.3 Defaults13.4.3 Defaults13.4.3 Defaults13.4.3 Defaults13.4.3 Defaults13.4.3 Defaults13.4.4 Semantics13.4.4 Semantics13.4.4 Semantics13.4.4 Semantics"13.4.4.1 PUSHJ Linkage-Type"13.4.4.1 PUSHJ Linkage-Type"13.4.4.1 PUSHJ Linkage-Type"13.4.4.1 PUSHJ Linkage-Type"13.4.4.1 PUSHJ Linkage-Type"13.4.4.1 PUSHJ Linkage-Type"13.4.4.1 PUSHJ Linkage-Type!13.4.4.2 JSYS Linkage-Type!13.4.4.2 JSYS Linkage-Type!13.4.4.2 JSYS Linkage-Type!13.4.4.2 JSYS Linkage-Type 13.4.4.3 F10 Linkage-Type)13.4.4.4 PS_INTERRUPT Linkage-Type)13.4.4.4 PS_INTERRUPT Linkage-Type)13.4.4.4 PS_INTERRUPT Linkage-Type)13.4.4.4 PS_INTERRUPT Linkage-Type)13.4.4.4 PS_INTERRUPT Linkage-Type)13.4.4.4 PS_INTERRUPT Linkage-Type)13.4.4.4 PS_INTERRUPT Linkage-Type013.4.5 BLISS-36 Predeclared Linkage-Names013.4.5 BLISS-36 Predeclared Linkage-Names013.4.5 BLISS-36 Predeclared Linkage-Names,13.5 Common Predeclared Linkage-Names,13.5 Common Predeclared Linkage-Names 13.5.1 The BLISS Linkages 13.5.1 The BLISS Linkages"13.5.2 The FORTRAN Linkages"13.5.2 The FORTRAN Linkages"13.5.2 The FORTRAN Linkages"13.5.2 The FORTRAN Linkages"13.5.2 The FORTRAN Linkages"13.5.2 The FORTRAN Linkages"13.5.2 The FORTRAN Linkages"13.5.2 The FORTRAN Linkages13.6 Linkage-Functions&13.6.1 Common Linkage-Functions13.6.1.1 Definition13.6.1.1 Definition13.6.1.1 Definition13.6.1.1 Definition13.6.1.1 Definition13.6.1.1 Definition13.6.1.1 Definition13.6.1.1 Definition13.6.1.1 Definition13.6.1.1 Definition13.6.1.1 Definition13.6.1.1 Definition13.6.1.2 Examples13.6.1.2 Examples13.6.1.2 Examples13.6.1.2 Examples13.6.1.2 Examples13.6.1.2 Examples13.6.1.2 Examples13.6.1.2 Examples513.6.2 BLISS-16 and BLISS-32 Linkage-Functions513.6.2 BLISS-16 and BLISS-32 Linkage-Functions513.6.2 BLISS-16 and BLISS-32 Linkage-Functions513.6.2 BLISS-16 and BLISS-32 Linkage-Functions513.6.2 BLISS-16 and BLISS-32 Linkage-Functions513.6.2 BLISS-16 and BLISS-32 Linkage-Functions613.7 Global Register Data Segments and Linkages613.7 Global Register Data Segments and Linkages613.7 Global Register Data Segments and Linkages613.7 Global Register Data Segments and Linkages613.7 Global Register Data Segments and Linkages613.7 Global Register Data Segments and Linkages613.7 Global Register Data Segments and Linkages613.7 Global Register Data Segments and Linkages613.7 Global Register Data Segments and Linkages613.7 Global Register Data Segments and Linkages613.7 Global Register Data Segments and Linkages613.7 Global Register Data Segments and Linkages613.7 Global Register Data Segments and Linkages613.7 Global Register Data Segments and Linkages13.7.1 Discussion13.7.1 Discussion13.7.1 Discussion13.7.1 Discussion%13.7.2 Guidelines for BLISS-16%13.7.2 Guidelines for BLISS-16%13.7.2 Guidelines for BLISS-16%13.7.2 Guidelines for BLISS-16%13.7.3 Guidelines for BLISS-32%13.7.3 Guidelines for BLISS-32%13.7.3 Guidelines for BLISS-32%13.7.3 Guidelines for BLISS-32%13.7.3 Guidelines for BLISS-32%13.7.3 Guidelines for BLISS-32%13.7.3 Guidelines for BLISS-32%13.7.4 Guidelines for BLISS-36%13.7.4 Guidelines for BLISS-36%13.7.4 Guidelines for BLISS-3614. Binding14. Binding14. Binding14. Binding14. Binding 14.1 Literal-Declarations 14.1 Literal-Declarations 14.1 Literal-Declarations 14.1 Literal-Declarations 14.1 Literal-Declarations 14.1 Literal-Declarations14.1.1 Syntax14.1.1 Syntax14.1.2 Restrictions14.1.2 Restrictions14.1.2 Restrictions14.1.3 Defaults14.1.4 Semantics14.1.4 Semantics"14.1.5 Predeclared Literals"14.1.5 Predeclared Literals"14.1.5 Predeclared Literals"14.1.5 Predeclared Literals)14.2 External-Literal-Declarations)14.2 External-Literal-Declarations14.2.1 Syntax14.2.1 Syntax14.2.2 Restrictions14.2.2 Restrictions14.2.3 Defaults14.2.4 Semantics14.2.4 Semantics"14.3 Bind-Data-Declarations"14.3 Bind-Data-Declarations"14.3 Bind-Data-Declarations"14.3 Bind-Data-Declarations14.3.1 Syntax14.3.1 Syntax14.3.2 Restrictions14.3.2 Restrictions14.3.2 Restrictions14.3.2 Restrictions14.3.2 Restrictions14.3.2 Restrictions14.3.3 Defaults14.3.3 Defaults14.3.4 Semantics14.3.4 Semantics%14.4 Bind-Routine-Declarations%14.4 Bind-Routine-Declarations%14.4 Bind-Routine-Declarations%14.4 Bind-Routine-Declarations%14.4 Bind-Routine-Declarations14.4.1 Syntax14.4.1 Syntax14.4.2 Restrictions14.4.2 Restrictions14.4.2 Restrictions14.4.2 Restrictions14.4.3 Default14.4.4 Semantics14.4.4 Semantics15. Lexical Functions15. Lexical Functions15. Lexical Functions15. Lexical Functions15. Lexical Functions.15.1 Introduction to Lexical Processing(15.1.1 From Characters to Lexemes(15.1.1 From Characters to Lexemes(15.1.1 From Characters to Lexemes(15.1.1 From Characters to Lexemes(15.1.1 From Characters to Lexemes)15.1.2 Lexeme-by-Lexeme Processing)15.1.2 Lexeme-by-Lexeme Processing)15.1.2 Lexeme-by-Lexeme Processing)15.1.2 Lexeme-by-Lexeme Processing)15.1.2 Lexeme-by-Lexeme Processing)15.1.2 Lexeme-by-Lexeme Processing15.1.3 Binding15.1.3} } Binding15.1.3 Binding15.1.4 Expansion15.1.4 Expansion15.1.4 Expansion15.1.4 Expansion15.1.4 Expansion15.1.4 Expansion15.1.4 Expansion15.1.4 Expansion15.1.4 Expansion15.1.4 Expansion15.1.4 Expansion15.1.4 Expansion.15.1.5 An Example of Lexical Processing.15.1.5 An Example of Lexical Processing.15.1.5 An Example of Lexical Processing.15.1.5 An Example of Lexical Processing.15.1.5 An Example of Lexical Processing.15.1.5 An Example of Lexical Processing.15.1.5 An Example of Lexical Processing.15.1.5 An Example of Lexical Processing.15.1.5 An Example of Lexical Processing.15.1.5 An Example of Lexical Processing.15.1.5 An Example of Lexical Processing.15.1.5 An Example of Lexical Processing.15.1.5 An Example of Lexical Processing.15.1.5 An Example of Lexical Processing.15.1.5 An Example of Lexical Processing.15.1.5 An Example of Lexical Processing.15.1.5 An Example of Lexical Processing15.2 Quotation15.2 Quotation15.2 Quotation15.2 Quotation15.2 Quotation15.2 Quotation15.2 Quotation15.2 Quotation15.2 Quotation15.2 Quotation15.2 Quotation15.2 Quotation15.2 Quotation15.2.1 Quote Levels15.2.1 Quote Levels15.2.1 Quote Levels15.2.1 Quote Levels15.2.1 Quote Levels15.2.2 Quotation Rules15.2.2 Quotation Rules15.2.2 Quotation Rules15.2.2 Quotation Rules15.2.2 Quotation Rules15.3 Lexical-Expressions15.3 Lexical-Expressions15.3 Lexical-Expressions15.3 Lexical-Expressions15.3 Lexical-Expressions15.3 Lexical-Expressions15.3 Lexical-Expressions15.3 Lexical-Expressions15.3 Lexical-Expressions15.3 Lexical-Expressions15.3 Lexical-Expressions15.3.1 Syntax15.3.1 Syntax15.3.1 Syntax15.3.2 Semantics15.3.2 Semantics15.3.2 Semantics15.3.2 Semantics15.3.2 Semantics)15.3.2.1 Types of Numeric-Literals)15.3.2.1 Types of Numeric-Literals)15.3.2.1 Types of Numeric-Literals(15.3.2.2 Types of String-Literals(15.3.2.2 Types of String-Literals(15.3.2.2 Types of String-Literals(15.3.2.2 Types of String-Literals(15.3.2.2 Types of String-Literals(15.3.2.2 Types of String-Literals(15.3.2.2 Types of String-Literals(15.3.2.2 Types of String-Literals(15.3.2.2 Types of String-Literals,15.3.2.3 Numeric- and String-Literals,15.3.2.3 Numeric- and String-Literals,15.3.2.3 Numeric- and String-Literals,15.3.2.3 Numeric- and String-Literals15.3.3 Discussion15.3.3 Discussion15.3.3 Discussion15.3.3 Discussion15.3.3 Discussion15.3.3 Discussion15.3.3 Discussion15.3.3 Discussion15.3.3 Discussion15.3.3 Discussion15.3.3 Discussion15.3.3 Discussion15.3.4 Pragmatics15.3.4 Pragmatics15.3.4 Pragmatics(15.4 Lexical-Functions in General(15.4 Lexical-Functions in General(15.4 Lexical-Functions in General(15.4 Lexical-Functions in General(15.4 Lexical-Functions in General(15.4 Lexical-Functions in General(15.4 Lexical-Functions in General(15.4 Lexical-Functions in General(15.4 Lexical-Functions in General(15.4 Lexical-Functions in General(15.4 Lexical-Functions in General(15.4 Lexical-Functions in General(15.4 Lexical-Functions in General(15.4 Lexical-Functions in General(15.4 Lexical-Functions in General(15.4 Lexical-Functions in General(15.4 Lexical-Functions in General15.4.1 Syntax15.4.1 Syntax15.4.2 Restrictions15.4.3 Semantics15.4.3 Semantics15.4.3 Semantics15.4.3 Semantics15.4.3 Semantics15.4.3 Semantics15.4.3 Semantics&15.5 Specific Lexical-Functions&15.5 Specific Lexical-Functions&15.5 Specific Lexical-Functions815.5.1 Quote Levels for Lexical-Actual-Parameters815.5.1 Quote Levels for Lexical-Actual-Parameters815.5.1 Quote Levels for Lexical-Actual-Parameters815.5.1 Quote Levels for Lexical-Actual-Parameters815.5.1 Quote Levels for Lexical-Actual-Parameters815.5.1 Quote Levels for Lexical-Actual-Parameters15.5.2 String-Functions15.5.2 String-Functions15.5.2 String-Functions15.5.2 String-Functions15.5.2 String-Functions15.5.2 String-Functions15.5.2 String-Functions15.5.2 String-Functions15.5.2.1 Definition15.5.2.1 Definition15.5.2.1 Definition15.5.2.1 Definition15.5.2.1 Definition15.5.2.1 Definition15.5.2.1 Definition15.5.2.1 Definition15.5.2.1 Definition15.5.2.1 Definition15.5.2.1 Definition15.5.2.1 Definition15.5.2.1 Definition15.5.2.1 Definition15.5.2.1 Definition15.5.2.1 Definition15.5.2.1 Definition15.5.2.1 Definition15.5.2.1 Definition15.5.2.1 Definition15.5.2.1 Definition15.5.2.1 Definition15.5.2.2 Examples15.5.2.2 Examples15.5.2.2 Examples15.5.2.2 Examples15.5.2.2 Examples15.5.2.2 Examples15.5.2.2 Examples15.5.2.2 Examples15.5.2.2 Examples15.5.2.2 Examples15.5.2.2 Examples!15.5.3 Delimiter-Functions15.5.3.1 Definition15.5.3.1 Definition15.5.3.1 Definition15.5.3.1 Definition15.5.3.1 Definition15.5.3.1 Definition15.5.3.1 Definition15.5.3.1 Definition15.5.3.1 Definition15.5.3.1 Definition15.5.3.2 Examples15.5.3.2 Examples15.5.3.2 Examples15.5.3.2 Examples15.5.3.2 Examples15.5.3.2 Examples15.5.3.2 Examples15.5.3.2 Examples15.5.3.2 Examples15.5.4 Name-Functions15.5.4.1 Definition15.5.4.1 Definition15.5.4.1 Definition15.5.4.1 Definition15.5.4.1 Definition15.5.4.1 Definition15.5.4.1 Definition15.5.4.2 Examples15.5.4.2 Examples15.5.4.2 Examples15.5.4.2 Examples15.5.4.2 Examples15.5.4.2 Examples15.5.4.2 Examples15.5.4.2 Examples15.5.4.2 Examples15.5.4.2 Examples15.5.4.2 Examples15.5.4.2 Examples15.5.4.2 Examples15.5.4.2 Examples%15.5.5 Sequence-Test-Functions%15.5.5 Sequence-Test-Functions15.5.5.1 Definition15.5.5.1 Definition15.5.5.1 Definition15.5.5.1 Definition15.5.5.1 Definition15.5.5.1 Definition15.5.5.2 Examples15.5.5.2 Examples15.5.5.2 Examples'15.5.6 Expression-Test-Functions'15.5.6 Expression-Test-Functions15.5.6.1 Definition15.5.6.1 Definition15.5.6.1 Definition15.5.6.1 Definition15.5.6.1 Definition15.5.6.1 Definition15.5.6.1 Definition15.5.6.1 Definition15.5.6.1 Definition15.5.6.1 Definition15.5.6.2 Examples15.5.6.2 Examples15.5.7 Bits-Functions15.5.7.1 Definition15.5.7.1 Definition15.5.7.1 Definition15.5.7.1 Definition15.5.7.1 Definition15.5.7.1 Definition15.5.7.1 Definition15.5.7.1 Definition15.5.7.1 Definition15.5.7.1 Definition15.5.7.1 Definition15.5.7.1 Definition15.5.7.1 Definition15.5.7.1 Definition15.5.7.1 Definition15.5.7.1 Definition15.5.7.1 Definition15.5.7.2 Examples15.5.7.2 Examples"15.5.8 Allocation-Functions"15.5.8 Allocation-Functions15.5.8.1 Definition15.5.8.1 Definition15.5.8.1 Definition15.5.8.1 Definition15.5.8.1 Definition15.5.8.1 Definition15.5.8.1 Definition15.5.8.1 Definition15.5.8.2 Examples15.5.8.2 Examples15.5.8.2 Examples"15.5.9 Fieldexpand-Function"15.5.9 Fieldexpand-Function15.5.9.1 Definition15.5.9.1 Definition15.5.9.1 Definition15.5.9.1 Definition15.5.9.1 Definition15.5.9.1 Definition15.5.9.1 Definition15.5.9.2 Examples15.5.9.2 Examples15.5.9.2 Examples15.5.9.2 Examples15.5.9.2 Examples$15.5.10 Calculation-Functions$15.5.10 Calculation-Functions15.5.10.1 Definition15.5.10.1 Definition15.5.10.1 Definition15.5.10.1 Definition15.5.10.1 Definition15.5.10.1 Definition15.5.10.1 Definition15.5.10.1 Definition15.5.10.1 Definition15.5.10.1 Definition15.5.10.1 Definition15.5.10.1 Definition15.5.10.2 Example15.5.10.2 Example15.5.10.2 Example15.5.10.2 Example15.5.10.2 Example15.5.10.2 Example15.5.10.2 Example15.5.10.2 Example'15.5.11 Compiler-State-Functions'15.5.11 Compiler-State-Functions15.5.11.1 Definitions15.5.11.1 Definitions15.5.11.1 Definitions15.5.11.1 Definitions15.5.11.1 Definitions15.5.11.1 Definitions15.5.11.1 Definitions15.5.11.1 Definitions15.5.11.1 Definitions15.5.11.1 Definitions15.5.11.1 Definitions15.5.11.1 Definitions15.5.11.1 Definitions15.5.11.1 Definitions15.5.11.1 Definitions15.5.11.1 Definitions15.5.11.1 Definitions15.5.11.1 Definitions15.5.11.1 Definitions15.5.11.2 Examples15.5.11.2 Examples15.5.11.2 Examples15.5.11.2 Examples!15.5.12 Advisory-Functions!15.5.12 Advisory-Functions15.5.12.1 Definitions15.5.12.1 Definitions15.5.12.1 Definitions15.5.12.1 Definitions15.5.12.1 Definitions15.5.12.1 Definitions15.5.12.1 Definitions15.5.12.1 Definitions15.5.12.1 Definitions15.5.12.1 Definitions15.5.12.1 Definitions15.5.12.1 Definitions15.5.12.1 Definitions15.5.12.1 Definitions15.5.12.1 Definitions15.5.12.1 Definitions15.5.12.1 Definitions15.5.12.1 Definitions15.5.12.1 Definitions15.5.12.2 Examples 15.5.13 Titling-Functions15.5.13.1 Definition15.5.13.1 Definition15.5.13.1 Definition15.5.13.1 Definition15.5.13.1 Definition15.5.13.1 Definition15.5.13.1 Definition15.5.13.1 Definition15.5.13.2 Examples15.5.14 Quote-Functions15.5.14 Quote-Functions15.5.14.1 Definitions15.5.14.1 Definitions15.5.14.1 Definitions15.5.14.1 Definitions15.5.14.1 Definitions15.5.14.1 Definitions15.5.14.1 Definitions15.5.14.1 Definitions15.5.14.1 Definitions15.5.14.1 Definitions15.5.14.1 Definitions15.5.14.1 Definitions15.5.14.1 Definitions15.5.14.1 Definitions15.5.14.1 Definitions15.5.14.1 Definitions15.5.14.1 Definitions15.5.14.1 Definitions15.5.14.2 Examples15.5.14.2 Examples15.5.14.2 Examples15.5.14.2 Examples15.5.14.2 Examples15.5.14.2 Examples15.5.14.2 Examples15.5.14.2 Examples15.5.14.2 Examples15.5.14.2 Examples15.5.14.2 Examples15.5.14.2 Examples15.5.14.2 Examples15.5.14.2 Examples15.5.14.2 Examples15.5.14.2 Examples15.5.14.2 Examples15.5.14.2 Examples15.5.14.2 Examples15.5.14.2 Examples15.5.14.2 Examples15.5.14.2 Examples15.5.14.2 Examples15.5.14.2 Examples15.5.14.2 Examples15.5.14.2 Examples15.5.14.2 Examples15.5.15 Macro-Functions15.5.15.1 Definition15.5.15.1 Definition15.5.15.1 Definition15.5.15.1 Definition15.5.15.1 Definition15.5.15.1 Definition15.5.15.1 Definition15.5.15.1 Definition15.5.15.1 Definition15.5.15.1 Definition15.5.15.1 Definition15.5.15.2 Examples15.5.16 Require-Function15.5.16.1 Definition15.5.16.1 Definition15.5.16.1 Definition15.5.16.1 Definition15.5.16.1 Definition15.5.16.1 Definition15.5.16.1 Definition15.5.16.1 Definition15.5.16.1 Definition15.5.16.2 Examples15.5.16.2 Examples15.5.16.2 Examples15.5.16.2 Examples15.5.16.2 Examples15.5.16.2 Examples15.5.16.2 Examples+15.5.17 Summary of Lexical-Functions+15.5.17 Summary of Lexical-Functions 15.6 Lexical-Conditionals 15.6 Lexical-Conditionals 15.6 Lexical-Conditionals15.6.1 Syntax15.6.1 Syntax15.6.2 Restrictions15.6.2 Restrictions15.6.2 Restrictions15.6.3 Semantics15.6.3 Semantics15.6.3 Semantics15.6.3 Semantics15.6.3 Semantics%15.7 Compile-Time Declarations15.7.1 Syntax15.7.1 Syntax15.7.2 Semantics15.7.2 Semantics15.7.2 Semantics16. Macros16. Macros16. Macros"16.1 Introduction to Macros"16.1 Introduction to Macros"16.1 Introduction to Macros*16.1.1 Macro Declarations and Calls*16.1.1 Macro Declarations and Calls*16.1.1 Macro Declarations and Calls*16.1.1 Macro Declarations and Calls*16.1.1 Macro Declarations and Calls*16.1.1 Macro Declarations and Calls*16.1.1 Macro Declarations and Calls$16.1.2 Macros with Parameters$16.1.2 Macros with Parameters$16.1.2 Macros with Parameters$16.1.2 Macros with Parameters$16.1.2 Macros with Parameters(16.1.3 Parenthesization of Macros(16.1.3 Parenthesization of Macros(16.1.3 Parenthesization of Macros(16.1.3 Parenthesization of Macros(16.1.3 Parenthesization of Macros(16.1.4 Quotation Rules and Macros(16.1.4 Quotation Rules and Macros(16.1.4 Quotation Rules and Macros(16.1.4 Quotation Rules and Macros(16.1.4 Quotation Rules and Macros(16.1.4 Quotation Rules and Macros(16.1.4 Quotation Rules and Macros(16.1.4 Quotation Rules and Macros(16.1.4 Quotation Rules and Macros(16.1.4 Quotation Rules and Macros(16.1.4 Quotation Rules and Macros716.1.5 A Survey of Macros and Related Facilities716.1.5 A Survey of Macros and Related Facilities716.1.5 A Survey of Macros and Related Facilities716.1.5 A Survey of Macros and Related Facilities716.1.5 A Survey of Macros and Related Facilities716.1.5 A Survey of Macros and Related Facilities716.1.5 A Survey of Macros and Related Facilities716.1.5 A Survey of Macros and Related Facilities716.1.5 A Survey of Macros and Related Facilities716.1.5 A Survey of Macros and Related Facilities716.1.5 A Survey of Macros and Related Facilities716.1.5 A Survey of Macros and Related Facilities716.1.5 A Survey of Macros and Related Facilities16.2 Macro-Declarations16.2 Macro-Declarations16.2 Macro-Declarations16.2 Macro-Declarations16.2 Macro-Declarations16.2 Macro-Declarations16.2 Macro-Declarations16.2 Macro-Declarations16.2 Macro-Declarations16.2 Macro-Declarations16.2 Macro-Declarations16.2 Macro-Declarations16.2 Macro-Declarations16.2.1 Syntax SYNTAX SYNTAX16.2.1 Syntax16.2.2 Restrictions16.2.2 Restrictions16.2.2 Restrictions16.2.2 Restrictions16.2.2 Restrictions16.2.3 Semantics16.2.3 Semantics716.2.3.1 Lexical Processing of Macro-Definitions716.2.3.1 Lexical Processing of Macro-Definitions716.2.3.1 Lexical Processing of Macro-Definitions716.2.3.1 Lexical Processing of Macro-Definitions716.2.3.1 Lexical Processing of Macro-Definitions716.2.3.1 Lexical Processing of Macro-Definitions716.2.3.1 Lexical Processing of Macro-Definitions716.2.3.1 Lexical Processing of Macro-Definitions716.2.3.1 Lexical Processing of Macro-Definitions316.2.3.2 Interpretation of Macro-Definitions316.2.3.2 Interpretation of Macro-Definitions 16.2.4 Predeclared Macros 16.2.4 Predeclared Macros 16.2.4 Predeclared Macros 16.2.4 Predeclared Macros16.3 Macro-Calls16.3 Macro-Calls16.3 Macro-Calls16.3 Macro-Calls16.3 Macro-Calls16.3 Macro-Calls16.3 Macro-Calls16.3.1 Syntax16.3.1 Syntax16.3.2 Restrictions16.3.2 Restrictions16.3.2 Restrictions16.3.2 Restrictions16.3.2 Restrictions16.3.2 Restrictions16.3.2 Restrictions16.3.3 Semantics16.3.3 Semantics116.3.3.1 Lexical Processing of Macro-Calls116.3.3.1 Lexical Processing of Macro-Calls116.3.3.1 Lexical Processing of Macro-Calls116.3.3.1 Lexical Processing of Macro-Calls116.3.3.1 Lexical Processing of Macro-Calls116.3.3.1 Lexical Processing of Macro-Calls116.3.3.1 Lexical Processing of Macro-Calls116.3.3.1 Lexical Processing of Macro-Calls*16.3.3.2 Expansion of Simple Macros*16.3.3.2 Expansion of Simple Macros*16.3.3.2 Expansion of Simple Macros*16.3.3.2 Expansion of Simple Macros*16.3.3.2 Expansion of Simple Macros*16.3.3.2 Expansion of Simple Macros/16.3.3.3 Expansion of Conditional Macros/16.3.3.3 Expansion of Conditional Macros/16.3.3.3 Expansion of Conditional Macros/16.3.3.3 Expansion of Conditional Macros/16.3.3.3 Expansion of Conditional Macros/16.3.3.3 Expansion of Conditional Macros/16.3.3.3 Expansion of Conditional Macros/16.3.3.3 Expansion of Conditional Macros/16.3.3.3 Expansion of Conditional Macros-16.3.3.4 Expansion of Iterative-Macros-16.3.3.4 Expansion of Iterative-Macros-16.3.3.4 Expansion of Iterative-Macros-16.3.3.4 Expansion of Iterative-Macros-16.3.3.4 Expansion of Iterative-Macros-16.3.3.4 Expansion of Iterative-Macros-16.3.3.4 Expansion of Iterative-Macros-16.3.3.4 Expansion of Iterative-Macros-16.3.3.4 Expansion of Iterative-Macros-16.3.3.4 Expansion of Iterative-Macros-16.3.3.4 Expansion of Iterative-Macros-16.3.3.4 Expansion of Iterative-Macros-16.3.3.4 Expansion of Iterative-Macros-16.3.3.4 Expansion of Iterative-Macros-16.3.3.4 Expansion of Iterative-Macros-16.3.3.4 Expansion of Iterative-Macros-16.3.3.4 Expansion of Iterative-Macros-16.3.3.4 Expansion of Iterative-Macros-16.3.3.4 Expansion of Iterative-Macros-16.3.3.4 Expansion of Iterative-Macros-16.3.3.4 Expansion of Iterative-Macros-16.3.3.4 Expansion of Iterative-Macros-16.3.3.4 Expansion of Iterative-Macros-16.3.3.4 Expansion of Iterative-Macros-16.3.3.4 Expansion of Iterative-Macros-16.3.3.4 Expansion of Iterative-Macros+16.3.3.5 Expansion of Keyword-Macros+16.3.3.5 Expansion of Keyword-Macros+16.3.3.5 Expansion of Keyword-Macros16.3.4 Discussion%16.3.4.1 Introductory Examples%16.3.4.1 Introductory Examples%16.3.4.1 Introductory Examples%16.3.4.1 Introductory Examples%16.3.4.1 Introductory Examples%16.3.4.1 Introductory Examples%16.3.4.1 Introductory Examples%16.3.4.1 Introductory Examples%16.3.4.1 Introductory Examples%16.3.4.1 Introductory Examples%16.3.4.1 Introductory Examples%16.3.4.1 Introductory Examples%16.3.4.1 Introductory Examples%16.3.4.1 Introductory Examples%16.3.4.1 Introductory Examples%16.3.4.1 Introductory Examples%16.3.4.1 Introductory Examples#16.3.4.2 Default Punctuation#16.3.4.2 Default Punctuation#16.3.4.2 Default Punctuation#16.3.4.2 Default Punctuation#16.3.4.2 Default Punctuation#16.3.4.2 Default Punctuation#16.3.4.2 Default Punctuation#16.3.4.2 Default Punctuation#16.3.4.2 Default Punctuation#16.3.4.2 Default Punctuation16.4 Examples of Macros716.4.1 Macros for Initializing a BLOCK Structure716.4.1 Macros for Initializing a BLOCK Structure716.4.1 Macros for Initializing a BLOCK Structure716.4.1 Macros for Initializing a BLOCK Structure716.4.1 Macros for Initializing a BLOCK Structure716.4.1 Macros for Initializing a BLOCK Structure716.4.1 Macros for Initializing a BLOCK Structure716.4.1 Macros for Initializing a BLOCK Structure716.4.1 Macros for Initializing a BLOCK Structure716.4.1 Macros for Initializing a BLOCK Structure716.4.1 Macros for Initializing a BLOCK Structure!16.4.2 A Complicated Macro!16.4.2 A Complicated Macro!16.4.2 A Complicated Macro!16.4.2 A Complicated Macro!16.4.2 A Complicated Macro!16.4.2 A Complicated Macro%16.4.3 Nested Macro Definition%16.4.3 Nested Macro Definition%16.4.3 Nested Macro Definition(16.4.4 Declarations Within Macros(16.4.4 Declarations Within Macros 16.5 Require-Declarations 16.5 Require-Declarations16.5.1 Syntax16.5.1 Syntax16.5.2 Restrictions16.5.2 Restrictions16.5.2 Restrictions16.5.2 Restrictions16.5.2 Restrictions16.5.3 Semantics16.5.3 Semantics 16.6 Library-Declarations 16.6 Library-Declarations 16.6 Library-Declarations 16.6 Library-Declarations16.6.1 Syntax16.6.1 Syntax16.6.2 Restrictions16.6.2 Restrictions16.6.2 Restrictions16.6.2 Restrictions16.6.2 Restrictions16.6.3 Semantics16.6.3 Semantics16.6.3 Semantics16.6.3 Semantics16.6.3 Semantics16.6.3 Semantics16.6.3 Semantics16.6.3 Semantics16.6.3 Semantics16.6.3 Semantics16.6.3 Semantics16.6.3 Semantics16.6.3 Semantics16.6.3 Semantics16.6.3 Semantics16.6.3 Semantics16.6.3 Semantics16.6.3 Semantics16.6.3 Semantics17. Condition Handling17. Condition Handling.17.1 Introduction to Condition Handling17.1.1 Routines17.1.1 Routines17.1.1 Routines17.1.2 Signals17.1.2 Signals17.1.3 Processing17.1.3 Processing17.1.3 Processing17.1.3 Processing17.1.3 Processing17.1.3 Processing17.2 Enable-Declarations17.2 Enable-Declarations17.2 Enable-Declarations17.2.1 Syntax17.2.1 Syntax17.2.2 Restrictions17.2.2 Restrictions17.2.2 Restrictions17.2.2 Restrictions17.2.2 Restrictions17.2.2 Restrictions17.2.2 Restrictions17.2.3 Semantics17.2.3 Semantics17.2.3 Semantics17.2.3 Semantics17.3 Signaling17.3 Signaling17.3.1 Condition Values17.3.1 Condition Values17.3.1 Condition Values17.3.2 Explicit Signals17.3.2 Explicit Signals17.3.2 Explicit Signals17.3.2 Explicit Signals17.3.2 Explicit Signals17.3.2 Explicit Signals17.3.2 Explicit Signals17.3.2 Explicit Signals17.3.2 Explicit Signals17.3.2 Explicit Signals17.3.2 Explicit Signals17.3.3 Implicit Signals17.3.4 Unwind Signals17.3.4 Unwind Signals'17.4 Condition-Handling Routines'17.4 Condition-Handling Routines'17.4 Condition-Handling Routines'17.4 Condition-Handling Routines'17.4 Condition-Handling Routines'17.4 Condition-Handling Routines'17.4 Condition-Handling Routines17.4.1 Restrictions17.4.1 Restrictions17.4.1 Restrictions17.4.1 Restrictions17.4.1 Restrictions17.4.2 Parameters17.4.2 Parameters17.4.2 Parameters$17.4.2.1 The Signal Parameter$17.4.2.1 The Signal Parameter$17.4.2.1 The Signal Parameter'17.4.2.2 The Mechanism Parameter'17.4.2.2 The Mechanism Parameter'17.4.2.2 The Mechanism Parameter'17.4.2.2 The Mechanism Parameter$17.4.2.3 The Enable Parameter$17.4.2.3 The Enable Parameter$17.4.2.3 The Enable Parameter17.4.3 Handler Options17.4.3 Handler Options17.4.3 Handler Options17.4.3 Handler Options17.4.3 Handler Options17.4.3 Handler Options17.4.3 Handler Options17.4.3.1 Continuation17.4.3.1 Continuation17.4.3.1 Continuation17.4.3.2 Resignaling17.4.3.2 Resignaling17.4.3.2 Resignaling17.4.3.2 Resignaling17.4.3.3 Unwinding17.4.3.3 Unwinding17.4.3.3 Unwinding17.4.3.3 Unwinding17.4.3.3 Unwinding17.4.3.3 Unwinding17.4.3.3 Unwinding17.4.3.3 Unwinding17.4.3.3 Unwinding17.4.3.3 Unwinding17.4.3.3 Unwinding.17.5 Condition-Handling Flow of Control17.5.1 Definition&17.5.1.1 Normal Flow of Control&17.5.1.1 Normal Flow of Control&17.5.1.1 Normal Flow of Control&17.5.1.1 Normal Flow of Control&17.5.1.1 Normal Flow of Control&17.5.1.1 Normal Flow of Control&17.5.1.1 Normal Flow of Control&17.5.1.1 Normal Flow of Control&17.5.1.1 Normal Flow of Control;17.5.1.2 Modified Flow of Control for Nested Signals;17.5.1.2 Modified Flow of Control for Nested Signals;17.5.1.2 Modified Flow of Control for Nested Signals17.5.2 Discussion+17.5.2.1 Examples of Flow of Control+17.5.2.1 Examples of Flow of Control+17.5.2.1 Examples of Flow of Control+17.5.2.1 Examples of Flow of Control+17.5.2.1 Examples of Flow of Control+17.5.2.1 Examples of Flow of Control+17.5.2.1 Examples of Flow of Control+17.5.2.1 Examples of Flow of Control+17.5.2.1 Examples of Flow of Control+17.5.2.1 Examples of Flow of Control+17.5.2.1 Examples of Flow of Control+17.5.2.1 Examples of Flow of Control+17.5.2.1 Examples of Flow of Control+17.5.2.1 Examples of Flow of Control+17.5.2.1 Examples of Flow of Control+17.5.2.1 Examples of Flow of Control+17.5.2.1 Examples of Flow of Control+17.5.2.1 Examples of Flow of Control+17.5.2.1 Examples of Flow of Control+17.5.2.1 Examples of Flow of Control+17.5.2.1 Examples of Flow of Control+17.5.2.1 Examples of Flow of Control"17.5.2.2 Recursive Handlers"17.5.2.2 Recursive Handlers"17.5.2.2 Recursive Handlers;17.5.2.3 Condition Handling and Linkage Interactions;17.5.2.3 Condition Handling and Linkage Interactions;17.5.2.3 Condition Handling and Linkage Interactions17.6 Examples17.6 Examples517.6.1 Accessing and Defining Condition Values,17.6.1.1 Condition Values in BLISS-16,17.6.1.1 Condition Values in BLISS-16,17.6.1.1 Condition Values in BLISS-16,17.6.1.1 Condition Values in BLISS-16,17.6.1.1 Condition Values in BLISS-16,17.6.1.1 Condition Values in BLISS-16,17.6.1.1 Condition Values in BLISS-16,17.6.1.1 Condition Values in BLISS-16,17.6.1.1 Condition Values in BLISS-16,17.6.1.1 Condition Values in BLISS-16,17.6.1.1 Condition Values in BLISS-16,17.6.1.1 Condition Values in BLISS-16,17.6.1.1 Condition Values in BLISS-16,17.6.1.2 Condition Values in BLISS-32,17.6.1.2 Condition Values in BLISS-32,17.6.1.2 Condition Values in BLISS-32,17.6.1.2 Condition Values in BLISS-32,17.6.1.2 Condition Values in BLISS-32,17.6.1.2 Condition Values in BLISS-32,17.6.1.2 Condition Values in BLISS-32,17.6.1.2 Condition Values in BLISS-32,17.6.1.2 Condition Values in BLISS-32,17.6.1.2 Condition Values in BLISS-32,17.6.1.2 Condition Values in BLISS-32,17.6.1.2 Condition Values in BLISS-32,17.6.1.3 Condition Values in BLISS-36,17.6.1.3 Condition Values in BLISS-36,17.6.1.3 Condition Values in BLISS-36,17.6.1.3 Condition Values in BLISS-36,17.6.1.3 Condition Values in BLISS-36,17.6.1.3 Condition Values in BLISS-36,17.6.1.3 Condition Values in BLISS-36,17.6.1.3 Condition Values in BLISS-36,17.6.1.3 Condition Values in BLISS-36,17.6.1.3 Condition Values in BLISS-36,17.6.1.3 Condition Values in BLISS-36,17.6.1.3 Condition Values in BLISS-36,17.6.1.3 Condition Values in BLISS-36,17.6.1.3 Condition Values in BLISS-36(17.6.2 A Recursive-Descent Parser(17.6.2 A Recursive-Descent Parser(17.6.2 A Recursive-Descent Parser(17.6.2 A Recursive-Descent Parser(17.6.2 A Recursive-Descent Parser(17.6.2 A Recursive-Descent Parser(17.6.2 A Recursive-Descent Parser(17.6.2 A Recursive-Descent Parser(17.6.2 A Recursive-Descent Parser(17.6.2 A Recursive-Descent Parser(17.6.2 A Recursive-Descent Parser(17.6.2 A Recursive-Descent Parser(17.6.2 A Recursive-Descent Parser(17.6.2 A Recursive-Descent Parser(17.6.2 A Recursive-Descent Parser(17.6.2 A Recursive-Descent Parser(17.6.2 A Recursive-Descent Parser%17.6.3 Performance Measurement%17.6.3 Performance Measurement%17.6.3 Performance Measurement%17.6.3 Performance Measurement%17.6.3 Performance Measurement%17.6.3 Performance Measurement=17.6.4 Target Operating Systems and Condition Handling(17.6.4.1 PDP-11 Operating Systems(17.6.4.2 The VMS Operating System(17.6.4.2 The VMS Operating System(17.6.4.2 The VMS Operating System(17.6.4.2 The VMS Operating System(17.6.4.2 The VMS Operating System(17.6.4.2 The VMS Operating System(17.6.4.2 The VMS Operating System517.6.4.3 TOPS-10 and TOPS-20 Operating Systems18. Special Features18. Special Features18.1 Psect-Declarations18.1 Psect-Declarations18.1 Psect-Declarations18.1 Psect-Declarations18.1 Psect-Declarations18.1 Psect-Declarations18.1 Psect-Declarations18.1 Psect-Declarations18.1.1 Syntax18.1.1 Syntax18.1.2 Restrictions18.1.2 Restrictions18.1.2 Restrictions18.1.2 Restrictions18.1.2 Restrictions18.1.2 Restrictions18.1.2 Restrictions18.1.3 Defaults18.1.3 Defaults18.1.3 Defaults18.1.3 Defaults18.1.3 Defaults18.1.3 Defaults18.1.3 Defaults18.1.3 Defaults18.1.3 Defaults18.1.3 Defaults18.1.3 Defaults18.1.3 Defaults18.1.3 Defaults18.1.3 Defaults18.1.3 Defaults18.1.4 Semantics18.1.4 Semantics18.1.4 Semantics18.1.4.1 Storage-Classes18.1.4.1 Storage-Classes18.1.4.1 Storage-Classes 18.1.4.2 Psect-Attributes 18.1.4.2 Psect-Attributes 18.1.4.2 Psect-Attributes 18.1.4.2 Psect-Attributes 18.1.4.2 Psect-Attributes 18.1.4.2 Psect-Attributes 18.1.4.2 Psect-Attributes 18.1.4.2 Psect-Attributes 18.1.4.2 Psect-Attributes 18.1.4.2 Psect-Attributes 18.1.4.2 Psect-Attributes 18.1.4.2 Psect-Attributes18.1.4.3 Psect-Names18.1.4.3 Psect-Names18.1.4.4 Interpretation18.1.5 Discussion18.1.5 Discussion18.1.5 Discussion18.1.5 Discussion18.1.5 Discussion18.1.5 Discussion18.1.5 Discussion!18.2 Switches-Declarations!18.2 Switches-Declarations!18.2 Switches-Declarations!18.2 Switches-Declarations!18.2 Switches-Declarations!18.2 Switches-Declarations18.2.1 Syntax SYNTA5 5X SYNTAX18.2.1 Syntax18.2.2 Restrictions18.2.2 Restrictions18.2.2 Restrictions18.2.3 Defaults18.2.3 Defaults18.2.3 Defaults18.2.4 Semantics18.2.4 Semantics#18.2.4.1 On-Off-Switch-Items#18.2.4.1 On-Off-Switch-Items$18.2.4.2 Special-Switch-Items$18.2.4.2 Special-Switch-Items18.2.4.3 List-Options18.2.4.3 List-Options18.2.4.3 List-Options18.2.4.3 List-Options18.2.4.3 List-Options18.2.5 Discussion18.2.5 Discussion18.2.5 Discussion18.2.5 Discussion18.2.5 Discussion18.2.5 Discussion!18.3 Built-In-Declarations!18.3 Built-In-Declarations18.3.1 Syntax18.3.1 Syntax18.3.2 Restrictions18.3.2 Restrictions18.3.3 Semantics18.3.3 Semantics18.4 Label-Declarations18.4.1 Syntax18.4.1 Syntax18.4.2 Semantics18.4.2 Semantics"18.5 Undeclare-Declarations"18.5 Undeclare-Declarations"18.5 Undeclare-Declarations18.5.1 Syntax18.5.1 Syntax18.5.2 Semantics18.5.2 Semantics18.5.2 Semantics18.5.3 Pragmatics18.5.3 Pragmatics19. Modules and Programs19. Modules and Programs19.1 Modules19.1 Modules19.1 Modules19.1 Modules19.1 Modules19.1 Modules19.1.1 Syntax19.1.1 Syntax19.1.2 Restrictions19.1.2 Restrictions19.1.3 Semantics19.1.3 Semantics19.2 Module-Switches19.2 Module-Switches19.2 Module-Switches19.2 Module-Switches19.2 Module-Switches19.2.1 Syntax19.2.1 Syntax19.2.2 Restrictions19.2.2 Restrictions19.2.2 Restrictions19.2.2 Restrictions19.2.2 Restrictions19.2.2 Restrictions19.2.2 Restrictions19.2.2 Restrictions19.2.2 Restrictions19.2.2 Restrictions19.2.2 Restrictions19.2.3 Defaults19.2.3 Defaults19.2.3 Defaults19.2.3 Defaults19.2.3 Defaults19.2.3 Defaults19.2.3 Defaults19.2.3 Defaults19.2.3 Defaults19.2.4 Semantics 19.2.4.1 Special-Switches 19.2.4.1 Special-Switches 19.2.4.1 Special-Switches 19.2.4.1 Special-Switches 19.2.4.1 Special-Switches19.2.4.2 On-Off-Switches19.2.4.2 On-Off-Switches19.2.4.2 On-Off-Switches19.3 Predefined Names19.3 Predefined Names19.3 Predefined Names19.3 Predefined Names19.3 Predefined Names19.3 Predefined Names19.3 Predefined Names19.3 Predefined Names19.3 Predefined Names19.3 Predefined Names19.3 Predefined Names19.3 Predefined Names19.3 Predefined Names19.3 Predefined Names19.3 Predefined Names19.3 Predefined Names19.3 Predefined Names19.3 Predefined Names19.3 Predefined Names19.3 Predefined Names19.3 Predefined Names19.3 Predefined Names19.3 Predefined Names19.3 Predefined Names19.3 Predefined Names19.3 Predefined Names19.3 Predefined Names19.4 Programs19.4 Programs19.4 Programs'20. Character-Handling Functions'20. Character-Handling Functions'20. Character-Handling Functions'20. Character-Handling Functions 20.1 Fundamental Concepts%20.1.1 Character Sequence Data%20.1.1 Character Sequence Data%20.1.1 Character Sequence Data%20.1.1 Character Sequence Data%20.1.1 Character Sequence Data%20.1.1 Character Sequence Data%20.1.1 Character Sequence Data%20.1.1 Character Sequence Data+20.1.2 Character Sequence Operations+20.1.2 Character Sequence Operations+20.1.2 Character Sequence Operations+20.1.2 Character Sequence Operations+20.1.2 Character Sequence Operations20.2 Functions20.2 Functions20.2 Functions20.2 Functions"20.2.1 Allocation Functions20.2.1.1 Definition20.2.1.1 Definition20.2.1.1 Definition20.2.1.1 Definition20.2.1.1 Definition20.2.1.1 Definition20.2.1.1 Definition20.2.1.1 Definition20.2.1.1 Definition20.2.1.1 Definition20.2.1.1 Definition20.2.1.2 Examples20.2.1.2 Examples20.2.1.2 Examples20.2.1.2 Examples20.2.1.2 Examples20.2.1.2 Examples20.2.1.2 Examples20.2.1.2 Examples20.2.1.2 Examples20.2.2 Pointer Functions20.2.2.1 Definition20.2.2.1 Definition20.2.2.1 Definition20.2.2.1 Definition20.2.2.1 Definition20.2.2.1 Definition20.2.2.1 Definition20.2.2.1 Definition20.2.2.1 Definition20.2.2.1 Definition20.2.2.1 Definition20.2.2.1 Definition20.2.2.2 Examples20.2.2.2 Examples20.2.2.2 Examples20.2.2.2 Examples20.2.2.2 Examples20.2.2.2 Examples20.2.2.2 Examples20.2.2.2 Examples)20.2.3 Character-Reading Functions20.2.3.1 Definition20.2.3.1 Definition20.2.3.1 Definition20.2.3.1 Definition20.2.3.1 Definition20.2.3.1 Definition20.2.3.1 Definition20.2.3.1 Definition20.2.3.2 Examples20.2.3.2 Examples)20.2.4 Character-Writing Functions20.2.4.1 Definition20.2.4.1 Definition20.2.4.1 Definition20.2.4.1 Definition20.2.4.1 Definition20.2.4.1 Definition20.2.4.1 Definition20.2.4.1 Definition20.2.4.2 Examples20.2.4.2 Examples(20.2.5 Sequence-Writing Functions20.2.5.1 Definition20.2.5.1 Definition20.2.5.1 Definition20.2.5.1 Definition20.2.5.1 Definition20.2.5.1 Definition20.2.5.1 Definition20.2.5.1 Definition20.2.5.1 Definition20.2.5.1 Definition20.2.5.1 Definition20.2.5.1 Definition20.2.5.2 Examples20.2.5.2 Examples20.2.5.2 Examples20.2.5.2 Examples20.2.5.2 Examples20.2.5.2 Examples20.2.5.2 Examples20.2.5.2 Examples20.2.5.2 Examples*20.2.6 Sequence-Comparing Functions*20.2.6 Sequence-Comparing Functions*20.2.6 Sequence-Comparing Functions20.2.6.1 Definition20.2.6.1 Definition20.2.6.1 Definition20.2.6.1 Definition20.2.6.1 Definition20.2.6.1 Definition20.2.6.1 Definition20.2.6.1 Definition20.2.6.1 Definition20.2.6.2 Examples20.2.6.2 Examples20.2.6.2 Examples20.2.6.2 Examples20.2.6.2 Examples20.2.6.2 Examples20.2.6.2 Examples20.2.6.2 Examples*20.2.7 Sequence-Searching Functions*20.2.7 Sequence-Searching Functions*20.2.7 Sequence-Searching Functions20.2.7.1 Definition20.2.7.1 Definition20.2.7.1 Definition20.2.7.1 Definition20.2.7.1 Definition20.2.7.1 Definition20.2.7.1 Definition20.2.7.1 Definition20.2.7.1 Definition20.2.7.1 Definition20.2.7.1 Definition20.2.7.2 Examples20.2.7.2 Examples20.2.7.2 Examples20.2.7.2 Examples20.2.7.2 Examples,20.2.8 Sequence-Translating Functions,20.2.8 Sequence-Translating Functions,20.2.8 Sequence-Translating Functions20.2.8.1 Definition20.2.8.1 Definition20.2.8.1 Definition20.2.8.1 Definition20.2.8.1 Definition20.2.8.1 Definition20.2.8.1 Definition20.2.8.1 Definition20.2.8.1 Definition20.2.8.1 Definition20.2.8.1 Definition20.2.8.2 Examples20.2.8.2 Examples20.2.8.2 Examples20.2.8.2 Examples20.2.8.2 Examples20.2.8.2 Examples20.2.8.2 Examples A. Predefined Identifiers A. Predefined Identifiers A. Predefined Identifiers A. Predefined Identifiers A. Predefined Identifiers A. Predefined Identifiers A. Predefined Identifiers A. Predefined Identifiers A. Predefined Identifiers A. Predefined Identifiers A. Predefined Identifiers A. Predefined Identifiers A. Predefined Identifiers A. Predefined Identifiers A. Predefined Identifiers A. Predefined Identifiers A. Predefined Identifiers A. Predefined Identifiers A. Predefined Identifiers A. Predefined Identifiers A. Predefined Identifiers A. Predefined Identifiers A. Predefined Identifiers A. Predefined Identifiers A. Predefined Identifiers A. Predefined Identifiers A. Predefined IdentifiersB. String EncodingsB. String EncodingsB.1 ASCII EncodingB.1 ASCII Encoding#Table B- 1: ASCII Code Table#Table B- 1: ASCII Code TableB.2 Radix-50 EncodingB.2.1 RAD50_11 EncodingB.2.1 RAD50_11 EncodingB.2.1 RAD50_11 EncodingB.2.1 RAD50_11 EncodingB.2.1 RAD50_11 Encoding&Table B- 2: RAD50_11 Code Table&Table B- 2: RAD50_11 Code TableB.2.2 RAD50_10 EncodingB.2.2 RAD50_10 EncodingB.2.2 RAD50_10 EncodingB.2.2 RAD50_10 EncodingB.2.2 RAD50_10 EncodingB.2.2 RAD50_10 EncodingB.2.2 RAD50_10 EncodingB.2.2 RAD50_10 Encoding&Table B- 3: RAD50_10 Code Table&Table B- 3: RAD50_10 Code Table&Table B- 4: RAD50_10 Code Table&Table B- 4: RAD50_10 Code TableB.3 Sixbit EncodingB.3 Sixbit Encoding/Table B- 5: SIXBIT Code Table sixbit_tab#C. Transportability Checking#C. Transportability Checking#C. Transportability Checking#C. Transportability Checking#C. Transportability Checking#C. Transportability Checking#C. Transportability Checking)C.1 Full Transportability Checking)C.1 Full Transportability Checking)C.1 Full Transportability Checking)C.1 Full Transportability Checking)C.1 Full Transportability Checking)C.1 Full Transportability Checking)C.1 Full Transportability Checking)C.1 Full Transportability Checking)C.1 Full Transportability Checking)C.1 Full Transportability Checking)C.1 Full Transportability Checking)C.1 Full Transportability Checking)C.1 Full Transportability Checking)C.1 Full Transportability Checking)C.1 Full Transportability Checking,C.2 BLISS-16/BLISS-32 Subset Checking,C.2 BLISS-16/BLISS-32 Subset Checking,C.2 BLISS-16/BLISS-32 Subset Checking,C.2 BLISS-16/BLISS-32 Subset Checking,C.2 BLISS-16/BLISS-32 Subset Checking,C.2 BLISS-16/BLISS-32 Subset Checking,C.2 BLISS-16/BLISS-32 Subset Checking,C.2 BLISS-16/BLISS-32 Subset Checking,C.2 BLISS-16/BLISS-32 Subset Checking,C.2 BLISS-16/BLISS-32 Subset Checking,C.2 BLISS-16/BLISS-32 Subset Checking,C.2 BLISS-16/BLISS-32 Subset Checking,C.2 BLISS-16/BLISS-32 Subset Checking,C.2 BLISS-16/BLISS-32 Subset Checking,C.2 BLISS-16/BLISS-32 Subset Checking,C.2 BLISS-16/BLISS-32 Subset CheckingD. Built-In Functions.D.1 BLISS-16 Machine-Specific Functions)D.1.1 Memory Management Operations)D.1.1 Memory Management Operations(D.1.2 Processor Status Operations(D.1.2 Processor Status Operations(D.1.3 Bit Manipulation Operations(D.1.3 Bit Manipulation Operations"D.1.4 Arithmetic Operations"D.1.4 Arithmetic Operations-D.1.5 Arithmetic Comparison Operations-D.1.5 Arithmetic Comparison Operations-D.1.6 Arithmetic Conversion Operations-D.1.6 Arithmetic Conversion Operations(D.1.7 Processor Action Operations(D.1.7 Processor Action Operations%D.1.8 Miscellaneous Operations%D.1.8 Miscellaneous Operations.D.2 BLISS-32 Machine-Specific Functions*D.2.1 Processor Register Operations*D.2.1 Processor Register Operations,D.2.2 Parameter Validation Operations,D.2.2 Parameter Validation Operations&D.2.3 Program Status Operations&D.2.3 Program Status OperationsD.2.4 Queue OperationsD.2.4 Queue Operations(D.2.5 Bit Manipulation Operations(D.2.5 Bit Manipulation Operations"D.2.6 Arithmetic Operations"D.2.6 Arithmetic Operations-D.2.7 Arithmetic Comparison Operations-D.2.7 Arithmetic Comparison Operations-D.2.8 Arithmetic Conversion Operations-D.2.8 Arithmetic Conversion Operations(D.2.9 Character String Operations(D.2.9 Character String Operations'D.2.10 Decimal String Operations'D.2.10 Decimal String Operations)D.2.11 Processor Action Operations)D.2.11 Processor Action Operations&D.2.12 Miscellaneous Operations&D.2.12 Miscellaneous Operations.D.3 BLISS-36 Machine-Specific FunctionsD.3.1 Logical OperationsD.3.1 Logical Operations)D.3.2 Byte Manipulation Operations)D.3.2 Byte Manipulation Operations"D.3.3 Arithmetic Operations"D.3.3 Arithmetic Operations-D.3.4 Arithmetic Comparison Operations-D.3.4 Arithmetic Comparison Operations-D.3.5 Arithmetic Conversion Operations-D.3.5 Arithmetic Conversion Operations.D.3.6 Machine Code Insertion Operations.D.3.6 Machine Code Insertion Operations(D.3.7 System Interface Operations(D.3.7 System Interface Operations(D.3.7 System Interface Operations 9 title preface ch14358ch1_74358ch1_84358ch1_9!4358ch1_10&4358ch1_11* 1_4+4358ch1_13.4358ch1_1414358ch1_156 1_4_4; 1_4_5@ 1_4_6L4358ch1_16U4358ch1_17Z4358ch1_18`4358ch1_19d4358ch1_20k 1_5o4358ch1_21r4358ch1_22u 1_7_1v4358ch1_23x4358ch1_24z4358ch1_25{4358ch1_26|4358ch1_27}4358ch1_284358ch1_29 ch24358ch2_1 2_1_14358ch2_3 2_2 2_2_1 2_2_24358ch2_7 2_3 2_44358ch2_104358ch2_114358ch2_124358ch2_134358ch2_144358ch2_15 ch34358ch3_1 3_1_14358ch3_3 3_1_3 4358ch3_5 3_24358ch3_7!4358ch3_8/4358ch3_964358ch3_10=4358ch3_11C4358ch3_12J4358ch3_13R4358ch3_14Z4358ch3_15[ 3_3^4358ch3_17e4358ch3_18k4358ch3_19o4358ch3_20s4358ch3_21x4358ch3_22|4358ch3_23~4358ch3_244358ch3_25 ch4 4_14358ch4_64358ch4_7 4_2 4_2_14358ch4_104358ch4_114358ch4_124358ch4_13 4_3 4_3_1 4_3_24358ch4_174358ch4_184358ch4_194358ch4_204358ch4_214358ch4_224358ch4_23 4_44358ch4_244358ch4_254358ch4_264358ch4_27 4_4_44358ch4_294358ch4_304358ch4_314358ch4_32 4_5_24358ch4_344358ch4_354358ch4_364358ch4_374358ch4_38 4358ch4_39 4358ch4_40 4358ch4_414358ch4_42 ch5 5_1 5_1_1 5_1_2# 5_1_3+ 5_1_444358ch5_674358ch5_784358ch5_894358ch5_9=4358ch5_10J4358ch5_11V5_1_4_5c4358ch5_13o4358ch5_14q4358ch5_15r4358ch5_16s4358ch5_17t5_1_5_1z5_1_5_25_1_5_3 5_24358ch5_20 5_2_24358ch5_214358ch5_225_2_2_34358ch5_24 ch64358ch6_8 6_1_14358ch6_10 6_1_34358ch6_114358ch6_124358ch6_136_1_4_34358ch6_144358ch6_154358ch6_164358ch6_174358ch6_184358ch6_194358ch6_204358ch6_214358ch6_22 6_44358ch6_234358ch6_24 4358ch6_25 4358ch6_264358ch6_274358ch6_284358ch6_294358ch6_304358ch6_314358ch6_32" 6_6$4358ch6_33&4358ch6_34(4358ch6_35)4358ch6_36+4358ch6_37-4358ch6_383 6_744358ch6_3964358ch6_4074358ch6_41: ch7=4358ch7_1E4358ch7_2G 7_1_2Q4358ch7_4R4358ch7_5Y4358ch7_6[4358ch7_7d4358ch7_8h ch8j 8_1q 8_1_1u4358ch8_5x 8_1_34358ch8_6 8_2 8_2_14358ch8_74358ch8_8 8_2_4 ch94358ch9_114358ch9_124358ch9_134358ch9_144358ch9_15 9_24358ch9_164358ch9_174358ch9_184358ch9_194358ch9_204358ch9_214358ch9_224358ch9_234358ch9_24 9_54358ch9_254358ch9_264358ch9_274358ch9_284358ch9_29 9_5_5 9_64358ch9_314358ch9_324358ch9_334358ch9_344358ch9_354358ch9_36 9_74358ch9_384358ch9_394358ch9_404358ch9_414358ch9_42 9_84358ch9_434358ch9_444358ch9_454358ch9_46 4358ch9_47 4358ch9_484358ch9_494358ch9_50 9_104358ch9_514358ch9_524358ch9_534358ch9_54!4358ch9_55#4358ch9_56%4358ch9_57&4358ch9_58'4358ch9_59.4358ch9_6004358ch9_6114358ch9_6224358ch9_633 9_1364358ch9_6584358ch9_66>4358ch9_67A 9_14C4358ch9_69E4358ch9_70F4358ch9_71G ch10N 10_1Q4358ch10_11S10_1_2T4358ch10_12[4358ch10_13b 10_2e4358ch10_14g4358ch10_15i4358ch10_16l4358ch10_17o4358ch10_18q4358ch10_19t4358ch10_20u4358ch10_21v4358ch10_22x4358ch10_23|10_4_3 10_510_5_110_5_210_5_34358ch10_26 10_64358ch10_284358ch10_294358ch10_30 10_74358ch10_3110_7_24358ch10_3210_7_44358ch10_34 10_84358ch10_354358ch10_364358ch10_374358ch10_384358ch10_39 10_94358ch10_414358ch10_424358ch10_434358ch10_444358ch10_454358ch10_46 10_104358ch10_474358ch10_484358ch10_49 ch114358ch11_124358ch11_1311_1_24358ch11_1411_1_3_14358ch11_154358ch11_164358ch11_1711_1_3_511_1_3_611_1_3_7$4358ch11_19) 11_2-4358ch11_20911_2_2:4358ch11_21>4358ch11_22@4358ch11_23I4358ch11_24J11_2_4b4358ch11_25d11_2_5_1k4358ch11_26p4358ch11_27y11_2_5_4 11_34358ch11_284358ch11_294358ch11_30 11_411_4_14358ch11_324358ch11_334358ch11_34 11_54358ch11_364358ch11_374358ch11_384358ch11_394358ch11_404358ch11_414358ch11_42 11_74358ch11_434358ch11_444358ch11_4511_7_4 11_84358ch11_464358ch11_474358ch11_484358ch11_49 11_94358ch11_504358ch11_5111_9_34358ch11_53 11_1011_10_14358ch11_55 11_10_34358ch11_5611_10_3_24358ch11_57!4358ch11_58)11_10_3_514358ch11_599 11_11;4358ch11_60>4358ch11_61@11_11_3E4358ch11_62R4358ch11_63`4358ch11_64l11_11_7t ch12x4358ch12_54358ch12_64358ch12_712_1_34358ch12_84358ch12_94358ch12_104358ch12_114358ch12_124358ch12_13 12_34358ch12_144358ch12_15 12_44358ch12_1612_4_212_4_312_4_412_4_512_4_5_14358ch12_1812_4_5_34358ch12_194358ch12_204358ch12_214358ch12_224358ch12_234358ch12_244358ch12_254358ch12_264358ch12_274358ch12_28 12_74358ch12_304358ch12_314358ch12_32 ch13 13_14358ch13_813_1_1_14358ch13_94358ch13_104358ch13_114358ch13_124358ch13_13 4358ch13_144358ch13_154358ch13_164358ch13_174358ch13_184358ch13_1913_1_5&4358ch13_20*4358ch13_21,4358ch13_2284358ch13_23@4358ch13_24J13_2_4_1M13_2_4_2O13_2_4_3R13_2_5T 13_3V4358ch13_26Y13_3_2c4358ch13_27k4358ch13_28u4358ch13_29{4358ch13_3013_3_54358ch13_314358ch13_324358ch13_334358ch13_344358ch13_354358ch13_364358ch13_374358ch13_384358ch13_394358ch13_404358ch13_414358ch13_424358ch13_4313_4_5 13_54358ch13_444358ch13_45 13_64358ch13_464358ch13_474358ch13_484358ch13_49 13_74358ch13_5013_7_24358ch13_514358ch13_52  ch144358ch14_64358ch14_74358ch14_84358ch14_94358ch14_104358ch14_1114_1_5"4358ch14_12$4358ch14_13&4358ch14_14(4358ch14_15)4358ch14_16+ 14_3/4358ch14_1714358ch14_1874358ch14_1994358ch14_20; 14_4@4358ch14_21B4358ch14_22F4358ch14_23G4358ch14_24I ch15N4358ch15_16O4358ch15_17T15_1_2Z4358ch15_18]15_1_4i15_1_5z 15_215_2_115_2_24358ch15_214358ch15_224358ch15_234358ch15_2415_3_2_24358ch15_254358ch15_264358ch15_27 15_44358ch15_284358ch15_294358ch15_30 15_54358ch15_3115_5_24358ch15_32 4358ch15_33 4358ch15_34 4358ch15_35 4358ch15_36$ 15_5_4% 4358ch15_37, 4358ch15_38: 4358ch15_39< 4358ch15_40B 4358ch15_41E 4358ch15_42G 4358ch15_43Q 4358ch15_44S 4358ch15_45T 4358ch15_46e 4358ch15_47g 4358ch15_48i 4358ch15_49q 4358ch15_50t 4358ch15_51v 4358ch15_52} 4358ch15_53 15_5_10 4358ch15_54 4358ch15_55 4358ch15_56 4358ch15_57 4358ch15_58 15_5_12 4358ch15_59 4358ch15_60 4358ch15_61 4358ch15_62 4358ch15_63 15_5_14 4358ch15_64 4358ch15_65 15_5_15 4358ch15_66 4358ch15_67 15_5_16 4358ch15_69 4358ch15_70 4358ch15_71 15_6# 4358ch15_72% 4358ch15_73( 4358ch15_74- 15_7. 4358ch15_760 4358ch15_773 ch166 4358ch16_79 4358ch16_8@ 4358ch16_9E 4358ch16_10J 16_1_4U 4358ch16_11b 16_2o 4358ch16_12s 4358ch16_13x 16_2_3z 4358ch16_14 4358ch16_15 16_2_4 16_3 4358ch16_17 16_3_2 4358ch16_18 16_3_3_1 16_3_3_2 4358ch16_19 16_3_3_4 4358ch16_20 4358ch16_21 4358ch16_22 4358ch16_23 16_4 4358ch16_25 4358ch16_26 4358ch16_27 4358ch16_28 16_5 4358ch16_29 4358ch16_30 4358ch16_31 16_6 4358ch16_32 4358ch16_33 4358ch16_34+ ch17- 4358ch17_6. 4358ch17_71 4358ch17_83 4358ch17_99 4358ch17_10< 4358ch17_11> 4358ch17_12E 4358ch17_13I 4358ch17_14K 4358ch17_15N 17_3_2Y 4358ch17_16Z 4358ch17_17\ 4358ch17_18c 4358ch17_19h 17_4_2k 17_4_2_1n 17_4_2_2r 4358ch17_20u 4358ch17_21| 4358ch17_22 17_4_3_2 17_4_3_3 17_5 4358ch17_23 4358ch17_24 4358ch17_25 4358ch17_26 4358ch17_27 4358ch17_28 4358ch17_29 4358ch17_30 17_6_1 4358ch17_31 17_6_1_2 4358ch17_32 4358ch17_33 4358ch17_34 4358ch17_35 4358ch17_36 17_6_4_2 4358ch17_37 ch18 18_1 18_1_1 4358ch18_7 4358ch18_8 4358ch18_9 4358ch18_10 4358ch18_11 4358ch18_12 4358ch18_13& 4358ch18_14) 4358ch18_15, 4358ch18_160 4358ch18_171 4358ch18_186 4358ch18_198 4358ch18_20: 4358ch18_21; 18_1_5B 18_2H 4358ch18_22L 4358ch18_23O 4358ch18_24R 4358ch18_25T 4358ch18_26V 4358ch18_27X 4358ch18_28] 18_2_5c 18_3e 4358ch18_31g 4358ch18_32i 4358ch18_33k 18_4l 4358ch18_34n 4358ch18_35p 4358ch18_36s 4358ch18_37u 4358ch18_38x 4358ch18_39z ch19| 4358ch19_3 4358ch19_4 4358ch19_5 4358ch19_6 19_2 4358ch19_7 4358ch19_8 4358ch19_9 4358ch19_10 4358ch19_11 4358ch19_12 4358ch19_13 4358ch19_14 4358ch19_15 4358ch19_16 4358ch19_17 ch20 4358ch20_3 4358ch20_4 4358ch20_5 4358ch20_6 4358ch20_7 20_2_1_1 20_2_1_2 4358ch20_8 20_2_2_1 4358ch20_9 4358ch20_10 4358ch20_11 4358ch20_12 4358ch20_13 4358ch20_14 4358ch20_15 4358ch20_16! 4358ch20_17- 4358ch20_186 4358ch20_199 4358ch20_20B 4358ch20_21J 4358ch20_22M 4358ch20_23X 4358ch20_24] 4358ch20_25` 4358ch20_26k 4358ch20_27r apa apb 4358apb_1 ascii_tab 4358apb_2 4358apb_3 rad50_11_tab 4358apb_4 rad50_10a_tab read50_10b_tab 4358apb_5 sixbit_tab apc 4358apc_1 4358apc_2 apd 4358apd_1 4358apd_2 4358apd_3 4358apd_4 4358apd_5 4358apd_6 4358apd_7 4358apd_8 4358apd_9 4358apd_10 4358apd_11 4358apd_12 4358apd_13 4358apd_14 4358apd_15 4358apd_16 4358apd_17 4358apd_18 4358apd_19 4358apd_20 4358apd_21 4358apd_22 4358apd_23 4358apd_24 4358apd_254358apd_264358apd_274358apd_284358apd_294358apd_30 O-ADOBE-New Century Schoolbook-Medium-R-Normal--*-100-*-*-P-*-ISO8859-1@-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-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-1/ -ADOBE-Symbol-*-R-*--*-140-*-*-P-*-*-*O -ADOBE-New Century Schoolbook-Medium-I-Normal--*-140-*-*-P-*-ISO8859-1M -ADOBE-New Century Schoolbook-Bold-R-Normal--*-140-*-*-P-*-ISO8859-1@ -ADOBE-Courier-Medium-R-Normal--*-120-*-*-M-*-ISO8859-1M-ADOBE-New Century Schoolbook-Bold-R-Normal--*-120-*-*-P-*-ISO8859-1O-ADOBE-Interim DM-Medium-I-Normal--*-140-*-*-P-*-DEC-DECMATH_EXTENSIONL-ADOBE-Interim DM-Medium-I-Normal--*-140-*-*-P-*-DEC-DECMATH_SYMBOL@-ADOBE-Courier-Medium-R-Normal--*-100-*-*-M-*-ISO8859-1@-ADOBE-Courier-Medium-R-Normal--*-140-*-*-M-*-ISO8859-1L-ADOBE-Interim DM-Medium-I-Normal--*-140-*-*-P-*-DEC-DECMATH_ITALIC>-ADOBE-Times-Medium-R-Normal--*-140-*-*-P-*-ISO8859-1@-ADOBE-Courier-Medium-O-Normal--*-120-*-*-M-*-ISO8859-1>-ADOBE-Courier-Bold-R-Normal--*-120-*-*-M-*-ISO8859-1M-ADOBE-New Century Schoolbook-Bold-I-Normal--*-140-*-*-P-*-ISO8859-1A %  ! OPrefaceOManual ObjectivesHOyThe objectiveofthismanualistoprovideacompleteKO descriptionoftheBLISS programminglanguageandtutorialIO+ informationonitsuse.,Thismanual documentsthethreeIOdialectsofthe language:) BLISS-16, BLISS-32,andBLISS-OO36.)Itisintendedasa self-teachingmanualfor experiencedSO4 high-levellanguageusers,andasa referencetool.'ItdoesnotNOdescribetheBLISS compilers(exceptinoverviewfashion)orIOtheir operation;thisisdoneinseparateusermanuals.OIntendedAudienceJOThismanualis primarilyintendedforsystem programmers,KOi includingthosewhose programmingtaskswould traditionallyKOimplytheuseofassembly language.-Itisalso addressedFOtoother programmersforwhomthetransportabilityofKOrprogramsbetweenseveralBLISStargetsystemsisofprimeLOconcern.+ Familiaritywiththebasic architectureofoneorMO$moreofthetargetsystemsisassumed;however, familiarityIO|withtherelevantassemblylanguageisnotassumed.+TheHOBLISStargetsystemsaretheVAX,PDP-11, DECsystem-10,O- and DECSYSTEM-20.O Document StructureDOX Themanualbeginswiththreechaptersthatlaythe6O  foundationforthe definitionofBLISS. Chapter1G  discussesHO theBLISS dialects, introduces fundamental concepts,and>Ob  illustratesthemainfeaturesofthe language.b Chapter2JO  discussesthe organizationofthelanguage definitionandCO  describesthesyntaxnotationusedinthismanual.n Chapter3JOl isan introductiontothedataandprogram structureofO BLISS.* t mO* % oO* n lOF ! DOAThenext seventeenchaptersofthemanual,Chapters A4, BA5, A6, O7, 8, 9, S10, 11, V12, 13, X14, 15, [16, 17, ^18, 19, `and 20,provideIOacomplete descriptionofthe language.-This descriptionNOKincludesnotonlytherulesfor interpretingBLISS programs,LObutalso examples, explanations,and programming guidelines.* ,?* B,?* ,?* O]-?:* ],?h* ]-?* S]W?G* ]X?* V]W?t* ]W?* X]X? * ]W?I* []W?3 * ]X?+ * ^]W? * ]W?z * ]W?  3-OThemanualhasfour appendixes.3AppendixAisalistofHOthe identifiersthathave predefinedmeaningsinBLISS.O5AppendixB=5definestheseveralstring encodings availableOin BLISS.Appendix C* describes thetransportabilityNOcheckingthatis optionallyprovidedbytheBLISS compilers.O>AppendixD;>isalistofthebuilt-inmachine-specific-O5 executingBLISSprogramsonthetargetsystem.JOForVAXusers:)The following documentsprovide additionalNO informationrelatingtothelinking, execution,and debugging/O5ofBLISS-32programsundertheVV5AX/VMS operatingOsystem:* `  V+ AX/VMSLinker ReferenceManual (AA-Z420A-TE) `O  O V!O AX/VMSDCL DictionaryO (AA-Z200C-TE) `   V- AX/VMSDebugger ReferenceManuali (AA-Z412C-TE)4   OThe% VAX Information Directory# (AA-D016E-TE)listsandOO describesallother documentsthatyoumayneedtorefertoNO5inthecourseofbuildingand executingaBLISS-32program.OAcknowledgment2HOATheBLISSsystem describedinthismanualisbasedonGOconceptsand experiencedrawnfromearlierversionsofEOBLISS,knownasBLISS-10and BLISS-11.+TheseearlierIOKversionswere conceivedand developedbymembersofthe@O DepartmentofComputerScienceatCarnegie-MellonBO University.0Digital Equipment Corporation gratefullyKOT acknowledgesthe significant contributionprovidedbytheseOprior developments.  u! KO1.1BBLISSDialectsNOUEachBLISSdialectis supportedbyaseparate compiler.(The#OBLISS-16compilerisa cross-compiler(,thatis,itexecutesonGOaVAX,a DECsystem-10,ora DECSYSTEM-20butcompilesKO^codeforitstargetsystem,thePDP-11.)TheBLISS-32and"OBLISS-36 compilersare native*:*theyexecuteontheirownPOtargetsystem.&EachBLISScompileris describedinaseparate>Ohusermanualthatis dedicatedtoitsdialect.I! KO BLISS-16, BLISS-32,andBLISS-36aredialectsofasingleRO language.'Eachdialectconsistsofabodyof identicallanguageGO5featurescalledCommonBLISS(whichformsthebulkofLOeach dialect),plusanumberoffeatureseitheruniquetoJOonedialectorsharedbyonlytwoofthethree.-CommonFO>BLISS constitutesthe transportablelanguagebase..TheMOdialect-specificfeaturesreflect architecturalcharacteristicsTOofonetargetsystemthatarenotfoundineachoftheothers,JOHforinstancebyte-addressing capability,foundinthe16-KOand32-bittargetsystemsbutnotinthe36-bitsystems.LOWhileitispossibleto implementmostprogramsinCommonNORBLISSonly,without referencetosystem-specific functionsorXOcharacteristics,itisnotalways desirabletodoso.'Thispointis O discussedfurtherin-Section1.5.*-{?kB 9O1.2BLanguage ObjectivesandCharacteristicsMOUThissection discussesBLISSdesign objectives,andprovides*Oanoverviewofthe language.nVD#O1.2.1BDesign ObjectivesDO4Becauseofthesystem-software orientationofBLISS,JOanumberofitsprimary objectivesdifferfromthoseofEOapplication-oriented languagessuchasCOBOL,FORTRAN,NO=andPL/I.Foremostamongthose objectivesarethe following:U y+ ` +Highly optimizableobjectcode `O LOSimpleand consistent facilitiesfor operatingon addresses ` @Control constructswhich encouragewell-structuredP'sourcecode,inthe interestsofprogram reliability,clarity,andmaintainability ` L Facilitiesfordefiningboththerepresentationofauser-IWdesigneddata structureandthemannerof accessingthe#datainthat structure `/ J/Optionalaccesstospecificfeaturesofthe target-system)hardwareor operatingsystem ` N Facilitiesfor defining,atan appropriatelyhighlevel,theK`linkage conventionsusedincallingroutinesor procedures xFOBecausethelanguagesupportsthree differentcomputerLOsystems,an additional objectiveisprogramtransportabilityKO5acrossthetargetsystems.*BLISS, therefore,includesmanyIOfeatures specificallydesignedto facilitate transportable;O programming.'Thesefeaturesare discussedinSection1.5.* |?k4!j #O1.2.2BLanguageOverviewLO4BLISShasmanyofthefeaturesofothermodern high-levelLO languages.+Ithasblock structure,an automaticstack,andKO mechanismsfordefiningandcalling recursive routines.*ItLO=uses algebraicnotationfor calculationsandhas operationsMOfor arithmetic, shifting, comparison,andlogic.,ItprovidesIOavarietyof predefineddata structuresandpermitstheHOG programmertodefine additionaldata structures.-IthasMO facilitiesfortestingand iterationthatsupportclearandLOreliable programming.)(Thesesame facilitiesalsoallowtheAOQcompilertoperform extensiveflowoptimizations.)"KOOntheotherhand,BLISSomitscertainfeaturesofotherKO high-level languages.-Itdoesnothavebuilt-in facilitiesKO5for input/output,becauseasystem-softwareprojectusuallyOOdevelopsitsown input/outputorbuildsonbasicmonitorI/OGOorscreen management services..ItavoidscertainkindsHO>of automationofthe programmingprocessthat introduceIO inefficiencyforthesakeof convenience./ItismachineMO dependenttotheextentthatitpermitsaccesstomachine-IOHspecific features,becausesystemsoftwareoftenrequiresOthis.#! WLOBLISShascharacteristicsthatareunusualamong high-levelIO languages.,Aname representingadatasegment(thatis,MO5astorage location)is uniformly interpretedastheaddressMOofthatsegmentratherthanthevalueofthesegment,andOOthelanguageincludesanexplicitfetchoperatorthatdenotesO> ``contentsof''.$ IOAlso,BLISSisan ``expression language''ratherthanaGO ``statement language''.,Thismeansthatevery constructOO5ofthelanguagethatisnota declarationisan expression.MO ExpressionsproduceavalueaswellaspossiblycausinganROactionsuchas modificationofstorage,transferofcontrol,orOO> executionofaprogramloop.'Forexample,the counterpartofPOan assignment ``statement''inBLISSis,strictly speaking,anRO expressionthatitselfhasavalue.(Thevalueofan expressionPOHcanbeeitherusedor discardedinBLISS.WhenthevalueofQOan expressionis discarded,the expressionissaidtobeusedTOina``statement-like''way,thatis,usedsolelyfortheaction5ORorsideeffectthatit produces.)(SeeFRSection1.4.5RforfurtherO discussion.)*$F?;%QOFinally,BLISSincludesamacrofacilitythatprovidesalevelEOof capabilityusuallyfoundonlyinmacro-assemblers.(& #O1.3BProgram DevelopmentLOUThetypical developmentofaBLISSprogram,from inceptionQOto successful execution,isoutlinedbelowto introducecertain>Oconceptsandtermsusedlaterinthismanual: '   `1. DesignC.)Toprovidealogical structurefortheprogram,-(youorganizeitintoasetof( routines(and associatedEdata structures.+Ingeneral,eachroutine correspondsHtoaclearly identified, relatively independentfunctionH2or subfunctionoftheprogram.,OneoftheroutinesisHthemainroutine.)Later,whentheprogramis executed,Kthisroutineiscalledbythe operatingsystem.)ThemainK<routinecontrolstheoverallflowoftheprogram,callingMother routines,whichmayinturncallyetother routines,Mandsoon,untileveryroutinehasdoneitsassignedjob. `l2.l Programming7l.*Oncetheroutinesanddata structuresFhavebeen designed,theyare programmedintheBLISS6 language.,Theroutinesaregroupedinto modules forGvthepurposesof compilation.*TheroutinesgroupedintoEagivenmodulemight,forexample,consistofthoseB' programmedbyonememberofaprojectteam.+TheyImightalsoreflectalogicalgroupingthataidsoverallGsystem understandingand facilitates structuredtesting.M1EachmoduleisatextfilethatiscalledaBLISSsourcefile. ` 3.  Compilation1 .0Oncethemoduleshavebeenpro-Bagrammed,eachmoduleis compiled.+EachmodulecanJbecompiled individually;thisisone practical advantageG ofdividingalargeprogramintoseveralmodules.+ThePk resultofeach compilationisanobjectfile.*AnobjectfileJ isasequenceofencodedmachine instructionsandlinkerJ  directivesthatis equivalenttothe correspondingsourcet module. ` 4. Linking: .-WhenallthemodulesofaprogramhaveGL been compiled,theyarelinked.,Thelinker effectivelyG ``binds together''thevariousobjectmodules,suppliesE anyroutines requestedfromacommon-routinelibrary,GV andconvertsthecompiler-encodedrelative addressesto( actualmachine addresses.+( Section1.7.1 givesfurtherS detailsonthelinker.)'Theresultoflinkingisasinglefile:` thatcontainsthe executableprogramimage. ` 5. Execution;i .*Theprogramimageis executed.*ThefirstG7 executionsarenormallydonewiththe assistanceofaE debugger.+Asbugsarefound,the developmentprocessAcyclesbackto compilation, programming,or,mostDAunfortunately,todesign.. Eventually,theprogramis(readyforuseful execution.*'r ?u(_GOThismanualprovidesthe information necessaryfortheIOsecondstepinthe developmentprocess, programming.)TheLO5BLISSusermanuals(oneforeachdialect)providecompleteOO informationaboutthethirdstep, compilation,plus guidelines4Oforlinking, executing,and debugging.L)"IOTheusermanualsalsocontaindetailed informationaboutJOcertaindialect-specific features,suchasmachine-specificHO5 functionsandmoduleswitchesthatdescribethetarget-GOsystem environment,andabout transportable programming.BoF* )-O1.4BTheMainFeaturesofBLISSKOUThissectioncontainsabrief descriptionofBLISS.ThoseLOaspectsofBLISSthatare differentfromotherhighlevelHO programming languagesare emphasized.)The descriptionisRO^informalandomitsmanydetails;itspurposeistoprovideyouOOwithan intuitive understandingofBLISSthatwillbeuseful0Oinfurtherstudyofthe language.;+ jO1.4.1BDataDO4AllBLISS calculationsare performedonvaluesthatQO correspond,insize,tothelargest efficiently accessibleunitOOofmemoryineachtargetsystem.'Thisvalue,calledaBLISSO= fullwordIz=,is16bitslongforBLISS-16(PDP-11word),32bitsLOlongforBLISS-32 (longword),and36bitslongforBLISS-HO36(DECsystem-10/20word).+AfullwordcanbeviewedasQOGasequenceof single-bitlogicalvalues(trueorfalse),asaPOsequenceofASCII charactercodes,orasaunitaryvalue.(AsSOaunitaryvalue,itcanbe interpretedasasignedinteger,an5OQunsignedinteger,oramemoryaddress.%,! KOInmany high-level languages,aspecificinterpretationorOO``type''is permanently associatedwitheachprogram variable.KO5Forexample,onevariablemightbedeclaredas containingNOanaddressvaluewhileanothercontainsanunsignedinteger.POInBLISS,however,aninterpretationisnot associatedwithaQO> variable.)Instead,theinterpretationofthevalueis specifiedMObytheoperatorthatisappliedtoit.,Forexample,BLISSHOhasthree operatorsfor equality:+EQL,EQLU,andEQLA.MOHThese operators interprettheiroperandsassigned integers,EOunsigned integers,andmemory addresses, respectively.- =OToconservestorage,dataisoftenstoredina fields,whichareOOunitsofdatathatarelessthanafullwordinlength.,OneKO5fieldofspecial importanceinallthreedialectsisthe 5 bit 5,OOwhichcanbeusedtostoreasinglelogicalvalue.,Inboth.OBLISS-16and BLISS-32,the8-bit] bytecanbe efficientlyNO>accessedand manipulated,andusedforinstancetostorean7OASCII character.'In BLISS-32,the16-bitM word(whichistheNOfullwordof BLISS-16)canalsobe manipulated efficientlybyNOHthetarget hardware.)Nomatterwhatfieldsizeis involved,QOhowever,afieldvalueisalwaysextendedtoafullwordvalue2Owheneveritisfetchedfrommemory.. m#O1.4.2BMemory AddressingHO4Although calculationsarealways performedon fullwords,MOmemoryis addressedinfullwordunitsonlyinthecaseofMO BLISS-36,wherethetargetsystem's addressableunitistheGO=fullmachineword.,InbothBLISS-16and BLISS-32,theUObasic addressableunitisthebyte.(Thatistosay,ifamemoryPOaddressis incrementedby1ineitherofthese dialects,theROGlocationpointedtobythe resultingaddressvalueisthenext*Obyte,notthenext fullword. /MO Therefore,inorderto preciselydescribetheinterpretationMOofanaddress expressionsuchasX+8inadialect-specificNO5fashion,several different formulationswouldberequiredforGOthesame expression.+Forexample,assuminga fullword-LO referencecontext,theinterpretationofthe expressionX+8MO>forBLISS-16orBLISS-32wouldbe``LocatethefullwordofNOmemorythatbeginseightbytesafterthebytewhoseaddressJOisX'';whereastheinterpretationforBLISS-36wouldbePOH``Locatethefullwordofmemorythatiseight fullwordsafter1OthefullwordwhoseaddressisX''.0WROIntheinterestofboth generalityandbrevity,the nonspecificJOterm ``addressableunit''is usedinsteadof ``byte''orQO5 ``fullword''insuch descriptions,sothatthetwo formulationsHOgivenabovereducetothe equivalentone:/``LocatetheMOfullwordthatbeginseight addressableunitsaftertheunit"O>whoseaddressisX''.&1 !O1.4.3BFetchingValuesDO4Inmany programming languages,theinterpretationofNOthenameofastoragelocationdependsonitscontext.*ForHOexample,inFORTRAN,ifthenameappearsastheleft->O=handsideofan assignment,it representsthe= address=oftheQOstorage location.'Ifthenameappearswithinan expression,itO representsthec contents%ofthestorage location.D2+IOInBLISS,however,theinterpretationofthenameofaPOstoragelocationdoesnotdependonthecontext.(Instead,the'O5namealways representstheZ5 address%5ofthestorage location.OForexample: O X+3C3! AOThis expressionis evaluatedbyadding3tothe address*thatTOis associatedwithX.WhenthecontentofastoragelocationisWO5needed,thefetch operator,aperiod( . ),isused.'Forexample:O .X+34 xAOThis expressionis evaluatedbyadding3tothe contents 6ofOO storage-unitX.Moreexactly,thevalueofthe expressionisOO5obtainedasfollows:'LocateandfetchthefullwordofmemoryQOthatbeginswiththe addressableunitwhoseaddressisX,and*Oadd3tothefetchedvalue.U5! +QOThefetchoperatorisanunusualfeatureofBLISS;itisnotDOpresentinsuch languagesasALGOL,COBOL,FORTRAN,QO5andPL/I.TheomissionofafetchoperatorhereandthereisIOafrequenterroramongmost beginningBLISS programmers.LOOntheotherhand,becauseBLISSalways interpretsanameSO>asanaddress,itiseasytotreat addressesasdata,andad-OOdress arithmeticcanbe performedinasimpleand consistentOway.6 *"O1.4.4B AssigningValuesQO4Avalueisassignedtostoragebythe assignment operator,anROequalsign( = ).'Anexampleofan assignmentisasfollows:O X&=%27NKOThis assignmentmeans``Formafullwordvaluethatrepre-QOsents2,andthenstorethatvalueinthefullwordofmemory"O5whoseaddressisX.''68  MOInBLISS,an assignmentcanbeviewedasjustanotherex-OO pression.*Itsfirstoperand (left-handside)providesavalueSO5thatis interpretedastheaddressofadatasegment.(Itssec-POondoperand (right-handside)providesavaluethatisstoredOOatthegivenaddress.)The assignment expressionitselfhasaSO>value,namelythevalueofitssecondoperand;moreissaidofOthisinHSection1.4.5.*8HZ?;9 MOOftenthe left-handsideofan assignmentisjustaname.KOHowever,inBLISSthereisno restrictionontheexpres-LO5sionthatappearsonthe left-handsideofan assignment.QOWhateverthat expressionis,itis evaluatedandthe resultingAOvalueis interpretedasanaddress.'Forexample:Ok X+6%=%2: UPOThis expressionassigns2tothefullwordofmemorythatbe-QOginssix addressableunitsaftertheunitwhoseaddressisX.PO5Theexamplejust presentedisvalidand illustratesanimpor-JOtantfeatureofBLISS.However,suchan assignmentwouldKOnotappearina well-designedprogram,and especiallynotIO>ina transportableone.-Instead,anaddress computation,LOsuchasX+6intheexample,wouldbe performedthrougha#Ostructure-reference(seeChapter11).*:O%; O1.4.5B ExpressionsHO4Many high-level programming languagesclassifyeachcon-2Ostructofthelanguageeitherasa statementr,whichperforms?Oanactionwithout producingavalue,orasan expression I,MO=which calculatesavalue.'Forexample,such languagesclas-KOsifythe assignment constructasa statement,anddonot@Opermititsuseinacontext requiringavalue.< OOInBLISS,any constructexcepta declarationcanbeusedasMOan expression.'For constructsthatarestatement-like,BLISSKO5definesavalue.,Forexample,thevalueofan assignmentNOisthevalueofthe right-handsideofthe assignment.+The:O following expressioncontainsan assignment:Ok 2*(B&=%.C%+%1)=! NBOWhenthe expressionis evaluated,it calculates2 *=(.C+1).)AtNOthesametime,without performingany additional calculation, oJOTheabsenceof statementsfromBLISSdoesnotrequireaEOnewapproachto programming.+Whenevera constructisMO5usedinastatement-likeway,itis terminatedbyasemi-SOcolonanditsvalueis discarded.'The following expressionisa O terminated expression ^:Ok Q&=%2*.R;.?N(OItassignsthevalueof2 *4.RtoQandthen,havingnofurtherSOuseforthevalue,discardsit.(Such constructsasthis,endingJO5witha semicolon,playtheroleof statementsinBLISS.@! qO1.4.6BBlocksTO4Ablockisa syntacticfeatureofBLISSthatisusedtogatherTOtogetheraportionofaprogramandmakeitintoasingleunitUO(infact,intoaformof expression).(Initsmostfamiliarform,JO=ablockisthekeywordBEGINfollowedbyasequenceofG= dec-O larations'followedbyasequenceof!O terminated expressions9OfollowedbythekeywordEND.Forexample:Os BEGINO LOCAL%TEMP;O TEMP&=%.X;OK X&=%.Y;O Y&=%.TEMP; O ENDA WNOThisblockcontainsone declarationandthree terminatedex-LO pressions.)The declaration specifiesthatTEMP designatesaSO5storagelocationthatwillbeusedonlyduring executionofthePOblock.(Eachofthethree terminated expressionsisanassign-NOmentand, together,theyexchangethecontentsofXandY.CO>Theentireblockis,itself,aprimary expression.BdTO Sometimesitisusefultoprovideavalueforablock.(InthatNOcase,an expressionwithouttheterminal semicolonisplaced6O5attheendoftheblock.'Forexample:O Z&=%BEGIN LOCAL%TEMP;I TEMP%=&.X; X%=&.Y; Y%=&.TEMP;! .X%EQL&.Y i ENDCMOThisblock exchangesthecontentsofXandYjustastheQOpreviousexampleofablockdid.)In addition,thecontentsofRO5XandYarecomparedandthevalueoftheblockis1or0,IO dependingonwhetherornotthevaluesareequal.+WhenTO executionoftheblockis complete,itsvalueisassignedtoZ.D WROInthefirstexample,ifthe semicolon followingthefinalex-JOpression(Y=.TEMP)wereomitted,theblockwouldhaveKO5asitsvaluethecontentsoflocationTEMP, accordingtothe semicoloninthecontextof expressionsandblocks.)*DP?6*DOlOh`E:6IOAblockthatdoesnotcontain declarationsiscalleda com-O pound expression<.*AnexamplethatusessuchablockisasO5follows:O IF%.A%NEQ%0O THENI BEGIN B%=&.P&+%.A; C%=&.Q&+%.A; ! END,FKOInthisexample,thecompound expressiongatherstwosep-LOarate assignmentsintoasingle construct.)Both assignmentsNO5are performedifthecontentsofAisnot0andbothareOskipped otherwise.dG ::LOInBLISS,a parenthesispairanda BEGIN-ENDpaircanbeHOusedinterchangeably.*Forexample,the precedingexample6O5canbewritten equivalentlyasfollows:O IF%.A%NEQ%0O THEN I ( B%=&.P&+%.A; C%=&.Q&+%.A; ! )H!BOOritcanbewrittenmore compactly,asfollows:DO IF%.A%NEQ%0%THEN&(B&=%.P%+%.A;%C%=&.Q&+%.A;)xI! +NSOAblockthatusesa parenthesispairandcontainsjustoneex-Opressionisa# parenthesized expression(;itistheultimatespe-RO5 cializationofablock.(Anexampleoftheuseof parenthesized'O expressionsisasfollows:O .(A%+%1)*(B%-&1)WJ! +-KOBecausethe parenthesesarepresent,theadditionisper-NOformedbeforethefetch operation,andthemultiplicationisOO5 performedlastofall.'Whenthe parenthesesareremoved,the+O expressionappearsasfollows:O .A%+&1*B%-&1K! WKOThis expressionhasa differentmeaningbecausetheoper-NOatorsreferto different operands.+ AccordingtothepriorityO5rulesgiveninP5Chapter5,35thefetch operationis performedbe-OOforethe addition,andthemultiplicationis performedbeforeLOtheadditionor subtraction.)Thus, parenthesized expressions8O>areusedtooverridethepriorityrules.*KPkOvL#LO1.4.7B Declarations6O4EverynameinaBLISSprogrammustbe^4 declared4.-TheNOpurposeofthe declarationistoprovidetheBLISScompilerIOwith informationaboutthename.,Asimpleexampleofa'O= declarationisasfollows: O OWN  X;mMCLOThis declarationsaysthatX designatesastoragelocationHOthatis permanently allocated(intheOWNprogramsec-KO5tion)beforeprogram executionbegins.,(Notethat,intheNOcontextof declarations,the semicolonissimplya mandatoryO terminator.)NiMOAmore complicatedexampleofa declarationisasfollows: O OWN:P ALPHA:& VECTOR[100]& INITIAL(REP&100%OF%(0));O KOThis declarationnotonly specifiesthatALPHAisanOWN&Oname,butalsogivestwo attributes$3,whichbeginwiththeAO5keywordsVECTORandINITIAL.TheVECTOR attributeMO describesthe structureofthestorage designatedbyALPHA.POTheINITIAL attributeprovidesinitialvaluesforthestorage.PlJOThe precedingexamplesare declarationsofnamesofdataKO addresses.,Anexampleofthe declarationofanameofa,O5routineaddressisasfollows:-O ROUTINE&EXCHANGE(A,B):&NOVALUE%= BEGINI LOCALz TEMP; TEMP%=&..A;! .A%=%..B;i .B%=%.TEMP; END;Q POThisroutine exchangesthecontentsofthetwo locationsthatIOaregiventhroughtheformalnamesAandB.TheextraPO5fetchoperatorusedwiththeseformalnamesreflectsthefactQOthataformalnameistheaddressofastoragelocationthatGOcontainsa parameter;itisnotthe parameteritself.R! kLOThe attributeNOVALUE indicatesthatthisroutinedoesnotNOreturnavalue,becausethelast expressionwithintherou-MO5tinebodyisa terminated expression., Therefore,acallonROthisroutinemustappearinacontextthatdoesnotrequireaROvalue.'Forexample,thecallcouldbeusedinastatement-likeHO>way.+The semicolon followingthekeywordENDissimplyNOtherequired declaration terminator,andassuchhasnothingJOtodowithwhetherornottheroutinereturnsavalue.SijDOSomenamesdonot represent addresses.'Forexample:O MACROP Q%=&0,3%%;YT /LOThisdeclaresthenameofamacro,Q.During compilation,ROevery occurrenceofQinthescopeofthis declarationisre-touseanawkwardnamebecausethe appropriatenamehasDObeenusedinsomeotherpartofthesameprogram.2UO1.4.8B StructuresJO4Themostcommonlyusedformsofdata structuresarede-JOfinedaspartofBLISS.Anexampleofsucha structureOfollows: Oi OWN: ALPHA:& VECTOR[100]& INITIAL(REP&100%OF%(0));$V 6OInthis declaration, VECTOR[100]isthe structure-attribute .MOIt specifiesthatALPHA designatesadatasegmentinstor-PO5agethatisnotasingle fullword,butratherisasequenceMOof100 fullwords.-Thefirstofthe fullwordsis referencedHOby ALPHA[0],thesecondby ALPHA[1],andsoonuptoOO> ALPHA[99].'Anexampleofa referencetothisvectorfollows:O ALPHA[.I-1]%=&5WNOSupposethat,foragiven executionofthis assignment,thePOcontentofIis8.+Thenthe assignmentis equivalenttotheO5 following:O ALPHA[7]%=&5{XQQOItseffectistosettheeighthelementofthevectorto5.Y JOInadditiontoVECTOR,threeotherkindsofdatastruc-thataredesigned preciselyforagiven application.)ApartofQOthedata-structure definitionisthe ``algorithm''for accessingKOthe structure.(Forexample,a structurecanbe programmedTOHtopackdatainawaythatsavesstorageortoincludespecial)Ochecksforillegal accesses.AZ! J"O1.4.9BFlowofControlRO4 Alternativeactionstobetakenbyaprogramcanbe controlledObya  conditional-expression.'Forexample:O IF%.X%GTR%0OY THEN Y%=&.XO ELSE1 Y%=&-.X;L[! "QOThisexamplesetsYtotheabsolutevalueofthecontentsofROX.Itendswitha semicolon,andis thereforeastatement-likeIO5useofaconditional-expression.&Anotherexamplefollows:6O Y&=%(IF&.X&GTR%0&THEN%.X%ELSE%-.X);\ SOThisexamplealsosetsYtotheabsolutevalueofthecontentsPOofX.However,inthisexamplethevalueofthe conditional-LO5 expressionisused..Itsvalueis.Xor-.X, dependingonPOwhetherornotthetestis satisfied.,OncethevalueoftheKOconditional-expressionis calculated,itisassignedtoY.] r{ROAmore specialized constructfor alternativeflowofcontrolis Othe case-expression .'Forexample:&Oa CASE&.X&FROM%1%TO%8&OF  SET [1]: REPORT1(.Z);9 [2]:9 REPORT2(.Z); [4,7]:Q%=&.Z+1;! [INRANGE]:J ERROR1(.Z);" [OUTRANGE]:% ERROR2(.Z);Y TES;^aMOTheinterpretationofthis expressionbeginswiththeeval-SOuationof.X;then, dependingonthevalueof.X,oneoffivePO5actionsistaken.*Ifthevalueis1,theroutineREPORT1isQOcalled.*Ifthevalueis2,theroutineREPORT2iscalled.*IfTOthevalueis4or7,the assignmentQ=.Z+1is performed.(IfVO>thevalueisintherangefrom1to8butisnoneofthepre-POviouscases,thentheroutineERROR1iscalled.(IfthevaluePOisoutsideoftherange1to8,thentheroutineERROR2isOHcalled.!_ NKOAthird constructfor alternativeflowofcontrolisthe select-O expressionC,whichliesbetweentheconditional-expressionandDO5thecase-expressioninitsdegreeofspecialization.`UO1.4.10CLoops1O4 Iterativeactionsare controlledby(4 loop-expressionsm4./AnAOexampleoftheuseofaloop-expressionfollows: O OWNY SUM, LIST:% VECTOR[21]; O ...O1 SUM%=%0;&Oy INCR&I%FROM%0&TO&20&DO% SUM&=%.SUM%+& .LIST[.I];Na $OOTheloop-expressioninthisexampleformsthesumofthe21QOelementsofthevectorLIST.Itdoessoby executingtheas-WO5signment21times,onceeachfor.Iequalto0,1,2,andsoonNOthrough20.)Inthisexample,theloop-expressionisfollowedQObya semicolonandis thereforeusedinastatement-likeway.QO>Notethatthecontrol parameters(0and20inthiscase)can=Obeanyformof expressionthathasavalue.bLOAsecondexampleoftheuseofaloop-expressionfollows: O OWN P X, LIST:% VECTOR[21]; O ...-O( X&=%(INCR%I%FROM&0%TO%20%DO5zp IF& .LIST[.I]%EQL%0%THEN&EXITLOOP&.I);c! cNOTheloop-expressioninthisexamplesearchesthevectorLISTZOforanelementthatis0.'Ifa0isfound,thevalueoftheloop-TO5 expressionis.I;thatis,avaluebetween0and20thatshowsTOwherethe0wasfound.)Ifa0isnotfound,thelooprunstoQO completionandthevalueoftheloop-expressionis(bydefini-RO>tion)-1.(Inthisexample,thevalueoftheloop-expressionisROusedtoprovide,ina convenientway,forthecasethatthereOisno0inLIST.d! $O1.4.11CBindingofNamesLO4MostofthenamesinaBLISSprogram represent addresses-NOeitherdata addressesorroutine addresses.)The operationof=O associatinganaddresswithanameiscalled binding.*OnceQO=thenameisbound,theuseofthenamebecomes equivalentto?Otheuseoftheaddresstowhichitisbound.eROOAsanexampleofbinding,considerthe followinguseoftheOnameBETA: Oa OWN BETA; O ...O9 BETA&=%4;fzLOSupposethatBETAisboundtotheaddress1203.*ThentheKO assignmentintheexampleis equivalenttothe following:Oa 1203&=%4;Mg#QOInnearlyallcases,youdonotneedtoknowtheaddresstoPOwhichanameisbound.(Storageis allocatedbythe compiler,LO5thelinker,andthe operatingsystem,andyousimplywant6O referencestostoragetobe consistent.h cMO Occasionally,youmaywanttoaccessa particular location.KOSuppose,forexample,thatafullwordusedfor communica-SO5tionwithacertain input/outputdeviceisinlocation80.'Then4Othatlocationcanbesetasfollows:O BINDZ IOW&=%80; O ...O IOW%=%0;iztMOInthiscase,the assignmentisentirely equivalenttotheO following:Oa 80%=&0;j! OOTheuseoftheBIND declarationmakesyour intentionsclear,COnotonlytothereaderbutalsotothe compiler.Yo 2(O1.6BEffectsof OptimizationHOUThesemantic definitionsoftheBLISSlanguageinthisKOmanualdescribetheuseful, perceptibleresultsofprogramOO executionasifthoseresultswereachievedwithout optimiza-OO^tionoftheobjectcode.)Wherever possible,then,themanualMOavoids discussionofhowtheresultsareactually obtained.LOTheonly exceptionsarewherea discussionofobjectcodeKOhenablesyoutomakeamore efficientchoicebetweensev-POeral alternative constructs,forexample,betweentwotypesofOcontrol expressions.xp NKOIn particular,the optimization strategiesemployedbytheOOcompilerarenot described.'The optimizationsreducethecostNO5ofprogram executionby eliminatingsomeoftheactionsde-MOfinedbythelanguage semantics,buttheyneveraffecttheOfinalresults.q aMOInsomecases,however,the optimizationscanbesoexten-QOsive(globalflowoptimizations)thattheobjectcode generatedLO5doesnotshowanyobvious correlationtothe correspondingJOsequenceofsourcecode.+Thedegreeof optimizationper-JOformedbythecompilercanbe controlledby optimization5O> switches,eitherinthemodulehead(>Chapter19)i>orintheHOcompilercommandline.+TheBLISSuser'sguidesdescribeMOthekindsof optimizations performedandtheeffectofthe*OHvarious optimization switches.*qOz "r ).O1.7BTheBLISS ProgrammingSystem OUThe$U BLISS programmingsystem+Uisthe collectionofsoftwareJOprogramsthatsupportsthe developmentofBLISS programs.LOSomeofthe componentsoftheBLISSsystemareusedonlyGO^forBLISS programs;thecompilerisanexample.-OtherEO componentsaresharedwithother programminglanguage;Osystems;thelinkerissharedinthisway.sXPO Operating instructionsforthecompilerorthelinkerarenotLOgivenhere.+Such instructionsare essential(andaregivenLO5inthe appropriateBLISSusermanual),buttheynever,orJOalmostnever,affecttheresultsofprogram executionas&O describedinthismanual.tNKOThissection describesthe componentsoftheBLISSsystemNOandthen discussesthe evaluationofconstant expressionsbyMO5two componentsofthesystem,thecompilerandthelinker.u#O1.7.1BSystem ComponentsJO4TheBLISSsystemhasfivemain components:(the compiler,POthelinker,the operatingsystem,the debugger,andasetofO utilities.v! tOCompiler O4The4 compiler?64is speciallywrittenfortheBLISSsystem(oneMOforeach dialect)..ItacceptsaBLISSmoduleasitsinputLOorsourcefile.+Itproducesanunlinked target-systempro-MO>gramasitsobjectfile (althoughthecompilerusedforaKOgivendialectmayitselfactuallyexecuteonanothercom-NOputersystem,thatis,itmaybeacross-compiler).*BecauseKOGthecompilerperforms complicatedand large-scale optimiza-QOtions,the relationshipbetweenthesourcefileandtheobjectZOfileis sometimes difficultto perceive;thatis,itcanbe difficultOOQtofindthespecific instructionsthat implementa particularLOBLISS expression.) Therefore,aplanfor developingaBLISSTOprogramshouldinvolveaslittle referencetotheobjectfileasO[ possible.fw <OOThecompilertakesonlyonemoduleatatimeasitsinput.LO Therefore,thecompilercannot determine addressesthatarePO5usedinthegivenmodulebutdeclaredinothermodules;suchMO addressesareexternalandmustbeleftblank (unlinkedinMOtheobjectfile).+ Furthermore,thecompilerdoesnotdeter-QO>minetheabsolute addressesofroutinesanddata.&Instead,theROcompiler expresses addressesasoffsetsrelativetocertainbaseO addresses.xOLinker O4The4 linkerB4isa target-systemutilityprogramthatissharedJObyallofthe programming languagesforthetargetsys-IOtem.,Itacceptsanunlinkedobjectprogram,producedbyNO>the compiler,foreachmoduleofaprogram.)Itproducesan6O executableprogramimageasitsoutput.yWPOThelinkerfinishesthejobof preparingtheprogramforex-LOecution.-IthasaccesstoallmodulesoftheprogramandNO5can thereforefillintheexternal addresses.,Itcandeter-MOminetherequiredbase addressesforroutinesanddataandLOcan thereforereplacestaticoffset addresseswithabsoluteO> addresses. zO OperatingSystem O4The4 operatingsystem7g4isa collectionof target-systemutilityMOprogramsthatare essentialtoany programmingjob.)Itin-HOcludesacommandthatexecutesaprogram.(ThiscommandJO>loadstheprogramimageandstarts execution.+ Thereafter,IOthe operatingsystemmanages input/output,handlesinter-?Orupts,and generallyoverseesprogram execution.{ODebugger O4The4 debuggerAE4isaprogramthatassistsyouinfindingerrorsIOinaprogram.+ThepackageincludesfeaturesfordumpingLOdatain convenientrepresentationsandformats,fortracingMO>datathroughthe executionoftheprogram,for establishingDObreakpointstohaltprogram execution,andsoon.| O UtilitiesO4TheBLISS4 utilities64area collectionofprograms especiallyFOwrittentosupporttheBLISS programmingprocess.-OneMOsuchutility,forexample,istheBLISSsource-programfor-OO>matter.(The utilitiesare describedintheBLISSusermanualMOandinonline documentationfiles availablewitheachBLISSOsystem.}VY&O1.7.2BConstant ExpressionsJO4Whenthevalueofan expressioncannotchange throughout(Oprogram execution,itisa constant expression.+Manyim-KOportant techniquesfor optimizingaprogramdependontheBO= recognitionand evaluationofconstant expressions.~WMOSomeconstant expressionscanbe evaluatedassoonastheyLOarewritten.*Forexample,thevalueofthenumeric-literalMO552is obviously fifty-two.)Otherconstant expressionsdependMOon addressesthatare determinedeitherbythecompilerorOObythelinker.(Forexample,thevalueofthe expressionX+6CO>dependsontheaddressthatis associatedwithX.i ?MOWhenthevalueofaconstant expressionis determined,theMO expressionisbound.*Theprocessof associatingvalueswithMO5constant expressionsisaformofbinding.*ThesetermsareLOmostoftenappliedtonames;however,inBLISSanameisTOjustaspecialcaseofan expression,andaboundnameisjustSO>aspecialcaseofabound expression.'ThemainactivityoftheQOlinkeristobindthenamesusedinaprogramto appropriateO addresses..4OIncertain contexts,BLISSrequiresa  compile-timeconstantO expressionE;thatis,an expressionthatcanbeboundbytheFO5 compiler.+Forexample,whenaVECTORdatasegmentisNO declared,itssizemustbegivenasacompile-time-constant-NO expression;this restrictionpermitsthecompilertoallocateNO>storageforthedatasegmentandthusavoidtheexpenseof'Odynamicstorage allocation. LOBecausethecompilerdoesnot determineabsolute addresses,HOa compile-timeconstant expressionusuallycannotdependMO5onanamethat representsanaddress.(The exceptionoccursMOin expressionssuchasX-YorXEQLAY;intheseexpres-QOsions,theoffset addressesforXandY(whichare determinedRO>bythe compiler)are sufficientto determinethevaluesoftheO expressions. W;OIncertainother contexts,BLISSrequiresaq link-timecon-O stant expression@;thatis,an expressionthatcanbeboundbyPO5thelinker.)Sinceall addressesare determinedbythelinker,JOalink-time-constant-expressioncandependonanamethatKO representsanaddress.*Furtherdetailsaboutbothcompile-?O>and link-timeconstant expressionsaregivenin>Chapter7.*lO:Z! 0KOMuchofBLISS programmingcanbedonewithoutregardforMOthefactthataprogramgoesthrough compilationandlink-LO5ingbeforeitcanbe executed.+Thecompile-and link-timeLOconstant expressionsare important exceptionstothisrule.}  ~9O 2.2Lexical! Definitions"and!Syntax!NotationKOThischapterdefineslexemes(thebasic syntacticelementsLOofBLISS)andtherulesforthe formationofvalidBLISSMOBsourcetext.-Italso describesthesyntaxnotationusedinNOlaterchapterstodefinethelarger constructsoftheBLISSO language.zPPOThebasicelementsandrulesofthelanguageareasfollows:3!   ` $ Charactersand linemarks..' Charactersarethe indivisibleK(unitsofprogramtext.' Linemarksservetodivideachar-Mactersequenceintoseparatelinesofsourcetext.'TogetherFthey constitutethe lowest-levelelementsof syntactic2 structure. `  Lexemesandspaces4.&ThelexemesofBLISSare analogousH tothewordsand punctuationmarksofordinaryEnglishKctext.'Thespacesareusedtoseparatelexemeswherenec-Kessaryand, optionally,toarrangetheprogramtextinaGclearand attractiveway.*Togetherthey constitutethe8lnexthigherlevelof syntactic structure.] 3bNotethatab comment5binBLISSissimplyaspecialformof2aspacefromthelexical viewpoint. `:  :They: separationrules1:.(Theserulesgovernthe mandatory@andoptionaluseofspacestoseparatelexemes. ]*OSyntax notation, describedinmSection2.4,isusedtoformu-NOlatethe syntacticrulesthatdefinethemany constructsofMO5theBLISS language.)Eachsuch constructconsistsofoneorKOmorelexemes.)Thusthese higher-level syntacticrulesfun-LO damentallydependonthe separationrulesfortheirformalMO>interpretation,althoughthe separationsrequiredandallowedPObythe syntacticrulesareusually intuitivelyobviouswithout/Orecoursetothe separationrules.*mF~?# 5  )O2.1B Charactersand LinemarksLOUAtthelowestlevelof syntactic structureaBLISSmoduleOOconsistsofasequenceof charactersand linemarks.'TheyareGOthesmallest recognizableelementsofthesourcetext.O2.1.1B CharactersMO4The charactersthatcanappearinamodulearelistedand0O classifiedinthe followingtable:H3 OOCategory3 Characters O;OPrinting OOLetters3ABC ...Z`abc... AzODigits3012... ]9O Delimiters3.!^ *//+-=,;:!()[]<>OuSpecial3u$_%! 2u 'OFree 3 "#&?!@\{!|!}~ O,Ot Nonprinting O-3blank@tab@ vertical-tab@ form-feed OXMOAllthe charactersinthistablearemembersoftheASCIIMO characterset.,However,thetabledoesnotincludealltheIO5ASCII characters.- Specifically,30ofthe34 nonprintingPOASCII charactersdonotappearinthetableandmustnotbe%OusedinaBLISSmodule.WNONotethatthistableshowswhich characterscanbeusedinOOaBLISSprogram,butdoesnotimposea restrictionondata.GO5BLISSdatacanuseanyASCII characters.+(Thecharac-POtersthatcannotbe represented literallyintheprogramtextKOcanbeentered indirectlywithnumericcodes,throughthe0O>%CHARlexical-function describedin>Chapter15.)*OIe V;O2.1.2B LinemarksPO4Thelinemarkisthe separationbetweentheendofonesourceROlineandthe beginningofthenextinasourcefile.)OnmostQO terminals,youenteritintothefilebypressingtheRETURN,.O=CARRIAGERETURN,orNEWLINEkey.aLOThelinemarkis representedin differentwaysin differentFOtargetsystems.*OnthePDP-11andVAXsystems,whereQO5atextfileisasequenceofrecords,thelinemarkisrepre-KOsentedbythedivisionbetweentwo successiverecords.+OnOOtheDECsystem-10/20,whereatextfileisasingle characterOO>string,thelinemarkis representedbya line-feed, vertical-MOtab,or form-feed character;ifanyofthese charactersisIO immediatelyprecededbyacarriage-return character,then=OHthat characterisalsopartofthe linemark. 2#O2.2BLexemesandSpacesPOUAtthenexthigherlevelof syntactic structureaBLISSmod-ROuleconsistsofasequenceoflexemesandspaces.(AlexemeisNOthesmallest meaningfulunitofthesourcetext.*SpacesareMO^usedtoseparatecertainkindsoflexemes accordingtotheMO separationrules,andare optionallyusedtoseparateotherLOlexemesforgreater readabilityandgeneral formattingpur-JOhposes.-ThedivisionofamoduleintolexemesandspacesNOis especially importantfortheinterpretationofmacros,asO describedin Chapter16.* O3 OV%O2.2.1BLexemesLO4ThevarioustypesoflexemesthatcanappearinamoduleROarelistedand classifiedinthe followingtable,withexamplesMOforeachtypeexcept delimiters(single charactersthatare"O= completely enumerated):g OOCategory3Examples OObKeywords3bROUTINE%ASCIIAND OONames OOl Predeclared3lVECTORMAXO ExplicitlyDeclared!3XBETA26 INITIAL_SIZEO_DecimalLiterals3_023000OQuotedStrings 3 ' YABC ''JHesaid, ` '' Go! '''!'77700 l ' OO^ Delimiters OyO Operators3.!^ */+-=O\ PunctuationMarks#3\,;:!()[]<> Ox! YMOA delimiterserveseitherasanoperatororasapunctua-MOtionmark.(Theyarecalled delimitersbecausetheyseparateKO5 neighboringlexemeswithouttheuseof interveningblanks.LOForexample,theplussign( + ) delimitercanformtheFO expressionALPHA+1 (consistingofthreelexemes)with-IO>out insertingblanks;however,usingthekeywordANDinNOplaceoftheplussign,withoutadjacentblanks,wouldformKO ALPHAAND1,whichwouldbe interpretedasasinglelexeme.= &O2.2.2BSpacesandCommentsJO4Whentwolexemeswould otherwiseruntogethertomakea;Osinglelexeme,theymustbe separatedbyab space.(Adescrip-AOtionofspacesisgiveninthe followingtable:^ 4 OOLinemark OFOb Nonprinting Charactersblanktab vertical-tab form-feed OOComments OOlTrailingComment63l!!Thisisaprogramforentomologists.OEmbeddedComment,3%(Insertnewroutinehere)% ONKOThe precedingtable describesspaces informally,usingtwoMOexamplesforthe comments.*Amoreprecise definitionisasO5follows:\! 2`1.:A$ spaceBisa linemark,a nonprinting character(aslisted(inthetablein(Section2.1.1)(oracomment.`2.:A$ comment:isatrailingcommentoranembeddedcom-ment.`3.:A$ trailingcomment2isan exclamation characterfollowedDbythe remainderofthelineonwhichthecomment1begins.`4.:AnU embeddedcomment,1beginswiththetwo charactersP ``%('',followedbythetextofthecomment,followedbytheKatwo characters``)%''.(Thetextmustnotcontainthese-Fquence``)%'',becausethatwould prematurelyendtheBcomment;see guidelinesbelow.*AnembeddedcommentIkcanbeginafteranylexemeofamoduleandcanextendJtoanylaterpositioninthemodule.(However,anembed-Idedcommentmustendinthesamesourcefileinwhichuitbegan.*? MOSpacesarecommonlyusedtoarrangethemoduleinaclearLOand attractiveformatandtoinsertcommentsonthework-LO5ingsoftheprogram.)However,whenamoduleis translatedVObythe compiler,theonlyroleofspacesistoseparatethelex-KOemesofthemodule.,Forexample,fromthepointofviewPO>ofthe compiler,alengthycommentis equivalenttoasingleOblank character.! 0O GuidelinesontheUseofCommentsQO4 Beginningwithan exclamationpoint( ! ),atrailingcommentPOanywhereinasourcelineis terminatedbythenextlinemarkYO(thatis,bytheendofthelineinwhichitoccurs).)Thus,itisKO>a generallysafeand unambiguousformofcommentandcanTObeused,forexample,to ``commentout''alineofsourcetext.X .FOAnembeddedcomment, beginningwiththe characterse-NOquence``%('',is terminatedbytheverynext occurrenceofHO5thesequence``)%''.,Thismeansthattheembeddedcom-OOmentcannotbenested.,Also,thesequence``)%''isavalidOOthough ill-advisedformofendingofamacro definition(seeO>Section16.2).7O>Thusan extensiveembeddedcommentcouldOObe inadvertently terminatedbythe occurrenceof``)%''inaMOmacro declarationwherethe``%'' characterwasintendedtoLOH terminateamacro definition.(Forthesereasonstheembed-ROdedcommentshouldbeusedwithcare.'Also,avoidusingitto*Ocommentoutabodyofcode.*O?b %O2.3BThe SeparationRulesNOUTheuseofspacesbetweenthelexemesofamoduleisgov-Oernedbythe' separationrules*f.'Therulesareasfollows:AL`1.:Oneormorespacesmustappearbetweentwolexemesif9(eachlexemeisanyoneofthe following:b YAname O YOAkeyword  YAdecimal-literal! nLbThisrulerequirestheuseofspaceswherevertwolexemesHwould otherwisemergetoformasingle,longerlexeme.M`:2.:Oneormorespacescanappearbetweenanytwolexemes.MThisrulepermitstheuseofspacestocontrolformatandprovide comments.M`k3.:Aspacemustnotbeinsertedintoalexeme.+ThisruleCpreventsalexemefrombeingbrokenintotwolex-Hemes.+Someapparent exceptionsariseinthecaseofa3t quoted-stringlexeme,as describedintSection4.3.2.*7?;9~ wT$O2.4BTheSyntaxNotation OUTheU syntax*UofBLISSisa collectionofU syntacticrulesUthatde-QOscribethe constructionofamodule(theunitof compilation).SOThespecialnotationusedforthe syntacticrulesisdefinedinO^thissection.F +OEach syntacticruledefinesav syntacticname.)The syntacticOrulesare interdependent7;thatis,manyoftherulesdefineaLO5 syntacticnameintermsofother syntacticnames.(However,QOtherulesdonotformaviciouscircleof definitionsbecauseQOsomeoftherulesdefine syntacticnamesdirectlyintermsofO> syntacticliterals>>(thatis,without referencetoother syntacticOnames).o E,OTheultimate syntacticnameis module#,whichisdefinedin*Othe syntacticrulesgivenin9Chapter19. The descriptionofPO5thelanguagebeginswiththe definitionofthe syntacticnameO expression,inCChapter4.*9Oz *CPlO !O2.4.1B SyntacticRules O4A4 syntacticruleC4isdividedintotwopartsbyaverticalline.'ToXOtheleftofthelineisthe syntacticnamethatisdefinedbytheSOrule;totheright,astring definition.*Inthesimplestrules,UO=thestring definitionisasingle characterorasingle syntacticOname.~ TKOInmore complicatedrules,string definitionsarecombinedMOtomakelargerstring definitionsasfollows:*by concatena-TO5tion(thejoiningof strings),by disjunction(thechoicebetweenVOtwo strings),orby iteration(thejoiningofseveralcopiesofaOstring).~TTOAnexampleofthesimplestpossiblekindofruleisasfollows:EOdollar $! BOInEnglish,thisrulereads:'``The syntacticname" dollardesig-UOnatesthedollarsign( $ ) character.'''Notethatthe characterUO5isa syntacticliteral,asdefinedinthe followingsection;thus?Othisrule completelydefinesthe syntacticname dollar,with-OOout referencetoanyotherrules.+ SometimesitisusefultoPO>givethesame definitionforseveral syntacticnames.(InsuchOOacase,theseveralnamesarewrittenoneaboveanotherand$Oarejoinedbyabrace.t1J Onpositionsize o expressionCOInEnglish,thisrulereads:+``The syntacticnamesd position Oand sizeeach designatean& expression .'' Vr;O2.4.2B SyntacticNamesand SyntacticLiterals O4A4 syntacticname94isoneormoreEnglishwordscomposedofJO lowercaselettersand connectedbyhyphens.)FourexamplesROof syntacticnamesaregiveninthetwo syntacticrulesabove,>O=namely:'dollar, position,size,and expression.nDDOFurtherexamplesof syntacticnamesareasfollows:qmodule(own-item%forward-routine-declaration* compile-time-constant-expressionlBBOEvery syntacticnamehasatleasttwo characters.$N OA syntacticliteral;isaprinting characterthatis interpretedQOasitselfwhenitoccursinastring definition.,AllprintingGO5 charactersare syntacticliteralsexceptthe following:V @,B`1.:A characterthatispartofa syntacticnameG`O2.:Abrace character,{or},oraverticalbar,'|I`3.:Aperiodorcommathatispartofthesequence`` ...Y''or'thesequence``, ' ... ''' {MOInthismanual syntacticnamesarealwaysin lowercaseand.OBLISSkeywordsarein uppercase.\ `2O2.4.3BConcatenations O4A4 concatenation>4isastring definitioncomposedofasequenceQOoftwoormorestring definitions.*Ifthe definitionsaread-KOjacent(without interveningspaces),thenthestringstheyQO=definemustalsobe adjacent.(Ifthe definitionsare separatedQO(byspaces),thenthestringstheydefinemayormaynotre-0Oquire separation, dependingonthe; separationrulesgiveninOGSection2.3.*O |? pOOAnexampleofa syntacticrulethatusesadjacent concatena-!Otionsisasfollows:P&&Ovolatile-attributeVOLATILEfBOInEnglish,thisrulereads:+``The syntacticnameE volatile-O attribute; designatesthe followingstring:/thekeywordDO5 VOLATILE.''BecausetheeightlettersVOLATILE(eachPOonea syntacticliteral)areadjacentintherule,theymust/Oalsobeadjacentintheprogram.xNOAnexampleofarulethatusesbothadjacentand separated*Oconcatenationsisasfollows:]33Oexitloop-expressionrEXITLOOP exit-valueNBOInEnglish,thisrulereads:+``The syntacticnameC exitloop-O expression; designatesthe followingstring:.thekeyword%O5 EXITLOOP,followedbyanA5 exit-value 5.''  NSOIntheEnglishreadingofany syntacticrule,thephrase``fol-ROlowedby''isan abbreviationfor ``followedbythespaces(ifQO5any)thatarerequiredbythe separationrules,followedby.''O2.4.4B Disjunctions O4A4 disjunctionAA4isastring definitionthatpermitsachoiceofROonestring definitionfromasetofseveralstring definitions.TOThesetof definitionsisenclosedinbraces.(Each definitionisOO= separatedfromthe precedingonebybeingonanewlineor)Obya vertical-bar character.NOThe followingisanexampleofa disjunctioninwhicheach5Ochoiceiswrittenonaseparateline:O0 case-label 8 w< :s single-value#s< low-valueTO high-valuesINRANGEsOUTRANGE 9 w= ;a construct;insuchacase,theword ``nothing''isincludedinNOthebraces.*Anexampleofa disjunctionthatusesthewordBO ``nothing''asoneofthechoicesisasfollows:Oleave-expression^LEAVElabel 8 w< :4WITH exit-valuenothing W9 Ww= W;O2.4.5B Replications O4A4 replicationB$4isastring definitionthat representsasequenceSOofoneormorecopiesofagivenstring definition.(Therepli-EOcationis indicatedbywritinganellipsissymbol(6 ...)afterIO=thegiven definition.-The separationbetweenthedefinedMOstringsis determinedbythe separationrules,justasforOconcatenation.e;;OAnexampleofa replicationisasfollows:Oown-item^own-name 8 w< :4:" own-attribute4...nothing r9 rw= r;> WBOInEnglish,thisrulereads:*``The syntacticname= own-item1O designatesthe followingstring:(an5 own-namefollowedbyanO5optional5 own-attribute-list 5.)An5 own-attribute-listh5isacolon6Ofollowedbyasequenceofoneormore own-attributes''.'(The!Oextra syntacticname,q own-attribute-list!,is introducedonly5O>forthesakeoftheEnglish reading.)kAQOAspecialkindof replicationis indicatedbywritingacomma0Ofollowedbyanellipsissymbol(, ...$[)afterthe definition.NO5Thesymbolmeansthateachcopyofthegiven definitionis=O separatedfromthe precedingonebyacomma.vLLOAnexampleofa replicationthatusesthesymbolfollows:O routine-call^routine-designator( 8 w< :4actual,4...nothing 9 w= ; ^) gAOInEnglish,therulereads:(``The syntacticname& routine-call0O designatesthe followingstring:'a routine-designator,followed?O5byanopen parenthesisfollowedbyanoptional5 actual-list m5,2Ofollowedbyaclose parenthesis.)AnI actual-listisasequence Oof actualsAthatare separatedfromoneanotherby commas''.'O>(Theextra syntacticname,.> actual-list&>,is introducedonlyfor0OthesakeoftheEnglish reading.) NPONotethatwhetherornotthecommaisincludedwiththeel-UOlipsissymbol,theoptional replicationappliesonlytothestringLO5 definitionthat immediatelyprecedesthe replicationsymbol.! Vm'O2.4.6B Dialectal DifferencesSO4Someofthe syntacticrulesgiveninthismanualapplytoonlyROoneortwoofthethreeBLISS dialects.)Thatis,someoftheOOrulesarenotpartofCommonBLISS.Further,certainoftheRO=string definitionsgivenwithinsomerulesaredialect specific. NQOThesedialect-specificfeaturesare indicatedinthesyntaxdi-OOagramsbyflagsofthe followingform,whichprecedearule$O5(oragroupofrules):sInnOnly ) w ormm/nnOnly )! VVOOraflagofthe followingformthatfollowsastring definition:mC (8nnOnly w or (@mm/nnOIneachcase, < mm and  nn1identifythedialectstowhichtheEO syntacticfeatureapplies(thatis,16,32,or36).eSOAnexampleofanentire syntacticrulethatisdialectspecificOfollows:uO16/32Only )/~extension-attribute ngkSIGNEDgUNSIGNED oOOInEnglish,thedialectflagmeans:)``The following syntacticLOruleappliestotheBLISS-16andBLISS-32dialectsonly''.OOAnexampleofbotha syntacticruleandastring definitionBOwithintherulethataredialect-specificfollows:O16/32Only )/allocation-unit 8 < :rLONGrWORDrPBYTE n9 n= n; (%32Onlys I=OInEnglish,the left-pointingdialectflag`` (32Only''means:PO``Thestring definitionLONGisvalidonlyinBLISS-32asanNO5 alternativewithintheruleforallocation-unit(whichitselfGOappliesonlytotheBLISS-16andBLISS-32 dialects)''.:=5 )O3.1BBLISSValuesMOUBLISSprovidesavarietyofwritten(sourceprogram)repre-PO sentationsforvalues(binary,octal, hexadecimal,andsoon).#OTheseare describedinChapter4. 7Thenormal represen-MO^tationisdecimal;thatis,anynumberinaBLISSprogramOOandinthismanualis interpretedasdecimalnotationunlessO otherwise indicated.*nO WKOThevaluesonwhichtheobjectprogram operates,however,Oare representedas bitstrings%l.,Themaximum-lengthbitQO5stringthatis efficiently accessiblebyagiventargetsystemPO(thatis,a``word''or ``longword'' dependingonthesystem)Oiscalleda fullword5inBLISS terminology.*ThelengthofaQO> fullword,inbits,foreachtargetsystemis indicatedbytheROnumericportionofthenameofthe respectivedialect:'16,32,Oor36.NMOAbitstringthatisshorterthanafullwordiscalleda fieldO valueJ .)Severalfieldvaluesizesareof particular importance@O5inBLISS, dependingonthedialectin question: J `  Forall dialects-The  bit/,whichisthesmallestunitof(storage. ` For BLISS-16-The byte0L(8bits),whichisthebasicad-9 dressableunitinPDP-11andVAXsystems. ` 8For BLISS-32-Thebyte,asabove,andthe word(16bits),Hwhichisthe intermediatesize addressableunitinVAX1systems. WLOFullwordvaluesandfieldvaluesplay contrastingrolesinMOBLISS.Fullwordvaluesareusedasthebasisforallcal-KO5 culations.,FieldsareusedtoachievecompactstorageforOOvaluesthatdonotrequirethemaximum-lengthbitstringforMOtheirrepresentation.*Thetwokindsofvaluesare discussed3O> separatelyinthe following sections.!O3.1.1BFullwordValuesLO4Thefullwordvalueisthe fundamentaldatatypeofBLISS.PO Specifically,theresultof evaluatinganyBLISS expressionisOafullwordvalue.! WSOInsomecases,afullwordvaluecanbeviewedasabitstringNOwithoutaspecificinterpretation,aswhenavalueismovedOO5fromonestoragelocationtoanotherwithout modification.'InVOother contexts,thebitsofafullwordvaluearegivenaspecificPOinterpretation.(Afullwordvaluecanbe interpretedasanyofO>the following:  ` HAsignedinteger, representedintwo's complementnota-(tion ` Anunsignedinteger `' K'Asequenceof character positions,eachofwhichcontains,acodeforanASCII character ` HAsequenceoflogicalvalues,eachofwhich represents!W``true''or ``false'' ` Amemoryaddress NQOOtherinterpretationsforafullwordvaluecanbedevised,butSOthesearetheinterpretationsthatarebuiltintothe operationsO5ofBLISS. WSOThelengthofa fullword,inbits,isgivenineachBLISSdi-QOalectbythe predeclaredliteral%BPVAL(bitspervalue),thatOO5is,16,32,or36for BLISS-16, BLISS-32,and BLISS-36,re-RO spectively.)Usingthisliteral,youcanexpresstherangeofaROfullwordvalueforeachoftheinterpretationslistedabovefor&O>all dialects,asfollows:S) ` Signedinteger,i:z Y-(2 ** %BPVAL-1)  Bi q (2 **E %BPVAL-1)-1Q{''bIn BLISS-16,for instance:h Y-(2 ** 15)  i  `(2 **15)-1 `O  OUnsignedinteger,i:h Y0  i  U(2 ** %BPVAL)-1 `O &OASCII character positions:Y2inBLISS-16Y(4inBLISS-32Y5inBLISS-36 ` 3Sequenceoflogical (Boolean)values:_h5Y%BPVAL `O OMemoryaddress:b88YFulladdressspaceofeachtargetsystemaKOA fundamentalruleofBLISSisthe following:,Theinter-OO pretationofafullwordvalueissuppliedbythecontextinKO5whichthefullwordvalueisused.+AgivenfullwordvalueMOcanhaveoneinterpretationinonecontextanda different/Ointerpretationinanothercontext.WLOInthisrespect,theBLISSlanguageissimilartomachineJOlanguageandis differentfrommost high-level languages.FO5BothBLISSandthe target-systemhardware interpretaOOvalue accordingtothe operationappliedtoit.,In contrast,MOmost high-level languages associateaspecificinterpretationLO>(or ``type'')witheachvalue, independentofitscontext.\LOTheBLISSrulefor interpretingfullwordvaluesallowsyouOOtoworkcloselywiththehardwareand, accordingly,towriteJO5more efficient programs.+Atthesametime,however,thisOOrulepermits programmingerrorstoariseasaresultofthe(Omisinterpretationofvalues.zROAsabasisforanexampleoftheinterpretationofafullword7Ovalue,considerthe following assignment:Oa X&=%-1_! 5OOThis assignmentsetsthecontentsofXtothetwo'scomple-QOmentrepresentationof-1;thatis,asequenceof%BPVAL1's.RO5Thetwo expressionsthatfollow interpretthecontentsofXinO differentways:O .X%LSS%4O{ .X%LSSU&4! MOBothofthese expressionsusea less-thanoperatortocom-ROparethecontentsofXto4.)Theyyield1or0 dependingonSO5whetherornotthecontentsofXislessthan4.'However,ac-2Ocordingtothe definitionsgiveninChapter5,the operatorsHO interprettheiroperandsin differentways,asfollows:*PmO! a ` LTheLSSoperator interpretsitsoperandsassignedintegerQ(values.(ItfindsthatthecontentsofXis-1andisthere-Mforelessthan4.) Accordingly,thevalueofthe expressionis1. `Y AYTheLSSUoperator interpretsitsoperandsasun-Isignedintegervalues.-ItfindsthatthecontentsofX7 isalargepositiveinteger(namely,(2 **L  %BPVAL)-1)andOcis thereforenotlessthan4.( Accordingly,thevalueofthe expressionis0.uKJOBecausethenegativenumberwasassignedtoX,itmightOObeassumedthattheuseroftheLSSUoperatoris incorrect.LO5Infact,however,both expressionsarevalid.+ThequestionQOofwhichiscorrectdependsentirelyonthe intentionsoftheO programmer.O3.1.2BFieldValuesTO4Afieldvalueisabitstringthatisshorterthana fullword.=OFieldvaluesareusedinthe followingways:"  ` LSomestoredvaluesare ``packed''andoccupyonlypartof(a fullword. ` HSomeBLISS operatorsandliteralshavevaluesthatcan8be representedinlessthan%BPVALbits.) POWheneverafieldvaluearisesduringprogram execution,itisMOextendedtobecomeafullwordandthenthe appropriatein-QO5 terpretationisapplied.)Therulesforthe extensionofvaluesOfollow.! "O3.1.3B ExtendingValuesUO4Afieldvalueisextendedtoafullwordvaluebyplacingasuf-ROficientnumberofbitsattheleftendofthegivenvalueto.Oprovideatotalof%BPVALbits. UQOThe following discussionofvalue extensionislargelyorientedIOtowardBLISS-16and BLISS-32,becausethetargetsystemsRO5forthesetwodialectsallow allocationofscalardatasegmentsJOinsmaller-than-fullwordunits.)Hence,thesedialectshaveJOanallocation-unitandanextension-attributethatcanbeIO>usedindata declarations.)AswillbeseeninChapters >5 />and O11,Ihowever,these syntacticfeaturesarecloselyrelatedtoMOfield-selectors,whicharecommontoallthree dialects.*ToPOHtheextent,then,thatfieldvaluescanariseinBLISS-36asLOwellasinBLISS-16and BLISS-32,the following discussion5Oisequally applicabletoall dialects.*-?*OZW?mCCOAvaluecanbeextendedintwoways,asfollows:   ` NUnsigned extensionusesazerobitforeach additionalbit. ` OSigned extensionusesacopyofthesignbit (leftmostbit)<ofthegivenvalueforeach additionalbit. YNOThekindof extensionis determinedineitheroftwoways.FOFirst,in BLISS-16/32,anextension-attribute (UNSIGNEDKO5orSIGNED)canbeincludedinthe declarationofadataOsegmentname(seeSection9.2).%Second,asign-extension-:Oflagcanbeusedinafield-selector(seeSection11.2).WhenRO>thekindof extensionisnot explicitlygivenbyan extension-IO attributeorasign-extension-flag,unsigned extensionis$Oassumedasthedefault.* P}?* ?)+ O BLISS-16/32ONLYNO4Asthebasisforsomeexamplesofvalue extension,considerJOthe following declaration,whichisvalidinBLISS-16orO BLISS-32: Oj OWN X:%BYTE%SIGNED, Y:%BYTE;r HHOSupposethecontentsofbothXandYareasfollows:F 11111111(binary)WIOThe declarationofXasSIGNEDimpliesthatthisvalueMOis-1,thatis,thetwo's complementinterpretationoftheMO5givenbitstring.-Ontheotherhand,the declarationofYIOasUNSIGNED(bydefault,sincenoextension-attributeisROgiven)impliesthatitscontentsis255,thatis,theunsigned6O>interpretationofthegivenbitstring.WIO(These declarationsareinvalidforBLISS-36becausetheHO target-system architecturedoesnotpermitstorageallo-QO5cationinunitsoflessthan%BPVALbits,thatis,lessthanLOa36-bitmachineword.+Fetchingandstoringoffieldval-MOuescanbe performed,however,throughtheuseofexplicitDO>field-selectors,as illustratedinalater example.)NKOThesigninterpretationscomeintoplaywhenthecontentsMOofXandYarefetched.,The evaluationof.Xusessigned>O5 extensiontoproducethe followingbitstring:h>11111 ...V 1111111111(binary)=JOThisisthetwo's complementrepresentationof-1repre-OOsentedin16bitsforBLISS-16or32bitsfor BLISS-32.*InKO5 contrast,the evaluationof.Yusesunsigned extensionto/Oproducethe followingbitstring:h>00000 ...V 0011111111(binary)&! QOThisistheunsignedrepresentationof255.' Therefore,thetwoNOresultsare different,andthe following expressionwouldbeHO5false(thatis,thelowbitwouldhavethevalue0):O .X%EQL%.Y bJOInBLISS-36aswellasBLISS-16and BLISS-32,youwouldOOobtain identicalresultsusingthe following analogoussetof/O5 declarationsandfetch operations: O OWN  X, I Y;1 5POThisdeclaresXandYasthenamesof fullword,scalardataOO segments.(Assumethatthe low-ordereightbitsofboththeseKO5 fullwordsare one-bits.,Thenthe followingfetch operationOO specifiesafetchofthe low-ordereightbitsoflocationX!O withsigned extension4F.)Upon evaluationthe expressionpro-OO>ducesthevalue-1,asintheexampleabove, representedinO%BPVALbits:O .X<0,8,1>0 ROIn contrast,the followingfetch operation specifiesafetchof6Othe low-ordereightbitsoflocationY# withunsigned extension ,=O5whichproducesthevalue255in%BPVALbits:O .Y<0,8,0>^F;! O3.2BDataSegmentsMOUDuringthe executionofaBLISSprogram,valuesarestored Oin datasegments:.*AdatasegmentconsistsofoneormoreLO addressableunitsofmemory.+Initssimplestform,adataJO^segmentcontainsasinglevalue.,Initsmore complicatedKOforms,adatasegmentcancontainmanyvaluesofvariousROlengths.'The differentkindsofdatasegmentscanbe classifiedOhasfollows:DataSegments(Scalars Structures!T Predeclared Structures2VECTOR Structures BITVECTOR StructuresBLOCK Structures!< BLOCKVECTOR Structures T Programmed Structuresi! ?MOAscalarsegmentcontainsasinglevalue,whereasastruc-IOturemaycontainanynumberofvalues.)Each predeclaredWO5 structureisapartofthe definitionofBLISS,anditisinvokedJObyusingoneofthe predeclared structurenames(VECTOR,AO BITVECTOR,BLOCK,or BLOCKVECTOR)inthedeclara-LO>tionofadatasegment.)A programmed structureisdefinedNObythe programmerandcanbeusedtoorganizethecontents-Oofadatasegmentinanyway. VfBO3.2.1B AddressableUnitsandUnitsperBLISSValueKO4Thethree target-systemfamilies supportedbyBLISSdifferMOinfourrespectshavingtodowiththeirstorage organiza-NOtionthataffectthesource-languagesyntaxand semanticsto>O=somedegree.'These differencesareasfollows: WO`1.:Maximum(oronly)``word''size,already describedasthe8(BLISSfullword consistingof%BPVALbits.A`2.:Smallestdirectly addressableunitofstorage.P`'3.:Numberof addressableunitsperBLISSvalue(thatis,per fullword).+`4.:Sizeofanaddressvalue.X .ROThebitsizeofthesmallest addressableunitisgivenbytheKO predeclaredliteral%BPUNIT(bitsperunit).,ItsvalueisFO58forbothBLISS-16andBLISS-32 byte-orientedtargetKOsystems;and36forBLISS-36 word-orientedtargetsystems. yOOThenumberof addressableunitsperBLISSvalueisthequo-LOtientof%BPVALover%BPUNIT.ThisvalueisgivenbytheOO5 predeclaredliteral%UPVAL(unitspervalue).(Itsvalueis2KOforBLISS-16(twobytesperPDP-11word),4forBLISS-32DO(fourbytesperVAX longword),and1for BLISS-36.E! MOThefinal differenceisthenumberofbitsrequiredforaHOmaximumaddressvalue,givenbythe predeclaredliteralJO5%BPADDR.Itsvalueis16for BLISS-16,32for BLISS-32,OOand18or30for BLISS-36, dependingonthesettingoftheKOEXTENDmodule-switch.((Thisvalueisusuallylesssignifi-YO>cantthantheothers,asitsutilityislimitedtocertainkindsofIO operationson addressesthatarenotcommonly required.) zQOTheliteralsjust describedareusedinthe subsequentdiscus-)Osionsof data-segmenttypes.! tO3.2.2BScalarsMO4InBLISS-16and BLISS-32,thestorageoccupiedbyascalar#Osegmentdependsonthe allocation-unitthatis associatedOOwiththesegment.(Theallocation-unitisgiveninthedecla-SO=rationofthenameofthesegmentandisoneofthe followingO keywords:"OLONG(for32bits) (zBLISS-32onlyO]WORD(for16bits) ](z] BLISS-16/32onlyOBYTE(for8bits) (z BLISS-16/32only#! NFOWhennoallocation-unitisgiven,WORDisassumedinHOBLISS-16andLONGisassumedin BLISS-32.&In BLISS-36,?O5onlyfullwordscalarsegmentscanbe allocated.$ xPOThekindof extensionusedwhenthevalueofadatasegment'Oisfetcheddependsonthe extension-attribute (BLISS-16/32RO5only)thatis associatedwiththesegmentorthefield-selectorLO associatedwiththefetch operation.)Theextension-attribute0Oisoneofthe following keywords:%v`.OUNSIGNED(forunsigned extension)O]SIGNED"](forsigned extension)&uLOWhennoextension-attributeorfield-selectorisgiven,un-)Osigned extensionisassumed.'! WMOTheextension-attributedoesnotaffecttheamountofstor-UOageusedforadatasegment.'ItsonlyeffectisonthewaytheOO5valueisextendedto%BPVALbitswhenitisfetched.+ItisQOvalidtogiveanextension-attributewithafullworddataseg-UOment,butthe attributehasnoeffectsincethevalueisalreadyO>%BPVALbitslong.(zqNOThe followingisanexampleofthe declarationofascalarOsegment:Oa OWN%X;)WMOThis declaration describesasegmentthatis allocatedper-LOmanentlybefore executionbegins(becauseitisOWN),thatOO5isnamedX,thatisascalar(becausenostructure-attributeMOisgiven),thatoccupiesafullword(becauseno allocation-OOunitisgiven),andthatusesunsigned extension(becauseno*O>extension-attributeisgiven).* NPOThefeaturesofadatasegmentcanbe illustratedinadia-ROgram.(Inthe following,the declarationofXisgiventogetherEO5withthediagramforthe correspondingdatasegment:+| OO DeclarationDiagram OObOWNX;b2360X15,b(%BPVAL) O}, WNOThisdiagram representsadatasegmentinasimpleandab-VOstractway;thatis,itdoesnotshowthespecificlayoutoftheOO5dataintermsofthebyte boundaries(where applicable),bitLO sequences,and addressesofstorage.*Amoredetailednota-"Otionis introducedin2Chapter11.'Thediagram representsthe%O>datasegmentasfollows:*,2O- N`1.:Theaddressofthedatasegmentisgivenintwoforms.J(Thefirstformisan (arbitrarilychosen)integer,2360,Gusedbythehardwaretolocatethesegment.+Thesec-Mondformisthename,X,thatisusedbytheprogramto"2 designatethesegment.P`2.:Thestorageis representedbyaboxfollowedbyaparen-H thesized expression.'The expressionshowshowmanybits,cofstoragethebox represents.T`3.:Thecontentsofthedatasegmentisgivenasaliteral,15,P:writteninsidethebox.(Itisthispartofthediagramthat4changesasprogram execution proceeds..NQOInthisexample,thevalueofXis2360(theaddressoftheQOdata segment),whereasthevalueofXis15(thecontentsofO5thedata segment)./O BLISS-16/32ONLYJO4The precedingexample describesascalarthatoccupiesaKO fullword.)Examplesofscalarsthat,inBLISS-16orBLISS-?O32,occupyawordandabyteareasfollows:0 OO DeclarationDiagram O%ObOWNY:WORD;n1000Y28,b(16)%OOWNZ:BYTE;2440Z18 L(8) Ox1NGOInthese examples,eachdatasegmenthastheUNSIGNEDMOextension-attributebydefault.(Thusthevaluesfetchedfrom1O5Yareintherangefrom0to(2 @**"516)-1,andthevalues@OfetchedfromZareintherangefrom0to(2 **8)-1.2eHOAnexampleofascalarthathastheSIGNED extension-O attributefollows:3~ OO DeclarationDiagram O-ObOWNR:SIGNEDBYTE;3002R-5 Cb(8) O}l4B9OThevaluesfetchedfromRrangefrom-(2 g**7)through O(2 **F7)-1.,ThusalthoughRandZ(inthe precedingpara-MO5graph)bothoccupyeightbitsofstorage,theirvaluesare=O interpreted differentlywhentheyarefetched.y5 OLOForthepurposesofthe following discussions,inBLISS-36LOscalar data-segment declarationscanbethoughtofashav-PO5inganimplicitallocation-unitof%UPVALvalue(thatis,oneHO addressableunitper segment),andanimplicitUNSIGNEDO extension attribute.6! #O3.2.3BVECTOR Structures;O4Avector structureisasequenceofscalarA4 elementsq4.-The'Onumberofelementsisthe  extent.ofthevector,andisgivenasLOpartofthe declarationofthesegmentname.)TheelementsRO=are numbered,with0forthefirstelement,1forthesecond,Oandsoon.7! WLOEachelementofavectorhasthesameallocation-unitandKOextension-attribute.*This informationcanbegivenaspartSO5ofthe declarationofthevector.)Iftheallocation-unitisnotSOgiven,thedefaultisthesameasforscalarsegments (fullwordOO allocation).)Iftheextension-attributeisnotgiven,unsigned6O> extensionisassumed(where applicable).X8..OAnexampleofavectorfollows:9 OO DeclarationDiagram O-ObOWNA: VECTOR[3];5440A[0]28Cb(%BPVAL)mA[1]5C(%BPVAL)mVA[2]133CV(%BPVAL) Oq: YMOThis declaration describesasegmentthatstartsataddressQO5440andisnamedA.The declarationgivestheextentoftheOO5vectoras3andsothevectorhasthree elements.*Thedec-LOlarationdoesnotgiveanallocation-unit,soeachelement Ooccupiesa fullword.*; POA particularelementisselectedbya bracketed subscriptex-NO pression.'SupposethatthecontentsofadatasegmentnamedLO5INDis3,andconsiderthecontrastbetweenthe followingO expressions:< OO ExpressionValue OJOb A[.IND-2] 5440+%UPVAL9(theaddressofthesecondelement)O .A[.IND-2] "53v(thecontentsofthesecondelement) O=O BLISS-16/32ONLYMO4Anexampleofa declarationthatgivesbothallocation-unit,Oandextension-attributefollows:> OO DeclarationDiagram OObOWN%B: OVECTOR[3,WORD,SIGNED];b46046B[0]15Zb(16))B[1]3Z)(16)B[2]4Z(16) O? aMOThis declaration describesasegmentthatstartsataddressMO46046andisnamedB.ItissimilartothesegmentnamedFO5A, describedinthe preceding paragraph.0However,theKOallocation-unitisgiven explicitlyasWORD,and thereforePOeachelementofthevectoroccupies16bits.+ItfollowsthatLO>thevectoroccupiesonlysixbytesofmemory.) Furthermore,KOtheextension-attributeisgiven explicitlyasSIGNED,andUO therefore,thefetchedcontentsofanelementofBissubjecttoOHsigned extension.c@99OAnexampleofavectorofbytesfollows:A  OO Declaration Diagram O0ObOWNC:VECTOR[4,BYTE];221C[0]7 Jb(8)oC[1]7 J(8)oVC[2]2 JV(8)oC[3]4 J(8) OBNOOThisdatasegmentisavectoroffourelementsandoccupiesKOfourbytesofmemory.+Sinceanextension-attributeisnot5O5given,UNSIGNEDisassumedbydefault.^C! V4&O3.2.4B BITVECTOR Structures O4A4 bitvector structure:14issimilartoavector structure.&However,KO bitvector structuresaredesigned especiallytohandlebitROstrings,andeachelementofa bitvector structureisasingleO=bit.fD<1605,andsoon./H KOIn BLISS-36,wherethe structureisentirely containedinFOoneword,the references STATUS[0]and STATUS[8]des-RO5ignatethe low-orderbitandtheninthbit``fromtheright,''NO respectively,ofword1604.'(Notethat bit-position numberingNOinBLISSis consistentacross dialects:*bitnumbersincreaseWO>fromlowordertohighorder,``righttoleft,'' regardlessofthe/O target-systemhardware convention.)I! MONeitheranallocation-unitnoranextension-attributecanbeKOusedwith BITVECTOR.(Thenumberof addressableunitsal-OO5locatedisthesmallestnumberofunitsthatcan accommodateNOthegivennumberofbits.)(WhenthecontentsofanelementROofabitvectorisfetched,unsigned extensionisalwaysused.6J "O3.2.5BBLOCK Structures O4A4 block structure4isasequenceof 4 components4.)TheblockasIOawholehasaname,whichisdeclaredusingtheBLOCKLOstructure-attribute.)In addition,each componentofablock?O=hasitsownname.,Ablockisdeclaredwitha= sizej=and,in&OBLISS-16and BLISS-32,ant allocation-unit.(Thesizespec-MOifiestheamountofstoragerequiredfortheentireblock.POGTheallocation-unit determinestheunitsinwhichthesizeisMO measured.*Thedefaultallocation-unitisthesameasfora?Oscalarsegment declaration (fullword allocation).K! WQOThe individual componentsofablockcanhave differentsizes.LOThewayinwhichthesizeofeach componentis specifiedO5isgivenin5Chapter11.25Forpurposesofthepresentdiscus-UOsion,itis sufficienttostatethatthesizeis determinedwhenIOtheprogramiswrittenandcannotchangeduringprogramO> execution.*KOL gNOObservethatablockdiffersfromavectorintwoways.+AROblockislessflexiblethanavectorbecause,innormalusage,NO5thenameofablock componentisgiven explicitlywhentheMOprogramiswritten,whereasthe subscriptofavectorele-IOmentcanbe calculatedduringprogram execution.*OntheSO>otherhand,ablockismoreflexiblethanavectorbecausetheLO componentsofablockcanhavevarioussizes,whereastheDOelementsofavectormustallhavethesamesize.uMKKOAnexampleofaBLOCK structure,using BLISS-32,follows:N OO DeclarationDiagram OEObOWNITEM:BLOCK[ITEMSIZE,BYTE];33300 ITEM[FLG]f0(2)ITEM[N1]w235(14)V ITEM[LOC]f17(32) OqOMOThis declaration describesasegmentthatstartsataddressJO33300andisnamedITEM.The declarationgivesthesizeLO5oftheblockas ITEMSIZE.Thediagramshowsthatthein-MOdividual componentsareFLG(twobits),N1 (fourteenbits),HOandLOC(32bits).,BecauseITEMSIZEmustbethetotalOO>numberofbytesused,thediagramimpliesthatthevalueof"OITEMSIZEshouldbe6.P NROTheaddressofa componentoftheblockiswrittenexactlyasOOitappearsinthediagram.(Considerthecontrastbetweenthe!O5 following expressions:Q OO ExpressionValue OEOb ITEM[LOC]33302(theaddressofthethird component)DO .ITEM[LOC]17(thecontentsofthethird component) O0R! (O3.2.6B BLOCKVECTOR Structures O4A 4 blockvector structure4isasequenceof4 elements4(asisavec-LOtor structure),buteachelementconsistsofablock.-The'Onumberofelementsisthe extent(ofthe blockvector,andisMO=givenaspartofthe declarationofthesegmentname.*TheSOelementsare numbered,with0forthefirstelement,1fortheOsecond,andsoon.SgLOEachelementofa blockvectorisasequenceof componentsQO(asisablock).)Each componentisascalarandhasitsownJO5name.) Therefore,the combinationofthe blockvectorname,POthe subscriptofanelement,andthenameofa componentis0Ousedto designateasinglevalue.Ta,OInadditiontotheextent,anT element-size/and,ifBLISS-16Oor BLISS-32,an allocation-unit'aregiveninthedeclara-NO5tionofa blockvector.)The element-size specifiestheamountSOofstorageforeachelement(thatis,theblocksize),andtheKOallocation-unit determinestheunitsinwhichtheelement-OO>sizeis measured.)Thedefaultallocation-unitisthesameasMOforascalarsegment (fullword allocation).*Thestoragere-ROquiredfora blockvectoristheproductofitsextentanditsOH element-size.U! YGOAnexampleofa BLOCKVECTOR structure,using BLISS-36,Ofollows:wVKM OO DeclarationbDiagram OObOWN"Q:OBLOCKVECTOR[2,QS];bb6000 Q[0,FLAG]5 Lb(8))Q[0,VAL]62,)(28)Q[0,PTR]0,(36) Q[1,FLAG]25 L(8)Q[1,VAL]78,(28)Q[1,PTR]23,(36) O,W rOOThe declarationofQgivestheextentas2andtheelementPOsizeasQS. Accordingtothediagram,eachelementhasthreeLO5 components,FLAG,VAL,andPTR.SinceQSmustbetheto-LOtalnumberof fullwordsusedbyeachelement,thediagram;OimpliesthatthevalueofQSshouldbe2.XNOSupposethatthecontentsofadatasegmentnamedIis0,MOandconsiderthecontrastbetweenthe following expressions:Y OO ExpressionsValue O6Ob Q[.I+1,FLAG]6002(addressof component)6O .Q[.I+1,FLAG]25 (contentsof component) OZ a'O3.2.7B Programmed StructuresKO4The predeclared structures discussedinthe precedingsec-OOtionsprovidethedata structuresusuallyrequiredforsystemIO programming.*Toprovideforotherdata structures,BLISSGO=hasafeature,the STRUCTURE declaration,thatpermitsPOyoutodesignanduseyourowndata structures.'Thisfeature&OofBLISSis describedinChapter11%ewhere,in addition,eachJOG predeclared structureisdefinedintermsofa STRUCTUREO declaration.*ZO?4"[! (O3.3B CharacterSequenceDataNOUTherepresentationof characterdatadiffersamongthethreeQOBLISSdialectsduetobasic architectural differences.(InspiteVOofthese differences,itispossibletothinkabout characterdataSO^inasingle,uniformwaythatappliestoallBLISStargetsys-JOtemsand,more importantly,towriteBLISSprogramsthatOObehavethesamewayandgivethesameresultsonallBLISSPOhsystems,eventhoughtheresultsareachievedin significantly-O differentwaysatobjectlevel.X\.HOTheBLISSfeaturesforhandling characterdatainthisKOcommon(thatis,transportable)wayinvolvesomenewter-LO5minologyandasetofspecialcharacter-handling functions;9Othesefeaturesare describedindetailinChapter20.*\PO ] WNOTherepresentationof characterdataand,in particular,se-NOquencesof charactersis describedhereintwoways.*First,NO5 character sequencesare describedinageneralwaythatin-OOcludesonlytheaspectsthatarecommontoallBLISStargetNOsystems.(Second,therepresentationof character sequencesisDO> described specificallyforeachBLISStargetsystem.^ V`3O3.3.1BGeneral CharacterRepresentationMO4Loosely speaking,a charactersequenceislikeavectorofMO characterdata elements.(Thisanalogymaybeusefulinun-HO derstandingthe following descriptionofBLISS character4O= sequences.'(FullerdetailisgiveninR=Chapter20.)*^RO _ N OA charactercode?isasequenceofbitsthat representsachar-MOacter.+UsuallytheASCIIencodingof charactersisusedinO5BLISS.n` D OA characterposition<2isthestorageforasingle charactercode.POForagivenimplementationofBLISS,thesizeofa characterQO5positionis determinedbytwofactors:'the requirementsofthe?O charactercodeandthe organizationofstorage.a!  OA' characterpositionsequence/isaportionofstoragethatisLOusedforoneormore character positions.+SuchasequenceO5hasa&5 first 5ands5 last=5 position.'Foreachpositionexceptthefirst,Othereisa previous: position,andforeachpositionexcepttheOlast,thereisa\ next  position.bW OA" characterdatasegment.isa characterpositionsequenceROthatis allocatedasasingleportionofstorage.+Inthesim-SO5pler applicationsof character handling,itispossibletotreatLOeach characterdatasegmentasaseparateunit, containingMOacomplete characterpositionsequenceand allocatedinthe/O>samewayasotherdata segments.c Y OA characterpointer6isavaluethat designatesa characterNO position., Sometimesa characterpointerissettothefirstMO5 characterpositionofasequenceandremainsthere,provid-ROingaccesstotheentire sequence.(Inothercases,a characterTOpointerisusedtoscanbackandforthina sequence, selectingNO>onepositionafteranother.*A characterpointercanbecor-MOrectly interpretedonlybyacharacter-handling function.)It Ooccupiesa fullword.Sd! ) OThe lengthCofa characterpositionsequenceisthenumberofPO character positionsinthe sequence.'Thelengthofasequence O5is 5 notJ+5includedaspartofthesequenceitself.*Tofullyspec-TOifya characterposition sequence,bothitslengthandapointerQOtoitsfirstpositionmustbegiven.) Typically,the parametersNO>ofthecharacter-handling functionsoccurinpairs,alength#Ofollowedbyapointer.e 0O3.3.2B CharacterSequence OperationsOO4Thebasic operationsof characterhandlingarethe allocationTOofstorage,creationofapointer,movingofapointer,fetchingNOorstoringofa charactercode,and comparisonof characterLO= sequences.(Allthese operationsmustbe performedbymeansOOofthespecificcharacter-handling functionsprovidedforthisLOpurpose.+Forexample,thecontentsofa characterpositionOGmustalwaysbeG fetched GorG stored%Gbymeansofa characterMOpointerthat designatesthe character position.*In contrast,OOa characterpointercanbefetchedorstoredlikeanyotherPOQfullwordvalue(bymeansofthefetch-operator( . )orthe)O assignmentoperator( = )).fKO Returningtotheanalogywithavectorof characterdataKO elements,the followingcorrespondencescanbe established:gs ` JA charactercode correspondstothecontentsofanele- (mentofthevector. ` HA characterposition correspondstothestorageforan#elementofthevector. ` HA characterpositionsequence correspondstoacontigu-Ioussequenceofelementsofavector (possiblybutnot,1 necessarilytheentirevector). ` AA characterdatasegmentisthecompletevector. `/ F/A characterpointer correspondstotheaddressofan#elementofthevector.ih??OThisanalogyisinexactinthe followingways:i ` IA characterpositionneednot correspondtoanaddress-"(ableunitofstorage. ` EA characterpointerisnotsimplyanaddressvalue.jbOOAs describedbelow,theseconsiderationsapply specificallytoO BLISS-36.Nk `$4O3.3.3BBLISS-16 CharacterRepresentationMO4InBLISS-16therearetwo character positionsper fullword.MO Charactersare allocatedinstoragewiththeleftmostchar-MOacterofthesourcestringinthe low-order(or rightmost)NO= characterpositionofthefirstoronly fullword.+ AdditionalNO fullwordsorbytesare allocatedin ascendingaddressorder.HOForexample,thesource characterstringABCDEFGHwould%OGbe allocatedasfollows:l  ODiagram Ob7000b/BA/rb(16)7002/DC/r(16)V7004V/FE/rV(16)7006/HG/r(16) O.m! IONotethattheeight-characterstringABCDEFGHcanappearQOonlyinthecontextofaPLIT(atypeofprimary expression)QO5becauseastringliteralitself,asaprimary expression,can-QOnotexceedthecapacityofa fullword:'two character positionsOin BLISS-16.'(SeeChapter4.)'TheBLISS-16representationMO>isrelatedtothegeneralBLISSrepresentationof character!O sequencesasfollows:*mlOn HV ` 8A charactercodeconsistsofeightbits. `O ;OA characterpositionisabyteofstorage. ` GA characterpositionsequenceisa contiguoussequenceH'ofbytesofstoragewith successive characters,consid-Neredfromlefttoright, containedin successivebytesfrom'lowertohigher addresses. `W LWA characterdatasegmentisalsoa contiguoussequenceofbytesofstorage. `/ ?/A characterpointeristheaddressofabyte.Oo `%4O3.3.4BBLISS-32 CharacterRepresentationNO4InBLISS-32therearefour character positionsper fullword.MO Charactersare allocatedinstoragewiththeleftmostchar-MOacterofthesourcestringinthe low-order(or rightmost)NO= characterpositionofthefirstoronly fullword.+ AdditionalNO fullwordsorbytesare allocatedin ascendingaddressorder.HOForexample,thesource characterstringABCDEFGHwould%OGbe allocatedasfollows:py ODiagram Ob36014b/DCBA/(32)36018/HGFE/(32) Oq! mIONotethattheeight-characterstringABCDEFGHcanappearQOonlyinthecontextofaPLIT(atypeofprimary expression)SO5becauseastringliteralitself,asaprimary expression,cannotQOexceedthecapacityofa fullword:(four character positionsinO BLISS-32.'(SeeChapter4.)*qlOr MOTheBLISS-32representationisrelatedtothegeneralBLISS?Orepresentationinthesamewayasin BLISS-16.cs `94O3.3.5BBLISS-36 CharacterRepresentationJO4InBLISS-36therearefiveASCII character positionsperKOfullwordorsixSIXBIT character positions.) CharactersareQO allocatedinstoragewiththeleftmost characterofthesourceNO=stringinthe high-order(or leftmost) characterpositionofPOthefirstoronly fullword.) Additional fullwordsare allocatedKOin ascendingaddressorder.*Forexample,theASCIIstring6OGABCDEFGHwouldbe allocatedasfollows:t{ ODiagram Ob21005b/ABCDE/(36)21006/FGH/(36) O/u! IONotethattheeight-characterstringABCDEFGHcanappearQOonlyinthecontextofaPLIT(atypeofprimary expression)QO5becauseastringliteralitself,asaprimary expression,can-ROnotexceedthecapacityofa fullword:'five character positionsOin BLISS-36.'(SeeChapter4.)'TheBLISS-36representationMO>isrelatedtothegeneralBLISSrepresentationof character!O sequencesasfollows:*ulOv \ ` 8A charactercodeconsistsofsevenbits. `O NOA characterpositionisa7-bitfieldofa36-bitwordofmemory. `' G'A characterpositionsequenceisa contiguoussequenceGof character positionswith successive charactercodes,L consideredfromlefttoright, containedinadjacent7-bitP1fields beginningatanyofthefive character positionsinaIwordand continuingtoward positionsinthelowerorderPpartofthewordandthentothehighorder7bitsofthe#:nextword,andsoon. ` KA characterdatasegmentisa contiguoussequenceof36-bitwords. ` JA characterpointerisaspecial36-bitvaluethatcon-Isistsofbothaddressandpositionandsize information/C describingthe character position.Vw,@b(In DECsystem-10 terminology,a characterpointerKisabytepointerthat,whenusedastheoperandofanGILDB (incrementandloadbyte) instruction,willfetchFlthe charactercodevaluefromthe indicated character position.)x$O3.4BStorage OrganizationIOUDuringthe executionofaBLISS-compiledobjectprogram,0Ostorageconsistsofthe following:9yStorage+(StorageforthegivenprogramTThestackTThe registers*T2Storageforthefirstmodule+TStorageforthesecondmodules ...)T<StorageforthelastmoduleOtherstoragezNOOTheotherstorageincludestheroutinesanddataoftheop-JOeratingsystem,therun-timeroutinesforBLISS,andtheCO5storageforprogramsotherthanthegivenprogram.{ QOThestack,the registers,andthestorageforeachmoduleare2O describedinthe following sections.|! $O3.4.1BTheStackLO4Thestackisusedtostore temporarydata associatedwithOOthe executionoftheroutinesinaBLISSprogram.(ThestackOiscomposedofk frames7k.*Uponentrytoaroutine,aframeisOO=pushedonthestackforusein executingthatroutine.)UponPOreturnfromtheroutine,theframeispoppedfromthestack.NOAstackframecontainsdatasegmentsoftwokinds.(SomeofHOGthedatasegmentsaredeclaredasLOCALor STACKLOCAL.LOSuchsegmentsaredirectly accessiblefromtheprogramandNOareusedforvaluesthatareneededonlyduringtheexecu-SOQtionoftheroutineinwhichtheyare declared.'TheotherdataLOsegmentsare allocatedbythecompilerandarenotacces-KOsiblefromtheprogram.*ThesesegmentsareusedforsuchOOZvaluesasthereturnaddressoftheroutineortheinterme-NOdiateresultsthatareproducedduringthe evaluationofanO  expression.} NFOThe declarationofLOCALand STACKLOCALnamesisde-OscribedinChapter10.1Therelationbetweenaroutineand0O5thestackisfurther describedin5Chapter12.*}OG*}OtQ~! V'O3.4.2BThe RegistersPO4The registersofBLISS correspondtothegeneral registersofMOthe target-system hardware.'Eachregistercontainsonefull-SOwordvalue.(Eachofthe registersis consideredtobeasingleO=datasegment. WOOTheuseof registersisnormally determinedbythe compiler,ROnottheprogram.'Accesstoaregisteruseslesstimethanac-OO5cesstoordinarystorage; therefore, registersareoftenusedPOtostorethe intermediateresultsand addressingindicesofaJO calculation.+Underspecialcircumstances, registerscanbe%O>accessedbytheprogram. ZBOThe declarationofregisternamesis describedin.Section10.7.*.F?1O3.4.3BStorageforaProgramModule*O4AmoduleusesfourkindsofU4 programsections4.)EachkindofCOprogramsectionhasaspecialpurpose,asfollows:!  `  AnU OWNprogramsection)containsadatasegmentforH(eachnamethatisdeclaredOWNinthemodule.(SuchaKdatasegmentis permanently allocated.'Itcanbeaccessed?onlyfromthemoduleinwhichitis declared. `Y  YA"$Y GLOBALprogramsection)YcontainsadatasegmentforHeachnamethatisdeclaredGLOBALinthemodule.'SuchI adatasegmentis permanently allocated.*Itcanbeac-Nccessedfromthemoduleinwhichitisdeclaredandinany?moduleinwhichitsnameisdeclared EXTERNAL. `:  :A #: PLITprogramsection/P:containsadatasegmentforeach&PLITusedinthemodule. `  A & CODEprogramsection)pcontainsacodesegmentfor=keachroutinethatisdeclaredinthemodule.! JOYoucanleavethe managementofprogramsectionstotheLO compiler;andinthatcaseeachmodulewillhavenomoreQO5thanoneofeachkindofprogramsection.&Ontheotherhand,QOyoucanspecifyseveralprogramsectionsofthesamekindforIOamoduleandcan determinewhichdatasegmentsorrou-QO>tinesare allocatedinwhichprogram sections.'ThedivisionofPOstorageforamoduleintosectionspermitsthe operatingsys-HOtemtomanagestorage effectively.+Forexample,anOWNMOHsectionneedbepresentonlywhenits associatedmoduleisJObeing executed,whereasaGLOBALsectionmustbepresentIOmore frequently.(Foranotherexample,thePLITandCODELORsectionsarenotmodifiedduringprogram executionandcan:O thereforeberegardedas read-onlystorage.qGFOThe declarationsofOWNandGLOBALsegmentnamesare!O describedinSectionsE10.1 andSection10.2.mThe definitionofO5PLITsisgivenin5Section4.4.,5The declarationofroutinesisO describedin Section12.3.*E?N*?b*}?* P?'!# #^O4.2BNumeric-LiteralsKOUAnumeric-literalisusedto representaspecificnumber.POAnintegervaluecanbewritteninanyoneoffourradices:IObinary,octal,decimal,or hexadecimal.,Aspecial-purposeOO^wayof representinganintegeristhecharacter-codeliteral,KOwhich representstheASCIIcodeforagiven characterasLOatransportable,fullwordvalue.*Afloating-pointvaluecanOOhbewritteninsingleordouble precision.(WherevertheradixROforaBLISSliteralisnotgiven,theradixisassumedtobeLOdecimal.*Thismanualfollowsthesame convention;thatis,LOrwhereveranumberappearsinthetextwithoutanexplicitgetsystem.( Therefore,the predeclaredname%BPADDRhasMOa differentvalueforeachBLISS compiler:)16in BLISS-16,JO32in BLISS-32,and18or30 (dependingonthetarget-HOHsystem environment)in BLISS-36.)The predeclaredliteral#Onamesare describedinSection14.1.5.*c?oMEO4.2.1BSyntax.O4SYNTAX:4ClicktodisplaySyntax.*OO5 KOSomeofthenumeric-literalsarecomposedoftwolexemes.NO Specifically,inaninteger-literal,theradix indicator(%B,IO<%O, %DECIMAL,or%X)isalexemeandthe remainderisOOanother;andinafloat-literal,the precision indicator(%E,LO%D,%Gor%H)isalexemeandthe remainderisanother.KOEThe quoted-stringinanumeric-literalcanbesuppliedby*Ocertainlexical-functions(seerSection15.5).*ra?  OA printing-character9SisanyASCII characterwhosecode,i,isOintherange33  i T126 (decimal).*A printing-character-O5 except-apostrophe95isanyprinting characterexceptanapos-Otrophe.)The apostrophe3istheASCII characterwithcode39O (decimal). OThe blank?istheASCII characterwithcode32 (decimal). OThe tab>}istheASCII characterwithcode9 (decimal). ]O4.2.2B RestrictionsMO4Thedigitsinaninteger-literalmustconformtotheradixLO specifiedbythekeywordatthe beginningoftheliteral.GO Dependingonwhetherthekeywordis%B,%O, %DECIMAL,RO=or%X,thedigitsmustbebinary,octal,decimal,or hexadeci-Omal.NJOAspacemustnotappearinanumeric-literalexceptbe-GOtweenthelexemesofa two-lexemenumeric-literal(seeO5Section4.2.1).*O? NOOWhenanumeric-literal(otherthanafloat-literal)isevalu-[Oated,itsvalue,i,mustfitina fullword;thatis,itmustlieinO5therange~ -(2 I** (%BPVAL-1))  i ' k(2 ** (%BPVAL-1))-1! s OSeeSection3.1.1=forthe definitionof%BPVALforeachtargetOsystem.*F?D TOWhena float-literalis evaluateditsvalue,x,mustfitintheJOtargetsystem'smachinerepresentationofafloating-pointKO5value.'Themaximum approximatevaluerangeofxforeach1O target-systemfamilyisasfollows:Yk L/ ` For BLISS-16:0.29 * C(10 **-38) abs(x)  51.7 * (10 /** z38) `O OFor BLISS-32:0.84 $[* IO(10 [**O-4932) OiOabs(x) ^O0.59(10 **4932) `' 'For BLISS-36:0.56 3* A'(10 3**'-308) '%'abs(x) ' T'0.9 3* '(10 O3**'308) }QOThelistedvaluerangesofxreflect%Dfor BLISS-16,%Hfor,O BLISS-32,and%Gfor BLISS-36. wHO Dependingonthecompilerused,float-literalscanpro-JOducevaluesthatoccupyuptofour fullwords; therefore,JO5float-literals producingvaluesthatoccupymorethanone;OfullwordmustappearineitheraPLIT(seeySection4.4)-oran!Oinitial-attribute(see3Section9.6).*yP|?*3|?hROThe relationship,by compiler,offloat-literalsto fullwordsisOasfollows:c9 OO Float-literal0Size (fullwords) Obkeyword 0b32 b36 b16 @%E 01 1 2 @V%D 0V2 V2 V4 @%G 02 2 - @I%H 0I4 I- I- OdL"O4.2.3BDefaultsQO4Thedefaultforthesignofanumeric-literalisaplussign;O( + ).(Forexample,thenumeric-literal%O S' 777 'Misequiva-Olentto%O '+777 ' . NSOThedefaultradixisdecimal;thatis,whenasequenceofdig-QOitsappearswithoutaradixkeywordandwithoutquotes,itis.O5assumedtobeadecimal-literal. O4.2.4B SemanticsOO4Adecimal-literalis interpretedasthedecimalrepresentation!Oofanintegervalue. WNOAninteger-literalbeginswithakeywordthat determinesitsROinterpretationbygivingtheradixoftheliteral.' DependingonFO5whetherthekeywordis%B,%O, %DECIMAL,or%X,theTOsequenceofdigitswithinthequotesis interpretedasabinary,OOoctal,decimal,or hexadecimalrepresentation, respectively,ofO>anintegervalue.WOOThevalueofacharacter-code-literalistheintegerthatisHOtheASCII charactercodeforthequoted-character.*WhenMO5two apostrophesareusedasthequoted-character,thevalueQOoftheliteralisthe charactercodeforasingle apostrophe;4Othatis,thecharacter-code-literal%C''''~hasthevalue39O> (decimal).cHOThe evaluationofanumeric-literalproducesanintegerTOvalue.*Iftheliteralhasaminussign,thenitsvalueisrep-IO5resentedasanegativenumberintwo's complementform.QOThe evaluationofa%E float-literalin32and36producesa-Odialectspecificfullwordvalue.W W-)O LimitationsonFloat-LiteralsMO4Notethatvalues requiringmorethan%BPVALbitsfortheirJOrepresentationcannotbestoredinafullwordandcannotNObedirectlyoperateduponbyanyoftheBLISS operatorsorO>executable-functions. }KOExceptforafewbuilt-inmachine-specific-functions,BLISSROdoesnotprovide facilitiesfor operatinguponany float-literalQO5assuch.(Float-literalsareprovidedinBLISSinordertofa-OOcilitatethe developmentofspecialdatasegmentsandspecial@Oroutinesfor performinghigh-precision arithmetic.k#:!$wO4.3BStringLiteralsJOUAstring-literalcontainsasequenceofASCII characters.NOThevalueofthestring-literalisobtainedbyencodingtheOOsequenceof charactersinoneofseveral differentways,de-NO^pendingonthe string-typeoftheliteral(thatis,%ASCII,#O%ASCIZ, %RAD50_11,%P). QOAstring-literalwhosevalueoccupiesonefullwordorlesscanNObeusedasaprimary,thatis,canappearanywherethataHO5primary expressionisallowed.+Thenumberof charactersROthatcanbeencodedinafullwordvarieswithboththetarget*Osystemandthe string-type(kSection4.3.2).vExamplesare:Ok %ASCII'AB'k !in%any&dialectO %ASCII'ABCD'' !in% BLISS--32&or& BLISS--36O %RAD50_11'ABC'' !in% BLISS--16&or& BLISS--32OB %RAD50_11'ABCDEF'B !in% BLISS--32&onlyO %RAD50_10'ABCDEF' !in% BLISS--36&only*k?POIneachofthese examples,thequotedstringisencodedintoJOonefullwordorlessineachofthedialects specified.g=LOAstring-literalwhosevalueoccupiesmorethanafullwordNOisnotaprimary expressionandcanbeusedonlywithina O5PLIT expression(seeX5Section4.4)'5orinaninitial-attributeO(seeSection9.6).Anexamplefollows:*X~?*P|?qG '1Acompletelistoferrorsfollows: u'NLOTheencodedvalueofthisstring-literal, consistingof34LO character positions,occupiesmuchmorethanafullwordonO5anytargetsystem.AO4.3.1BSyntaxH S Ostring-literal y8 yw< y:4 string-typenothing V9 Vw= V;^ quoted-stringO string-type y68 y> y< y~> y:%ASCII7%ASCIZ%ASCIC%ASCID  %RAD50_11m %RAD50_10%SIXBIT %P v69 v> v= v~> v; (J16/32 /(J/16/32 |(J|36Only (J36Only (J16/32O quoted-string y ' <8 <  : aquoted-character;a... nothing <9 =  ; * 'Onquoted-character yM8 y< y :.,$printing-character-except-apostropheyblank tab  '' M9 =  ; O A printing character9? isanyASCII characterwhosecode,i,isO1 intherange33 1  1 i 1 T1 126 (decimal).*A1 printing-character-O except-apostrophe9 isanyprinting characterexceptanapos-O trophe.)The apostrophe3 istheASCII characterwithcode39O:  (decimal). OThe blank?istheASCII characterwithcode32 (decimal). OThe tab>}istheASCII characterwithcode9 (decimal).NJOSomeofthestring-literalsarecomposedoftwolexemes,JOthe string-typeandaquoted-string.+Spacesare permitted%O5betweenthetwolexemes.{MOThe quoted-stringinastring-literalcanbe constructedby@Ocertainlexical-functions,whichare describedin(Chapter15.IO5A quoted-string constructedinthatwaycanbecomposedKOofanysequenceofASCII charactersand thereforeisnotDO restrictedtoprinting characters,blanks,andtabs.*(OINPOThe quoted-stringinastring-literalcanalsobesuppliedbyNOanotherstring-literal.*Thisfeatureismainlyusefulinthe4O5designofmacrosandis discussedino5Section 15.3.2.2.*o?2! O4.3.2B RestrictionsPO4A quoted-stringisasinglelexeme.)Asthesyntaxshows,theLO quoted-stringcancontainblanksandtabs.(These charactersQOare interpretedas charactersinthestring,notas charactersPO=thatdividethe quoted-stringintoseverallexemes.'Asidefrom'Oblanksandtabs,noother spaces(asdefinedinSection2.2.2)DOcanappearinthesourcetextforaquoted-string.*Y?M #UOAstring-literalthatisnota plit-stringinaPLITorinitial-KO attributemustfitinone fullword.)With%ASCID excepted,SO5specific limitationsonstringlengtharegiveninthe following0Otable,bydialectand string-type:/  OODialect7/MaximumNumberof CharactersinFullword<0ASCIICASCIZ-ASCIC(RAD50_11SIXBIT#RAD50_10P OKOBLISS-162113L-- 3 1O/BLISS-324336L/-- 97 1OBLISS-3654--L66 - O O+1)mGPlusoptionalsign character Om~O BLISS-16/32ONLYGO4A%ASCICstring-literalmustcontainnomorethan255Oquoted-characters.v LKOA %RAD50_11string-literalcancontainonlythe charactersUOAthroughZ,0through9,blank,period( . ),anddollarsignRO5( $ )inthequoted-string.( Lowercaseletters appearingintheHO quoted-stringareencodedasthe corresponding uppercaseOletters.NNOA%Pstring-literalmustcontainonlythedecimaldigits(0SOthrough9)exceptforanoptionalinitialsign(+or-).)ThereHO5mustnotbemorethan31digitsinthequoted-string. tOBLISS-36ONLYKO4A %RAD50_10string-literalcancontainonlythe charactersYOAthroughZ,0through9,blank,period( . ),dollar( $ ),andPOpercent( % )inthequoted-string.' Lowercaselettersappear-KO>inginthe quoted-stringareencodedasthe correspondingO uppercaseletters.m@OA %SIXBIT string-literal may contain any quoted--O charactersexceptthe following:g= OO CharacterSymbolASCIICode O ObTab vb9OAccentgrave v96OVOpenbrace V{ vV123OVerticalbar | v124OIClosebrace I} vI125OTilde ~ v126 ONHOThe parenthesizedASCIIcodesareindecimal.+ LowercaseKOletters appearinginthe quoted-stringareencodedasthe,O5 corresponding uppercaseletters. SOOther restrictionsonthelengthofstring-literals(ifany)are;Ogiveninthe appropriateBLISSusermanual.O4.3.3BDefaultsNO4Thedefaultforthe string-typeis%ASCII.Forexample,theOstring-literal 9' iabc '$(is equivalentto%ASCII v' abc ' K.ROThedefaultforthesignina%Pstring-literalis``+''.*For+Oexample,thestring-literal%P ' 2 ' 6is equivalentto%P ' +2 i' .eV;O4.3.4B SemanticsHO4Eachquoted-characterinastring-literal representsoneIO charactercodeinthevalue.)Aprinting-character-except-RO apostrophe,ablank,oratab representsitself.)Asequenceof>O=two apostrophes representsasingle apostrophe.c9IOA%ASCID string-typeissimilartoa%ASCIItype;how-NOever,%ASCIDdiffersinthatitcreatesastring descriptorKO5forthequoted-string,andexpandstotheaddressoftheKOdatasegmentthatcontainsthe descriptor.+ThestringandNOits descriptorare allocatedinaPLITprogramsection(seeO>Chapter18),B1>andjustasthevalueofaPLITistheaddressPOofthe plit-body,thevalueof%ASCIDistheaddressoftheO descriptor.*OO vLLOThe%ASCIDstringcreatesthe following descriptorformats:BOFor BLISS-32:f O=Notethat= only7k=theBLISS-32implementationof%ASCIDis+O compatiblewithXPORTstrings.iKKLp8p@|8D`@D@@@@@ h@<@0`0@@@@>@@@@@D@D|p@88@ @H`0H@(ULc]@(LSҔ@$DQ^I@|DQBI@ DQRI@ ELdY @@0ͩcLH$ I H^Q$HBHQ$HR0 kLI3)@H&I@8^J$y H@J$I1BOFor BLISS-36:* Ni $KKL8p>D DD`D D D"8p?         9u̙BԜ) iB5I !rႼ@ !J@I )JI &a@ @ @    ?     @ @$ @@$ B I)Cid F(B/$ H(B!$ I(C)$ ƢB&,  p    ?8CxdD9D D CxBOFor BLISS-16:HO=ThisformatfollowsthePDP-11Extended InstructionSetNO guidelines.)NotethatthestringlengthmustbeanunsignedBO16-bitquantityintherange0to65535decimal.6Op KKL        1g Ss JS$iȅ QT$/(E QT$!(EJST$)Ȇ5fSd&@@`j,dd2L&`$"H"$"H"$2L"`,,d"" I3)@H&I@8^J$y H@J$I1l BGOThe remainingsemantic descriptionusesthe generalizedOterms< characterposition and'x characterpositionsequence B.NO5Themachine-specific equivalentsofthesetermsaregiveninOSection3.3.(SeealsoIChapter20.)*OP|?[*IPO  fTOThevalueofastring-literalis determinedinseveralsteps,asOfollows:AxC`1.:For string-types%ASCIZand%ASCIC,augmentthe5(stringofquoted-charactersasfollows: Ja.:If%ASCIZ,addatrailingnull character(ASCIIcodeY(0)tothestring.Ib.?If%ASCIC(16/32only),countthe charactersintheDY quoted-stringandusethis(8-bitinteger)countasJYYtheinitial characterofthestring, precedingthefirstYquoted-character.J`12.:Encodethe characterstring, augmentedasrequiredbyPstep1, accordingtothe string-typeanddialect,asfollows: ! Iv @a.:Forstringtypes%ASCII,%ASCID,and%ASCIZ,@Y(forma characterpositionsequencethathasoneEY characterpositionforeach characterinthestring.DYForBLISS-16and-32,usethe8-bitASCIIcodeofFY2theith characterasthevalueoftheith characterCY position.*For BLISS-36,usethe corresponding7-bitJYASCIIcode.(Forrules governingthefillingofthelast&Y<unitofstoragereferto<Section4.4.4.Hb.?For string-type%ASCIC(16/32only),formacharac-MYterpositionsequenceasinstep2.a,butusetheinitialEYlcount charactervalueasisforthefirst characterY position.ADc.?For string-type %RAD50_11(16/32only),extendEYtheoriginal quoted-stringwithenoughtrailingblankGY characterstomakeupamultipleofthree characters,AYNif necessary.+ThenuseRadix-50encodingtoformCYa characterpositionsequencethathastwocharac-JYter positionsforeachgroupofthree charactersintheDYWstring.+If necessary,extendthe resulting characterBYpositionsequencewithenough trailing, zero-valuedMY  positionstofillthefinal(oronly)fullwordoccupiedbyYathe sequence.Ed.:For string-type %RAD50_10(36only),useRadix-50IY9 encodingtoformafullwordforeachgroupofsix(orEY fewer)quoted-charactersinthestring.'Thisencoding?Y alwaysproducesoneormorecomplete fullwords.Ii e.?Forstringtype%SIXBIT(36only),forma characterGY positionsequencethathasone(6-bit) characterposi-HY tionforeach characterinthestring.'UsetheSIXBITIYs code equivalentoftheASCIIcodeoftheith characterLY asthevalueoftheith character position.'If necessary,EY$ extendthe resulting characterpositionsequencewithIY} enough trailing, zero-valued positionstofillthefinalthecontentsofadatasegment,as describedin>Section9.6.OO Otherwise,thecompiler incorporatesthevalueofthestring-=Oliteralintheobjectcodeitis generating.*!P?*}?"$#&mO4.4BPLITsMOUAconstantvaluethatrequiresnomorethanafullwordofLOstoragecanbe representedbyanumeric-literalorstring-UOliteralthatstandsalone(thatis,isnot containedinaPLIT).MO^Aconstantvaluethatrequiresmorestoragemustberepre-OsentedbyaPLIT.! yUOThevalueofaPLITisnotthevalueofthegivenconstantbutPOrathertheaddressofadatasegmentthatcontainsthegivenQO5 constant.'ThedatasegmentforaPLITis allocatedinaPLITOOprogramsection,anditis initializedtothegivenconstant4Ovaluebeforeprogram executionbegins. a1OTherearetwokindsofPLITS.TheT counted~PLITbeginswithQOthekeywordPLIT,whichstandsfor ``Pointerto literal''.'TheRO5datasegmentforthiskindofPLITbeginswithanextrafull-#Owordthatcontainsthe count.pforthePLIT.ThecountistheNOnumberof fullwordsinthePLIT excludingthefullwordused=O>forthecount.'ThesecondkindofPLIT,the> uncounted>PLIT,GObeginswiththekeywordUPLIT,whichstandsfor``un-SOcountedpointerto literal.'''ThedatasegmentforthiskindofAOHPLITdoesnotincludeafullwordforthecount.oMEO4.4.1BSyntax.O4SYNTAX:4ClicktodisplaySyntax.*OO#O4.4.2B Restrictions2OAn appropriatepsect-declaration(seeSection18.1)mustbethrough(2 I**>16)-1.! O4.4.3BDefaultsQO4Whenno``REP replicatorOF'' constructisgiven,a replicator$Ovalueof1isassumed.! ~O4.4.4B SemanticsRO4APLITcausesconstantdatatobe allocated.'ThevalueoftheROPLITistheaddressofthefirst addressableunitofthedataMO specifiedbythe plit-items.)Thecompiler determinesanad-WO=dressoffsetforthePLIT,andthelinkerbindsthisoffsettoanOabsoluteaddress.U! +POIfthePLIThasthekeywordPLITand thereforeisacountedLOPLIT,thenthecountislocatedinthefullword precedingPO5thedata specifiedbythe plit-items.)Thecount indicatesthe?Onumberof fullwordsoccupiedbythePLITdata.! aMOInthesimplestcase,aPLITisjustthekeywordPLITorKOUPLITfollowedbya parenthesizedlistofplit-expressionsTO5or plit-strings.)Inthiscase,valuesoftheitemsarelaidoutMOinstorage,startingatthePLITaddressand continuinginJOthe directionof increasing addresses.-ThevalueofeachPO>plit-expressionoccupiesa fullword.'Thevalueofeachstring-LOliteraloccupiesasmany character positionsasthestringOO requires,withunused character positionsadded,if necessary,.OHtofilloutthefinal fullword. O BLISS-16/32ONLYLO4Whenanallocation-unitispresent,it specifies explicitlyLOtheunitofstoragetobeused., DependingonwhethertheFOallocation-unitisLONG,WORD,orBYTE,thevalueofOO>eachplit-expressionoccupiesa longword,aword,orabyte,PO respectively.( Similarly,thevalueofeachstring-literaloccu-POpiesasmanybytesasthestring requires,withunusedbytesTOGadded,if necessary,tofilloutthelastunitofstorage.+(TheMOallocation-unitLONGandthelongwordstorageunitapplytoOBLISS-32only.)Y /POWhenanallocation-unitisgiven,theitemoritemstowhichLOitappliesareenclosedin parentheses.-Several allocation-QO5unitscanbeusedinasinglePLIT;foranygivenitem,theBO innermostallocation-unitistheonethatapplies. ! NOWhenbothapsect-allocation attributeandanallocation-unitROofstorageareusedinaPLIT,theycanappearinanyorder.O5Forexample:)O PLIT&PSECT(%$OWN$%)&BYTE(7) JOThe psect-name($OWN$intheexample) specifiedintheIO attributemustbeeither predeclared,adefaultprogram-LO5sectionname,or explicitlydeclaredina precedingpsect-KO declaration.*Thepsect-allocation attributeprovidesamoreHO convenientwayofmakingprogram-section assignmentsforQO>aPLITthanispossibleusingthepsect-declarationalone(seeOSection9.8).*OZ|?WROWhena ``replicatorOF'' constructispresent,it specifiestheNO repetitionofthe plit-groupthatfollowsit.,The plit-groupNO5is evaluatedbeforeitis repeated..Thus,ifthe plit-groupGOcontainsanembeddedPLIT,theembeddedPLITisallo-ROcatedonce,anditsaddressisusedineach repetitionoftheO> plit-group.L "LOThe evaluationofPLITsis performedbythe compiler,theGOlinker,andthe operatingsystembeforeprogramexecu-LO5tion.(Thusduringprogram execution,aPLIT representstheCOconstantaddressofasequenceofconstantvalues.V ,NOWhenthevalues specifiedbyaPLITdonot completelyfillROthelastfullwordofthePLIT,thevaluesoftheunusedchar-KO5acter positionsare undefined.+AprogramthatattemptstoAOaccesstheunused character positionsisinvalid. LOPLITsarenot necessarily allocatedintheorderinwhichKOtheyarewritten,andunusedstoragemaybeleftbetweenNO5thestorageforonePLITandthatforthenext.* Therefore,OOtherelative positionsoftwoPLITsare undefined.(AprogramSOthatdependsontherelative positionsoftwoPLITsisinvalid. O4.4.5B PragmaticsQO4Aplit-expressionisnot restrictedtonumeric-literals.(ItcanKObeanylink-time-constant-expression,andcan thereforein-IOcludeaddress-valuednameswhosevalueis establishedatIO=linktime.&Supposethe following declarationsaregiven: O OWN  A:% VECTOR[10], R B;O EXTERNAL  X;zMOThen,withinthescopeofthese declarations,the followingOPLITcanbeused:Oa UPLIT(A[4],%B+2,&X)NLOThisPLIToccupiesthree fullwords.+ThefirstcontainstheNOaddressofthefifthelementofA.ThesecondcontainsthePO5addressBplus2.'ThethirdfullwordcontainstheaddressX.A &$')O4.5BNamesKOUAnameusually designatestheaddressofaroutineoraKOdatasegment.*Thevalueofsuchanameis determinedbyLOthe compiler,linker,and operatingsystem together.)WithinNO^thescopeofagiven declarationofaname(asdefinedinOSection8.2,<thevalueofanamedoesnotchangeduringOprogram execution.*Oz?AO4.5.1BSyntax O0name 8 < O:slettersdollars  underscore 9 = O; P8 P> P< PW> P: \8 < ,:;letterdigitdollar$ underscore \9 = ,;...nothing v9 v> v= vW> v;Oletter n)hA!|!B!|!C!|!---"|!Z)ha!|!b"|!c"|!---!|!z oOdigit f)X0!|!1!|!2!|!---"|!9 UgO dollar  $O underscore _JOAnamecanbe constructedbythe%NAMElexical-function,O describedinSection15.5.4.-)Aname constructedinthiswayJOIcanbecomposedofanysequenceofASCII charactersandCO thereforeneednotsatisfythesyntaxgivenabove.*?$ wO4.5.2B RestrictionsKO4Anamemustnotbemorethan31 characterslonginanyOcase.u.OThereserved keywords,listedinAppendixA,mustnotbeOusedasnames.*FOr vLLOAnameisasinglelexemeandmustnotcontainaspace.fPOThedollar characterisreservedforuseinsoftwaresuppliedObyDIGITAL.O BLISS-16/36ONLYMO4NamesdeclaredasglobalorexternalmustbeuniquewithinNOtheirfirstsix characters (throughouta program),toassureOcorrectlinking.+ O4.5.3B SemanticsJO4Whentwonamesare compared,the distinctionbetweenup-NOpercaseand lowercaselettersisignored.)Thusthe followingOOitemsare consideredtobefour instancesofthesamename:J  BETAbetaSBetaHbEtaNKOThis equivalencealsoappliesto keywords.+TheonlyplaceMOwherean uppercaseletteris distinguishedfroma lowercase+O5letterisinaquoted-string.`Ucausesthe executionofaroutine.)ThecalledSOroutinecanbeapartofthesamemodulethatcallsitoritJOcanbepartofanothermoduleinthesameprogram.+TheMO^routinecanbewritteninBLISSorinsomeotherlanguage7Othatis supportedbythetargetsystem. `MOThe executionofaroutinecanhavetwokindsofeffects.ROFirst,itcan calculateavaluethatisreturnedasthevalue8O5ofthe routine-call.(Second,itcanhave5 sideeffects\5;thatis,itNOcanperformactionsotherthan returninga calculatedvalue,MOsuchas modifyingdata, performing input/output,andsoon.TO>The expression``X=F( )''callstheroutinenamedFbutdoesOOnotpassany arguments.'ThevaluereturnedbyFisassignedOtolocationX. HOThe following expressioncallstheroutinenamedPandPOpassesthree arguments:(thevalue5,thecontentsoflocation7O5X,andtheaddressofanASCIIstring:'O P(5,&.X,%UPLIT('MESSAGE'));sIIOThevaluereturnedbyroutineP,ifany,isnotused.! ZDOAcomplete descriptionof routine-callsisgiveninLChapter12.*LFOt*)+ )O4.9BField-ReferencesKOUAfield-referencecan designateanyportionofstorageofPOupto%BPVALbitsinlength.+Thatis,it designatesafieldQOvaluethatcanrangeinsizefromonebittoa fullword.*InPO^ BLISS-32,forexample,thefieldcanbeasequenceofuptoMO32bits., Normally,afield-referenceisusedonlywithina Ostructure-declaration. ! [EOThefull descriptionoffield-referencesisgiveninKChapter11.* KFO}-,/ t#O5.1BOperator-ExpressionsLOUThenotationusedfortheoperator-expressionsofBLISSisLOsimilartothenotationof mathematics.)Theterms``opera-UOtor'', ``operand'',and``associativity''thatareusedindescrib-NO^ingBLISS expressionsarealldrawnfromthe terminologyofO mathematics.O5.1.1BSyntaxKO4The followingsyntaxdiagramgivesthemanyformsoftheKOoperator-expression.)TheformsaredividedbybrokenlinesOinto prioritylevels,andan  associativityisgivenforeach;O=prioritylevel.&This informationisusedin&=Section5.1.3..OSYNTAX:4ClicktodisplaySyntax.*&?#*OO[KOEveryoperator-expressionhasoneofthe followinggeneralOforms:R((prefix-operator right-operand_55 left-operandinfix-operator^ right-operandNOTheoperandsmustbe expressionsandtheoperatoriseither:Oakeywordorasingle delimiter character. 4O5.1.2B RestrictionsLO4Anoperator-expressionmustnothaveanoperandthatisaNOcontrol-expression.)This restrictionis expressedinthesyn-,Otax(intherulethatdefines F e1 and L e2%),butisrepeatedhereLO=for emphasis.'Forexample,the followingoperator-expressionOisnotvalid:8O X&=%IF%.ALPHA&EQL%0&THEN%.X1&ELSE%.X2NMO Parenthesescanbeusedtoavoidthis restriction,bycon-GOvertingthe right-operandtoacompound-expression(seeO5Sections 58.1 5and5 5.1.5.1).*g?j*?t OA prefix-operator7mustnot immediatelyfollowaninfixorOOprefixoperatorthathasahigher priority.)Forexample,the$O5 followingisnotvalid:O .A%EQL%NOT&.B  QO Parenthesescanbeusedtoavoidthis restriction,byconvert->Oingthe right-operandtoacompound-expression. !N7OTheresultofan arithmetic operation( *",/,MOD,+,and-)ROmustnotexceedthecapacityofasigned fullword;ifitdoes*O5so,theresultis undefined."HOThevalueoftherightoperandofamodulus(MOD)or;Odivision( / )operatormustnotbezero.N# V$O5.1.3BDefaults O4The#4 defaultparenthesization,t4foroperator-expressionsisde-SOterminedbytheprioritylevelsandassociativitiesgivenintheLOsyntaxdiagramforoperator-expressions.'The followingrulesO=apply: $! O`1.: Parenthesizethe operatorsofagiven expressioninorderO(of descending priority.(Thatis,first parenthesizeallfetchH operators(highest priority),then parenthesizeallpre-Ofix``+''and``-'' operators(secondhighest priority),thenH2continueinthismannerthrough operatorsof decreasingK priority,andfinally parenthesizeall assignment operators(lowest priority).I`c2.:Ifan expressioncontainsseveral occurrencesofop-Feratorsthathaveagiven priority,then parenthesizeKthose operatorsintheorder indicatedbythe associativ-Rlity.*Ifthe associativityforagivenprioritylevelis``leftKtoright'',then parenthesize operatorswiththatpriorityXfromlefttoright;ifthe associativityis``righttoleft'',then.v parenthesizefromrighttoleft.%! LOWhenanoperatorisparenthesized,the parenthesessurroundLOtheoperatorandtheoneortwooperandsrequiredbythe"O5 operator.'Forexample:O 3*R(B)-2*.A+12&NMOThis expressioncontainsfour operators,andtherearemanyIOwaysinwhichitcouldbe explicitlyparenthesized..The?O5defaultparenthesizationisobtainedasfollows:'! ?P`1.:Thefetchoperatorhasthehighestpriorityandisparen-3(thesizedfirst,givingthe following: 3*R(B)-2*(.A)+12K`-2.:Ofthe remaining operatorsinthe expression,thetwo&multiplication operators( e*.)havethehighestpriorityand<are parenthesizednext,givingthe following:c (3*R(B))-(2*(.A))+12O`3.:The remaining operators(-and+)areusedasinfixop-K:erators.'These operatorshavethesameprioritylevelandMso associativitymustbetakenintoaccount.&Sinceassocia-Stivityis``lefttoright''forthese operators,the subtractionODoperator( - )is parenthesizedfirst,givingthe following:  ((3*R(B))-(2*(.A)))+12M`H4.:Finally,the remainingoperator( + )isparenthesized,!givingthe following:"& (((3*R(B))-(2*(.A)))+12)( }QOThisfully parenthesized expressionis equivalenttotheorigi-,Onal,unparenthesized expression.) OOObservethat,intheexamplejustgiven,the routine-callisOOtreatedasasingle constructbecauseitisacompletepri-O5mary.+Thatis,3 @*)5R(B)is parenthesizedas(3 @*5R(B))ratherOthan(3 T*ByR)(B).Structure-referencesandfield-referencesareAOtreatedasasingle constructinasimilarway.|*R7OExplicitparenthesizationis discussedinSection5.1.5.1.**F?t+MXO5.1.4B Semantics>O4Anoperator-expressionis evaluatedasfollows:,=`1.:Evaluatethe operand(s)ofthe expression.P`O2.: Calculateavalue accordingtothespecificrulesforthegiven operator.{-QQOThevalueobtainedinstep2isthevalueofthe expression..OOIngeneral,theorderinwhichtheoperandsofan operator-=O expressionare evaluatedisnotdefined.'(SeeSection 5.1.5.2.)*.?z/ NIOTheorderinwhich assignment expressions,routine-calls,NOandcontrol-expressionsare evaluatedis,however,definedasO5follows:0KOEvery evaluationofan assignment expression, routine-call,KOorcontrol-expressionintheleftoperandofan operator-IO5 expressionis completedbeforeany evaluationofanas-FOsignment expression, routine-call,orcontrol-expressionKOintherightoperandoftheoperator-expressionisbegun.JO>(The consequencesofthisorderingruleare discussedinOSection 5.1.5.2.)*0OZ?zK1!KOThevalueofeveryBLISS expressionisafullwordvalue.MOItfollowsthatthevalueoftheoperandsofan operator-KO5 expressionarefullwordvaluesandthatthevalueofthe>Ooperator-expressionitselfisafullwordvalue.2! VMOInsomecases,anoperator-expressionproducesavaluethatQOcannotbe representedasafullwordvalue.(Insuchcases,theOO5valueofthe expressionis undefinedandtheprogramisin-ROvalid.'Thereisno guaranteethatsuchanoverflowisdetectedOor signaled.3 OOThe remainderofthis descriptionof semanticsisdevotedtoOOspecificrulesforthevariousoperator-expressions.'Theoper-NO5ator expressionsaregrouped accordingto function,buttheyOOare nevertheless describedintheorderinwhichtheyappearTOinthesyntaxdiagram,thatis,inorderof decreasing priority.4%O5.1.4.1CFetch ExpressionsSO)Afetch expressionobtainsthevaluethatisstoredatagiven?Oaddress.'The expressionhasthe followingform:O .&e25 WMOTheoperandofafetch expressioncanbeafield-referenceTOthathasafield-selector;inthatcasethefetch expressionhasPO5aspecialinterpretation.)However,theuseofafield-selectorKOoutsideofastructure-declarationisnot recommended.)ForUOthatreason,theeffectofafield-selectoronafetch expressionO>is describedin]>Section11.2.*5]?)6_MOAfetch expressionwithoutafield-selectoris evaluatedasOfollows:7 "eO BLISS-16/32ONLY`[1.:If *[ e2C[isthenameofa data-segment,then determineitsHallocation-unitandextension-attributefromitsdeclara- tion.+If   e2>Q isanyother expression,thenusethedefaultCdallocation-unit(WORDfor BLISS-16,LONGforBLISS-@32)anduseUNSIGNEDasitsextension-attribute.'`<2.: Interpretthevalueof < e2)a<asanaddress.+ Dependingon+whethertheallocation-unitof / e2isLONG,WORD,orJBYTE,fetchthecontentsofthe longword,word,orbyteGFatthataddress.'(LONGandlongwordapplytoBLISS-32only.)T`3.:Ifthevaluefetchedinstep2isafieldvalue(lessthanJv%BPVALbitslong), interpretitasasignedorunsignedGvalue dependingontheextension-attribute.+Iftheat-J'tributeis UNSIGNED,thenextendittoafullwordvaluePbyplacing0'sattheleftend.(Ifthe attributeisSIGNED,Jextendittoafullwordvaluebyplacingcopiesofthe51 left-most(sign)bitattheleftend.R`4.:Usethefullwordvalueobtainedinstep3asthevalueof! thefetch expression.K8!OBLISS-36ONLY'`[1.: Interpretthevalueof [ e2*e[asanaddressandfetchthe9contentsofthefullwordatthataddress.R`32.:Usethefullwordvalueobtainedinstep1asthevalueof!thefetch expression.9,O5.1.4.2CPrefixSign ExpressionsPO)Aprefixsignsuppliesthe algebraicsignforagivenvalue.6OThe expressionhasthe followingforms:b:(8 On + - o e2`;66OThe expressionis evaluatedasfollows:<! rc ` NIftheoperatorisaddition( + ),thenthevalueofthe(( expressionisthevalueof j( e2 (. ` QIftheoperatoris subtraction( - ),thenthevalueoftheL expressionisthenegative(two's complement)ofthevalue Yof .Y e2 xY.= x$O5.1.4.3CShift ExpressionLO)This expressionperforms operationsbasedonthe arithmeticQOshift instructionofthetargetsystem.(The expressionhastheO followingform:O_ e1%^&e2Y>/MOThis operationcanbe explainedintermsofa hypotheticalUOshiftregisterthatisvalidforallBLISS dialects.(Theregister O5has 5 n 15bit positions,where 5 n/?5is16,32,or36 dependinguponGOthetargetsystem (%BPVAL).The positionsarenumberedQOstartingattherightwithposition0(the low-order position)PO>andendingwithpositionn-1(thesign position),referredtoObelowasposition  m .!?NMOToevaluatean arithmeticshift expression,placethevalue Oof e1<intheshiftregisterandletthevalueof  e2becalled \ v2 .O5Proceedasfollows:.@ S`1.:If , v2(is positive,moveeachbit / v2# positionstotheleft.M(Whenabitismovedoutofthesign position,m,discardSit.'Whenabitismovedoutofposition0,putazero-bitinposition0.`Y2.:If (Y v2.Yiszero,donotmoveanybits.`3.:If * v2.is negative,moveeachbitABS(  v2J) positionstotheL1right.*However,donotmodifythebitinpositionm(theLsign position).)Whenabitismovedoutofpositionm-1,Pputacopyofthesignbitinpositionm-1.)Whenabitis4:movedoutofposition0,discardit.AMOWhentheshiftis complete,usethecontentsoftheshift?Oregisterasthevalueoftheshift expression.*BNO Sometimesan arithmeticshiftisusedforscaling;thatis,OOtomultiplyavaluebyapowerof2.,Forthat application,MO5the followinginterpretationofan arithmeticshiftismoreO appropriate:CA`1.:Let e v1 and r v29bethesignedvaluesoftheoperandsand+( calculatethe followingvalue:|D{R bv b1 1b hb(2b bv ?b2)_E55"bInthis expression,2 n**/bv2means``2tothepowerv2''.V`2.:Iftheresultofstep1isnotaninteger,reduceittotheJ:nextsmallestinteger.*Forexample,reduce2.5to2andreduce-2.5to-3.Q`3.: Representtheresultofstep2asasigned,two'scomple-Gkmentbinaryinteger.,IftheresultrequiresmorethanG%BPVALbitsforitsrepresentation,someofthehigh-:orderbitsoftherepresentationarelost.F! NQOThisinterpretationisentirely equivalenttotheinterpretationYOintermsofashift register;itisjustanotherwayoflookingatO5thesame operator.GeJOExamplesof arithmeticshift operationsaregivenintheO followingtable:TH * OOv1v22 ** v2vv1 * @(2 **v2)Qv1^v2 Oob102b440 b40O-1024-40 -40oV10-20.252.5 V2O-10-20.25-2.5 -3 OMI! W#ROAllthevaluesinthistablearedecimalnumbers.'ObservethatOwhen / v2Fis positive,the arithmeticshiftperforms multiplica-*O5tionbyapowerof2.)When I5 v25isnegativeand 5 v1U5is positive,DOtheshiftperformsdivisionbyapowerof2.(When l v2 and w v1POareboth negative,theshiftperforms somethingcloseto,butDO>notquitethesameas,divisionbyapowerof2.pJLF*O5.1.4.4C Arithmetic ExpressionsKO)Themultiplication, division, addition,and subtractionex-HO pressionsperformthe operationsofordinary arithmetic.IOThemodulus(MOD) expressionobtainsthe remainderofa@O3 division.'The expressionhasthe followingform:K O^e1 8 w< : * / ]MOD + - 9 w= ; ^e2~LTOOThevaluesoftheoperandsare interpretedassignedvalues,POandtheresultis representedasasignedvalue.,Ifthere-QO5sultisoutsidetherangeprovidedbyasigned fullword,thenPOthe expressionisinvalidandthevalueofthe expressionisO undefined.M OLet v1 Jand  v2>Vbethevaluesofthe operands.)The expression%Ois evaluatedasfollows:^N! 4 ` .Ifthemultiplicationoperator( *&R)isused,thenmultiply  v1 (by >( v2E(andusetheresultasthevalueofthe expression. ` VIfthedivisionoperator( / )isused,thenproceedasfollows:KO! !a.:If  v2Fiszero,the expressionisinvalidandthevalueof)Y(the expressionis undefined. b.? Otherwise,divide  v1 ?by  v20.'Iftheresultisnotaninte-IYger,dropits fractionalpartwithoutrounding(sothatEYY2.8becomes2and-2.8becomes-2).)Usetheresult.Yasthevalueofthe expression. `1 I1Ifthemodulusoperator(MOD)isused,thenproceedasfollows:P ya.:If  v2Fiszero,the expressionisinvalidandthevalueof)Y(the expressionis undefined. b.? Otherwise,divide  v1 Bby  v2,.'Dropthe fractionalpartofIYthevalue(sothat2.8becomes2.0and-2.8becomes-YY2.0).=c.?Multiplythevalueobtainedinstepbby  v2 G.?Wd.:Subtractthevalueobtainedinstepcfrom QW v1Wanduse;Ytheresultasthevalueofthe expression. `/ D/Iftheadditionoperator( + )isused,thenadd 7/ v2 /to / v1 e/and@usetheresultasthevalueofthe expression. ` LIfthe subtractionoperator( - )isused,thensubtract T v2`from ` v1E`andusetheresultasthevalueofthe expression.QNGOTheMODoperatoristhe remainderofthedivisionof  v1 Oby v2D .-Anaidto understandingtheMODoperatoristheO5 following identity:kRA$(v1MODv2)EQL(v1-v2 *(v1/v2))S iPOSomeexamplesofthedivision( / )andmodulus(MOD)oper-Oationsfollow:T O$Ov1v2v1/v2vv1MODv2 O ob10 o10 O-19 OK-19 b3 z-3 7 zK-7 b3 -3 -2 K2 b1 1 -5 K-5 o13 o13 o_13 o13 2 8 z_10 z16 6 1 _1 0 1 5 _3 13 OUNLOThelastfourexamplesshowhowtheMODoperatorisusedUOtoobtainthelastdigitofthebinary,octal,decimal,andhex-,O5adecimalrepresentationsof13.V*O5.1.4.5C Relational ExpressionsMO)A relational expressionisusedtocomparetwovalues.+The0O expressionhasthe followingform:jW@ Oe1 8 > < W> : EQL!|!EQLU"|"EQLAYNEQ"|!NEQU!|!NEQALSS!|!LSSU"|"LSSALEQ!|!LEQU"|"LEQAAGTR"|!GTRU!|!GTRAGEQ"|!GEQU!|!GEQA 9 > = W> ; \e2XQOTheinterpretationoftheoperatoritselfis determinedbytheAOfirstthreelettersofthe operator,asfollows:Y]OEQLIisequalto!O]NEQ>isnotequaltoOLSSYislessthan,OPLEQIislessthanorequalto OGTR>isgreaterthan/ODGEQ>isgreaterthanorequaltoZIOTheinterpretationoftheoperandsis determinedbythe9Ofourthletteroftheoperatorasfollows:%[ ONofourthletter:9K Interpretoperandvaluesassignedvalues.SO]FourthletterisU: Interpretoperandvaluesasunsignedvalues.ROFourthletterisA: Interpretoperandvaluesasaddressvalues.G\! ROIfthevaluesoftheoperandsatisfytherelation specifiedbyWOthe operator,thenthevalueofthe relational expressionis``1'';WO5 otherwise,itis``0''.(Inbothcases,thevalueis representedasOafullwordvalue.] kxGOInbothBLISS-16and BLISS-32,the operatorsLSSUandFOLSSAare equivalent,asareGTRUandGTRA,LEQUandJO5LEQA,andGEQUandGEQA.Thatis,theunsignedandad-LOdressformsofthe magnitude sensitive relational operatorsHOare equivalent.,In BLISS-36,however,the operatorsLSSIO>(signed)andLSSAare equivalent,asareGTRandGTRA,POandsoon.-Thisreflectsa differenceintherangeofvalidIOaddressvaluesallowedbythe correspondingsystems.,TheGOH distinctionbetweenthesigned/unsignedandtheaddressMOformsofthe operatorsisprovidedsothat programmerscanQOspecifythedesiredinterpretationofthevaluesbeingoperatedFORon,inbothanexplicitanda transportablefashion.^`LONotethatallformsoftheEQLandNEQ operatorsarebyMOnature equivalentinall dialects;theunsignedandaddressKO5formsareprovidedforsymmetrywiththeother relationalJO operators discussedabove./Useofthe alternateformsis2O encouragedforthesakeofclarity.u_KKOTwoexamplesoftheuseof relational expressionsfollow:` OO ExpressionValue OOb-1LSS0bb1(true)!O-1LSSU00(false) OaIOAsanotherexample,considerthe followingprogramfrag-Oment: Oa OWN  X,  Y; O9 ...O X&LSSA%YbNOThevalueoftherelational-expressioninthisexampleis1NO(true)becauseXis allocatedatasmalleraddressthanY.c'O5.1.4.6CBoolean ExpressionsPO)ABoolean expressionisusedtoapplyaBoolean operationtoFOgivenvalues.'The expressionhasthe followingforms:dONOTe2 OQe1 8 k< : AND *OR wXOR EQV 9 k= ; Qe2eNOOEachofthese expressionsoperatesonthe individualbitsofROtheoperandstoproducethe individualbitsoftheresult.(The,O5specificrulesareasfollows:f  ` TIftheoperatorisNOT,thentheithbitoftheresultisob-9(tainedfromtheithbitofthevalueof #( e2( accordingtothe followingtable:g t e2NOT b0110  `| P|Ifthe expressionhastwo operands,thentheithbitoftheGresultisobtainedfromtheithbitofthevalueof  e1 and+-theithbitofthevalueof o- e2'- accordingtothe followingtable:h  #e1e2ANDrORXORmEQV b00b0001010110V10V0110111101 i mNOThe appropriateruleisapplied%BPVALtimes,onceforeachObitintheresult. jNPOBooleanlogicappliestosinglebitswhileBLISSalwaysoper-KOateson fullwords.* Thereforespecial precautionsaresome-FO5timesrequiredin programmingBooleanlogicinBLISS.ck+9NOForexample,ifAisthenameofaBooleanvariablewhoseTOvalueisalways0or1,andthenegationofthecontentsofALO5mustbeassignedtoanotherBooleanvariablenamedB,you1Omighttrythe following assignment:O B&=%(NOT%.A);lNLOHowever,this assignmentdoesnotproduceaBooleanvalue.JOInstead,itseffect (assumingaBLISS-32 fullword)isasO5follows:m O*OContentsofAContentsofB O Ob04b 11111111111111111111111111111111(binary) O14 11111111111111111111111111111110(binary) OZn0ROThe low-orderbitisthedesiredBooleanresult,buttheotherUObitsclutteruptheresult.(ToassignaBooleanvaluetoB,the>O5 high-orderbitscanbemaskedoutasfollows:$O B&=%((NOT%.A)&AND%1); or B%=&.A&XOR%1;o*O5.1.4.7C Assignment ExpressionsQO)An assignment expressionisusedtostoreagivenvalueataKOgivenaddress.&Theformofthe expressionisasfollows:O e1%=&e2up KHOTheleftoperandofan assignment expressioncanbeaMOfield-referencethathasafield-selector;inthatcasetheLO5 assignment expressionhasaspecialinterpretation.(However,OOtheuseofafield-selectorisnot recommendedoutsideofaPOstructure-declaration.)Forthatreason,theeffectofafield-MO>selectoronan assignment expressionis describedlater,inOSection11.2.74Anassignment-expressionwithoutafield-/Oselectoris evaluatedasfollows:*pOZ?)q! O BLISS-16/32ONLY`[1.:If *[ e1D[isthenameofadatasegment,then determineits6allocation-unitfromits declaration.'If G e1isanyotherex-I  pression,thenusethedefaultallocation-unit(WORDfor*d BLISS-16,LONGfor BLISS-32).'`2.: Interpretthevalueof  e1)aasanaddress.+ Dependingon+<whethertheallocation-unitof /< e1<isLONG,WORD,orGBYTE,storethe correspondingnumberof rightmostbitsofthevalueof  e26Zinthe longword,word,orbyteattheDFgivenaddress.)(LONGandlongwordapplytoBLISS-32only.)+`3.:Usetheoriginalvalueof g e2+(thatis,thefullwordvalue):vasthevalueofthe assignment expression.er! ;OBLISS-36ONLY'`[1.: Interpretthevalueof [ e11N[asanaddressandstorethevalue of . e25inthefullwordatthegivenaddress.!`32.:Usethevalueof >3 e223asthevalueofthe assignmentex- pression.s O5.1.5B PragmaticsNO4Twoaspectsoftheinterpretationofoperator-expressionsareRO discussedhere:'theeffectofexplicitparenthesization,andthe,Oorderof expression evaluation.t -O5.1.5.1CExplicitParenthesizationLO)Any expressioncanbeplacedin parentheses.+ThevalueofMOthe parenthesized expressionisthevalueofthe expressionNOwithinthe parentheses.+Theeffectofthe parenthesesistoPO3delimittheoperandsofthe expression.'Considerthe followingO expressions:O (.A)+1Oy .(A+1)9u MOThetwo different placementsofthe parenthesesproducetwoQO expressionsthatarenot equivalent.(Inthefirstexample,theQO5operandofthefetchoperatorisjustA,wh! !ileinthesecond Oexample,itisA+1.v sOOEvery expressionisfullyparenthesized,if necessary,bytheMOcompilerto determinewhichoperandsgowitheach operator,7O5 accordingtothedefaultrulesgivenin5Section5.1.3.5Forex-OOample,thedefaultparenthesizationofthe expression.A+1isOasfollows:Ok (.A)+1*v?#[w+1LOThisparenthesizationfollowsfromthefactthatthefetchIOoperatorhashigherprioritythantheaddition operator.MO5The expressioncouldbe explicitly parenthesizedasfollows,?Ohowever,tospecifytheinterpretation required:O .(A+1)x 5JO Sometimesanoperator-expressionmustbe explicitlyparen-TOthesizedbecauseof restrictionsthatprohibittheuseofcertainO5operands(seeN5Section5.1.2).,b5Anyoperandcan,itself,beaJO parenthesized expressionbecausea parenthesized expression2Oisaformofblock(asdefinedinSection8.1),whichisapri- O>mary(asdefinedin+>Section4.1).'>Forexample,the followingJO expressionisvalidbuttheunparenthesizedformisnot::O X&=%(IF&.ALPHA%EQL%0%THEN&.X1%ELSE&.X2)*xN?*x}?j*x+|?yzOOAgain,the following expressionisvalid,butthe unparenthe-Osizedformisnot:Oa .A%EQL%(NOT%.B)zLk-O5.1.5.2CTheOrderof EvaluationO)Asstatedin)Section5.1.4,*)theorderinwhich operator-KO expressionsare evaluatedislargely undefined.+ByleavingIOtheorder undefined,thelanguage definitionpermitstheOO3compilertochooseanorderof evaluationthatis efficient.*z?+{ zSOInmostcases,theresultsofprogramsarenotaffectedbytheHOabsenceofadefinedorderof evaluation.&Forexample:Oa X&=%2*.X%+&3/.Y;[|1POTheabsenceofadefinedorderof evaluationdoesnotaffectQOthevalueassignedtoXbecauseallpossibleordersofevalu-PO5ationofthis assignment(aftertheoperandsare delimitedby@Odefaultparenthesization)producethesamevalue.}-OTherulenearthe beginningofSection5.1.4,however,statesGOthat assignment expressions,routine-calls,andcontrol-JO5 expressionsare evaluatedin left-to-rightorder.-InsomeNOcaseswheretheorderof evaluationis important,thisruleratherthan0.r HLOTheprogramfragmentunder discussiondoesnotviolateanyMOrulesofBLISS-16or BLISS-32;itisvalid.+However,sinceQO5itassignsanegativenumber,-1,toanamethatisdeclaredGOUNSIGNEDbydefault,theprogramfragmentis certainlyO inconsistent.vLLOYoucanfixtheprogramineitherofthe followingways: rc ` IChangethenumericliteralfrom-1to255.(ThischangeR(doesnotaffectthevalueassignedtoY,butitdoesmakeit1clearthatyouexpectthatresult. ` LInserttheSIGNED attributetothe declarationofX.This5Ychangecauses0tobeassignedtoY.KOThechoicebetweenthesechangesdependsentirelyonyourOO intentionsandcannotbemadebylookingatthissmallpartNO5oftheprogram.)Relatedproblemscanarise(inanydialect)OOfromtheuseoffield-referencesforfieldsthataresmaller7Othana fullword.'Theseare discussedinSection 11.2.5.4.*?yD9/4-0C#O5.2BExecutable-FunctionsMOUTheexecutable-functionsarecalled``executable''todistin-KOguishthemfromthelexical-functions,whichare described OinChapter15.functionfollows:O MAX(.X,&.Y,%0)! ~VOThevalueofthisfunctionisthecontentsofX,thecontentsofOOY,or0, whicheveris greatest.'ThenameMAXis predeclaredOO5asanexecutable-function,sotheexamplejustgivencanap-IOpearwhereMAXis undeclared.'Thestandard-functionsare'Odefinedinthischapter(Section5.2.2).*?  OThe! supplementary-functions-aredesignedfor particularar-GOeasofsystem programming.+These functionsareusuallyIO5definedand documentedin ``packages''.*OnesuchpackageLOconsistsofthecharacter-handling functions.)Anexampleof2Oacallonsuchafunctionfollows: Ok X&=%CH$RCHAR(.PTR3); WNOThis assignmentreadsa characterfromthepositionselectedPObythecontentsofPTR3andassignsittoX.The character-FO5handling functionsaretheonlysupplementary-functionsPOdefinedinthismanual.(However,itis anticipatedthatotherIOpackagesofsupplementary-functionswillbeaddedtothe$O>languageinthefuture.[1 OThe& condition-handling-functions$6areusedfor generatingNOsignalsforunusualeventsor conditionsandfor controllingJO5the subsequent processingofasignal (BLISS-16/32only).,OThese functionsaredefinedinChapter17.*PO+  OThe linkage-functions0areusedin combinationwithsomeOOlinkages(calling sequences)tocoderoutinesinamoregen-PO5eralway;forexample,tocodearoutinethatcanbecalledNOwith differentnumbersof parametersin differentcalls.(The-Olinkage-functionsaredefinedinSection13.6.*?  OThe$ machine-specific-functions&aredesignedforspecificCOcomputersystems.-Usuallyamachine-specific-functionJO5 representsasinglehardware instruction.+SuchafunctionNOpermitstheuseofahardware instructionwithout digressingIOtoanassembly language.+Theuseofamachine-specific-GO>functionmakesaprogrammachine dependent.(AnexampleOOoftheuseofamachine-specific-functionisnotgivenhere.HOSuchanexamplewouldbe misleadingwithoutadetailedOOH descriptionofthecontextinwhichit appeared.+TheuseofHOmachine-specific-functionsrequires knowledgeofboththeLOhardware instructionsetandthe optimization strategiesofHORthe compiler.*Machine-specific-functionsare describedin/Othe respectiveBLISSusermanual.AO5.2.1BSyntax}yS7Oexecutable-functionexecutable-function-name yQ( 8 k< :'actual-parameter,V'...unothing 9 k= ; .Q)O executable4-function-name yLnnamec%name Lo&O`actual-parameter expressionO5.2.2B SemanticsNO4The semanticsoftheexecutable-functionsisnearly identical3Otothatforoperator-expressions(see~Section5.1).STheonlyPO differenceisthatthe operationtobe performedis specifiedMO=byanameatthe beginningoftheexecutable-function(for8Oexample,MAX)insteadofbyan operator.*~O}?! sJOThe semanticsofthestandard-functionsaregivenintheKO following subsections.'The semanticsofsomesupplementary-IO5 functions,thecharacter-handling functions,aregiveninOChapter20.=The semanticsofthemachine-specific-functionsBOaredefinedintheusermanualforeachdialect.*OPO ! ,O5.2.2.1CSIGNandABS FunctionsPO)TheSIGNandABS functionsareusedtoextractthesignandOOtheabsolutevalue, respectively,fromavalue.)The functions%Ohavethe followingform:m1C OnSIGN ABS wo(e1)EOEitherofthese functionsisacompile-time-constant-EO expressionifitsactual-parameterisa compile-time-KO5constant-expression.(Thevaluesreturnedbythese functionsOareasfollows:/ OOFunctionValue OObSIGN(x)+1 E0 %-1bifx>0ifx=0ifx<0OwABS(x)x-(x)wifx Pw w0ifx<0 O_MOExamplesoftheuseoftheSIGNandABS functionsareasOfollows:x OOExamplebValue OObSIGN(5)OABS(5) bb+1 b+5O)SIGN(-5)OwABS(-5) b)-1 bw+5OSIGN(0)O>ABS(0) 0 >0 OY! jQOObservethat,ineachofthese examples,the followingexpres-Osionistrue:^4SIGN(x) *)ABS(x)EQLx+O5.2.2.2CMAXandMIN FunctionsLO)TheMAXandMIN functionsareusedtoselectthelargestLOandthe smallest, respectively,fromasetofvalues..The0O functionshavethe followingform:l OnMAX!|!MAXU!|!MAXAMIN!|!MINU!|!MINA o1(e1,e2 OS,S... S)QOTheinterpretationofthefunctionitselfis determinedbythe=Ofirstthreelettersofitsname,asfollows:vU*OMAX)selectthelargestvalue+O]MIN9selectthesmallestvalueIOTheinterpretationoftheoperandsis determinedbythe?Ofourthletterofthefunctionnameasfollows:*=ONofourthletter:9y Interpretoperandvaluesassignedvalues.PO]FourthletterisU: Interpretoperandvaluesasunsignedval-yues.LO$FourthletterisA: Interpretoperandvaluesas addresses.POThevalueofthefunctionisthelargestorsmallestoftheIOvaluesofthe operands, dependingonthefunctionname. GOInbothBLISS-16and BLISS-32,the functionsMAXUandKOMAXAare equivalent,asareMINUandMINA.Thatis,theJO5unsignedandaddressformsoftheMAXandMIN functionsHOare equivalent.*In BLISS-36,however,the functionsMAXIO(signed)andMAXAare equivalent,asareMINandMINA.SO>Thisreflectsa differenceintherangeofvalidaddressvalues3Oallowedbythe correspondingsystems. WLOThe distinctionbetweenthesigned/unsignedandtheaddressMOformsofthe functionsisprovidedsothat programmerscanQO5specifythedesiredinterpretationofthevaluesbeingoperatedPOon,inabothexplicitand transportablefashion.)ExamplesofIOtheuseofthesignedandunsignedmaximumandminimum&O> functionsareasfollows: OOExampleValue OOb MAX(-1,0,1)O MAXU(-1,0,1) b1 -1O) MIN(-1,0,1)Ow MINU(-1,0,1) )-1 w0 O` 6KOTheseexamplesshowthe differencebetweenthesignedandMOunsigned functions.)Thesigned functionstreat-1(whichisQO5 representedasafullwordof1s)asanegativevalue,whereasMOtheunsigned functionstreat-1asalargepositivevalue.JOAnexampleoftheuseoftheaddressmaximumandmini-*Omum functionsisasfollows: Oa OWN  X:& VECTOR[10],  Y, 9 Z; O ...O Z&=% MAXA(X[5],Y)MOThe assignmentsetsZtothevalueofYbecauseOWNdata>Osegmentsare allocatedat increasing addresses." &O5.2.2.3CThe%REFFunctionLO)The%REFfunctionprovides temporarystorageforthevalueHOofanactual-parameterina routine-callor executable->O function.'Thefunctionhasthe followingform:R(O%REF( Qe1 )}MOThefunctioncanbeusedonlyasanactual-parameterina0O routine-callorexecutable-function.^44OThefunctionis evaluatedasfollows:! J`1.:Allocatea temporaryfullwordandplacethevalueof F e1 in(that fullword.Q`2.:Usetheaddressofthe temporaryfullwordasthevalueofthe function.! WKOForpurposesof discussion,supposethata programmerhasMOdeclaredaroutinecalledRHO.Thedetailsofthedeclara-RO5tionarenotgivenhere.*AllthatmattersisthattheroutineROhasone parameter,whichistheaddressofagivenvalue,andJOreturnsaresultwhich, presumably,dependsonthegivenO>value.]+3ROSuppose,now,thatthevaluetobepassedisnotstoredinaQOdatasegmentbutmust,instead,be calculated.( Specifically,itRO5isthevalueofthe expression:).X+1.)Itwouldnotbecorrect$Otowritethe following:O Y&=% RHO(.X+1);a T7OOInthisversion,.X+1wouldnotbeusedasthegivenvaluePO(whichwas intended),butratherastheaddressofthegivenNO5value.-AcorrectsolutiontotheproblemistodeclareandIOusea temporarydatasegmentname.+However,theuseofOOa temporaryjusttodealwitha calculated parameterisin-NO> convenient.(The%REFfunctionprovidesabetter solution,asOfollows: O OWN d X,  Y; O ... O; Y&=%RHO(%REF(.X+1)); OOObservethat%REFisnotan ``undot'' operation.'Thefollow-+Oingcallsarenot equivalent:Oa F(X)O F(%REF(.X))8 POThe routine-callF(X)passestheaddressofXastheactual-PO parameteroftheroutineF,whilethesecondcallpassestheOO5addressofa temporarydatasegmentthatcontainsacopyofOthecontentsofX.`! j6O5.2.3B PragmaticsOO4Thecostof evaluatingatypical executablefunctionismuchTOlessthanthecostof evaluatingatypical routine-call.'TheuseNOofanexecutable-functionusuallydoesnotproducearoutineWO=call;instead,itiscompiledintoafew instructionsthatareof-QOtendesigned preciselyfortherequired operation.'In contrast,POa routine-callusuallyrequiresthepassingof parameters,theSOGcreationofastackframe,andthereturnofaresultaswellQOasthe inevitable subroutinejump.)Infact,the similaritybe-IOtweenanexecutable-functionanda routine-calldoesnotEOQextendmuchbeyondthe similaritiesintheirsyntax. 0 /1e"O 6.2Control! ExpressionsFOEarly programming languages permitted unrestrictedpat-MOternsofcontrolflow,andthelogicofmanyprogramswasJOBvery difficulttofollow.-Morerecent languageshavein-JOtroduced specializedand restrictedpatternsofflow,andMOthus encouragethe constructionofprogramsthatarebetterOL organized.(MOTherearefive fundamentalkindsofcontrolflowinBLISS:LO sequential, conditional, iterative, subroutine,and conditionKO5 handling.. Sequentialflow,asimplenotion,isdefinedinOSection8.1.3Baspartofthe descriptionofblocks.( ConditionalMOand iterativeflowis describedinthischapter.+ Subroutine!O>flowis describedin>Chapter12,&>and conditionhandlinginOChapter17.*OP?x*Ot*OZO+  `OONotablebyitsabsenceinBLISSisthefamiliarGOTOcon-POstruct.*Itsabsencepreventstheuseof arbitrarypatternsofHO5flow.) ProgrammingwithouttheGOTO frequentlyrequiresROmoreanalysisoftheproblem,butusuallyresultsinaclearer'Oandmorereliableprogram.L "MOInBLISS,the constructsfor conditionaland iterativeflowOcontrolarecalled control-expressions$.)Becausetheyareex-PO5 pressions,these constructscanhavevaluesandcanbenested&Owithinlarger expressions.tJJOThesyntaxdiagramforcontrol-expressionsisasfollows:U+O~control-expression y8 y> y< yW> y:  conditional-expressionVcase-expressionselect-expressionloop-expression?exit-expressionreturn-expression 9 > = W> ;oCOLoop-expressionsare describedundertwo categories:,O indexed-loopsandtestedloops.436U w+'O6.4BIndexed-Loop-ExpressionsJOUAloop-expression repeatedly evaluatesagiven expression,JOthe loop-body.+Loop-expressionsare classifiedasindexed-ROloops (describedinthissection)and tested-loops (describedinO^thenext section).z PQOAn indexed-loophasa loop-indexthatstartsatagivenvalueUOandissteppedeachtimetheloopcyclesuntilafinalvalueisKO5reached.(The loop-indexnotonly determinesthenumberofSOcycles performedbytheloop,butcanalsobeusedasdatainLOthe calculations performedinthe loop-body.)Anexampleof$O>an indexed-loopfollows: O OWN  V:% VECTOR[10],S SUM;  ...O SUM%=%0;%O+ INCR&I%FROM%0&TO&9%DO"s SUM&=%.SUM%+&.V[.I]; POInthisloop-expression,the loop-bodyisasingle assignment-EO expression.-Theassignment-expressionis evaluatedtenRO5times,forthesequenceofvaluesof.Iasfollows:(0,1,2,&5 ... 5,XO9.'Theeffectoftheloopistoplacethesumoftheelementsof=OthevectorVinthedatasegmentnamedSUM.oMEO6.4.1BSyntax.O4SYNTAX:4ClicktodisplaySyntax.*OOxO6.4.2B RestrictionsFOThevalueofthestep expressioninan indexed-loop-)O_ expressionmustbe positive. O6.4.3BDefaultsQO4Theinitial,final,andstep expressionscanbeomittedinanDOindexed-loop-expression.'The followingdefaultsapply:  OOKeyword9Defaults OObINCROINCRUOINCRA'bFROM0TO +infinityBY1'FROM0TO +infinityBY1'FROM0TO +infinityBY1OwDECRODECRUODECRA$wFROMlargest-signed-value!FROMlargest-unsigned-value%_FROMlargest-address-valuewTO0BY1TO0BY1TO0BY1 Oz EOThedefault ``+infinity''forINCR,INCRU,andINCRAMOloop-expressionsmeansthatnoendtestismadeifnofi-ROinal expressionisgiven.)The ``largestvalues''referredtoareDOthemaximumvalues accommodatedbyasignedorun-HOsigned fullword,orthemaximumaddressvalue provided,1Or respectively,onthetargetsystem.  O6.4.4B Semantics O4The4 loop-index:4is implicitlydeclaredtobeaLOCALnameKOforthescopeofthe loop-body.-Thisimplicit declarationKO supersedesanyprevious declarationforthatnamethrough-HO=outthe indexed-loop.,TheMAP declaration, describedinOSection10.10,BIcanbeusedtoprovidea structure attributeforOthe loop-index.* OY?P  &KOThekeywordatthe beginningofanindexed-loop-expressionPOisINCRorDECR,followedbyanoptionaladdedletter,UorSO5A.Theaddedletteraffectsthe comparisonoftheindextothe8Ofirstandfinal expressions.' Specifically:6ONoaddedletter:Usesigned comparison.:O]LastletterisU:Useunsigned comparison.9OLastletterisA:Useaddress comparison.NMOGiventhe preceding discussionofindexesand keywords,theJOinterpretationforanentireindexed-loop-expressionisasO5follows: JT`1.:Setthevalueofthe loop-indextothevalueoftheinitial( expression.J`2.:Evaluatethestepandfinal expressionsandsavethe)valuesofthese expressions.U`3.:Ifthereisnofinal expression(sothat ``+infinity''isas-Lsumedby default),skiptostep5.( Otherwise,performthe81endtest.'Theendtestis satisfiedif: ZCa.:ThekeywordisINCR,INCRU,orINCRA,andtheCY(valueofthe loop-indexisgreaterthanthesaved1Yvalueofthefinal expression;or,Bb.?ThekeywordisDECR,DECRU,orDECRAandtheKYYvalueofthe loop-indexislessthanthesavedvalueof!Ythefinal expression.L`14.:Iftheendtestis satisfied, evaluationoftheloop-E expressionis complete./Use-1asthevalueoftheloop-expression.'`a5.:Evaluatethe loop-body.N`6.:IfthekeywordisaformofINCR,addthesavedvalueK9ofthestep expressiontothe loop-index.)IfthekeywordLisaformofDECR,subtractthesavedvalueofthestep> expressionfromthe loop-index.'Gotostep3.J O6.4.5B PragmaticsFO4Theimproper declarationofa loop-indexisacommon,O programmingerror.'Forexample:O SUM%=%0;%OY INCR&I%FROM%0&TO&9%DO BEGIN LOCAL z1 I;"y SUM&=%.SUM%+&.V[.I]; END;W-JOThe precedingprogramfragmentis incorrectbecauseIisMOusedasa loop-indexandthen ``blockedoff''fromuseinOO5the loop-bodybyanexplicit declarationofIasLOCAL.TheTOnameIin.V[.I]referstoadatasegmentthatis allocatedbyROtheexplicit declaration,nottotheimplicitdatasegmentthatNO>containsthe loop-index.)Thecorrectversionofthisexample;Oappearsatthe beginningofthissection(Section6.4).*Z|?j647Ow%&O6.5BTested-Loop-ExpressionsLOUAtested-loop-expressioncontainsatest expressionthatisIO evaluatedonceduringeachloopcycle.-Thetestexpres-KOsion determineswhetherornotrepeated evaluationoftheO^ loop-body continues. OOIna pre-testedloop,thetestismadeatthe beginningofVOeachcycle.(Ifthetestis satisfied,thenthe loop-bodyiseval-MO5uatedandanewcyclebegins; otherwise, evaluationoftheMOloop-expressionis complete.'Anexampleofapre-tested-loopOfollows:!Ok WHILE%.PTR&NEQ%0&DO BEGIN" SUM&=%LIST[.PTR,CONT];"B PTR&=%LIST[.PTR,LINK]; END; }HOInthisexample,the loop-bodyisthe BEGIN-ENDblock,MOwithitstwoassignment-expressions.)EachcycleoftheloopYO5beginswithatestofthecontentsofPTR.Ifthevalueisnot0,ROthentheblockis evaluatedandanewcyclebegins; otherwise,=O evaluationoftheloop-expressionis complete. NOOApost-tested-loopdiffersfromapre-tested-looponlyintheVOpositionofthetest.'Inapost-tested-loop,thetestis evaluated(O5attheendofeachcycle.AO6.5.1BSyntaxp|O tested-loop-0 expression 8 w< :4pre-tested-looppost-tested-loop 29 2w= 2;Opre-tested-loop  n WHILE )UNTIL " omtestDO loop-bodyO"post-tested-loop,DO loop-body q8n WHILEWUNTIL 8o,testO6.5.2B RestrictionsNO4Thetestinapre-tested-looporpost-tested-loopissubjectNOtothesame evaluationrulesasthetestina conditional-$O expression, describedinSection6.1.3. AssignmentsorNO= routine-callsthatmustbe evaluatedbecausetheysetvaluesROorhaveothersideeffectsmustnotbeincludedaspartofaOtest.*?MYO6.5.3B Semantics?O4Theinterpretationofapre-tested-loopfollows:v "L"`1.:Evaluatethetest.N`O2.:Examinethetestclause(thatis,the``WHILEtest''orO``UNTILtest'').'Thetestclauseis satisfiedifthekeywordPisWHILEandthe low-orderbitofthetestis1oriftheMYkeywordisUNTILandthe low-orderbitofthetestis0.R`3.:Ifthetestclauseis satisfied,evaluatethe loop-bodyand1returntostep1.V`4.:Ifthetestclauseisnot satisfied,usethevalue-1asthe* valueoftheloop-expression.kAAOTheinterpretationofa post-testedloopfollows:p'`1.:Evaluatethe loop-body."`O2.:Evaluatethetest.T`3.:Examinethetestclause.)Ifthetestclauseis satisfied,asM'definedinstep2oftheinterpretationofthe pre-tested-%loop,returntostep1.V`4.:Ifthetestclauseisnot satisfied,usethevalue-1asthe*Wvalueoftheloop-expression.O6.5.4B PragmaticsDO4ThekeywordsWHILEandUNTILareusedto determinePOthe continuationofaloop.*IfWHILEisused,thentheloopTO continuesifthelowbitofthetest expressionvalueis1.+IfRO=UNTILisused,theloop continuesifthelowbitofthetestMO expressionis0.)Thus,WHILE(test)is equivalenttoUNTILONOT(test). z|MOThemost fundamentalformofloopisonethatbeginswithOthe following:Oa WHILE%1&DOt!JQOSuchaloopcouldcycle indefinitelybecausethelooptestisOOalways satisfied.) EvaluationoftheloopcanbeendedbyanO5exit-expression(see*5Section6.6)(5orareturn-expression(seeOSection6.7)5thatisexecutedwithinthe loop-body.*!*}?"*!OP|?3B768" ~O6.6BExit-ExpressionsMOUAnexit-expressiongivesthreeitemsof information:(acom-SOmandtoendthe evaluationofablock,thelabeloftheblockPOtowhichthecommandapplies,and optionallyavaluefortheLO^ designatedblock.&Anexampleofanexit-expressionfollows:#O LEAVE%ALPHA%WITH&.X-1;P# &POThis expressionmustoccurinablockthatislabeledALPHA.NOItcauses evaluationofthatblocktoendandprovidestheNO5valueof.X-1asthevalueofthatblock.-Thelabelingof#Oblocksis describedinLSection8.1.*#LP|?jA$O6.6.1BSyntax4%  Oexit-expression y8 yw< y:4leave-expressionexitloop-expression V9 Vw= V;Oleave-expressionynLEAVElabel 8 < :vDWITH exit-valuevnothing 9 = ;Oexitloop-expressiony~EXITLOOP 08 < :@T exit-value@nothing 09 = ;OlabelynameO exit-valuey expression&O6.6.2B RestrictionsMO4Aleave-expressionmustbe containedinablocklabeledbyEOthesamelabelthatappearsintheleave-expression.'DOAnexitloop-expressionmustbe contained inaloop-KO expression.,Ifanexit-expressionappliestoan expressionLO5whosevalueisused,thentheexit-expressionmustcontainOan exit-value.(! O6.6.3B SemanticsQO4The semanticsofthetwokindsofexit-expressionis presented'Ointhe following sections.)Bd$O6.6.3.1CLeave-Expressions@O)Theinterpretationofaleave-expressionfollows:*! vQ`1.:Ifan exit-valueisgiven,evaluatethe exit-valueanduse>(thatvalueasthevalueofthelabeled-block.U`2.:Ifan exit-valueisnotgiven,thevalueofthe labeled-blockis undefined.O`3.:Endthe evaluationofthe labeled-block designatedbythe+labeloftheleave-expression.+Bk'O6.6.3.2CExitloop-ExpressionsDO)Theinterpretationofanexitloop-expressionfollows:i, ?Q`1.:Ifan exit-valueisgiven,evaluatethe exit-valueanduse@(thatvalueasthevalueoftheloop-expression.M`2.:Ifan exit-valueisnotgiven,thevalueoftheloop-$ expressionis undefined.=`3.:Endthe evaluationofthe innermostloop.L- V"O6.6.4B PragmaticsPO4Anexitloop-expressionisaspecialcaseofaleave-expressionHOthatleavesthe innermost containingloop-expression.,AnNOexitloop-expressionis convenientbecauseitdoesnotrequire!O=theuseofalabel.a.! r7OOAnexampleofanexitloop-expressionappearsinthe followingOprogram fragment: Oa OWN X:% VECTOR[10], ZEROFLAG; O9 ...O ZEROFLAG%=&0;%O INCR&I%FROM%0&TO&9%DO IF%.X[.I]&EQL%0,Y THEN% (ZEROFLAG%=%1;% EXITLOOP);/! MOTheelementsofthevectorXareexaminedto determineifPOthereisanelementwhosecontentsis0.)Ifanelementcon-QO5taining0isfound,thenZEROFLAGissetto1and evaluationMOoftheloop-expressionisendedbythe EXITLOOP. EvaluationTOoftheloopendswhenthefirstzeroisfound;theelementsofNO>thevector followingthefirstelement containing0arenotKO examined.(Anexampleofaleave-expressionappearsinthe'O followingprogram fragment: Ot OWN XYZ:% ARRAY[10,20], ZEROFLAG;OL LABEL  L; O ...O$ ZEROFLAG%=&0;-_$ !& Initialize%to%no%zeros%foundOl L:JBEGIN% INCR%I&FROM%0%TO%9&DO& INCR%J&FROM%0%TO%19%DO!zD IF& .XYZ[.I,.J]&EQL%0, THEN& (ZEROFLAG%=&1;&LEAVE&L); END;0 NOOWhentheleave-expressionis evaluated,itends evaluationofTOtwoloops:'theinnerloopwithindexJandtheouterloopwithO5indexI.1! TOThevalueofanexit-expressioncanbeusedtogiveavaluetoPOaloop.(Anexampleofthisuseofanexit-expressionappears0O5inthe followingprogram fragment: O OWN VALBUF:% VECTOR[10],I BUFLEN; O ...O BUFLEN%=%1+! BEGIN%i DECR%J&FROM%9%TO%0&DO5z IF& .VALBUF[.J]&NEQ%0&THEN%EXITLOOP%.J END;s2 ILOAssumethattheinitialelementsofVALBUFcontainnonzeroHOvalues,andthe remainingelementscontainzero.(BUFLENNO5isthenumberofnonzerovaluesinVALBUF.ObservethatifMOanonzerovalueisfound,thentheexitloop-expressionendsXOthe evaluationoftheloop.'Ifthebufferisallzeros,theevalu-TO>ationofthelooprunsto completionandtheloopvalueis-1.QOInbothcases,thevaluereturnedis1lessthanthedesiredOnumberofvalues.8 793! !O6.7BReturn-ExpressionsROUAreturn-expressionisusedtoendthe evaluationofaroutinePOandsendcontrolbacktothepointatwhichtheroutinewasOcalled.A4O6.7.1BSyntax5 Oreturn-expression^RETURN S8 Sw< S:4returned-valuenothing 9 w= ;$Oreturned-value expression6O6.7.2B RestrictionsJO4Areturn-expressioninaroutinethatdoesnothavethe $GOConstantvaluesknowntothecompilerarerequiredinPOseveralplacesinBLISSinordertogivea reasonableinter-NO5 pretationtoanotherlanguagefeature.'Forexample,inorderUOforthecompilertoallocatestaticstorageforplits,theactualJOsizesofall componentsmustbeknown-includinganyrep-QO>etitioncounts.(Thesame considerationappliestothesizesofOOotherstaticstorage declarations,suchasanown-declaration.?POInothercases, requiringconstantvaluesassuresthatanef-MOficientimplementationcanbeprovidedbythe compiler.)ForBO5example, requiringthatallLOCAL(and STACKLOCAL)POstorage allocationisofconstantsizeand thereforeknowntoOOthecompilerassuresthatstorage allocationcanbedoneef-IO> ficientlyandthatLOCALdatasegmentscanbe addressedO efficiently.@RIOSomesimpleexamplesof compile-timeconstant expressionsOareasfollows: Oa 5O 3&*%15%-%4O 7&+%%C'A'O9 MAX(3,%7,%3*15-4)\A2JO Compile-timeconstant expressionsofteninvolvenamesthat0OaredeclaredLITERAL;forexample:Oa LITERAL REGK=&5, SIZE%=&47; 9 ... BEGIN) OWN&X:&VECTOR[MAX(SIZE,3)+1]; REGISTER%A%=&REG; Y ...  ENDBNJOTherearequiteafewcontextsthatrequire compile-timeIOconstant expressions,andtheyare scatteredthroughtheCO5 language.'For convenience,acompletelistfollows.wCMMOA compile-timeconstant expressionmustbeusedasfollows:D! {  `  Thex replicatorinaPLIT(Chapter4) `O  OTheyO low-bound O,#O high-bound O,O single-value O,O low-value-O,and high-value0s expressionsinacase-expression(DChapter6) `'  'The{' boundary4' expressioninanalignment-attribute(Chapter9) `  Thez ctce-access-actual/+inapreset-attributeofadata-W declaration(WChapter9) `  The} bit-count5inarange-attributeofaliteral-or)/external-literal-declaration(/Chapter9) `  The~ register-number(inaregister-declaration(Chapter10) `  Thex sign-extension-flag"Minafield-selector(Chapter11) `  Thev structure-size5inthe declarationofastructure-name ^(^Chapter11) `  They allocation-actual/ parameterinastructure-attribute 6(6Chapter11) `  Thex field-component%inafield-declaration(Chapter11) `5  5Thex5 register-number"5inalinkage-option(5Chapter13) `  Thex literal-value'Minaliteral-declaration(Chapter14) `3 73 Certain parametersinlexical-functions(3 Chapter15) `  Thex lexical-test' inalexical-conditional( Chapter15) `2  2 They2 compile-time-value,I2 inacompile-time-declaration( Chapter15) ` ? ThelevelvalueinanOPTLEVEL module-switch(b Chapter19)*DlO*DDklO*DClO*DlO*DlO*DOG*DJO*D!O*DO*DyO*DO*DwO *DOI*Dv OI*DN OI*D% Oz AEO7.1.1BSyntaxhF>*O compile-time-constant-expression expressionGO7.1.2B RestrictionsKO4These restrictionsapplytoan expressionafteranymacro;Ocallsinthe expressionhavebeen expanded.HhGOA compile-timeconstant expressionmustbeoneofthe!O following expressions:I`1.:A# numeric-literal H.`O2.:A#O string-literal O.`3.:A# name6that satisfiesthe following conditions:J RFa.:Itisdeclaredinanybound-declarationexceptan;Y(EXTERNALliteral-declaration(as describedinYChapter14).Ob.?Itisboundtoavaluethatisgivenbya compile-timeYYconstant expression.`4.:A# structure-reference1thatyieldsa compile-timeconstantI1 expressionwhenitisexpanded(as describedinChapter11).` 5.:A$  block@ thathasa compile-timeconstant expression(and(anothingelse)asitsbody.`6.:AnT operator-expression1.that satisfiesthe followingcondi-9tions:*JYDO ;KCa.:Itisnotafetch-expressionoran assignment-Y( expression.Jb.?Ithasa compile-timeconstant expressionaseachofYits operands.`7.:AnS operator-expression*-thathasthe followingform:qL1G e1 *nvrela v- o Re2AM bIntheseforms, b rela6bisoneofthe relational operatorsfor7 addresses(EQLA,NEQA,andsoon).-Both  e1 Yand  e2Cmustbe link-timeconstant expressions; furthermore,Jltheirvaluesmustbe addressesthatarerelativetotheIsameprogramsection,externaldatasegment,orexternalroutinename.`8.:AnT executable-function1that satisfiesthe followingcondi-tions:SN)La.:ItistheABS function,theSIGN function,oroneof'Y(themaxormin functions.Jb.?Ithasa compile-timeconstant expressionaseachofYits parameters.`9.:A % supplementary-function,that satisfiescertainrestric-Jtions.+Those restrictionsarenotgivenherebutinsteadI1appearaspartofthe definitionofeachsupplementary-# function.+(Forexample,BSection20.2.1.1ystatesthatthe@ CH$ALLOCATIONfunctionisa compile-timeconstantF: expressionifits parametersare compile-timeconstant expressions.)`10.A ' conditional-expression)dthat satisfiesthe followingk conditions:*NBL? O rLa.:Ithasatestthatisa compile-timeconstantexpres-Y(sion.Mb.?Ithasa consequenceor alternativethatisacompile-BYtimeconstant expression, dependingonwhetherthe)YYtestis satisfiedorfails.`11.A# case-expression6mthat satisfiesthe following conditions:`Pr6a.:Ithasa case-index-,thatisa compile-timeconstantY( expression.Mb.?Ithasatleastone case-actionthatisa compile-timeEYconstant expression;namely,that case-actionthatis6YYchosenbythevalueofthe case-index.QVbO7.1.3B SemanticsFO4A compile-timeconstant expressionis evaluatedduringMOthe compilationofthemoduleinwhichitappears.,InallQOother respects,itsinterpretationisthesameasthatforan2O= unrestricted expression(seeChapters =4, =5, J=and =6).*Q-?*Q,?*Q-?!; :<R 2/O7.2B Link-TimeConstant Expressions OUThissectiondefines*&U link-timeconstant expressionspU.,TheJO definitionassumesthe definitionof expressionsgiveninJOtheprevious chapters,andthenimposes restrictions.,TheIO^ definitionof link-timeconstant expressionsincludestheNO compile-timeconstant expressionsasaspecialcase.'There-OO strictionsona link-timeconstant expressionaredesignedtoMOhpermitthe expressiontobe evaluatedbythe compiler,theNOlinker,andthe operatingsystembeforethevalueisneeded"Oforprogram execution.SZKOTheneedfor link-timeconstant expressionsarisesintwoOways:T  ` IAnamethat designatesstorageinaprogramsectionisP( specifiedasanoffset,notafull,absoluteaddress,bytheH compiler.'Theabsoluteaddresscannotbe determinedun-Mtillinktime,whentheprogramsectionsare allocatedand22theirbase addressesare determined. ` GAnamethatisdeclaredEXTERNALisentirelyundeter-K minedatcompiletimebecauseitsoriginal declarationisMcinanothermodule.(Itsoffsetoritsabsoluteaddresscan-Hnotbe determineduntillinktime,whenthemoduleinEwhichtheGLOBAL declarationofthenameappearsislpresent.U OOAsimpleexampleoftheuseofa link-timeconstantexpres-EOsionis containedinthe followingprogram fragment:Oa OWN%X:% VECTOR[10]; O ...%O OWN%ALPHA:&INITIAL(X[2]);V QODuring compilation,thefinalvalueofXisnotknown;itisNO expressedasanoffsetintheOWNprogramsection.(OnlyatUO5linktimeisitpossibleto determinetheabsoluteaddressofX,SOtoevaluateX[2](theaddressofthethirdelementofX),and,@Ofinally,tosupplytheinitialvalueforALPHA.WmLOTherearefivecontextsinwhicha link-timeconstantex-!Opressionis required:XH `  Thex plit-expressioninaPLIT(JChapter4) `O  OTheyO plit-expression5Oinaninitial-attributeofanown-orglobal-declaration(Chapter9) `'  'The{' preset-value3M'inapreset-attributeofanown-orglobal-declaration(Chapter9) `  The} data-name-value#,inaGLOBAL bind-data-$W declaration(Chapter14) `  Thez routine-name-value&vinaGLOBAL bind-routine-/ declaration(/Chapter14)*XJkO*XkkO*XCkO*XO AYO7.2.1BSyntaxeZ;'Olink-time-constant-expression expression[O7.2.2B RestrictionsLO4These restrictionsapplytoan expressionafteranymacro-;Ocallsinthe expressionhavebeen expanded.\ eOOA link-timeconstant expressionmustbeoneofthe followingO expressions:]`1.:A*# compile-time-constant-expression .`O2.:A#O PLIT O.`3.:A# name:thatisdeclaredasoneofthe following:$^ "<a.:OWN,GLOBAL, EXTERNAL,orFORWARD.(TheseAY(areusedfornamesof permanently allocateddataY segments.)2b.?ROUTINE,GLOBALROUTINE,EXTERNAL6YYROUTINE,orFORWARDROUTINE.(Theseare3Yusedfornamesofroutine segments.)A1c.?EXTERNALLITERAL.(Thisisusedfornamesof:Yliteralsthatareboundinother modules.)` 4.:A#  name6 that satisfiesthe following conditions:_! H\La.:Itisdeclaredbyabound-declaration(as describedinY(Chapter14).Mb.?Itisboundtoavaluethatisgivenbya link-time-Yconstant-expression.`5.:A# structure-reference3thatyieldsa link-timeconstantex->pressionwhenitisexpanded(as describedin+Chapter11).`W6.:A%W block=Wthathasa link-timeconstant expression(and(nothingelse)asitsbody.`/7.:AnS/ operator-expression*-/thathasthe followingform:*_YO *_+On`(D e1 *n v+ v- o e24aS bIntheseforms, b e13obmustbea link-timeconstantexpres-sionand  e2:|mustbea compile-timeconstant expression.`:8.:AnS: operator-expression*-:thathasthe followingform:qb1G e1 *nvrela v- o Re2c !bIntheseforms, b rela6bisoneofthe relational operatorsfor7 addresses(EQLA,NEQA,andsoon).-Both  e1 Yand  e2Cmustbe link-timeconstant expressions; furthermore,Jltheirvaluesmustbe addressesthatarerelativetotheIsameprogramsection,externaldatasegment,orexternalroutinename.`9.:A ' supplementary-function'that satisfiescertainre-F strictions..Those restrictionsarenotgivenherebutHMappearaspartofthe definitionofeach supplementary# function.+(Forexample,BSection20.2.2.1ystatesthattheFCH$PTRfunctionisa link-timeconstant expressionifGWitsfirst parameterisa link-timeconstant expressionFandits remaining parametersare compile-timeconstant expressions.)*cBi? d! VxO7.2.3B SemanticsHO4A link-timeconstant expressionis evaluatedduringtheNO compilation,linking,andloadingofthemoduleinwhichitUOappears.'Inallother respects,itsinterpretationisthesameasAO=thatforan unrestricted expression(seeChapters ?=4, =5, =and =6).*d?,?*d-?*d,?teJJOThe following summarizesthe restrictions presentedabove:rfHHAlink-time-constant-expressionisoneofthe following:|g zR 1YAny compile-timeconstant expression O 4YOAdatasegmentnameorexternalname  BYAdatasegmentnameorexternalnamemodifiedbyEY'addingor subtractingaconstantvalue(using+and Y-)  EYTheresultof comparingortakingthe differenceofEYWtwo link-timeconstant expressionsthat representad-IYdressesinthesameprogramsectionorrelativetotheBY sameexternalname(usingthe relational operatorsYafor addresses)!=<>jpO8.1BBlocksMOUOntheinside,ablockcancontainalongand complicatedHOsequenceof declarationsand expressions.,Fromtheout-POside,thatsameblockisasingle syntacticunitthathasaPO^singlevalue.)Inthisway,blocksprovideforthe large-scale&O structuringofaprogram.k POBlocksneednotbe complicated.(Theyareoftenusedtospec-MOifytheorderinwhich operatorsaretobe evaluated;forO5example:O 2*(.A-1)Ml#TOInthis expression,(.A-1)isablock.*ItisusedtoshowthatOOthe differenceof.Aand1shouldbe calculatedbeforemul-RO5 tiplicationby2.+Thisblockisthesimplestkindofblock,a#O parenthesized expression .HmPOInsomecases,ablockisusedtogatherseveral expressionsOOtogethersothattheyare evaluatedasaunit;forexample:Oa IF%.ALPHA%NEQ&0O THEN BEGIN9 Q1%=% .ALPHA*.S1; Q2%=% .ALPHA*.S2; END;n!AOAn equivalentwayofwritingthisblockfollows:MO IF%.ALPHA%NEQ&0%THEN%(Q1%=% .ALPHA*.S1;%Q2%=& .ALPHA*.S2;);o ]0OTheblockintheseexamplesisa compound-expression;thatSOis,ablockthatcontainsoneormore expressionsbutdoesnotJO5containa declaration.*Thechoicebetween parenthesesandLOthe BEGIN-ENDpairisentirelyamatterof appearanceandO readability.pNNOFinally,ablockcanbeusedtogathertogetherasequenceHOof declarationsand expressionsof arbitrarylengthandO5 complexity.AqO8.1.1BSyntax0r! Oblock nh labeled-blockhunlabeled-block oO labeled-block{label:"}T...unlabeled-blockOlabelnameOunlabeled-block %8 < : sIBEGIN block-bodyENDs( block-body) %9 = ;O  block-body 58 < :sZ declarationZ...snothing 59 = ; 8 4< :I block-action...I>nothing v9 v4= v; b 8  < 2 :I  block-valueI nothing b 9  = 2 ;OF  block-actionF  expression;O:  block-value:  expressionO Ablockq immediatelycontains+ agiven construct(suchasa4O- nameora declaration)ifitisthe - smallestQ- blockthatcontains O thegiven construct.s OA compound-expression4isablockthatdoesnot immediately%Ocontainany declarations.tz OA" parenthesized-expression1@isablockthathasthe followingOform:Oa (expression)uO8.1.2B RestrictionsMO4Thelabelina labeled-blockmustbedeclaredbyalabel-O declaration(seeSection18.4).*uO?k vQOAblockthatappearsinacontextthatrequiresavaluemust.Ocontaina block-value expression.wROAblockmustnotbeempty;thatis,itmustcontainatleast culations.(Forexample,thevalueinaBIND declarationcanNObegivenbyan expressionthatmustbe evaluatedeachtime"Otheblockisentered.|WNOThe evaluationof block-actionsinorder,oneafteranother,UOisthebasisfor sequentialflowofcontrol.+Itisvalidtoas-IO5sumethatthe evaluationofa block-actionis completedPObeforethe evaluationofthenext block-actionbegins.)InthePOcourseof optimization,thecompileralterstheorderofsomeMO> calculations,butneverinawaythataffectstheresults.[} 1ROInBLISSthe block-actionplaysarolesimilartotheroleofKOthe ``statement''inother high-level languages.+Thesemi-QO5colonattheendofa block-actionhasthe syntacticroleofLO separatingthe block-actionfromthenext componentoftheTOblock.(In addition,ithasthesemanticeffectof discardingtheSO>valueofthe expression.)Thusitisvalidtousean expressionPOwhosevalueis undefinedasthe expressionina block-action.~ QO Consider,next,ablockthatdoesnotrunto completion.(SuchJOa situationarisesbecauseofareturn-expression,leave-LO5 expression,orexitloop-expressionthatis containedintheROblock.,Inthis situation,thevalueoftheblockisthevalueFOsuppliedbythereturn-expression,leave-expression,orRO>exitloop-expression.(Ifnovalueis supplied,thenthevalueof$Otheblockis undefined.Lj"O8.1.4B DiscussionFO4An exampleof a block is containedinthe following!Oconditional-expression:O IF%.Q%EQL%0OY THEN BEGIN LOCALz1 TEMP;y TEMP%=&.X; X%=&.Y;  Y%=&.TEMP;Q END;oEEOTheblockis evaluatedifthecontentsofQis0.V ,NOTheblockinthisexamplebeginswithone declaration,con-IOtinueswiththreeblock-actions,anddoesnotcontainaNO5 block-value expression.'The declaration describesadataseg-MOmentnamedTEMP,whichis allocatedforuseinthisblockLOonly.*Theblockactionsareall assignments;theyexchangeTO>thecontentsofXandY.Clearly,itis important,inthisex-HOample,thatthe assignmentsare performedintheorderOwritten.NDOTheentireexampleisan expression(a conditional-IO expression)followedbya semicolon.0 Therefore,itisaMO5 block-actionandispartofsomelargerblock(notshown).}>'=? )O8.2B DeclarationsNOUA declarationprovides informationabouttheblockthatcon-NOtainsit.+Usually,the informationaffectstheinterpretationPOofoneormorenamesthatareusedintheblock.)Thus,al-LO^thoughthe declarationdoesnotdirectlycauseanyaction,OOitdoesaffecttheinterpretationoftheblockby specifying>O informationaboutthenamesthatare declared.OOInthesimplestcase,the informationprovidedbyadeclara-moduleliesoutsidethescopeofthelocal-declarationintheOexample.AO8.2.1BSyntax! O declaration b8 b> b> b_> b> b7< b> b> b> b> b_:data-declaration*structure-declarationxfield-declarationroutine-declarationlinkage-declaration`enable-declarationbound-declaration!compiletime-declarationImacro-declarationrequire-declarationlibrary-declaration1psect-declarationswitches-declarationlabel-declarationbuiltin-declarationgundeclare-declaration 9 > > _> > 7= > > > > _;QOThesyntaxdiagramsforthespecifickindsof declarationsareMOrgiveninlater chapters.)Withfew exceptions,however,eachNOkindof declarationdeclaresa user-chosensymbolasaspe-KO#cifickindofname (data-segmentname,structure-definitionKO|name,routinename,andsoforth),and generallyprovides5O additional informationaboutthatname.rMOAgivennamecanbeusedmorethanonceinamoduleandOOcanhave different declarationsin differentplaces.(Thedec-AO5larationthatappliestoagivenuseofaname5 governs5thatPOname.)Tofindthe declarationthatgovernsagivenuseofa&Oname,proceedasfollows:! ]IOStartatthegivenuseofthenameandscan backwardsSOthroughthemodule.'Iftheendofablockis encountered,skipPO5over everything containedinthatblock.(Thefirst declarationROofthegivennamethatis encounteredduringthisscanistheOdesired declaration.! NIOOne declarationofanamecangovernmanyusesoftheQOname.'Thepartofamodulethatisgovernedbya declarationO5isthe(5 scope 5ofthat declaration.XV.O8.2.2B RestrictionsOO4Everyuseofanamemustbegovernedbyanexplicitdecla-0Oration.)The predeclarednames(seebAppendixA)8areanex-SOceptiontothisrule;theycanbeusedwithoutbeing explicitlyO= declared.*bOOr  vLOTwo declarationsofthesamenamemustnotbe immediately*O containedinthesameblock. QOThetwo restrictionsjustgivenaresubjecttosome exceptions8Owhen UNDECLARE declarationsareused(seeChapter18).*O  N#OAnameisdeclaredas| global.awhenits declarationbeginswithIOthekeywordGLOBAL.Anamemustnotbedeclaredglobal+O5morethanonceinaprogram.O8.2.3B SemanticsLO4A declarationsuppliesthe following informationabouteach5O occurrenceofanamethatitgoverns: JI`1.:Theoneormorekeywordswithwhichthe declaration(beginsP`2.:The attributesthatappearinthe declarationofthenameM`'3.:Other, specialized, informationthatisincludedincer-Htainkindsof declaration,suchasthe routine-bodyinEaroutine-declaration,orthe bound-valueinabind-1 declaration WNOMostofthe informationsuppliedbythe declarationispro-MOcessedbythe compiler.,Formost declarations,partoftheNO5 processingdefinesavalueforthedeclaredname.'Forexam-NOple,whenanown-declarationis processed,anaddressoffsetPOis associatedwiththename,andthataddress-offsetisboundDO>(bythelinker)totheaddressofadatasegment.:O8.2.4B DiscussionO4Asdefinedin<4Section8.2.1,14thescopeofa declarationistheLOpartofamodulethatisgovernedbythe declaration.,AnFOexampleofscopesisgiveninthe followingdiagram:*<?* :O:KK##H $#H %' %H &)H $)H &1%1OD#PD#$%$%*))11<<"  BB  B P BP  B@ B BB"@x<<"@    @@@ GHHHHHHIGHHHHHJHHHJHHHLH?          H  H  I  I  I qI     <<"x   BB  !  B   P Bx  P  B    B    BB"   x<<"x=     " "     " "         " > A A                   @  ( @ p2s9 (  J)$E|  )'E(  $E>  J$E  Ic3.k9 @                3  0  P S                 ? @  @ p2s9 ( J)$E| )'E( $E> J$E Ic3.k9@?         H  H  I  I  I <<"qI  BB  B  B  B  B pL  BB"` !$DR x<<"`" D, "(x J$ (  ' x  )($(  )#p                   @   @ p2s9 (  J)$E|  )'E(  $E>  J$E  Ic3.k9 @                3  0  P S               ?< @ B b@':ӀR@BR4WrRJJRBJRAA<6㲖AA@@ >##%!>%!)!)!1>1$C D@@ d /H$ DH$CZ0OOThethreeblocksinthisexampleareenclosedinboxesthatPOare identifiedasA,B,andCfor convenienceof discussion.KO5BlockA designatestheentireexample (includingthecon-SOtentsofBlockBandBlockC).Thedetailsofthe calculationsLO performedbytheexampleblockarenot important,sotheyMO>areomitted.)Theplaceswherenamescouldbeusedincal-MO culationsarecalled Calculation#1, Calculation#2,andso Oon.sFOTheexamplecontainsseven declarationsofnames.,The-Oscopesofthe declarationsare:m O Declaration Scopeof Declaration O bX Y Z KS1 X A 3Yb(inBlockA)(inBlockA)(inBlockA)K(inBlockA)(inBlockB)(inBlockB)3(inBlockC)$bBlockAexceptBlockB$BlockAexceptBlockCBlockAKBlockABlockBBlockB3BlockC ON! NQOAnotherwaytoexpressthis informationistoshowthedecla-QOrationthatgovernseachnameineachofthe calculations,asO5follows:| OUseofName DeclarationofName ObIn Calculation#1 X Y KZ S1 AbLOCAL OWN OWNKROUTINELOCALb(BlockB)(BlockA)(BlockA)K(BlockA)(BlockB)_In Calculation#2 X Y HZ S1 A _OWN OWN OWNHROUTINE (undeclared)_(BlockA)(BlockA)(BlockA)H(BlockA)\In Calculation#3 X Y EZ S1 A \OWNMACRO OWNEROUTINE (undeclared)\(BlockA)(BlockC)(BlockA)E(BlockA)>ZIn Calculation#4(Sameasin Calculation#2) Ou[11OAsecondexampleofscopefollows:*L8O+"8KKXN# $$## $H $# $H % $ ' % $ H &) $$BH $) #BH &1%1OD#PD#$%$%*))11  @@@    @@@@@@G " @HHHQ"0@#HHHI  @ $$GHH @ $HHHJ | @ $HHHJ  @ $ HHHLQ" @ $ H@" @ $$ @# @@@@G HHHQ HHHI 0#GHH@? $$HHHJ @? $HHHJ  $HHHLQ? $ H> $ 0 $$ @#@@@@@@@@@@@@@@@@@@@@@@@@$@@$@@@$@@$@@$@0#@? $$@? $@ $@? $ @@> $ @B0 $$@E{$ {$#@@@@H@@O@@RP@@RP@@@@@@#<@H ("B"@H @$ B"@A B@H @$ B"@H " B"@H ""B"@'!<"@@@@@"8@"D@D@andthe routine-bodyofaroutine-declaration.'BlockEistheCOimplicitblockthat surroundsthebodyofaloop.WJOThisexamplecontainsten declarations.,Fiveofthedec-KO larationsare implicit., Specifically,the formal-nameXisMO5 implicitlydeclaredinBlockB;the formal-namesX,Y,andRONare implicitlydeclaredinBlockC;andthe loop-indexIisQO implicitlydeclaredinBlockE.Thescopesofthe declarationsO>areasfollows: O Declaration Scopeof Declaration O bX Y S2 KX S3 X 3Y N Y Ib(inBlockA)(inBlockA)(inBlockA)K(inBlockA)(inBlockB)(inBlockA)3(inBlockC)(inBlockC)(inBlockC)(inBlockD)i(inBlockE)-bBlockAexceptBlocksBandC$BlockAexceptBlockCBlockAKBlockBBlockABlockC$3BlockCexceptBlockDBlockCBlockDBlockE O! _BOUnlikeallother declarations,theMAP declaration redeclaresYOaname;thatis,it establishesanewsetof attributestobeusedNO5witha previouslydeclareddatasegmentname.'Thus,thetwoPO declarationsofYinBlocksCandDrefertothesamedataOsegment.w @ ?As5O9.1BTheAllocation-Unit-BLISS-16/32OnlyLOUAnallocation-unitcanbeusedinadata-declarationoraGObind-data-declaration.+Anallocation-unitcanappearei-MOtherasan independent attributeorasanallocation-actualGO^ parameterwithinastructure-attribute(as describedinOChapter11).*OzO} }SKOAnallocation-unitisusedwhereverthe``granularity''ofOOstorage allocationmustbe specified.)ExamplesoftheuseofDO5allocation-unitsinthe declarationofnamesfollow: O OWN4 !A&is&a%scalar&data%segment%composed A:%WORD;% !of%one%word%(16%bits).Ok GLOBAL4k !B&is&a%vector&data%segment%composed= B:%VECTOR[10,BYTE];p!of%ten%one-byte% elements.O LOCAL4 !C&is&a%scalar&data%segment%composed d C;,d !(by%default)%of%one& fullword.AO9.1.1BSyntaxrO16/32Only )O]allocation-unit 8 < Y:LONGWORD*BYTE 9 = Y; (32Only|O9.1.2BDefaultFO4Thedefaultallocation-unitisWORDfor BLISS-16,andOLONGfor BLISS-32.O9.1.3B RestrictionJO4Asshowninthesyntaxdiagram,theallocation-unitLONG)OisvalidforBLISS-32only. QOAnallocation-unit(usedasan attribute)mustnotbeusedin=Othesame declarationasastructure-attribute.NPOIfa declarationcontainsbothanallocation-unit(usedasanMO attribute)andaninitial-attribute,thentheallocation-unit0O5mustprecedetheinitial-attribute.MkO9.1.4B SemanticsQO4Anallocation-unit specifiesaquantityofstorage,asfollows:qGOLONGf32bitsO]WORD[16bitsOBYTE8bitsWNOIfthe declarationofanamedoesnotcontaina structure-GO attribute(and is thereforeascalar declaration),!theHO5allocation-unit determinesthequantityofstorageallo-OOcatedfortheentiredatasegment.*Ifthe declarationhasaMOstructure-attribute,the attributecanincludean allocation-5O>unitasoneofitsallocation-actuals.A @B9O9.2BTheExtension-Attribute-BLISS-16/32OnlyNOULikeanallocation-unit,anextension-unitcanbeusedinaIOdata-declarationorabind-data-declaration.(An extension-LO attributecanappeareitherasan independent attributeorHO^asanallocation-actualwithinastructure-attribute(asO describedin Chapter11).* zO FOExamplesoftheuseofanextension-attributefollow: O OWN4D !A%is%a%scalar%data%segment&composedP A:%SIGNED&WORD;!DP !of&one%signed%word.O GLOBAL4D !B%is%a%vector%data%segment&composed> B:%VECTOR[10,BYTE,SIGNED];!of&10&signed%bytes.Ok LOCAL.Dk !C%is%a%scalar%segment%composed C:%UNSIGNED%BYTE;#D !of&one%unsigned%byte.AO9.2.1BSyntaxuO16/32Only )O]extension-attribute KsnESIGNEDUNSIGNED 8so! O9.2.2B RestrictionOO4Anextension-attribute(usedasan attribute)mustnotappearAOinthesame declarationasastructure-attribute.|MRO9.2.3BDefault:O4Thedefaultextension-attributeis UNSIGNED.! rO9.2.4B SemanticsIO4Anextension-attribute specifiesthevalue extensionruleNOtousewhenfetchingthecontentsofascalarfieldvalue.QOSIGNED specifiesthatthehighorderbitofthefetchedvalueTO=(thesignbit)istobeused.'UNSIGNED specifiesthatzerobitsOaretobeused.NLOTheextension-attributeisnormally specifiedin combinationJOwiththeallocation-unitBYTEin BLISS-16,andwithBYTE!O5orWORDin BLISS-32. B AC2'O9.3BTheStructure-AttributeHOUAstructure-attributecanbeusedinadata-declarationFOorabind-data-declaration.0It associatesthedeclaredEO data-segmentnametoa separatelydeclared structure-JO^ definition,causingthe allocationofthe data-segmenttoJObe controlledbythatstructure-definition.+ Subsequentac-POcesstothe data-segmentisalso controlledbythe associatedNOhstructure-definition.)(Astructure-definitionisdeclaredinaGOstructure-declaration.+BLISSprovidesseveral predeclared3Ostructure-definitions,as describedinChapter11.)*OinIOAnexampleoftheuseofastructure-attributefollows: O OWNP X:% VECTOR[8]; HOThestructure-attributehereis VECTOR[8].*The attributeJO specifiesthatXisa data-segmentwithaVECTORstruc-FO5ture.)The predeclaredstructure-definitionnamedVECTOROis describedin^Section11.10.-eIn accordancewiththatdefini-TOtionplustheallocation-actual,8, specifiedinthe attribute,XRO>is allocatedasasequenceofeightfullwordelementsthatareHO designatedX[0]throughX[7].+(InBLISS-16or BLISS-32,MOanallocation-unitcanbeusedasan additional allocation-MOHactual,forexample,VECTOR[8,BYTE],tospecifythesizeof$Otheelements allocated.)*^P? IOAstructure-attributecannamea user-declared structure-PO definitionaswellasoneofthe standard, predeclaredstruc-O5tures describedin5Chapter11.-5Inanycase,theinterpretationNOofthestructure-attributedependsentirelyonthe structure-AO declarationthatgovernsthegivenstructure-name.*Oji@OForexample:O GLOBALP Y:% MATRIX[10]; WIOThestructure-attributehereis MATRIX[10].)The attributeOO specifiesthatYisaMATRIX structure.'BLISSdoesnothaveKO5apredeclarationforthenameMATRIX; therefore,thisex-IOamplemustoccurinthescopeofanexplicit STRUCTUREIO declarationofMATRIX.Theinterpretationoftheexample>O>dependsentirelyonthat STRUCTURE declaration.boundaryonly,ratherthanatanybyteboundarywhichisSOthedefault.'Useofthis attributecanresultinunusedstorageLOleftbetweenthe previously allocateddatasegmentandtheboundaryofoneormore allocationunits:(Thusall addressesMOarebyte boundaries,everyotheraddress (relativetozero)LOisawordboundaryaswell,andinBLISS-32everyfourthAOHaddressisalsoalongword boundary,andsoon.VNOBydefault,adatasegmentis allocatedatanaddressoff-VOsetthatis ``natural''foreitheritssizeortype;forexample,KO5a word-sizescalarisalignedtoaword boundary,andaLO structuredsegmentisalwaysfullwordaligned,whateveritsO allocationunit.X .LOIn BLISS-16,wherethevalueofboundarymaybe0or1,QOtheonly meaningfuluseofthealignment-attributeistoforceKO5 byte-sizescalaritemstoaword boundary, presumablyforFOreasonsof execution efficiencyinspecial situations.! WCOInBLISS-32theboundaryvalueforOWNandGLOBALJOdatasegmentsislimitedonlybyphysical-storageconsid-JO5 erations.+Further,thealignment-attributecanbeusedtoPOspecifyasmalleraswellasalargerboundarythanthede-TOfault(exceptforbyteitems, obviously), essentiallyforpurposesAO>ofstorage compactionversus execution efficiency.! lHOAdatasegmentdeclaredinaLOCALor STACKLOCALdec-LOlarationis allocatedinthecurrent stackframe.+ThestackIO5handling mechanismimposescertain restrictionssuchthatHOthe alignment specifiedforaLOCALor STACKLOCALdataGOsegmentcannotexceedalongwordboundaryin BLISS-32.! NOAnexampleoftheuseofanalignment-attributeinBLISS-32Ofollows: Oa OWN X:% ALIGN(3);H! JOInthisexamplethealignment-attribute, ALIGN(3),directsNOthecompilertoallocate data-segmentXinsuchawaythatUO5itsbinaryaddressoffsetendsinatleastthree0s.*ThatistoQOsay,itdirectsthecompilertoalignthesegmenttoaquad-LOword boundary.' Dependingonwhere availablestoragebegins,NO>thecompilermustleavefromzerotosevenbytesofunusedFOstorageinordertosatisfythis alignment attribute.GEH! n$O9.7BThePreset-AttributeBOUApreset-attributecanbeusedinanOWN,LOCAL,2O STACKLOCAL, REGISTER, GLOBAL-REGISTER,:OEXTERNAL-REGISTER,orGLOBALdata-declarationJO^thatdeclaresa structured data-segment.,ItallowsstaticROinitializationof individualfieldsofa structured data-segment.ZLOApreset-attributesuppliesaninitializationvalueforoneOOormorefieldsofadata structure,onevalueper specifiedNO5field.*ThesevaluesareassignedtothedatasegmentbeforeKOprogram executionbegins.* Unspecifiedportionsofthedata&Osegmentaresettozero.g=NOAnexampleoftheuseofPRESETisgiveninthe followingKOprogram fragment, involvingablock structuredefinedwithO5 field-names:#O FIELD%LINK_LIST_ITEMS%=  SET( I LL_VALUE&=%[0,0,%BPVAL/2,0],.  LL_TYPEK=%[0,%BPVAL/2,%BPVAL/2,0],%  LL_LASTK=%[1,0,%BPVAL,0],$ ! LL_NEXTK=%[2,0,%BPVAL,0] i TES;AO GLOBAL% LLIST_HEAD%:&BLOCK[3]&FIELD(LINK_LIST_ITEMS), PRESET(% [LL_NEXT]K=% LLIST_HEAD,#b [LL_LAST]K=% LLIST_HEAD,! [LL_VALUE]&=%-1%)%;vROInthisexampletheoriginblockofalinkedlistisinitial-VOizedwithsuitablevalues;notethatthelistofpresetvaluesisNO5order independent.)TheLL_TYPEfieldissettozerobyde-LOfault.((The predeclaredliteral%BPVALusedintheexampleOisdefinedinSection14.1.5.)*?AO9.7.1BSyntaxOpreset-attribute#KPRESET( preset-item,=... )O preset-item"K[ctce-access-actual,...]= preset-valueOctce-access-actual Kn* compile-time-constant-expression field-name oO preset-valueK expression 1 OC O1^mForOWNandGLOBAL declarationsthe preset-valuemustbea link-timecon-TOstant expression.ForLOCAL, STACKLOCAL, REGISTER,GLOBAL REGISTER,[O"andEXTERNALREGISTER declarationsthe preset-valuecanbean executableOe expression.*OThe field-nameisdefinedinfChapter11.*fOO9.7.2B RestrictionHO4Withinthe declaration(OWN,LOCAL,andsoforth),theKOpreset-attributemustbeprecededbyastructure-attribute.! NOOIfany preset-itemcontainsa field-name,thepreset-attributeOOmustbeprecededbyafield-attribute designatingthatfield-O5name.nMOThepreset-attributeandinitial-attributecannotbeusedin!Othesame declaration.w MMOA declarationcannotcontainmorethanonepreset-attribute.NNOThepresetvaluesmustnotoccupymorestoragethanisal-QOlocatedforthedatasegment,andthefields describedbythe(O5 preset-itemscannotoverlap.! aIOWhen expanded,thestructure-referenceformedbyconcate-MOnatingthe declarationnamewiththe bracketed access-actualRO5listofa preset-itemmustonlyyielda link-timeconstantex-FOpressionforanOWNorGLOBAL declaration.+ThevalueKOofthat expressionmustbewithintherangeof addressesOO> allocatedtothe data-segment.+Also,ifthat expressionisaMOfield-reference,itmustconformtothedialect-specificre-NO strictionsonfield-referencesusedinan assignmentcontext,OHas specifiedinWHSection11.2.*W ?)O9.7.3BDefaultMO4Whenapreset-attributeappearsinoneofthe declarations,POanyportionofthesegmentnot describedbya preset-itemis)Osettozeroson allocation. O9.7.4B SemanticsJO4The declarationname(OWN,LOCAL,andsoforth)iscon-OO catenatedwitheach preset-item,inturn,andthe expressionsMOsoformedare evaluatedasiftheywere assignmentexpres-QO=sions.'The resultingvaluesareplacedinthedatasegmentatROthetimeitis allocated.(Anyportionsofthe data-segmentnotIO explicitly initializedby preset-itemsaresettozeros. O9.7.5B PragmaticsOO4TheuseofthePRESET attributeisthe preferredmethodforGO initializing nonscalardata-segments,althoughsomesim-JOple VECTOR-type structurescanbe initialized convenientlyKO=withtheINITIAL attribute.+Initializationofmosthetero-KOgeneous structureswiththeINITIAL attributeis,however,@O impracticaloratleastan error-prone practice. NOONotethatapsect-allocation attributecanbeusedtoconve-MOnientlyassignan initialized data-segmenttowrite-protectedO5storage;see5Section9.8.*|? NCOAssignment-expressions involvingastructure-referenceMOastheirleftoperandare,ineffect, evaluatedduringtheOO5initializationprocessandmustmeetthe following conditions:]! 3L`1.:Mustbe resolvableatlinktimeforanOWNorGLOBAL( declaration.O`2.:Mustresultonlyinstoresto locations allocatedtothe5named data-segment(withno spillover).Q`3.:Mustresultin assignmentsthatarevalidfortheintendedJtargetsystems,intermsoffieldsizeand word-boundaryQ1 constraints(ifany).(Forexample,inalldialectsafieldtoNbestoredinto(orfetchedfrom)maynotbelongerthana fullword. NOOThespecific restrictionsonfield-references(thetypicalre-OOsultofstructure-reference expansions)arefully describedinO5Chapter11.*OOWQOThese restrictionscomeintoplayonlyinthecaseofarel-LOatively complicated structure,suchasonewhose definitionJO5containsaroutinecallorperformsbounds checking,forOOexample.(Theyposenoproblemfortheinitializationofpre-GOdeclared structuresandother comparablystraightforward$O> user-declared structures.THGI)/O9.8BThePsect-Allocation AttributeOOUThepsect-allocation attributecanbeusedin declarationsofHO permanent data-segmentsandin declarationsof routines.MOIt specifiesthenameoftheprogramsectioninwhichtheJO^declared data-segmentorroutine(codesegment)istobeIO allocated.+Programsectionsandthepsect-declarationareO describedin Chapter18.* O A IOThepsect-allocation attributeprovidesamore convenientDOmeansofmakingprogram-section assignmentsforOWN,FO5GLOBAL,andcodesegmentsthanispossibleusingtheMOpsect-declarationalone.)Amajoruseofthepsect-allocationJO attributeisfor assigninganOWNorGLOBAL data-segment6O>towrite-protectedstorage.'Forexample:O GLOBAL%LITERALD  MAIN_POWER%=&0,& AUX_POWER%=&1,&PRIMARY_BYPASS&=%2,MS VALVE_1%=&3,&VALVE_2%=%4,% SECOND_BYPASS&=%5,%DUMPER&=%6,! OFF&=%0,%ON%=%1&;CO GLOBALK STARTUP_STATE%:% BITVECTOR[7]KPSECT(%$PLIT$%)'L PRESET([MAIN_POWER]=%ON%,  [AUX_POWER]=%OFF&, [VALVE_1]j =%ON%,$ [VALVE_2]j$ =%OFF&,%l [PRIMARY_BYPASS]&=%OFF&,# [SECOND_BYPASS]K=%ON%, [DUMPER]j =%OFF&)%;F KOThisfragmentofasupposedprocess-controlprogramestab-QOlishesacontroltableof symbolicallynamedbinaryvaluesforOO5usebyseveralmodulesand,becauseitscontentshouldneverMObe modified,itis allocatedinthe$PLIT$program-section,LObymeansofthePSECT attribute.'$PLIT$namesthedefaultLO>programsectionforPLITstorage,whichisgiven read-onlyLOaccess protection(if availableonagiventargetsystem).AO9.8.1BSyntaxU3Opsect-allocationPSECT( psect-name)O psect-namename: VO9.8.2B RestrictionsKO4Thepsect-allocation attributecanappearinthe followingAOdata-androutine-declarationsonly:,FORWARD,OWN,9OGLOBAL, EXTERNAL,FORWARDROUTINE,ROUTINE,.O=GLOBALROUTINE,EXTERNALROUTINE.(JOThe psect-name specifiedinthe attributemusteitherbeFOa predeclared,defaultprogram-sectionnameorbeex-NO5plicitlydeclaredinapsect-declarationbeforeitsuse(seeOSection18.1).4QIf specifiedinaFORWARDorFORWARDBOROUTINE declaration,the psect-namemustmatchtheMO> psect-name explicitlyor implicitly associatedwiththecon-DOtrolling declarationofthe data-segmentorroutine.*OP? O9.8.3BDefaultsRO4Ifnopsect-allocation attributeis specified,thenthedeclaredKOdata-or code-segmentis allocatedintheprogramsectionOO establishedbythemostrecentpsect-declarationfortheseg-IO=ment'sstorageclass(OWN,GLOBAL,orCODE),orinthe1O appropriatedefaultprogramsection.4 V O9.8.4B Semantics?O4In declarationsotherthanEXTERNALorEXTERNALKOROUTINE,thepsect-allocation attributecausesthedeclaredKO data-segmentor code-segmenttobe allocatedinthenamedO=programsection. q=OInEXTERNALandEXTERNALROUTINE declarations,MOthepsect-allocation attributeinformsthecompilerthattheLO5declaredsegmentis allocatedinthenamedprogramsectionKOofanothermodule (presumably),andany attributesdefinedPOforthatprogramsectioninthecurrentmodulearetoapply.0 ! `O9.8.5B PragmaticsKO4Whilethepsect-allocation attributeneednotappearinaAOFORWARDorFORWARDROUTINE declaration,itsspec-RO ificationinthose declarationscan favorablyaffectthequalityQO=ofcode generatedforthesegmentin question, particularlyinKOthecaseofFORWARDROUTINE.(Notethatthereisnode-HOfaultprogram-sectionname associatedwithaFORWARDor)OGFORWARDROUTINE declaration.) NLOThepsect-allocation attributeis essentiallya convenience,JOallowingyoutomoreeasilyachievewhatwould otherwise?O5requirerepeatedusesofthePSECT declaration. I HJ   &O9.9BTheVolatile-AttributeIOUAvolatile-attributecanbeusedinanydata-declarationPOotherthanaREGISTER declaration.(Itcanalsobeusedina Obind-data-declaration.q ! GMOForpurposesof optimization,thecompilerassumesthattheNOcontentsofadatasegmentwillbechangedduring executionMO5ineitheroftwoways:,byan assignmentorbyaroutine-QOcall.)Thevolatile-attribute specifiesthatthecontentsoftheJOdeclareddatasegmentcanchangeinathirdway:,byanRO>actionthatisnotdirectly specifiedinthemodulebeingcom-OOpiled.*This attributecausesthecompilertoassumethattheNOvalueinthedeclareddatasegmentcanchangeatanytime.KOH ConsequentlythecompiledcodemustfetchthecontentsofNOthatdatasegmentanewforeachfetchintheBLISSprogram conventionforBLISS-compiled routines.m  CMOThelinkage-attributeissimplyaname;itisthedeclara-SOtionofthatnamethat specifiesthelinkagetobeused.'BLISSBO5includesseveral predeclaredlinkage-names..Linkage-KO declarationsand predeclared linkage-namesare describedinOChapter13.* OOB!O9.11.1CSyntaxw"M)Olinkage-attribute linkage-nameO linkage-namename#O9.11.2C RestrictionsHO4A linkage-namemustbeoneofthe predeclaredlinkage-DOnamesormustbegovernedbyalinkage-declaration.k$! ACOA linkage-attributegivenfora routine-nameinan5OEXTERNALROUTINE,FORWARDROUTINE,BIND@O5ROUTINE,orGLOBALBINDROUTINE declarationmustPObethesameasthelinkage-attributegiveninthe correspond-9OingROUTINEorGLOBALROUTINE declaration.%O9.11.3CDefaultsIO4Thedefaultlinkage-attributeisthe predeclaredlinkage-GOnameBLISSforBLISS-16or BLISS-32,andthelinkage-(OnameBLISS36Cfor BLISS-36.&O9.11.4C SemanticsDO4Alinkage-attribute associatesa linkage-namewithaHO routine-name.*Thus,thelinkage-attribute indirectlycon-KOtrolsthelinkage-relatedcode generatedforaROUTINEor?O=GLOBALROUTINE DECLARATION,andthecodegener-VOatedforallcallstotheroutine, accordingtothe definitionof'Othe specified linkage-name. L KM ' $O9.12CTheRange-AttributeMOUTherange-attributecanbeusedinaliteral-declarationorLOexternal-literal-declaration.'These declarationsare described OinChapter14.*'O (MOA literal-name designatesaconstantvaluethatisusedasQOdatabutisstoredintheobjectcoderatherthaninadataLO5segment.)Whenthecompilerisprovidedwith sufficientin-RO formationandtheliteralvalueissmallenough,ashortfieldIOcanbe generatedforthevalueratherthana fullword.)! NOOTherange-attribute specifiesthequantityofstoragerequiredWOforaliteraland indicateswhetherthefieldistobe interpreted6O5asasignedorunsignedrepresentation.*!tGOAnexampleoftheuseoftherange-attributefollows:-O EXTERNAL%LITERAL&X:& UNSIGNED(4);+! aVOTheeffectofthis attributeinaBLISS-32contextisasfollows.PO (Analogouseffectswouldbeobtainedonothertarget systems.)MO5Atthetimethemodule containingthis declarationiscom-QOpiled,itisassumedthatthevalueofXcanbe accommodatedPOinaliteral-operand specifier,andcodeis generatedonthatLO> assumption.)Then,whenthemodulesarelinked,acheckisMOmadefor agreementoftherange-attributewiththeexternalQOvalueandthevalueofXisthenplacedintheemptyfieldsOHprovidedforit., zLOSupposethe following declarationappearsinanothermodule!Oofthesameprogram:2Oa GLOBAL%LITERAL%X&=%12:& UNSIGNED(4);- WKOThis declarationnotonly specifiesthatX designatestheUOvalue12,butalsothatitcanbestoredasanunsignedintegerLO5infourbits.,This attributeboth documentsthatarange-NO attribute assumptionexistsinanothermoduleoftheprogramKOandallowsthecompilertoverifythatthe assumptionisO> satisfied.B.O9.12.1CSyntax/*Orange-attribute n SIGNED UNSIGNED o( bit-count)O bit-count* compile-time-constant-expression"0O9.12.2C RestrictionO4Thevalue, 4 n74,of bit-countmustbeintherange1 g4 4n 4PO%BPVAL.Thatis,thefield specifiedcannotbelongerthanaO fullword.1MUO9.12.3CDefaultfaultrulesspecifyanaddressing-mode-attribute(ifoneisnotOgiven explicitly).5! aEOAnaddressing-mode-attributecanbegiveninanOWN,BOGLOBAL,FORWARD,orEXTERNAL declaration, described O5in5Chapter10,/v5orinaROUTINE,GLOBALROUTINE,inaPSECT declaration(>Section18.1),>andinaSWITCHES j O9.13.3C SemanticsNO4Thecompiler translateseachuseofadataorroutinenameOintoane encodedaddress3.)AnencodedaddressconsistsofanO encoding-typeOfollowedbya8 displacement.(The encoding-typeIO= specifiestheaddressing-mode-attributeandotherinforma-OOtion,whilethe displacementisanaddressspecification.)TheLO encoding-typealwaysoccupiesonebyte,whilethe displace-MOGmentoccupiesanumberofbytesthatis determinedbytheDOaddressing-mode-attribute.(Theaddressing-mode-attributeIO instructsthecompilerinthe preparationofanencoded OQaddress,asfollows:>?!  OO Attribute#K InstructiontoCompiler OObGENERAL=KbLetthelinkermakethechoicebetweenusing=Karelative displacementoranabsolutevalue.;KProvidefourbytesforthe displacement,orto representarelativeaddress.)TheABSOLUTE attributeisQOusedfornamesthat designate addressesthatarefixedintheQOaddressspace,suchassystemservice routines,deviceregisterIOH addresses,anddata.)TheGENERAL attributeisusedwhenOOthechoicebetweenanabsoluteorrelativeaddresscannotbe"Omadeatcompiletime.BNMO6A  2O9.14CTheWeak-Attribute-BLISS-32OnlyPOUTheweak-attributecanbeusedina declarationthathasei-EOtherGLOBALorEXTERNALinitskeywordphrase.)SuchEO declarationsare describedinthe following chapters.B EOTheweak-attributeaffectsthewayinwhichtheVMSGOLinkerandVMS Librarianprogramshandleglobalnames.KO5(Thisis discussedfurtherunderEXTERNAL declarations,inOSection10.4.3.)*BOP?|BCO9.14.1CSyntaxeDv;O32Only K)O]weak-attributeWEAKEO9.14.2C SemanticsLO4Theweak-attribute specifiesapropertyofanameforuseLObythelinkerand librarian programs,as describedinthe(Omanualsforthose programs. P OQ?G!O 10.2Data! DeclarationsHOAdata-declaration describesoneormoredata segments.JOTaken together,thedata declarationsofaprogramspec-OOBifythestoragerequiredforthedataonwhichthatprogramO operates.H bPOThedata-declarationscanbedividedintothree categories,asOfollows: I S `  A$ permanent6 declarationbeginswithOWN,GLOBAL,orC( EXTERNAL.It describesadatasegmentthatremainsB allocated throughoutthe executionoftheprogram. `  A! temporary8 declarationbeginswithLOCAL, STACKLOCAL,4Y REGISTER,GLOBAL REGISTER,orEXTERNALH REGISTER.It describesadatasegmentthatexistsonly7 duringeach executionofagivenblock. `  AnU overlay;k declarationbeginswithMAP.It describesaIdatasegmentthathasbeendeclared elsewhere,butthat<:isgivennew attributesbythis declaration.JJOAdata-declarationprovidessomeorallofthe following@O informationabouteachdatasegmentit declares:K!  `  Thex name!]ofthedatasegment. `O  OThezO address8Oofthedatasegment,whichis determinedMbythekindof declarationandbysomeofthe attributes.LTheaddressofthedatasegmentbecomesthevalueoftheYdeclaredname. `  Thev scope@>ofthenameofthedatasegment,whichdependsL1onthepositionofthe declarationwithintheprogramand)onthekindof declaration. `   Thex  longevity< ofthedatasegment,whichis determinedbyAathekindof declaration (permanentor temporary). `  The| attributes4ofthedatasegment,whicharegivenK9aspartofthe declarationandbythedefaultrulesfor attributes.L`LOThe attributes applicabletodata-declarationsare described OinChapter9,;Jexceptforthestructure-attribute,whichisO5 describedin5Chapter11/5alongwithotheraspectsofdataKO structures.)Thesyntaxdiagramfordata-declarationsisasOfollows:*LnO*LOMOdata-declaration 8 > > W< > 7> :s+own-declarationsxglobal-declarationsforward-declarationsexternal-declarationsalocal-declaration sstacklocal-declarationsregister-declarationsImap-declaration O9 O> O> OW= O> O7> O;{QPR9N  O10.1COwn-DeclarationsIOUThestorageforanOWNdatasegmentis permanent;thatOOis,itiscreatedbeforeprogram executionbeginsandexistsCO throughoutprogram execution./Thescopeofanown-JO^ declarationisits immediately containingblock (includingQOany lower-levelblocks contained therein).'Thatistosay,theLOnameofanOWNdatasegmentcanbeusedonlywithinthe-Ohblockinwhichitis declared..O*JOAnexampleofanown-declarationinaroutine-declarationOcontextfollows:Oa ROUTINE&KILO%= BEGIN  OWNz9 X:& INITIAL(0); X%=&.X+1;- IF%.X%LEQ&1000%THEN%1&ELSE%0 END;PNMOThedatasegmentnamedXis allocatedand initializedonlyOOonce,beforeprogram executionbegins.)Itcanbereferredto=O5bythenameXonlywithintheroutineKILO.BQO10.1.1CSyntax8R+Oown-declarationpOWNown-item,... s;Oown-itemQown-name +8 +k< +:':" own-attribute}'...unothing 9 k= ;Oown-namenameO own-attribute 8 v> > N< > .> :allocation-unitQextension-attributestructure-attributefield-attribute:alignment-attributeinitial-attributepreset-attribute"psect-allocationpvolatile-attribute 9 v> > N= > .> ; (16/32Only Q(Q16/32Only :(:16/32OnlyHSO10.1.2C RestrictionsTfO BLISS-16/32OnlyJO4Astructure-attributemustnotappearinthesamedecla-KOrationasanallocation-unitoranextension-attribute.-IfJOthe declarationcontainsbothanallocation-unit attributePO>andaninitial attribute,theallocation-unitmustprecedetheOinitial-attribute.UoQOAfield-attributecanappearonlyina declarationthathasaOstructure-attribute.VNOOIfthe declarationcontainsbothastructure-attributeandanJOinitial-attribute,thestructure-attributemustprecedetheO5initial-attribute.WNNOIfthe declarationcontainsbothastructure-attributeandaIOpreset-attribute,thestructure-attributemustprecedetheO5preset-attribute.XlMOAninitial-andapreset-attributemustnotappeartogetherOinthe declaration.YhMOThe declarationmustnotcontainmorethanoneinitial-orOpreset-attribute.Z! NKOIfthepreset-attributecontainsa field-name,thepreset-QO attributemustbeprecededbyafield-attributethat designatesO5the field-name.[O10.1.3C SemanticsIO4Thedatasegment designatedbyanamethatisdeclaredJOOWNis allocatedinthecurrentprogramsectionforthe1OstorageclassOWN,as describedinVSection18.1.7ProgramMO=sectionsforthestorageclassOWNarecreatedbeforepro-IOgram executionbeginsandarenot discardeduntilafter+Oprogram executionis complete.*[V? 8\GOThedatasegmentforanOWNnameisalways allocatedJOatthelowestpossibleaddresswithintheunusedportionHO5ofthecurrentOWNprogramsection,afterallowingfor5Oaddress-alignment requirements(ifany).;]LOIn BLISS-16,datasegmentslargerthanonebyteareallo-JOcatedateven addresses,whichmayleaveanunusedbyteGO5 precedingthedatasegment.+One-bytedatasegmentsare4O allocatedatthenext availablebyte.L^ "EOInBLISS-32theaddressmustbe consistentwiththePOalignment-attribute,whichiseithergiven explicitlyordeter-KO5minedbydefault.'Thealignment-attributemaydictatesome+Ounusedbytes,as describedinfSection9.5.*^fP{?_NOInBLISS-36therearenospecial alignmentrules;eachdataAOsegmentis allocatedatthenext availableword.j` @KOBecauseOWNdatasegmentsare allocatedinthisway,theMOaddressofoneOWNdatasegmentcanbe calculatedrelativeOO5tothatofanother,providedthatbothsegmentsaredeclaredGOinthesamemoduleand allocatedinthesameprogramOsection. aNJOWhenthestorageforanOWNdatasegmentiscreatedbyVOthelinker,itissettozeros.*IfthedatasegmentisgivenanVO5initialvalueinthe declaration,itis initializedbythelinker.R QSb )#O10.2CGlobal-DeclarationsKOULikeanOWNdatasegment,thestorageforaGLOBALdataMOsegmentis permanent;thatis,itexists throughoutprogramJO execution.)IncontrasttoanOWNdatasegment,thenameLO^ofaGLOBALdatasegmentcanbeusedinseveralseparateQOblocks;thatis,intheblockinwhichitisdeclaredGLOBALFOandineachblockinwhichitisdeclared EXTERNAL.>cGOUsuallytheblockinwhichanameisdeclaredGLOBALLOisinonemoduleandtheblocksinwhichitisdeclaredEO5EXTERNALareinothermodules..Inthisway,adata K> KN< K> K.> K:allocation-unit*extension-attributexstructure-attributefield-attributealignment-attribute`initial-attributepreset-attributepsect-allocationIvolatile-attributeweak-attribute 89 8v> 8> 8N= 8> 8.> 8; ( 16/32Only "( "16/32Only  (  16/32Only ( 32Onlyog VEO10.2.2C Restrictions#O4Anameisdeclaredas4 global(n4whenthe declarationbeginsDOwiththekeywordGLOBAL,exceptforGLOBALREGISTERO(seeSection10.8).6Anamemustnotbedeclaredasglobal+O=morethanonceinaprogram.*g?h 6OAllthe attribute restrictionsgivenin}Section10.1.2valsoapply#OtoGLOBAL declarations.*h}F?Si O10.2.3C SemanticsIO4Thedatasegment designatedbyanamethatisdeclaredMOGLOBALis allocatedinthecurrentprogramsectionforthe4OstorageclassGLOBAL,as describedinSection18.1.ProgramJO=sectionsforthestorageclassGLOBALarecreatedbeforeLOprogram executionbeginsandarenot discardeduntilafter+Oprogram executionis complete.*i? jWJOThedatasegmentforaGLOBALnameis allocatedintheFOsame predictablewayasthedatasegmentforanOWNFO5name.* Therefore,a programmercan determinetherela-JOtive addressesofanytwoGLOBALdatasegmentsthatareMOdeclaredinthesamemoduleandare allocatedinthesameO>programsection.$k GOAGLOBALdatasegmentcanbeaccessedbynamewithinVOthescopeofthe declarationofitsname.(In addition,itcanbeNO5accessedwithinthescopeofanyexternal-declarationofitsOname.WVX )%O10.7CRegister-DeclarationsQOUAregisterdatasegmentisadatasegmentthatisalwaysal-UOlocatedinageneral register.(Inmostother respects,itistheMOsameasaLOCALdatasegment.)Ifthe declaration specifiesQO^aregisternumber,thedatasegmentis allocatedinthespec-POified register.* Otherwise,thedatasegmentis allocatedina.Oregisterchosenbythe compiler. < R >  :allocation-unitQextension-attributestructure-attributefield-attribute: initial-attribute preset-attribute z 9 zz> z= zR > z ;  (N 16/32Only Y(NY16/32OnlyO10.7.2C RestrictionsSO4Thevalueoftheregisternumber,if specified,mustbeinthe2Orangegivenbelowforeachdialect: 'OFor BLISS-16:W0through5(O]For BLISS-32:W0through11POFor BLISS-36:W0through12,ifthe governinglinkage-attribute:b$isBLISS36C(the default), FORTRAN_FUNC,orbq FORTRAN_SUB.Hb1and3through15,ifthe governinglinkage-attributeb8isBLISS10BbThegeneralruleforBLISS-36isthattheregis-CbternumbermustnotspecifyaregisterinuseasDbMthestackpointer,theframepointer,ortheargu-Cbmentpointer(if applicable).$Thelinkage-definitionAbthatgovernstheroutine containingthe register-Db6 declarationcontrolsthe assignmentof registersforbtheseuses.& JOAregister specifiedbyregister-numbermustbe PRESERVEDPOorNOTUSEDinthelinkageofanyroutinecalledinthecon-RO5tainingblockifthecalloccurswithintheusefullifetimeofROtheregisterdatasegment(thatis,ifthecalloccursbetweenJOthefirstandlastpossible referencestothat segment).YFOAregisterdatasegmentmustnotoccupymorethanaO fullword.vLLOAregister-declarationmustbe containedina routine-body. WOOSupposethe routine-bodyofagivenroutine,routineA,con-ROtainsthe declarationofanotherroutine,routineB.IfanameLO5isdeclaredREGISTERinroutineAandisnotdeclaredinOOroutineB,thenthenamecannotbeusedinroutineB.SuchPOusagewouldbean ``up-level'' referenceandisnot permitted(O>forregisterdata segments. 6OAllthe attribute restrictionsgivenin}Section10.1.2valsoapply%OtoREGISTER declarations.*}F?S cNOAnamedeclaredinaregister-declarationmustbeusedonlyQOastheoperandofafetch expressionorasthefirstoperandMO5ofan assignment expression.*(This restrictiondoesnotap-LOplytocertainmachine-specific-function parameters;seethe+O applicableBLISSusermanual.)O10.7.3C SemanticsPO4Ifaregister-numberisgiveninthe declarationofaregis-POterdatasegment,thenthedatasegmentis allocatedinthatMO register.+During executionoftheroutinethatcontainsthePO= declaration,theregistercanbeusedforother purposes,butOOnonethatconflictwiththevaliduseofthe allocateddataOsegment.b8NOAregisterdatasegmentissimilartoalocaldatasegmentVOinthatitiscreatedonentrytotheblockinwhichitisde-NO5claredandreleasedonexitfromthatblock,andcannotbeFO referencedfromany lower-level contained routine-body. O10.7.4C PragmaticsIO4Standardregister-nameswith appropriate predefinedvaluesNOare provided,asbuilt-innames,foreachBLISSdialect.*InNOordertousethesenameswiththeir predefinedvalues,they;O=maybedeclaredinaBUILTIN declaration(=Section18.3).GOThebuilt-inregister-namesandvaluesareasfollows:*?c V, OBLISS-16BLISS-32 NameValue@ Name Value O; R0 R1 ?R2 R3 R4 (R5 uSP PC 0 1 ?2 3 4 (5 u6 7 @R0 @R1 @?R2 `. `. `(. @uR11 @AP @FP @^SP @PC 0 1 ?2 . . (. u11 12 13 ^14 15 O^W4OBLISS-36ONLYJO4Thebuilt-inregister-namesSP,FP,andAPare provided.LOThevaluedefinedforeachnamedependsuponthelinkage-NO definition associatedwiththeroutineinwhichthenameis!O>declaredBUILTIN(see>Chapter13).*OXWY ,O10.8CGlobal-Register-Declarations OUA)U globalregisterdatasegment.Uisadatasegmentthatiscre-SOatedand allocatedinagivenregisterinoneroutine,andcanOObemade availableforuseinotherroutinesthatarecalledMO^bythe declaringroutine.)GlobalregisterdatasegmentsareKO identifiedbyname,andboththecallingandcalledrou-KOtinemustagree(throughamatchingsetof register-andLOhlinkage-declarations)thata particularglobalregisterdata!Osegmentis available.NMOAglobalregisterdatasegmentisthesameasanordinaryKOregisterdatasegmentwithrespecttoitsusewithintheO5 declaringroutine.X.BOAGLOBALREGISTER declaration establishesthenamePOandactualregister assignmentofaglobalregisterdataseg-RO5mentandcreatesthestorage(thatis, allocatesthe register).SOForthedatasegmenttobe availabletoacalledroutine,thatCOroutinemustspecifythesamenameinanEXTERNALDO>REGISTER declarationandmustspecifyboththenameHOandregister-numberintheGLOBALlinkage-optionofits(O governinglinkage-definition.BO10.8.1CSyntax9 Oglobal-register-0 declaration,KGLOBALREGISTER register-item,... U;O$ register-itemK$ register-name=register-number D8 < :h:!register-attributeh...nothing D9 = ;O( register-nameK(name;Oregister-number compile-time-constant-expressionOregister-attribute K;8 K> K< K> K:5allocation-unitextension-attributestructure-attributefield-attributejinitial-attributepreset-attribute ;9 > = > ; =(=16/32Only (16/32Only-! O10.8.2C RestrictionsJO4Theregister-numberis constrainedbythe containingrou-QOtine'slinkageas describedforordinaryregisterdatasegments'Ointhefirst paragraphofSection10.7.2,$butisalso constrainedLO=bythelinkage-definition governinganycalledroutinethatJOreferstothedeclaredglobalregisterdatasegment.-The9O inter-routine requirementsare describedinChapter13.*?*OYFOAregisterdatasegmentmustnotoccupymorethanaO fullword.! ]NOAglobal-register-declarationmustbe containedinaroutine-Obody. WOOSupposethe routine-bodyofagivenroutine,routineA,con-ROtainsthe declarationofanotherroutine,routineB.IfanameKO5isdeclaredGLOBALREGISTERinroutineAandisnotde-QOclaredinroutineB,thenthenamecannotbeusedinroutineOOB.Suchusagewouldbean ``up-level'' referenceandisnot3O> permittedforregisterdata segments. 6OAllthe attribute restrictionsgivenin}Section10.1.2valsoapply,OtoGLOBAL-REGISTER declarations.*}F?SgIOAnamedeclaredinaglobal-register-declarationmustbeTOusedonlyastheoperandofafetch expressionorasthefirstLO5operandofan assignment expression.)(This restrictiondoesIOnotapplytocertainmachine-specific-function parameters;5Oseethe applicableBLISSusermanual.)0! TOIfthelinkage definitionofacalledroutine specifiesaglobalOOregisterdatasegment,thentheroutinecallmustbeintheQO5scopeofaglobal-orexternal-register-declarationofthedataOsegment.uWKO BLISS-16/36ONLYVO4IfacalltoaroutineoccursinthescopeofaglobalregisterJOdatasegment,thentheregisternumberofthedataseg-FOmentmustbegivenineithertheGLOBALorPRESERVEJO>linkage-optionofthecalled routine'slinkage definition.jOBLISS-32ONLYKO4IfacalltoaroutinewithCALL linkage-typeoccursinNOthescopeofaglobalregisterdatasegment,thenthereg-LOisternumberofthedatasegmentmustbegivenineitherDO>theGLOBALorPRESERVElinkage-optionofthecalled)O routine'slinkage definition.x NOOIfacalltoaroutinewithJSB linkage-typeoccursintheNOscopeofaglobalregisterdatasegment,thenthe register-JO5numberofthedatasegmentmustbegivenineithertheIOGLOBALorNOTUSEDlinkage-optionofthecalled routine'sOlinkage definition.! O10.8.3C SemanticsMO4Aglobalregister-declarationcausesaregisterdatasegmentTOtobe allocated.)AglobalregisterdatasegmentisalocaldataKOsegmentjustlikeanordinaryregisterdata segment-itisOO=createdonentrytotheblockinwhichitis containedandMOreleasedonexitfromthatblock.)However,unlikeanordi-POnaryregisterdatasegment,aglobalregisterdatasegmentisQOG availableincalledroutinesundercertain conditions, described.ObrieflybelowandmorefullyinChapter13.*bO! aPOInordertopassaglobalregisterdatasegmenttoacalledQOroutine,thelinkage-definitionofthecalledroutinemustcon-KO5tainthenameandregister-numberofthedatasegmentinJOitsGLOBALlinkage-option.(Theremaybemoreglobalreg-QOisterdatasegments availableatacallthanare specifiedinPO>thelinkageforthecall;however,everyglobalregisterdataLOsegment specifiedinthelinkagemustbe availableattheROcall.'Onlythoseglobalregisterdatasegments specifiedinthe suitable,aMAP declarationisusedtooverridethese defaults.>OThisuseofamap-declarationis discussedinChapter12.*ZOtCO10.10.1CSyntaxBOmap-O0 declarationMAPmap-item,... J;O$map-item$$map-name:" map-attribute$...Omap-namenameO map-attribute :8 <  :allocation-unit@extension-attributestructure-attributefield-attribute)volatile-attribute c:9 c= c ; (716/32Only @(7@16/32Only O10.10.2C RestrictionsNO4Amap-declarationmustliewithinthescopeofanotherdec-OOlarationofthesamename.(Thelatter declarationmustbea9Odata-declarationorabind-data-declaration.NDO BLISS-16/32only:.Astructure-attributemustnotap-KOpearinthesame declarationasanallocation-unitoranO5extension-attribute.oQOAfield-attributecanappearonlyina declarationthathasaOstructure-attribute.! O10.10.3C SemanticsNO4The declarationofanameasMAPchangesneitherthevalueOOofthenamenorthecontentsofthedatasegment designatedOObythename.)Instead,thestoragewhoseaddressisgivenbyLO=thedeclarednameisre-interpretedin accordancewiththe6O attributesgiveninthemap-declaration.}\e[]! 2O11.1C IntroductiontoData StructuresPOUTheBLISS facilitiesfor user-defineddata structureshavetheO following benefits:! 5w `1. GeneralityD9.(Ifaspecific applicationrequiresadatastruc-L(turethatis differentfromany predefineddata structure,Lyoucandefineanewdata structurethatfillstheneed. `2. FlexibilityA.,Ifaspecific applicationrequiresa differentFYrepresentationforanexistingkindofdata structureL(forexample,onethatrequireslessspace),youcanpro-F videanewdata structurethatprovidestherequiredcrepresentation. `3. Machine independence-.,IfaprogrammustdependonJ:the architectureofthecomputerinordertosavespaceIor executiontime,that dependencecanbe localizedandK concealedwithinthe appropriatedata structure definition. `k4.k CheckingCk.(If referencesmustbecheckedforvalidity(forJexample,vector subscriptinrange),an appropriatecheckGcanbebuiltintoa user-defined structure definition. ]LOThedesignforanewdata structurehasthreeparts:,theOOabstract definition,theconcreterepresentation,andthepro-IO5grammed description.*Theabstract definitionandconcreteOOrepresentationarepartofthedesignofaprogram;althoughOOtheymaybewrittendownaspartofthedocumentation,theyLO>arenotapartoftheBLISSprogram.+Ontheotherhand,QOthe programmed descriptionofadata structureispartofthe>OBLISSprograminwhichthe structureisused.v! LKOThis introductory discussionofdata structuresrequiresaROspecificexample; therefore,adata structurecalleda ``decimalTO5digitarray''iscarriedthrougheachsectionofthis discussion.EOTheconcreterepresentationand programmed descriptionMOfortheexample structureisfirstworkedoutfortheVAXFO>and BLISS-32.,Furtheron,concreterepresentationsandEO programmed descriptionsaregivenforthePDP-11and>O BLISS-16,andtheDECsystem-10/20and BLISS-36. AO11.1.1CTheAbstract DefinitionofData Structures O4An4 abstract definition8s4ofadata structure specifiesthestruc-ROture,content,andusageofa particular collectionofdatainSOtermsofits application,notintermsofa particularcomputerOO=implementation.+Indeed,the definitionisabstractonlyifitNOappliesequallytoallpossiblerepresentationsofthedata.bPOTheabstract definitionofadecimaldigitarraymightbeasOfollows:  A# decimaldigitarray1isacompactstoragerepresentationI(ofasequenceofdecimaldigitsthatpermits reasonably0quickaccessto individualdigits.4  KOThedecimaldigitarrayisnota predefined structureinNOBLISSanditisnotevenan especially important structure.VO5However,itistypicalofthesortofdata structurethatcanbeOreadilydefined.POTheabstract definitionofthedecimaldigitarray establishes=Ofourcharacteristicsofthedesired structure: SN`1.:Theword ``compact''assertsthattherepresentationcan-H(notwastespace, presumablybecausetherewillbemanyIdecimaldigitarraysorbecausesomeofthemwillhavemany elements.S`Y2.:Theword ``sequence'',aswellastheword ``array''intheLnameofthe structure, indicatesthattheelementsofthe"  structureareordered.P`3.:Thewords ``decimaldigit''indicatethateachelementcanKhavetendistinctvalues,andthesevaluesare associatedN:withthe characters``0'',``1'',andsoon,through``9''.5!  HbNotethatthischaracteristicassertsthateachelementB accommodatesarangeof10values(whichrequiresKsomewhatlessthanfourbits),notthateachelementac-Gl commodatesadecimaldigit charactercode(whichwould6requiresevenoreightbitsinASCII).O`D4.:Thephrase ``permits reasonablyquickaccessto individualKdigits''provides important informationabouttheusageofthedata structure.! VmEO11.1.2CTheConcreteRepresentationofData Structures O4The"4 concreterepresentation,74ofadata structure determinesPOwhichbitsofmemoryareoccupiedbythedataandhowthesePObitsare interpreted.'Thedesignoftherepresentationdepends-O=onthe followingconsiderations:s! IP`1.:Theamountofstorage availableforthe structure.)IftheQ( structureisbig,itshouldnotcontainalarge proportionofunusedstorage.P`2.:Theamountoftime availableforaccesstothefieldsofNYthe structure.'Ifthe structureisaccessed frequently,each#accessshouldbefast.M`13.:Theeffectoftherepresentationonprogram development.IIftheelementsmustbeaccessedduring debugging,that)accessshouldbe convenient.H`a4.: CompatibilitywithotherrepresentationsofthesameEdata.,Ifa commitmenttoagivenrepresentationhasHalreadybeenmade,itmaybe necessarytoacceptthat9krepresentationevenifitisnotoptimal.>ROThedesignofaconcreterepresentationis difficult, especiallyQOatthe beginningofaproject.*The facilitiesofBLISSpermitOO5youtochangeconcreterepresentationseasily,evenafterthe"Oprojectisunderway.qGJOThepossiblerepresentationsforadata structurecanbeEOranked accordingtotimeandspace requirements..TheMO5rankingcanbeginwiththosethathavecompactstoragebutNOslowaccessandproceedtothosethathavefastaccessbutO excessivestorage. KOAsanexample,sucharankingforthedecimal-digit-arrayPOdata structureontheVAXtargetsystemwouldbeasfollows:L "H`1.:Because32bitscan accommodateany9-digitdecimalN(number,thearraycanbestoredninedigitstoa fullword.KInthisrepresentation,however,accesstoasingledigitIrequires considerable computation (conversionofa32-bit=2binaryintegertoa9-digitdecimal integer).L`2.:Because4bitscan accommodate10distinctvalues,theM arraycanbestoredeightdigitstoa fullword.)Thisrep-Kc resentationrequiresa conversiontogetfromtheelementGvaluetoanASCII character,butthe conversionisa.simpleadditionorOR operation.M`3.:BecausetheASCIIcodesfordecimaldigitsnormallyoc-Kcupyeightbitseach,andbecausethebyteisanaturalMDunitofstorageontheVAX,thearraycanbestoredfourMdigitsper fullword.(Inthisrepresentation,abouthalfthe9storageiswasted,butaccessisquicker.H`u4.:BecausetheVAXworksbestonfullwordvalues,theJarraycouldbestoredonedigitper fullword.*Thisrep-M& resentationwastesalotofstorage,butprovidesthemost~rapidaccess.x NJORankingrepresentationsinthiswayisuseful,butsome-MOtimes difficult.)Manyconsiderationscanaffecttheranking,IO5forexample,bothvirtualandphysicalmemory managementOO strategies.(Therankingmightevenbe differentfor differentOmodelsoftheVAX.tJOOEachoftheseconcreterepresentationsiscorrectforcertainJO situations.+Fortheexampleunderconsideration,therep-NO5 resentationinitem2ischosen.,Thatchoiceis interestingSObecauseitleadstoadata structurethatisnot predefinedinOBLISS.OOTherepresentationjustchosenforadecimaldigitarraycan5Obe diagrammedfortheVAXasfollows:*BO+KKKhxx  Q Q  xx""""AQ"A B"!P"P"""   " A A!A>  AAx1@ RJ@ pJ@I^$H@$x`3rH8OThisdiagramdiffersfromthosegivenin/Section3.2. InOChapter3,Btheintentwasto representdata structuresinaJO5machine-independentway.*Here,theintentisto representLOthespecificlayoutofthedata structureinVAXstorage.*/F~?*OmO| ROOThediagramdepictsasequenceofbytesinVAXstorage.'TheUOfirstlineofthediagram(X[1]andX[0])isthefirstbyteal-9O5locatedforthearray.)Thesecondline(5 ...{5andX[2])istheGOsecondbyte.&Thethirdlinesuggests successivebytes. WPOThediagram representsaspecificinstanceofadecimaldigitQOarray.*ThenameofthearrayisX;thatis,thevalueofXSO5istheaddressofthefirstbyteofthearray.*ThenameXisPOwrittentotherightofthediagrambecauseoftheVAXcon-POventionofindexingbitsandbytesfromright(loworder)toO>left(highorder).! YMOThediagramshowsthatthefirstelementofthevectorisPOcalledX[0]andcontainsfourbits.'ThatelementoccupiestheQO5four low-orderbitsofthebytewhoseaddressisX.Thesec-NOondelementiscalledX[1]andoccupiesthefour high-orderVObitsofthebytewhoseaddressisX.ThethirdelementiscalledOO>X[2]andoccupiesthefour low-orderbitsofthebytewhoseNOaddressisX+1.'The remainingelementsofthe structureare*O designatedinasimilarway. cROThenameDDA(fordecimaldigitarray)atthetopofthedi-VOagramreferstothelayoutofthefieldsrelativetothestartingNO5addressofthe structure.(TherecouldbemorethanoneDDARO structureinstorageatagiventime,oneatXandothersatOother addresses..DO11.1.3CThe Programmed DescriptionofData StructuresLO4Oncetheabstract definitionandconcreterepresentationofNOa structurehavebeen designed,the facilitiesofBLISScanPObeusedtodescribeandusethe structure.)The principalfa-LO=cilitiesarestructure-declarations,structure-attributes,andMOstructure-references.(However,beforethese facilitiescanbe=O described,field-referencesmustbe considered.! $O11.1.3.1BField-ReferencesPO)Afield-referenceisaBLISS constructthatcan designateanyUOportionofstoragethatis%BPVALbitsorlessinsize.'Forex-OOample,afield-referencecan designateasequenceof15bitsMO3startingwiththesecondbitofthe addressableunitwhoseOaddressis3116.!^8OAfield-referencehasthe followingform:&O addr&<%pos,%size,%ext%>uAKOaddr=O(Is interpretedasanaddressable-unitaddress.t OposOOIsthenumberof(least significant)bitsskippedbeforetheOqfieldbegins.lABOsize4O(Isthenumberofbitsinthefield.  OextPO#Is0or1, dependingonwhetherunsignedorsigned extension@O|isusedinfetchingthecontentsofthefield.>! N OThe extBw parametercanbeomittedifunsigned extensionis7O suitable.'Sign extensionis describedinSection3.1.3,andafull:O5 descriptionoffield-referencesisgivenin5Section11.2.*?*?)oE+O Restrictionsonthevaluesof^ addr , ? pos,and{ sizearediffer-MOentineachBLISSdialectbecauseof differing capabilitiesOO5ofthe respectivetargetarchitectures.+Brieflystated,field-JO referencesinBLISS-32can designateanyfieldofuptoHO%BPVALbitswithoutregardtoaddress boundaries;whileHO>field-referencesinBLISS-16andBLISS-36must designateJOfieldsthatare completely containedwithinone fullword.X R.MOTheBLISS-32field-referencesforthedecimaldigitarrayXO (diagrammedinSection11.1.2)areasfollows:(Oa X<0,4>!first&element,&X[0])O X<4,4>!second%element,%X[1](O X<8,4>!third&element,&X[2] O9 ... 9 ...*?qNOThefield-referenceforthethirdelementistypical;itis#O interpretedasfollows:! KFindthe addressableunit(VAXbyte)whoseaddressisX.P(Startatthe low-orderbitofthatunitofstorageandskipLforwardacrosseightbits.+Usethenextfourbitsasthefield.JOInthis definition,``skip forward''meansproceedtowardGOhigherorderbitsandtowardhigherstorage addresses. WJOField-referencescanhandleanymemoryaccessrequiredinIOBLISS.However,theyare dependentontheconcreterep-OO5 resentationofdata structures.)Thefeatures describedintheOO followingsectionsaredesignedtoconfinetheuseoffield-NO referencestoaspecialplace,thestructure-declaration,andNO>thuslocalizethe dependenceofaprogramonrepresentation._]*O11.1.3.2BStructure-DeclarationsFO)The followingprogramfragmentcontainsthe structure-EO declarationforBLISS-32decimaldigitarrays(DDAs).O STRUCTUREN DDA[I;&N]&=z [(N+1)/2]z DDA<4*I,4>; O& ... On OWN X:%DDA[10]; O ...OF X[5]&=%.X[6];IOThefirstfourlinesoftheexamplearethe structure-MO declaration.'Eachlinehasa differentpurpose,asfollows:! E`1.: ``STRUCTURE''isthekeywordforthe declaration.+`O2.:``DDA[I;N]=''givestheMO structure-nameO,DDA,andtheIformalnamesIandN.ThenameIbeforethe semicolonisan access-formal7,andisusedwhenaninstanceoftheIY structureis referenced.(ThenameNafterthe semicolonisan allocation-formal2,andisusedwhenaninstanceof( the structureis allocated."`3.: ``(N+1)/2''isthe5 structure-size$Iand determinesthenum-Nberof addressableunits(bytesinthiscase) allocatedfor-:eachinstanceofthe structure.`4.:``DDA<4 */I,4>''isthe structure-bodyandprovidesaGfield-referenceforeach referencetothe structureinJktheprogram.)(Notethat,becauseofdialect-specificdif-Iferencesinfield-reference limitationsnotedabove,thisM particularstructure-body definitionisvalidinthegeneral$ucaseonlyin BLISS-32.)! OOObservethatinthestructure-sizeandstructure-bodyafetchWOoperator( . )isnotusedbeforeaformalnametorefertotheOO5valueofanactual parameter.(Inthissense structureformal6Onamesarelikemacroformalnames(see7Chapter16) and.Ounlikeroutineformalnames(seeChapter12).*7PO3 *Ot)O11.1.3.3B Structure AllocationMO)Astructure-declarationdoesnotallocateany particularin-QOstanceofadata structure;itjust associatesanamewitha(O descriptionofa structure.|! sRSOAninstanceofagiven structureis allocatedwhenitsnameisSOusedinastructure-attributeinthe declarationofadataseg-LO5mentname.'The following declaration allocatesa 10-element=O instance,namedX,ofadecimaldigitarray: O OWNZ X:%DDA[10];a7JOThecompiler determineshowmuchstoragetoallocateforMOXbymakingacopyofthestructure-size, ``(N+1)/2'',re-MO5placingN,theallocation-formal,by10,and evaluatingtheSO expression.'Theresultis5,andthusfivebytesare allocated. WHOTheexamplestructure-size expressionisalsovalidforFOBLISS-16 (assumingan identicalconcreterepresentationOO5forDDA),becausetheaddressable-unitsizeisthesame.'TheFOstructure-size expressionrequiredfor BLISS-36,assum-MOingasimilarconcreterepresentationforDDA,isgiveninO>Section 11.1.3.7.*O?(O11.1.3.4BStructure-ReferencesIO)The following assignmentcontainstwoexamplesofrefer-:OencestothedecimaldigitarraynamedX:O X[5]&=%.X[6]; LOWhentheprogramis compiled,thefirststructure-referenceMOisreplacedbyacopyofthestructure-bodyfromthedec-JO5larationofDDA.Then,withinthestructure-body,DDAisPOreplacedbyXandIisreplacedby5.(Thesecond structure-KO referenceiscompiledinthesameway,exceptthatIis9O>replacedby6.'Theresultisasfollows:!O X<4*5,4>%=& .X<4*6,4>; MOTheactual-parameterofastructure-referenceneednotbeaPOnumeric-literalasinthisexample;itcanbeany expression.O5Forexample:O X[.J3]%=% .X[.J3+1]; zOOThis assignmentisexpandedbythecompilerintothefollow-Oing:+Oa X<4*(.J3),4>%=%.X<4*(.J3+1),4>;SOInthiscase,thefieldsselecteddependonthecontentsofJ34Oeachtimethe assignmentis executed.! NEOSimilarexamplesofthestructure-body expressionforHOBLISS-16and BLISS-36,assumingan identicalorsimilar=O5concreterepresentationforDDA,aregivenin5Section 11.1.3.7.*?.)#O11.1.3.5BREF StructuresMO)Itis sometimesusefulto manipulatethe addressesofdataNO structures.)Todothis,thecompilerneeds informationaboutLOthe structurestowhichthe addressesrefer.*Thisinforma-KO3tionissuppliedwiththeREFkeywordandan appropriatePOstructure-attributeinthe declarationofstorageforastruc-'Otureaddress.'Forexample:Oh STRUCTURE DDA[I;&N]&=z [(N+1)/2]z@ DDA<4*I,4>; O ... O OWN X:%DDA[10],` Y:%DDA[10]; O OWN ALPHA,8 PDDA:%REF&DDA[10]; O ...9O IF%.ALPHA%EQL&0%THEN%PDDA=X%ELSE%PDDA=Y;O PDDA[5]&=% .PDDA[6];e +;KOTheinterpretationofthefinal assignmentdependsontheOOvalueofPDDA,andthevalueofPDDAis determined,atrunOO5time,bythecontentsofALPHA.IfALPHAcontainszero,the9O assignmentis equivalenttothe following:O X[5]&=%.X[6];!U;_5GbThis declarationwas presentedastheonethatimple-Dmentsthechosenconcreterepresentationfordecimaldigitarrays. ` ;Asecond declarationofDDAisasfollows: STRUCTUREi_ DDA[I;&N]&=  [N] DDA<8*I,8>; _MbThis declarationprovidesforfasteraccesstotheelements.butusestwiceasmuchstorage. `: 2:Athird declarationofDDAfollows: STRUCTUREi DDA[I;&N]&= O [N] BEGIN? IF&I%LSS&0%OR%I%GTR%N-1&THEN% ERROR(DDA,%I); ' DDAo END<8*I,8>;v- {LLbThis declarationisorientedtoward debugging.' Specifically:!  MYItusesafullbyte(insteadoffourbits)foreachele-CY(mentofthearray.(Thusthe examinationofmemoryYiseasier.  KYItincludesacheckonthevalueofthe subscriptItoKYYmakesurethatitisintherangefrom0toN-1.'Thus?Ythisclassoferrorsisdetectedautomatically. ! ,KbThis declarationcanbeusedduringthe developmentofaKprogram,andoneoftheprevious declarationsofDDAcanJbeusedforthe productionversionofthesameprogram.`6LOThe debugging declaration illustratesan interestingfeatureKOof structures.*Supposethe followingprogramfragmentlies>O5withinthescopeofthe debugging declaration: O OWN X:%DDA[10],I Y:%DDA[20]; O ...O X[.J]%=&.Y[.K]; `QOThecompilerexpandsthe assignmentonthelastlineintothe O following assignment:Oa BEGIN@O IF%.J%LSS%0%OR%.J%GTR%9%THEN& ERROR(DDA,%.J); O DDAO9 END<8*.J,8> O  v v=O BEGINAO IF%.K%LSS%0%OR%.K%GTR%19%THEN% ERROR(DDA,&.K); OY DDAO END<8*.K,8>;ZOOThisexampleshowsthatthecompilersavesthevalueoftheJOallocation-parameter,N,eachtimethe structureisallo-VO5cated.)ForXthisvalueis10,forYitis20.)ThusthisvalueMOcanbeusedinthestructure-bodyand, eventually,ineachOstructure-reference.0! GO11.1.3.7BDecimalDigitArraysinBLISS-16andBLISS-36SO)ForapackedfourbitsperdigitdecimaldigitarrayinBLISS-OO36,a differentstructure-size definitionisrequiredfortheO followingreasons:Mr# ` IThesmallest(andonly) addressableunitinBLISS-36isH(the fullword,ratherthanthebyteasinBLISS-16and BLISS-32. ` DThe36-bitfullwordofBLISS-36can accommodateex-%Yactlynine4-bitdigits.h +>LOInsteadofthe BLISS-16/32structure-size expression``(N+1)PO/2'',which allocatesone8-bit addressableunitforeachtwoQO5elementsrequiredplusoneunitforanoddfinalelement,the@O following expressionis appropriatefor BLISS-36:O (N+8)/9NMOThisstructure-size expression allocatesone36-bitwordforMOeachnineelementsrequiredplusonewordforafinal(or-O5only)groupoflessthannine. NJOAsnotedabove,theBLISS-32structure-size expressionisNOalsovalidfor BLISS-16,sincethe respectivetargetsystemsTO5havethesamebasicstorage allocationunit(thatis,thebyte).! HOThestructure-body definitiongivenforDDAinBLISS-32MOneedstobemodifiedinbothBLISS-16andBLISS-36becauseSO5neitherofthesedialectsallowsthepositionvalueofafield-IO referencetoexceed%BPVAL(asitcanin BLISS-32).,InLOBLISS-16theDDAstructure-bodycanbedefinedasfollows:$Ok (DDA+I/2)<(I%MOD&2)*4,4>G PO Alternativestothis expression,whichare logically equivalentUObutbetterintermsofobjectcode efficiency,arethe following:.Oa (DDA+I/2)$O (DDA+I/2)<(I%AND&1)*4,4>&Ok (DDA+I/2)%<(I^2)&AND%4,4>NQOThese alternativesarelistedinorderof increasingspaceef-QO ficiency,althoughthefirst alternativeresultsinthefastestO5code sequence. z|FOInBLISS-36theDDAstructure-bodycanbedefinedasOfollows:$Oa (DDA+I/9)<(I%MOD&9)*4,4>!FOTo summarize,theBLISS-16andBLISS-36formsofthe:ODDAstructure-declarationarethe following:3""  ` For BLISS-16-U STRUCTUREi DDA[I;&N]&= [(N+1)/2]%- (DDA+I/2)<(I^2)%AND%4,4>; ` For BLISS-36-1 STRUCTUREiy DDA[I;&N]&= [(N+8)/9]$  (DDA+I/9)<(I%MOD%9)*4,4>#! WIOTheusermanualforeachBLISSdialect describes,underKO``Transportability Guidelines'',the developmentofgeneral-OO5ized,fully transportablestructure-declarations.'In particular,KOit describesageneral packed-vectordata structurecalledEO GEN_VECTORwhichproducesthesameconcrete represen-DO>tation describedhereasDDAonanytargetsystem.$ O11.1.4C ConclusionPO4All high-level languagesprovideyouwithasetof predefinedGOdata structures.)Some programming languagesprovidefa-TOcilitiesforthe definitionofnewabstractdata structuresbasedKO=on predefineddata structures.)BLISSgoesbeyondsuchfa-POcilitiesandprovidesforthe definitionofnewconcretedataO structures. %NNOThus,whentheneedarises,youcanaccessstoragejustasHOfreelyasanassemblylanguage programmercan.*YoucanKO5 designateany addresses,anyfields,anybitsinstorage.& KOThestructure-declarationisthe interfacebetweentheim-MO plementationofagivendata structureanditsuseinthePO5program.*Ononesideofthe interfaceliesthespecificlay-LOoutofthe structure,withmachine-specificdetailsandanOO appropriateconcernfor efficiency.)OntheothersideoftheJO> interfacearethemany referencestothe structure,eachLOtreatingitasan abstract,machine-independententity.*ForMOeachdata structure, communicationbetweenthetwosidesisPOHbyasinglename,suchasDDAusedfortheexampleinthisOsection.8' NOBecausethe predefined structuresofBLISSusethesamefa-NOcilitiesofBLISSas user-defined structures,theyprovideaPO5pointof departurefordata descriptionratherthan presenting"Oa restrictivebarrier.(JOTheBLISS facilitiesfordata structuresareunusualandJO relatively complicated.*Theydependonthe combinationofNO5thevarious declarations, attributes,and references described&Ointhischapter.,Sections11.10 andI11.11 showhowthesePO facilitiesarecombinedtodefineandusespecific structures.*(P?*(IP?9v]h\_)!  O11.2CField-ReferencesOOUAfield-reference designatesasequenceofupto%BPVALbitsSOofstorage.(Itisnormallyusedastheoperandofafetchop-MOeratorortheleftoperandofan assignment operator.*WithQO^certain restrictions,however,afield-referencecanbeusedin;Oanycontextthatrequiresanaddressvalue.*lKOStructure-declarationsusefield-referencestomap abstract,DOmachine-independent structuresinto concrete,machine-JO5specificstorageunits.+Thus,whensuitablyparameterized,NOtheysupportthewritingofprogramsthatare efficientandEOyet transportablefromonetargetsystemtoanother.+ BOField-references should be used only in structure-PO declarations.'Theuseoffield-referencesinanyothercontextJO5 introducesmachine dependenceina confusinganddisorga-Onizedway.~,T8OExamplesoffield-referencesaregivenin5Section 11.1.3.1.*,5F?p-MFO11.2.1CSyntax.O4SYNTAX:4ClicktodisplaySyntax.*-OO./yOOInadditiontothe syntacticrulesjustgiven,the following*O syntacticrulesare required:>0! rS`1.:Afield-selectoris associatedwiththeclosestfetchexpres-(sion.O`2.:Afield-selectorthatcouldbepartofeitheranassign-Nment expressionorafetch expressionispartofthefetchY expression.1zuNOAnexampleofan expressiontowhichrule1appliesisasOfollows:Oa ..BETA<8,8>2!ZCOThe expressionis correctly interpretedasfollows:O .(.BETA<8,8>)}3!S4! aROInthisexample,thegiven expressioniscomposedofonefetchNO expressionwithinanother,andrule1isneededbecauseoneNO5ofthefetch expressionsdoesnothaveafield-selector.+InTOthefirstinterpretation,thefield-selectorispartoftheinnerSOfetch expression,andis, therefore,appliedtothedatasegmentMO>whoseaddressisBETA.Inthesecond (nondefault) interpre-SOtation,thefield-selectorispartoftheouterfetch expressionOOand, therefore,isappliedtothedatasegmentwhoseaddressOHis.BETA.5zzNOAnexampleofan expressiontowhichrule2appliesisasOfollows:Oa .Q<0,8>&=%.A+16!_COThe expressionis correctly interpretedasfollows:O (.Q<0,8>)%=%.A+17!X%=%.A+18 vQOInthefirstinterpretation,thefield-selectorispartoftheQOfetch expressionandthe assignmentismade,bydefault,toaPO5 fullword.'Inthesecond (nondefault)interpretation,thefield-SOselectorispartofthe assignment expression,andthefetchis1Omade,bydefault,froma fullword.9 O11.2.2C RestrictionsPO4The restrictionsontheaddress, position,andsize expressionSOvaluesinafield-selectorare differentforeachBLISSdialect,Oasfollows:h:W>OBLISS-16ONLYVO4Thesizeofafieldmayrangefrom0to16bits, inclusive,butKOafieldmustnotcrossa machine-word boundary.*Thisim-WOpliestwosetsofspecific restrictionsontheposition( p )and.O>size( s )values,asfollows:;O`a.:Ifthefield-selectorisappliedtoan even-numberedbyteH(address(thatis,word-aligned),thenthe followingaretrue:?<r Y0  p Y(0 ( (s ( `(16 Y0  p+s v 16N`b.?Ifthefield-selectorisappliedtoan odd-numberedbyte4Yaddress,thenthe followingaretrue:= Y0  p Y(0 ( (s ( `(8 Y0  p+s v 8>! OBLISS-32ONLYMO4Thevalueofthesize expressioncanrangefrom0to32,MO inclusive,andthefieldso specifiedcancrossalongwordRO boundary.'More specifically,thereisno restrictiononthepo-MO>sition expressionrelativetostorage-address boundaries,and?Othe restrictiononsize( s )isasfollows:b?8 0  ]s  32i@ W?OBLISS-36ONLYMO4Thevalueofthesize expressioncanrangefrom0to36,SO inclusive,butthefieldso specifiedmustnotcrossamachine-OOword boundary.'More specifically,the restrictionsonposition8O>( p )andsize( s )areasfollows:A 0  ]p (0 ( ](s ( (36 0  ]p+s  636qBGGOThevalueofthesign-extension-flagmustbe0or1.C zNOAfield-selectormustnotbe immediatelyfollowedbyanother(Ofield-selector.'Forexample:!Oa .Z<0,16><8,2>&=%.BETADzQOThisisnotvalid.+ Parenthesescanbeusedtoavoidthisre-#O striction.'Forexample:#Oa (.Z<0,16>)<8,2>%=%.BETASE))OThisisavalid expression.F! yPONormallyafield-referenceistheoperandofafetchoperatorPOortheleftoperandofan assignment operator.'Whenafield-VO5 referenceisusedinanyotherway,itmustspecifyafieldthatMObeginsonanaddressable-unit boundary,whichisaposition6Othat satisfiesthe following conditions:G  ` KThevalueoftheposition expressionmustbe0or8inL( BLISS-16,mustbe0oramultipleof8in BLISS-32,and$mustbe0in BLISS-36. ` DTheaddress expressionmustnotbearegister-name. ` GThepositionandsize expressionsmustbe compile-time constant expressions.H! POWhentheaddressinafield-referenceisaregister-name,thePOfield-referencemustspecifyafieldthatliesentirelywithinPO5the designated register;thatis,theposition expressionmustTObegreaterthanorequalto0andthesumofthepositionandIOsize expressionsmustbelessthanorequalto%BPVAL.IM]O11.2.3CDefaultDO4Thedefaultvalueforthesign-extension-flagis0.<JVO11.2.4C SemanticsJO4Afield-reference specifiesafieldofuptoafullwordMO(%BPVALbits)insizerelativetoagivenstorageaddress.LOCertainaspectsofthefield-selector semanticsaredialectO= dependent.KNSOIn BLISS-16,thefieldis specifiedrelativetoabyteaddress,LOandthefieldmustbe completely containedinthemachine-O5word containingthegivenbyte.LNSOIn BLISS-32,thefieldis specifiedrelativetoabyteaddress,OOandthefieldcanoccuranywhereinstoragerelativetotheO5givenbyte.>M! SOIn BLISS-36,thefieldis specifiedrelativetoawordaddress,OOandthefieldmustbe completely containedinthegivenma-LO5chineword.* Dependingonthecontextinwhichitappears,OOafield-referencehasoneoftheinterpretationsgivenbelow.RO(Theserulesdonotapplytofield-referencesinthe structure-KO>bodyofastructure-declaration,becausethestructure-bodyQOisnot interpretedaspartofthe declarationofa structure;OOrather,theserulesapplywhenthestructure-bodyisusedinMOHtheinterpretationofastructure-reference,as describedinOSections11.7,=11.8, and11.9.)*Mc?*M=c?*Mc?N `  Fetchcontext;.-Ifthefield-referenceistheoperandof,(afetch expression(definedin (Section5.1),(havingthe followingform:*N ?GOY.e2field-selectorhP{>>bthenevaluatethefetch expressionasfollows:oQEE1.: Interprettheaddress expression,e2,asfollows:R Fia.:Iftheaddressisaregister-name,thencallthe(registerthe( selectedunit @(.ib.? Otherwise,let  a/1bethevalueoftheaddressex-? pression.)Locatetheaddressable-unitinstorageYwhoseaddressis GY a.wY.(Callthisaddressable-unitthe selectedunit .12.:Let 1 p@*1bethevalueoftheposition expression.*LocateYthesequenceof  p2bitsthatstartswiththe low-order?Ybitoftheselectedunit.'Callthesebitsthe. offsetfield .a3.:Let a sA*abethevalueofthesize expression.*LocatetheYsequenceof  s7Jbitsthat immediatelyfollowstheoffset(Yfield.'Callthesebitsthe selectedfield k.64.:Obtainafullwordvalueasfollows:S Hia.:Ifs=%BPVAL,fetchthecontentsoftheselected(field.Dib.?If0<s<%BPVAL,fetchthecontentsoftheIselectedfieldandextendittoafullwordasfollows:TJ>1.9Ifthevalueofthesign-extension-flagisbYcopiesofthesignbit (leftmostbit)ofthe)bselectedfieldattheleft.Ii1c.?Ifs=0,usethefullwordrepresentationofzero.eUr;M5.:UsethevaluejustobtainedasthevalueofthefetchY( expression. `  Assignmentcontext..1Ifthefield-reference istheEleftoperandofan assignment expression(definedinYSection5.1,'xYhavingthe followingform:*U|?MV##Ye1field-selector=e2mW{CCbthenevaluatethe assignment expressionasfollows:X ryS1.:Locatetheselectedfieldofstorage,relativetoe1,asin9Y(steps1through3forthefetchcontext.2.:Let  s=)bethevalueofthesize expressionandlet  v2 xbeHYthevalueoftherightoperand,e2,ofthe assignment4YY expression.'Storeavalueasfollows:lY Bia.:If 2 sq=%BPVAL,store  v2#cintheselectedfield.iOb.?If0< O s+ O<%BPVAL,storethe rightmost O sObitsof  v2#Gintheselectedfield.5i'c.?Ifs=0,donotstoreavalue.H3.:Usethefullwordvalueofe2asthevalueofthe!Y assignment expression. `~ ~ Othercontexts=~.'Ifafield-referenceappearsinsomeotherFcontext,thenevaluatethefield-referenceasfollows:ZA1.:Let  a@3bethevalueoftheaddress expressionandlet  pFY(bethevalueofthe position.'Computethe following:C[a+ p/%BPUNIT\! fk+YbObservethata restrictioninhbSection11.2.2ebrequiresHYthattheaddressmustnotbearegister-name,andtheYvalueof  p>mustbezeroor,inthecaseof BLISS-16/32,JYlamultipleof8,sothatthevalueof p/%BPUNITisanHYinteger.*AlsoobservethatthevaluesofthesizeandEYsign-extension-flag expressionsarenotused,butthe8Yv restrictionsonthesevaluesstillapply.N2.:Usethevaluejustcomputedasthevalueofthefield-YM reference.*\h%?9]gLOThe followingconsiderationsapplytotheinterpretationofOfield-references:&^! S ` LTheorderinwhichtheaddress, position,size,andsign-G(extension-flag expressionsare evaluatedisnotdefined(seesSection5.1.4). ` MThesign-extension-flagisignoredinallcontextsexceptaYfetch expression. ` GThe descriptionofthefield-referencejustgivenuses'1phraseslike ``sequenceof r1 p"1bitsthatstartswith1 ...1''and ``sequence T s.ofbitsthat immediatelyfollows ...''.(ThusLitassumesanorderingofbitsinstorage.)That ordering,=:basedonnumeric significance,isasfollows:*^sD?+_V 0OrderingforBLISS-16andBLISS-32 bBit0 . . K.Bit7Bit8 3. . .Bit15*bThe low-orderbitofbyten . .+The high-orderbitofbyten,The low-orderbitofbyten+1 3. . .-The high-orderbitofbyten+1 7` 'OrderingforBLISS-32Only bBit16 . . K.Bit23Bit24 3. . .,bThe low-orderbitofbyten+2 . . K.-The high-orderbitofbyten+2,The low-orderbitofbyten+3 3. . . a[ !tOrderingforBLISS-36 bBit0 . . K.Bit35*bThe low-orderbitofwordn . . K.+The high-orderbitofwordn  `8 F8Observethatin BLISS-32,althoughtheselectedfieldGcannotbelongerthan32bits,itcanoccuranywhereIinstorage,crossing boundariesbetweenbytes,words,orB longwords.db V:O11.2.5C DiscussionLO4TheBLISSbit numbering convention,definedabove,iscon-ROsistentacrosstheBLISS dialects:) bit-position0isalwaystheUO ``rightmost''orleast significantbitofthe specified addressable+O=unit,foralltargetsystems.c WOOSeveralaspectsoffield-referencesare discussedinthefol-NOlowing subsections.)First,someexamplesaregiventoillus-PO5tratevariouscases.)Second,the placementofafield-selectorTOinthe definitionofa structureis discussed.(Finally,thegen-HOeraland fundamental relationshipoffield-referencesto%O> expressionsis discussed.ed L;O11.2.5.1BExamplesKO)Field-referencesusedinfetchand assignmentcontextsarePO illustrated throughoutthischapteranddonotrequirefurtherIO elaborationhere.,However,field-referencesusedinother;O3contextsinvolvesomespecialconsiderations.eNOAsstatedin Section11.2.4,2afield-referencethatisnotinaKOfetchor assignmentcontextcomputesavalue accordingto"O5the followingformula:*e F?JCfb+ p/%BPUNITg POInBLISS-32andtoalimitedextentin BLISS-16,suchfield-PO referencesallowyoutocomputetheaddressatwhichafieldJO5begins.,SuchaddressvaluesmightbeassignedtoanotherKOdatasegmentforlateruseorpassedasactual-parametersQOofa routine-call.)Observethatthe restrictionsinsuchcasesSO>(the byte-addressisnotaregistername,positionandsizeareNO compile-timeconstantvalues,andthepositioniszerooraOOmultipleof8)assurethatthecompilercanverifythattheQOHfielddoesbeginatabyteaddressandhence,thattheabove%Oformulacanbe computed.Wh--OConsiderthe following examples:i  OOExampleComment OObA=XCbTheaddressofthedatasegmentXisassignedto A.O)A=X<0,8>C)TheaddressofthedatasegmentXisassignedto.wA(asintheprevious example).OA=X<10,12>Invalid:.#Thefield-referencedoesnot designatea4>fieldthatbeginsatabyteaddress.OA=X<8,8>InvalidinBLISS-36 M; yvalidin BLISS-16/32+."TheCaddressofthedatasegmentXplus1isassigned@StoA.Thisfield-referenceis equivalenttothe&field-reference (X+1)<0,8>.OA=X<.Y,1>Invalid<."Theposition expressionisnotacompile-Dhtimeconstantvalueand, therefore,thefieldmight+notbeginatabyteaddress. O j! WTOObservethatinBLISS-16the effectiverangeofp/8is0or1;QOin BLISS-32,therangeofp/8is unrestricted;and,inBLISS-UO536,therangeofp/36isalways0.' Consequently,thevalueofaQOfield-referenceinBLISS-36is effectivelythesameasthead-NOdresspartofthefield-referenceandtheterm ``p/%BPUNIT''IO>intheformulaforthevaluehasno practicalutility.k@O11.2.5.2BField-ReferencesinStructure-DeclarationsIO)The definitionofastructure-namecanincludeafield-2O referenceasthestructure-body(seeSection11.3),pbutwhenLOthestructure-bodyinvolvesablock,acommonerroristoPO3placethefield-selectorinsidetheblockinsteadof followingOtheblock.*kD?lbLOAnexampleofcorrect placementofthefield-selectorfol-,OlowingtheblockwasgiveninSection 11.1.3.6;itisrepeatedO5here:O STRUCTURE DDA[I;N]%= zI [N]z BEGIN?z IF&I%LSS&0%OR%I%GTR%N-1&THEN% ERROR(DDA,%I); z! DDAzi END<8*I,8>;*l?m MOSupposethelasttwolinesofthisexamplearewrittenasOfollows: Oa ...O DDA<8*I,8>O END;zn PLOThiscodehasaquite differentmeaningfromtheonein-LOtended.+Becausethefield-referenceis containedinsidetheQO5block,theruleforafield-referenceinacontextotherthanHOafetchor assignmentcontextalwaysapplies..WhenthePOstructure-referenceisusedinafetchor assignment,afull-MO>wordfetchor assignmentresults accordingtotherulesinOSection5.1B (assumingthatthe restrictionsonfield-references*Odonotresultinanerror).*nOZ|?o NPOAscanbeseeninthisexample,the placementofthefield-ROselector followingtheblockis essentialforthedesiredmean-O5ing.pCO11.2.5.3BField-Referencesand ExpressionsinGeneral8O)Consideragainthefirsttwoexamplesin)Section11.2.5.1 U)asOfollows:O A&=%XOo A&=%X<0,8>*p?dq! NUOInbothcases,theaddressofthedatasegmentXisassignedtoNOA.TheseexamplesdescribeaBLISSlanguagedesign principleCO5thattiesfield-referencesand expressions together.rNHOTheBLISSrules regarding expressionsanddatasegmentsOOgiven elsewhereinthismanualcanberestated(inpart)inO5the followingway:sJ`1.:The declarationofadatasegmentname associatesanI( implicit,defaultfield-selectorwiththename,whichis" determinedasfollows:t APa.:Ifthedatasegmentisascalar,thenthedefaultfield-1Y(selectoris<0,size,sign>where:u @~iKThesizevalueis,inBLISS-16and BLISS-32,<(amultipleof%BPUNIT determinedbytheex-Bplicitordefaultallocation-unit,andinBLISS-36.issimply%BPUNIT,thatis,36.DiYiiKThesignvalueis,inBLISS-16and BLISS-32,0For1 accordingtotheexplicitordefault extension-7  attribute,andinBLISS-36isalways0.Ib.?Ifthedatasegmentis structured,thenthedefaultDYfield-selectoris<0,%BPVAL,0>.*(Thisdefaultap-@Y:pliesonlywhenthedatasegmentnamedoesnot.Yappearinastructure-reference.)Kv !M`2.:Forany expressionotherthanadatasegmentname,theH(defaultfield-selectoris<0,%BPVAL,0>.+(ThisdefaultJappliesonlywhenthe expressiondoesnotappearastheBaddress-expressionofadefault-structure-reference.)wMO Accordingtotheserules,every expressioninaBLISSpro-MOgramcanbethoughtofashavingadefaultfield-selector.UxM +@OWhenthe semanticsforfield-referencesgivenin>Section11.2.4OOisappliedto expressionswithdefaultfield-selectorsasde-QO5scribedhere,the resultinginterpretationis equivalenttotheO semanticsgiveninChapter5.,The descriptiongiventhereisPOusedbecauseitissimplerandmore intuitiveforthecommonNO>cases.(The descriptiongivenherepresentsan importantpart5Oofthe conceptual foundationofBLISS.*x>F?J*xPmOyi9O11.2.5.4B OperationsonScalarFieldValuesMO)Whenallvaluesinvolvedina calculationoccupy fullwords,FOthe programminginvolvedis relativelystraightforward.CO Fullwords accommodate maximum-sizeBLISSvalues,andJO3 assignmentfromonefullwordtoanothernevermodifiesaOvalue.z aLOWhenascalarfieldvalue-avaluesmallerthanafullwordROandnotpartofadata structure-isinvolvedina calculation,LO5however,problemscanarise.)TheycanariseeitherthroughSO assignmentofalargevaluetothesmallfield,orthroughin-QOcorrect extensionofthecontentsofthefield.)AnexampleofNO>theformertypeofproblemisthe inadvertent assignmentofQOafullwordvaluetoafieldthatisnotlargeenoughtoac-MO commodatethe significantportionofthe fullword.( ObviouslyFOHsome significancewillbelostinthestoredresult.{OOThelattertypeofproblemcanbemoresubtle;forexample: O OWN P X;  Y; O ...O( X<0,8>%=%-1;Op Y&=%.X<0,8>%+&1; O ...i| ?MOForpurposesof discussion,assumethatthereissomegoodROreasonforusingan8-bitfieldrelativetoaddressX.BecausePO5thisfieldoccupieslessthana fullword,whenfetcheditisJOextendedbeforebeing incrementedandassignedtoY.AndSObecausethe extensionforthefieldisunsignedbydefault,theLO>extendedfieldvaluebecomes255ratherthan-1.*ThustheLOvalueofYbecomes256ratherthan0, presumablynottheOintendedresult.f}<LOTheprogramfragmentdoesnotviolateanyrulesofBLISS;NOitisvalid.+However,becauseitassignsanegativenumber,OO5-1,toafieldthatisby implication unsigned,theprogramSOfragmentisatleast ambiguousinitsintent,ifnot incorrect.~ NOO DependingonwhethertheresultobtainedwasorwasnottheOOone intended,theprogramfragmentcanbealteredinoneofO5the followingways:  ` HChangethenumeric-literalfrom-1to255.'ThischangeJ(doesnotaffectthevalueassignedtoY,butdoesmake;clearthattheresultistheexpectedone. ` HReplacethefield-selectorsshownwith<0,8,1>,indicat-IYingsignedvalue extension.+Thischangecauses0tobeassignedtoY. JOInBLISS-16or BLISS-32,theproblemsjust describedcanOOalsoarisethroughtheuseofanallocation-unitthatcausesSO5field allocationofascalardatasegment;thatis,throughtheFOuseofBYTEin BLISS-16,orBYTEorWORDinBLISS-SO32,asan attributeinadata declaration.+ThisisduetotheHO>implicit relationshipbetweenallocation-unitsandfield-HO selectors.-An equivalentprogramfragmentthatusestheMOBYTEallocation-unitratherthanexplicitfield-referencestoQOHproduceresults identicaltothose describedaboveisgiveninOSection5.1.5.3.*Oc?h_]`7! ) &O11.3CStructure-DeclarationsMOUAstructure-declaration describesthe organizationofadataRO structure.(It specifies(orimplies)afield-referenceforeveryROpossible referencetothe structureandthusdefinesthelayoutWO^ofthe structureinstorage.'Italso specifiesan expressiontobePOusedto determinetheamountofstoragetobe allocatedwhenOOa structureis associatedwithanameinadata-declaration.qMOAnexampleofastructure-declarationineachoftheBLISS$Odialectsisasfollows: ` In BLISS-16-U STRUCTURE+i VECTOR[I;&N,&UNIT=2,%EXT=0]&= [N*UNIT](- (VECTOR+I*UNIT)<0,8*UNIT,EXT>; ` In BLISS-32-1 STRUCTURE+iy VECTOR[I;&N,&UNIT=4,%EXT=0]&= [N*UNIT],  (VECTOR%+%I*UNIT)<0,8*UNIT,EXT>; ` In BLISS-36-  STRUCTUREiU VECTOR[I;&N]&=  [N] (VECTOR+I)<0,36>;NKOTheseare equivalent declarationsoftheBLISS predeclaredHO structurenamedVECTOR,buttheydonotdifferinanyHO5 significantwayfrom user-written structure declarations.! jQOThe access-formalinthis declarationisIandthe allocation-HOformalsareNand,in BLISS-16/32,UNITandEXT.UNITMO5andEXThavedefaultvaluesof%UPVALand0, respectively.HOIfinBLISS-16orBLISS-32aVECTORstructure-attributeLOdoesnotspecifyallocation-actualsforUNITandEXT,thenJO>thesedefaultvaluesareused.+Thestructure-sizeexpres-OsionisN *8UNITandthestructure-bodyis(VECTOR+ OI o*UNIT)<0,%BPUNIT * UNIT,EXT>.! kVEOObservethatintheBLISS-36VECTOR declaration,theAOallocation-formalsUNITandEXTarenot included.HO5ThisisbecauseBLISS-36doesnothavethe correspond-JOingallocation-unitandextension-attribute(usedindata-NO declarationsintheothertwo dialects),and thereforetheseOO>formal parametersareofno practicaluse.(However,iftheseFOformal parameterswere expressedintheBLISS-36dec-JOlarationandgiventheirdefaultvaluesof%UPVAL(1inFOH BLISS-36)and0(unsigned-extension), respectively,theNOBLISS-36 declarationwouldbenotonly explicitly equivalent-KOvaryingonlyinthedialect-specificvaluesof%UPVALand2OR %BPUNIT-butalso operationallyvalid.BO11.3.1CSyntaxn QDCOstructure-declaration STRUCTUREstructure-definition,... ;.Ostructure-definitionstructure-name [ 3|8 3< 3M: access-formal,...nothing #|9 #= #M; >8 >{< >:!7;allocation-formal,&7...nothing 9 {= ; b] = C8 C< Cz:[structure-size]nothing 9 = z;structure-bodyOallocation-formalallocation-name 48 <  :X=allocation-defaultnothing 49 =  ; OD 8 O < O :h structure-size structure-body D 9  =  ;  expression OT 8 O < O$ :W structure-name  access-formal allocation-name T 9  = $ ;u nameO8allocation-default*8 compile-time-constant-expression? `O11.3.2C RestrictionsIO4Aprimaryofastructure-size expressionmustbeeitherIOanallocation-nameora compile-timeconstant expression.KOWhena compile-timeconstant expressionis substitutedforJO=eachallocation-nameinthe expression,the resultingex-MOpressionmustbea compile-timeconstant expression.)IftheOOstructure-body expressioncontainsablock,onlythe following4OG declarationscanappearintheblock:i~OLOCALbEXTERNALLITERAL'O] STACKLOCALCEXTERNALROUTINEOREGISTERLITERALOPEXTERNAL`O11.3.3C SemanticsKO4Thestructure-size expressionofastructure-declarationisJOusedbythecompilerwhenthe structurenameappearsinNOastructure-attributeofadata-declaration.*It specifiesthePO=numberof addressableunitstoallocateforthedeclareddataOsegment.Q'KOThestructure-bodyisusedeachtimeastructure-referenceOOappearsinan expression.*It specifiesa replacementfortheKO5structure-referencethatconsistsofan expression.*ObserveBOthatafield-referenceisoneformof expression.pFOOTheuseoftheseportionsofthestructure-definitionisde-NOscribedinthe followingsectionsonstructure-attributesand O5storage allocation( 5Section11.4)#5andstructure-referencesO (Sections11.7,X11.8, and11.9).* ?*P?*XP?*P?i`_b)>O11.4CStructure-AttributesandStorage AllocationJOUTheformofadatasegmentis determinedwhenitsnameOOis declared.)Ifastructure-attributeappearsinthedeclara-LOtion,thenthatstructure-attribute determinesthe structureNO^ofthedatasegmentbothforpurposesofstorage allocationNOandaccess.)Ifnostructure-attributeappears,thenthedata2Osegmentisassumedtobeascalar. MOAstructure-attributeinthe declarationofanameprovidesOOtwokindsof information.'First,itprovidesastructure-nameMO5andthus associatesastructure-definitionwiththenameofLOthedatasegment.+Second,itprovidestheallocation-actualKO parametersforthestructure-definition,andthus specifiesRO>thenumberof addressableunitsofstoragetobe allocatedforOthedatasegment.! NIOObservethatthe parametersinastructure-attributearePO positional;thatis,theformalnamesgiveninthe structure-PO5 declarationarenotusedaskeywordsinastructure-attribute.WJOThecompletesyntaxand semanticsofthe declarationsinIOwhichastructure-attributecanappeararegiveninthe-O5chaptersondata declarations(5Chapter10)5andonbinding O(Chapter14).9zThissection describesonlythe structure-TO attributeitselfandhowitisusedto determinethesizeofa$O> structureddatasegment.*OG*PO pMFO11.4.1CSyntax.O4SYNTAX:4ClicktodisplaySyntax.*OOHO11.4.2C Restrictionsw! WMO BLISS-16/32ONLYPO4Anallocation-unituseddirectlyasan attributecannotappearMOinthesame declarationasastructure-attribute.* Similarly,LOanextension-attributeuseddirectlyasan attributecannotIO>appearinthesame declarationasastructure-attribute.IOUnlessthestructure-attributebeginswithREForisinEOan EXTERNAL,MAP,orBIND declaration,the followingOi conditionsapply:q! rGN`1.:Astructure-size expressionmustappearinthe definition"(ofthestructure-name.M`2.:Anon-nullallocation-actual parametermustbegivenforGeachallocation-namethatappearsinthestructure-sizeCY expressionanddoesnothaveanallocation-default.! NIOAnon-nullallocation-actual parametermustbegivenforLOeachallocation-namethatappearsinthestructure-bodyand2O5doesnothaveanallocation-default. ~O11.4.3C SemanticsQO4The allocationofa structureis performedbythecompilerasOfollows:E`1.:IfinBLISS-16orBLISS-32anallocation-unitorD(extension-attributekeywordappearsasan allocation-Iactual,itisreplacedbyaconstantvalueasfollows:1 KeywordReplacedby bLONGWORDBYTE b4 b(b32Only 2 1wSIGNEDUNSIGNED w1 0 J`e2.:Theallocation-actual parametersare evaluatedandtheHvaluesare associatedwiththe corresponding allocation-:namesinthe specifiedstructure-definition.H`3.:Anyallocation-namethatdoesnothaveavalueal-Jready associatedwithitfromstep2,butdoeshaveanHFallocation-defaultvalue,is associatedwithitsdefaultvalue.N`4.:Theamountofstoragetoallocateforthedeclaredname&wis determinedasfollows:c 9Fa.:Ifthestructure-attributeappearsinan EXTERNAL,DY(MAP,orBIND declaration,thennostorageisallo-Ycated.Fb.?Ifthestructure-attributebeginswiththekeyword@YYREF,thenonefullwordofstorageis allocated.Hc.? Otherwise,thestructure-size expressionis evaluatedHY1usingthevaluesthatare associatedwitheachoftheAYallocation-formalnames.)The resultingvaluespec-GYifiesthenumberof addressableunitsofstoragethatY:are allocated.K`5.:Thestructure-nameandthevalues associatedwitheachAallocation-namearerecordedwiththe data-segmentGknamebeing declared,forusewhenthe data-segmentis referenced.b`cE<"O11.5CField-DeclarationsNOUTheFIELD declarationisusedtodefinenamesoffieldsin@OBLOCKand BLOCKVECTOR predeclared structures,andIOin user-defined structuresthataresimilartoBLOCK.AGO^BLISS-36exampleofafield-declarationisasfollows:O FIELD+ DCB_FIELDS%= zs SETz DCB_A&=% [0,0,36,0],z DCB_B&=% [1,0,6,0],zK DCB_C&=% [1,6,12,0], z DCB_D&=% [1,18,18,0],z DCB_E&=% [2,0,36,0]z# TES;! WHOThe field-namesdeclaredhereareDCB_A,DCB_B,andsoMOon.)Eachnamecanbeusedasa parameterina structure-OO5 referenceto representasequenceoffouraccess-actuals.'ForKOexample,DCB_Acanbeusedto represent ``0,0,36,0''.+(InNOother examples,the field-namesmight representmoreorless&O>thanfouraccess-actuals.),! MOTheexamplefield-declarationalsoprovidesafield-set-name,LO DCB_FIELDS.Thisnameisusedtorefertothe field-namesOO5 collectively,when,forexample,theymustbe mentionedinaOfield-attribute.,MOThefield-declarationisaspecial-purposefacilitythatcanMObestbe explainedinthecontextofacompleteexampleofMO5 structure declarationanduse.*SuchanexampleisgiveninOSection11.10.3.*OP ? BO11.5.1CSyntaxA(Ofield-declarationFIELD nfield-set-definitionfield-definition Po ,... 8;Ofield-set-definitionfield-set-name= h_SEThfield-definition,~... hTESOfield-definition. field-name=[field-component,... C] Onfield-set-name field-name onameOfield-component* compile-time-constant-expression O11.5.2C RestrictionsLO4A field-namecanbeusedonlyasan access-actualparame-QOterofastructure-reference,a parameterofafield-attribute,6Oorinthe %FIELDEXPANDlexical-function. eQOAfield-set-namecanbeusedonlyasa parameterofafield-O attribute. gSOA field-namecannotbeusedforitsown definitioninafield-O component.{ QO11.5.3C SemanticsMO4Thefield-declarationdefinesnamesforuseas access-actualLO parametersofstructure-referencesto designatefixedfieldsSOinfixeddata structures.(Asa notational convenience,asetofPO=such field-namescanbedeclaredandreferredtobyasingleGOname.*Observethatboth field-namesandfield-set-namesHOfollowthenormalrules concerningscopeand uniquenessQOGofnames;thereisnoconceptlikethe ``qualifiednames''ofOCOBOLorPL/I.R (EOWhena field-nameappearsasan access-actualparam-POeterofastructure-reference,itisreplacedbythelistofLO5field-componentvaluesfromthefield-definition.'(Seeexam-Oplein1Section 11.10.3.5.)/ThesevaluesprovideoneormoreKOofthe access-actual parametersusedinthe evaluationofKO>thestructure-reference.*A field-nameneednotitselfsup-OOplyalloftheactual parametersrequiredforthe reference.LO(Whilethis replacementhassomeofthecharacteristicsofGOHamacro expansion, field-namesarenot macro-names;inRO particular,a field-nameisnotvalidincontextsotherthanaOstructure-reference.)*1PH?)+JOThefield-attribute specifiesthesetof field-namesthatIOcanappearinordinary-structure-referencesfortheindi-NO5cateddatasegment.+Ifnofield-attributeisgiven,thenno O field-nameisvalid.WCOAny field-namecanbeusedinageneral-structure-O reference.V c bd) O11.6CField-AttributesOOUAfield-attributeisusedinthe declarationofa structuredNOdatasegmentname;thatis,inthesame declarationwithaKOstructure-attribute.(Thefield-attributesupplies field-namesRO^forsomeorallofthefieldsinthe structureddatasegment,POeitherdirectlybylisting field-namesor indirectlybygiving4Ooneormorefield-set-names,orboth.iEOAnexampleoftheuseofafield-attributefollows: O OWN5P ALPHA:&BLOCK[DCB_SIZE]%FIELD(DCB_FIELDS);OOInthisexample,thefield-attribute associatesthe field-set-BOname DCB_FIELDSwiththedatasegmentnameALPHA.$LOLikethefield-declaration,thefield-attributecanbestbeKO explainedinthecontextofacompleteexampleofstruc-HO5ture declarationanduse..SuchanexampleisgiveninOSection11.10.3.*OP ? BO11.6.1CSyntax`Ofield-attributeFIELD( n field-namefield-set-name o S,... ) O(n field-nameGfield-set-name (oname aO11.6.2C RestrictionsJO4Althoughafield-set-namecanappearasafield-attributeMO parameterinadatasegment declaration,itcannotbeusedNOinastructure-referencetothedatasegment.(The individualLO= field-names associatedwiththefield-set-namemustbeusedOinstead.wQOAfield-attributecanbeusedonlyina declarationthatalso&Ohasastructure-attribute. O11.6.3C SemanticsRO4Afield-attribute specifiesthesetof field-namesthatcanap-LOpearinanordinary-structure-referencetothedatasegmentMOdeclaredwiththegivenfield-attribute.)Afield-set-nameinRO=afield-attributeimpliesadefinedsetof field-namesthatcanTOsoappear.&Ifnofield-attributeisgiven,thenno field-nameis(Ovalidinsucha reference.'edf! 2,O11.8CDefault-Structure-ReferencesGOUAdefault-structure-referenceisusedwhenan ordinary-EOstructure-referencecannotprovidetherequiredfield-PO reference.'ThisusageariseswhentheaddressoftheaccessedPO^datasegmentisan expression,sothatthenameofthedataJO(whichispartofanordinary-structure-reference)isnotHOknown.-Whenthisoccurs frequentlyinablockormod-ROhule,itcanbe convenienttogiveadefaultstructure-attributeJOinaswitches-declarationor module-switchtoprovidetheLO structure informationtobeusedforallsuch occurrences. NGOAnexampleofadefault-structure-referencehasalready0Obeengiveninthe introductionofSection11.7.Amoreexten-&O5siveexampleisgivenin5Section11.11.7.*?* ?lBO11.8.1CSyntaxhXOdefault-structure-0 reference&Kaddress[ access-actual,m... ]O$address K;n primaryYexecutable-function (;oOR access-actual K8 K< KO:} field-name expressionnothing (9 (= (O; O11.8.2C RestrictionsNO4Theaddressofadefault-structure-referencemustnotbetheMOnameofadatasegmentdeclaredwithastructure-attribute.PO(IftheaddressisthenameofadatasegmentdeclaredwithIO=astructure-attribute,thenthestructure-referenceisanKOordinary-structure-referenceandis interpretedas described OinSection11.7.)*? KOAdefault-structure-referencemustonlyoccurinthescope7Oofanonempty STRUCTURE switch-item(seeSection18.2).*?B NKOAn access-actual parametermustbegivenforeachaccess-GOformalnamethatappearsinthestructure-bodyofthe2O5 definitionofthedefault structure.MbO11.8.3C SemanticsGO4Adefault-structure-referenceis interpretedasfollows:! qN`1.:Usethedefaultstructure-attributetogetthe structure-G(bodyofthe associatedstructure-definitionandtogetItheallocation-actualvalues associatedwitheachofthe/allocation-namesofthe structure.L`Y2.:Ifthedefaultstructure-attributedoesnotincludetheFkeywordREF,then associatethevalueoftheaddressG ofthe structure referencewiththestructure-name.*IfEcthedefaultstructure-attributedoesincludethekey-LwordREF,thenfetchthefullwordcontentsoftheaddressIvalue,and associatetheresultwiththestructure-name.L`3.:Ifoneormoreaccess-actualsisa field-name,replaceDeach field-namewithitsdefinedsequenceoffield-CD componentvalues.*This replacementmayincreasetheDnumberof access-actual expressionsinthe resultingstructure-reference.L`u4.:Evaluatethe access-actual expressionsand associatetheHith access-actualvaluewiththeith access-formalnameM&inthestructure-definition.'Theorderof evaluationofthe0~access-actualsisnotdefined(see~Section5.1.4.F`5.:Evaluatethestructure-bodyusingthevaluesasso-EVciatedwitheachoftheallocation-formalnames,the: access-formalnames,andthestructure-name.O`. 6.:Usethe resulting expression(whichis typicallyafield->  reference)inplaceofthestructure-reference.*A?+O11.8.4C DiscussionIO4Default-structure-referencesareverysimilarto ordinary-DOstructure-references.'The differencesareasfollows:Z @0G`1.:Adefault-structure-referenceusesthe structurein-F( formation establishedinadefaultstructure-attribute,Candhence,mustoccurinthescopeofanonempty? STRUCTURE switch-item.+In contrast,an ordinary-@2structure-referenceusesthe structure informationH associatedwiththe declarationofadatasegmentnameLandis independentofwhetherornotadefault structure-%< attributeis established.J`2.:Adefault-structure-referencepermitsany field-nametoIbeusedasan access-actual parameter.)(Inthisrespect<litislikeageneral-structure-reference;seelSection11.9.)JThereisnowaytospecifyadefaultfield-attributetoIgowiththedefaultstructure-attribute.*In contrast,anDvordinary-structure-referencepermitsonlythosefield-Jnamesthataregiveninthefield-attributeofthedata'segment declaration.*/?DOObservethatwhenan ordinary-ordefault-structure-JO referenceoccursastheaddresspartofanotherdefault-KO5structure-reference,theinterpretationoccursfromlefttoLOright.+Thatis,structure-referencesofthe followingformsOare equivalent:5Ok exp[&actuals%,...%]K[&actuals%,...%]=O (&exp%[&actuals%,...%]&)K[%actuals%,...&]%<KOAlsoobservethatsuchastructure-referenceisaprimaryJOandis interpretedbeforeany operatorsareapplied.-For4O5example,the followingare equivalent:O X&=%.Y[1][2]O# X&=% .(Y[1])[2]l0OThe followingarealso equivalent:O X&=% ..Y[1][2][3] Oq X&=%..((Y[1])[2])[3]vL*OConsiderthe followingblock:O BEGIN*OP SWITCHES%STRUCTURE(VECTOR[10]);O OWN%X; O ...O( X[0]&=%1;( !Valid Op ...  BEGIN"  SWITCHES& STRUCTURE%(); H ...  X[0]%=%1; !Invalid  ...   END Oh ... O ENDNOOThe declarationofXinthisexampledoesnot associatetheFOstructure-attribute VECTOR[10]withX.SegmentXisaGO5scalarbydefaultandis allocatedasingle fullword. QOThefirst occurrenceofX[0],inthefifthlineoftheexam-JOple,isavaliddefault-structure-reference..ItcannotbeCO5anordinary-structure-referencebecauseno structure-QO attributeis associatedwithX.Thesecond occurrenceofX[0],QOinthetenthlineoftheexample,isinvalidbecausethede-QO>faultstructure-attributeisemptyand,asbefore,thereisnoJOstructure-attribute associatedwithX.Asanotherexample,*Oconsiderthe followingblock:Ot BEGIN+O SWITCHES%STRUCTURE(VECTOR[100]);!O OWN%X:KBITVECTOR[20]; OL ...O X[.I]%=&1; O ...O$ (X)[.I]&=%1; Ol END `EOInthis example, the structure-reference X[.I]isan@Oordinary-structure-referencebecausethe structure-GO5 attribute BITVECTOR[20]isgiveninthe declarationofLOX.Thus,theinterpretationofthestructure-referenceusesHOthe BITVECTOR structure(andnottheVECTOR structure). aFOThestructure-reference(X)[.I]isadefault-structure-OO referencebecause( X ),thebaseaddressofthe reference,KO5isnotadatasegmentname.,Thevalueofthe expressionMO( X )isthesameasthevalueofX,butthe BITVECTORQOstructure-attribute associatedwithXislostinthe evaluation\O>ofthe expression( X ),justasitisinthe evaluationoftheex-LO pressions(X+4)and(X+0).*Thus,theinterpretationoftheJOstructure-reference(X)[.I]usestheVECTOR structure(and*OHnotthe BITVECTOR structure). kSOTheaboveexamples illustratehowitispossibletobeconfusedKOaboutwhetherastructure-referenceisordinaryordefaultMO5whentheaddressisadatasegmentname.*Forthisreason,IOdefault-structure-referencesshouldbeused cautiouslyand7Oonlywhenthereisaverygoodreason.NHOAdefault-structure-referenceprovidesno capabilitythatKOcannotalsobeachievedwithageneral-structure-reference.GO5Itisstrictlya notationaland stylistic convenience.mC(OMoreexamplesaregivenin[Section11.11.7.*[F ?l#fegHk,O11.9CGeneral-Structure-ReferencesGOUAgeneral-structure-referenceisusedwhenan ordinary-EOstructure-referencecannotprovidetherequiredfield-NO reference.*Thisusagearisesintwoways.*First,ageneral-JO^structure-referencemustbeusedwhentheaddressoftheOOaccesseddatasegmentisan expression,sothatthenameofKOthedatasegment(whichispartofanordinary-structure-EOh reference)isnotknown..Second,ageneral-structure-NO referencecanbeusedtoaccessagivendatasegmentusingLOa differentstructure-definitionthanthatwhichisassoci-NOratedwiththenameofthedatasegment.(AnexampleoftheMOseconduseofageneral-structure-referenceisgivenintheO# followingblock:O BEGINO STRUCTURE!8 ARRAY[I,%J;%M,%N]%=z [M*N*%UPVAL]!z (ARRAY+(I*N+J)*%UPVAL);#O OWN%ALPHA:& VECTOR[200]; OW ...(O ARRAY[ALPHA,.I,.J;50,4]%=&0; O ... O/ ENDU+AOThegeneral-structure-reference interpretsthevec-BOtorALPHAasatwo-dimensionalarray accordingtoDO5thestructure-declarationforARRAY.(The declarationHOofthistwo-dimensionalarray structureis discussedinOSection 11.11.3.)*O ?@BO11.9.1CSyntaxnOgeneral-structure-0 referenceKstructure-name0[ access-part 8 >< :!;allocation-actual,...Hnothing 19 1>= 1; q%]O access-partKsegment-expression `8 < 1:, access-actual,3...nothing `9 = 1;ODsegment-expression Kq8 K< KA: expressionnothing q9 = A;DOThe syntacticnamesstructure-name, access-actualand7OUallocation-actualaredefinedinSectionsU11.3 UandIU11.4.*?*I?O11.9.2C RestrictionsGO4Ifthestructure-nameappearsinthestructure-bodyofHOthe definitionofthestructure-name,thenthesegment-)O expressionmustbe nonempty.NKOAn access-actual parametermustbegivenforeachaccess-GOformalnamethatappearsinthestructure-bodyofthe.O5 definitionofthestructure-name. NLOAnallocation-actualmustbegivenforeachallocation-namePOthatappearsinthestructure-bodyandthatdoesnothaveanO5allocation-default.MbO11.9.3C SemanticsGO4Ageneral-structure-referenceis interpretedasfollows: \N`1.:Usethestructure-nametogetthestructure-bodyforthe&( declarationofthatname.L`2.:Ifoneormoreoftheaccess-actualsisa field-name,Ereplaceeach field-namewithitsdefinedsequenceofDYfield-componentvalues.)This replacementmayincreaseIthenumberof access-actual expressionsinthe resulting structure-reference.K`3.:Evaluatethesegment-expressionand associatethevalueDwiththestructure-nameinthe structure definition.L`a4.:Evaluatethe access-actual expressionsand associatetheHith access-actualvaluewiththeith access-formalname)inthe structure definition.F`5.:InBLISS-16or BLISS-32,ifanallocation-unitorDextension-attributekeywordappearsasan allocation-DCactual,replaceitbyaconstantvalueasfollows:b! 8 KeywordReplaceby bLONGWORDBYTE b4 b(b32only 2 1wSIGNEDUNSIGNED w1 0 K`e6.:Evaluatetheallocation-actual expressionsand associateItheithallocation-actualvaluewiththeith allocation-Gformalnameinthe structure definition.*(ObservethatIneachallocation-actualisa compile-timeconstantvalue.)N`7.:Anyallocation-formalthatdoesnothaveavaluealreadyOF associatedwithitfromthepreviousstep,butdoeshaveanKallocation-defaultvalue specified,is associatedwiththatdefaultvalue.H`w8.:Evaluatethestructure-bodyusingthevaluesassoci-Iatedwiththeaccess-formals,allocation-formals,andthe(structure-name.O`9.:Usethe resulting expression(whichis typicallyafield-> reference)inplaceofthestructure-reference.FOTheorderof evaluationofthesegment-expressionandOis equivalenttothe followingfield-reference:O BEGIN OP BIND&base%=%address4 :&structure-name&[% allocation%,...&];"O base&[%access&,...%]O( END%field-selectorrObaseOO(Isan arbitraryuniquenamecreatedforthepurposeofthisO discussion.OaddressOO(Istheaddresspartofthefield-referenceinthe structure->Obodyofthe declarationofthestructure-name._ K5Ofield-selectorJO(Isthefield-selectorpartofthefield-referenceintheHOstructure-bodyofthe declarationofthestructure-name.(O(AsthesyntaxofSections11.2 and@11.3"show,afield-selectorO2is optional.)*?)*@?uK3OTheBIND declarationis describedinSection14.3.*F?+COAswithanordinary-structure-reference,theparame-IOtersofageneral-structure-referenceare evaluatedonce,LO5andthe resultingvaluescanbeusedmorethanonce(seeOSection11.7.4).*OP?WBOUnlikeanordinary-structure-reference,however,anyKO field-namecanbeusedasan access-actualofageneral-NO5structure-reference.(Thereisnowayto designateaspecificPOsetof field-namesthatarevalid;thatis,thereisnothingFO analogoustothefield-attributeforgeneral-structure-O> references. #HOAgeneral-structure-referencedoesnotinclude(orneed)GOanything analogoustotheREFkeywordina structure-QO5 attribute.(Youachievethesameeffectby explicitly indicatingHOtheextrafetchinthesegment-expression.'Forexample: O OWNZ A:% VECTOR[10],& B:%REF&VECTOR% INITIAL(A); O ...O2 A[1]&=%1;Oz VECTOR[A,1;10]%=&1;O B[1]&=%1; O  VECTOR[.B,1;10]%=%1;! WNOAllfour assignmentshavethesameeffect;namely,theyas-SOsignonetothesecondelementofA.Thefirsttwo assignmentsFO5showthe corresponding ordinary-andgeneral-structure-HO referencesforthenon-REF structureA.ThesecondtwoIO assignmentsshowthe corresponding ordinary-andgeneral-structure-referencesfortheREF structureB.}hBgi 9 )"O11.11COther StructuresMOUThe predeclared structures describedintheprevioussectionNOareincludedinBLISSbecausetheyoccur frequentlyinmanyMOtypesof programs.)However,theyareonlyasampleofthePO^widerangeof structuresthatcanbedefinedwiththestruc-NOture declaration.(Thissection describes additional structures7Othat illustratesomeotherpossibilities.: WKOTominimizethe complexityoftheexample structurespre-OOsented,onlyfullwordversionsofthe structuresaredefined.MO5Theseexamplescouldbe augmentedinavarietyofwaystoOObemore flexible.(Also,thestructure-declarationsarewrittenKOinparameterized, transportableform(usingthe predeclaredJO>literal%UPVAL)sothattheyarevalidinall dialects.a;V75O11.11.1C``One-Origin''Vector StructuresKO4The definitionofvector presented previouslynumberedtheSOelementsofthevector( n )from0ton-1.)Insomeapplica-ROtions,itismorenaturaltonumbertheelementsfrom1tonO=instead.<BOA structurethat accomplishesthisisasfollows:O STRUCTUREP VECTOR1[I;%N]%=z [N*%UPVAL]!z (VECTOR1+(I-1)*%UPVAL);=! NLOThis structurediffersfromtheVECTOR structure previouslyLO presentedinthat1is subtractedfromtheelementnumberVO5beforetheoffsetrelativetothebaseofthevectoris computed.> ~;O11.11.2C``Bounds Checking''Vector StructuresIO4On occasion, particularlyduring debugging,itisdesir-OOabletoperformvaliditycheckingoftheaccess-actualsofaJOstructure-reference.'FortheVECTOR1 structurejustgiven,?O=boundscheckingcanbe accomplishedasfollows:O STRUCTURE  VECTOR1CHK[I;%N]%=zR [N*%UPVAL]z BEGINz LOCAL&T;z* T%=%I;(zr IF&.T&LSS%1&OR&.T&GTR%Nz THEN4 BEGIN4J ERROR(.T);4 T%=&1;4 END;"z! VECTOR1CHK+(.T-1)*%UPVALzi END;? NJOThis structurecallsaroutineERRORforthosecasesinUOwhichthevalueofIisnotinthevalidrangeof1throughNO5 inclusive..@! 5O11.11.3CTwo-DimensionalArray StructuresNO4A zero-origintwo dimensionalarray structurecanbedefinedOasfollows:O STRUCTURE!Y ARRAY[I,%J;%M,%N]%=z [M*N*%UPVAL]!z (ARRAY+(I*N+J)*%UPVAL);tAJJOThis structurestoreselementsinroworderasinPL/I.3B! R OOAsimilar structurethatstoreselementsin one-origincolumnBOorder,asinFORTRAN,canbedefinedasfollows:Oa STRUCTURE& ARRAYBYCOL[I,%J;%M,%N]%=z [M*N*%UPVAL])z9 (ARRAY+((J-1)*M+(I-1))*%UPVAL);CcIOThis structurediffersfromthepreviousexampleintheO followingways:RD ( ` JIisreplacedbyI-1andJisreplacedbyJ-1toget3( one-origin numberingofthe elements. ` LIandJare interchangedinthestructure-body,asareMIandN,togetcolumnorderinginsteadofrow ordering.ME! #/O11.11.4C SymmetricArray StructuresQO4A symmetricarrayisasquarearrayinwhichthecontentsofZOA[I,J]isequaltothecontentsofA[J,I].Forsuchanarray,itisIOnot necessarytoallocatestoragefortheentirearray.rFHHOA symmetric3-by-3arraycanbe diagrammedasfollows:*G GOp+p KKh@@@@@@H0              D 0 b "   B"@  AA@   AB@  AB@  A B"B B!@                        !"  "  A   B  !B   B O ! @                  !" "p Ap B B !B !      I3)@H)I)@8^J)y H@J)I1HzHOThenumberofelementsneededto representa symmetric!Oarrayisasfollows:Oa n&*%(n+1)/2I POwherenisthenumberofelementsineach dimension.'Inthe1O3-by-3exampleabove,thisgives3 0*!V4/2,or6, elements.JzKOThestorageforsuchanarraycanbe allocatedwiththe.Oelementsinthe followingorder:7Oa (1,1),%(1,2),&(2,2),%(1,3),%(2,3),&(3,3)K ZOIfjisgreaterthanorequaltoithenthelinearpositionoftheSO(i,j)elementinthestoragesequenceisgivenbythe followingO5formula:O j*(j-1)/2+iL! zROInthe3-by-3exampleabove,thepositionofthe(2,3)elementOisasfollows:Oa 3*(3-1)/2+2%=&5McROThatis,element(2,3)isthefifthelementofthelinearse-Oquence.N IfPOThisanalysiscanbe incorporatedintoa structure declaration.Ofor symmetricarraysasfollows:Oa STRUCTURE  SYMARRAY[I,%J;%M]%=z [(M*(M+1)/2)*%UPVAL]z9 (SYMARRAY-%UPVAL+ (IF%J%GTR%I THEN J*(J-1)/2+IY ELSE I*(I-1)/2** )*%UPVAL z0 );OzPO Declarationanduseofthis structureisthesameasforanFOordinarytwo-dimensional one-originarray.'Forexample:&Oa OWN%SYMX:%SYMARRAY[10,10];PGOThisdeclaresand allocatesa10-by-10 symmetricarrayAOnamedSYMX.Itoccupies55 fullwordsofstorage.QRLOThesumofthe100logicalelementsofthearraycanbe Ocomputedasfollows:Oa SUM%=%0;&O INCR&I%FROM%1&TO&10&DO& INCR%J&FROM%1%TO%10%DO(z9 SUM%=&.SUM%+% .SYMX[.I,.J];R 3O11.11.5C NoncontinuousBlock StructuresHO4The predeclared definitionoftheBLOCK structuregivenTO previouslyassumesthatallofthefieldsoftheblockarecon-OOtiguousinmemory.(InsomecasesthismightnotbepossibleHO=or desirable.*Forexample,astorage managementsubsys-MOtemmightbeinusethatprovidesonlya fixed-sizeblockLOofmemory.+Insucha circumstanceitmaystillbedesir-VOGableto referencea ``logicalblock''asanentityeventhoughitMOmightbe representedusingmorethanonephysicalblockofOmemory.GSLOThe following structure illustratesawaytoachievethis:O STRUCTURE&P LBLOCK[O,&P,&S,&E,&I]&=&z (CASE&I%FROM%0&TO&1%OF  SET"( [0]:&(LBLOCK+O*%UPVAL);#p [1]:&(.LBLOCK+O*%UPVAL);  TESz );T NOOBecausethis structureisonlyintendedtobeusedwithdy-OO namically allocatedmemory,the definitiondoesnotcontaina%O5structure-size expression.UzMOAtypical declarationofadatasegmentthatpointstoan9Oinstanceofthis structureisasfollows:"Oa OWN%XPTR:%REF&LBLOCK;xV NNOTo understandthis structure,considerthe followingdiagram:*W<4WO@K3KK\.""@"@"?        ??          x  ( x( D |  x              @ @ @ @ @ @               @ @ @ @ @ @                  ?xxA`XDMg@xDS?  D"Qb (>Q?P (ASAMf`GH@HP@4Gp@h24MH@("EEH@(%EHA(E',D $c @@ ऄ /DH$ $H$X! WQOThediagram illustratesalogicalblock consistingof9fieldsNOnamedAthroughI.Thelogicalblockis representedastwoRO5physicalblocks.'Eachphysicalblockconsistsoffour fullwords,HOtheassumed fixed-sizestorage managementunit.*Thear-TOrowsindicatefieldsthatcontaintheaddressofthefirstblock;O>andofthe remainderofthelogicalblock.Y! WQOThefirstphysicalblockisliketheBLOCK structure described OinSection11.10.3.7However,theaccessformallistfortheHO5LBLOCK structureincludesan additionalformalname,I,NOthattheBLOCK structuredidnothave.'ThisformalnameisNOusedinthestructure-bodytochooseoneoftwo expressions2O>asthe structureaddress expression.*Y? Z!fOa1asthelastvalue,asinthe following:(Oa FIELD%F&=%[1,0,%BPVAL,1,1];] TOThelast1inthis definitioncausesthesecond case-linetobeMOused.+ Examinationofthesecond case-lineshowsthatitisWO5justlikethefirstexceptthatthecontentsofthefirstfullwordVOofthefirstphysicalblockisusedasthebaseforapplyingthebetheB> typeB>field,which specifieswhichkindof identifiera#Ogivenblock represents.0b! ROAsanotherexample,considerthetableofdevicecontrolblocksPOinan operatingsystem.'Onceagain,thetablemusthavedif-SO5ferentkindsofblocks,onekindforeachkindofdevice;and,QOonceagain,somefieldswillappearinallblocksoftheta-QOble.(Inthisexample,thecommonfieldsmightbethepriorityQO>level,apointertoaqueueof operations,andadevicetypeOcode.'Forexample:*ccO KK}@"  @B@  @@@@  @@@ @ ?@  A  D$@ "  D$@" " @ @B   O  "@@@   @  !@@@@   @  !@@  @  !@<   O @ @" @B  @@  @@@  !x`<aL`0&DD@bLD1&DD@xDQ<@JJ %R%D@'I $D@,(I $D@,( D     A  A $! " $! " ! " $!  $)  $1 > @      . . H H HI H HJ HJ HLILxxDA<<" $ " BBH  " B H B $  B@ $  B@ D  BB"@xxD x<<"< p< )! 0) sC / @ < 0Jd HOThediagramshowstwo differentblocksthatsharesomeDOcommonfields,namely:(LEN,TYP,and NAME_PTR.EachLO5blockalsohasfieldsthatarenotcommonwiththeotherHOblock;indeed,theblocksarenoteventhesamesize.e QOThe following declarations illustrateonewaytocodethedef-MOinitionsofthesetwoblocks,usingBLISS-36asthesampleO5dialect:O FIELD COM_FLDS%= zI SETz LEN%=& [0,0,12,0],z TYP%=& [0,12,12,0],!z! NAME_PTR&=% [1,0,36,0]zi TES, TYP1_FLDS&= z SETzb F%=% [0,24,12,0],z VALUE&=% [2,0,36,0]z TES,[ TYP2_FLDS&= z SETz Z%=% [2,0,18,0],z3 Q%=% [2,18,18,1],z{ LINK%=% [3,0,36,0]z TES;t, MACRO@ t TYP1_BLOCK%=%BLOCK[3]%FIELD(COM_FLDS,TYP1_FLDS)&%,@  TYP2_BLOCK%=%BLOCK[4]%FIELD(COM_FLDS,TYP2_FLDS)&%;mfCCOThefield-declarationdefinesthreesetsoffields:^g4OCOM_O0FLDSEForfieldsthatarecommontobothtypesofblock.OTYP1_OFLDSLForfieldsthatarespecifictothefirsttypeofblock.OqTYP2_OFLDSMqForfieldsthatarespecifictothesecondtypeofblock.h! NMOThemacro-declarationdefinestwomacros,oneforeachkindNOofblock;the expansionsgivethe attributes appropriatefor O5eachkindofblock.i RMOThese macro-namescanbeusedindata declarationssuchasOthe following: Oa OWN STARTUP:% TYP1_BLOCK;O LOCAL 9 PTR:%REF% TYP2_BLOCK;j! adHOObservethatinthe declarationofPTR(asLOCAL)theHOstructure-attributeisREF BLOCK[4],whereREFisgivenMO5 explicitlyandBLOCK[4]resultsfromthe expansionofTYP2_;OBLOCK.IfBLOCK[4]andFIELD(COM_FLDS,TYP2_KOFLDS)hadbeengivenintheoppositeorderinthemacroKO> definitionof TYP2_BLOCK,then additionalmacro definitionsNOwouldbeneededinordertodeclaredatasegmentswithREFIOstructure-attributes.)The definition techniqueshownaboveOHhastwo advantages:k # ` FThecommon definition informationisgivenonlyonce,O(therebyavoidingthe possibilityofclericalerrorsingivingGthesame informationinmultiple field-set definitions. ` L Dependingonspecificdetails,changesor additionstotheKYcommonfieldscanbemadeinoneplace,whichiseasierGandmorereliablethanmaking correspondingchangesin manyplaces.^l `4GO11.11.7CGeneral-Purpose StructuresforDefault Structure( ReferencesEOSome programming applicationsinvolve complicateddataLO structuresusingblocksofvarioustypes connectedtogetherNO=by pointers.,Ifthenatureofthe applicationinvolvesfre-ROquentaccesstoblocksrelatedtoagivenblockby ``followingQO pointers'',theremaywellbe notational advantagestousinga,OGdefault structure(seeSectionsG11.8 @GandG18.2).*l ?*l ?B m! NROForexample,supposethe followingblockisbeingusedtorep-ROresentanodeinatree structure,suchasmightbeusedfor'O5 expressionsina compiler.*n E nO KKexy   |x1 $2 $R QĄ $ $Ą $#$c@@@  9H$!H$coTOTheopfieldisusedtocontainacodeforthekindofarith-AOmeticoperator represented,andthe LEFT_OPNDandJO5 RIGHT_OPNDfieldsareusedtocontain addressesofotherOsuchnodes.lpBQOAroutinetocomparetheOPfieldsofthetwosubnodesofaFOgivennodeforequalitymightbewrittenasfollows:*Oa ROUTINE&COMPARE_SUBOPS(NODE)&=  BEGIN4  MAP%NODE:JREF&TREEKFIELD(TREE_FIELDS); 9 LOCAL0 L_PTR:KREF%TREEJFIELD(TREE_FIELDS),0 R_PTR:KREF%TREEJFIELD(TREE_FIELDS);%  L_PTR&=%.NODE[LEFT_OPND];& Y R_PTR&=%.NODE[RIGHT_OPND];)  IFK .L_PTR[OP]&EQL% .R_PTR[OP]  THEN?0 ...;p!%Actions%if%subnodes%have&same%OP%value x END;(qJOThe structureandfieldname definitionsassumedinthisIOexampleshouldbeobviousfromearlierexamplesandareNO5notshown.)Youcanachievethesameeffectusingadefault!O structureasfollows:+O ROUTINE&COMPARE_SUBOPS1(NODE)%= Z BEGIN)  SWITCHES& STRUCTURE(REF%TREE);>  IF&.NODE[LEFT_OPND][OP]&EQL%.NODE[RIGHT_OPND][OP] 2 THEN?z ...;p!%Actions%if%subnodes%have&same%OP%value  END;r WQOThissecondversionisslightlyshorter.)Itisalsomoresug-JOgestiveofthe ``logical''accessbeing performedbecauseLO5 intermediate assignmentsarenotneededsimplytoobtainaOOdatasegmentname(suchasL_PTRinthefirstversion)thatPOisdeclaredwiththe appropriate structure propertiesforeach-O>stepalongthepathofaccess.4s  OOObservethatthedefault structureinthisexampleisaREFPO structure.'Thismeansthateachstepintheaccesspathnec-SO5essarilymakesafetchtoobtainthebaseaddressforthenextOfieldaccess.4ihjmt CO 12.2RoutinesQORoutinesarethelogicalunitsfromwhichaprogramisbuilt.QOEachroutine describesaportionoftheprogramthatisrela-MOBtivelycompleteand independent.(BLISSpermitsaroutineto=Ohaveitsownblock structureandlocaldata._u! 59OAprogramhasasinglemainroutine(seeCSection19.2). @TheLOmainroutinecontrolsthe computation,butitcandelegateMO5partsofthe computationto subordinate routines.)Eachsub-ROordinateroutinecan,inturn,delegatepartofits computationTOtoitsown subordinate routines.'Aroutinecanalsocallanex-SO>ternalroutine(onedefinedoutsideofitsownblockormodule)DOtoperformacommonlyneeded function,forexample.*uCF? vPOThefirsttwosectionsofthischapterdescriberoutine-calls.IOThe remainingfivesectionsdescriberoutine-declarations.7w KOThelinkage-declaration,whichcontrolsthe instructionse-KOquence generatedforacallonagivenroutine,andtheJO5register-management disciplineusedwithintheroutine,isO describedin Chapter13.*w PO !jikx x&O12.1COrdinary-Routine-CallsROUA routine-callcausesthe executionofaroutinethathasbeenKOdeclaredaspartofthesamemoduleorsomeotherBLISSKOmodule,orofaprogramwritteninanother language.*TwoKO^kindsof routine-callsare provided:+ordinaryandgeneral.JOTheordinary-routine-callisthemostcommonlyusedform:ROitgivesthenameofaroutineandreliesonthecompilertoKOh determine,fromthe declarationofthenamedroutine,the8O appropriatelinkage(orcalling sequence).yOOAgeneral-routine-callisself-contained.*Itgivesallofthe:O informationneededforcallingtheroutine. zIOThe followingisanexampleofanordinary-routine-call: O OWN P A,  B;O EXTERNAL%ROUTINE( RFACT; Op . O . O .OH A&=% RFACT(.B) O END{ _FOTheRFACTroutineisdeclaredinanothermodule.-TheUOfunctionoftheroutineisto determinethe factorialofagivenLO5 parameter.,Theresultisthevalueoftheroutine;there-KOfore,theroutinedoesnothaveaNOVALUE attribute.*TheKO routine-call RFACT(.B)causesthecontentsof input-actual-MO> parameterBtobepassedtothe factorialroutineandtheQOreturnedresulttobeassignedtolocationA.(The declaration+OofroutineRFACTisgiveninzSection12.4.)*{z?|! WNOIntheexample,the routine-callisusedtopassaninput-IO parameter;however,output-parameterscanalsobepassed.KO5Whenthisisdone,eachoutput-actual-parameteristreatedNOlikethe left-handsideofan assignment expressiondefiningQOwhereanoutput-registervalue(fromthecalledroutine)istoO>bestored.=}JOOutput-parameterspermitaroutinetoreturnresultsthatQOarelargerthanaBLISSvalueortoreturnseveralvaluesatKO5once.+Forexample,adouble-precisionfloatingpointvalue-OcanbereturnedinR0andR1.~KOInthe routine-callsyntax,output-parametersfollowinput-EO parametersandare separatedbya semicolon( ; ).BO12.1.1CSyntaxt JO routine-call y8 yw< y:4ordinary-routine-callgeneral-routine-call 9 w= ;O ordinary-A routine-callyroutine-designator ( 8 < S:#[input-actual-parameter,...[nothing /9 /= /S; 8 `< :'f;output-actual-parameter,...fjnothing 9 `= ; F)%Oroutine-designatorprimaryOinput-actual-parameter y8 yd< y:  expressionnnothing F9 Fd= F;O output-- actual-parameter y 8 yt < y :1  expression~ nothing F 9 Ft = F ;~TO12.1.2C RestrictionsGO4Thenumberofinput-actual-parametersina routine-callEOmustagreewiththenumberofinput-formal-parametersIOintheroutine-declaration..(This restrictioncanbere-HO=laxedthroughuseofthelinkage-functions describedinOSection13.6.)*OY?! NLOThevalueofeachinput-actual-parametermustbe consistentJOwiththecontextinwhichthe corresponding input-formal-=O5 parameterisusedintheroutine declaration.  NIOAnoutput-actual-parametercanbeany expression,includ-POinganundotted register-name qualifiedby position,size,andHO5sign extension information(thatis,afield-reference).NCOThenumberofoutput-actual-parametersmustbelessHOthanorequaltothenumberofoutput-formal-parameters3O5 specifiedintheroutine declaration._! 5NOAnoutput-actual-parametermustnotbe specifiedifacorre-KOspondingoutput-parameter-locationregisterisnot specifiedOO5inthelinkage.'The evaluationoftheroutine-designatormustMOyieldthevalueofanamethathasbeendeclaredROUTINE.NIOThelinkageoftheroutine-designator (determinedasde-OscribedinSection12.1.30mustbethesameasthelinkage-NO5 attributeinthe declarationoftheroutinethatiscalled.*?! FOA linkage-namedefinedwiththe linkage-type INTERRUPTHOorRSX_ASTmustnotbeusedinageneral-routine-call.f! <FOTheorderinwhichtheroutine-designatorandactual-EO parametersare evaluatedisasfollows:/ Input-actual-OO5 parametersare evaluatedbeforetheroutinecall,andoutput-LOactual-parametersare evaluatedwhentheroutinereturnstoOthecaller.M]O12.1.3C SemanticsBO4Anordinary-routine-callis interpretedasfollows: E B`1.:Evaluatetheroutine-designatorandtheactual-( parameters.H`2.: Determinethelinkagetobeusedwiththeroutine-H designator.)Iftheroutine-designatorisa routine-name,IYthenthelinkageisgivenbythelinkage-attribute(ex-Lplicitordefault)inthe declarationofthe routine-name.D  Otherwise,thelinkageisgivenbythe linkage-nameCc establishedinaLINKAGEswitchor,ifnoLINKAGEHswitchapplies,thelinkageisthedefault linkage-nameIforthedialectinuse(BLISSfor BLISS-16/32;BLISS36Clfor BLISS-36).C`3.: Associatetheactual-parameterswiththeformal-ID parametersoftheroutinecalled.,ThevalueoftheithHactual-parameterbecomesthecontentoftheithformal- parameter.M`u4.:Createastackframe.)ThekindofstackframeandtheKdetailsofits organizationdependonthelinkageofthe&routine.*`5.:Evaluatethe routine-body.(`$6.:Deletethestackframe.F`7.:Evaluatetheoutput-actual-parameter expressionsandIassignthereturnedoutput-registervaluestotheappro-+U priateoutput-actual-parameters.T` 8.:Ifavalueis returned,usethatvalueasthevalueofthe,  routine-call.!! NQOThelinkageusedina routine-calldoesnotaffecttheseman-[Oticsofthecall,butinsteadaffectsthedetailsofhowthecallis5O5carriedout.'Linkagesare describedin5Chapter13.*OMV#O12.1.4C PragmaticsEO4Aninput-actual-parameterina routine-callcanbeaHO%REFstandard function.,Thisfunctionis especiallyde-SOsignedforuseinroutine-calls.(Itis describedand illustrated O=in=Section5.2.2.3.*?~kjm_<5%O12.2CGeneral-Routine-CallsJOUAroutinewhoseaddressiscomputedduring executioncanOObecalledwithalinkageotherthanthedefaultlinkageus-OOingageneral-routine-call.(The followingisanexampleofaO^general-routine-call:O EXTERNAL%ROUTINE$+ F1:& FORTRAN_SUB&NOVALUE,$s F2:& FORTRAN_SUB&NOVALUE,$ F3:& FORTRAN_SUB&NOVALUE;O BIND/K TABLE%=%UPLIT(F1,F2,F3)%:%VECTOR; O ...+O FORTRAN_SUB(.TABLE[.I],%P1,%P2) O# ... kKOTheaddressoftheFORTRANroutinetobecallediscom-QOputedbyfetchinganelementofavector.'BecausetheroutineDO5has linkage-type FORTRAN_SUB,thegeneral-routine-callNOmustbeusedtogivethecompilerthe information necessary=Otogeneratethecorrectformof routine-call.pMFO12.2.1CSyntax.O4SYNTAX:4ClicktodisplaySyntax.*OOHO12.2.2C Restrictions! OBLISS-16ONLYFO4A linkage-namedefinedwiththe linkage-type INTERRUPTHOorRSX_ASTmustnotbeusedinageneral-routine-call.LOThe evaluationoftheroutine-address expressionmustyieldPOtheaddressofaroutinethatisdeclaredwiththe specified3Oi linkage-nameasitslinkage-attribute.`6GOThenumberofinput-actual-parametersina routine-callEOmustagreewiththenumberofinput-formal-parametersIO5intheroutine-declaration./(This restrictioncanbere-HOlaxedthroughuseofthelinkage-functions describedinOSection13.6.)*O?! NLOThevalueofeachinput-actual-parametermustbe consistentJOwiththecontextinwhichthe corresponding input-formal-A.Indirect recursionoccurswhentheroutinecontainsacallQOonanotherroutine,which ultimatelyresultsinacallontheOOroutinebeing declared;forexample,the routine-bodyfortheQOHroutineAcontainsacallontheroutineB,whichcontainsa$OcallontheroutineA.!EOAnexampleofanordinary-routine-declarationfollows:BO ROUTINE&AVERAGE3(F1,F2,F3)%=&(.F1%+%.F2%+%.F3)/3;! zIOTheroutineAVERAGE3hasthree formal-namesF1,F2,andDOF3.'Anexampleofacallonthisroutinefollows:"Oa AVERAGE3(5,%.A,%.B*.C)IOAnotherexampleofanordinary-routine-declarationistheOO declarationofa factorialroutine.(Thisroutinecomputesthe/O5 mathematicalfunction factorial(n): O ROUTINE&IFACT&(N)%= BEGINI LOCALz RESULT; RESULT&=%1;&! INCR%I&FROM%2%TO%.N%DO zi RESULT%=& .RESULT*.I; .RESULT END;+\NOWhentheroutineIFACTiscalled,itcomputesthe factorialROoftheactual-parameter specified.)IfthecontentofNislessRO5than2,the indexed-loopisnotexecutedandthevalueofthePOroutineis1.'Anexampleofacallinthisroutinefollows:O IFACT(.A%*&.B)! NWOInthisexample,ifthecontentofAisassumedtobe2andtheWOcontentofBisassumedtobe3,theresultreturnedbythecallO5is720."POThe factorialroutinecouldbe rewrittenasadirectlyrecur-&Osiveroutine,asfollows: Oa ROUTINE&RFACT&(N)%= IF%.N%GTR%1T THEN"9 .N&*%RFACT%(.N&-%1)T ELSE  1;! NTO(Forthe computationofa factorialthefirstversion,IFACT,isLOmore efficientthanthe recursiveversion,RFACT. RecursionMO5isusedwhenitisthemostnaturalor efficientmethod.)pMFO12.4.1CSyntax.O4SYNTAX:4ClicktodisplaySyntax.*OOWO12.4.2C RestrictionsEOThenumberofinput-formal-parametersintheroutine-HO_ declarationmustagreewiththenumberof input-actual-IO parametersinthe routine-call.-(This restrictioncanbeJOrelaxedthroughuseofthelinkage-functions describedinOiSection13.6.)*O,?FOThenumberofoutput-formal-parametersintheroutine-GO declarationmustbelessthanorequaltothenumberFOiofoutput-parameter-locations specifiedinthelinkage-O declaration.NLOAnoutput-formal-parametermustnotbe specifiedifacor-LO respondingoutput-parameter-locationisnot specifiedintheO5linkage. KOThevalueofanoutput-formal-parameteris undefineduntil@Oitisassignedavaluewithinthe routine-body.mCCOAninput-formal-namemustnotbeassignedavalue.MOBoththevalueofa formal-nameanditscontentareunde-HOfinedexceptduringthe evaluationofthe routine-body.3  HOIftheroutineisdeclaredwiththeNOVALUE attribute,MOitmustnotbecalledinacontextthatrequiresavalueIO5andifanyRETURN expressioninthe routine-bodyhasaNOreturned-value,the expressionis evaluatedbutitsvalueisJOnotused.+IftheroutinedoesnothavetheNOVALUEat-LO>tribute,anyRETURN expressioninthe routine-bodyaswellGOasthe routine-bodyitselfmusthaveareturned-value.! WOOSupposethe routine-bodyofagivenroutine,routineA,con-ROtainsthe declarationofanotherroutine,routineB.IfanameLO5isa formal-nameforroutineA,thenthatnamecannotbePOusedassuchwithinroutineB.Suchusagewouldbean``up-QOlevel'' reference,whichis prohibitedfor formal-namesjustas O>for local-names(seeB>Section10.5).*B?O12.4.3CDefaultsFO4Each formal-nameis implicitlydeclaredbyaroutine-PO declaration.(Each declarationisassumedtobeascalar,withJOadefaultallocation-unitandextension-attribute (BLISS-16OO=/32only).)Ifthis assumptionisnot appropriate,othermap-:Odeclaration-attributescanbe specified(seeVSection 12.4.5.3).*VY?! WMOIfalinkage-attributeisnotgivenandtheroutineisinKOthescopeofaLINKAGEswitch,thenthedefaultlinkage-KO5 attributeisthe linkage-namegivenbytheLINKAGEswitchO(seeSections18.2 ande19.2).1L Otherwise,thedefaultisthepre-HOdeclared linkage-nameBLISSfor BLISS-16/32,orBLISS36CO>for BLISS-36.*P?B *eP? O12.4.4C SemanticsLO4Thecompilermakesuseofthe informationinan ordinary-+Oroutine-declarationasfollows: =`1.:The attributesandkeywordsare processed.E`O2.:The routine-bodyis processed..Input-andoutput-F formal-namesaretreatedaslocalvariablenamesthatJaredeclaredinanimplicitblock enclosingtheroutine-FYbody.(Theinput-formal-namesarethen initializedwithFthevaluesofthe correspondinginput-actual-parametersD froma routine-call;however,output-formal-namesareGcnot initializedwith corresponding output-actualvalues.N`3.:Whentheroutinereturnstothecaller,thecontentsofC:the data-segment associatedwitheachoutput-formal-H parameter,aremovedtothe registers specifiedinthe* associatedlinkage-declaration.L`k4.:IftheroutineisdeclaredwiththeNOVALUE attribute,Cthe mechanismfor returningavalueis suppressed.O12.4.5C PragmaticsMO4The followingsectionsgiveexamplesthat illustratevarious9OaspectsoftheroutinefacilityofBLISS. m&O12.4.5.1B ParameterPassingIO)Thevalueofeachactual-parameterofa routine-callisNOpassedtotheroutinebymeansofthe correspondingformal-IOname.,However,thevalueofthe formal-nameisnottheHO3valueoftheactual-parameter.)Instead,each formal-namePO designatesadatasegmentthatcontainsthevalueoftheac-LOtual parameter.(Thedatasegment designatedbytheformal-MO<nameisdefinedonlyduring evaluationofthe routine-body,6Oanditis ``temporary''inthatsense.OOBecauseitisthevalueofanactual-parameterthatisnor-NOmallyofinterest(ratherthantheaddressofthe temporaryNO5datasegmentthatcontainsthatvalue),auseofaformal-LOnamewithouta precedingfetch-operatorisoftenanerror.OForexample:(Ok ROUTINE&AVERAGE3(F1,F2,F3)%=" (.F1%+&.F2%+&.F3)/3;! JOThisroutineiscalledwiththreeactual-parameterswhoseTOvaluesaretobe averaged.'AnexampleofacallontheroutineO5follows:"O AVERAGE3(5,%.A,%.B*.C) JOEach formal-nameoftheroutinecanbethoughtofasaJOspecialkindofLOCALnamethatisdeclaredintheim-HO5plicitblockthat surroundsthe routine-body.. Therefore,IOthe routine-bodyforAVERAGE3canbethoughtofastheO followingblock:Ok BEGINO LOCAL  F1, B F2,  F3;O F1%=&5;O F2%=&.A;Ob F3%=&.B*.C;!O (.F1&+%.F2&+%.F3)/3 O ENDOOThisinterpretationshowsthatitis.F1,.F2,and.F3thatLO representthevaluestobe averaged,notF1,F2,andF3.KOInthe precedingexample,the routine-callsuppliedvaluesQOthatwereintendedfor calculation.,ItisalsopossibleforaMO5 routine-calltosupplyvaluesthatareintendedforuseas#O addresses.'Forexample:-O ROUTINE&EXCHANGE(X,Y):&NOVALUE%=Z BEGIN LOCAL%TEMP; TEMP%=&..X;2 .X%=%..Y;z .Y%=%.TEMP; END;! NOThisroutineiscalledwithtwoactual-parameterswhoseval-QOuesarethe addressesofdata segments.(Anexampleofacall$O5ontheroutinefollows:O EXCHANGE(Q,R)| RROWhenthiscallis evaluated,thecontentsofQandRarein-HO terchanged.)Onceagain,each formal-namecanbethoughtNO5ofasaspecialkindofLOCALname.'Thusthegivenparam-ROetersQandRare representedby.Xand.Y, respectively,notObyXandY.= HONotethatroutinestobecalledfromFORTRANmustas-KOsumethatactual-parametervaluesarealwaysthe addressesMO5ofdata segments.'ThisissobecauseFORTRANroutinespass3O parametersbyaddress,notbyvalue.ieOForexample:)O ROUTINE&AVERAGE3A(F1,F2,F3)%=%P (..F1%+%..F2&+%..F3)/3;%MOThisroutinerequiresthattheactual-parametersbethead-OOdressesofthevaluestobe averaged.*ThusaBLISScallon0O5thisroutinemightbeasfollows:/O AVERAGE3A(UPLIT(5),&A,& %REF(.B*.C)) wLOThiscallon AVERAGE3Agivesthesamevalueasthecall,FOgivenearlier,on AVERAGE3.,Thefirstactual-parameterO5usesaUPLIT(see5Section4.4)+5tosupplytheaddressoftheJOnumeric-literal5.'Thesecondactual-parametersimplyusesPOthenameA(withoutafetch operator)togettheaddressofKO>thevalue.'Thethirdactual-parameterusesthe%REFstan-Odardfunction(seeSection5.2)+tosupplyanaddressforthe(Ovalueofthe expression.B * .C.*}?*Z~?#EOTheroutine AVERAGE3Auses addressesofvalueswhereNOvalueswouldhavebeen sufficientfor interactionwithotherNO5BLISS routines.+Thatistosay,itdoesnotminimizeindi-NOrection.-However,theroutineisvalidand,writteninthisIOway,canbemadecallablefromprogramswrittenintheAO>FORTRANlanguagebytheadditionoftheFORTRAN_'OFUNClinkage-attribute(seeSection13.5).*Z?! ?O12.4.5.2B Allocationof Formal-NameDataSegmentsJO)Whiledatasegmentsfor formal-namesarelikelocaldata:Osegmentsinmostrespects(as discussedinTSection 12.4.5.1),OOtheyarenot necessarily allocatedinthesamewayaslocalKO3data segments.)Formaldatasegmentsare allocatedandas-NOsignedvaluesbytheroutinemakingacall,ratherthanbyROtheroutinethatiscalled.(ThecallingroutinecanarrangetoQO<allocateformalsinstaticmemorythatis protectedfromwriteMOaccessratherthan,forexample,ina temporarysegmentinNOastackframe.)Thisisan optimizationbecause,undersuit-QOFable conditions,thecallingroutinedoesnotneedtoallocateROandassignvaluesfortheformalseachtimethecallismade.MO Moreover,thecallingroutinecanevenbeabletousethePOPsameformaldatasegmentsfor differentroutinecallsiftheyGOhavethesamenumberandsequenceofactual parameter,Ovalues.*A restrictiongivenin}Section12.4.2,namely,thataQOYformalnamemustnotbeassignedavalue,assuresthatitisHOvalidforacallingroutinetousesuchoptimizations.*TD?*}? 1O12.4.5.3B Attributesfor Formal-NamesFO)Ifthedefault attributes (UNSIGNEDWORDin BLISS-16,FOUNSIGNEDLONGin BLISS-32,nonein BLISS-36)arenotLO appropriatefora formal-name,an appropriate attributecanIO3beselectedfromthemap-declaration-attributes.(Anexam-ROpleoftheuseofastructure-attributeinanordinaryroutine'O declarationisasfollows:EOh ROUTINE& ZEROBIT(A%:&REF%BITVECTOR[12],B,C):&NOVALUE%= BEGIN IF%.A[.B]@ THENz BEGINz A[.B]&=%0;z .C&=%..C&+%1;z` END; END; }DOThestructure-attributeREF BITVECTOR[12]isprovidedOOforthefirst formal-name( A ).+AssumingthecontentofBSO5isi,theroutineZEROBITteststheithbitofthebitvector^O structureA.Ifthatbitis1,itissetto0andthecontentofthe9Olocationpointedtoby.Cis incremented.A V0O12.4.5.4BComputedRoutine AddressesIO)A routine-callusuallybeginswitha routine-name,whichIO designatestheroutineinanexplicitandconstantway.LOHowever,a routine-callcanbeginwithany expressionthataddressisgivenasoneofthe formal-names.#9OAnexampleoftheuseofENTVALfollows:+O ROUTINE& ERRX(N,VAL):%NOVALUE&=P BEGIN  ...2: !Print%error%message&for%invalid&.X  END O( . Op . O .O ENTVAL(.X,ERRX)aNOInthisexample,ENTVALiscalledtoenterthecontentsofNOXinthelists.+Thesecond parameterofthecallisERRX,MO5whichisthenameofaroutinedesigned especiallytore-OOportaninvalidvalueof.X.ObservethatthenameERRXinNOthiscalldoesnotcalltheroutineERRXbecausethereareKO>no parentheses followingit.,Thus,ERRXisnotaroutineLOcall.) Presumably,thesameprogramcontainsothercallsonNOENTVAL,and differentcallsuse differentroutinestoreportOHaninvalidvalue. mw<vx"6O13.1C IntroductiontoLinkage-DeclarationsJOUAlinkage-declarationdeclaresa linkage-namethatisde-NOfinedbya particular combinationoflinkagecharacteristics.*OThesecharacteristicsinclude: z ` ELinkage-type-Thegeneraltypeofcalling sequence,inJ(termsofthespecifictransfer-of-control instructionsand2/orthesoftwarecalling convention. ` <Parameter-location options-Themethodbywhich)Yactual-parametersarepassed. ` IRegister-usageoptions-Specificationofthe registersthatQ1aresavedandrestoredacrossacall,andofthosethatwill0notbeusedinacalledroutine. `  D Global-registeroptions-Specificationofregisterdata9asegmentsthataresharedbetween routines.! WIOThelinkage-declarationsofeachBLISSdialectarequiteNOsystem-specific;theyaretailoredtothe particularhardwareNO5 capabilitiesofeachsystemandtothemajorsoftwarecall-MOing conventionsinuseonthosesystems.) Nonetheless,therePOaremanyaspectsoflinkage-declarationsthatapplytotwoor)O>moreoftheBLISS dialects.  KOThis introductiontolinkage-declarationsexplainsthecom-NOmonaspectsinthree sections.*Thefirst discussesthemanySO5waysthat registerscanbeused.'Thissectionis especiallyim-KOportantbecauseit establishesmuchofthe vocabularyandNOmanyoftheconceptsused throughoutthischapter.'Thesec-OO>ondsectionpresentsapartialsyntaxforlinkage-declarationsPOthatincludes constructscommontoatleasttwooftheBLISSRO dialects.(Thethirdsection describesthepartsofthelinkage-LOH declarationandfurtherdevelopstheconcepts introducedinOthefirstsection. !O13.1.1CRegisterUsageKO4Duringthe executionofaroutine,some temporarystorageQOisusuallyneededforholdingvaluesuntiltheyareused.(TheNOstackframe associatedwiththe executionoftheroutineisOO=oneplacetoholdsuchvaluesandthegeneral registersareMOanother.*Thegeneral registersaremoreoften preferabletoLOthestackframebecausetheycanbeaccessedmorequicklyIOGand/orwithshorter instructions.*However,whenonerou-MOtinecallsanother,some consistentrules regardingregisterPOusagemustbeobservedinorderforbothtousethemachinePOQ registers correctly.)The differentusesofthese registerscanOObebroadly classifiedasspecialpurposeandgeneralpurpose.%O Specialpurpose registers2are dedicatedforthesameparticu-OOZlarpurposeamongagroupof routines; frequentlythatgroup5Oisalloftheroutinesofaprogram."M Generalpurposeregis-O  tersK areusedforavarietyofpurposesby differentroutinesROdandevenwithinasingleroutine.'ThisclassificationishardlyQOpreciseanddoesnotevenconsidercertainotherkindsofus-ROagethatare describedlater;butitdoesprovideabasisforOn discussion.%O13.1.1.1BSpecialPurposesMO)InBLISStherearefivetypesofspecialpurposestocon-JOsiderforregisterusage:-programcounter,stackpointer,KOframepointer,argumentpointer,and value-return register.SO3(Aswillbeseen, registersarenot dedicatedforallofthese(Opurposesinevery routine.)  OThe$ programcounterregister-isusedtocontaintheaddressQOofthenext instructiontobe executed.(In BLISS-16,thepro-LO5gramcounterisalwaysregister7,andinBLISS-32itisIOalwaysregister15.,In BLISS-36,theprogramcounterisNOaspecial,not generally accessiblepartofthemachinear-KO> chitecture,andthusdoesnotfigureinBLISS-36registerO assignments. r OThe" stackpointerregister4isusedtocontaintheaddressofaIOportionofmemoryusedfor temporarystorageduringtheRO5 executionofeachroutine.(Whenaroutineiscalled,thestackROpointerisadjustedtopointtoanewareaandwhentherou-KOtinereturnsthepreviousaddressisputback.-ThestackIO>pointermaybeadjustedmanytimesduringthe executionNOoftheroutineastheneedfor temporarystoragegrowsandOO diminishesin differentpartsoftheroutine.+TheportionofPOHstoragebetweentheoriginaladdressinthestackpointerandROthecurrentvalueatany particularpointintimeisknownas Othe stackframe,forthatcalloftheroutine.uJOStackframescanvarygreatlyinsizeand complexity.-AOOstackframemightbeassmallasasinglefullwordcontain-OO5ingtheprogramcounterfor returningtothecallingroutineMOoritmightbeverylarge, containingmanyvalues,fields,@O addresses, preservedregistervalues,andsoon. a OThe" framepointerregister4isusedtocontaintheaddressofaQOfixedpartofthestackframeofaroutine.*IncontrastwithMO5thestackpointer,whichmaybeadjustedmanytimesduringROthe executionofaroutine,theframepointeris generallysetNOonceatthe beginningofroutine executionandonlychangesKO>whenanotherroutineiscalledandwhentheroutinecom-QOpletesandreturns.'TheutilityofaframepointercomesfromOOthisstablecharacteristic;theframepointermakesaccesstoFOHfixedpartsofthestackframesimpleand efficient.N OThe% argumentpointerregister)isusedtocontainthead-POdressofablockofstoragethatcontainsthevaluesofthe1O5actual-parametersofa routine-call.N OThe! valuereturnregister1isaregisterusedtocontaintheJOvalueofaroutineduringtheprocessof completionandO5 returning. hPOThevaluereturn register,unliketheotherspecial registers,SOisusedassuchonlybrieflyduringthe completionofonerou-OO5tineandthe resumptionofthecallingroutine.( Consequently,ROthisregistercanalsobeusedforgeneralpurposesduringthe$O executionofaroutine..%O13.1.1.2BGeneralPurposesTO)Aregisterthatisnot dedicatedtooneofthespecialpurposesSO describedinthe precedingsectioncanbeusedinavarietyof8Oways.'Theseusesaredividedasfollows:2oOLocallyusable0 Preserved~ NonpreservedOGloballyusableONotused! N OA preservedregister4(containsthesamevalueafterreturn-TOingfroma routine-callasit containedatthetimetheroutineO5wascalled. N OA nonpreservedregister0doesnot (necessarily)containtheLOsamevalueafter returningfroma routine-callasitcon-;O5tainedatthetimetheroutinewascalled.a7HO Preservedand nonpreserved registersaretogethercalled$O locallyusable registers4j.)Thiscombined designationisconve-KO5nientbecausemanyoftherules concerningregisterusageLOapplyequallytoboth preservedand nonpreserved registers.\ 2MOLocallyusable registersareusedbythecompiler accordingLOtoits optimization strategies.*Thecompiler determineshowQO5manyofthemtouse,whichtousefor evaluating expressions,HOwhichtoallocateforlocaldata segments,andsoon.$  OA$ globallyusableregister2isusedtocontainaglobalregis-NOterdatasegment,thatis,aregisterdatasegmentthatisQO5 accessibleinmorethanoneroutine.'Globalregisterdataseg-FOmentsaregovernedbyspecialrules involvingLINKAGEDO declarationsin combinationwithGLOBALREGISTERand0O>EXTERNALREGISTER declarations.*Seeg>Section13.7 )>forOcompletedetails.*g? OA notusedregister: issimplynotusedinanyway (applicableOtoBLISS-32only).! #O13.1.1.3BOtherPurposesLO) Registerscanalsobeusedtopassthevaluesofactual-NO parametersofa routine-calltotheroutinethatiscalled.MO(These registersmustbeamongthelocallyusable registersJO3ofthecalled routine.)+Whensuchanactual-parameterisSO evaluated,thevalueisassignedtoagivenregisterinsteadofQOtoapositioninanargumentblockorthestack.(TheroutineSO<thatiscalledcan efficientlyfetchsucha parametervaluebe-TOcauseitisalready availableinaregisteratthe beginningof"Otheroutine execution.NPOOneormoreofthelocallyusable registerscanbe allocatedJOforadatasegment establishedbyaREGISTER declarationO5(see5Section10.7).*?&O13.1.1.4BMultiplePurposesOO)Most registersarenotlimitedtoasinglepurposeorclassLOofpurpose.)TheprogramcounterandstackpointerinbothIOBLISS-16and BLISS-32,aswellastheframepointerinIO3 BLISS-32,aretruly dedicatedbythehardwareforthese7O purposes;butthesearetheonlycases. uPO RegisterscanbeusedformultiplepurposessolongasthosePOusesdonot conflict.*Becauseofthemany differentkindsofQO5use,therulesfor compatibleuseare complicatedandlengthy.KOEvenso,BLISSstilldoesnotalwaysalloweveryimagin-LOable combination;thatwouldgetevenmore complicatedandSO>lengthy.'But,byandlarge,BLISSdoesallownearlyalloftheQOregisterusesand combinationsofusesthatplaya significantIOroleinsystemsoftwareoneachofthetargetsystems.K!!O13.1.2CTypicalSyntaxqo GOlinkage-declaration(3LINKAGElinkage-definition,... ;Olinkage-definition'3 linkage-name= linkage-type 3f8 3> 3F> 3< 3> 3> 3: ( k8 < ;:% input-parameter-location,w... nothing  k9  =  ;; 8 C< :);output-parameter-location,...Mnothing e 9 e C= e ; *)nothing f9 > F> = > > ; 8 < f:`:!linkage-optionv...`nothing 9 = f;Oz linkage-type 3nbCALL--- foOinput-parameter-location 38 3= < 3 :&REGISTER=register-number STANDARDn nothing m9 m= = m ;O output-parameter- location)P  {REGISTER=registernumber}OG linkage-option 3& 8 3 < 3 :- GLOBAL(global-register-segment,  ...  )S PRESERVE)  NOPRESERVE(register-number, ... S ) --- & 9 = ;O global-register-Xsegment,3 global-register-name= register-3Xnumber Ow8 O< OH:uglobal- register-name linkage-name w9 = H;3nameO[register-number*3[ compile-time-constant-expressionNOThenotation``---''intheabovediagram indicatesthatQOOthereare additional alternativesinsomeofthedialectsthatIOarenotshown.*Thissyntaxdiagramdoesnotapplycom-SOpletelytoalloftheBLISS dialects,butitisrepresentative.IOY(Forexample,theCALL linkage-typeispartofBLISS-16.Oand BLISS-32,butnot BLISS-36.)O13.1.3C RestrictionsJO4In BLISS-16,theCALLlinkagetypeisvalidwithinput-AOparameter-locations,butnotwithoutput-parameter-O locations.] 3COThegeneral-registers referencedbyoutput-parameter-FO locationsare implicitly NOPRESERVE,andcannotappearBO5inNOTUSED, PRESERVE,orGLOBALlinkage modifiers;FOhowever,theymayappearin NOPRESERVE modifiers,but"Othisisnot required.  FOAregister-numbervaluemustnotbegivenasbothaCOparameter-locationandaglobal-register-segment,andKO5mustnotbegiveninmorethanoneparameter-locationor"Oglobal-register-segment, ! hNOAregister-numbervaluemustnotbegiveninmorethanoneOlinkageoption. O13.1.4C SemanticsJO4Thesameregistermaybebothaninput-andanoutput-Oparameter-location. NKOEachoutput-parameter-location specifiesthataresultfromNOthe evaluationofthe routine-bodywillbereturnedinthatO5 register. uLOThe output-actual expressionsinthe routine-callareasso-LOciatedwiththeoutput-parameter-location registers specifiedHO5bythelinkage-declaration.,WhentheroutinereturnstoJOthecaller,thecontentsofeachoutput-parameter-locationKOregisterisassignedtothe output-actualfield reference. IOIffewer output-actual expressionsarepresentthanwereIO specifiedbythelinkage,the remainingoutput-parameter-FO5location registersaretreatedas NOPRESERVE's..IfanLOemptyelement (identifiedbyanull expression)appearsinROthelist,itwill(whenoutput-actualsareboundtotheappro-KO>priateoutput-parameter-location registers)betreatedasaO placeholder. fHOThelinkage-declarationdefinesanamefora particularKO combinationofcallingsequencecharacteristics.*AnamesoNO5declaredcanbeusedasalinkage-attributeinanykindofNOroutine-declaration.'Theseveralpartsofalinkage-definition7Oare describedinthe following sections.!O13.1.4.1B Linkage-TypesNO)The linkage-typeselectsthe principalcharacteristicsoftheIOcallingsequencetobeused.,Each linkage-type generally&O establishesthe following: ` JThespecificmachine instructionstobeusedtotransferG(controltoaroutineandtoreturnfromtheroutine. ` HWhetherornotanargumentpointerisusedtoaddress#actual-parametervalues. ` 2Whichlinkage-optionsare applicable. ` .Thedefaultsforlinkage-options.U! +GOTheCALLkeywordoccursasa linkage-typeinBLISS-16KOand BLISS-32;however,theonlycommoncharacteristicthatLO5CALLimpliesistheuseofanargumentpointertoaccessIOactual-parameters(thatis,input-andoutput-actualsforHO BLISS-32,and input-actualsonlyfor BLISS-16).)CALLisLO>nottheonly linkage-typethatimpliesuseofanargumentPOpointer;theF10 linkage-typeinBLISS-36alsoimpliesuseof Oanargumentpointer.'O13.1.4.2BParameter-LocationsJO)Aninput-actual-parameterofa routine-callcanbepassedTOtothecalledroutineinoneoftwoways:*itcanbepassedinTOa standard,ordefault,methodoritcanbeassignedtooneofIO3thegeneral registers;however,anoutput-actual-parameterCOmustbeassignedtooneofthegeneral registers.! NMOTherearetwomajor variationsonthestandardmethod;theLO linkage-type determineswhichoneisused.'ThetwomethodsO5are:hl `  ByN argumentpointer `O  OBy#NO implicitstacklocationV ^,/O 13.1.4.2.1CArgumentPointerMethod$LIntheargumentpointerKO(method,alloftheinput-actual-parametersoftheroutine-SOcallareassignedto successive positionsinablockcalledtheO argumentblock?v.,TheaddressofthisblockispassedtothePO2calledroutineusingoneofthegeneral registers.+Aregister-Ousedinthiswayiscalledan%b argumentpointerregister.)TheKOcalledroutinefetchesaninput-actual-parametervaluefromIO<theargumentblock,usingtheargumentpointervalueinGO combinationwithanoffset determinedfromtheformal-COnamethat correspondstothatinput-actual-parameterOE position.! WKOInadditiontotheinput-actual-parametervalues,anargu-MOmentblockcancontain additional information concerningtheMO5 parametervalues.'IneachBLISSdialect,theargumentblockLOcontainsthenumberofinput-actual-parametervaluesintheLOblock.(InBLISS-36other informationmayalsobe contained#O>intheargumentblock.? FOAnargumentblockmaybelocatedanywhereinstorageROattheoptionofthe compiler.+ItmightbepartofthestackOO5frameoftheroutine containingthe routine-calloritmightPObein permanently allocatedstorage.'A restrictionagainstas-IOsigningtoa formal-nameassuresthatanargumentblockNO>canbe allocatedinstorage protectedagainstwritingand/orGOreusedinthecallingroutineforotherroutine-calls.! UW7O 13.1.4.2.2CImplicitStackLocationMethod"IntheimplicitstackLO(locationmethod,theinput-actual-parametersoftheroutine-OOcallareassignedto successive positionsinthestackframeOOoftheroutine containingthecall.+NoexplicitvaluegivingTO2thelocationofthe parametersispassedtotheroutinethatisLOcalled.'Thecalledroutinefetchesaninput-actual-parameterKOvalueusingimplicit informationaboutwherethevalueis)O<locatedinthestackframe.t UJ*O 13.1.4.2.3CRegister Parameters)InadditiontothestandardDO(methodofpassinginput-actual-parametervalues,someLOorallofthe parameterscanbepassedby assigningthemMOto specifiedgeneral registers.,ThismethodcanbeusedinLO2 combinationwiththestandardmethod;forexample,onepa-OOrametercanbepassedina register,andtheothersintheGOstandardway.(However,alloutput-actual-parametersmust8O<bepassedbythegeneral-registermethod.r! HCOThegeneral-registers referencedbyoutput-parameter-JO locationsare implicitly NOPRESERVE,andcannotappearinCO5NOTUSED, PRESERVE,orGLOBALlinkage modifiers.'TheIO registersmayappearina NOPRESERVElinkage-option,but/Osuch specificationis unnecessary.K! `!!O13.1.5CLinkage-OptionsGO4Linkage-options supplementandmodifythebasiccallingIOsequence conventions establishedbythe linkage-type.+ForDOexample,inBLISS-36the LINKAGE_REGSoptioncanbeJO=usedin combinationwiththePUSHJ linkage-typetospec-VOifythe registerstobeusedasthestackpointer,framepointer,POand value-return register, respectively,ifthedefaultchoicesO5 PRESERVE, NOPRESERVE,andGLOBALlinkage-optionsQOare examples.*Theycanbeusedinalldialectswithatleast(Otwo differentlinkage-types.# OOIntheobjectcode generatedforagivenroutine,eachreg-MOister'suseisgovernedbyoneofthreeusage conventions,JO5each correspondingtooneofthe followinglinkage-optionO keywords:![OPRESERVEA preservedregister/canbeusedduringthe executionH40oftheroutine,buttheoriginalcontentsatthetimeH4~oftheroutinecallmustberestoredatthetimethe+4routine completesandreturns.OE NOPRESERVEA E nonpreservedregister)1Ecanbeusedduringtheex-G4ecutionoftheroutine(without restoringitsoriginal4 contents).OZGLOBALA$Zgloballyusableregister$pZisusedonlyasdeter->4minedbyits correspondingGLOBALREGISTERand>4EXTERNALREGISTER declarations,andbyexplicit94B source-code referencestosucha register.n" DMOAregisterthatisgiveninaPRESERVElinkage-optioncon-MOtainsthesamevalueafter returningfromaroutineasitQO5 containedatthetimetheroutinewascalled.'Thecalledrou-TOtinemayormaynotusethe register.)Ifitdoes,thenspecialROactionistakentosavethecontentsoftheregister(pushitTO>ontothestack)beforetheregisterisusedandrestoreit(popTOitfromthestack) afterward.'Iftheregisterisnotused,thenVOnospecialactionisneeded.'Ineithercase,acallingroutineisSOHabletoleaveuseful informationinaregister preservedbytheSOroutinebeing called-the informationisstill availableaftertheOcall.#qIOAregisterthatisgivenina NOPRESERVElinkage-optionMOdoesnot necessarilycontainthesamevalueafter returningOO5fromaroutineasit containedatthetimetheroutinewasOOcalled.)Thecalledroutinemayormaynotusethe register,RObutineithercasenospecialactionistakentopreserveitsLO> contents.)Acallingroutinemustnotleaveneededinforma-ROtioninaregisterthatisnot preservedbytheroutinebeingMO called-the informationmaynotbe availableafterthecall.$! aIO RegistersthataregiveninaGLOBALlinkage-optionarePOusedtocontainglobalregisterdatasegmentsbybothcallingMO5andcalled routines.)Globallyusable registersarenotman-SOagedbythe compiler;theyareusedonlyas explicitlydirectedLObythesourceprogram.*Incertainspecialcases, dependingPO>onthe linkage-typeandotherdetails,aregistergiveninaJOGLOBALlinkage-optionmaybetreatedasa preservedreg-SOister,ratherthanasgloballyusable.'Thesecasesare described>OHlaterinthesectionsforeachBLISSdialect.%% @OGloballyusable registersare describedfullyinSection13.7GOwheretheGLOBALlinkage-optionandtherelatedGLOBAL>O5REGISTERandEXTERNALREGISTER declarationsareO considered together.*%F?Cx4wy&.O13.2CBLISS-16Linkage-DeclarationsLOUThelinkage capabilitiesprovidedbythelinkage-declaration,OinBLISS-16arethe following:' ` >TheJSR,CALL,EMT,TRAP,IOT, INTERRUPT,and (RSX_AST linkage-types ` BStandardorregisterparameter-locationsforinput-Cactualsandregisterparameter-locationsforoutput-Yactuals ` 7Globallyusedandlocallyused registers `W ;WThe CLEARSTACK,RTT,and VALUECBITexitse-!quencelinkage-options(NOAsanexampleofalinkage-declaration,considerthefollow-Oing:Oa LINKAGE7 PAR2REG3%=&CALL(STANDARD,&REGISTER&=%3);)VLOThe declaration indicatesthattheCALL linkage-typeistoNObeusedandthatthesecondinput-actual-parameteristobeIO5passedusingregister3.+Thefirstinput-actual-parameterJOandany parametersafterthesecond parameteraretobe)Opassedinthestandardway.B*O13.2.1CSyntaxi+o ?Olinkage-declaration(3LINKAGElinkage-definition,... ;Olinkage-definition'3 linkage-name= linkage-type 3f8 3> 3F> 3< 3> 3> 3: ( k8 < ;:% input-parameter-location,w... nothing  k9  =  ;; 8 C< :);output-parameter-location,...Mnothing e 9 e C= e ; *)nothing f9 > F> = > > ; 38 3< 3f::!linkage-option...nothing 99 9= 9f;Oz16Only Kz)O linkage-type 38 3> 3~< 3> 3V : |JSRCALL EMTdTRAP IOT INTERRUPTM RSX_AST K9 K> K~= K> KV ; 1 1  1Oj input-parameter- location 3 8 3 < 3g :& REGISTER=register-number STANDARD/ nothing m 9 m = mg ;Oz output-parameter- location(3  {REGISTER=register-number}O 16Only K )Olinkage-option 3 8 3W> 3< 30> 3:  CLEARSTACK /RTT| VALUECBIT-GLOBAL(global-register-segment, ... ) {PRESERVE@}+e {NOPRESERVE}(register-number,e... } e) 9 W> = 0> ;Oglobal-register-segment,3global-register-name= register-3number O8 O< O:global-d register-name linkage-name 9 = ;3:nameOregister-number*3 compile-time-constant-expression OG O1Fm Linkage-typeisinvalidwithoutput-parameter-locations.p,VFO13.2.2C RestrictionsFO4 Linkage-namesdefinedwithEMT,TRAP,orIOTlinkage-QOtypescanbeusedonlyasalinkage-attributeinbind,globalKObind,andexternalroutine declarations(orinageneral-)O= routine-callas describedin6=Section 13.2.4.2).*,6?Mt-JJOTheregister-numbervaluemustbeintherange0to5. .FOAregister-numbervaluemustnotbegivenasbothaCOparameter-locationandaglobal-register-segment,andKO5mustnotbegiveninmorethanoneparameter-locationor"Oglobal-register-segment./! gNOAregister-numbervaluemustnotbegiveninmorethanoneOlinkage-option.0 NMOIftheCALL linkage-typeisgiven,thentheregister-numberJOofaREGISTERparameter-locationmustbeintherange0O5to4.1 N;OTheGLOBAL, PRESERVE, NOPRESERVE, CLEARSTACK,IOand VALUECBITlinkage-optionsmustnotbe specifiedwith"O5theCALL linkage-type.2 NQOIfOTS (run-timelibrary)routinesarecalled,register0mustNOnotbe specifiedasaglobal-register-segmentinthecalling(O5 routine'slinkage-definition.3NJOIfthe CLEARSTACKlinkage-optionisgiven,thenumberofLOactual-parametersina (general) routine-callmustbeequal:O5tothenumberofparameter-locationsgiven.4HOThe VALUECBITlinkage-optionmaynotbe specifiedinaBOlinkage-definitionforaroutinewritteninBLISS.5Q yIOIfthe VALUECBITlinkage-optionisgiven,the CLEARSTACK0Olinkage-optionmustalsobegiven.6fDOTheRTTlinkage-optionmustbegivenonlywiththe"O INTERRUPT linkage-type.7 YJONolinkage-optioncanbegivenwiththeRSX_ASTlinkage-Otype.8|O13.2.3CDefaultsHO4Ifaparameter-locationisnotgiven,thenSTANDARDisFOassumed..Ifa routine-callorroutine-declarationcon-HOtainsmore parametersthanaregiveninthe associatedCO=linkage-definition,thenSTANDARDisassumedastheIOparameter-locationforeachofthe additional parameters.9! eSOFortheJSR linkage-type,the registersareusedasfollows,byOdefault::  O#O RegistersDefaultUsage O Ob00bValuereturn register, nonpreserved O1-5 Preserved OV6VStackpointer O7Programcounter Oz; PPOFortheCALL linkage-type,the registersareusedasfollows:+< OO RegistersUsage O Ob00bValuereturn register, nonpreserved O1-4 Preserved OV5VArgumentpointer O6Stackpointer OI7IProgramcounter Od= ^NO(ThedefaultusagecannotbemodifiedfortheCALLlinkage-Otype.)>?OFortheEMT,TRAP,IOT, INTERRUPT,andRSX_ASTOOlinkage-types,the registersareusedasfollows,bydefault:? O#O RegistersDefaultUsage O Ob0-5b Preserved O6Stackpointer OV7VProgramcounter Oq@cO13.2.4C SemanticsLO4Alinkage-definitiondefinesanamethat designatesapar-KOticular combinationofcallingsequenceoptions.+ Generally,IOsuchanamecanbeusedasalinkage-attributeinanyPO=kindofroutine-declaration;however,thisisnottrueofallOlinkage-names.AWHOThe linkage-typeJSR specifiesthatthePDP-11JSRandKORTS instructionsareusedbythecompiledcode,andthatCO5the parameterswithSTANDARDparameter-locationsareJOplacedonthestack(withouta parametercount)andac-SOcessedbythecalledroutinerelativetothestackpointer(SP)O> register.HBIOThe linkage-typeCALL specifiesthatthePDP-11JSRandKORTS instructionsareusedbythecompiledcode,andthatCO5the parameterswithSTANDARDparameter-locationsareGOpassedusingregister5(R5)astheargumentpointer.JC DOThe linkage-types INTERRUPTandRSX_ASTspecifythatPOaroutinewillbecalledonlybyaPDP-11hardwareorsoft-HO5ware interrupt.-Theselinkagesarefurther describedinOSections13.2.4.1 andB 13.2.4.3.*CP?J*CBP?O`D6GOIfREGISTERis specifiedforaparameter-location,theLOgivenregisterwillbeusedasthelocationtowhichtheJO5actual-parametervalueistobe assigned,and correspond-SOingly,isthelocationwherethecalledroutineexpectstofindMOthevalue.-ThisuseofaregisterlocationtotransmitanLO>actual-parametervaluetoacalledroutinedoesnotaffectLOthe semantics associatedwiththeuseofthe corresponding!Oformal-parametername.yE tOFOThe CLEARSTACKlinkage-option(whichcanbeusedonlyEOwiththeJSR,EMT,TRAP,IOT,or INTERRUPTlinkage-KO5type) specifiesthattheactual-parametersthatareplacedNOonthestackfora routine-callareremovedfromthestackQObythecalledroutine(insteadofbythecalling routine).+IfKO> CLEARSTACKisnot specified,theywillnotberemovedbyQOthecalledroutine(andaretheresponsibilityofthecaller).EOThe VALUECBITlinkage-option(whichcanbeusedonlyEOHwiththeJSR,EMT,TRAP,IOT,or INTERRUPTlinkage-IOtype,andonlyin combinationwith CLEARSTACK) specifiesKOthatanexternalroutinedeclaredwiththislinkage-optionWORreturnsitsvalueintheCbit,andthatthevalueofregister0MOis undefinedonreturnfromsucharoutine.*(Thislinkage-FOoptionisusedto communicatewith non-BLISSroutines6O[havingthis value-returncharacteristic.)>FJOTheRTTlinkage-option(whichcanbeusedonlywiththeEO INTERRUPT linkage-type) specifiesthatthePDP-11RTTPO5 instructionshouldbeusedtoexitfromthe interruptroutine5OinsteadofthenormalRTI instruction.G b keywords.*Youspecifyausage conventionforaregisterbyIOgivingitsnumberinthe appropriatelinkage-option.+The@O descriptionoftheselinkage-optionsisgiveninSection13.1.5.*G?DH PORegisterusage conventionscanbe specifiedonlyfor registersNO0through5;the remaining registers(thestackpointerandLO5programcounter)areusedonlyas specifiedinthePDP-110Ohardwareandsoftware architecture.ILOGloballyusable registersarenotmanagedbythe compiler;QOtheyareusedonlyas explicitlygiveninthesourceprogram.yJ O+O13.2.4.1B INTERRUPT Linkage-TypeBO)A linkage-namedefinedwiththe INTERRUPTlinkage-OOtypecanbeusedonlyasalinkage-attributeina forward-,PO ordinary-,orglobal-routine declaration.)It specifiesthattheSO3routinetowhichitisappliedwillbeinvokedonlybyaPDP-NO11hardware interruptorsoftware simulationofan interruptHO(suchasanRSX-11 SynchronousSystemTrap).( InterruptsMO<mayoccurasaresultofcertainexternalevents,suchasNOI/Odevice completion,orasaresultof programmedevents,NOsuchas executionofcertain instructions:)EMT,IOT,andsoOFon.)(SeeFSection13.2.4.30F concerningtherelated linkage-typeO RSX_AST.)*J ?OK WGOThenumberof formal-namesgivenfortheroutinemustPOequalthenumberofvaluespushedonthestackbythecall.QO5Inmostcasesthisisexactlytwo.'However, interruptroutinesJOthatarecalledbygeneral-routine-callsusingalinkage-JOnamedefinedwithanEMT,TRAP,orIOT linkage-typecan4O>havemorethantwoformal parameters.OL %HOTheformal parametersoftheroutine correspondtothePOhardwarevaluesintheorderpushed;thatis,thefirstfor-JO5mal parameter correspondstothefirstvaluepushed,theHOsecondformal parameter correspondstothesecondvalueKOpushed,andsoon.* Consequently,thefirstformalparame-NO>ter correspondstothepushed processorstatus(PS)andtheJOsecondformal parameter correspondstothepushedprogramOcounter(PC).M8O13.2.4.2BEMT,TRAP,andIOT Linkage-TypesKO)Inageneral-routine-callthatusesa linkage-namedefinedGOwithanEMT,TRAP,orIOT linkage-type,the following Ospecialrulesapply:cN 9 ` CForEMTandTRAP,thefirstvalueintheactual-H( parameterlistisnot interpretedasaroutine-address.LInsteaditis interpretedasavaluethatis incorporatedHintothelowbyteoftheEMTorTRAP instructionit-M2self.'Itmustbea compile-timeconstant expressionintherange0to255. `  H ForIOT,allofthevaluesinthe parameterlistareAcactual-parameters.-Thereisnoroutine-addresspa-rameter.O )O13.2.4.3BRSX_AST Linkage-TypeBO)Similartothe INTERRUPT linkage-type,theRSX_ASTQO linkage-type specifiesthattheroutinetowhichitisappliedGOwillbeinvokedonlybyanRSX-11 AsynchronousSystemOO3Trap(AST).Thefirstfourformal parametersofsucharou-LOtineare mandatoryand correspondtothe followingcontextO information:Pg$`1.: Event-flagmaskword#`O2.:Programstatusword`3.:ProgramcounterA`N4.: DirectiveStatusWordofthe interruptedtaskQ WPO Additionalformal parametersmustbe specifiedifthekindofJOASTthatinvokestheroutinepushes supplementalinforma-PO5tionontothestack.+Atthe routine'sreturnpoint,anysuchKO supplemental informationisremovedfromthestackandanGORSX-11ASTSERVICEEXIT directive(ratherthananRTS%O> instruction)is executed.nRVD6O13.2.5CBLISS-16 Predeclared Linkage-NamesBO4Four linkage-namesare predeclaredineveryBLISS-IO16module.+Thelinkagesareprovidedfor compatibleandJO transportableusageamongtheseveralBLISS dialects.*SeeO=Section13.5" = concerningsuchusage.*RO?SKOThe predeclared linkage-namesaredefinedasshowninthe!O following declaration:Oa LINKAGE BLISS%=&JSR, FORTRAN&=%CALL,9 FORTRAN_SUB%=&CALL,  FORTRAN_FUNC%=%CALL;Iy7x{TD.O13.3CBLISS-32Linkage-DeclarationsJOUAlinkage-declarationinBLISS-32canbeusedtospecifyEOaCALL,JSB,or INTERRUPT linkage-type,to designatePO registersforpassing parameters,andtoidentify registersasHO^globallyused,locallyused,ornotused.'Forexample:O LINKAGE:+ DBL_PREC%=%CALL(%;& REGISTER=0,& REGISTER=1);UWHOThe declaration indicatesthattheCALL linkage-typeisHOtobeusedandthatoutput-actual-parametersaretobePO5passedusing registers0and1foradouble-precisionresult.LOBecausethe registersaretreatedasoutput-parameterloca-LOtions,thecalledroutine (DBL_PREC)shouldbedeclaredasO>NOVALUE.pVMFO13.3.1CSyntax.O4SYNTAX:4ClicktodisplaySyntax.*VOOWY! O13.3.2C RestrictionsFOANOTUSEDlinkage-optionmustonlybegivenwiththeKO_JSBand INTERRUPTlinkage-types.'Itmustnotbegivenin5O combinationwiththeCALL linkage-type.Z )GOTheregister-numberinaREGISTERparameter-locationorAOalinkage-optionmustbeintherange0to11.[ [FOAregister-numbervaluemustnotbegivenasbothaIOparameter-locationandaglobal-register-segment,mustnotIO5begivenasbothaparameter-locationandinaNOTUSEDIOlinkage-option,andmustnotbegiveninmorethanone:Oparameter-locationorglobal-register-segment.\! gNOAregister-numbervaluemustnotbegiveninmorethanoneOlinkage-option.] IOSomeofthecharacter-handlingandmachine-specificfunc-OOtionsrequiretheuseof particularmachine registersbecauseOO5theyresultinVAX instructionsthatuse specified registers;QOsuch functionsmustnotbeusediftherequired registersareQOnotlocallyusable.*Observethatatmostthesetof registersPO>0through5 inclusivemustbelocallyusabletosatisfythisO requirement.[^! 1NOTheVAXcallingstandardrequiresthatregister0orregis-QOters0and1togetherbeusedtoreturnroutinevalues.)ThisMO5 requirement,combinedwiththe precedinggeneral restriction,EOleadstothe followingtwo special-case restrictions:L_ |" ` PIfa routine-callisinthescopeofaglobalregisterdataM(segmentthatis allocatedineitherregister0or1,thenQtheroutinethatiscalledmustnotreturnavalue;thatis,<mustbedeclaredwiththeNOVALUE attribute. `Y KYIfthelinkage-attributeofaroutine-declaration specifiesC registers0or1as PRESERVE,GLOBAL,orNOTUSED,B thenthatroutinemustalsohavetheNOVALUEat-ctribute.c` 9NOTheVAXcallingstandardalsorequiresthat registers0andKO1beusableas temporary registersbythe conditionhan-BO5dlingsoftwareduring processingofasignal(see5Chapter17).MOFurther,onlyroutinestackframes associatedwiththeCALLKO linkage-typeareusedfor restoringregistercontentsdur-KO>ing unwinding.'These requirements,togetherwiththeaboveMO restrictionson linkages,leadtothe following special-caseO restrictions:*`O+ a  ` >A routine-bodymustnot immediatelycontainanH(ENABLE declarationifthelinkage-attributeoftherou-Etineisdefinedwith linkage-typeJSB,or INTERRUPT,Gorwith registers0or1aseither PRESERVE,GLOBAL,2orNOTUSED. ` IAroutinewhoselinkage-attributeisdefinedwithregis-C ters0or1as PRESERVE,GLOBAL,orNOTUSEDmust-cnotbe terminatedby unwinding. ` KIfa routine-calltoaroutinewithJSB linkage-typeoc-O:cursinaroutinewithJSB linkage-type,allofthelocallyPusable registersofthecalledroutinemustalsobegivenasNlocallyusable registersoftheroutine containingthecall.MDThatis,the outermostJSBroutineinanestofJSBrou-Ptinesmustspecifyallthe registersthatarelocallyusable.L(This restrictionassuresthattheCALLroutinethatcallsJNthe outermostJSBroutinecanpreserveallthe necessary registers.)2b=OThe VAX calling standard is described in the  VAX O ArchitectureHandbook2., Conditionhandlinganditsinter-4O5actionwithlinkagesare describedin5Chapter17M5ofthisOmanual.*bO+ c|O13.3.3CDefaultsHO4Ifaparameter-locationisnotgiven,thenSTANDARDisFOassumed..Ifa routine-callorroutine-declarationcon-HOtainsmore parametersthanaregiveninthe associatedCO=linkage-definition,thenSTANDARDisassumedastheIOparameter-locationforeachofthe additional parameters.d fPOFortheCALL linkage-type,the registersareusedasfollows,Obydefault:}ewS O#O RegistersDefaultUsage O Ob00bValuereturn register, nonpreserved O1 NonpreservedOV2-11V Preserved O12Argumentpointer OI13IFramepointer O14Stackpointer O=15=Programcounter OXf! eSOFortheJSB linkage-type,the registersareusedasfollows,byOdefault:Tg* O#O RegistersDefaultUsage O Ob00bValuereturn register, nonpreserved O1 NonpreservedOV2-11V PreservedO12-13Notused OI14IStackpointer O15Programcounter Oh NOObservethat,forbothCALLandJSBlinkage-types, registers7O0to11arelocallyusablebydefault.i kKOForthe INTERRUPT linkage-type,the registersareusedas Ofollows,bydefault:j O#O RegistersDefaultUsage OOb0-13b Preserved O14Stackpointer OV15VProgramcounter Oq?kVO13.3.4C SemanticsLO4Alinkage-declarationdefinesanamefora particularcom-JObinationofcallingsequenceoptions.-AnamesodeclaredNOcanbeusedasalinkage-attributeinanykindofroutine-O= declaration.:lDOThe linkage-typeCALL specifiesthattheVAXCALLS,HOCALLG,andRET instructionsareused.*Further,thepa-DO5rameterswithSTANDARDparameter-locationsarepassed@Ousingregister12(AP)astheargumentpointer.m! HOThe linkage-typeJSB specifiesthattheVAXJSB,BSBW,LOBSBB,andRSB instructionsareusedbythecompiledcode.?O5Further,the parameterswithSTANDARD parameter-JO locationsareplacedonthestack(withoutacount)andOOaccessedbythecalledroutinerelativetothestackpointerNO>(SP) register.&IfREGISTERisgivenasaparameter-location,QOthenthegivenregisterisusedasthelocationtowhichtheLOactual-parametervalueisassignedin performingaroutine-MOHcall,andcorrespondingly,isthelocationwherethecalledNOroutineexpectstofindtheactual-parametervalue.(ThisuseNOofaregisterlocationtotransmitanactual-parametervalueOORtoacalledroutinedoesnotaffectthe semantics associatedIOwiththeuseofthe correspondingformal-parametername.n! iKOThelinkage-optionsspecifytheusage conventionsthatap-NOplytoeachVAXmachineregisteratthetimearoutineisRO5calledandduringthe executionoftheroutine.'TherearefourMO conventions,one correspondingtoeachofthefourlinkage-AOoption keywords,GLOBAL, PRESERVE, NOPRESERVE,andMO>NOTUSED.Ausage conventionis specifiedforaregisterbyIOgivingitsnumberinthe appropriatelinkage-option.+The@O descriptionoftheselinkage-optionsisgiveninSection13.1.5.*n?so IMORegisterusage conventionscanbe specifiedonlyforregis-JOters0through11;the remaining registers(theargumentLO5pointer,framepointer,stackpointer,andprogramcounter)OOareusedonlyas specifiedintheVAXhardwareandsoftwareO architecture.pNLOGloballyusable registersarenotmanagedbythe compiler;QOtheyareusedonlyas explicitlygiveninthesourceprogram,*O5withthe following exception: qKInaroutinewithalinkagethat specifiesCALLlinkage-A(typeandaglobally-usableregister(inaGLOBALElinkage-option),iftheglobal-register-segmentisnotFdeclaredasaglobalregisterdatasegment(usinganA2EXTERNALREGISTER declaration)withinthebodyofLtheroutine,thenthecompilercanchoosetoconsiderthe>register preserved(andhence,locallyusable).-rJOHowever,inaroutinewithalinkagethat specifiesJSBHO linkage-type,thecompilercannotpreserveandusesuchOO5 registers.+Thereasonforthe differencehastodowiththeFO requirementsfor condition handling..Briefly,theCALLJO linkage-typeprovidesthe informationneededforthecon-MO>ditionhandlingsoftwaretoproperlyrecoverregistervaluesEOwhendoing unwinding;theJSB linkage-typedoesnot.#s JO RegistersthataregiveninaNOTUSEDlinkage-optionareQOnotusedinanyway.'Onlyroutineswithalinkagethatspec-MO5ifiestheJSB linkage-typecanhave registersthatarenotOusable.tNFOSome guidelines concerningthechoiceof registerstoEOspecifyinaNOTUSEDlinkage-optionare discussedinO5Section13.7.2.*tO?u c%O13.3.4.1BJSB Linkage-Type$O)TheroutineEXCHANGEing)Section12.4.5 `)isanexampleofaOOroutinethatcanbemade significantlysmallerandfasterbyIOtheuseofalinkage-declarationsuchasthe following:O_ LINKAGE8O FAST&=% JSB(REGISTER&=%0,%REGISTER%=%1);*ug? vGOWhenthelinkage-attributeFASTisgivenfortherou-HOtine EXCHANGE,theJSB linkage-typeisusedinsteadofHO5theCALL linkage-typeandthe parametersarepassedinO registers0and1.wMOWhenasetofroutineswithJSB linkage-typecallonean-SOother,makesurethatthelocallyusable registersofthecall-NO5ingroutineincludeallthelocallyusable registersofanyLOroutinethatitcalls..Forexample,considerthe followingOlinkage-declarations:Ok LINKAGE JSB_ALL%=&JSB,) JSB_NO11%=%JSB:& NOTUSED(11);x WJOThelinkageJSB_ALL specifiesaJSB linkage-type.(BecausePOnolinkage-optionsaregiven,thelocallyusable registersarePO5 registers0to11.(ThelinkageJSB_NO11also specifiesaJSBLO linkage-type.'Becausethelinkage-option indicatesthatreg-WOister11isnotused,thelocallyusable registersare registers0O>to10.y;OSupposethe followingroutinesare declared:O FORWARD&ROUTINEP ALPHA:&JSB_ALL, BETA:% JSB_NO11;@z! LOThenroutineALPHAcan legitimatelycallroutineBETA.ButOOroutineBETAmustnotcallroutineALPHAbecausethesetofUO5locallyusable registersofALPHAisnotasubsetofthelocally&Ousable registersofBETA.{ +O13.3.4.2B INTERRUPT Linkage-TypeIO)The INTERRUPT linkage-typeforBLISS-32isusedfortheKOsamepurposesandprovidesthesame functionalityasthatMO describedfor BLISS-16,andissimilartotheJSBlinkage-IO3type.*Whenusedinaroutine-declaration,a linkage-nameIOdefinedwiththe INTERRUPT linkage-typeaffectsthefol-Olowing:|l ` )All registersare preserved. `O HOAs necessary, registersare explicitlysavedwithPUSHL"orPUSHR instructions. `' F'All referencestoformal-parametersareviathestackpointer(SP). ` KAtroutineexit,allbutthelasttwo argumentsarere-IWmovedfromthestack;theseareassumedtobeavalidBprogramcounter(PC)and processorstatuslongword (PSL). ` GAReturnfrom Exceptionor Interrupt(REI) instructionis executed.}BOInput-oroutput-parameter-locationREGISTERassign-@Omentsarenot permittedwith INTERRUPT linkages.@~ IOThecorrectnumberofformal-parametersmustbedeclaredFOwithan INTERRUPTlinkageroutinetoensurethattheNO5compilercleansthestackonexitingtheroutine;aroutine9Owithlessthantwo parametersisinvalid. COAn INTERRUPTlinkageroutineis implicitlydeclaredDONOVALUE.Anexampleofan INTERRUPTlinkageroutine O5inBLISS-32follows:O LINKAGE@ ARITH_EXCP=% INTERRUPT:%NOTUSED(3,4,5,6,7,8,9,10,11);=Ok ROUTINE&ARITH_EXCP_HDLR(CODE,PC,PSL):& ARITH_EXCP= BEGINE CASE%.CODE%FROM&SRM$K_INT_OVF_T%TO%SRM$K_FLT_UND_F%OF B SET  ...  ... ~ TES  END:AOThecodeintheexampleisexpandedasfollows:O ARITH_TRAP_HDLR:P PUSHLpR0 CASELp4(SP)%,#1,#9 .WORDp... ( ... MOVLp(SP)+,R0 ADDL2K#4,SP ! REIgPONoticeinthefirstlineoftheexpandedcodethatonlyonePOregister(R0)isneeded.+Inthesecondlinethe exceptionisNO5 dispatchedviathe exceptioncode.+Theregisteristhenre-HOstored(MOVL),andthetrapcodeis eliminated(ADDL2)1Obeforeareturn(REI)is executed.r HROExplicitcallsarealso permittedtoroutinesdeclaredwithin-QOterruptlinkage.,ThecallertreatssuchacallasifitwereKO5declaredwithaJSBlinkage attribute;an exceptionbeingGOthatthe parametersare automaticallyremovedfromtheQOstackbythecalledroutineandnotthecaller.'The parameterSO>orderissuchthatthecaller'sPCisalwaysthefirstformal-IO parameterandwillnotappearasanactual-parameterin&Otheexplicit routine-call.P +&OOIfan interruptlinkageroutineexists(forexample,SETPSL),GOthatisinvokedwithonlythePCandPSLasactual-KO5 parameters,theroutinecanbe explicitlycalledwiththe'O followingBLISS expression:O SETPSL(&.NEWPSL%):nVD6O13.3.5CBLISS-32 Predeclared Linkage-NamesDO4Four linkage-namesare predeclaredineveryBLISS-32GOmodule.-Theselinkagesareprovidedfor compatibleandJO transportableusageamongtheseveralBLISS dialects.*SeeO=Section13.5" = concerningsuchusage.*O?KOThe predeclared linkage-namesaredefinedasshowninthe!O following declaration:Oa LINKAGE BLISS%=%CALL, FORTRAN%=&CALL,9 FORTRAN_SUB%=%CALL,  FORTRAN_FUNC&=%CALL;[]{Ey|.O13.4CBLISS-36Linkage-DeclarationsHOUAlinkage-declarationinBLISS-36canbeusedtospec-FOifyaPUSHJ,JSYS,F10,or PS_INTERRUPT linkage-type,POtoidentifygloballyused registers,tospecifytheuseofaMO^PORTAL instructionintheentrysequenceofaroutine,andCOtospecifyotherlinkage capabilities.'Forexample:O< LINKAGE8 PAR2REG4%=%PUSHJ(STANDARD,%REGISTER%=%4);U+IOThe declaration indicatesthatthePUSHJ linkage-typeisKOusedandthatthesecondactual-parameterispassedusingJO5register4.)Thefirstactual-parameterandany parametersMOafterthesecond parameterarepassedinthestandardway.BO13.4.1CSyntax   Olinkage-declaration(LINKAGElinkage-definition,... 0;O$linkage-definition'$ linkage-name= linkage-type 8 #> > < k> > C: r( 8 !< :%input-parameter-location,_ ...+nothing 9 != ; (8 < :)M;output-parameter-location, M...nothing N (9 N = N ; w)rNnothing 9 #> > = k> > C; 8 < :r=:"linkage-option=...rnothing !9 != !;OBLISS-36Only 1)J linkage-type6J{PUSH!|!JSYS"|!F10!|! PS_INTERRUPT}O> input-parameter- location j 8  < : :&rh REGISTER=register-numberr STANDARDr nothing U j 9 U = U : ;ON output-  parameter- location- {REGISTER=registernumber}O BLISS-36Only 1 )Ox linkage_option \ 8  < ,: rZ general-linkage-optionr pushj-linkage-option%r ps_interrupt-linkage-option  \ 9  =  ,;Ogeneral-linkage-)option l8 > D< > :/rQGLOBAL(global-register-segment, Q... Q)rPORTAL r8 r< r:PRESERVEJ NOPRESERVE SKIP(value) CLEARSTACK 9 = ;l(register-number, l...  l) [ l9 [ > [ D= [ > [ ;O0pushj-linkage-~option!0 LINKAGE_REGS(stack-~pointer-reg,frame-pointer-reg,return-value-reg)O  ps_interrupt-Zlinkage-option 88 <  :r6PORTAL-r LINKAGE_REGS(stack-pointer-reg,.frame-pointer-reg,return-value-reg 89 = ; OI8 O< O:Gstack-pointer-regframe-pointer-regreturn-value-reg I9 = ;jregister-numberO-global-register-zsegment)-global-register-name=regis-zter-number O8 O< Oj:global- register-name3 linkage-name 9 = j;nameO~register-number ~compile-time-constant- expressionO skip-value-1!|!0!|!1"|!2O13.4.2C RestrictionsGO4AREGISTERparameter-location(inputoroutput)canbeBO specifiedonlywithaPUSHJorJSYS linkage-type.vHOInput-andoutput-parameter-locationscannotbe specified.Owitha PS_INTERRUPT linkage-type.NIOThe registers referencedbyoutput-parameter-locationsareCO implicitly NOPRESERVEandcannotappearinPRESERVE)O5orGLOBALlinkage modifiers.kCOTheregister-numberinaREGISTERparameter-locationOOmustbeintherange0to15(JSYS excepted)andmustnotOO5specifyaregistergivenaseitherthe stack-pointer(SP)orOOthe frame-pointer(FP).Itcan,however,bethesameasthe;Oregistergivenasthe value-return register.KOTheregister-numbersfortheJSYSlinkagemustbeintheDOrange1to4 (physical registersAC1throughAC4).P&BOThe LINKAGE_REGSlinkage-optioncannotbegiveninavoided;instead,usetheJSYSlinkage. >OWhenusinga LINKAGE_REGSoptionwiththePS_AO INTERRUPT linkage-type,youmustsupplyallthreeFO5registernumbers,althoughthereturn-value-registerisOunused. WFOTheSPregisterandthe value-returnregisterintheIO LINKAGE_REGSoptionmustbeintherange0to15,andPO5theFPregistermustbeintherange1to15.+TheregisterGOnumberinalinkage-optionotherthanthe LINKAGE-REGSQOoptionmustbeintherange0to15andmustnotspecifyaSO>registerusedasaSP,FP,orargumentpointer(if applicable).b 8QOAlloftheroutinesinagivenprogrammustusethesameSPMO register, includingany implicitlycalledObjectTimeSystemMO5(OTS) routines.*(This restrictionassuresthatasingleOTSMOlibrarycansatisfyallofthe requirementsofa program.)LOThesameregisternumbervaluemustnotbegivenasbothFOaparameter-locationandaglobal-register-segment,andKO5mustnotbegivenmorethanonceasaparameter-locationJOoralinkage-optionregisternumber.+Thereisoneexcep-ROtion:*theregister specifiedasthevaluereturnregisterinaHO> LINKAGE_REGSoptioncanalsobe specifiedas preserved,$O nonpreserved,orglobal. vROIfthevaluereturnregisterisalso specifiedas preservedorLOglobalthenthe linkage-namesodefinedmustonlybeusedTO5asalinkage-attributeinthe declarationofaroutinethatalsoKOhastheNOVALUE attributeorinageneral-routine-callin9Oacontextthatdoesnotrequireavalue.fJOThe skip-valuesforthePUSHJ linkage-typeare restrictedOto0through2. ]FOSomeexecutable-functionsimposehidden restrictionsonJOthelinkage-definitionandexplicitregisterusageoftheNO5 containingroutine.'More specifically,someofthe character-EOhandling-functionsandeachofthecondition-handling-:O functionsresultincallstoOTS routines.! OOTheseimplicitroutinecallsaremadewiththe governingOTSJOlinkagefortheprogram (BLISS36Cby default).* Therefore,MO5anyroutine containingsuch functionsmustalsobeabletoNOcallaroutinehavingthe governingOTSlinkage.(Inpartic-NOular,the containing routine'suseofregisterdatasegmentsOO>declaredbyregister-number,whetherlocalorglobal,mustbeNO consistentwiththeregister conventionsoftheOTSlinkage./O(Seethe restrictionsinSections10.7,u10.8, /and10.9.)*?*u?*?O13.4.3CDefaultsMO4Thedefaultsforeachofthelinkage-optionsdependonthe(O linkage-typethatisgiven.1ODefaultsforthePUSHJ Linkage-TypeHO4Ifaparameter-locationisnotgiven,thenSTANDARDisJOassumed.+Ifa routine-callorroutine-declarationcontainsKOmore parametersthanaregiveninthe associatedlinkage-GO> definition,thenSTANDARDisassumedasthe parameter-?Olocationforeachofthe additional parameters.p FMODefaultregisterusageforthePUSHJ linkage-typeisdeter-KOminedintwosteps:,First,thedefaultsfortheLINKAGE_GO5REGSoptionareappliedifthe LINKAGE_REGSoptionisROnotgiven;second,thedefaultsforall remaining registersareO determined.}DOThedefaultforthe LINKAGE_REGSoptionisLINKAGE_9O REGS(0,2,3),which indicatesthe following: O"ORegisterDefaultUsage O Ob0bStackpointer O2Framepointer OV30VValuereturn register, nonpreserved OqLOForanyregisternot specifiedbytheexplicitordefaultFO LINKAGE_REGSoption,thedefaultusageisasfollows: O#O RegistersDefaultUsage OOb0-10b NonpreservedO11-15 Preserved ONLOAsanexample,ifthePUSHJ linkage-typeisgivenwithoutNOanylinkage-option,thenthe resultingregisterusageistheO5 following:J  OO RegistersUsage O Ob0bStackpointer O1 Nonpreserved OV2VFramepointer O30Valuereturn register, nonpreservedOI4-10I NonpreservedO11-15 Preserved OM{0ODefaultsfortheJSYS Linkage-TypeKO4ForJSYS,the registersareusedasfollows,bydefault: O#O RegistersDefaultUsage O Ob0b PreservedO5-15 Preserved OV1-4V Nonpreserved OqMy/ODefaultsfortheF10 Linkage-TypeJO4ForF10,the registersareusedasfollows,bydefault:  O#O RegistersDefaultUsage O Ob00bValuereturn register, nonpreservedO1-13 Nonpreserved OV14VArgumentpointer O15Stackpointer Od::OObservethataframepointerisnotused. 8ODefaultsforthe PS_INTERRUPT Linkage-TypeGO4For PS_INTERRUPT,thedefaultregisterusageisdeter-KOminedintwosteps:,First,thedefaultsfortheLINKAGE_GOREGSoptionareappliedifthe LINKAGE_REGSoptionisRO>notgiven;second,thedefaultsforall remaining registersareLO determined.'The registersareusedasfollows,bydefault:I O#O RegistersDefaultUsage O Ob0b Preserved O1-Valuereturn register, preservedOV2-12V Preserved O13Framepointer OI14I Preserved O15Stackpointer OyOOONotethatthevaluereturnregisteris specifiedbutunused.) O13.4.4C SemanticsGO4TheGLOBALlinkage-optioncanbeusedwithbothPUSHJ:OandF10linkage-types.'Itis introducedinMSection13.1 andis#O discussedindetailinFSection13.7.*MO?*F?d :HOThePORTALlinkage-optionisusedwiththePUSHJ,F10,FOand PS_INTERRUPTlinkage-types.'Whenusedinthedef-IO5initionofthelinkage-attributeofaROUTINEorGLOBALMOROUTINE declaration,itcausesthefirst instructionoftheKOcodecompiledfortheroutinetobeaPORTAL instructionKO>(JRST1,.+1).)ThePORTAL instructionisusedinthecon-NO structionofcertainkindsof execute-only programs.(Seethe2Osystemhardwaremanualsfordetails.m>OThePRESERVEand NOPRESERVElinkage-optionsareO describedin Section13.1.* ?  GOThe LINKAGE_REGSoption,usedonlywiththePUSHJandEO PS_INTERRUPTlinkage-types, specifiesthe registerstoOO5beusedforthestackpointer,framepointer,andthevalueOreturn register.! 'O13.4.4.1BPUSHJ Linkage-TypeGO)ThePUSHJ linkage-type specifiesacallingsequenceinMOwhichtheactual-parametersarepassedonthestackwithoutJOtheuseofanargumentpointer.,UnliketheF10linkage-MO3type,actual-parameterscanalsobepassedin registers(asKO describedin 13.1.1.3)andthe LINKAGE_REGSoptioncanbeSOusedtospecifywhich registersareusedforthestackpointer,HO<framepointer,andvaluereturn registers.&Forexample:O LINKAGE;  DBL_PREC%=&PUSHJ(%;& REGISTER=1,& REGISTER=2)::Q LINKAGE_REGS(15,13,1): NOPRESERVE(2,3,4,5)*: PRESERVE(0,6,7,8,9,10,11,12,14);r HNOTheexampledefineslinkageforadouble-precisionresultinLOAC1andAC2,withSTANDARD locations(thatis,thestack)MO5reservedforan arbitrarynumberofinputs.)BecauseAC1isKOtreatedasanoutput-parameter-location,theroutineshouldObeNOVALUE.NCOTheSKIPlinkagemodifier determineshowPUSHJre-KOturnstothecalling-location.-The following describestheO5 skip-valuesused:VO0Theroutinereturnstothecalling-locationplus1(thisisthe0default skip-value).XO1Theroutinemayreturntothecalling-locationplus1orplus2.@Thecallvalueiszero(noskip)or1(skip).WOq2Theroutinemayreturntothecalling-locationplus1,2,or3.EThecallvalueisthenzero,1,or2 respectively.MOAnonzero skip-valuemustappearonlyinavaluedroutine,?Oanda value-returnregistermustbe NOPRESERVE.NCOForROUTINE declarations,the return-valueisaddedMOtothesavedPCvalue; therefore,theroutinemustnotbeO5NOVALUE. aGOThe CLEARSTACKlinkagemodifiercanbeusedonlywithGOPUSHJ.Thisoption specifiesthattheactual-parametersPO5(placedonthestackbya routine-call)willberemovedfromPOthestackbythecalledroutine,insteadofthecallingrou-SOtine.*Ifthemodifierisnot specified,the parameterswillnotKO>beremovedfromthestackbythecalledroutineandbe-QOcometheresponsibilityofthecaller.'Beaware,however,thatKOthenumberofactual-parametersusedinthecallmustbeKOHexactlyequaltothenumberofformal-parameters declared.l &O13.4.4.2BJSYS Linkage-TypeMO)TheJSYS linkage-type specifiesacallingsequenceinwhichIOactual-parametersarepassedbyregistertoTOPS-20JSYS#O functions.'Forexample:O_ LINKAGEN SIN_LNKG%=%JSYS(REGISTER=1,& REGISTER=2,& REGISTER=3,& REGISTER=4;=_ REGISTER=1,% REGISTER=2,% REGISTER=3&)% :SKIP(-1);O7 BIND&ROUTINE$ SIN&=%%O'52'& :SIN_LNKG;NMOTheSINroutinereadsastringfroma specifiedsourcetoNOthecaller'saddressspaceusinganinlineJSYS instruction;:O5 parametersarepassedbymeansofAC1-AC4.NHOTheSKIPlinkagemodifier determineshowtheJSYSwillLOreturntothecalling-location.,The following describestheO5 skip-valuesused:! VVO-1[The instructionaftertheJSYSwillbeanERJMP.ThevalueofW0thecalliszeroifanerroroccurs; otherwisethevalueisa1.^O0Controlisreturnedtothenext instruction;thevalueofthecalliszero.[Oq1Controlreturnstothecalling-locationplus1orplus2."Thevalue=ofthecalliszero(noskip)or1(skip).XO82Sameas1,exceptcontrolalsocanreturntothecalling-locationLplus3(inwhichcase,thevalueofthefunctionis2). %O13.4.4.3BF10 Linkage-TypeLO)TheF10 linkage-type specifiesacallingsequenceinwhichCOinput-actual-parametersarepassedusinganargumentOblock(seeSection 13.1.1.1)1whoseaddressis containedinreg-VO3ister14.(Register15isthestackpointerandregister0isthe"Ovaluereturn register.*?$ .O13.4.4.4B PS_INTERRUPT Linkage-TypeFO)The PS_INTERRUPT linkage-typeissimilartoPUSHJandFO compatiblewithTOPS-10andTOPS-20software interruptDO(PSI) mechanisms;assuch,a PS_INTERRUPTmakesuseCO3oftheDEBRK%JSYSandDEBRK.UUOexit mechanisms4OforTOPS-20andTOPS-10.'Forexample:O LINKAGE%X INTERRUPT&=% PS_INTERRUPT;%O ROUTINE&PSI:% INTERRUPT&= BEGIN 0 ...x END;pA FIOAssumingaTOPS-20 compilation,thecode expansionwouldObeasfollows:DOa PSI:PUSHSP,%[%PSI36%%]p;fake&return%PC%to%keepj ;stack%adjusted PUSHSP,%FP j ;[OPT]%set%up%frame9 MOVEFP,%SPj9 ;[OPT] PUSHSP,%...&j ;[OPT]%save& necessary%ACs  ... POPSP,%...%j ;[OPT]%restore&saved&ACsY POPSP,%FP"jY ;[OPT]%recover&old%FP ADJSPSP,%1#j ;Remove%fake%return%PC DEBRK%j ;Return%to%monitor WMONoticethatthe expansionisexactlylikethatofaPUSHJPOroutine,the exceptionbeingthatatroutineentrythecalledPO5routineplacesadummyPConthestack,andatroutineexitIOthedummyPCisremovedbeforetheDEBRK%JSYSisex-LOecuted.)The environmentisthesameforTOPS-10,theonlyNO> exceptionbeingthat DEBRK.UUOisusedtoexittheroutine.kGOAroutinedeclaredasa PS_INTERRUPTtypemustadhere$Otothe followingrules: I`1.:TheroutinemustonlybecalledbythePSIsystem.O`O2.:Theroutinemustonlyfetchfromorassigntodataseg-Gmentswhichsatisfyoneofthe following requirements:  GYA data-segmentwhosescopeislimitedtothebodyofY(theroutine  AYA data-segmentdeclaredwithaVOLATILE attributeK`'3.:IfanUNWINDcanoccurwithinthescopeoftherou-Ltine,a conditionhandlermustbe establishedbymeansof8anENABLE declarationwithintheroutine.GOWhenanUNWINDoccurs,itis necessarythataDEBRK%COJSYS,or DEBRK.UUObeexecutedtoallow subsequentIO5software interruptstooccur.-To guaranteefutureinter-KOruptstheusermust establisha conditionhandlerintheBO PS_INTERRUPTlinkedroutine.+TheBLISS-36OTSusesOO>thishandlertoensurethatthesoftware interruptsystemisO re-enabled.%6O13.4.5CBLISS-36 Predeclared Linkage-NamesBO4Four linkage-namesare predeclaredineveryBLISS-FO36module..Theselinkagesareprovidedfor compatibleFOand transportableusageamongtheBLISS dialects.-SeeO=Section13.5:= concerningsuchusage.,Thedefaultlinkage-COnameis BLISS36C.The predeclared linkage-namesare>Odefinedasshowninthe following declaration:Os LINKAGE BLISS10%=&PUSHJ, BLISS36C%=zK PUSHJ: LINKAGE_REGS(15,13,1) NOPRESERVE(2,3,4,5)*# PRESERVE(0,6,7,8,9,10,11,12,14),k FORTRAN_SUB%=%F10, FORTRAN_FUNC&=6z F10:%&PRESERVE(2,3,4,5,6,7,8,9,10,11,12,13);*O? ~KOTheBLISS10linkageisprovidedfor convenient interfacingIOwithroutinescompiledbytheBLISS-10 compiler.)(BLISS-TO510isanolderdialectofBLISSthatisbecoming obsolete.)'TheKO definitionoftheBLISS10linkagegivenhereassumesthatKOdefaultregisteroptionsareusedbytheBLISS-10module.#KOTheBLISS36Clinkageisthedefaultlinkagefor BLISS-36.JOTheBLISS36ClinkagecanalsobeusedforBLISS-10rou-QO5tinesthatarecompiledwiththe/Z qualifieroftheBLISS-10O compiler.L~&}0! )?O13.7CGlobalRegisterDataSegmentsandLinkages OUA)U globalregisterdatasegment.Uisadatasegmentthatiscre-ROatedand allocatedinagivenregisterinoneroutineandcanVObemade availableforuseinotherroutinesthatitcalls.'GlobalMO^registerdatasegmentsare identifiedbynameandboththeOOcallingandcalledroutinemustagreethata particulardata!Osegmentis available.u K-OAGLOBALREGISTER declaration(Section10.8)xcausesaPOglobalregisterdatasegmenttobe allocated.*Aglobalregis-SO5terdatasegmentisalocaldatasegmentjustlikeanordinaryPOregisterdata segment-itiscreatedonentrytotheblockinOOwhichitis containedandreleasedonexitfromthatblock.MO>However,unlikeanordinaryregisterdatasegment,aglobalLOdatasegmentis availableincalledroutinesundercertainOcircumstances.*F? aOOTopassaglobalregisterdatasegmenttoacalledroutine,OOthelinkage-attributeforthecalledroutinemustcontaintheOO5nameofthedatasegmentanditsregister assignmentinitsGOGLOBALlinkage-option.)Theremaybemoreglobalregis-POterdatasegments availableatacallthanaregivenintheQO>linkageforthecall;however,everyglobalregisterdataseg-ROmentgiveninthelinkagemustbe availableatthecall.'OnlyOOthoseglobalregisterdatasegmentsgiveninthelinkageare.OH availableinthecalledroutine.! W0OAnEXTERNALREGISTER declaration(FSection10.9)%spec-ROifiesthataglobalregisterdatasegmentcreatedinacallingQO5routineis availableforuse.'ThedeclarednamemustbegivenQOinthelinkage;however,notallglobalregisterdatasegmentsGOgiveninthelinkageneedbedeclaredinanEXTERNAL O>REGISTER declaration.*FF?t| JIOThelinkage-attributeformsabridgebetweencallingandPOcalled routines.*Considertheuseoftheglobalregisterdata5O5segmentGRDSinthe followingexample:3O %IF%%BLISS(BLISS16)&OR&%BLISS(BLISS32) %THENI LITERALz GRDS_REG&=%1%; LINKAGEz! BRIDGE%=3i %BLISS16(JSR:& GLOBAL(GRDS&=% GRDS_REG))5 %BLISS32(CALL:% GLOBAL(GRDS%=& GRDS_REG));" %ELSE!%For& BLISS--36A LITERALz GRDS_REG&=%6%; LINKAGEz BRIDGE%=&PUSHJ:a LINKAGE_REGS(15,13,1) NOPRESERVE(2,3,4,5)' PRESERVE(0,7,8,9,10,11,12,14)$9 GLOBAL(GRDS%=% GRDS_REG); O %FIO FORWARD&ROUTINE"2 ROUT2:&BRIDGE%NOVALUE;O ROUTINE&ROUT1&= BEGIN+ GLOBAL&REGISTERzs GRDS%=% GRDS_REG; GRDS%=&0; ROUT2();K .GRDS END;-O ROUTINE&ROUT2:%BRIDGE%NOVALUE%=D BEGIN EXTERNAL%REGISTERz GRDS; GRDS%=&.GRDS&+%1;c END; WIOFirst,the literal-nameGRDS_REGisboundtoeithertheQOvalue1orthevalue6, dependinguponthecompilerusedforUO5the compilation.'ThisliteralvalueisusedtospecifyaregisterLOnumberinseveral subsequent declarations.'(The conditional-NO compilation constructsusedinthisexampleare describedinO>Chapters >15 >and>16.)*X?I*W?3 Z t0JONext,thenameBRIDGEisdefinedasa linkage-namewithNOtheglobalregisterdatasegmentGRDS.This declarationalsoKO5dependsuponthecompilerusedforthe compilation.*(NoteHOthatthe definitionofBRIDGEforBLISS-36matchestheGOdefaultBLISS36ClinkageexceptfortheGLOBALoption,NO>andthusis compatiblewiththedefault linkage.))Then,theFOforward-routine-declarationforROUT2usesthelinkage-JO attributeBRIDGE.ThecallingroutineROUT1 allocatesthePOHglobalregisterdatasegmentGRDSandsetsitto0.)(ObserveKOthatROUT1doesnotneedanyspeciallinkage-attributeinJOordertocreatetheglobalregisterdata segment.)+ROUT1JORthencallstheroutineROUT2.'ROUT2 incrementsthevalueNOoftheglobalregisterdatasegment,andreturns.)ThevalueMOofroutineROUT1isthevalueoftheglobalregisterdataO[segment,1.> MOBecausethe informationabouttheglobalregisterdataseg-FOmentissuppliedbythelinkage-attributeBRIDGE,theJO5compilercanperformseveral consistencycheckstoverifyQOthattheglobalregisterdatasegmentisbeingused correctly.KOIntheaboveexample,thecompilerknowsthatROUT2usesPO>aglobalregisterdatasegmentandcan, therefore,checkthatQOacallonthatroutineoccurswithinthescopeoftheglobalKOregister declaration.+Further,thecompilercancheckthatQOHtheexternalregister declarationforGRDSiswithinaroutineOOwithalinkage-attributefortheglobalregisterdatasegmentOGRDS. kiROAglobalregisterdatasegmentisaregisterthatis,bycon-OOvention,reservedfora particularusebyasetofroutinesLO5thatfunctiontogetherasapackage.*Forexample,considerLOafile maintenancepackage.( Typically,suchapackagecon-ROsistsof interfaceroutinesandinternal routines.'The interfaceNO>routines establishthefunctiontobe performedbythefileLO maintenancepackage(forexample,open,insert,andsoon)KOandsetupthe appropriate environment.)Theinternalrou-JOHtinesperformthebasic processingwithinthe environmentPO establishedbythe interface.)Partofthat environmentisof-LOtenthe establishmentofoneormoreglobalregisterdataOR segments. NPOTodescribesomeoftheelementsofafile maintenancepack-MOage,the followingprovidesa simplifiedversionofsuchaO5system.WFOThemoduleconsistsoftwoglobal routines, VECMAXMIN=Oand VECMAXMINAVG,eachofwhichusestwoad-=O5ditional internal routines.1Both VECMAXMINandbetheaddressofthedesiredFORTRANvariableorarray.. MOThefirstroutine, VECMAXMIN,iscalledwiththefirstpa-POrametergivingthebaseofanintegervector,andthesecondMO5 parametergivingthenumberofelementsinthevector.(TheIOmaximumvalue encounteredinthevectorisreturnedviaJOthethird parameter,whiletheminimumvalueisreturnedMO>viathefourth parameter.,Thevalueoftheroutineisthe:O differencebetweenthemaximumandminimum.4 EOThesecondroutine, VECMAXMINAVG,iscalledwithtwoLO parameterswhicharethesameasthefirsttwo parametersHO5of VECMAXMIN.Itsvalueistheaverageofthemaximum1Oandminimumelementsofthearray.) ! b HOTheinternalroutineVECMAX1searchesavectorandre-NOturnsthemaximumvalue;and similarly,theinternalroutineCO5VECMIN1returnstheminimumvalue.'RoutinesVECMIN1IOandVECMAX1eachreceivetheirtwo parametersasglobalOOregisterdata segments,in registersthatare appropriateforNO>the respective,dialect-specificlinkage definitions.+(SeetheLO guidelinesgivenfurtheron concerningthe preferredchoice4Oof registersforeachtargetsystem.)'Ot MODULE%VECOPS(IDENT='03')&=O BEGINO% LITERAL m VECREG&=% %BLISS16(1)4 %BLISS32(11)4 %BLISS36(12), E LENREG&=% %BLISS16(2)4 %BLISS32(10)4 %BLISS36(11);O> LINKAGE BLISSTWOREG%=z %BLISS16(JSR:)z %BLISS32(CALL:)0z^ %BLISS36(PUSHJ:%LINKAGE_REGS(15,13,1) NOPRESERVE(2,3,4,5)" PRESERVE(0,7,8,9,10,14))26 GLOBAL(VEC&=%VECREG,%LEN%=%LENREG);O FORWARD&ROUTINE# VECMAXMIN:% FORTRAN_FUNC,&/ VECMAXMINAVG:% FORTRAN_FUNC, w VECMAX1:% BLISSTWOREG, VECMIN1:% BLISSTWOREG;O( GLOBAL%ROUTINEBp 'VECMAXMIN(VECADR,LENADR,MAXADR,MINADR):& FORTRAN_FUNC%= BEGIN! GLOBAL&REGISTER)zi VEC%=&VECREG%:&REF%VECTOR,z LEN%=&LENREG;* !% Initialize&global% registers b ! VEC&=%.VECADR; LEN&=% ..LENADR;[ !%Main&code ! .MAXADR%=& VECMAX1(); 3 .MINADR%=& VECMIN1();{ ..MAXADR-..MINADR END;HO, GLOBAL%ROUTINE%VECMAXMINAVG(VECADR,LENADR):& FORTRAN_FUNC%=t BEGIN GLOBAL&REGISTER)z% VEC%=&VECREG%:&REF%VECTOR,zm LEN%=&LENREG; VEC&=%.VECADR; LEN&=% ..LENADR;% (VECMAX1()%-& VECMIN1())/2 END;+O ROUTINE&VECMAX1:& BLISSTWOREG&=_ BEGIN EXTERNAL%REGISTERz VEC:%REF&VECTOR,zX LEN; LOCALz  MAXX;s MAXX%=&.VEC[0];* DECR%J&FROM%.LEN-1&TO&1%DO'z MAXX%=%MAX(.MAXX,.VEC[.J]);l .MAXX END;+O ROUTINE&VECMIN1:& BLISSTWOREG&=C BEGIN EXTERNAL%REGISTERz VEC:%REF&VECTOR,z= LEN; LOCALz MINN;W MINN%=&.VEC[0];* DECR%J&FROM%.LEN-1&TO&1%DO'z MINN%=%MIN(.MINN,.VEC[.J]);P .MINN END; O ENDOI ELUDOMf! <O13.7.1C Discussion;O4GLOBALREGISTERandEXTERNALREGISTERdecla-LOrationsin combinationwithlinkage-definitionsthatincludeKOaGLOBALlinkage-optionprovidea controlledmeanstoex-NO=tendthescopeofaregisterdatasegmentfromoneroutineNOintoanotherroutine.*The restrictionshelpassurethatthisNOunusualdynamic extensionofregisterscopeisclearlydocu-ROGmentedandunlikelytobeasourceoferrorbecauseofhiddenOeffects. aLOTheuseofglobalregisterdatasegmentsprovidestwoop-MO timization benefits.-First,boththecalledandthecallingRO5routinesbenefitfromcode efficiencythatresultsfromtheuseQOofaregisterinsteadofa temporary(stack)locationtoholdPOthe parametervalueduringthecall.'Second,thecallingrou-XO>tinebenefitsfromthefactthattheglobalregistervalueisstillNO availableinthesameregisterafterreturnfromthecalledPOroutine.)Thesavingand restoringoftheregistercontentsis+OHnotrequiredaroundthecall.! OOThesame conventionscan(andmust)beusedtoshareregis-OOterdatasegmentsbetweennestedroutine definitions.(InthisQO5case,the conventionallowstheinnerroutinetoaccessalo-QOcaldatasegmentoftheouterroutineinan efficientmanner.LO(This capabilityis sometimescalled ``up-level addressing''KO>inother languagesandoftenrequirescomplexandineffi-LOcientcode.)+Observe,however,thatthereisno particularOO advantagetowritingthecalledroutineasanestedroutine.KOHIndeed,the conventionworksequallywellbetweenroutines,Oin separatelycompiledmodules.t! JKOUsingglobal registersisauseful optimization technique.JOHowever,whenusingthis technique,youmustensurethatKO5 independently developedpartsoftheprogramdonotinad-NO vertentlyuseregister assignmentsthatwouldbeinconflictPOwhenthepartsarebrought together.'Global registersarenotOO>subjecttothenormal optimization strategiesofthecompilerQOand, consequently,mayleadtoworse,ratherthanbetter,code,Oqualityiftoomanyareused.G V+O13.7.2C GuidelinesforBLISS-16JO4Themany restrictions concerningtheuseofLINKAGEdec-NO larationsandglobalregisterdatasegmentsare necessarytoJOensureproper managementofthemachine registersatallO=times.d::OTwo guidelinesare particularly recommended: # ` IThevaluereturnregistershouldalwaysbe specifiedasJ( nonpreserved(whichisthe default).)Thiswillavoidthe=special restrictionsrelatedtothis register. ` KWhenplanningthe allocationofglobalregisterdataseg-KYments,use contiguous registers beginningwithregister1;Lforexample,iftwo registersareneeded,use registers1 and2.O %LONotethat,becausethePDP-11hasveryfewlocallyusableQO registers (relativetoothertarget systems),the allocationofUO5evenoneregisterasglobaloveralargespanofcodewillvery3Olikelydecreaseoverallcodequality. Vc+O13.7.3C GuidelinesforBLISS-32JO4Themany restrictions concerningtheuseofLINKAGEdec-NO larationsandglobalregisterdatasegmentsare necessarytoJOensureproper managementofthemachine registersatall?O=times, especiallyduring conditionhandling(see=Chapter17).*O+ /! LOOne restrictionin particulardeservesspecial considerationOOwhenJSBroutinesandglobalregisterdatasegmentsareusedQO5 together:)IfacalltoaroutinewithJSB linkage-typeoccursSOinthescopeofaglobalregisterdatasegment,thenthegivenNOregister-numberofthedatasegmentmustbegivenineitherGO>aGLOBALlinkage-optionoraNOTUSEDlinkage-optionof1Othelinkageofthecalledroutine.o EWOThatis,ifaglobalregisterdatasegmentisactiveatthepointWOofacalltoaJSBroutine,theonly permitteduseoftheregis-UO5terintheJSBroutineisasaglobalregisterdatasegment;ifBOnotusedthatway,itmustnotbeusedatall.! IOSomeserviceroutinesintheVMSRun-TimeLibrary(RTL)POuseJSBlinkage.'By convention,theseroutinesuseacontigu-PO5ousgroupof registers,noneofwhichare preserved,startingNOatregisternumber0.+Inlightofthis convention,andthePOabove restrictions,the followingtwo guidelinesare suggested:J |  ` JWhen specifyingthelinkageofaroutinewithJSBlink-L(age,givethelocallyusable registersas contiguouslowerKnumbered registersstartingatzero.*Keepthesetoflo-Mcallyusable registersassmallaspossible consistentwith$2 acceptablecodequality. ` KWhenplanningthe allocationofglobalregisterdataseg-I ments,use contiguoushigher-numbered registers,thatis,$c11,10,9,andsoon.WSOA reasonablestrategyistodividethe registersintogroupssoNOthatJSBroutinesneverlocallyusemorethan,forexample,NO5 registers0through7andglobalregisterdatasegmentsareMOalways specifiedin registers8through11.*This guaranteesQOthatno conflictswillariseinusingJSBroutinesandglobal-O>registerdatasegments together.g =KOOne additional guidelineisstrongly recommended:( RegistersPO0and1shouldalwaysbe specifiedas nonpreserved(whichisPO5the default).(Thiswillavoidthe error-pronespecialrestric-7Otionsrelatedto conditionhandling(seeSection13.3.2).*P?YG V+O13.7.4C GuidelinesforBLISS-36JO4Themany restrictions concerningtheuseofLINKAGEdec-NO larationsandglobalregisterdatasegmentsare necessarytoJOensureproper managementofthemachine registersatallO=times.d ::OTwo guidelinesare particularly recommended:* # ` IThevaluereturnregistershouldalwaysbe specifiedasJ( nonpreserved(whichisthe default).)Thiswillavoidthe=special restrictionsrelatedtothis register. ` EWhenplanningthe allocationofglobalregisterdataDY segments,usethehighest-numbered contiguoussetofN registers available(forexample,12,11,10,9,andsoonC whenusingtheBLISS36Ctyperegister conventions).Ow%$O14.1CLiteral-DeclarationsMOUAliteral-declarationisusedtodefineanamewhosevalueOOis determinedbyaconstant expression.(Afteranameisde-POfinedinthisway,itcanbeusedto designatetheconstantO^ expression.NOAliteral-declarationcan contributetothe readabilityofa:Oprogram.'Anexampleofthisusagefollows:Oa LITERAL CAPACITY%=%25;zNOThis declarationallowsthe following assignmenttobewrit-Oten:*Oa STUDENTS%=&.ROOMS%*&CAPACITY,FOInthis expression,STUDENTSandROOMSaredataseg-FOmentnamesandCAPACITYistheliteralnamedeclaredKO5above.,Theuseoftheliteral-declarationmakesclearthe+O significanceofthevalue25.$JOAliteral-declarationis especiallyusefulfordefiningaPOconstantvaluethatisusedatseveral differentplacesinaNO5program.*Intheeventthata differentversionofthepro-IOgramrequiresa differentvaluefortheconstantvalue,MOthechangecanbemadeinjustoneplace;namely,intheFO>literal-declaration.'Anexampleofthisusagefollows:O LITERAL  BUFFERSIZE%=&266;! xTOItisassumedthatthesizeofthebufferchangesfromtimetoPOtimeandthatthisvalueisinvolvedin computationsthrough-GO5outtheprogram.*Achangeinthevalueof BUFFERSIZEQOinthis declaration automaticallychangesthevalueofallthe%BPADDR316 _>32(>18or30BitsperaddressovalueO%UPVALX2 _4 1o AddressableunitsoSperBLISSvalueo(%BPVALdividedbyo%BPUNIT) O L "COThevalueof%BPADDRinBLISS-36is determinedbyAOthe cpu-optionsettingofthe ENVIRONMENTmodule-O5switch(5Section19.2);{5seethe!5 BLISS-36User'sGuide 5for2O target-system environment information.* ? ! LOThese predeclarednamescanbeusedtoenhancethetrans-NO portabilityofaprogramfromonetargetsystemtoanother.LO5Seethe appropriateBLISSusermanualforfurtherinforma-Otion. I !O 15.2Lexical! FunctionsJOBLISSprovidestwogroupsoffeaturesthatare concerned=Owiththe compile-time processingofamodule: lexical-OB functions/B, describedinthischapter,andB macrosB, described OinChapter16.<}Lexical functionsandmacrosarecloselyre-EOlatedandsharemanycommonconceptsand mechanisms.NOL Consequently,the introductiontothischapter considersbothQOtogetherinan integratedwayandlaysthe foundationforthe:O descriptionofmacrosinthenextchapter.*I^O3 7J  KOThelexical-functionsperformbasic operationsonthetextIOofthemodule;forexample,the%STRINGlexical-functionLO5gathersseverallexemesintoasingle quoted-stringlexeme,DOandthe %CHARCOUNTlexical-functioncountsthechar-POactersinagivenquoted-string.'TheexamplematerialinthisKO>chapterincludesbothlexical-functionsandmacros,becauseNOin practicalusethesetwofeaturesareusually intertwined.:K?OCloselyrelatedtothelexical-functionsisthe lexical-O conditional@,whichpermitsyoutoindicatethataportionOO5ofaprogramistobeincludedoromitted dependingontheKOoutcomeofagiven compile-timetest.*Anotherrelatedfa-Ocilityisthe" compile-time-declaration#z,whichdeclaresnamesJO>whosevaluescanbechangedduring compilationandwhich(Ocancontrolmacro-expansion.L y,OAllthese facilitiesdependon] lexical processing,whichistheROfirststepinthe compilationofamodule.(Duringlexicalpro-GO5cessing,lexemesareformedand interpreted,namesareNO associatedwiththeir declarations,andthevariouskindsof.Olexical constructsare processed.M pNOThefirstsection introduceslexical processingandthesec-LOondsectiongivesthe quotation conventions.+ThenextfourJO5sectionsdescribelexical-expressions,lexical-functions(inPOgeneralandin particular),andlexical-conditionals.&Thefinalnextlexemewillbeanew declarationofsomename,andit)Opreparesforthat situation.VNGOThesecondlexemeisALPHA.AlthoughALPHAisalreadyNO declared,thecompilertreatsthis occurrenceofALPHAasa3O5new, overriding declarationofALPHA.RW(DOThethirdlexemeisa semicolon.0WhenthecompilerKOreadsthislexeme,itknowsthatthe declarationiscom-SO5plete.) Therefore,thecompilerfillsinthevariousdefaultsforFOALPHA, providingacomplete declarationforthename.X! WKOThefourthlexemeisanother occurrenceofALPHA.BecauseMOofthecontext,thecompilerknowsthatthis occurrenceofOO5ALPHAisauseofthenameratherthananother declaration.POBecausethecompilerisworkingononelexemeatatime,itQOhasthefull declarationofALPHAreadytoapplytothisuseIO>ofALPHA.Andthatisthemainpointofthisexample.YWFOThelexeme-by-lexeme processingofaBLISSprogramisLOquitenaturalandobviousforsimplemodules,suchastheHO5examplejustgiven.,However,inmore complicatedcases,MOtheremaybemorethanone ``obvious''wayto interpretaJOmodule,andthelexeme-by-lexemerulemustbeinvokedto-O> determinewhatactuallyhappens.RZ j(O15.1.3CBindingOO4Every identifierthatisnotareservedkeywordcanbeusedNOasaname.*Whenan identifierisusedasaname,itmustOObe declared;thatis,itmustbe associatedwithadeclara-OO=tion.) Declarationscanbeimplicit (suppliedbythe compiler)NOorexplicit(writtenbythe programmer).)Theprocessofas-QO sociatingagivenuseofanamewitha declarationiscalledOG lexicalbinding?KG.*(Theprocessof associatinga declarationofROanamewithastorageaddressisalsocalledbinding,asdis-OcussedinSection1.4.9aBindinginthissense,however,isnota&OQconcernofthis chapter.)*Z|?*v[ LSOInsomecases,thereismorethanonewayto lexicallybinda3Oname.'Considerthe followingexample:Oa LITERAL ABS&=%0; O ...(O9 ROUTINE& ALPHA(X):%NOVALUE&= BEGIN LOCALz ABS;Y ABS&=%..X+1; .x%=% .ABS*..X; END;\! |OOInthisexample,therearethree declarationsofABS.First,POABSis implicitlydeclaredasthenameoftheabsolutevalue2O5 executable function,as describedinQ5Chapter5.5Second,ABSOOis explicitlydeclaredasLITERALonthesecondline.)Third,IOABSis explicitlydeclaredasLOCALwithintheroutine-JO> declaration.. AccordingtotherulesforscopinggiveninOSection8.2,GtheuseofABSinthe assignmentto.Xisboundto@Othethird(andmostrecent) declarationofABS.*\QmO*\OZ|?l] VBO15.1.4C ExpansionJO4BLISSincludesafacilityfordefiningandusingmacros.LOMacroshavenamesandthenamesaredefinedandgivenbyLO declarations,justlikeotherBLISSnames.)Thus,themacroEO=facilityisanintegralpartoftheBLISS language.^! v OA macro-declaration2c associatesasequenceoflexemes,aO macro-body>,witha macro-name.*WithinthescopeoftheBO5macro-declarationthe macro-namecanbeusedina5 macro-O callH.*During compilation,each macro-callisreplacedbya$Ocopyofthe macro-body._NOAmacrocanbe parameterized-;thatis,each macro-callcanOsupplyP actual-parameters%thatare substitutedfori formal-O5 namesY5inthe macro-body.`KOWhenthecompiler encountersa macro-call,itfirstreadsPOthroughthecallitself, collectingand processingtheactual-EO5 parameters.-Thenthecompilerreplacesthe macro-callObyits( expansion;.,The expansionisamodifiedcopyoftheLO macro-bodythatisgiveninthe declarationofthemacro.a&OAsimpleexamplefollows:O MACRO+P PROD(X)%=&(((X)+1)*((X)-1))&%; O ...O B&=% PROD(2*A);<b,OHere,the macro-callisPROD(2 *"A)andthe macro-bodyOis((X)+1) *>((X)-1).+Afterthe macro-callis expanded,the5O5 assignmenttoBbecomesthe following:&O B&=%(((2*A)+1)*((2*A)-1));c OOTheterm ``expansion''reflectsthefactthatmacrosareof-QOtenusedasashortwaytoexpressalong construct.)Indeed,LO5intheexampleabove,the expansionis considerablylongerLOthanthe macro-callthatit replaced.*Ingeneral,however,NO expansionreferstothe replacementofonesequenceoflex-NO>emesbyanotherduring compilation.'TherearefourkindsofO expansioninBLISS:Od! % ` IAlexical-functionisreplacedbyits expansion,asde-(scribedinSectionsw(15.4 !(and(15.5. ` LAlexical-conditionalisreplacedbyitslexical-consequence5orlexical-alternative,as describedinSection15.6. ` EA macro-callisreplacedbythe correspondingmacro-Abody,andtheformal-parametersinthe macro-bodyG1arereplacedbythe correspondingactual-parameters,as! describedinSections16.2 qand16.3. `  G Arequire-declarationorlibrary-declarationisreplacedEabythefileit designates,as describedinSectionsa16.5 5aand16.6.*dw?*d?*d? *dL?b *dL? *d$? *d}? e! aOOBecausetheideaof replacingoneentiresequenceoflexemesQOwithanother,allatonce,is inconsistentwiththe lexeme-by-+O5lexeme processing describedin5Section15.1.2,5thecompilerRO processesamoduleinseveralstages;lexical processingistheROfirststage.'Thelexical processingstageofthecompilerreadsTO>lexemesfromthesourcefile,collectslexemesuntilitcanper-OOformsomelexical processing,passesthe resultinglexemestoROthenextstageofthe compiler,and,onceagain,readslexemes"OHfromthesourcefile.*e?TfKOThecompilercanbethoughtofasworkingfromasingle%Osequenceoflexemes,the inputstream,asfollows:g!  ` KAtthe beginningof compilation,theinputstreamisthe(givenmodule. ` IEachtimethecompilercandonothingmorewithoutan-Ootherlexeme,ittakesalexemefromtheheadoftheinputYstream. ` GWheneverthecompilerhas accumulateda constructthatJ1canbeexpanded(suchasalexical-functionoramacro-Mcall),it processesthat constructandplacesthe resultingGsequenceoflexemesattheheadoftheinputstream. `a EaWheneverthelexical-processingstageofthecompilerHhas accumulateda constructthatcannotbefurtherex-Jpanded(suchasakeywordoraplussymbol),itpassesGkthat constructontothenextstageofthe compiler. ` JWhentheinputstreamisempty, compilationis complete.hPOThemethodoflexical processingjust describedis simplified,QObutonlyinthe followingway:*it suppressesthosedetailsofNO5theBLISScompilerthat,whiletheyare importantforeffi-QOcient operationofthe compiler,donotaffectthemeaningofKOtheprogramortheobjectcodeproducedbythe compiler.}i jS6O15.1.5CAnExampleofLexical ProcessingNO4The followingmoduleprovidesanexampleoflexicalprocess-Oing:O MODULE%S1%=OY BEGINO REQUIRE 'STDMAC';O1 GLOBAL%BINDy P1%=% STR8('ABC'),' P2%=%STR8('ABCDEFGHIJKLM'); O  ENDOQ ELUDOMj:_KOThefourthlineofthismodule referencesthefilenamedJOSTDMAC.ThecontentsofthatfileisassumedtobetheO5 following:O MACRO STR8(S)%=%zI %IF% %CHARCOUNT(S)&GTR%105z %THEN& %WARN('STR8&PARAM&TOO%LONG')%%FI-z PLIT(&%EXACTSTRING(10,%C'%',S)%) ! %; k! NUOAdetailedtraceofthelexical processingofthemodulefollows.NOThebindingofnamesis described, expansionsare performed,SO5andthestateofthe compilationisgivenaftereach expansion.l aHOThecompilerstartswithMODULEandreadslexemesfromTOtheinputstream.'The identifierS1istreatedinaspecialwayPO5becauseitisthemodulename;itdoesnotaffectthemean-LOingoftheprogram.(Whenthecompilerreadsthe semicolonTOonthefourthline,itknowsthatithasreachedtheendofaIO>completerequire-declaration.*In accordancewiththedef-.Oinitionofrequire-declarations(Section16.5),thecompilerKOexpandstherequire-declarationbyplacingthecontentsofGOHthe designatedfileattheheadoftheinputstream.*lZ? mIOAtthispoint,thestateof compilationisasfollows: MODULE&S1&=P BEGINO ==>%MACROz STR8(S)%=%( %IF% %CHARCOUNT(S)%GTR%105p %THEN% %WARN('STR8%PARAM%TOO%LONG')&%FI- PLIT(%%EXACTSTRING(10,%C'&',S)%) T %;H GLOBAL&BINDz P1&=% STR8('ABC'),'z P2&=%STR8('ABCDEFGHIJKLM');  ENDh ELUDOMn! WSOThearrowatthe beginningofthethirdlineisamarkerusedPOinthis explanationoflexical processing.' EverythingfromtheNO5 beginningofthemoduleuptothearrowhaspassedthroughIOlexical processingand everythingfromthearrowthroughOOtheendofthemoduleistheinputstream.)ThelexemethatKO> immediatelyfollowsthearrowistheheadofthestream.ko! AHOThecompiler continues processinglexemes,startingwithHOMACRO.The occurrenceofSTR8declaresthatnameasaJO5 macro-name.)Thefirst occurrenceofSdeclaresthatnameLOtobethefirst(andonly)formal parameterofSTR8.+ThePOsecondandthird occurrencesofSareboundtothisdeclara-MO>tion.)Whenthecompilerreadsthepercentlexeme,itknowsROthatithasreadacompletemacro-definition.'It associatesthe,O macro-bodywiththenameSTR8.ap 7FOThecompiler continues,startingwithGLOBAL.Theoc-IOcurrenceofP1declaresthatnametobeaGLOBALBINDLO5namewithagivenvalue.(The occurrenceofSTR8isboundEOtothemacro-declarationofthesamename..WhentheAOcompilerreadstheright parenthesisthatfollows 9' iABC '>,itJO>knowsthatithasreadacomplete macro-call.+Inaccor-?Odancewiththe definitionofordinarymacros(Section16.2.3),KOthecompilerexpandsthe macro-callbyplacingacopyofNOHthe macro-bodyattheheadoftheinputstreamandreplac-LOingeachformal-parameterinthecopybythe correspondingOactual-parameter.*pZ?x OqY%IOAtthispoint,thestateof compilationisasfollows:O MODULE%S1%=OP BEGINO MACRO STR8(S)%=%z( %IF% %CHARCOUNT(S)&GTR%105zp %THEN& %WARN('STR8&PARAM&TOO%LONG')%%FI-z PLIT(&%EXACTSTRING(10,%C'%',S)%)  %;OH GLOBAL%BIND  P1&=. ==>&%IF%%CHARCOUNT('ABC')%GTR%105z  %THEN& %WARN('STR8&PARAM&TOO%LONG')%%FI4zh PLIT(&%EXACTSTRING(10,%C'%','ABC')%)%,'  P2&=%STR8('ABCDEFGHIJKLM'); O ENDO@ ELUDOM r! NOThecompiler continues,startingwiththefirstlexeme,%IF,OOofthelexical-conditional.(Whenthecompilerreadstheright1O5 parenthesisthat immediatelyfollows 5' 5ABC ]5' 5,itknowsthatitIOhasreadacomplete %CHARCOUNTlexical function.&Inac-@Ocordancewiththe definitionofthatfunction(Section15.5.2),JO>thecompilerexpandsthefunctionbycountingthenumber3Oof charactersintheactual-parameter ' ABC 'andplacingaOOnumeric-literalthat representsthecountattheheadoftheLOHinputstream.'Nowthestateof compilationisasfollows: O ...O GLOBAL%BIND] P1%=z %IF%==>%3%GTR%105z %THEN& %WARN('STR8&PARAM&TOO%LONG')%%FI4z5 PLIT(&%EXACTSTRING(10,%C'%','ABC')%)%,'| P2%=%STR8('ABCDEFGHIJKLM'); O ...*r?s YGOWhenthecompilerreaches%THEN,ithas evaluatedtheQO lexical-testofalexical-conditional;because3isnotgreaterTO5than10,thetestisnot satisfied.(In accordancewiththedef-1Oinitionoflexical-conditionals(seeSection15.6),thecompilerNOskipsthe remainderofthelexical-conditional.)Thestateof'O> compilationisasfollows: O ...O  GLOBAL%BIND@S P1%=%==>%PLIT(%%EXACTSTRING(10,%C'%','ABC')%)&,' P2%=%STR8('ABCDEFGHIJKLM'); O ...*sP? t! KOThecompiler continues,startingwithPLIT.The occurrenceCOof %EXACTSTRINGis recognizedasalexical-functionIO5name,andwhenthecompilerreadstheright parenthesisGOthatfollows,itknowsithasacomplete %EXACTSTRINGMOlexical function.+In accordancewiththe definitionofthatO>function(>Section15.5.2),>thecompilermakes >' >ABC >'>intoaQO 10-character quoted-stringbyfillingattherightwithblanks,NOandplacesthis expansionattheheadoftheinputstream.*t?uA7OThestateof compilationisasfollows: O ...OP GLOBAL%BIND! P1%=%PLIT(%==>%'ABC '&),' P2%=%STR8('ABCDEFGHIJKLM'); O( ...~v 3TLOThecompiler continues,andreachesthe declarationofP2.POThis declarationistreated similarlytothatofP1;however,OO5becausethestringgivenforP2containsmorethan10char-QOacters,thetestinthecompilation-expressionis satisfiedand?Othe compilationarrivesatthe followingstate: Ok ...O GLOBAL%BIND P1%=%PLIT(%'ABC '%),B P2%=3 ==>& %WARN('STR8&PARAM&TOO%LONG')%%FIlexical-conditional.'Nowthestateof compilationisasfollows: O ...O  GLOBAL%BINDS P1%=%PLIT(%'ABCS '%), P2%=A ==>&PLIT(&%EXACTSTRING(10,%C'%','ABCDEFGHIJKLM')&); O+ ...*xCOThecompiler continuestothe %EXACTSTRINGlexical-5O function,whichitexpandsasfollows: Oa ...O GLOBAL%BIND P1%=%PLIT(%'ABC '%),-9 P2%=%PLIT(% 'ABCDEFGHIJ'%==>&); O ...y OOThecompiler continuestotheendoftheinputstreamwith-MOout performinganyfurtherbindingor expansion.'TheresultPO5isthesameastheresultof compilingthe followingmodule:O MODULE%S1%=O BEGINOI GLOBAL%BIND P1%=%PLIT(%'ABC '%),) %WARN('STR8%PARAM%TOO&LONG')(! P2%=%PLIT(% 'ABCDEFGHIJ'%); Oi ENDO ELUDOMM$&z O15.2C Quotation%OUBLISShas facilitiesforU quotation+U.' Quotation postponesuntilaROlaterlexicalscanthebindingofanameandthe expansionof.Oalexical-functionor macro-call.{! POTheneedfor quotationinBLISSisnotobvious.'TheargumentJOinfavorofbeingabletoquoteanameisasfollows:|  ` GSomenamesare processedmorethanonce.'Forexample,L(anameina macro-bodyis processedonceaspartoftheLmacro-declarationandthen,asecondtime,aspartofthe' expansionofa macro-call. `Y NYA particularuseofanamecanonlybeboundtoonedec-K laration.( Therefore,anamethatis processedtwicecouldH beboundintwo differentways,andachoicemustbecmade. ` KAsimpleruleforchoosingamong bindings,suchas``al-N:waysbindanamethefirsttimeitis processed,''isnotflexibleenough.} GO Therefore,some mechanismis necessarytospecifywhenPObindingshalloccur.'This mechanismisthe quotation facility.8~ KOTheBLISS quotationfacilityhastwoparts:,the quotationKOrules,andthequote-functions.+Each quotationrulestatesQO5thatina particularcontextcertainkindsofnamesareboundIOornotbound.+Thequote-functionsoverridethe quotationPOrulesandtellthe compiler,forexample,toquoteapartic-MO>ularname regardlessofthe applicable quotationrules.*TheAO quotationrulesaregivenlaterinthissection.qGNOA preliminaryexampleoftheBLISS quotationfacilityisasOfollows: Oa OWN  X;O LITERAL9 MARK%=&4;O MACRO+ M%=&MARK%+%%UNQUOTE%MARK&%; O ...OY BEGINO LITERAL MARK%=&5;O0 X&=%M; Ox ... O END SOThe interestingpartoftheexampleisthebindingoftheuses6OofMARK.Adetailed discussionfollows. NJOThenameMARKisdeclaredtwice,bothtimesasLITERAL,MObutwith differentvalues.(EachuseofMARKmustbebound;O5tooneortheotherofthese declarations." NOTheonlyusesofMARKareinthe declarationofthemacroNOM.Therearetwousesandtheyarehandledintwodiffer-NO5entways.*Thefirst occurrenceisnotboundbecauseoneof4OtheBLISS quotationrules(definedinSection15.2.2)statesMOthatinthe macro-bodyofamacro-declarationonlyamacroJO> formal-nameisbound.(Thesecond occurrenceisboundbe-6Ocausethe%UNQUOTEfunction(definedinSection15.5.14)PO overridestherulejuststatedandforcesbinding.)Afterpro-5OHcessing,the macro-bodyisasfollows:CO MARK&(not%bound%yet)%+&MARK%(bound&to&LITERAL%4)*P?*Z ? oEEOThis macro-bodyis associatedwiththe macro-nameM.d! 5:POLaterinthe processingoftheexample,thecompilerreplacesQOthe macro-callonMwithits expansion,andbeginstoprocessKO5the expansion.*Thistimearound,thefirstMARKisboundLObecausethe quotationrulespermitit.)ThesecondMARKisPOalreadyboundand,becauseanameisneverboundforasec-WO>ondtime,isleftasitis.)After processing,the expansionisasOfollows:IO MARK&(bound%to%LITERAL&5)&+%MARK%(bound%to%LITERAL%4) [OOThus,the assignment statementiscompiledas assigning9to OX.  NROInthisexample,the applicationofthe quotationrulestotheQObindingofnameshasbeen illustrated.(Theyalsoapplytothe=O5 expansionoflexical-functionsand macro-calls. O15.2.1CQuoteLevelsIO4The quotationrulesofBLISSare organizedaroundthreeO quotelevelsC.(Atanygiventimeduring compilationofamod-SOule,a particularquotelevelappliestothelexemesbeingreadKO=fromtheinputstream.*As compilation proceeds,thequoteKOlevelchanges dependingonthelanguage constructthatisObeing compiled.|! RROQuotelevelsarenumberedfrom1to3anddefinedasfollows: `1. Normal-quote:.-ThislevelappliestoanyportionofaB(modulenotcoveredbythe followingquotelevels. `2. Name-quote<.-ThislevelappliestolexicalcontextsinLwhichitis ``natural''toignoremost applicabledeclara-IYtions.(Theportionsofamodule processedat name-quote"levelareasfollows:rHNa.:Anamethatisabouttobedeclared (explicitlyorim-IY( plicitly); specifically,anamethatbeginsa definitionFYwithina declaration,oranamethatappearsintheBYformal-name-listofaroutine, structure,ormacroY2 declaration.@b.?Anamethatappearsina name-quoteactual->Y  parameterofalexical-functionoranyactual-'Yc parameterofa macro-call.Dc.?An unreservedkeywordinacontextinwhichan=Y: unreservedkeywordis required..Anexampleis>Ya module-switchina module-head (describedinYSection18.1),5JwherethecontextmakesitclearthatBYDakeywordisbeingusedasaswitch.,(TheBLISS#YkeywordsarelistedinAppendixA.) `3. Macro-quote;.*Thislevelapplies primarilytoamacro-Cubodyinamacro-declaration.1Italsoappliestoa- keyword-default-actual-parameter(2Section16.2).*Y? *`Or *2?b NNOIfmorethanoneofthe precedinglevelscouldapplytoaLOgivencontext,thequotelevelwiththehighestnumberisO5chosen.8"O15.2.2C QuotationRulesMO4The quotationrules determinethebindingofnamesandtheKO expansionofboth macro-callsandlexical functions.*ThereTOarethree quotationrules,oneforeachquotelevel,asfollows:tJ`1.:At> normal-quote$Mlevel,bindeveryname.! DbAtthislevel,expandevery macro-callandlexical- function.`:2.:At?: name-quote8:level,bind macro-names.(Thatis,bindaMnameonlyifthebinding, performedintheusualway,as-Lsociatesthenamewithamacro-declaration.'Atthislevel,;Dexpandevery macro-callandlexical-function.`3.:At? macro-quote1*level,bindmacro-formal-names.)ThatPis,bindanameonlyifthebinding, performedintheusualItway, associatesthenamewiththe (implicit) declaration#ofamacro-formal-name.sHbAtthislevel,expandonlythequotelexical-functions:+%QUOTE, %UNQUOTE,and%EXPAND."! .OThequote-functions, describedinSection15.5.14,Darespecif-IOicallydesignedtooverridetherulesabove..However,aPO5quote-functiononlyappliesataspecificplaceinaprogram.FOForexample,the%QUOTEfunction postpones applicationPOofthebind operationtoanamethat immediatelyfollowstheQO> function,eventhoughthe quotationrulesmaycallforbindingOofthatname.*F ? I?o wE#O15.3CLexical-ExpressionsPOUAmoduleis presentedtothecompilerasasourcefilecom-NOposedof charactersand linemarks.'Duringlexical processing,LOthe charactersaregroupedintolexemesandthenthelex-8O^emesaregroupedintolexical-expressions.y OOOAlexical-expressioncanbeasinglelexeme.'Examplesfollow: O+Theplussymbol7O]MODULE]Thekeywordthatbeginsamodule0OALPHAAname(notdeclaredMACRO) OP329PAdecimal-literal O ' tABC  'A quoted-string NTOEachoftheseexamplesisnotonlyasinglelexemebutisalsoO primitiveJ;thatis,itisnotexpandedintosomeothersequence3O5oflexemesduringlexical processing.mKOSomeexamplesoflexical-expressionsthataremorecompli-"Ocatedareasfollows:! O%ASCIC d ' ABC  'bAstring-literalO] %CHARCOUNT( _] ' ]ABC ] ' :])b]Alexical-functionO%IF%SWITCHES(DEBUG)O$%THEN%WARN( $ '$BANG |$ ' $) Oq%FI3bAlexical-conditionalwithtwonestedb$lexical-functionsOBETA(3, O ' tABC  ' *)*bA macro-call(assumeBETAisb8declaredMACRO)OREQUIRE  ' TBS @ ' e; bArequire-declarationO,LIBRARYOz%STRING( z ' zXYZ Zz 'z,Q);1b,Alibrary-declarationwithanestedbzlexical-function OOAlloftheselexical-expressionsarecomposedoftwoormoreOOlexemes.'Thefirstexampleisa%ASCICstring-literalandisGO5 primitive.(Thesecondexampleisa %CHARCOUNTlexical-ROfunctionandis nonprimitive;itisexpandedto3,whichisaGO primitivelexical-expression.+The remainingexamplesareIO>all nonprimitive,buttheir expansionrequires contextual(O informationnotgivenhere.^r4NOAnexampleofasequenceoflexical-expressionsthatconsti-.Otutesacompletemodulefollows:Oa MODULE%Q%=O BEGINO MACRO-9 PACK(X)%=&UPLIT(%CHARCOUNT(X),X);O GLOBAL%BIND$ MESSAGE%=&PACK('HELLO'); O ENDOY ELUDOM 3 EOThismoduleismainlycomposedof primitive, single-AOlexemelexical-expressions.3The two exceptions are:O5 %CHARCOUNT(X)onthefourthlineandPACK( g5'5HELLO 5' 5)NOonthesixthline.*Thefirst nonprimitivelexical-expression,=O%CHARCOUNT(X),occurswithina macro-bodyand,SO> therefore,is processedat macro-quotelevel;itisnotexpandedNOduringmacro definition,butistreatedsimplyasasingle-'Olexeme sequence.)ThePACK( y'HELLO ')lexical-expressionCOHisa macro-call,andits expansionisasfollows:,O "UPLIT(%CHARCOUNT('HELLO'),'HELLO')NJOThis expansionincludesthe nonprimitivelexical-expressionO %CHARCOUNT( 'HELLO '/J).Thisisalexical-functionat;O5 normal-quotelevel,andits expansionis5.NFOThissection introduces thevariouskinds oflexical-IO expressionsinBLISSandthuspreparesfordetailedde-FO5 scriptionsinthe remainingsectionsofthischapter.BO15.3.1CSyntaxdOlexical-O0 expression 8 w< :4 primitive nonprimitive 9 w= ;O primitive +8 < : delimiter)keywordvnamenumeric-literalstring-literal -+9 -= -;O nonprimitive R8 < ":lexical-functionPlexical-conditional macro-callrequire-declaration8library-declaration R9 = ";HOThe primitivelexical-expressionsare describedinother6OApartsofthismanual; specifically,theA delimitersAarelistedinOSection2.2.1, 0the keywords arelistedinAppendixA,andtheO names ?,j numeric-literals,and string-literalsare describedinOKChapter4.*O]?*]Or *OlOQOUndercertain conditions,aname,byitself,isalsoamacro->Ocall;inthatcase,thenameis nonprimitive.MaO15.3.2C SemanticsFO4The fundamentallexicalruleofBLISSisasfollows:W-FAgivensequenceoflexemesisavalidBLISSmoduleG(ifandonlyifthe expansionof nonprimitivelexical-J expressionsproducesasequenceoflexemesthat satisfiesthe definitionof module;givenintChapter19.*tOz kAPOThisrulejoinstogetherthe descriptionoflexical-expressionsNOgiveninthischapterandthe definitionofamodulegiven O5in5Chapter19.95(That definitionofamodule includes,byHO reference,mostoftheotherchaptersofthismanual.)*Oz ! MOThe semanticsofthevarious nonprimitivelexical-expressions=Oaregiveninlatersectionsofthischapter.U! +NOAfewremarksaboutnumeric-andstring-literalsaslexical-LO expressionsare necessary.'Theseremarksare presentedhereO5ratherthanino5Chapter425becausetheyarecloselyrelatedto1Otheconceptsoflexical processing.*omO /O15.3.2.1BTypesofNumeric-Literals1O)Thenumeric-literals,asdefinedinM)Section4.2,)canbeclassi-Ofiedasfollows:*M|?GhOFullwordType:#0UnsignedDecimal-Literal~Integer-Literal Character-Code-Literal'OSingle-Precision-FloatType:(fSingle-Precision-Float-Literal'ODouble-Precision-FloatType:!Double-Precision-Float-OOLiteral cIO Differentnumeric-literalsofthesametypecanbeusedMOinterchangeably,butnumeric-literalsof differenttypescan-OO5not.-Forexample,ifadecimal-literaliscalledforintheMOsyntax,thenaninteger-literalcanbeusedinstead,buta1Osingle-precision-float-literalcannot..O15.3.2.2BTypesofString-Literals2O)Thestring-literals,as describedin5)Section4.3,)canbeclassi-Ofiedasfollows:*5|?DMO UncountedASCIIO0Type:5y Quoted-String(without precedingstring-y0type) y~%ASCIIString-Literal y%ASCIZString-LiteralLOCountedASCIIType:%ASCICString-Literal (BLISS-16/32only)ORadix-50Type:1y %RAD50_11String-Literal (BLISS-16/32yonly)5yM %RAD50_10String-Literal (BLISS-36only)OASixbitType:3yA%SIXBITString-Literal (BLISS-36only)IO4PackedDecimalType:~%PString-Literal (BLISS-16/32only)d! :MO Differentstring-literalsofthesametypecanbeusedin-MOterchangeably,butstring-literalsof differenttypescannot.PO5Forexample,ifa quoted-stringiscalledfor,thena%ASCIIPOstring-literalcanbeusedbuta%ASCICstring-literalcannot.L "KOBLISSpermitsthis interchangeof uncountedstring-literalsLObecauseeachofthem representsasequenceofASCIIchar-SO5acters.((Thezeroattheendofa%ASCIZliteralistheASCII8O``null'' character,whichhasa0code.)B! +MOTheinterchangeabilityof uncountedASCIIliteralsdoesmakeLOaslightadditiontothe language.-Considerthe definitionIO5ofthe%ASCICstring-literal (BLISS-16/32only)giveninOSection4.3:O %ASCIC% quoted-string*OP|? OOBecauseoftheinterchangeabilityof uncountedASCII literals,OOthe quoted-stringcanbereplacedbyanASCIZstring-literal,,O5andtheresultisasfollows:'O %ASCIC%%ASCIZ& quoted-string zOOThusthe following constructisavalid%ASCICstring-literal%OinBLISS-16or BLISS-32:Oa %ASCIC%%ASCIZ&'ABC'+ WHOThisliteralhasa different interpretation fromeitherO%ASCIC ' ABC _'or%ASCIZ D' tABC '&J.ItisencodedinfiveNO5bytes.+Thefirstbytecontainsthenumberof characters,4,NOinthe character sequence.)ThenextthreebytescontaintheSOASCIIcodesforA,B,andC.Thefinalbytecontains0,which:O>istheASCIIcodeforthenull character. LOSomefurther applicationsofinterchangeabilityof uncounted"OASCIIliteralsfollow:Oa %B% %ASCII'11011'O %C% %ASCII'Q'%O %ASCII%%ASCIZ& %ASCII'ABC'! 2O15.3.2.3BNumeric-andString-LiteralsEO)Exceptforthe decimal-literalandquoted-string,!theKOnumeric-andstring-literalsareallcomposedoftwolex-KOemes.)Eachoftheselexemescanbeproducedby nonprimi-NO3tivelexical-expressions.&Anexampleisthe followingprogramO fragment:O MACRO'X OCT(N)&=%%O% %STRING(N)%%; O ...O OCT(23)zwLOWhenthe macro-callOCT(23)is expanded,theresultisasOfollows:Oa %O% %STRING(23)z{GOThenthe%STRINGlexical-functionis evaluatedandthe"Oresultisasfollows:Oa %O%'23'`66OThus,thefinalvalueis19 (decimal).O15.3.3C DiscussionGO4Some nonprimitivelexical-expressionshaveanemptyex-OOpansion;thatis,theydonotproduceanylexemes.(TheyareROusedfortheirsideeffectsin controllingthe compilationpro->O=cess.,Twoexamplesarethe%UNQUOTEand%WARN*Olexical-functions describedin}Section15.2.*}Y?zc 9GOOther nonprimitivelexical-expressionshavenonemptyex-OO pansions,asdomostofthelexical-expressions introducedsoOO5far.(Almostall instancesofthis expandingtypeofnonprim-OOitivelexical-expressioncan,in principle,bereplacedbyanIO equivalentsequenceof primitivelexical-expressions.+SuchJO> replaceablelexical-expressionsdonotproduceanyresultsQOthat(again,theoretically)couldnotbeobtainedwithoutthem.QOTheirpurposeisto facilitateboth conditional compilationandOOHthewritingofmacros.*Also,theyoften radicallyreducetheROeffortrequiredtoachieveagivenresult,andcanbeusedto/Oenhancetheclarityofamodule.POItisusefultoexaminethosefewcasesinwhichanonprim-OOitivelexical-expressioncannotinanywaybereplacedbyanJO5 equivalent primitivelexical-expression sequence.)ThereareQOthreesuchcases.(Eachofthemisrather specialized,andallIOoftheminvolvelexical-functions.+Theyare internal-onlyHO> character sequences,excessively-long character sequences,$Oand internal-onlynames.W OAn, internal-only charactersequence$isa charactersequenceOOthatisnotcomposedentirelyofprinting characters,blanks,JO5andtabs.*Such character sequencescanbe representedbyAOmeansofthe%STRINGand%CHARlexical-functions,%Obutcannot, accordingtoSection4.3, ybe representedbyaO>quoted-string.*?tJJOAsanexample,considerthe following character sequence:W--O A,carriage-return, line-feed,B!jstringbecausea quoted-stringcannotincludeacarriageMOreturnoralinefeed.*Thus,theusesofthe%STRINGand>O%CHAR functionsare essentialinthisexample.*? s OAn0 excessivelylong charactersequence!isonethatcontainsLOmore charactersthancanbe representedononelinebyaLO5quoted-string.(Sucha charactersequencecanbe representedBOonseverallinesbymeansof%STRINGasfollows:2O %STRING('A&line%of%many% characters',*zZ 'Another&line%of% characters')f<isthefileforthemodulethatisbeing compiled.(However,aLOnewinputstreamis introducedeachtimean expansionoc-KOcurs.*Forexample,aftera macro-callhasbeen processed,IOHthe corresponding macro-bodybecomesanewinputstream.KOEventhe replacementofa formal-nameina macro-bodybyJOthe associatedmacroactual-parameterisdonebytreating;ORtheactual-parameterasanewinputstream.} SMOWhenanewinputstreamis introduced,inputfromtheoldLOinputstreamis suspended.'LexemesaretakenfromthenewOO5inputstreamuntilit terminates.(ThisnewstreamcanitselfHOcontainlexical-expressionswhose expansionmay introduceKOfurthernewstreams.*WhentheendofaninputstreamisKO>reached,thepreviousinputstreamis restored.,Thus,theNOinputstreamsarenested,andtheinitialinputstream(the?Omodulefile)isalwaysthefinalinputstream.}[+O15.5CSpecificLexical-FunctionsMOUForpurposesofthis presentation,thelexical-functionsareOgroupedasfollows:! ( OString-Functions)%STRING, %EXACTSTRING,%CHAR,0 %CHARCOUNTODelimiter-Functions %EXPLODE,%REMOVEO$Name-Functions$%NAME, %QUOTENAME5OSequence-Test-Functionsl%NULL, %IDENTICALOExpression-Test-Oe Functions# %ISSTRING,%CTCE,%LTCEOBits-Functions%NBITSU,%NBITS3OXAllocation-Functions %ALLOCATION,%SIZE,OFieldexpand-Function %FIELDEXPAND2OLCalculation-Functions%ASSIGN,%NUMBERCOCompiler-State-FunctionsR %DECLARED, %SWITCHES,%BLISS,%VARIANTOAdvisory-Functions#%ERROR,%WARN,%INFORM,)%PRINT, %MESSAGE, %ERRORMACROOTTitling-FunctionsT%TITLE,%SBTTLOQuote-Functions%%QUOTE, %UNQUOTE,%EXPANDOHMacro-Functions(H %REMAINING,%LENGTH,%COUNT,%%EXITITERATION, %EXITMACROO Require-Function %REQUIREhJOA descriptionoftheselexical-functionsfollows.-Thede-NO scriptionbeginswithabrief discussionof quotationwithinPO5lexical-functions.)Theneachclassoflexical functionsisde-POscribedinitsownsection.*Finally,allthelexical-functions0Oare summarizedinasingletable.?O15.5.1CQuoteLevelsforLexical-Actual-ParametersPO4Ifalexical-functionappearsinacontextthatisatmacro-QOquotelevel,thenthelexical-functionisnotexpandedanditsIO parametersare processedat macro-quotelevel.* Otherwise,RO=each parameteris processedataquotelevelthatis specified9Ointhe definitionofthelexical-function.pOOInthe definitionsoflexical-functionsthatfollow,anumberMOsign( # ) character sometimesappearsbeforea parameter;OO5inthatcase,the parameteris processedat name-quotelevelIOandiscalleda ``name-quote parameter''., Otherwise,theOForexample,!the definitionof %EXACTSTRING inOSection15.5.2'Hbeginswiththe following:*O?c99O %EXACTSTRING(n,fill,#p,...)NCO Therefore,thefirsttwo parametersof %EXACTSTRINGFOare processedat normal-quotelevelandthe remaining quoted-stringtoa specifiedlength.+The%CHARfunctionMOtakesasequenceofnumericvaluesandconvertsitintoa O quoted-stringlexeme. UPOTheonlystring-functionthatdoesnotperformalexicalcon-KOversion(as informallydefinedinthe preceding paragraph)BO5is %CHARCOUNT.Thisfunctionformsa quoted-stringKOandthenyieldsanumeric-literalequaltothenumberof-Oquoted-charactersinthestring.WEOThe%STRINGfunctionplaysaleadingroleamongtheLOlexical-functionsbecauseseverallexical-functionsarebasedNO5onit.*Itaccepts parametersthatareeachaquoted-string,MOnumeric-literal,name,orempty sequence,anditputstheseLO parameterstogetherintoasingle quoted-stringlexeme.)ForO>example: OOFunction Expansion OOb%STRING( b ' bABC _b ' b, b ' bD b ' b) b 'bABCD b 'O %STRING(23,%B d '-111  ' 4)  '23-7  'OV%STRING(ALPHA,,,9) V 'VALPHA9 V ' Oq! bOOThe followinglexical functionsareallbasedonthe%STRINGO function:(05OString-Functions %EXACTSTRING, %CHARCOUNT&O]Delimiter-Function%EXPLODEOName-Functions%NAME@OPAdvisory-Functions%ERROR,%WARN,%INFORM,%PRINT, K %MESSAGE, %ERRORMACRO$ORequire-Function%REQUIREE! MOEachoftheselexical-functionsbeginsbyusingthe%STRINGPOfunctiontogatherits parametersintoasinglequoted-string.KO5Thenthefunctionperformsanactiononthe quoted-string3Othatis differentforeach function.BZO15.5.2.1B Definitionliteral(%C >'> character ^>'&>)isfullytransportable.*}?[uLOEachofthe remaining parametersmustsatisfytherestric-)Otionson%STRING parameters. ^O ExpansionB.(Evaluatethefirsttwo parameters.(ThenproceedIOasforthe%STRING function, obtainingasinglequoted-NO5stringfromthethirdthroughlastactual-parameters.(IftheHOfunctionhasonlytwo parameters,formanemptyquotedOstring( a" ).g==OModifythe resulting quoted-stringasfollows:]3 ` GIfthe quoted-string representsn characters,leaveit( unchanged. ` HIfthe quoted-string representsmorethann characters,Eremovequoted-charactersfromtherightenduntilit$Y representsn characters. ` HIfthe quoted-string representslessthann characters,H1addquoted-charactersattherightenduntilitrepre-Hsentsn characters.(Usethe characterwhoseASCIIcode.isgivenbythevalueoffill.Z00OReturnthe resultingquoted-string.O%%O %CHAR(code,...)! NO Restrictions8..Each parametermustbea compile-time-MOconstant-expression.'Thevalueofeach parametermustbein&O5therange0through255.c 9O ExpansionB.)Evaluateeach parameterand interpretitsvalueNOasthecodeforanASCII character.( Concatenatetheresult-LO5ing characterstoformasingle character sequence.*ReturnJOthe quoted-stringthat representsthat character sequence.R ((O %CHARCOUNT(#p,...) uO RestrictionB.)The parametersmustsatisfythe restrictionsonO%STRING parameters.}  SO ExpansionA.(Proceedasforthe%STRING function, obtainingHOasinglequoted-string.+ Determinethenumberofquoted-O5 characters(see5Section4.3.1),r5inthequoted-string.( RepresentFOthisnumberasanumeric-literal.-Returnthenumeric-Oliteral.* ? @OTheresultofa%STRING, %EXACTSTRING,or%CHARIOfunctionisaquoted-string.-However,unlikethequoted-HO5stringswrittenbyBLISS programmers,this quoted-stringROisnot restrictedtoprinting characters,blanks,andtabs;in-KOstead,itcan representanysequenceofASCII characters.QO>This quoted-stringis processedbythecompilerasifitwere&Oanordinaryquoted-string. O15.5.2.2BExamplesLO)The followingaremore illustrativethan practicalexamples+Oofstring-function definitions:  OOFunction Expansion OOb%STRING( b ' bABC _b ' b)O%STRING(  ' ABC _ ' ,  ' D  ' )O %STRING(%C  ' :A o ' )OK%STRING( K ' KABC _K ' K,%C K ' *KA _K ' K) b ' *bABC b '  '*ABCD  '  ' *65 j ' K '*KABC65 K 'O %STRING(23)O%STRING(00023)O_%STRING( _ '_00023 o_ ' _)O %STRING(20+3)O%STRING(  '20+3 Z ' )  ' *23 j '  ' *23 j ' _ '*_00023 _ ', (INVALID:Operatornotallowed)  '*20+3  'Ot %STRING(%B t '4t-1111 t ' t)O %STRING(%O  ' :77 z ' ,%X  ' D77  ' )O %STRING(%E  '4 1.125E-02 Z ' ) t ' *t-15 t '  '*63119  '1 (INVALID: Float-literalnotallowed)O %STRING(beta, : '_beta  ' )O%STRING(,X,,Y)O$%STRING(OWN,MODULE)  '*BETAbeta Z '  ' *XY  '+$ (INVALID:Reserved-keywordsnotqallowed)O%STRING(  ' OWN t ' ,  'MODULE  ' $)  '* OWNMODULE  'Oe %STRING(Q,18)O%STRING(Q,%DECIMAL t ' - O18  ' )OM%STRING(Q,-18) e ' *eQ18 e '  '*Q-18  '1 (INVALID:Leadingsignnotallowed) Oh= ! UOItisassumedintheseexamplesthatbeta,X,Y,andQarenotBO macro-names.'As%STRING parameters, non-macronamesMO5aretreated literally(exceptforpossiblecase conversion),/Owhereasa macro-nameis expanded.  NOInmost situations,atleastsomeofthe parametersoftheKO%STRINGfunction(oranyotherlexical-function)arevari-O5able.'Forexample:O %STRING(U,'=',V(X,Y)) ! UBOAssume that U and V are declared as macros.3TheMO%STRINGfunctionwillputthe expansionsofthetwomacrosRO5intoasingle quoted-string separatedbyanequalsign( = ).1OIfthe expansionsofUandVare 'DALPHA Y' and H' xX+Y "' R,MO respectively,thenthefinal expansionofthe%STRINGfunc-&O>tionisthe quoted-string >'> ALPHA=X+Y >'>.Examplesofthe)O %EXACTSTRINGfunctionfollow:  r OOFunction Expansion OOb%EXACTSTRING(6,%C 4b ' ZbX b ' b, b ' bABC zb ' b)O%EXACTSTRING(3,%C 4 ' ZX  ' ,  'ABC  ' )O%EXACTSTRING(2,%C 4 ' ZX  ' ,  ' ABC  ' )OK%EXACTSTRING(0,%C 4K ' ZKX K ' K, K ' KABC K ' K)O%EXACTSTRING(-2,%C Z ' X  ' ,  ' ABC  ' ) b '*bABCXXX Jb '  ' *ABC  '  ' *AB  ' K '' (INVALID:Negativecount)O_%EXACTSTRING(4,%C 4_ ' Z_- _ ' _)O %EXACTSTRING(6,%C K ' p*  ',38,  ' E-6  ' ) _ '*_---- _ '  '*38-6 **  'O&%EXACTSTRING(4,%C 4& ' Z&Y & '&,%C K& ' p&X & ' &)Ot%EXACTSTRING(4, t ' tY $t ' Jt, _t ' tX t ' t)O%EXACTSTRING(4,  ' Y $ ' J, _ ' X  ' )O%EXACTSTRING(4,%C 4 ' ZY  ' ,  ' X  ' D)O\%EXACTSTRING(4,89, \ ' D\X t\ ' \) & '*&88YY & ' t ' *tX Zt 'tinBLISS-36only  '*XYYY  '6inBLISS-16/32only \ '*\XYYY \ '5\inalldialects  '*XYYY  ' O1  IOExamplesofthe%CHARfunctionfollow.(Theyareassumed;Otolieinthescopeofthese declarations:Oa LITERAL ACODE%=%65, BCODE%=%66,9 APOSTROPHE%=&39, CR%=%13, LF%=%10;J   OTheexamplesfollow:   OOFunctiony Expansion OOb %CHAR(65,66)O%CHAR(ACODE,BCODE)O%CHAR(ACODE+32)'OK%CHAR(ACODE,APOSTROPHE,BCODE)O %CHAR(CR,LF) yb ' bAB b ' y ' AB  ' y ' a  ' yK ' KA K '' KB IK 'K(3 characters)y(newline) Od ::OExamplesofthe %CHARCOUNTfunctionfollow:X 7. OOFunction Expansion OOb %CHARCOUNT( _b ' bABC b ' :b)O %CHARCOUNT(,,  '' ,)O %CHARCOUNT( _ ' A  '' C 4 ' Z) b3 0 3 O  %O15.5.3CDelimiter-FunctionsJO4Thedelimiter-functionsinsertordelete delimiterswithinGOagivenstring.*The%EXPLODEfunctionformsaquoted-ROstringandthen ``explodes''itintoalistofsingle-characterPO=quoted-strings.*Itcanbeusedtotakeagivenstringapart.FOThe%REMOVEfunctiondeletes parentheses, brackets,orEOanglebracketsthatencloseagivenactual-parameter. B]O15.5.3.1B Definition?O)Thedelimiter-functionsareexpandedasfollows:P &&O %EXPLODE(#p,...) tO RestrictionA.*Each parametermustsatisfythe restrictiononO%STRING parameters. wO ExpansionA.(Proceedasforthe%STRING function, obtaining#Oasinglequoted-string. KORemovethequotesfromtheendsofthe resultingquoted-QOstring,placeeachquoted-characterinitsownpairofquotes,GO5andinsertacommabetweeneach quoted-stringandtheOnext.v ! LLOReturnthe resultingsequenceofquoted-stringsandcommas.C O %REMOVE(#p)  oO ExpansionD.'Ifthe parameterbeginsandendswithamatched#Opairof parentheses,(^ ...), brackets,[ ...N],oranglebrack-O5ets,<.5 ...A5>,thenremovetheselexemesfromthe parameter.7O Otherwise,leavethe parameter unchanged.b 88OReturnthe resultingsequenceoflexemes.> NOTheresultofa%EXPLODEfunctionisasequenceofoneorGOmore one-characterquoted-strings.(Aswiththe%STRING,>O5 %EXACTSTRING,and%CHARlexical-functions,theseAOquoted-stringscan representanyASCII characters.~ BTO15.5.3.2BExamples8O)Examplesofthe%EXPLODEfunctionfollow: f OOFunctiony Expansion OOb %EXPLODE( b ' bABC b ' b)O %EXPLODE(  ' A 4 ' Z)O %EXPLODE( )OK %EXPLODE( K ' KA 4K ' ZK, oK ' KB K ' K)O %EXPLODE(%O D ' j77  ' )O %EXPLODE(  ' A 4 ' Z,%O  ' - O377 3 ' 3) yb ' bA b ' b, b ' 4bB _b ' b, y ' C  ' y ' A  ' yK '' y ' A  ' ,  ' 4B _ ' y ' 6  ' ,  ' 3 ? ' y3 ' 3A 3 ' 3, 3 ' 43- Y3 ' 3, y ' 6  ' ,  ' 3 ? '^b(5lexemes)^(1lexeme)^(1lexeme)^K(3lexemes)^(3lexemes)^(7lexemes) O !a?OThe followingexampleis especially interesting:"O %STRING(%EXPLODE('ABC')) J LOInthisexample,%STRINGactsastheinverseof %EXPLODE,JOandthefinal expansionofthenested functionsisjust ' ABC ' .a 77OExamplesofthe%REMOVEfunctionfollow::  OOFunctionK Expansion OOb%REMOVE((A,B,C))O%REMOVE()O%REMOVE([R(A+1)])OK%REMOVE((A+B))O%REMOVE((A)+(B))KbA,B,C KA+1KR(A+1) KKA+BK(A)+(B) O! JOThisfunctionisusuallyappliedtomacro-formal-names.*A:Osimpleexampleofthis applicationfollows:Oa MACRO( A(X)%=&RRR(%REMOVE(X))+1&%; O ...O9 A(1);O A((1,2,3));x" sNMOTheextra parenthesesinthesecond macro-callarerequiredLOtokeepits parameterfrombeingtreatedasthreeparame-JO5ters.(The%REMOVEfunctiondeletestheextra parentheses,AOandthetwo macro-callsexpandtothe following:O RRR(1)+1;OZ RRR(1,2,3)+1;# NLOAssumingthatRRRisa conditionalor iterativemacro(asOdefinedinSection16.3)4andthusacceptsa parameterlistof9O5variablelength,thisisausefulresult.*# ? $ ! VX O15.5.4CName-FunctionsPO4 Sometimesitis necessarytoputtogetheranameduringpro-LOgram compilation.(ThisneedariseseitherbecausethenamePOcannotbewritteninadvanceorbecauseitisasequenceofLO= charactersthatwouldnotnormallybeacceptedasaname.% BXO15.5.4.1B Definition:O)Thename-functionsareexpandedasfollows:u& K#O %NAME(#p,...)(O %QUOTENAME(#p,...)' tO RestrictionA.*Each parametermustsatisfythe restrictiononO%STRING parameters.( wO ExpansionA.(Proceedasforthe%STRING function, obtaining#Oasinglequoted-string.)  MOTreatthesequenceofquoted-charactersinthe quoted-string5Oasaname.'Returnthe resultingname.w*  M>OTheresultofa%NAMEand %QUOTENAMElexical-NOfunctionisaname.(Unlike user-definednames,thisnameisSO5not restrictedtothesyntaxforaBLISSname;instead,itcanNObeanysequenceofASCII characters.*Itisacceptedbythe Ocompilerasaname.+ AOThe %QUOTENAMElexical-functionissimilartotheGO%NAME function,the exceptionbeingthatthe resultantEO5nameis implicitly%QUOTEDtopreventmacro-expansionOofthename.f, <O15.5.4.2BExamplesHO)The%NAMEfunctionpermitsthe formationofanameat/Ocompiletime.'Anexamplefollows:O MACRON BLOCKOP(A)%=z OWN%A:% BLOCK[10];0z ROUTINE%%NAME(A,'_INIT'):%NOVALUE%=& BEGIN n ... END; z %;y- !O8OSupposethismacroiscalledasfollows:O BLOCKOP(BETA). A*OThe expansionisasfollows: O OWN%BETA:% BLOCK[10];)OP ROUTINE& BETA_INIT:%NOVALUE%= BEGIN  ...( END;/  FOThemacroBLOCKOPusesthegivenname,BETA,foranHOOWNdatasegment.)Ituses%NAMEtogeneratearelatedPO5butdistinctname, BETA_INIT,fortheroutinethat initializesOBETA.50  + MOThe%NAMEfunctionalsocanbeusedtoforcethecompilerKOtoacceptany charactersequenceasaname.+ThatcanbeJO5usefulwhen somethingentirelynewisneeded.)AnexampleOfollows:O %NAME('+302')1 NPOEachtimethis constructappears,itis equivalenttowritingMOjust+302andhavingthosefour charactersacceptedbythe'O5compilerasavalidname./2  @OThe %NAME function should!not be used! casually.IO Sometimesitsusecancausean unexpectedconflictwithLO5names generatedbythe compiler.'Forexample,onecompilerNOusesnameslikeP.AAA,P.AAB,andsoon,forPLITstorage.IO Furthermore,some operatingsystemsrestrictglobalnamesNO>to charactersthatareintheRAD50 characterset;inthatKO situation, %NAME(+302)wouldbeinvalidasaglobalname.3 sIOThe%NAMEcannotbeusedtoproducethe``name''ofaPOmacrothatisalready declared;itwill,however,alwayspro-JO5ducethemacro expansionandmaybeusedtoinvokeandAOexpanda legitimatelyproducedmacro,asfollows:+O MACRO% %NAME('A.B')%=%OWN%X;%;OZ %NAME('A.B')!DZ !expands%to%"OWN%X;"\4  2MOTherearealsocasesinwhich%NAMEis essential.(Forex-POample,theperiod characterisusedforglobalnamesinsomeMO5 software.)SinceperiodcannotbeusedinanordinaryBLISSHOname,%NAMEmustbeusedtoformsuchaglobalname.5  GOAsanexampleoftheuseofthe %QUOTENAME function,#Oconsiderthe following:*Oa MACRO%FOOBAR%=%.XYZ&*%5%%; O ...(O UNDECLARE%%NAME('FOO','BAR');6 zIOThiswouldproduceanerror,becausethecompilerwould>O interpretthe UNDECLARE declarationasfollows:Oa UNDECLARE%.XYZ%*&57  BO Moreover, insertinga%QUOTEbeforethe%NAME,asPOfollows,wouldagainresultinan incorrectcompiler interpre-O5tation:/O UNDECLARE%%QUOTE&%NAME('FOO','BAR')8 !mBOHowever,usingthe %QUOTENAMEfunctionasfollows:+O UNDECLARE%%QUOTENAME('FOO,'BAR')9 !qMOresultsinacorrect expansiontothe following equivalent:$O UNDECLARE%%QUOTE&FOOBAR;: )O15.5.5CSequence-Test-FunctionsJO4Asequence-test-functionexpandsto1or0, dependingonNOwhetherornotacertain conditionismet.+Becauseatest-IOfunctionisexpandedduring compilation,itcanbeusedLO=withinotherlexical constructs.+In particular,a sequence-GO test-functioncanbeusedasacompile-time-testina1Olexical-conditional,as describedin,Section15.6.*: ,? ;  WrAOThetwotest-functions,%NULLand %IDENTICAL,areGOappliedtolexeme sequences.*The%NULLfunctiondeter-PO5mineswhetherasequenceisempty,thatis,containsnothing.AOThe %IDENTICALfunctioncomparestwo sequencestoIO determineiftheycontainthesamelexemesinthesameO>order.< BaO15.5.5.1B DefinitionCO)Thesequence-test-functionsareexpandedasfollows:O= %%O %NULL(#seq,...)`> 6O Expansion@.+Processtheactual-parametersasforanordi-,Onary macro-call,asdefinedinSection } }16.3.3.1. ReturntheOO5numeric-literal1or0, dependingonwhetherornotallthe7O parametersexpandtotheempty sequence.*> ? S? ))O %IDENTICAL(#seq1,#seq2)h@ >O Expansion?.,Processtheactual-parameters,seq1andseq2,=Oasforanordinary macro-call,asdefinedinSection 16.3.3.1.MO5Returnthenumeric-literal1or0, dependingonwhetherorFOnotthetwo resultinglexeme sequencesarethesame.*@ ? ~A  TLOWhentwo identifiersare compared,alllettersareconsid-NOeredtobe upper-case,sothatcaseis effectivelyignored.IO5Whentwonumeric-literalsare compared,thenumericval-JOuesofthenumeric-literalsarecomparedratherthanthe'Onumeric-literals themselves.B nO15.5.5.2BExamplesDO)Examplesofthe%NULLand %IDENTICAL functionsfol-Olow:LC " OOFunctionJ Expansion OOb%NULL( )O %NULL(,,)O%NULL(%EXACTSTRING(OK0,0, K ' KABC oK ' K))O %NULL(,ALPHA) Jb1 J1 J0 JK0O%IDENTICAL(A+B,A+B)O_ %IDENTICAL(,)"O%IDENTICAL(3,%CHARCOUNT( o ' ABC $ ' J))OH %IDENTICAL(%O H ' H77 H 'H,63)!O%IDENTICAL(ALPHA,alpha)O %IDENTICAL( * 'OALPHA D ' j,  'alpha T ' z)O0%IDENTICAL(A+B,A+C)O~%IDENTICAL(32, ~ ' ~32 ~ ' ~) J1 J_1 J1 J1 JH1 J0 J0 J00 OD ! LOThethirdexampleof%NULLis interesting,sinceitmightMObethoughtthata charactersequenceoflength0wouldbeMO5alexicalsequenceoflength0.-However,thevalueoftheQO followingisthestring-literalthat representstheemptychar-Oactersequence( "8)andthatstring-literal constitutesoneO>lexeme:!O %EXACTSTRING(0,0,'ABC')BE ! `+O15.5.6CExpression-Test-FunctionsMO4Anexpression-test-functionexpandsto1or0, dependingonQOwhetherornoteachofits parameters constitutesa particularLOformof expression.*Sincea test-functionisexpandeddur-SO=ing compilation,itcanbeusedwithinotherlexical constructs.MOIn particular,anexpression-test-functioncanbeusedasaKOcompile-time-testinalexical-conditional,as describedinOGSection15.6.*E O ? F BOThe functions %ISSTRING,%CTCE,and%LTCEareap-GOpliedto expressions.*The %ISSTRINGfunction determinesMO5whetherornoteachofits parametersisastring-literal.FOThe%CTCEfunction determineswhetherornoteachofHOits parametersisa!compile-time-constant-expression.)TheFO>%LTCEfunction determineswhetherornoteachofits=O parametersisa link-timeconstant expression.G BcO15.5.6.1B DefinitionEO)Theexpression-test-functionsareexpandedasfollows:RH ((O %ISSTRING(exp,...)|I RO Restriction=.'Each parametermustbeavalid expression.J ! [O Expansion>.*Processeach parameter, expandingallmacro-MOcallsandlexical-functions.*Returnthenumeric-literal1ifNO5eachofthe resulting expressionsisaquoted-string;returnTOthenumeric-literal0ifanyofthe resulting expressionsisnotOaquoted-string.NK $$O %CTCE(exp,...)|L RO Restriction=.'Each parametermustbeavalid expression.M WO Expansion>.*Processeach parameter, expandingallmacro-FOcallsandlexical-functions./Returnthenumeric-literalLO51ifeachofthe resulting expressionsisa compile-time-HOconstant-expression;returnthenumeric-literal0ifanyMOofthe resulting expressionsisnota compile-timeconstantO> expression.NN $$O %LTCE(exp,...)|O RO Restriction=.'Each parametermustbeavalid expression.P  O Expansion>.*Processeach parameter, expandingallmacro-MOcallsandlexical-functions.*Returnthenumeric-literal1ifKO5eachofthe resulting expressionsisalink-time-constant-QO expression;returnthenumeric-literal0ifanyoftheresult-HOing expressionsisnota link-timeconstant expression.Q B[O15.5.6.2BExamples?O)Examplesoftheexpression-test-functionsfollow:%R   OOFunction Expansion OOb %ISSTRING( b 'bALPHA b ' /b, O 'tBETA * ' O, d 'GAMMA  ' )OK %ISSTRING( K 'KALPHA K ' /K, [K 'KBETA 5K '[K,GAMMA)O%ISSTRING(%ASCIC  '@ALPHA 5 ' [)O%ISSTRING(%RAD50_11 j 'AB.99 D ' j,%P  ' 372 j ' ) b1 0 1 d(16/32Only K1 dK(K16/32Only*O_ %ISSTRING(GET_STRING_RTN(BUF+I))O%ISSTRING(%CHARCOUNT(  '$GAMMA D ' j))"O%ISSTRING(%STRING(%ASCIC _ 'BETA : ' _)) _0 0 1Ot %ISSTRING( t 't ABCDEFGHIJ t ' t)O%ISSTRING(PLIT(  ' ABCDEFGHIJ  ' )) t1 02O;(Contextforthe following examples:OWNX:REFVECTOR,Y: VECTOR[10];PEXTERNALLITERALA; LITERALV=100;)O%CTCE(X,Y)Oe%CTCE(A)O%CTCE(V)O%CTCE(A,V) 0 e0 1 0Oy%LTCE(X,Y)O%LTCE(X+A)O %LTCE(X[0])Ob %LTCE(Y[9])O %LTCE(V) y1 1  0 b 1  1 O S  m O15.5.7CBits-FunctionsGO4A bits-function determinesthesmallestnumberofbitsHOrequiredfortheBLISSencodingofagivenvalue..TheHO%NBITSUfunction determinesthenumberofbitsrequiredMO=foranunsigned encoding,andthe%NBITSfunctiondoesthe)Osameforasigned encoding.T BXO15.5.7.1B Definition:O)Thebits-functionsareexpandedasfollows:NU $$O %NBITSU(n,...)V nO Restriction=.*Each parametermustbea compile-timecon-Ostant expression.UW +O ExpansionE.+Thisfunction calculatesabitcountforeachofPOits parameters.*ThebitcountisthesmallestnumberofbitsKO5requiredto representthe parameterasanunsignedbinary8Ointeger.'The following algorithmisused:X Af ` GIfthefunctionhasjustone parameter,evaluatethat( parameter.Y ! N-DIfthevalueofthe parameteris negative,thenthede-CY(siredbitcountis%BPVAL(which,inBLISS-32forYexample,is32).N-D Otherwise,thedesiredbitcountisthesmallestinteger,8YYi,that satisfiesthe following relation: 0 ; fvp  (21 i )  1vZ ! LYbwhere Rb vp<bisthevalueofthegiven parameter,and2 n** bi,Ymeans``2totheithpower''. `: F:Ifthegiven%NBITSUfunctionhasseveral parameters,Lthenthedesiredbitcountisthevalueofthe following expression:h[ {>>b MAX(%NBITSU(n1),%NBITSU(n2),...)o\ {EEbwheren1,n2,andsoon,arethegiven parameters.] vEb Representthebitcountthusobtainedasanumeric-1literal.'Returnthenumeric-literal.M^ {##b %NBITS(n,...)_ kb Restriction7Ob.,Each parametermustbea compile-timeconstant expression.` ! b ExpansionADb.*Thisfunction calculatesabitcountforeachNofits parameters.'ThebitcountisthesmallestnumberofNbitsrequiredto representthe parameterasasigned(two'sFl complement)binaryinteger.)The following algorithmisused: `D LDIfthefunctionhasjustone parameter,evaluatethatpa-Mrameter.*Thedesiredbitcountisthesmallestinteger,i,4that satisfiesthe following relation:  (2. ( i  1)) m vp  (2c ( i  @1))  1|a ! Rbwhere b vp;1bisthevalueofthegiven parameterand2 n**Eb(i-1)0means``2tothe(i-1)thpower''. `: E:Ifthegiven%NBITSfunctionhasseveral parameters,Lthenthedesiredbitcountisthevalueofthe following expression:fb {<<b MAX(%NBITS(n1),%NBITS(n2),...)oc {EEbwheren1,n2,andsoon,arethegiven parameters.d vEb Representthebitcountthusobtainedasanumeric-1literal.'Returnthenumeric-literal.e BaO15.5.7.2BExamplesEO)Examplesofthe%NBITSUand%NBITS functionsfollow:f  OO+ ParameterList Expansionof(+%NBITSU Expansionof%NBITS OF O-8 O-1 OK0 O1 O2 O3255%BPVAL%BPVAL K0 1 2 38 v4 v1 vK1 v2 v3 v39 O1,7O-8,7OH 0,1,255,2,3 3%BPVAL H8 v4 v4 vH9 Oc3g  &O15.5.8CAllocation-FunctionsGO4Anallocation-function determinestheamountofstorageMOrequiredforagivenkindofdata.*Allocation-functionsareOOusefulinlayingoutstorageand calculatingaddressoffsets.h  \@OThe %ALLOCATIONfunction determineshowmanyad-MO dressableunitshavebeen allocatedforagivendataname.IO5The%SIZEfunction determineshowmany addressableunitsLOwouldbe allocatedforagivenstructure-attributeifthat:O attributewereusedinadata declaration.i B^O15.5.8.1B Definition@O)Theallocation-functionsareexpandedasfollows:Ij O %ALLOCATION(name)k }O RestrictionB.(The parametermustbeanamethatisdeclared&Oasoneofthe following:l U OWN(GLOBALFORWARDLOCAL2 STACKLOCALREGISTERGLOBALREGISTER<EXTERNALREGISTER.m O Expansion@.* Determinethenumberof addressableunitsal-LOlocatedinthedatasegmentforthegivenname.* RepresentKO5thenumberjustobtainedasanumeric-literal.+ReturntheOnumeric-literal.Rn ((O %SIZE(structure-attribute)o  O RestrictionB.(The parametermustbeastructure-attribute,asO describedin Chapter11.*o Op ! WO ExpansionA.) Determinethenumberof addressableunitsthatSOwouldbe allocatedforadata structureifthegiven structure-PO5 attributeappearedinadata-declarationatthispointintheNOprogram.)(Afull descriptionofstructure-attributesisgiven OinSection11.4.)7 Representthenumberjustobtainedasa9O>numeric-literal.'Returnthenumeric-literal.*p ?wq MO15.5.8.2BExamplesPO)TheexamplesthatfollowareassumedtolieinthescopeofOthese declarations:O GLOBAL N X, Y:%BYTE,  <=& BLISS--16/32%only Z:% VECTOR[10];O& STRUCTUREn ARRAY[I,J;M,N]%=z [M*N*4]z (ARRAY+(I*N**)*4);zr P?OExamplesofthe %ALLOCATIONand%SIZE functionsOfollow:s !  OOFunction ExpansionvComment OOb%ALLOCATION(X)/b%UPVAL(Forexample,1inBLISS- 36)O)%ALLOCATION(Y)Ow%ALLOCATION(Z) )1w%UPVAL 5* Uw10!)(In BLISS-16/32only) w(Forexample,40in BLISS-16)O>%SIZE(VECTOR[10])>%UPVAL 5H*$U>10&(Forexample,20in BLISS-16) O%SIZE(VECTOR[10,WORD])OS %SIZE(REFVECTOR) 20S%UPVAL!(In BLISS-16/32only)'S(Forexample,1inBLISS- 36)O%SIZE(ARRAY[3,3])%UPVAL 5$*#U9F(Forexample,36inh BLISS-32) OAt &O15.5.9CFieldexpand-FunctionOO4Thefieldexpand-functionplaysa specializedroleinthedec-OOlarationofdata-structures.(Thefunctionisusedinconjunc-=Otionwith field-names,whichare describedinChapter11.*t O&u  EOThe %FIELDEXPANDfunctionreplacesagiven field-nameMOwithits associatedlistoffield-components.)Whenanaddi-OO5tional parameterisgiven,that parameterselectsoneoftheOfield-components.v BXO15.5.9.1B Definition:O)Thefield-functionsaredefinedasfollows:rw H!O %FIELDEXPAND(field)'O %FIELDEXPAND(field,n)x ~O Restrictions;..Thefirst parametermustbea field-name-Odeclaredinafield-declaration.Hy JOThesecond parameter,ifpresent,mustbea compile-time1Oconstant expression,anditsvalue, - v&R,mustlieintherangeKO50throughk-1,wherekisthenumberoffield-components'O associatedwiththefield.z  O ExpansionC.( Determinethelistoffield-components associated,Owiththegiven field-name(seeChapter11).*z O{ NEO Representeachfield-componentasastandardnumeric-JOliteral(seethe definitionof %STRING);useacommatoJO5separateeachfield-componentinthelistfromthenext.| NNOIfasecond parameterisnotgiven,returntheentirelistEOoffield-components.1 Otherwise,!returnthevthfield-KO5 component,wherevisthevalueofthesecond parameter.} _fO15.5.9.2BExamplesPO)TheexamplesthatfollowareassumedtolieinthescopeofOthis declaration:O FIELDN DCB_FIELDS%= z SETz DCB_A&=% [0,0,0,0],z& DCB_B&=% [0,8,3,0],zn DCB_C&=% [0,11,5,1], z DCB_D&=% [0,16,16,1],"z DCB_E&=%[1,0,%BPVAL,0]zF TES;~ -O(This declarationistakenfromSection11.5,wherefield-:O declarationsare describedand illustrated.)*~ F?f <Whenthe%NUMBERfunctionisappliedtoaname,the?Onamemustbea COMPILETIME,LITERAL,orGLOBALOLITERALname. B`O 15.5.10.1C DefinitionAO)Thecalculation-functionsareexpandedasfollows:L ""O %ASSIGN(#name,n) uO Restrictions?.,Thefirst parametermustbeanamethatis Odeclared COMPILETIME. ZEOThesecond parametermustbeacompile-time-constant-O expression.  NO ExpansionB.(Evaluatethesecond parameterand associatetheLO resultingvaluewiththefirst parameter.*ReturntheemptyO5 sequence.B O %NUMBER(p) yO Restrictions;..The parametermustbeaquoted-string,a(Onumeric-literal,oraname.  nKOIfthe parameterisaquoted-string,itsquoted-charactersNOmustconsistofanoptionalsignfollowedbyasequenceofQO5decimaldigits.(Ifthe parameterisanumeric-literal,itmustTOnotbeafloat-literal.)Ifthe parameterisaname,itmustbe0Odeclaredasoneofthe following:i ?LITERAL(GLOBALLITERAL COMPILETIME gO ExpansionB.+First determinethevalueofthe parameter,asOfollows:  ` FIfthe parameterisaquoted-string,thenremovetheJ(quotesand interpretthe remainderasadecimalinteger. ` JIfthe parameterisanumeric-literal,usethevalueit represents. ` CIf the value is a name,"use the!value associatedJwiththenamebyits declarationor,inthecaseofa<1 COMPILETIMEname,themostrecently processed%ASSIGN function.  NLOOncethevalueofthe parameterhasbeen determined,rep-MOresentthatvalueasanumeric-literal.'Returnthenumeric-O5literal.g =O 15.5.10.2CExampleGO)Anexampleofamacrothatusesthe%ASSIGNfunction9Oappearsinthe followingprogram fragment:O BEGIN ON ...O COMPILETIME  ERRS%=%0;O& MACRO2 n COUNT_ERROR&=%%ASSIGN(ERRS,ERRS+1)%%; O ... O ENDV +,IOThefirst declarationinthisblockdeclaresERRSasa@O COMPILETIMEname.-Thesecond declarationdeclaresmineswhichcompiler (BLISS-16, BLISS-32,or BLISS-36)IOisinuse.)The%VARIANTfunction determinestheintegerPOvaluegiveninthe/VARIANT qualifierswitch(ifany)inthe"OHcompilercommandline. BZ O 15.5.11.1C Definitions:O)Thetest-functionsareexpandedasfollows:H O %DECLARED(#name)n DO Restriction/.'The parametermustbeaname. NO ExpansionC.)Returnthenumeric-literal1or0, dependingonROwhetherornotitis explicitlydeclaredatthispointinthe(O5 compilationoftheprogram.[ 11O %SWITCHES( #switch-name,...) ! pO RestrictionD.'Each parametermustbeoneofthe followingon-O off-switches: ERRS|7NOERRS!(OPTIMIZE8|7 NOOPTIMIZEUNAMES|8NOUNAMESSAFE|7NOSAFE 2ZIPf2|8NOZIPCODE|7NOCODEDEBUG|7NODEBUG NO Expansion?.,Returnthenumeric-literal1or0, dependingJOonwhetherornotevery parameter designatesthecurrent)O5settingofanon-off-switch.N $$O %BLISS(#language-name) mO Restriction>.-The parametermustbeoneofthe followingOcompilernames:] 3BLISS16(BLISS32BLISS36  NO ExpansionC.)Returnthenumeric-literal1or0, dependingonOOwhetherornotthe parameter designatesthecompilerthatis#O5 compilingthisprogram.< O %VARIANTo EO Expansion2.'Oneofthe followingmustapply: ! Ay ` KIfthecompilercommandline containeda qualifierswitch#(ofthe followingform:N {$$b /VARIANT:nor /VARIANT=n ! SHbwherenisanunsigneddecimal-literal,thenreturnn. ` KIfthecompilercommandline containeda qualifierswitch#:ofthe followingform:< {b/VARIANT 0bthenreturnthedecimal-literal1. ` @Ifthe compiler command line did not contain aC:/VARIANT qualifierswitch,thenreturnthedecimal-literal0.6  O 15.5.11.2CExamplesPO)Theexamplesthatfollowareassumedtolieinthescopeof-Oonlythe following declarations: O OWN N A,  B;O SWITCHES& OPTIMIZE,n NOCODE;O UNDECLARE%B;{ ! QQOItisfurtherassumedthataBLISS-32compilerisbeingused. f@OExamplesofthe %DECLARED, %SWITCHES,and%BLISS&O functionsareasfollows:  OOFunction Expansion OOb %DECLARED(A)O %DECLARED(B)O %DECLARED(C) b1 0 0Ow%SWITCHES(OPTIMIZE)$O%SWITCHES(OPTIMIZE,NOCODE)"O_%SWITCHES(OPTIMIZE,CODE) w1 1 0O%BLISS(BLISS16)O&%BLISS(BLISS32)Ot%BLISS(BLISS36) 0 &1 t0 Ow VM%O15.5.12CAdvisory-FunctionsGO4Theadvisory-functionsgenerate compile-timeoutput.)TheNOkindofadvisoryfunction determinestheformofoutput:*itJOmaybeanerrormessage,awarningmessage,aninforma-IO=tionalmessage,orjustalineintheprogramlisting. WEOTwooftheadvisory functionsdomorethangenerate?O compile-timeoutput:- %ERRORMACROalsoabortsanyFO5currentmacro-expansion,and%ERRORinhibitsmostsub-LOsequent expression evaluationsandcausestheobjectmoduleNOtobe discarded.((Seethe appropriateBLISSusermanualforDO>further informationonthesideeffectsof%ERROR.) B^ O 15.5.12.1C Definitions>O)Theadvisory-functionsareexpandedasfollows:N $$O %ERROR(#p,...) O RestrictionA.' Parametersofanadvisory-functionmustsatisfyGOthe restrictionon parametersofthe%STRING function. kO ExpansionA.(Proceedasforthe%STRING function, obtainingROasinglequoted-string.(Usethe quoted-stringasthetextofaMO5compilererrormessage,transmitthemessageasifitwereQOastandard diagnostic,andadd1tothecompilererrorcount.'OReturntheempty sequence.M ##O %WARN(#p,...) O RestrictionA.' Parametersofanadvisory-functionmustsatisfyGOthe restrictionon parametersofthe%STRING function. rO Expansion?.*Proceedasforthe%STRING function,obtain-POingasinglequoted-string.(Usethe quote t td-stringasthetextHO5ofacompilerwarningmessage,transmitthemessageasPOifitwereastandard diagnostic,andadd1tothecompiler8Owarningcount.'Returntheempty sequence.L ""O %INFORM(#,...) O RestrictionA.' Parametersofanadvisory-functionmustsatisfyGOthe restrictionon parametersofthe%STRING function. ! WO Expansion?.*Proceedasforthe%STRING function,obtain-POingasinglequoted-string.(Usethe quoted-stringasthetextMO5ofacompiler informationmessage,andtransmitthemessageQOasifitwereastandard diagnostic.)(Donot incrementeitherHOthecompilererrororwarningcount.),ReturntheemptyO> sequence.N $$O %PRINT(#p,...) O RestrictionA.' Parametersofanadvisory-functionmustsatisfyGOthe restrictionon parametersofthe%STRING function.F  O ExpansionA.(Proceedasforthe%STRING function, obtainingOOasinglequoted-string.'Insertthe charactersequencedirectlyRO5intothe compilationlistingasthenextlineofthatlisting.'OReturntheempty sequence.P &&O %MESSAGE(#p,...) O RestrictionA.' Parametersofanadvisory-functionmustsatisfyGOthe restrictionon parametersofthe%STRING function.U ! +O ExpansionA.(Proceedasforthe%STRING function, obtainingNOasinglequoted-string.(Writethe charactersequencedirectlySO5totheuser'sterminal(orotherstandardoutputdeviceforthe6O compilation).'Returntheempty sequence.S ))O %ERRORMACRO(#p,...) O RestrictionA.' Parametersofanadvisory-functionmustsatisfyGOthe restrictionon parametersofthe%STRING function.f <O ExpansionA.(Proceedasforthe%STRING function, obtainingROasinglequoted-string.(Usethe quoted-stringasthetextofaMO5compilererrormessage,transmitthemessageasifitwereQOastandard diagnostic,andadd1tothecompilererrorcount.MOThen,in addition,abortevery macro-call expansionthatisIO> currentlyin progress.+Resume compilationoftheprogramLOwiththelexemethatfollowsthe outermostoftheabortedO macro-calls. O 15.5.12.2CExamplesLO)Examplesoftheformofmessageproducedbythe advisory-:O functionsappearintheBLISSusermanual.  $O15.5.13CTitling-FunctionsKO4Eachpageofa compilationlistingbeginswithaheader.IOTheheadermayvaryfromoneimplementationtoanother,PObut, typically,itincludesthepagenumber, compilationdate,MO=andother identifying information.)Bymeansofthetitling-4O functions,a programmercanspecifya titlerandaW subtitle lfor%O inclusionintheheader. B\O 15.5.13.1C Definition=O)Thetitling-functionsareexpandedasfollows:> O %TITLEqs O Restriction@.+Thelexemeqsmustbeaquoted-string.+(Note8Othatqsisnotenclosedin parentheses.) NO ExpansionD.-Usethevalueofqsasthetitlein subsequentJOheadersofthe compilationlisting.-Returntheemptyse-O5quence.> O %SBTTLqs O Restriction@.+Thelexemeqsmustbeaquoted-string.+(Note8Othatqsisnotenclosedin parentheses.) NO ExpansionC..Usethevalueofqsasthesubtitleinsubse-LOquentheadersofthe compilationlisting.*ReturntheemptyO5 sequence. NJOThese functionscanbeused repeatedly throughoutamod-ROule,thuschangingthetitleand/orsubtitlefrompagetopageO5ofthelisting. BmO 15.5.13.2CExamplesPO)Listingtitlesand subtitlesappearintheBLISSusermanual.  "O15.5.14CQuote-FunctionsKO4Thequotation-functionsareusedtooverridethe quotation$Orulesgivenearlier,inhSection15.2.2.%EachfunctionappliestoJOthenameorlexical-function-namethat immediatelyfollowsNO=it.'The%QUOTEfunctioncanalsobeappliedtoacommaorOpercentlexeme.* hO?u KFOThe%QUOTEfunctionpreventsanamefrombeingboundLOandprevents expansionofalexical-functionor macro-call.FO5The%UNQUOTEfunctioncausesanametobeboundbutCOdoesnotcauseany expansion.,The%EXPANDfunction0Ocausesbothbindingand expansion. B[ O 15.5.14.1C Definitions;O)Thequote-functionsareexpandedasfollows:: O %QUOTE O Restrictions?.,Thenextlexememustbeaname,alexical-:Ofunction-name,acomma,orapercentsign.0  POUseofthisfunctionis restrictedto macro-bodiesortotheKOactual-parametersofa macro-callorlexical-function.(ThatOO5is,itappliesonlytolexemes encounteredat macro-quoteorO name-quotelevel.  NO ExpansionA.* Temporarilychangethe quotationrulessothatSObindingofthenextlexemeisdeferredtoa subsequentscanof5O5thelexemestreaminwhichitoccurs: !  ` HIfthenextlexemeisanunboundname,anattemptto9(binditwillnotoccurwhenitisread. ` JIfthenextlexemeisthe beginningofa macro-callorIlexical-function,anattempttoexpandthe macro-callorAYlexical-functionwillnotoccurwhenitisread. ` MIfthenextlexemeisitselfaquote-functioninamacro-I1 definition,thatquote-functionwillbe interpretedasaNlexemeinthe macro-bodyandthuswillnot,atthatpoint,Daffectthebindingofthelexemewhichfollowsit. `a GaIfthenextlexemeisacommainalistofactual-B parametersinalexical-functionor macro-call, itIwillbe interpretedasalexemeinthecurrentactual-Dk parameterratherthanasthe separationbetweentwoactual-parameters. `C MCIfthenextlexemeisapercentinamacro-definition,itKwillbe interpretedasalexemeinthe macro-bodyrather:thanasthe terminationofthe macro-body.Q ''OReturntheempty sequence.< O %UNQUOTE lO Restriction?.,Thenextlexememustbeanameorlexical-Ofunction-name.0  POUseofthisfunctionis restrictedto macro-bodiesortotheKOactual-parametersofa macro-callorlexical-function.(ThatOO5is,itappliesonlytolexemes encounteredat macro-quoteorO name-quotelevel.o EO Expansion2.'Attempttobindthenextlexeme. NHO(Forcedbindingofa macro-nameorlexical-function-nameMOdoesnotalsoforce expansionofthe correspondingcallorO5 function.)Q ''OReturntheempty sequence.; O %EXPAND  O Restriction?.'Thesequenceoflexemesthatfollows%EXPANDAOmustbeginwithalexical-functionor macro-call. SOUseofthisfunctionis restrictedto macro-bodies.)Thatis,itJOappliesonlytolexemes encounteredat macro-quotelevel.^  4O ExpansionA.* Temporarilychangethe quotationrulessothatKOthelexical-functionor macro-callthatfollows%EXPANDisLO5 expanded.'(Any macro-callsorlexical-functions containedinIOthe expansionarenot themselves automatically expanded.)Q ''OReturntheempty sequence. x]O 15.5.14.2CExamplesKO)Asimpleexampleoftheuseofthe%UNQUOTEfunctionisOgivenearlier(inSection15.2).+Aseriesofmorecomplexex-NOamplesisgivenhere.*Theyareeachbasedonthe followingO3program fragment:O MACRO Q1(P)%=%1,P%%,G Q2%=%2&%, X%=&Q1(Q2)%%; O ...O ROUTINE&R%=g BEGIN MACRO$z %QUOTE%Q1(X)%=&10,X%%,z? %QUOTE%Q2%=&20&%; BIND"z Y%=%UPLIT(%STRING(X));  ..._ END;* D?z NLOWhenQ1(Q2)inthe declarationofXis processed,neitherLOQ1norQ2isboundbecausetheyarenamesat macro-quoteO5level(see5Section15.2.1).* ?\  2IOThe%QUOTE functionsare necessaryinthesecondmacro-IO declarationbecauseQ1andQ2would otherwisebeinter-MO5pretedas macro-calls,andthe declarationwouldbecometheO following:O MACROZ 1,X&=%10,X%%, 2%=&20&%; JOwhichmakesnosense.(This expansionwouldoccurbecause?OQ1andQ2are macro-namesat name-quotelevel. ! zOOAcallonthemacroXappearsinthebind-declaration.'When@OXisexpandedand processed,itisasfollows:Oa 10,20  TOThisresultreflectsthefactthatQ1andQ2arebothboundinEOthescopeofthesecond declarationsofQ1andQ2. OOThe followingtableshowstheeffectofusingvariousquote-FO functionsinthe macro-bodyofthe declarationofX:  a O)O+IfQ1(Q2)isreplacedwith:)Thenthe processed expansion +is: OFO Q1(%UNQUOTEQ2)O%UNQUOTEQ1(Q2)$OK%UNQUOTE Q1(%UNQUOTEQ2)10,21,20 K1,2O%EXPANDQ1(Q2)!O%EXPAND Q1(%QUOTEQ2) 1,21,20O Q1(%QUOTEQ2)#O Q1(%QUOTE%QUOTE%QUOTE%O&%QUOTE%QUOTE%QUOTEQ2)10,2010,Q2 OB EOThe last two examples are especially interesting.3InDO Q1(%QUOTEQ2),the%QUOTEhasnoeffectbecauseQ2OO5isatmacroquotelevelandwouldnotbeboundorexpandedOanyhow.,  FOInthefinalexample,themany occurrencesof%QUOTEOOhavetheeffectofkeepingQ2fromeverbeing expanded.'TheEO5 processed macro-bodyforthisexampleisasfollows:(O Q1(%QUOTE%%QUOTE&%QUOTE%Q2) zIOThis macro-bodybecomesthe expansionofXandmustbe=O processedassuch;theresultisasfollows:Oa Q1(%QUOTE%Q2) zJONext,this macro-callis expanded.-Before processing,the%O expansionisasfollows:Oa 10,%QUOTE%Q2 `POFinally,this expansionis processed,givingtheresultshown,O10,Q2.$ GOThe precedingexampleislargely concernedwithmacro-KOnames.+Thatisnotintendedtoimplythatquote-functionsLO5arenot importantforlexical-functionsorfornamesotherOthan macro-names.8 rIOAnexampleof%QUOTEappliedtoacommaandapercent Osignisasfollows:Oa MACRO X%=z MACRO&9 Q(A)&=%UPLIT(A)%%QUOTE&% z %; O X;O BIND-Y Y%=&Q(4%%QUOTE,&5%%QUOTE,%6);  OOWhenthe declarationofXis processed,the followingmacro-(Obodyis associatedwithX:Oa MACRO Q(A)%=&UPLIT(A)&%;G ! OOTheterminalpercentgetsintothe macro-bodybecauseitwasOOquotedinthe declaration.'The expansionofthe macro-callXQO5isexactlythissame macro-body,andwhenitis processed,it.O establishesa declarationforQ. zlGOThe macro-callofQhasjustoneactual-parameter,asOfollows:Oa 4,%5,%6  FOThecommasgetintotheactual-parameterbecausetheyQOarequoted.*Theneteffectofthisexampleistoproducethe!O5 following declaration:O BIND Y%=& UPLIT(4,5,6);: EOThe followingisanexampleoftheuseof%EXPAND:O MACROP B%=&C%%, A%=&B%%, X%=&A%%,( XX%=%%EXPAND&A%%;Op UNDECLARE %QUOTE&A, %QUOTE&B;OH OWN%X;O OWN%XX; NLOThe macro-callXinthefirstOWN declarationisexpandedMOtothenameAwithnofurther expansion,sincethemacro-)O5nameAhasbeen undeclared.  WLOThemacro definitionofXXisB,sincethe%EXPANDfunc-NOtionforces expansionofthe macro-callAwithinthemacro-LO5bodyforXX(priortothe undeclarationof macro-nameA).JOThusthe macro-callXXinthesecondOWN declarationisLOexpandedtoB,againwithnofurther expansion,sincethe/O> macro-nameBhasbeen undeclared.k  sAKONotethatthe expansionofthefunction%EXPANDAwithinLOthe macro-bodyforXXisnotcarriedthroughtothenameRO5C.The followingmacrocanbeusedtoobtainthiseffectwhenOdesired:O MACRO7Z FORCE%[]%=%%QUOTE%%EXPAND% %REMAINING&%;n 9DIOThepreviousexamplecouldthenbeextendedasfollows:O MACROP B%=&C%%, A%=&B%%, X%=&A%%,( XX%=%%EXPAND&A%%,'p XXX&=%%EXPAND%FORCE(A)%%;O UNDECLARE %QUOTE&A,H %QUOTE&B;O OWN%X,  XX,  XXX;9 EOThe internallystored definitionofFORCEis%EXPAND@O %REMAINING.Whenthemacro-declarationofXXXisEO5 processed,the%EXPANDfunctioncausesthe macro-callGOFORCE(A)tobe expanded.*Whenevera macro-callisex-NOpanded,allactual-parametersofthecallare completelyex-IO>panded.( Thereforetheactual-parameterAbecomesC.ThatNOis,thebodyofFORCEexpandssimplytoitsfullyexpandedOargumentlist.r HHOThe%EXPANDfunctionhasseveral practical applications:   ` GYoucanreduce compilationtimebyforcingaone-timeE( expansionofembedded macro-callsatmacro-declarationItime,ratherthanatevery occurrenceofthe containing macro-call. `Y BYYoucanreducethememoryusedduring compilationHforstoring macro-bodiesbyforcing expansionofmacrosB  involving complicatedconditional-compilationsyntax. ` JYoucangainfurther efficienciesintheuseoflibraryLfilesbyforcingasmuch expansionaspossibleduringthe#:librarypre-compilation. ` F Macro-namesdeclaredforusewithinalibraryprecom-Ipilationcanbe undeclaredandthusfreedfor differentSkusesinmodulesthatrefertothelibrary,ifall instancesofFthe macro-namesareexpandedwithinthelibraryfile.~  `T"O15.5.15CMacro-FunctionsKO4Themacro-functionsare especiallydesignedforusewithinNOmacro-definitions;theyarenotusefulinanyothercontext.OOComplete definitionsofthemacro-functionsaregiveninthisPO=section.'However,these definitionsare difficultto understandHOwithouta discussionofmacros.+Examplesand motivation;Oforthemacro-functionsaregivenlater,inpSection16.3 2onOG macro-callsandGSection16.4#vGonexamplesofmacros.* p? *  ?  BZO 15.5.15.1C Definition;O)Themacro-functionsareexpandedasfollows:> O %REMAINING NO Expansion>.* Concatenatetheactual-parametersnotassoci-GOatedwithformal-parameters, separatingthembycommas.8O5Returnthe resultingsequenceoflexemes.; O %LENGTH NO Expansion:.- Determinethenumberofactual-parametersHOforthecurrent macro-call.- Representthisnumberasa9O5numeric-literal.'Returnthenumeric-literal.: O %COUNT7  O ExpansionB.) Determinethe recursiondepthina conditional-OOmacroorthenumberof completed iterationsinan iterative-JO5macro.( Representthisnumberasanumeric-literal.(ReturnOthenumeric-literal.B O %EXITITERATIONk ! AO ExpansionC.( Terminatethe expansionofthecurrent iterationQOofan iterativemacrocall.+Ifadefault separatororclosing%O5grouper(as specifiedin5Section 16.3.3.4)"5isrequiredatnormal7O terminationofan iteration,includeit.* ? > O %EXITMACRO  NO ExpansionA.( Terminatethe expansionofthesmallestmacro-TObodyinwhichthislexical-functionis contained,justasiftheCO5terminalprecentsign( % )lexemeappearedhere. O 15.5.15.2CExamplesMO)Someexamplesofthese functionsaregivenaspartofthe$O discussionofmacrosinSection16.4.* D? = #O15.5.16CRequire-FunctionIO4Therequire-functionisthe functional equivalentofthe#Orequire-declaration(seeSection16.5);#however,becauseitisHOnota declaration,%REQUIREcanappearinanycontext.* O?  BYO 15.5.16.1C Definition:O)Therequire-functionisdefinedasfollows:P &&O %REQUIRE(#P,...) O RestrictionsB.) Parametersmustsatisfythe restrictionsofthe!O%STRINGfunction(seeSection15.5.2).* ? |POThe resulting quoted-stringmustbeavalidfile specification,Oforthehost operatingsystem.  NROIftherequiredfilecontainsa%IFlexeme,itmustalsocon-LOtainthematching%THEN,%ELSE(ifused),and%FIofthe#O5samelexical condition. NNODuringthe expansionofarequiredfile (functionordecla-XOration),afatalerrorwilloccuriftheendofthefileisfound6O5whileamacroisstillbeing declared. zKOArequiredfile (functionor declaration)mustnotappear/Oduringthe expansionofamacro.H ! O ExpansionA.(Proceedasforthe%STRING function, obtainingSOasingle quoted-stringfortherequiredfile.(The specifiedfileUO5isthenplacedattheheadoftheinputstreamasthe following"Oactionsare performed:  ~N`1.:The file-namedefaultrulesforthehostsystemandthe!(compilerareapplied.G`2.:Inputfromthecurrentlexemesourceis suspended.R`'3.:The specifiedfileisadoptedasthecurrentlexemesource.F`4.:Inputfromthe suspendedlexemesourceisresumed0whenthe specifiedfileisempty.z NPO 15.5.16.2CExamplesDO)The followingdepictsarequiredfilenamedADDMOD:"O %IF%%BLISS(%BLISS32&)O %THEN> ,ADDRESSING_MODE(%z EXTERNAL&=%LONG_RELATIVE)O %ELSE" %IF&%BLISS(%BLISS16%)] %THEN$z ,ADDRESSING_MODE(RELATIVE)  %FI O5 %FI JOAndthe followingdepictshowthefilemaybe required:9O MODULE%A(%%TITLE& 'SETMODES'%IDENT%=%'1-1'TP %REQUIRE('ADDMOD')T )%=O BEGIN OI ... O ENDO ELUDOM }LONotethatunlikearequire-declaration,therequire-function1Ocanappearasamodule-head-switch.  zJOThe followingexampleshowsamacro-declarationthatpro-/Oducesafatalerrorwhencalled:/Oa MACRO%REQ%=%%REQUIRE('ERRMSG')%%; vEOTheerroroccursbecausethe%REQUIREis encountered1Oduringthe expansionofthemacro. HOThe followingexampleshowsamacro-declarationthatisOallowed: Oa MACRO%REQ%=%%EXPAND %REQUIRE('ERRMSG')u  KHOIntheaboveexample,the%EXPANDfunctionexpandstheAO%REQUIREfunctionduringthe declarationofMACROOO5REQ.Noticethatthepercentlexeme,requiredforthetermi-MOnationofthe macro-body,doesnotappearandis contained&Owithintherequiredfile. M1O15.5.17CSummaryofLexical-FunctionsPO4The followingtablegivesanexampleofeachlexical-function:  B OOFunctionJ Expansion OOb%STRING( b ' bABC _b 'b,23,%B Tb 'zb-1111 b 'Db,,phi)O%EXACTSTRING(8,%C 4 'Z X,  ' ABC t ',23)%OK%CHAR(65,66,67,39,97,98,99)O %CHARCOUNT( _ ' ABC  ':,23) Jb 'pb ABC23-15PHI %b ' J 'pABC23XXX  ' J ' pABC  '' Jabc  ' JK5O %EXPLODE(  ' ABC  ',23)+O_ %REMOVE(Q)[whereQis(A+1)] J ' pA  ' ,  ' B 0 ' U, j ' C  ' ,  ' 2 @ ' e, z ' 3  ' J_A+1O%NAME( t '+302 $ 'J,beta)!J+302BETA(asaname)OS %QUOTENAME( _S ' SFOO S ' 4S, JS ' oSBAR S ' $S)'JSFOOBAR(asaquotedname)O%NULL( _ ' abc  ' , $ '' o)#O%IDENTICAL(ABC5,ABC%B  ' 6101  ' )%J0(notanull sequence)(J1 (sequencesare identical)O%ISSTRING(BETA,  'BETA  ' )O%CTCE(ALPHA[1])O|%LTCE(.ALPHA[1])"J0(onenotastring)(J0(nota compile-timecon-J/stant expression))J|0(nota link-timeconstantJ expression)OD %NBITSU(7,2)O %NBITS(7,2) JD3 J4/O %ALLOCATION(X)[scalarbydefault] OX%SIZE(VECTOR[10,WORD])J %UPVAL!JX20 (BLISS-16/32only)O%FIELDEXPAND(DCB_E)J 1,0,%BPVAL,0 OL %ASSIGN(X,2+3)[XisO  COMPILETIME]+O  %NUMBER(Y)[YdeclaredLITERAL O4 6])JL Empty (associates5withX) J 6O  %DECLARED(A)$O %SWITCHES(OPTIMIZE,NOCODE)OI %BLISS(BLISS32)J 1(Ais declared)'J 1(theseswitchesareon)(JI 1(underBLISS-32 compiler)O %ERROR(  ' errormessage p '  )O %WARN( z ' warningmessage  '  )O^ %INFORM( ^ '^  informationmessage u^ ' ^ )O %PRINT( z ' textinlisting A ' f )O  %MESSAGE(  ' textforterminal  ' 6 )OF  %ERRORMACRO( F 'F errormessage uF ' F )&J Empty(stepserrorcount)(J Empty(stepswarningcount)J^ EmptyJ EmptyJ Empty&JF Empty(abortsallmacros)O %TITLE k '! OnTopLineofPage  'O %SBTTL p  '$ OnSecondLineofPage s  'J EmptyJ Empty.O%QUOTElexeme,comma,orpercent,O%UNQUOTE(Binds followingname)(O"%EXPAND(Bindsandexpands)JEmptyJEmptyJ"EmptyO %REMAININGO%LENGTHO7%COUNTO%EXITITERATIONO %EXITMACROO %REQUIRE(  'ERRMSG $ ' J)Om%VARIANTJ Unmatchedactual-J parametersJ7Numberofactual-J parameters)J Recursionor iterationcount#JEmpty(abort iteration))JmEmpty(abortsmallestmacro)"JInclude specifiedfile!JReturndecimal-literal O#G66 )(O16.1C IntroductiontoMacrosKOUThemacro facilitiesofBLISSare importanttolearnbe-MOcausetheycanbeusedtoaddnew notationstoBLISSandKOthusgreatlyimprovethe organizationandclarityofyourDO^ programs.*Other high-level programming languagesthatPOfeaturemacro facilities generallyprovidelimited capabilities;IOhowever,BLISSmacro facilitiesare extremely innovative..7  WPOThe expansionofmacrosisapartoflexical processing,andNO thereforemacrosare initially discussedatthe beginningofO5Chapter15.B5 Specifically,thebasic principlesofmacroexpan-"Osionare presentedinTSection15.1.4,%^andanexampleisgiven OinSection15.1.5.;An understandingoflexical processingisaLO> prerequisiteforthe discussionofmacrosinthischapter.*7 OOI*7 TP?]*7 ?i8 WJOThissectionprovidesaninformal descriptionoftheba- Osic simplemacro6,which introducesmostofthegeneralLO5 techniquesofmacrousageandis sufficientformostpro-NOgramming applications.(IfyoudonothaveastronginterestOOinmacros,youcanreadthissectionandskipthe remainingO> descriptions.!9 1O16.1.1CMacro DeclarationsandCalls)O4Amacrohastwoparts:-theX4 macro-declaration4andtheO macro-call:.-Amacro-declarationcontainsoneormoreO macro-definitions7,andeachmacro-definition associatesaO=name,the= macro-name1=,withasequenceoflexemes,theO macro-body?.)Oncea macro-namehasbeen declared,itcan$Obeusedin macro-calls.: 9OAnexampleofamacro-declarationfollows:O MACRO$P CLA&=%PLIT(502,-1,3)%%,# ADD&=% PLIT(402,0,3)%%;o; EJOThis declarationcontainstwomacro-definitions.+ThefirstIOmacro-definition associatesthenameCLAwiththemacro-HO5bodyPLIT(502,-1,3),andthesecond associatesADDwithJOPLIT(402,0,3).(Each macro-bodyis terminatedbyapercent Osign( % )lexeme.<  KOTwoexamplesof macro-callsappearinthe followingexam-Ople:Oa IF% USED(REG) THEN%CODE&=%CLA ELSE%CODE&=%ADD;{= ! bQMOThe macro-callshereareCLAandADD.Ifthis conditional-QO expressioniswithinthescopeofthemacro-declarationintheNO5 preceding paragraph,thenitis equivalenttothe following:O IF% USED(REG)' THEN%CODE&=%PLIT(502,-1,3)'I ELSE%CODE&=%PLIT(402,0,3);I> ?OAssumingthatthenamesCLAandADDhavesomeEOmnemonic significanceintheprogramfromwhichthisNO5exampleisdrawn,theiruseintheconditional-expressionisMO certainlymoreclearthantheuseofthePLIT expressions.? ! aoKOA macro-bodyis processedtwice.*Thefirst processingoc-MOcurswhenitis encounteredaspartofamacro-definition.MO5Duringthat processing,noobjectcodeis generatedbytheLO compiler;instead,the macro-bodyissavedbythecompilerQOasasequenceoflexemesandthatsequenceis associatedwithFO>the macro-name.*Thesecond processingoccurswhentheNO macro-bodyisusedasthe expansionofa macro-call.&DuringKOthat processing,the macro-bodyiscompiledinthenormalOHway.9@ `*O16.1.2CMacroswith ParametersJO4Amacro-definitioncanhavealistof formal-nameparam-FOeters,andthese formal-name parameterscanappearinIOthe macro-body.)Whena macro-callis expanded,eachap-FO=pearanceofa formal-name parameterinthe macro-bodyKOisreplacedbythe correspondingactual-parameterfromtheIO macro-call.+Theuseof parametersinmacroscangreatly2OGincreasetheirpowerand generality.A ?OAnexampleofamacrowith parametersfollows:O MACRO>P GETBYTE(N,I)&=% ((N)^(-(I))%AND& %B'11111111')%%; O ...#O X&=%GETBYTE(.Y+1,12)-2;B TOInthisexample,thelistof formal-namesis(N,I)andthelistJOofactual-parametersis (.Y+1,12).)Whenthe macro-callonJO5GETBYTEis expanded,acopyofthe macro-body associatedMOwithGETBYTEismade,andthenNisreplacedby.Y+1andOOIisreplacedby12.&The resulting expansionisasfollows:-Ok ((.Y+1)^(-(12))%AND& %B'11111111')C ! xQOThis expansionisplacedattheheadoftheinputstream(asO describedinSection15.1.4. andisthen compiled.*NotethatLO5the expansionof GETBYTE(N,I)isan expressionwhosevalueXOisthe8-bitfield(onebyte)ofNthatisIbitsfromtheright%OorloworderendofN.*C ?]sD ! kIEOActual-parametersare processedtwice,as macro-bodiesHOare.-Thefirst processingofanactual-parameteroccursIO5whenthe macro-bodyis encounteredaspartofamacro-KOcall.,Duringthat processing,no object-codeis generated,IOjustasfora macro-body.+However, macro-calls,lexical-HO> functions,orlexical-conditionals encounteredwithintheHOactual-parameterareexpandedduringthisfirstprocess-NOing,andinthisrespectanactual-parameterdiffersfromaIOH macro-body.(Thesecond processingoftheactual-parameterJOoccursduringthe expansionofa macro-call.*DuringthatNO processing,theactual-parameteriscompiledlikeanordinary ORsequenceoflexemes.E  .O16.1.3CParenthesizationofMacrosOO4Ifa macro-bodyisanoperator-expression,thenitshouldbeMOparenthesized; otherwise,aconflictofprioritybetweentheHO macro-bodyanditscontextmayproduceanunwantedin-MO= terpretation.(Forthesamereason,each formal-namethatisLOanoperandofanoperator-expressionshouldbeenclosedinO parentheses.F s\LOThe definitionofGETBYTE,givenabove,followstheparen-QO thesization guidelinesjustgiven./Ifitdidnot,thatis,ifJO5theextra parentheseswerenot included,thenthemacro-.O declarationwouldbeasfollows:O MACRO8Z GETBYTE(N,I)&=%N^(-I)&AND% %B'11111111'%%;G !k;Oandthe assignmentwouldbecomeasfollows:0O X&=% .Y+1^(-12)%AND%%B'11111111'-2;'H JOAfter insertionofdefault parenthesesin accordancewith)Ooperator prioritiesgivenin.Section6.1.1,the assignment"O5becomesthe following:6O X&=%(.Y)+(1^(-12))%AND&(%B'11111111'-2);*H .?I NNOThisresultisvery differentfromthatobtained previously,MOandthe expressiondoesnotextractthedesiredbytevalueO5fromN.J /O16.1.4C QuotationRulesandMacros/O4The quotationrules, describedin4Section15.2,4haveanim-HOportantimpactonmacrousage.)The following paragraphsOOpresenttwoexamplesofsomeofthelessobviouseffectsofJO=the quotationrules.+Theexamplesare concernedwiththeEOinterpretationof constructsatthe name-quotelevel.*J ?zK kLOBecausethe declarationofanameisat name-quotelevel,HOandbecausemacrosareexpandedatthatlevel,specialEO5measuresarerequiredto redeclarea macro-name.-ForOexample:O MACROZ ALPHA%=%BETA&%;O ROUTINE&R%= BEGIN2 LITERALzz ALPHA&=%1,z %QUOTE%ALPHA%=&2;  ... R ENDL WLOThefirstuseofALPHAintheLITERAL declarationisex-LOpandedbeforebeing declared,sothatBETAisdeclaredasNO5aliteralwithvalue1.+TheseconduseofALPHAisquotedPOand thereforeALPHAis redeclaredasaliteralwithvalue2.JOThus,withintheroutineR,BETA represents1andALPHAO> represents2.M  NOOBecauseanameinthe formal-namelistofa structure,rou-MOtine,ormacro-declarationisalsoat name-quotelevel,theKOWhenthe macro-callA(M,N)is expanded,itsfirstactual-CO parameter,a macro-name,isboundandexpandedbutJO5thesecondactual-parameter,a literal-name,isnotboundUO (quotationrule2).'Thusthecallis equivalenttothe following:O A(10,N)Q @OThe expansionofthis macro-callisasfollows:O BEGINOP MACRO M%=&1%%;O LITERAL( N%=&2;Op OUTPUT(10,N); O END R  KOObservethatthe%QUOTEbeforethefirst occurrenceofMOOpreventsthe replacementofthat occurrenceofMby10,andLO5thuskeepsthemacro-declarationvalid.*Observe,also,thatIOthe%QUOTEbeforethefirst% (percent)lexemepreventsNOthe premature terminationofthe macro-bodyofA.ThefinalMO>resultoflexical-processingis equivalenttothe following:O OUTPUT(10,2)bS 88OThus,Nisfinallyboundto2,not20.T  POAlthoughinmostcasesresultswillbeas expected,thequo-LOtationrules emphasizethatyoumustusemacros carefully.OO5Muchoftheneedforquote-functionsarisesfromtheuseofLO duplicatenameswithinthescopeofyourprogram.'However,LObecausequote-functionsaddalevelof complexitythatcanLO>increasethechanceoferror,youshouldavoidsuchusageOwherever possible.U AO16.1.5CASurveyofMacrosandRelated FacilitiesCO4Themacros describedinthe precedingsectionsare4 simpleO positionalmacros<;however,thereareotherkindsofmacros.OO Moreover,BLISShas additional facilitiesthatarenotcalledNO=macros,butarecloselyrelatedtothem.(Macrosandrelated8O facilitiesare discussedinthissection.iV ?3OBLISShastwomainkindsofmacros: positional 7and key-O wordF..The differencebetweenthetwoisinthewaytheJO5actual-parametersofa macro-callare associatedwiththe?O formal-namesofthe designatedmacro-declaration.TW *OOIna positionalmacro,theorderoftheactual-parametersisMO important;thatis,thefirstactual-parameteris associatedKO5withthefirst formal-name,thesecondactual-parameterisCO associatedwiththesecond formal-name,andsoon.X ! WHOInakeywordmacro,however,theorderoftheactual-JO parametersdoesnotmatter;instead,eachactual-parameterPO5is explicitlyassignedtoa formal-name.'(BLISSusesthewordPO ``keyword''intwoways.'In classifyingmacros,theworddes-KOignatesawayofhandlingactual-parameters; elsewhere,itBO> designatesan identifierwithabuilt-in meaning.)Y ! :O Positionalmacrosarefurther classifiedasF simple &,P conditional , Oand iterativeD .'SimplemacrosarenotonlythesimplestkindofJO5macrobutalsothemostcommonlyused.'Conditional-macrosIOanditerative-macrosprovidetwowaysofhandlingmacros4Owithavariablenumberof parameters.Z NEOThe BLISS facilities that are related to macros areDOcompiletime-declarations,require-declarations,library-1O5 declarations,andbound-declarations.[  X OThe# compile-time-declarationsare describedinSection15.7.MOTheyareusedtosupportmacros.'Forexample,anamethatHO5hasbeendeclared COMPILETIMEcanbeusedto designateLOacounterthatis incrementedeachtimeagivenmacroisO expanded.*[ F?- \  W OThe require-declarationsare describedin>Section16.5.EachLOrequire-declaration designatesafileofBLISS declarations.NO5Whentherequire-declarationis processed,itisreplacedbyPOthe designatedfile.(Arequire-declarationcanbeviewedasaPO specializedformofmacrothat,incontrasttoatruemacro,5O>cangotoanotherfileforitsbody.*\ >F? ] m OThe library-declarationsare describedin=Section16.6. ANOlibrary-declarationissimilartoarequire-declarationexceptQO5thatit designatesafilethathasbeen preprocessedandthusGOrequiresminimal compilation.*Library-declarationsreduceO compilationcosts.*] =F? ^ W OThe bound-declarationsare describedin!Chapter14.TheyMOareusedto associateavaluewithaname.* Sometimes,youLO5haveachoicebetweenamacroandabound-declaration.(InMOthat situation,thebound-declarationis preferred.)Abound-FO declarationnotonlymakesthe programmer's intentionsFO>more specific,butalsoiscompiledmore efficiently.*^ !FO _ pKOTheBLISSmacrosandrelated facilitiescanbelistedin%Ooutlineformasfollows:` W*Macrosandrelated facilitiesY(Macros PositionalmacrosbSimplemacrosb2 Conditionalmacrosb IterativemacrosKeywordmacrosY<Related facilities#Compile-time-declarationsRequire-declarationsELibrary-declarationsBound-declarationsa WSOAllofthese facilitiescanbeusedtogiveanametoapro-JOgramming constructandthentousethatnameinsteadofNO5the construct.,The constructcanbeanentirefileofdec-OO larationsaswitharequire-declaration,orasingleinteger,OOaswithaliteral-declaration.*Inanycase,theycangreatlyCO>improvethe organizationandclarityofaprogram.~1,&b "O16.2CMacro-DeclarationsLOUAstheprevioussectionstates,everyuseofamacrohasMOtwoparts:+ declarationandcall.+Thissection describestheAOmacro-declarationsforallkindsofBLISSmacros. c  OA& positional-macro-declaration%consistsofthereservedKOkeywordMACRO,followedbyalistofoneormoremacro-MO5 definitions.+Aswithother declarations,the definitionsareEO separatedbycommasandthe declarationendswithaGO semicolon.)Eachmacro-definitioncanbea simple-macro-KO> definition,aniterative-macro-definition,ora conditional-Omacro-definition.Fd ! l OA! simple-macro-definition,,consists primarilyofamacro-HOnameanda macro-body.*Thenameis separatedfromtheTO5bodybyanequalsign,andthebodyis terminatedbyapercentNOsign( % )lexeme.*The macro-namecan, optionally,befol-NOlowedbya parenthesizedlistof formal-names.'The followingBO>macro-declarationcontainsasimple-macro-definition:O MACROO  SM1(F1,F2,F3)&=!OS ((F1(F2)+F1(F3))/2)&%;e ! zPOInthisexample,thenamebeingdeclaredisSM1,theformal-POnamesareF1,F2,andF3,andthe macro-bodyisasfollows:Oa ((F1(F2)+F1(F3))/2)f ! eLOThepercentsignlexemeafterthe macro-bodyis essential.HOOmissionofthepercentsignlexeme(acommonprogram-OO5mingerror)causesthecompilertoincludeinthe macro-bodyRO everythingitseesuntilitreacheseithera subsequentpercent0Olexemeortheendofthemodule.cg  b9 OA& conditional-macro-definition$is distinguishedfromaLOsimple-macro-definitionbyanemptypairofsquarebracketsBO5insertedjustbeforetheequalsign.'Forexample:O MACROO CM1(F1,F2)[]%=.OI ((F1)^-(F2)%+&CM1(%REMAINING))%%;h VOInthisexample,theemptybrackets( [ ] )identifythedefini-4Otionasaconditional-macro-definition.i ! i OAn$ iterative-macro-definition-is distinguishedfromasimple-ROmacro- definitionbyan additionallistofoneormoreformal-NO5namesthatisenclosedinsquarebracketsandinsertedjust2Obeforetheequalsign.&Forexample:O MACROOZ IM1(F1)[F2]%=O F1+F2%%;j  NQOInthisexample,the bracketedlistof formal-names(justone,UOinthis example),[F2], identifiesthe definitionasan iterative-O5macro-definition.k ! e OA# keyword-macro-declaration$consistsofthekeyword@O KEYWORDMACROfollowedbyalistofoneormoreAO5keyword-macro-definitions.+Akeyword-macro-definitionKOisthesameasasimple-macro-definitionexceptthateachMO formal-namecan, optionally,haveanexplicitdefault-actual-IO> parameterassignedtoit.-Thedefault parameterisusedLOwhenacallonthemacrodoesnotgivethe corresponding*Oactual-parameter.'Forexample:Ot KEYWORDMACRO( COPYVECTOR(DEST,SOURCE,N=1)&=%z INCR%I%FROM&1%TO%N%DO&L DEST[.I]%=& .SOURCE[.I]&%;nl ! DNOInthisexample,thedefault-actual-parameter1is associatedPOwiththe formal-nameN.DefaultsarenotgivenfortheotherHO5 formal-names,DESTandSOURCE,sotheemptylexemese-IOquenceistheimplicitdefault-actual-parameterfortheseJO formal-names.((Forthisexample,the macro-callmustgiveIO>actual-parametersforDESTandSOURCE,sincetheuseofKOanemptylexemesequenceforeitherofthese formal-names7Owouldyieldaninvalidmacro expansion.)m  WGOWhenamacro-definitionis processed,thegivenmacro-JOnameis associatedwiththegiven macro-body.*AsidefromFO5the recognitionof formal-nameswithinthe macro-body,SOverylittleisdonetothe macro-body;itremainsalexemese-OOquence.)Noobjectcodeis generatedduringthe processingofO>amacro-declaration.fn <QOInfact,the processingofamacro-declarationisa relativelyMOsmallpartofthe processingofamacro.(Onlywhenmacro-'O5 expansionis described,in5Section16.3,5can motivationforAO differentkindsofmacro-declarationsbe provided.*n ? po MFO16.2.1CSyntax.O4SYNTAX:4ClicktodisplaySyntax.*o OOp r ^OThe syntacticname- lexeme1isdefinedinSection2.2.*r M|?s pO16.2.2C RestrictionsHO4Onlyaconditional-macrowithoneormore macro-formal-LOnamescanbeused recursively.*Thatis,the macro-bodyofUOanyothermacromustnotcontainacallonitselforacallonPO=anothermacrothat ultimatelyresultsinacallonthemacroObeingdefined.t <QOApercentsign( % )ina macro-bodymustbequoted.+ItisKOquotedifit immediatelyfollowsanoddnumberof%QUOTE#O5 functions.'Forexample:O %QUOTE O# %QUOTE%%QUOTE&%QUOTEvu ! LLO Otherwise,thepercentsignwould terminatethe macro-body. v BOA macro-bodymustnotendwithanoddnumberofGO%QUOTE functions.+ Otherwise,thethepercentsignthatIO5 terminatesa macro-bodywouldbecomepartofthemacro-Obody.w  ]IOAdefault-actualinakeyword-macro-declarationmustsat-OOisfythe restrictionsonanactual-parameterina macro-call.JO5(Literalcommasmustbequoted, parenthesesmustbebal-MOanced,andanoddnumberofquotesmustnotoccurattheOend;see}Section16.3.2.)*w }?  x O16.2.3C SemanticsJO4Whenthecompiler encountersamacro-declaration,itpro-POcessesthemacro-definitionsinthe declarationonebyonein.Otheorderinwhichtheyappear.y NOThissection describesboththelexical processingandfinal2Ointerpretationofamacro-definition.z L[>O16.2.3.1BLexical ProcessingofMacro-DefinitionsNO)Lexical processingofamacro-definitionis performedattwoPOquotelevels,neitherofwhichisthe ``normal''quotelevel.POIndeed,themainreasonBLISShasspecialquotelevelsisto/O3properlysupportmacro-definitions.{  NKOThe following paragraphsspecifythequotelevelforeachSOpartofamacro-definition.'The definitionsofthequotelevels,O5givenin5Section15.2.1,5arereviewedhere.*{ ?| NEOThe macro-bodyofamacro-definitionis processedatJO macro-quotelevel./Atthislevel,thecompilertakestheO5 followingactions:}  ` GBindsany occurrenceofanamethatisa formal-name#(inthemacro-definition ` ;Expandsanyquote-function(%QUOTE, %UNQUOTE,or%EXPAND)~  NGOTheseactionsaretheminimumlexical processing.,TheyPOleavemostofthe processingofa macro-bodyforlater,when=O5themacroisexpandedatthepointofcall. ?OEachdefault-actual-parameterinakeyword-macro-BO definitionisalso processedat macro-quotelevel. NGOThe macro-nameandthe formal-names(ifany)arepro-POcessedat name-quotelevel.)Atthislevel,thecompilertakes"O5the followingactions: hn ` "Binds macro-namesonly `O 6OExpandslexical-functionsand macro-calls sMOTheseactionscanproduce unexpectedresults,as illustrated OinSection16.1.4.* ?J  LX9O16.2.3.2BInterpretationofMacro-DefinitionsNO)Aslexical-processingofamacro-definitionis performed,theROcompilerformsthe definitionofamacro,whichitretainsforOOusewhenacallonthemacrois encountered.)The definition0O3containsthe following information:   ` LThekindofmacro:(simple, iterative, conditional,orkey-(word. ` FThenumberof formal-names.(For iterativemacros,theD distinctionbetweenfixed-anditerative-formal-names.EYForakeyword-macro,alistofthe formal-namesand?thedefault-actual-parameters(ifany)foreach. `1 G1Acopyofthe macro-body,witheach formal-nameprop-%erly identifiedassuch. Zo%O16.2.4C PredeclaredMacrosIO4Three macro-namesare predeclaredineachBLISSdialect,CO %BLISS16, %BLISS32,and %BLISS36.,The definitionofLOthese macro-namesin BLISS-32,forexample,isasfollows:Oi MACRO %BLISS16[]%=&%%, %BLISS36[]%=&%%,)A %BLISS32[]%=& %REMAINING%%%;;  GO(Ineachoftheotherdialectsthe %REMAININGlexicalMOfunctionoccursinthe definitionofthe appropriatename.)MO5Thisisnotavalid declarationtogiveinaprogrambe-POcausethenamesinthe declarationbeginwithapercentsignPO( % )andare,infact,reservedkeywordsratherthannamesO>(see>AppendixA).7>However,the declarationdoesconveythe4Ointerpretationgiventhese identifiers.* Or   DOTheexample declarationcausestheBLISS-32compilerGOtoreplaceeachcallon%BLISS16and%BLISS36bytheKO5nulllexemeandtoreplaceeachcallon%BLISS32bytheKOactual-parametersequenceinthecall.'EachBLISScompilerFO predeclaresthese macro-namessothatonlythemacro-GO>name associatedwiththe applicablelanguage (BLISS-16,GO BLISS-32,or BLISS-36)expandstoanon-null sequence.!  IOBymeansofcallsonthese predeclaredmacros,youcanJOspecify processor dependencies.)Then,whentheprogramisQO5 compiled,onlytheactionsrelevanttothegiven processorareO retained.V+'.  $O16.6CLibrary-DeclarationsGOUAlibrary-declarationcallsuponafilethathasbeenU precom-O piledN.+Theeffectisto introduceasetof declarationsintoa+Omodulewithout compilingthem.# ! WPOBeforealibrary declarationcanbe compiled,aseparatecom-@Opilationactivitymustbe performed.(Thatis,a librarysourceO5 fileD5mustbecreatedbythe programmer,compiledasde-NOscribedinthe appropriateBLISSuser'sguide,andsavedas Oa librarybinaryfileA.'ItisthelatterfilethatisusedwhentheEO>library-declarationiscompiledaspartofamodule.3  LOAlibrary-declaration(andthe associatedprecompilation)isOOchosenoverarequire-declarationentirelyforreasonsofef-NO5 ficiency:+itcanreduce compilationcosts.+MostofthecostOO associatedwith compilingalibraryfileisdoneduringpre-QO compilation.* ThereforeasavingresultsifthelibraryfileisUO>usedinseveralmodulesorifitisrevisedlessoftenthanthe+Omodulesinwhichitisused. KOAsidefrom efficiency,agivenlibrary-declarationhasthe?Osameeffectasan analogousrequire-declaration.B O16.6.1CSyntax :Olibrary-declarationLIBRARYfile-designator;O]file-designatorK] quoted-stringOThe syntacticname- quoted-string1isdefinedinSection4.3.* |?   O16.6.2C RestrictionsRO4Thefile specifiedbythelibrary-declarationmustbealibraryNObinaryfileproducedbythesamecompilerthatis compiling#Othelibrary-declaration.D ! NOTheresultof replacingthelibrary-declarationwiththeas-LOsociatedlibrarybinaryfilemustbeavalidmodule.-(TheOO5compilerdoesnotactuallyperformthis replacement,butsuch1Oa replacementiseasyto imagine.)  ROThe associatedlibrarysourcefilemustnotcontainanyuseof;Oanamethatisnotdeclaredinthatfile.N $POThe associatedlibrarysourcefilemustconsistofasequenceLOof declarations.,Onlycertainkindsof declarationscanbeOO5used.)These declarations,listed accordingtothechaptersin9Owhichtheyare described,areasfollows:k  A OO DeclarationsChapter OObexternal-declarationsbChapter10 Ostructure-declarationsO)field-declarationsChapter11'Oexternal-routine-declarationsChapter12Olinkage-declarationsChapter13'Oexternal-literal-declarationsOliteral-declarations1O2(Specifically,LITERALis permitted,(ObutGLOBALLITERALisnot) Obind-data-declarations$O(onlyifdata-name-value0Ohisa compile-timeconstantexpres-Osion)#Obind-routine-declarations'OP(onlyifroutine-name-value0Oisa compile-timeconstantexpres-Osion)Chapter14#Oecompile-time-declarationsOmacro-declarations$Okeyword-macro-declarationsOMrequire-declarationsOlibrary-declarationseChapters Me15 eand .e16O switches-declarations Ob undeclare-declarationsO built-in-declarations Chapter18 O * 0SDG* SD* qSDt* SD* eSD * M3B4I* .3B43 * SD  O16.6.3C SemanticsIO4The declarationsencodedinthe specifiedlibrarybinaryKOfileare incorporatedintothemodulebeing compiled.+The-O followingactionsare performed:\  2Q`1.:Locatethefile specifiedbythefile-designator.(FilenameK(defaultrulesare describedinthe appropriateBLISSusermanual.S`2.:Verifythatthe specifiedfileisalibrarybinaryfileandFYthatthecompilerthat generatedthefileiscompat-Giblewiththecompilerthatis compilingthelibrary-  declaration.Q`3.:Addthe precompiledtablesthatmakeupthe specifiedfile>tothetablesalreadyformedbythe compiler. xROTheresultisto establishasetof declarationswithamini-&Omumofcompiler activity. NLOSwitches-declarationsinthelibrarysourcefileaffecttheOOprecompilationofthefilebuthavenoeffectonthemoduleclaredinseverallibraryfilesthatareusedtogetherintheOsamemodule. tNOAlibrarysourcefilecanincludebotharequire-declaration&Oandalibrary-declaration.D ! LOLibrary declarationsare permittedinalibrary precompila-LOtiontoallowdata-structuringpackages(suchasXPORT)toQO5beusedbothinlibrary constructionandwithinany individual1Omodulesthatrefertothelibrary.  WOOAllsymbolsdefinedbythenestedlibrarywillbe implicitlyLO undeclaredattheendofprecompilation;thispreventstheNO5 generationoferrormessagesduetonamesbeingdeclaredinTOtwo libraries.'However,ifitis necessarytoretainthesymbolsQOfromthedeclaredlibrary,thelibrarycanbe referencedbyaMO>require-declarationusingthesourcefileasfile-designator.`! o6IOAsanexample,assumelibraryCOMLIBisbeingbuilttoPOcontainacommonsetofdata structuresforaproject;more-IO5over,the structuresuseXPORT$FIELDmacros,whiletheEOprojectusestheXPORTI/Opackage.)Thus, COMLIB.REQ9Owillcontainlinessuchasthe following:'Ok LIBRARY&'SYS$LIBRARY:XPORT'; O ...O= $FIELD LINKED&_LIST= z SETz NEXT=p [$ADDRESS]z] LAST=p [$ADDRESS]'z VALU=p [$INTEGER]z TES; OV ...-" AOWhen COMLIB.REQisbeing precompiled,the$FIELD,FO $ADDRESS,and$INTEGER definitionsaredefinedbytheJO5XPORTlibrary;however,attheendoftheprecompilation2Oprocessthe definitionsaredeleted.# +HOWhenamodulethatusesXPORTI/Oiscompileditcan)Ocontainthe followinglines:'Oa LIBRARY&'SYS$LIBRARY:XPORT';!O LIBRARY&'LIB$:COMLIB'; O ...$ ! zMONotethatiftheCOMLIBlibrary containedamacrodeclara-)Otionsuchasthe following:,Oa MACROJ DOLLAR_FIELD&=%$FIELD&%;d% :JOthemacrowouldnotbeexpandedat declarationtimeandJO$FIELDwouldbeunbound.*Thus,ifasourcemodule(thatJO5didnothavealibraryXPORT declaration) referencedtheBO DOLLAR_FIELDmacro,$FIELDwouldbetreatedasanO undefinedname.(& JOAnotherexampleofalibrary-declarationwithinalibraryJO compilationfollows.(Thisexample emphasizesthe sometimesNO5 unexpectedbehaviorthatcanoccurduringthe compilationofOnested libraries.' MOFortheexample,assumethattwofilesare separatelycom-Opiledasfollows:!Oa $& BLISS/LIBRARY%INNER . . 9.!O $& BLISS/LIBRARY%OUTER2( ADOThefirst compilationproduces INNER.L32asfollows:O ;p0001J0FIELDOP ;p0002J0:P CAB_FIELDS%=O ;p0003J0  SETO ;p0004J0 CAB$W_BLNJ =%[1,2,3]O( ;p0005J0( TES;k) AEOThesecond compilationproduces OUTER.L32asfollows:'O ;p0001J0LIBRARY%'INNER';OP ;p0002J0FO ;p0003J0EXTERNAL%ZOTK:& BLOCK[100]%FIELD(CAB_FIELDS);O ;&WARN%201RO( ;&Illegal% occurrence%of%bound%name& CAB_FIELDS%in%library%sourceOp ;&module*  IOTheerrormessageoccursbecausesymbolsfromtheINNERJOlibraryarenotincludedintheOUTERlibrary.+Thesym-PO5bolZOT,declaredintheOUTERlibrary,referstothesymbolKO CAB_FIELDS,declaredintheINNERlibrary;if,inasub-LOsequent compilation,theOUTERlibraryisusedwithouttheIO>INNERlibrarythe declarationof CAB_FIELDSwillnotbeO available.T9 )#O17.2CEnable-DeclarationsJOUAnenable-declarationisthemeansbywhichoneroutine,NOan establisher, identifiesanotherroutineasahandlerrou-OOtine.,The associationis establishedatthe beginningoftheNO^ establisher's executionandlasts throughoutthe executionofSOthatroutineandanyroutinesthatitcalls.(The associationisJO automaticallybrokenwhenthe establisherroutinereturns.:  ZPOInadditionto specifyingthehandlerroutine,the establisherROcanalsospecify parametersthatwillbepassedtothehandler@O5ifthehandlerisactuallycalled.'Forexample:O ROUTINE&X(Y,Z)%= BEGINI EXTERNAL%ROUTINE z XH; LOCALz! L:& VOLATILE;i ENABLEz XH(L);...A END;; ! NJORoutineX establishestheroutineXHasitshandlerandWO specifiestheaddressofalocaldatasegment,L,tobepassedto7O5thehandlerwhenthehandleriscalled.B< O17.2.1CSyntax[= 1Oenable-0 declarationENABLE routine-name 8 < :( enable-actual,2... )"nothing 9 = ;O enable-actual 8 (< :own-name global-name2 forward-name local-name 9 (= ; O8 O<< O: routine-nameown-name' global-namet forward-name local-name 9 <= ;?name> O17.2.2C RestrictionsHO4Anenable-declarationmustappearonlyinthe outermost+Oblockofaroutine-definition..? HOOnlyoneenable-declarationcanappearinthe outermostROblockofaroutine-definition.((ThisdoesnotprohibitanestedLO5routine,aswellastheouterroutine,from containinganOenable-declaration.)$@  FOInBLISS-16and BLISS-32,aroutinethatcontainsanLOenable-declarationmustbedeclaredwithalinkage-attributeNO5thatisitselfdeclaredwitha linkage-typeasfollows:,theGOJSR linkage-typein BLISS-16,ortheCALL linkage-typeJOin BLISS-32;observethatthe predeclareddefaultlinkageOO> satisfiesthis restrictionineachcase.+Further,noexternal:O registersoroutput-registersare permitted.A ! NHOThe routine-namegiveninanenable-declarationmustbeQOthenameofaroutinedeclaredinaroutine-or bind-routine-O5 declaration.B NGOInBLISS-16and BLISS-32,thelinkage-attributeoftheIOhandler routine-namegivenintheenable-declarationmust8O5bethe predefinedlinkage-attributeBLISS.C NIOEachdatasegmentnamethatappearsasan enable-actualKO parameterinanenable-declarationmusthavethe volatile-5O5 attribute specifiedinits declaration.D ! `NOIfthehandlerroutinecan potentiallymodifyanydataseg-MOmentotherthanan enable-actualdatasegment(forexample,LO5adatasegmentwhoseaddressisgivenbythecontentsofGOan enable-actual parameter),thatdatasegmentmustbe2Odeclaredwiththevolatile-attribute.kE `AO17.2.3C SemanticsJO4Theenable-declaration establishesagivenroutineastheJOroutinetohandleany software-orhardware-detectedcon-POditionsthataresignaledduringthe executionoftheroutineLO= containingtheenable-declaration.)The executionofthees-RO tablisherincludesthe executionofanyroutinesthatitcalls,MOdirectlyor indirectly.*However,itmayormaynotinclude?OGthe executionofany handlers,as describedinGSection17.5.*E  ? F NJOThe enable-actual parametersgiveninthe declarationareMOthenamesofdatasegmentswhoseaddressvaluesarepassed:O5tothehandlerwhenandifitiscalled.BG  NOAn enable-actual parametercanbethenameofalocaldataHOsegment (declaredLOCALor STACKLOCAL)andifso,thatVO5datasegmentis implicitly initializedtoallzerobitsbeforethe,Ohandlerroutineis established.H gLOTheenable-declarationdoesnot,ofitself,callthegivenOhandlerroutine.mpI FO17.3C SignalingOU SignalingAU initiates conditionhandlingandthereby indicatesMOthata particulareventor conditionhas occurred.*YoucanQO explicitlygenerateasignalbycallingoneofthe executable-EO^ functionsSIGNALor SIGNAL_STOP.SuchsignalscanbeIO implicitly generatedbyhardware-detectederror conditionsJO(suchasanaccess violationor arithmetic overflow)andOOhcanbe indirectly generatedbyahandlerroutinerequestforO unwinding.J ! NTOAllsignalsidentifya conditionbymeansofavectorthatcon-ROtainsa conditionvalue.'Thevectorcanalsocontain additionalOO5valuesthatprovide auxiliary informationaboutthe condition.K ! #O17.3.1C ConditionValues O4A4 conditionvalue<4isasinglefullwordvaluethatencodestheUOidentityandseverityofthe condition.'Theseverityfieldisen-TOcodedinthe low-orderthreebitsandtheidentityfieldintheKO= remaining high-orderbits.+In BLISS-16,theidentityfieldVOconsistsofall13ofthe high-orderbitsofthe16-bitword.'InSOBLISS-32theidentityfieldconsistsofthenext25bits(abovePOGtheseverityfield),andinBLISS-36consistsofthenext29OObits,leavingthe high-orderfourbitsforotherpurposesinOboth dialects.L UJOWhen accessinga conditionvalueto determinewhichcon-QOditionisbeing reported,itis necessarytoexamineonlytheLO5identityfield, excludingthe remainder.)Thesame conditionOOidentityvaluemaybesignaledwith differentseverityvaluesOat differenttimes.M  NNOAmoredetailed descriptionof conditionvaluerepresentationOisgiveninSection17.6.1,1alongwithexample declarationsforDO5 convenientlycreatingand accessing conditionvalues.*M ? N #O17.3.2CExplicitSignalsLO4BLISSprogramscan explicitlygenerateasignalbycallingFOoneoftheexecutable-functionsSIGNALor SIGNAL_STOP.6OThese functionsaredefinedasfollows:OO %%O SIGNAL(condition-value)iP ??O SIGNAL(condition-value, parameter,...)Q  aQO Initiates conditionhandlingforthe condition indicatedbytheKOgivencondition-value.*If parametersaregiveninadditionPO5tothecondition-value,thesevaluesareincludedinthesig-Onalvector(seemSection 17.4.2.1)-passedtoeachhandlerthatisOcalled.*Q mP?k .R QOThefunctionreturnsifandonlyifahandlerforthecondi-IOtionrequests continuation.*(In BLISS-32,theVMSsystemMO5 establishesadefaultcatchallhandlerforallsignals;seeOSection 17.6.4.2.)*R OP?  S NNOThefunctionreturnsavalueifandonlyifahandleras-DOsignsareturned-valuetothe mechanismvector(seeO5Section 17.4.2.2);05 otherwise,thevalueis undefined.*S O?n TT **O SIGNAL_STOP(condition-value)nU DDO SIGNAL_STOP(condition-value, parameter,...)V  YQO Initiates conditionhandlingforthe condition indicatedbytheJOgivencondition-value.*Acondition-valuewiththeseverityLO5fieldreplacedbythecodeforsevereerror(STS$K_SEVERE, OseeSection17.6.1);isincludedinthesignalvectorpassedtoQOeachhandlerthatiscalled.(If parametersaregiveninaddi-QO>tiontothecondition-value,thesevaluesarealsoincludedinNOthesignalvectorpassedtoeachhandler.)Thefunctiondoes Onotreturnavalue.*V P? RW (GOSIGNALand SIGNAL_STOPare identicalintheiractions,OOwithtwo exceptions.(First,ifSIGNALiscalled,controlmayNO5 eventuallyreturntothecaller dependingontheactionsofKOthehandler,whileif SIGNAL_STOPiscalled,controlwillMOnotreturntothecaller.,Second,thecondition-valueofaHO> SIGNAL_STOPcallischangedtoindicateasevereerrorMOwhilethecondition-valueofaSIGNALcallisusedwithoutO modification.FX OO InformationcanbereturnedfromahandlertoasignalerifPOthesignalerincludesa parameterinthecalltoSIGNALthatLO5givestheaddressofadatasegmentwherethe information1Oshouldbeassignedbythehandler.Y  #O17.3.3CImplicitSignalsKO4Signalsmaybe generatedbythesysteminresponsetoaLOhardwaredetected conditionoran operatingsystemdetectedMO condition.)Forhardware conditions,thesystemusesthein-LO= formation availablefromthehardwareand simulatesacallLOtoSIGNALasthoughSIGNALwerecalledatthe instructionQOthatcausedtheerror(eitherbeforeorafterthe instruction,JOG dependingonthetargetsystemandthetypeofhardwareRO condition).' Thereafter, processingisthesameasfor explicitlyO generatedsignals.Z ! t!O17.3.4CUnwindSignalsPO4Thehandlerofa conditionmaycausetheroutinethatgener-ROatedasignaltobe terminated.'Infact,manyroutinesmaybe6O terminatedinthisabnormalway,called unwinding.(DuringLO= unwinding,thehandlerofeachroutinethatisbeingter-OOminatediscalledwitha conditionvalue indicatingthattheNO establisherroutineisbeing terminated.)This particularcon-!OGditionistermedthe*G unwindsignal#GGandsomespecialrulesOapply.u[ KKOUnwindsignalsarefurther discussedinthenextsection.T?\  2,O17.4CCondition-HandlingRoutinesLOUAcondition-handlingroutineisaroutinethatisdeclaredLObysomeotherroutinetobeahandler.-ThepurposeofaKOcondition-handlingroutineistoacceptanddeal appropri-LO^atelywithsomesetofsignaled conditionsthatmayoccurMOduringthe executionofthe establisher.-Innearlyallre-UOspects,ahandlerroutineislikeanyotherroutine:'itcancallPOhother routines,callthe operatingsystemforservice,andsoVOon.'Itcan establishahandlerforitselfandinsomecasesthat+Ohandlermightevenbeitself.] WUOAhandlerisspecialinthatitiscalledinresponsetocondi-ROtionsthataresignaledbyother routines.)ItisunlikelythatPO5aroutinewrittenforuseasahandlerwouldeverbecalledJO directly.+Becausehandlersarecalledbysystem software,OOandnotdirectlyby user-writtencalls,theymustconformto9O>system-defined restrictionsand conventions.^ ! tpLOAhandleriscalledbytheCHFwiththreeactualparame-POters.*Thefirst parameteristheaddressofavector,termedNO5thesignalvector,thatcontainsthe parametervaluesspeci-KOfiedinthecalltoSIGNALor SIGNAL_STOPthat generatedPOthetracesignal.'(In BLISS-32, additionalvaluesaresuppliedMO>aswell.)*Thesecond parameteristheaddressofasecondJOvector,termedthe mechanismvector,thatcontainsvaluesKOprovidedbytheCHF software.*Thethird parameteristheROHaddressofathirdvector,termedtheenablevector,thatcon-JOtainsthe enable-actual parametervalues specifiedinthePOenable-declarationoftheroutinethat establishedthehandler.OORThus,ahandlerhas available informationfromboththerou-ROtine generatingthesignalandtheroutinethat establishedtheNOhandler,aswellascertainsystem information,to determine.O[howtodealwiththe condition.7_  POAhandleriscalledasaresultofeverysignalthatoccursQOduringthe executionofits establisherandthatisnotdealtLO5withbyanotherhandler.,ThefirstresponsibilityofeveryOOhandleristoexaminethe conditionvalueofeachsignaltoTO determinewhetherthesignalistobedealtwithatall.)ItisPO>quiteunusualforaspecifichandlertoberelevanttoevery-Opossiblesignalthatcanoccur.` NQOIfasignalisnottheunwindsignal,ahandlermustrequestROtheCHFtofurtherprocessthesignalinoneofthe followingO5ways:a @ ` ?Continuetheroutinethat generatedthesignal. `O NOResignalthesamesignal,orpossiblyamodifiedsignal,tosomeotherhandler. `' 'Unwind.b  wLOThenextthreesectionsdiscuss conditionhandlingroutinesTOindetail.(Thefirst specifiesthe restrictionsthatmustbemetLO5byeveryhandlerroutine.(Thesecond describestheparame-POterstoahandlerroutine.)Thethird specifieshowahandler;Oroutinerequestseachofthethreeoptions.c  O17.4.1C RestrictionsFO4InBLISS-16and BLISS-32,acondition-handlingroutineGOmustbedeclaredwiththe predeclaredlinkage-attributeOBLISS(seeSection13.5).5ObservethatthiswillbethedefaultLO=unlessanotherdefaultis establishedbyaLINKAGEswitch-Oitem(seeSection18.2)!or module-switch(seeSection19.2).*c ?*c Y?B *c Y? d fIOAcondition-handlingroutinemustbedeclaredwiththreeOformal parameters.e ! GOAcondition-handlingroutinemustnothavetheNOVALUEQO attributeunlessitalwaysrequests unwindingforeverysignal.f LOA conditionhandlingroutinemustfetchfromorassigntoOOdatasegmentsthatsatisfyoneofthe following requirements:g n ` MAdatasegmentwhosescopeislimitedtothebodyofthe.( conditionhandlingroutineitself ` GAnelementofoneofthevectorswhose addressesare2passedtothehandleras parameters ` FAnydatasegmentthatisdeclaredwiththe volatile- attributeth ! `JO17.4.2C ParametersOO4A conditionhandlingroutineiscalledwiththree parameters.MOEach parameteristheaddressofacountedvectorcontain--Oingtherelevant information.)A countedvectorisavectorofOO= fullwordsinwhichthefirstelement(withindexvaluezero)POcontainsthenumberof additionalelementsinthevector.'TheROfirstelementisalwayspresentandcontainsthevaluezeroif@OGthereareno additionalelementsinthevector.i bMOThe followingBLISScodefragmentshowsatemplatefortheRO declarationofahandlerroutine.'ThistemplateisusedinthePO5 remainderofthissectioninthe discussionofeach parameterCOofahandlerroutine.&Thetemplateisasfollows:0O ROUTINE& HANDLER(SIG,%MECH,%ENBL)%=Z BEGIN  MAP/z SIG:%REF&VECTOR,!&Signal%vector3z2 MECH:&REF%VECTOR,!& Mechanism%vector0zz ENBL:&REF%VECTOR;!&Enable%vector BIND,z  COND%=%SIG[1]:&CONDITION_VALUE,zR RETURN_VALUE%=&MECH  [ %BLISS16(1)) %BLISS36(1)q %BLISS32(3)  ];  ...I END;j  \9OInthis template,themap-declaration(see`Section10.10)AO associatestheREFVECTORstructure-attribute(seeO5Section11.10.1)55witheachoftheroutineformalnamesLOfor referencingofeachvectorwhoseaddressispassedto4Othehandler.,Thebind-declaration(seeSection14.3) de-MO>finesnamesfortwoofthemostcommonlyaccessedelementsCOofthepassedvectors.,CONDITION_VALUEisthenameKOofamacrowhose expansiongivesthe attributes appropri-NOHatefor accessinga conditionvalue.-Its definitionispre-OsentedinSection17.6.1.-The predeclaredmacros %BLISS16,6O %BLISS32,and%BLISS36are describedinuSection16.2.4.*j `F?*j O?*j ?+*j c? *j u? k ! *O17.4.2.1BTheSignal ParameterEO)Thefirst parameter,SIG,containstheaddressofam) signalvec- O torP,whichisacountedvectorthatcontainsthevaluesoftheIOactual parametersofthecalltoSIGNALor SIGNAL_STOP.MO3In BLISS-32,theCHFaddstwovalues followingthosegivenFOintheSIGNALor SIGNAL_STOPcall:*thehardwarepro-IOgramcounter(PC)andtheprogramstatuslongword(PSL)SO<ofthenext instructiontoexecuteincasethehandlerrequestsRO continuationofthe signaler.(Inthecontextoftheabovetem-NOplate,.SIG[n]isthenthactual parametervalue,where,inROF particular,.SIG[1]isthe conditionvalue,.SIG[0]isthenum-LOberofactual parameters,andCONDistheaddressoftheO conditionvalue.l  QOForexplicitsignals,theactual parametervaluesaregivenbyFOthe parametersofthecalltoSIGNALor SIGNAL_STOP.m NMOForimplicitsignalsandtheunwindsignal,theactualpa-MOrametervaluesaredefinedbythesystem.)ThesevaluesandBO5their encodingsarenot describedinthismanual.n -O17.4.2.2BThe Mechanism ParameterGO)Thesecond parameter,MECH,containstheaddressofaO mechanismvector:,whichisacountedvectorthatcontainsKOthevaluesof parametersprovidedbytheCHF.Theseval-NO3uesprovide specializedsoftwarestatus informationabouttheLOsignalbeing processed.,Oftheseveralvaluesthatmaybe?Opresent,onlyoneis describedinthismanual.o ! JOTheelementofthe mechanismvectorwithaddressMECH[1]JOinBLISS-16and BLISS-36,orMECH[3]inBLISS-32intheKO5 preceding template,isadatasegmenttowhichahandlerQOroutinecanassignavaluetobeusedasareturned-value.(AROhandlercanassignavaluetothislocationintwo situations.p OOWhenahandlerrequests continuationofthesignalerroutine,SOtheCHFusesthecontentsofthislocationasthereturnvalueOO5oftheSIGNALcall.*By assigningtothis location,thehan-POdlercan determinethereturnvalue.(IfthehandlerdoesnotKOassigntothis location,thereturnedvalueis undefined."q  LOAfterunwind processing,theCHFusesthecontentsoftheNOreturnvaluelocationinthe mechanismvectorasthereturnOO5valueofthelastroutinetobe terminated.+By assigningtoPOthis location,thehandlercan determinethe establisher'sre-OOturnvalue.)Bythismeans,the establisherroutinereturnsaRO> meaningfulvaluetoitscallereventhoughitis terminatedbyOOtheCHF.Ahandlerforany establisherthatreturnsavalueMO(thatis,doesnothavetheNOVALUE attribute)mustassignNOHan appropriatereturnvaluetothereturnvaluelocationin4Othe mechanismvectorduring unwinding.Or  U%*O17.4.2.3BTheEnable ParameterGO)Thethird parameter,ENBL,containstheaddressofan 7) en-O ablevectorG,whichisacountedvectorthatcontainsthevaluesJOofthe enable-actual parametersoftheENABLE declarationRO3ofthe establisherroutine.)Inthecontextoftheearliertem-MOplate,the expression.ENBL[n]isthenth enable-actualpa-LOrametervalue,and.ENBL[0]isthenumberof enable-actualO< parameters.s / KOTheenable-declarationrequiresthateach enable-actualpa-OOrametermustbetheaddressofadatasegment.' Consequently,PO5withinthehandlerroutineitmay frequentlybe convenienttoObind(5Section14.3)9namestotheseaddressvalues,asintheO following:Ok BIND PARAM1&=% .ENBL[1], XYZZY%=% .ENBL[2];*s 5P?+t aIO Enable-actual parameterscanbethenamesoflocaldataKOsegmentsdeclaredinthe establisherroutine.-Ifarecur-OO5siveroutine establishesahandler,thesamehandlerwillbeTOusedforallactivecallsofthe recursiveroutine.)Ifthehan-OOdleriscalledand resignalsthe condition,thesamehandlerOO>is repeatedlycalledforeachactivecallofthe establisherNOroutine.,Ineachcase,theaddressofalocaldatasegmentPOnamepassedtothehandleristhe appropriateaddressinthe9OH respectiveactivecallofthe establisher.u "O17.4.3CHandlerOptionsNO4Forevery conditionotherthantheunwindsignal,ahandlerOOmustrequestoneofthree subsequentactionsfortheCHFto0Operformafterthehandlerreturns.v J`1.:Thehandlercandeal appropriatelywiththe conditionJ(andthencausetheroutinethat initiatedthesignalto continue .%w Kb Continuingtheroutinethat initiatedthesignal completes) processingofthe condition.`:2.:ThehandlercanB: resignal-w:usingthesame conditionvalue,)orpossiblyamodifiedone.cx ! 9Ib Resignalingwiththesame conditionvalueisthenormalJresponsefora conditionthatthehandlerdoesnotdealEwith.) ResignalingcausestheCHFtoresume searchingBlforahandlerthatwilldealwiththe condition.J`3.:Thehandlercandeal appropriatelywiththe conditionLDandthen terminatethe executionoftheroutinethatgen-Meratedthesignalaswellastheotherroutinescalledbythe establisherbyW unwinding .:y Gb Unwindingcausesaspecialunwindsignaltobegener-Kated.)Thehandlersofallroutinesthatarebeingtermi-Jnatedwillbecalledwiththis condition.* Unwindingalso4l completes processingofthe condition.z nPOTheseoptionsarenot availablewhenahandleriscalledforOtheunwindsignal.{ kMOThemeansof requestingtheseactionsare presentedintheO following sections.g| L= O17.4.3.1B ContinuationLO)Ahandlerrequests continuationoftheroutinethatgener-VOatedthesignalby returningatruevalue(lowbitsetto1)toHOtheCHF.Thehandlermustnotalsocall SETUNWIND,asO3 describedin 3Section 17.4.3.3.*| ? }  NOAfterthehandlerreturnstotheCHF,theCHFreturnsfromPOthecalltoSIGNALintheroutinethat generatedthesignal.D~ LOAhandlermustnotrequest continuationforasignalthatGOwas generatedbycalling SIGNAL_STOP.Thatis,ahan-SO5dlermustnotrequest continuationiftheseverityfieldofthe4Ocondition-value indicatessevereerror.+ O17.4.3.2B ResignalingKO)Ahandlerrequests resignalingby returningafalsevalueTO(lowbitsetto0)totheCHF.Thehandlermustnotalsocall'O SETUNWIND,as describedinSection 17.4.3.3.* ?  NOAfterthehandlerreturnstotheCHF,theCHFsearchesforAOanotherhandlerroutinetocall,as describedinSection17.5.* ?   aJOWhen resignalingis requested,thesamesignalvectorisPOpassedto subsequent conditionhandlersthatarecalled.'Thus,NO5theseverityandthe conditionidentificationcanbechangedMOwhenthehandlerassignsnewvaluestothe conditionvaluePOelementofthesignalvector.+If conditionhandlingisiniti-IO>atedbya SIGNAL_STOPcall,however,theseverityfieldNOissettosevereerrorbytheCHFeachtimeahandlerisOOcalled.( Consequently,theseverityfieldcannotbechangedby%OHahandlerinthiscase.  WHOChangingthe conditionvalueand resignalingisdiffer-HOentfrom generatinganewsignalbycallingSIGNALorLO5 SIGNAL_STOPinthehandler.(Inthelattercase, processingQOofthefirstsignalis suspendeduntil processingofthesec-OOondsignalis completed;then processingofthefirstsignalO>resumes. O17.4.3.3B UnwindingHO)Ahandlerrequests unwindingbycallingthe executable-HOfunction SETUNWIND.Thefunctionisdefinedasfollows: O SETUNWIND()"O] SETUNWIND( parameter) ](e]32Only0O SETUNWIND( parameter, parameter) (e32Onlyi  ?JORequeststheCHFtoinitiateunwind processingaftertheLO currently executinghandlerreturnstotheCHF.(InBLISS-NO532,thetwooptional parameterscanbeusedtospecifytheOOroutinelevelatwhichtheunwindwillstopandtheaddressKOwherenormal executionistoresume.(These parametersareQO>not describedinthismanual.)'ThefunctiondoesnotreturnaJOvalueinBLISS-16or BLISS-36,andreturnsa VMS-defined&Ostatusvaluein BLISS-32. lHOWhenahandlerrequests unwindingthereturned-valueof$Othehandlerisignored.b 8OOThehandler specifiesthevaluetobeusedasthe returned-QOvalueofthe establisherby assigningthe appropriatevaluein1O5the mechanism parametervector(see5Section 17.4.2.2)5when=Othehandleriscalledfortheunwindsignal.* ?n   WROInthedefaultcase,thatis,whenno parametersaregiveninIOthecallto SETUNWIND,allroutinesbetweenandinclud-PO5ingtheroutinethat generatedthesignalandthe establisherLOofthehandlerare terminated.) ExecutionresumesaftertheQOcalltothe establisherasthoughthe establisherhadreturnedO>inthenormalway.% CO Unwindingdoesnotstart immediatelywhen SETUNWINDPOiscalled.(ThecallsimplyadvisestheCHFthat unwindingisLO5 requested.(Whenthehandler eventuallyreturnstotheCHF,O unwindingbegins.  WNODuringunwind processing,thehandler,ifany,ofeachrou-ROtinebeing terminatediscalledwitha conditionvalueindicat-QO5inganunwindisin progress.)Inthedefaultcase,wherethePO establisherisoneoftheroutinesbeing terminated,thehan-ROdler requestingtheunwindwillitselfbecalledasecondtime+O>toprocesstheunwindsignal.^ 4OOA conditionhandlingroutinecancallotherroutinesaspartOOofits processingandtherequestfor unwindingcanbemadeHO5fromanysuchroutine.*Thecallto SETUNWINDneednotNObemadeinthetopmostroutinedirectlycalledbytheCHF. ^NOItisinvalidtorequest unwindinginanyofthe followingOcases:  ` 5 Conditionhandlingisnotin progress. `O 8OAnunwindrequesthasalreadybeenmade. ` 7Unwindsignal processingisin progress.;'VB  w,%O18.2CSwitches-DeclarationsNOUAswitches-declarationallowsyoutogivethecompileraddi-QOtional informationaboutthedesiredinterpretationofablock.POInthisway,eachblockcanbegiven individual treatmentbyO^the compiler.C WOOForexample,ablockthatisstillinthe debuggingprocessIOcanhaveaswitches-declarationthatcausesthecompilerIO5toprovide listings,error messages,andmacro expansionROtracesforthatblock.)Or,ablockinaninnerloopcanhaveKOaswitches-declarationthatcausesthecompilertoperform!O>specialoptimizations.D ! rQOAnexampleofaswitches-declarationisgiveninthe followingOblock:Oa BEGIN O ... BEGIN9 SWITCHES%NOERRS;  ... END; O ... OY ENDE  NPOTheinnerblockhasaswitches-declarationthat specifiesthatMOnowarningorerrormessagesaretobe displayedforthatO5block.RF (?OSome switch-items,suchasADDRESSING_MODE,sim-MOplyset attributedefaultsforthe remainderoftheblock,QO5andthushaveonlyanindirecteffect,thatis,throughotherKO declarationslaterintheblockthattakethose defaults.:G KOIngeneral,theactionsorinterpretations requestedbyaJOswitches-declarationtakeeffectonlyafterthe occurrenceMO5ofthe declaration(fromthe viewpointofcode generation).LO Therefore,inthenormalcasewheretheeffectisdesiredNO throughouttheblockin question,thecorrect positioningofQO>theswitches-declarationisatthevery beginningoftheblockCO(thatis,priortoanycode-producing declaration).pH MFO18.2.1CSyntax.O4SYNTAX:4ClicktodisplaySyntax.*H OOI uK K3OThestructure-attributeisdefinedinSection11.4.*K M?L O18.2.2C Restrictions:O4AnADDRESSING_MODEswitchcanhavenomoreBOthanoneEXTERNAL mode-specandnomorethanone3O NONEXTERNAL mode-spec (BLISS-32only).M  NJOThe linkage-nameinaLINKAGEswitchmusteitherbeex-OOplicitlydeclaredasa linkage-nameina containingblockor1O5mustbea predeclared linkage-name.N BOThestructure-name inthe structure-attribute ofaCO STRUCTUREswitchmusteitherbe explicitlydeclaredJO5asastructure-nameina containingblockormustbea%O predefinedstructure-name.*O  O18.2.3CDefaultsUO4Ifa switch-itemisnot specified,thesetting establishedbytheHO compilationcommandspecification,bythe module-headorIObyaswitches-declarationinanouterblockisassumed.P  [MOIfanull language-listappearsinaLANGUAGEswitch(thatJOis,LANGUAGE( )),thesingle language-name correspond-PO5ingtothecompilerinuseisassumed.*ThisimpliesthatnoOOtransportabilitycheckingistobe performedwithinthescope%Oofthe containingblock.Q NCOIfthekeywordCOMMONappearsinthe language-listKOoftheLANGUAGEswitch,itis equivalenttotheexplicit8O5 specificationofallthreelanguage-names.R O18.2.4C SemanticsOO4The switch-itemsspecifyactionstobetakenbythecompiler#Oin processingablock. S NPOInadditiontothe following description, additional discussionSOofthecompileractionsfortheseswitchescanbefoundinthe?O5BLISSusermanualforthe appropriate compiler.T  'O18.2.4.1BOn-Off-Switch-ItemsJO)Eachon-off-switch-itemhasa negation,whichconsistsofMOthe switch-itemprefixedbythe charactersNO.ThenegationNOofa switch-item indicatesthatthe associatedactionshouldOO3notbetaken.(Theaction associatedwitheach switch-itemis*Ogiveninthe followinglist:VU  l, OO Switch-ItemJAction OObERRSD4bPrintwarningsanderrormessagesfromthecompiler4onthe terminal.@O)OPTIMIZEPerform optimizationacrossmarkpoints.OSAFE?4Ignorecomputed addressesindoing optimization.JOUNAMESGenerateuniquenamesforOWN variables, nonglobalC4jROUTINEnames,andlabelswhen producingalisting&4thatistobe assembled. O2ZIP642Optimizetimeattheexpenseofspace. OM,V (O18.2.4.2BSpecial-Switch-ItemsEO)Thespecial-switch-itemsprovide additional informationLOabouttheblockbeing compiled.+Theaction associatedwithIOeachspecial-switch-itemisgiveninthe followinglist:m W  C  OO Switch-ItemAction OObADDRESSING_MODE (mode-spec,... ) b( bBLISS-32Only2 Establishthegiven addressingmodes1astheaddressing-modedefaultsfor4K subsequent declarationsinthecurrent/block.%AnEXTERNAL mode-specsup-1pliesthedefaultforEXTERNALand-3EXTERNALROUTINE declarations.&A* NONEXTERNAL mode-specsupplies.thedefaultforFORWARD,FORWARD4ROUTINE,andPSECT declarations."(This6idefaultis ineffectiveunlessaprogram:sectionisdeclaredwithintheblock.)#The7addressing-mode attributeis describedinQSection9.13.OLANGUAGE(language-list)9 Establishthegivenlistoflanguage-names7forthe remainderofthecurrentblock.2fPerformtransportability checking,if5 applicable,forthe combinationofdi-=alects specifiedorimpliedinthelist.#SeeOSection18.2.5 [OandOAppendixCpOforfurther information.OLINKAGEc(linkage-name)6 Establishthegiven linkage-nameasthe8c linkage-namedefaultforthe remainderof6thecurrentblock.#This linkage-nameis9usedasthelinkage-attributeofanysub-9L sequentroutine declarationinthecurrent6 blockthatdoesnotspecifyalinkage-  attribute.Oa LIST  (list-option,o ...  )=a  Establishthegiven list-optionsfortheout-< putlistingofthe remainderofthecurrent< block.!The list-optionsare describedinthe I  following subsection.O  STRUCTURE (structure-attribute)8  Establishthegivenstructure-attributeas9 thedefaultstructure-attributetobeused6^ in subsequentdefault-structure-references5 withinthecurrentblock(seeSections 11.4 6 and 11.8).$ Ifthegiven structure-5F  attributeisnull,thenall subsequent6 default-structure-referencesintheblock areinvalid. O *W h43*W 4] *W sD *W  w4*W  w4X !  O18.2.4.3B List-OptionsRO)TheoutputlistingproducedasaresultofaBLISS compilation8Ocancontainthe followingseparateparts:Y Sourcelisting((Macro expansionsandtraces LibraryusagetracesObjectcodelistingZ ! aPOTheLIST switch-itemcontrolsthepartsoftheoutputlistingSOtobeproduced accordingtothesettings specifiedbythelist-IO5options.)Thefirsttwo list-options,SOURCEandREQUIRE,0Ooperateonaspecialcounter,the" sourcelistingcounter.)TheSOcounteris initiallysetto1,andsourcetextislistedwhen,RO>andonlywhen,thevalueofthecounterisgreaterthanzero.EOThustheSOURCEandREQUIRE list-optionscontroltheVOlistingofthesourcetextfromfiles specifiedinthe compilation2OHcommandandbyREQUIRE declarations.[ hNOTheaction associatedwitheach list-optionisgivenintheO followinglist.M\ ! # OO List-OptionAction OFObSOURCE Incrementsthesourcelistingcounter.$NOSOURCE4b decrementsthesourcelistingcounter.QO)REQUIRECausesthesourcelistingcountertobeleft unchangedCbwwhenafile specifiedbyaREQUIRE declarationis=bopenedorclosed.% NOREQUIREcausesthesourceEblistingcountertobe decrementedwhenafilespec->b_ifiedbyaREQUIRE declarationisopened,and3b incrementedwhenthefileisclosed.LO&EXPANDListthelexemestreamthatistheresultofeachbtmacro expansion.OTRACEBbTracethe expansionofmacros,printingeachlex-Ab;emestreamproducedduringthe expansionandtheBbfinallexemestreamproducedasasresultoftheb expansion.IOPLIBRARYTracetheusageofnameswhose declarationsare1bobtainedfromlibrarybinaryfiles.OOBJECTEbListtheobjectcode.'TheformatofthelistingisAbe determinedbythesettingsofthe followingfourb switches.UO,ASSEMBLYListtheobjectcode instructionsinaformsuitableforby assembly.POSYMBOLICListtheobjectcode instructionsinaformsuitableAbA forinterpretationbythe programmer.$Thisformat@b usessourceprogramsymbolswhereverpossiblein*b theobjectcode instructions.AOU BINARYListthebinarytextoftheobjectcode.MO  COMMENTARYList commentaryproducedbythecompilerconcern-Cb ingtheobjectcode generated.#Atpresent,commen-Abj taryislimitedtoa line-numbercross-reference. O $] ! jO18.2.5C DiscussionFO4TheLANGUAGEswitchisanaidinthe developmentofMO transportable programs.&Asamodule-switch,itdeclaresyourNO intentiontocompilethemoduleunderseveral differentcom-SO=pilers,foruseonthe correspondingtargetsystems.'ItrequestsNOthatthecompileranalyzethemodulefromthe standpointofFOtransportability.-Forexample,withtwocompilernamesFOG specifiedintheLANGUAGEswitch,both compilerswillIOcheckforandreportthe occurrenceofcertainmachine-MO sensitivelanguagefeaturesthatmayposeproblemswhenthe:OQmoduleis processedbytheother compiler.^ ! WMOUsedinaSWITCHES declaration,thisswitch essentiallyal-ROlowsyoutoturnofftransportabilitycheckingwithintheblockHO5 immediately containingthe declaration.+Forexample,theUOneedforthis capabilityariseswhereagivenblockisnotcodedIOtransportably,is inherentlymachine-orsystem-dependent,=O>andmustbemodifiedforeachtargetsystem._  NPOThespecificlanguage constructsthatarecheckedforagiven6Osetoftargetsystemsare describedinAppendixC.kBriefly,DO5these constructsfallintothe following categories:*_ O ` ]~ ` KAll syntacticfeaturesthatarenotcommontothetargetK(set.*Forexample,ifallthreetargetsystemsarespeci-Nfied,thenthe occurrenceofanydialect-specificfeatureis reported. `Y EYMost syntacticfeaturesthat,althoughcommontothe#targetset,arelikely incertainforms'tocausetrans-J  portabilityproblems(forexample,string-literalsusedas cprimary expressions). ` JCertaindialect-sensitiveelementsthatmayoccurinoth-K:erwisevalid constructs;forexample,field-selectorvaluesFthatare compile-timeconstant expressionsarecheckedDatcompiletimefor conformancetothe restrictions>Dimposedbythemost restrictivetargetsystem.a ajEOIngeneral, the checks performedinresponsetotheDOLANGUAGEswitchalertyoutolanguagefeaturesthatLO5mostoftenrequirespecial attentionwhen transportingpro-JOgrams.*Suchcheckingcannot,however,identifyorresolveNOalloftheproblemsthatmaybe encountered.)In particular,LO>the functional equivalenceofaprograminseveraldiffer-NOent environmentscannotbeassured(atcompiletime)inallMOcases,eventhoughtheprogramcompiles sucessfullyineachOH environment.*b } QOEachBLISSusermanualcontainsasectionon``TransportabilityNO Guidelines''.+Astudyofthissectionand frequent,parallelKO5 compilationsofthemoduletobe transportedarestronglyO recommended.1 c ! )%O18.3CBuilt-In-DeclarationsLOUCertainnamesare predefinedinBLISS.Someoftheprede-QOfinednamesare predeclared,sothattheycanbeusedwithoutOObeingdeclared explicitly;anexampleisthenameABS,whichNO^isthenameoftheabsolute-value function.'Other predefinedKOnamesarenot predeclared,butmust,instead,bedeclared/OBUILTINbeforetheycanbeused.Ud  +NOTheclassificationofagiven predefinednameas predeclaredVOorbuilt-inispartoftheBLISSlanguage definition;itisgiven O5in5AppendixA. particular,allnamesofmachine-specific-functionsarebuilt%Oin;thesearelistedinKAppendixD.*d Or *d KZO Be O18.3.1CSyntaxf vz9Obuilt-in-declarationBUILTIN built-in-name,... ;O] built-in-nameK]nameg O18.3.2C RestrictionsGO4Eachnameinabuilt-in-declarationmustbelistedinOAppendixA9undertheclassification ``built-inname''.*g OOOr Ch ! KOAbuilt-in-declaration containinga predefined register-nameO(seeSection10.7.4)2ora predefinednameofalinkage-O5function(see15Section13.6).5mustbe containedinaroutine-O declaration.*h ?*h 1?i O18.3.3C SemanticsKO4Abuilt-in-declarationinformsthecompilerthatthenamesIOlistedareusedasbuilt-in-namesinthecurrentblock.j WJOThefull definitionofeach built-in-nameisgivenelse-MOwhereinthe definitionofBLISS.Forexample,inBLISS-16HO5the built-in-namePCisa register-nameandisdefined OinSection10.7.4.4Foranotherexample,the built-in-nameFOBICPSWisaVAXmachine-specific-functionnameandisO>definedinthe!R> BLISS-32UserManual.*j P?FV*  nO19.2CModule-SwitchesJOUModule-switchesallowyoutocontrolsomeaspectsoftheJO compiler's treatmentofthemodule.)BecauseyouknowtheNOmodule'sstageof developmentanditsintendeduse,youcanMO^useswitchestocause additional operationstobe performedKOandtosuppressother operations.)Considerthe developmentLOofatypicalmodulefromsyntaxcheckingthrough debuggingOOhinto production.'Atthe beginning,themoduleisasfollows:?O MODULE%M1%(IDENT&=%'0001',%NOCODE,& LIST(TRACE),'5 LANGUAGE(BLISS16,BLISS32))&=O} BEGIN O ... O  ENDOU ELUDOM ! ktIOInthisexample,themodule-switchesdirectthecompilerGOtoperformonlyasyntaxcheck(NOCODE)andtotraceCO5the expansionofmacros(LIST(TRACE)).TheLANGUAGESOswitch signifiestheintenttocompilethemodulewithboththeKOBLISS-16andtheBLISS-32 compilers.(ItrequeststhattheMO>compiler currentlyinusecheckforandreporttheappear-MOanceofdialect-sensitivelanguagefeaturesthatmightcauseOOproblemsin transportingthemoduleacrossthe specifiedsys-MOHtems.)Switchesthatarenotgiven explicitlyare determinedMObythedefaultrules.*Forexample,theswitchERRSisas-MOsumedbydefaultand thereforethecompilerprintswarnings3ORanderrormessagesonyour terminal.  HOLater,whenthemoduleisbeing debugged,themodule's5Oswitchesarechangedtothe following:@Oa MODULE%M1%(IDENT&=%'0005',%DEBUG,% NOOPTIMIZE)%=O BEGIN O ... O9 ENDO ELUDOM) ! MOInthisversion,themodule-switchesdirectthecompilertoQOpreparethesymboltableandthelinkagesrequiredforusebyOO5adebuggerandtoomitcertainkindsof optimizationbytheIOcompilerofthe generatedobjectcode (NOOPTIMIZE).WhenOOthemoduleisreadyfor production,theswitchesarechangedO>asfollows:+O MODULE%M1%(IDENT&=%'0203')%=O  BEGIN OS ... O ENDO ELUDOM NMOInthisversion,alltheswitchesexcepttheidentificationKOswitchareomittedbecausethedefaultrulesareoriented(O5towarda productionmodule.B O19.2.1CSyntax  %O module-switch0{ on-off-switch|special-switch}O on-off-switch 8 > < [> :CODE|NOCODEZDEBUG|NODEBUGERRS|NOERRS!OPTIMIZE| NOOPTIMIZESAFE|NOSAFENUNAMES|NOUNAMESZIP|NOZIP 9 > = [> ;OQspecial-switch 8 |< :  common-switchFBLISS-16-switchBLISS-32-switchBLISS-36-switch 9 |= ; |(16Only |Q(Q32Only |(36OnlyO( common-switch B8 > < > :!IDENT= quoted-string'(LANGUAGE( language-list,(... ()%eLINKAGE( linkage-name)!LIST( list-option,... ^) STRUCTURE)({structure-attribute})6Y{nothing}MAIN= routine-name0OPTLEVEL={0|1|2|3}# VERSION= quoted-string B9 > = > ;OP language-list P 8  <  :^ COMMON language-name, ... nothing OP 9 O = O ;O4 language-name-4 {BLISS16|BLISS32|BLISS36}O list-option l 8  > D< > : SOURCE|NOSOURCEX REQUIRE| NOREQUIRE EXPAND|NOEXPAND TRACE|NOTRACELIBRARY| NOLIBRARYKOBJECT|NOOBJECT!ASSEMBLY| NOASSEMBLY!SYMBOLIC| NOSYMBOLICBINARY|NOBINARY%? COMMENTARY| NOCOMMENTARY >l 9 > > >D= >> >; O[n2 linkage-nameo routine-name H[o8nameOo16Only /o)Obliss-16-switch n(ADDRESSING_MODE(mode-16), ENVIRONMENT(environ-16-option,... [) oOmode-16# {ABSOLUTE|RELATIVE}Oenviron-16-option/{EIS|NOEIS|LSI11|T11|PIC|ODT}O 32Only / )Obliss-32-switch%ADDRESSING_MODE (mode-spec ,... &)O mode-spec nEXTERNAL=mode-32! NONEXTERNAL=mode-32 oO*mode-32 *8 < :GENERALWABSOLUTE LONG_RELATIVE WORD_RELATIVE '*9 '= ';O36Only /)Obliss-36-switch(KADDRESSING_MODE(mode-36)"ENTRY( global-name,6... )# ENVIRONMENT (environ-36-option,k... )?OTS= quoted-string&| OTS_LINKAGE= linkage-nameOomode-36%o {INDIRECT| NOINDIRECT}Oenviron-36-option 8 < p: cpu-optionmonitor-option ots-optionD stack-option 9 = p;O cpu-option/{KA10|KI10|KL10|KS10|EXTENDED}O monitor-option! {TOPS10|TOPS20}O! ots-option !n! BLISS10_OTS! BLISS36C_OTS !oO" stack-option "STACK= segment-name O$8 Ow$< O$:$ global-nameZ$ linkage-name$ segment-name ^$9 ^w$= ^$;$name3O%Thestructure-attributeisdefinedin%Section11.4.* ]%? wO19.2.2C RestrictionsGO4TheMAINswitchmustappearonceandonlyonceinaOprogram. ! NLOThe routine-name specifiedintheMAINswitchmustbede-FOclaredinaROUTINEorGLOBALROUTINE declarationinO5thesamemodule. rLOTheVERSIONswitchcanappearonlyinamodulethatalso&OcontainstheMAINswitch. ! COThe name! specified in the structure-attribute of aFO STRUCTUREswitchmustbea predeclaredstructure-name. WOBLISS-36ONLYFO4Eachname specifiedintheENTRYswitchmustbede-:OclaredGLOBAL,GLOBALROUTINE,GLOBALBIND,>OGLOBALBINDROUTINE,orGLOBALLITERALintheO>samemodule. NBOThe ots-optionofthe ENVIRONMENTswitchmustnotIOappeartogetherwitheithertheOTSswitchortheOTS_O5LINKAGEswitch. COThe stack-optionofthe ENVIRONMENTswitchmayap-MOpearonlyinamodulethatalsocontainstheMAINswitch. IOThe quoted-stringgivenintheVERSIONswitchmustcon-nal.OOPTIMIZE)KOptimizeacrossmarkpoints.O2SAFE5K2Ignorecomputed addressesin performingK optimization.ONOUNAMES+KDonotgenerateuniquenames.OsNOZIP?KsDonotoptimizetimeattheexpenseofspace. O rQOIfasettingforaspecial-switchisnotgiven,the following!Odefaultsareassumed:   v  O!OSpecial-SwitchDefaultJAction O#ObADDRESSING_MODE(RELATIVE) Jb(bBLISS-16Only&JUsetherelativeaddress-(Jingmodeforall generatedJK instructions."OADDRESSING_MODE(EXTERNAL=WORD_RELATIVE,_ NONEXTERNAL=WORD_RELATIVE) J(BLISS-32Only(JUsetheshort/relativeform(J_ofaddressencodingasthe#Jultimateaddressing-modeJdefault.%OtADDRESSING_MODE(NOINDIRECT) Jt(tBLISS-36Only%JDonotusetheindirect$J addressingmodeforany"J\ generated instructions.OENVIRONMENT(EIS) J(BLISS-16Only&J$Producetheobjectmodule(Jqusing instructionsfromthe$JExtended InstructionSet"J (ASH,ASHC,DIV,MUL,&JZSOB,SXT)whereverappro-Jpriate.$O!LANGUAGE(%BLISS16(BLISS16)n%BLISS32(BLISS32)%BLISS36(BLISS36))#J!Themoduleisintended$Jnfor compilationonlyby&Jthecompiler currentlyin)J use,andnotransportability*JW checkingistobe performed.J (See Section16.2.4 forade-)J  scriptionofthe predeclared J? macrosshownabove.)O LINKAGE(BLISS)O LINKAGE(BLISS36C) J (  BLISS-16/32 J ( BLISS-36Only'JT Usethe predefinedlinkage(J BLISSinBLISS-16and-32,&J orthe predefinedlinkage&J= BLISS36Cin BLISS-36,for'J anyroutinethatdoesnot(J specifyalinkage-attribute."OQ  LIST(SOURCE, NOREQUIRE,  NOEXPAND,NOTRACE,  NOLIBRARY,OBJECT, : NOASSEMBLY, SYMBOLIC,BINARY, COMMENTARY)'JQ Listthesourcetext,but)J notthetext contributedby(J files specifiedinrequire-&J: declarations.'Donotlist(Jmacro expansionsortraces.'JDonotlistlibraryusage*J"traces.%Listtheobjectcode'Jp instructionsusingsymbolic)Jnames,thebinarytext,and'J  commentaryproducedbytheJX compiler.O STRUCTURE( )!JThatis,thedefault)Jstructure-attributeisempty,!Jmanddefault-structure-(J referencesareinvalid(seeJSection11.8).O OPTLEVEL=2%JPerformall optimizations)Jthatcanbeinvokedwithout'Jmakinganyspecialassump-%Jjtionsabouttheprogram. O* r 4 * Jh43   DOTheBLISS-36 ENVIRONMENTswitch defaults,exceptforOOthe ots-optionand stack-option,are establishedwhenagiven6O5BLISS-36compileris generated.)Seethe&5 BLISS-36User'sO Guide4fordetails.J  JOThedefaultforthe ots-optionis BLISS36C_OTS.Thisim-JOpliesthestandardBLISS36CObjectTimeSystemfilenameJO5foragiventarget environment,andimpliesthestandardBOBLISS36Clinkagefor generatingOTSroutinecalls. NNOIfthe stack-optionisnot specifiedinamodulethatcon-MOtainstheMAINswitch,a 2048-wordstackis establishedbyO5default.  WBOThedefaultsfortheOTSand OTS_LINKAGEswitchesLOare, respectively,thestandardOTSfilenameandthestan-KO5dardOTSlinkage establishedbythe (explicitordefault)DO ENVIRONMENTswitch ots-option.*More specifically,theGO OTS_LINKAGEdefaultcanbeeitherBLISS36CorBLISS10,4O> dependinguponthe ots-optionsetting.n  DMOIfanull language-listappearsinaLANGUAGEswitch(thatJOis,LANGUAGE()),thesingle language-name correspond-RO5ingtothecompilerinuseisassumed.)(Thisis equivalenttoJOthedefaultfortheentireLANGUAGEswitch,as describedOabove.)+ ! O19.2.4C SemanticsMO4Themodule-switchesinformthecompilertotakeorsuppressLOanaction.*Theactions associatedwiththespecial-switchesMOandon-off-switchesare describedinthe following sections. $O19.2.4.1BSpecial-SwitchesAO)Thespecial-switchesADDRESSING_MODE(in BLISS-32),=O LANGUAGE,LINKAGE,LIST,and STRUCTUREcanbeNOusedinaswitches-declarationaswellasina module-head;-O3thoseswitchesare describedin3Section18.2.3(See93AppendixCIOalsoforfurther informationontheLANGUAGEswitchand&Otransportability checking.)* ?B * 9O  uGOThespecial-switchesthatcanbeusedonlyasmodule-.Oswitchesaredefinedasfollows:5 0 %  OOSpecial-SwitchAction O"ObADDRESSING_MODE(mode-16) b(}bBLISS-16Only'Generate instructionsusing,absoluteorrelative addressingKmodeas indicated."OADDRESSING_MODE(mode-36) (}BLISS-36Only%Generate instructionsus-'_ingindirector noindirect* addressingmodeas indicated.O& ENTRY(name,J&... &) &(}&BLISS-36Only$tProducean object-module,recordthatcontainsthespec--ifiedglobal(entry)names,for-\usebythelinkerwhenforming*alibraryofobjectmodules.(O$ENVIRONMENT(environ-16-option) $(}$BLISS-16Only+qEIS:Generateobjectcodeem-*ploying instructionsfromthe' PDP-11Extended InstructionZSet.(NOEIS:Generateobjectcode,! employingonlythe instructions-n availabletoallPDP-11models.(LSI11:%Generateobjectcode(6  employingonlytheinstruc-+ tions availabletotheLSI-11  processor.+J T11:"Generateobjectcodeem-* ployingonlythe instructions-  availabletotheT11 processor.#_ PIC:Generate position-  independentcode.+& ODT: Facilitate debuggingwitht ODT.!O ENVIRONMENT(environ-36-O; options)  (} BLISS-36Only%;  Cpu-option:' Specifiesthe+  processormodelofthetarget. systemforwhichcodeistobe$ generated.)Monitor-option:# Specifiesthe, operatingsystemofthetarget.8systemforwhichcodeistobe generated.' Ots-option:$ Specifieswhich(Mofthestandard object-time/systemsistobeused(atlink-)time)tosatisfy outstanding$6external references,and%impliesthe corresponding.standardlinkagetobeusedfor)OTScalls(whichmaydiffer*kfromthedefaultlinkagefornon-OTScalls).'3 Stack-option:& Specifiesthe'nameofanOWNorGLOBAL) data-segmentdeclaredinthe,same(main)moduletobeused+iasthecontrolstackforthe-program,inplaceofadefault&compiler-generatedsegment.O}IDENT= {} ' }xxx } ' }(}} BLISS-16/32Only)Includethe quoted-stringas-anidentificationintheobject&fmodule generatedfromthe' compilationofthemodule.'(Seethe appropriateBLISS,Nusermanualforany applicablerestrictions.)OMAIN= routine-name"Savethe routine-name.'cProgram executionwillbe-(ginwitha routine-callon,theroutine designatedbythisL routine-name.OOPTLEVEL=level+Usethevalueoflevelasa(guideforthekindofop-%` timizations performed,asfollows: LevelMeaning 8 0GMinimumG Optimization i1GiLow Optimization 2GNormal Optimization \3G\MaximumG Optimization LEThelevelvalue0producesthemostreadableobjectcode.OOTS= ! 'F ots-file-spec  ' (}BLISS-36Only, Usethe specified object-module-Ylibraryfilewhen searchingfor&object-time-systemroutines)insteadofthestandardOTS,B fileimpliedbythe ots-option (see ENVIRONMENT).' !NotethatLINK-20requires,V!thatthequoted file-speccon-'!formtotheTOPS-10style!(DEV:[PPN]filnam).&Ok" OTS_LINKAGE= linkage-name k"(}k"BLISS-36Only#"Usethenamedlinkage-&# definitionwhen generating,T#callstotheobject-time-system+# identifiedintheOTSswitch.O$VERSION= $ '$version-number $ ' $(}$BLISS-36Only)h$Includethe quoted-stringas+$anidentificationintheexe-*%cutableimageoftheprogram+Q% generatedbylinkingthemain+%module containingthisswitch. O% ! OBLISS-32ONLYIO4The quoted-stringgivenwiththeIDENTspecial-switchisQOprintedbythelinkerinthemapitproducesasaresultofNOlinkingthemodulesofaprogram.'This quoted-stringusuallyQO>containsan identifierthatisusedto determinewhichversion>Oofanobjectmoduleispresentinaprogram.A ! `OBLISS-36ONLYKO4The quoted-stringgivenwiththeVERSIONspecial-switchisROplacedinthe ``versionnumber''locationofthe executableim-ROageproducedasaresultoflinkingthemodulesofaprogram.JO>(Notethatthemodule containingtheVERSIONswitchmustGOalsocontaintheMAINswitch.),This quoted-stringmustQOcontaina conventionalversionnumberthatisusedtoidentify.OGtheversionlevelofaprogram.  }#O19.2.4.2BOn-Off-Switches@O)Theon-off-switchesERRS, OPTIMIZE,SAFE,UNAMES,SOandZIPcanbeusedinaswitches-declarationaswellasina;O module-head;theseswitchesare describedinSection18.2.FO3Theon-off-switchesthatcanbeusedonlyasmodule-.Oswitchesaredefinedasfollows:* ?B 5   OOOn-Off-O+Switchb+Action OFOCODE8bGeneratetheobjectcodeforthemodule.O)DEBUGFb)Buildthesymboltableandthelinkagesrequiredfor!bwuseofthe debugger. O NMOEachoftheseswitcheshasa negation,formedby prefixingIOtheswitchnamewithNO.Thenegatedswitchmeansthat9O5the indicatedactionshouldnotbetaken.&$]  w3!O19.3C PredefinedNamesNOUSomenameshavea predefined,specificmeaningthatispartPOofthe definitionofBLISS.Forexample,ABSisthenameofLOtheabsolutevalue function,andVECTORisthenameofa(O^ predefinedvector structure.  W8OTherearetwokindsof predefinednames:X predeclared andO built-inA_.+The predeclarednamescanbeusedwithoutanyNO5 declaration;indeed,a predeclarednamemustnotbedeclaredMOwhereveritisusedinits predefinedsense.,OntheotherIOhand,abuilt-innamemustbedeclaredBUILTINwherever3O>itisusedinits predefinedsense. WMOItis importanttonotethat predefinednamesarenotre-JOserved.+A predefinednamecanbedeclaredforsomeuserMO5purpose(forexample,asthenameofadatasegmentoraLOmacroora routine).+Withinthescopeofsuchadeclara-ROtion,the predefinedmeaningofthenameislost;butifthatmeaningisnot required,nodamageisdone.:  OOThenamesthatare predefinedintheversionsofBLISSthatROare describedinthismanualarelistedinthe followingpara-LO5graphs.* Additional predefinedwordswillbeaddedtoBLISS#Oasthelanguagegrows. ! .O Predeclaredstandard-function-names":'The followingnames8Oare predeclaredasstandard-function-names: XSIGN,ABS(MAX,MAXU,MAXAMIN,MINU,MINA%REF xNOThe descriptionforeachofthesestandard-functionnamesisOgiveninSection5.2.* |?A  "O Built-inregister-names,:,The predefinedregister-namesKOmustbedeclaredBUILTINwherevertheyareusedassuch.MO5Theregister-namesthatare predefinedforeachdialectareO describedin Section10.7.4.* P? &O Predeclaredstructure-names'w:-The followingnamesare>O predeclaredasnamesfor predefined structures:q G BITVECTOR(BLOCK BLOCKVECTORVECTOR  {KOThestructure-declarationforeachofthesestructure-namesOisgiveninSection11.10.* ?  w$O Predeclared linkage-names/):'The followingnamesareprede-$Oclaredaslinkage-names: OBLISS ( 16/32onlyO]FORTRAN ]( ]16/32onlyOFORTRAN_O$FUNCO FORTRAN_SUBOBLISS36C ( 36onlyOBLISS10 ( 36only [COThe descriptionof these linkage-names is given inOSection13.5.* O? N%O Built-inlinkage-functions.:)The following predefinednamesFOoflinkage-functionsmustbedeclaredBUILTINwherever$O5theyareusedassuch: iuO ACTUALCOUNTO]ACTUALPARAMETEROARGPTROP NULLPARAMETER yP(P16/32only _GOThe descriptionoftheselinkage-functionsisgiveninOSection13.6.* O? N3O Predeclaredcondition-handling-functions6:,The followingEOnamesare predeclaredasnamesofcondition-handling-O5 functions:b 8 SETUNWIND(SIGNAL SIGNAL_STOP pGOThe descriptionofthesecondition-handling-functionsisOgiveninChapter17.* O+   s"O Predeclared macro-names/:(The followingnamesareprede-"Oclaredas macro-names:` 6%BLISS16(%BLISS32%BLISS36 fLOThe descriptionforeachofthese macro-namesisgiveninOSection16.2.4.* O?  3O Predeclaredsupplementary-function-names:)The followingDOnamesare predeclaredassupplementary-function-names: d!CH$ALLOCATION,CH$SIZE$.CH$PTR,CH$PLUS,CH$DIFF, CH$RCHAR, CH$A_RCHAR, CH$RCHAR_A, CH$WCHAR, CH$A_WCHAR, CH$WCHAR_A%7CH$MOVE,CH$FILL,CH$COPY CH$COMPARE5CH$EQL,CH$NEQ,CH$LSS,CH$LEQ,CH$GTR,ACH$GEQ4 CH$FIND_CH,CH$FIND_NOT_CH, CH$FIND_SUB,CH$FAIL&KCH$TRANSTABLE, CH$TRANSLATE  POAllofthesearenamesof functionsinthecharacter-handling,Opackage,whichis describedinChapter20.* O p F4O Built-inmachine-specific-functionnames0:)EachBLISSdi-LOalectprovidesasetof predefinedmachine-specific-functionGO5namesthatmustbe individuallydeclaredBUILTINwher-KOevertheyareusedassuch.(Themachine-specific-functionsKOdefinedforeachdialectare describedinthe appropriateKO>BLISSuser'sguide.,Thefunctionnames(forall dialects)QOareincludedinthelistingof predefined identifiersgiveninOAppendixAofthismanual.* OOr hFF28bJ:T9WXjukZA,h8k<Bu}BoY@"!:} #  ;:= ^O?4j v',z kr"DKxA j0 B|g0~D9M Xp$ z4R_\jhBu x'!;!i~.w   F  Dw   C" 1 zT; ^S@ F M \ ~B ^ d {p L < 8s#>ix  (&8  / d Vv3 h- `i4R7 A V 68"F 6'Z #H$pl x4  ! ~F P[ aJnR |* t v  m> C_ I []:,# &L& 8 T(  X M$( I$8&M bp^ Q DG) Z~1^tL*$_ B V+dfrX 2Tb mp Tt*"ȃ Tg ; T ~1 FH McOc FV &Yvu]J b:_p./ 3 J} # ) ?0,A G~>OVWX 2? ]dh