Post Reply 
Programming issue HP41CX
02-05-2018, 08:42 PM
Post: #1
Programming issue HP41CX
I am somewhat of a novice user trying to manually load a 859 step program into my 41CX calculator since the mag cards I have no longer work. When I get to step 792 I run out of memory. The program calls for size 026. The program loaded fine on mag cards when they worked.

Any ideas as to why the mag card program loaded and the manual entry of the program steps will not?
Find all posts by this user
Quote this message in a reply
02-05-2018, 11:10 PM
Post: #2
RE: Programming issue HP41CX
(02-05-2018 08:42 PM)jhaig99 Wrote:  I am somewhat of a novice user trying to manually load a 859 step program into my 41CX calculator since the mag cards I have no longer work. When I get to step 792 I run out of memory. The program calls for size 026. The program loaded fine on mag cards when they worked.

Any ideas as to why the mag card program loaded and the manual entry of the program steps will not?

Are there any other programs loaded? Use CAT-1 to check. Remove any programs you don't need by XEQ CLP then provide the program name (as listed in CAT-1). Be sure you don't remove the current program by mistake, it would be a PITA to have to enter all those steps again.

Are you sure you have size 26 set and no higher? XEQ "SIZE?" to check.

An empty CS should be able to fit it, so there must be other programs or registers in use. Also, try XEQ "PACK" to compact RAM.

--Bob Prosperi
Find all posts by this user
Quote this message in a reply
02-06-2018, 08:04 AM (This post was last modified: 02-06-2018 08:19 AM by Dieter.)
Post: #3
RE: Programming issue HP41CX
(02-05-2018 08:42 PM)jhaig99 Wrote:  I am somewhat of a novice user trying to manually load a 859 step program into my 41CX calculator since the mag cards I have no longer work. When I get to step 792 I run out of memory. The program calls for size 026. The program loaded fine on mag cards when they worked.

When the calculator runs out of memory it packs away the null bytes that may occur during program entry. You then see PACKING and TRY AGAIN. If after this you still cannot enter the final steps you may proceed as follows:

First, set a lower number of data registers. For instance SIZE 010. Go to step 00 (GTO . 000) and confirm that you now do not see 00 REG 00 but for instance 00 REG 15. This means that 15 memory registers = 105 bytes are available. This way you now can finish your program entry.

After the complete program has been entered do a GTO . . to pack the memory and add a final END command. Now again goto step 00 (GTO . 000 or simply switch to PRGM mode) and see how many registers are left. If you have set SIZE 010 in the previous step and your program needs SIZE 026, you will have to allocate another 16 registers that your program requires. What is the number you see at step 000? Is it at least 00 REG 16 – fine. Set SIZE 026 and you're done. If you see a lower number, e.g. 00 REG 02, there is insufficient memory left.

In this case somewhere memory has been used. This may be caused by other programs (a CAT 1 will show you what else is in program memory, so these programs can be cleared). Also key assignments consume memory. These can be deleted by a CLKEYS command.

Dieter
Find all posts by this user
Quote this message in a reply
02-06-2018, 03:41 PM
Post: #4
RE: Programming issue HP41CX
(02-05-2018 11:10 PM)rprosperi Wrote:  
(02-05-2018 08:42 PM)jhaig99 Wrote:  I am somewhat of a novice user trying to manually load a 859 step program into my 41CX calculator since the mag cards I have no longer work. When I get to step 792 I run out of memory. The program calls for size 026. The program loaded fine on mag cards when they worked.

Any ideas as to why the mag card program loaded and the manual entry of the program steps will not?

Are there any other programs loaded? Use CAT-1 to check. Remove any programs you don't need by XEQ CLP then provide the program name (as listed in CAT-1). Be sure you don't remove the current program by mistake, it would be a PITA to have to enter all those steps again.

Are you sure you have size 26 set and no higher? XEQ "SIZE?" to check.

An empty CS should be able to fit it, so there must be other programs or registers in use. Also, try XEQ "PACK" to compact RAM.

Verified no other programs or keys assigned. Size 026 is set. I'm going to work Dieter's solution this afternoon.
Find all posts by this user
Quote this message in a reply
02-06-2018, 03:47 PM
Post: #5
RE: Programming issue HP41CX
(02-06-2018 08:04 AM)Dieter Wrote:  
(02-05-2018 08:42 PM)jhaig99 Wrote:  I am somewhat of a novice user trying to manually load a 859 step program into my 41CX calculator since the mag cards I have no longer work. When I get to step 792 I run out of memory. The program calls for size 026. The program loaded fine on mag cards when they worked.

When the calculator runs out of memory it packs away the null bytes that may occur during program entry. You then see PACKING and TRY AGAIN. If after this you still cannot enter the final steps you may proceed as follows:

First, set a lower number of data registers. For instance SIZE 010. Go to step 00 (GTO . 000) and confirm that you now do not see 00 REG 00 but for instance 00 REG 15. This means that 15 memory registers = 105 bytes are available. This way you now can finish your program entry.

After the complete program has been entered do a GTO . . to pack the memory and add a final END command. Now again goto step 00 (GTO . 000 or simply switch to PRGM mode) and see how many registers are left. If you have set SIZE 010 in the previous step and your program needs SIZE 026, you will have to allocate another 16 registers that your program requires. What is the number you see at step 000? Is it at least 00 REG 16 – fine. Set SIZE 026 and you're done. If you see a lower number, e.g. 00 REG 02, there is insufficient memory left.

In this case somewhere memory has been used. This may be caused by other programs (a CAT 1 will show you what else is in program memory, so these programs can be cleared). Also key assignments consume memory. These can be deleted by a CLKEYS command.

Dieter

I will try this, this afternoon. Since my program says to set the Size at 026 for loading mag cards, I was not aware it could be set lower for program mode implementation... interesting. Thanks for responding, I really want to make this program work again.
Find all posts by this user
Quote this message in a reply
02-06-2018, 04:37 PM (This post was last modified: 02-06-2018 04:38 PM by grsbanks.)
Post: #6
RE: Programming issue HP41CX
Alarms also use data to the tune of at least 1 register per alarm. If there's a repeat and/or alpha data associated with the alarm then that takes up more registers per alarm. CAT 5 will tell you if any are defined.
Find all posts by this user
Quote this message in a reply
02-07-2018, 08:26 AM (This post was last modified: 02-07-2018 08:50 AM by Dieter.)
Post: #7
RE: Programming issue HP41CX
(02-06-2018 03:47 PM)jhaig99 Wrote:  I will try this, this afternoon. Since my program says to set the Size at 026 for loading mag cards, ...

?!? – SIZE sets the number of data registers. If the highest register number used by your program is 25 then you need to set SIZE 026 (or more). But unless you run the program and R25 is actually accessed you can set any SIZE you want, even SIZE 000. It doesn't matter whether you enter the program by hand or you read a card, use the barcode reader or a tape drive.

But this SIZE 026 setting can be related to something completely different: if you read a card with a HP67 program (!) this program may require SIZE 026 because the HP67 has 26 data registers. The last one, register I, is number 25 which leads to SIZE 026. But this does not have anything to do with a general requirement of SIZE 026 if a program card is read.

However, a > 800 step program does not sound like a HP67 program. Does the documentation of your program actually say that SIZE 026 is required? What is the highest register number that is used?

Dieter
Find all posts by this user
Quote this message in a reply
02-13-2018, 01:20 AM
Post: #8
RE: Programming issue HP41CX
By setting the size at 000 and abbreviating some of the alpha labels I was able to enter all the steps on my program list, but no luck on running the program. I have done all I can to be sure nothing is in memory that should not be there. When empty it shows 319 registers. The program label is V13, but when I try to execute it, it cannot be found. With all the program steps entered, when I then resize for 026 it packs and returns END REG 07

I have two calculators, one a CV and the other a CX.

My catalog 4 (extended memory) on the CV has a lot of commands. i.e. *,/,+, -, ACOS, ADV, ASHF, ASN, etc. I did not put these there so not sure where they come from. They may be used in the program somehow to keep main memory usable. Both calculators did hold the program at some point.

The CX where I entered the program, is showing Cat 4 "Dir Empty"

I'm thinking the values in extended memory may be required for program execution.

I will be attaching a copy of the program I have and instructions that came with the program and a copy of the keyboard overlay as soon as I can get it scanned to a file I can attach to give an idea of what I am up against. I will try to post it tomorrow.

The program overlay I have for the program has 30 labels on it for program entry and to recall calculation values.

When I run Cat 1 it list program labels, then END 2188.

I also have loaded the program i41CX on my iPad. I plan to reload the V13 program lines into it and will be able to print and email all the commands.

I really think this V13 program is very sophisticated and have come to believe the data in the extended memory may be part of the program some how.

