home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Devil's Doorknob BBS Capture (1996-2003)
/
devilsdoorknobbbscapture1996-2003.iso
/
Dloads
/
PROGRAMM
/
SNIP0492.ZIP
/
NDPCHECK.ASM
< prev
next >
Wrap
Assembly Source File
|
1991-09-12
|
1KB
|
42 lines
;
; FUNCTION: ndp_check
;
; Require MASM 5.1 or later, or equivalent
;
page 55, 132
% .MODEL memodel,C ;Add model support via
;command line macros, e.g.
;MASM /Mx /Dmemodel=LARGE
.CODE
control dw 0
;---------------------------------------------------------------
;
; Check for an NDP.
;
; Returns 0 if no coprocessor
; Returns 1 if coprocessor present
PUBLIC ndp_check
ndp_check PROC USES BX
xor BX,BX ; set up zero return
fninit ; try to initialize the NDP
mov byte ptr control+1,0 ; clear memory byte
fnstcw control ; put control word in memory
mov AH,byte ptr control+1 ; if AH is 03h, you got
cmp AH,03h ; an NDP on board !!
jne SHORT NDPbye
inc BX
NDPbye:
mov AX,BX
ret
ndp_check ENDP
end