DataMuseum.dk

Presents historical artifacts from the history of:

RC3500

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about RC3500

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download

⟦30ec1826a⟧ TextFileVerbose

    Length: 1536 (0x600)
    Types: TextFileVerbose
    Names: »unpackmesst«

Derivation

└─⟦a41ae585a⟧ Bits:30001842 SW-save af projekt 1000, Alarm-system
    └─⟦72244f0ef⟧ 
        └─⟦this⟧ »unpackmesst« 

TextFileVerbose

unpackmess=algol list.yes
external
   procedure unpack_mess(mess);
   real array mess;
   begin
      integer lower,upper,pack_index,part_one,part_two,no_of_bytes,
      _       no_of_int,rel_start,rel_extra,start_index,i;

      lower := system(3,upper,mess);
      no_of_bytes := mess(1) shift (-32) extract 16 + 2;
      no_of_int := upper * 2;
      if no_of_bytes < no_of_int * 2 and no_of_bytes >= 16 then
      no_of_int := no_of_bytes // 2;
      no_of_int := no_of_int + no_of_int mod 2;
      upper := no_of_int // 2;
      rel_start := no_of_int // 3;
      rel_extra := no_of_int mod 3;

      start_index := 1 + rel_start - (if rel_extra = 0 then 1 else 0);
      i := case rel_extra + 1 of (1,3,2);

      for pack_index := upper step -1 until 1 do
      begin
         part_one := mess(start_index) shift ((-16) * (i - 1)) extract 16;
         i := i + 1;
         if i > 3 then
         begin
            start_index := start_index - 1;
            i := 1;
         end;

         part_two := mess(start_index) shift ((-16) * (i - 1)) extract 16;
         i := i + 1;
         if i > 3 then
         begin
            start_index := start_index - 1;
            i := 1;
         end;

         mess(pack_index) := real (extend part_two shift 24) add part_one;
      end;
   end unpack_mess;
end
finis
«eof»