Home » Personal collection » Acorn tapes » Electron_User » Electron_User_tape19b_acorn_eu_1991_february.wav » Dragon

Dragon

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 » Personal collection » Acorn tapes » Electron_User » Electron_User_tape19b_acorn_eu_1991_february.wav
Filename: Dragon
Read OK:
File size: 0519 bytes
Load address: FFFF1900
Exec address: FFFF8023
Duplicates

There are 2 duplicate copies of this file in the archive:

File contents
   10REM DRAGON CURVE PROGRAM
   20REM by Joachim Lous
   30REM (c) The Micro User 
   40:
   50REM Trap filing system errors:
   60ON ERROR IF ERR>100 GOTO 550 ELSE VDU26:REPORT:PRINT" at line ";ERL:END 
   70MODE1
   80PROCinit
   90REPEAT
  100INPUT'"How many levels:"levl%
  110UNTIL levl%>0 AND levl% <20
  120PRINT:DIM side%(levl%)
  130FOR A%=0 TO levl% 
  140side%(A%)=1
  150NEXT
  160PROCangle(lth,levl%)
  170PRINT'"Save this screen? (Y/N):";:a$=GET$
  180IF a$="Y" OR  a$="y" INPUT''"Filename:"file$:PRINT'':PROCoscli("SAVE "+file$+" 3000 8000")
  190PRINT''"Quit? (Y/N):";:a$=GET$
  200IF a$="n" OR a$="N" RUN 
  210MODE 7:END
  220:
  230DEFPROCturn(A%)
  240angl%=(angl%+A%)MOD360
  250IF angl%<0 angl%=angl%+360
  260dir=RAD(angl%)
  270ENDPROC
  280:
  290DEFPROCfowd(A)
  300x=x+A*COS(dir):y=y+A*SIN(dir)
  310DRAW x,y
  320ENDPROC
  330:
  340DEFPROCinit
  350COLOUR 1:PRINT SPC(9) "D R A G O N   C U R V E "
  360x=300:y=600:angl%=0:dir=0
  370lth=800:const=SQR(.5)
  380VDU 19,1,1,0,0,0,19,2,4,0,0,0
  390VDU 23,1,0;0;0;0;28,3,3,35,2
  400GCOL0,2:MOVE0,0:DRAW0,980 
  410DRAW1279,980:DRAW1279,0:DRAW0,0
  420GCOL 0,1:MOVE x,y
  430ENDPROC
  440:
  450DEFPROCangle(lth,levl%)
  460levl%=levl%-1:lth=lth*const
  470side%(levl%)=-side%(levl%)
  480PROCturn(side%(levl%)*45) 
  490IF levl%>0 PROCangle(lth,levl%) ELSE PROCfowd(lth)
  500PROCturn(-side%(levl%)*90)
  510IF levl%>0 PROCangle(lth,levl%) ELSE PROCfowd(lth) 
  520PROCturn(side%(levl%)*45)
  530ENDPROC
  540:
  550REM File error handling:
  560REPORT:PRINT'"Try again? (Y/N):";
  570a$=GET$:IF a$="Y" OR a$="y" GOTO 180 ELSE GOTO 190
  580GCOL 0,1
  590:
  600DEFPROCoscli($&700):LOCAL X%,Y%:X%=0:Y%=7:CALL &FFF7:ENDPROC

