|
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 - metrics - download
Length: 3072 (0xc00) Types: Ada Source Notes: 03_class, FILE, R1k_Segment, e3_tag, function Byte_String_To_Integer, seg_0520ef, separate Transport
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000 └─⟦cfc2e13cd⟧ »Space Info Vol 2« └─⟦this⟧
separate (Transport) function Byte_String_To_Integer (Bs : Byte_Defs.Byte_String) return Unix_Base_Types.Int is Result : Unix_Base_Types.Int := 0; Int_Length : constant := 4; Negative : Boolean := False; Shifter : Integer := 0; Normalized_Bs : Byte_Defs.Byte_String (0 .. Int_Length - 1) := (others => 0); begin if Bs'Length < Int_Length then Normalized_Bs ((Normalized_Bs'Last - Bs'Length) + 1 .. Normalized_Bs'Last) := Bs; else Normalized_Bs := Bs ((Bs'Last - Int_Length) + 1 .. Bs'Last); end if; if Normalized_Bs (0) > Byte_Defs.Byte (2 ** 7 - 1) then Negative := True; end if; for I in reverse Normalized_Bs'Range loop if Negative then Normalized_Bs (I) := Byte_Defs.Byte'Last - Normalized_Bs (I); end if; Result := Result + Integer (Normalized_Bs (I)) * (2 ** Shifter); Shifter := Shifter + 8; end loop; if Negative then return -Result - 1; else return Result; end if; end Byte_String_To_Integer;
nblk1=2 nid=0 hdr6=4 [0x00] rec0=20 rec1=00 rec2=01 rec3=010 [0x01] rec0=0b rec1=00 rec2=02 rec3=000 tail 0x2175994a487a05cb11b50 0x42a00088462060003