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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

吃不起饭的小陈

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值