03-18-2018, 12:04 AM
Get 100 virtual registers instead of just 20!
These are STO and RCL commands to store a number between 0 and 99 in a virtual register numbered 0 to 99. I recommend using labels D and E because they are in the same columns as STO and RCL.
vRCL x
Recall a number from virtual register X. Notice how this affects the stack:
Before:
T: ?
Z: z
Y: y
X: Register number (0-99)
After:
T: z
Z: z
Y: y
X: Register content
y vSTO x
Stores Y in virtual register X. Unlike regular STO, this removes the value from the stack so if you need it again you'll have to vRCL it. This also destroys T:
Before:
T: ?
Z: z
Y: Data (0-99)
X: Register (0-99)
After:
T: Garbage
Z: z
Y: z
X: z
Only tested on the Android 11i simulator, but it should work on real devices (please comment if it doesn't):
These are STO and RCL commands to store a number between 0 and 99 in a virtual register numbered 0 to 99. I recommend using labels D and E because they are in the same columns as STO and RCL.
vRCL x
Recall a number from virtual register X. Notice how this affects the stack:
Before:
T: ?
Z: z
Y: y
X: Register number (0-99)
After:
T: z
Z: z
Y: y
X: Register content
y vSTO x
Stores Y in virtual register X. Unlike regular STO, this removes the value from the stack so if you need it again you'll have to vRCL it. This also destroys T:
Before:
T: ?
Z: z
Y: Data (0-99)
X: Register (0-99)
After:
T: Garbage
Z: z
Y: z
X: z
Only tested on the Android 11i simulator, but it should work on real devices (please comment if it doesn't):
Code:
LBL D
5
/
STO I
FRAC
10
*
10^x
RCL (i)
x><y
/
FRAC
+
2
10^x
/
GSB 0
RCL (i)
x><y
/
INT
+
GSB 0
*
STO (i)
R\/
RTN
LBL 0
RCL I
FRAC
10
*
2
+
10^x
RTN
LBL E
5
/
STO I
FRAC
10
*
2
+
10^x
RCL (i)
x><y
/
FRAC
2
10^x
*
INT
RTN