home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Games of Daze
/
Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso
/
djgpp
/
libsrc
/
c
/
dos
/
delay.c
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
C/C++ Source or Header
|
1994-07-17
|
355 b
|
21 lines
#include <dos.h>
void
delay(unsigned msec)
{
union REGS r;
while (msec)
{
int usec;
int msec_this = msec;
if (msec_this > 4000)
msec_this = 4000;
usec = msec_this * 1000;
r.h.ah = 0x86;
r.x.cx = (usec>>16) & 0xffff;
r.x.dx = usec & 0xffff;
int86(0x15, &r, &r);
msec -= msec_this;
}
}