The Museum of HP Calculators

HP Forum Archive 15

[ Return to Index | Top of Index ]

Startup script for 49G+
Message #1 Posted by Tony on 6 July 2005, 9:52 a.m.

I want to have a particular User RPL program run automatically every time the calc is turned on. Can anybody tell me what I need to do?

Thanks.

Tony.

      
Re: Startup script for 49G+
Message #2 Posted by Raymond Del Tondo on 6 July 2005, 10:44 a.m.,
in response to message #1 by Tony

Hi,

store either the RPL program or better it's name into the variable STARTUP.

More info: comp.sys.hp48

Also try to RTFM;-)

Raymond

            
Re: Startup script for 49G+
Message #3 Posted by Arnaud Amiel on 6 July 2005, 10:54 a.m.,
in response to message #2 by Raymond Del Tondo

The question is not at Startup (RTFQ) but when turned on. To do this, you need to start your program like this << OFF ... >> and assign it to the OFF key

2: << OFF ... >>
1: 101.3
ASN
Then you need to get your calculator in user mode so it uses the new definition of the [OFF] key: -62 SF of [LS][ALPHA] until USR displays in the header. Also try asking questions on comp.sys.hp48 where people are more interested in the new hp calculators. Good luck

Arnaud

                  
Re: Startup script for 49G+
Message #4 Posted by Tony on 6 July 2005, 12:00 p.m.,
in response to message #3 by Arnaud Amiel

Arnaud: Thanks, that seems to work.

Raymond: I did RTFM and TFUG, but couldn't find anything there about this. Maybe you could tell me where I could find it, for future reference.

All: I get the hint; this is a museum. I'll try comp.sys.hp48 in future.

Thanks a lot.

Tony.

                        
Re: Startup script for 49G+
Message #5 Posted by Ron Ross on 6 July 2005, 12:52 p.m.,
in response to message #4 by Tony

Raymond is not being rude. He often answers questions in comp.sys.hp48 and you will see this when you visit there. It is just that experts here are more familiar with the older units (some are also very familiar with the newer ones too!). As such, you are best served by asking your questions there.

Another suggestion, visit hpcalc.org and download both the HP48G user's guide and more importantly, the Advanced User's Guide for the Hp48G series. This is a must have for any 48/49G owner.

                  
Re: Startup script for 49G+
Message #6 Posted by Raymond Del Tondo on 6 July 2005, 1:35 p.m.,
in response to message #3 by Arnaud Amiel

Hi Arnaud,

your program only works if the user explicitely
turns off the calc by pushing buttons.
If the calc turns off automatically then
the program won't be executed.

I'm not too deep in the 49g+, I have to admit;-)
My favourite machines are the HP-41 and HP-48.
But I thought the Startup var of the 4g series would be evaluated
every time the calc is turned on, not only after a warmststart.

If it's the latter case, then the Startup var seems to be of limited use.

Recently there was a thread (either here or in c.s.hp48)
related to this topic, where I suggested to use kinda
startup library, which can perform various tasks.
At least that's what I use on my HP-48;-)

Raymond

                        
Re: Startup script for 49G+
Message #7 Posted by Arnaud Amiel on 6 July 2005, 2:30 p.m.,
in response to message #6 by Raymond Del Tondo

Quote:
But I thought the Startup var of the 4g series would be evaluated
every time the calc is turned on, not only after a warmststart.

If it's the latter case, then the Startup var seems to be of limited use.

Recently there was a thread (either here or in c.s.hp48)
related to this topic, where I suggested to use kinda
startup library, which can perform various tasks.
At least that's what I use on my HP-48;-)


Yes, the STARTUP var only works after a warmstart so it would be equivalent to your libary solution for the 48. My startup on sets up the flags and few parameters I want to run with.

Arnaud

                        
Re: Startup script for 49G+
Message #8 Posted by Tony on 6 July 2005, 2:37 p.m.,
in response to message #6 by Raymond Del Tondo

I haven't been able to get the STARTUP variable (in the home directory) to have /any/ effect. Maybe I'm missing something.

Arnaud's solution is fine for my purposes; it's just a maintenance routine to clear out junk from the directories before I start work.

Tony.

                              
Re: Startup script for 49G+
Message #9 Posted by Arnaud Amiel on 6 July 2005, 3:16 p.m.,
in response to message #8 by Tony

Just store << "It is working" 'Test' STO >> in 'STARTUP' in your HOME directory. Restart your calculator with [ON][C] and you should see the effect.

