Commodore 16 User Manual page 71

Hide thumbs Also See for Commodore 16:
Table of Contents

Advertisement

SCNCLR
SSHAPE/GSHAPE
SCNCLR
SSHAPE and GSHAPE are used to save and restore rectangular areas
of multicolour or high resolution screens using BASIC string variables
Clears the current screen, whether graphics, text, or both (split screen).
The command to save an area is:
SSHAPE string variable, al ,b1 La2.b21
SOUND
SOUND voice fr, frequency control, duration
This statement produces a SOUND using one of three voices with a
frequency controi in the range 0. 1023 for a duration 01 0 - 65535 60ths
of a second.
V
Voice
Voice 1 (tone)
2
Voice 2 (tone)
3
Voice 2 (white noise)
If a SOUND for voice N is requested, and the previous SOUND for the
same N is still playing, BASIC waits for the previous SOUND to
complete. SOUND with a duration of 0 is a special case. it causes
BASIC to turn oft the current SOUND for that voice immediately,
regardless of the time remaining on the previous SOUND See the
MUSIC NOTE TABLE in the appendix for the frequency control values
that correspond to real notes.
string variable
String name to save data in
at ,b1
Corner coordinate (scaled)
a2,b2
Corner coordinate opposite (al
)(default is the
PC)
Because BASIC limits siring lengths to 255 characters the size of the
area you may save is limited. The string size required can be
calculated using one of the following (unsealed) formulas:
L(mcm) = INT ( (ABS(a1-a2) + 1)/4 + .99) • (ABS(b1 -b2) + 1) + 4
L(h-r) = INT ( (ABS(al-a2) + 1) / 8 + .99) • (ABS(bl-b2) + 1) + 4
(mcm) refers to multi-colour mode; (h-r) Is high resolution.
The shape is saved row by row. The last four bytes of the string
contain the column and row lengths less one (i.e.: ABS (al -a2) ) in low/
high byte formal (if scaled divide the lengths by 3.2 (X) and 5.12 (Y) ).
The command to display a saved shape on any area of the screen
GSHAPE string variable name [, [a,b1l.mode. 1 ]
EXAMPLE
SOUND 2, 800, 3600
string .....
:Contains shape to be drawn
al)
Top left coordinate telling where to draw tee shape
mode
(scaled - the default is the PC)
Replacement mode;
0: place shape as is (default)
1: place field inverted shape
2: OR shape with area
3: AND snape with area
4: XOR shape with area
Plays a note using voice 2 with
frequency set at 800 for one
minute
138
139

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the Commodore 16 and is the answer not in the manual?

Questions and answers

Table of Contents