SlideShare uma empresa Scribd logo
1 de 42
Baixar para ler offline
University of Pune
                                           S.E. I.T.
                            Subject code: 214447



  Processor Architecture and
         Interfacing
Part 02: Assembly Language Programming
               With 8086
                         Tushar B Kute,
                         Sandip Institute of Technology
                         and Research Centre, Nashik
                         tbkute@gmail.com
Program Development
• Assembly Language Program Development
DATA     SEGMENT               ;Data segment declaration
    MULTIPLICAND      DW 341AH
    MULTIPLIER DW 20F4H
    PRODUCT      DW 2 DUP(0)
DATA     ENDS
CODE     SEGMENT
    ASSUME CS:CODE, DS:DATA
START:       MOV AX, DATA
         MOV DS, AX
                                          Example Code
         MOV AX, MULTIPLICAND
         MUL MULTIPLIER
         MOV PRODUCT, AX
         MOV PRODUCT+2, DX
         INT 3
CODE     ENDS
    END START
8086 Instructions
•   Data transfer
•   Arithmetic
•   Bit manipulation
•   String
•   Program execution transfer
•   Processor control
Data Transfer Instructions
                             General
•   MOV
•   PUSH
•   POP
•   PUSHA
•   POPA
•   XCHG
•   XLAT
MOV Destination, Source
•   MOV CX, 045FH
•   MOV BL, [43E4H]
•   MOV AX, DX
•   MOV DH, [BX]
•   MOV DS, BX
•   MOV RESULTS[BP], AX
PUSH Source
 • PUSH BX
 • PUSH DS
 • PUSH TABLE[BX]

POP Destination
 • POP BX
 • POP DS
 • POP TABLE[BX]
• PUSHA
• POPA
• XLAT / XLATB


XCHG Destination, Source
• XCHG AX, BX
• XCHG AL, CH
• XCHG AL, PRICES[BX]
Data Transfer Instructions
• IN
             Simple IO port transfer
• OUT

• LEA
             Special address transfer
• LDS
• LES

•   LAHF
•   SAHF     Flag transfer
•   PUSHF
•   POPF
IN Accumulator, Port
 • IN AL, 0C4H
 • IN AX, 34H


OUT Port, Accumulator
 • OUT 3BH, AL
 • OUT 2CH, AX
LES Register, Memory addr of first word
 • LES BX, [789AH]
 • LES DI, [BX]


LEA Register, Source
 • LEA BX, PRICES
 • LEA BP, SS:STACK_TOP
 • LEA CX, [BX][DI]
LDS Register, Memory addr of first word
 • LDS BX, [789AH]
 • LDS DI, [BX]
Flag Transfer Instructions
•   LAHF    [Load AH With Flags]
•   SAHF    [Store AH in Flags]
•   PUSHF      [Push flags on stack]
•   POPF    [Pop stack top to flags]
Arithmetic Instructions
•   ADD           •   AAS
•   ADC           •   DAS
•   INC           •   MUL
•   AAA           •   IMUL
•   DAA           •   AAM
•   SBB           •   DIV
•   SUB           •   IDIV
•   DEC           •   AAD
•   NEG
                  •   CBW
•   CMP
                  •   CDW
ADD Destination, Source
•   ADD AL, 74H
•   ADD CL, BL
•   ADD DX, BX
•   ADD DX, [SI]
    ADC Destination, Source
•   ADC AL, 74H
•   ADC CL, BL
•   ADC DX, BX
•   ADC DX, [SI]
INC Destination
• INC BL
• INC CX
• INC VARIABLE


AAA    [ASCII Adjust Accumulator After Addition]

DAA    [Decimal Adjust Accumulator After Addition]
SUB Destination, Source
•   SUB CX, BX
•   SUB CH, AL
•   SUB AX, 4563H
•   SUB PRICES[BX], 04H

    SBB Destination, Source
• SBB CX, BX
• SBB CH, AL
• SBB AX, 4563H
DEC Destination
• DEC AL
• DEC BP
• DEC VARIABLE
 NEG Destination
