DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 Tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - downloadIndex: ┃ T V ┃
Length: 2048 (0x800) Types: TextFile Names: »V«
└─⟦5829e5ed5⟧ Bits:30000534 8mm tape, Rational 1000, RCI 2_0_5 └─ ⟦c9a165082⟧ »DATA« └─⟦2162db02b⟧ └─⟦this⟧
generic type Integer_Type is range <>; package Generic_Bit_Operations is -- Operations on an integer type as an array of bits. -- Bit numbering is left to right, starting from 0. -- Arguments specified outside bit range raise Constraint_Error -- Note :- The CDFs may allocate 32 bits for integer subtypes. -- For eg: integer range -128..127 may result in the -- allocation of a 32 bit integer. Hence integer_type'size -- must not be relied upon when using this pacakge . -- However this package will compute the offset of Bit 0 -- for any type properly. -- Extract the bits from Start .. Start + Length - 1. Equivalent to -- Logical_And with 1 in bits of the extraction range and 0 elsewhere. function Extract (W : Integer_Type; Start : Natural; Length : Natural) return Integer_Type; -- Extract the single bit at B and return as Boolean -- Equivalent to Extract (W, B, 1) /= 0 function Test_Bit (W : Integer_Type; B : Natural) return Boolean; -- Replace the specified bits of Into with the rightmost Length bits of W. function Insert (W, Into : Integer_Type; Start : Natural; Length : Natural) return Integer_Type; -- Set the specified Bit to One or Zero procedure Set_Bit_To_One (W : in out Integer_Type; B : Natural); procedure Set_Bit_To_Zero (W : in out Integer_Type; B : Natural); -- Logical operations on two operands. -- For shift operations, positive arguments shift Left and negative -- arguments shift Right. -- shifting ones into positions outside of Integer will raise Numeric_Error. function Logical_And (X, Y : Integer_Type) return Integer_Type; function Logical_Or (X, Y : Integer_Type) return Integer_Type; function Logical_Xor (X, Y : Integer_Type) return Integer_Type; function Logical_Not (X : Integer_Type) return Integer_Type; function Logical_Shift (X : Integer_Type; Amount : Integer) return Integer_Type; end Generic_Bit_Operations;