๐Ÿ“‘ 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 1 โ€“ 10 of 90 Questions
Page 1 of 9
Q1๐Ÿ“ Short Q๐Ÿ“‘ Lec 14Easy๐Ÿ”RepeatedโญHigh-Yield๐Ÿ’กConceptual
What is multitasking in operating systems and computer architecture?
Q2โ“ MCQ๐Ÿ“‘ Lec 14Easy๐Ÿ”RepeatedโญHigh-Yield๐Ÿ’กConceptual
In multi-threading operating systems, each thread independently executes function calls, accepts parameters, and maintains its own ________ variables.
  1. A.global
  2. B.local
  3. C.legal
  4. D.illegal
Q3โ“ MCQ๐Ÿ“‘ Lec 14Easy๐Ÿ”RepeatedโญHigh-Yield๐Ÿ’กConceptual
The thread registration code initializes the Process Control Block (PCB) and adds it to the linked list so that the ________ will give it a turn to execute.
๐Ÿ’ป assembly Snippet
call init_pcb
  1. A.scheduler
  2. B.dispatcher
  3. C.interrupt handler
  4. D.assembler
Q4โ“ MCQ๐Ÿ“‘ Lec 14Easy๐Ÿ”RepeatedโญHigh-Yield๐Ÿ’กConceptual
In NASM assembly, an imported symbol is declared with the ________, while an exported symbol is declared with the ________.
๐Ÿ’ป assembly Snippet
EXTERN external_func
GLOBAL main
  1. A.External directive, Global directive
  2. B.Global directive, External directive
  3. C.Home Directive, Foreign Directive
  4. D.Foreign Directive, Home Directive
Q5โ“ MCQ๐Ÿ“‘ Lec 14Easy๐Ÿ”RepeatedโญHigh-Yield๐Ÿ’กConceptual
In NASM assembly, an imported symbol (defined in another module) is declared using the ________ directive, while an exported symbol (made accessible to other modules) is declared using the ________ directive.
๐Ÿ’ป assembly Snippet
EXTERN printf
GLOBAL _main
  1. A.EXTERN, GLOBAL
  2. B.GLOBAL, EXTERN
  3. C.IMPORT, EXPORT
  4. D.PUBLIC, EXTERN
Q6๐Ÿง  Long Problem๐Ÿ“‘ Lec 14Medium๐Ÿ”RepeatedโญHigh-Yield๐Ÿ’กConceptual
Given the assembly language routine `swap` below, write a C language program that declares and calls this assembly routine to swap two integer variables: ```assembly [section .text] global swap swap: mov eax, [esp+4] ; load pointer to first integer (int *a) mov ecx, [esp+8] ; load pointer to second integer (int *b) mov edx, [eax] ; edx = *a mov ebx, [ecx] ; ebx = *b mov [eax], ebx ; *a = *b mov [ecx], edx ; *b = *a ret ```
๐Ÿ’ป assembly Snippet
[section .text]
global swap
swap:
    mov eax, [esp+4]
    mov ecx, [esp+8]
    mov edx, [eax]
    mov ebx, [ecx]
    mov [eax], ebx
    mov [ecx], edx
    ret
Q7โ“ MCQ๐Ÿ“‘ Lec 14Easy๐Ÿ”RepeatedโญHigh-Yield๐Ÿ’กConceptual
How many prevalent calling conventions (e.g., C calling convention and Pascal calling convention) primarily exist for interfacing assembly routines with high-level languages?
  1. A.2
  2. B.1
  3. C.3
  4. D.4
Q8โ“ MCQ๐Ÿ“‘ Lec 14Easy๐Ÿ”RepeatedโญHigh-Yield๐Ÿ’กConceptual
In NASM assembly language, an imported symbol is declared with the __________ directive, while an exported symbol is declared with the __________ directive.
๐Ÿ’ป assembly Snippet
extern printf
global _main
  1. A.External directive, Global directive
  2. B.Global directive, External directive
  3. C.Home Directive, Foreign Directive
  4. D.Foreign Directive, Home Directive
Q9โ“ MCQ๐Ÿ“‘ Lec 14Easy๐Ÿ”RepeatedโญHigh-Yield๐Ÿ’กConceptual
In NASM assembly language, an imported external symbol declared in another module is specified using which directive?
๐Ÿ’ป assembly Snippet
extern printf
  1. A.extern
  2. B.global
  3. C.import
  4. D.public
Q10โ“ MCQ๐Ÿ“‘ Lec 14Easy๐Ÿ”RepeatedโญHigh-Yield๐Ÿ’กConceptual
In NASM assembly language, an imported symbol is declared with the ________ directive, while an exported symbol is declared with the ________ directive.
๐Ÿ’ป assembly Snippet
EXTERN external_routine
GLOBAL main_entry
  1. A.External directive, Global directive
  2. B.Global directive, External directive
  3. C.Home Directive, Foreign Directive
  4. D.Foreign Directive, Home Directive