From mboxrd@z Thu Jan 1 00:00:00 1970 From: Seemanta Dutta Subject: =?iso-8859-1?Q?newbie...please_help.....?= Date: Tue, 17 Sep 2002 22:03:38 +0530 (IST) Sender: linux-8086-owner@vger.kernel.org Message-ID: <1145.202.157.78.3.1032280418.squirrel@mail.recjai.ac.in> References: <20020910115036.R88111-100000@agora.rdrop.com> Mime-Version: 1.0 Content-Transfer-Encoding: 7BIT Return-path: In-Reply-To: <20020910115036.R88111-100000@agora.rdrop.com> List-Id: Content-Type: text/plain; charset="us-ascii" To: Linux-8086@vger.kernel.org greetings to all linux gurus..... i am an ELKS newbie though i have been using linux for quite some time now.. i have the recent images of ELKS and i can boot from an ELKS floppy..but the problem that i am facing is this: i want to access the PC parllel port from ELKS.. i can do that from normal linux...the necessary function calls ie. ioperm() and outb() are defined in /asm/io.h and unistd.h respectively.... my program is just a simple one to control the lighting of a 8 LEDs connected to data pins of the parallel interface...as long as i use 'gcc' its absolutely fine....but i am not being able to compile my program using 'bcc'..the program i am using is given below..albeit a very short and simple one... #include #include int main() { ioperm(0x378,3,1); //to enable access to the parallel port.. for(;;) outb(0x88,0x378); //writing 0x88 or 10001000b to the data pins..thereby lighting the LEDs.... return 0; } now when i compile it using bcc as : bcc testport.c -o testport the error reported is this: testport.c:1.18: error: cannot find include file sys/io.h OK..i get it then i try out this..using the '-I' option of bcc: bcc testport.c -I/usr/include/sys -o testport the output i get is this.... testport.c:1.18: error: cannot find include file sys/io.h /usr/include/sys/unistd.h:1.19 (from /usr/include/sys/unistd.h:1) (from /usr/include/sys/unistd.h:1) (from /usr/include/sys/unistd.h:1) (from/usr/include/sys/unistd.h:1) (from /usr/include/sys/unistd.h:1) (from /usr/include/sys/unistd.h:1) (from /usr/include/sys/unistd.h:1) (from /usr/include/sys/unistd.h:1) (from /usr/include/sys/unistd.h:1) .....like this for several pages...and in the end i get this line..) (from testport.c:2): error: cannot find include file unistd.h i am not able to make anything out of this.....is there any other option of nasm that i might be missing??any libraries that i might be mising?? kindly help....i shall ever be grateful there is another trivial question that i would like to ask.... 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??? one last query....whenver i am not running my program even then some random bytes are displayed on the data pins of the parallel port.... what process will be doing this? i have my 'lpd' disabled too.... what i want is that when i am writing to my port..no one should....so that the output i get from my LEDs is always constant..... so my question now is: how can i know what process is accessing my port even when i am writing to it?? can i disable it from doing it? kindly help this newbie out of these problems.... i hope i did not waste ur precious time with such trivial and boring questions...;-) regards... thanks in advance.... seemanta