1		KEYPUNCH
    KEYPUNCH is a text editor that seeks to emulate a keypunch machine.
    Data entry is controlled by user-created program cards consisting 
    of numeric, alphanumeric, skip, and duplicate fields, and by cert-
    ain control keys that perform predefined funtions.

    Data may be verified by entering 'VERIFY' mode and rekeying the
    data. Errors are signaled and the cursor backspaces over bad data
    items. VERIFY will accept a 'bad' data item after the third attempt
    to enter it.

    Editing capabilities of KEYPUNCH are as follows:
    ALTER lines                  SAVE WORLD
    INSERT lines and columns     DELETE lines and columns
    FIND a string of characters  SUBSTITUTE a string of characters
    RENUMBER the file            HELP
2 PROGRAM_CARDS
    To create a program card type <ctrl> A or <ctrl> B. KEYPUNCH
    will prompt you to change the program card. Type 'Y' and enter
    the desired program card. Allowable characters in a program card:
 		N = numeric field start 
 		A = alphanumeric field start 
 		S = skip field start 
 		D = duplicate field start 
 		+ = field continuation
    KEYPUNCH will then prompt you to store the program. Type 'Y',
    then enter a unique title for the program.
    
    Programs cards may be retrieved in two ways:
      Type #n to retrieve the nth program from the file
      Type #title to retrieve the program of that title
    Type 'L' to get a list of all programs on file.
 
2 CONTROL_KEYS
 		CTRL A = use PROGRAM A (displays and allows change)
 		CTRL B = use PROGRAM B    "    "     "    "    "
 		CTRL D = duplicate character
 		CTRL E = erase current line (erase next character 
                         in ALTER mode)
 		CTRL F = duplicate to next field start
 		CTRL H = backspace (for fixing key errors)
 		CTRL I = tab 
 		CTRL J = display previous line
 		CTRL M = carriage return (stores line)
 		CTRL N = show current line number
 		CTRL P = turn program card off
 		CTRL T = tab 
 		CTRL V = display current program card (A or B)
 		CTRL W = where, show current column
 		CTRL Y = N/A (ABORTS PROGRAM)  !!!!
 		CTRL Z = stop input, return to KEY prompt or exit program
		BKSP =  BACKSPACE (for fixing keying errors)
		ESC  =  return to KEY prompt
		TAB  =  Same as CTRL I
 
2 NUMERIC_FIELDS
	allow only numerals, commas, periods, plus, minus or spaces
	ALSO:	defines a "number pad" where
		U = 1	I = 2	O = 3
		J = 4	K = 5	L = 6   ; = 0
		M = 7	, = 8	. = 9
		Q = +	W = -	E = ,	R = .
		A = +	S = -	D = ,	F = .


2 COMMANDS
    The following are valid commands:
   A (alter)         <CR>       <ESC>              DC (delete column)
   E (enter data)    F (find)   IC (insert column) DL (delete line)
   IL (insert line)  P (print)  S (substitute)     V (verify)
   W (save world)    H (help)   N (renumber file)  
   See also CONTROL KEY FUNCTIONS
3 PRINT 
   Command     Explanation....
    P           Print the current line
    P n         Print line number n
    P n:q       Print line numbers n through q
    P ^:*       Prints beginning of file through end of file

3 CR
   Command     Explanation....
    <CR>        Prints the next line

3 ESC
   Command     Explanation....
    <ESC>       Prints the previous line

3 SUBSTITUTE 
   Command     Explanation....
    S           Enter the SUBSTITUTE mode. KEYPUNCH will prompt as follows:
                (Information to the right of colons is sample input)

                  Enter column(s) to be changed: 25:30
                  Enter substitute string: HELLO
                  Enter the range: 100:1500
                If the range is not specified, the default is the
                current line.
    

3 INSERT_COLUMNS
   Command     Explanation....
    IC          This command puts you into the 'INSERT COLUMN' mode.
                The prompts are as follows:

                 Before which column are new columns to be inserted? 45
                 Enter the number of columns to be inserted: 3
                 Enter range: 400:2500

                The above prompts and responses will insert 3 blank
                columns just before column 45, for lines 4 through
                25.

                NOTE: Any characters pushed past column 80 due to
                      the insertion of new columns are lost!!
                      If you are going to both insert and delete
                      columns, always delete first. 
                      Also, for the S,D, and I commands, you can abort
                      at any prompt level with a <CTRL> Z.

          

3 DELETE_COLUMNS
   Command     Explanation....
    DC          This command puts you into the 'DELETE COLUMN' mode.
                The prompts are as follows:

                 Enter the columns to be deleted: 2:3
                 Enter range: 400:1500
          
                The above prompts and responses will delete columns
                2 and 3 in lines 4 to 15.


3 INSERT_LINES
   Command     Explanation....
    ILn         This command inserts additional lines after line n.
		All data entry control keys work in this mode. Use
		<CTRL-Z> to exit insert mode.

3 DELETE_LINES
   Command     Explanation....
    DL[n:n]     This command deletes the specified lines from the
		file.

3 VERIFY
   Command     Explanation....
    V           Typing a V while in the editor puts you into the 
		verify mode. The terminal will prompt you for the
		starting line from which to begin the verify. The
		user simply retypes in the data already contained
		in the file. Any discrepencies are 'beeped', and
		after three beeps the program will accept the
		character being typed. Either verifying the whole
		file or typing <CTRL-Z> will exit the verify mode,
		and return you to the editor.

3 FIND 
   Command     Explanation....
    F           This command puts you into the 'FIND' mode. An effort
                has been made to emulate the S.O.S. find command.
                
                Use the 'F' command like the following example:

                  FRHINO

                SOK will search for the first instance of the string
                'RHINO', beginning from the current line position to
                the end of the file. If the string is found, the
                appropriate line is printed and the Edit> prompt is
                given. If the line is not found an appropriate message
                will appear, and the Edit> prompt will be at the last
                line of the file.
                The string is saved for future use. If you type the 
                command F and hit <CR>, KEYPUNCH searches for the next
                use of the string.

 
3 ALTER 
   Command     Explanation....
    A[n[:n]]    This command puts you in the line alter mode. If
                the line is not specified by the user, the default
                is the current line.
                In the line alter mode most of the control key
                commands used in the KEYPUNCH program are still
                valid, with the following exceptions:

                 <CTRL>E  Erases the next character and advances the
                          cursor, leaving a blank where the character was
                 SPACE    advances the cursor without changing the
                          next character.

3 ENTER_DATA
   Command     Explanation....
    E           Exit the Edit mode. Enter the data entry mode.
                You are in the KEYPUNCH EMULATOR, ready to start
                entering new data.
3 SAVE_WORLD
   Command     Explanation...
    W           Save all current work to a permanent file. The user
                is given the option of purging the original file.
3 RENUMBER
   Command     Explanation...
    N           Renumbers the file
3 HELP
   Command     Explanation
    Htext       Get information on how to use KEYPUNCH
2 KEYSAVE
      If for some reason you lose your file, type KEYSAVE.
      Keysave will rebuild your data as it was at the time
      it was lost, creating a new version number of the file.

