If you need fewer than 255 columns of graphics, n1 is the number of columns you want and n2 is zero. As you can see in Table 6-1,how- ever, a single eight-inch line will hold as many as 1920 columns in quadruple-density. Specifying more than 255 is where the second number slot (N2) fits in. The first number that you send (n1) indicates a number of columns, but the second does not represent a number of columns; it is multiplied by 256 and added to n1. The command for the maximum number of dot positions you can reserve is:

CHR$(27)"*"CHR$(3)CHR$(192)CHR$(12);

which is 192 dot positions plus 12 times 256 dot positions, for a total of 3264 dot positions in one row.

Once you have chosen the number of columns you want to use, you can have your program do the calculations for you with the following format:

CHR$(27)"L"CHR$(N MOD 256)CHR$(INT(N/256));

The variable N is the total number of columns you want to specify. The MOD (modulus) function calculates the value for n1, and the INT (integer) function calculates the value for n2. For programming languages other than BASIC, consult your manual for the proper form for these functions.

This format can be used with any graphics density and with any value of N up to the maximum number of columns per line for that density.

Designing Your Own Graphics

This section takes you through the development of a graphics pro- gram. The example is not especially complicated, but it does include the same steps you would use for a more complex figure so that you have the basis for designing graphics on your FX-286.

6-11