hari516
Newbie level 6
hi,
here in this below simple program am trying to compile and which giving an unhandled exception.want to know whether the _outp(),_inp() functions will work for windowsxp operating system.If so,then why am getting the unhandled exception.I would like to check the low and high on the particular pins of parallel port from C program.could u please give me an example to do this way of interfacing with the parallel port in C.
I checked the outportb(); function which doesnot allow at all.compiler am using is visual studio 2008.kindly suggest any tutorial links to learn the complete parallel port interfacing in C or C++
here in this below simple program am trying to compile and which giving an unhandled exception.want to know whether the _outp(),_inp() functions will work for windowsxp operating system.If so,then why am getting the unhandled exception.I would like to check the low and high on the particular pins of parallel port from C program.could u please give me an example to do this way of interfacing with the parallel port in C.
Code C - [expand] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 include "stdafx.h" #define PORT1 0x378 int _inp(unsigned short port); int _outp( unsigned short port, int databyte ); int main () { int val = 0; short result; while ( val < 256) { printf("Enter a value in decimal (256 to quit)>"); scanf("%d", &val); //_outp(PORT1, val); result=_inp(PORT1); printf("the result value:%d",result); } _outp(PORT1, 0); return 0; }
I checked the outportb(); function which doesnot allow at all.compiler am using is visual studio 2008.kindly suggest any tutorial links to learn the complete parallel port interfacing in C or C++
Last edited by a moderator: