home *** CD-ROM | disk | FTP | other *** search
- BDOS EQU 0005H ;System Call Location
- TPA EQU 0100H ;Transient Program Area
- BREAK EQU 3 ;Control Break Key
- CHRIN EQU 1 ;Character Input Function
- STOUT EQU 9 ;String Output Function
- LF EQU 10 ;Line feed
- CR EQU 13 ;Carriage Return
- SFF EQU 17 ;Search for file
- DFILE EQU 19 ;Delete File
- ;
- PAUSE ORG TPA ;Program Start Location
- MVI C,STOUT ;Load Fuction Call
- LXI D,MSG ;Load Address of MSG
- CALL BDOS ;Call CP/M to Output
- MVI C,CHRIN ;Load Function Call
- CALL BDOS ;Call CP/M to Input
- CPI BREAK ;Break Character?
- RNZ ;Nope
- MVI C,SFF ;Search for file
- LXI D,BAT ;$$$.SUB file present
- CALL BDOS ;Call CP/M to Find
- INR A ;manipulate return code
- RZ ;not batch mode
- TERM LXI D,PROMPT
- MVI C,STOUT ;Prompt to terminate
- CALL BDOS ;Call CP/M to Output
- MVI C,CHRIN ;Get character
- CALL BDOS ;Call CP/M for input
- CALL UPPC ;convert to uppercase
- CPI 'N'
- RZ ;continue
- CPI 'Y'
- JNZ TERM ;invalid response
- MVI C,DFILE ;Delete file
- LXI D,BAT ;$$$.SUB file
- CALL BDOS ;Call CP/M for Delete
- RET ;Return to CP/M Control
- ;
- UPPC CPI 'a'
- RM ;less than 'a'
- SUI 20H ;capitalize
- RET
- ;
- MSG DB 'Strike a key when ready . . .$'
- BAT DB 0,'$$$ SUB'
- PROMPT DB CR,LF,'Terminate Batch Job (Y/N)?$'
- ;
- END
- key when ready . . .$'
- BAT D