• NEG AL
• NEG BX
• NEG BYTE PTR[BX]
CMP Destination, Source
•   CMP AL, 01H
•   CMP BH, CL
•   CMP CX, TEMP_MIN
•   CMP TEMP_MIN, CX

    AAS [ASCII Adjust Accumulator For Subtraction]
    DAS [Decimal Adjust Accumulator For Subtraction]
MUL Source
• MUL BH
• MUL CX
• MUL BYTE PTR[BX]


AAM
  [BCD Adjust Accumulator After Multiply]
DIV Source
• DIV BH
• DIV CX
• DIV BYTE PTR[BX]


AAD
  [Binary Adjust Accumulator Before Division]
CBW
Convert Signed Byte to Signed Word


CWD
Convert Signed Word to Signed Double Word
Bit Manipulation Instructions

      Logical       Shift       Rotate


  •   NOT       •   SAL     •   ROL
  •   AND       •   SHL     •   RCL
  •   OR        •   SAR     •   ROR
  •   XOR       •   SHR     •   RCR
  •   TEST
NOT Destination
• NOT BX
• NOT BYTE PTR[BX]

AND Destination, Source
•   AND BH, CL
•   AND CX, [SI]
•   AND BX, 00FFH
•   AND DX, BX
OR Destination, Source
•   OR BH, CL
•   OR CX, [SI]
•   OR BX, 00FFH
•   OR DX, BX
XOR Destination, Source
• XOR BH, CL
• XOR BP, DI
• XOR DX, BX
TEST Destination, Source
•   TEST BH, CL
•   TEST CX, [SI]
•   TEST BX, 00FFH
•   TEST DX, BX
SAL / SHL Destination, Count
•   SAL BX, 01
•   SAL BP, CL
•   MOV CL, 04H
•   SAL AL, CL
            C     B7 B6 B5 B4 B3 B2 B1 B0

            0     1 0 1 1 0 1 1 1


            1     0 1 1 0 1 1 1 0
SHR Destination, Count
• SHR BP, 01
• SHR AL, CL

               B7 B6 B5 B4 B3 B2 B1 B0   C

         0     1 0 1 1 0 1 1 1           0


               0 1 0 1 1 0 1 1           1
SAR Destination, Count
• SAR DI, 1
• SAR AL, 01

               B7 B6 B5 B4 B3 B2 B1 B0   C

               1 0 1 1 0 1 1 1           0


               1 1 0 1 1 0 1 1           1
ROL Destination, Count
• ROL AX, 1
• ROL BL, CL


          C    B7 B6 B5 B4 B3 B2 B1 B0

         0     1 0 1 1 0 1 1 1



         1     0 1 1 0 1 1 1 1
RCL Destination, Count
• RCL AX, 1
• RCL BL, CL


          C    B7 B6 B5 B4 B3 B2 B1 B0

          0    1 0 1 1 0 1 1 1



          1    0 1 1 0 1 1 1 0
ROR Destination, Count
• ROR BL, 01
• ROR AL, CL

               B7 B6 B5 B4 B3 B2 B1 B0   C

               1 0 1 1 0 1 1 1           0



               1 1 0 1 1 0 1 1           1
RCR Destination, Count
• RCR BL, 01
• RCR AL, CL

               B7 B6 B5 B4 B3 B2 B1 B0   C

               1 0 1 1 0 1 1 1           0



               1 1 0 1 1 0 1 1           1
Program Execution Transfer

CALL name of procedure
• CALL SQRT
• CALL BX
• CALL WORD PTR(BX)

RET
Jump Instructions
• JMP label

 Instruction Description (Jump if)       Conditions
 JA/JNBE      Above/Below Not Equal      C=0, Z=0
 JAE/JNB      Above or Equal/ Not Below C=0, Z=1

 JB/JNAE      Below/Not Above nor Equal C=1, Z=0

 JBE/JNA      Below or Equal/Not Above   C=1, Z=1
 JC           Carry flag=1               C=1
 JE/JZ        Equal / Zero               Z=1
Jump Instructions
Instruction Description (Jump if)       Conditions
JG/JNLE     Greater/Not Less Than or    C=O, Z=0
            Equal
JGE/JNL     Greater Than or Equal/Not   S=O
            Less Than
