15 lines
246 B
C
Executable file
15 lines
246 B
C
Executable file
#include <dos.h>
|
|
|
|
static void adlib_wait(int delay) {
|
|
int i;
|
|
for (i = 0; i < delay; i ++) inp(0x388);
|
|
}
|
|
|
|
void adlib_write(int reg, int val) {
|
|
int i;
|
|
outp(0x388, reg);
|
|
adlib_wait(6);
|
|
outp(0x389, val);
|
|
adlib_wait(35);
|
|
}
|