TAL Programmer's Guide

Accessing the Upper 32K-Word Area
Managing Addressing
B–2 096254 Tandem Computers Incorporated
The segment specifier in an extended pointer indicates which segment is being
accessed by the pointer:
Segment Specifier Segment
0 Current user data segment
1 System data segment if in privileged mode
User data segment if in nonprivileged mode
2 Current code segment
3 Current user code segment (read access only)
4–
n
Base address for the current extended data segment
An extended pointer, having 32 bits, can access byte addresses anywhere in a segment.
(The page, word, and byte fields together require 17 address bits.) All extended
addresses are byte addresses.
Accessing the Upper
32K-Word Area
You can use the upper 32K-word area of the current user data segment if you are not
using the CRE.
To use the upper 32K-word area, you must use the DATAPAGES directive. For
example, you can specify 33 pages for the user data segment.
DATAPAGES 33
To access the upper 32K-word area, you must declare a pointer and store an
appropriate address in it. To access word addresses (but not byte addresses) in the
upper 32K-word area, you can use a standard (16-bit) pointer. To access byte
addresses in that area, you must use an extended (32-bit) pointer.
Storing Addresses
in Simple Pointers
To store an address in a simple pointer, you can initialize the pointer when you
declare it, or you can assign an address to it in an assignment statement.
Initializing Simple Pointers
When you declare a simple pointer, you can initialize it with a standard (16-bit)
address or an extended (32-bit) address. For example, you can initialize a simple
pointer with the first word address in the upper 32K-word area as follows:
INT .std_ptr := %100000; !First 16-bit word address
! in upper 32K-word area
You can initialize an extended simple pointer with the first extended byte address in
the upper 32K-word area as follows:
INT .EXT top_ptr := %200000D; !First 32-bit byte address
! in upper 32K-word area