05-19-2015, 01:06 PM
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.
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.
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