EasyManuals Logo

Atari 800 Basic Reference Manual

Atari 800
122 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 #43 background imageLoading...
Page #43 background image
SIN
DEGIRAD
SPECIAL
PURPOSE
FUNCTIONS
ADR
FRE
PEEK
POKE
Format:
SIN(aexp)
Example:
100 X = SIN(Y)
Note:
Presumes
Y
previously
defined.
Returns
the
trigonometric
sine
of
the
expression
in
parentheses.
Format:
DEG
RAD
Example:
100 DEG
100
RAD
These
two
statements
allow
the
programmer
to
specify
degrees
or
radians
for
trigonometric
function
computations.
The
computer
defaults
to
radians
unles
s
DEG is specified.
Once
the
DEG
statement
has
been
executed,
RAD
must
be
used
to
return
to
radians.
See
Appendix
E
for
the
additional
trigonometric
functions
that
can
be
derived.
Format:
Example:
ADR(svar)
ADR(A$)
Returns
the
decimal
memory
address
ofthe
string
specified
by
the
expre
ss
ion
in
parentheses.
Knowing
the
address
enables
the
programmer
to
pass
th
e
informa-
tion
to
USR
routines,
etc. (See
USR
and
Appendix
D)
Format:
FRE(aexp)
Examples:
PRINT FRE (0)
100 IF
FRE
(0)<1000
THEN PRINT "MEMORY CRITICAL"
This
function
returns
th
e
number
ofbytes
of
u
ser
RAM
left.
Its
primary
use
is
in
Direct
mode
with
a
dummy
variable
(0)
to
inform
the
programmer
how
much
memory
space
remains
for
completion
of
a
program.
Of
course
FRE
can
also
be
used
within
a BASIC
program
in
Deferred
mode.
Format:
PEEK(aexp)
Examples:
1000 IF PEEK (4000) =
255
THEN
PRINT
"255"
100 PRINT
"LEFT
MARGIN IS"; PEEK (82)
Returns
the
contents
of
a
specified
memory
address
location
(aexp).
The
address
specified
must
be
an
integer
or
an
arithmetic
expression
th
at
evalua
te
s to
an
in
-
teger
between
0
and
65535
and
represe
nts
the
memory
addres
s
in
decimal
nota-
tion
(not
hexadecimal)
.
The
number
returned
will
also
be
a
decimal
integer
with
a
ran
ge
fr
om
0 to
255.
This
function
allows
the
user
to
examine
either
RAM
or
ROM locat
ion
s.
In
the
first
examp
le
above
,
the
PEEK is us
ed
to
determine
whether
l
ocation
4000
(decimal)
contains
the
number
255.
In
the
second
exam
-
ple,
the
PEEK
function
is u
sed
to
examine
the
left
margin.
Format:
POKE
aexp1,
aexp2
Examples:
POKE 82, 10
100 POKE 82,
20
Function Li
brary
35

Table of Contents

Other manuals for Atari 800

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Atari 800 and is the answer not in the manual?

Atari 800 Specifications

General IconGeneral
ProcessorMOS Technology 6502
Processor Speed1.79 MHz
ROM10 KB
GraphicsANTIC and GTIA chips
Release Year1979
Display Resolutionup to 320 x 192
Colors128 colors
Sound4 channels
StorageCartridge, cassette, floppy disk
PortsCartridge, serial, monitor
Operating SystemAtari OS

Related product manuals