home *** CD-ROM | disk | FTP | other *** search
- ;unsigned short number_floppy();
-
- EXTRN _memory_model:byte
-
- _TEXT SEGMENT BYTE PUBLIC 'CODE'
- ASSUME CS:_TEXT
- PUBLIC _number_floppy
- _number_floppy proc near
- sub ax,ax ;clear AX in case none
- int 11h ;make BIOS equipment chk
- test ax,1 ;any drives at all?
- jz L1 ;jump ahead if not
- and ax,11000000B ;clear bits 0-5
- mov cl,6 ;ready for shift
- shr ax,cl ;bits to bottom of AX
- inc ax ;count from 1, not 0
- L1: cmp _memory_model,0 ;quit
- jle Quit ;
- db 0CBh ;RET far
- Quit: ret ;RET near
- _number_floppy endp
- _TEXT ENDS
- END