828
Appendix A: System Routines — Math
TI
-
89 / TI
-
92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
push_shift
(continued)
Example:
If m indexes the bolded tag in the integer 256 (0b100000000) as follows
0 1 2
NONNEGATIVE_INTEGER_TAG
and n indexes the bolded tag in the integer one as follows
1 1
NONNEGATIVE_INTEGER_TAG
then
push_shift (m, n);
pushes 512 (0b1000000000) onto the estack such that
top_estack
points to the bolded tag as
follows.
0 2 2
NONNEGATIVE_INTEGER_TAG
If m indexes the bolded tag in the list {a, b, c} as follows
END_TAG C_VAR_TAG B_VAR_TAG A_VAR_TAG
LIST_TAG
and n indexes the bolded tag in the integer –1 as follows
1 1
NEGATIVE_INTEGER_TAG
then
push_shift (m, n);
pushes the right shifted list {undef, a, b} onto the estack such that
top_estack
points to the
bolded tag as follows.
END_TAG B_VAR_TAG A_VAR_TAG UNDEFINED_TAG
LIST_TAG
If m indexes the bolded tag in the string “hello” as follows
0 h e l l o 0
STR_DATA_TAG
and n indexes the bolded tag in the floating-point number 3. as follows
0x40 0x00 0x30 0x00 0x00 0x00 0x00 0x00 0x00
FLOAT_TAG
then
push_shift (m, n);
pushes the left shifted string “lo ” onto the estack such that
top_estack
points to the bolded
tag as follows.
0 l o
ï
ï
ï
0
STR_DATA_TAG