04-17-2021, 08:06 PM
04-17-2021, 11:14 PM
There isn't an exact equivalence.
Pauli
Pauli
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?
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?
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
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.
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.
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.
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