home *** CD-ROM | disk | FTP | other *** search
- ;/*
- ;** geseivec.asm
- ;** contains: getivect(), setivect()
- ;*/
-
- SETVECTOR equ 025h ;DOS: Set contents of interrupt vector
- GETVECTOR equ 035h ;DOS: Get contents of interrupt vector
- DOSCALL equ 021h ;Interface with DOS here
-
- include model.h
- include prologue.h
-
- pseg pGetSetIvec
-
- ;/*
- ;**
- ;** void (far* GF_CDECL getivect(unsigned vectnumber))();
- ;**
- ;** ARGUMENT(s)
- ;** vectnumber - Interrupt number to retrieve
- ;**
- ;** DESCRIPTION
- ;** Get contents of Interrupt vector.
- ;**
- ;** RETURNS
- ;** 32 bit (far) pointer of value found at vectnumber.
- ;**
- ;** AUTHOR
- ;** "" Tue 15-Nov-1988 11:33:09
- ;** Copyright (C)1988-1990 Greenleaf Software Inc. All Rights Reserved.
- ;**
- ;** MODIFICATIONS
- ;**
- ;*/
- cproc getivect
- push es
- mov al,parm1_ ;AL=interrupt number
- mov ah,GETVECTOR
- int DOSCALL
- ifdef AXBX32
- mov ax,es ;AX=segment (bx already has offset)
- else
- mov dx,es ;DX=segment
- mov ax,bx ;BX=offset
- endif
- pop es
- cproce
-
-
- ;/*
- ;**
- ;** void GF_CDECL setivect(unsigned vectnumber,void(far *newroutine)())
- ;**
- ;** ARGUMENT(s)
- ;**
- ;**
- ;** newroutine - points to address (32bit) of new routine
- ;** replacing the current handler.
- ;** vectnumber - Interrupt number to set.
- ;**
- ;** DESCRIPTION
- ;** Sets vector to point to new routine.
- ;**
- ;**
- ;** RETURNS
- ;** void
- ;**
- ;** AUTHOR
- ;** "" Tue 15-Nov-1988 11:33:09
- ;** Copyright (C)1988-1990 Greenleaf Software Inc. All Rights Reserved.
- ;**
- ;** MODIFICATIONS
- ;**
- ;*/
- cproc setivect
- mov al,parm1_ ;AL=vector to set
- mov ah,SETVECTOR
- push ds
- lds dx,parm2_ ;DS:DX point to new vector
- int DOSCALL
- pop ds
- cproce
-
-
- endps
- end
-