Hello,
Can anyone suggest a way to add a value to a variable that is as efficient as the C++ statement of i += 4?
I know there is the INCR statement that will add a value of one to the variable, but it does not allow for any other values.
The reason for this is:
i = i + 4 in C++ takes the value of the memory at i and copies it to the accumulator, then adds the 4 to it, then copies the new value back to the memory at i.
In i += 4, the code simply adds 4 to the memory location at the location i. Thus there is no double copying of the values.
I guess what I’m looking for or would like is the command INCR I BY 4
Thanks,
-------------
Colin Schmidt & James Duffy, Praxis Enterprises, Canada
Can anyone suggest a way to add a value to a variable that is as efficient as the C++ statement of i += 4?
I know there is the INCR statement that will add a value of one to the variable, but it does not allow for any other values.
The reason for this is:
i = i + 4 in C++ takes the value of the memory at i and copies it to the accumulator, then adds the 4 to it, then copies the new value back to the memory at i.
In i += 4, the code simply adds 4 to the memory location at the location i. Thus there is no double copying of the values.
I guess what I’m looking for or would like is the command INCR I BY 4
Thanks,
-------------
Colin Schmidt & James Duffy, Praxis Enterprises, Canada
Comment