Radio Shack TRS-80 Operation Manual page 138

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

Advertisement

Computer Graphics
Operation Manual
- - - - - - - - - - T R S..BO
® - - - - - - - - - -
2. Load BASICG and type in this program:
5 SCREEN
~
l~
DEFDBL Y
2~
CLR
3~
LINE
(~,12~)-(64~,12~)
4~
LINE
(32~,~)-(32~,24~)
5~
FOR
X=~
TO
64~
6~
PI=3.l4l259
7~ Xl=X/64~*2*PI-PI
8~ Y=SIN(Xl)*l~~
9~
IF
Y>l~~
THEN X=X+7
l~~
PSET
(X,-Y+12~)
ll~
NEXT X
l2~ GLOCATE(~,~),~
l3~
PRINT #-3,"THIS IS A SINE WAVE."
3. RUN the program.
The program draws a sine wave on the Graphics Screen
(graphics memory) and prints the statement in line
l3~
("THIS IS A SINE WAVE.") on the Graphics Screen.
4. SINE (for sine wave) is the name we are giving this
TRSDOS file.
To save the contents of the graphics
memory (which now includes the converted video memory)
to diskette, type:
CMD"I","GSAVE SINE" <ENTER>.
5. The graphics memory is saved as a TRSDOS file on your
diskette and you will return to TRSDOS Ready.
6. Type:
GCLS <ENTER>
The graphics memory is now cleared.
7. To load the file back into memory, type:
GLOAD SINE <ENTER>
The display is now on the Graphics Screen.
8. To print, type:
GPRINT <ENTER>.
----------ltadlOlllaeli - - - - - - - - -
-134-

Advertisement

Table of Contents
loading

Table of Contents