QL Terminal Emulator Version 3.53 User Manual

Introduction.

The QL terminal emulator emulates a DEC VT52 terminal and a Tektronix T4010 terminal with a few functions, such as the alternative keypad mode and character sets omitted. Other than these few, rarely used, features, however, the program is fully compatable with the VT52 terminal and T4010 graphics codes at all baud rates from 75 baud to 9600 baud inclusive (though there can be framing errors produced at higher baud rates if the DTR and CTS wires are not used).

Starting the program.

Connect the host computer link (eg modem) to the SER2 port of the QL. Now run the program by either resetting the QL, inserting the program in drive one and pressing F1 (or F2) or inserting the program into drive one and typing (from SuperBASIC):- Either EXEC_W MDV1_TERM_COM or EXEC_W FLP1_TERM_COM if the program is on disc. Once the program is running, you can start communications immediately. To allow for different systems the program can be modified for different baud rates, etc. The system has defaults which are for a system running at 2400 baud, Remote ECHO, X-ON/OFF hand shake protocol.

The Screen at Start-up.

When the program has started running, the screen will clear, except for the bottom line of the screen which is the STATUS LINE. This tells you the current state of special features of the emulator - program functions (input buffering, etc), user functions (CAPS, baud rate, etc). The status line is explained below: ------------------------------------------------------------------------------- |Buffer status: OK |Caps: | F1 Help |TAB |DEL |CTRL | X-ON | FDX | 2400| | ------------------------------------------------------------------------------- In the above diagram, words in capitals indicate flags which are either on or off. If on, the word is present, if not, it is absent. 'Buffer status' indicates the state of the emulator's input buffer. As the QL only has hardware data flow control (CTS/DTR), and some systems use software data flow control (X-ON/OFF), the program emulates this by adding an extra 9K of buffering to the QL's measly 128 bytes. This has three states: i) OK - the buffer has plenty of room. ii) 2/3 - the buffer has reached 6K of data and an X-OFF has been sent to the host. iii) FULL - the host has still sent data to the QL despite being sent an X-OFF. The buffer has filled up with 9K of data. NOTE: If an X-OFF is sent, an X-ON will be sent as soon as there is reasonable space in the buffer. The '2/3' message is only shown when in X-ON mode (see below). 'Caps: ^^' indicates that the QL is currently in capitals mode. If the QL were in lower case mode then 'Caps: ' would be shown. DEL indicates the action of the emulator on receiving a DEL (ASCII 127) character. If on, the emulator will treat it as a destructive back space, moving the cursor left one character and replacing the character that was there with a blank. If off, it will just throw away any DEL characters received. (Most hosts send back space, space back space to do a destructive back space, but some also send spurious DELs which may cause problems. TAB indicates the action of the emulator on receiving a TAB (ASCII 9) character. When on, the receipt of a TAB character will cause the emulator to move the cursor to the next tab position - every 8 columns. If it is on and a TAB character is received, the emulator will only move one space right. Note: this is only effective if the 'CTRL' flag is set to 'ESC'. 'CTRL' indicates the codes sent by the cursor (arrow) keys. If it is set to 'CTRL', the keys generate ASCII codes 8 to 11 (8 - left, 9 - right, 10 - down, 11 - up). When it is set to 'ESC' the cursor keys generate the VT52 ESCape codes (ESC A - up, B - down, C - right, D - left). Note: TAB is only effective if this is set to 'ESC'. X-ON indicates the hand shaking protocol being used. If on, X-ON/OFF is enabled and the emulator will monitor its buffer by sending X-ONs and X-OFFs as well as the QL's normal hardware hand shaking (CTS/DTR). If off, only the hardware handshaking will be used. FDX indicates the Local echoing state. If it is on, the emulator will, as well as sending the character to the host, echo it to the screen. In this case the indicator will show 'HDX' standing for pseudo-Half DupleX mode. If off, the only echoing will come from the host and the indicator will show 'FDX' standing for pseudo-Full DupleX mode. The final section of the status line (on the far right) indicates the current baud rate (ie 2400, 300, etc).

Changing the defaults for different systems

All these commands are keys with the ALT key also being pressed: (i) Changing the Baud Rate (ALT-B) If your system does not run at 2400 baud then you will have to change the baud rate to one which does suit the host system. This is done very simply by pressing both the ALT and B keys together, this will rotate through the different Baud rates until the one needed appears in the right-most status window at the bottom of the screen. This can be done at any time, though once you are talking to a host, you should not change it. Baud rates: 75, 300, 600, 1200, 2400, 4800, 9600. All the following commands are actually toggles, ie they swap the state of the flag - if it is currently on it is set off otherwise it is set on. (ii) Changing the Local echo mode (ALT-L) When the program runs, it is set up for remote (host) echo (FDX). To change between local (HDX) and remote (FDX) echoing, simply press the ALT and L keys together. (iii) Changing the hand shaking protocol (ALT-X) The default is for the program to use the X-ON/OFF protocol. if the host system (connection) uses these for uses other than hand shaking, you must switch them off by pressing the ALT and X keys together. To allow for later use of a system using X-ON/OFF, ALT-X will turn it back on again. (iv) Changing the Cursor codes (ALT-C) To switch between the two sets of codes sent by the cursor keys, press the ALT and C keys together. The 'CTRL' state will change between 'CTRL' and 'ESC' (to indicate the current state). If TAB is on, it will only be displayed if this is set to ESC. (v) Changing the TAB recognition (ALT-T) To change this flag, just press the ALT and T keys together. Although this can be changed when the 'CTRL' flag is in 'ESC' mode, the status indicator will only be shown, and TAB acted upon, if the 'CTRL' flag is in 'ESC' mode. (vi) Changing the DEL recognition (ALT-D) To change this flag, just press the ALT and D keys together.

Saving your default settings.

After you have set the program up as you like it, you can save them so that they will be already set up when you next run the program. To do this just place the program in drive one, either microdrive one or disc drive one, if you have your program on disc, and press F3. The program will automatically search for the media which contains the program and will place on it a file called TERM_DEF. This file contains all the default settings.

General Operation.

In general, once the terminal has been set up for your system, it will act as a standard VT52 terminal except for three differences: (i) Large, $2, $3, and Small characters not supported (ii) VT52 Graphics mode not supported (iii) Alternate keypad mode not supported (iv) User programable function keys (iii) cannot be supported due to the QL hardware, (i) and (ii) cannot be implemented due to the QL's screen driver. It will also emulate a Tektronics T4010 graphics terminal when the special graphics codes are sent from the host.

Function Keys

The Programmable Function keys are taken to be the keys 0 to 9 and are accessed by typing ALT+<key> together. In HDX mode the defined string will be sent both to the screen and to the host, whilst in FDX mode it will only be sent to the host computer. To program the keys type F2, enter the Programable Function (PF) key number after the prompt and press return. You will then be prompted for the string of characters to be sent. This string can be up to 255 characters long. Control codes are entered by prefixing the normal key letter of the control code by | (SHIFT+\), eg. to get CTRL G you type |G ie the BELL character To end, press enter. To refresh the screen after another program has been running, press F4. To leave the program you have to press the ALT and F5 keys together (ALT-F5). This will KILL the program and it will have to be reloaded if needed again. To send a Serial BREAK to the host you need to press the ALT key and the ESC key down together. This emulates a Serial BREAK by setting the baud rate to 75 baud and sending a number of NULs. On most systems this will be taken as a Serial BREAK with a few glitches on the line, on some, however, and at low baud rates, eg 75 & 300, this will not work so I have included a circuit diagram of a suitable cable to produce a hardware break. There is an on-line help page available at any moment which contains what keys do what. To access it, just press F1.

Function Key Summary.

F1 Help Text F2 Programmable Function key definition entry F3 Save Defaults to Microdrive/Disc F4 Refresh Screen/ Clear Screen/ T4010 'Page' key F5 Leave Character Overwrite mode (set when graphics used, Text is displayed in white instead of green)

Note:

If the terminal is being multi-tasked with other programs, DON'T run programs which use SER2, DON'T run programs which either need a certain baud rate to run, or change the baud rate whilst running. As it may be necessary to send a CTRL-C to the host, to switch between tasks you must type CTRL-CAPSLOCK instead.

EXTRAS!

Because this emulator was originally designed to work in association with a specific mainframe computer, there are several 'EXTRAS' which have been added to make the program easier to use with one of the resident editors and also be compatable with the 'home grown' BBC terminal emulators which are widely used. These extras include:- Remote programming of the Programmable Function keys. Remote control of the Cursor keys, and the use of the cursor keys as Programmable Function keys. Remote control of the keyboard input queue. All these functions are called using first an ESCape sequence (ESC L), then an ASCII string. The control strings are the same as used on the BBC micro to do the same job, eg. to program PF key No.1 with the string 'Hello there!' the control string would be.. '*KEY1 Hello there!'. Control characters are produced by prefixing a letter with a pipe symbol '|', eg. BEL or CTRL G would be '|G', the pipe symbol being produced by using '||'.

Technical details.

Main Screen size: 80x24 Characters (CON_480x240a28x3_128) Optimised for TV screen. Buffer size: 9K + 1K overflow X-OFF code sent when 6K reached if X-ON mode set. Default settings: 2400 Baud Remote Echoing X-ON/X-OFF Protocol Auto-DEL ON Cursor keys generate ASCII codes 8 to 11.

Circuit diagram of lead needed to produce a hardware Serial BREAK.

As the serial break is only emulated by the program, the system you are using may not recognise it. If this is the case, a hardware solution is shown below. QL (6 way BT Phone plug) HOST (25 way D plug) GND 1 <-------------------------> 7 COM RXD 2 >----------. \_____________> 2 +12 6 >__________. BRK TXD 3 <-------------------------< 3 DTR 4 >-------------------------> 20 CTS 5 <-------------------------< 5 The switch must switch the TXD line from the QL (line 2) out and connect the +12v (line 6) to the TXD line to the host computer. The QL's TXD line should never be connected direct to +12v. To talk to a host, the switch must be in the 'COM' position. To transmit a Serial break, quickly change the switch to 'BRK' and back again - this will take the TXD line 'high' for more than the 250 micro seconds needed to be recognised as a Serial break. The 6-way BT phone plug must have the rib on the opposite side to the spring retaining clip paired away as it will not otherwise fit into the QL's serial ports. (For some unknown reason Sinclair used a slightly different standard to everyone else) The Best way of doing this is by trial and error. _____________________________________________________________________________ File: README_doc Translated by Quill-View 0.5 Beta (compiled Oct 13 2008) Copyright 2008 Mikael Strom