• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 3 out of 19 pages
Class notes

What is DOS? + Practical Programs Explained | 8086/8088 Assembly Language Notes

Document preview thumbnail
Preview 3 out of 19 pages

Complete and easy-to-understand notes on DOS (Disk Operating System) with practical programs and explanations. Covers the basic concept of DOS, its role in 8086/8088 Assembly Language, commonly used DOS services, and practical program examples with step-by-step explanations. Ideal for BSCS, Computer Science, Assembly Language, Microprocessor, and exam preparation.

Content preview

 What is DOS?

DOS is an old operating system that was used on computers before
Windows. It had a text-based screen no icons, no mouse, only commands.

 Role of DOS in Assembly Language

When we use INT 21h, we are calling the functions of DOS, such as:

 09h → Print a string
 01h → Take input from the keyboard
 02h → Display a single character
 4Ch → Exit the program

Meaning:
In assembly language, we are basically telling DOS:
"You do this task for us!"

,Line-by-Line Explanation:

.model small
This tells the compiler that the program will use the Small Memory
Model. In this model, the Code segment is 64KB and the Data segment is
64KB a small, simple, and perfect model for beginners.

.stack 100h
This reserves stack memory; 100h = 256 bytes.
The stack is used to hold temporary data, return addresses, parameters,
etc.
.data

Here we declare our variables.

S1 db "Helloworld$"

 S1 is a string variable.
 "Helloworld$" is the text we want to print on the screen.
 The $ sign indicates the end of the string (it tells the DOS interrupt
where the string finishes).

.code

This is where the actual instructions start.

main proc

This declares the main function of the program.

mov ax, @data

The address of the Data Segment is loaded into the AX register.

, mov ds, ax

Now DS is set equal to AX.
This means the Data Segment is activated, and we can now access S1.

lea dx, s1

Meaning of LEA: Load Effective Address
It loads the address of string S1 into the DX register.
Now DOS interrupt knows where the string is stored and from where it
should read it.

mov ah, 9

AH = 09h means:
We want to use DOS function 09h, which is the Display String function.

INT 21h
Interrupt 21h runs function 09h,
and it prints "Helloworld" on the screen.

mov ah, 4Ch

Function 4Ch = Terminate Program

INT 21h

This properly exits the program.

main endp / end main

Both the function and the program are closed.

Document information

Uploaded on
August 22, 2026
Number of pages
19
Written in
2026/2027
Type
Class notes
Professor(s)
Zain
Contains
All classes
$3.69

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Sold
0
Followers
0
Items
43
Last sold
-



Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions