Altair 8800 User manual



ALTAIR
8800
OPERATOR~S
MANUAL
TABLE
OF
CONTENTS
PART
ONE:
Introduction
.
•.•........................
2
(Logia,
Electric
Logia,
Number
Systems,
The
Binary
System,
The
Octal System, Computer Programming, A
Simple Program, Computer Languages)
PART
TWO:
Organization
of
the
AZtair
.............
19
(Central Process.ing Unit,
Memory,
Cloak,
Input/Output)
PART
THREE:
Operation
of
the
Altair
......
......•.
28
(FPont Panel Switches and LED's, Loading a Sample Pro-
gram, Using
the
Memory,
Memory
Addressing, Operating
Hints)
PART
FOUR:
Altair
8800
Instruction
Set
.......•.••
42
(Corrunand
Instructions,
Single
Register
Instructions,
Register
Pair
Instructions,
Rotate
Aaaumulator
In-
struations)
APPENDIX:
Instruction
List
..
....................•
87
c:MITS,
Inc.,
1975
PRINTED
IN
U.S.A.
6328
LINN,
N.E., P.O. BOX 8636.,
ALBUQUERQUE,
N.M. 87108 U.S.A.
505/265-7553

2
PART
1
INTRODUCTION
Remarkable
advances in semiconductor technology
have
made
possible the development of the
ALTAIR
8800, the most eco-
nomical
computer ever
and
the
first
available
in both
kit
and
assembled
form.
The
heart of the
ALTAIR
8800
is
Intel
Corporation
1
s
Model
8080
Microcomputer, a complete Central
Processing Unit
on
a
single
silicon
chip. Fabricated with
N-channel
large
scale
integrated
circuit
(LSI) metal-oxide-
semiconductor
(MOS)
technology, Intel 1s
8080
Microcomputer
on
a chip represents a major technological breakthrough.
This operating
manual
has
been
prepared to acquaint both the
novice
and
the experienced computer user in the operation
of the
ALTAIR
8800.
The
computer
has
78
machine
language
instructions
and
is
capable of performing several important
operations not normally
available
with conventional mini-
computers. After reading
this
manual,
even
a novice will
be
able to load a
program
into
the
ALTAIR
8800.
Users of the
ALTAIR
8800 include persons with a strong
elec-
tronics
background
and
little
or
no
computer experience
and
persons with considerable
programming
experience
and
little
or
no
electronics
background. Accordingly,
this
manual
has
been
prepared with
all
types of users in
mind.
Part
1 of the
manual
prepares the user
for
better
under-
standing computer terminology, technology,
and
operation
with
an
introduction to conventional
and
electronic
logic,
a
description
of several important
number
systems, a
discus-
sion of basic programming,
and
a discourse
on
computer
lan-
guages.
Parts 2
and
3 in the
manual
describe the organization
and
operation of the
ALTAIR
8800.
Emphasis
is
placed
on
those
portions
of
the computer
most
frequently
utilized
by
the
user.
Finally,
Part
4 of the
manual
presents a
detailed
listing
of
the
ALTAIR
8BOO's
78
instructions.
An
Appendix
condenses the
instructions
into
a quick reference
listing.
Even
if
you
have
little
or
no
experience in computer oper-
ation
and
organization,
a careful reading of
this
manual
will prepare
you
for operating the
ALTAIR
8800.
As
you
gain experience with the machine,
you
will
soon
come
to un-
derstand
its
truly
incredible
versatility
and
data proces-
sing
capability.
Don't
be
discouraged
if
the
manual
seems
too complicated in places.
Just
remember
that
a computer
does only
what
its
programmer
instructs
it
to do.

