Graphics
Printing simple patternsThe first example is just a simple program to show you how a graphics command, column reservation numbers, and data can be used in a BASIC program.
Type in and run the following program; be especially careful to include all semicolons. The program produces the printout you see below.
10 WIDTH "LPT1:",255
20 LPRINT CHR$(27);"*n ;cHR$(O);CHR$(4O);cHR$(o); jOFORX=lTO40
40LPRINTCHR$(1'10); 50 NEXT X
Line 20 specifies
Note: Some software programs (including most version of BASIC) automatically insert carriage return and line feed codes after every 80 or 130 characters. This is usually no problem with text, but it can spoil your graphics. For every
In some versions of BASIC you can prevent this unwanted control code insertion by putting a WIDTH statement at the beginning of all graphics programs. The format in many forms of BASIC is either WIDTH “LPT1:“, 255 or WIDTH LPRINT 255. Check your software manual for the proper format.