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 / CurrentDir.i < prev    next >
Encoding:
Text File  |  1990-11-16  |  1.1 KB  |  44 lines

  1.      NOLIST
  2. CurrentDir  MACRO              ; 10 Jan 88
  3. *------------------------------; Start of CurrentDir macro.
  4.                                ; Set up D1 for the _LVOCurrentDir function.
  5.      MOVE.L \1,D1
  6.      CallLib CurrentDir,dos    ; Call CurrentDir.
  7.      NOLIST
  8.      IFEQ NARG-2               ; If <OldDirLockName> is specified,
  9.      LIST
  10.                                ; Save the old dir lock under the specified
  11.                                ;  name.
  12.      MOVE.L D0,\2
  13.      NOLIST
  14.      IFND \2
  15.      LIST
  16.      SECTION   BSS_Section,BSS
  17.      CNOP 0,2
  18. \2:
  19.      DS.L 1
  20.      SECTION   "",CODE
  21.      NOLIST
  22.      ENDC
  23.      ENDC
  24.      IFEQ NARG-1
  25.                                ; If <OldDirLockName> is not specified, then
  26.      LIST
  27.      MOVE.L D0,OldDirLock      ; Save the old directory lock at "OldDirLock".
  28.      NOLIST
  29.      IFND OldDirLock
  30.      LIST
  31.      SECTION BSS_Section,BSS
  32.      CNOP 0,2
  33. OldDirLock:
  34.      DS.L 1
  35.      SECTION   "",CODE
  36.      NOLIST
  37.      ENDC
  38.      ENDC
  39.      LIST
  40.      TST.L D0                  ; Make the zero flag indicate if old was root.
  41. *------------------------------; End of CurrentDir macro.
  42.      ENDM
  43.      LIST
  44.