Show
Uploaded byRebecca Miles 67% found this document useful (3 votes) 555 views 10 pages
Original Titlech04.doc Copyright© © All Rights Reserved Available FormatsDOC, PDF, TXT or read online from Scribd Share this documentDid you find this document useful?Is this content inappropriate?Report this Document 67% found this document useful (3 votes) 555 views10 pages CH 04Original Title:ch04.doc Uploaded byRebecca 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 Will the overflow flag be set if you add a positive integer to a positive integer and produce a negative result?Basically, if you sum two big positives, you might not have enough "bits" to fit the result into, and it might appear as if the result is negative. That is when the overflow flag is set. The same applies for when you subtract a positive number from a negative.
When you move a 16 bit constant or an 8 bit?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.
Which directive ends a procedure?endp directive marks the end of a procedure. A single procedure may consist of several disjointed blocks of code. Each block should be individually bracketed with these directives. Name operands within a procedure can be used only for that specific procedure.
How many operands does each of the following instructions have a dec?The DEC instruction is used for decrementing an operand by one. It works on a single operand that can be either in a register or in memory.
|