home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The C Users' Group Library 1994 August
/
wc-cdrom-cusersgrouplibrary-1994-08.iso
/
listings
/
v_01_07
/
1n07075a
< prev
next >
Wrap
Text File
|
1990-11-07
|
967b
|
37 lines
;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