Language Reference

SCALE

Example Use the SCALE command to draw Y=X2 on the spectrum-analyzer display.

130

OUTPUT 723;"CLRDSP;"

Clear graphics from memory .

140

OUTPUT 723;"TRDSP TRA,OFF;"

Turn o￿ trace A.

150

OUTPUT 723;"ANNOT OFF;"

Turn o￿ annotation.

160

OUTPUT 723;"GRAT OFF;"

Turn o￿ graticule .

170

OUTPUT 723;"SCALE -10,10,0,100;"

Change minimum and maximum

 

 

 

 

 

values for the X axis to 010 and 10

 

 

 

 

 

and the Y axis to 0 and 100.

180

OUTPUT 723;"PU;PA -10,0;"

Outline the perimeter of the coordi-

 

 

 

 

 

nate system.

190

OUTPUT 723;"PD;PA -10,100,";

Semicolon suppresses carriage-return/line-

 

 

 

 

 

feed.

200

OUTPUT

723;"10,100,10,0,-10,0;"

 

210

OUTPUT

723;"VARDEF

XAXIS,-10;"

De￿ne user-de￿ned variable , XAXIS,

 

 

 

 

 

equal to 010.

220

OUTPUT

723;"VARDEF

YAXIS,0;"

De￿ne user-de￿ned variable , YAXIS,

 

 

 

 

 

equal to 0.

230

OUTPUT

723;"PU;PA

-10,100;PD;"

Move pen.

240

OUTPUT

723;"REPEAT;";

Begin repeat loop .

250

OUTPUT

723;"ADD

XAXIS,XAXIS,1;";

Increase XAXIS by 1.

260

OUTPUT

723;"MPY

YAXIS,XAXIS,XAXIS;";

Square XAXIS.

270

OUTPUT

723;"PA

XAXIS,YAXIS;";

Plot square function point by point

 

 

 

 

 

until reaching the end of the X axis

 

 

 

 

 

scale.

280

OUTPUT

723;"UNTIL

XAXIS,EQ,10;"

End repeat loop when XAXIS=10.

290

OUTPUT

723;"PA

PU -1,80;"

Write label.

300OUTPUT 723;"TEXT$Y=X"

310OUTPUT 723;CHR$(130);"$;"

7-436