#include <dos.h>

void InitDAC(void);
void LPT1DAC(unsigned char b);
void LPT2DAC(unsigned char b);


unsigned LPT1Addr = 0x378,
	 LPT2Addr = 0x278;


void InitDAC(void)
{
  unsigned *Addr;

  Addr = (unsigned *)MK_FP(0x40,0x8);
  if (*Addr!=0) LPT1Addr = *Addr;
  Addr = (unsigned *)MK_FP(0x40,0xA);
  if (*Addr!=0) LPT2Addr = *Addr;
}

void LPT1DAC(unsigned char b)
{
  outportb(LPT1Addr,b);
}

void LPT2DAC(unsigned char b)
{
  outportb(LPT2Addr,b);
}
