Branching

Lecture 8: Branching

261 Questions205 MCQs51 Short Questions5 Long Questions
Showing 2130 of 261 Questions
Page 3 of 27
Q21❓ MCQ📑 Lec 3Easy🔁RepeatedHigh-Yield💡Conceptual
Which conditional jump is taken if the last arithmetic operation produced a result in its destination operand that has even parity (an even number of set 1-bits)?
💻 assembly Snippet
TEST AL, AL
JPE even_parity_label
  1. A.Both JP and JPE
  2. B.JP
  3. C.JPE
  4. D.JNP
Q22❓ MCQ📑 Lec 3Easy🔁RepeatedHigh-Yield💡Conceptual
When a larger number is subtracted from a smaller number during unsigned subtraction, a borrow is required. Which status flag will be set?
💻 assembly Snippet
MOV AL, 5
SUB AL, 10
  1. A.CF
  2. B.ZF
  3. C.SF
  4. D.OF
Q23❓ MCQ📑 Lec 3Easy🔁RepeatedHigh-Yield💡Conceptual
In x86 assembly language, a FAR JUMP instruction is position relative. (True/False)
💻 assembly Snippet
JMP FAR PTR target
  1. A.False
  2. B.True
Q24❓ MCQ📑 Lec 3Easy🔁RepeatedHigh-Yield💡Conceptual
Which x86 stack instruction transfers the 16-bit word from the current top of the stack (addressed by SS:SP) into the destination operand and then increments the Stack Pointer (SP) by 2?
💻 assembly Snippet
POP AX
  1. A.POP
  2. B.PUSH
  3. C.POPF
  4. D.PUSHF
Q25❓ MCQ📑 Lec 3Easy🔁RepeatedHigh-Yield💡Conceptual
In x86 assembly language, a NEAR jump allows branching to any target offset location anywhere within the current code segment. (True/False)
💻 assembly Snippet
JMP NEAR PTR target
  1. A.True
  2. B.False
Q26❓ MCQ📑 Lec 3Easy🔁RepeatedHigh-Yield💡Conceptual
The RET instruction does NOT pop the word at the top of the stack into the Instruction Pointer (IP), but merely increments SP by 2. (True/False)
💻 assembly Snippet
RET
  1. A.false
  2. B.true
Q27❓ MCQ📑 Lec 3Easy🔁RepeatedHigh-Yield💡Conceptual
The operations of placing items onto the stack and removing them from the stack are called PUSH and RET. (True/False)
💻 assembly Snippet
PUSH AX
POP AX
  1. A.false
  2. B.true
Q28❓ MCQ📑 Lec 3Easy🔁RepeatedHigh-Yield💡Conceptual
The operation of PUSH for the instruction `PUSH AX` executes as `SP <- SP + 2` followed by `[SP] <- AX`. (True/False)
💻 assembly Snippet
PUSH AX
  1. A.false
  2. B.true
Q29❓ MCQ📑 Lec 3Easy🔁RepeatedHigh-Yield💡Conceptual
In standard C calling convention (cdecl), parameters pushed onto the stack for a subroutine call are cleared from the stack by the ________.
💻 assembly Snippet
PUSH 10
PUSH 20
CALL my_func
ADD SP, 4
  1. A.caller
  2. B.callee
  3. C.caller and callee
  4. D.none of given
Q30❓ MCQ📑 Lec 3Easy🔁RepeatedHigh-Yield💡Conceptual
In x86 assembly language, what are the primary types of jump instructions available?
💻 assembly Snippet
JMP SHORT target
JMP NEAR PTR target
JMP FAR PTR target
  1. A.short, near, far
  2. B.Short, near
  3. C.Near, far
  4. D.short, far