beautypg.com

Examples, Geometric figures, 3 examples – Compuprint 6314 CDL User Manual

Page 36: 1 geometric, Figures, And 2.3, E 36), 1 geometric figures

background image

CDL – Programmer Manual

36

2.3 Examples

Examples are given below as text files and in Basic so that they may be understood and tried out by
any user: this does not subtract from the general nature of these examples which could be written in
any other language and/or on any kind of computer.
To check the effect of each of them, you must in the first case send the printer the text file, and in
the second “run” the Basic program.
In the examples given as text files, the convention of showing characters that cannot be printed from
the ASCII table (that is the first 32 of tab. 4 on page 50) between the symbols < and > has been
used so that they are not taken as ordinary character strings.
To write these characters with the keyboard you need to refer to the editor you are using. Generally,
you need to use a combination of the keys CTRL and/or ALT followed by the decimal code of the
character in question.
Character CR (13

10

, 0D

H

), required to end each line of instructions

51

, is automatically added by the

editor, together with LF (10

10

, 0A

H

), when you start a new line: in the examples it is in any case

made explicit for greater clarity.
In the same way, the PRINT instruction in Basic automatically adds the CR and LF characters at the
end of the line that, even though they do not appear, permit the machine to work correctly in
accordance with what is stated above.
To better understand the examples, we advise you to refer frequently to the syntax of each of the
commands used (see sect. 2.1 on page 3).

2.3.1

Geometric figures

The following examples print the label shown in fig. 29: the first example is a text file and the
second is a Basic program.

L
D11
PC
H15
1X1100000000010B390230002004
1X1100000400014L382004
E

OPEN "com1:9600,n,8,1" FOR OUTPUT AS #1 'open serial port number 1

PRINT #1, CHR$(2); "L" 'STX L switch to label definition mode
PRINT #1, "D11" 'select the dot size (h=1; v=1)
PRINT #1, "PC" 'select the print speed (C=2 ips)
PRINT #1, "H15" 'select the temperature of the head

'box

51

The line end may be replaced, in label definition mode, by another character using command T (see sect. 2.1.2.1.1 on

page 13) which is a local command and therefore applies only to the current label.

This manual is related to the following products: