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

⟦e6e87b4c9⟧ TextFile

    Length: 1664 (0x680)
    Types: TextFile
    Names: »HEXASM.PAS«

Derivation

└─⟦3d1e6965e⟧ Bits:30009789/_.ft.Ibm2.50007347.imd Mogens Pelles Zilog 80,000 / EOS projekt
    └─⟦this⟧ »HEXASM.PAS« 
└─⟦91467e717⟧ Bits:30009789/_.ft.Ibm2.50007348.imd Mogens Pelles Zilog 80,000 / EOS projekt
    └─⟦this⟧ »HEXASM.PAS« 
└─⟦d36b687c5⟧ Bits:30009789/_.ft.Ibm2.50007363.imd Mogens Pelles Zilog 80,000 / EOS projekt
    └─⟦this⟧ »HEXASM.PAS« 
└─⟦dbb5cfece⟧ Bits:30009789/_.ft.Ibm2.50007354.imd Mogens Pelles Zilog 80,000 / EOS projekt
    └─⟦this⟧ »HEXASM.PAS« 

TextFile

PROGRAM HEXASM;

   TYPE
      i8 = 0..255;
   VAR
      file_name: string(.14.);
      src: text;
      log: text;
      dst: file of i8;
      c: string(.2.);
      comment: string(.70.);
      c_length: i8;
      s: i8;
      table: ARRAY (.char.) OF i8;
      i: i8;
      j: char;


  BEGIN
   getcomm(File_name);
   assign(src, concat(file_name, '.hex'));
   reset(src);
   assign(log, concat(file_name, '.prt'));
   rewrite(log);
   assign(dst, concat(file_name, '.obj'));
   rewrite(dst);

(*
   write(output, 'Enter SRC file: ');
   readln(input, file_name);
   assign(src, file_name);
   reset(src);
   write(output, 'Enter DST file: ');
   readln(input, file_name);
   assign(dst, file_name);
   rewrite(dst);
*)
   FOR i := 0 TO 127 DO
      table(. chr(i) .) := 0;
   FOR j := '0' TO '9' DO
      table(. j .) := ord(j) - ord('0');
   FOR j := 'A' TO 'F' DO
      table(. j .) := ord(j) - ord('A') + 10;
   FOR j := 'a' TO 'f' DO
      table(. j .) := ord(j) - ord('a') + 10;

   writeln(log);
   writeln(log, ' ':10
              , concat(file_name, '.obj')
              , '='
              , concat(file_name, '.hex')
          );
   writeln(log);
   WHILE not eof(src) DO
     BEGIN
      readln(src, c, comment);
      c_length := length(c);
      CASE c_length OF
        0: s := 0;
        1: s := table(.c(.1.).);
        2: s := table(.c(.1.).) * 16 + table(.c(.2.).);
      END;
      writeln(output, s:3, ' < ', c:2, ' ', comment);
      writeln(log, s:3, ' < ', c:2, ' ', comment);
      write(dst, s);
     END;
  END.«eof»