Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Processor Architecture and Interfacing

Total questions: 77

Worksheet time: 2hrs 31mins

Name
Class
Date
1.

Which type of microcomputer would be most suitable for Susan's needs?

a)

Mainframe computer

b)

Supercomputer

c)

Desktop computer

d)

Embedded system

2.

Susan wants her microcomputer to have good performance for multitasking. Which component should she prioritize?

a)

Graphics Card

b)

Hard Drive Space

c)

RAM (Random Access Memory)

d)

Optical Drive

3.

Which type of memory should Alice use to store the device's operational code?

a)

Data memory (RAM)

b)

Program memory (ROM)

c)

Cache memory

d)

Virtual memory

4.

Alice wants the device's code to remain intact even when the power is turned off. Which characteristic of program memory is important for this requirement?

a)

Volatility

b)

Speed

c)

Non-volatility

d)

Capacity

5.

Which type of memory is best suited for Bob's need for fast, temporary data storage?

a)

Program memory (ROM)

b)

Data memory (RAM)

c)

Flash memory

d)

Hard disk drive

6.

Bob's application requires frequent read and write operations on the data memory. Which characteristic is most important for this memory type?

a)

Non-volatility

b)

High read/write speed

c)

Low power consumption

d)

Large storage capacity

7.

Which type of memory should Emma use to store the firmware update so it remains after a power cycle?

a)

Data memory (RAM)

b)

Program memory (EEPROM)

c)

Cache memory

d)

Virtual memory

8.

Emma needs to test the firmware update before permanently writing it to memory. Which type of memory should she use for testing?

a)

Data memory (RAM)

b)

Program memory (ROM)

c)

Flash memory

d)

Cache memory

9.

Which tool does Jane need to use to convert her assembly language source code into machine code?

4 lines
10.

After assembling her code, Jane gets an object file. What is the purpose of this file?

4 lines
11.

Which tool should Bob use to combine multiple object files into a single executable?

4 lines
12.

Which role does the linker play when Bob's program relies on external libraries?

4 lines
13.

Which tool is responsible for loading the executable program into memory for execution?

4 lines
14.

The loader needs to know where to place the executable in memory. What information is essential for this process?

4 lines
15.

Which tool should Charlie use to step through his code and inspect variables to find errors?

4 lines
16.

Charlie wants to set breakpoints in his code to halt execution at specific points. Which feature of the debugger allows this?

4 lines
17.

Which tool allows Dave to emulate a different hardware architecture for testing his program?

4 lines
18.

Dave's program works on his emulator but fails on the actual hardware. What could be a possible reason?

4 lines
19.

Which tool can Emma use to find the most time-consuming parts of her code?

4 lines
20.

Emma is using an assembler directive to define a constant value. What is the purpose of this directive?

4 lines
21.

Which tool should Frank use to ensure that all module dependencies are correctly resolved?

4 lines
22.

Frank's project uses dynamic linking. What is the primary advantage of dynamic linking?

4 lines
23.

Which feature of a debugger allows Gina to see the values of all registers at the point of the crash?

a)

Breakpoint setting

b)

Watchpoints

c)

Register inspection

d)

Code stepping

24.

Gina suspects a memory corruption issue. Which debugger feature can help her detect when specific memory locations are accessed or modified?

a)

Breakpoints

b)

Watchpoints

c)

Profiling

d)

Disassembly

25.

Henry needs to test his assembly language program in an environment that mimics a different operating system. Which tool should Henry use to create this testing environment?

a)

Assembler

b)

Linker

c)

Loader

d)

Emulator

26.

Henry needs to test his assembly language program in an environment that mimics a different operating system. Henry's program runs slower in the emulator than expected. What is a likely reason for this?

a)

The assembler produced inefficient code.

b)

The linker did not optimize the executable.

c)

The loader is not placing the program correctly in memory.

d)

Emulators generally have performance overhead compared to actual hardware.

27.

Irene is preparing her assembly language program for deployment and needs to ensure it runs correctly on different systems. Which tool can Irene use to simulate different hardware configurations?

a)

Assembler

b)

Linker

c)

Loader

d)

Emulator

28.

Irene needs to make sure her program can load dynamically linked libraries at runtime. Which process is responsible for this task?

a)

Assembling

b)

Linking

c)

Loading

d)

Debugging

29.

