You are on page 1of 4

Question #1 (8 points) What will be the final value of eax after executing the following part of an Assembly Language

program? mov mov L1: mov mov L2: add loop loop eax, 5 L2 L1 eax, 3 ecx, 5 eax, 0 ecx, 10

Question #2 (8 points) What does the following Assembly Language program do ? INCLUDE Irvine32.inc .data intarray word 300h, 400h, 500h, 200h .code main PROC mov edi, OFFSET intarray mov ecx, 4 mov ax, 0 L1: add ax, [edi] add edi, 2 loop L1 exit main endp END main

Question #3 (8 points) What are the contents of the eax register and the variable result after executing The following ? .data alist result .code mov mov add add mov word dword 3000h, 4000h, 5000h 0

ebx, offset alist eax, [ebx] eax, [ebx+2] eax, [ebx+4] [ebx+6], eax

Question #4 (8 points) What is the result of the eax register after executing the following ? .data array1 word 200h, 300h, 400h, 500h count = ($ - array1) / 2 .code mov eax, 0 mov edi, offset array1 mov ecx, count L1: add eax, [edi] add edi, 2 loop L1

Question #5 (8 points) For each of the following variables, supply its Type, Length & Size. Variable var1 var2 var3 msg dword word byte byte 5 dup (3 dup (0)) 10 dup (0ffffh) 20 hello there, 0 TYPE LENGTH SIZE

Question #6 (6 points) What is the value of table after executing the following statement ? table byte 4 dup (3 dup (0), 2 dup (X), 4 dup(5))

Question #7 (9 points) Give 3 examples of Assembly Language instructions: one with no operands, One with a single operand (other than inc or dec), one with two operands.

Question #8 (5 points) Write a data declaration directive for a sequence of 300 items, each containing the value 20000h.

Question #9 (20 points) Write an Assembly Language program that finds the sum of the following numbers: 2000h, 3000h, 4000h, and 5000h. The four numbers are placed in an array in the data segment. The program should output the original numbers then output the sum of these numbers.

Question #10 (20 points) Perform the following operations:

6578 * 368
--------

--

5ECF16 3CDE16
----------

001110102 * 000101112
----------------

GOOD LUCK

You might also like