Commodore 128 Programmer's Reference Manual page 89

Hide thumbs Also See for 128:
Table of Contents

Advertisement

I
i
I 1
BASIC BUILDING BLOCKS AND BASIC 7.0 ENCYCLOPEDIA
79
j i
POS
j j
Return the current cursor column position within the current screen window
POS(X)
[
I
; j
The POS function indicates where the cursor is within the defined screen window. X is a
dummy argument, which must be specified, but the value is ignored. The values
^
returned range from 0-39 on the VIC screen and 0-79 on the 80-column screen.
i
^
EXAMPLE:
<_»
FOR I = 1 to 10 : ?SPC(I); POS(O): NEXT
i !
This displays the current cursor position within the defined text window.
n
Returns the value of the game-paddle potentiometer
I j
POT(n)
when:
?—*
I
i
! i
n = 1, POT returns the position of paddle #1 (control port 1)
n = 2, POT returns the position of paddle #2 (control port 1)
p
n = 3, POT returns the position of paddle #3 (control port 2)
j j
n = 4, POT returns the position of paddle #4 (control port 2)
r^
The values for POT range from 0 to 255. Any value of 256 or more means that the fire
i
button is also depressed.
EXAMPLE:
j [
10 PRINT POT(l)
20 IF POT(l) > 256 THEN PRINT "FIRE"
<"■*
This example displays the value of game paddle 1.
J !
RCLR
r
J
Return color of color source
RCLR(N)
This function returns the color (1 through 16) assigned to the color source N (0< = N = <
6), where the following N values apply:

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents