     NOLIST
CreateDir   MACRO              ; 14 Jan 88
*------------------------------; Start of CreateDir macro.
     NOLIST
     IFC '\2','I'              ; If <PointerToDirName> is specified, then
     LIST
                               ; Put <PointerToDirName> in D1.
     MOVE.L #\3,D1
     NOLIST
     ENDC
     IFC '\2','D'              ; If <DirName> is specified, then
     LIST
                               ; Make D1 point to the directory name string.
     MOVE.L #\3.str,D1
     NOLIST
     IFND \3.str               ; Unless it was previously defined,
     LIST
     SECTION DataSection,DATA  ; The ASCII directory name string goes here.
\3.str:
     DC.B '\3',0
     CNOP 0,2
     SECTION   "",CODE
     NOLIST
     ENDC
     ENDC
     LIST
     CallLib CreateDir,dos     ; Call CreateDir to create the directory.
                               ; Put the dir read lock at <DirLockName>.
     MOVE.L D0,\1
     SECTION   BSS_Section,BSS
     CNOP 0,2
\1:
     DS.L 1                    ; This is the location of <DirLockName>.
     SECTION   "",CODE
     TST.L D0                  ; Make the zero flag indicate failure.
*------------------------------; End of CreateDir macro.
     ENDM
     LIST
