Sharp MZ-700 Owner's Manual page 66

Hide thumbs Also See for MZ-700:
Table of Contents

Advertisement

64
3.
Drawing a rectangle around the edge of the screen.
10
PRINT "[!]
"
20
FOR
X=0
TO
79
30 SET
X.0
40
SET
X.
49
5
0
NE XT
X
60
FOR
Y=0
T
O
49
70 SET
0
.
y
80 SET 79.
y
90 NEXT
y
1
00
GOTO
1
00
4.
A program which simulates the ripples produced by throwing a pebble into a
pond.
1
0
X=4
0:Y
=25
2
0
DEF FN
YC
Z
)
=SQR
C
R
*
R-Z*Z
)
30
PRINT
"[!]
"
:S
ET
X.
Y
40
R.......:R+5
50
FOR
Z=0
TO R
60
T=FNY
C Z)
70 SET
X+Z
.
Y+T
80 SET
X+Z. Y-T
90 SET
X-Z. Y+T
1
00
SET
X-Z
. Y-T
110 NEXT Z
120
IF R<>25
THEN
40
130 GOTO 130
5.
A
program which simulates a ball bouncing off four walls.
1
0
20
30
40
5
0
60
70
8
0
90
100
110
120
130
140
150
160
200
250
Note
PRINT "[!]
"
FOR X=
0
TO
79
SET
X.0:S
ET X. 49
NE XT
X
FOR
Y=0
TO 49
SET
0. Y:S
ET 79.
Y
NE XT
Y
X=79*RND
C
1
)
:
Y=49*RND
C
1
)
A=1 :
8=1
SET
X. Y
IF
X<2
GOSUB 200
IF
X>
78 GOSUB 200
IF
Y<
2 GOSUB 250
IF
Y>48
GOSUB 250
RESET X.
Y
X=X+A:Y=Y+B:GOTO
1
00
A=-A:MUSIC
"
+A
0"
RETURN
B=-B
:MUS
IC
"
A0
"
:
RETURN
As
to JOY command, refer to the instruction manual of Joy Stick.

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents