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

  1. ; File......: NWTTS1.ASM
  2. ; Author....: James R. Zack
  3. ; CIS ID....: 75410,1567
  4. ; Date......: $Date:   15 Aug 1991 23:07:22  $
  5. ; Revision..: $Revision:   1.2  $
  6. ; Log File..: $Logfile:   E:/nanfor/src/nwtts1.asv  $
  7. ;
  8. ; This is an original work by James R. Zack and is placed in the
  9. ; public domain.
  10. ;
  11. ; Modification history:
  12. ; ---------------------
  13. ;
  14. ; $Log:   E:/nanfor/src/nwtts1.asv  $
  15. ;  
  16. ;     Rev 1.2   15 Aug 1991 23:07:22   GLENN
  17. ;  Forest Belt proofread/edited/cleaned up doc
  18. ;  
  19. ;     Rev 1.1   12 Apr 1991 00:02:54   GLENN
  20. ;  Librarian error!  I changed James' function name, adding the ft_ 
  21. ;  prefix, after testing (error!) and didn't realize that .asm function 
  22. ;  _must_ obey the 10-character limit or the symbol isn't found by the
  23. ;  linker.  Changed the function name to ft_ttsavai() (although calling
  24. ;  it from Clipper the old way will work).  Apologies to all.
  25. ;  
  26. ;     Rev 1.0   01 Apr 1991 01:03:38   GLENN
  27. ;  Nanforum Toolkit
  28. ;  
  29.  
  30.  
  31. ; $DOC$
  32. ; $FUNCNAME$
  33. ;     FT_TTSAVAIL()
  34. ; $CATEGORY$
  35. ;     NetWare
  36. ; $ONELINER$
  37. ;     Check whether default Novell file server supports TTS
  38. ; $SYNTAX$
  39. ;     FT_TTSAVAIL() -> nResult
  40. ; $ARGUMENTS$
  41. ;     None
  42. ; $RETURNS$
  43. ;        0 - TTS unavailable or not supported.
  44. ;        1 - TTS is installed and available.
  45. ;      253 - TTS is disabled.
  46. ; $DESCRIPTION$
  47. ;    This routine is used to check the default NetWare file server for TTS
  48. ;    availability.  You must have Novell NetWare SFT Level II or above to
  49. ;    use these functions.  Using these functions on a non SFT II file server
  50. ;    will return unsuccessful values.  You must have TTS installed on your
  51. ;    file server.
  52. ;
  53. ;    This routine was designed and written for Novell Advanced NetWare 2.15
  54. ;    SFT Level II and Novell NetWare 386 v 3.0 and above.
  55. ;
  56. ;    This source code was written for Microsoft Macro Assembler v5.1.
  57. ; $EXAMPLES$
  58. ;    IF FT_TTSAVAIL() == 1   // If TTS is available
  59. ;      FT_TTSBEGIN()         // Begin transaction
  60. ;    ENDIF
  61. ; $SEEALSO$
  62. ;    FT_TTSABORT() FT_TTSBEGIN() FT_TTSEND() FT_TTSSTAT()
  63. ; $END$
  64.  
  65. PUBLIC      FT_TTSAVAI                    ; Make routine visible
  66.  
  67. EXTRN       __RETNI:FAR                   ; Declare externals
  68. EXTRN       __RET:FAR
  69. _NanFor     SEGMENT 'CODE'
  70.             ASSUME cs:_NanFor             ; Point to my code
  71. FT_TTSAVAI  PROC    FAR
  72.             push    bp                    ; Save Base Pointer
  73.             mov     bp,sp                 ; Point to top of stack
  74.             push    ds                    ; Save registers
  75.             push    es
  76.             push    si
  77.             push    di
  78.             mov     ah,0c7h               ; Novell API function c7
  79.             mov     al,02h                ; Subfunction 02
  80.             int     21h                   ; TTS Is Availible?
  81.             mov     ah,00h                ; Zero out high byte of AX
  82.             push    ax                    ; Push AX onto stack
  83.             call    __RETNI               ; Pass AX back to Clipper
  84.             add     sp,2                  ; Adjust stack
  85.             pop     di                    ; Restore registers
  86.             pop     si
  87.             pop     es
  88.             pop     ds
  89.             pop     bp
  90.             call    __RET                 ; Clean up for Clipper
  91.             ret                           ; Pass control back to Clipper
  92. FT_TTSAVAI  ENDP
  93. _NanFor     ENDS
  94.             END
  95.