课堂练习:
22.设ax=3762h,cl=5,执行“shr ax,cl”后,ax=( )。
a.0376h b.01bbh c.01bb d.0376
28.执行“div bx”指令后,( )寄存器中存放商。
a.al b.ah c.ax d.dx
24.若移位指令的移位位数大于1时,其移位位数必须放在 中。
25.如果al=85h,cl=4,执行“sar al,cl”时,al= ,cf= 。
6.设bx=8234h,请说明下列两条指令的区别,执行下列各指令后bx中的内容是什么?
shr bx,1
sar bx,1
6.现有程序段如下:
mov bl,al
mov cl,4
shr bl,cl
mov a,bl
and al,0fh
mov b,al
请回答 :(1)该程序段完成的功能是什么?
(2)如果al的初值为56h,则a= ,b= 。
8.现有程序段如下:
mov ax,m
mov dx,n
shr dx,1
rcr ax,1
请回答 :(1)该程序段完成的功能是什么?
(2)若m=1234h,n=5678h,程序运行后dx= ,ax= 。
9.现有程序段如下:
xor ax,ax
mov ax,6342h
mov cx,0404h
rol ah,cl
xchg ch,cl
ror al,cl
请回答 :(1)该程序段执行后ax= 。
(2)cf= 。
11.现有程序段如下:
mov cx,16
mov bx,0
mov dx,1
l: mov ax,9ab8h
and ax,dx
jz n
inc bx
n: shl dx,1
loop l
mov m,bx
请回答 :(1)该程序段完成的功能是什么?
(2)该程序段执行完后(m)= 。
14.现有程序段如下:
mov al,0
mov bl,1
mov cx,10
l: add al,bl
inc bl
loop l
请回答 :(1)该程序段完成的功能是什么?
(2)该程序执行完后,al= 。
5.将dx:ax:bx中的48位数乘以2。
9.将dx:ax中的32位数据逻辑左移2位。
答案============================================================
课堂练习:
22.设ax=3762h,cl=5,执行“shr ax,cl”后,ax=( )。
a.0376h b.01bbh c.01bb d.0376
28.执行“div bx”指令后,( )寄存器中存放商。
a.al b.ah c.ax d.dx
24.若移位指令的移位位数大于1时,其移位位数必须放在 中。 cl
25.如果al=85h,cl=4,执行“sar al,cl”时,al= ,cf= 。 0f8h 0
6.设bx=8234h,请说明下列两条指令的区别,执行下列各指令后bx中的内容是什么?
shr bx,1
sar bx,1
参考:shr是逻辑右移指令,移位后空出的位补0,而sar是算术右移指令,高位保持不变,其他位右移一位。shr bx,1执行后bx=411ah,执行sar bx,1后 bx=0c11ah。
6.现有程序段如下:
mov bl,al
mov cl,4
shr bl,cl
mov a,bl
and al,0fh
mov b,al
请回答 :(1)该程序段完成的功能是什么?
(2)如果al的初值为56h,则a= ,b= 。
6.(1)将al中的八位数分高低4位分别存放在a和b中。
(2)a=05h,b=06h
8.现有程序段如下:
mov ax,m
mov dx,n
shr dx,1
rcr ax,1
请回答 :(1)该程序段完成的功能是什么?
(2)若m=1234h,n=5678h,程序运行后dx= ,ax= 。
8.(1)将m:n中的32位右移一位。
(2)dx=091ah,ax=2b3ch
9.现有程序段如下:
xor ax,ax
mov ax,6342h
mov cx,0404h
rol ah,cl
xchg ch,cl
ror al,cl
请回答 :(1)该程序段执行后ax= 。
(2)cf= 。
9.(1)3624h
(2)cf=0
11.现有程序段如下:
mov cx,16
mov bx,0
mov dx,1
l: mov ax,9ab8h
and ax,dx
jz n
inc bx
n: shl dx,1
loop l
mov m,bx
请回答 :(1)该程序段完成的功能是什么?
(2)该程序段执行完后(m)= 。
11.(1)统计9ab8h中为1的位数。
(2)m=8
14.现有程序段如下:
mov al,0
mov bl,1
mov cx,10
l: add al,bl
inc bl
loop l
请回答 :(1)该程序段完成的功能是什么?
(2)该程序执行完后,al= 。
14.(1)实现1+2+3+……+10
(2)37h(55)
5.将dx:ax:bx中的48位数乘以2。
5. sal bx, 1
rcl ax, 1
rcl dx, 1
9.将dx:ax中的32位数据逻辑左移2位。
9. shl ax, 1
rcl dx, 1
shl ax, 1
rcl dx, 1