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

⟦f12f1a789⟧ Ada Source

    Length: 8192 (0x2000)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, procedure Bous1, seg_03e7ce

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 System;
with Terminal_Specific;
with Text_Io;
procedure Bous1 is
    package Dio renames Device_Independent_Io;  
    package Ts renames Terminal_Specific;
    package Tio renames Text_Io;
    subtype Bs is System.Byte_String;
    type Byte is range 0 .. 255;
    type Tutu is array (0 .. 500) of Byte;
    Chaine : String (1 .. 500);
    Nb_Max_Lect : constant Positive := 4;
    type Message is
        record
            Start : Byte := 1;
            Num_Lect : Positive := Nb_Max_Lect;
            Check_Sum1 : Byte;
            Check_Sum2 : Byte;
            Donnees : Tutu;
            Type_Donnee : Byte;
            Fin : Tutu;
        end record;
    Msg : Message;
    F_Out : Ts.File_Type;
    F_In : Ts.File_Type;

    X : Positive;
    Compteur : Natural;

    B : System.Byte;

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

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

--    Site_00 : constant Bs := (16#01#, 16#03#, 16#00#, 16#04#, 16#27#,
--                              16#00#, 16#00#, 16#00#, 16#F1#, 16#F2#);

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

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

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

--    Rapport_Horloge04 : constant Bs :=
--       (16#01#, 16#04#, 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#);

    function Calcul_Check_Sum (Check_Sum1, Check_Sum2 : Byte) return Positive is
        Mise_En_Forme : String (1 .. 2);
    begin
        Mise_En_Forme := Byte'Image (Check_Sum1) & Byte'Image (Check_Sum2);
        return Positive'Value (Mise_En_Forme);
    end Calcul_Check_Sum;

begin

    Text_Io.Put_Line ("ce programme ne s'arrete jamais");
    Text_Io.Put_Line ("pour le tuer taper Alt G");
    Text_Io.New_Line;
    delay 1.0;

    Dio.Open (File => F_Out,
              Mode => Dio.Out_File,
              Name => "!machine.devices.terminal_16",
              Form => "");
--    Dio.Write (File => F_Out, Item => Beep_3);
--    delay 1.0;
--    Dio.Write (File => F_Out, Item => Beep_4);
--    delay 1.0;
--    Dio.Write (File => F_Out, Item => Horloge_00);
--    delay 1.0;

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

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

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

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

    Dio.Write (File => F_Out, Item => Rapport_Evenement);

    Dio.Close (File => F_Out);


    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);

--    io.terminal_specific.Read (F_In, B);
--    Text_Io.Put_Line ("valeur de msg.start" & Byte'Image (Byte (Msg.Start)));

--    while Natural (B) /= Natural (Msg.Start) loop
--        Text_Io.Put_Line ("avant synchro" & Byte'Image (Byte (B)));
--        Dio.Read (F_In, B);
--    end loop;
--    Text_Io.Put_Line ("chaine: " & Chaine (Chaine'Fisrt .. Chaine'Last));
--    Dio.Read (File => F_In,
--              Item => Chaine2 (Chaine2'First .. Chaine2'Last),
--              Count => Compteur);
--    Text_Io.Put_Line ("chaine2 bis: " & Chaine (Chaine'Fisrt .. Chaine'Last));
--    Text_Io.Put_Line ("compteur: " & Natural'Image (Compteur));
--    Text_Io.Put_Line ("chaine2'last: " & Natural'Image (Chaine2'Last));
--    Text_Io.Put_Line ("chaine2'first: " & Natural'Image (Chaine2'First));

    for I in 1 .. 500 loop
        Dio.Read (F_In, B);
--        Text_Io.Put (To => Chaine, Item => Natural (B), Base => 10);
--        Text_Io.Put ();
--        Msg.Num_Lect := Natural (B);
--        Text_Io.Put_Line ("numero lecteur: " & Byte'Image (Byte (B)));
--        Msg.Check_Sum1 := 0;
--        Msg.Check_Sum2 := 5;
--        Text_Io.Put_Line ("toto");
--        X := Calcul_Check_Sum (Msg.Check_Sum1, Msg.Check_Sum2);
--        Text_Io.Put_Line ("tata");
--        Text_Io.Put (Positive'Image (X));

--        Text_Io.Put_Line ("apres synchro " & Byte'Image (Byte (B)));

--        Text_Io.Put_Line ("cnt =>" & Natural'Image (Natural (B)));
    end loop;

    Dio.Close (File => F_In);


end Bous1;

E3 Meta Data

    nblk1=7
    nid=7
    hdr6=c
        [0x00] rec0=22 rec1=00 rec2=01 rec3=074
        [0x01] rec0=19 rec1=00 rec2=02 rec3=076
        [0x02] rec0=21 rec1=00 rec2=06 rec3=000
        [0x03] rec0=1d rec1=00 rec2=05 rec3=016
        [0x04] rec0=17 rec1=00 rec2=04 rec3=022
        [0x05] rec0=04 rec1=00 rec2=03 rec3=000
        [0x06] rec0=fb rec1=88 rec2=00 rec3=029
    tail 0x21537818086008513f8e4 0x42a00088462060003
Free Block Chain:
  0x7: 0000  00 00 00 3e 80 3b 20 20 20 42 65 65 70 5f 33 20  ┆   > ;   Beep_3 ┆