In my previous article I discussed the history and emergence of computer terminals. To delve a little deeper let's look at the way they communicated with mainframe systems.
There were essentially two philosophies (or sometimes 'religions' may be a better description depending on who you talk to) that determined determined how a terminal communicated with a host system. These were the Block Mode or 'smart' devices and Character Mode , or 'dumb' devices and, just to confuse matters, there was also a class of terminal which could operate in either mode and readily switch between them.
So what were the differences between these two ideas? Essentially, when using a Block Mode terminal once the host system had set up the terminal screen display, the operator was able to enter data into 'Fields' on the screen without interacting with the host. When the operator had finished the terminal collected all the input and sent it back to host as a 'block' of data. On the other hand a Character Mode terminal had to consistently send and receive each and every keystroke and piece of data to and from the host system during normal operation.
The Character Mode terminal used the host system to do all validation of data that the operator entered. Each time a key was pressed the character code for that key was sent to the host system. Whatever the host processor was doing was interrupted so that it could process the character and the application then decide what action to take, and finally perform that action. This could be merely to echo the character back to the terminal or to act on one of the control characters that may have been sent.
Applications that use Character mode terminals required laboriously set up of the displays in a way that allowed the operator to make sense of them. This involved moving the cursor around the screen, turning character Attributes on and off and printing text on the screen. In these terminals everything happened at the current screen location of the cursor.
As a simple example consider the case where we want the operator to enter a customer number, validate this and display the name and address of a customer. Assuming we are using a VT100 terminal the host system would initially send the following data (note that data prefixed with Esc is an escape sequence , a special command used by terminals):
- Esc [2J : – clear the entire screen by
- Esc [H : – Locate the cursor at the top left hand side of the screen
- Esc [1m : – Turn on Bold to make the prompt stand out
- Customer No. : – Type the prompt for the operator to enter the data
- Esc [0m : – Turn off Bold
- Esc [0; 9 : – Move the cursor to the place we want to see the customer number
Once this is all done, the operator can type the customer number, as each character is typed the host is sent the character before it is displayed, and will echo it back to the terminal so that it shows up on the screen. Special characters such as backspace are used to allow some simple editing. Finally the Enter key indicates that the customer number is complete. At this point the host has what it needs to see if the customer exists and display the details of that customer by moving the cursor as above and printing the formatted information.
Obviously in a real world scenario the amount of screen configuration involved was significantly greater. It should be clear that a lot of work needed to be done at the host end for any useful application, and that a lot of developer time was required to create a host applications that worked with useful screens.
Block mode terminals had limited local intelligence and treated the screen as a window into a form. The form did not need to fit on the screen in one piece since the operator was able to move the off screen parts into view so that these could be accessed as required. Block mode terminals were able to have multiple pages into which data could be entered, or on which data could be displayed. The operator was able to move to different parts of the form and to different pages by issuing commands to the Terminal which were acted on locally. There was little or no host involved during the data entry phase.
Take the case of a Block Mode terminal such as an IBM 3279, used on older IBM mainframes such as the System 360. When interacting with this terminal the host would first send a block of data to the terminal that represented the form to be filled including a list characters that are legal within each of the fields.
Once the form was displayed on the screen the operator could fill in the fields and move around the form to any fields that could legally be accessed. This happened locally with no interaction required from the host. On completion of the data entry the operator pressed the 'Send' key. Only at that point was the data sent to the host as a block. The host then extracted the fields it is interested in, in our case the customer number, looked up the customer details and sent these to the terminal so that they can be displayed in the form at the appropriate location.
From the above it is clear that there was a lot more work for the host system when coupled with character based terminals in comparison to their Block Mode equivalent. The advantage of the Character Terminals is that they were much less expensive than the Block Mode equivalent, and as long as the total number of terminals connected was not too large it was a cost effective solution.
On the other hand Block Mode terminals have an advantage in that the load on the host was greatly reduced, and while the monetary cost of these terminals was greater, they used the expensive host processor much more sparingly. Block mode terminals were most cost effective solution in situations where there were many terminals connected to a host system.
There were advantages and disadvantages to both types of terminal and the situation in which the device was to be used dictated which was the best solution. Today, this argument is largely irrelevant as the advent of PC based Terminal Emulation software has led to disappearance of physical terminals and therefore any cost benefit argument. Terminal emulation software is now the application that will determined whether or not a Character or Block Mode terminal is to be used.