pTAL Reference Manual (G06.24+, H06.09+, J06.03+)
Pointers
A pTAL program can declare pointers (variables that can contain addresses) and use them to
access locations throughout memory. You can store addresses in pointers when you declare them
or later in your program.
Data Operations
A pTAL program can copy a contiguous group of words or bytes and compare one group with
another. It can scan a series of bytes for the first byte that matches (or fails to match) a given
character.
Bit Operations
A pTAL program can perform bit deposits, bit extractions, and bit shifts.
Built-in Routines
A pTAL program can use built-in routines to convert data types and addresses, test for an ASCII
character, or determine the length, offset, type, or number of occurrences of a variable.
Compiler Directives
You can use directives to control a compilation. You can, for example, check the syntax in your
source code or control the content of compiler listings.
Modular Programming
You can divide a large pTAL program into modules, compile them separately, and then link the
resulting object files into a new object file.
System Services
Your program can ignore many things such as the presence of other running programs and whether
your program fits into memory. For example, programs are loaded into memory for you and absent
pages are brought from disk into memory as needed.
System Procedures
The file system treats all devices as files, including disk files, disk packs, terminals, printers, and
programs running on the system. File-system procedures provide a file-access method that lets you
ignore the peculiarities of devices. Your program can refer to a file by the file’s symbolic name
without knowing the physical address or configuration status of the file.
Your program can call system procedures that activate and terminate programs running on any
processor on the system, and can also call system procedures that monitor the operation of a
running program or processor. If the monitored program stops or a processor fails, your program
can determine this fact.
For more information about system procedures see:
• Guardian Procedure Calls Reference Manual
• Guardian Programmer’s Guide
pTAL and the CRE
pTAL does not have a run-time environment defined by a run-time library such as HP C and
HP COBOL. The CRE provides a common foundation for language-specified run-time libraries that
enables mixed-language programming.
A program with a pTAL main routine cannot run in the CRE because pTAL does not perform the
necessary initialization of the run-time environment. pTAL routines can run in the CRE if they are
34 Introduction to pTAL