76
Now that you have defined a macro, let’s see how to use it. This program will print one line using several printing features. Then it “calls” the macro in line 60. When line 80 prints the style is “plain vanilla” because the macro has reset it.
10 LPRINT CHR$(27);"Q";CHR$(40);
20 LPRINT CHR$(27);"a";CHR$(2);
30 LPRINT
40 LPRINT CHR$(27);"h";CHR$(l);
50 LPRINT "TESTING ABCD"
60 LPRINT CHR$(27);"+";CHR$(l);
70 LPRINT "TESTING ABCD"
80 END
nReading a hex dump
The BASIC in some computers changes ASCII codes before they send them to the printer. If you run into problem because of this, try this hex dump to check the ASCII codes.
First turn off the printer. Hold down both the NLQ key and Paper Feed key and turn on the printer, then run the following program.
10 FOR I=0 TO 255
20 LPRINT CHR$(I);
30 NEXT I
40LPRINT
50END
If your system passes the codes directly to the printer without changing them, you will get a printout like this. (You can print out the last remaining line in the print buffer by putting the printer off line with the On Line key.)