final1

¡Supera tus tareas y exámenes ahora con Quizwiz!

The following two instructions are equivalent. ret ret 4

false

When passing parameters to a procedure on the stack, it is usually okay to change the value of the EBP register within the procedure.

false

Given the following register states, and using Base Indexed Addressing, which of the following lines of code will move the 11th element of the list array (of DWORDs) to the EAX register? EDX register contans the address of the first element of list. ESI register contains the address of the eleventh element of list. EBX register contains the value 40,

mov eax, [edx + ebx]

Given the following register states, and using Register Indirect Addressing, which of the following lines of code will move the 11th element of the list array (of DWORDs) to the EAX register? EDX register contans the address of the first element of list. ESI register contains the address of the eleventh element of list. EBX register contains the value 40,

mov eax, [esi]

For this problem, suppose that you are working with the partial data segment given below. Assume that the memory address of balance is 0x44. What hexadecimal address belongs to the first item in history? HISTLIMIT = 100 .data balance DWORD 0 account WORD ? history WORD HISTLIMIT DUP(?) isValid BYTE 0 Correct!

0x4A

Suppose that you are given the following program. After the instruction "mov ebp, esp", which of the following is referenced by each of the following? .data x DWORD 153461 y WORD 37 z WORD 90 .code main PROC push x push y push z call someProcedure ... exit main ENDP someProcedure PROC push ebp mov ebp, esp ... pop ebp ret 8 someProcedure ENDP END MAIN [ebp + 4] [ebp + 8] [ebp + 10] [ebp + 12] [ebp] [ebp + 6]

1. The return address from someProcedure 2.[ebp +8] The decimal value 90 3.[ebp + 10] the decimal value 37 4.[ebp + 12] the decimal value 153461 5.[ebp]-the previous value of ebp 6.[ebp +6] none of these

Suppose that you are given the following program. Inside someProcedure, what numerical operand should be used with the RET instruction? .data x DWORD 153461 y BYTE 37 z BYTE 90 .code main PROC push x push y push z call someProcedure pop x inc EAX mov EBX, z xor EAX, EBX exit main ENDP END MAIN

2

Given the following partial data segment, what value would I put in the brackets in list[n] to access the 12th element of list? (Ignore the .0000 that Canvas may append to your answer). .MAX = 50 .data list DWORD MAX DUP(0) a DWORD 25 b DWORD 15 Correct!

44

Suppose that you are given the following program. Inside someProcedure, what numerical operand should be used with the RET instruction? .data x DWORD 153461 y BYTE 37 z BYTE 90 .code main PROC push x push y push z call someProcedure inc EAX mov EBX, z xor EAX, EBX exit main ENDP END MAIN

6

The RET instruction pops the top of the stack into what register?

EIP

When passing procedure parameters on the stack, why are the following lines of code often necessary in a procedure? push ebp mov ebp,esp

To keep additional usage of the stack within the procedure from invalidating the stack offsets.

If you reference a point beyond the end of an array in MASM (for example, the address of the what would be the 105th element of a 100-element array), what happens?

You attempt to access whatever data bytes are stored there.

Given the following register states, and using Indexed Addressing, which of the following lines of code will move the 11th element of the list array (of DWORDs) to the EAX register? EDX register contans the address of the first element of list. ESI register contains the address of the eleventh element of list. EBX register contains the value 40,

mov eax, list[ebx]


Conjuntos de estudio relacionados

Writing day 7 - Nowadays animal experiments are widely used to develop new medicines and to test the safety of other products. Some people argue that these experiments should be banned because it is morally wrong to cause animals to suffer, while other

View Set

HIT 1.4 #A (Give Meanings for the Following Prefixes.)

View Set

Chapter 5 The court system in Texas

View Set

OB - Chapter 21 Nursing Management of Labor and Birth at Risk

View Set

Financial Accounting Practice Final

View Set

7.9 Chemiosmosis powers ATP synthesis in the light reactions

View Set