home *** CD-ROM | disk | FTP | other *** search
- ;
- ; Message Base Reply Chain Linker
- ;
- ; This module was originally written by Bob Hartman
- ; Sysop of FidoNet node 1:132/101
- ;
- ; Spark Software, 427-3 Amherst St, CS 2032, Suite 232, Nashua, NH 03061
- ;
- ; This program source code is being released with the following provisions:
- ;
- ; 1. You are free to make changes to this source code for use on your own
- ; machine, however, altered source files may not be distributed without the
- ; consent of Spark Software.
- ;
- ; 2. You may distribute "patches" or "diff" files for any changes that you
- ; have made, provided that the "patch" or "diff" files are also sent to Spark
- ; Software for inclusion in future releases of the entire package. A "diff"
- ; file for the source archives may also contain a compiled version, provided
- ; it is clearly marked as not being created from the original source code.
- ; No other executable versions may be distributed without the consent of
- ; Spark Software.
- ;
- ; 3. You are free to include portions of this source code in any program you
- ; develop, providing: a) Credit is given to Spark Software for any code that
- ; may is used, and b) The resulting program is free to anyone wanting to use
- ; it, including commercial and government users.
- ;
- ; 4. There is NO technical support available for dealing with this source
- ; code, or the accompanying executable files. This source code is provided
- ; as is, with no warranty expressed or implied (I hate legalease). In other
- ; words, if you don't know what to do with it, don't use it, and if you are
- ; brave enough to use it, you're on your own.
- ;
- ; Spark Software may be contacted by modem at (603) 888-8179 (node 1:132/101)
- ; on the public FidoNet network, or at the address given above.
- ;
-
- .xlist
- page 64,132
-
- title FileDir
- subttl by Bob Hartman
-
- name FileDir
- ;
- ;
- ;
- ; The following macro files come with the MicroSoft "C" compiler
- ;
- include version.inc
- include msdos.inc
- include cmacros.inc
-
- .sall
- .list
- ;
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
- sBegin data
-
- fdir_buffer DW 016H DUP (?)
-
- sEnd
-
- sBegin code
-
- assumes cs,code
- assumes ds,data
-
- EXTRN _strcpy:NEAR
-
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
- cProc filedir,<PUBLIC>
-
- parmDP origname
- parmW times
- parmDP ret_str
- parmW mode
-
- cBegin
-
- ; First set up the DTA
- mov dx,OFFSET DGROUP:fdir_buffer
- mov ah,1ah
- int 21h
-
- ; Now set up for a find_first operation
- sub bx,bx
- mov cx,mode
- mov dx,origname
- mov ah,4eh
-
- ; Is it supposed to be a find_next?
- cmp WORD PTR times,0
- je do_find_first
- mov ah,4fh
-
- do_find_first:
- int 21h
- jnc fd_no_err
-
- ; If we had an error, return null strings
- mov BYTE PTR fdir_buffer+30,0
- mov BYTE PTR fdir_buffer+21,0
-
- fd_no_err:
-
- ; Now copy in the result
- mov ax,OFFSET DGROUP:fdir_buffer+30
- push ax
- push WORD PTR ret_str
- call _strcpy
- add sp,4
- mov al,BYTE PTR fdir_buffer+21
- sub ah,ah
-
- cEnd
-
- sEnd
- end