Page 1 of 1

Multiple programs in a RAW file?

Posted: Sat Oct 24, 2020 5:26 am
by hsilop
I have just encoded a raft ( 23 ) of programs using the DM42 programming tool. Each is terminated by an END statement. On the DM42, a file like this could be loaded into calculator memory with all the programs being loaded at once. However, if seems the DM41X only loads the first program it finds in the raw file.

I could change the END statements to RTNs to work around this. But is there a better way?

Re: Multiple programs in a RAW file?

Posted: Sat Oct 24, 2020 5:48 am
by hsilop
So ... replaced all my END statements with RTN statements. The DM42 programming tool automatically generated a final END for me.

Now when I try to load the raw file the DM41X says "TRY AGAIN". I can't find any reference to this message in the user manual. So I guess I'll have to load them one-at-a-time!?

Re: Multiple programs in a RAW file?

Posted: Sat Oct 24, 2020 8:11 am
by Peet
hsilop wrote:
Sat Oct 24, 2020 5:26 am
I could change the END statements to RTNs to work around this. But is there a better way?
This is the regular way. The first mass storage device for the hp 41 was the magnetic card reader. RAW-File handling is very similar. If several small programs should be stored on one card, this was the only way to proceed because a new card was always expected after an END. You should avoid duplicate local labels and notice changes of registers.
hsilop wrote:
Sat Oct 24, 2020 5:48 am
The DM42 programming tool automatically generated a final END for me. ... So I guess I'll have to load them one-at-a-time!?
Yes. As one program like this example (stored on one card - if the RTN are ENDs the 41 wants 5 cards to store them):

LBL "PRON"
SF 21
RTN
LBL "PROFF"
CF 21
RTN
LBL "MAN"
CF 15
CF 16
RTN
LBL "NORM"
CF 15
SF 16
RTN
LBL "TRACE"
CF 16
SF 15
END

Re: Multiple programs in a RAW file?

Posted: Sun Oct 25, 2020 1:55 am
by hsilop
I cannot load any programs now! The TRY AGAIN error occurs every time.

Re: Multiple programs in a RAW file?

Posted: Sun Oct 25, 2020 2:25 am
by hsilop
Okay - had to hit the RESET button on the back to clear that error.

All working now - yay!

Re: Multiple programs in a RAW file?

Posted: Sun Oct 25, 2020 2:30 am
by HPMike
TRY AGAIN is not a DM41X error, it is an HP-41C error. See that manual for an explanation of its meaning.

Re: Multiple programs in a RAW file?

Posted: Sun Oct 25, 2020 2:44 am
by hsilop
Good idea!

TRY AGAIN means it has run out of program memory or you've tried to run SIZE with too large a value. Which is odd because there was no program in memory at the time. Perhaps my attempt to load multiple programs separated by END statements in one raw file did something odd to the memory configuration?

Re: Multiple programs in a RAW file?

Posted: Sun Oct 25, 2020 2:56 am
by HPMike
hsilop wrote:
Sun Oct 25, 2020 2:44 am
Good idea!

TRY AGAIN means it has run out of program memory or you've tried to run SIZE with too large a value. Which is odd because there was no program in memory at the time. Perhaps my attempt to load multiple programs separated by END statements in one raw file did something odd to the memory configuration?
It means you have tried to load a program that is too large to fit into allocated memory. You said you had 23 programs all grouped into a single RAW file, and when you attempted to load that file it may have been too large to fit into memory. You may have to reduce the number of registers in order to free up sufficient memory for your programs. Out of the box, the DM41X has SIZE = 100, which is 100 registers.

Re: Multiple programs in a RAW file?

Posted: Sun Oct 25, 2020 3:05 am
by hsilop
I wasn't REALLY a size problem. I have now successfully loaded the 23 programs in one raw file by separating them by RTN statements instead of END statements. Same size.

When I feel brave enough I will try and reproduce the error. I'm still getting everything setup the way I like it.