comp.lang.ada
 help / color / mirror / Atom feed
* Parallel Port
@ 2000-03-19  0:00 Philippe Bourzeix
  2000-03-19  0:00 ` Ed Falis
                   ` (2 more replies)
  0 siblings, 3 replies; 24+ messages in thread
From: Philippe Bourzeix @ 2000-03-19  0:00 UTC (permalink / raw)


I have already asked some questions, but i would like to know why this
program works on Alsys and not on objectada :

with Text_Io;
with System;
with Unchecked_Conversion;
use Text_Io, System;

procedure Lcd is
    -------------------------------------
    -- Definition du type bit et octet --
    -------------------------------------
    type Bit is new Boolean;
    for Bit'Size use 1;
    type Octet is array (1..8) of Bit;
    pragma Pack (Octet);
    -----------------------------
    -- fonction de convertion  --
    -----------------------------
    subtype Entier_8_bits is Short_Short_Integer;
    package Es_Entier_8_bits is new Text_Io.Integer_Io(Entier_8_bits);
    use Es_Entier_8_bits;
    function Octet_Entier is new Unchecked_Conversion (Octet,Entier_8_bits);
    function Entier_Octet is new Unchecked_Conversion (Entier_8_bits,Octet);
    function Integer_Address is new Unchecked_Conversion (Integer,Address);
    ------------------------------
    -- Clause sur les addresses --
    ------------------------------
    Registre_1, Registre_2, Registre_3 : Octet ;
    for Registre_1 use at Integer_Address(16#378#); -- Parallel port address
    for Registre_2 use at Integer_Address(16#379#);
    for Registre_3 use at Integer_Address(16#37A#);
        -------------------
        -- Fonctions LCD --
        -------------------
    function Dico (Caractere : in Character) return Octet is
    begin
        return Entier_Octet(Character'Pos(Caractere));
    end Dico;
    procedure Ecrire (Caractere : in Character) is
    begin
        Registre_1:=Dico(Caractere);
        Registre_2:=Entier_Octet(2#0000_0000#);
        Registre_3:=Entier_Octet(2#0000_0000#);
    end Ecrire;
    procedure Ligne_Suivante is
    begin
        null;
    end Ligne_Suivante;
    procedure Verif is
    begin
        Put_Line("registre 1 =" &
Entier_8_bits'Image(Octet_Entier(Registre_1)));
        Put_Line("registre 2 =" &
Entier_8_bits'Image(Octet_Entier(Registre_2)));
        Put_Line("registre 3 =" &
Entier_8_bits'Image(Octet_Entier(Registre_3)));
    end Verif;


    begin
        Verif;
        Ecrire('A');
        Put_Line("Ordre d'ecriture : A");
        Verif;
        Ecrire('a');
        Put_Line("Ordre d'ecriture : a");
        Verif;
end Lcd;






^ permalink raw reply	[flat|nested] 24+ messages in thread
* PARALLEL PORT
@ 2001-01-17  9:18 Szymar
  0 siblings, 0 replies; 24+ messages in thread
From: Szymar @ 2001-01-17  9:18 UTC (permalink / raw)


Hallo,

Where is a package for using the parallel port on a PC with Windows?
I'm using the GNAT 3.13p compilers.

I am student from Poland.
(AGH in Cracow)
dormar@poczta.fm






^ permalink raw reply	[flat|nested] 24+ messages in thread
* Parallel port
@ 2000-03-05  0:00 Philippe Bourzeix
  2000-03-05  0:00 ` Tarjei Tj�stheim Jensen
  2000-03-05  0:00 ` Jerry van Dijk
  0 siblings, 2 replies; 24+ messages in thread
From: Philippe Bourzeix @ 2000-03-05  0:00 UTC (permalink / raw)


I would like to access to my parallel port.
To read and write in the register 16#378, 16#379, 16#37A

But i have no idea how to do it.

I have started something like that but it doesn't work :

type reg is new integer;
for reg'size use 8; --register is 8 bits
type regptr is access all reg
for reg'address use 16#378#;

I need help ...








^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2001-01-17  9:18 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-03-19  0:00 Parallel Port 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-19  0:00 ` Dale Stanbrough
2000-03-20  0:00   ` Philippe BOURZEIX
2000-03-21  0:00 ` Philippe BOURZEIX
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox