Module 3

Ace your homework & exams now with Quizwiz!

In debugging mode, which of the following (when typed into the memory window's address bar) will directly jump to the first memory address of variable userName?

&userName

Suppose that result is declared as DWORD, and the following MASM code is executed: MOV EAX, 17 MOV EBX, 13 MOV ECX, 6 _label5: ADD EAX, EBX ADD EBX, 2 LOOP _label5 MOV result, EAX What is the value stored in the memory location named result?

125

When branching, which register's value changes? (Enter the three-letter register abbreviation only)

EIP

In debugging mode, which function key is will execute a library procedure, then stop on the next instruction after the procedure?

F10

If the LOOP instruction sets ECX to zero, a jump to the destination label does take place.

False

When using the LOOP instruction, one should be wary of which common issues/problems? (Check all that apply)

Modifying ECX directly within the loop body. Overwriting ECX's original value in a nested loop body without preserving its outer loop counter value. Initializing ECX to a value less than or equal to zero. Too many instructions in the loop body

Given the following data declarations and code (within main), what is printed to the console window? (Do not include "quotations" or "Press any key to continue", simply write anything printed with WriteString) .data yes BYTE "Yes",0 no BYTE "No",0 .code MOV EAX, 10 CMP EAX, 0 JS _printYes MOV EDX, OFFSET no JMP _finished _printYes: MOV EDX, OFFSET yes _finished: CALL WriteString

No

Given the following data declarations and code (within main), what is printed to the console window? (Do not include "quotations" or "Press any key to continue", simply write out anything printed with WriteString) .data yes BYTE "Yes",0 no BYTE "No",0 maybe BYTE "Maybe: ",0 .code MOV EAX, 5 CMP EAX, 10 JG _printMaybe _printNo: MOV EDX, OFFSET no JMP _finished _printYes: MOV EDX, OFFSET yes JMP _finished _printMaybe: MOV EDX, OFFSET maybe CALL WriteString CMP EAX, 15 JL _printYes JMP _printNo _finished: CALL WriteString

No

The MASM assembler is used for locating ____ errors, but the debugging system is used for locating ____ errors.

Syntax Logic, runtime, or execution

(True/False) In debugging mode, the contents of internal memory and registers can be viewed when a breakpoint is encountered.

True

Given the following data declarations and code (within main), what is printed to the console window? (Do not include "quotations" or "Press any key to continue", simply write out anything printed with WriteString) .data yes BYTE "Yes",0 no BYTE "No",0 .code MOV EAX, 10 CMP EAX, 5 JG _printYes MOV EDX, OFFSET no JMP _finished _printYes: MOV EDX, OFFSET yes _finished:

Yes

When branching in MASM, you will normally jump to ___________ .

a code label (representing an address in the code segment)

Select the pseudo-code that corresponds to the following assembly code. .data ; General purpose variables a SDWORD ? b SDWORD ? c SBYTE ? d SBYTE ? upperLevel SDWORD 18 lowerLevel SDWORD 3 ; Strings yes BYTE "Yes",0 no BYTE "No",0 maybe BYTE "Maybe",0 .code main PROC MOV EAX, 0 CMP EAX, lowerLevel JNE option1 JMP option2 option1: MOV EDX, OFFSET yes CALL WriteString JMP endOfProgram option2: MOV EDX, OFFSET no CALL WriteString JMP endOfProgram option3: MOV EDX, OFFSET maybe CALL WriteString endOfProgram: exit main ENDP END main

print (yes)


Related study sets

Conceptual framework and accounting standards

View Set

Exam 1 (COPING, METABOLISM, NUTRITION)

View Set

Chapter 9: Linear Data Structures

View Set

TestOut PC Pro A+ 220-801 and 220-802

View Set

WCU Study Review 3: Ch. 16, 18, 19, 20

View Set

Back Muscles: Origin, Insertion, Innervation, Blood Supply & Action

View Set

СПО модуль - тема "Судоустрій"

View Set