Assembly Language for x86 Processors --- 4.1 课后习题答案

4.1 Data Transfer Instructions

1 The destination operand of a MOV instruction cannot be a segment register.(MOV指令的目标操作数不能是段寄存器。)

答 :×

2 In a MOV instruction, the second operand is known as the destination operand.(在MOV指令中,第二个操作数称为目标操作数。)

答 :×

3 The EIP register cannot be the destination operand of a MOV instruction.(EIP寄存器不能是MOV指令的目标操作数。)

答 :√

4 Use the following variable definitions:

.data
var1 SBYTE -4,-2,3,1
var2 WORD 1000h,2000h,3000h,4000h
var3 SWORD -16,-42
var4 DWORD 1,2,3,4,5

① What will be the hexadecimal value of the destination operand after each of the following
instructions execute in sequence?

mov al,var1
mov ah,[var1+3]

答 :
al = FCh
ah = 01h

② For each of the following statements, state whether or not the instruction is valid:

a. mov ax,var1
b. mov ax,var2
c. mov eax,var3
d. mov var2,var3
e. movzx ax,var2
f. movzx var2,al
g. mov ds,ax
h. mov ds,1000h

答 :
Valid : b g
Not Valid : a c d e f h

③ What will be the value of the destination operand after each of the following instructions
execute in sequence?

mov ax,var2
mov ax,[var2+4]
mov ax,var3
mov ax,[var3-2]

答 :
ax = 1000h
ax = 3000h
ax = FFF0h
ax = 4000h

④ What will be the value of the destination operand after each of the following instructions
execute in sequence?

mov edx,var4
movzx edx,var2
mov edx,[var4+4]
movsx edx,var1

答 :
edx = 00000001h
edx = 00001000h
edx = 00000002h
edx = FFFFFFFCh

5 In the operand notation used by Intel, what does imm16 indicate?

答 : A 16-bit immediate (constant) operand

6 In the operand notation used by Intel, what does reg/mem32 indicate?

答 : A 32-bit register or memory operand

7 What are the three basic types of operands?

答 : Register, immediate, and memory

猜你喜欢

转载自blog.csdn.net/weixin_43574277/article/details/105429786