Assembler (8080/8085)
The single assembly language Intel documented for both the 8080 and the 8085, from the 1974 mnemonics through the relocatable macro assembler of the ISIS-II era and the two 8085-only instructions, RIM and SIM.
Created by Intel Corporation
Assembler (8080/8085) is the name Intel gave to a single assembly language shared by two processors: the 8080 of April 1974 and the 8085 of March 1976. From 1977 onward Intel stopped publishing separate manuals for them and issued one book, the 8080/8085 Assembly Language Programming Manual, whose final revision (order number 9800301-04) is dated May 1981. That manual is the definitive statement of the language. It documents a mnemonic set that is almost entirely the 8080’s — MOV, MVI, LXI, DAD, JNZ, CALL, RET — plus exactly two instructions that exist only on the 8085, and it wraps them in a full macro assembler with conditional assembly, relocation and module linkage.
History and Origins
One instruction set, two chips
The 8080 established the register model and the mnemonics. The 8085, introduced in March 1976, was a repackaging rather than a redesign: a single +5 V supply instead of the 8080’s +5, −5 and +12 V, an on-chip clock generator and system controller that replaced the external 8224 and 8228, four new interrupt pins and a pair of serial data pins. Intel’s manual is blunt about what this means for the programmer: “The differences between the 8080 processor and the 8085 processor will be more obvious to the system designer than to the programmer. Except for two additional instructions, the 8085 instruction set is identical to and fully compatible with the 8080 instruction set.”
The two added instructions are SIM (Set Interrupt Mask) and RIM (Read Interrupt Mask), and both are multi-purpose. SIM writes an interrupt mask taken from the accumulator and can also send one bit out on the serial output pin; RIM reads the mask, the pending-interrupt state and one bit from the serial input pin back into the accumulator. Because each executes in four clock states against the ten the manual gives for IN and OUT, the serial pins can be driven and sampled in less than half the time of a port access. Intel’s instruction-summary diagrams mark them simply “8085 ONLY”.
Where the language was written down
The combined manual carries the copyright line “Copyright © 1977, 1978, 1979, 1981 Intel Corporation”, so the merged edition dates from 1977, the year Intel was also shipping the MCS-85 System Design Kit (the SDK-85 User’s Manual is dated July 1977) and the ICE-85 in-circuit emulator, which Electronics covered on 21 July 1977. Revision C of the manual is dated November 1978 and revision -04 May 1981.
The book documents the language; the companion ISIS-II 8080/8085 Macro Assembler Operator’s Manual (9800292) documents how to invoke the assembler, its controls, and its error messages. That split matters: things the manual calls “controls” — as opposed to instructions and directives — are not part of the language proper and vary between assembler versions.
The 1974 mnemonics, and who owned them
Every page of instruction reference in the 1981 manual footnotes “ALL MNEMONICS © 1974, 1975, 1976, 1977 INTEL CORPORATION.” Intel’s claim to own the mnemonics is the usual explanation for why the binary-compatible Zilog Z80 shipped with an entirely different assembly syntax, and it is the reason 8085 code and Z80 code look nothing alike despite assembling to overlapping opcodes. The one place where that overlap breaks down is instructive: the Z80 assigns two of its relative jumps to the opcodes the 8085 uses for RIM and SIM, so 8085 programs that touch the serial or interrupt-mask hardware cannot simply be run on a Z80.
The Language
Registers
The programming model is the 8080’s, unchanged. Seven 8-bit registers — A (the accumulator), B, C, D, E, H, L — pair up as BC, DE and HL, which Intel’s notation refers to by their first register only (B, D, H). A 16-bit stack pointer and program counter complete the picture, and the flags are Sign, Zero, Auxiliary Carry, Parity and Carry.
| Register or pair | Written as | Role |
|---|---|---|
| A + flags | PSW | Accumulator and program status word for PUSH/POP |
| B, C | B | General 16-bit pair; LDAX B / STAX B addressing |
| D, E | D | General 16-bit pair; LDAX D / STAX D addressing |
| H, L | H | The memory pointer; the byte it addresses is the pseudo-register M |
| SP | SP | Stack pointer, usable as the operand of DAD, INX, DCX, SPHL |
Sixteen-bit work is possible but limited. LXI loads a pair immediately, INX/DCX step it, DAD adds a pair to HL (and is the only 16-bit instruction that touches a flag, setting Carry), LHLD/SHLD load and store HL directly, XCHG swaps HL and DE, and XTHL exchanges HL with the top of the stack. DAD SP plus SPHL is enough to build and tear down stack frames, which is part of why PL/M and later C and Pascal compilers could target the chip at all. Subtraction of 16-bit values, comparison of signed integers, multiplication and division are all left to subroutines.
One flag difference to watch
The manual records a genuine incompatibility hidden inside the “fully compatible” claim: the logical AND instructions set the Auxiliary Carry flag differently. “The 8085 logical AND instructions always set the auxiliary flag ON. The 8080 logical AND instructions set the flag to reflect the logical OR of bit 3 of the values involved.” Code that follows an ANA/ANI with DAA can therefore behave differently on the two chips. Instruction timings also differ in both directions — INR, DCR and MOV r,r are faster on the 8085, INX, DCX and stack pushes slower — and untaken conditional jumps are three clocks quicker on the 8085 because it evaluates the condition while fetching the second byte and skips the third.
Statement format
A source line has up to four fields: label or name, opcode, operand, comment. Statements are one line each with no continuations.
- A label is one to six alphanumeric characters, the first of which must be a letter,
?or@, and it ends with a colon. (SET,EQUandMACROtake a name instead, terminated by a blank rather than a colon.) - Numeric constants take a base suffix:
Bbinary,OorQoctal,Dor nothing decimal,Hhexadecimal. A hexadecimal constant must begin with a digit, hence0BAH. $is the location counter, soJMP $+6is legal.- ASCII constants sit in single quotes, with a doubled quote standing for one quote:
DB 'TODAY''S DATE'. - A semicolon starts a comment; a doubled semicolon starts a macro-time comment that is not reproduced when the macro expands.
Assembly-time expressions
Expressions are evaluated as unsigned 16-bit values, modulo 64K, with no overflow detection. The manual groups the operators into five families:
| Family | Operators |
|---|---|
| Arithmetic | +, -, *, /, MOD |
| Shift | SHL, SHR (zero-filled, no wraparound) |
| Logical | NOT, AND, OR, XOR |
| Compare | EQ, NE, LT, LE, GT, GE, and NUL for missing macro parameters |
| Byte isolation | HIGH, LOW |
Compare operators yield all-ones for true and all-zeros for false, and the logical operators act on the least significant bit of the result, which makes both families natural arguments to IF. HIGH and LOW exist because the assembler treats every expression as a 16-bit address; when a relocatable or external symbol appears in an immediate instruction, one of them is mandatory, and omitting it gets you the low byte plus an error message.
Directives, relocation and macros
This is where the 8080/8085 assembler language goes well beyond the 1975 8080 manuals. Alongside EQU, SET, DB, DW, DS, ORG, IF/ELSE/ENDIF and END, the language defines a complete relocation and linkage vocabulary:
| Directive | Purpose |
|---|---|
ASEG, CSEG, DSEG | Select the absolute, code or data segment; CSEG/DSEG take a PAGE option |
PUBLIC | Export a symbol from this module |
EXTRN | Import a symbol defined in another module |
NAME | Name the object module |
STKLN | Declare how much stack the module needs |
Relocatable programs are assembled relative to address zero and bound to real addresses later, so symbols acquire an extra attribute — absolute or relocatable — that constrains how they may be combined in expressions. References to the registers, PSW, SP and M are always absolute, since they name hardware.
The macro facility is equally substantial: MACRO/ENDM with LOCAL for generated labels, REPT, IRP and IRPC for repetition, EXITM for early exit, nested definitions and nested calls, plus special operators — & for concatenation, <...> to pass a parameter containing commas or blanks, % to evaluate a parameter before substitution, ! to escape a delimiter.
Code Examples
The 8-bit multiply routine below is the worked example from Chapter 6 of the manual. The 8080 and 8085 have no multiply instruction, so the routine shifts and adds: D holds the multiplicand, C the multiplier on entry, and BC holds the 16-bit product on exit.
| |
The two 8085-only instructions look like this. SIM takes its operand from the accumulator, with bit 3 (“mask set enable”) deciding whether the low three mask bits are honoured and bit 6 deciding whether bit 7 is sent out on the serial output pin:
| |
A relocatable module that exports one entry point and calls into another module shows the linkage directives at work:
| |
Evolution
The undocumented 8085 instructions
While writing an 8085 assembler, Wolfgang Dehnhardt and Villy M. Sorensen discovered a set of opcodes that Intel had not documented, and published them as “Unspecified 8085 op codes enhance programming” in the January 1979 issue of Electronics. They are exactly the 16-bit operations the documented instruction set lacks: DSUB (HL ← HL − BC), ARHL (arithmetic right shift of HL), RDEL (rotate DE left through carry), LDHI and LDSI (DE ← HL or SP plus an 8-bit displacement), SHLX and LHLX (store and load HL through DE), RSTV (restart on overflow) and two jumps on an undocumented flag. Two extra flags, V (overflow) and UI, come with them. Stanley Mazor’s 2010 account in the IEEE Annals of the History of Computing says Intel made a late decision to leave ten of twelve new 8085 instructions undocumented so as not to complicate the 8086 then in development. At least one second source, Tundra Semiconductor, documented them anyway. Modern assemblers generally support them behind an explicit switch, because they do not exist on an 8080 and are not safe to assume on every 8085 clone.
From 8080/8085 to 8086
Intel designed the 8086’s assembly language to be reachable from this one. The register correspondence — A to AL, HL to BX, BC to CX, DE to DX — was deliberate, and Intel shipped CONV86, an ISIS-II tool whose operating instructions are dated March 1979, to convert 8080/8085 source into 8086 source. Digital Research’s XLT86 did the same job for CP/M-80 .ASM files heading to CP/M-86. Migration was at the source level, not the binary level, which is precisely what a well-specified assembly language buys you.
A long second life as a microcontroller language
The 8085 lost the desktop to the Z80 almost immediately, but it kept selling for embedded work for another two decades. Once designed into a product — the DEC VT102 terminal, the DECtape II controller, SAIA’s PCA1 programmable logic controllers — it stayed in production for that product’s lifetime. The CMOS 80C85 extended the range further into battery-powered and space applications, and Intel did not end production until around 2000. A Russian clone, the IM1821VM85A, was reportedly still being manufactured in 2016.
Current Relevance
Nobody starts a new design on an 8085, but the language remains in unusually wide circulation:
- Teaching. The 8085 is still reported to be a standard vehicle in introductory microprocessor courses, particularly in India, largely because the instruction set is small, the manual is complete and public, and the hardware model (three maskable vectored interrupts, a non-maskable TRAP, two serial pins) is simple enough to understand in full.
- Emulation and simulators. 8085 simulators are widely used for coursework, and the TRS-80 Model 100 and DEC terminal firmware communities disassemble and patch real 8085 ROMs.
- Maintained cross assemblers. Multi-target assemblers such as Alfred Arnold’s Macroassembler AS still assemble 8080/8085 source, with an option for the undocumented 8085 opcodes.
- Spaceflight heritage. The radiation-hardened 8085 flew on CRRES, Polar, FAST, Cluster, RHESSI, THEMIS and Sojourner, so 8085 assembly is part of the maintenance history of a generation of NASA and ESA instruments.
Why It Matters
The 8080/8085 manual is the moment a microprocessor assembly language stopped being a table of opcodes and became a documented programming system: a four-field grammar, a typed expression evaluator with a defined precedence, conditional assembly, a macro processor with parameter-escaping rules, and separate compilation with public and external symbols and a linker. Later Intel manuals for the 8086 and beyond inherited that structure almost directly.
The language also shows what backwards compatibility costs and buys. Intel added two instructions to an 8-bit processor and nothing else, documented the flag and timing differences honestly, sat on ten more instructions for strategic reasons, and gained a decade and a half of embedded design wins as a result. Code written for an Altair in 1975 would, the auxiliary-carry difference aside, still assemble and run on the processor that drove a Mars rover in 1997.
Timeline
Notable Uses & Legacy
Sojourner Mars rover (NASA/JPL, 1997)
JPL's Microrover Flight Experiment used a radiation-hardened 80C85 as its only processor. NASA's own description of the rover gives "an 80C85 rated at 100Kips" — a nominal instruction-rate rating rather than a measured benchmark — with 176 KB of PROM and 576 KB of RAM used "in a 16Kbyte page swapping fashion", performing I/O to "some 70 sensor channels" plus cameras, modem and motors.
TRS-80 Model 100 (Tandy/Kyocera/Microsoft, 1983)
Widely described as the first commercially successful notebook computer, it ran on a 2.4576 MHz CMOS 80C85 with its text editor, terminal program, scheduler and Microsoft BASIC all held in ROM. Reporters used it to file stories well into the 1990s, and its 32 KB ROM is still disassembled and patched by an active enthusiast community.
IBM System/23 Datamaster (1981)
IBM's small-business machine, released in July 1981, ran an 8085 at 3.07 MHz with 112 or 128 KB of ROM, bank-switched. Members of the Datamaster team went on to the IBM PC project, which was announced the following month.
Intel SDK-85 and Intellec/ISIS-II development systems
Intel's own toolchain defined the language in practice. The SDK-85 single-board kit (User's Manual dated July 1977) came with a ROM monitor and hex keypad, while ISIS-II development systems ran the 8080/8085 macro assembler documented in manual 9800292, with a linker and locator for relocatable modules.
DEC VT102 terminal and DECtape II controller
Once the 8085 was designed into DEC products in the late 1970s it stayed in production for the life of those products. The VT102 video terminal and the DECtape II controller ran 8085 firmware, an early example of the chip outliving its use as a general-purpose CPU by becoming an embedded controller.
Embedded control and industrial systems
The Swiss company SAIA used the 8085 and 8085-2 as the CPUs of its PCA1 programmable logic controllers during the 1980s, and Pro-Log sold 8085 STD Bus cards with its own alternative mnemonics on the supplied instruction reference card.