http://www.ousob.com --- Legacy Redefined #include <stdio.h> #include <stdlib.h> #include <ctype.h> #include <dos.h> #include <extend50.h> char *floppytype(int drivenumber); CLIPPER b_floppy() { int driveNum; char *ptr; char *param = _parc(1); if( !PCOUNT || !ISCHAR(1) ) { _retc(" \0"); return; } driveNum = (int)*param; switch(driveNum) { case 0x41 : case 0x61 : ptr = floppytype(0); break; case 0x42 : case 0x62 : ptr = floppytype(1); break; default : ptr = floppytype(10); break; } _retc(ptr); } char *floppytype(int drivenumber) { union REGS regs; regs.h.ah = 0x08; regs.h.dl = drivenumber; int86(0x13,&regs,&regs); switch(regs.h.bl) { case 1 : return("5 360 Kb"); case 2 : return("5 1.2 Mb"); case 3 : return("3 720 Kb"); case 4 : return("3 1.44 Mb"); default : return("????"); } }