Lecture No.15
Lecture No.15
7th Edition
Kip R. Irvine
(c) Pearson Education, 2014. All rights reserved. You may modify and copy this slide show for your personal use, or for
use in the classroom, as long as this copyright statement, the author's name, and the title are not changed.
Shift and Rotate Instructions
0
CF
CF
0
CF
CF
mov al,6Bh
shr al,1 a. 35h
shl al,3 b. A8h
mov al,8Ch
sar al,1 c. C6h
sar al,3 d. F8h
CF
mov al,11110000b
rol al,1 ; AL = 11100001b
mov dl,3Fh
rol dl,4 ; DL = F3h
CF
mov al,11110000b
ror al,1 ; AL = 01111000b
mov dl,3Fh
ror dl,4 ; DL = F3h
mov al,6Bh
ror al,1 a. B5h
rol al,3 b. ADh
clc ; CF = 0
mov bl,88h ; CF,BL = 0 10001000b
rcl bl,1 ; CF,BL = 1 00010000b
rcl bl,1 ; CF,BL = 0 00100001b
stc ; CF = 1
mov ah,10h ; CF,AH = 1 00010000b
rcr ah,1 ; CF,AH = 0 10001000b
stc
mov al,6Bh
rcr al,1 a. B5h
rcl al,3 b. AEh