Question: cosc 2325 Machine language thankyou Question 3 (10 points) Given the code below: What will be the resulting value of the Sign Flag (SF), and




Question 3 (10 points) 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 mov ax,Ofh cmp ax,Oh jns loop1 SF=1 ZF-1 JUMP WILL OCCUR SF=0 ZF=1 JUMP WILL NOT OCCUR SF=1 ZF=0 JUMP WILL OCCUR SF=0 ZF=0 JUMP WILL OCCUR Question 2 (10 points) 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 mov ax,05h mov bx,06h cmp bx,ax js loop1 OSF=1 ZF=1 JUMP WILL OCCUR SF=0 ZFEO JUMP WILL NOT OCCUR SF=1 ZF=0 JUMP WILL OCCUR SF=0 ZF=1 JUMP WILL NOT OCCUR Question 10 (10 points) 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) OR (dog is GREATER THAN mouse) THEN go to LOOP A ELSE go to LOOP_B mov ax,dog cmp ax.cat js LOOP_B jz LOOP B jmp LOOP_X LOOP_X: mov ax,dog cmp ax,mouse iz LOOPA js LOOPA jmp LOOP B mov 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 mov ax,dog cmp ax.cat js LOOP A jz LOOP A LOOP_X: mov ax,dog cmp ax,mouse jz LOOP_B js LOOP B jmp LOOP A cmp dog,cat js LOOP X jz LOOP X jmp LOOP A LOOP X: mov ax,dog cmp ax,mouse jz LOOP A js LOOP A jmp LOOP A
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
