Write an assembly language program that will implement the following:
If ( (AX >=BX) AND (CX < DX) ) goto LoopA Else go to LoopB
(Here I want you to write the whole assembly program that could run in CMD. THANK YOU
Given:
If ( (AX >=BX) AND (CX < DX) ) goto LoopA Else go to LoopB
Assembly Language Instruction's":
CMP :compare
JGE :Jump if Greater or Eq (o1 >= o2)
JL : Jump if Less (o1 < o2)
Loop: loop instruction
Assembly Language code:
CMP AX, BX ; if AX >= BX, then jump to level 1 as L1
JGE L1
L1:
CMP CX, DX ; if CX < DX , then jump to level 2 as L2
JL L2
JMP end_if
L2:
Loop L3 ; loop A at level L3 as L3
end_f:
Loop L4 ; else loop B at level 4 as L4
L3:
<loop body LoopA> ; loop A
Loop L3
L4:
<loop body LoopB> ;loop B
Loop L4
Get Answers For Free
Most questions answered within 1 hours.