home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / programm.ing / falcon / nt_dsp1.lzh / NT_DSP1.MSA / FNTNS / BINGRAY.ASM next >
Encoding:
Assembly Source File  |  1989-01-24  |  619 b   |  19 lines

  1. ;
  2. ; This program originally available on the Motorola DSP bulletin board.
  3. ; It is provided under a DISCLAMER OF WARRANTY available from
  4. ; Motorola DSP Operation, 6501 Wm. Cannon Drive W., Austin, Tx., 78735.
  5. ; Binary-to-Gray Code Conversion Macro
  6. ; Last Update 30 Mar 87   Version 1.0
  7. ;
  8. bingray macro
  9. bingray ident   1,0
  10. ;
  11. ;       This macro converts a binary value in register A1 to a GRAY coded
  12. ;   number in A1.  Register X0 is used as a temporary register.
  13. ;
  14.         lsr     a  a1,x0        ;shift bits, copy a
  15.         eor     x0,a            ;xor adjacent bits to do gray code
  16.         endm
  17.