EasyManua.ls Logo

Atari 65XE - Page 79

Atari 65XE
135 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Run the program. A light green line goes across the top of the screen.
After plotting a pixel, use the DRAWTO command to plot a second
pixel and draw a connecting line between the two. Line 40 tells the
computer to plot a pixel at column 39, row 0, and then connect them.
Now type
DRAWTO 39,19
The command plots a pixel in the bottom right corner of the graphics
screen, just above the text window, and then draws a line to connect
39,0 to 39,19. Now type
DRAWTO 0,19
To complete the rectangle, type
DRAWTO 0,0
Now type GR.0 and list the program. Add these lines:
50 DRAWTO 39,19
60 DRAWTO 0,19
70 DRAWTO 0,0
SETCOLOR and COLOR
When you run the program, the computer draws a green rectangle
again. To brighten up the screen, type
35 COLOR 1
45 COLOR 2
55 COLOR 1
65 COLOR 3
Run the program to see a rectangle of many colors.
To change the color in a register, use SETCOLOR. You might conclude
that COLOR 1 selects the color for register 1 and that COLOR 2
selects the color for register 2. Unfortunately, that conclusion is not
quite true. Mode 3 has four registers and four colors—but the
registers are numbered 0, 1, 2, and 4, and the colors are numbered 0,
1, 2, and 3. To keep things straight, make a chart:
Color 0 = Register 4 Black
Color 1 = Register 0 Orange
Color 2 = Register 1 Light green
Color 3 = Register 2 Dark blue
74

Related product manuals