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

⟦dc554751e⟧ Ada Source

    Length: 7168 (0x1c00)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, package body My_Functions, seg_04fe17

Derivation

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

E3 Source Code



with V_Bits;
package body My_Functions is

    use V_Bits;
    -- Format functions of V_bits
    -- function Bit_And (L, R : Integer) return Integer
    -- function Bit_Or (L, R : Integer) return Integer
    -- function Bit_Xor (L, R : Integer) return Integer
    -- function Bit_Neg (L : Integer) return Integer
    -- function Bit_Sra (L, Cnt : Integer) return Integer
    -- function Bit_Srl (L, Cnt : Integer) return Integer
    -- function Bit_Sll (L, Cnt : Integer) return Integer

    function Set_Bit (Word : Defined_Type.Octet; Position : Data)
                     return Defined_Type.Octet is
        Tampon : Integer;
    begin
        case Position is
            when D0 =>
                Tampon := Bit_Or (Defined_Type.Octet'Pos (Word), 2#00000001#);
                return Defined_Type.Octet (Tampon);
            when D1 =>
                Tampon := Bit_Or (Defined_Type.Octet'Pos (Word), 2#00000010#);
                return Defined_Type.Octet (Tampon);
            when D2 =>
                Tampon := Bit_Or (Defined_Type.Octet'Pos (Word), 2#00000100#);
                return Defined_Type.Octet (Tampon);
            when D3 =>
                Tampon := Bit_Or (Defined_Type.Octet'Pos (Word), 2#00001000#);
                return Defined_Type.Octet (Tampon);
            when D4 =>
                Tampon := Bit_Or (Defined_Type.Octet'Pos (Word), 2#00010000#);
                return Defined_Type.Octet (Tampon);
            when D5 =>
                Tampon := Bit_Or (Defined_Type.Octet'Pos (Word), 2#00100000#);
                return Defined_Type.Octet (Tampon);
            when D6 =>
                Tampon := Bit_Or (Defined_Type.Octet'Pos (Word), 2#01000000#);
                return Defined_Type.Octet (Tampon);
            when D7 =>
                Tampon := Bit_Or (Defined_Type.Octet'Pos (Word), 2#10000000#);
                return Defined_Type.Octet (Tampon);
        end case;
    end Set_Bit;

    function Reset_Bit (Word : Defined_Type.Octet; Position : Data)
                       return Defined_Type.Octet is
        Tampon : Integer;
    begin
        case Position is
            when D0 =>
                Tampon := Bit_And (Defined_Type.Octet'Pos (Word), 2#11111110#);
                return Defined_Type.Octet (Tampon);
            when D1 =>
                Tampon := Bit_And (Defined_Type.Octet'Pos (Word), 2#11111101#);
                return Defined_Type.Octet (Tampon);
            when D2 =>
                Tampon := Bit_And (Defined_Type.Octet'Pos (Word), 2#11111011#);
                return Defined_Type.Octet (Tampon);
            when D3 =>
                Tampon := Bit_And (Defined_Type.Octet'Pos (Word), 2#11110111#);
                return Defined_Type.Octet (Tampon);
            when D4 =>
                Tampon := Bit_And (Defined_Type.Octet'Pos (Word), 2#11101111#);
                return Defined_Type.Octet (Tampon);
            when D5 =>
                Tampon := Bit_And (Defined_Type.Octet'Pos (Word), 2#11011111#);
                return Defined_Type.Octet (Tampon);
            when D6 =>
                Tampon := Bit_And (Defined_Type.Octet'Pos (Word), 2#10111111#);
                return Defined_Type.Octet (Tampon);
            when D7 =>
                Tampon := Bit_And (Defined_Type.Octet'Pos (Word), 2#01111111#);
                return Defined_Type.Octet (Tampon);
        end case;
    end Reset_Bit;

    function Test_Bit
                (Word : Defined_Type.Octet; Position : Data) return Boolean is
        Tampon : Integer;
    begin
        case Position is
            when D0 =>
                Tampon := Bit_And (Defined_Type.Octet'Pos (Word), 2#00000001#);
            when D1 =>
                Tampon := Bit_And (Defined_Type.Octet'Pos (Word), 2#00000010#);
            when D2 =>
                Tampon := Bit_And (Defined_Type.Octet'Pos (Word), 2#00000100#);
            when D3 =>               Tampon := Bit_And (Defined_Type.Octet'Pos (Word), 2#00001000#);
            when D4 =>
                Tampon := Bit_And (Defined_Type.Octet'Pos (Word), 2#00010000#);
            when D5 =>
                Tampon := Bit_And (Defined_Type.Octet'Pos (Word), 2#00100000#);
            when D6 =>
                Tampon := Bit_And (Defined_Type.Octet'Pos (Word), 2#01000000#);
            when D7 =>
                Tampon := Bit_And (Defined_Type.Octet'Pos (Word), 2#10000000#);
        end case;
        return (Tampon /= 0);
    end Test_Bit;
end My_Functions;

E3 Meta Data

    nblk1=6
    nid=6
    hdr6=a
        [0x00] rec0=19 rec1=00 rec2=01 rec3=05e
        [0x01] rec0=16 rec1=00 rec2=04 rec3=010
        [0x02] rec0=15 rec1=00 rec2=03 rec3=008
        [0x03] rec0=17 rec1=00 rec2=05 rec3=002
        [0x04] rec0=0d rec1=00 rec2=02 rec3=000
        [0x05] rec0=10 rec1=00 rec2=06 rec3=001
    tail 0x217575f92877a6b618f1c 0x42a00088462060003
Free Block Chain:
  0x6: 0000  00 00 02 4d 80 3f 54 61 6d 70 6f 6e 20 3a 3d 20  ┆   M ?Tampon := ┆