JL/JNGE     Less Than/Not Greater       S≠O
            Than or Equal
JLE/JNG     Less Than or Equal/Not      S=O, Z=1
            Greater Than
JNC         No Carry                    C=0
JNE/JNZ     Not Equal / Not Zero        Z=0
Jump Instructions
Instruction Description (Jump if)   Conditions
JNO         Not Overflow            O=0
JNP/JPO     Not Parity/Parity Odd   P=0
JNS         Not Sign                S=0
JO          Overflow                O=1
JP/JPE      Parity/Parity Even      P=1
JS          Sign Flag               S=1
JCXZ        CX is Zero              CX=0
Iteration Control Instructions

Instruction         Description           Conditions
                                           for Exit
LOOP          Loop through sequence of   CX=0
              instructions
LOOPE/        Loop through sequence of   CX=0 or
              instructions               ZF=0
LOOPZ
LOOPNE/       Loop through sequence of   CX=0 or
              instructions               ZF=1
LOOPNZ
Processor Control Instructions
 •   STC
 •   CLC
 •   CMC
 •   STD
 •   CLD
 •   STI
 •   CLI
External Hardware Synchronization
  •   HLT
  •   WAIT
  •   ESC
  •   LOCK
  •   NOP
Interrupt Instructions
• INT
• INTO
• IRET
References
• “Microprocessors and Interfacing” by Douglas
  Hall, Tata McGraw Hill Publishing.

Mais conteúdo relacionado

Mais procurados

Microprocessor 8086 instruction description
Microprocessor 8086 instruction descriptionMicroprocessor 8086 instruction description
Microprocessor 8086 instruction descriptionDheeraj Suri
 
General register organization (computer organization)
General register organization  (computer organization)General register organization  (computer organization)
General register organization (computer organization)rishi ram khanal
 
1327 Addressing Modes Of 8086
1327 Addressing Modes Of 80861327 Addressing Modes Of 8086
1327 Addressing Modes Of 8086techbed
 
Qoestion Bank Big Questions
Qoestion  Bank Big QuestionsQoestion  Bank Big Questions
Qoestion Bank Big Questionsccet
 
instruction format and addressing modes
instruction format and addressing modesinstruction format and addressing modes
instruction format and addressing modesRamaPrabha24
 
Interfacing of io device to 8085
Interfacing of io device to 8085Interfacing of io device to 8085
Interfacing of io device to 8085Nitin Ahire
 
Computer registers
Computer registersComputer registers
Computer registersDeepikaT13
 
Addressing modes of 8086
Addressing modes of 8086Addressing modes of 8086
Addressing modes of 8086Dr. AISHWARYA N
 
8257 DMA Controller
8257 DMA Controller8257 DMA Controller
8257 DMA ControllerShivamSood22
 
Instruction Set of 8086 Microprocessor
Instruction Set of 8086 MicroprocessorInstruction Set of 8086 Microprocessor
Instruction Set of 8086 MicroprocessorAshita Agrawal
 
Presentation on 8086 Microprocessor
Presentation  on   8086 MicroprocessorPresentation  on   8086 Microprocessor
Presentation on 8086 MicroprocessorNahian Ahmed
 
Introduction to 8085 Microprocessor
Introduction to 8085 MicroprocessorIntroduction to 8085 Microprocessor
Introduction to 8085 MicroprocessorRavi Anand
 

Mais procurados (20)

Microprocessor 8086
Microprocessor 8086Microprocessor 8086
Microprocessor 8086
 
Microprocessor 8086 instruction description
Microprocessor 8086 instruction descriptionMicroprocessor 8086 instruction description
Microprocessor 8086 instruction description
 
General register organization (computer organization)
General register organization  (computer organization)General register organization  (computer organization)
General register organization (computer organization)
 
Instruction set of 8085
Instruction set of 8085Instruction set of 8085
Instruction set of 8085
 
1327 Addressing Modes Of 8086
1327 Addressing Modes Of 80861327 Addressing Modes Of 8086
1327 Addressing Modes Of 8086
 
8086 Microprocessor
8086 Microprocessor8086 Microprocessor
8086 Microprocessor
 
8086 alp
8086 alp8086 alp
8086 alp
 
