Home » CEEFAX disks » telesoftware9.adl » 26-09-88/PRJECTL

26-09-88/PRJECTL

This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.

Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.

Tape/disk: Home » CEEFAX disks » telesoftware9.adl
Filename: 26-09-88/PRJECTL
Read OK:
File size: 05BF bytes
Load address: FFFF1900
Exec address: FFFF8023
Duplicates

There is 1 duplicate copy of this file in the archive:

File contents
   10 REM MOTION UNDER GRAVITY
   20 REM PROGRAM 1 - projectile motion
   30 REM             in gravity.
   40 REM ROB ANDERSON 1986
   50:
   60 DIM param%(9)
   70 FORa%=1TO9:READparam%(a%):NEXT
   80 ON ERROR GOTO90
   90 REPEAT
  100 MODE7
  110 PRINTTAB(7,2)CHR$131;"ANIMATION TECHNIQUES"'TAB(7,3)CHR$131;STRING$(20,"_")
  120 PRINT'CHR$130;"Program 1 - projectiles under gravity."
  130 RESTORE 520
  140 FORa%=10 TO 18:READ a$:PRINTTAB(2,a%)CHR$130;CHR$(a%+39);") ";a$;"  ";FNvalue;:NEXT
  150 PRINTTAB(2,22)CHR$131;"Press SPACE-BAR to animate"
  160 REPEAT
  170 a=GET
  180 UNTIL (a>48 AND a<58) OR a=32
  190 IF a=32 GOTO 220
  200 PRINTTAB(0,a-39)CHR$129;CHR$157;
  210 IF a<55 PRINTTAB(2,22)"Enter new value";STRING$(15," "):INPUT param%(a-48) ELSE param%(a-48)=FNtoggle
  220 UNTIL a=32
  230:
  240 MODE 1
  250 VDU5;23,129,24,60,126,255,255,126,60,24
  260 GCOL0,1
  270 X%=param%(4):Y%=param%(5)
  280 xvel%=param%(1):yvel%=param%(2)
  290 gravity=param%(3):damping=param%(6)
  300 MOVE X%,Y%
  310 PRINTCHR$129;
  320:
  330 REPEAT
  340 IF NOT param%(8) GCOL3,1:MOVEX%,Y%:PRINTCHR$129;
  350 X%=X%+xvel%
  360 Y%=Y%+yvel%
  370 yvel%=yvel%+gravity
  380 GCOL0,1:MOVEX%,Y%:PRINTCHR$129;
  390 IF param%(9) GCOL0,3:MOVE0,Y%:DRAW1500,Y%:GCOL0,2:MOVEX%,0:DRAWX%,1000
  400 IF param%(7) AND (Y%=param%(5) OR Y%+yvel%<param%(5)) yvel%=(yvel%*-1)+gravity-damping:IFyvel%<0 yvel%=0
  410 UNTIL X%>5000 OR X%<-5000 OR Y%>5000 OR Y%<-5000
  420 VDU7:REPEATUNTILFALSE
  430:
  440 DEFFNvalue
  450 IF a%<16 =param%(a%-9)
  460 IF param%(a%-9)=-1 ="ON" ELSE ="OFF"
  470:
  480 DEFFNtoggle
  490 IF param%(a-48)=0 =-1 ELSE =0
  500:
  510 DATA 26,50,-2,0,300,0,0,-1,-1
  520 DATA initial X velocity,initial Y velocity,acceleration due to gravity,initial X position,initial Y position,damping (when bounce on),bounce,after image,line references

 � MOTION UNDER GRAVITY
$ � PROGRAM 1 - projectile motion
 �             in gravity.
( � ROB ANDERSON 1986
2:
< � param%(9)
F �a%=1�9:�param%(a%):�
P � � �DZ@
Z �
d �7
n9 �7,2)�131;"ANIMATION TECHNIQUES"'�7,3)�131;�20,"_")
x4 �'�130;"Program 1 - projectiles under gravity."
� � �THB
�A �a%=10 � 18:� a$:�2,a%)�130;�(a%+39);") ";a$;"  ";�value;:�
�- �2,22)�131;"Press SPACE-BAR to animate"
� �
� a=�
� � (a>48 � a<58) � a=32
� � a=32 � �d\@
� �0,a-39)�129;�157;
�S � a<55 �2,22)"Enter new value";�15," "):� param%(a-48) � param%(a-48)=�toggle
� � a=32
�:
� � 1
�* �5;23,129,24,60,126,255,255,126,60,24
	 �0,1
 X%=param%(4):Y%=param%(5)
