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

⟦c245b4c1c⟧ TextFile

    Length: 2176 (0x880)
    Types: TextFile
    Names: »TESTHELP.BAK«

Derivation

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

TextFile

(******************************************************************************)
(*                                                                            *)
(*   Formating procedures for test output                                     *)
(*                                                                            *)
(******************************************************************************)

   FUNCTION hex_2(i: byte
                 ): string_2;

      CONST
         hex_symbol: ARRAY(.0..15.) OF char = '0123456789ABCDEF';

     BEGIN (* hex_2 *)
      hex_2 := hex_symbol(.i div 16.) + hex_symbol(.i mod 16.)
     END;  (* hex_2 *)

   PROCEDURE write_status(VAR test_out: text
                         ;    status: status_type
                         );

      CONST
         status_symbol: ARRAY(.status_type.) OF string(.8.) =
                        ('succes  '
                        ,'failure '
                        ,'empty   '
                        ,'exit    '
                        ,'fatal   '
                        ,'nomore  '
                        ,'eof     '
                        );

     BEGIN (* write_status *)
      write(test_out, 'STAT: ',status_symbol(.status.))
     END;  (* write_status *)

   PROCEDURE write_i_16(VAR test_out: text
                      ;    n: i_16
                      );

      VAR
         i: base_16;

     BEGIN (* write_i_16 *)
      IF n(.rx1.) > 127 THEN
         write(test_out, hex_2( n(.rx1.) ):2, '-', hex_2( n(.rx0.) ):2 )
      ELSE
         write(test_out, (n(.rx1.)*256+n(.rx0.)):5 )
     END;  (* write_i_16 *)


   PROCEDURE write_psn(VAR test_out: text
                      ;    psn: psn_type
                      );
     (* psn printed as: "(xx-xx-xx-xx)" *)

      VAR
         i: base_32;

     BEGIN (* write_psn *)
      write(test_out, '(', hex_2( psn(.rx3.) ):2 );
      FOR i := rx2 TO rx0 DO
        BEGIN
         write(test_out, '-');
         write(test_out, hex_2( psn(.i.) ):2 );
        END;
      write(test_out, ')' )
     END;  (* write_psn *)
«eof»