SlideShare a Scribd company logo
1 of 13
INTERRUPT OPERATIONS
03/17/18 1
 Interrupts are particularly useful when interfacing I/O devices that provide or
require data at relatively low data transfer rates .
 If the person using the keyboard typed one character per second. The software of
the Processors waited an entire second between each key stroke for the person to
type another key .
 This process was such a tremendous waste of time that designers developed another
process, Interrupt processing to handle this situation.
 Interrupt processing allows the microprocessor to execute other software
while the keyboard operator is thinking about what key to type next.
03/17/18 2
DOS and BI OS
I nt errupt s
DOS and BIOS interrupts are used to perform some very
useful functions, such as displaying data to the monitor,
reading data from keyboard, etc.
They are used by identifying the interrupt option type,
which is the value stored in register AH and providing,
whatever extra information that the specific option requires.
03/17/18 3
I NT 21h
I ns t ruct i on
Hence this INT instructions used for Keyboard.(INT
21 h-DOS Interrupt)
The int 21 h instructions are used to interrupt through
the Keyboard, Files, Directives.
Depending on the value that is moved to the ‘ah’ the
operations will be done.
03/17/18 4
INT 21h / AH=1 - read character from standard input, with echo,
result is stored in AL.
if there is no character in the keyboard buffer, the function waits until any key is
pressed.
example:
mov ah, 1
int 21h
INT 21h / AH=7 - character input without echo to AL.
example: mov ah, 7
int 21h  
03/17/18 5
INT 21h / AH=0Ah - input of a string to DS:DX,
Example:
mov ax,@data
mov ds,ax
mov ah,0Ah
int 21h
INT 21h/AH=0Bh - checks keyboard status.returns FFH to AL if character is
available.Otherwise returns 00H to AL.
INT 21h/0Ch- this clear keyboard buffer and invoke function. Loads required
function in AL.
mov ah,0ch //request keyboard function
mov al,function //required function
int 21h03/17/18 6
INT 21h / 6h :direct console input or output.
INT 21h/0Eh :Select default drive
INT 21h/19h :Get current default drive
INT 21h/25h :Set interrupt vector
INT 21h/35h :Get interrupt Vector
INT 21h/39h :Make directory
INT 21h/3Ah :Remove directory
INT 21h/3Bh :Set current directory
03/17/18 7
INT 21h/3Ch;create or truncate file
INT 21h/3Dh;Open Existing file
INT 21h/3Eh;Close file
INT 21h/3Fh;Read from File
INT 21h/40h;Write to file
INT 21h/41h;Delete File
INT 21h/42h;Set current File Position
INT 21h/47h;Get current Directory
INT 21h/4Ch;return control to the operating system(STOP
PROGRAM)
INT 21h/56h; rename file/move file03/17/18 8
INT 16h is the basic BIOS keyboard operation
used extensively by software developers and provides the
following services according to a function code that you
load in AH.
INT 16h/03h: set typematic Repeat rate
INT 16h/05h: Keyboard write.
 INT 16h/10h: Read keyboard Character
INT 16h/11h: Determine whether character is present or not
I NT 16h I ns t ruct i on
03/17/18 9
03/17/18 10
INT 16h/03h : set typematic Repeat rate
MOV AH,03H ; SETS TYPEMATIC REPEAT RATE
MOV AL,05H ;REQUIRED SUBFUNCTION
MOV BH,REPEAT –DELAY ;DELAY BEFOR E START(0=1/4 SEC.
,1=1/2 SEC- DEFAULT. ,2=3/4 SEC. ,3=1
SEC.)
MOV BL,REPEAT- RATE SPEED OF REPEATION (0– FASTEST
THROUGH 31-- SLOWEST)
INT 16h/05h: Keyboard write
Loading ASCII character to CH and its scan code to CL.
Allows to enter characters to the buffer until it is full.
If full, operation sets Carry flag and AL to 1
03/17/18 11
INT 16h/10h: Read keyboard Character
If a character is pressed ,then it delivered to the AL and its scan code to AH.
If a extended key scan code is delivered to AH and the value 00H to AL
If a extended duplicate key scan code is delivered to AH and the value E0H
to AL
MOV AH,10H ;REQUEST FOR BIOS KEYBOARD INPUT.
INT 16H ;CALLING INTERRUPT SERVICE
CMP AL,00H ; EXTENDED FUNCTION KEY ??
JE ;YES.EXIT
CMP AL,E0H ; EXTENDED FUNCTION KEY ??
JE ;YES.EXIT
03/17/18 12
INT 16h/11h: Determine whether character is present or not
If the character is present in the buffer , clears ZERO flag and delivered it to
AL and its scan code to AH and still character is remained in the buffer.
If the character is not present in the buffer , sets ZERO flag.
INT 16h/12h: Return Keyboard Status.
Delivers keyboard status byte from BIOS DATA AREA 1 at location 40 :
17H to AL & byte from 40 : 18 H to AH.
Key pressed Status Bit
Caps lock 6
Num lock 5
Scroll lock 4
Right ALT 3
Right CTRL 2
Left ALT 1
Left CTRL 0
How t he Keyboard
WorksKeyboard controller chip sends an 8-
bit scan code to the keyboard serial
input port
Interrupt triggered, INT 9h routine
executes
Scan code and ASCII code inserted
into keyboard typeahead buffer
03/17/18 13