Any help or advice is welcome and appreciated.

Regards,
James
Find all posts by this user
Quote this message in a reply
02-13-2018, 07:27 AM (This post was last modified: 02-13-2018 07:28 AM by Massimo Gnerucci.)
Post: #9
RE: Programming issue HP41CX
(02-13-2018 01:20 AM)jhaig99 Wrote:  I have two calculators, one a CV and the other a CX.

My catalog 4 (extended memory) on the CV has a lot of commands. i.e. *,/,+, -, ACOS, ADV, ASHF, ASN, etc. I did not put these there so not sure where they come from. They may be used in the program somehow to keep main memory usable. Both calculators did hold the program at some point.

No. Unless you put an XMEM module in the CV, it comes without any extended memory. What you see from CAT 4 is simply the output from CAT 3 (you may try with CAT 5, 6, etc. it is always the same) that is the list of 41's internal functions.

That said I can't help you in determining where your problem lies, sorry.

Greetings,
    Massimo

-+×÷ ↔ left is right and right is wrong
Visit this user's website Find all posts by this user
Quote this message in a reply
02-13-2018, 07:45 AM
Post: #10
RE: Programming issue HP41CX
Remember to set SIZE to the maximum available number of registers after putting in the program. if that does not help, something might be mis-typed while copying the program (out of curiosity: What is this program? it seems to be huge!)

also if you want to test your memory, you can use this program:
http://calc.fjk.ch/hp-41-speichertest/

unfortunately you will have to clear all memory beforehand. :/
Find all posts by this user
Quote this message in a reply
02-13-2018, 07:59 AM
Post: #11
RE: Programming issue HP41CX
(02-13-2018 01:20 AM)jhaig99 Wrote:  When empty it shows 319 registers.

Fine. So the memory is empty.

(02-13-2018 01:20 AM)jhaig99 Wrote:  The program label is V13, but when I try to execute it, it cannot be found.

Then something is going wrong. If you see a LBL V13 you can of course execute this program. Be sure to enter the "1" and "3" shifted, as you did when you entered the label: XEQ ALPHA V shift 1 shift 3 ALPHA.

(02-13-2018 01:20 AM)jhaig99 Wrote:  With all the program steps entered, when I then resize for 026 it packs and returns END REG 07

So there are only 7 registers left. And SIZE 007 is the limit.

(02-13-2018 01:20 AM)jhaig99 Wrote:  My catalog 4 (extended memory) on the CV has a lot of commands. i.e. *,/,+, -, ACOS, ADV, ASHF, ASN, etc. I did not put these there so not sure where they come from.

CAT 4 and 5 are only available on the CX. They are equivalent to EMDIR and ALMCAT on a C or CX with extended memory. On any other device, like the CV, they do the same as CAT 3. Which is the catalog with the standard commands. You don't put anything there yourself, it's simply the built-in standard functions of any HP41. ;-)

(02-13-2018 01:20 AM)jhaig99 Wrote:  The CX where I entered the program, is showing Cat 4 "Dir Empty"

Sure. Extended memory is not used here.

(02-13-2018 01:20 AM)jhaig99 Wrote:  I'm thinking the values in extended memory may be required for program execution.

I think there is a general misunderstanding regarding CAT 4 and extended memory. ;-)

(02-13-2018 01:20 AM)jhaig99 Wrote:  When I run Cat 1 it list program labels, then END 2188.

Since the total memory is 2233 bytes there are 45 bytes left. That's 6 registers and 4 bytes (so I wonder why you get 00 REG 07).

(02-13-2018 01:20 AM)jhaig99 Wrote:  I really think this V13 program is very sophisticated and have come to believe the data in the extended memory may be part of the program some how.

I suspect there are some errors when you entered the program so that it consumes more memory than it should. At least we now can say for sure that SIZE 026 defniitely is not possible with the program the way you entered it. I wonder if it really requires SIZE 026, so I'd like to see the part of the documentation that say thiat this is required.

Why don't you just set SIZE 007 and see if it runs?

Dieter
Find all posts by this user
Quote this message in a reply
02-13-2018, 08:59 AM
Post: #12
RE: Programming issue HP41CX
(02-13-2018 07:59 AM)Dieter Wrote:  
(02-13-2018 01:20 AM)jhaig99 Wrote:  When I run Cat 1 it list program labels, then END 2188.

Since the total memory is 2233 bytes there are 45 bytes left. That's 6 registers and 4 bytes (so I wonder why you get 00 REG 07).
Dieter

