home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1993 #2 / Image.iso / clipper / nettos11.zip / MISC / FNROL.ASM < prev    next >
Assembly Source File  |  1992-10-18  |  1KB  |  78 lines

  1. ; File......: FNROL.ASM
  2. ; Author....: Ted Means
  3. ; CIS ID....: 73067,3332
  4. ; Date......: $Date$
  5. ; Revision..: $Revision$
  6. ; Log file..: $Logfile$
  7. ; This is an original work by Ted Means and is placed in the
  8. ; public domain.
  9. ;
  10. ; Modification history:
  11. ; ---------------------
  12. ;
  13. ; $Log$
  14. ;
  15.  
  16. ; $DOC$
  17. ; $FUNCNAME$
  18. ;    FN_ROL()
  19. ; $CATEGORY$
  20. ;    Miscellaneous
  21. ; $ONELINER$
  22. ;    Rotate bits in an integer to the left
  23. ; $SYNTAX$
  24. ;    
  25. ;    fn_rol( <nInt1> | <cInt1>, <nBits> ) -> nResult
  26. ;
  27. ; $ARGUMENTS$
  28. ;  
  29. ;   <nInt1> may either be a numeric integer, or a 16-bit character string
  30. ;   that is the binary representation of a numeric integer.  
  31. ;
  32. ;   <nBits> is the number of bits to rotate and must be a numeric.
  33. ;
  34. ; $RETURNS$
  35. ;
  36. ;   <nResult>, a numeric
  37. ;
  38. ; $DESCRIPTION$
  39. ;
  40. ;   The value returned is obtained by rotating the bits in <nInt1>
  41. ;   to the left.  <nBits> determines the number of bits to rotate.
  42. ;   If any parameters are invalid, the function will return zero.
  43. ;
  44. ; $EXAMPLES$
  45. ;
  46. ;   nX := -32768
  47. ;   nNum := fn_rol( nX, 2 )
  48. ;   ? nNum      // 2
  49. ;
  50. ; $SEEALSO$
  51. ;
  52. ; $INCLUDE$
  53. ;
  54. ; $END$
  55. ;
  56. ;
  57.  
  58. IDEAL
  59.  
  60. PUBLIC   FN_ROL
  61.  
  62. EXTRN    __FNCBALL:FAR
  63.  
  64. SEGMENT  _FNNET  WORD      PUBLIC    "CODE"
  65.          ASSUME    CS:_FNNET
  66.  
  67. PROC     FN_ROL       FAR
  68.  
  69.          MOV       AX,46D3h
  70.          MOV       DX,0CBFAh
  71.          JMP       __FNCBALL
  72.  
  73. ENDP     FN_ROL
  74. ENDS     _FNNET
  75. END
  76.  
  77.