Qoestion Bank Big Questions
Qoestion  Bank Big QuestionsQoestion  Bank Big Questions
Qoestion Bank Big Questions
 
instruction format and addressing modes
instruction format and addressing modesinstruction format and addressing modes
instruction format and addressing modes
 
8086
80868086
8086
 
8255 presentaion.ppt
8255 presentaion.ppt8255 presentaion.ppt
8255 presentaion.ppt
 
Interfacing of io device to 8085
Interfacing of io device to 8085Interfacing of io device to 8085
Interfacing of io device to 8085
 
Computer registers
Computer registersComputer registers
Computer registers
 
Addressing modes of 8085
Addressing modes of 8085Addressing modes of 8085
Addressing modes of 8085
 
Addressing modes of 8086
Addressing modes of 8086Addressing modes of 8086
Addressing modes of 8086
 
8257 DMA Controller
8257 DMA Controller8257 DMA Controller
8257 DMA Controller
 
Instruction Set of 8086 Microprocessor
Instruction Set of 8086 MicroprocessorInstruction Set of 8086 Microprocessor
Instruction Set of 8086 Microprocessor
 
Presentation on 8086 Microprocessor
Presentation  on   8086 MicroprocessorPresentation  on   8086 Microprocessor
Presentation on 8086 Microprocessor
 
Introduction to 8085 Microprocessor
Introduction to 8085 MicroprocessorIntroduction to 8085 Microprocessor
Introduction to 8085 Microprocessor
 
Arithmetic and logical instructions
Arithmetic and logical instructionsArithmetic and logical instructions
Arithmetic and logical instructions
 

Destaque

Instruction set of 8086
Instruction set of 8086Instruction set of 8086
Instruction set of 80869840596838
 
8086-instruction-set-ppt
 8086-instruction-set-ppt 8086-instruction-set-ppt
8086-instruction-set-pptjemimajerome
 
instruction set of 8086
instruction set of 8086instruction set of 8086
instruction set of 8086muneer.k
 
8086 instructions
8086 instructions8086 instructions
8086 instructionsRavi Anand
 
Logic, shift and rotate instruction
Logic, shift and rotate instructionLogic, shift and rotate instruction
Logic, shift and rotate instructionkashif Shafqat
 
8254 Programmable Interval Timer by vijay
8254 Programmable Interval Timer by vijay8254 Programmable Interval Timer by vijay
8254 Programmable Interval Timer by vijayVijay Kumar
 
8237 dma controller
8237 dma controller8237 dma controller
8237 dma controllerTech_MX
 

Destaque (9)

Instruction set of 8086
Instruction set of 8086Instruction set of 8086
Instruction set of 8086
 
Lec14
Lec14Lec14
Lec14
 
8086-instruction-set-ppt
 8086-instruction-set-ppt 8086-instruction-set-ppt
8086-instruction-set-ppt
 
instruction set of 8086
instruction set of 8086instruction set of 8086
instruction set of 8086
 
8086 instructions
8086 instructions8086 instructions
8086 instructions
 
Logic, shift and rotate instruction
Logic, shift and rotate instructionLogic, shift and rotate instruction
Logic, shift and rotate instruction
 
8254 Programmable Interval Timer by vijay
8254 Programmable Interval Timer by vijay8254 Programmable Interval Timer by vijay
8254 Programmable Interval Timer by vijay
 
Instruction formats-in-8086
Instruction formats-in-8086Instruction formats-in-8086
Instruction formats-in-8086
 
8237 dma controller
8237 dma controller8237 dma controller
8237 dma controller
 

Semelhante a 8086 instruction set with types

8086 programming guide programs samples and string permutations.pptx
8086 programming guide programs samples and string permutations.pptx8086 programming guide programs samples and string permutations.pptx
8086 programming guide programs samples and string permutations.pptxrularofclash69
 
Microprocessor.pptx
Microprocessor.pptxMicroprocessor.pptx
Microprocessor.pptxNishatNishu5
 
Microcontroller 8051- soft.ppt
Microcontroller 8051- soft.pptMicrocontroller 8051- soft.ppt
Microcontroller 8051- soft.pptsteffydean
 
Microcontroller 8051 soft
Microcontroller 8051  softMicrocontroller 8051  soft
Microcontroller 8051 softbaluusa8
 
Arithmetic instructions
Arithmetic instructionsArithmetic instructions
Arithmetic instructionsRobert Almazan
 
Instruction sets of 8086
Instruction sets of 8086Instruction sets of 8086
Instruction sets of 8086Mahalakshmiv11
 
Notes arithmetic instructions
Notes arithmetic instructionsNotes arithmetic instructions
Notes arithmetic instructionsHarshitParkar6677
 
Microprocessor Part 3
Microprocessor    Part  3Microprocessor    Part  3
Microprocessor Part 3Sajan Agrawal
 
lb instruments by using microcontroller , Rabi Moirangthem
lb instruments by using microcontroller , Rabi Moirangthemlb instruments by using microcontroller , Rabi Moirangthem
lb instruments by using microcontroller , Rabi MoirangthemRabi Moirangthem
 
Addressing mode and instruction set using 8051
Addressing mode and instruction set using 8051Addressing mode and instruction set using 8051
Addressing mode and instruction set using 8051logesh waran
 

Semelhante a 8086 instruction set with types (20)

8086 Instruction set
8086 Instruction set8086 Instruction set
8086 Instruction set
 
8086 programming guide programs samples and string permutations.pptx
8086 programming guide programs samples and string permutations.pptx8086 programming guide programs samples and string permutations.pptx
8086 programming guide programs samples and string permutations.pptx
 
Chapter3 8086inst logical 2
Chapter3 8086inst logical 2Chapter3 8086inst logical 2
Chapter3 8086inst logical 2
 
Chap3 8086 logical
Chap3 8086 logicalChap3 8086 logical
Chap3 8086 logical
 
Lec06
Lec06Lec06
Lec06
 
Microprocessor.pptx
Microprocessor.pptxMicroprocessor.pptx
Microprocessor.pptx
 
Microcontroller 8051- soft.ppt
Microcontroller 8051- soft.pptMicrocontroller 8051- soft.ppt
Microcontroller 8051- soft.ppt
 
Arithmetic instrctions
Arithmetic instrctionsArithmetic instrctions
Arithmetic instrctions
 
8086inst logical
8086inst logical8086inst logical
8086inst logical
 
Microcontroller 8051 soft
Microcontroller 8051  softMicrocontroller 8051  soft
Microcontroller 8051 soft
 
Instruction types
Instruction typesInstruction types
Instruction types
 
Copy of 8086inst logical
Copy of 8086inst logicalCopy of 8086inst logical
Copy of 8086inst logical
 
Copy of 8086inst logical
Copy of 8086inst logicalCopy of 8086inst logical
Copy of 8086inst logical
 
Assembly 8086
Assembly 8086Assembly 8086
Assembly 8086
 
Arithmetic instructions
Arithmetic instructionsArithmetic instructions
Arithmetic instructions
 
Instruction sets of 8086
Instruction sets of 8086Instruction sets of 8086
Instruction sets of 8086
 
Notes arithmetic instructions
Notes arithmetic instructionsNotes arithmetic instructions
Notes arithmetic instructions
 
Microprocessor Part 3
Microprocessor    Part  3Microprocessor    Part  3
Microprocessor Part 3
 
lb instruments by using microcontroller , Rabi Moirangthem
lb instruments by using microcontroller , Rabi Moirangthemlb instruments by using microcontroller , Rabi Moirangthem
lb instruments by using microcontroller , Rabi Moirangthem
 
Addressing mode and instruction set using 8051
Addressing mode and instruction set using 8051Addressing mode and instruction set using 8051
Addressing mode and instruction set using 8051
 

