Post Reply 
Save/Restore Display Mode
05-20-2015, 01:45 AM
Post: #3
RE: Save/Restore Display Mode
Store display mode from the PPC ROM P.400 ...

"SD" saves flags 16-55 in a register defined by X, so that the user may then change the contents of register d (particularly display format and trig mode) during a program yet, have the capability of restoring the original format at the end of the program by by calling "RD".

LBL "SD"        Store Display mode
SIGN            store X in L
RDN             restore stack
RCL d           place register d in X
STO M           place register d in alpha
A"--"           append 2 nulls to shift 1st 2 bytes of d into N
X<>M            X= flags 16-55 of d + 2 null bytes
"*"             place star in alpha
X<>M            place star in X put flags 16-55 +2 nulls in M
STO N           place star in N
ASTO IND L      cause star + flags 16-55 to be ASTO'd in designated register
RDN             restore stack
RTN             end of routine

Complete Instructions for SD
1. Insert into X a register number.
2. XEQ "SD"
3. After execution of the program, the register that was chosen will contain an alpha string consisting of a star and the final five bytes of register d.
4. The same register number, followed by XEQ "SD", will restore the previous status of flags 16-55 (just prior to XEQ "SD").
5. "SD" saves Y, Z, and T in X, Y, and Z. X is placed in L.


Recall display mode, from the PPC ROM P.374 ...

"RD" is designed to be used to restore the status of flags 16-55 of register d after "SD" was used to save them. "RD" maintains the status of flags 0-15 when restoring the remaining flags. If you should wish to clear flags 0-15, execute "RF" , then "RD".

LBL "RD"        Recall Display mode
SIGN            store X in L
ARCL IND L      cause star + flags 16-55 into M
RDN             restore stack
RCL d           place present d in X
STO N           place present d in N
A"**"           shift alpha left two bytes by appending two stars
X<>O            remove 1st 2 bytes of d (flags 0-15) into x
STO N           N = 5 irrelevant bytes + flags 0-15 & M= flags 16-55 + 2 stars
A"*****"        shift alpha left five bytes by appending five stars
X<>N            new d now in x consisting of present flags 0-15 + old flags 16-55
STO d           insert new d
RDN             restore stack
CLA             clear alpha of garbage
RTN             end of routine

Complete Instructions for RD
1. Insert into X the number of the register that was initialized by "SD".
2. XEQ "RD" to restore flags 16-55.
3. "RD" saves Y, Z, and T in X, Y, and Z. X is placed in L.
Find all posts by this user
Quote this message in a reply
Post Reply 

Messages In This Thread
Save/Restore Display Mode - Dave Britten - 05-19-2015, 01:06 PM
RE: Save/Restore Display Mode - Dieter - 05-19-2015, 06:07 PM
RE: Save/Restore Display Mode - Sylvain Cote - 05-20-2015 01:45 AM
RE: Save/Restore Display Mode - Dieter - 05-21-2015, 12:12 PM

User(s) browsing this thread: 1 Guest(s)