public inbox for linux-8086@vger.kernel.org
 help / color / mirror / Atom feed
From: teo_icKs <teo_icKs@yahoo.it>
To: ELKS mailing list <Linux-8086@Vger.Kernel.Org>
Subject: Re: newbie...please help.....
Date: Thu, 26 Sep 2002 10:45:46 +0200	[thread overview]
Message-ID: <3D92C93A.F9C6CB0A@yahoo.it> (raw)

hi, 

if you want to make bin in ELKS (and you haven't its libc)you must use
its include file with bcc and then statically link file object in your
app;
First of all install ELKS source files (for ex. /usr/src/elks) in your
linux
environment; instead use bcc in this way:

bcc -0 -ansi -I/usr/bcc/include/ -I/usr/src/elks/include/ -o
Parallela  	          parallela.c /usr/src/elks/arch/i86/lib/outportb.o

the modified source code of your app...

#include<arch/io.h>   /* is the correct position of io.h in ELKS */
#include<unistd.h> 
int main() 
{ 
       /*- ioperm(0x378,3,1);  to enable access to the parallel port.. 
				not implement				*/
	
       for(;;){ 
       		outb(0x88,0x378); /* writing 0x88 or 10001000b to the data 
            	                     pins..thereby lighting the LEDs.... */
       } 
} 

before this you must compile the implementation of outb function; this
is an assembly file in the source code of ELKS kernel. 
If have you compiled the Kernel ..... good 
(you can link directly the object file> outportb.o)
else learn to make it!!!! :-)

If you have the small version of libc, don't you need to statically link
it in your app.

> whenever i am running the above program after compiling thru gcc...i get 
> the LEDs lighted, alright...but the other LEDs that are not supposed 
> to light up..also light up and then light off..although very fast...for 
> example if i write hex F8 on the data port... 
> what i should get is this: on on on on on off off off in my LEDs... 
> but the last three LEDs switch between on and off states very fast..thus 
> what i get actually is a series of alternating F8 and FF in my 
> LEDs...can u suggest any thing??? 

THis effect is probably caused by another process who use this port;
Kill all suspected process and try it again! ....:-0
With ELKS kernel and the code that I have fixed, this problem there
isn't.

Now I don't know what process could uses your parallel port...  

however in Linux kernel, use this port with read, write, open and the
other syscall! It's safer then the direct access to register.

teo_icKs    ....    ....     ....    .....    ....
______________________________________________________________________
Scarica il nuovo Yahoo! Messenger: con webcam, nuove faccine e tante altre novità.
http://it.yahoo.com/mail_it/foot/?http://it.messenger.yahoo.com/

             reply	other threads:[~2002-09-26  8:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-09-26  8:45 teo_icKs [this message]
2002-10-01  8:44 ` thanks for ur help Seemanta Dutta
2002-10-01 10:19   ` Paul Nasrat
  -- strict thread matches above, loose matches on Subject: below --
2002-09-10 18:55 286 xterm? Dan Olson
2002-09-17 16:33 ` newbie...please help Seemanta Dutta

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3D92C93A.F9C6CB0A@yahoo.it \
    --to=teo_icks@yahoo.it \
    --cc=Linux-8086@Vger.Kernel.Org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox