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 - metrics - download
Index: T V

⟦974d030d6⟧ TextFile

    Length: 1079 (0x437)
    Types: TextFile
    Names: »V«

Derivation

└─⟦180fe333a⟧ Bits:30000405 8mm tape, Rational 1000, SW CATALOG, 10_20_0
└─⟦180fe333a⟧ Bits:30000537 8mm tape, Rational 1000, SW Catalog 10_20_0
    └─⟦5cb1d1d7f⟧ »DATA« 
        └─⟦3b1ee7bd8⟧ 
            └─⟦this⟧ 

TextFile

with Byte_Defs;
with Crc;

package Crc_Ccitt is

    Generator : constant Crc.Polynomial -- X**16 + X**12 + X**5 + 1
        := Crc.Polynomial'(12 => True, 5 => True, 0 => True, others => False);

    package Accumulator is new Crc.Accumulator (Generator);

    subtype Checksum is Crc.Checksum;

    Preset : constant Checksum := Crc.All_1;
    Remainder : constant Checksum := Crc.Convert (2#0001110100001111#);

    procedure Accumulate (R : in out Checksum; D : Byte_Defs.Byte)
        renames Accumulator.Accumulate;
    procedure Accumulate (R : in out Checksum; D : Byte_Defs.Byte_String)
        renames Accumulator.Accumulate;

    -- To calculate a checksum, declare a variable R of type
    -- Checksum, initialize it to Preset, and Accumulate
    -- over all the data bytes.  Transmit Crc."not" (R)
    -- in index order.

    -- To check a checksum, declare a variable R of type
    -- Checksum, initialize it to Preset, and Accumulate
    -- over all the data bytes AND the checksum bytes.
    -- At this point, R = Remainder if there are no errors.

end Crc_Ccitt;