Name one instruction that can be used to explicitly set the
Solution
A) TEST operand1, operand2
Test calculates operand1&operand2 and sets the condition codes accordingly. The TEST instruction works same as the AND operation, but unlike AND instruction, it does not change the first operand. It alters the ZF(zero) and SF(sign) flags accordingly
B) Jump istructions can be catogorised as:
1) Unconditional jump: Aa unconditional jump branches always
2) Conditional Jump: A conditional jump branches if a condition is met.The conditional Jump instruction check the flag conditions and make decisions either to change or not change the sequence of the program.
cmp (var1 , ecx); //compare ecx with var1
setg(bl); // store var1>exc in bl
cmp(ecx, edx);
setg(bh);
and(bh,bl)
jz L1; //jump to L1 if zero
mov(x, 1);
jmp Endcase; // jump without any condition
L1:
mov(x,2);
Endcase:

