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 #238 background imageLoading...
Page #238 background image
Chapter
10
I
BASIC
Keywords
ON
PLAY()
GOSUB
Statement
ON
PLAY(number)
GOSUB
line
Transfers program control to a subroutine when the number
of
notes in the background music buffer goes from
number
to
num-
ber
minus
1.
This event trapping allows continuous music by let-
ting you maintain a full music buffer.
Number
is an integer in the range
1
to 32, indicating that con-
trol should transfer to
line
when the number of notes left in the
music buffer is less than
number.
Line
is the first line of the subroutine to execute when the num-
ber
of
notes in the music buffer is less than
number.
If you spec-
ify Line
0,
you turn off play event trapping. Use the RETURN
statement to exit the subroutine.
BASIC executes the ON PLAY() GOSUB statement only when
playing background music (PLAY “MB”) and if the PLAY
ON
statement has been executed to enable event trapping.
If a PLAY STOP statement
has
been issued to halt event trap-
ping temporarily, BASIC executes the subroutine immediately
after the next PLAY ON statement.
When you execute the
ON
PLAY() GOSUB statement, BASIC
immediately issues a PLAY() STOP to prevent recursive traps.
When BASIC executes the RETURN from the subroutine, it au-
tomatically executes another PLAY0 ON statement
to
enable
trapping again, unless the subroutine executes a PLAY0
OFF
statement
.
Notes:
BASIC does not issue a play event trap if the
background music queue is already empty when you
execute a PLAY ON.
The PLAY statement is supported by a 32-element mu-
sic queue. Given that “normal” and “staccato” notes
are constructed from 2-note elements, the queue can
contain as few as
16
notes or as many as 32 notes.
236

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