home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / ddkx86v5.zip / DDKX86 / SRC / DEV / DASD / IBM / IBM2FLPY / FL2MATH.ASM < prev    next >
Encoding:
Assembly Source File  |  1995-04-14  |  1.9 KB  |  68 lines

  1. ;*DDK*************************************************************************/
  2. ;
  3. ; COPYRIGHT    Copyright (C) 1995 IBM Corporation
  4. ;
  5. ;    The following IBM OS/2 WARP source code is provided to you solely for
  6. ;    the purpose of assisting you in your development of OS/2 WARP device
  7. ;    drivers. You may use this code in accordance with the IBM License
  8. ;    Agreement provided in the IBM Device Driver Source Kit for OS/2. This
  9. ;    Copyright statement may not be removed.;
  10. ;*****************************************************************************/
  11. ;       SCCSID = src/dev/dasd/ibm/ibm2flpy/fl2math.asm, flp2, ddk_subset, b_bdd.032 93/03/21
  12.  
  13.         page    ,132
  14.  
  15. ;/*****************************************************************************
  16. ;*
  17. ;* SOURCE FILE NAME = FL2MATH.ASM
  18. ;*
  19. ;* DESCRIPTIVE NAME = IBM2FLPY.ADD - Adapter Driver for ABIOS Diskette
  20. ;*                    Device Driver Header
  21. ;*
  22. ;*
  23. ;* VERSION      V2.0
  24. ;*
  25. ;* DATE
  26. ;*
  27. ;* DESCRIPTION :  Miscellaneous arithmetic routines.
  28. ;*
  29. ;*
  30. ;*
  31. ;* CHANGE ACTIVITY =
  32. ;*   DATE      FLAG        APAR   CHANGE DESCRIPTION
  33. ;*   --------  ----------  -----  --------------------------------------
  34. ;*   mm/dd/yy  @Vnnnnn     xxxxx  xxxxxxx
  35. ;*****************************************************************************/
  36.  
  37. StaticCode segment dword public 'CODE'
  38.         assume  cs: StaticCode
  39.  
  40.         .386
  41.  
  42. ;* unsigned long far _aFuldiv( unsigned long Dividend, unsigned long Divisor )
  43.  
  44.         public  __aFuldiv
  45.  
  46. __aFuldiv proc far
  47.  
  48. ;*      Divisor  = 10
  49. ;*      Dividend = 6
  50.  
  51.         push    bp
  52.         mov     bp,sp
  53.  
  54.         mov     edx, 0
  55.         mov     eax, [bp+6]        ;* put dividend in eax
  56.         div     dword ptr [bp+10]  ;* divide by divisor
  57.         mov     edx, eax           ;* put high word of eax into dx
  58.         shr     edx, 16
  59.  
  60.         pop     bp
  61.         ret     8                  ;* clean up the stack
  62.  
  63. __aFuldiv endp
  64.  
  65. StaticCode ends
  66.  
  67. END
  68.