From mboxrd@z Thu Jan 1 00:00:00 1970 From: teo_icKs Subject: Re: newbie...please help..... Date: Thu, 26 Sep 2002 10:45:46 +0200 Sender: linux-8086-owner@vger.kernel.org Message-ID: <3D92C93A.F9C6CB0A@yahoo.it> Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Return-path: List-Id: Content-Type: text/plain; charset="iso-8859-1" To: ELKS mailing list hi,=20 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 /* is the correct position of io.h in ELKS */ #include=20 int main()=20 {=20 /*- ioperm(0x378,3,1); to enable access to the parallel port..=20 not implement */ =09 for(;;){=20 outb(0x88,0x378); /* writing 0x88 or 10001000b to the data=20 pins..thereby lighting the LEDs.... */ }=20 }=20 before this you must compile the implementation of outb function; this is an assembly file in the source code of ELKS kernel.=20 If have you compiled the Kernel ..... good=20 (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=20 > to light up..also light up and then light off..although very fast...for=20 > example if i write hex F8 on the data port...=20 > what i should get is this: on on on on on off off off in my LEDs...=20 > 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=20 > LEDs...can u suggest any thing???=20 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... =20 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=E0. http://it.yahoo.com/mail_it/foot/?http://it.messenger.yahoo.com/