4Eh LG$RLED handle various PROG menu commands including multiline editor
Input - none -
Output - none -

Handles RUN, LIST, EDIT and DELETE commands in the top level PROGRAM menu. LIST, EDIT and DELETE can operate on any text file, while RUN operates on OPL procedures only. The name of the file to be operated on must be in the find buffer RTT_FF with length RTB_FL. The file must new exist or an error message will be displayed - new files can be created and edited using the service LG$NEWP.

The system variable TLB_MODE must be set by the programmer to control which of the top level commands is performed. The appropriate settings are

  EDIT 3
  LIST 4
  RUN 7
  DELETE    8

The standard input language editor can be used for editing any text files (with size limited only by memory availability). The file is loaded into RAM specially allocated to the language editor. An edited file can be saved with a block file type between $82 and $8F inclusive, as specified by the programmer in the system variable LGB_LANT ($23E0). Please note that some file types are reserved for OPL, notepad and others.

When exiting the editor, the user has the choice of

  1. translating an OPL program,
  2. saving the file,
  3. quitting, in which case everything typed in the editing session is lost.

The LZ user additionally has an option to translate in two line compatibility mode.

Since any type of text file can be edited (not only OPL files), the prevent programmer can choose to prevent the option to translate the edited file, by setting the system variable LGB_MENU ($23E1) to any non-zero value. Attempting to translate a non-OPL file will simply produce an error message.

The language editor differs from the line-editor (ED$EPOS) in the use of cursor and control keys.

  • The ON/CLEAR key deletes only the current line (not the whole record).
  • The down arrow key moves the cursor one line down the file. (It does not create a new line).
  • The EXE key creates a new line. (It does not exit the editor).
  • A line can be split in two using the EXE key.
Example Allows the editing of the non-OPL (type $8F) text file named "P".
        LDD     #256+'P'        ; A=1, B='P'
        STD     RTB_FL          ; FIND buffer contains 'P'
        LDD     #8F01h          ; Block file type and also no translate
        STD     LGB_LANT        ; Set LGB_LANT and LGB_MENU which are in 
                                ;   consecutive bytes in memory
        LDAA    #3
        STAB    TLB_MODE:       ; Edit mode for LG$RLED
        OS      LG$RLED
Errors - none -