Listing of file='DRINFO.SRC;01' on disk='vmedia/chip_62-sector.ccvf'
DRAW WITH JOYSTICK =========================================== by Myron T. Steffy, Sun City, Arizona 85351 The program 'DRAW' will allow you to draw straight lines on the screen with either a joystick or the number keys. It employs the 'Plot 242' vector function of Compucolor II which essentially connects two points on the screen with the shortest line. The direction of travel is similar to the way the numeric keypad ia arranged. That is, '8' = north, '2' = south, '4' and '6' = west and east respectively. Depressing two adjacent direction keys at the same time or moving the joystick to a diagonal position will give you a diagonal line. The center key, '5', erases the screen and plots the starting location, the exact center of the screen. The letter 'D' will exit to FCS control and 'ESC I' will re-enter. All eight color keys are active and black may be used to erase or black out a line that you have already drawn. When you change colors, the start and end points of the line are identical. Since the resolution of the 'Plot 242' mode is only 128 by 128, the points and lines produced are rather coarse. The method is similar to that described by Steve Perrigo in a recent issue of 'FORUM' (Vol. 2, No. 1) except that machine language is used to speed up the process. It succeeds so well that a delay loop, 'WATL', is necessary to slow it down. You may slow it down still more by changing the '1' at A148H to a larger number. For you guys with the super fast reflexes, change 'WATL' to 'WATS' in the subroutine 'PRINT'. Since WATL gives you a 20 millisecond delay for each count in the 'A' register and WATS only .5 millisecond, the increase is a factor of 40. You will probably have to make it loop several times, controlled by the number you stick into the 'A' register. To preserve your artwork, you might have a routine set up in Basic to 'Save' the screen display to a disc for later recall. There is at least one library program available for that purpose. As usual, have fun!