home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / c / library / dos / diverses / cexpress / system / numflopy.asm < prev    next >
Encoding:
Assembly Source File  |  1989-05-03  |  574 b   |  24 lines

  1. ;unsigned short  number_floppy();
  2.  
  3.     EXTRN  _memory_model:byte
  4.  
  5. _TEXT    SEGMENT BYTE PUBLIC 'CODE'
  6.     ASSUME CS:_TEXT
  7.     PUBLIC _number_floppy
  8. _number_floppy proc near
  9.     sub  ax,ax        ;clear AX in case none
  10.     int  11h        ;make BIOS equipment chk
  11.     test ax,1        ;any drives at all?
  12.     jz   L1            ;jump ahead if not
  13.     and  ax,11000000B    ;clear bits 0-5
  14.     mov  cl,6        ;ready for shift
  15.     shr  ax,cl        ;bits to bottom of AX
  16.     inc  ax            ;count from 1, not 0
  17. L1:    cmp  _memory_model,0    ;quit
  18.     jle  Quit        ;
  19.     db   0CBh        ;RET far
  20. Quit:    ret            ;RET near
  21. _number_floppy endp
  22. _TEXT    ENDS
  23.     END
  24.