Now type in:
Run
To improve the movement of the character across the screen, add the following line:
3 0 c a l l &bd19
This program can be further enhanced to improve the movement by adding some delay loops and by
using a different returning character symbol.
Type in:
list
Now add the following lines to the program:
6 0 f o r n = 1 t o 3 0 0 : n e x t n
6 5 f o r x = 3 9 t o 1 s t e p -1
70 locate x,20
75 call &bd19
8 0 p r i n t c h r $ ( 2 5 1 ) ; ” “
85 next x
9 0 f o r n = 1 t o 3 0 0 : n e x t n
95 goto 10
r u n
Try this interesting small program. We have added some other commands that will be explained in
later chapters. For now, just type in:
new
10 mode 1
2 0 l o c a t e 2 1 , 1 4 : p r i n t c h r S ( 2 4 4 )
30 tag
40 for x=0 to 624 step 2
5 0 m o v e r -16,0
6 0 i f x < 3 0 8 o r x > 3 4 0 x > 3 4 0 t h e n y = 1 9 6 : g o t o 9 0
70 if x<324 then y=x-104:goto 85
80 y=536-x
85 sound 1,0,20,7
9 0 m o v e o x , o y : p r i n t “ “ ; : o x = x : o y = y
100 move x,y
1 1 0 i f ( x m o d 4 ) = 0 t h e n p r i n t c h r $ ( 2 5 0 ) ;
e l s e p r i n t c h r S ( 2 5 1 ) ;
1 2 0 f o r n = 1 t o 4 : c a l l & b d 1 9 : n e x t n
130 next x
140 tagoff
150 goto 20
run
Содержание CPC464
Страница 1: ......
Страница 32: ...or you can type 3e1 1e1 ENTER 300 2 3000x1000 Type 3e3 1e3 ENTER 3000000 3 3000x0 001 Type 3e3 1e 3 ENTER 3 ...
Страница 102: ...PRINT 10 AND 12 Results in 8 PRINT 10 AND 1000 Results in 8 again ...
Страница 118: ...TO DO DRAW THIS PAGE ...
Страница 219: ...actual value may be made to vary during the execution of a program ...
Страница 240: ...Text and WINDOW planner Mode 2 80 Columns ...
Страница 241: ......
Страница 245: ...Sound envelope Music planner sheet ...