home *** CD-ROM | disk | FTP | other *** search
/ ftp.barnyard.co.uk / 2015.02.ftp.barnyard.co.uk.tar / ftp.barnyard.co.uk / cpm / walnut-creek-CDROM / CPM / ZCPR / ZCPR-ERA.MOD < prev    next >
Text File  |  2000-06-30  |  797b  |  24 lines

  1. Modification to ZCPR to prompt the user before erasing files.
  2.  
  3. With this modification installed, ZCPR will prompt the user with
  4. 'OK?' after printing the filenames to be erased.  A response of 'y'
  5. or 'Y' will result in the erasure of the files.  Any other character
  6. aborts the ERA command.
  7.  
  8. ERA1:    ;This is the original code.
  9.     CALL    SLOGIN        ;LOG IN SELECTED DISK IF ANY
  10.     XRA    A        ;PRINT ALL FILES (EXAMINE SYSTEM BIT)
  11.     MOV    B,A        ;NO SYS-ONLY OPT TO DIRPR
  12.     CALL    DIRPR        ;PRINT DIRECTORY OF ERASED FILES
  13.  
  14. ;INSERT THE FOLLOWING FOR PROMPT AFTER PRINTING DIRECTORY
  15.  
  16.     MOV    A,E        ;E CONTAINS NUMBER OF ENTRIES PRINTED
  17.     ORA    A
  18.     JZ    RESTRT        ;DON'T PROMPT USER IF NO FILES
  19.     CALL    PRINTC        ;PROMPT USER BEFORE ERASING
  20.     DB    'OK','?'+80H
  21.     CALL    CONIN
  22.     CPI    'Y'        ;IF 'y' OR 'Y' THEN ERASE
  23.     JNZ    RESTRT        ;ELSE DON'T ERASE FILES
  24.