PRESERVE program listing

 

 

Program:

Comments:

 

 

 

 

 

 

«

 

 

 

RCLF

Recalls the list of four 64-bit

 

 

 

binary integers representing the

 

 

 

status of the 128 system flags and

 

 

 

128 user flags.

 

 

→ f

Stores the list in local variable f.

 

 

«

Begins the defining procedure.

 

 

IFERR

Starts the error trap.

 

 

EVAL

Executes the program placed on

 

 

 

the stack as the level 1 argument.

 

 

THEN

If the program caused an error,

 

 

f STOF ERRN DOERR

restores flags, shows the error, and

 

 

 

aborts execution.

 

 

END

Ends the error routine.

 

 

f STOF

Puts the list back on the stack,

 

 

 

then restores the status of all flags.

 

 

»

Ends the defining procedure.

 

 

»

 

 

 

 

 

 

 

`OPRESERVE K

Stores the program in

 

 

PRESERVE.

 

 

 

 

 

 

Checksum: # 26834d

 

Bytes:

71

 

 

PRESERVE is demonstrated in the program BDISP.

BDISP (Binary Display)

BDISP displays a real or binary number in HEX, DEC, OCT, and BIN bases.

Level 1

Level 1

 

 

 

# n

# n

n

n

 

 

 

RPL Programming Examples 2-7