CDINFO - 7


// CallCDDriver

// -

// ---------------------------------------------------

void CallCDDriver(void *rh, int nCDUnit)

{

static union REGS rg;

static struct SREGS srg;

segread(&srg);

rg.x.ax = 0x1510;

rg.x.cx = nCDUnit;

rg.x.bx = FP_OFF(rh);

int86x(0x2f, &rg, &rg, &srg);

}

// ---------------------------------------------------

// GetCDLetters

//

// -

// ---------------------------------------------------

void GetCDLetters(BYTE *bLetters)

{

static union REGS rg;

static struct SREGS srg;

segread(&srg);

rg.x.ax = 0x150d;

rg.x.bx = FP_OFF(bLetters);

int86x(0x2f, &rg, &rg, &srg);

}

// ---------------------------------------------------

// delay

//

// ---------------------------------------------------

void delay(int ms)

{

int ticks;

ticks = ms / 55;

_asm

{

push si

mov si, ticks

mov ah, 0

int 1ah

mov bx, dx

add bx, si

delay_loop:

int 1ah

cmp dx, bx

jne delay_loop

pop si

}

}