Arnaud

                                    
Re: Startup script for 49G+
Message #10 Posted by Tony on 6 July 2005, 3:26 p.m.,
in response to message #9 by Arnaud Amiel

Ah yes, that works alright. Thanks.

Tony.

                              
Re: Startup script for 49G+
Message #11 Posted by James M. Prange (Michigan) on 6 July 2005, 3:38 p.m.,
in response to message #8 by Tony

STARTUP runs only after a "warmstart"; for examples, the hold down [ON] while pressing [C] combination, a "paper clip reset", or the ON.REBOOT operation from the [ON] and [F] combination; basically the same situations that configure libraries on a 49 series.

STARTUP is a good place to ATTACH libraries that aren't attached automatically by their $CONFIG routines, and also a good place to DETACH libraries that attach automatically if you don't want them routinely attached, as well as running any other commands that you want run at every warmstart.

Holding down the backspace key while warmstarting prevents both running STARTUP and configuring libraries. This is good for when you have a bad library or a STARTUP variable that cripples your calculator.

Note that the library configuration isn't done at every ON on the 49 series, as it is on the 48 series, and the 48 series doesn't recognize STARTUP as a reserved variable or the special action of backspace while warmstarting.

For information on STARTUP and other "reserved names" on the 49 series, see http://www.hpcalc.org/search.php?query=Reserved+names.

Regards,
James

                                    
Re: Startup script for 49G+
Message #12 Posted by Tony on 6 July 2005, 5:08 p.m.,
in response to message #11 by James M. Prange (Michigan)

That's a useful link. Thanks.

Tony.

                                          
Something all 49g+ owners should have in STARTUP
Message #13 Posted by Gene on 7 July 2005, 10:28 a.m.,
in response to message #12 by Tony

From Joe Horn:

"49g+ owners should set ->NDISP to 12, since the default is 9 which wastes some of the 49g+'s taller screen when the font is FONT7, FONT6, or the MINIFONT. Also, note that the ->NDISP setting is reset to 9 at every warmstart. Including << 12 ->NDISP >> in 'STARTUP' eliminates this problem."

9 works for the 48gII and the older 48G series. 12 is what the 49g+ should be set to.

Gene

                                                
Re: Something all 49g+ owners should have in STARTUP
Message #14 Posted by Arnaud Amiel on 7 July 2005, 11:07 a.m.,
in response to message #13 by Gene

Thanks for the tip but mine is set to 3 so I can still see the stack when I have big objects on it.

Arnaud

                        
Re: Startup script for 49G+
Message #15 Posted by James M. Prange (Michigan) on 6 July 2005, 5:34 p.m.,
in response to message #6 by Raymond Del Tondo

Edited for corrections. STARTOFF (if found in the path) is what the calculator executes when it reaches the inactivity timeout. It doesn't include turning off the calculator, so you have to explicitely include the OFF command in the program if you want it to do that.

Quote:
But I thought the Startup var of the 4g series would be evaluated
every time the calc is turned on, not only after a warmststart.

If it's the latter case, then the Startup var seems to be of limited use.


Indeed it's the latter, but there's a work-around. There's also a reserved variable STARTOFF, that's executed only when the 49 turns off automatically, either after the default 300 seconds or the ticks value stored in the TOFF reserved variable. STARTOFF is not evaluated when you press the OFF key.

So store a program to be executed at every turn-on in a variable named, say 'AUTOEXEC'.

Store the program

\<< OFF AUTOEXEC \>>
in STARTOFF.

Asssign

\<< STARTOFF \>>
to the OFF key, and turn on USER mode. This way the program will be executed regardless of which way the calculator turns off, as long as USER mode is active.

If you also want it to be executed when warmstarting, then include AUTOEXEC in the STARTUP program

Caution; not tested, but the above makes sense to me.

Quote:
Recently there was a thread (either here or in c.s.hp48)
related to this topic, where I suggested to use kinda
startup library, which can perform various tasks.
At least that's what I use on my HP-48;-)

Will that also work on the 49 series, where libraries aren't configured just by turning the calculator on?

Regards,
James

Edited: 6 July 2005, 7:44 p.m.

                              
Re: Startup script for 49G+
Message #16 Posted by Tony on 8 July 2005, 6:21 a.m.,
in response to message #15 by James M. Prange (Michigan)

That not only makes sense, but works very well!

Thanks.

Tony.


[ Return to Index | Top of Index ]

Go back to the main exhibit hall