PDP-10 Foonex

Johnny Eriksson bygg at cafax.se
Tue Jan 3 16:53:46 CST 2017


> Appeared here:
> 
> http://github.com/PDP-10/FOONEX

The web says:
  "Initial checkin whilst I figure out what format the files are"

I took a quick look and guessed a little:

  #include <stdio.h>

  typedef unsigned long long w36;

  void pchar(char c)
  {
    c &= 0177;
    if ((c < ' ') || (c == 0177))
      c = ' ';
    putchar(c);
  }

  int main(int argc, char* argv[])
  {
    int wnum = 0;
    int c1, c2, c3, c4, c5;
    w36 w;
    int lh, rh;

    for (;;) {
      w  = getchar();
      w <<= 8; w |= getchar();
      w <<= 8; w |= getchar();
      w <<= 8; w |= getchar();
      w <<= 4; c5 = getchar();
      if (c5 == EOF)
	break;
      w |= (c5 & 0x0f);

      lh = w >> 18;
      rh = w & 0777777;
      c1 = (w >> 29) & 0177;
      c2 = (w >> 22) & 0177;
      c3 = (w >> 15) & 0177;
      c4 = (w >> 8) & 0177;
      c5 = (w >> 1) & 0177;

      printf("  %6o:  %9llx  %06o,,%06o", wnum, w, lh, rh);
      printf("  %3o %3o %3o %3o %3o  \"", c1, c2, c3, c4, c5);
      pchar(c1); pchar(c2); pchar(c3); pchar(c4); pchar(c5);
      printf("\"\n");
      wnum += 1;
    }

    return 0;
  }

resulted in:

       0:    7000037  000700,,000067    0  34   0   0  33  "     "
       1:      21f30  000000,,417460    0   0   4  37  30  "     "
       2:  894e5ba78  422471,,335170  104 123 113  72  74  "DSK:<"
       3:  8d3e7ce8a  432371,,747212  106 117 117 116 105  "FOONE"
       4:  b0fa1c882  541750,,344202  130  76 103 110 101  "X>CHA"
       5:  9f4d74d82  476465,,646602  117 123  56 115 101  "OS.MA"
       6:  86ed9b972  415666,,334562  103  73  63  71  71  "C;399"
       7:          0  000000,,000000    0   0   0   0   0  "     "

  [snip]

     777:          0  000000,,000000    0   0   0   0   0  "     "
    1000:  774e94374  356472,,241564   73 123 122 103  72  ";SRC:"
    1001:  794ecd35c  362473,,151534   74 123 131 123  56  "<SYS."
    1002:  9b3e749a8  466371,,644650  115 117 116 111 124  "MONIT"
    1003:  9f49f4390  476447,,641620  117 122  76 103 110  "OR>CH"
    1004:  833e9ae9a  406372,,327232  101 117 123  56 115  "AOS.M"
    1005:  830d73372  406065,,631562  101 103  56  63  71  "AC.39"
    1006:  6e810375a  335004,,033532   67  40  40  67  55  "7  7-"
    1007:  9b87cad70  467037,,126560  115 141 171  55  70  "May-8"
    1010:  62818b974  305006,,134564   61  40  61  71  72  "1 19:"
    1011:  66d5d346c  315527,,232154   63  65  72  64  66  "35:46"
    1012:  58822e4d2  261010,,562322   54  40 105 144 151  ", Edi"
    1013:  e88317940  721014,,274500  164  40 142 171  40  "t by "
    1014:  9b361cd1a  466330,,346432  115 115 103 115  15  "MMCM "

  [and so on]

Looks like a tape in core-dump format with a header page.

Should be kindof trivial to process these into plain text automagically.

--Johnny


More information about the cctech mailing list