📑 CHAPTER PRACTICE

CS401 - Computer Architecture and Assembly Language Programming – Serial Port Programming

Practice 10 verified multiple choice questions per batch with instant answer reveal and comprehensive solutions.

Showing 5160 of 90 Questions
Page 6 of 9
Q51📝 Short Q📑 Lec 14Medium🔁RepeatedHigh-Yield💡Conceptual
How can the execution speed and context switching responsiveness of multitasking be improved in a custom assembly kernel?
Q52📝 Short Q📑 Lec 14Hard🔁RepeatedHigh-Yield💡Conceptual
Given the 32-bit assembly language function 'swap' below, write a C program that declares and calls this routine to swap two integer variables: [section .text] global swap swap: mov ecx, [esp+4] ; copy parameter p1 (int*) to ecx mov edx, [esp+8] ; copy parameter p2 (int*) to edx mov eax, [ecx] ; copy *p1 into eax xchg eax, [edx] ; exchange eax with *p2 mov [ecx], eax ; copy eax into *p1 ret ; return
💻 assembly Snippet
section .text
global swap
swap:
    mov ecx, [esp+4]
    mov edx, [esp+8]
    mov eax, [ecx]
    xchg eax, [edx]
    mov [ecx], eax
    ret
Q53❓ MCQ📑 Lec 14Easy🔁RepeatedHigh-Yield💡Conceptual
In a multitasking execution environment, each thread possesses its own private stack frame to store __________ variables, parameter values, and return addresses.
  1. A.Global
  2. B.Local
  3. C.Legal
  4. D.Illegal
Q54❓ MCQ📑 Lec 14Easy🔁RepeatedHigh-Yield💡Conceptual
In multitasking operating system kernels, the creation of execution threads can be __________.
  1. A.Static only
  2. B.Dynamic (created at runtime)
  3. C.Easy
  4. D.Difficult
Q55❓ MCQ📑 Lec 14Easy🔁RepeatedHigh-Yield💡Conceptual
In multitasking and multi-threaded execution environments, threads share global memory but maintain private stack frames that store their own __________ variables, function call parameters, and return addresses.
  1. A.Global
  2. B.Local
  3. C.Legal
  4. D.Illegal
Q56📝 Short Q📑 Lec 14Medium🔁RepeatedHigh-Yield💡Conceptual
In a multitasking TSR assembly program, comment on the exact operation performed by each of the following code instructions: 1. mov al, [chars + bx] 2. mov [es:40], al
💻 assembly Snippet
mov al, [chars+bx]
mov [es:40], al
Q57📝 Short Q📑 Lec 14Easy🔁RepeatedHigh-Yield💡Conceptual
Explain the mechanics of the PUSH and POP instructions in 8088 assembly language, specifying Stack Pointer (SP) modifications and operand roles.
💻 assembly Snippet
push ax
pop bx
Q58📝 Short Q📑 Lec 14Medium🔁RepeatedHigh-Yield💡Conceptual
Why is saving and restoring general-purpose registers using PUSH and POP inside subroutines considered a critical programming standard for context preservation?
💻 assembly Snippet
push ax
push bx
; body
pop bx
pop ax
ret
Q59📝 Short Q📑 Lec 14Easy🔁RepeatedHigh-Yield💡Conceptual
Describe the precise step-by-step register and memory operations executed by 'PUSH AX' and 'POP AX' in 8088 assembly language.
💻 assembly Snippet
push ax
pop ax
Q60📝 Short Q📑 Lec 14Easy🔁RepeatedHigh-Yield💡Conceptual
Explain how the CALL and RET instructions interact with the Instruction Pointer (IP) and the system stack to control program execution flow.
💻 assembly Snippet
call my_subroutine
; Next instruction executed after RET