Post Reply 
(42S) ESym: Casio-like engineering symbols (m, n, f, k, M, etc.)
06-08-2019, 06:38 PM
Post: #1
(42S) ESym: Casio-like engineering symbols (m, n, f, k, M, etc.)
Casios have this cool engineering mode that uses actual engineering prefix symbols (milli, nano, femto, kilo, Giga, etc.) rather than simple numeric exponents, both for display, and entry. You can also adjust the display of the current value by transposing up or down through the symbols (1 M will be changed to 1000 k, for instance).

This program will work on the 42S, as well as Free42 and the DM42, and provides very similar functionality.

Usage: XEQ "ESYM" to start the program and display the menu. "EXIT" to close the menu.

To enter a number with an engineering symbol, place the number in X as usual, and press any of the symbol keys. The value in X will be changed to reflect the new exponent, and the original value plus selected symbol will be displayed in Alpha.

To display the current X value in engineering format, simply press the "SHOW" menu key, which appears in all three pages of the menu. The value in X will not be changed, but will be displayed in engineering format with the appropriate symbol attached (i.e. 0 <= mantissa < 1000).

To transpose up or down through the engineering symbols, press either "SYM↑" or "SYM↓". Pressing these keys multiple times will step through all available symbols, or if the value in X has changed (and is not of an incompatible type), they will automatically convert X to engineering format, then shift up or down one symbol.

The value in the X register always represents the "true" value of X, meaning you don't have to worry about "converting" values to the same engineering symbol to do math. Simply input values and their respective symbols.

For example:

- Input 1 n
- Input 2100 p
- Press + to add them together
- Press "SHOW" to see 3.1 n
- Press "SYM↓" to see 3100 p (notice that X does not change)
- Enter 1.5 n
- Press -
- Press "SHOW" to see 1.6 n

The program does type checks, and will fail safely with an "Invalid Type" message if you attempt to give it a matrix, complex number, or string.

Code:
00 { 744-Byte Prgm }
01▸LBL "ESYM"
02 STO "_X"
03 CLX
04 0
05 STO "_E"
06 STO "_M"
07 R↓
08 RCL "_X"
09 CLV "_X"
10▸LBL 01
11 CLMENU
12 "m"
13 KEY 1 XEQ 11
14 "μ"
15 KEY 2 XEQ 12
16 "n"
17 KEY 3 XEQ 13
18 "p"
19 KEY 4 XEQ 14
20 "f"
21 KEY 5 XEQ 15
22 "SHOW"
23 KEY 6 XEQ 40
24 KEY 7 GTO 03
25 KEY 8 GTO 02
26 KEY 9 GTO 99
27 MENU
28 STOP
29 GTO 01
30▸LBL 02
31 CLMENU
32 "k"
33 KEY 1 XEQ 21
34 "M"
35 KEY 2 XEQ 22
36 "G"
37 KEY 3 XEQ 23
38 "T"
39 KEY 4 XEQ 24
40 "P"
41 KEY 5 XEQ 25
42 "SHOW"
43 KEY 6 XEQ 40
44 KEY 7 GTO 01
45 KEY 8 GTO 03
46 KEY 9 GTO 99
47 MENU
48 STOP
49 GTO 02
50▸LBL 03
51 CLMENU
52 "E"
53 KEY 1 XEQ 31
54 "SYM↑"
55 KEY 2 XEQ 32
56 "SYM↓"
57 KEY 3 XEQ 33
58 "SHOW"
59 KEY 6 XEQ 40
60 KEY 7 GTO 02
61 KEY 8 GTO 01
62 KEY 9 GTO 99
63 MENU
64 STOP
65 GTO 03
66▸LBL 11
67 XEQ 90
68 -3
69 GTO 45
70▸LBL 12
71 XEQ 90
72 -6
73 GTO 45
74▸LBL 13
75 XEQ 90
76 -9
77 GTO 45
78▸LBL 14
79 XEQ 90
80 -12
81 GTO 45
82▸LBL 15
83 XEQ 90
84 -15
85 GTO 45
86▸LBL 21
87 XEQ 90
88 3
89 GTO 45
90▸LBL 22
91 XEQ 90
92 6
93 GTO 45
94▸LBL 23
95 XEQ 90
96 9
97 GTO 45
98▸LBL 24
99 XEQ 90
100 12
101 GTO 45
102▸LBL 25
103 XEQ 90
104 15
105 GTO 45
106▸LBL 31
107 XEQ 90
108 18
109 GTO 45
110▸LBL 32
111 XEQ 90
112 XEQ 42
113 3
114 GTO 37
115▸LBL 33
116 XEQ 90
117 XEQ 42
118 -3
119▸LBL 37
120 STO+ "_E"
121 10↑X
122 STO÷ "_M"
123 XEQ 47
124 GTO 96
125▸LBL 39
126 R↓
127▸LBL 40
128 XEQ 80
129 FS?C 81
130 GTO 81
131 XEQ 90
132 XEQ 41
133 XEQ 47
134 GTO 96
135▸LBL 41
136 ENTER
137 X≠0?
138 LOG
139 ENTER
140 IP
141 X>Y?
142 DSE ST X
143▸LBL 00
144 X<>Y
145 R↓
146 STO "_E"
147 10↑X
148 ÷
149 STO "_M"
150 RCL "_E"
151 3
152 MOD
153 STO- "_E"
154 10↑X
155 STO× "_M"
156 RTN
157▸LBL 42
158 XEQ 80
159 FS?C 81
160 RTN
161 RCL "_M"
162 RCL "_E"
163 10↑X
164 ×
165 X<>Y
166 X≠Y?
167 GTO 41
168 RTN
169▸LBL 45
170 STO "_E"
171 10↑X
172 X<>Y
173 XEQ 80
174 FS? 81
175 XEQ 81
176 FS?C 81
177 GTO 96
178 STO "_M"
179 ×
180 XEQ 47
181 GTO 95
182▸LBL 47
183 RCL "_E"
184 -15
185 X>Y?
186 GTO 48
187 R↓
188 18
189 X<Y?
190 GTO 48
191 R↓
192 15
193 +
194 3
195 ÷
196 50
197 +
198 XEQ IND ST X
199 R↓
200 ├" "
201 1
202 AROT
203 R↓
204 ARCL "_M"
205 2
206 AROT
207 R↓
208 AVIEW
209 RTN
210▸LBL 48
211 R↓
212 CLA
213 ARCL "_M"
214 ├" ×10↑"
215 ARCL "_E"
216 AVIEW
217 RTN
218▸LBL 50
219 "f"
220 RTN
221▸LBL 51
222 "p"
223 RTN
224▸LBL 52
225 "n"
226 RTN
227▸LBL 53
228 "μ"
229 RTN
230▸LBL 54
231 "m"
232 RTN
233▸LBL 55
234 " "
235 RTN
236▸LBL 56
237 "k"
238 RTN
239▸LBL 57
240 "M"
241 RTN
242▸LBL 58
243 "G"
244 RTN
245▸LBL 59
246 "T"
247 RTN
248▸LBL 60
249 "P"
250 RTN
251▸LBL 61
252 "E"
253 RTN
254▸LBL 80
255 CF 81
256 MAT?
257 SF 81
258 CPX?
259 SF 81
260 STR?
261 SF 81
262 RTN
263▸LBL 81
264 "Invalid Type"
265 AVIEW
266 RTN
267▸LBL 90
268 STO "_X"
269 R↓
270 STO "_Y"
271 R↓
272 STO "_Z"
273 R↓
274 STO "_T"
275 R↓
276 X<> ST L
277 STO "_L"
278 X<> ST L
279 RTN
280▸LBL 95
281 RCL "_X"
282 STO ST L
283 R↓
284 GTO 97
285▸LBL 96
286 RCL "_L"
287 STO ST L
288 RCL "_X"
289▸LBL 97
290 RCL "_T"
291 RCL "_Z"
292 RCL "_Y"
293 R↑
294 CLV "_X"
295 CLV "_Y"
296 CLV "_Z"
297 CLV "_T"
298 CLV "_L"
299▸LBL 99
300 END


Attached File(s)
.zip  ESym.zip (Size: 652 bytes / Downloads: 19)
Visit this user's website Find all posts by this user
Quote this message in a reply
06-08-2019, 07:23 PM
Post: #2
RE: (42S) ESym: Casio-like engineering symbols (m, n, f, k, M, etc.)
nice! thanks.

Cambridge, UK
41CL/DM41X 12/15C/16C DM15/16 17B/II/II+ 28S 42S/DM42 32SII 48GX 50g 35s WP34S PrimeG2 WP43S/pilot/C47
Casio, Rockwell 18R
Find all posts by this user
Quote this message in a reply
Post Reply 




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