0% found this document useful (0 votes)
21 views2 pages

Additional MPL Oral Questions

The document discusses various directives, instructions, registers and system calls related to the 80386 microprocessor. It provides explanations of directives like DB, DW, EQU and ORG. It also covers instructions like PUSH, POP, jump and call. System calls are explained as a mechanism for programs to request services from the operating system. A example macro for a display system call is also given.

Uploaded by

Aditya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views2 pages

Additional MPL Oral Questions

The document discusses various directives, instructions, registers and system calls related to the 80386 microprocessor. It provides explanations of directives like DB, DW, EQU and ORG. It also covers instructions like PUSH, POP, jump and call. System calls are explained as a mechanism for programs to request services from the operating system. A example macro for a display system call is also given.

Uploaded by

Aditya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Additional MPL Oral Questions

1. Directives used in 80386 Microprocessor-

Directive Description

Allocates and initializes single or multiple data bytes. For example, DB 30H,
DB
52H, 35H reserves memory locations for these values.

Initializes single or multiple data words (16-bit). For instance, DW 1020H,


DW
4216H allocates memory locations for these 16-bit data values.

END Marks the end of a program during assembly.

Assigns a numerical value or constant to a variable. For example, DONE EQU


EQU
10H sets the value of the variable “DONE” to 10H.

Represents the beginning of a macro. Defines the name and parameters for
MACRO
reusable code segments.

ENDM Indicates the termination of a macro. Marks the end of the macro definition.

Specifies the starting address for a module or segment. Statements following


ORG this directive are stored in memory locations beginning with a specific
address.

2. PUSH & POP Instructions


3. Jump & Call Instructions
4. Flag Register and meaning of each flag
5. Sizes of GDTR, LDTR, TR, MSW & their use
6. Difference between Macro & Procedure
7. Conversion of Hex Number to ASCII
0 to 9 = 30 to 39 respectively and
A to F = 41 to 46
ADD 30 command for 0 to 9 and ADD 37 for A to F
8. Physical Memory of 80386 processor
9. Features of 80386 processor
10. Clock frequency use or Operating frequency
11. Interrupts H/W & S/W Interrupts
12. Interrupt pins(H/W Interrupts- NMI & INTR)
13. S/W Interrupts Table e.g- INT 0, INT 4
14. Exception Definition & types

15. Definition of System call, Why they are used


What is a System Call?
A system call is a mechanism used by programs to request services from the operating
system (OS). In simpler terms, it allows a program to interact with the underlying system,
such as accessing hardware resources or performing privileged operations

Macro Explaination-
%macro disp 2
mov rax, 01
mov rdi, 01
mov rsi, %1
mov rdx, %2
syscall
%endmacro

1. %macro disp 2: This line defines a macro named disp that takes two arguments.
Macros are reusable code segments that can be expanded inline during assembly.
2. The body of the macro contains the following instructions:
o mov rax, 01: This moves the value 01 into the rax register. The rax register
is commonly used for system call numbers.
o mov rdi, 01: This moves the value 01 into the rdi register. The rdi register
typically holds the first argument for system calls (e.g., file descriptors or
output streams).
o mov rsi, %1: This moves the first argument of the macro (specified by %1)
into the rsi register. The rsi register usually holds the second argument for
system calls (e.g., buffer addresses).
o mov rdx, %2: This moves the second argument of the macro (specified by %2)
into the rdx register. The rdx register often holds the third argument for
system calls (e.g., buffer sizes).
3. Finally, the syscall instruction is used to invoke a system call based on the values set
in the registers.

You might also like