![Olivetti Programma 101 Reference Manual Download Page 35](http://html1.mh-extra.com/html/olivetti/programma-101/programma-101_reference-manual_3789955035.webp)
A/
Constants as Instructions
It is sometimes necessary to conserve registers for several accumulations and, therefore,
advisable to avoid storing constants in these registers. There is a method for generating
values within a program by converting the required number into computer instructions, one
for each digit.
These instructions are preceded by the instruction a! (AI r) and are entered as part of the
program.
When the computer carries out this special series of instructions. the value is generated in the
M register.
Before recording the program, the programmer generates the instructions for the required
value in the following manner:
1.
Turn PRINT PROGRAM switch ON (in).
2.
Turn RECORD PROGRAM switch OFF (out).
3.
Touch GENERAL RESET.
4.
Enter the value to be generated.
5.
Touch the Keys A
.
Repeat steps 3 through 5 for each value.
The computer will print the sequence of instructions that corresponds to the entered value.
Then the programmer enters these instructions as a part of the program, following the special
instruction a
(A/
); the special instruction must precede each value generated within the
program.
This method is primarily useful for values with few digits and/or utilized only once within a
program routine.
The following chart may be useful in writing constants into a program without utilizing the
Programma to convert the constant into instruction form.
R Positive digit
S
0
D Positive hi-order digit
1
F Negative digit
2
E Negative hi-order digit
3
/ decimal point, (included with
units position of the integer)
+
4
-
5
x
6
÷÷÷÷
7
8
*
9
EXAMPLE:
to generate 31.68 within a program the instructions would be:
A/
To start special series of instructions
R
8
R x
6
R/
1.
D
3 and to terminate special series of instructions.
Note that the value is generated starting with the least significant digit. The decimal locater
(1) is included with the instruction creating the units position of the integer.
- 35 -