home *** CD-ROM | disk | FTP | other *** search
- /******************************************
- * TSR.C *
- * Copyright TimeSlice, Inc. 1985, 86, 87. *
- ******************************************/
-
- #define FLAG 0
- #define PSP 1
- #define SIZE 3
-
- /***
- * TSR()
- * Terminate and Stay Resident.
- ***/
- void tsr() {
- char tpa[ 5 ] ; /*MS-DOS memory arena block header*/
-
- struct {
- unsigned ax, bx, cx, dx, si, di, flags;
- } regs;
-
- regs.ax = 0x6200; /*get Prog Seg Prefix*/
- intdos( ®s, ®s );
- peek( regs.bx - 1, 0, tpa, sizeof(tpa) );
- regs.ax = 0x3100;
- regs.dx = *(int *)(tpa + SIZE) ;
- int86( 0x21, ®s, ®s );
- }
-
-
-
-
-