HTERM/CIM and HTERM/BAS: “Smart” terminal enabling programs for the TRS-80 microcomputer

With the recent advances in increasing miniaturization, portability, flexibility, and the decreasing cost of microcomputers, interest within the behavioral and social sciences has focused more intensively on the potential benefits of on-site or local processing of research data in laboratory or field situations. A number of investigators have experimented in linking microcomputers with main-frame computer installations (Grupsmith, 1978; Grupsmith & Ferres, 1979) to update principal research data bases and to access sophisticated statistical packages that are beyond the memory capacity and processing power of the microcomputers. In addition to the more conventional terminal or "timesharing" mode of linkage with a main frame (Fox, Wolf, & Lesgold, 1979; Vesender, Lesgold, & Wolf, 1978), the most fruitful strategy is one that uses the microcomputer as both a stand-alone device and an "intelligent" or "smart" terminal to a more powerful main-frame computer installation (Vaughan, 1978). Whether entered directly, manually, or as the result of on-line or real-time experimental monitoring, data may be stored on some intermediary medium (such as buffer RAM memory and/or more permanent media such as magnetic diskette, tape cassette, etc.), processed for immediate or in situ feedback to the research team, and transmitted to a resident main-frame data base for more sophisticated treatment and analysis. The programs described below are enabling programs that permit the linking of a Tandy/Radio Shack TRS-80 (Model I) microcomputer to a main-frame computer via the RS-232-C serial interface board, associated port, and telephone modem or acoustic coupler. The programs allow the transmitted and received characters to be displayed on the video screen, or, at the option of the user, the characters may be output to a line printer connected to the parallel port. Additionally, data or other information (text, program lines, etc.) may be shifted also to or from the TRS disk drives and the main-frame computer. For this function, available RAM memory in the TRS-80 is utilized as a temporary storage or buffer area. Characters are either transferred from disk file to the buffer and then transmitted out the serial port, or, at the option of the user, the process may be reversed, with incoming information from the mainframe temporarily held in the RAM buffer area and later shifted to a user-designated disk file for local use. Two programs interact and are available to the user. An assembly language program, HTERM/CIM, assembled into Z-80 microprocessor machine language instructions, . is located in high, protected memory. This program manages the initialization and input/output communication with the RS-232-C serial port and contains the user-option routines for buffer storage of characters and the printing of received and transmitted characters for hard-copy records of transactions. A BASIC language program, HTERM/BAS, is resident in low memory and is used to access (store or retrieve) information maintained (or to be maintained) in diskette files. The comparative ease of programming in BASIC offers the user a greater potential for modifying, altering, or tailoring the program to meet individual needs than is offered by the more difficult and processor-specific assembly language programming. Hardware. The programs were written and implemented on a Tandy/Radio Shack TRS-80 (Model 1) microcomputer. The TRS-80 included an expansion interface containing 32K RAM memory (for a total of 48K user-available RAM) and an RS-232-C serial interface board. Peripheral devices connected to the expansion interface include two minifloppy-disk drives, a Tandy/Centronics printer connected to the parallel port, and a telephone modem or acoustic coupler connected to the serial port. The total cost for a system that includes full user complement of 48K RAM and at least one disk drive approximates $2,200, excluding the line printer. The main-frame computer at Central Michigan University is an 11OO-Series UNIVAC with limited facility for timesharing access via terminals and telephone ports. Programs. HTERM/CIM, the assembled Z-80 machine language program, is loaded from DOS (the TRS disk operating system) into the high area of RAM memory (via a LOAD HTERM/CIM instruction). On the TRS-80 with the full complement of available RAM memory, the program and the buffer associated with the line printer are located above address 64,500 (FBF4, hexadecimal), and that area is protected from being overwritten by the BASIC program and interpreter. A second version, LTERM/CIM, is available for use on systems with 32K of available RAM memory (rather than the full 48K); this version is located above address 48,200 (BC48, hexadecimal), which is likewise protected in an area of memory that is made transparent to the BASIC program and interpreter. HTERM/CIM is called from the BASIC program; it handles the initialization of the RS-232-C board and port and allows software selection of the bit transmission rate (selectable at either 110 or 300 baud). Other variables, such as the word bit length, parity, and stop bits, are set according to the sensed DIP switch settings on the RS-232-C board itself. HTERM/CIM then enters a scan mode that will detect keyboard characters and transmit them out the serial port or detect incoming