home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c082_122 / 1.ddi / CLIBSRC.ZIP / H_PSBH.ASM < prev    next >
Encoding:
Assembly Source File  |  1992-06-10  |  1.3 KB  |  48 lines

  1. ;[]-----------------------------------------------------------------[]
  2. ;|      H_PSBH.ASM -- huge pointer routines                          |
  3. ;[]-----------------------------------------------------------------[]
  4.  
  5. ;
  6. ;       C/C++ Run Time Library - Version 5.0
  7. ;       Copyright (c) 1987, 1992 by Borland International
  8. ;       All Rights Reserved.
  9.  
  10. ; calls to these routines are generated by the compiler to perform
  11. ; arithmetic operations on proteced/fast huge pointers.
  12.  
  13. _TEXT           SEGMENT BYTE PUBLIC 'CODE'
  14.                 ASSUME  CS:_TEXT
  15. ;
  16. ;       dx:ax   left hand pointer
  17. ;       cx:bx   right hand pointer
  18. ;
  19.                 public  N_PSBH@
  20.                 public  F_PSBH@
  21.  
  22. N_PSBH@:        push    si
  23.                 mov     si, cx
  24.                 mov     cx, offset __AHSHIFT
  25.                 shr     dx, cl
  26.                 shr     si, cl
  27.                 sub     ax, bx
  28.                 sbb     dx, si
  29.                 pop     si
  30.                 ret
  31.  
  32. F_PSBH@:        push    si
  33.                 mov     si, cx
  34.                 mov     cx, offset __AHSHIFT
  35.                 shr     dx, cl
  36.                 shr     si, cl
  37.                 sub     ax, bx
  38.                 sbb     dx, si
  39.                 pop     si
  40.                 retf
  41. _TEXT           ENDS
  42.  
  43. extrn   __AHSHIFT:far
  44.                 END
  45.  
  46.