EasyManuals Logo

Olivetti Programma 101 User Manual

Olivetti Programma 101
62 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #33 background imageLoading...
Page #33 background image
The Conditional Jump can not directly differentiate between a negative value and zero. If the A
register has a negative value, the distinction may be made by a two-test procedure:
1. The value of A is tested. If the jump occurs, this value is positive; if the jump does not
occur, the A
(absolute value) instruction is executed.
2. The value of A is again tested. If the jump occurs, the value is negative. If the jump does
not occur the value is zero. If necessary, the program can re-establish the initial algebraic
condition of A.
The following sample program is for a simple calculation, c = a - b, to illustrate conditional
jumps by testing for a +, -, or 0 value in the A register.
Starting point of program; reached by touching the key V. AV
Stop computer to enter value for a.S
Transfer value a to the A register.~
Stop computer to enter value for b.S
Subtract b from a, developing c in the A register.
Exchange c to the M register for retention.
Transfer c to the A register for testing.
If c > 0 jump to AN.
If c < 0 take absolute value of c.
If |c| > 0 jump to B/W.
If |c| = 0 space tape one line.
Return to starting point AV.
Entry to routine for |c| > 0.
Print negative c retained in the M register. Return to starting point AV.
Entry to routine for c > 0.
Print positive c in the A register.
Return to starting point AV.
- 33 -

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Olivetti Programma 101 and is the answer not in the manual?

Olivetti Programma 101 Specifications

General IconGeneral
BrandOlivetti
ModelProgramma 101
CategoryDesktop
LanguageEnglish

Related product manuals