How can I write a value in one of the computer's IO Ports?
In old dos basic languages it was simply done by "Out(port,value), where port was a value between 0 and 65000.
Under DOS I could achiever crazy things like with some random outs i could manage to get the computer making noises out of the soundcard without ANY driver! [and this was indeed a great thing under DOS]
access IO Ports?
Well, DOS allowed (and some times required) the programmer to do lots of things that modern OSes won't let you do directly, since more than one program could be trying to do the same thing. So... it's possible, but I'm certain you'd have to go through the OS's API (although you may be able to 'lock' access under some conditions). Have a look in the Win32.hlp file (look on Google) for information about port access.
Russell
Russell
*** Diapers and politicians need to be changed...for the same reason! ***
*** Make every vote equal: Abolish the Electoral College ***
*** www.au.org ***
*** Make every vote equal: Abolish the Electoral College ***
*** www.au.org ***
-
Froggerprogger
- Enthusiast

- Posts: 423
- Joined: Fri Apr 25, 2003 5:22 pm
- Contact:
You might have a look at the port.dll and the inpout32.dll.
Both let you access the serial and/or parallel port as well as e.g. the PC-speaker-port in an easy way.
But playing these digitalized sounds over the pc-speaker in the way it was done under DOS is not possible any longer due to the modern OS.
There could be a way by giving your program realtime-priority.
Both let you access the serial and/or parallel port as well as e.g. the PC-speaker-port in an easy way.
But playing these digitalized sounds over the pc-speaker in the way it was done under DOS is not possible any longer due to the modern OS.
There could be a way by giving your program realtime-priority.
%1>>1+1*1/1-1!1|1&1<<$1=1
Actually, now that I think of it, there has to be a way to directly access the ports (or close to it), since my old Wacom tablet uses the serial port under XP with no problems. Sure, it was probably written in C (or perhaps asm because it is a driver), but it still works directly with the port.
Russell
Russell
*** Diapers and politicians need to be changed...for the same reason! ***
*** Make every vote equal: Abolish the Electoral College ***
*** www.au.org ***
*** Make every vote equal: Abolish the Electoral College ***
*** www.au.org ***
- Psychophanta
- Always Here

- Posts: 5153
- Joined: Wed Jun 11, 2003 9:33 pm
- Location: Anare
- Contact:
Here are some related threads:
http://www.purebasic.fr/english/viewtopic.php?t=18232
http://www.purebasic.fr/english/viewtopic.php?t=9316
http://www.purebasic.fr/english/viewtopic.php?t=2595
Dare2, drivers on WinNT, 2k, XP... patch and/or modify the NT kernel and/or the kernel shell.
http://www.purebasic.fr/english/viewtopic.php?t=18232
http://www.purebasic.fr/english/viewtopic.php?t=9316
http://www.purebasic.fr/english/viewtopic.php?t=2595
Dare2, drivers on WinNT, 2k, XP... patch and/or modify the NT kernel and/or the kernel shell.