8086 instruction set with types

  • 1. University of Pune S.E. I.T. Subject code: 214447 Processor Architecture and Interfacing Part 02: Assembly Language Programming With 8086 Tushar B Kute, Sandip Institute of Technology and Research Centre, Nashik tbkute@gmail.com
  • 2. Program Development • Assembly Language Program Development
  • 3. DATA SEGMENT ;Data segment declaration MULTIPLICAND DW 341AH MULTIPLIER DW 20F4H PRODUCT DW 2 DUP(0) DATA ENDS CODE SEGMENT ASSUME CS:CODE, DS:DATA START: MOV AX, DATA MOV DS, AX Example Code MOV AX, MULTIPLICAND MUL MULTIPLIER MOV PRODUCT, AX MOV PRODUCT+2, DX INT 3 CODE ENDS END START
  • 4. 8086 Instructions • Data transfer • Arithmetic • Bit manipulation • String • Program execution transfer • Processor control
  • 5. Data Transfer Instructions General • MOV • PUSH • POP • PUSHA • POPA • XCHG • XLAT
  • 6. MOV Destination, Source • MOV CX, 045FH • MOV BL, [43E4H] • MOV AX, DX • MOV DH, [BX] • MOV DS, BX • MOV RESULTS[BP], AX
  • 7. PUSH Source • PUSH BX • PUSH DS • PUSH TABLE[BX] POP Destination • POP BX • POP DS • POP TABLE[BX]
  • 8. • PUSHA • POPA • XLAT / XLATB XCHG Destination, Source • XCHG AX, BX • XCHG AL, CH • XCHG AL, PRICES[BX]
  • 9. Data Transfer Instructions • IN Simple IO port transfer • OUT • LEA Special address transfer • LDS • LES • LAHF • SAHF Flag transfer • PUSHF • POPF
  • 10. IN Accumulator, Port • IN AL, 0C4H • IN AX, 34H OUT Port, Accumulator • OUT 3BH, AL • OUT 2CH, AX
  • 11. LES Register, Memory addr of first word • LES BX, [789AH] • LES DI, [BX] LEA Register, Source • LEA BX, PRICES • LEA BP, SS:STACK_TOP • LEA CX, [BX][DI]
  • 12. LDS Register, Memory addr of first word • LDS BX, [789AH] • LDS DI, [BX]
  • 13. Flag Transfer Instructions • LAHF [Load AH With Flags] • SAHF [Store AH in Flags] • PUSHF [Push flags on stack] • POPF [Pop stack top to flags]
  • 14. Arithmetic Instructions • ADD • AAS • ADC • DAS • INC • MUL • AAA • IMUL • DAA • AAM • SBB • DIV • SUB • IDIV • DEC • AAD • NEG • CBW • CMP • CDW
  • 15. ADD Destination, Source • ADD AL, 74H • ADD CL, BL • ADD DX, BX • ADD DX, [SI] ADC Destination, Source • ADC AL, 74H • ADC CL, BL • ADC DX, BX • ADC DX, [SI]
  • 16. INC Destination • INC BL • INC CX • INC VARIABLE AAA [ASCII Adjust Accumulator After Addition] DAA [Decimal Adjust Accumulator After Addition]
  • 17. SUB Destination, Source • SUB CX, BX • SUB CH, AL • SUB AX, 4563H • SUB PRICES[BX], 04H SBB Destination, Source • SBB CX, BX • SBB CH, AL • SBB AX, 4563H
  • 18. DEC Destination • DEC AL • DEC BP • DEC VARIABLE NEG Destination • NEG AL • NEG BX • NEG BYTE PTR[BX]
  • 19. CMP Destination, Source • CMP AL, 01H • CMP BH, CL • CMP CX, TEMP_MIN • CMP TEMP_MIN, CX AAS [ASCII Adjust Accumulator For Subtraction] DAS [Decimal Adjust Accumulator For Subtraction]
  • 20. MUL Source • MUL BH • MUL CX • MUL BYTE PTR[BX] AAM [BCD Adjust Accumulator After Multiply]
  • 21. DIV Source • DIV BH • DIV CX • DIV BYTE PTR[BX] AAD [Binary Adjust Accumulator Before Division]
  • 22. CBW Convert Signed Byte to Signed Word CWD Convert Signed Word to Signed Double Word
  • 23. Bit Manipulation Instructions Logical Shift Rotate • NOT • SAL • ROL • AND • SHL • RCL • OR • SAR • ROR • XOR • SHR • RCR • TEST
  • 24. NOT Destination • NOT BX • NOT BYTE PTR[BX] AND Destination, Source • AND BH, CL • AND CX, [SI] • AND BX, 00FFH • AND DX, BX
  • 25. OR Destination, Source • OR BH, CL • OR CX, [SI] • OR BX, 00FFH • OR DX, BX XOR Destination, Source • XOR BH, CL • XOR BP, DI • XOR DX, BX
  • 26. TEST Destination, Source • TEST BH, CL • TEST CX, [SI] • TEST BX, 00FFH • TEST DX, BX
  • 27. SAL / SHL Destination, Count • SAL BX, 01 • SAL BP, CL • MOV CL, 04H • SAL AL, CL C B7 B6 B5 B4 B3 B2 B1 B0 0 1 0 1 1 0 1 1 1 1 0 1 1 0 1 1 1 0
  • 28. SHR Destination, Count • SHR BP, 01 • SHR AL, CL B7 B6 B5 B4 B3 B2 B1 B0 C 0 1 0 1 1 0 1 1 1 0 0 1 0 1 1 0 1 1 1
  • 29. SAR Destination, Count • SAR DI, 1 • SAR AL, 01 B7 B6 B5 B4 B3 B2 B1 B0 C 1 0 1 1 0 1 1 1 0 1 1 0 1 1 0 1 1 1
  • 30. ROL Destination, Count • ROL AX, 1 • ROL BL, CL C B7 B6 B5 B4 B3 B2 B1 B0 0 1 0 1 1 0 1 1 1 1 0 1 1 0 1 1 1 1
  • 31. RCL Destination, Count • RCL AX, 1 • RCL BL, CL C B7 B6 B5 B4 B3 B2 B1 B0 0 1 0 1 1 0 1 1 1 1 0 1 1 0 1 1 1 0
  • 32. ROR Destination, Count • ROR BL, 01 • ROR AL, CL B7 B6 B5 B4 B3 B2 B1 B0 C 1 0 1 1 0 1 1 1 0 1 1 0 1 1 0 1 1 1
  • 33. RCR Destination, Count • RCR BL, 01 • RCR AL, CL B7 B6 B5 B4 B3 B2 B1 B0 C 1 0 1 1 0 1 1 1 0 1 1 0 1 1 0 1 1 1
  • 34. Program Execution Transfer CALL name of procedure • CALL SQRT • CALL BX • CALL WORD PTR(BX) RET
  • 35. Jump Instructions • JMP label Instruction Description (Jump if) Conditions JA/JNBE Above/Below Not Equal C=0, Z=0 JAE/JNB Above or Equal/ Not Below C=0, Z=1 JB/JNAE Below/Not Above nor Equal C=1, Z=0 JBE/JNA Below or Equal/Not Above C=1, Z=1 JC Carry flag=1 C=1 JE/JZ Equal / Zero Z=1
  • 36. Jump Instructions Instruction Description (Jump if) Conditions JG/JNLE Greater/Not Less Than or C=O, Z=0 Equal JGE/JNL Greater Than or Equal/Not S=O Less Than JL/JNGE Less Than/Not Greater S≠O Than or Equal JLE/JNG Less Than or Equal/Not S=O, Z=1 Greater Than JNC No Carry C=0 JNE/JNZ Not Equal / Not Zero Z=0
  • 37. Jump Instructions Instruction Description (Jump if) Conditions JNO Not Overflow O=0 JNP/JPO Not Parity/Parity Odd P=0 JNS Not Sign S=0 JO Overflow O=1 JP/JPE Parity/Parity Even P=1 JS Sign Flag S=1 JCXZ CX is Zero CX=0
  • 38. Iteration Control Instructions Instruction Description Conditions for Exit LOOP Loop through sequence of CX=0 instructions LOOPE/ Loop through sequence of CX=0 or instructions ZF=0 LOOPZ LOOPNE/ Loop through sequence of CX=0 or instructions ZF=1 LOOPNZ
  • 39. Processor Control Instructions • STC • CLC • CMC • STD • CLD • STI • CLI
  • 40. External Hardware Synchronization • HLT • WAIT • ESC • LOCK • NOP
  • 42. References • “Microprocessors and Interfacing” by Douglas Hall, Tata McGraw Hill Publishing.