Beruflich Dokumente
Kultur Dokumente
22. What is the largest unsigned integer that may be stored in 16 bits?
a. 32767 b. 65536 c. 65535 d. 32768
23. What is the largest signed integer that may be stored in 32 bits?
a. 232 1 b. 232 c. 231 1 d. 231
24. The two's complement of an integer is formed by doing which of the following?
a. reversing (inverting) the bits and adding 1
b. adding 1 and reversing the bits
c. calculating the integer's additive inverse
d. changing the highest bit to a 1
25. Which of the following unsigned decimal values is equivalent to binary 10110101?
a. 179 b. 181 c. 182 d. 175
26. How much memory can be addressed in Protected mode?
a. 640 K b. 1 MB c. 16 MB d. 4 GB
27. What special feature makes VRAM better-suited to use with a video adapter than DRAM?
a. VRAM uses static RAM
b. VRAM is dual-ported
c. VRAM does not require a refresh cycle
d. VRAM holds its memory when power is turned off
28. Which of the following linear addresses matches the segment-offset address 08F0:0200?
a. 09100h b. 09200h c. 0AF0h d. 08F2h
29. Which type of I/O device uses the 16550 UART chip?
a. USB port b. printer port c. serial port d. parallel port
30. If you wanted to turn a device on and off using computer software, which type of port interface would
be best?
a. USB b. keyboard c. serial d. parallel
31. Which of the following are valid data definition statements that create an array of unsigned bytes
containing decimal 10, 20, and 30, named myArray.
a. myArray BYTE 10, 20, 30
b. BYTE myArray 10, 20, 30
c. BYTE myArray[3]: 10, 20,30
d. myArray BYTE DUP (3) 10,20,30
32. In the following data definition, assume that List2 begins at offset 2000h. What is the offset of the third
value (5)?
List2 WORD 3,4,5,6,7
a. 20008h b. 2002h c. 2000h d. 2004h
33. Which letter choice shows the memory byte order, from low to high address, of the following data
definition?
BigVal DWORD 12345678h
a. 56h, 78h,12h,34h b. 12h,34h,56h,78h
c. 78h,56h,34h,12h d. 34h,12h,78h,56h
34. Given the following array definition, which letter choice contains a valid constant declaration named
ArrayCount that automatically calculates the number of elements in the array?
newArray DWORD 10,20,30,40,50
a. ArrayCount = newArray $
b. ArrayCount = ($ newArray) / 4
c. ArrayCount DWORD $ newArray
d. ArrayCount = (newArray $) 4
35. Select a data definition statement that creates an array of 500 signed doublewords named myList and
initializes each array element to the value 1.
a. SDWORD myList 500 DUP (1)
b. myList 500 SDWORD DUP (1)
c. myList 500 SDWORD (1)
d. myList SDWORD 500 DUP (1)
36. What is the final hexadecimal value of EAX when this code executes?
mov edx,8
mov eax,dword1[edx]
a. 00000010h b. 20000000h c. 00300000h d. 00000030h
37. In Protected mode, which of the following define(s) a pointer variable containing the offset of word1?
a. ptr1 DWORD word1 b. word1 DWORD ptr1
c. ptr2 DWORD PTR word1 d. ptr2 DWORD OFFSET word1
38. Suppose the statement PWORD TYPEDEF PTR DWORD has already appeared in a program. Which of
the following data declarations would be correct?
a. PTR DWORD var1 ? b. var2 PWORD ?
c. var3 PTR DWORD ? d. var4 PTR PWORD ?
Example 2
1: .data
2: varX DWORD 9,8,7,6,5,4,3,2,1,0
3: varY DWORD (LENGTHOF varX) DUP(0)
4: .code
5: mov esi,OFFSET varY + (SIZEOF varX) - 4
6: mov edi,4
7: mov ecx,LENGTHOF varX - 1
8: L1: mov eax,varX[edi]
9: mov [esi],eax
10: add edi,4
11: sub esi,4
12: loop L1
39. Refer to Example 2. After the loop executes, what will be the values at locations varY, varY+4, and
varY+8?
a. 0, 0, 0 b. 0, 1, 2 c. 1, 2, 3 d. 0, 0, 1
40. Refer to Example 2. After the loop executes, what will be the values in the last three positions (array
elements) of varY?
a. 0, 0, 0 b. 8, 9, 0 c. 6, 7, 8 d. 7, 8, 9
41. Implement the following expression in assembly language, using 32-bit integers (you may modify any
registers you wish):
ax = word3[0] + word3[1] word4
42. Implement the following expression in assembly language, using 32-bit integers. The notation dword[1]
corresponds to an array reference in C++ or Java:
ebx = dArray[0] + dArray[1] + dArray[2] + dArray[3]