home *** CD-ROM | disk | FTP | other *** search
-
- { (C) Copyright 1989 David Mutimer }
-
-
- { This program is a very simple demo that is intended to show
-
- the operation of my TP_TSR unit.
-
- The PROCEDURES are :=
-
- set_tsr_scan_code( right_shift : boolean;
- left_shift : boolean;
- control : boolean;
- alt : boolean;
- scan_char : char;) <= must be A..Z
-
- This sets up the key combination to activate your TSR
-
- install_tsr( your_tsr_vector : pointer;
- installed_string : string;
- failed_string : string;)
-
- This installs your TSR, if all goes well this routine will
- write your INSTALLED_STRING to the screen and then exit to dos
-
- This routine will only return if an error is detected in the
- parameters passed to it or it finds itself already installed.
- If there is an error found a message will be written to the screen
- If the routine detects it has been previously installed then your
- FAILED_STRING will be written to the screen. }
-
-
-
- {$M 2048,0,0 } { heap max allocation to avoid using all memory }
-
-
-
-
- {$ifdef VER40}
- uses crt,dos,tp4_tsr;
- {$endif}
- { Use the the correct unit for your compiler }
- {$ifdef VER50}
- uses crt,dos,tp5_tsr;
- {$endif}
-
-
- procedure Your_tsr;
- interrupt; { Must be specified as interrupt }
- begin
- sound(1000);
- delay(250); { TSR consists of a short beep }
- nosound;
- end;
-
- begin
- { Set up the scan code as <alt> <left_shift> <Q> }
- set_tsr_scan_code(false,true,false,true,'Q');
-
- install_tsr(@Your_tsr,'Installing the TP_TSR demo ','Demo already installed');
- writeln('This line can only be executed if installation fails');
- end.