Transformation matrix – AMT Datasouth PAL User Manual
Page 14
8
PAL Language Reference
The programmer still has references to a given object so long as the programmer still has some
means of acessing the object. For example, object A may contain the only reference anywhere in
memory to the object B. In turn, the object B may contain the only reference anywhere in memory
to the object C. And the operand stack may contain the only reference to object A.
So long as a reference remains anywhere in memory to the object A, PAL will keep all of these
objects in the virtual memory. However, if the programmer pops the reference to object A from the
operand stack without creating an alternate reference to the object, the programmer will have
eliminated all references to object A. As a result, PAL will eliminate object A from memory.
When PAL eliminates object A from memory, it also eliminates the only reference to object B.
Therefore, PAL also eliminates object B from memory. This results in the elimination of the only
reference to object C, so PAL eliminates it from memory as well.
The amount of virtual memory available to the programmer varies between PAL printer models. In
can also vary between two different printers with the same amount of internal memory. This
variance results from the amount of memory the PAL interpreter requires in order to manage the
various options on different printer models.
PAL provides the vmstatus operator to allow the programmer to determine the amount of virtual
memory available on a given printer model. The operator also provides information relating to the
amount of virtual memory already allocated for PAL objects and other data.
2.10.
Transformation Matrix
All printers provide some form of coordinate system. The coordinate system provides the basis for
the user to instruct the printer where to locate a particular character or other image on the page.
Many non-PAL printers base their coordinate system on the printer's dots-per-inch or dots-per-
millimeter resolution.
This works fine so long as the host computer programmer must only control that particular printer
model. However, if the programmer must also control other printers which use different
resolutions, then the same control sequences will not work in all cases, even if all printers use the
same basic control language.
PAL's device independent coordinate system allows the host programmer to use the same control
sequence for all PAL printers. This includes PAL printers with different resolutions as well as from
different printer manufacturers.
In addition to providing a device independent coordinate system, PAL allows the programmer to
define this coordinate system to meet the needs of the programmer. By default, PAL uses a
typesetters' unit of measure known as a point. No precise definition of a point exists, however
typesetters generally use values close to 1/72 of an inch. Most computer software, including PAL,
use exactly 1/72 of an inch as the definition of a point.
PAL realizes that a point may not suit every programmer's requirements. Therefore, PAL provides
operators which allow the programmer to alter the current coordinate system. The programmer can
freely scale, rotate, and relocate the origin of the user coordinate system.
In order to convert the user's coordinates to dots on a printed page, PAL maintains an internal
mathematical construct known as a transformation matrix. The transformation matrix contains six
values which PAL changes whenever the user alters the coordinate system. In mathematics, a