Branching

Lecture 8: Branching

261 Questions205 MCQs51 Short Questions5 Long Questions
Showing 231240 of 261 Questions
Page 24 of 27
Q231❓ MCQ📑 Lec 3Medium🔁RepeatedHigh-Yield💡Conceptual
When subtracting unsigned operands, if the resulting status flags yield ZF = 1 OR CF = 1, what is the relationship between destination and source?
💻 assembly Snippet
cmp ax, bx
jbe target_label  ; Jumps if AX <= BX (ZF = 1 or CF = 1)
  1. A.DEST = SRC
  2. B.DEST != SRC
  3. C.DEST <= SRC (Unsigned Destination <= Unsigned Source)
  4. D.DEST > SRC
Q232❓ MCQ📑 Lec 3Medium🔁RepeatedHigh-Yield💡Conceptual
When subtracting unsigned operands, if the resulting status flags yield ZF = 0 AND CF = 0, what is the relationship between destination and source?
💻 assembly Snippet
cmp ax, bx
ja target_label  ; Jumps if AX > BX (ZF = 0 and CF = 0)
  1. A.DEST = SRC
  2. B.DEST != SRC
  3. C.DEST < SRC
  4. D.DEST > SRC (Unsigned Destination > Unsigned Source)
Q233❓ MCQ📑 Lec 3Easy🔁RepeatedHigh-Yield💡Conceptual
When subtracting unsigned operands, if the resulting status flag is CF = 0 (no borrow generated), what is the relationship between destination and source?
💻 assembly Snippet
cmp ax, bx
jae target_label  ; Jumps if AX >= BX (CF = 0)
  1. A.DEST = SRC
  2. B.DEST != SRC
  3. C.DEST < SRC
  4. D.DEST >= SRC (Unsigned Destination >= Unsigned Source)
Q234❓ MCQ📑 Lec 3Easy🔁RepeatedHigh-Yield💡Conceptual
Which conditional jump instruction is taken if the last arithmetic operation produced zero in its destination, or after CMP if both operands were equal?
💻 assembly Snippet
cmp ax, bx
je match_label  ; Jumps if AX == BX (ZF = 1)
  1. A.Jump if Zero (JZ) / Jump if Equal (JE)
  2. B.Jump if Equal (JE) only
  3. C.Jump if Zero (JZ) only
  4. D.No jump for this condition
Q235❓ MCQ📑 Lec 3Easy🔁RepeatedHigh-Yield💡Conceptual
Which conditional jump instruction is taken after CMP if the unsigned destination is smaller than or equal to the unsigned source operand?
💻 assembly Snippet
cmp ax, bx
jbe lower_or_equal
  1. A.JBE (Jump if Below or Equal) only
  2. B.JNA (Jump if Not Above) / JBE (Jump if Below or Equal)
  3. C.JNA (Jump if Not Above) only
  4. D.No jump for this condition
Q236❓ MCQ📑 Lec 3Easy🔁RepeatedHigh-Yield💡Conceptual
An assembly instruction like JMP that transfers control unconditionally regardless of processor flag states is called an:
💻 assembly Snippet
jmp target_label
  1. A.Jump
  2. B.Conditional jump
  3. C.Unconditional jump
  4. D.Stay
Q237❓ MCQ📑 Lec 3Easy🔁RepeatedHigh-Yield💡Conceptual
When comparing operands using CMP (which subtracts source from destination), setting the Zero Flag (ZF = 1) indicates that:
💻 assembly Snippet
cmp ax, bx  ; ZF = 1 if AX == BX
  1. A.DEST = SRC
  2. B.DEST != SRC
  3. C.DEST < SRC
  4. D.DEST > SRC
Q238❓ MCQ📑 Lec 3Easy🔁RepeatedHigh-Yield💡Conceptual
Which conditional jump instruction is taken after a CMP operation if the unsigned destination is smaller than or equal to the unsigned source?
💻 assembly Snippet
cmp ax, bx
jbe lower_or_equal
  1. A.JBE (Jump if Below or Equal) only
  2. B.JNA (Jump if Not Above) / JBE (Jump if Below or Equal)
  3. C.JNA (Jump if Not Above) only
  4. D.No jump for this condition
Q239❓ MCQ📑 Lec 3Easy🔁RepeatedHigh-Yield💡Conceptual
True or False: The conditional jump instruction JA (Jump if Above) is NOT taken after CMP if the unsigned destination operand is greater than the source operand.
💻 assembly Snippet
cmp ax, bx
ja target_label  ; Jumps if AX > BX
  1. A.TRUE
  2. B.FALSE
Q240❓ MCQ📑 Lec 3Easy🔁RepeatedHigh-Yield💡Conceptual
In 8088/8086 assembly language, conditional jump instructions are restricted to which distance range?
💻 assembly Snippet
jz short_target
  1. A.Far jumps only
  2. B.Short jumps only (-128 to +127 bytes relative to IP)
  3. C.Near jumps only
  4. D.All of the given options