Radio Shack TRS-80 Operation Manual page 53

Hide thumbs Also See for TRS-80:
Table of Contents

Advertisement

Operation Manual
Computer Graphics
- - - - - - - - - - - T R S - B O
® - - - - - - - - - -
Hints and Tips about PUT:
An Illegal Function Call error will result if you
attempt to PUT a rectangular pixel area to a section of
the screen which is totally or partially beyond the
parameters of the screen.
For example:
GET(5~,5~)-(15~,15~),V
PUT(2~~,2~~),V,PSET
returns an error because the rectangular pixel area
cannot be physically moved to the specified rectangular
pixel area (i.e.,
(2~~,2~~)-(3~~,3~~».
If you use PUT with a viewport (see VIEW), all
coordinates must be within the parameters of the
viewport or you'll get an Illegal Function Call error.
Examples
PUT with PSET
l~
DIM V% (63 )
15 SCREEN
~
2~
CIRCLE
(3~,3~),1~
3~
GET
(1~,1~)-(4~,4~),V%
4~
FOR I=l TO
5~~:
NEXT I
5~
CLR
6~
PUT
(ll~,ll~),V%,PSET
7~
FOR I=l TO
5~~:
NEXT I
In this example, the circle is drawn, stored, moved and re-created.
First the white-bordered circle appears in the upper left corner of
the screen (position
(3~,3~)
-- program line
2~).
After a couple
of seconds (because of the delay loop), it disappears and then
reappears on the screen --
(ll~,ll~)
program line
6~.
What specifically happened is:
1. An array was created (line
l~).
2. A circle was drawn (line
2~).
3. GET -- The circle which was within the source
rectangular pixel area, as specified in the GET
---------lIadlOlllaell---------
-51-

Advertisement

Table of Contents
loading

Table of Contents