CS2422 Assembly Language - PowerPoint PPT Presentation

1 / 15
About This Presentation
Title:

CS2422 Assembly Language

Description:

INT 21h MS-DOS Services. Boot Process (1) CPU Reset. Blank memory, except ROM ... OS (e.g., Linux, MS-DOS or Windows) is then loaded. ... – PowerPoint PPT presentation

Number of Views:40
Avg rating:3.0/5.0
Slides: 16
Provided by: csNth
Category:

less

Transcript and Presenter's Notes

Title: CS2422 Assembly Language


1
CS2422 Assembly Language System Programming
  • November 2, 2006

2
Todays Topics
  • INT (Interrupt).
  • How Does a PC Boot?

3
Study Guide
  • Interrupt Sections 13.1.3 and 13.1.4.
  • (Advanced) Interrupt Handler Section 16.4.
  • Boot Process http//www.pcguide.com/ref/mbsys/bio
    s/boot.htm

4
Interrupt
  • If you call your friend and his/her mom says
    he/she is not home, what do you do?
  • Do something else, and get interrupted when I/O
    events happen.
  • May be triggered by hardware or software.
  • INT is also used for system calls (low-level
    procedures).

5
  • Note that we will use the 16-bit mode in the
    following slides.

6
Examples of INT I/O
  • Put parameters in registers
  • Reference chapter 8
  • Example INT 10
  • Function Code in AH
  • Function 06H clear

Example Clear Screen MOV AX, 0600 MOV BH, 17 MOV
CX, 0000 MOV DX, 184F INT 10
7
Examples of I/O INT
  • Another Example INT 21H
  • Function Code in AH
  • Function 09H display
  • Assume the string hello is at DS200

Example Display hello MOV AH, 09 MOV DX,
200 INT 21H
8
INT Vectors
  • In 000h-3FFh (1KB)
  • For INT 00-FF
  • Each INT uses a 4-byte vector (CSIP)
  • 2 bytes for IP
  • 2 bytes for CS
  • Actual code (Service Routine) is in CSIP
  • IRET at the end of INT Service Routine

9
INT Vectors Example
Main proc MOV AX,_at_data MOV DS, AX
INT 21h Main endp
PUSH DX PUSH CX
IP
CS
0h
4h


84h


3FFh
10
Interrupt Vectoring Process
11
Common Interrupts
  • INT 10h Video Services
  • INT 16h Keyboard Services
  • INT 17h Printer Services
  • INT 1Ah Time of Day
  • INT 1Ch User Timer Interrupt
  • INT 21h MS-DOS Services

12
Boot Process (1)
  • CPU Reset
  • Blank memory, except ROM
  • Start running from address FFFF0 (only 16 bytes
    left!)

13
Boot Process (2)
  • BIOS Boot and POST (Power-On Self Test)
  • BIOS of other device may be checked too. (e.g.,
    Video)
  • Flash ROM Upgrade Possible
  • If booting from hard disk ? 1st Sector (MBR)
    loaded

14
System Boot (3)
  • Master Boot Record (MBR) loaded.
  • Heard about LILO?
  • Remember that PC ? DOS/Windows
  • OS (e.g., Linux, MS-DOS or Windows) is then
    loaded.
  • INT Services may be in ROM or set up while
    loading OS.

15
For Further Information
  • PC Guide BIOS System Boot http//www.pcguide.com
    /ref/mbsys/bios/boot.htm
Write a Comment
User Comments (0)
About PowerShow.com