PSB No: P-0082

Page: 3 of 14

10 INPUT “PointSiie”;A$

20B=VAL(A$)*2

21RESTORE 70 22FORX=l TO16 23READY

24IF B=Y THEN GOT0 30 25NMTX

26CLS

27PRINT A$ ” is not a valid point size choice.”

28GOT0 10

30C=VAL(A$)

40 LPRM CHR$(27);“X”;CHR$(l);CHR$(B);CHR$(O);”n‘lese are “;A$;”point characters”

50 LPRtNT CHR$(27);“(V”;CHR$(2);CHR$(O);CHR$(C);CHR$(o)

60 GOT0 10

70DATA 0,16,20,21,24,28,32,36,40,4~44,48,52,56,60,64 Line 10 - allows you to specify the point size desired.

Line 20 - computes the value for “nl”in the ESC X command.

tine 21 - check to ensure that a valid point size was input tf the point size is valid, the program jumps to line 30. tf the point size is not valid, the program prints a message on the screen and starts over again.

Line 30 - computes the value for “nl” for advancing paper using the ESC ( v command.

Line 40 - sends the “SetPitch and Point Size” command to the printer. (Note: The pitch is set for proportional spacing for ail point sizes to ensure proper character spacing regardless of the point size.)

Line 50 - sends the “Set Relative Vertical Position” command to the printer. This command advances the paper in preparation for printing the next line.

Line60- causes the program to start again at the beginning.

NOTE: To hatt the program, hold down the “CMkey and press the “c”key.