home *** CD-ROM | disk | FTP | other *** search
/ Oakland CPM Archive / oakcpm.iso / cpm / sysutl / doslike.lbr / PAUSE.ASM < prev    next >
Encoding:
Assembly Source File  |  1986-07-17  |  1.3 KB  |  50 lines

  1. BDOS    EQU    0005H    ;System Call Location
  2. TPA    EQU    0100H    ;Transient Program Area
  3. BREAK    EQU    3    ;Control Break Key
  4. CHRIN    EQU    1    ;Character Input Function
  5. STOUT    EQU    9    ;String Output Function
  6. LF    EQU    10    ;Line feed
  7. CR    EQU    13    ;Carriage Return
  8. SFF    EQU    17    ;Search for file
  9. DFILE    EQU    19    ;Delete File
  10.     ;
  11. PAUSE    ORG    TPA    ;Program Start Location
  12.     MVI    C,STOUT ;Load Fuction Call
  13.     LXI    D,MSG    ;Load Address of MSG
  14.     CALL    BDOS    ;Call CP/M to Output
  15.     MVI    C,CHRIN ;Load Function Call
  16.     CALL    BDOS    ;Call CP/M to Input
  17.     CPI    BREAK    ;Break Character?
  18.     RNZ        ;Nope
  19.     MVI    C,SFF    ;Search for file
  20.     LXI    D,BAT    ;$$$.SUB file present
  21.     CALL    BDOS    ;Call CP/M to Find
  22.     INR    A    ;manipulate return code
  23.     RZ        ;not batch mode
  24. TERM    LXI    D,PROMPT
  25.     MVI    C,STOUT    ;Prompt to terminate
  26.     CALL    BDOS    ;Call CP/M to Output
  27.     MVI    C,CHRIN    ;Get character
  28.     CALL    BDOS    ;Call CP/M for input
  29.     CALL    UPPC    ;convert to uppercase
  30.     CPI    'N'
  31.     RZ        ;continue
  32.     CPI    'Y'
  33.     JNZ    TERM    ;invalid response
  34.     MVI    C,DFILE    ;Delete file
  35.     LXI    D,BAT    ;$$$.SUB file
  36.     CALL    BDOS    ;Call CP/M for Delete
  37.     RET        ;Return to CP/M Control
  38.     ;
  39. UPPC    CPI    'a'
  40.     RM        ;less than 'a'
  41.     SUI    20H    ;capitalize
  42.     RET
  43.     ;
  44. MSG    DB    'Strike a key when ready . . .$'
  45. BAT    DB    0,'$$$     SUB'
  46. PROMPT    DB    CR,LF,'Terminate Batch Job (Y/N)?$'
  47.     ;
  48.     END
  49.  key when ready . . .$'
  50. BAT    D