Chapter 4 (Data Transfers, Addressing, and Arithmetic) –
Assessment
True-False
Please indicate whether each statement is True (T) or False (F).
1. The following statement will assemble without errors:
mov DWORD PTR [eax], 1234h
2. The following instruction will produce 1FFFFFFCh in EDX:
movsx edx,-4
3. The SAHF instruction copies the CPU status flags to the AH register.
4. The following instructions will set the Overflow flag:
mov al,0D7h
add al,75h
5. The following instruction will assemble correctly:
dec BYTE PTR [edi]
6. The following instructions will set the Overflow flag:
mov al,80h
sub al,-5
7. The format for the ADD instruction is: MOV source, destination
8. The SUB instruction requires the source operand to be no larger than the destination operand.
9. The MOV instruction permits a move between two 8-bit memory operands, as long as one
operand uses the BYTE PTR operator.
10. The EIP register can be the source operand of a MOV, ADD, or SUB instruction.
11. The MOVSX instruction can use a variable as the source operand.
12. If AL contains +127 and you add 3 to AL, the Overflow flag will be set.
13. Suppose BX and DX both contain positive integers. If adding them produces a negative result, the
Overflow flag will be set.
14. The Overflow flag will never be set when subtracting a positive integer from a negative integer.
15. When you move a 16-bit constant or an 8-bit constant into a 64-bit register, the upper bits of the
destination operand are cleared.