Rotate instructions

291 views 5 slides Apr 17, 2020
Slide 1
Slide 1 of 5
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5

About This Presentation

8086 Rotate instructions


Slide Content

Microprocessor & its Applications
Module 3 Continued……
Dr. Girisha G S
Dept. of CSE
SoE, DSU, Bengaluru
1

Agenda
•Rotate Instructions
-ROL, ROR, RCL, RCR
2

Rotate Instructions –ROL, ROR, RCL, RCR
ROL –Rotate Left without carry
Syntax:
ROL Dest, Count
Examples:
Flags Affected: CF, OF
AL = D5H
CF
CF
; AL=ABH
MOV CL, 04
ROL BL,CL
ROL AL,1 ;

ROR -Rotate Right without carry
Examples:
ROR AL,1 ; AL=D5H
; AL = EAH
MOV CL, 04
ROR BL,CL
Syntax:
ROR Dest, Count
Flags Affected: CF, OF
CF
C
F

RCL –Rotate Through Carry Left
RCR –Rotate Through Carry Right
Syntax:
RCL Dest, Count
Syntax:
RCR Dest, Count
; AL=D5H
; AL=6AH
CF
CF
Examples: RCR AL,1
; AL=D5H
; AL=AAH
Examples: RCL AL,1
Tags