监测点2.1
mov ax,62627 AX=F4A3Hmov ah,31H AX=31A3H
mov al,23H AX=3123H
add ax,ax AX=6246H
mov bx,826CH BX=826CH
mov cx,ax CX=6246H
mov ax,bx AX=826CH
add ax,bx AX=04D8H
mov al,bh AX=0482H
mov ah,bl AX=6C82H
add ah,ah AX=D882H
add al,6 AX=D888H
add al,al AX=D810H
mov ax,cx AX=6246H
mov ax,2 ax=2
add ax,ax ax=ax+ax=2+2=4
add ax,ax ax=ax+ax=4+4=8
add ax,ax ax=ax+ax=8+8=16 wonderful //检测点2.1
//(1)写出每条汇编指令执行后相关寄存器中的值。
int main()
{
__asm {
xor eax, eax
xor ebx, ebx
xor ecx, ecx
xor edx, edx //AX=0000H;BX=0000H;CX=0000H;DX=0000H
mov ax, 62627 //AX=F4A3H
mov ah, 31h //AX=31A3H
mov al,23h //AX=3123H
add ax,ax //AX=6246H
mov bx,826ch //BX=826CH
mov cx,ax //CX=6246H
mov ax,bx //AX=826CH
add ax,bx //AX=04D8H
mov al,bh //AX=0482H
mov ah,bl //AX=6C82H
add ah,ah //AX=D882H
add al,6 //AX=D888H
add al,al //AX=D810H
mov ax,cx //AX=6246H
}
return 0;
} //检测点2.1
//(2):只能使用目前学过的汇编指令,最多使用4条指令,编程计算2的4次方。
int main()
{
__asm {
XOR EAX,EAX //AX=0000H
mov ax,2 //AX=0002H
add ax,ax //AX=0004H
add ax,ax //AX=0008H
add ax,ax //AX=0010H
}
return 0;
}
页:
[1]