|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - download
Length: 12288 (0x3000) Types: Ada Source Notes: 03_class, FILE, R1k_Segment, e3_tag, package Xlbmt_Numeric_Types, seg_004f13
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000 └─ ⟦cfc2e13cd⟧ »Space Info Vol 2« └─⟦this⟧
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. ------------------------------------------------------------------------------ --\x0c ------------------------------------------------------------------------------ -- 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;
nblk1=b nid=0 hdr6=16 [0x00] rec0=15 rec1=00 rec2=01 rec3=028 [0x01] rec0=10 rec1=00 rec2=02 rec3=020 [0x02] rec0=18 rec1=00 rec2=03 rec3=060 [0x03] rec0=14 rec1=00 rec2=04 rec3=03a [0x04] rec0=00 rec1=00 rec2=0b rec3=004 [0x05] rec0=1c rec1=00 rec2=05 rec3=00c [0x06] rec0=12 rec1=00 rec2=06 rec3=094 [0x07] rec0=02 rec1=00 rec2=0a rec3=00c [0x08] rec0=1b rec1=00 rec2=07 rec3=02c [0x09] rec0=15 rec1=00 rec2=08 rec3=010 [0x0a] rec0=18 rec1=00 rec2=09 rec3=000 tail 0x21700658881978084502f 0x42a00088462063203