$ xvel%=param%(1):yvel%=param%(2)
"( gravity=param%(3):damping=param%(6)
, � X%,Y%
6 �129;
@:
J �
T% � � param%(8) �3,1:�X%,Y%:�129;
^ X%=X%+xvel%
h Y%=Y%+yvel%
r yvel%=yvel%+gravity
| �0,1:�X%,Y%:�129;
�8 � param%(9) �0,3:�0,Y%:�1500,Y%:�0,2:�X%,0:�X%,1000
�h � param%(7) � (Y%=param%(5) � Y%+yvel%<param%(5)) yvel%=(yvel%*-1)+gravity-damping:�yvel%<0 yvel%=0
�. � X%>5000 � X%<-5000 � Y%>5000 � Y%<-5000
� �7:���
�:
� ݤvalue
� � a%<16 =param%(a%-9)
�% � param%(a%-9)=-1 ="ON" � ="OFF"
�:
�
 ݤtoggle
� � param%(a-48)=0 =-1 � =0
�:
� � 26,50,-2,0,300,0,0,-1,-1
� � initial X velocity,initial Y velocity,acceleration due to gravity,initial X position,initial Y position,damping (when bounce on),bounce,after image,line references
�
00000000  0d 00 0a 1b 20 f4 20 4d  4f 54 49 4f 4e 20 55 4e  |.... . MOTION UN|
00000010  44 45 52 20 47 52 41 56  49 54 59 0d 00 14 24 20  |DER GRAVITY...$ |
00000020  f4 20 50 52 4f 47 52 41  4d 20 31 20 2d 20 70 72  |. PROGRAM 1 - pr|
00000030  6f 6a 65 63 74 69 6c 65  20 6d 6f 74 69 6f 6e 0d  |ojectile motion.|
00000040  00 1e 1e 20 f4 20 20 20  20 20 20 20 20 20 20 20  |... .           |
00000050  20 20 69 6e 20 67 72 61  76 69 74 79 2e 0d 00 28  |  in gravity...(|
00000060  18 20 f4 20 52 4f 42 20  41 4e 44 45 52 53 4f 4e  |. . ROB ANDERSON|
00000070  20 31 39 38 36 0d 00 32  05 3a 0d 00 3c 10 20 de  | 1986..2.:..<. .|
00000080  20 70 61 72 61 6d 25 28  39 29 0d 00 46 1a 20 e3  | param%(9)..F. .|
00000090  61 25 3d 31 b8 39 3a f3  70 61 72 61 6d 25 28 61  |a%=1.9:.param%(a|
000000a0  25 29 3a ed 0d 00 50 0e  20 ee 20 85 20 e5 8d 44  |%):...P. . . ..D|
000000b0  5a 40 0d 00 5a 06 20 f5  0d 00 64 07 20 eb 37 0d  |Z@..Z. ...d. .7.|
000000c0  00 6e 39 20 f1 8a 37 2c  32 29 bd 31 33 31 3b 22  |.n9 ..7,2).131;"|
000000d0  41 4e 49 4d 41 54 49 4f  4e 20 54 45 43 48 4e 49  |ANIMATION TECHNI|
000000e0  51 55 45 53 22 27 8a 37  2c 33 29 bd 31 33 31 3b  |QUES"'.7,3).131;|
000000f0  c4 32 30 2c 22 5f 22 29  0d 00 78 34 20 f1 27 bd  |.20,"_")..x4 .'.|
00000100  31 33 30 3b 22 50 72 6f  67 72 61 6d 20 31 20 2d  |130;"Program 1 -|
00000110  20 70 72 6f 6a 65 63 74  69 6c 65 73 20 75 6e 64  | projectiles und|
00000120  65 72 20 67 72 61 76 69  74 79 2e 22 0d 00 82 0b  |er gravity."....|
00000130  20 f7 20 8d 54 48 42 0d  00 8c 41 20 e3 61 25 3d  | . .THB...A .a%=|
00000140  31 30 20 b8 20 31 38 3a  f3 20 61 24 3a f1 8a 32  |10 . 18:. a$:..2|
00000150  2c 61 25 29 bd 31 33 30  3b bd 28 61 25 2b 33 39  |,a%).130;.(a%+39|
00000160  29 3b 22 29 20 22 3b 61  24 3b 22 20 20 22 3b a4  |);") ";a$;"  ";.|
00000170  76 61 6c 75 65 3b 3a ed  0d 00 96 2d 20 f1 8a 32  |value;:....- ..2|
00000180  2c 32 32 29 bd 31 33 31  3b 22 50 72 65 73 73 20  |,22).131;"Press |
00000190  53 50 41 43 45 2d 42 41  52 20 74 6f 20 61 6e 69  |SPACE-BAR to ani|
000001a0  6d 61 74 65 22 0d 00 a0  06 20 f5 0d 00 aa 08 20  |mate".... ..... |
000001b0  61 3d a5 0d 00 b4 1b 20  fd 20 28 61 3e 34 38 20  |a=..... . (a>48 |
000001c0  80 20 61 3c 35 38 29 20  84 20 61 3d 33 32 0d 00  |. a<58) . a=32..|
000001d0  be 12 20 e7 20 61 3d 33  32 20 e5 20 8d 64 5c 40  |.. . a=32 . .d\@|
000001e0  0d 00 c8 18 20 f1 8a 30  2c 61 2d 33 39 29 bd 31  |.... ..0,a-39).1|
000001f0  32 39 3b bd 31 35 37 3b  0d 00 d2 53 20 e7 20 61  |29;.157;...S . a|
00000200  3c 35 35 20 f1 8a 32 2c  32 32 29 22 45 6e 74 65  |<55 ..2,22)"Ente|
00000210  72 20 6e 65 77 20 76 61  6c 75 65 22 3b c4 31 35  |r new value";.15|
00000220  2c 22 20 22 29 3a e8 20  70 61 72 61 6d 25 28 61  |," "):. param%(a|
00000230  2d 34 38 29 20 8b 20 70  61 72 61 6d 25 28 61 2d  |-48) . param%(a-|
00000240  34 38 29 3d a4 74 6f 67  67 6c 65 0d 00 dc 0b 20  |48)=.toggle.... |
00000250  fd 20 61 3d 33 32 0d 00  e6 05 3a 0d 00 f0 08 20  |. a=32....:.... |
00000260  eb 20 31 0d 00 fa 2a 20  ef 35 3b 32 33 2c 31 32  |. 1...* .5;23,12|
00000270  39 2c 32 34 2c 36 30 2c  31 32 36 2c 32 35 35 2c  |9,24,60,126,255,|
00000280  32 35 35 2c 31 32 36 2c  36 30 2c 32 34 0d 01 04  |255,126,60,24...|
00000290  09 20 e6 30 2c 31 0d 01  0e 1e 20 58 25 3d 70 61  |. .0,1.... X%=pa|
000002a0  72 61 6d 25 28 34 29 3a  59 25 3d 70 61 72 61 6d  |ram%(4):Y%=param|
000002b0  25 28 35 29 0d 01 18 24  20 78 76 65 6c 25 3d 70  |%(5)...$ xvel%=p|
000002c0  61 72 61 6d 25 28 31 29  3a 79 76 65 6c 25 3d 70  |aram%(1):yvel%=p|
000002d0  61 72 61 6d 25 28 32 29  0d 01 22 28 20 67 72 61  |aram%(2).."( gra|
000002e0  76 69 74 79 3d 70 61 72  61 6d 25 28 33 29 3a 64  |vity=param%(3):d|
000002f0  61 6d 70 69 6e 67 3d 70  61 72 61 6d 25 28 36 29  |amping=param%(6)|
00000300  0d 01 2c 0c 20 ec 20 58  25 2c 59 25 0d 01 36 0b  |..,. . X%,Y%..6.|
00000310  20 f1 bd 31 32 39 3b 0d  01 40 05 3a 0d 01 4a 06  | ..129;..@.:..J.|
00000320  20 f5 0d 01 54 25 20 e7  20 ac 20 70 61 72 61 6d  | ...T% . . param|
00000330  25 28 38 29 20 e6 33 2c  31 3a ec 58 25 2c 59 25  |%(8) .3,1:.X%,Y%|
00000340  3a f1 bd 31 32 39 3b 0d  01 5e 10 20 58 25 3d 58  |:..129;..^. X%=X|
00000350  25 2b 78 76 65 6c 25 0d  01 68 10 20 59 25 3d 59  |%+xvel%..h. Y%=Y|
00000360  25 2b 79 76 65 6c 25 0d  01 72 18 20 79 76 65 6c  |%+yvel%..r. yvel|
00000370  25 3d 79 76 65 6c 25 2b  67 72 61 76 69 74 79 0d  |%=yvel%+gravity.|
00000380  01 7c 17 20 e6 30 2c 31  3a ec 58 25 2c 59 25 3a  |.|. .0,1:.X%,Y%:|
00000390  f1 bd 31 32 39 3b 0d 01  86 38 20 e7 20 70 61 72  |..129;...8 . par|
000003a0  61 6d 25 28 39 29 20 e6  30 2c 33 3a ec 30 2c 59  |am%(9) .0,3:.0,Y|
000003b0  25 3a df 31 35 30 30 2c  59 25 3a e6 30 2c 32 3a  |%:.1500,Y%:.0,2:|
000003c0  ec 58 25 2c 30 3a df 58  25 2c 31 30 30 30 0d 01  |.X%,0:.X%,1000..|
000003d0  90 68 20 e7 20 70 61 72  61 6d 25 28 37 29 20 80  |.h . param%(7) .|
000003e0  20 28 59 25 3d 70 61 72  61 6d 25 28 35 29 20 84  | (Y%=param%(5) .|
000003f0  20 59 25 2b 79 76 65 6c  25 3c 70 61 72 61 6d 25  | Y%+yvel%<param%|
00000400  28 35 29 29 20 79 76 65  6c 25 3d 28 79 76 65 6c  |(5)) yvel%=(yvel|
00000410  25 2a 2d 31 29 2b 67 72  61 76 69 74 79 2d 64 61  |%*-1)+gravity-da|
00000420  6d 70 69 6e 67 3a e7 79  76 65 6c 25 3c 30 20 79  |mping:.yvel%<0 y|
00000430  76 65 6c 25 3d 30 0d 01  9a 2e 20 fd 20 58 25 3e  |vel%=0.... . X%>|
00000440  35 30 30 30 20 84 20 58  25 3c 2d 35 30 30 30 20  |5000 . X%<-5000 |
00000450  84 20 59 25 3e 35 30 30  30 20 84 20 59 25 3c 2d  |. Y%>5000 . Y%<-|
00000460  35 30 30 30 0d 01 a4 0b  20 ef 37 3a f5 fd a3 0d  |5000.... .7:....|
00000470  01 ae 05 3a 0d 01 b8 0c  20 dd a4 76 61 6c 75 65  |...:.... ..value|
00000480  0d 01 c2 1a 20 e7 20 61  25 3c 31 36 20 3d 70 61  |.... . a%<16 =pa|
00000490  72 61 6d 25 28 61 25 2d  39 29 0d 01 cc 25 20 e7  |ram%(a%-9)...% .|
000004a0  20 70 61 72 61 6d 25 28  61 25 2d 39 29 3d 2d 31  | param%(a%-9)=-1|
000004b0  20 3d 22 4f 4e 22 20 8b  20 3d 22 4f 46 46 22 0d  | ="ON" . ="OFF".|
000004c0  01 d6 05 3a 0d 01 e0 0d  20 dd a4 74 6f 67 67 6c  |...:.... ..toggl|
000004d0  65 0d 01 ea 1e 20 e7 20  70 61 72 61 6d 25 28 61  |e.... . param%(a|
000004e0  2d 34 38 29 3d 30 20 3d  2d 31 20 8b 20 3d 30 0d  |-48)=0 =-1 . =0.|
000004f0  01 f4 05 3a 0d 01 fe 1f  20 dc 20 32 36 2c 35 30  |...:.... . 26,50|
00000500  2c 2d 32 2c 30 2c 33 30  30 2c 30 2c 30 2c 2d 31  |,-2,0,300,0,0,-1|
00000510  2c 2d 31 0d 02 08 aa 20  dc 20 69 6e 69 74 69 61  |,-1.... . initia|
00000520  6c 20 58 20 76 65 6c 6f  63 69 74 79 2c 69 6e 69  |l X velocity,ini|
00000530  74 69 61 6c 20 59 20 76  65 6c 6f 63 69 74 79 2c  |tial Y velocity,|
00000540  61 63 63 65 6c 65 72 61  74 69 6f 6e 20 64 75 65  |acceleration due|
00000550  20 74 6f 20 67 72 61 76  69 74 79 2c 69 6e 69 74  | to gravity,init|
00000560  69 61 6c 20 58 20 70 6f  73 69 74 69 6f 6e 2c 69  |ial X position,i|
00000570  6e 69 74 69 61 6c 20 59  20 70 6f 73 69 74 69 6f  |nitial Y positio|
00000580  6e 2c 64 61 6d 70 69 6e  67 20 28 77 68 65 6e 20  |n,damping (when |
00000590  62 6f 75 6e 63 65 20 6f  6e 29 2c 62 6f 75 6e 63  |bounce on),bounc|
000005a0  65 2c 61 66 74 65 72 20  69 6d 61 67 65 2c 6c 69  |e,after image,li|
000005b0  6e 65 20 72 65 66 65 72  65 6e 63 65 73 0d ff     |ne references..|
000005bf
26-09-88/PRJECTL.m0
26-09-88/PRJECTL.m1
26-09-88/PRJECTL.m2
26-09-88/PRJECTL.m4
26-09-88/PRJECTL.m5