General discussion

  • Creator
    Topic
  • #2292645

    Parallel port program fail

    Locked

    by myownmail4ever ·

    I’m new to programming. Anyway, I’ve read about the inpout32.dll thing from http://www.logix4u.net/ site
    1stly I’m not sure if I placed it in the right place, but anyway when I try to run the program in Win XP, it fails.

    Any idea how to overcome this problem?

    #include
    #include

    int _outp( unsigned short port, int databyte );

    // This program accepts an input from the user
    // in decimal and outputs that number as an 8-bit
    // binary number to the port at 378 hex, usually
    // LPT1

    int main () {

    int inval = 0;

    while ( inval < 256) { printf("Enter a value in decimal (256 to quit)>“);
    scanf(“%d”, &inval);

    _outp(0x378, inval);
    }

    _outp(0x378, 0);

    return 0;
    }

    this is a simple program I gotten from the web too.
    It gves an error.

All Comments

  • Author
    Replies
    • #3337404

      Reply To: Parallel port program fail

      by myownmail4ever ·

      In reply to Parallel port program fail

      Point value changed by question poster.

    • #3335263

      Reply To: Parallel port program fail

      by ahar ·

      In reply to Parallel port program fail

      What’s the error-code and what does the error-msg say?
      Is the port right?
      Is your pport enabled in the bios?

Viewing 1 reply thread