EasyManuals Logo

Tandy 1000 Basic Reference Manual

Default Icon
411 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
Page #261 background imageLoading...
Page #261 background image
Chapter
10
I
BASIC Keywords
PEN
Function
PEN(
num
ber)
Returns the light pen’s coordinates.
Number
is
a
number in the range
0
to
9 that tells BASIC what
to
return. Values
0-5
return
x,y
coordinates corresponding
to
the
current screen mode. Values 6-9 return the character row
or
col-
umn position.
0
1
2
3
4
5
6
7
8
9
Returns
a
-1
if pen button has been pressed since last
poll. Returns
a
0
if not.
Returns the
x
coordinate (horizontal) where the pen
was last activated.
Returns the
y
coordinate (vertical) where the pen was
last activated.
Returns a
-1
if the pen button is being pressed. Re-
turns
a
0
if it is up.
Returns the last known valid
x
coordinate
(horizontal).
Returns the last known valid
y
coordinate (vertical).
Returns the character row position where the pen was
last activated.
Returns the character column position where the pen
was last activated.
Returns the last known character
row
position.
Returns the last known character column position.
You must execute
a
PEN
ON
statement before executing the
PEN
function. If
you
do not, an “Illegal function call” error
occurs.
Example
A
=
PENC1)
returns the
x
coordinate
of
the pen.
259

Table of Contents

Other manuals for Tandy 1000

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Tandy 1000 and is the answer not in the manual?

Tandy 1000 Specifications

General IconGeneral
ProcessorIntel 8088
Processor Speed4.77 MHz
RAM128 KB (expandable to 640 KB)
Operating SystemMS-DOS 2.11
ManufacturerTandy Corporation
Release Year1984
StorageSingle or double 5.25" floppy disk drive (360 KB), optional hard drive
SoundTandy 3-voice sound
PortsParallel, Serial
GraphicsCGA (Color Graphics Adapter)
Graphics Modes320x200, 640x200

Related product manuals