DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400 Tapes

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 Tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download
Index: ┃ T V

⟦f34703637⟧ TextFile

    Length: 8657 (0x21d1)
    Types: TextFile
    Names: »V«

Derivation

└─⟦85b835f43⟧ Bits:30000549 8mm tape, Rational 1000, Xlib rev 6.00
    └─ ⟦0c20f784e⟧ »DATA« 
        └─⟦1abbe589f⟧ 
            └─⟦059497ac5⟧ 
                └─⟦this⟧ 

TextFile

package Xlbmt_Numeric_Types is
------------------------------------------------------------------------------
-- X Library Machine Types
--
-- Xlbmt_Numeric_Types - Machine/Compiler dependent numeric types.
------------------------------------------------------------------------------
-- Copyright 1989 - 1991 by Rational, Santa Clara, California.
--
--                  All Rights Reserved.
--
-- Permission to use, copy, modify, and distribute this software and its
-- documentation for any purpose and without fee is hereby granted,
-- provided that the above copyright notice(s) appear in all copies and that
-- both that copyright notice(s) and this permission notice appear in
-- supporting documentation, and that the name of Rational not be used in
-- advertising or publicity pertaining to distribution of the software
-- without specific, written prior permission.
--
-- Rational disclaims all warranties with regard to this software, including
-- all implied warranties of merchantability and fitness, in no event shall
-- Rational be liable for any special, indirect or consequential damages or
-- any damages whatsoever resulting from loss of use, data or profits, whether
-- in an action of contract, negligence or other tortious action, arising out
-- of or in connection with the use or performance of this software.
--                  All Rights Reserved.
------------------------------------------------------------------------------

--\f

------------------------------------------------------------------------------
-- X's Numeric Types - X requires real true 32-bit 2's complement numbers.
--  Ada doesn't guarantee that a compiler will actually use such numbers
--  by default.  For instance, on an R1000, an Integer is in the range of
--  -(2**31-1)..(2**31-1) and that's inadequate for X.  X depends upon the
--  full range of 32-bit (and 16-bit and 8-bit) values possible with a
--  2's complement representation.
------------------------------------------------------------------------------

------------------------------------------------------------------------------
-- 32-bit numeric types
------------------------------------------------------------------------------

    type Thirty_Two_Bits_Signed is range -(2 ** 31) .. 2 ** 31 - 1;

--/ if Length_Clauses then
    for Thirty_Two_Bits_Signed'Size use 32;
--/ elsif Pack then
    --// pragma Pack (Thirty_Two_Bits_Signed);
--/ end if;

----Unfortunately, a 32-bit unsigned type is not portable to most present-day
--  Ada implementations.  The LRM would require them to implemented at least
--  33-bit signed arithmetic (or 64-bit arithmetic).
--
--    type Thirty_Two_Bits_Unsigned is range 0 .. 2 ** 32 - 1;
--
--    for Thirty_Two_Bits_Unsigned'Size use 32;

------------------------------------------------------------------------------
-- Perform bit-wise operations on signed values.
------------------------------------------------------------------------------

    function "and" (A : Thirty_Two_Bits_Signed;  
                    B : Thirty_Two_Bits_Signed) return Thirty_Two_Bits_Signed;  
    function "or"  (A : Thirty_Two_Bits_Signed;  
                    B : Thirty_Two_Bits_Signed) return Thirty_Two_Bits_Signed;  
    function "xor" (A : Thirty_Two_Bits_Signed;  
                    B : Thirty_Two_Bits_Signed) return Thirty_Two_Bits_Signed;  
    function "not" (A : Thirty_Two_Bits_Signed) return Thirty_Two_Bits_Signed;  
    function Shift (A : Thirty_Two_Bits_Signed;  
                    B : Integer)  
                   return Thirty_Two_Bits_Signed;

------------------------------------------------------------------------------
-- Min/Max functions
------------------------------------------------------------------------------

    function Max (A : Thirty_Two_Bits_Signed;  
                  B : Thirty_Two_Bits_Signed) return Thirty_Two_Bits_Signed;

    function Min (A : Thirty_Two_Bits_Signed;  
                  B : Thirty_Two_Bits_Signed) return Thirty_Two_Bits_Signed;

--    function Max (A : Thirty_Two_Bits_Unsigned;
--                  B : Thirty_Two_Bits_Unsigned) return Thirty_Two_Bits_Unsigned;
--
--    function Min (A : Thirty_Two_Bits_Unsigned;
--                  B : Thirty_Two_Bits_Unsigned) return Thirty_Two_Bits_Unsigned;


