         SYSTEM   SIG7FDP
         SYSTEM   BPM
*
*        TRANSFORM TRANSFORM DATA TO NEW COLLATING SEQUENCE
*                 ALLOWS THE USER TO TRANSLATE UP TO 255 BYTES OF DATA
*                 TO ANY SPECIFIED COLLATING SEQUENCE
*                 TH USER IS RESPONSIBLE FOR CONSTRUCTING A 256 BYTE
*                 TABLE CONTAINING THE TARGET COLLATING SEQUENCE
*                 THE RUN-TIME ROUTINE USES THE TRANSLATE BYTE STRING
*                 INSTRUCTION TO ACCOMPLISH THE TRANSFORMATION
*                 THE TARGET TRANSLATION TABLE IS DEFINED BY THE USER
*                 IN MUCH THE SAME WAY THAT KEY TRANSLATION IS SPECIFIED
*                 IN THE SIGMA 5/7 SORT
*
*      USER SYNTAX:
*
*        ENTER TRANSFORM  DATA-NAME-1, DATA-NAME-2, DATA-NAME-3
*
*                 TRANSFORM: THE ENTRY POINT IN THE RUN-TIME ROUTINE
*               DATA-NAME-1: CONTAINS UP TO 255 BYTES OF DATA TO BE
*                            TRANSFORMED (DISPLAY)
*                            MUST BE ON WORD BOUNDARY
*               DATA-NAME-2: CONTAINS THE ACTUAL LENGTH OF THE BYTE
*                            STRING TO BE TRANSFORMED (COMPUTATIONAL)
*               DATA-NAME-3: A 256 BYTE TRANSLATION TABLE CONTAINING
*                            THE TARGET COLLATING SEQUENCE
*                            MUST BE ON WORD BOUNDARY
*
*        AUTHER   YOW-YUAN ROBERT LIN
*
*
         REF      C:ABA                                                 TRANSFOR
         DEF      TRANSFORM
         OPEN     SAVE,RETURN
TRANSFORM LCI     6
         STM,14   SAVE
         STW,15   RETURN
         AWM,14   RETURN
         CI,14    3                                                     TRANSFRM
         BE       %+4                                                   TRANSFRM
         LI,2     X'9A'                                                 TRANSFRM
         STB,2    10                                                    TRANSFRM
         B        C:ABA                                                 TRANSFRM
         LI,3     X'7FFFF'          MASK
         AND,3    *15               R3 = BYTE ADDR OF DEST
         LI,1     X'1FFFF'          MASK
         AI,15    1
         AND,1    *15               R1 = ADDR OF LENGTH
         LW,1     *1                R1 = LENGTH
         LI,2     X'7FFFF'
         AI,15    1
         AND,2    *15               R2 = BYTE ADDR OF SOURCE
         STB,1    3                 COUNT FOR TBS
         TBS,2    0                 DO TRANSLATION
         LCI      6
         LM,14    SAVE
         B        *RETURN
SAVE     RES      6
RETURN   RES      1
         CLOSE    SAVE,RETURN
         END
