Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Wed 17 Sep 2014, 13:39
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
How to directly access ISA bus registers? (Solved)
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [11 Posts]  
Author Message
citybook

Joined: 09 May 2012
Posts: 5

PostPosted: Wed 09 May 2012, 01:58    Post subject:  How to directly access ISA bus registers? (Solved)  

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.
Back to top
View user's profile Send private message 
muggins

Joined: 20 Jan 2006
Posts: 6687
Location: lisbon

PostPosted: Wed 09 May 2012, 20:03    Post subject:  

Have you lloked at Linux I/O port programming mini-HOWTO?
Back to top
View user's profile Send private message 
citybook

Joined: 09 May 2012
Posts: 5

PostPosted: Fri 11 May 2012, 05:33    Post subject: I/O Port access  

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
Back to top
View user's profile Send private message 
Flash
Official Dog Handler


Joined: 04 May 2005
Posts: 11065
Location: Arizona USA

PostPosted: Fri 11 May 2012, 08:38    Post subject:  

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. Smile

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.
Back to top
View user's profile Send private message 
citybook

Joined: 09 May 2012
Posts: 5

PostPosted: Fri 11 May 2012, 20:13    Post subject: ISA register access  

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.
Back to top
View user's profile Send private message 
amigo

Joined: 02 Apr 2007
Posts: 2247

PostPosted: Sat 12 May 2012, 04:35    Post subject:  

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
Back to top
View user's profile Send private message 
Ibidem

Joined: 25 May 2010
Posts: 489
Location: State of Jefferson

PostPosted: Sat 12 May 2012, 11:16    Post subject: Re: I/O Port access  

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.
Back to top
View user's profile Send private message 
citybook

Joined: 09 May 2012
Posts: 5

PostPosted: Sun 13 May 2012, 04:09    Post subject: ISA Port I/O  

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.
Back to top
View user's profile Send private message 
Flash
Official Dog Handler


Joined: 04 May 2005
Posts: 11065
Location: Arizona USA

PostPosted: Sun 13 May 2012, 07:50    Post subject:  

Citybook, so you are able to access the bus registers now?
Back to top
View user's profile Send private message 
Ibidem

Joined: 25 May 2010
Posts: 489
Location: State of Jefferson

PostPosted: Sun 13 May 2012, 20:45    Post subject: Re: ISA Port I/O  

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 Razz
You can find all functions, though not the parameters, via
Code:
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.
Back to top
View user's profile Send private message 
citybook

Joined: 09 May 2012
Posts: 5

PostPosted: Tue 15 May 2012, 05:46    Post subject: Accessing ISA ports  

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.
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [11 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Off-Topic Area » Programming
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1344s ][ Queries: 11 (0.0748s) ][ GZIP on ]