Category : Dbase (Clipper, FoxBase, etc) Languages Source Code
Archive   : DBDISK.ZIP
Filename : DIREXIST.ASM
DIREXIST.ASM--for loading with dBASE 3+--checks for the existence of a given
subdirectory (will not work on root directories, why should it?)
syntax:
memvar='C:\harry' && checking for existence of subdir "harry" on drive c:
load direxist
call direxist with memvar
?memvar
*-----------if C:\harry did *not* exist, you should see:
:\harry
*-----------or if it did exist, you should see:
C:\harry
*Actually, easiest test after CALL is to test for ASC(memvar)=32 since if the
*given subdir did not exist, this routine simply moves a space to the first
*char of the memvar.
******** WARNING **********
I have not tested this extensively. No guarantees or responsibility taken.
Feedback appreciated.
R. Russell Freeland (Synergy Corp.) 305-792-1866 (voice)
Compuserve 76146,371 15:16:18 5/8/1986
/
CODESEG SEGMENT BYTE PUBLIC 'CODE'
assume cs:codeseg,es:codeseg,ds:codeseg
DIREXIST PROC FAR
START:
push ax
push bx
push ds
push es
push dx
push cx
mov dx,bx ;move the offset of our memvar into si
mov ah,4eh ;to set up DOS function call "find first"
mov cx,18d ;look for file with directory attrib.
;will find hidden subdirs, by the way
int 21h ;call DOS
jnc found
mov byte ptr [bx],' ' ;just move in a space if not found
found:
pop cx
pop dx
pop es ;pop the regs back
pop ds
pop bx
pop ax
ret
DIREXIST ENDP
CODESEG ENDS
END START
Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!
This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.
But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/