HP Forums
ISG/ISZ switchover - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: General Forum (/forum-4.html)
+--- Thread: ISG/ISZ switchover (/thread-16683.html)



ISG/ISZ switchover - Matt Agajanian - 04-17-2021 08:06 PM

Hi all.

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

Thanks


RE: ISG/ISZ switchover - Paul Dale - 04-17-2021 11:14 PM

There isn't an exact equivalence.

Pauli


RE: ISG/ISZ switchover - Matt Agajanian - 04-17-2021 11:40 PM

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?


RE: ISG/ISZ switchover - Thomas Okken - 04-17-2021 11:44 PM

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



RE: ISG/ISZ switchover - Matt Agajanian - 04-17-2021 11:51 PM

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.


RE: ISG/ISZ switchover - Garth Wilson - 04-17-2021 11:58 PM

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.


RE: ISG/ISZ switchover - Thomas Okken - 04-18-2021 12:59 AM

(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.


RE: ISG/ISZ switchover - vassilisprevelakis - 04-18-2021 08:13 PM

(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