home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c004 / 3.ddi / NOVELL / CTVAPFS.ASM < prev    next >
Encoding:
Assembly Source File  |  1989-04-18  |  5.9 KB  |  330 lines

  1. ;*****************************************************************************
  2. ;*
  3. ;*    System Dependent Server Message Handler
  4. ;*    Novell Advanced NetWare 2.1
  5. ;*
  6. ;*    This program is the CONFIDENTIAL and PROPRIETARY property 
  7. ;*    of FairCom(R) Corporation. Any unauthorized use, reproduction or
  8. ;*    transfer of this program is strictly prohibited.
  9. ;*
  10. ;*      Copyright (c) 1987, 1988, 1989 FairCom Corporation
  11. ;*    (Subject to limited distribution and
  12. ;*     restricted disclosure only.)
  13. ;*    *** ALL RIGHTS RESERVED ***
  14. ;*
  15. ;*    4006 West Broadway
  16. ;*    Columbia, MO 65203
  17. ;*
  18. ;*    ALL RIGHTS RESERVED.
  19. ;*
  20. ;*    c-tree(R)    Version 4.3
  21. ;*            Release C
  22. ;*            February 7, 1989 17:30
  23. ;*
  24. ;*
  25. ;*****************************************************************************
  26.  
  27.     name    VAPPreludeModule
  28.  
  29. SLEEP    EQU    1    ; # of ticks to sleep during idle time
  30. DGROUP    GROUP    _DATA
  31. PGROUP    GROUP    _TEXT
  32.     assume cs:PGROUP
  33.  
  34. _TEXT    segment public 'CODE'
  35.  
  36.     public    NetWareShellServices
  37.     public    ProcessControlServices
  38.     public     ConsoleControlServices
  39.     public    IPXSPXServices
  40.     public    _SndESR
  41.     public    _RcvESR
  42.     public    _killvap
  43.     public    _initcomp
  44.     public    _display
  45.     public    _novshl
  46.     public    _spxshl
  47.     public    _login
  48.     public    _dlayvap
  49.  
  50.     Signature            db    'NWProc'
  51.     NetWareShellServices        dd    ?
  52.     ProcessControlServices        dd    ?
  53.     ConsoleControlServices        dd    ?
  54.     IPXSPXServices            dd    ?
  55.     VAPConsoleHandler        dd    ConsoleHandlerCALL
  56.     VAPDownHandler            dd    DownHandlerCALL
  57.     VAPConsoleOrDownDataSegment    dw    DGroup
  58.     VAPConnectionRequestFlag    dw    0        ;connection
  59.     VAPNameString            db    'c-tree Server VAP', 64-($-VAPNameString) dup(0)
  60.     VAPConsoleKeyWordCount        dw    2
  61.     VAPKeyword1            db    'REVERSE', 16-($-VAPKeyword1) dup(0)
  62.     VAPKeyword2            db    'STATS', 16-($-VAPKeyword2) dup(0)
  63.     VAPSignOnMessage        db    0ah,0dh,0ah
  64.                     db    '               '
  65.                     db    'c-tree(R) Server V4.3 Release C'
  66.                     db    0ah,0dh,0
  67.                     db    500-($-VAPSignOnMessage) dup(0)
  68.  
  69.     extrn    _main: near
  70. ;    extrn    _ConsoleHandler: near
  71.     extrn    _stopsrvr: near
  72. ;    extrn    _ReceiveESR: near
  73. ;    extrn    _SendESR: near
  74.  
  75. VAPStart    proc    near
  76.     cli
  77. ;    int    3            ;for PFIX debugging purposes
  78.     mov    ax, DGroup
  79.     mov    di, 1            ;change segment to data (read/write)
  80.     call     dword ptr cs:ProcessControlServices
  81.     mov    ax, DGroup
  82.     mov    ds, ax
  83.     mov    es, ax
  84.     mov    ss, ax
  85.     mov    ax, OFFSET DGROUP:StackEnd
  86.     mov    sp, ax
  87.     sti
  88.  
  89.     xor    ax,ax
  90.     push    ax
  91.     push    ax
  92.     call    _main
  93.     add    sp,4
  94.  
  95.     call    _killvap
  96.  
  97. VAPStart    endp
  98.  
  99. ;    Assumes        DS point to DGroup
  100. ;            AL number of keyword type to enter the VAP
  101.  
  102.     assume    ds: DGroup
  103.  
  104. _login    proc    near
  105.     push    bp
  106.     mov    bp,sp
  107.     push    si
  108.     push    di
  109.     push    es
  110.     push    ds
  111.     pop    es
  112.     mov    si,OFFSET DGROUP:logpak
  113.     mov    di,OFFSET DGROUP:logret
  114.     mov    ah,0e3h
  115.     call    dword ptr cs:NetWareShellServices
  116.     xor    ah,ah
  117.     pop    es
  118.     pop    di
  119.     pop    si
  120.     mov    sp,bp
  121.     pop    bp
  122.     ret
  123. _login    endp
  124.  
  125. _novshl    proc    near
  126.     push    bp
  127.     mov    bp,sp
  128.     push    si
  129.     push    di
  130.     mov    di,word ptr [bp+4]
  131.     mov    ax,word ptr [di]
  132.     mov    bx,word ptr [di + 2]
  133.     mov    cx,word ptr [di + 4]
  134.     mov    dx,word ptr [di + 6]
  135.     mov    si,word ptr [di + 8]
  136.     mov    di,word ptr [di + 0ah]
  137.     call    dword ptr cs:NetWareShellServices
  138.     push    di
  139.     mov    di,word ptr [bp+6]
  140.     mov    word ptr [di],ax
  141.     mov    _noverr,ax
  142.     mov    word ptr [di + 2],bx
  143.     mov    word ptr [di + 4],cx
  144.     mov    word ptr [di + 6],dx
  145.     mov    word ptr [di + 8],si
  146.     pop    word ptr [di + 0ah]
  147.     jnc    novret
  148.     mov    ax,1
  149.     jmp    novert
  150. novret:
  151.     xor    ax,ax
  152.     mov    _noverr,ax
  153. novert:
  154.     pop    di
  155.     pop    si
  156.     mov    sp,bp
  157.     pop    bp
  158.     ret
  159. _novshl    endp
  160.  
  161. _spxshl    proc    near
  162.     push    bp
  163.     mov    bp,sp
  164.     push    si
  165.     push    di
  166.     push    es
  167.     mov    di,word ptr [bp+4]
  168.     mov    ax,word ptr [di]
  169.     mov    bx,word ptr [di + 2]
  170.     mov    cx,word ptr [di + 4]
  171.     mov    dx,word ptr [di + 6]
  172.     mov    si,word ptr [di + 8]
  173.     mov    di,word ptr [di + 0ah]
  174.     push    ds
  175.     pop    es
  176.     call    dword ptr cs:IPXSPXServices
  177. ;    int    7ah
  178.     push    di
  179.     mov    di,word ptr [bp+6]
  180.     mov    word ptr [di],ax
  181.     mov    _noverr,ax
  182.     mov    word ptr [di + 2],bx
  183.     mov    word ptr [di + 4],cx
  184.     mov    word ptr [di + 6],dx
  185.     mov    word ptr [di + 8],si
  186.     pop    word ptr [di + 0ah]
  187.  
  188.     pop    es
  189.     pop    di
  190.     pop    si
  191.     mov    sp,bp
  192.     pop    bp
  193.     ret
  194. _spxshl    endp
  195.  
  196. _killvap    proc    near
  197.     mov    di,8
  198.     call    dword ptr cs:ProcessControlServices
  199. _killvap    endp
  200.  
  201. _dlayvap    proc    near
  202.     push    bp
  203.     push    si
  204.     push    di
  205.     mov    di,0ah
  206.     mov    dx,SLEEP
  207.     call    dword ptr cs:ProcessControlServices
  208.     pop    di
  209.     pop    si
  210.     pop    bp
  211.     ret
  212. _dlayvap    endp
  213.  
  214. _initcomp    proc    near
  215.     push    bp
  216.     push    si
  217.     push    di
  218.     mov    di,7
  219.     call    dword ptr cs:ProcessControlServices
  220.     pop    di
  221.     pop    si
  222.     pop    bp
  223.     ret
  224. _initcomp    endp
  225.  
  226. _display    proc    near
  227.     push    bp
  228.     mov    bp,sp
  229.     push    si
  230.     push    di
  231.     
  232.     mov    ax,0ffffH
  233.     push    ax
  234.     push    ds
  235.     mov    di,word ptr [bp+4]    ;text ptr into di
  236.     push    di
  237.     push    ax
  238.     push    ax
  239.     mov    di,1
  240.     call    dword ptr cs:ConsoleControlServices
  241.     add    sp,10            ; ???? is this necessary ????
  242.  
  243.     pop    di
  244.     pop    si
  245.     mov    sp,bp
  246.     pop    bp
  247.     xor    ax,ax            ;zero return value
  248.     ret
  249. _display    endp
  250.  
  251.  
  252. _RcvESR    proc    far
  253. ;    push    ds
  254. ;    mov    ax, DGroup
  255. ;    mov    ds, ax
  256. ;    push    es
  257. ;    push    si
  258. ;    mov    ax, OFFSET DGROUP:bmsg
  259. ;    push    ax
  260. ;    call    _display
  261. ;    add    sp,2
  262. ;    call    _ReceiveESR
  263. ;    add    sp, 4
  264. ;    mov    ax, OFFSET DGROUP:amsg
  265. ;    push    ax
  266. ;    call    _display
  267. ;    add    sp,2
  268. ;    pop    ds
  269.     ret
  270. _RcvESR    endp
  271. ;
  272. _SndESR    proc    far
  273. ;    push    ds
  274. ;    mov    ax, DGroup
  275. ;    mov    ds, ax
  276. ;    push    es
  277. ;    push    si
  278. ;    call    _SendESR
  279. ;    add    sp, 4
  280. ;    pop    ds
  281.     ret
  282. _SndESR    endp
  283.  
  284. ConsoleHandlerCALL    proc    far
  285. ;    cbw
  286. ;    mov    _Keyword, ax
  287. ;    call    _ConsoleHandler
  288.     ret
  289. ConsoleHandlerCALL    endp
  290.  
  291. DownHandlerCALL            proc    far
  292. ;    call    _stopsrvr
  293.     ret
  294. DownHandlerCALL        endp
  295.  
  296. _TEXT    ends
  297.  
  298.  
  299. ;    This is the declaration for the data segment
  300.  
  301. _DATA    SEGMENT word public 'DATA'
  302.     assume ds:DGROUP
  303.     public    _vapdat
  304.     public    _noverr
  305.  
  306. _vapdat    dd    0
  307. _noverr    dw    0
  308.  
  309. logpak    dw    paslen + 1 - funnum    ; packet length
  310. funnum    db    20            ; function
  311.     db    00            ; object type
  312.     db    01
  313.     db    paslen - objnam        ; object name length
  314. objnam    db    "CTREEV4-3"        ; object name
  315. paslen    db    0            ; password length
  316.  
  317. logret    dw    0
  318. inbuf    db    80 dup (0)
  319.     
  320.     dw    2000 dup (0)
  321.     StackEnd    label     word
  322.  
  323.     public    _Keyword
  324.  
  325.     _Keyword    dw     0
  326.  
  327. _DATA    ENDS
  328.  
  329.     end    VAPStart
  330.