More Related Content

What's hot

Assembly language 8086
Assembly language 8086Assembly language 8086
Assembly language 8086John Cutajar
 
services and system calls of operating system
services and system calls of operating system services and system calls of operating system
services and system calls of operating system Saurabh Soni
 
parameter passing in c#
parameter passing in c#parameter passing in c#
parameter passing in c#khush_boo31
 
Modes of 80386
Modes of 80386Modes of 80386
Modes of 80386aviban
 
File handling functions
File  handling    functionsFile  handling    functions
File handling functionsTech_MX
 
Interfacing With High Level Programming Language
Interfacing With High Level Programming Language Interfacing With High Level Programming Language
Interfacing With High Level Programming Language .AIR UNIVERSITY ISLAMABAD
 
Ethernet frame format
Ethernet frame formatEthernet frame format
Ethernet frame formatmyrajendra
 
Control and conditional statements
Control and conditional statementsControl and conditional statements
Control and conditional statementsrajshreemuthiah
 
8086 instruction set with types
8086 instruction set with types8086 instruction set with types
8086 instruction set with typesRavinder Rautela
 
Stack and its usage in assembly language
Stack and its usage in assembly language Stack and its usage in assembly language
Stack and its usage in assembly language Usman Bin Saad
 
Fddi & Gigabit Ethernet
Fddi & Gigabit EthernetFddi & Gigabit Ethernet
Fddi & Gigabit EthernetUtkarsh Verma
 
File System in Operating System
File System in Operating SystemFile System in Operating System
File System in Operating SystemMeghaj Mallick
 
C++ Programming Language
C++ Programming Language C++ Programming Language
C++ Programming Language Mohamed Loey
 
Computer architecture instruction formats
Computer architecture instruction formatsComputer architecture instruction formats
Computer architecture instruction formatsMazin Alwaaly
 

What's hot (20)

Assembly language 8086
Assembly language 8086Assembly language 8086
Assembly language 8086
 
services and system calls of operating system
services and system calls of operating system services and system calls of operating system
services and system calls of operating system
 
parameter passing in c#
parameter passing in c#parameter passing in c#
parameter passing in c#
 
Memory Management
Memory ManagementMemory Management
Memory Management
 
Modes of 80386
Modes of 80386Modes of 80386
Modes of 80386
 
Addressing modes
Addressing modesAddressing modes
Addressing modes
 
File handling functions
File  handling    functionsFile  handling    functions
File handling functions
 
Interfacing With High Level Programming Language
Interfacing With High Level Programming Language Interfacing With High Level Programming Language
Interfacing With High Level Programming Language
 
Ethernet frame format
Ethernet frame formatEthernet frame format
Ethernet frame format
 
Control and conditional statements
Control and conditional statementsControl and conditional statements
Control and conditional statements
 
Ipv4 header
Ipv4 headerIpv4 header
Ipv4 header
 
8086 instruction set with types
8086 instruction set with types8086 instruction set with types
8086 instruction set with types
 
Stack and its usage in assembly language
Stack and its usage in assembly language Stack and its usage in assembly language
Stack and its usage in assembly language
 
Fddi & Gigabit Ethernet
Fddi & Gigabit EthernetFddi & Gigabit Ethernet
Fddi & Gigabit Ethernet
 
File System in Operating System
File System in Operating SystemFile System in Operating System
File System in Operating System
 
Semaphore
SemaphoreSemaphore
Semaphore
 
