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

⟦7283e9f63⟧ TextFile

    Length: 5632 (0x1600)
    Types: TextFile
    Names: »OBJCLAS.BAK«

Derivation

└─⟦5e7f516ab⟧ Bits:30009789/_.ft.Ibm2.50007345.imd Mogens Pelles Zilog 80,000 / EOS projekt
    └─⟦this⟧ »OBJCLAS.BAK« 
└─⟦66c279d1a⟧ Bits:30009789/_.ft.Ibm2.50007355.imd Mogens Pelles Zilog 80,000 / EOS projekt
    └─⟦this⟧ »OBJCLAS.BAK« 

TextFile

(******************************************************************************)
(*                                                                            *)
(*      Operations on object files                                            *)
(*                                                                            *)
(******************************************************************************)

FUNCTION block_obj(address: long_integer): integer;

  BEGIN
   IF address(.rx0.) > 127 THEN
      block_obj := (address(.rx2.) mod 128) * 256 + address(.rx1.)
                                                  + address(.rx1.) + 1
   ELSE
      block_obj := (address(.rx2.) mod 128) * 256 + address(.rx1.)
                                                  + address(.rx1.);
  END;

(******************************************************************************)

FUNCTION within_obj(VAR obj_file: object_file_type;
                        address: long_integer
                   ): boolean;

  BEGIN (* within_obj *)
   within_obj := false;
   IF block_obj(address) <= filesize(obj_file.external_file) THEN
      within_obj := true
  END;  (* within_obj *)

(******************************************************************************)


PROCEDURE reset_obj(VAR status: status_type;
                    VAR obj_file: object_file_type
                   );


  BEGIN (* reset_obj *)
   WITH obj_file DO
     BEGIN
      position := 0;
      reset(external_file);
      lib_ioresult(status);
      IF status = succes THEN
        BEGIN
         blockread(external_file,buffer,1);
         lib_ioresult(status)
        END
     END
  END; (* reset_obj *)

(******************************************************************************)

PROCEDURE rewrite_obj(VAR status: status_type;
                      VAR obj_file: object_file_type
                     );


  BEGIN (* rewrite_obj *)
   WITH obj_file DO
     BEGIN
      position := 0;
      rewrite(external_file);
      lib_ioresult(status);
     END
  END; (* rewrite_obj *)

(******************************************************************************)

PROCEDURE seek_obj(VAR status: status_type;
                   VAR obj_file: object_file_type;
                       address: address_type
                  );

   VAR
      block: integer;

  BEGIN (* seek_obj *)
   block := block_obj(address);
   status := succes;
   WITH obj_file DO
     BEGIN
      IF filepos(external_file) <> block THEN
        BEGIN
         seek(external_file,block);
         lib_ioresult(status);
        END;
      position := address(.rx0.) mod 128
  END;  (* seek_obj *)

(******************************************************************************)

PROCEDURE read_obj_8(VAR status: status_type;
                     VAR obj_file: object_file_type;
                     VAR item: byte
                    );

  BEGIN (* read_obj_8 *)
   status := succes;
   WITH obj_file DO
     BEGIN
      IF position > max_obj_rec_base THEN
        BEGIN
         position := 0;
         blockread(external_file,buffer,1);
         lib_ioresult(status);
        END;
      item := buffer(.position.);
      position := position + 1
     END
  END; (* read_obj_8 *)

(******************************************************************************)

PROCEDURE read_obj_32(VAR status: status_type;
                      VAR obj_file: object_file_type;
                      VAR item: long_integer
                    );

   VAR i: long_base;

  BEGIN (* read_obj_32 *)
   status := succes;
   WITH obj_file DO
     BEGIN
      FOR i := rx0 TO rx3 DO
        BEGIN
         IF position > max_obj_rec_base THEN
           BEGIN
            position := 0;
            blockread(external_file,buffer,1);
            lib_ioresult(status);
           END;
         item(.i.) := buffer(.position.);
         position := position + 1
        END
     END
  END; (* read_obj_32 *)

(******************************************************************************)

PROCEDURE write_obj_8(VAR status: status_type;
                      VAR obj_file: object_file_type;
                          item: byte
                     );

  BEGIN (* write_obj_8 *)
   status := succes;
   WITH obj_file DO
     BEGIN
      IF position > max_obj_rec_base THEN
        BEGIN
         position := 0;
         blockwrite(external_file,buffer,1);
         lib_ioresult(status);
        END;
      buffer(.position.) := item;
      position := position + 1
     END
  END; (* write_obj_8 *)

(******************************************************************************)

PROCEDURE write_obj_32(VAR status: status_type;
                       VAR obj_file: object_file_type;
                           item: long_integer
                     );

   VAR i: long_base;


  BEGIN (* write_obj_32 *)
   status := succes;
   WITH obj_file DO
     BEGIN
      FOR i := rx0 TO rx3 DO
        BEGIN
         IF position > max_obj_rec_base THEN
           BEGIN
            position := 0;
            blockwrite(external_file,buffer,1);
            lib_ioresult(status);
           END;
         buffer(.position.) := item(.i.);
         position := position + 1
        END
     END
  END; (* read_obj_32 *)

(******************************************************************************)







«eof»