� DRAGON CURVE PROGRAM
� by Joachim Lous
� (c) The Micro User 
(:
2 � Trap filing system errors:
<0� � � �>100 � �TfB � �26:�:�" at line ";�:� 
F�1
P	�init
Z�
d�'"How many levels:"levl%
n� levl%>0 � levl% <20
x�:� side%(levl%)
�� A%=0 � levl% 
�side%(A%)=1
��
��angle(lth,levl%)
�&�'"Save this screen? (Y/N):";:a$=�
�Q� a$="Y" �  a$="y" �''"Filename:"file$:�'':�oscli("SAVE "+file$+" 3000 8000")
��''"Quit? (Y/N):";:a$=�
�� a$="n" � a$="N" � 
�	� 7:�
�:
���turn(A%)
�angl%=(angl%+A%)�360
�� angl%<0 angl%=angl%+360
dir=�(angl%)
�
:
"
��fowd(A)
,x=x+A*�(dir):y=y+A*�(dir)
6	� x,y
@�
J:
T
��init
^)� 1:� �(9) "D R A G O N   C U R V E "
hx=300:y=600:angl%=0:dir=0
rlth=800:const=�(.5)
|� 19,1,1,0,0,0,19,2,4,0,0,0
�� 23,1,0;0;0;0;28,3,3,35,2
��0,2:�0,0:�0,980 
��1279,980:�1279,0:�0,0
�� 0,1:� x,y
��
�:
���angle(lth,levl%)
�levl%=levl%-1:lth=lth*const
�side%(levl%)=-side%(levl%)
��turn(side%(levl%)*45) 
�,� levl%>0 �angle(lth,levl%) � �fowd(lth)
��turn(-side%(levl%)*90)
�-� levl%>0 �angle(lth,levl%) � �fowd(lth) 
�turn(side%(levl%)*45)
�
:
&� File error handling:
0�:�'"Try again? (Y/N):";
:*a$=�:� a$="Y" � a$="y" � �tt@ � � �t~@
D	� 0,1
N:
X.��oscli($&700):� X%,Y%:X%=0:Y%=7:� &FFF7:�
�
00000000  0d 00 0a 1a f4 20 44 52  41 47 4f 4e 20 43 55 52  |..... DRAGON CUR|
00000010  56 45 20 50 52 4f 47 52  41 4d 0d 00 14 15 f4 20  |VE PROGRAM..... |
00000020  62 79 20 4a 6f 61 63 68  69 6d 20 4c 6f 75 73 0d  |by Joachim Lous.|
00000030  00 1e 19 f4 20 28 63 29  20 54 68 65 20 4d 69 63  |.... (c) The Mic|
00000040  72 6f 20 55 73 65 72 20  0d 00 28 05 3a 0d 00 32  |ro User ..(.:..2|
00000050  20 f4 20 54 72 61 70 20  66 69 6c 69 6e 67 20 73  | . Trap filing s|
00000060  79 73 74 65 6d 20 65 72  72 6f 72 73 3a 0d 00 3c  |ystem errors:..<|
00000070  30 ee 20 85 20 e7 20 9f  3e 31 30 30 20 e5 20 8d  |0. . . .>100 . .|
00000080  54 66 42 20 8b 20 ef 32  36 3a f6 3a f1 22 20 61  |TfB . .26:.:." a|
00000090  74 20 6c 69 6e 65 20 22  3b 9e 3a e0 20 0d 00 46  |t line ";.:. ..F|
000000a0  06 eb 31 0d 00 50 09 f2  69 6e 69 74 0d 00 5a 05  |..1..P..init..Z.|
000000b0  f5 0d 00 64 1d e8 27 22  48 6f 77 20 6d 61 6e 79  |...d..'"How many|
000000c0  20 6c 65 76 65 6c 73 3a  22 6c 65 76 6c 25 0d 00  | levels:"levl%..|
000000d0  6e 19 fd 20 6c 65 76 6c  25 3e 30 20 80 20 6c 65  |n.. levl%>0 . le|
000000e0  76 6c 25 20 3c 32 30 0d  00 78 14 f1 3a de 20 73  |vl% <20..x..:. s|
000000f0  69 64 65 25 28 6c 65 76  6c 25 29 0d 00 82 13 e3  |ide%(levl%).....|
00000100  20 41 25 3d 30 20 b8 20  6c 65 76 6c 25 20 0d 00  | A%=0 . levl% ..|
00000110  8c 0f 73 69 64 65 25 28  41 25 29 3d 31 0d 00 96  |..side%(A%)=1...|
00000120  05 ed 0d 00 a0 15 f2 61  6e 67 6c 65 28 6c 74 68  |.......angle(lth|
00000130  2c 6c 65 76 6c 25 29 0d  00 aa 26 f1 27 22 53 61  |,levl%)...&.'"Sa|
00000140  76 65 20 74 68 69 73 20  73 63 72 65 65 6e 3f 20  |ve this screen? |
00000150  28 59 2f 4e 29 3a 22 3b  3a 61 24 3d be 0d 00 b4  |(Y/N):";:a$=....|
00000160  51 e7 20 61 24 3d 22 59  22 20 84 20 20 61 24 3d  |Q. a$="Y" .  a$=|
00000170  22 79 22 20 e8 27 27 22  46 69 6c 65 6e 61 6d 65  |"y" .''"Filename|
00000180  3a 22 66 69 6c 65 24 3a  f1 27 27 3a f2 6f 73 63  |:"file$:.'':.osc|
00000190  6c 69 28 22 53 41 56 45  20 22 2b 66 69 6c 65 24  |li("SAVE "+file$|
000001a0  2b 22 20 33 30 30 30 20  38 30 30 30 22 29 0d 00  |+" 3000 8000")..|
000001b0  be 1b f1 27 27 22 51 75  69 74 3f 20 28 59 2f 4e  |...''"Quit? (Y/N|
000001c0  29 3a 22 3b 3a 61 24 3d  be 0d 00 c8 18 e7 20 61  |):";:a$=...... a|
000001d0  24 3d 22 6e 22 20 84 20  61 24 3d 22 4e 22 20 f9  |$="n" . a$="N" .|
000001e0  20 0d 00 d2 09 eb 20 37  3a e0 0d 00 dc 05 3a 0d  | ..... 7:.....:.|
000001f0  00 e6 0e dd f2 74 75 72  6e 28 41 25 29 0d 00 f0  |.....turn(A%)...|
00000200  18 61 6e 67 6c 25 3d 28  61 6e 67 6c 25 2b 41 25  |.angl%=(angl%+A%|
00000210  29 83 33 36 30 0d 00 fa  1d e7 20 61 6e 67 6c 25  |).360..... angl%|
00000220  3c 30 20 61 6e 67 6c 25  3d 61 6e 67 6c 25 2b 33  |<0 angl%=angl%+3|
00000230  36 30 0d 01 04 10 64 69  72 3d b2 28 61 6e 67 6c  |60....dir=.(angl|
00000240  25 29 0d 01 0e 05 e1 0d  01 18 05 3a 0d 01 22 0d  |%).........:..".|
00000250  dd f2 66 6f 77 64 28 41  29 0d 01 2c 1d 78 3d 78  |..fowd(A)..,.x=x|
00000260  2b 41 2a 9b 28 64 69 72  29 3a 79 3d 79 2b 41 2a  |+A*.(dir):y=y+A*|
00000270  b5 28 64 69 72 29 0d 01  36 09 df 20 78 2c 79 0d  |.(dir)..6.. x,y.|
00000280  01 40 05 e1 0d 01 4a 05  3a 0d 01 54 0a dd f2 69  |.@....J.:..T...i|
00000290  6e 69 74 0d 01 5e 29 fb  20 31 3a f1 20 89 28 39  |nit..^). 1:. .(9|
000002a0  29 20 22 44 20 52 20 41  20 47 20 4f 20 4e 20 20  |) "D R A G O N  |
000002b0  20 43 20 55 20 52 20 56  20 45 20 22 0d 01 68 1d  | C U R V E "..h.|
000002c0  78 3d 33 30 30 3a 79 3d  36 30 30 3a 61 6e 67 6c  |x=300:y=600:angl|
000002d0  25 3d 30 3a 64 69 72 3d  30 0d 01 72 17 6c 74 68  |%=0:dir=0..r.lth|
000002e0  3d 38 30 30 3a 63 6f 6e  73 74 3d b6 28 2e 35 29  |=800:const=.(.5)|
000002f0  0d 01 7c 1f ef 20 31 39  2c 31 2c 31 2c 30 2c 30  |..|.. 19,1,1,0,0|
00000300  2c 30 2c 31 39 2c 32 2c  34 2c 30 2c 30 2c 30 0d  |,0,19,2,4,0,0,0.|
00000310  01 86 1e ef 20 32 33 2c  31 2c 30 3b 30 3b 30 3b  |.... 23,1,0;0;0;|
00000320  30 3b 32 38 2c 33 2c 33  2c 33 35 2c 32 0d 01 90  |0;28,3,3,35,2...|
00000330  15 e6 30 2c 32 3a ec 30  2c 30 3a df 30 2c 39 38  |..0,2:.0,0:.0,98|
00000340  30 20 0d 01 9a 1a df 31  32 37 39 2c 39 38 30 3a  |0 .....1279,980:|
00000350  df 31 32 37 39 2c 30 3a  df 30 2c 30 0d 01 a4 0f  |.1279,0:.0,0....|
00000360  e6 20 30 2c 31 3a ec 20  78 2c 79 0d 01 ae 05 e1  |. 0,1:. x,y.....|
00000370  0d 01 b8 05 3a 0d 01 c2  16 dd f2 61 6e 67 6c 65  |....:......angle|
00000380  28 6c 74 68 2c 6c 65 76  6c 25 29 0d 01 cc 1f 6c  |(lth,levl%)....l|
00000390  65 76 6c 25 3d 6c 65 76  6c 25 2d 31 3a 6c 74 68  |evl%=levl%-1:lth|
000003a0  3d 6c 74 68 2a 63 6f 6e  73 74 0d 01 d6 1e 73 69  |=lth*const....si|
000003b0  64 65 25 28 6c 65 76 6c  25 29 3d 2d 73 69 64 65  |de%(levl%)=-side|
000003c0  25 28 6c 65 76 6c 25 29  0d 01 e0 1b f2 74 75 72  |%(levl%).....tur|
000003d0  6e 28 73 69 64 65 25 28  6c 65 76 6c 25 29 2a 34  |n(side%(levl%)*4|
000003e0  35 29 20 0d 01 ea 2c e7  20 6c 65 76 6c 25 3e 30  |5) ...,. levl%>0|
000003f0  20 f2 61 6e 67 6c 65 28  6c 74 68 2c 6c 65 76 6c  | .angle(lth,levl|
00000400  25 29 20 8b 20 f2 66 6f  77 64 28 6c 74 68 29 0d  |%) . .fowd(lth).|
00000410  01 f4 1b f2 74 75 72 6e  28 2d 73 69 64 65 25 28  |....turn(-side%(|
00000420  6c 65 76 6c 25 29 2a 39  30 29 0d 01 fe 2d e7 20  |levl%)*90)...-. |
00000430  6c 65 76 6c 25 3e 30 20  f2 61 6e 67 6c 65 28 6c  |levl%>0 .angle(l|
00000440  74 68 2c 6c 65 76 6c 25  29 20 8b 20 f2 66 6f 77  |th,levl%) . .fow|
00000450  64 28 6c 74 68 29 20 0d  02 08 1a f2 74 75 72 6e  |d(lth) .....turn|
00000460  28 73 69 64 65 25 28 6c  65 76 6c 25 29 2a 34 35  |(side%(levl%)*45|
00000470  29 0d 02 12 05 e1 0d 02  1c 05 3a 0d 02 26 1a f4  |).........:..&..|
00000480  20 46 69 6c 65 20 65 72  72 6f 72 20 68 61 6e 64  | File error hand|
00000490  6c 69 6e 67 3a 0d 02 30  1c f6 3a f1 27 22 54 72  |ling:..0..:.'"Tr|
000004a0  79 20 61 67 61 69 6e 3f  20 28 59 2f 4e 29 3a 22  |y again? (Y/N):"|
000004b0  3b 0d 02 3a 2a 61 24 3d  be 3a e7 20 61 24 3d 22  |;..:*a$=.:. a$="|
000004c0  59 22 20 84 20 61 24 3d  22 79 22 20 e5 20 8d 74  |Y" . a$="y" . .t|
000004d0  74 40 20 8b 20 e5 20 8d  74 7e 40 0d 02 44 09 e6  |t@ . . .t~@..D..|
000004e0  20 30 2c 31 0d 02 4e 05  3a 0d 02 58 2e dd f2 6f  | 0,1..N.:..X...o|
000004f0  73 63 6c 69 28 24 26 37  30 30 29 3a ea 20 58 25  |scli($&700):. X%|
00000500  2c 59 25 3a 58 25 3d 30  3a 59 25 3d 37 3a d6 20  |,Y%:X%=0:Y%=7:. |
00000510  26 46 46 46 37 3a e1 0d  ff                       |&FFF7:...|
00000519
Dragon.m0
Dragon.m1
Dragon.m2
Dragon.m4
Dragon.m5