c++.dos.32-bits - Help on int.h
- Imran Haider (5/5) Nov 21 2001 charset="iso-8859-1"
- Roland (19/21) Nov 22 2001 //declarations
charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Can anyone give me a short example on int_setvector function? I have = no idea on how to split the interrupt address into segment and offset. = Thanks
Nov 21 2001
Imran Haider a écrit : Can anyone give me a short example on int_setvector function? I have no idea on how to split the interrupt address into segment and offset. Thanks//declarations static int _cdecl int_handler(INT_DATA* idata); //trap vector: if (int_intercept(no_int,int_handler,int_stack_size)!=0) goto err; //untrap vector (if trap was ok): int_restore(no_int); //interrupt handler: static int _cdecl int_handler(INT_DATA* idata) { //at entry, if hardware interrupt, cpu flag if is 0 (interrupt locked), PIC 8929 interrupt mask is off . . do what you have to do (!! if hardware asynchronous interrupt there is some particular knowledge to have !!) . . return 0; //return 0 if you want to call original interrupt or return 1 //return 1 if you don't want to call original interrupt //!! if hardware interrupt, you have to send a End Of Interrupt to Interrupt Controller PIC 8259 }
Nov 22 2001