EasyManua.ls Logo

Commodore 128 - Page 341

Commodore 128
448 pages
Print Icon
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...
when:
n=1, POT returns the position of paddle #1
n=2, POT returns the position of paddle #2
n=3, POT returns the position of paddle #3
n=4, POT returns the position of paddle #4
The values for POT range from 0 to 255. Any value of 256 or
more means that the fire button is also depressed.
EXAMPLE:
10 PRINT POT(1)
20 IF POT(1) >=256 THEN PRINT FIRE
This example displays the value of the game paddle 1.
Note: a value of 255 is returned if no paddles are connected.
RCLR
Return color of color source
RCLR(N)
This function returns the color (1 to 16) assigned to the color
source N (0< N < 6), where the following N values apply:
0 = 40-column background
1 = bit map foreground
2 = multicolor 1
3 = multicolor 2
4 = 40-column border
5 = 40- or 80-column character color
6 = 80-column background color
The counterpart to the RCLR function is the COLOR command.
EXAMPLE:
10 FOR I = 0 TO 6
20 PRINT SOURCE;l;IS COLOR CODE;RCLR(l)
30 NEXT
This example prints the color codes for all seven color sources.
18-13

Table of Contents

Other manuals for Commodore 128

Related product manuals