8080 Assembly Language Mnemonics

Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 3

Summary of 8080 Instructions ------- -- ---- -----------Abbreviations used in this Summary: R data PC SP RM BD BP RP Addr Any of the 8-Bit registers

A,B,C,D,E,H,L. Any 8-bit or 16-bit value. Program Counter. Stack Pointer. Register A,B,C,D,E,H,L or memory M pointed by HL. Either register pair BC or DE (B=BC, D=DE). Any byte pair symbol (B=BC, D=DE, H=HL, PSW=AF). Any register pair (B=BC, D=DE, H=HL, SP=SP). A 16-Byte address.

8-Bit Transfers MOV MVI LDA STA LDAX STAX RM1,RM2 RM,data Addr Addr BD BD Moves data from one register to another. Puts 8 bits into register, or memory. Puts 8 bits at location Addr into A Register. Stores 8 bits at location Addr. Loads A register with 8 bits from location in BC or DE. Stores A register at location in BC or DE.

16-Bit Transfers LHLD SHLD LXI PUSH POP XTHL SPHL PCHL XCHG Addr Addr RP,data BP BP Loads HL register with 16 bits found at Addr and Addr+1. Stores HL register contents at Addr and Addr+1. Loads 16 bits into B,D,H, or SP. Puts 16 bits of BP onto stack. SP=SP-2. Takes top of stack, puts it in BP. SP=SP+2. Exchanges HL with top of stack. Puts contents of HL into SP (stack pointer). Puts contents of HL into PC (program counter) [=JMP (HL]. Exchanges HL and DE.

8-Bit Arithmetic ADD SUB INR DCR CMP ANA ORA XRA ADI SUI CPI ANI ORI XRI DAA ADC ACI SBB SBI RM RM RM RM RM RM RM RM data data data data data data RM data RM data Adds contents of register R to A register. Subtracts contents of register R from A register. Increments register R by one. R=R+1. Decrements register R by one. R=R-1. Compares contents of R with A register. Logically ANDs contents of R with A register. Logically ORs contents of R with A register. Exclusive-OR contents of R with A register. Adds 8 bit data to contents of A register. Subtracts 8 bit data from contents of A register. Compares 8 bit data with contents of A register. Logically ORs 8 bit data with contents of A register. Logically ORs 8 bit data with contents of A register. Exclusive-OR 8 bit data with A register. Convert A register to packed Binary Coded Decimal. Add with carry. Add with carry immediate. Subtract with borrow. Subtract with borrow immediate.

16-Bit Arithmetic DAD INX DCX RP RP RP Adds contents of register RP to contents of HL register. Increments register RP. Decrements register RP.

Jumps, Calls, and Returns JMP Addr CALL Addr RET Unconditional Jump to location Addr. Unconditional Subroutine call to location Addr. Unconditional return from subroutine.

Conditional variations Flag condition -------------Nonzero Zero No Carry Carry Parity Odd Parity Even Plus Minus Rotations RAL RAR RLC RRC Other Instructions IN OUT CMC STC CMA HLT NOP DI EI RST RST RST RST RST RST RST RST 0 1 2 3 4 5 6 7 Port Port Data from Port placed in A register. Data from A register placed in Port. Complement Carry Flag. Set Carry Flag = 1. Complement A register. Halt CPU and wait for interrupt. No operation. Disable Interrupts. Enable Interrupts. Call Call Call Call Call Call Call Call 0000H. 0008H. 0010H. 0018H. 0020H. 0028H. 0030H. 0038H. Rotate Rotate Rotate Rotate Accumulator Accumulator Accumulator Accumulator Left: Bit0=C C=Bit7. Right: Bit7=C C=Bit0. Left thru Carry: Bit0=Bit7 C=Bit7. Right thru Carry: Bit7=Bit0 C=Bit0. Jump -----JNZ JZ JNC JC JPO JPE JP JM Call -----CNZ CZ CNC CC CPO CPE CP CM Return -----RNZ RZ RNC RC RPO RPE RP RM

Assembler Directives ORG Addr Begin Assembly at Addr.

END EQU SET IF ENDIF DB DW DS

Addr Exp Exp List List Exp

Causes Assembly to End. Define symbolic label. A label name must precede EQU. (For example, BDOS EQU 05H.) Set numeric constant. Conditional Assembly, if Exp<>0. End of Conditional Assembly. Define Bytes. May be Hex, ASCII, etc. Define Words. May be Hex, ASCII, etc. Define Storage of length Exp.

You might also like