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

⟦aa00a4846⟧ Ada Source

    Length: 5120 (0x1400)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Magic, seg_02fa98

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 Text_Io;
package body Magic is
    procedure Move_To (Carre : in out Square; D : in Direction) is
    begin
        case D is
            when West =>
                if Carre.Colonne > Carre.Matrice'First (2) then
                    Carre.Colonne := Column'Pred (Carre.Colonne);
                else
                    Carre.Colonne := Carre.Matrice'Last (2);
                end if;
            when East =>
                if Carre.Colonne < Carre.Matrice'Last (2) then
                    Carre.Colonne := Column'Succ (Carre.Colonne);
                else
                    Carre.Colonne := Carre.Matrice'First;
                end if;
            when South =>
                if Carre.Ligne < Carre.Matrice'Last (1) then
                    Carre.Ligne := Row'Succ (Carre.Ligne);
                else
                    Carre.Ligne := Carre.Matrice'First (1);
                end if;
            when North =>
                if Carre.Ligne > Carre.Matrice'First (1) then
                    Carre.Ligne := Row'Pred (Carre.Ligne);
                else
                    Carre.Ligne := Carre.Matrice'Last (1);
                end if;
        end case;
    end Move_To;

    procedure Go_To_Center (Carre : in out Square) is
    begin
        Carre.Ligne := Carre.O / 2 + 1;
        Carre.Colonne := Carre.O / 2 + 1;
    end Go_To_Center;

    procedure Deposit (Carre : in out Square; T : in Token) is
    begin
        Carre.Matrice (Carre.Ligne, Carre.Colonne) := T;
    end Deposit;

    function Cell_Empty (Carre : in Square) return Boolean is
    begin
        return Carre.Matrice (Carre.Ligne, Carre.Colonne) = 0;
    end Cell_Empty;

    procedure Display (Carre : in Square) is
    begin
        for I in Carre.Matrice'Range (1) loop
            for J in Carre.Matrice'Range (2) loop
                Text_Io.Put (Positive'Image (Carre.Matrice (I, J)));
            end loop;
            Text_Io.New_Line;
        end loop;
    end Display;
    procedure Johnson (Carre : in out Square) is
    begin
        for I in Carre.Matrice'Range (1) loop
            for J in Carre.Matrice'Range (2) loop
                Carre.Matrice (I, J) := 0;
            end loop;
        end loop;
    end Johnson;  
    function Get_Size return Ordre is
        O : Ordre;
        Dummy : Integer;
    begin
        Text_Io.Get (Dummy);
        O := Dummy;
        return O;
    end Get_Size;
end Magic;

E3 Meta Data

    nblk1=4
    nid=4
    hdr6=6
        [0x00] rec0=1a rec1=00 rec2=01 rec3=050
        [0x01] rec0=1e rec1=00 rec2=02 rec3=02a
        [0x02] rec0=14 rec1=00 rec2=03 rec3=000
        [0x03] rec0=0c rec1=00 rec2=02 rec3=000
    tail 0x21528da2484925bc1022d 0x42a00088462060003
Free Block Chain:
  0x4: 0000  00 00 00 08 80 05 61 74 72 69 63 05 00 00 00 00  ┆      atric     ┆