TMSOUND - 2


//

outp(0x61, inp(0x61) | 3);

// .

tm_delay(time);

// .

outp(0x61, inp(0x61) & 0xfc);

}

/**

*.Name tm_delay

*.Title

*

*.Descr ,

*

*

*.Proto void tm_delay(int ticks)

*

*.Params int ticks -

**/

void tm_delay(int ticks)

{

_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

}

}