home *** CD-ROM | disk | FTP | other *** search
- Page 58,132
- ;*******************************************************
- ;*..LAST UPDATE-DATE : 08/11/85 ......TIME : 11:45:12..*
- ;* *
- ;* VERSION: 1.2 *
- ;* *
- ;* MODULE NAME: NETWORK.ASM Language Interface *
- ;* *
- ;* DESCRIPTION: Netware interface drivers *
- ;* *
- ;* **** Data Light C Interface **** *
- ;* *
- ;* INPUTS: Refer to individual procedures. *
- ;* *
- ;* *
- ;* RETURNS (OUTPUTS) Refer to individual procedures. *
- ;* *
- ;*******************************************************
-
- include macros.asm
-
- begcode network
-
- ;--------------------------------
- ; Logout System func(215) (D7H)
- ;
- ; sysout();
- ;
- public sysout
-
- func sysout
- mov ah,0D7H
- callm arg0
- sysout endp
-
-
- ;--------------------------------
- ; WorkStation ID func(220) (DCH)
- ; returns hex number only
- ; int ws_no;
- ;
- ; ws_no = wsid();
- ;
- public wsid
-
- func wsid
- mov ah,0DCH
- int 21h
- mov ah,0
- ret
- wsid endp
-
-
-
- ;--------------------------------
- ; Attach to File Server func(F1h)
- ; returns 0 on completion
- ;
- ; attach(entry);
- ; int entry;
- ;
- public attach
-
- func attach
- push bp
- mov bp,sp
- mov dx,P[bp]
- mov al,00h
- mov ah,0F1h
- int 21h
- mov ah,0
- pop bp
- ret
- attach endp
-
-
- ;--------------------------------
- ; Attach to File Server func(F1h)
- ; returns 0 on completion
- ;
- ; detach(entry);
- ; int entry;
- ;
- public detach
-
- func detach
- push bp
- mov bp,sp
- mov dx,P[bp]
- mov al,01h
- mov ah,0F1h
- int 21h
- mov ah,0
- pop bp
- ret
- detach endp
-
-
- ;--------------------------------
- ; Attach to File Server func(F1h)
- ; returns 0 on completion
- ;
- ; logout(entry);
- ; int entry;
- ;
- public logout
-
- func logout
- push bp
- mov bp,sp
- mov dx,P[bp]
- mov al,02h
- mov ah,0F1h
- int 21h
- mov ah,0
- pop bp
- ret
- logout endp
-
-
- ;--------------------------------
- ; Set Error mode func(221) (DDH)
- ;
- ; int mode;
- ;
- ; Err_Mode(mode);
- ;
- public Err_Mode
-
- func err_mode
- mov ah,0DDH
- callm arg1
- err_mode endp
-
-
- ;--------------------------------
- ; Brodcast Mode func(222) (DEH)
- ;
- ; int mode;
- ;
- ; bcs_mode(mode);
- ;
- public bcs_mode
-
- func bcs_mode
- mov ah,0DEH
- callm arg1
- bcs_mode endp
-
-
- ;--------------------------------
- ; Modify LST Device func(223) (DFH)
- ;
- ; int mode;
- ;
- ; ctlspl(mode);
- ;
- public ctlspl
-
-
- func ctlspl
- mov ah,0DFh
- callm arg1
- ctlspl endp
-
-
- ;--------------------------------
- ; Spool Request func(224) (E0H)
- ;
- ; char reqblk[],retblk[];
- ;
- ; splreq(reqblk,reply);
- ;
- public splreq
-
- func splreq
- mov ah,0E0h
- push bp
- mov bp,sp
- push ds
- pop es
- mov si,P[bp]
- mov di,P+2[bp]
- int 21h
- mov ah,0
- pop bp
- ret
- splreq endp
-
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ;
- ; GET SHELL TABLE ADDRESSES EF
- ;
- ; int TableReq, *TableSeg, *TableOff;
- ;
- ; GetSta(TableReq,TableSeg,TableOff);
- ;
- public getsta
-
- func getsta
- push bp
- mov bp,sp
- .push <es>
- mov ax,P[bp] ;AL = Shell Status
- mov ah,0EFh ;Table Request Code
- int 21h
-
- mov bx,P+2[bp]
- mov [bx],es ;store Shell Status Table Seg
- mov bx,P+4[bp]
- mov [bx],si ;store Shell Status Table Off
- .pop <es>
- pop bp
- ret
-
- getsta endp
-
- ;--------------------------------
- ; Login system func(227) (E3H)
- ;
- ; int ret_code
- ; char reqblk[],retblk[];
- ;
- ; ret_code = syslog(reqblk,reply);
- ;
- public syslog
-
-
- func syslog
- push bp
- mov bp,sp
- push ds
- pop es
- mov si,P[bp]
- mov di,P+2[bp]
- mov ah,0E3h
- int 21h
- mov ah,0
- pop bp
- ret
- syslog endp
-
- ;--------------------------------
- ; Network Communications func(225) (E1H)
- ;
- ; int ret_code
- ; char reqblk[],retblk[];
- ;
- ; ret_code = net_comm(reqblk,reply);
- ;
- public net_comm
-
-
- func net_comm
- push bp
- mov bp,sp
- push ds
- pop es
- mov si,P[bp]
- mov di,P+2[bp]
- mov ah,0E1h
- int 21h
- mov ah,0
- pop bp
- ret
- net_comm endp
-
- ;--------------------------------
- ; get time / date string func(231) (E7H)
- ;
- ; char tod_date; /* Y M D H M S Weekday */
- ;
- ; tod_date = net_tod(&time);
- ;
- public net_tod
-
- func net_tod
- mov ah,0E7h
- push bp ; save the base pointer
- mov bp,sp ; bp gets the sp address
- mov dx,P[bp] ; dx gets the ptr
- int 21h ; dos call
- mov ah,0 ; clear ah for al return
- pop bp
- ret
- net_tod endp
-
- ;--------------------------------
- ; Shell Base Status func(233) (E9H)
- ;
- ; int drive;
- ;
- ; map = drv_map(drive);
- ;
- public drv_map
-
- func drv_map
- push bp ; save the base pointer
- mov bp,sp ; bp gets the sp address
- mov dx,P[bp] ; dx gets arg. (or ptr)
- mov ax,0E900h
- int 21h ; dos call
- pop bp
- ret ; ret & reset stack
- drv_map endp
-
-
-
- ;--------------------------------
- ; Return Shell Version func(234) (EAH)
- ;
- ; int retshl, mode
- ;
- ; ret_code = ret_shl(mode);
- ;
- public ret_shl
-
- func ret_shl
- push bp ; save the base pointer
- mov bp,sp ; bp gets the sp address
- mov ax,P[bp]
- mov ah,0EAh
- int 21h ; dos call
- mov ah,0 ; clear ah for al return
- pop bp
- ret ; return and reset stack
- ret_shl endp
-
-
-
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ;
- ; Get Physical Station Number EEH
- ;
- ; Get_PSN();
- ;
- public Get_PSN
-
- func get_psn
- mov ah,0C3h
- int 21h
- mov ah,0
- ret
-
- get_psn endp
-
-
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ;
- ; SET PREFERRED FILE SERVER F0H
- ;
- ;
- ; int SelectedFS,PreferredFS,SelCode;
- ;
- ; SelectedFS = SetServ(SelCode,PreferredFS);
- ;
- ;
- public SetServ
-
- func setserv
- push bp
- mov bp,sp
- mov ax,P[bp] ;AL = Mode
- mov dx,P+2[bp] ;DL = FS
-
- mov ah,0F0h
- int 21h
- mov ah,0
- pop bp
- ret
- setserv endp
-
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ;
- ; ATTACH/DETACH TO FILE SERVER F0H
- ;
- ;
- ; int CompCode,PreferredFS,SelCode;
- ;
- ; CompCode = ModServ(SelCode,PreferredFS);
- ;
- ;
- public ModServ
-
- func modserv
- push bp
- mov bp,sp
- mov ax,P[bp] ;AL = Mode
- mov dx,P+2[bp] ;DL = FS
-
- mov ah,0F0h
- int 21h
- mov ah,0
- pop bp
- ret
- modserv endp
-
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ;
- ; NETWORK FILE COPY F3H
- ;
- ;
- ; int source,dest;
- ; long s_offset,d_offset;
- ; long number;
- ;
- ; ret = ncopy(source,dest,s_offset,d_offset,number);
- ;
- ; ret = number of bytes copied
- ;
- public ncopy
-
- func ncopy
- push bp
- mov bp,sp
- mov di,bp
- add di,04h ;ES:DI = Address of request string
-
- mov ah,0F3h
- int 21h
-
- tst al ;If al != 0 error occurred
- jne ncopy1
- mov ax,cx
- mov dx,dx
- pop bp
- ret
- ncopy1: mov ax,-1 ;Indicate an error
- mov bx,ax
- pop bp
- ret
-
- ncopy endp
-
- ;--------------------------------
- ; Directory Request func(226) (E2H)
- ;
- ; int ret_code
- ; char reqblk[],retblk[];
- ;
- ; ret_code = dir_req(reqblk,reply);
- ;
- public dir_req
-
-
- func dir_req
- push bp
- mov bp,sp
- push ds
- pop es
- mov si,P[bp]
- mov di,P+2[bp]
- mov ah,0E2h
- int 21h
- mov ah,0
- pop bp
- ret
- dir_req endp
-
- ;---------------------------------------
- ; process but expect no arguments
- ;
- func arg0
- int 21h
- mov ah,0
- ret
- arg0 endp
-
-
- ;--------------------------------
- ; Process a single argument in a
- ; function call....
-
- func arg1
- push bp ; save the base pointer
- mov bp,sp ; bp gets the sp address
- mov dx,P[bp] ; dx gets the arg (or ptr)
- int 21h ; dos call
- mov ah,0 ; clear ah for al return
- pop bp
- ret ; return and reset stack
- arg1 endp
-
- ;--------------------------------
- ; Process a single double sized argument in a
- ; function call if using the large data model
-
- func arg2
- push bp ; save the base pointer
- mov bp,sp ; bp gets the sp address
- mov dx,P[bp] ; dx gets the arg (or ptr)
- int 21h ; dos call
- mov ah,0 ; clear ah for al return
- pop bp
- ret
- arg2 endp
-
- endcode network
-
- end
-