HPlogo System Debug Reference Manual: HP 3000 MPE/iX Computer Systems > Chapter 8 System Debug Standard Functions

func sys

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Index

Coerces an expression into a SYS logical code pointer (LCPTR).

Syntax

   sys (value)  


During the evaluation of the parameter to this function, the search path used for procedure name lookups is limited to the system library file (SYS).

Formal Declaration

   sys:sys (value:any) 

Parameters

value

An expression to be coerced. All types are valid.

Table 8-16 Derivation of the SYS Bit Pattern

Parameter TypeAction

BOOL

0.1 if TRUE, 0.0 if FALSE.

U16 U32 SPTR

Set the SID part to zero. Right justify the original value in the low-order 32 bits of the offset part with zero fill.

S16 S32 S64

Set the SID part to zero. Right justify the original value in the low-order 32 bits of the offset part with sign extension.

LONG Class

Transfer both parts of the address unchanged.

EADDR SADDR

Transfer the SID part unchanged. Transfer the low-order 32 bits of the offset part.

STR

Transfer the ASCII bit pattern for the last eight characters in the string. Strings shorter than eight characters are treated as if they were extended on the left with nulls.

 

Examples

   %cmdebug > wl sys(12.304)

   SYS %12.304

Coerce the simple long pointer into a SYS logical code pointer.

   %cmdebug > wl sys(pub(24.630))

   SYS %24.630

The coercion simply changes the associated logical file. Note that no complicated conversion or range checking is performed.

   $nmdat > wl sys( 1 )

   SYS $0.1



   $nmdat > wl sys( ffff )

   SYS $0.ffff



   $nmdat > wl sys( 1234abcd )

   SYS $0.1234abcd



   $nmdat > wl sys( -1 )

   SYS $0.ffffffff



   $nmdat > wl sys( 1234.5678 )

   SYS $1234.5678



   $nmdat > wl sys( true )

   SYS $0.1



   $nmdat > wl sys( "ABCDEFG" )

   SYS $414243.44454647



   $nmdat > wl sys( prog(1.2) )

   SYS $1.2

Limitations, Restrictions

none

Feedback to webmaster