TAL Reference Manual Abstract This manual provides syntax descriptions and error messages for TAL (Transaction Application Language) for system and application programmers. Product Version TAL D40 Supported Release Version Updates (RVUs) This publication supports D40.00 and all subsequent D-series RVUs, and G01.00 and all subsequent G-series RVUs until otherwise indicated in a new edition. Part Number Published 526371-001 September 2003 Document History Part Number Product Version Published 15998 TAL C20 March 1989 065722 TAL D10 January 1993 096255 TAL C30, TAL D10 & TAL D20 September 1993 526371-001 TAL D40 September 2003 TAL Reference Manual Glossary Index Tables What’s New in This Manual xxxix Manual Information xxxix New and Changed Information xxxix About This Manual xli Audience xli How to Use this Manual Set xli Manual Organization xlii System Dependencies xliii Compiler Dependencies xliv Additional Information xlv Notation Conventions xlvii Railroad Diagrams xlvii Branching xlvii Spacing xlviii Case Conventions xlviii Example Diagrams xlviii Hypertext Links xlix General Syntax Notation xlix Notation for Messages lii Notation for Management Programming Interfaces liii 1. Introduction Applications and Uses 1-1 Major Features 1-1 System Services 1-3 System Procedures 1-3 TAL Run-Time Library 1-3 CRE Services 1-4 Hewlett-Packard Company—526371-001 i Contents 2. Language Elements 2. Language Elements Character Set 2-1 Declarations 2-1 Statements 2-2 Keywords 2-2 Identifiers 2-4 Identifier Classes 2-4 Constants 2-5 Constant Expressions 2-5 Number Bases 2-5 Variables 2-6 Symbols 2-6 Indirection Symbols 2-7 Base Address Symbols 2-7 Delimiters 2-7 Operators 2-9 3. Data Representation Data Types 3-1 Specifying Data Types 3-3 Data Type Aliases 3-4 Storage Units 3-5 Address Modes 3-5 Operations by Data Type 3-5 Functions by Data Type 3-6 Address Types 3-7 Syntax for Constants 3-7 Character String Constants 3-8 Character String Length 3-8 Example of Character String Constant 3-9 String Numeric Constants 3-9 Example of STRING Numeric Constants 3-9 INT Numeric Constants 3-10 Examples of INT Numeric Constants 3-11 Storage Format 3-11 INT (32) Numeric Constants 3-11 Examples of INT (32) Numeric Constants 3-12 FIXED Numeric Constants 3-13 Examples of FIXED Numeric Constants 3-14 TAL Reference Manual—526371-001 ii Contents 3. Data Representation (continued) 3. Data Representation (continued) Storage Format 3-14 REAL and REAL (64) Numeric Constants 3-14 Examples of REAL and REAL (64) Numeric Constants 3-15 Storage Format 3-15 Examples of Storage Formats 3-16 Constant Lists 3-16 Examples of Constant Lists 3-17 4. Expressions About Expressions 4-1 Data Types of Expressions 4-2 Precedence of Operators 4-3 Arithmetic Expressions 4-5 Examples of Arithmetic Expressions 4-6 Operands in Arithmetic Expressions 4-6 Signed Arithmetic Operators 4-6 Unsigned Arithmetic Operators 4-9 Bitwise Logical Operators 4-11 Conditional Expressions 4-12 Examples of Conditional Expressions 4-13 Conditions 4-13 Boolean Operators 4-14 Relational Operators 4-14 Testing Hardware Indicators 4-16 Condition Code Indicator 4-16 Carry Indicator 4-17 Overflow Indicator 4-17 Special Expressions 4-18 Assignment Expression 4-19 CASE Expression 4-20 IF Expression 4-21 Group Comparison Expression 4-23 Bit Operations 4-27 Bit Extractions 4-28 Usage Considerations 4-28 Examples of Bit Extractions 4-28 Bit Shifts 4-29 Usage Considerations 4-30 TAL Reference Manual—526371-001 iii Contents 4. Expressions (continued) 4. Expressions (continued) Examples of Bit Shifts 4-30 5. LITERALs and DEFINEs LITERAL Declaration 5-1 Usage Considerations 5-2 Examples of LITERAL Declarations 5-2 DEFINE Declaration 5-3 Usage Considerations 5-4 Examples of DEFINE Declarations 5-5 Invoking DEFINEs 5-6 Compiler Action 5-7 Passing Actual Parameters 5-7 Examples of Passing DEFINE Parameters 5-8 6. Simple Variables Simple Variable Declaration 6-1 Usage Considerations 6-2 Examples of Simple Variable Declarations 6-2 7. Arrays Array Declaration 7-1 Usage Considerations 7-3 Examples of Array Declarations 7-3 Read-Only Array Declaration 7-5 Usage Considerations 7-6 Example of Read-Only Array Declaration 7-6 8. Structures Kinds of Structures 8-1 Structure Layout 8-2 Definition Structure Declaration 8-3 Usage Considerations 8-4 Examples of Definition Structure Declarations 8-4 Template Structure Declaration 8-5 Usage Considerations 8-5 Example of Template Structure Declaration 8-5 Referral Structure Declaration 8-6 Usage Considerations 8-7 Example of Referral Structure Declaration 8-7 TAL Reference Manual—526371-001 iv Contents 8. Structures (continued) 8. Structures (continued) Simple Variables Declared in Structures 8-7 Usage Considerations 8-8 Example of Simple Variables in Structures 8-8 Arrays Declared in Structures 8-8 Usage Considerations 8-9 Example of Arrays in Structures 8-9 Substructure Declaration 8-9 Definition Substructure Declaration 8-10 Example of Definition Substructure Declaration 8-11 Referral Substructure Definition 8-11 Example of Referral Substructure Declaration 8-12 Filler Declaration 8-12 Usage Considerations 8-13 Examples of Filler Declarations 8-13 Simple Pointers Declared in Structures 8-13 Usage Considerations 8-14 Example of Simple Pointer Declarations 8-15 Structure Pointers Declared in Structures 8-15 Usage Considerations 8-16 Example of Structure Pointer Declaration 8-17 Redefinition Declaration 8-17 Redefinition Rules 8-17 Redefinitions Outside Structures 8-17 Simple Variable Redefinition 8-18 Usage Considerations 8-18 Example of Simple Variable Redefinition 8-18 Array Redefinition 8-19 Usage Considerations 8-19 Example of Array Redefinition 8-20 Definition Substructure Redefinition 8-20 Usage Considerations 8-21 Examples of Definition Substructure Redefinitions 8-21 Referral Substructure Redefinition 8-22 Usage Considerations 8-22 Example of Referral Substructure Declaration 8-23 Simple Pointer Redefinition 8-23 Example of Simple Pointer Redefinition 8-24 Structure Pointer Redefinition 8-24 TAL Reference Manual—526371-001 v Contents 8. Structures (continued) 8. Structures (continued) Usage Considerations 8-25 Example of Structure Pointer Redefinitions 8-25 9. Pointers Simple Pointer Declaration 9-2 Usage Considerations 9-2 Examples of Simple Pointer Declarations 9-4 Structure Pointer Declaration 9-5 Usage Considerations 9-6 Examples of Structure Pointer Declarations 9-7 10. Equivalenced Variables Equivalenced Variable Declarations 10-1 Equivalenced Simple Variable 10-2 Usage Consideration 10-2 Examples of Equivalenced Simple Variable Declarations 10-3 Equivalenced Simple Pointer 10-3 Usage Consideration 10-4 Example of Equivalenced Simple Pointer Declaration 10-5 Equivalenced Definition Structure 10-5 Usage Considerations 10-6 Example of Equivalenced Definition Structure Declaration 10-7 Equivalenced Referral Structure 10-7 Usage Considerations 10-8 Example of Equivalenced Referral Structure Declaration 10-9 Equivalenced Structure Pointer 10-9 Usage Considerations 10-10 Example of Equivalenced Structure Pointer Declaration 10-11 Base-Address Equivalenced Variable Declarations 10-11 Base-Address Equivalenced Simple Variable 10-12 Considerations 10-12 Example of Base-Address Equivalenced Simple Variable Declaration 10-13 Base-Address Equivalenced Simple Pointer 10-13 Usage Considerations 10-14 Base-Address Equivalenced Definition Structure 10-14 Usage Considerations 10-15 Base-Address Equivalenced Referral Structure 10-16 Usage Considerations 10-17 TAL Reference Manual—526371-001 vi Contents 10. Equivalenced Variables (continued) 10. Equivalenced Variables (continued) Base-Address Equivalenced Structure Pointer 10-17 Usage Considerations 10-18 11. NAMEs and BLOCKs NAME Declaration 11-1 Usage Considerations 11-2 Example of NAME Declaration 11-2 BLOCK Declaration 11-2 Usage Considerations 11-3 Examples of BLOCK Declarations 11-4 Coding Data Blocks 11-5 Unblocked Declarations 11-5 12. Statements Using Semicolons 12-1 Compound Statements 12-2 Usage Considerations 12-2 Examples of Compound Statements 12-2 ASSERT Statement 12-3 Usage Considerations 12-3 Example of ASSERT Statement 12-4 Assignment Statement 12-4 Usage Considerations 12-5 Examples of Assignment Statements 12-6 Bit-Deposit Assignment Statement 12-7 Usage Considerations 12-7 Examples of Bit Deposit Assignments 12-8 CALL Statement 12-9 Usage Considerations 12-10 Examples of CALL Statements 12-10 CASE Statement 12-11 Labeled CASE Statement 12-11 Usage Considerations 12-12 Example of Labeled CASE Statement 12-12 Unlabeled CASE Statement 12-13 Usage Considerations 12-13 Examples of Unlabeled CASE Statements 12-14 CODE Statement 12-15 TAL Reference Manual—526371-001 vii Contents 12. Statements (continued) 12. Statements (continued) Usage Considerations 12-16 Examples of CODE Statements 12-18 DO Statement 12-19 Usage Considerations 12-19 Examples of DO Statements 12-19 DROP Statement 12-20 Usage Considerations 12-20 Examples of DROP Statements 12-21 FOR Statement 12-22 Usage Considerations 12-23 Examples of FOR Statements 12-24 GOTO Statement 12-25 Usage Considerations 12-25 Examples of GOTO Statements 12-25 IF Statement 12-26 Usage Considerations 12-26 Example of IF Statements 12-27 MOVE Statement 12-27 Usage Considerations 12-29 Examples of MOVE Statements 12-30 RETURN Statement 12-31 Usage Considerations 12-32 Examples of RETURN Statements 12-33 SCAN Statement 12-34 Usage Considerations 12-35 Example of SCAN Statements 12-36 STACK Statement 12-36 Usage Considerations 12-36 Examples of STACK Statements 12-37 STORE Statement
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages638 Page
-
File Size-