/* find vol name.... usign funcall 11 */ #include main() { char str[20], vname[20]; get_volname(0, vname); } get_volname(str, vname) int str; char *vname; { #define FIRST 0x11 /* search first */ #define NEXT 0x12 /* seach next */ #define SETDTA 0x1a /* set disk transfer address */ int i; struct fcb_str{ unsigned char fcb_extid; /* extended fcb flag */ unsigned char fcb_xxx[5]; /* reserved */ unsigned char fcb_attr; /* search attribute */ unsigned char fcb_dr; /* drive specification */ unsigned char fcb_fn[8]; /* the file name */ unsigned char fcb_ft[3]; /* the file type */ }; struct fcb_str fcb[sizeof(struct fcb_str)]; struct fcb_str dta[sizeof(struct fcb_str)]; int j; fcb->fcb_dr = str; fcb->fcb_extid=0xff; fcb->fcb_attr=0; strcpy(fcb->fcb_fn, "????????.???"); strcpy(fcb->fcb_ft, "???"); bdos(SETDTA, dta); bdos(FIRST, fcb); printf("\n%s", dta->fcb_fn); while (1) { i=bdos(NEXT, fcb)&0xff; if (i==0xff) break; printf("\n%s", dta->fcb_fn); } }