Ch 05: Subroutines and Stack Architecture

222 Questions222 MCQs0 Short Questions0 Long Questions
๐ŸŽฏ Exam Practice Papers
SEMESTER PASS

CS401 - Computer Architecture and Assembly Language Programming Examination Practice

Timed practice exam simulation for CS401 - Computer Architecture and Assembly Language Programming.

๐Ÿ“˜ VU MID TERM EXAMLectures 1 to 22
โฑ๏ธ 60 Mins

Mid Term Examination

Covers syllabus of Lectures 1 to 22 with 30 high-yield MCQs in a timed exam environment.

๐Ÿ“30 MCQs
โฑ๏ธ60 Minutes
๐Ÿ“— VU FINAL TERM EXAMLectures 23 to 45
โฑ๏ธ 90 Mins

Final Term Examination

Comprehensive semester exam preparation with 45 MCQs covering Lectures 23 to 45 with complete course coverage.

๐Ÿ“45 MCQs
โฑ๏ธ90 Minutes
Showing 11 โ€“ 20 of 222 Questions
Page 2 of 23
Q11
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 5๐Ÿท๏ธ 5.1. Stack OperationsMedium๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Read the following x86 assembly stack framing sequence and determine the final effect on the BP register value: push bp mov bp, sp sub sp, 2 mov sp, bp pop bp
๐Ÿ’ป assembly Snippet
push bp
mov bp, sp
sub sp, 2
mov sp, bp
pop bp
  1. A.bp will retain its original value
  2. B.Value of sp will move to bp
  3. C.Value of bp will be less than sp
  4. D.Value of bp will be zero
Q12
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 5๐Ÿท๏ธ 5.1. Stack OperationsEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
In computer architecture, a stack is defined as what type of data structure?
๐Ÿ’ป assembly Snippet
push ax
pop bx
  1. A.Last In First Out (LIFO)
  2. B.First In First Out (FIFO)
  3. C.First In Last Out (FILO)
  4. D.Random Access Structure
Q13
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 5๐Ÿท๏ธ 5.2. Calling ConventionsMedium๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
What is the maximum number of parameters a subroutine can receive through registers when all general-purpose registers are utilized for parameter passing in 16-bit x86 assembly?
๐Ÿ’ป assembly Snippet
mov ax, p1
mov bx, p2
mov cx, p3
mov dx, p4
mov si, p5
mov di, p6
mov bp, p7
call my_subroutine
  1. A.7
  2. B.6
  3. C.4
  4. D.8
Q14
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 5๐Ÿท๏ธ 5.1. String Instructions and Direction FlagEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
During the execution of the STOSB (Store String Byte) instruction, when the Direction Flag (DF) is clear (DF = 0), how is the destination index register DI modified?
๐Ÿ’ป assembly Snippet
CLD
STOSB
  1. A.Incremented by 1
  2. B.Decremented by 1
  3. C.Incremented by 2
  4. D.Decremented by 2
Q15
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 5๐Ÿท๏ธ 5.1. String Instructions and REP PrefixEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
During the execution of a repeated string instruction (such as REP STOSW or REP STOSB), after each iteration, the count register CX is ________.
๐Ÿ’ป assembly Snippet
MOV CX, 100
REP STOSW
  1. A.Decremented by 1
  2. B.Incremented by 1
  3. C.Decremented by 2
  4. D.Incremented by 2
Q16
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 5๐Ÿท๏ธ 5.1. String Instructions and Index RegistersEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Which pair of registers is used as source and destination index pointers to access memory during string operations (e.g., MOVSB, MOVSW)?
๐Ÿ’ป assembly Snippet
MOVSB
  1. A.DI and SI
  2. B.DI and BP
  3. C.SI and BP
  4. D.DS and SI
Q17
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 5๐Ÿท๏ธ 5.1. String Instructions and Direction FlagEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
In x86 string processing instructions, auto-increment mode (incrementing index registers SI and DI after each operation) is active when which flag state is met?
๐Ÿ’ป assembly Snippet
CLD
REP MOVSB
  1. A.DF is cleared
  2. B.DF is set
  3. C.CX is set
  4. D.ZF is cleared
Q18
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 5๐Ÿท๏ธ 5.1. String Instructions (MOVSB and MOVSW)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
What is the primary function of the MOVS (Move String) instruction family in x86 assembly?
๐Ÿ’ป assembly Snippet
MOVSB
  1. A.Move memory to memory
  2. B.Move register to register
  3. C.Move register to a memory location
  4. D.Move a memory location to register
Q19
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 5๐Ÿท๏ธ 5.1. String Instructions (STOSW and Direction Flag)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
In STOSW (Store String Word) instruction, when the Direction Flag (DF) is clear (DF = 0), the Destination Index (DI) register is ________.
๐Ÿ’ป assembly Snippet
CLD
STOSW
  1. A.Incremented by 2
  2. B.Incremented by 1
  3. C.Decremented by 1
  4. D.Decremented by 2
Q20
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 5๐Ÿท๏ธ 5.1. String Instructions (STOSB and Direction Flag)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
In the STOSB (Store String Byte) instruction, when the Direction Flag (DF) is clear (DF = 0), the Destination Index (DI) register is ________.
๐Ÿ’ป assembly Snippet
CLD
STOSB
  1. A.Incremented by 1
  2. B.Incremented by 2
  3. C.Decremented by 1
  4. D.Decremented by 2