Code optimization
Code optimizationCode optimization
Code optimization
 
Loader
LoaderLoader
Loader
 
C++ Programming Language
C++ Programming Language C++ Programming Language
C++ Programming Language
 
Computer architecture instruction formats
Computer architecture instruction formatsComputer architecture instruction formats
Computer architecture instruction formats
 

Similar to Interrupt Operations Guide

Keyboard interrupt
Keyboard interruptKeyboard interrupt
Keyboard interruptTech_MX
 
8086 Interrupts & With DOS and BIOS by vijay
8086 Interrupts &  With DOS and BIOS  by vijay8086 Interrupts &  With DOS and BIOS  by vijay
8086 Interrupts & With DOS and BIOS by vijayVijay Kumar
 
Brief description of all the interupts
Brief description of all the interuptsBrief description of all the interupts
Brief description of all the interuptsSHREEHARI WADAWADAGI
 
INTEL 8086 MP Architecture
INTEL 8086 MP ArchitectureINTEL 8086 MP Architecture
INTEL 8086 MP ArchitectureMd. Arif Hossain
 
Io processing
Io processingIo processing
Io processingTech_MX
 
Assembly language programming(unit 4)
Assembly language programming(unit 4)Assembly language programming(unit 4)
Assembly language programming(unit 4)Ashim Saha
 
Unit i se pai_dos function calls
Unit i se pai_dos function callsUnit i se pai_dos function calls
Unit i se pai_dos function callsKanchanPatil34
 
Part III: Assembly Language
Part III: Assembly LanguagePart III: Assembly Language
Part III: Assembly LanguageAhmed M. Abed
 
Assembly programming
Assembly programmingAssembly programming
Assembly programmingOmar Sanchez
 
The hardware of the Mcs 51 microcontroller
 The hardware of the Mcs 51 microcontroller The hardware of the Mcs 51 microcontroller
The hardware of the Mcs 51 microcontrollerGarba Geidam
 
Intrl 8086 instruction set
Intrl 8086 instruction setIntrl 8086 instruction set
Intrl 8086 instruction setedwardkiwalabye1
 
15CS44 MP & MC Module 1
15CS44 MP & MC Module 115CS44 MP & MC Module 1
15CS44 MP & MC Module 1RLJIT
 
I Ointerface in mp
I Ointerface in mpI Ointerface in mp
I Ointerface in mpAisu
 
Programming basic computer
Programming basic computerProgramming basic computer
Programming basic computerMartial Kouadio
 
8051 data type and directives
8051 data type and directives8051 data type and directives
8051 data type and directivesSARITHA REDDY
 
8051 data types and directives
8051 data types and directives8051 data types and directives
8051 data types and directivesSARITHA REDDY
 

Similar to Interrupt Operations Guide (20)

Al2ed chapter15
Al2ed chapter15Al2ed chapter15
Al2ed chapter15
 
Keyboard interrupt
Keyboard interruptKeyboard interrupt
Keyboard interrupt
 
8086 Interrupts & With DOS and BIOS by vijay
8086 Interrupts &  With DOS and BIOS  by vijay8086 Interrupts &  With DOS and BIOS  by vijay
8086 Interrupts & With DOS and BIOS by vijay
 
Brief description of all the interupts
Brief description of all the interuptsBrief description of all the interupts
Brief description of all the interupts
 
Mpmc
MpmcMpmc
Mpmc
 
INTEL 8086 MP Architecture
INTEL 8086 MP ArchitectureINTEL 8086 MP Architecture
INTEL 8086 MP Architecture
 
Io processing
Io processingIo processing
Io processing
 
Assembly language programming(unit 4)
Assembly language programming(unit 4)Assembly language programming(unit 4)
Assembly language programming(unit 4)
 
Unit i se pai_dos function calls
Unit i se pai_dos function callsUnit i se pai_dos function calls
Unit i se pai_dos function calls
 
Advanced micro -processor
Advanced micro -processorAdvanced micro -processor
Advanced micro -processor
 
Part III: Assembly Language
Part III: Assembly LanguagePart III: Assembly Language
Part III: Assembly Language
 
Assembly programming
Assembly programmingAssembly programming
Assembly programming
 
The hardware of the Mcs 51 microcontroller
 The hardware of the Mcs 51 microcontroller The hardware of the Mcs 51 microcontroller
The hardware of the Mcs 51 microcontroller
 
