UK:tape winder? Atlas Autocode charset (flexowriter) conversion?

From: Al Kossow <aek_at_spies.com>
Date: Mon Aug 4 20:50:00 2003

here is something I wrote to decode some pdp-1 tapes
note that not all characters have ASCII equivalents.

#include <stdio.h>

char cvt[] = { ' ', '"', 0x27, '~', '.', '.', '.', '<', /* 00 - 07 */
               '>', '^', '.', '.', '.', '.', '.', '.', /* 10 - 17 */
               '.', '?', 'S', 'T', 'U', 'V', 'W', 'X', /* 20 - 27 */
               'Y', 'Z', '.', '=', '.', '.', '\t', '.', /* 30 - 37 */
               '.', 'J', 'K', 'L', 'M', 'N', 'O', 'P', /* 40 - 47 */
               'Q', 'R', '.', '.', '+', ']', '|', '[', /* 50 - 57 */
               '.', 'A', 'B', 'C', 'D', 'E', 'F', 'G', /* 60 - 67 */
               'H', 'I', '.', 'x', '.', '.', '.', '\n' /* 70 - 77 */
        };

char cvtl[] ={ ' ', '1', '2', '3', '4', '5', '6', '7', /* 00 - 07 */
               '8', '9', '.', '.', '.', '.', '.', '.', /* 10 - 17 */
               '0', '/', 's', 't', 'u', 'v', 'w', 'x', /* 20 - 27 */
               'y', 'z', '.', ',', '.', '.', '\t', '.', /* 30 - 37 */
               '.', 'j', 'k', 'l', 'm', 'n', 'o', 'p', /* 40 - 47 */
               'q', 'r', '.', '.', '-', ')', '.', '(', /* 50 - 57 */
               '.', 'a', 'b', 'c', 'd', 'e', 'f', 'g', /* 60 - 67 */
               'h', 'i', '.', '.', '.', '.', '.', '\n' /* 70 - 77 */
        };
main()
{
        char c;
        int state = 0;

        while(!feof(stdin)){
                c = getchar() & 0x3f;
                if (c == 072) {state = 0; continue;} /* lower case */
                if (c == 074) {state = 1; continue;} /* upper case */
                
                if(state){
                 if(cvt[c] == '.') { printf(">>%02o<<",c); continue;}
                 putchar(cvt[c]);
                }
                else{
                 if(c != 073) {if(cvtl[c] == '.') {printf(">>%02o<<",c); continue;}}
                 putchar(cvtl[c]);
                }
        }
}
Received on Mon Aug 04 2003 - 20:50:00 BST

This archive was generated by hypermail 2.3.0 : Fri Oct 10 2014 - 23:35:46 BST