home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 9 / 09.iso / l / l042 / 1.ddi / CHAP2.ARC / ROOTSEQU.ASM < prev    next >
Encoding:
Assembly Source File  |  1987-12-30  |  1.3 KB  |  48 lines

  1. ;
  2. ; The following file contains glue code for calling
  3. ; routines defined outside of the "RootsEqu" unit.
  4. ;
  5. DATA      SEGMENT  PUBLIC
  6. DATA      ENDS
  7.  
  8. CODE      SEGMENT  PUBLIC
  9.  
  10.           ASSUME   CS:CODE, DS:DATA
  11.  
  12.           PUBLIC   UserFunction, UserProcedure  ;Make routines known
  13.  
  14. ;function UserFunction(X : real; ProcAddr : Pointer) : real;
  15.  
  16. UserFunction   PROC FAR
  17.  
  18.                POP      AX             ;Get return address
  19.                POP      BX
  20.                POP      CX             ;Proc offset
  21.                POP      DX             ;Proc segment
  22.                PUSH     BX             ;Push return address
  23.                PUSH     AX
  24.                PUSH     DX
  25.                PUSH     CX
  26.                RET                     ;Jump to proc
  27.  
  28. UserFunction   ENDP
  29.  
  30. ;procedure UserProcedure(X : TNcomplex; var Y : TNcomplex; ProcAddr : Pointer);
  31.  
  32. UserProcedure  PROC FAR
  33.  
  34.                POP      AX             ;Get return address
  35.                POP      BX
  36.                POP      CX             ;Proc offset
  37.                POP      DX             ;Proc segment
  38.                PUSH     BX             ;Push return address
  39.                PUSH     AX
  40.                PUSH     DX
  41.                PUSH     CX
  42.                RET                     ;Jump to proc
  43.  
  44. UserProcedure  ENDP
  45.  
  46. CODE           ENDS
  47.                END
  48.