home *** CD-ROM | disk | FTP | other *** search
/ The CDPD Public Domain Collection for CDTV 3 / CDPDIII.bin / pd / programming / assembler / thesource / volume2 / source / system / asmmacros.lha / ParentDir.i < prev    next >
Encoding:
Text File  |  1990-11-16  |  1.0 KB  |  31 lines

  1.      NOLIST
  2. ParentDir   MACRO              ; 10 Jan 88
  3. *------------------------------; Start of ParentDir macro.
  4.      NOLIST
  5.      IFEQ NARG-2               ; If <FileLockName> is given, then
  6.      LIST
  7.                                ; Get the file lock from <FileLockName>.
  8.      MOVE.L \2,D1
  9.      NOLIST
  10.      ENDC
  11.      IFEQ NARG-1               ; If <FileLockName> is not given, then
  12.      LIST
  13.      MOVE.L D0,D1              ; Use the file lock given in D0.
  14.      NOLIST
  15.      ENDC
  16.      LIST
  17.      CallLib ParentDir,dos     ; Call ParentDir.
  18.                                ; Save the parent directory lock at the named
  19.                                ;  location.
  20.      MOVE.L D0,\1
  21.      SECTION   BSS_Section,BSS
  22.      CNOP 0,2
  23. \1:
  24.      DS.L 1                    ; This is the location of <ParentDirLockName>.
  25.      SECTION   "",CODE
  26.      TST.L D0                  ; Make the zero flag indicate if parent dir
  27.                                ;  was the root.
  28. *------------------------------; End of ParentDir macro.
  29.      ENDM
  30.      LIST
  31.