<ESC> “>” <ESC> “=”
<ESC> “#” <BEL> <BS> <ESC> “@” <ESC> “<” <ESC> “U” n
1
8
64
73
Using SQ-2000 Commands with BASICMaster Select Codes

Most versions of BASIC use the LPRINT command and the CHR$(n) function to send codes to the printer. In the CHR$(n) function the value n is the number of the code that you want to send to the printer. For example, to set a right margin at column 60, the SQ-2000 command is:

<ESC> “Q” 60

In BASIC it looks like this: LPRINT CHR$(27) “Q” CHR$(60);

Control Codes by FunctionVertical Spacing Commands

<LF>

produces a line feed.

<ESC> ”J” n

Advances the paper n/180 inch

<ESC> “0”

Sets the line spacing to *1/8 inch.

<ESC> “2”

Sets the line spacing to l/6 inch.

<ESC> “3” n

Sets the line spacing to l/180 inch (0 n 255).

<ESC> “A” n

Sets the line spacing to n/60 inches (0 n 85).

<FF>

Produces a form feed.

<ESC> “C” n

Sets the length of the page to n lines

<ESC> “C” <NUL> n Sets the page length to n inches

<ESC> “N“ n

Sets a bottom margin of n lines

<ESC> “O”

Sets the bottom margin to 0 lines.

<VT>

Produces a vertical tab.

<ESC> “B” n1 n2 n3 ___ <NUL>

 

Sets up to 16 vertical tabs on lines n1, n2, n3, etc.

<ESC> “/” c

Selects a vertical tab channel

<ESC> “b” c n1 n2 n3 ... <NUL>

Sets up to 16 vertical tabs on lines n1, n2, n3, etc. of vertical tab channel c

Horizontal Spacing Commands

<CR>

Produces a carriage return.

<ESC> “Q” n

Sets a right margin at n columns

<ESC> “1” n

Sets the left margin at n columns

<HT>

Produces a horizontal tab.

<ESC> “D”n1 n2 n3... <NUL>

 

Sets up to 32 horizontal tabs at character positions n1,

<ESC> <SP> n

n2, n3, etc.

Increases the space between characters by n dots

<ESC> “$” n1 n2

Moves the print head to an absolute horizontal position.

<ESC> “\” n1 n2

Moves the print head a specified distance from the last

 

character printed.

Print Style Commands
<ESC> “x” n

Selects between draft mode (n=0) and letter quality mode.

<ESC> “!” n

Selects multiple printing styles (Master Select command).

<ESC> “M”

Selects elite pitch.

<ESC> “P”

Cancels elite pitch.

<ESC> “p” n

Turns proportional printing ON (n=1) or proportional

 

printing OFF (n=0).

< s o >

Selects one-line expanded width print.

<ESC> <SO>

Selects one-line expanded width print.

<DC4>

 

Cancels one-line expanded print.

<ESC> “W” n

Turns expanded width print ON (n=1) or turns

 

 

expanded width print OFF (n=0).

<SI>

 

Selects compressed width print.

<ESC>

<SI>

Selects compressed width print.

<DC2>

 

Cancels compressed width print.

<ESC>

“E”

Selects emphasized print.

<ESC>

“F”

Cancels emphasized print.

<ESC>

“4”

Selects italic print.

<ESC>

“5”

Cancels italic print.

<ESC> ”--” n

Turns underlining ON (n=1) or turns underlining

 

 

OFF (n=0).

<ESC> “S” n

Selects superscripts (n=0) or selects subscripts (n=l).

<ESC>

“T”

Cancels superscripts and subscripts.

Character Set Commands

<ESC> “%” n

Selects the user-defined character set (n=1) or cancels

 

 

the user-defined character set (n=0).

<ESC> “&” <NUL> n1 n2 data

 

 

Defines user-defined characters

<ESC> “.” <NUL> <NUL> <NUL>

 

 

Copies ROM character set to user-defined character set.

<ESC> “R” n

Selects international character set

Graphics Commands

<ESC> “K” n1 n2 data

Prints single-density dot graphics.

<ESC> “L” n1

n2 data

Prints double-density dot graphics.

<ESC> “Y” n1

n2 data

Prints high-speed double-density dot graphics.

<ESC> “Z“ n1 n2 data

Prints quadruple-density dot graphics.

<ESC> “*” s n1 n2 data

prints selected-density dot graphics.

<ESC> “?” s n

 

Assigns graphics densities.

Miscellaneous Commands
<CAN>

Cancels the current line.

<DEL>

Deletes the preceding character.

<DC3>

Turns printer to off-line state.

<DC1>

Turns printer to on-line state.

<ESC> “V” n data <ESC> “V” <NUL>

Repeats data, n times Sets the eighth data bit to 1.

Sets the eighth data bit to 0.

Cancels control of the eighth data bit. Sounds the buzzer.

Produces a backspace. Resets the printer.

Causes the next line to be printed left-to-right. Selects unidirectional printing (n=1) or bidirectional printing (n=0).

Each print style is assigned a value to be used with the Master Select com- mand. The Master Select command consists of <ESC> ’!” followed by a single ASCII code. To create a Master Select code, add the values of the print styles you want to combine.

The values of the print styles are as follows:

Elite

1

Proportional

2

Compressed

4

Emphasized

8

Expanded

32

Italic

64

Underlined

128

For example, if you want to find the code for elite emphasized italic print you would add these values:

Elite Emphasized Italic

Master Select code

The Master Select Command you would use would look like this:

<ESC> “!” “I”(I is ASCII 73)

DIP Switch Settings

Interface DIP switch Panel 1

 

 

Switch

 

 

Function

 

ON (up)

 

 

OFF (down)

Factory setting

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

SW1-1

2K-byte buffer

 

Disabled

Enabled

OFF

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

SW1-2

 

Not used

 

-

 

-

 

OFF

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

SW1-3

 

Automatic line

 

LF added

 

LF needed

OFF

 

 

 

 

feed

 

by printer

 

from computer

 

 

 

SW1-4

 

Control ROM

 

 

See Appendix D

OFF

 

 

 

 

selection

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Interface DIP switch Panel 2

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Switch

 

 

Function

 

ON (up)

 

OFF (down)

Factory setting

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

2-1

 

 

 

International character

selection

 

ON

2-2

 

 

 

 

ON

 

 

 

 

 

(See Table D-4)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

2-3

 

 

 

 

 

 

 

 

 

 

 

 

ON

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

2-4

 

 

 

Form length

12"

 

 

11”

OFF

2-5

 

 

 

1" skip-over

 

Enabled

 

Disabled

OFF

 

 

 

 

 

 

perforation

 

 

 

 

I

 

2-6

 

 

 

Buzzer

 

Disabled

 

Enabled

OFF

 

 

 

 

 

 

 

 

 

 

 

 

 

 

2-7

 

 

 

Print quality

 

LQ*

 

 

Draft**

OFF

2-8

 

 

 

 

signal Fixed

 

Not fixed

ON

 

 

SLCT IN

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

*Letter quality ** Draft quality