home *** CD-ROM | disk | FTP | other *** search
/ Turbo Toolbox / Turbo_Toolbox.iso / 1988 / 05 / t3_tsr / merker.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1988-02-24  |  2.0 KB  |  69 lines

  1. (* ------------------------------------------------------ *)
  2. (*                      MERKER.PAS                        *)
  3. (*  TSR-Routine, die es ermöglicht, im Turbo Pascal-Edi-  *)
  4. (*  tor Sprungmarken für die Quellcode-Bearbeitung zu     *)
  5. (*  setzen.                                               *)
  6. (*  <c> 1988 by Johannes Kiefer & PASCAL International    *)
  7.  
  8. PROGRAM merker;
  9.  
  10. {$C- }
  11. {$I REGS8088.INC }
  12. {$I SCAN.INC}
  13.  
  14. CONST
  15.   TSR_Int  = $60;
  16.   Regs : Regs8088_ = (Ax:0;Bx:0;Cx:0;Dx:0;Bp:0;Si:0;Di:0;
  17.                       Ds:0;Es:0;Flags:0);
  18.   TSRDseg : INTEGER = 0;
  19.   TSRSseg : INTEGER = 0;
  20.   DosSeg  : INTEGER = 0;
  21.   TSR_InUse : BOOLEAN = FALSE;
  22.   TSR_IntIP : INTEGER = 0;
  23.   TSR_IntCs : INTEGER = 0;
  24.   StackSize : INTEGER = 0;
  25.  
  26. VAR
  27.   TSR_Char     : INTEGER;        (* Änderung !! auch in   *)
  28.                                  (* INTERRPT.INC          *)
  29.   SaveRegs     : Regs8088_;      (* aus Ah AX machen      *)
  30.   HalfRegs     : Regs8088_ ABSOLUTE Regs;
  31.   TSR_Terminate: BOOLEAN;
  32.   Segm,Offs    : INTEGER;
  33.  
  34. {$I MAKEINT.INC }
  35. {$I REINSTAL.INC }
  36. {$I MERKER.INC }
  37. {$I INTERRPT.INC }
  38.  
  39. BEGIN
  40.   TSR_InUse := FALSE; TSR_Terminate := FALSE;
  41.   TSR_Char  := ALT_M;          (* Tastenkombination Alt+M *)
  42.   TSRDseg := Dseg;             (* die Routine             *)
  43.   TSRSseg := Sseg;
  44.   Segm := 0;
  45.   IntGet(TSR_Int,Segm,Offs);
  46.   IF Segm <> 0
  47.   THEN BEGIN
  48.          WriteLn ('MERKER ist deaktiviert');
  49.          Schreibe(TSR_Char);
  50.          Schreibe(0);
  51.        END
  52.   ELSE BEGIN
  53.          IntGet (IntKeyBoard,Segm,Offs);
  54.          IntSet (TSR_Int,Segm,Offs);
  55.          IntSet (IntKeyBoard,Cseg,OFS(Interrpt));
  56.          TSR_IntIP := MemW[0:TSR_Int*4];
  57.          TSR_IntCs := MemW[0:TSR_Int*4+2];
  58.          WriteLn ('MERKER  <c> 1988 by Johannes Kiefer ',
  59.                   '& PASCAL INT.');
  60.          WriteLn;
  61.          WriteLn ('MERKER installiert!  Aktivieren mit',
  62.                   ' Alt-M... ');
  63.          WriteLn ('       zum deaktivieren nochmals',
  64.                   ' aufrufen.');
  65.          MakeResident;
  66.        END;
  67. END.
  68.  
  69.