Print
Published on by

# Same for the new Sandmath 2x2

In a past blog issued we gave Angel Martín’s indications on how to change the behavior of the %T function in the excellent ROM module Sandmath Lib.4. The method intended to be used with the HP41CL calculator.

In short, the %T function does not appear in the basic function set of either the HP41c or the newest HP41cl. There are a number of ways to implement it in either machine, one of them being the Sandmath module. However, its behavior there is different from that found in HP financial calculators. In them, the “total value”, stored in register Y, is not “consumed” by the function, as is the case with most binary functions. This way, you can clear the x register, disabling stack lift, enter then a new “part” number and continue calculation. I can attest that this behavior is very practical when doing financial analysis.

Angel Martin was extremely helpful in finding and offering a solution for my specific case, Sandmath Lib4 ROM module.

But if you want to perform the same change on the newest version of Sandmath (currently called 2x2), you need to change the memory address. The procedure would be as follows:

Copy the module to RAM. The location of the 4SMT module was 126 and 127 (is a two block module)

"148>840", YMCPY

"149>841", YMCPY

"14C>844”, YMCPY

"14D>845”, YMCPY

The byte to change is 0xpF44, relative to where you put it. So:

Step 1. introduce in Alpha the text: "840F44-1111"

Step 2. execute YPEEK. You should get "840F44-0369”. This is to check that the previous step did work, and that you’re operating on the right byte.

Step 3. modify the Alpha value to "840F44-0331"

Step 4. execute YPOKE.

Step 5. Plug it to the port of your choice (mine was 2):

"840-MAX”, PLUG4

And that should be all.