HP Forums

Full Version: ISG/ISZ switchover
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi all.

Since ISZ has been replaced with ISG, what is a programming code that is the equivalent of ISZ?

Thanks
There isn't an exact equivalence.

Pauli
In that case, is there a programming trick?

I’m thinking something like this:

Say you want to loop five times:

Place 0.00400 in the loop register.

That way 0 to 4 is five times. Thus when ISG increments the loop register to 5, 5 is great than 4 (.004), so the loop would exit without executing the procedure/equation a sixth time.

Logical?
If you just want to execute a loop n times, wouldn't you be using DSZ, not ISZ? In that case, you can use DSE instead of DSZ:

Code:
5
STO 00
LBL 00
[...]
DSE 00
GTO 00
True. ISG’s gotta be good for something though. Didn’t want to stuff ISG in the back of a drawer ignored and never to be used.
I don't see which calc we're talking about; but if it's the 41, Angel's WarpCore module has ISLEX, Increment and Skip if Equal on the value in X.
(04-17-2021 11:51 PM)Matt Agajanian Wrote: [ -> ]True. ISG’s gotta be good for something though. Didn’t want to stuff ISG in the back of a drawer ignored and never to be used.

You use ISG when you need to count up, not down. But DSE saves a few bytes if you just want to execute a loop n times, and don't care what the value of the loop counter is. (Or if you specifically need it to be n, n-1, ..., 2, 1.)

So if the loop counter should go from 5 to 1, use 5 STO 00 ... DSE 00; and if the loop counter should go from 1 to 5, use 1.005 STO 00 ... ISG 00.
(04-17-2021 11:58 PM)Garth Wilson Wrote: [ -> ]I don't see which calc we're talking about; but if it's the 41, Angel's WarpCore module has ISLEX, Increment and Skip if Equal on the value in X.
If we are talking about the HP-41, then there is the 7ISZ (and the corresponding 7DSZ) from the card reader ROM.

**vp
http://www.series80.org
Reference URL's