From: Seemanta Dutta <seemanta@recjai.ac.in>
To: Linux-8086@vger.kernel.org
Subject: newbie...please help.....
Date: Tue, 17 Sep 2002 22:03:38 +0530 (IST) [thread overview]
Message-ID: <1145.202.157.78.3.1032280418.squirrel@mail.recjai.ac.in> (raw)
In-Reply-To: <20020910115036.R88111-100000@agora.rdrop.com>
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<sys/io.h>
#include<unistd.h>
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
next prev parent reply other threads:[~2002-09-17 16:33 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-08-25 18:54 286 xterm? Bardelli Luigi
2002-08-25 21:42 ` Stefan de Konink
2002-08-25 21:54 ` Riley Williams
2002-08-25 22:31 ` Stefan de Konink
2002-09-01 6:28 ` Dan Olson
2002-09-01 9:48 ` Luigi Bardelli
2002-09-01 19:10 ` Rob Helmer
2002-09-01 19:06 ` Stefan de Konink
2002-09-01 19:29 ` Paul Nasrat
2002-09-02 9:44 ` Feher Tamas
2002-09-02 23:31 ` Gavin
2002-09-03 2:23 ` Gregg C Levine
2002-09-03 9:11 ` Feher Tamas
2002-09-03 16:59 ` Blaz Antonic
2002-09-03 9:23 ` Gavin
2002-09-03 17:17 ` Chad Page
2002-09-05 19:45 ` Robert de Bath
2002-09-05 20:17 ` Francois Gurin
2002-09-05 20:18 ` Dan Olson
2002-09-06 4:23 ` Gregg C Levine
2002-09-10 5:44 ` Robert de Bath
2002-09-10 18:55 ` Dan Olson
2002-09-12 15:30 ` Jacek Lipkowski
2002-09-17 16:33 ` Seemanta Dutta
2002-09-17 16:33 ` Seemanta Dutta [this message]
2002-09-10 21:47 ` kees
2002-09-05 21:02 ` Chad Page
2002-09-03 16:17 ` Bardelli Luigi
-- strict thread matches above, loose matches on Subject: below --
2002-09-26 8:45 newbie...please help teo_icKs
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=1145.202.157.78.3.1032280418.squirrel@mail.recjai.ac.in \
--to=seemanta@recjai.ac.in \
--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