/*
 * DOS routines to read the number of ticks of the timer used for the int
 * 8 interrupt since the program started (more or less)
 *
 * note: ASSUMES the clock rate is 18.2Hz
 */
#include <dpmi.h>
#include <conio.h>

static unsigned long ticks=0;
static unsigned lastread;

unsigned long _elapsed_time(void)
{
	int thisread;

	asm sub eax,eax

	asm mov al,0x36
	asm out 0x43,al

  asm in al,0x40
	asm xchg al,ah
	asm in al,0x40
  asm xchg al,ah
	asm not ax
}