Intrl 8086 instruction set
Intrl 8086 instruction setIntrl 8086 instruction set
Intrl 8086 instruction set
 
15CS44 MP & MC Module 1
15CS44 MP & MC Module 115CS44 MP & MC Module 1
15CS44 MP & MC Module 1
 
Files 3-handouts lecture-12
Files 3-handouts lecture-12Files 3-handouts lecture-12
Files 3-handouts lecture-12
 
I Ointerface in mp
I Ointerface in mpI Ointerface in mp
I Ointerface in mp
 
Programming basic computer
Programming basic computerProgramming basic computer
Programming basic computer
 
8051 data type and directives
8051 data type and directives8051 data type and directives
8051 data type and directives
 
8051 data types and directives
8051 data types and directives8051 data types and directives
8051 data types and directives
 

More from Anju Kanjirathingal (9)

Java withrealworldtechnology
Java withrealworldtechnologyJava withrealworldtechnology
Java withrealworldtechnology
 
resolution in the propositional calculus
resolution in the propositional calculusresolution in the propositional calculus
resolution in the propositional calculus
 
The propositional calculus
The propositional calculusThe propositional calculus
The propositional calculus
 
microprocessor
microprocessormicroprocessor
microprocessor
 
int 21 h for screen display
int 21 h for screen displayint 21 h for screen display
int 21 h for screen display
 
Intel 80286
Intel 80286Intel 80286
Intel 80286
 
OO Design Principles
OO Design PrinciplesOO Design Principles
OO Design Principles
 
TCP/IP
TCP/IPTCP/IP
TCP/IP
 
2 3 tree
2 3 tree2 3 tree
2 3 tree
 

Recently uploaded

4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptx4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptxmary850239
 
Mythology Quiz-4th April 2024, Quiz Club NITW
Mythology Quiz-4th April 2024, Quiz Club NITWMythology Quiz-4th April 2024, Quiz Club NITW
Mythology Quiz-4th April 2024, Quiz Club NITWQuiz Club NITW
 
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...DhatriParmar
 
Narcotic and Non Narcotic Analgesic..pdf
Narcotic and Non Narcotic Analgesic..pdfNarcotic and Non Narcotic Analgesic..pdf
Narcotic and Non Narcotic Analgesic..pdfPrerana Jadhav
 
MS4 level being good citizen -imperative- (1) (1).pdf
MS4 level   being good citizen -imperative- (1) (1).pdfMS4 level   being good citizen -imperative- (1) (1).pdf
MS4 level being good citizen -imperative- (1) (1).pdfMr Bounab Samir
 
ESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnv
ESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnvESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnv
ESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnvRicaMaeCastro1
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptxmary850239
 
ICS 2208 Lecture Slide Notes for Topic 6
ICS 2208 Lecture Slide Notes for Topic 6ICS 2208 Lecture Slide Notes for Topic 6
ICS 2208 Lecture Slide Notes for Topic 6Vanessa Camilleri
 
Using Grammatical Signals Suitable to Patterns of Idea Development
Using Grammatical Signals Suitable to Patterns of Idea DevelopmentUsing Grammatical Signals Suitable to Patterns of Idea Development
Using Grammatical Signals Suitable to Patterns of Idea Developmentchesterberbo7
 
How to Manage Buy 3 Get 1 Free in Odoo 17
How to Manage Buy 3 Get 1 Free in Odoo 17How to Manage Buy 3 Get 1 Free in Odoo 17
How to Manage Buy 3 Get 1 Free in Odoo 17Celine George
 
Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4JOYLYNSAMANIEGO
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management systemChristalin Nelson
 
CHEST Proprioceptive neuromuscular facilitation.pptx
CHEST Proprioceptive neuromuscular facilitation.pptxCHEST Proprioceptive neuromuscular facilitation.pptx
CHEST Proprioceptive neuromuscular facilitation.pptxAneriPatwari
 
Indexing Structures in Database Management system.pdf
Indexing Structures in Database Management system.pdfIndexing Structures in Database Management system.pdf
Indexing Structures in Database Management system.pdfChristalin Nelson
 
ClimART Action | eTwinning Project
ClimART Action    |    eTwinning ProjectClimART Action    |    eTwinning Project
ClimART Action | eTwinning Projectjordimapav
 
How to Make a Duplicate of Your Odoo 17 Database
How to Make a Duplicate of Your Odoo 17 DatabaseHow to Make a Duplicate of Your Odoo 17 Database
How to Make a Duplicate of Your Odoo 17 DatabaseCeline George
 

