Post Reply 
Save/Restore Display Mode
05-19-2015, 01:06 PM (This post was last modified: 05-19-2015 01:07 PM by Dave Britten.)
Post: #1
Save/Restore Display Mode
This program will save the current display mode (FIX/SCI/ENG and precision) to the stack, or restore same from the stack. Store the output values into temporary registers, and recall them at the end of your program to restore the original display mode.

SD - Save Display
Puts current display mode in X (0 = SCI, 1 = FIX, -1 = ENG), and precision in Y.

Code:
01 LBL SD
02 0
03 1
04 FC? 39
05 CLX
06 +
07 2
08 FC? 38
09 CLX
10 +
11 4
12 FC? 37
13 CLX
14 +
15 8
16 FC? 36
17 CLX
18 +
19 0
20 1
21 FC? 40
22 CLX
23 +
24 1
25 FC? 41
26 CLX
27 -
28 RTN

RD - Restore Display
Restores display settings from stack values. Place display mode in X (0 = SCI, 1 = FIX, -1 = ENG), and precision in Y, then XEQ RD.

Code:
29 LBL RD
30 X=0?
31 SCI IND Y
32 X>0?
33 FIX IND Y
34 X<0?
35 ENG IND Y
36 RTN
Visit this user's website 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 - Dieter - 05-21-2015, 12:12 PM



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