If you need fewer than 255 columns of graphics, nl is the number of columns you want and n2 is 0. As you can see in Table 7-1 , however , a single line will hold as many as 1,920 columns in quadruple-density. Specifying more than 255 is where the second number slot (n2) fits in. The first number that you send (nl), indicates a number of columns, but the second does not represent a number of columns; it is multiplied by 256 and added to nl. The command for the maximum number of dots you can reserve on the MPS 1000 is: CHR$(27)''Z''CHR$(128)CHR$(7); 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)); N is the total number of columns you want to specify. The MOD (mod- ulus) function calculates the value for nl, and the INT (integer) func- tion 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. WIDTH Statements Many computer systems automatically insert the control codes for a carriage return and a line feed after every 80 characters. This insertion is usually no problem with text, but it can spoil your graphics.
In the graphics mode they may insert the control codes after 120 columns, which could be in the middle of a line. You can usually prevent these unwanted control codes with a WIDTH statement such as the one below: The format for your system may be different. Consult your computer or computer language manual to find the correct format for your system. Then put a WIDTH statement in one of the first lines of all your graph- ics programs. It is easier to put a WIDTH statement in all but the simplest of your programs than to examine each one to see whether or not such a statement is necessary. WIDTH "LPTl:" . 255 89