Post Reply 
HP-41 Extended Memory data to card?
09-28-2016, 06:14 PM
Post: #1
HP-41 Extended Memory data to card?
I have a program that I regularly use which stores data to Extended Memory. I would like to be able to store that data on cards with the card reader. The data files are from a little less than 32 registers up to 56 registers, so each file would fit on one or two cards at 32 registers per card.

I know the normal process would be to save a complete X-memory data file to a block of main memory and then write that block onto cards with the card reader. It seems to me that a program could be written that copies 16 registers at a time to main memory, to read or write a single card track, and then use the same 16 registers for the next chunk of the data file. This would save dedicating a large part of main memory solely to transfer a whole data file to cards.

Since I've thought of this, that means someone else has in the last 25 or so years since the 41 was state of the art.

At the present time the only "mass storage" devices available to me are the card reader and 2 impractical X-memory to barcode utilities I wrote for an earlier project. I know there are better choices like using a PIL-Box, but I'm still leaving the '80s kicking and screaming.

Before I dedicate time to reinventing the wheel, is such a program documented somewhere on the web?

Steve
In order of appearance: HP 41CV, CMT-MCGPS, HP 41CX, DM 41, DM 42
Find all posts by this user
Quote this message in a reply
09-28-2016, 08:28 PM (This post was last modified: 09-28-2016 08:49 PM by Dieter.)
Post: #2
RE: HP-41 Extended Memory data to card?
(09-28-2016 06:14 PM)4ster Wrote:  I know the normal process would be to save a complete X-memory data file to a block of main memory and then write that block onto cards with the card reader. It seems to me that a program could be written that copies 16 registers at a time to main memory, to read or write a single card track, and then use the same 16 registers for the next chunk of the data file. This would save dedicating a large part of main memory solely to transfer a whole data file to cards.

Sure. But that's so trivial that I don't think you need a program for this.

Let's assume your data is stored in an X-Memory file named "DATA".

Code:
"DATA"  0 SEEKPTA  // make "DATA" current file, reset pointer

0,015 GETRX        // Read 16 values from X-Mem into main memory
WDTAX              // save these registers on card

0,015 GETRX        // Read next 16 values from X-Mem into main memory
WDTAX              // save these registers on card

...

The last round probably will cause an END OF FL error as there are no further 16 values left in the file that could be read. In this case get the last data this way:

Code:
FLSIZE RCLPT -     // number of remaining data in file
1 - 1000 /         // create control number 0,nnn
GETRX              // Read last data from X-Mem into main memory
WDTAX              // save last registers on card

Of course you can also write a short program that does this for you. Simply use a flag 25 test for the last chunk of data. And be sure that the last control number is greater than zero. ;-)

Edit: for instance this way...

Code:
01 LBL "XM2CRD"
02 AON
03 "FILE NAME?"
04 STOP
05 AOFF
06 0
07 SEEKPTA
08 LBL 01
09 SF 25
10 ,015
11 GETRX
12 FC?C 25
13 GTO 02
14 WDTAX
15 GTO 01
16 LBL 02
17 FLSIZE
18 RCLPT
19 -
20 1
21 -
22 1 E3
23 /
24 X<=0?
25 GTO 03
26 GETRX
27 WDTAX
28 LBL 03
29 "OK"
30 PROMPT

Beware: I have not tried this on a real 41 / X-Mem / card reader combo. Try it and see if it works for you.

Dieter
Find all posts by this user
Quote this message in a reply
09-29-2016, 04:44 AM
Post: #3
RE: HP-41 Extended Memory data to card?
Wow, that was fast! Thanks for taking the time to write the program! The only thing that could improve it is a few CLAs randomly spaced in the program. ;-)

I ran it on two files. The first contained 48 registers and it ran 3 tracks as expected. afterwards I I checked register 15 in main memory and it contained the last record of the file. The other was 56 registers and it ran the expected 4 tracks on 2 cards.

It is a neat little program.

Steve
In order of appearance: HP 41CV, CMT-MCGPS, HP 41CX, DM 41, DM 42
Find all posts by this user
Quote this message in a reply
Post Reply 




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