pTAL Reference Manual (H06.08+)
Built-In Routines
HP pTAL Reference Manual—523746-006
15-27
$BADDR_TO_WADDR
expression
is an expression whose value is a BADDR address.
$BADDR_TO_WADDR
$BADDR_TO_WADDR converts a BADDR address to a WADDR address.
expression
is an expression whose value is a BADDR address.
The result of $BADDR_TO_WADDR is undefined if the least significant bit of
expression is 1. The least significant bit of an address is not truncated when a byte
address is converted to a word address—the address is not rounded down to the
preceding even-byte address.
pTAL privileged procedure No
Can be executed only by privileged procedures No
Sets condition code Yes
Sets $CARRY No
Sets $OVERFLOW No
Example 15-13. $BADDR_TO_EXTADDR Routine
STRING .EXT s;
STRING t;
@s := $BADDR_TO_EXTADDR(@t); ! @t is a BADDR address
pTAL privileged procedure No
Can be executed only by privileged procedures No
Sets condition code Yes
Sets $CARRY No
Sets $OVERFLOW No
Example 15-14. $BADDR_TO_WADDR Routine
INT .i;
STRING s;
@i := $BADDR_TO_WADDR(@s); ! @s is a BADDR address
expression
( )
VST684.vsd
$BADDR_TO_WADDR










