CDINFO - 4


nCDUnits = rg.x.bx;

//

nCDStartUnit = rg.x.cx;

// MSCDEX

rg.x.ax = 0x150c;

int86(0x2f, &rg, &rg);

printf("MSCDEX version: %d.%d\n", rg.h.bh, rg.h.bl);

//

// CD-ROM

printf("Found %d CD Unit, start unit: %c\n",

nCDUnits, nCDStartUnit + 'A');

}

// CD-ROM

GetCDLetters(bLetters);

// CD-ROM

printf("CD-ROM letters: ");

for(i = 0; i < nCDUnits; i++)

{

printf("%c ", bLetters[i] + 'A');

}

printf("\n");

// CD-ROM

for(i = 0; i < nCDUnits; i++)

{

//

iStatus = GetDeviceStatus(bLetters[i]);

if(iStatus != 0x0100)

{

printf("GetDeviceStatus status: %04.4X\n", iStatus);

printf("GetDeviceStatus failed\n");

exit(1);

}

printf("\nStatus of CD Drive %c: %08.8X\n",

bLetters[i] + 'A', ds.dwParam);

//

iStatus = GetVolumeSize(bLetters[i]);

if(iStatus != 0x0100)

{

printf("GetVolumeSize status: %04.4X\n", iStatus);

printf("GetVolumeSize failed\n");

}

else

printf("VolumeSize: %ld blocks\n", vs.dwVolumeSize);

//

// -

iStatus = GetDiskInfo(bLetters[i]);

//

iRetry = 0;

while(iStatus != 0x0100)

{

printf("GetDiskInfo status: %04.4X\n", iStatus);

// 1

delay(1000);

iRetry++;