home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c004 / 4.ddi / NETBIOS / CTAMSGXA.ASM < prev    next >
Encoding:
Assembly Source File  |  1989-04-18  |  2.1 KB  |  92 lines

  1.     page ,132
  2.  
  3. comment !
  4.  *    server extension version of c-tree server
  5.  *    application interface asm support
  6.  *
  7.  *    This program is the CONFIDENTIAL and PROPRIETARY property 
  8.  *    of FairCom(R) Corporation. Any unauthorized use, reproduction or
  9.  *    transfer of this program is strictly prohibited.
  10.  *
  11.  *      Copyright (c) 1987, 1988, 1989 FairCom Corporation
  12.  *    (Subject to limited distribution and
  13.  *     restricted disclosure only.)
  14.  *    *** ALL RIGHTS RESERVED ***
  15.  *
  16.  *    4006 West Broadway
  17.  *    Columbia, MO 65203
  18.  *
  19.  *
  20.  *    c-tree(R)    Version 4.3
  21.  *            Release C
  22.  *            February 7, 1989 17:30
  23.  *
  24. !
  25.  
  26.  
  27.     include    asm.inc
  28.  
  29.  
  30.  
  31. ;----------------------------------------------------------------
  32. ;UCOUNT get_redir_entry(ndx,netnamebuf,devnamebuf,tid,maxsz,ses)
  33. ;----------------------------------------------------------------
  34. ;UCOUNT ndx;        /* redirection index */
  35. ;UTEXT far *netnamebuf;    /* where to ret "\\servername\resource" */
  36. ;UTEXT far *devnamebuf;    /* where to ret name of redirected device */
  37. ;UCOUNT far *tid;    /* where to ret connect id */
  38. ;UCOUNT far *maxsz;    /* where to ret max msg size */
  39. ;UCOUNT far *ses;    /* where to ret session number */
  40. ;
  41. ;returns 0 if no error, else dos error code
  42. ;err code 18 is returned on end-of-list
  43. ;
  44. ;this is done in asm lang instead of c because the intdosx function
  45. ;in the library doesn't support passingh parms in the bp register
  46. ;
  47. ;note: dos call 5f05 is same as 5f02 plus, on return:
  48. ;    ax = tree connect id
  49. ;    dx = max size of smb message
  50. ;    bp = netbios session for connection
  51. ;    
  52. ;----------------------------------------------------------------
  53.  
  54. ;parms on stack
  55. __ndx = 6
  56. __netnamebuf = 8
  57. __devnamebuf = 12
  58. __tid = 16
  59. __maxsz = 20
  60. __ses = 24
  61.  
  62.  
  63.     public _get_redir_entry
  64. _get_redir_entry proc far
  65.     push    bp
  66.     mov    bp,sp
  67.     PUSHM    <si,di,ds>
  68.     lds    si,DWO [bp+__devnamebuf]
  69.     les    di,DWO [bp+__netnamebuf]
  70.     mov    bx,[bp+__ndx]
  71.     push    bp
  72.     mov    ax,5f05h
  73.     int    21h
  74.     mov    di,bp
  75.     pop    bp
  76.     lds    si,DWO [bp+__tid]
  77.     mov    [si],ax
  78.     lds    si,DWO [bp+__maxsz]
  79.     mov    [si],dx
  80.     lds    si,DWO [bp+__ses]
  81.     mov    [si],di
  82.     mov    ax,0
  83.     jnc    gre1
  84.     dec    ax            ;ret -1 if err
  85. gre1:    POPM    <ds,di,si>
  86.     pop    bp
  87.     ret
  88. _get_redir_entry endp
  89.  
  90.     END_MOD
  91.     end
  92.