You are on page 1of 22

Chapter - 3

By
Hasan Murad
CSE,UAP
The organization of PC
• We have already learned about the hardware components.
• What’s next?
• The Software components
• The operating system
Today’s Topics
• DOS(Disk operating system)
• BIOS(Basic input output system)
• Interrupt Vectors
The Operating System
• Reading and executing the commands typed by the user
• Performing I/O operations
• Generating error messages
• Managing memory and other resources
DOS
• DOS(Disk operating system)
• Used on 8086/8088 and its family of microprocessor
• DOS 5.0 supports graphical user interface(gui)
BIOS
• BIOS(Basic input/output system)
• Perform I/O operation for the PC
• BIOS routines are machine specific
• DOS I/O operations are done by BIOS
• In simple word BIOS is a library of input/output functions
Interrupt vector
• The addresses of the BIOS routines are called interrupt vectors
Memory Map of the PC
Start-up Operation

Boot Operating
BIOS Routine
Program System(DOS)
Chapter - 4
By
Hasan Murad
CSE,UAP
First Code in Assembly Language
Program Structure
Model

• .MODEL memory_model
Stack Segment

• .STACK SIZE
• .STACK 200H
• If we omit the size, the default value will be 1KB.
Data Segment
• Where all the variables will be declared
• .DATA name
• The name is optional
• Even for Small model it will generate an error, if we write data
segment name
Variable Declaration
• . Data
Variable_Name Data_Type Content
• .Data
var1 DB 2
var2 DW 3
char1 DB ‘a’
str1DB ‘abc’
arr1 DW 1,2,3,4,5

Data Type : DB(One byte),DW(One word),DD(Two words),DQ(Four words),DT(Ten words)


Code Segment
• .CODE name
• The name is optional
• Even for Small model it will generate an error, if we write code
segment name
Procedure
• name PROC
; body of the procedure
name ENDP
• MAIN PROC
; body of the procedure
MAIN ENDP
Procedure
• .CODE
MAIN PROC
;Body of main procedure
MAIN ENDP
;Other procedures
Comment Field
• Good programming practice
• ;Any comment
• Mov AX, BX ;Move the content of BX register in AX register
First Code in Assembly Language

You might also like