exercise Excercise_Chapter04.doc
文本预览下载声明
exercise Excercise_Chapter04
导读:就爱阅读网友为您分享以下“Excercise_Chapter04”资讯,希望对您有所帮助,感谢您对92的支持!
Chapter 4 Test Bank
Fill in the Blanks and Short Answer
Use the following data definitions until notified otherwise:
byte1 BYTE 0FFh,1,2
byte2 BYTE 14h
word1 WORD 0FFFFh,1,2
word2 WORD 3
word3 SWORD 7FFFh,8000h
word4 SWORD 9000h
dword1 DWORD 10h,20h,30h,40h
dArray DWORD 10 DUP(?)
1. Write one or more statements that move the contents of word1 to word2.
2. For each of the following instructions, indicate whether it is legal (L) or illegal (I):
a. mov byte2,0FFh
b. mov word1,byte2
c. mov word2,10000h
d. mov si,word1
3. For each of the following instructions, indicate whether it is legal (L) or illegal (I):
a. movzx ax,byte1
b. movzx edx,bl
c. movzx word2,al
d. movsx dl,al
4. Indicate the hexadecimal value of the destination operand next to each instruction. Use the letter I to indicate
that a particular instruction is illegal:
mov dx,word3
movsx eax,byte1
mov dh,al
mov bx,dx b. c. d. a.
5. Indicate the hexadecimal value of the destination operand next to each instruction. Use the letter I to indicate
that a particular instruction is illegal:
mov ax,[word3+2]
mov al,[byte1+1]
mov eax,[word3+4] a. mov eax,[dword1+4] c. d. b.
6. Where marked by a letter (a, b, c, d), indicate the hexadecimal value of the destination operand:
mov ax,word1
inc ax
dec ax
mov ax,word3
neg ax
add ax,0C2A5h a. b. c. d.
7. Where marked by a letter (a, b, c, d), indicate the hexadecimal value of the destination operand:
mov al,7Fh
add al,2
sub al,5
mov al,80h
add al,80h
neg al a: ZF,CF,SF,OF= b: ZF,CF,SF,OF= c: ZF,CF,SF,OF= d: ZF,CF,SF,OF=
8. Which instruction loads the low byte of the EFLAGS register into AH?
Irvine, Kip R. Assembly Language for Intel-Based Computers, 4th Edition 1
9. Write an instruction that moves the 32-bit address of word1 into the ESI register (assume 32-bit Protected
mode).
10. Write an instruction that moves the lower 16 bits of dword1 i
显示全部