pTAL Reference Manual (G06.24+, H06.09+, J06.03+)

Returning the Value of $OVERFLOW or $CARRY to the Calling Procedure...............................245
14 Procedures, Subprocedures, and Procedure Pointers..................................246
Procedure Declarations..........................................................................................................246
Procedure Attributes..............................................................................................................248
Parameters and VARIABLE and EXTENSIBLE Procedures........................................................250
VARIABLE, EXTENSIBLE and RETURNSCC Procedures as Actual Parameters.............................251
Formal Parameter Specification...............................................................................................251
Using STRUCT as a Formal Parameter.................................................................................255
Passing an Extended Address Parameter to a Non-EXTENDED Reference Parameter..................255
Using the PROC Formal Parameter.....................................................................................256
Referencing Parameters.....................................................................................................256
Procedure Body....................................................................................................................256
Subprocedure Declarations....................................................................................................257
Subprocedure Body..............................................................................................................259
Entry-Point Declarations.........................................................................................................260
Procedure Entry-Point Identifiers..........................................................................................260
Subprocedure Entry-Point Identifiers....................................................................................262
Procedure Pointers................................................................................................................263
Declaring Procedure Pointer Variables.................................................................................266
Declaring Procedure Pointers in Structures............................................................................267
Declaring PROCPTRs as Formal Parameters.........................................................................268
Assignments to Procedure Pointers......................................................................................269
Dynamically Selected Procedure Calls................................................................................271
Labels in Procedures.............................................................................................................273
15 Built-In Routines.....................................................................................274
Privileged Mode...................................................................................................................274
Parameters...........................................................................................................................275
Addresses as Parameters...................................................................................................275
Expressions as Parameters.................................................................................................275
Hardware Indicators.............................................................................................................276
Atomic Operations ...............................................................................................................276
$ATOMIC_ADD...............................................................................................................276
$ATOMIC_AND..............................................................................................................277
$ATOMIC_DEP................................................................................................................278
$ATOMIC_GET...............................................................................................................279
$ATOMIC_OR.................................................................................................................280
$ATOMIC_PUT................................................................................................................280
Nonatomic Operations .........................................................................................................281
pTAL Privileged Routines....................................................................................................281
Type-Conversion Routines..................................................................................................282
Address-Conversion Routines.............................................................................................283
Character-Test Routines.....................................................................................................284
Minimum and Maximum Routines......................................................................................285
Arithmetic Routines...........................................................................................................285
Carry and Overflow Routines............................................................................................285
FIXED-Expression Routines.................................................................................................285
Variable-Characteristic Routines.........................................................................................285
Procedure-Parameter Routines............................................................................................286
Miscellaneous Routines.....................................................................................................286
$ABS.............................................................................................................................291
$ALPHA.........................................................................................................................291
$ASCIITOFIXED...............................................................................................................292
$AXADR.........................................................................................................................293
$BADDR_TO_EXTADDR....................................................................................................294
8 Contents