21JA Midterm1
You are given a before condition of ecx register and an instruction. Choose the correct after condition of ecx: Before condition of ECX: 0A 00 BF 7A Instruction: mov cx, 9 After condition of ECX:
0A 00 00 09
The decimal value for the binary byte: 1000 1010, if it is unsigned Data is:
138
choose the right answer: You declared the following array in your data segment. dword1 DWORD 20h, 8, 10h when you open the memory window, this is what you will see
20 00 00 00 08 00 00 00 10 00 00 00
Use the following data: dword1 DWORD 10000h,20000h,30000h,40000h Suppose we want EAX to contain the sum of the dword1 array when the following (incomplete) code finishes executing: 1: mov edi,OFFSET dword1 2: mov ecx,LENGTHOF dword1 3: ? 4: ? 5: ? 6: loop L1
3: mov eax,0 4: L1: add eax,[edi] 5: add edi,TYPE dword1
choose the right answer: You declared the following array in your data segment. word1 WORD 0F1B7h,3 when you open the memory window this is what you will see:
B7 F1 03 00
You are given a before condition of the registers eax, ebx, edx and an instruction. Choose the correct after condition of eax, edx Before condition: EAX: 00 00 00 1A EBX: 00 00 00 0D EDX FF FF FF 03 Instruction: div bl After condition:
EAX: 00 00 00 02 EDX: FF FF FF 03
You are given a before condition of the registers eax, ebx, edx and an instruction. Choose the correct after condition of eax, edx Before condition: EAX: 00 00 02 01 EBX: 00 00 00 11 EDX: FF 03 FF 01 Instruction: mul bl After condition:
EAX: 00 00 00 11 EDX: FF 03 FF 01
You are given a before condition of the registers eax, ecx, edx and an instruction. Choose the correct after condition of eax, edx Before condition: EAX: 01 0F 00 0A ECX: 00 00 00 03 EDX: 0C E0 00 00 Instruction: div cx After condition:
EAX: 01 0F 00 03 EDX: 0C E0 00 01
You are given a before condition of the registers eax, edx and an instruction. Choose the correct after condition of eax, edx: Before condition: EAX: 12 34 56 78 EDX: 9A BC DE F0 Instruction: xchg ax, dx After condition of EAX, EDX:
EAX: 12 34 DE F0 EDX: 9A BC 56 78
Use the following data for the following question on this page: word1 WORD 1000h,2000h,3000h,4000h,5000h dword1 DWORD 10000h,20000h,30000h,40000h What is the final value of AX after this code has executed? mov esi,OFFSET word1 mov ecx,5 mov eax,100h L1: add ax,[esi] add ax,16 add esi,TYPE word1 Loop L1
F150h
you are given a before condition of ecx register and an instruction. Choose the correct after condition of indicated flags: Before condition of ECX: FF FF FF FF Instruction: inc cl After condition of ecx:
FF FF FF 00
You are given a before condition of ecx register and an instruction. Choose the correct after condition of ecx: Before condition of ECX: FF FF FF C8 Instruction: add ecx, 6 After condition of ECX:
FF FF FF CE
You are given a before condition of ecx register and an instruction. Choose the correct after condition of ecx: Before condition of ECX: 0A 00 BF 7A Instruction: mov ecx, -2 After condition of ECX:
FF FF FF FE
Data bus is an internal bus uses binary signals to synchronize actions of all devices attached to the processor.
False
The following instructions will set the overflow flag: mov al, 0FFh sub al, 4
False
The hexadecimal representation of decimal 35 is 33h
False
Memory access takes more machine cycles than register access.
True
Scheduler of an operating system is responsible for assigning a given amount of CPU time to each running program.
True
The 8-bit two's complement of binary 00000010 is 11111110.
True
The binary representation of decimal 43 is 00101011.
True
The data definition: var WORD 12 And the data definition: var SWORD 12 Both create the same size memory variable and initialized with the same data value.
True
The following are both valid data definition statements: List1 BYTE 10,20 BYTE 30,40
True
Use this data for the following question. byte1 BYTE 0F4h,1,7 word1 WORD 0FC00h,3,9 dword1 DWORD 100h According to masm Assembler the following instruction is valid. movzx bx, byte1
True
You are given a before condition of ecx register and an instruction. Choose the correct after condition of indicated flags: Before condition of ECX: FF FF FF C8 Instruction: add ecx, 6 After condition:
ZF: 0 SF: 1 CF: 0 OF:0
you are given a before condition of ecx register and an instruction. Choose the correct after condition of indicated flags: Before condition of ECX: FF FF FF 3B Instruction: sub ch, cl After condition of flags:
ZF: 0 SF: 1 CF: 0 OF:0