------------------------------------------------------------------------------
-- 16-bit numeric types
------------------------------------------------------------------------------

    type Sixteen_Bits_Signed is range -(2 ** 15) .. 2 ** 15 - 1;

--/ if Length_Clauses then
    for Sixteen_Bits_Signed'Size use 16;
--/ elsif Pack then
--//     pragma Pack (Sixteen_Bits_Signed);
--/ end if;

    type Sixteen_Bits_Unsigned is range 0 .. 2 ** 16 - 1;

--/ if Length_Clauses then
    for Sixteen_Bits_Unsigned'Size use 16;
--/ elsif Pack then
--//     pragma Pack (Sixteen_Bits_Unsigned);
--/ end if;

------------------------------------------------------------------------------
-- Perform bit-wise operations on unsigned values.
------------------------------------------------------------------------------

    function "and" (A : Sixteen_Bits_Unsigned;  
                    B : Sixteen_Bits_Unsigned) return Sixteen_Bits_Unsigned;  
    function "or"  (A : Sixteen_Bits_Unsigned;  
                    B : Sixteen_Bits_Unsigned) return Sixteen_Bits_Unsigned;  
    function "xor" (A : Sixteen_Bits_Unsigned;  
                    B : Sixteen_Bits_Unsigned) return Sixteen_Bits_Unsigned;  
    function "not" (A : Sixteen_Bits_Unsigned) return Sixteen_Bits_Unsigned;  
    function Shift (A : Sixteen_Bits_Unsigned;  
                    B : Integer)               return Sixteen_Bits_Unsigned;

------------------------------------------------------------------------------
-- Min/Max functions
------------------------------------------------------------------------------

    function Max (A : Sixteen_Bits_Signed;  
                  B : Sixteen_Bits_Signed) return Sixteen_Bits_Signed;

    function Min (A : Sixteen_Bits_Signed;  
                  B : Sixteen_Bits_Signed) return Sixteen_Bits_Signed;

    function Max (A : Sixteen_Bits_Unsigned;  
                  B : Sixteen_Bits_Unsigned) return Sixteen_Bits_Unsigned;

    function Min (A : Sixteen_Bits_Unsigned;  
                  B : Sixteen_Bits_Unsigned) return Sixteen_Bits_Unsigned;

------------------------------------------------------------------------------
-- 8-bit numeric types
------------------------------------------------------------------------------

    type Eight_Bits_Signed is range -(2 ** 7) .. 2 ** 7 - 1;

--/ if Length_Clauses then
    for Eight_Bits_Signed'Size use 8;
--/ elsif Pack then
--//     pragma Pack (Eight_Bits_Signed);
--/ end if;

    type Eight_Bits_Unsigned is range 0 .. 2 ** 8 - 1;

--/ if Length_Clauses then
    for Eight_Bits_Unsigned'Size use 8;
--/ elsif Pack then
--//     pragma Pack (Eight_Bits_Unsigned);
--/ end if;

------------------------------------------------------------------------------
-- Perform bit-wise operations on unsigned values.
------------------------------------------------------------------------------

    function "and" (A : Eight_Bits_Unsigned;  
                    B : Eight_Bits_Unsigned) return Eight_Bits_Unsigned;  
    function "or"  (A : Eight_Bits_Unsigned;  
                    B : Eight_Bits_Unsigned) return Eight_Bits_Unsigned;  
    function "xor" (A : Eight_Bits_Unsigned;  
                    B : Eight_Bits_Unsigned) return Eight_Bits_Unsigned;  
    function "not" (A : Eight_Bits_Unsigned) return Eight_Bits_Unsigned;  
    function Shift (A : Eight_Bits_Unsigned;  
                    B : Integer)             return Eight_Bits_Unsigned;

------------------------------------------------------------------------------
-- Min/Max functions
------------------------------------------------------------------------------

    function Max (A : Eight_Bits_Signed;  
                  B : Eight_Bits_Signed) return Eight_Bits_Signed;

    function Min (A : Eight_Bits_Signed;  
                  B : Eight_Bits_Signed) return Eight_Bits_Signed;

    function Max (A : Eight_Bits_Unsigned;  
                  B : Eight_Bits_Unsigned) return Eight_Bits_Unsigned;

    function Min (A : Eight_Bits_Unsigned;  
                  B : Eight_Bits_Unsigned) return Eight_Bits_Unsigned;

------------------------------------------------------------------------------
-- General Directives
------------------------------------------------------------------------------

--/ if INLINE then
--//     pragma Inline ("and", "or", "xor", "not", Shift);
--//     pragma Inline (Max, Min);
--/ end if;

end Xlbmt_Numeric_Types;