After the following instruction sequence, show the values of the carry , zero , and sign flags

mov al,7Ahnot al ; a. 85hmov al,3Dhand al,74h ; b. 34hmov al,9Bhor al,35h ; c. BFhmov al,72hxor al,0DCh ; d. AEh9.In the following instruction sequence, show the values of the Carry, Zero, andSign flags where indicated:mov al,00001111btest al,00000010b ; a. CF=0 ZF=0 SF=mov al,00000110bcmp al,00000101b ; b. CF=0 ZF=0 SF=mov al,00000101bcmp al,00000111b ; c. CF=1 ZF=0 SF=10.Which conditional jump instruction executes a branch based on the contentsof ECX?001

Get answer to your question and much more

11.How are JA and JNBE affected by the Zero and Carry flags?12.What will be the final value in EDX after this code executes?

Get answer to your question and much more

13.What will be the final value in EDX after this code executes?

Get answer to your question and much more

14.What will be the final value in EDX after this code executes?mov edx,1mov eax,7FFFhcmp eax,0FFFF8000hjl L2mov edx,0

L2:15.(True/False): The following code will jump to the label named Target.mov eax,-30cmp eax,-50jg Target

In the following instruction sequence, show the resulting value of AL where indicated, in binary:
mov al,01101111b
and al,00101101b ; a.
mov al,6Dh
and al,4Ah ; b.
mov al,00001111b
or al,61h ; c.
mov al,94h
xor al,37h ; d.

Code example:
.data
array SWORD 3,5,14,-3,-6,-1,-10,10,30,40,4
sentinel SWORD 0
.code
main PROC
mov esi,OFFSET array
mov ecx,LENGTHOF array
next:
test WORD PTR [esi],8000h ; test sign bit
pushfd ; push flags on stack
add esi,TYPE array
popfd ; pop flags from stack
loopz next ; continue loop while ZF=1
jz quit ; none found
sub esi,TYPE array ; ESI points to value

Code example:
.data
sum DWORD 0
sample DWORD 50
array DWORD 10,60,20,33,72,89,45,65,72,18
ArraySize = ($ - Array) / TYPE array
.code
mov eax,0 ; sum
mov edx,sample

Students also viewed