instruction set of 8086 diu cse

24
WELCOME To Our Presentation

Upload: salmancreation

Post on 16-Apr-2017

156 views

Category:

Engineering


5 download

TRANSCRIPT

Page 1: Instruction Set Of 8086 DIU CSE

WELCOME

To Our Presentation

Page 2: Instruction Set Of 8086 DIU CSE

Presenting To

Our Honorable Teacher

LECTURERDAFFODIL INTERNATIONAL UNIVERSITY

Page 3: Instruction Set Of 8086 DIU CSE

PRESENTED BYNAME

Md.Masud ParvazeNiritha RatriSalman Ahmed Tanzil mahbubMahima Akter

ID Number

151-15-5203151-15-5015151-15-5418151-15-5502151-15-3194

Page 4: Instruction Set Of 8086 DIU CSE

INSTRUCTION SET OF 8086

Page 5: Instruction Set Of 8086 DIU CSE

WHAT IS IT ?

Page 6: Instruction Set Of 8086 DIU CSE

Classification of Instruction Set

Data Transfer InstructionsArithmetic InstructionsBit Manipulation InstructionsProgram Execution Transfer InstructionsString InstructionsProcessor Control Instructions

Page 7: Instruction Set Of 8086 DIU CSE

Data Transfer Instructions

Page 8: Instruction Set Of 8086 DIU CSE

Data Transfer InstructionsMOV Des, Src

MOV CX, 037HXCHG Des, Src

XCHG CX,BXPUSH Operand

PUSH BXPOP Des

POP AX8

Page 9: Instruction Set Of 8086 DIU CSE

Data Transfer InstructionsLEA Register, Src

LEA BX, [DI]

LDS Des, Src LDS BX, [0301 H]

LES Des, SrcLES BX, [0301 H]

• PUSHF

• POPF 9

Page 10: Instruction Set Of 8086 DIU CSE

Arithmetic Instructions

Page 11: Instruction Set Of 8086 DIU CSE

Arithmetic InstructionsADD Des, Src

ADD AL, 74HADC Des, Src

ADC AL, 74HSUB Des, Src

SUB AL, 74HSBB Des, Src

SBB AL, 74H11

Page 12: Instruction Set Of 8086 DIU CSE

Arithmetic Instructions INC Src

INC AX

DEC Src

DEC AX

NEG Src

MUL Src

AX = AL * Src

DX : AX = AX * Src

DIV Src

CMP Des, Src12

Page 13: Instruction Set Of 8086 DIU CSE

Program Execution Transfer Instructions

Page 14: Instruction Set Of 8086 DIU CSE

Program Execution Transfer Instructions

These instructions cause change in the sequence of the execution of instruction.

This change can be through a condition or sometimes unconditional.

The conditions are represented by flags.

14

Page 15: Instruction Set Of 8086 DIU CSE

Program Execution Transfer Instructions

• CALL Des:• This instruction is used to call a procedure.• The address of next instruction after CALL is saved onto stack.

• RET:• It returns the control from procedure to calling program.• Every CALL instruction should have a RET.

• JMP Des:• This instruction is used for unconditional jump from one place

to another. 15

Page 16: Instruction Set Of 8086 DIU CSE

Program Execution Transfer Instructions

16

• Jxx Des (Conditional Jump):• All the conditional jumps follow some conditional

statements or any instruction that affects the flag.

• Loop Des:• This is a looping instruction.• The number of times looping is required is

placed in the CX register.

Page 17: Instruction Set Of 8086 DIU CSE

Conditional Jump TableMnemonic Meaning Jump ConditionJA Jump if Above CF = 0 and ZF

= 0JAE Jump if Above or Equal CF = 0JB Jump if Below CF = 1JBE Jump if Below or Equal CF = 1 or ZF =

1JC Jump if Carry CF = 1JE Jump if Equal ZF = 1JNC Jump if Not Carry CF = 0JNE Jump if Not Equal ZF = 0JNZ Jump if Not Zero ZF = 0JPE Jump if Parity Even PF = 1JPO Jump if Parity Odd PF = 0JZ Jump if Zero ZF = 1

17

Page 18: Instruction Set Of 8086 DIU CSE

String Instructions

• String in assembly language is just a sequentially stored bytes or words.• There are very strong set of string instructions in

8086.• By using these string instructions, the size of the

program is considerably reduced.

18

Page 19: Instruction Set Of 8086 DIU CSE

String Instructions

• CMPS Des, Src:-It compares the string bytes or words.

• SCAS String:-It scans a string.-It compares the String with byte in AL or with word in AX.

• MOVS / MOVSB / MOVSW:-It causes moving of byte or word from one string to another.-In this instruction, the source string is in Data Segment and destination string is in Extra Segment.-SI and DI store the offset values for source and destination index. 19

Page 20: Instruction Set Of 8086 DIU CSE

String InstructionsREP (Repeat):

This is an instruction prefix.It causes the repetition of the instruction until

CX becomes zero.E.g.: REP MOVSB STR1, STR2

It copies byte by byte contents.REP repeats the operation MOVSB until CX

becomes zero.20

Page 21: Instruction Set Of 8086 DIU CSE

Processor Control Instructions

• These instructions control the processor itself.• 8086 allows to control certain control flags that:• causes the processing in a certain direction• processor synchronization if more than one

microprocessor attached.

21

Page 22: Instruction Set Of 8086 DIU CSE

Processor Control Instructions• STC:

-It sets the carry flag to 1.• CLC:

-It clears the carry flag to 0.• CMC:

-It complements the carry flag.• STD:

-It sets the direction flag to 1.-It is set.• CLD:

-It clears the direction flag to 0.-It is reset. 22

Page 23: Instruction Set Of 8086 DIU CSE
Page 24: Instruction Set Of 8086 DIU CSE

Thank YouHave a Nice Day

24