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

  1. ; File......: FNSHL.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_SHL()
  19. ; $CATEGORY$
  20. ;    Miscellaneous
  21. ; $ONELINER$
  22. ;    Shift the bits in an integer to the left
  23. ; $SYNTAX$
  24. ;
  25. ;    fn_shl( <nInt> | <cInt>, <nBits> ) -> nResult
  26. ;
  27. ; $ARGUMENTS$
  28. ;
  29. ;    <nInt> 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 shift left and must be a numeric.
  33. ;
  34. ; $RETURNS$
  35. ;
  36. ;     <nResult>, a numeric
  37. ;
  38. ; $DESCRIPTION$
  39. ;
  40. ;      The value returned is obtained by shifting the bits in <nInt> to
  41. ;      the left.  <nBits> determines the number of bits to shift.
  42. ;      If any parameters are invalid, the function will return zero.
  43. ;
  44. ; $EXAMPLES$
  45. ;
  46. ;       ? fn_shl( 12, 2 )       // 48
  47. ;
  48. ; $SEEALSO$
  49. ; $INCLUDE$
  50. ;
  51. ; $END$
  52. ;
  53. ;
  54.  
  55.  
  56. IDEAL
  57.  
  58. PUBLIC   FN_SHL
  59.  
  60. EXTRN    __FNCBALL:FAR
  61.  
  62. SEGMENT  _FNNET  WORD      PUBLIC    "CODE"
  63.          ASSUME    CS:_FNNET
  64.  
  65. PROC     FN_SHL       FAR
  66.  
  67.          MOV       AX,66D3h
  68.          MOV       DX,0CBFAh
  69.          JMP       __FNCBALL
  70.  
  71. ENDP     FN_SHL
  72. ENDS     _FNNET
  73. END
  74.  
  75.