DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about Rational R1000/400

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download

⟦ee9e7809f⟧ Ada Source

    Length: 9216 (0x2400)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, procedure Port_16, seg_040535

Derivation

└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
    └─ ⟦5a81ac88f⟧ »Space Info Vol 1« 
        └─⟦this⟧ 

E3 Source Code



with Device_Independent_Io;
with Io;
with System;  
with Terminal_Specific;
with Text_Io;
with Unchecked_Conversion;
with Constantes;

procedure Port_16 is  
    --use Constantes;

    package Dio renames Device_Independent_Io;  
    package Ts renames Terminal_Specific;
    package Tio renames Text_Io;
    subtype Bs is System.Byte_String;


    type Carte_Valide is
        record
            Numero : Natural;
            Horaire : Natural;
        end record;


    F_Out : Ts.File_Type;
    F_In : Ts.File_Type;


    type Table is array (1 .. 10) of Natural;

    Buf : System.Byte_String (0 .. 255);
    B : System.Byte;

    T : Table;
    Cnt : Natural;
    Entete : Natural;
    Arg, Etat : Natural;
    Numero : Natural := 0;



    Beep_4 : constant Bs := (16#01#, 16#04#, 16#00#, 16#01#,
                             16#2C#, 16#F1#, 16#F2#);

    Beep_3 : constant Bs := (16#01#, 16#03#, 16#00#, 16#01#,
                             16#2C#, 16#F1#, 16#F2#);

    Site_60 : constant Bs := (16#01#, 16#04#, 16#00#, 16#04#, 16#27#,
                              16#00#, 16#00#, 16#3C#, 16#F1#, 16#F2#);

    Horloge_00 : constant Bs := (16#01#, 16#03#, 16#00#, 16#04#, 16#23#,
                                 16#00#, 16#00#, 16#00#, 16#F1#, 16#F2#);

    Rapport_Param : constant Bs :=
       (16#01#, 16#04#, 16#00#, 16#01#, 16#1E#, 16#F1#, 16#F2#);

    Valid_200 : constant Bs := (16#01#, 16#04#, 16#00#, 16#04#, 16#10#,
                                16#02#, 16#00#, 16#08#, 16#F1#, 16#F2#);

    Invalid_199 : constant Bs := (16#01#, 16#04#, 16#00#, 16#04#, 16#12#,
                                  16#01#, 16#63#, 16#08#, 16#F1#, 16#F2#);

    Invalid_198 : constant Bs := (16#01#, 16#04#, 16#00#, 16#04#, 16#12#,
                                  16#01#, 16#62#, 16#08#, 16#F1#, 16#F2#);

    Rapport_Valid_200 : constant Bs :=
       (16#01#, 16#04#, 16#00#, 16#05#, 16#1F#, 16#02#,
        16#00#, 16#02#, 16#00#, 16#F1#, 16#F2#);

    Rapport_Invalid_199 : constant Bs :=
       (16#01#, 16#04#, 16#00#, 16#05#, 16#29#, 16#01#,
        16#63#, 16#01#, 16#63#, 16#F1#, 16#F2#);

    Rapport_Invalid_198 : constant Bs :=
       (16#01#, 16#04#, 16#00#, 16#05#, 16#29#, 16#01#,
        16#62#, 16#01#, 16#62#, 16#F1#, 16#F2#);

    Rapport_Site : constant Bs :=
       (16#01#, 16#04#, 16#00#, 16#01#, 16#28#, 16#F1#, 16#F2#);

    Rapport_Horloge : constant Bs :=
       (16#01#, 16#03#, 16#00#, 16#01#, 16#24#, 16#F1#, 16#F2#);

    Rapport_Evenement : constant Bs :=
       (16#01#, 16#03#, 16#00#, 16#01#, 16#1D#, 16#F1#, 16#F2#);

    Val : String (1 .. 100);

    Compteur : Natural;

begin
    Text_Io.Put_Line (" Avant Ouverture FICHIER ");

    Dio.Open (File => F_Out,
              Mode => Dio.Out_File,
              Name => "!machine.devices.terminal_16",
              Form => "");

    Text_Io.Put_Line (" Entrer Dans BEEP ");

    --    Text_Io.Put_Line (" Tour = " & Natural'Image (Natural (I)));
    --    delay 1.0;

    Dio.Write (File => F_Out, Item => Site_60);
    delay 0.1;

    Dio.Write (File => F_Out, Item => Valid_200);
    delay 1.0;

    Dio.Write (File => F_Out, Item => Invalid_199);
    delay 1.0;

    Dio.Write (File => F_Out, Item => Invalid_198);
    delay 1.0;

    Dio.Write (File => F_Out, Item => Rapport_Site);
    delay 1.0;

    --Dio.Write (File => F_Out, Item => Rapport_Param);
    --delay 1.0;

    Dio.Write (File => F_Out, Item => Rapport_Valid_200);
    delay 1.0;

    Dio.Write (File => F_Out, Item => Rapport_Invalid_199);
    delay 1.0;

    Dio.Write (File => F_Out, Item => Rapport_Invalid_198);
    delay 1.0;

    Text_Io.Put_Line (" SORTIE .... BEEP ");

    Dio.Close (File => F_Out);
    delay 1.0;

    Text_Io.Put_Line (" Ouverture en LECTURE ...  ");

    Dio.Open (File => F_In,
              Mode => Dio.In_File,
              Name => "!machine.devices.terminal_16",
              Form => "");  
    Ts.Input.Set_Editing (File => F_In, Mode => "None");
    Ts.Input.Set_Echo (File => F_In, Echo => False);
    -- Ts.Input.Flush (F_In);

    --Compteur := 256;

    Text_Io.Put_Line (" ENTRER ... lecture ");

--    for I in 1 .. 100 loop
--        Dio.Read (F_In, B);
--        Text_Io.Put_Line ("Cnt=>" & Natural'Image (Natural (B)));
--    end loop;

    for L in 1 .. 20 loop
        for J in 1 .. 100 loop
            Dio.Read (F_In, B);
            Etat := Natural'Val (B);
            if Etat = Constantes.Fin then
                --    Text_Io.Put_Line ("aaa");
                exit;
            end if;  
        end loop;
        for I in 1 .. 4 loop
            Dio.Read (F_In, B);
            -- Text_Io.Put_Line ("Cnt=>" & Natural'Image (Natural (B)));
        end loop;

        Arg := Natural'Val (B);
        Dio.Read (F_In, B);
        Entete := Natural'Val (B);       Numero := 0;
        case Entete is
            when 31 =>
                for K in 1 .. Arg - 1 loop
                    Dio.Read (F_In, B);  
                    T (K) := Natural'Val (B);
                end loop;

                Text_Io.Put_Line ("Carte_invalide =>" & Natural'Image (T (1)) &
                                  Natural'Image (T (2)));  
                Text_Io.Put_Line ("plage_horaire =>" & Natural'Image (T (3)));

            when others =>
                Text_Io.Put_Line ("others");

        end case;  
    end loop;

    Text_Io.Put_Line (" SORTIE ... Lecture ");

    Dio.Close (File => F_In);

end Port_16;

E3 Meta Data

    nblk1=8
    nid=8
    hdr6=e
        [0x00] rec0=2f rec1=00 rec2=01 rec3=00a
        [0x01] rec0=00 rec1=00 rec2=02 rec3=03e
        [0x02] rec0=16 rec1=00 rec2=06 rec3=02c
        [0x03] rec0=21 rec1=00 rec2=04 rec3=01c
        [0x04] rec0=27 rec1=00 rec2=05 rec3=01c
        [0x05] rec0=20 rec1=00 rec2=07 rec3=002
        [0x06] rec0=17 rec1=00 rec2=03 rec3=000
        [0x07] rec0=0e rec1=00 rec2=03 rec3=000
    tail 0x2153ad1d4860e6ead2e73 0x42a00088462060003
Free Block Chain:
  0x8: 0000  00 00 00 67 80 1e 36 23 30 31 23 2c 20 31 36 23  ┆   g  6#01#, 16#┆