ROM Computer Magazine Archive ROM MAGAZINE ISSUE 1 — AUGUST/SEPTEMBER 1983 / PAGE 3

Starting Page
By Peter Ellison
    This section each issue will contain programs and tutorials that will help the beginning programmer get started. There will be articles in mostly basic and sometimes a little machine or assembler.
    The first program is one that illustrates animation by using strings and player/missile graphics. When run a small orange man will run across the middle of the screen moving his arms and legs as would a real man would if running.

10 GRAPHICS 0:COLOR 3:SETCOLOR 2,16,1
90 REM DECLARATION OF VARIABLES
100 DIM P$(66),V$(33),D$(10)
110 FOR I=1 TO 22
115 REM READ PLAYER DATA
120 READ D$
130 P$(3*I-2,3*I)=D$
140 NEXT I
160 X=50:Y=60
165 REM INITIALIZE PLAYER/MISSILES
170 POKE 559,46
180 I=PEEK (106)-8:POKE 54279,I
190 PB=256*I
200 POKE 53277,3
210 FOR I=PB+512 TO PB+640
220 POKE I,0
230 NEXT I
240 POKE 704,55
250 POKE 53248,X
255 POKE 53256,1
260 C=C+1
270 IF C>2 THEN C=1
280 ON C GOTO 290,300,290
290 V$=P$(1,33):GOTO 310
300 V$=P$(34,66)
310 FOR I=1 TO 11
320 POKE PB+512+Y+I,VAL(V$(3*I-2,3*I))
330 NEXT I
340 X=X+2:POKE 53248,X
350 IF X>190 THEN 350
360 GOTO 260
390 REM PLAYER DATA
400 DATA 008,020,008,029,
042,072,040,012,018,114,067
410 DATA 008,020,008,024,
024,030,008,012,024,032,028

    The second listing is a little different for it deals with another subject, sound. Sounds for the Atari can be made very easily in that all that you need to use is the Basic statement Sound A,B,C,D where A=the voice from 0-3,B=the pitch from 1-255,C=the distortion from 0-14(even numbers only), and D=the volume from 1-15(0 for rest or off). This list turns your keyboard into an organ which plays the chords from low C to high F. When the program is run you can press any letter from A to R to play all of the chords. S or X will stop the sound completely. Remember if you have any programs or suggestions that you'd like to see done in 'Starting Page' please write.

0 DATA 81,64,53
1 DATA 96,76,64
2 GOTO 100
5 DATA 91,72,60
6 FOR K=1 TO 3:SOUND K,0,14,0:NEXT K
7 K=PEEK(764)
8 IF K=255 THEN 7
10 DATA 60,47,40
11 RESTORE K
12 DATA 53,42,35
13 FOR K=1 TO 3:READ S:SOUND K,S,14,6:NEXT K
14 TRAP 30000
15 DATA 108,85,72
17 GOTO 7
18 DATA 193,153,128
21 DATA 217,173,144
23 DATA 0,0,0
35 DATA 64,50,42
37 DATA 72,57,47
40 DATA 45,35,29
42 DATA 162,128,108
47 DATA 47,37,31
56 DATA 144,114,96
57 DATA 121,95,81
58 DATA 182,144,121
61 DATA 128,102,85
62 DATA 0,0,0
63 DATA 243,193,162
100 GRAPHICS 1:SETCOLOR 2,16,1:POSITION
7,10:? #6;"CHORDS"
30000 GOTO 7
 (Refer to Yellow Brick Road to see how PEEK(764) is used).

START