home *** CD-ROM | disk | FTP | other *** search
/ Microsoft Programmer's Library 1.3 / Microsoft-Programers-Library-v1.3.iso / sampcode / dos_ency / section5 / fxn35h.asm < prev    next >
Encoding:
Assembly Source File  |  1988-08-11  |  1.2 KB  |  23 lines

  1.         ;************************************************************;
  2.         ;                                                            ;
  3.         ;           Function 35H: Get Interrupt Vector               ;
  4.         ;                                                            ;
  5.         ;           typedef void (far *FCP)();                       ;
  6.         ;           FCP get_vector(intnum)                           ;
  7.         ;               int intnum;                                  ;
  8.         ;                                                            ;
  9.         ;           Returns a far code pointer that is the           ;
  10.         ;           segment:offset of the interrupt vector.          ;
  11.         ;                                                            ;
  12.         ;************************************************************;
  13.  
  14. cProc   get_vector,PUBLIC
  15. parmB   intnum
  16. cBegin
  17.         mov     al,intnum       ; Get interrupt number into AL.
  18.         mov     ah,35h          ; Select "get vector" function.
  19.         int     21h             ; Call MS-DOS.
  20.         mov     ax,bx           ; Return vector offset.
  21.         mov     dx,es           ; Return vector segment.
  22. cEnd
  23.