To write an interfacing program with parallel port or serial port, we need to know the base address of the corresponding port in advance. Normally the base address of LPT1 will be 0x378 and that of LPT2 will be 0x3F8. And most of the home PCs will have only one parallel port with base address 0x378. To write an interfacing program with parallel port or serial port, we need to know the base address of the corresponding port in advance. Normally the base address of LPT1 will be 0x378 and that of LPT2 will be 0x3F8. And most of the home PCs will have only one parallel port with base address 0x378. If only one port is present on the system we can probably assume that the base address is 0x378. And this can be confirmed by checking the Parallel Port properties in Device Manager. To do this, right click on My Computer, select Manage. Select Device Manager from the Computer Management console. Choose Parallel Port from the device tree, right click on it and select "Properties...
The Problem Writing programs to talk with parallel port was pretty easy in old DOS days and in Win95/98 too. We could use Inporb and outportb or _inp() or _Outp functions in our program without any problem if we are running the program on DOS or WIN95/98. But entering to the new era of NT clone operating systems like WIN NT4, WIN2000, WINXP, all this simplicity goes away. Being interested in Parallel port interfacing and programming you might have experienced the problems in writing a program that can talk to parallel port successfully in NT based operating systems. When we are trying to run a program which is written using the conventional software functions like Inporb, outportb, _inp() or _Outp on a WINNT or WIN2000 system, it will show an error message that "The exception privileged instruction occurred in the application at location ....". The picture of such a messagebox is given below. Staring to this messagebox, you might have been thinking.... "did ...