home *** CD-ROM | disk | FTP | other *** search
/ Media Share 9 / MEDIASHARE_09.ISO / progmisc / nfsrc21.zip / NOVDMP2.ASM < prev    next >
Assembly Source File  |  1991-08-17  |  3KB  |  138 lines

  1. ; File......: NOVDMP2.ASM
  2. ; Author....: David Minter
  3. ; CIS ID....: 76247,3475
  4. ; Date......: $Date:   17 Aug 1991 15:36:38  $
  5. ; Revision..: $Revision:   1.3  $
  6. ; Log file..: $Logfile:   E:/nanfor/src/novdmp2.asv  $
  7. ;
  8. ; This is an original work by David Minter and hereby placed into
  9. ; the public domain.
  10. ;
  11. ; Modification history:
  12. ; ---------------------
  13. ;
  14. ; $Log:   E:/nanfor/src/novdmp2.asv  $
  15. ;  
  16. ;     Rev 1.3   17 Aug 1991 15:36:38   GLENN
  17. ;  Don Caton fixed some spelling errors in the doc
  18. ;  
  19. ;     Rev 1.2   15 Aug 1991 23:07:00   GLENN
  20. ;  Forest Belt proofread/edited/cleaned up doc
  21. ;  
  22. ;     Rev 1.1   14 Jun 1991 19:54:46   GLENN
  23. ;  Minor edit to file header
  24. ;  
  25. ;     Rev 1.0   01 Apr 1991 01:03:34   GLENN
  26. ;  Nanforum Toolkit
  27. ;  
  28. ;
  29.  
  30.  
  31. ; $DOC$
  32. ; $FUNCNAME$ 
  33. ;    FT_NOVDMP2()
  34. ; $CATEGORY$
  35. ;    NetWare
  36. ; $ONELINER$
  37. ;    Determine Novell server's dynamic memory area 2 availability
  38. ; $SYNTAX$
  39. ;    FT_NOVDMP2() -> nDMP2
  40. ; $ARGUMENTS$
  41. ;    None
  42. ; $RETURNS$
  43. ;    The total available dynamic memory area 2 on current server, in bytes.
  44. ; $DESCRIPTION$
  45. ;   This function is used primarily on Novell 2.15 TTS Servers.  Dynamic
  46. ;   Memory area 2 is where the transaction tracking takes place.  This
  47. ;   function allows you to query the ability of the server to handle any
  48. ;   transactions you may wish to start.  (I personally don't let the area 
  49. ;   fall below 8K).  It is generally only useful in large batch situations
  50. ;   and if you are using NETLIB's TTS capability.
  51. ;
  52. ; $EXAMPLES$
  53. ;   t_trans(ON)       // Netlib function
  54. ;   DO WHILE FT_NOVDMP2() > 8000 .AND. ! Eof()
  55. ;        
  56. ;      REPLACE foo WITH 'bar'
  57. ;      SKIP
  58. ;
  59. ;   ENDDO
  60. ;   t_trans(OFF)
  61. ;
  62. ;   $END$
  63.  
  64.  
  65.  
  66.                 include         minter.mac
  67. extrn           __RETNL:FAR
  68. .MODEL    large, PASCAL
  69. .data
  70. req_buf        dw    1
  71. subfun        db    232
  72. rep_buf        dw    56
  73. elap_time    dd    ?
  74. proc_type    db    ?
  75. reserved    db    ?
  76. serv_proc    db    ?
  77. utilization    db    ?
  78. cmbind        dw    ?
  79. ambind        dw    ?
  80. curmbind    dw    ?
  81. totmem        dw    ?
  82. wasmem        dw    ?
  83. records        dw    3
  84. totd1        dd    ?
  85. maxd1        dd    ?
  86. curd1        dd    ?
  87. totd2        dd    ?
  88. maxd2        dd    ?
  89. curd2        dd    ?
  90. totd3        dd    ?
  91. maxd3        dd    ?
  92. curd3        dd    ?
  93. .CODE
  94. FT_NOVDMP2      PROC    FAR
  95.  
  96. @SAVE      ds,es,si,di
  97.  
  98. start:        mov    ax, @data
  99.         mov    ds, ax
  100.         mov    es, ax
  101.         mov    si,OFFSET req_buf
  102.         mov    di,OFFSET rep_buf
  103.  
  104. ;; ***   set up the registers
  105.         mov    ah,227
  106.         mov    al,0
  107.  
  108.         int    21h
  109.  
  110. ;; ***   copy to the return variable
  111.  
  112.  
  113. @RESTORE    ds,es,si,di
  114.  
  115.         mov    al,BYTE PTR totd2[1]
  116.         mov    ah,BYTE PTR totd2[0]
  117.         mov    dl,BYTE PTR totd2[3]
  118.         mov    dh,BYTE PTR totd2[2]
  119.  
  120.         mov    bl,byte ptr curd2[1]
  121.         mov    bh,byte ptr curd2[0]
  122.  
  123.         sub    ax,bx
  124.  
  125.         mov    bl,byte ptr curd2[3]
  126.         mov    bh,byte ptr curd2[2]
  127.  
  128.         sbb    dx,bx
  129.         
  130.         push    ax
  131.         push    dx
  132.         call    __RETNL
  133.         add    sp,4
  134.                 ret
  135. FT_NOVDMP2      ENDP
  136.                 END
  137.  
  138.