How to access ports in Linux ?

Archives Forums/Linux Discussion/How to access ports in Linux ?

pcjohn(Posted 2008) [#1]
I just started porting a project from Windows to Linux.
Since XP is being canned in June I decided to make the
switch.

I don't see anything anywhere in the forums for port
access.

Does anyone know how to access the Linux OUTB and INB
commands through Blitzmax Linux ?

Thanks !

John


dawlane(Posted 2008) [#2]
Isn't outb and inb part of sys/io.h in C++ ?
If you look in the Help guide in the BMax IDE under
Language->Advanced topics->Interfacing with C you may find your answers.


xlsior(Posted 2008) [#3]
Since XP is being canned in June I decided to make the switch.


Um... Just to clarify this: XP won't be canned until 2014, when the secondary support phase ends. Until 2014, MS will continue to release critical updates, and suffice it to say that it won't be going away any time soon. They will stop adding new features to XP, but other than that it will continue to be available and supported.

They gave a (tentative) ultimatum to OEM's to stop pre-installing XP in June (with the exception of sub-notebook systems like the ASUS EEE-pc) -- but even that isn't happening.

Dell already released a press-release stating that starting in June, they'll have a 'vista BONUS package' option for the OS, which contains both a vista *and* XP recovery CD. And for convenience sake, they'll even pre-install the XP version for you. (Essentially giving MS the finger, and continueing out-of-the-box XP installs, just under a different name)


plash(Posted 2008) [#4]
Dell has certainly made a smart move there, vista is certainly not within alot of home/casual users range or specs.


pcjohn(Posted 2008) [#5]
Pretty sure M$ is stopping sales of XP in June, not support.

I am writing software for a commercial arcade machine and
as much as I hate Linux, have decided to port the project
over to that platform. Most commercial arcade machines
are running Linux these days (Merit, JVL) and we don't
want to pay M$ cash for every piece sold.

I must say the Linux version of my software runs much
more memory efficiently than on Windows.

I still haven't gotten to far with the port access. So far I
can call the outb routine without causing segmentation
faults but the data still isn't getting where it needs to go.


dawlane(Posted 2008) [#6]
Any chance of posting some code? It may help.
Or it could be a access privilege (root is required to access low I/O)
And make sure that the parameters are the right way round outb(value, port) ( outb(port, value) is the MS/DOS way)


xlsior(Posted 2008) [#7]
Pretty sure M$ is stopping sales of XP in June, not support.


They'll still sell the 'downgrade license' to OEMs, though... Although they would stop selling boxed copies of XP to stores, those count for an almost insignificant portion of all OS sales. something like 90%+ is bundled with the hardware, since 'normal' people don't upgrade an OS, they use what came with the computer 'for free'.


pcjohn(Posted 2008) [#8]
Finally got the friggin' thing working !

The project I'm using has an IO board that specifically works
with EPP mode only and some computers don't handle EPP the
same way. A motherboard swap was all I needed to get things going.

I'm still not quite there yet though, as I'm having some trouble passing
values between Blitz and C but I'll post results when I have them.

JD