108
109
then Goto 1 returns execution to Lbl 1.
Execution from Lbl 2 will display the sum that has been
stored in memory B. Actually, the display command “ ” is
inserted following B , but here it can be omitted.
The following illustration shows the flow of the program:
Count jumps
The count jumps cause the value in a specified memory to
be increased or decreased by 1. If the value does equal 0,
the following statement is skipped, and the statement
following the next “:” or “ ” is executed. The “lsz” command
is used to increase the value in memory by 1 and decide
the subsequent execution, while the “Dsz” command is
used to decrease the value by 1 and decide.
lsz
Dsz
Increase memory A by one............Isz A
A
Decrease memory B by one ..........Dsz B
Determine the average of 10 input
numeric values.
Program
1,0, ,A,:, 0 , ,C,:,
Lbl, 1,:,?, ,B,:,B,+,C, ,C,:,
Dsz, A,:,Goto,1,:,C,÷,1,0
32 steps
In this program, first 10 is stored in memory A , and 0 is
stored in memory C . Memory A is used as the “counter”
and countdown is performed the specified number of times
by the Dsz commmand. Memory C is used to store the sum
of the inputs, and so first must be cleared by inputting a 0.
The numeric value input in response to “ ? ” is stored in
memory B, and then the sum of the input values is stored
in memory C by “ B+C C”.
The statement Dsz A then decreases the value stored in
memory A by 1. If the result does not equal 0 , the following
statement, Goto 1 is executed. If the result equals 0, the
following Goto 1 is skipped and “C ÷ 10” is executed.
Содержание CA756
Страница 24: ...38 Parenthesis calculations...
Страница 27: ...41...
Страница 34: ...48...
Страница 36: ...50 Logarithmic and exponential functions The operations noted below cannot be performed in the BASE N mode...
Страница 40: ...54...
Страница 41: ...55 Fractions Fractions are input and displayed in the following order integer numerator denominator...
Страница 42: ...56...
Страница 45: ...59 Binary octal decimal hexadecimal conversions Negative expressions...
Страница 46: ...60 Basic arithmetic operations using binary octal decimal and hexadecimal values...
Страница 58: ...82 83 first...
Страница 79: ...125 124...
Страница 80: ...127 126...
Страница 81: ...129 128 Program Calculations...
Страница 82: ...131 130 Error Message Table...
Страница 83: ...133 132 Input Ranges of Functions...