!* Machine: PDP-11/70 System: IAS V3.0 Author: John Guidi Date: 31-July-80 Residence: [?,?]029TO026.TES Version: V1 Language: TECO V34 Useage: PDS> MUNG [?,?]029TO026.TES, Effect: The existing file is a file of records consisting of 029 punch card codes. This file is converted to 026 punch card codes and placed in a new file. Numeric Reqisters: Qc = ASCII code for character under examination Qt = number of characters in conversion table String Registers: Qc = converted 026 character Qf = command to open input and output files, and to yank first page Qt = conversion table. POSITION in table indicates 029 ASCII code, and the VALUE at a given position indicates the corresponding 026 ASCII code. *! !* set up to open input and output files, yank in first page, *! !* load this into Qf, and then clear out the text buffer. *! j ieb zj @i/ y / hxf hk !* set octal mode, then fill the text buffer with the conversion *! !* table as follows: *! !* A given POSITION in the table implicitly defines the 029 code *! !* which is translated to the appropriate 026 code by using *! !* the corresponding table VALUE for that table POSITION. *! !**! !* For example: 029 character "#" is 026 character "=" *! !* ASCII code for "#" is 43. Thus position 43 in the text buffer *! !* contains "=" *! ^o !* set octal mode *! j !* position pointer at beginning of table *! !* fill the text buffer with the conversion table as described above *! -1ua 42<%ai > 134i 75i 44i 50i 53i 136i 135i 133i 52i 74i 53ua 16<%ai > 137i 76i 51i 47i 43i 45i 77ua 33<%ai > 77i 73i 72i 46i 42i 137uai 40<%ai > !* fill Qt with the conversion table, enter the number of entries *! !* in Qt into numeric Qt, and then clear out the text buffer. *! hxt :qtut hk !* open files, yank in first page, and dump Qt at top of buffer *! mf j gt !* numeric Qc contains character to be translated *! !* string Qc contains translated character *! < .-z "E !* we are at end of text buffer *! ^N "N !* are we at EOF? *! j !* yes. position to top of buffer (conversion table) *! qtd !* delete the conversion table *! oend !* exit. all done. *! | j !* go to top of buffer (conversion table) *! qtd !* delete the conversion table *! p !* write page and read new one *! j !* position pointer to top of text buffer *! gt !* place conversion table at top of text buffer *! ' | 0auc !* put 029 ASCII value into numeric Qc *! qc,qc+1xc !* fetch 026 converted character from table *! d !* delete 029 character *! gc !* replace with 026 character *! ' > !end! ex !* close files, and exit *!