home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Simtel MSDOS 1992 December
/
simtel1292_SIMTEL_1292_Walnut_Creek.iso
/
msdos
/
sysutl
/
veum.arc
/
VEC.ASM
< prev
next >
Wrap
Assembly Source File
|
1987-01-19
|
1KB
|
68 lines
TITLE VEC--Vector Handler
if1
include prolog.mac
endif
pgroup group prog
dgroup group data
assume cs:pgroup, ds:dgroup, es:dgroup
prog segment byte public 'PROG'
public vecchk
;
; int vecchk()
;
; return nonzero if int 67H vector is in use.
;
vecchk proc near
prolog
xor ax,ax ; return(0) if no int 67h there
call vec_chk
jc ret1 ; there - return(1)
emvr: epilog
ret
ret1: mov ax,1
jmp emvr
vecchk endp
;
; GET INTERUPT VECTOR TECHNIQUE
;
; Function: Used to determine if int 67h is installed in the system.
; Carry flag is set upon return if no 67h vector is present.
;
; No registers destroyed;
;
vec_chk proc near
push ax
push es
push ds ; 3 words - saved registers
push cs ; 4th word - copy register
pop ds
mov ax,3567h ; "DOS: Get Vector, 67H please"
int 21h
mov ax,es
or ax,bx ; is es:bx == 0L ?
jz retvck ; if so, Z set, C reset, -> go
stc ; else set C flag for return.
retvck: pop ds ; restore 3 words saved regs
pop es
pop ax
ret
vec_chk endp
prog ends
data segment word public 'DATA'
data ends
end