A·
LOGIC
George
Boole, a ninteenth century
British
mathematician,
made
a
detailed
study
of
the
relationship
between
certain
fundamental
logical
expressions
and
their
arithmetic
coun-
terparts.
Boole did not equate mathematics with.
logic,
but
he
did
show
how
any
logical statement
can
be
analyzed with
simple
arithmetic
relationships.
In
1847,
Boole
published
a booklet
entitled
Mathematical Analysis of Logic
and
in
1854
he
published a
much
more
detailed
work
on
the
subject.
To
this
day,
all
practical
digital
computers
and
many
other
electronic
circuits
are based
upon
the logic concepts ex-
plained
by
Boole.
Boole's system
of
logic,
which
is
frequently
called
Boolean
algebra, assumes
that
a logic condition or statement
is
either
true
or
false.
It
cannot
be
both
true
and
false,
and
it
cannot
be
partially
true
or
partially
false.
For-
tunately,
electronic
circuits
are admirably
suited
for
this
type of
dual-state
operation.
If
a
circuit
in the
ON
state
is
said to
be
true
and
a
circuit
in the
OFF
state
is
said
to
be
false,
an
electronic
analogy
of
_a
logical statement
can
be
readily
synthesized.
With
this
in mind,
it
is
possible to devise
electronic
equi-
valents
for
the
three
basic logic statements:
AND,
OR
and
NOT.
The
AND
statement
is
true
if
and
only
if
either
or
all
of
its
logic conditions are
true.
A
NOT
statement merely
reverses the
meaning
of
a logic statement
so
that
a
true
statement
is
false
and
a
false
statement
is
true.
It's
easy to generate a simple equivalent of these
three
logic statements
by
using on-off switches. A switch
which
is
ON
is
said to
be
true
while a switch
which
is
OFF
is
said to
be
false.
Since a switch
which
is
OFF
will not
pass
an
electrical
current,
it
can
be
assigned a numerical
value
of
0.
Similarly,
a switch
which
is
ON
does pass
an
electrical
current
and
can
be
assigned a numerical value
of
1.
We
can
now
devise
an
electronic
equivalent
of
the
logical
AND
statement
by
examining the various permutations
for
a
two
condition
AND
statement:
3

4
CONDITIONS
(Inputs)
1. True
AND
True
2.
True
AND
False
3. False
AND
True
4.
False
AND
False
CONCLUSION
(Output)
True
False
False
False
The
electronic
ON-OFF
switch
equivalent
of
these permuta-
tions
is
simply:
CONDITIONS
(ON-OFF)
1.
---oo--.~,__----~o_..)o>----
2.
3.
~oo-----~o~)o~--
4.
~o~----v~~o---
CONCLUSION
(OUTPUT)
1
0
0
0
Similarly,
the
numerical
equivalents
of
these
permutations
is:
CONDITIONS
(Inputs)
1.
AND
1
2.
AND
0
3.
0
AND
1
4. 0
AND
0
CONCLUSION
(Output)
0
0
0
Digital design engineers
refer
to
these
table
of
permuta-
tions
as
truth
tables.
The
truth
table
for
the
AND
statement
with
two
conditions
is
usually
presented
thusly:

A B
OUT
1 1 1
0 1 0
1 0 0
0 0 0
FIGURE
1-1.
AND
Function Truth Table
It
is
now
possible to derive the
truth
tables
for the
OR
and
NOT
statements, and each
is
shown
in Figures 1-2
and
1-3
respectively.
A
B
OUT
1 1
l
0
1 1
1 0 1
0
0
0
FIGURE
1-2.
OR
Function Truth Table
A
OUT
1 0
0 1
FIGURE
1-3.
NOT
Function Truth Table
5

6
B.
ELECTRONIC
LOGIC
All
three of the basic logic functions
can
be
implemented
by
relatively
simple
transistor
circuits.
By
convention,
each
circuit
has
been
assigned a
symbol
to
assist
in design-
ing
logic systems.
The
three
symbols
along with
their
re-
spective
truth
tables are
shown
in Figure
1-4.
:~OUT
A
0
0
l
l
B
0
1
0
1
OUT
0
0
0
l
A
0
0
1
l
B
0
1
0
1
OUT
0
1
l
l
A~OUT
A
0
1
OUT
1
0
FIGURE
1-4.
The
Three
Main
Logic
Symbols
The
three basic loqic
circuits
can
be
combined
with
one
an-
other to produce
still
more
logic statement analogies.
Two
of
these
circuit
combinations are
used
so
frequently
that
they are considered basic logic
circuits
and
have
been
assign-
ed
their
own
logic
symbols
and
truth
tables.
These
circuits
are the
NANO
(NOT-AND)
and
the
NOR
(NOT-OR).
Figure
1-5
shows
the logic
symbols
and
truth
tables for these
circuits.
A
OUT
OUT
B
A
B
OUT
A B
OUT
0 0
l 0 0 l
0
1 1
0
1
0
1 0 1 1
0 0
l 1 0 1
1
0
FIGURE
1-5.
The
NANO
and
NOR
Circuits

