ZCPR3 Z3TCAP (MYTERM.Z3T) file to source code (MYTERM.Z80) translator. Program Name: TCSRC Author: Terry Hazen Version: 1.1 Date: 26 Jan 90 The new extended Z3TCAP defined in VLIB4C includes two terminal configuration bytes that allow the user to specify to applications programs how he has his terminal configured as well as several new terminal control strings and basic line graphics. Since it is difficult to extensively customize an existing Z3TCAP.Z3T file by patching alone, TCSRC was written to help the user customize his Z3TCAP by creating a commented source code file (MYTERM.Z80) from an existing MYTERM.Z3T file for his terminal, such as one extracted from Z3TCAP.TCP by TCSEL. The new source code file can then be edited as desired, assembled to MYTERM.COM and renamed to MYTERM.Z3T. It can then be loaded to your environment using LDR.COM, NZCOM.COM, JETLDR.COM, etc. Syntax ------ TCSRC [dir:]infile[.z3t] [[dir:]outfile[.z80]] Default outfile is INFILE.Z80 on default directory. Any existing R/W file of the same name will be overwritten. TCSRC produces commented source files based on the new extended Z3TCAP definition contained in VLIB4C. It expects input files to be subsets of that standard, such as standard Z3TCAP files. Consult the VLIB4C help files for explanations of each of the defined terminal functions and consult your terminal manual for information on the terminal control strings required to implement the terminal functions. Source code produced by TCSRC from earlier extended Z3TCAP files with different extended formats will begin to be incorrect when the sequence of control strings begins to differ from the new VLIB4C standard and will have to be corrected with a text editor. Corrections need only be made to the actual DB strings, as the corrected source code file can be assembled and then TCSRC can quickly produce a new, correct source code file. Terminal Configuration Bytes ---------------------------- VLIB4C defines two terminal configuration bytes to allow an application program access to terminal characteristics not otherwise specified in the Z3TCAP. Application programs such as WordStar and SCAN now have access to information not only about terminal control strings, but about how users have configured their terminals. Users can set configuration bits indicating, for example, whether or not their terminals are set to auto-wrap at the end of a line or auto-scroll at the end of a screen, whether their terminals use ANSI or ASCII control sequences, and whether they use reverse video or non-reverse (usually dim) video for their standout mode. Not all application aprograms will check the terminal configuration bytes, but their presence allows the user some control over how application programs configure his screen display. SCAN, for example, checks the auto-wrap and auto-scroll bits to see whether it can put characters in the last display column on the screen without causing additional blank lines to be inserted into the display. If both bits are 0, the last column is considered safe, and the whole screen can be used for the display. If either bit is set, the last column is considered reserved and the next-to-last column will be the final column used. So if your terminal is configured to not automatically wrap or scroll, you can set the bits accordingly and SCAN will use the whole screen. Joe Wright's WSPAT for WordStar4 uses the configuration bytes in a similar way, along with the set attribute string to create WS4 display screens. Screen Display Configuration ---------------------------- When you start looking at how many ways a given terminal can be configured by a user and how that configuration can affect screen displays, it quickly becomes clear that a standard Z3TCAP for a given terminal type is not adequate to convey more than basic standard information for that terminal. It may make a difference to a screen display intensive applications program, for example, whether a screen is configured as dark letters on a light screen or light letters on a dark screen and whether reverse video or a non-reverse video mode, such as dim or bold is used as standout. For example, if dim is used as standout mode on a dark screen, spaces in standout mode won't show up, but if reverse video is used, they will, creating quite a different display. If the Z3TCAP for a particular terminal specifies dim as the standout mode, but the user prefers to use bold, reserving dim for standard mode, but then wishes to exit to a normal video command line, he must customize his Z3TCAP to use SO (Start Standout), SE (End Standout), TI (Terminal Initialization) and TE (Terminal Deinitialization) to set his terminal according to his preferences. In this example, SO would set dim, SE would set normal, TI would set dim, and TE would set normal video. Still another user of the same terminal type might prefer half intensity for standout, and would need to customize his Z3TCAP accordingly. So many terminal characteristics may be user configured, in fact, that it is really the user's responsibility to create a customized Z3TCAP for his system that reflects his own preferences. TCSRC attempts to facilitate this process by providing the user a handy tool to quickly create Z3TCAP source code files that may be easily edited and used to create his working customized Z3TCAP. Extended Z3TCAP Terminal Control Sequences ------------------------------------------ The source code created by TCSRC includes the LD (delete line at cursor position) and LI (insert line at cursor position) sequences added in the extended Z3TCAP defined by VLIB4B. Applications such as WordStar and SCAN can use these control sequences to produce better displays. For screen display intensive applications such as WordStar 4.0 patch WSPAT, Joe Wright added a macro to the Z3TCAP and a routine in VLIB4C to set terminal display attributes. The source code created by TCSRC includes the SA (set Attributes) macro and AT (the attribute string). The source code created by TCSRC also includes a CD (clear screen from cursor to end-of-screen) sequence. While sequence is, in some cases, a duplication of part of the CL (Home Cursor and Clear Screen) sequence, it is now available as a separate control sequence. Other New VLIB4C Terminal Control Sequences ------------------------------------------- For use with windowing routines used in pull-down menus, the extended Z3TCAP includes a new RC sequence that reads the character at the current cursor position and a RL sequence that reads the entire line up until the cursor position into a buffer. Consult V4LIB.HLP for more information. Graphics Extensions ------------------- VLIB4C adds new standardized character graphics extensions. Graphics extensions include GOELD (graphics on/off delay), GO/GE (graphics mode on and off), and CDO/GDE (turn the cursor off and on). Graphics Characters ------------------- Graphics characters now used by VLIB4C are one-byte characters that produce lines, intersections, corners, as well as full and hashed blocks. For terminals without graphics capability, very good results can be obtained using the characters '-' and '|' for horizontal (GHL) and vertical (GVL) line characters. The characters '*' and '#' can be used for full (GFB) and hashed (GHB) blocks, the characters '+' or '*' can be used for corners and the character '+' for intersections. Use TCSRC to add graphics characters to your own Z3TCAP and try BOX.COM from VLIB4C for a demonstration of the new line graphics as used in a box drawing routine.