Branching

Lecture 8: Branching

261 Questions205 MCQs51 Short Questions5 Long Questions
Showing 221230 of 261 Questions
Page 23 of 27
Q221❓ MCQ📑 Lec 3Easy🔁RepeatedHigh-Yield💡Conceptual
In x86 assembly language, how many explicit operands does the ADC (Add with Carry) instruction take?
💻 assembly Snippet
adc ax, bx
  1. A.0 Operands
  2. B.1 Operand
  3. C.2 Operands
  4. D.3 Operands
Q222❓ MCQ📑 Lec 3Easy🔁RepeatedHigh-Yield💡Conceptual
A 'Far' jump instruction is not position-relative but is classified as:
💻 assembly Snippet
jmp far ptr target_label
  1. A.Memory dependent
  2. B.Absolute
  3. C.Temporary
  4. D.Indirect
Q223❓ MCQ📑 Lec 3Hard🔁RepeatedHigh-Yield💡Conceptual
If AX contains decimal -2 (0xFFFE) and BX contains decimal 2 (0x0002), what will occur after executing 'CMP AX, BX' followed by 'JA label'?
💻 assembly Snippet
mov ax, -2   ; AX = 0xFFFE
mov bx, 2    ; BX = 0x0002
cmp ax, bx   ; Unsigned comparison: 65534 > 2
ja target    ; Branch taken because CF = 0 and ZF = 0
  1. A.Jump will be taken
  2. B.Zero flag will set
  3. C.ZF will contain value -4
  4. D.Jump will not be taken
Q224📝 Short Q📑 Lec 3Easy🔁RepeatedHigh-Yield💡Conceptual
Write down any two control flow instructions used in 8088 assembly language.
Q225❓ MCQ📑 Lec 3Medium🔁RepeatedHigh-Yield💡Conceptual
A Far Jump instruction is not position-relative; instead, it specifies a destination address that is:
💻 assembly Snippet
jmp 0x1234:0x0100  ; Absolute Far Jump
  1. A.Memory dependent
  2. B.Absolute
  3. C.Temporary
  4. D.Indirect
Q226📝 Short Q📑 Lec 3Medium🔁RepeatedHigh-Yield💡Conceptual
What does the following assembly code sequence do? mov cx, 0xffff loop $
💻 assembly Snippet
mov cx, 0xffff
loop $
Q227❓ MCQ📑 Lec 3Easy🔁RepeatedHigh-Yield💡Conceptual
What is the primary difference between conditional jump instructions JNE (Jump if Not Equal) and JNZ (Jump if Not Zero)?
💻 assembly Snippet
jne target_label
jnz target_label  ; Both assemble to opcode 0x75
  1. A.Programmer or logic readability
  2. B.Assembler opcode encoding
  3. C.Debugger execution
  4. D.iAPX88 hardware execution
Q228❓ MCQ📑 Lec 3Easy🔁RepeatedHigh-Yield💡Conceptual
An assembly instruction that transfers program execution control to a target location 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
Q229❓ MCQ📑 Lec 3Easy🔁RepeatedHigh-Yield💡Conceptual
When comparing operands using a CMP instruction (which subtracts the source from the 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
Q230❓ MCQ📑 Lec 3Easy🔁RepeatedHigh-Yield💡Conceptual
When an unsigned source operand is subtracted from a smaller unsigned destination operand, a borrow is required. Which status flag is set as a result?
💻 assembly Snippet
sub ax, bx  ; Sets CF = 1 if AX < BX
  1. A.Carry Flag cleared (CF = 0)
  2. B.Carry Flag set (CF = 1)
  3. C.Carry Flag set and Zero Flag set (CF = 1, ZF = 1)
  4. D.None of the given options