home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Frostbyte's 1980s DOS Shareware Collection
/
floppyshareware.zip
/
floppyshareware
/
USCX
/
TEXTUTIL.ZIP
/
CDIR.C
< prev
next >
Wrap
Text File
|
1984-09-16
|
991b
|
50 lines
/* <CDIR.C> */
#define DEBUG 0
#define SCRN_FLG 1
#define DB_FLG 1
#define WIDE_FLG 1
#include <cdir.h>
main(argc,argv)
int argc;
char *argv[];
{
int i;
xfcb search;
xfcb *sptr;
sptr = &search;
for(i = 0; i < DIRSIZ; dptr[i] = &direct[i++]);
/* now fill in the search fcb. */
sptr -> drive = argc != 2 ? DEF_DRV : getdrive(argv);
search.flag = '\377';
search.attribute = '\077';
for(i=0;i<8;i++)
search.filename[i] = '?';
for(i=0;i<3;i++)
search.ext[i] = '?';
/* It may be poss to use iret = bdos(fn,dx) (see compiler */
/* reference p 1-45. I used MASM. Per Intel's ASM86 */
/* book p 57, the LAST parameter pushed gets the SMALLEST */
/* offset. bp+4 = search; bp+6 = direct[]; bp+8 = sizeof */
get_dir(&search, &direct[0].flag, sizeof(direct[0]));
cdiroutp(dptr,sptr -> drive);
#if DEBUG
cddebug(2); /* pick an entry for detail display */
#endif
}