Hope someone can help with this...
I'm trying to access the printer port using the following code:
#include <stdlib.h>
#include <stdio.h>
#include <conio.h>
#define PRINTER_PORT 0x0378
int main(int argc, char ** argv) {
unsigned long state;
state = _inpd( PRINTER_PORT );
printf("Current state = %x\n", state);
_outpd( PRINTER_PORT, 0xFFFFFFFF);
state = _inpd( PRINTER_PORT );
printf("Current state = %x\n", state);
_outpd( PRINTER_PORT, 0x00000000);
state = _inpd( PRINTER_PORT );
printf("Current state = %x\n", state);
return 1;
}
This works fine under MSVC++ but doesn't do anything under CodeWarrior.
I've tried including the conio.win.c source file but it doesn't help. I'm
using Codewarrior Professional Edition with Release 5.3 update installed.
I'd really appreciate some help! Thanks...
--
Adrian Barrett
PhD Student
Mechatronics in Medicine Laboratory
Mechanical Engineering Department
Imperial College
London SW7 2AZ
Tel: ++44 (0) 207 589 5111 ext 57068