[fpc-pascal] Parallel Port Access with Free Pascal - windows

Bo Berglund bo.berglund at gmail.com
Sun Jul 24 08:35:49 CEST 2016

On Fri, 15 Jul 2016 14:59:10 -0700 (MST), Zaaphod
<james at productionautomation.net> wrote:

>I am trying to get access to the parallel port with Free Pascal.  
>I'm trying to use this version of inpout32 (x64)
>Here's my program:
>Here's my Unit:
>When I try to run it, I get a windows message The application was unable to
>start correctly (0xc000007b). click ok to close the application.
>then  I get Exitcode 123 in the Free Pascal IDE.  123 is decimal of 7b.
>Does anyone know how to get this to work?   reading and writing the parallel
>port used to be so easy, now it's extremely confusing, thanks windows!

If I remember correctly the printer port was originally on the ISA
bus, which is no longer present on modern day PC:s.
On that bus the programs could simply address the port and read/write
data to say $378 (LPT1:).
I used that ages ago too.
But then it changed on both the PC hardwaere and in Windows (more
protection of the bits) and direct access stopped working.
I think you need another solution for the hardware.

Bo Berglund
Developer in Sweden

More information about the fpc-pascal mailing list