DataMuseum.dk

Presents historical artifacts from the history of:

Bogika Butler

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

See our Wiki for more about Bogika Butler

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download

⟦fb4db0540⟧ TextFile

    Length: 1536 (0x600)
    Types: TextFile
    Names: »CUTOFF.PAS«

Derivation

└─⟦398ae89d3⟧ Bits:30009789/_.ft.Ibm2.50007353.imd Mogens Pelles Zilog 80,000 / EOS projekt
    └─⟦this⟧ »CUTOFF.PAS« 
└─⟦ec7c10e12⟧ Bits:30009789/_.ft.Ibm2.50007351.imd Mogens Pelles Zilog 80,000 / EOS projekt
    └─⟦this⟧ »CUTOFF.PAS« 

TextFile

PROGRAM cutoff;

(* This program is used for stripping the first 30 sectors (@128 bytes)
produced by program ddt in files copied from 8" inch floppy disks. *)

   TYPE
      f = file;

   VAR
      i: f;
      o: f;
      n: integer;

   PROCEDURE oper(VAR i,o: f
                 ;VAR n: integer
                 );

      VAR
         name: string(.14.);

     BEGIN (* OPER *)
      write(output, 'Enter name of input  file: ');
      readln(input, name);
      assign(i, name);
      reset(i);
      writeln(output);
      write(output, 'Enter name of output file: ');
      readln(input, name);
      assign(o, name);
      rewrite(o);
      writeln(output);
      write(output, 'Enter number of sectors (@128) to copy: ');
      n := 260;
      readln(input, n);
     END;  (* OPER *)

   PROCEDURE copy(VAR i,o: f
                 ;    n: integer
                 );

      VAR
         b: ARRAY(.0..127.) OF byte;
         j: integer;

     BEGIN (* COPY *)
      FOR j := 1 TO 30 DO
         IF not eof(i) THEN
            blockread(i,b,1);
      j := 1;
      WHILE (j <= n) and not eof(i) DO
        BEGIN
         blockread(i, b, 1);
         blockwrite(o, b, 1);
         j := j + 1;
        END;
      writeln(output, j-1, ' sectors (@128 bytes) copied.');
     END;  (* COPY *)

  BEGIN
   oper(i,o,n);
   copy(i,o,n);
   close(i);
   close(o);
  END.«eof»