EMBEDDED CONTROL CODES FOR TANDY DMP-133 PRINTER (Q&A WRITE) The following is a list of printer control codes to be embedded in text written using Q&A Write, which can be used to produce a large variety of font styles. By using the codes, one can produce documents with a highly professional appearance, even on a lowly dot-matrix printer. These codes can be adapted for any other printer, simply by consulting the printer manual and substituting its code numbers for the ones listed here. Substitute *s for the parentheses () to use the codes in a document. Note that (P 27,33) switches from IBM to Tandy Modes and back again. You may have to reset margins when switching from one mode to another. Also note that codes can be combined into a single code to do several tasks one after another. Example: (P 27,33,27,66,1) switches from IBM to Tandy and starts italics. You can add in the code to reset the margins at the same time. Combined with the Q&A Write font menus, these codes can enable you to create such fonts as a Proportional Bold Double-Wide or an Italic Subscript. Be creative! IBM control codes: (P 7) Sound buzzer for 1 second (BEL) (P 8) Move 1 character position to the left (BS) (P 9) Move to next horizontal tab position (HT) (P 10) Print and line feed according to latched information with or without Carriage Return (DIP switch 3) (LF) (P 11) Print and line feed according to latched information with or without Carriage Return (DIP switch 3) (VT) (P 12) Form Feed after printing (FF) (P 13) Printing and Carriage Return with or without Line Feed (DIP switch 3) (CR) (P 14) Printing and double-width character mode designation (Print command terminates this mode) (SO) (P 15) Printing and condensed character mode designation (SI) (P 18) Printing and termination of condensed character mode and compressed character mode (DC2) (P 20) Double-width character mode termination (DC4) (P 24) Clear all print data in the internal buffer (CAN) (P 27,7) Sound buzzer for 1 second (ESC,BEL) (P 27,8) Move 1 character position to the left (ESC,BS) (P 27,9) Move to next horizontal tab position (ESC,HT) (P 27,10) Print and line feed according to latched information with or without Carriage Return (DIP switch 3) (ESC,LF) (P 27,11) Print and line feed according to latched information with or without Carriage Return (DIP switch 3) (ESC,VT) (P 27,12) Form Feed after printing (ESC,FF) (P 27,13) Printing and Carriage Return with or without Line Feed (DIP switch 3) (ESC,CR) (P 27,14) Printing and double-width character mode designation (Print command terminates this mode) (ESC,SO) (P 27,15) Printing and condensed character mode designation (ESC,SI) (P 27,18) Printing and termination of condensed character mode and compressed character mode (ESC,DC2) (P 27,20) Double-width character mode termination (ESC,DC4) (P 27,24) Clear all print data in the internal buffer (ESC,CAN) (P 27,33) Select Tandy mode (ESC,!) (P 27,45,0) Ends underline (ESC,-,0) (P 27,45,1) Starts underline (ESC,-,1) (P 27,48) Line Feed pitch is set to 1/8 inch (ESC,0) (P 27,49) Line Feed pitch is set to 7/72 inch (ESC,1) (P 27,50) Perform (P 27,65) or set Line Feed pitch to 1/6 inch (ESC,2) (P 27,51,n) Set Line Feed pitch to n/216 inch [n=0-255] (ESC,3,n) (P 27,52) Current position is set as top-of-form (ESC,4) (P 27,53,0) Set Automatic Line Feed: Carriage Return only (ESC,5,0) (P 27,53,1) Set Automatic Line Feed: Carriage Return and Line Feed (ESC,5,1) (P 27,54) Select IBM Character Set 2 (ESC,6) (P 27,55) Select IBM Character Set 1 (ESC,7) (P 27,56) Ignore paper end detection (ESC,8) (P 27,57) Cancel ignore paper end detection (ESC,9) (P 27,58) Select Compressed Character (12 cpi) (ESC,:) (P 27,60) Move print head to home position (ESC,<) (P 27,65,n) Set Line Feed pitch to n/72 inch when (P 27,50) is input [n=0-8] (ESC,A,n) (P 27,67,n) Specify page length in line units with n ranging from 1 to 127 (ESC,C,n) (P 27,67,0,n) Specify page lenght in inch units with n ranging from 1 to 22 (ESC,C,NULL,n) (P 27,68,n1,...nk,0) Horizontal Tab position setting [k=1-28 n=1-80 or 137] (ESC,D,n1,...nk,NULL) (P 27,69) Select Bold Character Mode (ESC,E) (P 27,70) End Bold Character Mode (ESC,F) (P 27,71) Select Double-Strike Character Mode (ESC,G) (P 27,72) End Double-Strike Character Mode (ESC,H) (P 27,73,1) Select standard font (ESC,I,1) (P 27,73,2 or 3) Select NLQ font (ESC,I,2 or 3) (P 27,74,n) Perform n/216 inch Line Feed (ESC,J,n) (P 27,75,n1,n2,D1,...Dk) Select 60 DPI (dot/inch) Bit Image Mode [k=n1+256xn2(MSB)] (ESC,K,n1,n2,D1,...Dk) (P 27,76,n1,n2,D1,...Dk) Select 120 DPI (dot/inch) Bit Image Mode [k=n1+256xn2] (ESC,L,n1,n2,D1,...Dk) (P 27,78,n) Set skip over perforation in line feed unit [n=1-127] (ESC,N,n) (P 27,79) End skip over perforation (ESC,O) (P 27,80,0) Proportional Character Mode designation OFF (ESC,P,0) (P 27,80,1) Proportional Character Mode designation ON (ESC,P,1) (P 27,82) Set horizontal tabs at every 8th character column (ESC,R) (P 27,83,0) Select Superscript Character Mode (ESC,S,0) (P 27,83,1) Select Subscript Character Mode (ESC,S,1) (P 27,84) End Superscript and Subscript Character Modes (ESC,T) (P 27,85,0) Select Bidirectional Print Mode (ESC,U,0) (P 27,85,1) Select Unidirectional Print Mode (ESC,U,1) (P 27,87,0) Cancels Continuous Double-Width Character Mode (ESC,W,0) (P 27,87,1) Select Continuous Double-Width Character Mode (ESC,W,1) (P 27,88,m,n) Set left and right margins in present character columns. Left margin is specified by m and right margin, n. [m=1-n n=m-maximum character column] (ESC,X,m,n) (P 27,89,n1,n2,D1,...Dk) Select 120 DPI (dot/inch) Bit Image Mode, Normal Speed [k=n1(LSB)+n2(LSB)x256] Horizontally aligned dots cannot be printed (ESC,Y,n1,n2,D1,...Dk) (P 27,90,n1,n2,D1,...Dk) Select 240 DPI (dot/inch) Bit Image Mode [k=n1+n2x256] (ESC,Z,n1,n2,D1,...Dk) (P 27,93) 1/6-inch Reverse line Feed (ESC,]) (P 27,94,n) Print characters of codes 3, 4, 5, 6, 19, 20, 21 specified by n (ESC,^,n) (P 27,100,n1,n2) Move print position toward right by 1/120x(n1+n2x256) inches. If right margin is exceeded, this command is ignored. (ESC,d,n1,n2) (P 27,101,n1,n2) Move print position toward left by 1/120x(n1+n2x256) inches. Ignored if exceeds left margin. (ESC,e,n1,n2) (P 27,135) Sound buzzer for 1 second (ESC,BEL) (P 27,136) Move 1 character position to the left (ESC,BS) (P 27,137) Move to next horizontal tab position (ESC,HT) (P 27,138) Print and line feed according to latched information with or without Carriage Return (DIP switch 3) (ESC,LF) (P 27,139) Print and line feed according to latched information with or without Carriage Return (DIP switch 3) (ESC,VT) (P 27,140) Form Feed after printing (ESC,FF) (P 27,141) Printing and Carriage Return with or without Line Feed (DIP switch 3) (ESC,CR) (P 27,142) Printing and double-width character mode designation (Print command terminates this mode) (ESC,SO) (P 27,143) Printing and condensed character mode designation (ESC,SI) (P 27,146) Printing and termination of condensed character mode and compressed character mode (ESC,DC2) (P 27,148) Double-width character mode termination (ESC,DC4) (P 27,152) Clear all print data in the internal buffer (ESC,CAN) (P 135) Sound buzzer for 1 second (BEL) (P 136) Move 1 character position to the left (BS) (P 137) Move to next horizontal tab position (HT) (P 138) Print and line feed according to latched information with or without Carriage Return (DIP switch 3) (LF) (P 139) Print and line feed according to latched information with or without Carriage Return (DIP switch 3) (VT) (P 140) Form Feed after printing (FF) (P 141) Printing and Carriage Return with or without Line Feed (DIP switch 3) (CR) (P 142) Printing and double-width character mode designation (Print command terminates this mode) (SO) (P 143) Printing and condensed character mode designation (SI) (P 146) Printing and termination of condensed character mode and compressed character mode (DC2) (P 148) Double-width character mode termination (DC4) (P 152) Clear all print data in the internal buffer (CAN) Tandy Control Codes: (P 7) Sound Buzzer (BEL) (P 8,n) Backspace (n=binary) n: BS point NO. [n=1-256] (BS) (P 10) Line Feed. 1/6" in Word Processing Mode. 7/72" in Graphics Mode (LF) (P 12) Form Feed. Page length is selectable (FF) (P 13) Carriage Return only or Plus Line Feed. DIP switch selects CR or CR+LF (CR) (P 14) End Underline (SO) (P 15) Start Underline (SI) (P 18) Select Graphics Mode (DC2) (P 19) Select Data Processing Mode (DC3) (P 20) Select Word Processing Mode (DC4) (P 27,n) Microspacing n: dot number [n=1-9] (ESC,n) (P 27,10) Set 1/6" Reverse Line Feed. Perform 1/6" Reverse Line Feed in Word Processing Mode (ESC,LF) (P 27,14) Start Elongation (ESC,SO) (P 27,15) End Elongation (ESC,SI) (P 27,16,n1,n2) Positioning. n1 n2 indicate dot position from home position (ESC,POS,n1,n2) (P 27,17) Select NLQ Proportional Character (ESC,DC1) (P 27,18) Select NLQ Character. 10 cpi (ESC,DC2) (P 27,19) Select Standard Character. 10 cpi (ESC,DC3) (P 27,20) Select Condensed Character. 17 cpi (ESC,DC4) (P 27,21) Set CR = CR only. Reset DIP Switch 2 (ESC,NAK) (P 27,22) Set CR = CR + LF. Reset DIP Switch 2 (ESC,SYN) (P 27,23) Select Compressed Character. 12 cpi (ESC,ETB) (P 27,26) Perform 1/8 Line Feed. 1/48 inch (ESC,SUB) (P 27,28) Set 1/2 Line Feed. Perform 1/2 Line Feed in Word Processing Mode. 1/12 inch (ESC,FS) (P 27,29) Select NLQ Compressed Character. 12 cpi (ESC,GS) (P 27,30) Set 1/2 Reverse Line Feed. Perform 1/2 Reverse Line Feed in Word Processing Mode. 1/12 inch (ESC,RS) (P 27,31) Select Bold Character. Invalid in condensed, microfont, super-/subscript (ESC,US) (P 27,32) End Bold Character (ESC,SP) (P 27,33) Select IBM Mode (ESC,!) (P 27,50) Perform 1/12 Line Feed. 1/72 inch (ESC,2) (P 27,51) Perform 1/36 Line Feed. 1/216 inch (ESC,3) (P 27,52,n) Specify Page Length. n x 1/6 inch [n=0-255] (ESC,4,n) (P 27,54) Set 1 Line Feed. 1/6 inch (ESC,6) (P 27,56) Set 3/4 Line Feed. Perform 3/4 Line Feed in Word Processing Mode. 1/8 inch (ESC,8) (P 27,57) Perform 1/24 Line Feed. 1/144 inch (ESC,9) (P 27,58) Select IBM Character Set 1 (ESC,:) (P 27,59) Select Tandy Character Set (ESC,;) (P 27,64,n) Set n/144" Line Feed. Perform n/144" Line Feed in Word Processing and Graphics Modes (ESC,@,n) (P 27,66,0) End Italic Character (ESC,B,0) (P 27,66,1) Start Italic Character (ESC,B,1) (P 27,72,n) Set n/6" Skip Perforation. n=0 End Skip Perforation (ESC,H,n) (P 27,77) Select Microfont. 1/2 Line Feed (1/12 Inch) is set (ESC,M) (P 27,81,n) Set Left Margin. Set at position (n x character width) (ESC,Q,n) (P 27,82,n) Set Right Margin. Set at position (n x character width) (ESC,R,n) (P 27,83,0) Select Superscript. (P 27,88) ends this selection (ESC,S,0) (P 27,83,1) Select Subscript. (P 27,88) ends this selection (ESC,S,1) (P 27,85,0) Set Bidirectional (ESC,U,0) (P 27,85,1) Set Unidirectional (ESC,U,1) (P 27,88) End Superscript and Subscript (ESC,X) (P 27,89,n) Select Country Character. n=32-42 (ESC,Y,n) (P 28,n1,n2) Repeat Character (Undefined code is ignored.). Repeat Print Data in Graphics Mode. n1: Repeat number. n2: Character or print data (FS,n1,n2) (P 30) End Graphics Mode (RS) (P 138) Line Feed 1/6" (7/72" in Graphics Mode) (LF) (P 141) Carriage Return only or Plus Line Feed. DIP switch selects CR or CR+LF (CR)