home *** CD-ROM | disk | FTP | other *** search
/ APDL Public Domain 1 / APDL_PD1A.iso / program / c / armmul / ReadMe < prev   
Encoding:
Text File  |  1995-01-07  |  720 b   |  19 lines

  1. The assembler multiplication command, MUL ,should only be used when the
  2. multiplier is unknown. But calculating a faster method using the other
  3. commands can be quite difficult and MUL is often used for ease instead
  4. of speed.
  5. For instance, to multiply a number by 7 you can use:
  6.  
  7.   RSB R0,R0,R0,LSL #3
  8.  
  9.  which only requires one registor compared to MUL's three. The advantages
  10. of using this method are abvious and the program ArmMUL is my attempt at
  11. a program which caluclates the assembler code required for a given
  12. multiple.
  13. It is not as fast as the routines used by Acorn's C Compiler - but this is
  14. the quickest method I could come up with.
  15.  
  16. Note: the code ArmMUL produces has not been extensively tested.
  17.  
  18. Dean Sivell
  19.