Windows XP/QB 4.5 Port Programming.

Discuss whatever you want here--both QB and non-QB related. Anything from the DEF INT command to the meaning of life!

Moderators: Pete, Mods

Post Reply
Reef.Runner
Newbie
Posts: 2
Joined: Mon Mar 17, 2008 2:29 am

Windows XP/QB 4.5 Port Programming.

Post by Reef.Runner »

I'd like to use the QB commands OUT, PEEK and POKE to access the serial and parallel ports in XP.

In good old Win9x and below port addresses were easy to find but in XP where are they? It was also easy to find the Keyboard Control Byte and the display area but XP has me baffled. I think all these goodies are stored in the Non-pageable area of ram but have, as yet, not been able to identify anything there.

Any help appreciated.

Thanks
User avatar
burger2227
Veteran
Posts: 2466
Joined: Mon Aug 21, 2006 12:40 am
Location: Pittsburgh, PA

Actually XP limits access to DOS and VB programs

Post by burger2227 »

Get PortTalk off of the web free. Follow the install instructions! You must add something to the registry, but it is done for you pretty easily by clicking on a file. AllowIO.EXE must be in your QB folder unless you use command line paths.

Once you have it installed, look up your port addresses in Windows and use the address to run an EXE file. Use an address like 0x378 for a parallel port (888). Then you can use BAS or EXE files to access that port until a reboot.

Batch Command line: AllowIO LPTPort.EXE 0x378

Warning: Running "allowio.exe" without an address may disable your mouse!

To use VB, you can get INPOUT32 to use INP and OUT like in QB. VB6 did not allow those commands.

Ted
Please acknowledge and thank members who answer your questions!
QB64 is a FREE QBasic compiler for WIN, MAC(OSX) and LINUX : https://www.qb64.org/forum/index.php
Get my Q-Basics demonstrator: https://www.dropbox.com/s/fdmgp91d6h8ps ... s.zip?dl=0
Reef.Runner
Newbie
Posts: 2
Joined: Mon Mar 17, 2008 2:29 am

Port Programming.

Post by Reef.Runner »

Thank you Burger2227 - the first positive advice to my queries.

I'll give your suggestions a go.

R.R
Post Reply