Alto Hardware Manual
Section 3: Emulator
14
These instructions are written by giving the mnemonic and the effective address notation:
JSR
SUBR
JMP
1,3
AC3
is
left
pOinting
to
the
location
after
this
one
Jump
to
AC(3)+1
ARITHMEfIC GROUP OPERATIONS
All
8
of
these instructions operate on the contents
of
the accumulators
and
the carry bit. Typically, a
binary operation involves the contents
of
the "source accumulator" (srcAc)
and
the "destination
accumulator"
(DeStAc)
and leaves the result in the destination accumulator. The carry
bit
(c
bit) and the
PC
can
also
be modified in the process.
The operation
of
the instructions
is
best explained
by
following the
flow
in
Figure
4.
The 16-bit contents
of
the source and destination accumulators are fetched and passed to the function generator.
The carry generator produces an output that depends on the value
of
the C bit and the
CY
field
of
the
instruction:
Mnemonic
CY
Output
none 0 C
Z
1 0
0
2
1
C
3
l-C
(Le.,
the complement
of
c).
The function generator
is
controlled by the
AFUnc
field; various values will be described below.
It
takes
two
16-bit numbers and a carry input and generates a 16-bit Result and a carryResult.
The shifter
is
controlled by the
SH
field in the instruction:
Mnemonic
SH
none 0
L 1
R
2
S 3
Action
No shifting; the
17
output bits are the same
as
the
17
input bits.
Rotate the
17
input bits left by one bit. This has the effect
of
rotating bit
o left into the carry position and the carry bit into bit 15.
Rotate the
17
bits right by one bit. Bit
15
is
rotated into the carry
position and the carry bit into bit
O.
Swap
the 8-bit halves
of
the 16-bit result. The carry is not affected.
The skip sensor tests various
of
the
17
bits presented to it and may cause a skip (pc+-PC+ 1)
if
an
appropriate condition
is
detected:
Mnemonic
SK
none 0
SKP
1
SZC
2
SNC 3
SZR 4
SNR 5
SEZ
6
SBN
7
Action
Never
skip
Always
skip
Skip
if
the carryResult is zero
Skip
if
the carryResult
is
non-zero
Skip
if
the 16-bit Result
is
zero
Skip
if
the 16-bit Result
is
non-zero
Skip
if
either carryResult
or
Result
is
zero
Skip
if
both carryResult and Result are non-zero