pTAL Guidelines for TAL Programmers
Contents
pTAL Guidelines for TAL Programmers—527256-002
iii
2. Coding Guidelines (continued)
2. Coding Guidelines (continued)
Hardware Indicators 2-40
Hardware Indicators: Test Only in an IF Statement 2-42
Hardware Indicators: Test Only in Next Statement 2-42
Hardware Indicator: Must Be First Operand 2-43
Hardware Indicators: Where to Test 2-44
Condition Code: Testing Multiple Conditions 2-44
Hardware Indicators: Test Only the Condition Code in a Nest of IF
Statements 2-45
Hardware Indicators: Testing in a Called Procedure 2-46
Hardware Indicators: Accessing Across Procedure Calls 2-48
Returning a Condition Code 2-48
Returning a Condition Code 2-49
Condition Code: Saving the Value in a Variable 2-50
Overflow Traps Must Be Disabled to Test $OVERFLOW 2-51
Registers 2-51
Base-Address Equivalencing 2-51
TNS Registers 2-52
TNS Registers and Trap Handlers 2-53
Saving the P, L, and S Registers 2-53
USE and DROP Statements 2-54
RP Directive 2-54
STACK, STORE, and CODE Statements 2-55
STACK and STORE Statements 2-55
CODE Statements 2-55
Signed (Arithmetic) Left Shifts 2-56
3. Differences Between TAL and pTAL
Address-Conversion Routines 3-1
Address-Type Variables 3-4
DO_PTAL Directive 3-5
Procedure Pointers 3-6
Declaring Procedure Pointers 3-7
Declaring Procedure Pointer Variables 3-11
Using Procedure Pointer Variables 3-13
Declaring Procedure Pointer Structure Fields 3-14
Declaring PROC Formal Parameters 3-16
Declaring Procedure Pointer Formal Parameters 3-17
Dynamically Selected Procedure Calls 3-18