Practice 25 Assembly Programming multiple-choice questions designed for CDAC CCAT exam preparation. Click "Show Answer" to reveal the correct option with detailed explanation.
Show Answer & Explanation
Correct Answer: B — Copies source to destination
MOV copies data from source to destination (source unchanged).
Show Answer & Explanation
Correct Answer: B — Adds source to destination
ADD: destination = destination + source.
Show Answer & Explanation
Correct Answer: B — Subtracts source from destination
SUB: destination = destination - source.
Show Answer & Explanation
Correct Answer: A — Compares by subtracting, sets flags
CMP subtracts without storing result, only sets flags.
Show Answer & Explanation
Correct Answer: B — Unconditional jump
JMP: unconditional jump to specified address.
Show Answer & Explanation
Correct Answer: A — Zero flag is set
JZ (Jump if Zero): jumps when ZF=1.
Show Answer & Explanation
Correct Answer: B — Pushes return address, jumps to subroutine
CALL saves return address on stack and jumps to subroutine.
Show Answer & Explanation
Correct Answer: B — Returns from subroutine
RET pops return address from stack and returns.
Show Answer & Explanation
Correct Answer: B — Decrements CX, loops if CX≠0
LOOP decrements CX; if CX≠0, jumps to label.
Show Answer & Explanation
Correct Answer: A — Loads effective address
LEA (Load Effective Address) loads address, not data.
Show Answer & Explanation
Correct Answer: B — Copies data from source to destination
MOV copies data from source operand to destination operand. Source remains unchanged.
Show Answer & Explanation
Correct Answer: B — MOV copies data, XCHG exchanges data between operands
MOV copies from source to destination. XCHG exchanges contents between two operands.
Show Answer & Explanation
Correct Answer: B — Writes data to stack and decrements SP
PUSH decrements the stack pointer and then copies the operand to the top of stack.
Show Answer & Explanation
Correct Answer: B — Reads data from stack and increments SP
POP copies data from top of stack to operand and then increments the stack pointer.
Show Answer & Explanation
Correct Answer: B — Pushes return address and jumps to subroutine
CALL pushes the return address (next instruction) onto stack and then jumps to the subroutine.
Show Answer & Explanation
Correct Answer: B — Pops return address from stack and jumps to it
RET pops the return address from the stack into IP/PC, returning control to the caller.
Show Answer & Explanation
Correct Answer: B — CALL saves return address, JMP does not
JMP simply transfers control without saving return address. CALL saves return address on stack for later RET.
Show Answer & Explanation
Correct Answer: B — Instruction for the assembler, not converted to machine code
Assembler directives (like ORG, EQU, DB) instruct the assembler but are not converted to machine instructions.
Show Answer & Explanation
Correct Answer: B — Sets the starting address for code/data
ORG (Origin) directive sets the memory address where the following code or data will be placed.
Show Answer & Explanation
Correct Answer: B — Subtracts operands and sets flags without storing result
CMP subtracts second operand from first, setting flags accordingly, but does not store the result.
Show Answer & Explanation
Correct Answer: B — Jump if Zero flag is set
JZ (Jump if Zero) transfers control if the Zero flag is set (previous operation result was zero).
Show Answer & Explanation
Correct Answer: B — They are the same instruction
JE (Jump if Equal) and JZ (Jump if Zero) are identical - both check if Zero flag is set.
Show Answer & Explanation
Correct Answer: B — Decrements CX and jumps if CX is not zero
LOOP decrements CX (counter) and jumps to target label if CX is not zero, used for counted loops.
Show Answer & Explanation
Correct Answer: A — Loads effective address into register
LEA (Load Effective Address) calculates and loads the memory address of operand into register, not the value.
Show Answer & Explanation
Correct Answer: A — No operation - does nothing but consume time
NOP (No Operation) performs no operation. Used for timing delays or reserving space for later patching.