PRINTER CONTROLLER ------------------ This program allows users to send CTRL codes to the printer. CTRL codes (control codes) enable the printer to do many things e.g. change character set, print in enlarged characters, use superscript and subscript etc, etc, etc. You will of course need a printer to use this program. The printer should be an EPSON compatible or at least capable of receiving control codes and use the PARALLEL (centronics) interface. If you have never used control codes to control your printer it is advisable to read your printers instruction book first, this will save you a lot of time in the long run. RUNNING CTRL ------------ Because the program is fairly complex, there are further instructions available on request at the start of the program. Once the functions are understood you need never refer to the instructions again. All inputs are in HEXADECIMAL notation. If you do not know how to convert decimal numbers into hexadecimal "DONT'T PANIC!" the program is capable of doing the conversion for you. Most printer books have an appendix outlining the major control codes, The majority of them require what is known as an escape code to be sent, together with other hexadecimal codes to control a printer function. As an example the control code to turn on double strike mode on an EPSON compatible is 'ESC G'. This means the escape code and ASCII code for the letter G have to be sent to the printer. This tells the printer to print everything twice (double strike). Using CTRL to send these codes couldn't be simpler, proceed as follows:- Press the Einsteins ESC key (top left). The word will appear on the VDU followed by a space, now we need to enter the letter "G", but remember we need to enter everything as a hexadecimal number. The EPSON printer books usually list the hexadecimal equivalent of the characters in a column marked HEX. The value we want is actually 47H (H means the number is in hexadecimal), but say we did not have the printer manual handy, then what? Well, press the key marked with the symbol ">", which is also the full stop key. You can press it either shifted or un-shifted. You will see the message:- Press any key, its ASCII value as a hexadecimal number is returned> Now, returning to our problem, press the letter "G" and you will see that the computer returns the value 47H. Enter the value (minus the 'H') after the and press the enter key . If all is well you will briefly see the message O.K.. appear on the screen and the command line 47 will disappear. TESTING THE CODE ---------------- To check that the code the printer received performs the required function, there is a test facility built into the program. Press the 'P' key. This sends a complete printable character set to the printer. Depending on whether or not your printer has a buffer you will see the O.K.. message again for a second while the characters are sent, or if your printer does not have a buffer, for a while longer while each character is printed by the printer which then requests the next character to be sent. INPUTING DECIMAL NUMBERS ------------------------ Some control code sequences require extra parameters, often quoted as decimal numbers e.g. 'R' n, where n is a decimal number between 10 and 23. We know how to enter the first part of the code sequence but what about the decimal number? We have to convert that to a hexadecimal number as well. Lets take the value 14D (the 'D' means the number is in decimal). To convert 14D to its equivalent hexadecimal number, press the key marked "<", this key is next to the one previously mentioned and shares it's key top with the comma symbol. Pressing this key allows users to input a decimal number between 0 and 9999, the hexadecimal equivalent is then returned. Try the example, you will find the answer is 0EH. All numbers entered in CTRL have to have two digits, that is why our number is written as 0EH (remember to ignore the H, it is only there to show that the number is in hexadecimal). Once this sequence has been entered, send it to the printer. If you have a Tatung TP100 this sequence will change the character set to the "Danish plus Graphic" set. To do the same on an Epson, enter 'R' 4. Notice the number four has no suffix of either 'D' or 'H', this is because the number 4 is the same in both bases. Check that the printer has changed character sets by pressing 'P' and comparing the print out with the earlier version. MAKING MISTAKES IN CTRL ----------------------- If you make a mistake, for example you enter the code 30 instead of 03 you will not be able to delete it. Pressing the DEL key clears the printer buffer, clears the screen ,resets all memory used by the program and prepares to accept a fresh input. This may be used at any time to correct mistakes and re-enter data. THE RESET COMMAND ----------------- EPSON (and compatible) printers can be reset to power up state by sending the escape sequence @ (the @ character has the value 40H). Pressing the 'R' has the same effect, so if you have used an escape code and need to reset the printer, do it by pressing the 'R' key. EXITING CTRL ------------ Press the 'X' key at the command line to leave the program, the printer remains programmed. CTRL.COM & TYPE.COM ------------------- The program may be used in conjunction with TYPE.COM to produce interesting documents and like TYPE.COM does a routine test to see if the printer is on line etc before allowing access to the main part of the program. This should stop all those annoying 'hang ups' printers and computers are renowned for.