Alex is writing an assembly language program and needs to define a constant value for the length of an array. Which assembler directive should Alex use to define a constant value?

a)

EQU

b)

DB

c)

ORG

d)

END

30.

Alex wants to ensure the constant value is named LENGTH. How should he write this directive?

4 lines
31.

Brian needs to allocate memory for a byte array in his assembly program. Which assembler directive should Brian use to allocate a block of memory for the byte array?

a)

EQU

b)

DB

c)

ORG

d)

DW

32.

Brian wants to initialize an array with the values 1, 2, and 3. Which directive should he use?

4 lines
33.

Cindy is working on an assembly program where she needs to specify the starting address of her code. Which assembler directive should Cindy use to set the starting address of her code?

a)

EQU

b)

DB

c)

ORG

d)

END

34.

Cindy wants to start her code at address 1000h. How should she write this directive?

4 lines
35.

David is defining a data section in his assembly program. Which directive is typically used to mark the beginning of a data section?

a)

CODE

b)

DATA

c)

ORG

d)

DB

36.

David wants to define a word (2 bytes) variable initialized to the value 1234h. Which directive should he use?

a)

DB 1234h

b)

DW 1234h

c)

EQU 1234h

d)

ORG 1234h

37.

Emma needs to include comments in her assembly code to make it more understandable. Which symbol is commonly used to start a comment in assembly language?

a)

;

b)

#

c)

//

d)

--

38.

Emma wants to comment on the initialization of a register. How should she write this?

4 lines
39.

Frank needs to define a label for a loop in his assembly program. Which assembler directive or syntax is used to define a label?

a)

LABEL:

b)

LABEL EQU

c)

LABEL ORG

d)

LABEL DB

40.

Frank wants to define a label called LOOP_START. How should he write this?

4 lines
41.

Jack is working on a program where he needs to reserve uninitialized memory space. Which assembler directive reserves a specified amount of uninitialized memory?

a)

DB

b)

DW

c)

RESB

d)

EQU

42.

Jack wants to reserve 10 bytes of uninitialized memory. How should he write this directive?

4 lines
43.

Alex is writing an assembly program that calls a procedure located in the same code segment. Which type of procedure call should Alex use for a procedure within the same code segment?

a)

Far call

b)

Near call

c)

Macro call

d)

External call

44.

Alex is writing an assembly program that calls a procedure located in the same code segment. What is a key characteristic of a near procedure call?

a)

It includes the segment address.

b)

It uses only the offset address.

c)

It can call procedures in other segments.

d)

It requires a larger instruction size.

45.

Alex is writing an assembly program that calls a procedure located in the different code segment. Which type of procedure call should Brian use for a procedure in a different code segment?

a)

Far call

b)

Near call

c)

Macro call

d)

Inline call

46.

Alex is writing an assembly program that calls a procedure located in the different code segment. What happens to the stack when a far call is made?

a)

Only the offset of the return address is pushed.

b)

Both the segment and offset of the return address are pushed.

c)

No information is pushed onto the stack.

d)

Only the segment of the return address is pushed.

47.

Cindy wants to use a macro to simplify her code. Which statement is true about macros in assembly language?

a)

Macros are similar to near procedures.

b)

Macros are expanded inline during assembly.

c)

Macros are stored in a separate segment.

d)

Macros require a far call to be used.

48.

Cindy wants to use a macro to simplify her code. Cindy defines a macro named SUM to add two numbers. Which directive should she use to define it?

a)

PROC

b)

END

c)

MACRO

d)

SEGMENT

49.

David is working on a project with multiple procedures, some of which are far and some near. Which register needs to be preserved when making a far call?

a)

DS

b)

CS

c)

ES

d)

AX

50.

David is working on a project with multiple procedures, some of which are far and some near. David needs to return from a far procedure. Which instruction should he use?

a)

RET

b)

RETN

c)

RETF

d)

JMP

51.

David needs to return from a far procedure. Which instruction should he use?

a)

RET

b)

RETN

c)

RETF

d)

JMP

52.

Which is an advantage of using macros over procedures?

a)

Macros reduce the size of the executable.

b)

Macros can be reused without performance overhead.

c)

Macros do not require stack space.

d)

Macros can include other macros.

53.

Emma wants to include a conditional assembly within her macro. Which directive should she use?

a)

IF

b)

WHILE

c)

LOOP

d)

CASE

54.

What is a primary benefit of using a near call over a far call?

