Wang 700A, 700B Reference Manual

I
I
© WANG
LABORATORIES,
INC., 1970
01876
Telephone (617)
851-7all
TWX
110
343-6769
REFEREN~E
M:ANUAL
,
,
t,
FOREWORD
This reference manual is designed to provide the user with
a basic understanding and practical guidance
in
the
use
of
Wang's 700A/B Electronic Calculators.
The
aim has been to assist
the
user
by
presenting
the
most
useful technique, concept and
method
for utilizing
the
700
to
its best advantage.
For
further information,
contact
your
local sales office or
Wang Laboratories, Inc., 836
North
Street, Tewksbury,
Massachusetts 01876.
SECTION
I -
INTRODUCTION
SECTIONII-
EXPLANATIONOFKEYS
SECTION
III -
PROGRAMMING
SECTIONIV-
PROGRAM
CONCEPTS
SECTIONV-DECISION
COMMANDS
SECTIONVI-
PROGRAMMING
TECHNIUUES
USINGATAPE
CASSETTE
SECTION
VII-ADDITIONAL
COMMANDS
NOT
FOUNDONTHE
700
KEYBOARD
SECTION
VIII-TRIGONOMETRIC
PACKAGE
PROGRAM,
STATISTICAL
PACKAGE
PROGRAM
SECTIONIX-
SAMPLE
PROGRAMS
SECTIONX-WARRANTY,
SERVICE
AND
MAINTENANCE
TableofContents
TABLE
OF
CONTENTS
SECTION
I -
INTRODUCTION
Introduction
. . . . . .
1-1
SECTIONII-
EXPLANATION
OF
KEYS
ModesofOperation.
. . . . . . . . . . . . . . . . . . . . . . .
Run Mode . . . . . . . . . . . . . . . . . . . . . . . . .
..
.
Learn
Mode'.
. . . . . . . . . . . . . . . . . . . . . . . . .
.'
Learn-Print
Mode.
. . . . . . . . . . . . . . . . . . . . . . . .
List-Program
Mode
. . . . . . . . . . . . . . . . . . . . . . . .
Turning
the
700
ON.
. . . . . . . . . . . . . . . . . . . . . .
Non-Programmable
Key
. . . . . . . . . . . . . . . . . . . . . .
Prim
e . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Program
Counter
and
Set
PC . . . . . . . . . . . . . . . . . . . .
S
te
p.
. . . . . . . . . . . . . . . . . . . . .
..
. . . . . . .
Verify
Program
. . . . . . . . . . . . . . . . . . . . . . . . .
Record
Program
. . . . . . . . . . . . . . . . . . . . . . . . .
The
Display.
. . . . . . . . . . . . . . . . . . . . . . . . . .
X-
Register
. . . . . . . . . . . . . . . . . . . . . . . . . . .
En
tering
aNum
ber
. . . . . . . . . . . . . . . . . . . . . . . .
Set
Exp
. . . . . . . . . . . . . . . . . . . . . . . . . .
..
.
Y-Register . . . . . . . . . . . . . . . . . . . . . . . . .
..
.
Program-Error
Indicator
. . . . . . . . . . . . . . . . . . . . . .
Data
Storage
Registers.
. . . . . . . . . . . . . . . . . . . . . .
Direct
Addressing
. . . . . . . . . . . . . . . . . . . . . . . .
Toggle
Switches
and
Special
Function
Keys
. . . . . . . . . . . . . .
S
tore
Direct.
. . . . . . . . . . . . . . . . . . . . . . . . . .
Recall
Direct
. . . . . . . . . . . . . . . . . . . . . . . . . .
Exchange
Direct
. . . . . . . . . . . . . . . . . . . . . . . . .
Add,
Subtract,
Multiply,
and
Divide
Direct.
. . . . . . . . . . . . . .
Indirect
Addressing.
. . . . . . . . . . . . . . .. . . . . . . . .
Indirect
Keys
. . . . . . . . . . . . . . . . . . . . . . . . . .
AdvantagesofIndirect
Addressing
. . . . . . . . . . . . . . . . . .
Recall
Residue.
. . . . . . . . . . . . . . . . . . . . . . . . .
Addition,
Subtraction,
Multiplication.
. . . . . . . . . . . . . . . .
Division . . . . . . . . . . . . . . . . . . . . . . . . . .
..
.
Write
Commands.
. . . . . . . . . . . . . . . . . . . . . . . .
Group
I -
Group
2.
. . . . . . . . . . . . . . . . . . . . . . .
SECTION
III -
PROGRAMMING
Coding.
. . . . . . . . . . . . . . . . . . . . . . . . . . . .
GeneratingaCode
Using
Special
Function
Keys
and
Toggle
Switches
Core
Memory
. . . . . . . . . . . . . . . . . . . . . . . . . .
NumberofRegisters
Occupied
By a
Program
. . . . . . . . . . . . . .
SECTIONIV-
PROGRAM
CONCEPTS
Programming
Concepts
. . . . . . . . . . . . . . . . . . . . . .
Mark
and
Search
Commands
. . . . . . . . . . . . . . . . . . . .
Su
brou
tine
. . . . . . . . . . . . . . . . . . . . . . . . . . .
Double-Level
Subroutines
(oraSubroutine
withinaSubroutine)
. . . . . .
v
2-1 2-1 2-1 2-1 2-2 2-2
2-2
2-2
2-3
2-3
2-4
2-4
2-4
2-5
2-5
2-5
2-6
2-8
2-9
2-9
2-9
2-12
2-12
2-13
2-13
2-14 2-14 2-16 2-16 2-17
2-18
2-20 2-21
3-1
3-2
3-3
3-5
4-1
4-2
4-5
4-7
TableofContents
TABLE
OF
CONTENTS (Continued)
SECTION
V - DECISION
COMMANDS
DECISIONS.
. . . . . . . . . . . . . . . . . . . . . . . . . .
5-1
S
kipifY = X . . . . . . . . . . . . . . . . . . . . . . . . 5-1
Skip
if
Y > X . . . . . . . . . . . . . . . . . . . . . . . .
5-
2
SkipifY<X
5-3
Skip
if
Error
. . . . . . . . . . . . . . . . . . . . . . . . 5-3
PROGRAMMING
TECHNIQUES
. . . . . . . . . . . . . . . . . . 5-4
Looping
Using a
Counter.
. . . . . . . . . . . . . . . . . . . 5-4
Looping
WithoutaCounter.
. . . . . . . . . . . . . . . . . . 5-6
Scanning a
Table.
. . . . . . . . . . . . . . . . . . . . . . 5-8
Go
.. ..... .. .. ..... .. ..
. . . . . . .
.. .....
. .
..
. . . 5-9
SECTIONVI-
PROGRAMMING
TECHNIQUES USING A TAPE CASSETTE
Tape
Cassette . . . . . . . . . . . . . . . . . . . . . . . . . .
6-1
Tape
Drive
Operation
. . . . . . . . . . . . . . . . . . . . . . . 6-2
Machine-Error
Indicator
. . . . . . . . . . . . . . . . . . . . . . 6-2
ProtectionofProgramonTape
. . . . . . . . . . . . . . . . . . . 6-3
What
is
a Program Block? . . . . . . . . . . . . . . . . . . . . . 6-3
End
Program
. . . . . . . . . . . . . . . . . . . . . . . . . . 6-4
HowtoLearn
a Program
Into
Core
From
the
Keyboard.
. . . . . . . . . 6-5
HowtoTransfer
a Program
From
CoretoTape
. . . . . . . . . .
.,
6-6
HowtoLoad
a Program
From
Tape
into
Core.
. . . . . . . . . . . . . 6-7
Bypassing
Program
Blocks . . .
...
. . . . . . . . . . . . . . . . 6-8
Procedure
for
Correcting
Single
Program
Step.
. . . . . . . . . . . . . 6-8
Procedure
for
InsertingExtra
Program
Steps
. . . . . . . . . . . . . . 6-9
Programming
Techniques
Using
Tape
Cassette.
. . . . . . . . . . . . . 6-9
Creating a Multi-Block
Tape
. . . . . . . . . . . . . . . . . . . . 6-11
SECTION
VII
- ADDITIONAL
COMMANDS
NOT
FOUND
ON
THE
700
KEYBOARD
Pause
Command
. . . . . . . . . . . . . . . . . . . . . . . . .
7-1
Write
Alpha
Pause . . . . . . . . . . . . . . . . . .
..
. . . .
7-1
Storage
Commands
(Direct
Accesstoand
from
the
V-Register) . . . . . . . 7-2
Decisions.
. . . . . .
.'.
. . . . . . . . . . . . . . . . . . . 7-2
X-Register . . . . . . . . . . . . . . . . . . . . . . . . . 7-3
V-Register . . . . . . . . . . . . . . . . . . . . . . . . . 7-3
Shifting
Commands.
. . . . . . . . . . . . . . . . . . . . . . . 7-4
SECTION
VIII
- TRIGONOMETRIC
PACKAGE
PROGRAM
STATISTICAL PACKAGE
PROGRAM
Trig
Pack.
. . . . . . . . . . . . . . . . . . . . . . . . . . .
8-1
Speed
and
Accuracy
. . . . . . . . . . . . . . . . . . . . . . . 8-2
To
Load
the
Trig
Package . . . . . . . . . . . . . . . . . . . . . 8-2
Using
the
Trig Package . . . . . . . . . . . . . . . . . . . . . . 8-3
Program Use . . . . . . . . . . . . . . . . . . . . . . . . . . 8-4
Designofthe
Trig
Pack
. . . . . . . . . . . . . . . . . . . . . . 8-4
Statistical Package . . . . . . . . . . . . . . . . . . . . . . . .
8-
5
Assignment
of
Special
Operations
Key
for
a User's
Own
Subroutines.
. . . .
8-6
VI
!'.-
",
1
,_-
C
o
to,
,
,
t.
t:->·
~:<:
o
TableofContents
TABLE
OF
CONTENTS (Continued)
SECTION
IX
- SAMPLE PROGRAMS
Algebra
of
Complex Numbers (Program) .
9-1
SECTION X - WARRANTY, SERVICE AND MAINTENANCE
Warranty.
10-1
Post-Warranty Service Availability
10-1
Annual Maintenance
Contract.
.10-1
Post-Warranty Service Call Without Maintenance
Contract
10-1
In-House Maintenance Capability
10-2
APPENDIX
Typing Conventions
A-I
Index
A-4
..
Vll
RUN
LEARN
LEARN
LIST
PRINT
PROGRAM
i ,
I
RELEASEIIFORWARDIITAPE
Rl!ADYIIREWIND
I
o 0
PROGRAM
MACHINE
ERROR
ERROR
,
0000
BC4020
10
00
01
02 03 04 05 06 07
06 09
10
11
12
13
14
15
0
DEGREE
RADIANS
SINX
COSX
TANX
SIN-1 COS-I
TAN-
1
TO
POLARTORECT
SINHX
COSHX
TANHX
SINH-
1
COSti~
TANW'
0
TO
RADIANS
TO DEGREES
X
X X X
X
,.
....
,.
...
SKIP
WRITE
END
RECALL
~
,.
.....
,.
RECALL
CHANGE
{X
CLEAR
LOAD
ALPHA
ALPHA
INDIR
DIRECT
SIGN
X'
X
PROG
IF
MARK
PRIME
INDIR
DIRECT
ERROR
...
SKIP
STORE
STORE
END
VERIFY
7
B 9
RETURN
WRITE
l/X
INDIR
INDIR
DIRECT
DIRECT
-
PROG
IF
PROG
Y~X
INTEGER
RECALL
X
X
l
SKIP
Ixi
RESIDUE
INDIR
DIRECT
X
4 5
6
STOP
IF
GROUP
SET
X
Y=X
1
PC
-+
-
-
SKIP
lOx
LOG,.X
1T
INDIR
DIRECT
-
1
2
3
IF
GROUP
RECORD
Y<X
2
PROG
GO
eX
0
+
+
0
SET
SEARCH
STEP
LOG.X
INDIR
DIRECT
+
EXP
700A/B KEYBOARD
ILLUSTRATION
Section I
Introduction
SECTION I
INTRODUCTION
The
Wang 700isthe
ultimate solution
to
many calculating needs. Simpleorcomplex
calculations can be
done
right
at
the desk. The
700
keyboard is extremely simple to
operate. Once
the
fundamental
operations have been mastered, programming the 700
is
easy.
The
Wang 700isa self-contained programmable electronic calculator
constructed
with
integrated circuits on snap-in replaceable printed circuit modules.
The
700iscomposed
of
three basic elements:
1.
The
Central Processing Unit
2.
Read-Only Memory
3.
Core Memory
The
Central Processing
Unit
(CPU)
is
the
hardware which performs the arithmetic
operations.
The
Read-Only Memory guides
the
CPU in all its operations. In effect,
the
Read
Only Memory is
"the
brains"ofthe Wang 700.Itdirects all arithmetic and logical operations
on
the
700 and has been programmedtoperform all
the
functions found
on
the
67 keys
of
the
700
keyboard.
The
700
Core Memory is organized into 121or122
data
registers; plus a nixie display
of
the two work registers X and
Y;
120 registers can be used for
data
storage
or
program
storage. All user programs are executed from core memory.
The
trig functions are also
executed from core memory.
Section II explains
the
modes
of
operation on
the
700,aswell
as
the
five non-pro-
grammable keys; discusses
the
dual nixie-type display
readout
and
the
basic arithmetic
operations; explains direct and indirect addressing
of
the
data
storage registers; explains
the RECALL RESIDUE key
_.
a unique Wang feature
that
makes double-precision
arithmetic a simple
operationonthe 700.
The usefulness
of
the
Wang
700
comes from its programming capabilities. A program
is
simply a logical sequenceofsteps which
the
calculator can perform automatically over and
over again
on
different variables.Ifthe
calculationisto
be performed only once, it probably
is
simple enoughtodoitmanually
on
the keyboard. However,ifthe
same calculations are
tobedone
repeatedly, itisbeneficialtorecord and save
the
stepsofthe calculation in the
form
of
a program
and
let
the
calculator perform these repeated operations.
The
program
is
loaded into core and executed from core. Programs can also be stored
on
magnetic tape
for later use.
Sections III, IV,
V,
VI, and VII discuss various techniquestouse in programming the
Wang
700.
They
explain
how
to introduce a program into core memory and howtosave it
for later use
on
tape cassettes. Also,
they
explain how several partsofa program can share
the same
part
of
core memory. Section VIII discusses
the
TRIG
functions
of
the
Wang
1 - 1
Section I
Introduction
INTRODUCTION
700. Section
IX
gives an exampleofa
700
Program and
further
illustrates
the
concept
of
indirect addressing. Section X contains warranty, service, and maintenance information.
An appendix
is
included in this manual which covers typing conventions and contains an
index
to
help
the
user locate
with
ease certain itemsofinterest.
700A
-7008
700A
700B
PROGRAM
STEPS
960
960
.REGISTERS
000-119 120-121
* (Scratch Pad Only) 2 Level subroutine Drives 701
output
writer
000-119
120* (Storage Only) 5 Level subroutine Drives 701
Output
writer
702
Plotter
*The
700A
register
121
and
the
700B register 120 may be usedasscratch pads
onlyifsub-
routine
00-00 thru 01-15 are
not
accessed. When these subroutines are called
upon
the
Y
register
is
automatically stored in these registers.
1-2
Section
II
ExplanationofKeys
o 0
!lflllll
I
•••
0000
LEARN
LIST
PRINT
PROGRAM
LEARN
RUN
MODES
OF OPERATION
The
700
has
four
different modesofoperation.
The
four
lock-in switches located above the
toggle switches
on
the
700
keyboard are used
to
put
the
700
into
a certain
mode
of
operation.
RUN MODE
The
RUN MODE is used
for
most
700
operations. All keyboard calculations are done in
the RUN MODE.
In
fact, practically all operations
except
introducing a program
into
core
memory from
the
keyboard
are performedonthe
700 in the RUN MODE.
SECTION II
EXPLANATION
OF KEYS
LEARN MODE
The
700isput
into
LEARN MODE when a program istobe written
into
core. Every
programmable
key
which is indexed while
the
700
is in LEARN MODEis"learned"
or
recorded in core. In LEARN MODE
the
Y-Register is blanked and the X-Register displays
the program
step
number
and
the
program code storedatthat
step.
LEARN-PRINT MODE
The
LEARN-PRINT MODE and
the
LIST PROGRAM MODE are used
only
when the
output
writer is available.Inthe
LEARN-PRINT MODE,each key indexed is
"learned"
into
core
and
is also listed
Or
the
output
writer. As each
key
is indexed,
the
program step
number
and
the
program codeofthe
keyislisted
on
the
output
writer, giving
the
user a
hard
copyofhis program ashewrites it!
2-1
Section
II
ExplanationofKevs
LIST-PROGRAM MODE
When
the
700isput
in the LIST-PROGRAM MODE and the GO keyisdepressed, it
automatically lists the program steps and program code in increments
of
100
steps until
it
encounters
an END PROGRAM code.
The
LEARN-PRINT and LIST-PROGRAM modes
are discussed in greater detail in
the
701 OUTPUT WRITER MANUAL.
TURNING
THE
700
ON
The procedure for turning the 700onconsistsofthree steps:
1.
Turn power switch ON.
2.
Index
PRIME to initialize the system.
3.
Select
mode
of
operation. (In
most
instances the R UN
mode
will be selected.
Depress R UN
button.)
The
Wang
700
is nowinRUN MODE readytoperform
your
calculations.
NON
PROGRAMMABLE
KEYS
Becauseoftheir
function, there are five keys which
cannot
be programmedonthe Wang
700.
Eachofthese commandsisdiscussed briefly in this section. Alloftheir functions and
uses will
become
clear after reading
the
entire manual.
The
five
non
programmable keysonthe
700
are:
PRIME
DODD
I
II
II
II
I
0000
0
0
G
EJ
,
,
PRIME
VERIFY
PROG
SET
PC
.
RECORD
PROG
STEP
The
PRIME key initializes the
700
system and should always be depressed when
the
700isfirst
turned
on.Italso performs
the
following operations:
1.
Clears V-Registertozero.
2.
Clears X-Registertozero.
3. Sets
the
program
countertoStep 000.
4.
Resets program-error and machine-error indicators.
2-2
Section
/I
Explanation
of
Keys
The PRIME key should be depressed
when
the
700
is first
turned
on.
NOTE
The PRIME
key
should
notbedepressed when any operationisbeing executed.
If
the programisto be
stopped
during execution, the STEP
key
should
be used. This
will
stop
the program after
the
current stepisexecuted.
Also
indexing the PRIME
key
when RECORD PROGRAM
or
LOAD PROGRAM
commands
are being
executed
will cause
difficulty
with
the tape.
If
the PRIME
keyisindexed
accidentally during a RECORD PROGRAM or LOAD PROGRAM operation, the
operation
will be terminated immediately. However, the tape should be
rewound
before executing any
other
tape operations.
PROGRAM
COUNTER
AND
SET
PC
The
program
counterorPCisa
counter
which
counts
from
000to959.Itindicates which
program step
is
about
to
be executed.
At
all times,italways
pointstothe
next
program
step. Thus,
when
the
machine is performing step 108,
the
PCisalready
on
step 109.
The SET
PC
key
allows
the
usertoaddress and set
the
program
counter
with
the
next
three keystrokes.
SET
PC
018
This instruction sets
the
program
countertoprogram step
number
018.Toset
the
program
counter
requires
four
keystrokes: SET PC followed by three numeric keys. PRIME auto-
matically sets
the
program
countertostep
number
000.
STEP
The
STEP key allows
the
user
to
step
through
his program
one
stepata time.Ifthe
programisrunning when
the
STEP keyisindexed,
the
program
stopsatthe
stepitis
about
to execute. In
the
RUN MODE, depressing the STEP
key
will cause
the
700toperform
the
next
step in
the
program. Each time
the
STEP
key
is indexed,
the
next
program step will be
executed.
The GO key will take
the
700
out
of
the
stepping
mode
and
putitin
the
continuous
mode
executing
the
remaining steps in
the
program
until
a STOP
commandisencountered.
NOTE
In any 2-step
command
such
as
DIRECT ADDRESSING and WRITE ALPHA
commands, the GO
key
should
not
be depressedinthe middle
of
the 2-step
command. The entire 2-step
command
should be
executedinstep
mode
before
switching to the
continuous
mode.
This stepping featureisof
tremendous
value for debugging programs.
The
programmer
can
step
through
his program and locate his difficulty immediately.ByswitchingtoLEARN
2-3
Section
II
ExplanationofKeys
MODE
he
can
see
the
step
number
and
the
codeofthe
operationheis
abouttoexecute.
When
stepping
through
a program in
LEARN
MODE,
the
program
step
number
(the
PC)
and
the
program
code
of
the
operation
is displayed in
the
X-Register. However, in
LEARN
MODE
the
operationisnot
executed.
VERIFY
PROGRAM
The
VERIFY
PROGRAM
key
decimally adds
the
high-order
and
low-order
digitsofthe
program codes in core beginning
at
step
000
untilitencounters
an END
PROGRAM
code.
The
sum is displayed in
the
right-most digitsofthe
mantissaofthe
X-Register.
EXAMPLE
STEP
#
000 001 002 003 004
KEY MARK
0700
x
2
STOP END PROG
CODE 0408
0700 0713
0515
0512
If
this
programislocated
in core
and
the
VERIFY
PROGRAM
key
is depressed
the
sum
displayed in
X
is
59. 04
08 07
00
07
13
05
15
-
59
After
performing
this
operation,
the
PC is setatthe
step where
the
END
PROGRAM
command
is located. (Step
004inthis
example.)
Notice
the
code
for
END
PROGRAM
is
not
added
into
the
sum generatedbythe
VERIFY
PROGRAM
key.
RECORD
PROGRAM
This
key
transfers a program from coretomagnetic
tape.
The
PCisset
to
a specific
step
and
the
program steps startingatthis step are
transferredtothe
tape
untilanEND
PROGRAM
commandisreached.
The
END
PROGRAM
commandisthe
last step trans-
ferred
to
the
tape.
After
transferring
the
program
to
tape,
the
PCissettowhereitwas
originally
set
(i.e.,
the
first program steptobe
transferredtothe
tape).
The
five keys, PRIME, SET PC,
VERIFY
PROGRAM,
RECORD
PROGRAM
and
STEP are
the
only
keys
on
the
700
which
cannot
be used in a program.
Therefore,
when
anyofthese
keys
are
indexeditdoesn't
matter
whether
the
machine is in
LEARNorRUN
MODE.
THE
DISPLAY
The
display consists
of
two
work
registers, X
and
Y.
Both
the
X and Y Registers are
displayed simultaneously by easily readable half-inch
nixie-type
tubes. Each register has a +
sign
and
twelve digit mantissa followedbya two-digit
exponent
with a range
of
-99to+99.
2·4
+.
XXXXXXXXXXXX
+.
XXXXXXXXXXXX
\ I
mantissa
I
floating decimal
sign
of
mantissa
Section
/I
ExplanationofKeys
+ X X (Y-Register)
+ X X (X-Register)
\
'exponent
signofexponent
For
numbersinthe
range
.1~INI
< 1
000000000,
the
decimal
point
retains
its
natural
position.
When a
number
lies
outside
this
range,
the
decimal
automatically
relocatestothe
extreme
left,
and
the
exponent
of
the
power
of
lOis
indicated
correctly
in
modified
scientific
notation.
This
property
will
become
clear
after
a few
minutes
familiarization
with
the
keyboard.
(A few
numbers
and
how
they
appearinthe
display
are
given below.)
X-REGISTER
The
keys0,1, 2,
...
9 and
decimal
point
(.)
are used
for
enteringanumber
into
the
X-Register.
The
SETEXP
keyisusedtoset
the
exponent
valueofX.
The
CH SIGN
key
changes
the
algebraic signofthe
mantissaorexponent
of
X.
Indexinganumber
into
the
700
keyboardisas
simple as writing
the
number
down
on
paper.
The
normal
sequence
of
stepsisto
key in
the
mantissa
followed
by
the
SETEXP
key
and
the
valueofthe
exponent.
ENTERINGANUMBER
Index
the
following few
numbers
on
the
700
keyboard.
After
indexing
the
number
into
the
X-Register.
moveitto
the
Y-Registerbydepressing
the
t key.
NUMBER
SEQUENCE
OF
STEPS DISPLAY
a)
.152x10
21
1
5 2
SETEXP
2 1 t
.
.152000000000
+ 21
--
-
---
b)
6.62517x
10
-27
6 6 2 5 1
7
SETEXP
CHS
2 6
t
.662517000000-26
------
---
c)
-2534.5
2 5 3 4 . 5 CHS t
------
--
Or
-
2534.50000000
2 5 3 4 5 CHS
SETEXP
4 t
-----
--
d)
.0075
.0075t
------
Or
+.750000000000-02
7 5
SETEXP
CHS
2
t
--
--
Indexcanddboth
ways. Does
the
display
appear
differently?
Notice
example
b. Whyis26
enteredasthe
valueofthe
exponent?
SET EXP
The
SETEXP
keyisused
to
set
the
exponent
valueofX
with
the
next
two
successive
keystrokes.
The
SETEXP
key
automatically
aligns
the
decimal
point
in
the
left-most
positionofthe
X-Register: however,itdoes
not
blank
out
the
mantissa.
This
allows us
to
change
the
valueofthe
exponent
ofanumber
without
havingtokeyinthe
entire
number
agam.
2-5
Section
II
ExplanationofKeys
EXAMPLE
Index 1.75 x 10
23
Suppose
the
following sequenceofstepsisused:
1 . 7 5 SETEXP 2 3
Notice what happens to
the
decimal
point
when
the
SETEXP key
is
indexed.Itis
not
necessarytoindex the decimal
point,asthe SETEXP key automatically alignsitin
the
left
most position. The value
of
the
exponent
will also have
to
be indexed correctly.Ifthe
number
is in
proper
scientific
notation,
the valueofthe
exponentissimply increased by
1.
Thus,
the
correct sequenceofsteps would be:
CLEAR X 1 7 5 SETEXP 2 4
All numbers indexed after the SETEXP key simply changes
the
valueofthe
exponent.
Since
the
rangeofthe
exponentis-99
to
+99, normally only Ior2 numbers are indexed after
the
SETEXP key. However, if more
than
2 numbers are indexed, the
exponent
takesonthe
value
of
the
last 2 numbers entered.
EXAMPLE
If
the following sequenceofsteps is performed:
1.
1 2 SETEXP 2 3
4,
the valueofthe
exponentis34.
2.
For
SETEXP CHS 3
57,
the valueofthe
exponentis-57.
3.
For
SETEXP 5 0 2,
the
value
of
the
exponent
should be 2. However,
on
the
display
the
exponent
would be blanked
out
and the decimal
point
would assume
its
natural
position.
The
700
will remain in the SETEXP
mode
until a
non
numeric
key
or the decimal
point
key
is depressed.
V-REGISTER
The
Y-Registerisanother
work
register used in conjunction
with
the
X-Register for basic
arithmetic operations and
data
transfers. A
number
in the X-Register can easily be trans-
ferred
to
the
Y-Register by indexing
the
t key
or
~
t key.
KEYSTROKE
CLEAR X
f
~
U
+
x
OPERATION
Clears X-Register X
into
Y, X unchanged Y into X, Y unchanged X and Y exchanged Y
+X in
to
Y, X unchanged
Y-X
into
Y, X unchanged
Yx X into Y, X unchanged
2-6
2-7
Step
through
the
following
examplestofamiliarize
yourself
with
these
keyboard
operations.
Y+X
into
Y, X
unchanged
Absolute
valueofX
into
X, Y
unchanged
Disregards decimal
partofnumberinX
and
puts
integer
partofnumberinX, Y
unchanged
1/X
into
X, Y
unchanged
x2into
X, Y
unchanged
v'X
into
X, Y
unchanged
LOGloX
into
X, Y
unchanged
lOx
into
X, Y
unchanged
LOGeX
into
X, Y
unchanged
eX
into
X, Y
unchanged
rr
into
X, Y
unchanged
Section 1/
ExplanationofKeys
rr
!XI
INTX
l/X
EXAMPLE 3. Calculate 51 x
6.2
= +
62.0119219307
y'26'
1.51
t
1.51
t
2. 6 . 2 x
2.
2 6
vx
+
3. 2
6-vx
+
3.6
. 2 x
(AnswerinY,v126
in X)
(AnswerinY,
6.2
in X)
EXAMPLE 2. Calculate (5)2 - (20)2 +
(1/15)2
+V'70
= -
366.628955291
1.
CLEAR
X
2.
5 x
2
t
3.20
x
2
-
4. 1 5
l/x
x
2
+
5.70
vx+
(AnswerinY,v'70
in
X)
EXAMPLE
4.
A=rrr
2
r=.568x
10-
6
=
+.101355318827-11
1.5
6 8
SETEXP
6 CHS
2.
x
2
t
rr
3. X
(AnswerinY,rrin
X)
EXAMPLE
1.
Calculate.083+
17.86+32.2=
+50.1430000000
1.
PRIME
2.·.083~
3. 1
7.
8 6 +
4.3
2 . 2 +
(AnswerinY,
32.2inX)
vx
LOGloX
lOx
LOGeX
x
e
,
\
,
,
;i
.
Section
II
ExplanationofKeys
EXAMPLE 5. Calculate (12.8)?/3 = +
383.256852976
1.
1 2 . 8 LOGeX
1.
1 2 . 8 LOG! 0 X
2. t 7 x
or
2.'
7 x
3.3
+
3.3+
4. t
eX
(Answer in
X)
4.
~
lOX
(Answer in
X)
EXAMPLE 6. Reduce
t~e
angle 8650to
an equivalent angle less than
360
0
.
Formula
865 - INT
~865';
360
=equivalent
(145)
360
360
value
'.
- - /
1.
865
t
2.3
6 0 +
3.
tINT
(X)
4.-
5.3
6 0 x (Answer in Y,
360
in X)
EXAMPLE 7. Calculate
the
following:
a.
c = 2 T( r where r = .347 X
10-
5
=
.21802..xlO-
4
b.
M =
90
+ 87 + 68 + 77 =80.5
4
c.
y'"M+ 1 where M
is
the
answerof7 (b)
y'M
Answer =
8.984
...
Hint: Use+tkey
d. e
5.3
+ 10
5.7
+
T(2
=
501397.4...
e.
Log
(-.
2) What happens? Why? PRIME and find
vC3.
What happens? Why?
PROGRAM-ERROR
INDICATOR
There are two lights located
to
the
right
of
the
Special
Function
Keys
on
the 700
keyboard. These two lights are used
as
error
indicators.
The
one on the right indicates
MACHINE
ERROR;
the
one
on
the
left PROGRAM
ERROR.
The
MACHINE
ERROR
INDICATOR is discussed later.
The
PROGRAM
ERROR
INDICATORisturned
on
whenever an illegal
operation
is
performed (i.e., taking the logarithmorsquare
rootofa negative number,ordividing by
zero). Also,
if
a calculated result is greater
than
10
99
, the PROGRAM
ERROR
INDICATOR
will be
turned
on. Whenever
the
indicatorison,
the
arithmetic sign
of
the
X-Register
also flashes.
OPERATIONS WHICH TURN PROGRAM
ERROR
INDICATOR ON
Calculated result greater
than
10
99
Division by 0
y:::x
LOG!oXwhere
x<
0
(Overflow condition)
2·8
Section
II
ExplanationofKeys
Log e where
x<
0
Searching Non-Existent Flag (See page 4-3).
Addressing An Illegal Data Register (Any Register Greater
than
121) Program Overlaps Core (See BYPASSING PROGRAM BLOCKS page 6-8) Program Block
is
Missing
An
END PROGRAM
Instruction
(See
Definition
of
PROG RAM BLOCK(page 6-4)
The PRIME key
is
usedtoturn
the
PROGRAM
ERROR
INDICATOR off. In program-
Illing, a SKIP
IF
ERROR
commandisavailabletotest for this condition. Performing this
il'st will also
turn
the
indicator off.
DATA
STORAGE
REGISTERS
[n additiontothe
X and Y
work
registers, the Wang
700
hasupto
122 storage registers.
I
':ach
register has a 12-digit mantissa with sign and a two-digit
exponent
with sign.
The
registers are
numbered
consecutively from
000to121 and canbeaddressed
both
directly
;Ind
indirectly for
maximum
convenience. Numbers are stored from and recalledtothe
X-
Register. Each register can be usedtoadd, subtract, multiply and divide. Any
number
in
storage can be exchanged
or
swapped with any
numberinthe
X-Register.
DIRECT
ADDRESSING
Direct addressingofregisters requires a two-step command.
The
first keystroke indicates
lile
operation
(i.e.,
to
Store, Recall, Add, Subtract, Multiply, Divide,
or
Exchange).
The
second keystroke indicates
the
register in which the operationisto
be performed.Tostore a nllmber, simply index the control key STORE DIRECT followed by a second keystroke Identifying
the
register number.
TOGGLE
SWITCHES
AND
SPECIAL
FUNCTION
KEYS
Eqch register is represented by a combination
of
toggle switch settings and special
III
nction keys.
0000
80402010
00
01
02
03
04
05 06
07
08
09
10
11
12
13
14
15
••••
DODD
2-9
It
o 0
....
-_
~--
-"
..
''- "
..
--
'
2-10
Section
II
ExplanationofKeys
15
14
12
13
o 0
o 0
1 1
09
10
IltllllJ
I
Ii
II
II
, ,
~
. a .....
.
-~...,
DODD
DODD
••••
••••
:;:::::;::::::::::
00
01
02 03
Wf
05
06 07
08
09
10 1 1 1 213
14
1 5
;.:
.;.:-
:.:.:
<.:.
gg
01
02 03 04 05 06
••.•
·.0
.••.
:.1..................
08
..................
_---L_-'--_I....-..--L_--l.-_~=_---L_-'--_I....-__l._----L_..l.-----'L---'
0080
80402010
BoBO
80402010
Notice
the
toggle switch setting. When the07keyisindexed the register designated is 117
(80
+ 20 + 10 + 7). When the
00
keyisindexed the register designated
is
110 (80 + 20 +
10
+
0).
The
toggle switches are set
to
the
OFF
(down) position. When
the
toggle switches are
in
the
down
position,
the
special function keys designate
the
registers
000to015.
The
4
toggle switches are labeled 80, 40,
20
and 10. When
oneofthese toggle switches is switched
to
the
ON
(up)
position and a special function key is indexed,
the
register designated is the
sum
of
the
valuesofthe
toggle switches and
the
special
function
key.
(1)
Depressing the special function
key04while switch setting
(20)
is flicked ON designates
register
24
(20
+ 4).
(2)
o 0
o 0
CI
:::J
£=Ji
11
1
I
I[
II
Il~
.
. . - .
......
',.,
.
~
. ..
DODD
0000
••••
••••
00
01
:j!,III!
03
04
05
06
07 08
0910
1
1 1
2
13
1
4 1 5
00
01
02
03
04
05
06
07
08
09
10 11
i~~[·i:1
13 141
5
oong
80402010
Section
/I
ExplanationofKeys
2-11
oogo
80402010
(3) Designate Register32in
two
different ways:
One way
of
doing
this
wouldbeto
set
toggle switches20and10to
the
ON
(up)
position
and press
the
special
function
key
02.
Another
way is
the
following:
Set
toggle
switch
20inthe
up position and press
the12key. Notice
both
combinations
20 + 10 + 2
and
20
+ 12 designate register
32.
Thus,
different
combinationsoftoggle switch
settings
and
special
function
keys
can be usedtoidentify a particular register. However. in
J:'
-
_.'
,,,.
-
';~
,
-,<'-
Section
II
ExplanationofKeys
LEARN
MODE
the
program
code
designating Register32wouldbe0302or0212,
depend-
ing
on
which
method
was used.
STORE
DIRECT
To
storeanumber
in a register, simply
index
the
number
into
the
X-Register, press
the
STORE
DIRECT
key
followed by
the
register
number.
EXAMPLE
1:
EXAMPLE 2:
Store
1r2into
register 14
* Toggle switches
down
Index1rx2STORE
DIRECT
14
1r
2 is
now
stored
in register 14
andisstill
displayed in
the
X-Register.
Store
.57 x 1018into
Register
32 *Toggle switches20and 10 UP Index
5 7
SETEXP
1 8
----
--
STORE
DIRECT
02
.57 X 1018is
now
storedinRegister32and
is still displayed in
X.
i
*
NOTE
For problems requiring less than
17
storage registers and for general usage, the
toggle switches
are
kept
in
the OFF
(down)
position and the Special
Function
Keys are used to address Registers
000
to 015.
RECALL
DIRECT
RECALL
DIRECT
recalls the
number
from
the
designated register
into
the
X-Register.
The
number
appears in
the
X-Register
and
also remains in
the
storage register.
The
sequence
of
stepstofollow is
the
same as
with
STORE
DIRECT.
I
EXAMPLE: Recall1r2
from
register 14
Index
RECALL
DIRECT
14
1r2appears in
the
X-Register and is still
in
storage register 14.
2·12
Section
1/
ExplanationofKeys
~
-.....
DIRECT,
The
-:
DIRECT
key
is a
handy
command
which allows
the
operator
to
exchange
a
number
in
the
X-Register
withanumber
in anyofthe
storage registers.
The
command
simply swaps
the
valuesofthe
X-Register
and
the
internal register. Again
the
sequence
of
stepstofollow is
-:
DIRECT
followedbythe
desired register.
EXAMPLE:
Suppose
27.8 is in
the
X-Register
and
1f2
is
in Register 14.
To
store 27.8 in Register 14
and
reca1l1f2to
the
X-Register in
one
operation:
Index
~
DIRECT
14
+DIRECT
Adds
number
in
X-REGISTER
to
value
stored
in register designated by
next
keystroke.
TheXand
Y Registers remain
unchanged.
-DIRECT
Subtracts
numberInX-REGISTER
from value
stored
In register designated
by
next
keystroke.
TheXand
Y Registers
remain
unchanged.
XDIRECT
Multiplies
numberinX-REGISTER
by
value
stored
in register designated
by
next
keystroke.
TheXand
Y Registers
remain
unchanged.
-:-DIRECT
Divides
numberinX-REGISTER
into
number
stored
in register designated
by
next
keystroke.
TheXand
Y Registers
remain
unchanged.
What
happensifthe
same
operationisperformed
again?
ADD,
SUBTRACT,
MULTIPLY,
AND
DIVIDE
DIRECT
(The X and V Registers Remain Unchanged.)
In
addition
to
storingal2-digit
mantissa and a 2-digit
exponent,
the
registers
can
be
lIsed as
accumulators
to
add,
subtract,
multiply
and
divide. With
eachofthese
operations
the
resultisstored
in
the
designated register and
the
X-Register
and
Y-Register
remain
ullchanged.
The
four
arithmetic
operations
are'
A simple
example
will
illustrate
how
eachofthese
commands
works.
EXAMPLE:
Perform
the
following in Register 001
(13
x2)
+ 4
-3=7
3
1.
1 3
STORE
DIRECT
01
Places 13 in Register
01
--
and
the
X-Register
2.
2 X
DIRECT
01
This
sequenceofsteps
-
-
places
the
product
equal
to26in Register
Oland
2 remains
unchangedinthe
X-Register.
3. 4 +
DIRECT
01
Adds4to
the
Answer.
-
30isnowinRegister 01,
4 is
in
X-Register.
2-13
Section
II
ExplanationofKeys
4. 3 -;.-DIRECT 01
-
5. -
DIRECT
01
6.
RECALL
DIRECT
01
Divides
resultby3
pu
tting
lOin
Register 01,
3
remainsinX-Register.
Since
3 is in X
when
the
commandisgiven,
3 is
subtracted
from
10
putting
7 in
Register 01,
3 in X-Register.
Recalls final answer to
X. = 7
The
fact
that
the result is
put
in
the
storage register
rather
than
the X-Register can
be
extremely
usefulifwe are using a
constant
multiplierordivisor.
INDIRECT
ADDRESSING
In
addition
to
providing
direct
access
to
the
internal
storage registers,
the
Wang
700
offersanindirect
modeofaddress.
Both
display registers are utilized
for
indirect
addressing.
The
Y-Register designates
the
register being addressed. As
with
direct
addressing,
the
X-Register is used as
the
work
register.
The
commandisperformedonthe
number
in X
and
the
result
is placedinthe
internal
storage register.
Indirect
addressingisa valuable
programming
tool
for
saving program steps, especially in
repetitive
matrix-type
operations.
Remember,
indirect
addressing requires
only
one
step -
the
operation
itself.
The
register
on
which
the
operationisperformed
is identifiedbythe
number
in Y.
INDIRECT
KEYS
The
indirect
commands
are identicaltothose
usedindirect
addressing.
They
consist
of
the
following:
KEY
OPERATION
STORE
INDIRECT
Stores
number
in X
into
Register
designated by
numberinY.
RECALL
INDIRECT
Recalls
numbertoX from register
designated in Y.
Number
also remains
in register.
:>
INDIRECT
Swaps
number
in X
with
number
in
,
register designated by Y.
+
INDIRECT
Adds
number
in Xtonumber
in register
designated in Y.
The
sum is placed in
internal
register.
Number
in X remains
unchanged.
2-14
- INDIRECT
X INDIRECT
-;-
INDIRECT
Section /I
ExplanationofKeys
Subtracts
number
in X from
number
in
register designated in Y.
The differenceisplacedininternal register.
Number
in X remains unchanged. Multiplies
number
in Xbynumber
in
register designated in Y.
The
product
is
placed in internal register.
Number
in X remains unchanged.
Divides
number
in X
into
number
in
register designated in Y.
The
quotient
is
placed in internal register.
Number
in X remains unchanged.
The
following example illustrates
how
eachofthese commands
would
be used.
Example
Perform
the
following in Register
002
using
Indirect
modeofaddress.
7(5.8)-7.2
2+
3
=
126.951111110
3
KEY
,
2 t
--
7 ST
INDIR
-
5 . 8 X INDIR
-------
7 . 2 -
INDIR
---
3
-;-
INDIR
-
~
~INDIR
OPERATION
Places
the
register
numberinY (The
register
numberisusually
computed
in
the
program)
Stores 7 in register 002. The value
is
nowinboth
register
002
and
the
X
Register.
Multiplies the value
(7)
in
Register
002by5.8,putting
the
result in
002
and
5.8 remaining in
X.
Subtract
7.2 from the value in Register
002
and places result in Register 002.
7.2 remains in
X.
Divides
the
value in Register
002by3.
The
resultisput
in Register
002
and
3 remains in
X.
Exchanges 7(5.8) - 7.2 in Register
002
3
with3in
the X-Register.
Squares the value in
X.
2-15
:;.::-'
STEP
KEY
CODE
000
MARK
0408
1
0700
0700
2 0
0700
3
STIND
0504
4 1
0701
5
+
0600
6 1
0701
7 0
0700
8 0
0700
9
SKIP Y=X
0509
10
SEARCH
0407
11
0700
0700
12 STOP
0515
2-16
:t
...
~
-.
-
,-"
RECALL
RESIDUE
The
RECALL RESIDUE key is a unique Wang
700
feature which can beofgreat value
to
users who need greater
than
12 digit accuracy.
The
RECALL RESIDUE key gives the
· .
.
}
,-~
...
-"'~
~,
~
..
.'.).
~k'
·
.,......-
.
".-
.
-
~.
·
or·
·
~.
'.
.
,
.'
'..
"
, .
.,..
"~
"
.,
·
OPERATING PROCEDURE' PRIME GO
·,.'
FIGURE 1
+INDIR Adds 7(5.8) - 7.2 2
to
3 in Register
3
002. The resultisplaced in Register 002 and 7(5.8)
- 7.2 2 remains in
X.
3
ADVANTAGES
OF
INDIRECT
ADDRESSING
Two
advantagesofthe indirect
modeofaddressing are:
1.
It
requires only one keystroketoperform the indicated operation.
2.
By ,constructing a loop, a given program step sequence can operate on
many
different
setll
of
registers. A savingofmany program steps can result from this technique.
~.o:
RECALL INDIR Recalls final answer =
126.951111110
·
-;,.,
<
Section
II
ExplanationofKeys
,<
"
Figure Lis a simple program which illustrates
the
advantageofindirect addressing. The
,
.e.
program stored 0 in the first 100 registers. Using direct access a minimum
of
200 steps
-
.".:
would
betequired.
(Two keystrokes
per
register - STORE DIRECT followed by each
register
nufnber.)
In
contrast, this program requires only
13
stepstoaccomplish the same
thing. A savings
of
187 steps!
,
Section
11
ExplanationofKeys
user
the
optionofdouble precision
arithmetic
for addition, subtraction, multiplication, and
division performed
in
any
of
the
storage registers
or
the
X and Y registers. By indexing
the
RECALL RESIDUE key directly
after
performing
oneofthese operations,
another
12 digitsofaccuracyisacquired.
ADDITION,
SUBTRACTION,
MULTIPLICATION
When
the
RECALL RESIDUE
keyisindexed
after
performing an addition,
subtraction
or
multiplication, a residueisdisplayed in
the
X-Register, whichifaddedtothe
first 12
digits
of
the
result, gives an additional 12 digitsofaccuracy. Examples are giventoshow
how
the
RECALL
RESIDUE
keyisused
for
addition, subtraction,
and
multiplication.
EXAMPLE
1:
OPERATION DISPLAY
.
ADD ON
700
5024873058.28
5024873058.28
"+5024873058.28
-------------
t
+6.8520987
-
+
6.8520987
6.8520987
-------
--
5024873065.1320987
+
"+.502487306513 +10
-
~6.8520927
RESIDUE
+.502487306513
+10
+.209870000000
-02
By indexing
the
RECALL
RESIDUE
key,
the
significant digits which would ordinarily
be lost in
the
shifting process are retained.
The
final resultisalways
the
algebraic sum
of
the
values displayed.
In
subtraction, however,
the
residue
might
be opposite in signtothe
answer. This should
not
cause any difficulty since
the
residueisalways algebraically added to
the
result.
EXAMPLE 2:
SUBTRACT
OPERATION
DISPLAY
ON
700
,.
'.
"
45024873058.28
.
5024873058.28
5024873058.28
- - - - - - - - -
--
- -
t
~6.8520987
-
- 6.8520987
6.8520987
---------
tf..502487305143 +10
5024873051.4279013
-
-
~6.8520987
2-17
Loading...
+ 67 hidden pages