Skip to main content
gamedev.net
🔒 Locked

nes8bit: vb question

Started by Thr33d 3 replies 550+ views
Original Post
Thr33d
Thr33d
Trying to create a program to directly output data to the parallel port. Is there any way of doing this in ms VB? thanx, -mike
JonnyQuest
JonnyQuest
Not nes but me

Anyway, IIRC it works kinda like this:

nFileNum = Freefile
Open "LPT1:" For Output As nFileNum

(may also be without the colon)

and then

Print #nFileNum, --your data goes here--

for every chunk of data... you'll probably want to use a ";" at the end of the line so no CrLf is added.

To close the port use

Close nFileNum


It may also work with "For Binary", you'll have to use Put instead of print then.

If LPT1 or LPT1: don't work, you could try PRN.

I haven't done this for a long time (not since VBDOS 1.0) so I might be wrong.


- JQ
pmjordan@gmx.at

lead programmer,
PWC Software


Edited by - JonnyQuest on September 14, 2000 3:29:28 PM
~phil
nes8bit
nes8bit
Yup. It also works with COM1 COM2 and so on... It worked the last time I tried it, but it froze my computer a few times.

hmm...this gives me an idea though...

---------------------------
"communists eat little kids." -The Alchemist
shinryuu
shinryuu
Just make a DLL in C++ with the functions, and call it in Visual Basic.
Shinryuu64Solenoid Software Interactivehttp://solenoid.50megs.comshinryu64@kiss-my.as

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.