home *** CD-ROM | disk | FTP | other *** search
-
- ;Include this in your AUTOEXEC,BAT file to enable TSR loading options.
- ;If the ALT key is held down as this executes it will prompt for a
- ;single digit, then set the error level equal to that digit.
- ;You may then use IF ERRORLEVEL and IF NOT ERRORLEVEL to load
- ;certain TSRs and not others for special situations.
- ;Writen in TASM by David Nye in 1990 and released to the public domain.
-
- IDEAL
- MODEL TINY
- CODESEG
- ORG lOOh
-
-
- Start:
- mov ax, cs
- mov ds, ax
- mov ah, 2 ;If ALT key is down,
- int 16h
- and al, 8
- jz Exit
- mov dx, OFFSET message ;Prompt for keypress
- mov ah, 9
- int 21h
- mov ah, 1 ;Get a digit
- int 21h
- sub al, '0'
- Exit:
- mov ah, 4Ch ;Exit with error code = digit
- int 21h
-
- message:
- db 'Enter digit for alternate AUTOEXEC.BAT functions: $'
-
- END Start
-
-