How to directly access ISA bus registers? (Solved)

For discussions about programming, programming questions/advice, and projects that don't really have anything to do with Puppy.
Post Reply
Message
Author
citybook
Posts: 5
Joined: Wed 09 May 2012, 05:37

How to directly access ISA bus registers? (Solved)

#1 Post by citybook »

Hi all,
I have a Pentium P3 with ISA bus that has a 24 line IO card - it is accessed by a Clipper application that talks directly to the card ports in memory space - like 110hex

I would like to re-do this thing on Puppy Lucid using gcc - but as far as I can see we have obeyed the Gods of Redmond and removed the inport and outport functions from the C Libraries ?

Two questions - does anyone suggest a workaround to give a program this sort of access to memory space - and is there a function listing for the Puppy C Libraries ?

Thanks in advance,
Bob.

muggins
Posts: 6724
Joined: Fri 20 Jan 2006, 10:44
Location: hobart

#2 Post by muggins »


citybook
Posts: 5
Joined: Wed 09 May 2012, 05:37

I/O Port access

#3 Post by citybook »

Thanks Muggins - as you would have seen in your article they talk about the inport family of routines as the best way to do it.

As you would have read in my OP these routines seem to be missing from the Puppy implementation of gcc ?

Or do you know which library they are in ?

Cheers,
Bob

User avatar
Flash
Official Dog Handler
Posts: 13071
Joined: Wed 04 May 2005, 16:04
Location: Arizona USA

#4 Post by Flash »

Citybook, it was I who edited the title of your first post. The idea is to grab the interest of someone who knows the answer. If I got it wrong, feel free to edit it for accuracy. :)

I believe Puppy uses a cut-down version of Bash. Could that be the cause of your problem? I'm not a programmer so I'm not familiar with it.

citybook
Posts: 5
Joined: Wed 09 May 2012, 05:37

ISA register access

#5 Post by citybook »

Hi Flash, no problem with changing the title - yours is probably better.

Don't know about the Bash thing - I am new to Puppy - you could be right.
Would welcome input from folks who know about this.

Cheers,
Bob.

amigo
Posts: 2629
Joined: Mon 02 Apr 2007, 06:52

#6 Post by amigo »

I'd look first at the old isapnptools to see if they contain anything useful.
The contents of ISA PnP registers are readable under:
/proc/bus/isapnp
Here's the homepage of isapnptools:
http://www.roestock.demon.co.uk/isapnptools/

You may find something useful in the Linux serial howto:
http://linux.about.com/od/srl_howto/a/hwtsrl_idx.htm

Ahh, just found this, Interfacing with the ISA bus:
http://linuxgazette.net/124/dutta.html

Ibidem
Posts: 549
Joined: Wed 26 May 2010, 03:31
Location: State of Jefferson

Re: I/O Port access

#7 Post by Ibidem »

citybook wrote:Thanks Muggins - as you would have seen in your article they talk about the inport family of routines as the best way to do it.

As you would have read in my OP these routines seem to be missing from the Puppy implementation of gcc ?

Or do you know which library they are in ?
inb/outb seem to have moved from asm/io.h to sys/io.h when using newer versions of the kernel headers.


Bash does not have any relevance whatsoever.

citybook
Posts: 5
Joined: Wed 09 May 2012, 05:37

ISA Port I/O

#8 Post by citybook »

Thanks Amigo - I'll save those links.

Ibidem, that's what I was looking for - I included sys/io and it all works.

Do you by any chance have a link to a Puppy .lib function list ?

Thanks to all who answered,
cheers,
Bob.

User avatar
Flash
Official Dog Handler
Posts: 13071
Joined: Wed 04 May 2005, 16:04
Location: Arizona USA

#9 Post by Flash »

Citybook, so you are able to access the bus registers now?

Ibidem
Posts: 549
Joined: Wed 26 May 2010, 03:31
Location: State of Jefferson

Re: ISA Port I/O

#10 Post by Ibidem »

citybook wrote:Ibidem, that's what I was looking for - I included sys/io and it all works.

Do you by any chance have a link to a Puppy .lib function list ?
The official list would be the headers :P
You can find all functions, though not the parameters, via

Code: Select all

nm /lib/libc.so.6
But that won't help much, unless you're going to look up each function or have the manpages stored somewhere.

Glad it works now.

citybook
Posts: 5
Joined: Wed 09 May 2012, 05:37

Accessing ISA ports

#11 Post by citybook »

Yes Flash, I can do it now thank-you.

Thanks Ibidem - I will try that later - maybe work up a listing of my own.

Cheers,
Bob.

Post Reply