Three
or
more
logic
circuits
make
a
logic
system.
One
of
the
most
basic
logic
systems
is
the
EXCLUSIVE-OR
circuit
shown
in Figure 1-6.
FIGURE
1-6.
The
EXCLUSIVE-OR
Circuit
The
EXCLUSIVE-OR
circuit
can
be
used to implement
logical
functions,
but
it
can also
be
used
to
add
two
input condi-
tions.
Since
electronic
logic
circuits
utilize
only
two
numerical
units,
0
and
1, they are compatible with the
bi-
nary
number
system, a
number
system
which
has
only
two
digits.
For
this
reason, the
EXCLUSIVE-OR
circuit
is
often
called
a
binary adder.
Various combinations
of
logic
circuits
can
be
used to imple-
ment
numerous
electronic
functions.
For
example,
two
NANO
circuits
can
be
connected
to
form
a
bistable
circuit
called
a
flip-flop.
Since the
flip-f)op
changes
state
only
when
an
incoming signal in the
form
of
a pulse
arrives,
it
acts
as a
short
term
memory
element. Several
flip-flops
can
be
cascaded together to
form
electronic
counters
and
memory
registers.
Other
logic
circuits
can
be
connected
together
to
form
mono-
stable
and
astable
circuits.
Monostable
circuits
occupy
one
of
two
states
unless
an
incoming pulse
is
received.
They
then occupy
an
opposite
state
for
a
brief
time
and
then
resume
their
normal
state.
Astable
circuits
continually
switch
back
and
forth
between
two
states.
7

