Checking printer port in QBASIC

Want to just shoot the breeze? Forum 42 is the place!

Moderator: Moderators

Post Reply
blackbox_dev
Senior Member
Posts: 1906
Joined: Sun Jan 15, 2006 5:19 pm
Location: Formerly known as iam7805

Checking printer port in QBASIC

Post by blackbox_dev »

I need to check the printer port (LPT1) to see if the printer is busy in QBASIC. It will need to check this around 1000 times every minute. Don't ask why, just answer my question. :)

If you don't know what i'm talking about, on the DB-25 printer port, Pin 11 is the busy pin. When the printer is busy it drives this pin high, and when it is ready again it drives it low. I need to check this pin for when it becomes high.

By the way, it will not be a printer attached, but is a custom circuit I am designing.

Also, QB Versions 1.0/1.1 or 4.5 version code is fine.
I'd imagine right now you wish you were a cuttlefish...
marshallh
Moderator
Posts: 2987
Joined: Sat Sep 10, 2005 2:17 pm
360 GamerTag: marshallh
Location: here and there
Contact:

Post by marshallh »

Do yourself a favor and get IO.DLL from GeekHideout, and use it with VB to mangle the parallel port.
The parallel port address is 0x378. You should be able to read bytes from that offset fine.
Image
blackbox_dev
Senior Member
Posts: 1906
Joined: Sun Jan 15, 2006 5:19 pm
Location: Formerly known as iam7805

Post by blackbox_dev »

The program has to run on a 286 computer... I don't think Windows and VB will run on that very well. :P
I'd imagine right now you wish you were a cuttlefish...
Post Reply