Program HELPFIND_PAS; (* Author : Ken Isacson Version : 1.00 Date : 4/15/1986 Warning : This program must be run under Turbo Pascal with the { Instructions : First Use TINST that came with Turbo And find out what you have Character Left Set to. Then enter that data after the promts 'n >'. Be sure that this program states the exact thing as TINST did. The program will display an integer to be used as a command memory offset. If the more than one number appears, you have two options. Option 1) Try each number as the memory offset in the HELP program. Option 2) Redefine the Character Left with TINST to some thing longer and run this program again. This should insure the correct reults. This is going to be used for the TURBO PASCAL HELP.INC Program/Procedure. } Procedure WhatKey(Number : Integer); Begin Case Number of 27 : Writeln ('ESCape'); 10 : Writeln ('Line Feed'); 32 : Writeln ('SPACE'); 33..126 : Writeln (Chr(Number)); 127 : Writeln ('DELETE'); 0..31 : Writeln ('CNTRL-',Chr(64+Number)); End; End; Var X : Integer; Ch : Char; Check : Array[1..3] of Integer; List : Integer; Amount : Integer; Count : Integer; Good : Boolean; Label Out, Done; Begin ClrScr; Rename; For X := 1 to 3 do Check[x] := 0; Writeln ('Be sure to read instructions in the begining of the code.'); Writeln; X := 0; Writeln ('For Your Cursor Left > '); While ( X <= 2 ) and (Ch <> #13) Do Begin X := Succ(x); Write(x,' > '); Read(kbd, Ch); Check[x] := Ord(Ch); If ch <> #13 Then Whatkey(Check[x]) Else Writeln (#13,#13,'Searchig . . .'); End; If (Ch = #13) And (X = 1) Then Goto Done; If ch = #13 then X:=Pred(X); Amount := (X); Good := True; X := 0; Repeat Repeat Good := true; If Mem[X] = Amount Then For Count := Succ(X) to X+Amount DO Begin If (Mem[Count] = Check[(Count - X)]) and Good Then Good := True Else Good := False; End; If (good) and (Mem[x] = Amount) then goto out else good := not good; X := Succ(x); Until (X < 0); out: If X > 0 Then Writeln ('Try ',X,' for HelpOffSet in HELP.INC.'); X := Succ(x); Until (X<0); Done: Writeln ('Done . . . . .'); End.