Total memory is 320 regs - 3 bytes for the permanent .END. = 2237 bytes, leaving 49 bytes or exactly 7 registers ;-)

Cheers, Werner

41CV†,42S,48GX,49G,DM42,DM41X,17BII,15CE,DM15L,12C,16CE
Find all posts by this user
Quote this message in a reply
02-13-2018, 07:30 PM
Post: #13
RE: Programming issue HP41CX - Program Attached
Attached is the copy of the program I have keyed into my HP41CX. I had to set the SIZE at 000 and shorten some alpha labels to get it all in. When I did, I could not set the size at 026 the program calls for. END REG 07.

Hoping a look at the program will reveal some issues that will help me. To repeat, my mag cards no longer work, so I am working with manual entry.

In the past, I could clear all memory, set the size at 026 and scan in the 9 mag cards to load the program.

James


Attached File(s)
.pdf  4315_001.pdf (Size: 380.4 KB / Downloads: 34)
Find all posts by this user
Quote this message in a reply
02-13-2018, 07:52 PM (This post was last modified: 02-13-2018 07:53 PM by hth.)
Post: #14
RE: Programming issue HP41CX
Do you have a printer attached? Do the commands like ACA and PRBUF show up as such, or are they displayed as XEQ "ACA" and XEQ "PRBUF"?

Those printer instructions are two-byte XROMs, if entered to become XEQ "ACA", each will occupy two plus the number of letters in the instruction.

Håkan
Find all posts by this user
Quote this message in a reply
02-13-2018, 08:04 PM
Post: #15
RE: Programming issue HP41CX
(02-13-2018 07:30 PM)jhaig99 Wrote:  Hoping a look at the program will reveal some issues that will help me. To repeat, my mag cards no longer work, so I am working with manual entry.

First question: do you have a printer attached to the calculator?

If not, how could you enter printer-specific instructions like ACA or PRBUF (line 26/27 and many others). Take a look at the progrom you entered. What do you see there?

26 ACA
27 PRBUF

or is it

26 XEQ "ACA"
27 XEQ "PRBUF"

The printer commands require two bytes, while the XEQ-versions are subroutine calls (!) that require 6 or 8 bytes which may explain why the program does not fit. On the other hand I do not think that this will free up 19 registers.

If you don't use a printer you can remove several parts of the program which would make it even smaller. Also the program could consume less memory with a bit of more effective programming. But you said it worked when read from a card, so it should fit even in this less than optimal version.

Dieter
Find all posts by this user
Quote this message in a reply
02-13-2018, 08:20 PM
Post: #16
RE: Programming issue HP41CX
(02-13-2018 07:52 PM)hth Wrote:  Do you have a printer attached? Do the commands like ACA and PRBUF show up as such, or are they displayed as XEQ "ACA" and XEQ "PRBUF"?

Those printer instructions are two-byte XROMs, if entered to become XEQ "ACA", each will occupy two plus the number of letters in the instruction.

Håkan

My printer is on the blink, but they show up on the calculator as ACA and PRBUF.
The calculator shows the same as the program instructions and It is my understanding the program list I attached is a printout made at some point.
Find all posts by this user
Quote this message in a reply
02-13-2018, 08:25 PM
Post: #17
RE: Programming issue HP41CX
(02-13-2018 08:04 PM)Dieter Wrote:  
(02-13-2018 07:30 PM)jhaig99 Wrote:  Hoping a look at the program will reveal some issues that will help me. To repeat, my mag cards no longer work, so I am working with manual entry.

First question: do you have a printer attached to the calculator?

If not, how could you enter printer-specific instructions like ACA or PRBUF (line 26/27 and many others). Take a look at the progrom you entered. What do you see there?

26 ACA
27 PRBUF

or is it

26 XEQ "ACA"
27 XEQ "PRBUF"

The printer commands require two bytes, while the XEQ-versions are subroutine calls (!) that require 6 or 8 bytes which may explain why the program does not fit. On the other hand I do not think that this will free up 19 registers.

If you don't use a printer you can remove several parts of the program which would make it even smaller. Also the program could consume less memory with a bit of more effective programming. But you said it worked when read from a card, so it should fit even in this less than optimal version.

Dieter

I have a printer, but it has a drive problem.

I see this on the CX. Entered as an alpha.
26 ACA
27 PRBUF

