8008 Assembler
The assembly language of the Intel 8008, the 8-bit microprocessor introduced in April 1972 whose three-letter mnemonics programmed the first microcomputers and whose register model runs through the 8080, Z80 and x86.
Created by Intel Corporation (architecture by Computer Terminal Corporation; chip led by Federico Faggin with Hal Feeney)
8008 Assembler is the assembly language of the Intel 8008, an 8-bit microprocessor Intel introduced in April 1972. The chip itself was hard to work with. It had an 18-pin package, a 14-bit address space of 16 KB and a call stack only seven levels deep, built into the chip. Even so, for many early users its assembly language was the first way they programmed an 8-bit microprocessor. Engineers wrote in it on time-sharing terminals, and hobbyists copied it by hand from books and magazines. It ran on some of the very first microcomputers: the French Micral N, the Canadian MCM/70, the SCELBI kits and the Mark-8. Intel’s mnemonics looked odd even then (LAB meant “load A from B”), and they did not last. The machine underneath did: seven registers named A, B, C, D, E, H and L, a memory pseudo-register M addressed through H and L, and four flags. That model carried into the 8080, then the Z80, and in altered form into x86.
History & Origins
A Terminal Processor on a Chip
The 8008’s instruction set was not designed at Intel. It came from Computer Terminal Corporation (CTC, later Datapoint) of San Antonio, Texas. According to Datapoint accounts, Victor Poor and Harry Pyle designed the architecture in late 1969 for CTC’s next programmable terminal. In December 1969 Intel’s Stan Mazor met with CTC. By Intel’s account, he proposed putting the whole processor on a single chip instead of building custom logic, and the project became the Intel 1201. Texas Instruments was also given the specification and built its own version, the TMX 1795, but CTC rejected it.
Intel’s chip ran late. CTC did not wait. It built the Datapoint 2200 with a serial processor made from TTL chips, and, according to one history, made its first sale on 25 May 1970 (other sources give a June 1970 announcement with units shipping in 1971). The 2200’s instruction set is essentially the one the 8008 would later implement. Development of the 1201 paused, then resumed in 1971 after Seiko expressed interest in it for a calculator. Federico Faggin, who had just finished the 4004, led the project, and Hal Feeney did the logic design and chip layout. A combined “HF” logo is reportedly etched on the die. By the time the chip worked, CTC had moved on to the faster, parallel Datapoint 2200 II. CTC left the design with Intel, which renamed it the 8008 and listed it in its catalog in April 1972 for $120.
The First Mnemonics
Intel’s April 1972 data sheet, titled 8008 8-Bit Parallel Central Processor Unit, already listed the instruction set as three-letter mnemonics. Each mnemonic was built from letters that name the operation and its operands:
Lr1r2loads register r1 from r2.LBAcopies A into B,LAMloads A from memory, andLMIloads an immediate byte into memory.ADr,ACr,SUr,SBr,NDr,XRr,ORrandCPrare the eight arithmetic and logic operations. A finalMorIselects memory or immediate data, as inADMorCPI.JFc/JTc,CFc/CTcandRFc/RTcjump, call or return if the flag c is False or True. The flags are C, Z, S and P, soJTZmeans “jump if zero” andRFCmeans “return if no carry”.INP,OUT,RST,HLT,RLC,RRC,RALandRARcomplete the set.
SCELBI’s 1975 programming book stated that it used the mnemonics “suggested by Intel Corporation,” so beginners would learn the same language as professionals.
Assembling on Borrowed Mainframes
The earliest 8008 programmers often had no machine that could run an assembler. Intel’s answer, documented in the November 1973 Rev 4 edition of the 8008 manual, was the MCS-8 Software Package:
- The 8008 Assembler, a two-pass cross-assembler “written in FORTRAN IV.” Customers could buy it from Intel on magnetic tape or use it through nationwide time-sharing services. The manual has operating guides for Tymshare’s PDP-10 system, where it ran as
RUN (UPL) ASM8, and for General Electric time-sharing. Output was a listing and a “BNPF” paper tape for programming 1601/1701-series PROMs. - INTERP/8, a FORTRAN simulator for testing 8008 programs without the hardware. Gary Kildall wrote it while working as a consultant for Intel.
- The SIM8 Hardware Assembler, a native assembler that ran on Intel’s SIM8-01 prototyping board with an ASR-33 Teletype. It shipped in eight 1702 PROMs, reportedly filling all of the board’s PROM sockets.
Also in 1973, Intel introduced the Intellec 8 development system, first shown at the June 1973 National Computer Conference, with “standard software” and a ROM monitor. Kildall created PL/M for Intel the same year, a high-level language whose first compiler targeted the 8008. The compiler ran on PDP-10 mainframes and produced machine code on paper tape for PROM programming.
Design Philosophy
The language matches the chip closely. That makes it very direct and also very restrictive:
- One way to reach memory. There is no instruction that loads from an address. To read or write memory, a program puts the address in H and L and then uses
Mas if it were a register. Every pointer operation is a sequence ofLHI/LLIloads followed byLrMorLMr. - Only 8-bit arithmetic. The 8008 has no 16-bit instructions. Adding to a 14-bit address means adding the low byte, then adding the high byte with carry (
ACM). - The stack is inside the chip. The processor keeps eight 14-bit address registers: the program counter plus seven return levels. There is no stack pointer, no push or pop, and no way to store data on the stack. Nesting subroutines more than seven deep silently overwrites return addresses.
- Loads do not set flags.
Linstructions leave the flags alone. Increments and decrements set zero, sign and parity but not carry. A program must compare or perform arithmetic before it can branch on a value it has just loaded. - Octal throughout. The instruction encoding is easiest to read in octal. In
LBA(octal310), the3means “load”,1is B and0is A. The Intel assembler therefore used octal constants with aBsuffix, such as135B, and SCELBI’s book listed every opcode as three octal digits.
Key Features
Registers and Flags
| Register | Size | Role |
|---|---|---|
| A | 8-bit | Accumulator; the result of every arithmetic and logic instruction |
| B, C, D, E | 8-bit | General-purpose registers |
| H, L | 8-bit | General registers that together form the memory address for M |
| PC + 7-level stack | 8 × 14-bit | Program counter and return addresses, stored on the chip |
| Flags | 4 bits | Carry, Zero, Sign, Parity (even) |
Increment and decrement work on B, C, D, E, H and L. A has no increment or decrement instruction. The 8008 has 8 input ports and 24 output ports. INP takes port numbers 0 to 7, and OUT takes octal 10 to 37.
The Intel Assembler’s Syntax
According to the 1973 specification:
- Each statement has four free-format fields: location (label), operation, operand and comment. A label must start in column 1.
- Symbols are one to six characters (A–Z, 0–9) and must start with a letter.
- Constants are decimal (0–16383) or octal with a trailing
B. Expressions support only+and-, with no parentheses. *stands for the current location, and*in column 1 marks a comment line.- The pseudo-instructions are
ORG,EQU,DEF(define data),DAD(define a two-byte address),ASB(paper-tape output) andEND. SHL addressis a four-byte assembler convenience that expands toLHIplusLLI, loading both halves of an address into H and L.
The routine below writes a zero-terminated message to an output port in the syntax of the 1973 specification. The port number is a placeholder: on real systems such as the SIM8-01 or SCELBI, the terminal interface differed from machine to machine.
| |
The message bytes are the ASCII codes for Hello, World! followed by carriage return and line feed. Note how a pointer increment takes three instructions (INL, JFZ, INH), because the chip has no 16-bit increment.
Interrupts Without a Place to Save State
Interrupts in the 8008 are only half implemented. When the INT line is raised, the processor waits for external hardware to “jam” an instruction onto the bus, usually a one-byte RST that calls one of eight fixed addresses (0, 10, 20 … 70 octal). But the 8008 can only write memory through H and L, so an interrupt handler has no way to save H and L, and without them it cannot save anything else. Designers attached extra hardware, such as the external stack Hal Chamberlin described in BYTE in October 1975, or did without interrupts entirely.
Speed in Context
Intel’s April 1972 data sheet states that, with a 500 kHz clock, the 8008 “executes non-memory referencing instructions in 20 microseconds.” The later 8008-1 was rated for clocks up to 800 kHz and was correspondingly faster; later data sheets reportedly quote about 12.5 µs. At 500 kHz each T-state is two clock cycles (4 µs), so a register-to-register load or ALU operation takes 5 T-states (about 20 µs). A memory reference takes 8 (about 32 µs), and a taken jump or call takes 11 (about 44 µs). Wikipedia’s Datapoint 2200 article gives a comparison based on CTC’s 1972 Datapoint 2200 Reference timing tables: the same small memory-copy routine moves roughly 1,479 bytes per second on a 500 kHz 8008. The serial Datapoint 2200 Version I manages about 374 bytes per second, slowed by its shift-register memory, and the parallel TTL Datapoint 2200 Version II about 9,615. In other words, in 1972 a processor on a single chip could beat its own serial TTL ancestor, but not a parallel TTL machine built from the same architecture.
Evolution
From the 8008 to the 8080 (1974)
Intel’s 8080, released in April 1974, kept the 8008’s registers, flags and M addressing. It added 16-bit register-pair operations, direct memory addressing, a stack pointer that put the stack in ordinary memory, and a full 16-bit address bus. The 8080 is not binary compatible with the 8008. Intel’s September 1975 8080 user’s manual still promised that “programs written for the 8008 can be assembled and executed on the 8080”. Every 8008 instruction has an 8080 equivalent, so source code could be translated even though the object code could not be reused.
New Mnemonics
The 8080 brought a new, more readable assembly syntax, with operands in separate fields as in MOV A,M and MVI. According to the documentation of Alfred Arnold’s portable Macroassembler AS, Intel also redefined the 8008’s own mnemonics in this style around 1975. AS supports both forms, as the separate targets 8008 and 8008NEW, because the two sets conflict and cannot be mixed. As a result, 8008 listings from the mid-1970s onward may use either dialect. SCELBI’s books and SCELBAL kept the original three-letter forms.
Second Sources
The 8008 was also manufactured outside Intel, including Siemens’s SAB8008, MicroSystems International’s MF8008 and, in East Germany, VEB Mikroelektronik Erfurt’s U808. All of them ran the same instruction set, so the assembly language was the same on every chip.
Current Relevance
The 8008 has been out of production for decades, which is why this encyclopedia lists 8008 Assembler as Historical. It remains accessible:
- Primary documents are online. Intel’s April 1972 data sheet, the Rev 4 user manual with the full assembler specification, the 1975 8080 manual and Wadsworth’s 1975 SCELBI book are all freely available as scans.
- A maintained cross-assembler. Macroassembler AS supports the 8008 with both the original and the “new” mnemonics, plus optional Z80-style syntax.
- Hobby restorations. At least one original Mark-8 has been restored to working condition, and SCELBI replica projects document the 8H hardware and software.
- The model lives on. Anyone who has written
MOV A,Mfor an 8080 orLD A,(HL)for a Z80 has used an addressing scheme first defined for the 8008.
Why It Matters
8008 assembly was one of the first languages written specifically for an 8-bit microprocessor, and Intel’s MCS-8 toolchain set the pattern for microprocessor software development: a cross-assembler on time-sharing systems, a simulator, and PROM programming. PL/M, one of the first high-level languages for a microprocessor, was written by Gary Kildall with the 8008 as its first target. The first commercial microcomputers, Micral N and MCM/70, and early kits such as SCELBI and the Mark-8, were programmed in it. The instruction set CTC designed for a desktop terminal passed through the 8008 and 8080 into the register names and little-endian byte order of the x86 processors in use today. 8008 assembly is where a program running on an x86 computer can trace its low-level ancestry.
Timeline
Notable Uses & Legacy
Micral N (R2E, France)
An 8008 microcomputer built for INRA's crop evapotranspiration measurements. It was delivered in January 1973 and offered for sale in February for FF 8,500. Its MIC 01 monitor and ASMIC 01 assembler were developed with a cross assembler on an Intertechnique Multi-8 minicomputer.
MCM/70 (Micro Computer Machines, Canada)
A desktop APL computer with the APL interpreter in ROM, running on an 8008. Kutt Systems received one of the earliest SIM8-01 boards in May 1972, and the team used Intel's FORTRAN-based INTERP/8 simulator while porting APL. Complete systems reached dealers in autumn 1974.
SCELBI-8H and SCELBAL
Nat Wadsworth's SCELBI Computer Consulting sold the 8008-based 8H kit in 1974. It followed with 8008 programming books and SCELBAL, a BASIC interpreter published in 1976 as a book of flowcharts and 8008 assembly source.
Mark-8 Minicomputer
Jonathan Titus's 8008 design was published in the July 1974 issue of Radio-Electronics as a build-it-yourself project. Popular Electronics had turned the design down, and reportedly answered it with its own computer project, the Altair 8800, six months later.
HP 2640A Terminal
Hewlett-Packard's 2640A terminal, introduced in November 1974, did almost all of its work in microprocessor firmware. HP's June 1975 journal describes a chip with 48 instruction types, a seven-level address stack and 16,384 bytes of address space, which is the 8008's specification.
Intel Intellec 8 and PL/M
Intel's own 8008 development system, with a ROM monitor and a standard software package. Gary Kildall's PL/M compiler (1973) originally generated 8008 code, and he also wrote Intel's INTERP/8 8008 simulator.