AutoSimp49 v1.1 by Steen S. Schmidt

August 5, 2001

 

Contents

Contents. 1

Disclaimer & Copyright 1

Credits. 1

Requirements & Installation. 1

AutoSimp49. 2

ASOn. 2

ASOff 3

AS?. 3

Revision History. 3

Disclaimer & Copyright

This program is freeware, but should be registered by sending me an email at SSchmidt@nospam.dk. This is merely so that I can track the use of my software – no licensing fee is necessary. You are free to distribute this program to anyone, as long as this document is included and they register by email as well.

I cannot take responsibility for any damage or data loss caused by this program – it is written in 100% SysRPL and there could be bugs in it. This also means that it will not run on the HP48 series.

If you have any suggestions, additions or find any bugs in the code, you’re welcome to contact me per the above-mentioned email. Please include details about ROM revision and flag settings if you’re reporting a bug.

Credits

The library is coded and compiled directly on the HP49G, which has proven to be a great tool for this too. A thanks goes to ACO for making it possible – including these programming tools on the calculator itself has made the job a lot easier.

Mr. Bernard Parisse (CAS author on the HP49G) has been a big help explaining his software to me. I have had especially great use of three pieces of software on the HP49G, which are Emacs, Keyman & Nosy.

Requirements & Installation

You need to copy the library (library #1131) to the calculator (with HPComm for example) and store it in a port (any port should do).

To store it in port 2 for example, you will need to recall the library to the stack, type 2 and STO.

 

 

Hold down ON and press F3, release both keys and the calc should warm boot (warning: you’ll loose all stack contents, but calc memory will remain intact). When this is done, your port 2 should contain the entry for the library (press left shift APPS to enter the Filer):

 

  à 

 

Running BYTES on the library on the stack should yield #362Fh and 971 bytes.

 

  à 

 

This document shows stack syntax for RPN mode, which is the only supported entry mode. There’s already a small amount of auto simplification in algebraic mode, so this program won’t be needed there.

AutoSimp49

This library enables auto simplification in RPN mode on the HP49G, which has been requested by several users (mostly people used to the TI89/92 I guess).

 

Auto simplification is achieved by applying EVAL to all symbolic arguments on level 1 of the stack, unless they have already been simplified. The program tracks the last 10 expressions, which have been simplified, to save time (or else auto simplification would slow the calculator down too much).

 

When auto simplification is turned on, the overhead of the program is maybe 70-80 ms.

 

This is in fact a trial program, so if you have any ideas for improvements or changes, please send me an email.

 

ASOn

Auto Simplification On command:

Turns auto simplification on.

 

Level 1

à

Level 1

 

à

 

 

Auto simplification on the HP49G is applied by vectored ENTER. Vectored ENTER is a feature on the HP48/49 line of calculators, that enables one to execute a series of programs when a key is pressed. These programs take care of the stack tracking and simplification process.

 

To enable vectored ENTER, one has to set flags –62 (user mode on) & -63 (Vectored ENTER on) and store a program in the two variables aENTER and bENTER in HOME. This program only uses bENTER. ASOn does all these things (including storing the auto simplification program in bENTER). When ASOn is invoked for the very first time, it can take a couple of seconds to execute. This is caused by ASOn sorting the order of variables in HOME so that bENTER is the last variable. Do not delete bENTER, or auto simplification will not work. Do not execute bENTER directly via the soft key, or unpredicted behaviour might occur (the calc will not crash, but things can disappear from the stack). If you temporarily needs to turn auto simplification off and on again, you can do this by toggling the user flag (left-shift ALPHA).

 

If any of these commands has just been executed, auto simplification is not performed:

 

EVAL, SIMPLIFY, DROP, DUP (including ENTER to duplicate level 1 of the stack), SWAP, OVER, NIP, PICK3, DUPDUP, ROT, ROLL, UNROT, ROLLD, REORDER, FACTOR, COLLECT, PROPFRAC, EXPAND, PARTFRAC.

 

Auto simplification is not performed if the interactive stack is used.

 

When executing programs on the stack with EVAL, no return values will of course get auto simplified (EVAL was the last command used – no commands internally from the program is tracked). If a program or any built-in command is executed with a soft key, only the symbolic in stack level 1 will get simplified, if more than one value is returned (DEPTH is not checked).

 

At the moment output from the equation writer is simplified.

 

If auto simplification doesn’t seem to work, execute ASOn again – something might have gotten deleted.

 

If the behaviour of auto simplification seems inappropriate, please contact me with a suggestion to change it.

 

ASOff

Auto Simplification Off command:

Turns auto simplification off.

 

Level 1

à

Level 1

 

à

 

 

ASOff does not delete bENTER, because then it’ll be much faster turning auto simplification on again (no need to sort variables). Instead another (harmless) program is stored in bENTER. ASOff does clear flag –63 (Vectored ENTER off), so that the calc will not try to perform auto simplification anymore. Flag –62 (user mode) is not touched.

 

AS?

Auto Simplification Test command:

Tests if auto simplification is on. Possible outputs are true or false, denoted by 1. or 0. respectively.

 

Level 1

à

Level 1

 

à

0. or 1.

 

AS? Checks if all conditions are met for auto simplification to work (are flags set, is the tracking process in order, does the bENTER program yield the correct checksum and so forth).

Revision History

v1.0:              Initial public release.

 

v1.1:              Added command AS?

                      Changed ASOff to not clear flag –62.