Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 1 (10 points) 1) Given the code below: What will be the value of the Sign Flag (SF), and the Zero Flag (ZF) and

image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
Question 1 (10 points) 1) Given the code below: What will be the value of the Sign Flag (SF), and the Zero Flag (ZF) and will the Jump occur or will the Jump NOT occur? mov ax,Ofh mov bx,01h cmp bx,ax js loop1 OSF=1 ZF=O JUMP WILL OCCUR OSF=1 ZF=O JUMP WILL NOT OCCUR SF=O ZF=1 JUMP WILL NOT OCCUR OSF=O ZF=0 JUMP WILL OCCUR Question 2 (10 points) 2) Given the code below: What will be the value of the Sign Flag (SF), and the Zero Flag (ZF) and will the Jump occur or will the Jump NOT occur mov ax,06h mov bx,05h ,bx jns loop1 OSF=1 ZF=0 JUMP WILL OCCUR OSF=O ZF=1 JUMP WILL NOT OCCUR OSF=1 ZF=1 JUMP WILL OCCUR OSF=0 ZF=0 JUMP WILL OCCUR Question 7 (10 points) 7) Given the code below: What will be the resulting value of the Sign Flag (SF), and the Zero Flag (ZF) and will the Jump occur or will the Jump NOT occur ; move FFFFh to ax (16 bits) ; move 0 to bx mov ax, Offffh mov bx, Oh cmp bx,ax js LOOPX SF-O ZF-1 JUMP WILL OCCUR SF=1 ZF=O JUMP WILL OCCUR SF-1 ZF-0 JUMP WILL NOT OCCUR SF-0 ZF-O JUMP WILL NOT OCCUR 10) Choose the correct assembly language code that will do the following: if( (dog mouse) goto LOOP A else goto LOOP_B; EXPLANATION: If (dog is LESS THAN or EQUAL to cat) AND (dog is GREATER THAN mouse) THEN go to LOOP A ELSE go to LOOP_B Omov ax,dog cmp ax,cat js LOOP_B jz LOOP B jmp LOOP A LOOP X: mov ax,dog cmp ax,mouse jz LOOP A js LOOP A jmp LOOP_B Omov ax,dog cmp ax.cat js LOOP_X jz LOOP_X jmp LOOP_B LOOP_X: mov ax,dog cmp ax,mouse LOOP X: mov ax,dog cmp ax,mouse is LOOP B iz LOOP B jmp LOOP A Omov ax,dog cmp ax.cat js LOOP B jz LOOP B jmp LOOP X LOOP_X: mov ax.dog cmp ax,mouse jz LOOPA js LOOPA jmp LOOP_B mov ax,dog cmp ax.cat is LOOP A jz LOOP A LOOP X: mov ax,dog cmp ax,mouse jz LOOP B js LOOP B jmp LOOP A

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

A mental grouping of similar things is called a .

Answered: 1 week ago