Summary Exercise - Week 7

अब Quizwiz के साथ अपने होमवर्क और परीक्षाओं को एस करें!

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 last item in history? HISTLIMIT = 100 .data balance DWORD 0 account WORD ? history WORD HISTLIMIT DUP(?) isValid BYTE 0

0x110

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 WORD 37 z WORD 90 .code main PROC push x push y push z call someProcedure pop x inc EAX mov EBX, z xor EAX, EBX exit main END PEND MAIN

4

The following two instructions are equivalent. ret ret 4 True False

False

The RET instruction (without operands) will pop how many bytes off the stack? a)4 b)16 c)2 d)8

a)4

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? a)You attempt to access whatever data bytes are stored there. b)Run-time error c)The disassembler prevents your program from compiling. d)Compile-time error

a)You attempt to access whatever data bytes are stored there.

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, a)mov eax, [edx + ebx] b)mov eax, [esi] c)mov eax, list[esi] d)mov eax, list[ebx]

a)mov eax, [edx + ebx]

Register Indirect addressing is defined as follows: a) Accessing a memory area specified and maintained by a pointer in the ESP register. b)Accessing memory through an address stored in a register. c)Accessing register contents as a value. d)None of these.

b)Accessing memory through an address stored in a register.

Given list, an array of WORDs, what element is addressed by list[8]? Hint: It's Love. a)8th Element b)9th Element c)4th Element d)5th Element

d)5th Element *There are two words. 8/2 =4 0 is 1st 4 is 5th

The stack frame inside a procedure is also known as the ____________. a)Procedure Frame b)Program Record c)Activation Stack d)Activation Record

d)Activation Record

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, a)mov eax, [edx + ebx] b)mov eax, list[ebx] c)mov eax, list[esi] d)mov eax, [esi]

d)mov eax, [esi]

Suppose that you are given the following program (with memory addresses shown on the left).What hexadecimal value does EIP hold immediately after "inc EAX" has executed? .data 0x100 x DWORD 153461 0x104 y WORD 37 0x105 z WORD 90 .code main PROC 0x12 push x 0x17 mov AX, y 0x1C shl AX, 16 0x1C mov AX, z 0x21 call someProcedure 0x26 inc EAX 0x2B mov EBX, z 0x30 xor EAX, EBX 0x35 exit main ENDP END MAIN

0x2B

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

0x4A


संबंधित स्टडी सेट्स

personal finances module 1 study guide

View Set

404 Chapter Questions 10, 11, and 12

View Set

U.S. History II Final Exam Part II

View Set

Intro to Social Psych - Ch 11: Prosocial Behavior

View Set

6. Táplálkozás és élelmezés egészségtan

View Set

Management of Patients with Chest and Lower Respiratory Tract Disorders

View Set

PN NCLEX 6th Edition-Pharmacology/Oncology

View Set