MZ-1P01
( Control characters )
|
Control characters for text mode |
Code |
BASIC |
Function |
$01 |
-
|
plotter will change to the text mode |
$02 |
MODE GR |
plotter will change to the graphic mode |
$03 |
SKIP -1 |
back space 1 line and decrement line counter |
$04 |
-
|
plotter test command. Initiates default color to color
0 ( black ) and resets text width to 1 ( 40 characters per line
). Plotter's test output will be: ![plotter test output](images/plottest.gif) |
$090909 |
-
|
decrease text width from 1 to 0 ( 80 characters per
line ) |
$09090B |
-
|
increase text width from 0 to 1 ( 40 characters per
line ) |
$0909ASCII2ASCII1ASCII00D |
PAGE |
sets line counter. Sets the maximum number of lines
per page by ASCII2ASCII1ASCII0. The default by RESET or by power
on is 66. |
$0A |
SKIP 1 |
space 1 line. |
$0B |
-
|
increase text width from 1 to 2 ( 26 characters per
line ) |
$0C |
-
|
decrease text width from 2 to 1 ( 40 characters per
line ) |
$0D |
-
|
carriage return, moves to the left position of the
print area |
$0E |
-
|
back spaces 1 character if not at first position |
$0F |
-
|
page eject and reset line counter to 0 |
$1D |
-
|
change to next color |
|
Text width |
The text width is set to 1 ( 40 characters per line ) by RESET or by
power on. You can change the text width using the commands described
in the table above.
The text width can be set from 0 to 63 while the plotter is in the
graphic mode.
If the plotter mode is changed from the graphic mode to the text mode,
the text width will be set to 1 ( 40 characters per line ).
This is an example plotout with 26 characters per line:
|
Graphic commands overview |
Command |
BASIC
|
Format |
Function |
LINE TYPE |
-
|
LP ( P = 0 - 15 ) |
defines the type of a line
( continuous or dotted )
P = 0 continuous
P = 1 - 15 dotted
( 1 = - - -, 15 = - -
- - ) |
ALL INITIALIZE |
-
|
A |
sets the plotter to the text mode |
HOME |
PHOME |
H |
moves the pen to the home position without drawing |
INITIALIZE |
HSET |
I |
the present position becomes the home position |
DRAW |
LINE |
Dx, y, ... ,xn, yn
( -999 <= y <= 999 )
( -480 <= x >= 480 ) |
draws a line from the present position to x, y and from x, y to
the coordinates xn, yn |
RELATIVE DRAW |
RLINE |
Jdx, dy, ... ,dxn, dyn
( -999 <= dy <= 999 )
( -480 <= dx <= 480 ) |
draws a line from the present position to the relative coordinates
dx, dy and then continuously to dxn, dyn. The last coordinate becomes
the relative coordinate 0, 0 |
MOVE |
MOVE |
Mx, y
( -999 <= y <= 999 )
( -480 <= x >= 480 ) |
moves the pen to the coordinates x, y without drawing |
RELATIVE MOVE |
RMOVE |
Rdx, dy
( -999 <= dy <= 999 )
( -480 <= dx <= 480 ) |
moves the pen to the relative coordinates dx, dy without drawing |
COLOR CHANGE |
PCOLOR |
Cn ( n = 0 - 3 ) |
changes the color pen
0 = black, 1 = blue,
2 = green,
3 = red |
SCALE SET |
-
|
Sn ( n = 0 - 63 ) |
defines the width of the characters
( from 0 = small to 63 = big, variable ) |
ALPHA ROTATE |
-
|
Qn ( n = 0 - 3 ) |
defines the alignment of the characters
0 = ,
1 = ,
2 = ,
3 = ![left](../images/al.gif) |
PRINT |
-
|
Pc1Pc2Pc3 ... cn
( n =
) |
prints the defined character |
AXIS |
AXIS |
xp, q, r ( p = 0 or 1 )
( -999 <= q <= 999 )
( r = 1 - 255 ) |
draws the x-axis if p = 1 or the y-axis if p = 0 of a coordinate
system. q is the scale factor and r defines the number of scale
marks on each axis |
|
Format of the commands |
There are 5 types of commands:
1. Control characters excluding parameters
"A", "H", "I"
2. Control characters including 1 parameter
"L", "C", "S", "Q"
3. Control characters including pairs of parameters
"D", "J", "M", "R"
A comma delimits parameters and $0D ( CR ) terminates the parameter
list.
4. Control characters followed by a character string
"P"
$0D ( CR ) terminates the character string.
5. Control characters having 3 parameters
"X"
A comma delimits the parameters.
|
Format of the parameters |
1. Preceding zeroes will be ignored.
2. "-" negates a number.
3. If you define a number having more than 3 numerals, the 3 least
significant numerals will be executed.
4. Each parameter is to terminate by a comma or by CR ( $0D ). Following
characters other than comma or CR will be ignored until a comma or a
CR is found.
|
Short forms |
1. Each one byte command can be followed by a new one byte command.
CR is not necessary between the group, but to terminate all. Example:
"HD100,200" equals to "H" $0D "D100,200"
$0D.
2. Each command can be followed by further commands including one parameter
while delimiting with comma.
Example: "L0,S1,Q0,C1,D100,200" is valid.
3. A command including pairs of parameters is always to terminate with
CR.
|
Data resetting by changing the mode from graphic to text |
1. X- and Y-coordinate: Y is set to 0 and the first position at the
current line of the page becomes the home position.
2. Character alignment: Q is set to 0.
3. The character width is set to 1.
4. The type of a line LP will not be changed.
Download a programming example written
in BASIC for the plotter ( 4 Kbytes ) |