-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathFPLOT.hp42s
260 lines (247 loc) · 3 KB
/
FPLOT.hp42s
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
LBL "FPLOT"
LBL F
@ start of main plotting function
LBL 11
@ outer plotting loop
LBL 12
@ inner plotting loop
LBL 19
@ draw final line and print final screen
LBL 51
@ print horizontal line at ST X
@ before return ST X is restored
LBL 52
@ print left and right border pixel at ST X
LBL 53
@ print x-axis tic marks and label for current screen
LBL 54
@ print y-axis tic marks (FLAG 1 clear -> start tics, set -> end tics)
@ assumes border line is at ST X
@ implemented as function, so stack is restored upon return
@ FLAG 1 will be cleared by the function
LBL 55
@ print y-axis tic marks at bottom of current screen
LBL 56
@ calculate width of ALPHA printout (assuming 4 px/char)
@ on return stack is shifted up by one and result is in ST X
LBL 99
@ prepare for exit and exit
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@
@ Complete FPLOT source code (listing generated on 2022/10/31)
@
00 { 656-Byte Prgm }
01▸LBL "FPLOT"
02 RCL "GrMod"
03 LSTO "_GrMod"
04 0
05 STO "GrMod"
06 0
07 LSTO "_XMIN"
08 7
09 LSTO "_XMAX"
10 1
11 LSTO "_XSTEP"
12 -1
13 LSTO "_YMIN"
14 1
15 LSTO "_YMAX"
16 RCL "_XSTEP"
17 HEIGHT
18 ÷
19 LSTO "_DX"
20 RCL "_YMAX"
21 RCL- "_YMIN"
22 WIDTH
23 ÷
24 LSTO "_DY"
25▸LBL F
26 RCL "_XMIN"
27 LSTO "_XPOS"
28 CLLCD
29 "←Depth (μK) "
30 XEQ 55
31 PRLCD
32 CLLCD
33 1
34 XEQ 51
35 XEQ 53
36 XEQ 54
37▸LBL 11
38 HEIGHT
39 1000
40 ÷
41 1
42 +
43 LSTO "_YSCR"
44▸LBL 12
45 RCL "_DX"
46 STO+ "_XPOS"
47 XEQ 50
48 RCL "_XPOS"
49 X≥? "_XMAX"
50 GTO 19
51 RCL "_YSCR"
52 XEQ 52
53 ISG "_YSCR"
54 GTO 12
55 PRLCD
56 CLLCD
57 XEQ 53
58 GTO 11
59 GTO 99
60▸LBL 19
61 RCL "_YSCR"
62 XEQ 51
63 SF 01
64 XEQ 54
65 PRLCD
66 ADV
67 GTO 99
68▸LBL 50
69 RCL "_XPOS"
70 SIN
71 RCL- "_YMIN"
72 X<0?
73 0
74 WIDTH
75 RCL "_YMAX"
76 RCL- "_YMIN"
77 ÷
78 ×
79 RCL "_YSCR"
80 X<>Y
81 PIXEL
82 RTN
83▸LBL 51
84 +/-
85 0
86 PIXEL
87 R↓
88 +/-
89 RTN
90▸LBL 52
91 1
92 PIXEL
93 R↓
94 WIDTH
95 PIXEL
96 R↓
97 RTN
98▸LBL 53
99 "××××"
100 1
101 2
102 AGRAPH
103 1
104 WIDTH
105 4
106 -
107 AGRAPH
108 4
109 +
110 2
111 ÷
112 PIXEL
113 "←"
114 ARCL "_XPOS"
115 3
116 1
117 XEQ "DISPLAY"
118 RTN
119▸LBL 54
120 FUNC 00
121 "→"
122 1
123 +
124 FC? 01
125 0
126 FS? 01
127 5
128 -
129 WIDTH
130 2
131 ÷
132 AGRAPH
133 X<>Y
134 FC? 01
135 0
136 FS?C 01
137 2
138 +
139 X<>Y
140 2
141 ÷
142 "∫"
143 AGRAPH
144 3
145 ×
146 AGRAPH
147 RTN
148▸LBL 55
149 WIDTH
150 XEQ 56
151 -
152 2
153 ÷
154 1
155 XEQ "DISPLAY"
156 1
157 HEIGHT
158 7
159 -
160 "←"
161 ARCL "_YMIN"
162 XEQ "DISPLAY"
163 CLA
164 X<>Y
165 R↓
166 RCL "_YMAX"
167 RCL- "_YMIN"
168 2
169 ÷
170 ARCL ST X
171 XEQ 56
172 X<>Y
173 "←"
174 ARCL ST X
175 FP
176 X=0?
177 0
178 X≠0?
179 4
180 X<>Y
181 R↓
182 -
183 2
184 ÷
185 +/-
186 WIDTH
187 2
188 ÷
189 +
190 X<>Y
191 XEQ "DISPLAY"
192 X<>Y
193 R↓
194 CLA
195 WIDTH
196 ARCL "_YMAX"
197 XEQ 56
198 -
199 1
200 +
201 X<>Y
202 "←"
203 ARCL "_YMAX"
204 XEQ "DISPLAY"
205 RTN
206▸LBL 56
207 ALENG
208 4
209 ×
210 RTN
211▸LBL 99
212 RCL "_GrMod"
213 STO "GrMod"
214 END