pTAL Reference Manual (G06.24+, H06.09+, J06.03+)
Table 50 Object Data Types and Their Addresses (continued)
Object Data TypeAddress TypeDeclaration
noneEXT64ADDR
3
.EXT64 t;
3
STRUCT
noneEXT64ADDR
3
.EXT64 v;
3
SUBSTRUCT
address_type
2
EXT64ADDR
3
.EXT64 a;
3
addr-type
1
PROCPTRPROCADDRPROCPTR p(); BEGIN END
PROCPTR;
PROC32PTR
3
PROC32ADDR
3
PROC32PTR p(); BEGIN
END PROCPTR;
PROC64PTR
3
PROC64ADDR
3
PROC64PTR p(); BEGIN
END PROCPTR;
1
addr-type is any of the twelve address types: WADDR, BADDR, SGWADDR, SGBADDR, CWADDR, CBADDR,
EXTADDR, EXT32ADDR, EXT64ADDR, PROCADDR, SGXWADDR, and SGXBADDR.
2
address_type is the same address type as specified in the declaration.
3
64-bit addressing functionality added to the EpTAL compiler starting with SPR T0561H01^AAP. For more information,
see Appendix E, “64-bit Addressing Functionality” (page 531).
Topics:
• BADDR and WADDR (page 167)
• SGBADDR, SGWADDR, SGXBADDR, and SGXWADDR (System Globals) (page 167)
• PROCADDR, PROC32ADDR, and PROC64ADDR (Procedures, Procedure Pointers, and
Procedure Entry Points) (page 168)
• Subprocedures, Subprocedure Entry Points, Labels, and Read-Only Arrays (CBADDR and
CWADDR Address Types) (page 169)
• EXTADDR, EXT32ADDR, and EXT64ADDR (Extended Addresses) (page 169)
BADDR and WADDR
The address type of pointers is WADDR, except for STRING pointers, for which the address type
is BADDR.
Example 105 BADDR and WADDR
INT a; ! Variable: address type is WADDR
INT .b; ! Pointer: address type is WADDR
STRING .c; ! Pointer: address type is BADDR
INT(32) d[0:9]; ! Direct array: address type is WADDR
INT .e[0:9]; ! Indirect array: address type is WADDR
SGBADDR, SGWADDR, SGXBADDR, and SGXWADDR (System Globals)
The address type of a pointer to system global data is one of SGBADDR, SGWADDR, SGXBADDR,
or SGXWADDR. You can declare pointers to system global data by using either .SG notation or
.SGX notation. In either case, the pointer is not in system globals, but the data is. pTAL allocates
16 bits for pointers you declare with .SG and 32 bits pointers declared with .SGX.
Address Types 167