Category : Files from Magazines
Archive   : MAR92.ZIP
Filename : 3N03024A

 
Output of file : 3N03024A contained in archive : MAR92.ZIP
#include
#include
#include

#pragma pack(1)

typedef struct { // format of device list entries
unsigned char unit;
unsigned short dev_header_offset;
unsigned short dev_header_segment;
} dev_list;

main()
{
union REGS r;
struct SREGS sr;
dev_list *dl;

// ask MSCDEX for # of CD drives
r.x.ax = 0x1500;
r.x.bx = 0;
int86(0x2f, &r, &r);
if (!r.x.bx)
{
printf("MSCDEX not installed or no CD drives\n");
exit(1);
}

// allocate memory for device list
if (dl = (dev_list *) malloc(r.x.bx * sizeof (dev_list)))
{ // fill allocated memory with device list
segread(&sr);
sr.es = sr.ds;
r.x.bx = (unsigned int) dl; // list addr to es:bx
r.x.ax = 0x1501;
int86x(0x2f, &r, &r, &sr); // ask MSCDEX for driver lst
if (!r.x.cflag)
printf("Address of 1st CD-ROM header:%04X:%04X\n",
dl->dev_header_segment, dl->dev_header_offset);
else

printf("Error from MSCDEX!\n");
}
else
printf("Unable to allocate memory!\n");
}

/* End of File */



  3 Responses to “Category : Files from Magazines
Archive   : MAR92.ZIP
Filename : 3N03024A

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/