pTAL Reference Manual (H06.03+)
Expressions
HP pTAL Reference Manual—523746-005
5-13
Nonextended Addresses
•
If one operand of a relational operator is a nonextended address and the other is a
constant, the constant must be 16 bits in length:
INT .p;
IF @p = 100 THEN ... ! OK
IF @p = 100D THEN ... ! ERR
Table 5-10. Valid Address Expressions (page 1 of 2)
Template Result Type Examples
atype [k]; atype * INT .EXT p;
@p := @p[2];
atype '+' INT16 atype * INT .p;
@p := @p '+' 2;
@p := @p '-' 4;
int16 '+' atype atype * INT .p;
@p := 2 '+' @p;
EXTADDR '±' INT32 EXTADDR INT .EXT p;
@p := @p '+' 4D;
INT32 '±' EXTADDR EXTADDR INT .EXT p;
@p := 4D '+' @p;
atype '-' atype INT INT .b, .bp, i;
i := @bp '-' @b;
The result of subtracting two byte-oriented
(BADDR, CBADDR, SGBADDR,
SGXBADDR) addresses is the number of
bytes between them.
The result of subtracting two word-
oriented (WADDR, CWADDR,
SGWADDR, SGXWADDR) addresses is
the number of 16-bit words between them.
EXTADDR - EXTADDR INT32 INT .EXT .b, bp, i32;
i32 := @bp - @b;
atype relational atype INT BADDR b1, b2;
INT i;
IF b1 '<' b2 THEN ...;
i := b1 '<' b2;
relational must be an unsigned
relational operation ('<', '=', '>', '<=', '<>',
'>=') or signed equal or not equal (=, <>).
* atype represents any address type except PROCADDR or EXTADDR.