8
(.
NUMBER
SYSTEMS
Probably because
he
found
it
convenient to count with his
fingers,
early
man
devised a
number
system
which
consisted
of ten
digits.
Number
systems,
however,
can
be
based
on
any
number
of
digits.
As
we
have
already seen,
dual-state
e-
lectronic
circuits
are highly compatible with a
two
digit
number
system,
and
its
digits
are termed
bits
(binary
digits).
Systems
based
upon
eight
and
sixteen are also compatible wlth
complex
electronic
logic systems
such
as
computers since
they provide a convenient shorthand
method
for expressing
lengthy binary
numbers.

D.
THE
BINARY
SYSTEM
Like
virtually
all
digital
computers, the
ALTAIR
8800
per-
forms nearly
all
operations in binary. A
typical
binary
number
processed
by
the computer incorporates
8-bits
and
may
appear
as:
10111010. A fixed length binary
number
such as
this
is
usually
ca
11
ed
a
word
or
byte,
and
computers are us-
ually
designed to process
and
store
a fixed
number
of
words
(or
bytes).
A binary
word
like
10111010
appears
totally
meaningless to
the novice.
But
since binary
utilizes
only
two
digits
(bits),
it
is
actually
much
simpler than the
familiar
and
tradition-
al decimal system.
To
see
why,
let's
derive the binary
e-
quivalents
for
the decimal
numbers
from
0 to
20.
We
will
do
this
by
simply adding 1
to
each successive
number
until
all
the
numbers
have
been
derived. Counting in
any
number
system
is
governed
by
one
basic
rule:
Record
successive
digits
for
each count in a column.
When
the
total
number
of
available
digits
has
been
used, begin a
new
column
to
the
left
of
the
first
and
resume
counting.
Counting
from
0
to
20
in binary
is
very easy since
there
are only
two
digits
(bits).
The
binary equivalent
of
the de-
cimal O
is
0.
Similarly,
the binary equivalent
of
the
deci-
mal
1
is
1. Since both
available
bits
have
now
been
used,
the binary count must incorpo.rate a
new
co
1
umn
to
form
the
binary equivalent
for
the decimal
2.
The
result
is
10.
(In-
cidentally,
ignore
any
resemblance between binary
and
deci-
mal
numbers. Binary 10
is
not decimal
10!)
The
binary
e-
quivalent
of
the decimal
number
3
is
11.
Both
bits
have
been
used
again,
so
a
third
column
must
be
started
to
obtain the
binary equivalent
for
the decimal
number
4 (100).
You
should
now
be
able to continue counting
and
derive
all
the remain-
ing binary equivalents
for
the decimal
numbers
0 to
20:
DECIMAL
0
1
2
3
BINARY
0
1
10
11
9

DECIMAL
BINARY
4 100
5 101
6
110
7
111
8 1000
9 l
001
10
l 010
11
1011
12 1100
13
1101
14 1110
10
15 1111
16 l 0000
17 10001
18 10010
19 l 0011
20 10100

A simple procedure
can
be
used
to convert a binary
number
into
its
decimal equivalent.
Each
bit
in a binary
number
indicates
by
which
power
of
two
the
number
is
to
be
raised.
The
sum
of
the
powers
of
two
gives the decimal equivalent
for the
number.
For
example, consider the binary
number
10011:
=
[(16) +
(0)
+
(0)
+
(2)
+
(l)]
19
11

12
E.
THE
OCTAL
SYSTEM
Since the binary system
has
only
two
bits,
it
doesn't
take
long to accumulate a long
string
of
Os
and
ls.
For
ex-
ample, a
six-digit
decimal
number
requires
19
bits.
Lengthy binary
numbers
can
be
simplified
by
dividing
them
into
groups
of
three
bits
and
assigning a decimal equiva-
1
ent
to each
3-bit
group. Since the highest
3-bit
binary
number
corresponds to the decimal 7,
eight
combinations of
Os
and
ls
are possible (0-7).
The
basic ALTAIR 8800 accepts a binary
input,
and
any
bi-
nary
number
loaded
into
the machine
can
be
simplified
into
octal
format.
Of
course the octal
numbers
must
be
changed
back
to
binary
for
entry
into
the computer, but since only
eight
bit
patterns
are involved the procedure
is
both sim-
ple
and
fast.
A typical binary
instruction
for the ALTAIR
8800
is:
11101010. This
instruction
can
be
converted to
octal
by
first
dividing the
number
into
groups
of
three
bits
beginning with the
least
significant
bit:
11
101
010.
Next, assign the decimal equivalent to each of the
three
bit
patterns:
11
3
101
5
010
2
Therefore,
11
101
010
in binary corresponds to
352
in oc-
tal.
To
permit rapid binary
to
octal conversion throughout
the remainder
of
this
manual,
most
binary
numbers
will
be
presented as groups
of
three
bits.

f.
COMPUTER
PROGRAMMING
As
will
become
apparent in
Part
2, the Central Processing
Unit
(CPU)
of
a computer
is
essentially
a network
of
logic
circuits
and
systems
whJse
interconnections
or
organization
can
be
changed
by
the user.
The
computer can
therefore
be
thought
of
as a piece
of
variable
hardware. Implementation
of
variations
in a computer's hardware...,-S-achieved with a
set
of
programmed
instructions
called
software.
The
software
instructions
for
the
ALTAIR 8800
must
be
load-
ed
into
the machine in the
form
of
sequential
8-bit
words
called
machine lanfuage. This
and
other
more
advanced
com-
puter
languages
wi
1 e discussed
later.
The
basics
of
computer
programming
are
quite
simple.
In
fact,
often
the
most
difficult
part
of
programming
is
de-
fining
the problem
you
wish to solve with the computer.
8elow
are
listed
the
three
main
steps
in generating a pro-
gram:
1. Defining
the
Problem
2.
Establishing
an
Approach
3. Writing the
Program
Once
the problem has
been
defined,
an
approach
to
its
so-
lution
can
be
developed. This
step
is
simplified
by
making
a diagram
which
shows
the
orderly,
step-by-step
solution
of
the
problem.
Such
a diagram
is
called
a flow diagram.
After
a flow diagram has
been
made,
the various
steps
can
be
translated
into
the computer's language. This
is
the
easiest
of
the
three
steps
since
all
you
need
is
a general
understanding
of
the
instructions
and
a
list
showing
each
instruction
and
its
machine language
equivalent.
The
~L1~1R
8800
has
an
extensive
programming
capability.
For example, a
program
can
cause data
to
be
transferred
be-
tween
the computer's
memory
and
the
CPU.
The
program can
even cause the computer to
make
logical
decisions.
For
example,
if
a
specified
condition
is
met,
the
computer
can
jump
from
one
place in the program
to
any
other
place
and
continue program execution
at
the
new
place.
Frequently
used
special
purpose programs
can
be
stored
in the
compu-
ter's
memory
for
later
retrieval
and
use
by
the
main
pro-
gram.
Such
a special purpose program
is
called
a
13

14
subroutine.
The
ALTAIR
8800
instructions
are described in
detail
in Part 4 of
this
manual.

G.
A
~IMPLE
PROGRAM
Assume
you
wish
to use the
ALTAIR
8800 to
add
two
numbers
located
at
two
different
memory
locations
and
store
the
result
elsewhere in the
memory.
Of
course
this
is
a very
simple problem, but
it
can
be
used
to
illustrate
several
basic
programming
techniques.
Here
are the steps used in
qenerating a
program
to solve
this
problem:
1. Define the Problem--Add
two
numbers
located in
memory
and
store
the
result
elsewhere in
memory.
2.
Establish
an
Approach--A flow diagram
can
now
be
generated:
Retrieve
Number
from
First
Memory
Location
',
Retrieve
Number
from
Second
Memory
Location
,,
Add
the
Two
Numbers
, I
Store the Result in
a
New
Memory
Location
15

16
3. Write the Program--Translating the flow diagram
into
a language or format
suitable
for
use
by
the
compu-
ter
may
seem
complicated
at
first.
However,
a general
knowledge
of
the computer's organization
and
operation
makes
the job simple.
In
this
case,
the four
part
flow
diagram
translates
into
five
separate
instructions:
Retrieve
Number
from
LOA
First
Memory
Location !
MOV
'/
Retrieve
Number
from
!
LOA
Second
Memory
Location
\/
Add
the
Two
Numbers
ADD
'IJ
Store the Result in
STA
a
New
Memory
Location
These
instructions
may
seem
meaningless
now,
but
their
meaning
and
application
will
become
much
clearer
as
you
proceed through
this
manual.
For
example, the
need
for
the
extra
instruction
(MOV)
will
become
more
obvious
after
you
learn
that
the computer
must
temporarily
store
the
first
number
retrieved
from
memory
in a special
CPU
memory
cal-
led a
register.
The
first
number
is
stored in the
regis-
ter
until
it
can
be
added
to the second
number.

H.
COMPUTER
LANGUAGES
The
software for
any
computer
must
be
entered
into
the
machine in the
form
of
binary
words
called
machine
lan-
~·
Machine
language programs are generally
written
~the
help of
mnemonics
which
correspond to the
bit
pat-
terns
for
various
instructions.
For
example,
10
000
111
is
an
add
instruction
for
the
ALTAIR
8800
and
the
corre-
sponding
mnemonic
is
ADD
A.
Obviously the
mnemonic
ADD
A
is
much
more
convenient to
remember
than
its
corresponding
machine language
bit
pattern.
Ultimately, however, the machine language
bit
pattern
for
each
instruction
must
be
entered
into
the computer
one
step
at
a time.
Some
instructions
may
require
more
than
one
binary
word.
For
example,
an
ALTAIR
RBOO
instruction
which
references a
memory
address such as
JMP
requires
one
word
for the actual
instruction
and
two
subsequent
words
for
the
memory
address.
Machine
language programs are normally entered
into
the
ALTAIR
8800
by
means
of
the
front
panel switches. A
com-
puter terminal
can
be
used to send the
mnemonics
signal
to the computer
where
it
is
converted
into
machine
language
by
a special
set
of
instructions
(software)
called
an
assembler.
Even
more
flexibility
is
offered
by
a highly
complex
soft-
ware
package
called
a compiler
which
converts higher order
mnemonics
into
machine language. Higher order
mnemonics
are a type
of
computer language shorthand
which
automati-
cally
replace as
many
as a
dozen
or
more
machine
language
instructions
with a
single,
easily
recognized
mnemonic.
Advanced
computer languages such as
FORTRAN,
BASIC,
COBAL,
and
others
make
use
of
a compiler.
The
higher computer languages provide a
great
deal
of
sim-
plification
when
writing computer programs,
particularly
those
that
are lengthy.
They
are also very easy to
remem-
ber.
The
potential
versatility
of
machine language pro-
17

18
gramming
should not
be
underestimated,
however,
and
an
excellent
way
to
realize
the
full
potential of a higher
language
is
to learn to apply
machine
language.
Table of contents
Other Altair Desktop manuals