Post Reply 
hp41cx named variables in extended memory
02-28-2020, 07:52 PM (This post was last modified: 02-29-2020 02:36 AM by Artur - Brasil.)
Post: #11
RE: hp41cx named variables in extended memory
Here the full version 2.1 - using FLAG 10 for sto/rcl 10-19 (remember, size of file must be 1+ the higher register number you're going to use - up to 19 in this version).
323 bytes against 499 of version 1 !!!

1 LBL "XREG2" creates the file for X-Regs given ALPHA: file_name X: number of regs (you will have 0...n-1)
2 SF 25
3 CRFLD
4 FC?C 25
5 RESZFL if file already exists, just resize it.
6 CLX
7 SEEKPTA
8 RTN
9 LBL "R0" to recover regs from 00 to 09, just call XEQ "R0" .. XEQ "R9".
10 0 For registers from 10..19: SF 10 XEQ "R0" .. XEQ "R9"
11 GTO 00 each time you call Sn or Rn routines, FLAG 10 is cleared automatically.
12 LBL "R1"
13 1
14 GTO 00
15 LBL "R2"
16 2
17 GTO 00
18 LBL "R3"
19 3
20 GTO 00
21 LBL "R4"
22 4
23 GTO 00
24 LBL "R5"
25 5
26 GTO 00
27 LBL "R6"
28 6
29 GTO 00
30 LBL "R7"
31 7
32 GTO 00
33 LBL "R8"
34 8
35 GTO 00
36 LBL "R9"
37 9
38 LBL 00 the local label that process STO work
39 FS?C 10
40 XEQ 02
41 SEEKPT
42 CLX
43 GETX
44 RTN
45 LBL 02 auxiliary routine for regs 10 ... 19
46 RUP
47 STO L
48 RDN
49 10
50 STO+ Y
51 X<> L
52 RDN
53 RTN
54 LBL "S0" to store regs from 00 to 09, just call XEQ "S0" .. XEQ "S9".
55 X<> L For registers from 10..19: SF 10 XEQ "S0" .. XEQ "S9"
56 RDN
57 FC? 10
58 0
59 FS?C 10
60 10
61 GTO 01
62 LBL "S1"
63 X<> L
64 RDN
65 FC? 10
66 1
67 FS?C 10
68 11
69 GTO 01
70 LBL "S2"
71 X<> L
72 RDN
73 FC? 10
74 2
75 FS?C 10
76 12
77 GTO 01
78 LBL "S3"
79 X<> L
80 RDN
81 FC? 10
82 3
83 FS?C 10
84 13
85 GTO 01
86 LBL "S4"
87 X<> L
88 RDN
89 FC? 10
90 4
91 FS?C 10
92 14
93 GTO 01
94 LBL "S5"
95 X<> L
96 RDN
98 FC? 10
99 5
100 FS?C 10
101 15
102 LBL 01
103 SEEKPT
104 X<> L
105 SAVEX
106 RTN
107 LBL "S6"
108 X<> L
109 RDN
110 FC? 10
111 6
112 FS?C 10
113 16
114 GTO 01
115 LBL "S7"
116 X<> L
117 RDN
118 FC? 10
119 7
120 FS?C 10
121 17
122 GTO 01
123 LBL "S8"
124 X<> L
125 RDN
126 FC? 10
127 8
128 FS?C 10
129 18
130 GTO 01
131 LBL "S9"
132 X<> L
133 RDN
134 FC? 10
135 9
136 FS?C 10
137 19
138 GTO 01
139 END

ARTUR MARIO JUNIOR
BRAZIL
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: hp41cx named variables in extended memory - Artur - Brasil - 02-28-2020 07:52 PM



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