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

⟦5c0a7f426⟧ Ada Source

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

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



package body Square is  
    subtype Tablesize is Integer range 1 .. Size;
    type Table is array (Tablesize, Tablesize) of Token;
    type Cell is
        record
            Line : Tablesize;
            Column : Tablesize;
        end record;
    Mysquare : Table;  
    Current_Cell : Cell;

    procedure Go_To_Center is
    begin
        Current_Cell.Line := (Size / 2) + 1;
        Current_Cell.Column := (Size / 2) + 1;
    end Go_To_Center;

    procedure Move (D : Direction) is  
    begin
        case D is
            when North =>
                Current_Cell.Line := (Current_Cell.Line mod Size) + 1;
            when East =>
                Current_Cell.Column := (Current_Cell.Column mod Size) + 1;
            when South =>
                if Current_Cell.Line = 1 then
                    Current_Cell.Line := Size;
                else
                    Current_Cell.Line := Current_Cell.Line - 1;
                end if;

            when West =>
                if Current_Cell.Column = 1 then
                    Current_Cell.Column := Size;
                else
                    Current_Cell.Column := Current_Cell.Column - 1;
                end if;

        end case;
    end Move;

    procedure Deposit (T : Token) is
    begin
        Mysquare (Current_Cell.Line, Current_Cell.Column) := T;
    end Deposit;

    function Cell_Busy return Boolean is
    begin
        return Mysquare (Current_Cell.Line, Current_Cell.Column) > 0;
    end Cell_Busy;


begin  
    for I in 1 .. Size loop
        for J in 1 .. Size loop
            Mysquare (I, J) := 0;
        end loop;
    end loop;

end Square;


E3 Meta Data

    nblk1=4
    nid=4
    hdr6=4
        [0x00] rec0=21 rec1=00 rec2=01 rec3=00e
        [0x01] rec0=1e rec1=00 rec2=03 rec3=000
        [0x02] rec0=04 rec1=00 rec2=04 rec3=000
        [0x03] rec0=02 rec1=80 rec2=46 rec3=442
    tail 0x215283462848c6cafe7a6 0x42a00088462060003
Free Block Chain:
  0x4: 0000  00 02 00 0e 80 05 75 61 72 65 3b 05 00 00 00 00  ┆      uare;     ┆
  0x2: 0000  00 00 00 46 80 2c 20 20 20 20 54 65 78 74 5f 49  ┆   F ,    Text_I┆