EXOS 2.1 Editor Driver Specification

2. Opening Channels

An editor channel can be opened by giving the device name "EDITOR:", any filename or unit number is ignored. Before opening an editor channel, three EXOS variables must be set up. These are:

VID_EDIT - Channel number of video page.
KEY_EDIT - Channel number of keyboard channel.
BUF_EDIT - Size of editor buffer in units of 256 bytes.

The video and keyboard channels specified in VID_EDIT and KEY_EDIT must be opened before opening the editor channel. The video page must be a text mode and must be at least 3 rows by 4 characters. The editor determines the size and mode of the video page when the channel is opened and returns an error (.EVID) if it is unsuitable. Note that the editor does not display the video page on the screen, it is up to the applications program to take care of this.

The actual size of the editor's buffer which is available for storing text is:

256 * BUF_EDIT + n

where n is between zero and 255 and depends on the width of the video page (space reserved for the ruler line) and the exact size of the editor's variable area. The valid range for BUF_EDIT is thus zero to 254.

The editor will work with any size buffer but it is sensible to ensure that it is at least as big as the video page so that the editor is always capable of displaying a full page. The editor stores lines as variable length in its buffer so, since short lines are common, it generally manages to store more than the calculated minimum number of lines.


Next Chapter: General Editor Features.



David Bouman. (dsbouma@cs.vu.nl)