Adding user translation tables to MTAACP B. Z. Lederman I.T.T. World Communications, N.Y. One of the enhancements to RSX-11M V4.0 is the ability to insert translation tables into the magnetic tape acp (MTAACP). Most of the information required to do this is in the I/O Operations reference manual, appendix G, section G.6.3, but in adding my own routine I found a few points which could use some clarification. Between my own efforts and some advice from TSC, I offer the following suggestions. First, it seems desireable to specify a PSECT for the user written routines: the values given in the following example work properly. Also, the appendix states that the translation tables should be 256. bytes long (one translation for each possible 8 bit code), but in the example given, the output translation table is shorter. You should always make your tables the full 256 bytes long: otherwise, sooner or later, you are going to get a tape with characters you didn't expect, and MTAACP could violate it's address limits and abort, locking up your tape drive. Similarly, on output, you may think you are dealing only with 7 bit ASCII, but eventually someone will come up with what looks like ASCII text which has the 8th bit set (maybe to get past the terminal driver): as may be seen in my example, I simply entered the first 128 characters in the table, and then used the editor to duplicate this for the second 128 characters. .TITLE USER1 .IDENT /V1.2/ ; .NLIST BEX ; ; A User written translation routine for MTAACP ; ; Translate XXX tapes to ASCII ; ; B. Z. Lederman I.T.T. World Communications 12-August-82 ; .PSECT USER1, RW, I, GBL, REL, OVR ; ; Entry point: this must be a label MTA understands. ; USER1:: MOV #TBLPTR,R0 RETURN ; TBLPTR: .WORD BDTASC .WORD ASCBDT ; ; Translation tables: XXX to ASCII. ; BDTASC: .BYTE ' ,' ,' ,'5,' ,'<,' ,'9,' ,'*,' ,'#,' ,',,' ,'. .BYTE ' ,'>,' ,'),' ,'4,' ,'&,' ,'8,' ,'0,' ,':,' ,'= .BYTE ' ,'3,' ,'+,' ,'@,' ,'?,' ,'',' ,'6,' ,'$,' ,'/ .BYTE ' ,'-,' ,'2,' ,'!,' ,'^,' ,'7,' ,'1,' ,'(,' ,'_ .BYTE ' ,' ,' ,' ,' ,' ,' ,' ,' ,' ,' ,' ,' ,' ,' ,' .BYTE ' ,' ,' ,' ,' ,' ,' ,' ,' ,' ,' ,' ,' ,' ,' ,' .BYTE ' ,' ,' ,' ,' ,' ,' ,' ,' ,' ,' ,' ,' ,' ,' ,' .BYTE ' ,' ,' ,' ,' ,' ,' ,' ,' ,' ,' ,' ,' ,' ,' ,' .BYTE ' ,' ,' ,' ,' ,' ,' ,' ,' ,' ,' ,' ,' ,' ,' ,' .BYTE ' ,' ,' ,' ,' ,' ,' ,' ,' ,' ,' ,' ,' ,' ,' ,' .BYTE ' ,' ,' ,' ,' ,' ,' ,' ,' ,' ,' ,' ,' ,' ,' ,' .BYTE ' ,' ,' ,' ,' ,' ,' ,' ,' ,' ,' ,' ,' ,' ,' ,' .BYTE ' ,' ,' ,' ,' ,' ,' ,' ,' ,' ,' ,' ,' ,' ,' ,' .BYTE ' ,' ,' ,' ,' ,' ,' ,' ,' ,' ,' ,' ,' ,' ,' ,' .BYTE ' ,' ,' ,' ,' ,' ,' ,' ,' ,' ,' ,' ,' ,' ,' ,' .BYTE ' ,' ,' ,' ,' ,' ,' ,' ,' ,' ,' ,' ,' ,' ,' ,' ; ; ASCII to XXX ; ASCBDT: .BYTE 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 .BYTE 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 .BYTE 11,65, 1,13,55, 1,27,51 .BYTE 75,23,11,43,15,61,17,57 .BYTE 33,73,63,41,25,3,53,71,31,07 ; NUMBERS 0-9 .BYTE 35, 1, 5,37,21,47,45 .BYTE 61,47,35,45,41,55,27,13 ; LETTERS .BYTE 31,65,75,23,17,15, 7,33 .BYTE 73,25,51, 3,71,37,63,57 .BYTE 53,43 .BYTE 1, 1, 1,67,77, 1 .BYTE 61,47,35,45,41,55,27,13 ; LETTERS .BYTE 31,65,75,23,17,15, 7,33 .BYTE 73,25,51, 3,71,37,63,57 .BYTE 53,43 .BYTE 1, 1, 1, 1, 1 .BYTE 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ; DO IT AGAIN .BYTE 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 .BYTE 11,65, 1,13,55, 1,27,51 .BYTE 75,23,11,43,15,61,17,57 .BYTE 33,73,63,41,25,3,53,71,31,07 ; NUMBERS 0-9 .BYTE 35, 1, 5,37,21,47,45 .BYTE 61,47,35,45,41,55,27,13 ; LETTERS .BYTE 31,65,75,23,17,15, 7,33 .BYTE 73,25,51, 3,71,37,63,57 .BYTE 53,43 .BYTE 1, 1, 1,67,77, 1 .BYTE 61,47,35,45,41,55,27,13 ; LETTERS .BYTE 31,65,75,23,17,15, 7,33 .BYTE 73,25,51, 3,71,37,63,57 .BYTE 53,43 .BYTE 1, 1, 1, 1, 1 ; .END Don't try to figure out what I'm translating: I can assure you, you don't have any tapes like this. No prefix files or libraries are required to assemble the translation routine. When assembled, it may be inserted into [1,24]MTA.OLB, where the other ACP modules are. Next, the file [1,24]MTABLD.ODL must be modified to add the user written routine. Although the appendix states this, it does not say how it should be done: this is a method which works. Locate the line which looks like this: TRANSL: .FCTR TRANS-*SY:[1,24]MTA/LB:MTRANS:MEBCDC and replace it with this: TRANSL: .FCTR TRANS-*SY:[1,24]MTA/LB:MTRANS-*(EBC,UT1) EBC: .FCTR SY:[1,24]MTA/LB:MEBCDC UT1: .FCTR SY:[1,24]MTA/LB:USER1 I have shown only one routine, but all three may be added in like manner. Next the command file [1,24]MTABLD.CMD must be edited: this is very simple, and here the comments in the file tell one exactly what to do. The ACP may now be rebuilt using the MTABLD.CMD task builder command file: note that this will also rebuild the utility MAG, which is not really required. Mounting a tape with the translation is simple, noting that the switch is /TR=UT1 (or UT2, UT3). For some reason, the /TR switch is not included in the HELP files, so the following SLP file may be of use: it is applied to [1,2]MCRMOU.HLP. -73 /TR=translation table -109 (T) /TR=translation table Translate an unlabled tape. -196 3 TR The format of the TR keyword is: (T) /TR=option The TR keyword specifies the kind of character translation used in read and write operations on an unlabled magnetic tape volume, and is normally used with the /NOLAB switch. The options are: OPTION ACTION NONE No translation takes place (the default). EBCDIC Translation between the EBCDIC and ASCII character sets takes place. Note that this translation is not symmetrical. UT1 Translation between the XXX and ASCII character sets takes place. UT2 Not implemented. UT3 Not implemented. / You will want to edit it first, to identify the type of tape to be used with each of the user translation switches.