Recently uploaded (20)

4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptx4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptx
 
Paradigm shift in nursing research by RS MEHTA
Paradigm shift in nursing research by RS MEHTAParadigm shift in nursing research by RS MEHTA
Paradigm shift in nursing research by RS MEHTA
 
Mythology Quiz-4th April 2024, Quiz Club NITW
Mythology Quiz-4th April 2024, Quiz Club NITWMythology Quiz-4th April 2024, Quiz Club NITW
Mythology Quiz-4th April 2024, Quiz Club NITW
 
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...
 
Faculty Profile prashantha K EEE dept Sri Sairam college of Engineering
Faculty Profile prashantha K EEE dept Sri Sairam college of EngineeringFaculty Profile prashantha K EEE dept Sri Sairam college of Engineering
Faculty Profile prashantha K EEE dept Sri Sairam college of Engineering
 
Narcotic and Non Narcotic Analgesic..pdf
Narcotic and Non Narcotic Analgesic..pdfNarcotic and Non Narcotic Analgesic..pdf
Narcotic and Non Narcotic Analgesic..pdf
 
MS4 level being good citizen -imperative- (1) (1).pdf
MS4 level   being good citizen -imperative- (1) (1).pdfMS4 level   being good citizen -imperative- (1) (1).pdf
MS4 level being good citizen -imperative- (1) (1).pdf
 
ESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnv
ESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnvESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnv
ESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnv
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx
 
ICS 2208 Lecture Slide Notes for Topic 6
ICS 2208 Lecture Slide Notes for Topic 6ICS 2208 Lecture Slide Notes for Topic 6
ICS 2208 Lecture Slide Notes for Topic 6
 
Using Grammatical Signals Suitable to Patterns of Idea Development
Using Grammatical Signals Suitable to Patterns of Idea DevelopmentUsing Grammatical Signals Suitable to Patterns of Idea Development
Using Grammatical Signals Suitable to Patterns of Idea Development
 
How to Manage Buy 3 Get 1 Free in Odoo 17
How to Manage Buy 3 Get 1 Free in Odoo 17How to Manage Buy 3 Get 1 Free in Odoo 17
How to Manage Buy 3 Get 1 Free in Odoo 17
 
Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management system
 
CHEST Proprioceptive neuromuscular facilitation.pptx
CHEST Proprioceptive neuromuscular facilitation.pptxCHEST Proprioceptive neuromuscular facilitation.pptx
CHEST Proprioceptive neuromuscular facilitation.pptx
 
INCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptx
INCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptxINCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptx
INCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptx
 
Indexing Structures in Database Management system.pdf
Indexing Structures in Database Management system.pdfIndexing Structures in Database Management system.pdf
Indexing Structures in Database Management system.pdf
 
ClimART Action | eTwinning Project
ClimART Action    |    eTwinning ProjectClimART Action    |    eTwinning Project
ClimART Action | eTwinning Project
 
How to Make a Duplicate of Your Odoo 17 Database
How to Make a Duplicate of Your Odoo 17 DatabaseHow to Make a Duplicate of Your Odoo 17 Database
How to Make a Duplicate of Your Odoo 17 Database
 
Mattingly "AI & Prompt Design: Large Language Models"
Mattingly "AI & Prompt Design: Large Language Models"Mattingly "AI & Prompt Design: Large Language Models"
Mattingly "AI & Prompt Design: Large Language Models"
 

Interrupt Operations Guide

  • 2.  Interrupts are particularly useful when interfacing I/O devices that provide or require data at relatively low data transfer rates .  If the person using the keyboard typed one character per second. The software of the Processors waited an entire second between each key stroke for the person to type another key .  This process was such a tremendous waste of time that designers developed another process, Interrupt processing to handle this situation.  Interrupt processing allows the microprocessor to execute other software while the keyboard operator is thinking about what key to type next. 03/17/18 2
  • 3. DOS and BI OS I nt errupt s DOS and BIOS interrupts are used to perform some very useful functions, such as displaying data to the monitor, reading data from keyboard, etc. They are used by identifying the interrupt option type, which is the value stored in register AH and providing, whatever extra information that the specific option requires. 03/17/18 3
  • 4. I NT 21h I ns t ruct i on Hence this INT instructions used for Keyboard.(INT 21 h-DOS Interrupt) The int 21 h instructions are used to interrupt through the Keyboard, Files, Directives. Depending on the value that is moved to the ‘ah’ the operations will be done. 03/17/18 4
  • 5. INT 21h / AH=1 - read character from standard input, with echo, result is stored in AL. if there is no character in the keyboard buffer, the function waits until any key is pressed. example: mov ah, 1 int 21h INT 21h / AH=7 - character input without echo to AL. example: mov ah, 7 int 21h   03/17/18 5
  • 6. INT 21h / AH=0Ah - input of a string to DS:DX, Example: mov ax,@data mov ds,ax mov ah,0Ah int 21h INT 21h/AH=0Bh - checks keyboard status.returns FFH to AL if character is available.Otherwise returns 00H to AL. INT 21h/0Ch- this clear keyboard buffer and invoke function. Loads required function in AL. mov ah,0ch //request keyboard function mov al,function //required function int 21h03/17/18 6
  • 7. INT 21h / 6h :direct console input or output. INT 21h/0Eh :Select default drive INT 21h/19h :Get current default drive INT 21h/25h :Set interrupt vector INT 21h/35h :Get interrupt Vector INT 21h/39h :Make directory INT 21h/3Ah :Remove directory INT 21h/3Bh :Set current directory 03/17/18 7
  • 8. INT 21h/3Ch;create or truncate file INT 21h/3Dh;Open Existing file INT 21h/3Eh;Close file INT 21h/3Fh;Read from File INT 21h/40h;Write to file INT 21h/41h;Delete File INT 21h/42h;Set current File Position INT 21h/47h;Get current Directory INT 21h/4Ch;return control to the operating system(STOP PROGRAM) INT 21h/56h; rename file/move file03/17/18 8
  • 9. INT 16h is the basic BIOS keyboard operation used extensively by software developers and provides the following services according to a function code that you load in AH. INT 16h/03h: set typematic Repeat rate INT 16h/05h: Keyboard write.  INT 16h/10h: Read keyboard Character INT 16h/11h: Determine whether character is present or not I NT 16h I ns t ruct i on 03/17/18 9
  • 10. 03/17/18 10 INT 16h/03h : set typematic Repeat rate MOV AH,03H ; SETS TYPEMATIC REPEAT RATE MOV AL,05H ;REQUIRED SUBFUNCTION MOV BH,REPEAT –DELAY ;DELAY BEFOR E START(0=1/4 SEC. ,1=1/2 SEC- DEFAULT. ,2=3/4 SEC. ,3=1 SEC.) MOV BL,REPEAT- RATE SPEED OF REPEATION (0– FASTEST THROUGH 31-- SLOWEST) INT 16h/05h: Keyboard write Loading ASCII character to CH and its scan code to CL. Allows to enter characters to the buffer until it is full. If full, operation sets Carry flag and AL to 1
  • 11. 03/17/18 11 INT 16h/10h: Read keyboard Character If a character is pressed ,then it delivered to the AL and its scan code to AH. If a extended key scan code is delivered to AH and the value 00H to AL If a extended duplicate key scan code is delivered to AH and the value E0H to AL MOV AH,10H ;REQUEST FOR BIOS KEYBOARD INPUT. INT 16H ;CALLING INTERRUPT SERVICE CMP AL,00H ; EXTENDED FUNCTION KEY ?? JE ;YES.EXIT CMP AL,E0H ; EXTENDED FUNCTION KEY ?? JE ;YES.EXIT
  • 12. 03/17/18 12 INT 16h/11h: Determine whether character is present or not If the character is present in the buffer , clears ZERO flag and delivered it to AL and its scan code to AH and still character is remained in the buffer. If the character is not present in the buffer , sets ZERO flag. INT 16h/12h: Return Keyboard Status. Delivers keyboard status byte from BIOS DATA AREA 1 at location 40 : 17H to AL & byte from 40 : 18 H to AH. Key pressed Status Bit Caps lock 6 Num lock 5 Scroll lock 4 Right ALT 3 Right CTRL 2 Left ALT 1 Left CTRL 0
  • 13. How t he Keyboard WorksKeyboard controller chip sends an 8- bit scan code to the keyboard serial input port Interrupt triggered, INT 9h routine executes Scan code and ASCII code inserted into keyboard typeahead buffer 03/17/18 13

Editor's Notes

  1. Let see the different types of operations………………