Download
Interrupt Mechanism Presentation Transcript:
1.Interrupt Mechanism
Interrupt Compared With Procedures
Call MyProc
A= Addition(4,5);
Printf(“hello world”);
2.Int 21h
Int 10h
Int3
3.Interrupt Vector Table
4.ISR’s are Routines Resident in Memory
5.Interrupt Invocation
Push Flags, CS, IP Registers, Clear Interrupt Flag
Use (INT#)*4 as Offset and Zero as Segment
This is the address of interrupt Vector and not the ISR
Use lower two bytes of interrupt Vector as offset and move into IP
Use the higher two bytes of Vector as Segment Address and move it into CS=0:[offset+2]
Branch to ISR and Perform I/O Operation
Return to Point of Interruption by Popping the 6 bytes i.e. Flags CS, IP.
6.Parameter Passing to S/W interrupts
7.S/W Interrupts Invocation
Psuedo Variables
AX, BX, CX, DX
_AX = 0x1234H
a = _BX
8.geninterrupt ( 0 x int# )
9.Interrupt 21/09 Description
10.#include
#include
#include
char st[80] ={"Hello World$"};
void main()
{
REGS regs;
regs.x.dx = (unsigned int) st;
regs.h.ah = 0x09;
int86(0x21,®s,®s);
}
11.Interrupt 21/42H Description
Int # 21 Service # 42H
Inputs
AL = Move Technique
BX = File Handle
CX-DX = No of Bytes File to be moved
AH = Service # = 42H
Output
DX-AX = No of Bytes File pointer actually moved
No comments:
Post a Comment