home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / os / msdos / programm / 8848 < prev    next >
Encoding:
Internet Message Format  |  1992-08-27  |  727 b 

  1. Path: sparky!uunet!munnari.oz.au!yoyo.aarnet.edu.au!dstos3.dsto.gov.au!egg
  2. From: egg@dstos3.dsto.gov.au
  3. Newsgroups: comp.os.msdos.programmer
  4. Subject: Efficient byte/word mirroring request
  5. Message-ID: <1992Aug28.083405.164422@dstos3.dsto.gov.au>
  6. Date: 28 Aug 92 14:34:05 GMT
  7. Organization: Defence Science and Technology Organisation
  8. Lines: 20
  9.  
  10. Does anyone know how to quickly and efficiently mirror a byte.
  11. ie
  12.     11001010 to 01010011
  13.  
  14. the only way I know is this
  15.  
  16.    mov  al,byte_to_shift
  17.    mov  cx,8
  18. ShiftLoop:
  19.    rcr  al
  20.    rcl  ah
  21.    loop ShiftLoop
  22.    mov  shifted_byte,ah
  23.  
  24. There must be an easier (and smarter) way to speed this up using logical
  25. op's perhaps ?
  26. Any Help appreciated.
  27.  
  28. Themie Gouthas
  29. egg@dstos3.dsto.gov.au
  30.