                      dBASE Subdirectories
             (PC World Star-Dot-Star November 1986)

     Subdirectories make organizing your hard disk a breeze because
you can put related data and programs into logical places.  dBASE III
Plus lacks a simple command to change the current directory.
     It's possible to use the command RUN CD path to accommodate this
end, but that requires additional memory, plus extra time to load the
DOS command interpreter.  Fortunately, dBASE III Plus can easily load
and execute assembly language programs.  CD.PRG and CD.BIN use this
feature to change the current directory.  CD.PRG closes any open data
files, loads the assembly language program CD.BIN into memory,
transfers control to CD.BIN, then eliminates CD.BIN from memory and
returns control to the calling program.
     Use DEBUG to create CD.BIN as shown below.  Store both CD.PRG and
CD.BIN in the same subdirectory that contains dBASE III Plus.  To use
the programs, simply issue the command DO CD WITH path, replacing path
with the appropriate subdirectory specification.

* CD.PRG
parameter dir
close databases
load cd
call cd with dir
? 'Directory now changed to ',dir
release cd
return

CD.BIN:
A>DEBUG
-A 100
XXXX:0100 MOV DX,BX
XXXX:0102 MOV AX,3B00
XXXX:0105 INT 21
XXXX:0107 RETF
XXXX:0108
-N CD.BIN
CX 0000
:8
-W
-Q
