Hi all:
This is short, so I'll just put it here. I built it with OPEN WATCOM
which is a free C development
environment that runs under Windows and will make DOS executables. This
isn't pretty, but... :-)
lpt1init.c
#include <stdio.h>
#define LPT1_BASE 0x378
int main()
{
unsigned char byte;
unsigned char status_register;
unsigned char data_register;
unsigned char control_register;
unsigned int status;
/* clear data register values...should clear DVK lines
* to SCKII
*/
data_register = 0x00;
status = outp(LPT1_BASE,data_register);
data_register = inp(LPT1_BASE);
status_register = inp(LPT1_BASE+1);
/*
* clear PTT and CW Keying. Select Radio 1
*/
control_register = (unsigned char) ((unsigned int) control_register & 0xc0);
control_register = (unsigned char) ((unsigned int) control_register | 0x09);
status = outp(LPT1_BASE+2,control_register);
control_register = inp(LPT1_BASE+2);
printf("data: %2x, status %2x, control %2x\n",
data_register,status_register,control_register);
}
_______________________________________________
CT-User mailing list
CT-User@contesting.com
http://lists.contesting.com/mailman/listinfo/ct-user
CT on the web: http://www.k1ea.com/
|