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: 2636 (0xa4c) Types: TextFile Names: »V«
└─⟦d10a02448⟧ Bits:30000409 8mm tape, Rational 1000, ENVIRONMENT, D_12_7_3 └─ ⟦fc9b38f02⟧ »DATA« └─⟦9b46a407a⟧ └─⟦12c68c704⟧ └─⟦this⟧ └─⟦5f3412b64⟧ Bits:30000745 8mm tape, Rational 1000, ENVIRONMENT 12_6_5 TOOLS └─ ⟦91c658230⟧ »DATA« └─⟦458657fb6⟧ └─⟦220843204⟧ └─⟦this⟧
package Bit_Operations is -- Operations on Integer and Long_Integer as an array of bits. -- Bit numbering is left to right, 0..31 and 0..63. -- Arguments specified outside bit range raise Constraint_Error -- 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; Start : Natural; Length : Natural) return Integer; function Extract (W : Long_Integer; Start : Natural; Length : Natural) return Long_Integer; -- Extract the single bit at B and return as Boolean -- Equivalent to Extract (W, B, 1) /= 0 function Test_Bit (W : Integer; B : Natural) return Boolean; function Test_Bit (W : Long_Integer; B : Natural) return Boolean; -- Replace the specified bits of Into with the rightmost Length bits of W. function Insert (W, Into : Integer; Start : Natural; Length : Natural) return Integer; function Insert (W, Into : Long_Integer; Start : Natural; Length : Natural) return Long_Integer; -- Set the specified Bit to One or Zero procedure Set_Bit_To_One (W : in out Integer; B : Natural); procedure Set_Bit_To_One (W : in out Long_Integer; B : Natural); procedure Set_Bit_To_Zero (W : in out Integer; B : Natural); procedure Set_Bit_To_Zero (W : in out Long_Integer; B : Natural); -- Logical operations on two operands. -- For shift operations, positive arguments shift Left and negative -- arguments shift Right. -- Intermediate results are stored as Long_Integer, so shifting -- ones into positions outside of Integer will raise Numeric_Error. function Logical_And (X, Y : Integer) return Integer; function Logical_And (X, Y : Long_Integer) return Long_Integer; function Logical_Or (X, Y : Integer) return Integer; function Logical_Or (X, Y : Long_Integer) return Long_Integer; function Logical_Xor (X, Y : Integer) return Integer; function Logical_Xor (X, Y : Long_Integer) return Long_Integer; function Logical_Not (X : Integer) return Integer; function Logical_Not (X : Long_Integer) return Long_Integer; function Logical_Shift (X : Integer; Amount : Integer) return Integer; function Logical_Shift (X : Long_Integer; Amount : Integer) return Long_Integer; pragma Module_Name (4, 828); pragma Subsystem (Miscellaneous); end Bit_Operations;