INCREASING X by 1 is "ISG X", by 2 or 3 or 4?

INCREASING X by 1 is "ISG X", by 2 or 3 or 4?

Postby floppy_stuttgart » Sat May 07, 2022 3:36 pm

Hello,
for increasing X by 1 without moving the stack, we have the function "ISG X".
For increasing it by 2, we can do "ISG X" "ISG X".
Is anywhere another function to increase by 2 or 3?
example 3 would be: "ISG X" "ISG X" "ISG X" but it takes memory.
Any advise is welcome.
floppy_stuttgart
.........
.........
 
Posts: 88
Joined: Mon Mar 29, 2021 2:36 pm

Re: INCREASING X by 1 is "ISG X", by 2 or 3 or 4?

Postby pcscote » Sat May 07, 2022 7:06 pm

Not that I know of.
ISG structure is iiiii.fffcc where iiiii is counter value, fff is the counter test and cc is the increment value.
So, if X has 23.00005 and you do ISG X , it will increment X by 5 to 28.00005.
Remember that if used in a program, ISG will skip the next line when the fff condition is met.
Ref: HP-41C/CV Owner's Handbook and Programming Guide, Controlled Looping, page 163.
Sylvain
User avatar
pcscote
......
......
 
Posts: 22
Joined: Sat Oct 25, 2014 1:24 pm
Location: Quebec/Canada

Re: INCREASING X by 1 is "ISG X", by 2 or 3 or 4?

Postby floppy_stuttgart » Sun May 08, 2022 6:28 pm

Thanks. Increasing X by the value 3 could be (no movement of stack):
If so far the value "10" is in X (integer for making later for example STO IND Y), then
ISG X
""
ISG X
""
ISG X
""
would increase X by 3 and the stack has not moved.
Result in X would be 13.

Any other function like "ST3+" X would have been better (perhaps I must make it..).
Same for "ST2+" X
Increasing by 1 can stay
Code: Select all
ISG X
""


comments/remarks are welcome.

Background: having 10 in X mean for me, the content of register 10 is the first value of a quaternion (a quaternion has 4 parameters).
Accessing the other values of the quaternion would be done via increasing X with 1 then 2 then 3 in a program (and RCL IND X etc.).
floppy_stuttgart
.........
.........
 
Posts: 88
Joined: Mon Mar 29, 2021 2:36 pm

Re: INCREASING X by 1 is "ISG X", by 2 or 3 or 4?

Postby mike-stgt » Wed May 11, 2022 1:02 pm

floppy_stuttgart wrote:comments/remarks are welcome.

I assume it could be advantageous to keep in mind also other hypercomplex systems and save quaternion "objects" in vectors as offered by the HP-41 Advantage Advanced Solutions Pac. Incrementing/decrementing pointers would not need a NOP (saving more than 30%), and the "objects" would be somehow protected from accidental modification by underdone programming, as I did likewise with the "tape" data storage in my improvement of a Brainfuck interpreter on a HP15C.
mike-stgt
.........
.........
 
Posts: 132
Joined: Tue Dec 24, 2019 12:12 pm


Return to Programming

Who is online

Users browsing this forum: Bing [Bot] and 1 guest