blueroomelectronics
Well-Known Member
I used to love the old Turbo BASIC. PowerBASIC is a modern version of it.
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
hey thanks guys for all the help..
when i use visual basic, the para port works fine, but does not work in c or c++.. i guess there is a seperate code in c/c++ required to get access to the parallel port.. someone has any idea abt it?
thnx..
#include <dos.h>
#define PORT 0x378
int main()
{
outportb(PORT, 0x55);
return 0;
}
Colin, direct port access works in turbo C, Borland C++ etc but only for dos and Windows up to and including Win98. For XP they disabled direct port access and you need the driver.
Your DOS compiler doesn't know anything about windows.h.
See if this works in Turbo C
Code:#include <dos.h> #define PORT 0x378 int main() { outportb(PORT, 0x55); return 0; }
Download Neil Fraser: Software: Parallel port monitors
Leave this program open before you run the code to see if the state of the pins change after you run the program. If it doesn't work, install Userport and try again.
The official UserPort homepage