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

⟦b5e304287⟧ Ada Source

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

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 Io_Exceptions;
with Terminal_Specific;
with Text_Io;
with Sequential_Io;
with Unchecked_Conversion;
with Window_Io;
with Draw_Box;
use System;
use Io;
use Text_Io;
use Window_Io;
use Io_Exceptions;

procedure Info2 is


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

    F_Out : Ts.File_Type;
    F_In : Ts.File_Type;  
    W_Out : Window_Io.File_Type;
    W_Access : Window_Io.File_Mode;
    Buf : Bs (1 .. 252);
    B : System.Byte;
    T_16 : constant String := "!machine.devices.terminal_16";


    Entete : Bs (1 .. 4) := (1 .. 4 => 111);

    Buf1 : String (1 .. 256);

    Cnt : Natural;

    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_00 : constant Bs := (16#01#, 16#04#, 16#00#, 16#04#, 16#27#,
    --                          16#00#, 16#00#, 16#00#, 16#F1#, 16#F2#);

    Site_00 : constant Bs := (10#01#, 10#04#, 10#00#, 10#04#, 10#39#,
                              10#00#, 10#00#, 10#60#, 10#241#, 10#242#);

    Horloge_00 : constant Bs := (16#01#, 16#04#, 16#00#, 16#04#, 16#23#,
                                 16#02#, 16#04#, 16#08#, 16#F1#, 16#F2#);
    Rapport_Site : constant Bs :=
       (16#01#, 16#04#, 16#00#, 16#01#, 16#28#, 16#F1#, 16#F2#);
    Rapport_Evenement : constant Bs :=
       (16#01#, 16#04#, 16#00#, 16#01#, 16#1D#, 16#F1#, 16#F2#);
    Rapport_Horloge : constant Bs :=
       (16#01#, 16#04#, 16#00#, 16#01#, 16#24#, 16#F1#, 16#F2#);

    -- subtype Positive_Count is Positive range 1 .. Positive'Last;

    Compteur : Natural := 0;

    function Calcul_Check_Sum
                (Check_Sum1, Check_Sum2 : System.Byte) return Natural is
        Mise_En_Forme : array (1 .. 2) of System.Byte;
    begin
        Mise_En_Forme (Mise_En_Forme'First) := Check_Sum1;
        Mise_En_Forme (Mise_En_Forme'Last) := Check_Sum2;
        return Natural (Check_Sum1) * 100 + Natural (Check_Sum2);
    end Calcul_Check_Sum;


begin

--    Window_Io.Create
--       (W_Out, Mode => Window_Io.File_Mode'Last, Name => "ToTo", Form => "");

--    Window_Io.Open (File => W_Out,
--                    Mode => Window_Io.File_Mode'Last,
--                    Name => "ToTo",
--                    Form => "");

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

    Dio.Write (F_Out, Rapport_Evenement);

    -- Dio.Write (F_Out, Site_00);

    -- Dio.Write (F_Out, Rapport_Site);

    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",
              Name => T_16,
              Form => "");

    Ts.Input.Set_Editing (File => F_In, Mode => "None");
    Ts.Input.Set_Echo (File => F_In, Echo => False);

--    Draw_Box (W_Out, 2, 40, 10, 10);

--    Dio.Read (F_In, Entete, Compteur);
--    Text_Io.Put_Line (Natural'Image (Natural (Compteur)));
--    Text_Io.Put_Line (Natural'Image (Natural (Entete (Entete'First))));
--    Text_Io.Put_Line (Natural'Image (Natural (Entete (Entete'First + 1))));
--    Text_Io.Put_Line (Natural'Image (Natural (Entete (Entete'Last - 1))));
--    Text_Io.Put_Line (Natural'Image (Natural (Entete (Entete'Last))));


    for I in 1 .. 4 loop
        Dio.Read (F_In, B);
        Entete (I) := B;
        Text_Io.Put_Line (Natural'Image (Natural (B)));
    end loop;

    Text_Io.Put_Line (" Boucle 1 terminee ");

    Compteur := Calcul_Check_Sum
                   (Entete (Entete'Last - 1), Entete (Entete'Last));

    Text_Io.Put_Line ("compteur  : " & Natural'Image (Natural (Compteur)));


    for I in 1 .. Compteur loop

        Dio.Read (F_In, B);

        Text_Io.Put (Natural'Image (Natural (B)));
    end loop;

    Text_Io.Put_Line (" Boucle 2 terminee ");


    for I in 1 .. 2 loop
        Dio.Read (F_In, B);
        Text_Io.Put (Natural'Image (Natural (B)));
    end loop;

--     for I in 1 .. 500 loop
--         Dio.Read (F_In, B);
--     end loop;

    Dio.Close (File => F_In);
--    Window_Io.Close (File => W_Out);
end Info2;

E3 Meta Data

    nblk1=7
    nid=2
    hdr6=c
        [0x00] rec0=2b rec1=00 rec2=01 rec3=064
        [0x01] rec0=16 rec1=00 rec2=03 rec3=046
        [0x02] rec0=22 rec1=00 rec2=07 rec3=00c
        [0x03] rec0=01 rec1=00 rec2=04 rec3=034
        [0x04] rec0=1c rec1=00 rec2=05 rec3=032
        [0x05] rec0=1b rec1=00 rec2=06 rec3=000
        [0x06] rec0=ab rec1=04 rec2=00 rec3=028
    tail 0x215393f80860a5fd88a26 0x42a00088462060003
Free Block Chain:
  0x2: 0000  00 00 00 0c 80 09 23 2c 20 31 36 23 30 31 23 09  ┆      #, 16#01# ┆