Tandy 1000 Basic Reference Manual page 304

Hide thumbs Also See for 1000:
Table of Contents

Advertisement

Chapter 10 I BASIC Ke,ywords
SCREEN
Function
SCREEN
(row, column,
[
num ber])
Returns the ASCII code for the character at the specified row
and column.
Row
is an integer in the range
1
to
25.
Column
is an integer in the range
1 to 80. Column
must be in
the range for the current screen mode.
Number
is applicable only for text mode. If you specify a non-zero
number,
SCREEN returns the color attribute, rather than the
ASCII code, of the character. The attribute is in the range of
0
to
255,
and can be translated as follows:
attribute
MOD 16
=
foreground color
(((attribute
-
foreground)/
16)MOD 128)
=
background color
(number>l27)
is true (-1) if the character is blinking and false
(0)
if it is not.
In the graphics modes, if the location does not contain a stan-
dard ASCII character, BASIC returns a value of zero.
Sample Program
1 0
L O C Q T E 2 0 , 2 0
20
P R I N T " R O B B I E "
30
A
=
SCREEN(20,20):B
=
S C R E E N ( 2 0 , 2 l )
4 0 P R I N T
A,B
Line
10
positions the cursor to Row
20,
Column
20.
Line
20
prints the message
at
the current cursor position. Line
30
stores
the ASCII code for
"R'
in the variable A and the ASCII code for
"0" in variable B. Line 40 prints:
8 2
79
302

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents