From: Philippe BOURZEIX <bourzeix@shom.fr>
Subject: Re: Parallel Port
Date: 2000/03/21
Date: 2000-03-21T12:20:44+00:00 [thread overview]
Message-ID: <38D7691B.4E5F4177@shom.fr> (raw)
In-Reply-To: 172B4.2690$wl2.12638330@nnrp4.proxad.net
The purpose of all my question, is to access to a lcd screen (on the parallel
port).
I have found a C program who can do what i want. Is it possible to do the same
in ADA?
#include <string.h>
#define portaddress 0X378
#define data portaddress + 0
#define status portaddress + 1
#define control portaddress + 2
void main (void)
{
char string [] = {"testing 1,2,3 "
"It works "};
char init [10];
int count;
int len;
init[0] = 0X0F; /* init display */
init[1] = 0X01; /* clear display */
init[2] = 0X38; /* dual line / 8 bits */
outportb(control, inportb(control) & OXDF); /* reset control port */
outportb(control, inportb(control) | 0X08); /* set select printer */
for (count = 0; count <= 2; count ++)
{
outportb(data, init[count]);
outportb(contol,inportb(control) | 0X01); /*set strobe enable*/
delay(20);
outport(control,inportb(control) & OXFE); /* reset strobe enable)*/
delay(20);
}
outportb(control, inportb(control) & OXF7); /* reset select printer */
len = strlen(string);
for (count=0; count < len,; count ++)
{
outportb(data,string[count]);
outportb(control, inportb(control) | 0X01); /*set strobe*/
delay(2);
outportb(control, inportb(control) & 0XFE); /* reset strobe */
delay(2);
}
}
Is there any library with such outportb function in the ada world ...
next prev parent reply other threads:[~2000-03-21 0:00 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-03-19 0:00 Parallel Port Philippe Bourzeix
2000-03-19 0:00 ` Dale Stanbrough
2000-03-20 0:00 ` Philippe BOURZEIX
2000-03-19 0:00 ` Ed Falis
2000-03-20 0:00 ` Philippe BOURZEIX
2000-03-20 0:00 ` Gautier
2000-03-20 0:00 ` Jerry van Dijk
2000-03-20 0:00 ` Gautier
2000-03-21 0:00 ` Philippe BOURZEIX [this message]
2000-03-21 0:00 ` tmoran
-- strict thread matches above, loose matches on Subject: below --
2001-01-17 9:18 PARALLEL PORT Szymar
2000-03-05 0:00 Parallel port Philippe Bourzeix
2000-03-05 0:00 ` Tarjei Tj�stheim Jensen
2000-03-05 0:00 ` Jerry van Dijk
2000-03-06 0:00 ` Philippe BOURZEIX
2000-03-06 0:00 ` Philippe Bourzeix
2000-03-06 0:00 ` Ted Dennison
2000-03-06 0:00 ` Gisle S�lensminde
2000-03-06 0:00 ` Philippe Bourzeix
2000-03-08 0:00 ` Gisle S�lensminde
2000-03-06 0:00 ` Ted Dennison
2000-03-06 0:00 ` tmoran
2000-03-06 0:00 ` Philippe Bourzeix
2000-03-07 0:00 ` tmoran
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox