Graphtrax II
Chapter 5
Graphtrax II
Caution - Entering High Resolution SpaceTo create graphics on the
In the GRAPHICS mode we have complete control over which pins fire, and when. It sounds like a lot of fun, and is, but there are an awful lot of dots in just one line, let alone an entire page.
Think of it this way. There are 80 “regular” characters in a normal line (row). Each character is 6 dots wide (5 dots plus 1 blank column). That comes to 480 columns in each row. Good grief!
Fortunately, we don’t have to fill all 480 columns on every line. In fact, the first thing we do when entering graphics mode is tell the printer how many columns of dots we will send it, a row at a time.
Warp 3The graphics mode is entered by sending the printer a cluster or sequence of 3 codes:
FORMAT: | <ESC> "K" | N1 | N2 |
| - - - - - - - - - - - | - - - - - - - - - - - - - - - - - | |
EXAMPLE: | CHR$ (27) "K" | CHR$ (15) | CHR$ (0) |
CHR$ (27) is of course the Escape code, and Escape “K” means KICK into graphics mode.
CHR$ (15) says: “reserve 15 columns for graphics.” N1 can range from 0 to 255
CHR$ (0) If N2 is 0, it means “Ignore me, N1 specifies the number of columns to expect.”
If N2 is 1, the number of columns will equal N1 + 256. If this sum of N1 and N2 exceeds 480, only 480 columns will be reserved.
41