         Name: LINLOG.ASM
         Type: Assembler Macros
      Version: 1.0
 Date Entered:  20-Apr-87
  Last Change:  20-Apr-87

  Description: Linear PCM to Companded CODEC Data Conversion Macros

 These macros convert 13 bit, linear fractional data into 8 bit companded
 data suitable for transmission to CODEC D/A converters used in
 telecommunications applications.  Four companded formats are
 supported for the Motorola MC14400 CODEC series and similar devices.



 Macro Name    Description
 ----------    -----------
 linsm         linear to sign magnitude conversion with mu-law companding.

 linmu         linear to mu-law companded conversion without zero code
               suppression.

 lind3d4       linear to mu-law companded conversion with D3/D4 format
               zero code suppression.

 linal         linear to a-law companded conversion with CCITT (G7.12)
               format.

 Input data is a 56 bit number in accumulator a.  Although any 56 bit
 number may be used, the 13 bit linear fraction is assumed to be in
 the most significant bits of a1.  Values outside this fractional range
 are automatically converted to a maximum positive or negative companded
 value (dynamic range limiting).

 Output data is in the 8 most significant bits of a1.  The 16 LSB's
 of a1 are zero.

  -------------------------------------------------------
 | Sign |    Chord Number    |       Step Number         |
 | Bit  |                    |                           |
 |__23__|__22_____21_____20__|__19_____18_____17_____16__|

 These macros execute in 23-25 instruction cycles worst case and require
 16-18 words of program memory.  They do not use the DSP56001 internal
 mu/a-law lookup table.
