8086 Micro Processor instructions

35
Dr Vinita Kumari 8086 instructions

Transcript of 8086 Micro Processor instructions

Dr Vinita Kumari

8086 instructions

Arithmetic Instructions

ADD and ADC

Source may be an immediate number, a register

or a memory location specified by any one of the

24 addressing modes

The destination may be a register or memory

location

Source and destination both can not be memory

location

Note: For 8085, DCR instruction, used for both

register and memory. e.g DCR B, DCR M

Example:

NEG AL

NEG BX

NEG BYTE PTR [BX]-Replace byte at offset [BX] in DS with its 2’s complement

NEG WORD PTR [BP]- Replace word at offset [BP] in SS with its 2’s complement

CMP AL,01-

CMP BH, CL

CMP CX, TEMP_MIN- compare with word in CX with word in DS

CMP TEMP_MIN, CX

CMP PRICES[BX], 49H- Compare immediate 49H with byte at offset [BX] in array PRICES

MUL

MUL source

Multiplies an unsigned byte from source times an

unsigned byte in AL register or unsigned word in

AX register

Example

MUL BH- AL times BH, result in AX

MUL CX- AX times CX, result high word in DX,

low word in AX

MUL BYTE PTR [BX]- AL times byte in DS

pointed by [BX]

Logical Instructions

JA

JAE