home *** CD-ROM | disk | FTP | other *** search
- ;*****************************************************************************
- ;*
- ;* System Dependent Server Message Handler
- ;* Novell Advanced NetWare 2.1
- ;*
- ;* This program is the CONFIDENTIAL and PROPRIETARY property
- ;* of FairCom(R) Corporation. Any unauthorized use, reproduction or
- ;* transfer of this program is strictly prohibited.
- ;*
- ;* Copyright (c) 1987, 1988, 1989 FairCom Corporation
- ;* (Subject to limited distribution and
- ;* restricted disclosure only.)
- ;* *** ALL RIGHTS RESERVED ***
- ;*
- ;* 4006 West Broadway
- ;* Columbia, MO 65203
- ;*
- ;* ALL RIGHTS RESERVED.
- ;*
- ;* c-tree(R) Version 4.3
- ;* Release C
- ;* February 7, 1989 17:30
- ;*
- ;*
- ;*****************************************************************************
-
- name VAPPreludeModule
-
- SLEEP EQU 1 ; # of ticks to sleep during idle time
- DGROUP GROUP _DATA
- PGROUP GROUP _TEXT
-
- extrn _srvprm:far
-
- assume cs:PGROUP
-
- _TEXT segment public 'CODE'
-
- public NetWareShellServices
- public ProcessControlServices
- public ConsoleControlServices
- public IPXSPXServices
- public _SndESR
- public _RcvESR
- public _killvap
- public _initcomp
- public _display
- public _novshlx
- ; public _spxshl
- public _login
- public _dlayvap
- public _valloc
-
- Signature db 'NWProc'
- NetWareShellServices dd ?
- ProcessControlServices dd ?
- ConsoleControlServices dd ?
- IPXSPXServices dd ?
- VAPConsoleHandler dd ConsoleHandlerCALL
- VAPDownHandler dd DownHandlerCALL
- VAPConsoleOrDownDataSegment dw DGroup
- VAPConnectionRequestFlag dw 0 ;connection
- VAPNameString db 'c-tree Server VAP', 64-($-VAPNameString) dup(0)
- VAPConsoleKeyWordCount dw 2
- VAPKeyword1 db 'REVERSE', 16-($-VAPKeyword1) dup(0)
- VAPKeyword2 db 'STATS', 16-($-VAPKeyword2) dup(0)
- VAPSignOnMessage db 0ah,0dh,0ah
- db ' '
- db 'c-tree(R) Server V4.3 Release C'
- db 0ah,0dh,0
- db 500-($-VAPSignOnMessage) dup(0)
-
- extrn _main: near
- ; extrn _ConsoleHandler: near
- extrn _stopsrvr: near
- ; extrn _ReceiveESR: near
- ; extrn _SendESR: near
-
- VAPStart proc near
- cli
- ; int 3 ;for PFIX debugging purposes
- mov ax, DGroup
- mov di, 1 ;change segment to data (read/write)
- call dword ptr cs:ProcessControlServices
- mov ax, DGroup
- mov ds, ax
- mov es, ax
- mov ss, ax
- mov ax, OFFSET DGROUP:StackEnd
- mov sp, ax
-
- mov ax, SEG _srvprm
- mov di, 1
- call dword ptr cs:ProcessControlServices
-
- sti
-
- xor ax,ax
- push ax
- push ax
- push ax
- call _main
- add sp,6
-
- call _killvap
-
- VAPStart endp
-
- ; Assumes DS point to DGroup
- ; AL number of keyword type to enter the VAP
-
- assume ds: DGroup
-
- _login proc near
- push bp
- mov bp,sp
- push si
- push di
- push es
- push ds
- pop es
- mov si,OFFSET DGROUP:logpak
- mov di,OFFSET DGROUP:logret
- mov ah,0e3h
- call dword ptr cs:NetWareShellServices
- xor ah,ah
- pop es
- pop di
- pop si
- mov sp,bp
- pop bp
- ret
- _login endp
-
- _novshlx proc near
- push bp
- mov bp,sp
- push si
- push di
- push es
- push ds
- ; get input registers
- mov di,word ptr [bp + 4]
- mov es,word ptr [bp + 6]
- mov ax,word ptr es:[di]
- mov bx,word ptr es:[di + 2]
- mov cx,word ptr es:[di + 4]
- mov dx,word ptr es:[di + 6]
- mov si,word ptr es:[di + 8]
- mov di,word ptr es:[di + 0ah]
- push di
- push ax
- ; get ds register
- mov di,word ptr [bp + 12]
- mov es,word ptr [bp + 14]
- mov ax,word ptr es:[di + 6] ; ds register value
- push ax
- pop ds
- pop ax
- pop di
- ; call netware
- call dword ptr cs:NetWareShellServices
- pop ds ; restore ds
- ; get output registers
- push di
- mov di,word ptr [bp + 8]
- mov es,word ptr [bp + 10]
- mov word ptr es:[di],ax
- mov _noverr,ax
- mov word ptr es:[di + 2],bx
- mov word ptr es:[di + 4],cx
- mov word ptr es:[di + 6],dx
- mov word ptr es:[di + 8],si
- pop word ptr es:[di + 0ah]
- jnc novret
- mov ax,1
- jmp novert
- novret:
- xor ax,ax
- mov _noverr,ax
- novert:
- pop es
- pop di
- pop si
- mov sp,bp
- pop bp
- ret
- _novshlx endp
-
- _spxshl proc near
- push bp
- mov bp,sp
- push si
- push di
- push es
- mov di,word ptr [bp+4]
- mov ax,word ptr [di]
- mov bx,word ptr [di + 2]
- mov cx,word ptr [di + 4]
- mov dx,word ptr [di + 6]
- mov si,word ptr [di + 8]
- mov di,word ptr [di + 0ah]
- push ds
- pop es
- call dword ptr cs:IPXSPXServices
- ; int 7ah
- push di
- mov di,word ptr [bp+6]
- mov word ptr [di],ax
- mov _noverr,ax
- mov word ptr [di + 2],bx
- mov word ptr [di + 4],cx
- mov word ptr [di + 6],dx
- mov word ptr [di + 8],si
- pop word ptr [di + 0ah]
-
- pop es
- pop di
- pop si
- mov sp,bp
- pop bp
- ret
- _spxshl endp
-
- _killvap proc near
- mov di,8
- call dword ptr cs:ProcessControlServices
- _killvap endp
-
- _dlayvap proc near
- push bp
- push si
- push di
- mov di,0ah
- mov dx,SLEEP
- call dword ptr cs:ProcessControlServices
- pop di
- pop si
- pop bp
- ret
- _dlayvap endp
-
- _initcomp proc near
- push bp
- push si
- push di
- mov di,7
- call dword ptr cs:ProcessControlServices
- pop di
- pop si
- pop bp
- ret
- _initcomp endp
-
- _display proc near
- push bp
- mov bp,sp
- push si
- push di
-
- mov ax,0ffffH
- push ax
- mov di,word ptr [bp+6] ;text segment
- push di
- mov di,word ptr [bp+4] ;text ptr into di
- push di
- push ax
- push ax
- mov di,1
- call dword ptr cs:ConsoleControlServices
- add sp,10 ; ???? is this necessary ????
-
- pop di
- pop si
- mov sp,bp
- pop bp
- xor ax,ax ;zero return value
- ret
- _display endp
-
- _valloc proc near
- push bp
- mov bp,sp
- push si
- push di
-
- mov ax,word ptr [bp+4] ;paragraph size
- mov di,0h ;allocate segment
- call dword ptr cs:ProcessControlServices
- ; ax contains segment value
- push ax ;save segment
- pop dx ;segment value in dx
- xor ax,ax ;set offset to zero
-
- pop di
- pop si
- mov sp,bp
- pop bp
- ret
- _valloc endp
-
- _RcvESR proc far
- ; push ds
- ; mov ax, DGroup
- ; mov ds, ax
- ; push es
- ; push si
- ; mov ax, OFFSET DGROUP:bmsg
- ; push ax
- ; call _display
- ; add sp,2
- ; call _ReceiveESR
- ; add sp, 4
- ; mov ax, OFFSET DGROUP:amsg
- ; push ax
- ; call _display
- ; add sp,2
- ; pop ds
- ret
- _RcvESR endp
- ;
- _SndESR proc far
- ; push ds
- ; mov ax, DGroup
- ; mov ds, ax
- ; push es
- ; push si
- ; call _SendESR
- ; add sp, 4
- ; pop ds
- ret
- _SndESR endp
-
- ConsoleHandlerCALL proc far
- ; cbw
- ; mov _Keyword, ax
- ; call _ConsoleHandler
- ret
- ConsoleHandlerCALL endp
-
- DownHandlerCALL proc far
- ; call _stopsrvr
- ret
- DownHandlerCALL endp
-
- _TEXT ends
-
-
- ; This is the declaration for the data segment
-
- _DATA SEGMENT word public 'DATA'
- assume ds:DGROUP
- public _vapdat
- public _noverr
-
- _vapdat dd 0
- _noverr dw 0
-
- logpak dw paslen + 1 - funnum ; packet length
- funnum db 20 ; function
- db 00 ; object type
- db 01
- db paslen - objnam ; object name length
- objnam db "CTREEV4-3" ; object name
- paslen db 0 ; password length
-
- logret dw 0
- inbuf db 80 dup (0)
- dw 2000 dup (0)
-
- StackEnd label word
-
- public _Keyword
-
- _Keyword dw 0
-
- _DATA ENDS
-
- end VAPStart
-