First commit ~0,10
This commit is contained in:
30
WAVPLAV/DAC.CPP
Normal file
30
WAVPLAV/DAC.CPP
Normal file
@ -0,0 +1,30 @@
|
||||
#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);
|
||||
}
|
Reference in New Issue
Block a user