Do I need to connect my printer when entering the program?
Find all posts by this user
Quote this message in a reply
02-13-2018, 08:28 PM
Post: #18
RE: Programming issue HP41CX
(02-13-2018 07:59 AM)Dieter Wrote:  
(02-13-2018 01:20 AM)jhaig99 Wrote:  When empty it shows 319 registers.

Fine. So the memory is empty.

(02-13-2018 01:20 AM)jhaig99 Wrote:  The program label is V13, but when I try to execute it, it cannot be found.

Then something is going wrong. If you see a LBL V13 you can of course execute this program. Be sure to enter the "1" and "3" shifted, as you did when you entered the label: XEQ ALPHA V shift 1 shift 3 ALPHA.

(02-13-2018 01:20 AM)jhaig99 Wrote:  With all the program steps entered, when I then resize for 026 it packs and returns END REG 07

So there are only 7 registers left. And SIZE 007 is the limit.

(02-13-2018 01:20 AM)jhaig99 Wrote:  My catalog 4 (extended memory) on the CV has a lot of commands. i.e. *,/,+, -, ACOS, ADV, ASHF, ASN, etc. I did not put these there so not sure where they come from.

CAT 4 and 5 are only available on the CX. They are equivalent to EMDIR and ALMCAT on a C or CX with extended memory. On any other device, like the CV, they do the same as CAT 3. Which is the catalog with the standard commands. You don't put anything there yourself, it's simply the built-in standard functions of any HP41. ;-)

(02-13-2018 01:20 AM)jhaig99 Wrote:  The CX where I entered the program, is showing Cat 4 "Dir Empty"

Sure. Extended memory is not used here.

(02-13-2018 01:20 AM)jhaig99 Wrote:  I'm thinking the values in extended memory may be required for program execution.

I think there is a general misunderstanding regarding CAT 4 and extended memory. ;-)

(02-13-2018 01:20 AM)jhaig99 Wrote:  When I run Cat 1 it list program labels, then END 2188.

Since the total memory is 2233 bytes there are 45 bytes left. That's 6 registers and 4 bytes (so I wonder why you get 00 REG 07).

(02-13-2018 01:20 AM)jhaig99 Wrote:  I really think this V13 program is very sophisticated and have come to believe the data in the extended memory may be part of the program some how.

I suspect there are some errors when you entered the program so that it consumes more memory than it should. At least we now can say for sure that SIZE 026 defniitely is not possible with the program the way you entered it. I wonder if it really requires SIZE 026, so I'd like to see the part of the documentation that say thiat this is required.

Why don't you just set SIZE 007 and see if it runs?

Dieter

I tried size 007 but program will not run. The attachment I sent discusses the size 026 information.
Find all posts by this user
Quote this message in a reply
02-13-2018, 08:41 PM
Post: #19
RE: Programming issue HP41CX
(02-13-2018 07:45 AM)damaltor Wrote:  Remember to set SIZE to the maximum available number of registers after putting in the program. if that does not help, something might be mis-typed while copying the program (out of curiosity: What is this program? it seems to be huge!)

also if you want to test your memory, you can use this program:
http://calc.fjk.ch/hp-41-speichertest/

unfortunately you will have to clear all memory beforehand. :/

I have attached the program listing today. It is a process control valve sizing program for liquids, gases and vapors along with associated noise calculations in dBA for aerodynamic applications. The sizing uses Fisher Controls (Emerson) Universal Sizing equations with associated aerodynamic noise predictions and flow velocity.

More information on the attachment.
Find all posts by this user
Quote this message in a reply
02-13-2018, 08:45 PM
Post: #20
RE: Programming issue HP41CX
(02-13-2018 07:27 AM)Massimo Gnerucci Wrote:  
(02-13-2018 01:20 AM)jhaig99 Wrote:  I have two calculators, one a CV and the other a CX.

My catalog 4 (extended memory) on the CV has a lot of commands. i.e. *,/,+, -, ACOS, ADV, ASHF, ASN, etc. I did not put these there so not sure where they come from. They may be used in the program somehow to keep main memory usable. Both calculators did hold the program at some point.

No. Unless you put an XMEM module in the CV, it comes without any extended memory. What you see from CAT 4 is simply the output from CAT 3 (you may try with CAT 5, 6, etc. it is always the same) that is the list of 41's internal functions.

That said I can't help you in determining where your problem lies, sorry.

Can I put a quad memory module in my CV and get extended memory or is it to only boost the 41C to a CV?
Find all posts by this user
Quote this message in a reply
Post Reply 




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