Post Reply 
hp41cx named variables in extended memory
02-03-2020, 10:43 PM
Post: #1
hp41cx named variables in extended memory
Was there a utility routine in PPC or other that let you create named variables in extended memory? I thought there was?

I know the performance would suffer but it might suite my application. I am picturing something that let you store a name in Alpha and it would provide CRUD functions to manage a value stored under that name in EM.

Thanks!
Todd
Find all posts by this user
Quote this message in a reply
02-04-2020, 05:28 AM (This post was last modified: 02-04-2020 05:28 AM by dayd.)
Post: #2
RE: hp41cx named variables in extended memory
Hi Todd,
I use this sub that I wrote to retrieve currency values (devise is French for currency) from a text file, no other module than XF or CX is needed. At start the currency code name is in alpha. And the value ends in x of course.

Code:
LBL "DEVISE"
ASTO L
"DBD"
ENTER^
CLX
SEEKPTA
CLA
ARCL L
CLX
POSFL
GETREC
CLX
ANUM
END

The "DBD" text file come regularly from a script on my phone (I don't have the internet in my CX, yet...) and looks like this;

Code:
UPD 03,022020
USD 1,1059
JPY 120,24
DKK 7,4724
GBP 0,8512
SEK 10,667
CHF 1,0687
CZK 25,208
AUD 1,6532
CAD 1,4704
BRL 4,6964
FRF 6,55957

I have a similar system for GPS coordinates with 2 values per record and the ANUMDEL function from the XIO module come handy in that case.
I think that the Paname rom have interesting related functions, too.

André
Find all posts by this user
Quote this message in a reply
Today, 02:54 AM (This post was last modified: Today 02:56 AM by Artur - Brasil.)
Post: #3
RE: hp41cx named variables in extended memory
Hi,
I'm writing two programs for 41C with X-Functions and X-Memory.

One creates a data file in X-Memory for replacing registers from 00 to 10 (it can replace any register, actually, if you get memory to hold the programm (or a NovRAM - HEPAX module).
So, operations like RCL 05 will be written as XEQ "R5"; STO 05 as XEQ "S5"
One subroutine creates the file: ALPHA: name of file; X: number of registers - XEQ "XREG"
One subroutine for each "Rn" and one for each "Sn".
It's quite a byte consumming, but works. You can get private data registers for every program.
The routine CU, in synthetic programming books is not very usefull - only for called programs: after you called it, the n registers (in main memory) will desappear to the called program. My one is better, but eats bytes...

It's already finished.

The second program is for creating a file in X-Memory for named variables (name up to six charaters) , for numeric or alpha contents. I'm writting it.
One subroutine creates the file: ALPHA: name of file XEQ "XVAR".
Two subroutines for recovering values: in ALPHA, put the name of variable. So, if numeric, XEQ "XRCL": the content will be recovered to X; if alpha, XARCL will recover content to ALPHA.
For storing data, ALPHA: name:value XEQ "XSTO", either for alpha or numeric variable.

What do you think about this idea?
Best wishes from Brazil
Artur

ARTUR MARIO JUNIOR
BRAZIL
+55 31 99850-2280
arturmariojr@gmail.com
Find all posts by this user
Quote this message in a reply
Post Reply 




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