a)

Near calls allow access to other segments.

b)

Near calls use less stack space and are faster.

c)

Near calls can be used in macros.

d)

Near calls do not affect segment registers.

55.

Frank decides to convert some far calls to near calls. What must be true for this to be possible?

a)

The procedures must be in different segments.

b)

The procedures must be in the same segment.

c)

The procedures must be macros.

d)

The procedures must use the same register values.

56.

What happens during the assembly process when a macro is called?

a)

The macro code is executed immediately.

b)

The macro code is expanded inline in place of the call.

c)

The macro is compiled into a separate object file.

d)

The macro is linked dynamically.

57.

Gina wants to debug a macro. Which technique is most effective?

a)

Add debug statements within the macro.

b)

Use a debugger to step into the macro.

c)

Convert the macro to a procedure temporarily.

d)

Increase the stack size.

58.

Which instruction should Henry use to return from a near procedure?

a)

RET

b)

RETF

c)

JMP

d)

CALL

59.

Henry needs to call a far procedure. What should he ensure about the code and data segments?

a)

They must be identical.

b)

They must be different.

c)

They must be aligned.

d)

They must be preloaded.

60.

Which of the following is a limitation of using macros?

a)

Macros cannot be recursive.

b)

Macros always improve code performance.

c)

Macros can only be used in the data segment.

d)

Macros are slower than procedures.

61.

Irene wants to define a macro to swap the values of two registers. How should she start the macro definition?

4 lines
62.

When should Jack prefer to use a procedure over a macro?

a)

When the code needs to be repeated multiple times.

b)

When the code is small and used infrequently.

c)

When the code is large and used frequently.

d)

When the code does not involve conditional assembly.

63.

Jack wants to call a procedure named MYPROC from within a macro. How should he write the call within the macro?

a)

CALL MYPROC

b)

MYPROC MACRO

c)

JMP MYPROC

d)

MYPROC CALL

64.

Which file extension is typically used for NASM source files in Ubuntu?

a)

.asm

b)

.nasm

c)

.s

d)

.text

65.

Bob has written a NASM source file named example.asm. What is the correct command to assemble this file into an object file?

a)

nasm -o example.obj example.asm

b)

nasm -f elf64 -o example.o example.asm

c)

nasm -f bin example.asm -o example.obj

d)

nasm -o example.o example.asm

66.

Which section should David use to write the executable code for his NASM program?

a)

.data

b)

.text

c)

.bss

d)

.code

67.

David wants to specify the entry point of his program. Which directive should he use in NASM?

a)

ENTRY

b)

START

c)

global _start

d)

begin

68.

Which section should Emma use to declare initialized data in her NASM source code?

a)

.text

b)

.code

c)

.data

d)

.bss

69.

Emma wants to define a constant string "Hello" in the .data section. Which directive should she use?

a)

db 'Hello'

b)

dw 'Hello'

c)

resb 5

d)

str 'Hello'

70.

Which directive should Frank use to define a macro in NASM?

a)

%macro

b)

MACRO

c)

DEFINE

d)

DEFINE_MACRO

71.

Frank wants to define a macro named ADD that adds two registers. How should he start this definition?

a)

%macro ADD 2

b)

ADD MACRO

c)

DEFINE ADD

d)

%define ADD

72.

Which NASM directive reserves uninitialized space in the .bss section?

a)

resb

b)

db

c)

dw

d)

equ

73.

Gina wants to reserve space for a 100-byte buffer. How should she write this directive in the .bss section?

a)

resb 100

b)

db 100

c)

dw 100

d)

times 100 db 0

74.

Which command should Henry use to generate an executable from his object file?

a)

ld -o program program.o

b)

gcc -o program program.o

c)

nasm -o program program.o

d)

link -o program program.o

75.

Henry wants to create an object file named program.o from his NASM source file program.asm. Which command should he use?

a)

nasm -f elf64 -o program.o program.asm

b)

nasm -o program.o -f elf program.asm

c)

nasm -f bin program.asm -o program.o

d)

nasm -f program.asm -o program.o

76.

Which section in NASM is used for uninitialized data that does not need to be stored in the executable file?

a)

.text

b)

.data

c)

.bss

d)

.code

77.

Irene wants to declare a variable count in the .bss section. How should she do it?

a)

count resb 4

b)

count db 4

c)

count dw 4

d)

count equ 4