(*  VERSION 0005 *)

VAR
  BUFSZ:        EXTERNAL INTEGER;  (* SET UP BY SOFTBUS *)
  LASTLINE :    EXTERNAL INTEGER;  (* POINTS TO END OF EDITED FILE  *)
  CURRLINE :    EXTERNAL INTEGER;  (* CURRENT LINE IN BUF BEING EDITED*)
  BEGINLINE:    EXTERNAL INTEGER;  (* FIRST CHARACTER IN CURRLINE ? *)
  ENDFILE :     EXTERNAL INTEGER;  (* LAST CHARACTER, OR ^Z ? *)
  BOF :         EXTERNAL BOOLEAN;  (* BEGIN FILE *)
  CMD :         EXTERNAL INTEGER;  (* READ COMMAND FROM KEYBOARD ?*)
  OLDCMD :      EXTERNAL INTEGER;  (* HOLDS PREVIOUS COMMAND *)
  CH :          EXTERNAL CHAR;     (* HOLDS CHARACTER FROM KEYBOARD ? *)
  CMDARR :      EXTERNAL ARRAY[0..CMDSZ] OF CHAR;
                                   (* HOLDS CHARACTR VALS OF CMMDS*)
  (* ELEMENTS ARE THE CONTROL FUNCTIONS FOR THE COMMANDS. THE INDEX
     INTO CMDARR IS THE NUMBER OF THE COMMAND *)

  NAME :        EXTERNAL FILENAME; (* NAME OF FILE *)
  F :           EXTERNAL FYLE;     (* FILE POINTER FOR FILE BEING EDITED ?*)
  FILEOPEN :    EXTERNAL BOOLEAN;  (* TRUE IF FILE IS SUCCESSFULLY OPENED *)
  NEWFILE :     EXTERNAL BOOLEAN;  (* TRUE IF FILE IS NEW *)
  NOFILE :      EXTERNAL BOOLEAN;  (* TRUE : USER LEAVES BEFORE OPENING FILE*)
  RESULT :      EXTERNAL INTEGER;  (* FOR FILE COMMANDS: EXTERNAL SCRATCH *)
  FCB5C :       EXTERNAL INTEGER;  (* POINTS TO FILE CONTROL BLOCK AT HEX 5C 
*)
  LINE :        EXTERNAL PACKED ARRAY[0..MAXLNSIZE] OF CHAR;
                                   (* FOR EDITNG A LINE FROM BUF*)
  ORIGLEN,                         (* ORIGINAL LENGTH OF LINE IN 'LINE' *)
  LENLINE,                         (* NEW LENGTH OF LINE IN 'LINE'*)
  NUMBLANKS :   EXTERNAL INTEGER;  (* DON'T KNOW IF USED ANY MORE ? *)
  X,Y :         EXTERNAL INTEGER;  (* X AND Y CURSOR POSITION *)
  NUMLFS :      EXTERNAL INTEGER;  (* SET BY FIND WHEN IT SEES LF *)
  NUMDELS :     EXTERNAL INTEGER;  (*INCREMENTED IN DEL LINE, USED IN COPY*)
  DELBUFSZ :    EXTERNAL INTEGER;  (*SIZE OF DELETE BUFFER *)
  QUITFLG,                         (* TRUE IF DONE WITH EDIT *)
  NEWLINE,                         (* TRUE IF WRITING A NEW LINE FROM 'LINE'?
*)
  LINEFLG,                         (* TRUE WHEN LINE IS IN LINE *)
  INSERTING,                       (* TRUE WHEN IN INSERT MODE *)
  CHANGED:      EXTERNAL BOOLEAN;  (* TRUE IF LINE IN 'LINE' IS CHANGED *)
  STR:          EXTERNAL ARRAY[1..8] OF CHAR;
  (* USED IN STATUS LINE FOR MODE *)

(* 11/23/80 NEW *)

  (* FOR GETTING FILE NAME FROM COMMAND BUFFER AT $80 *)
  CPMSTR :      EXTERNAL STRING[CPMLINESZ];
  ANCHOR :      EXTERNAL INTEGER;
  CBP :         EXTERNAL INTEGER;

(* 2/25/81 NEW *)
  SRCHSTR :     EXTERNAL SSTRING;
  LAST_FIND,
  LAST_REPL:    EXTERNAL SSTRING;
  FIRSTMARK,
  LASTMARK :    EXTERNAL INTEGER;

  BUF:          EXTERNAL ARRAY[0..32760] OF CHAR;
  (* EDIT BUFFER *)

H