CH 04
Uploaded by
Rebecca Miles
67% found this document useful (3 votes)
555 views
10 pages
Original Title
ch04.doc
Copyright
© © All Rights Reserved
Available Formats
DOC, PDF, TXT or read online from Scribd
Share this document
Did you find this document useful?
Is this content inappropriate?
Report this Document
67% found this document useful (3 votes)
555 views10 pages
CH 04
Original Title:
ch04.doc
Uploaded by
Rebecca Miles
Full description
The following statement will assemble without errors: mov DWORD PTR [eax],1234h
Free
True False
If AL contains +127 and you add 3 to AL,the Overflow flag will be set.
Free
True False
The following instruction will produce 1FFFFFFCh in EDX: movsx edx,-4
Free
True False
The MOVSX instruction can use a variable as the source operand.
True False
The Overflow flag will never be set when subtracting a positive integer from a negative integer.
True False
The SUB instruction requires the source operand to be no larger than the destination operand.
True False
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.
True False
The format for the ADD instruction is: MOV source,destination
True False
The MOV instruction permits a move between two 8-bit memory operands,as long as one operand uses the BYTE PTR operator.
True False
The SAHF instruction copies the CPU status flags to the AH register.
True False
The following instructions will set the Overflow flag: mov al,80h sub al,-5
True False
The following instruction will assemble correctly: dec BYTE PTR [edi]
True False
Suppose BX and DX both contain positive integers.If adding them produces a negative result,the Overflow flag will be set.
True False
The EIP register can be the source operand of a MOV,ADD,or SUB instruction.
True False
The following instructions will set the Overflow flag: mov al,0D7h add al,75h
True False
•The following instructions will set the Overflow flag:mov al,0D7hadd al,75h•The following instruction will assemble correctly:inc [edi]•The following instructions will set the Overflow flag:mov al,125sub al,-5•The syntax for the MOV instruction is:MOVsource,destination•The MOV instruction requires both operands to be the same size.•The MOV instruction permits a move between two memory operands, as long as one operanduses the DWORD PTR operator.•The EIP register cannot be the destination operand of a MOV, ADD, or SUB instruction.
Part 2 Multiple Choice (each 3 points, total of 30 points). Please indicate all correct answersin the space provided in the left column. There might be more than one correct answer forsome questions!•Which directive identifies the part of a program containing instructions?•Which directive(s) are used when defining both signed and unsigned 64-bit integers?•In the AddSub program in Section 3.2, theexitstatement calls which predefined MS-Windows function to halt the program?•a. HaltProgramb. ExitProcessc. OS_Returnd. Exit_Program•Which of the following are valid data definition statements that create an array ofunsigned bytes containing decimal 10, 20, and 30, namedmyArray.•In the following data definition, assume thatList2begins at offset 2000h. What is the