Home » Recent acquisitions » Acorn ADFS disks » adfs_ArchimedesWorld_199403_2.adf » Disk2Mar94 » !AWMar94/Goodies/yass/!Yass2/Savers/Path

!AWMar94/Goodies/yass/!Yass2/Savers/Path

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 » Recent acquisitions » Acorn ADFS disks » adfs_ArchimedesWorld_199403_2.adf » Disk2Mar94
Filename: !AWMar94/Goodies/yass/!Yass2/Savers/Path
Read OK:
File size: 0700 bytes
Load address: 0000
Exec address: 0000
File contents
    1REM
    2REM Yass 2 Screen Saver Module : Path
    3REM
    4REM LEN copyright Ian Palmer, 1993
    5REM
    6
    7DEFFNpath_start
    8LOCAL A%
    9PROCclearscreen(-1)
   10path_c%=RND(8)+7:p_BX%=max_x% DIV 64:p_BY%=max_y% DIV 64
   11path_tab%=FNmalloc((p_BX%+1)*(p_BY%+1))
   12IF path_tab%=0 THEN =TRUE
   13FOR A%=0 TO (p_BX%*p_BY%-1):path_tab%?A%=0:NEXT
   14p_X%=RND(p_BX%-2)*64:p_Y%=RND(p_BY%-2)*64:p_dir%=RND(4)
   15PROCpath_set:path_done%=0
   16SYS &35,-1,4 TO ,,p_sx%:p_sx%=1<<p_sx%:SYS &35,-1,5 TO ,,p_sy%:p_sy%=1<<p_sy%
   17=0
   18
   19DEFPROCpath_set
   20?(path_tab%+(p_X% DIV 64)+p_BX%*(p_Y% DIV 64))=1
   21ENDPROC
   22
   23DEFFNpath_poll
   24LOCAL A%
   25IF path_done% THEN
   26  IF (now_going%-path_at%)>500 THEN =TRUE
   27ELSE
   28  PROCset_colour(0,path_c%):FOR A%=1 TO 2
   29  IF p_dir%<3 THEN
   30    MOVE 32+p_X%,32+p_Y%-8:DRAW 32+p_X%,32+p_Y%+8
   31    IF p_dir%=1 THEN p_X%+=p_sx%:ELSE p_X%-=p_sx%
   32    IF (p_X% MOD 64)=0 THEN PROCpath_set:path_done%=FNpath_newdir:path_at%=now_going%
   33  ELSE
   34    MOVE 32+p_X%-8,32+p_Y%:DRAW 32+p_X%+8,32+p_Y%
   35    IF p_dir%=3 THEN p_Y%+=p_sy%:ELSE p_Y%-=p_sy%
   36    IF (p_Y% MOD 64)=0 THEN PROCpath_set:path_done%=FNpath_newdir:path_at%=now_going%
   37  ENDIF:NEXT
   38ENDIF
   39=0
   40
   41DEFFNpath_dirok(X%,Y%,D%)
   42IF D%=1 X%+=1:ELSE IF D%=2 X%-=1:ELSE IF D%=3 Y%+=1:ELSE Y%-=1
   43IF X%<0 OR Y%<0 OR X%>=p_BX% OR Y%>=p_BY% THEN =FALSE
   44IF ?(path_tab%+X%+Y%*p_BX%)=0 THEN =TRUE
   45=FALSE
   46
   47DEFFNpath_dead(X%,Y%)
   48LOCAL D%
   49FOR D%=1 TO 4:IF FNpath_dirok(X%,Y%,D%) THEN =FALSE
   50NEXT
   51=TRUE
   52
   53DEFFNpath_newdir
   54LOCAL X%,Y%,D%
   55X%=p_X% DIV 64:Y%=p_Y% DIV 64
   56IF FNpath_dead(X%,Y%) THEN =FNpath_warp
   57REPEAT:D%=RND(4):UNTIL FNpath_dirok(X%,Y%,D%)
   58p_dir%=D%:=FALSE
   59
   60DEFFNpath_warp
   61LOCAL A%,F%,X%,Y%,D%:F%=TRUE:FOR A%=0 TO (p_BX%*p_BY%-1)
   62IF ?(path_tab%+A%)=0 THEN F%=FALSE
   63NEXT:IF F% THEN =TRUE
   64REPEAT:X%=RND(p_BX%)-1:Y%=RND(p_BY%)-1:UNTIL NOT(FNpath_dead(X%,Y%)) AND ?(path_tab%+X%+Y%*p_BX%)<>0
   65REPEAT:D%=RND(4):UNTIL FNpath_dirok(X%,Y%,D%)
   66p_X%=X%*64:p_Y%=Y%*64
   67p_dir%=D%:=FALSE
   68
   69DEFFNpath_stop
   70PROCfree(path_tab%)
   71=0
   72
�
'� Yass 2 Screen Saver Module : Path
�
"� � copyright Ian Palmer, 1993
�

ݤpath_start
� A%
	�clearscreen(-1)

6path_c%=�(8)+7:p_BX%=max_x% � 64:p_BY%=max_y% � 64
*path_tab%=�malloc((p_BX%+1)*(p_BY%+1))
� path_tab%=0 � =�

-� A%=0 � (p_BX%*p_BY%-1):path_tab%?A%=0:�
5p_X%=�(p_BX%-2)*64:p_Y%=�(p_BY%-2)*64:p_dir%=�(4)
�path_set:path_done%=0
Mș &35,-1,4 � ,,p_sx%:p_sx%=1<<p_sx%:ș &35,-1,5 � ,,p_sy%:p_sy%=1<<p_sy%
=0

��path_set
0?(path_tab%+(p_X% � 64)+p_BX%*(p_Y% � 64))=1
�

ݤpath_poll
� A%
� path_done% �
&  � (now_going%-path_at%)>500 � =�
�
'  �set_colour(0,path_c%):� A%=1 � 2
  � p_dir%<3 �
/    � 32+p_X%,32+p_Y%-8:� 32+p_X%,32+p_Y%+8
.    � p_dir%=1 � p_X%+=p_sx%:� p_X%-=p_sx%
 O    � (p_X% � 64)=0 � �path_set:path_done%=�path_newdir:path_at%=now_going%
!  �
"/    � 32+p_X%-8,32+p_Y%:� 32+p_X%+8,32+p_Y%
#.    � p_dir%=3 � p_Y%+=p_sy%:� p_Y%-=p_sy%
$O    � (p_Y% � 64)=0 � �path_set:path_done%=�path_newdir:path_at%=now_going%
%	  �:�
&�
'=0
(
)ݤpath_dirok(X%,Y%,D%)
*6� D%=1 X%+=1:� � D%=2 X%-=1:� � D%=3 Y%+=1:� Y%-=1
+.� X%<0 � Y%<0 � X%>=p_BX% � Y%>=p_BY% � =�
,%� ?(path_tab%+X%+Y%*p_BX%)=0 � =�
-=�
.
/ݤpath_dead(X%,Y%)
0� D%
1+� D%=1 � 4:� �path_dirok(X%,Y%,D%) � =�
2�
3=�
4
5ݤpath_newdir
6� X%,Y%,D%
7X%=p_X% � 64:Y%=p_Y% � 64
8%� �path_dead(X%,Y%) � =�path_warp
9%�:D%=�(4):� �path_dirok(X%,Y%,D%)
:p_dir%=D%:=�
;
<ݤpath_warp
=2� A%,F%,X%,Y%,D%:F%=�:� A%=0 � (p_BX%*p_BY%-1)
>� ?(path_tab%+A%)=0 � F%=�
?�:� F% � =�
@V�:X%=�(p_BX%)-1:Y%=�(p_BY%)-1:� �(�path_dead(X%,Y%)) � ?(path_tab%+X%+Y%*p_BX%)<>0
A%�:D%=�(4):� �path_dirok(X%,Y%,D%)
Bp_X%=X%*64:p_Y%=Y%*64
Cp_dir%=D%:=�
D
Eݤpath_stop
F�free(path_tab%)
G=0
H
�
00000000  0d 00 01 05 f4 0d 00 02  27 f4 20 59 61 73 73 20  |........'. Yass |
00000010  32 20 53 63 72 65 65 6e  20 53 61 76 65 72 20 4d  |2 Screen Saver M|
00000020  6f 64 75 6c 65 20 3a 20  50 61 74 68 0d 00 03 05  |odule : Path....|
00000030  f4 0d 00 04 22 f4 20 a9  20 63 6f 70 79 72 69 67  |....". . copyrig|
00000040  68 74 20 49 61 6e 20 50  61 6c 6d 65 72 2c 20 31  |ht Ian Palmer, 1|
00000050  39 39 33 0d 00 05 05 f4  0d 00 06 04 0d 00 07 10  |993.............|
00000060  dd a4 70 61 74 68 5f 73  74 61 72 74 0d 00 08 08  |..path_start....|
00000070  ea 20 41 25 0d 00 09 14  f2 63 6c 65 61 72 73 63  |. A%.....clearsc|
00000080  72 65 65 6e 28 2d 31 29  0d 00 0a 36 70 61 74 68  |reen(-1)...6path|
00000090  5f 63 25 3d b3 28 38 29  2b 37 3a 70 5f 42 58 25  |_c%=.(8)+7:p_BX%|
000000a0  3d 6d 61 78 5f 78 25 20  81 20 36 34 3a 70 5f 42  |=max_x% . 64:p_B|
000000b0  59 25 3d 6d 61 78 5f 79  25 20 81 20 36 34 0d 00  |Y%=max_y% . 64..|
000000c0  0b 2a 70 61 74 68 5f 74  61 62 25 3d a4 6d 61 6c  |.*path_tab%=.mal|
000000d0  6c 6f 63 28 28 70 5f 42  58 25 2b 31 29 2a 28 70  |loc((p_BX%+1)*(p|
000000e0  5f 42 59 25 2b 31 29 29  0d 00 0c 16 e7 20 70 61  |_BY%+1))..... pa|
000000f0  74 68 5f 74 61 62 25 3d  30 20 8c 20 3d b9 0d 00  |th_tab%=0 . =...|
00000100  0d 2d e3 20 41 25 3d 30  20 b8 20 28 70 5f 42 58  |.-. A%=0 . (p_BX|
00000110  25 2a 70 5f 42 59 25 2d  31 29 3a 70 61 74 68 5f  |%*p_BY%-1):path_|
00000120  74 61 62 25 3f 41 25 3d  30 3a ed 0d 00 0e 35 70  |tab%?A%=0:....5p|
00000130  5f 58 25 3d b3 28 70 5f  42 58 25 2d 32 29 2a 36  |_X%=.(p_BX%-2)*6|
00000140  34 3a 70 5f 59 25 3d b3  28 70 5f 42 59 25 2d 32  |4:p_Y%=.(p_BY%-2|
00000150  29 2a 36 34 3a 70 5f 64  69 72 25 3d b3 28 34 29  |)*64:p_dir%=.(4)|
00000160  0d 00 0f 1a f2 70 61 74  68 5f 73 65 74 3a 70 61  |.....path_set:pa|
00000170  74 68 5f 64 6f 6e 65 25  3d 30 0d 00 10 4d c8 99  |th_done%=0...M..|
00000180  20 26 33 35 2c 2d 31 2c  34 20 b8 20 2c 2c 70 5f  | &35,-1,4 . ,,p_|
00000190  73 78 25 3a 70 5f 73 78  25 3d 31 3c 3c 70 5f 73  |sx%:p_sx%=1<<p_s|
000001a0  78 25 3a c8 99 20 26 33  35 2c 2d 31 2c 35 20 b8  |x%:.. &35,-1,5 .|
000001b0  20 2c 2c 70 5f 73 79 25  3a 70 5f 73 79 25 3d 31  | ,,p_sy%:p_sy%=1|
000001c0  3c 3c 70 5f 73 79 25 0d  00 11 06 3d 30 0d 00 12  |<<p_sy%....=0...|
000001d0  04 0d 00 13 0e dd f2 70  61 74 68 5f 73 65 74 0d  |.......path_set.|
000001e0  00 14 30 3f 28 70 61 74  68 5f 74 61 62 25 2b 28  |..0?(path_tab%+(|
000001f0  70 5f 58 25 20 81 20 36  34 29 2b 70 5f 42 58 25  |p_X% . 64)+p_BX%|
00000200  2a 28 70 5f 59 25 20 81  20 36 34 29 29 3d 31 0d  |*(p_Y% . 64))=1.|
00000210  00 15 05 e1 0d 00 16 04  0d 00 17 0f dd a4 70 61  |..............pa|
00000220  74 68 5f 70 6f 6c 6c 0d  00 18 08 ea 20 41 25 0d  |th_poll..... A%.|
00000230  00 19 12 e7 20 70 61 74  68 5f 64 6f 6e 65 25 20  |.... path_done% |
00000240  8c 0d 00 1a 26 20 20 e7  20 28 6e 6f 77 5f 67 6f  |....&  . (now_go|
00000250  69 6e 67 25 2d 70 61 74  68 5f 61 74 25 29 3e 35  |ing%-path_at%)>5|
00000260  30 30 20 8c 20 3d b9 0d  00 1b 05 cc 0d 00 1c 27  |00 . =.........'|
00000270  20 20 f2 73 65 74 5f 63  6f 6c 6f 75 72 28 30 2c  |  .set_colour(0,|
00000280  70 61 74 68 5f 63 25 29  3a e3 20 41 25 3d 31 20  |path_c%):. A%=1 |
00000290  b8 20 32 0d 00 1d 12 20  20 e7 20 70 5f 64 69 72  |. 2....  . p_dir|
000002a0  25 3c 33 20 8c 0d 00 1e  2f 20 20 20 20 ec 20 33  |%<3 ..../    . 3|
000002b0  32 2b 70 5f 58 25 2c 33  32 2b 70 5f 59 25 2d 38  |2+p_X%,32+p_Y%-8|
000002c0  3a df 20 33 32 2b 70 5f  58 25 2c 33 32 2b 70 5f  |:. 32+p_X%,32+p_|
000002d0  59 25 2b 38 0d 00 1f 2e  20 20 20 20 e7 20 70 5f  |Y%+8....    . p_|
000002e0  64 69 72 25 3d 31 20 8c  20 70 5f 58 25 2b 3d 70  |dir%=1 . p_X%+=p|
000002f0  5f 73 78 25 3a 8b 20 70  5f 58 25 2d 3d 70 5f 73  |_sx%:. p_X%-=p_s|
00000300  78 25 0d 00 20 4f 20 20  20 20 e7 20 28 70 5f 58  |x%.. O    . (p_X|
00000310  25 20 83 20 36 34 29 3d  30 20 8c 20 f2 70 61 74  |% . 64)=0 . .pat|
00000320  68 5f 73 65 74 3a 70 61  74 68 5f 64 6f 6e 65 25  |h_set:path_done%|
00000330  3d a4 70 61 74 68 5f 6e  65 77 64 69 72 3a 70 61  |=.path_newdir:pa|
00000340  74 68 5f 61 74 25 3d 6e  6f 77 5f 67 6f 69 6e 67  |th_at%=now_going|
00000350  25 0d 00 21 07 20 20 cc  0d 00 22 2f 20 20 20 20  |%..!.  ..."/    |
00000360  ec 20 33 32 2b 70 5f 58  25 2d 38 2c 33 32 2b 70  |. 32+p_X%-8,32+p|
00000370  5f 59 25 3a df 20 33 32  2b 70 5f 58 25 2b 38 2c  |_Y%:. 32+p_X%+8,|
00000380  33 32 2b 70 5f 59 25 0d  00 23 2e 20 20 20 20 e7  |32+p_Y%..#.    .|
00000390  20 70 5f 64 69 72 25 3d  33 20 8c 20 70 5f 59 25  | p_dir%=3 . p_Y%|
000003a0  2b 3d 70 5f 73 79 25 3a  8b 20 70 5f 59 25 2d 3d  |+=p_sy%:. p_Y%-=|
000003b0  70 5f 73 79 25 0d 00 24  4f 20 20 20 20 e7 20 28  |p_sy%..$O    . (|
000003c0  70 5f 59 25 20 83 20 36  34 29 3d 30 20 8c 20 f2  |p_Y% . 64)=0 . .|
000003d0  70 61 74 68 5f 73 65 74  3a 70 61 74 68 5f 64 6f  |path_set:path_do|
000003e0  6e 65 25 3d a4 70 61 74  68 5f 6e 65 77 64 69 72  |ne%=.path_newdir|
000003f0  3a 70 61 74 68 5f 61 74  25 3d 6e 6f 77 5f 67 6f  |:path_at%=now_go|
00000400  69 6e 67 25 0d 00 25 09  20 20 cd 3a ed 0d 00 26  |ing%..%.  .:...&|
00000410  05 cd 0d 00 27 06 3d 30  0d 00 28 04 0d 00 29 1a  |....'.=0..(...).|
00000420  dd a4 70 61 74 68 5f 64  69 72 6f 6b 28 58 25 2c  |..path_dirok(X%,|
00000430  59 25 2c 44 25 29 0d 00  2a 36 e7 20 44 25 3d 31  |Y%,D%)..*6. D%=1|
00000440  20 58 25 2b 3d 31 3a 8b  20 e7 20 44 25 3d 32 20  | X%+=1:. . D%=2 |
00000450  58 25 2d 3d 31 3a 8b 20  e7 20 44 25 3d 33 20 59  |X%-=1:. . D%=3 Y|
00000460  25 2b 3d 31 3a 8b 20 59  25 2d 3d 31 0d 00 2b 2e  |%+=1:. Y%-=1..+.|
00000470  e7 20 58 25 3c 30 20 84  20 59 25 3c 30 20 84 20  |. X%<0 . Y%<0 . |
00000480  58 25 3e 3d 70 5f 42 58  25 20 84 20 59 25 3e 3d  |X%>=p_BX% . Y%>=|
00000490  70 5f 42 59 25 20 8c 20  3d a3 0d 00 2c 25 e7 20  |p_BY% . =...,%. |
000004a0  3f 28 70 61 74 68 5f 74  61 62 25 2b 58 25 2b 59  |?(path_tab%+X%+Y|
000004b0  25 2a 70 5f 42 58 25 29  3d 30 20 8c 20 3d b9 0d  |%*p_BX%)=0 . =..|
000004c0  00 2d 06 3d a3 0d 00 2e  04 0d 00 2f 16 dd a4 70  |.-.=......./...p|
000004d0  61 74 68 5f 64 65 61 64  28 58 25 2c 59 25 29 0d  |ath_dead(X%,Y%).|
000004e0  00 30 08 ea 20 44 25 0d  00 31 2b e3 20 44 25 3d  |.0.. D%..1+. D%=|
000004f0  31 20 b8 20 34 3a e7 20  a4 70 61 74 68 5f 64 69  |1 . 4:. .path_di|
00000500  72 6f 6b 28 58 25 2c 59  25 2c 44 25 29 20 8c 20  |rok(X%,Y%,D%) . |
00000510  3d a3 0d 00 32 05 ed 0d  00 33 06 3d b9 0d 00 34  |=...2....3.=...4|
00000520  04 0d 00 35 11 dd a4 70  61 74 68 5f 6e 65 77 64  |...5...path_newd|
00000530  69 72 0d 00 36 0e ea 20  58 25 2c 59 25 2c 44 25  |ir..6.. X%,Y%,D%|
00000540  0d 00 37 1d 58 25 3d 70  5f 58 25 20 81 20 36 34  |..7.X%=p_X% . 64|
00000550  3a 59 25 3d 70 5f 59 25  20 81 20 36 34 0d 00 38  |:Y%=p_Y% . 64..8|
00000560  25 e7 20 a4 70 61 74 68  5f 64 65 61 64 28 58 25  |%. .path_dead(X%|
00000570  2c 59 25 29 20 8c 20 3d  a4 70 61 74 68 5f 77 61  |,Y%) . =.path_wa|
00000580  72 70 0d 00 39 25 f5 3a  44 25 3d b3 28 34 29 3a  |rp..9%.:D%=.(4):|
00000590  fd 20 a4 70 61 74 68 5f  64 69 72 6f 6b 28 58 25  |. .path_dirok(X%|
000005a0  2c 59 25 2c 44 25 29 0d  00 3a 10 70 5f 64 69 72  |,Y%,D%)..:.p_dir|
000005b0  25 3d 44 25 3a 3d a3 0d  00 3b 04 0d 00 3c 0f dd  |%=D%:=...;...<..|
000005c0  a4 70 61 74 68 5f 77 61  72 70 0d 00 3d 32 ea 20  |.path_warp..=2. |
000005d0  41 25 2c 46 25 2c 58 25  2c 59 25 2c 44 25 3a 46  |A%,F%,X%,Y%,D%:F|
000005e0  25 3d b9 3a e3 20 41 25  3d 30 20 b8 20 28 70 5f  |%=.:. A%=0 . (p_|
000005f0  42 58 25 2a 70 5f 42 59  25 2d 31 29 0d 00 3e 1e  |BX%*p_BY%-1)..>.|
00000600  e7 20 3f 28 70 61 74 68  5f 74 61 62 25 2b 41 25  |. ?(path_tab%+A%|
00000610  29 3d 30 20 8c 20 46 25  3d a3 0d 00 3f 0f ed 3a  |)=0 . F%=...?..:|
00000620  e7 20 46 25 20 8c 20 3d  b9 0d 00 40 56 f5 3a 58  |. F% . =...@V.:X|
00000630  25 3d b3 28 70 5f 42 58  25 29 2d 31 3a 59 25 3d  |%=.(p_BX%)-1:Y%=|
00000640  b3 28 70 5f 42 59 25 29  2d 31 3a fd 20 ac 28 a4  |.(p_BY%)-1:. .(.|
00000650  70 61 74 68 5f 64 65 61  64 28 58 25 2c 59 25 29  |path_dead(X%,Y%)|
00000660  29 20 80 20 3f 28 70 61  74 68 5f 74 61 62 25 2b  |) . ?(path_tab%+|
00000670  58 25 2b 59 25 2a 70 5f  42 58 25 29 3c 3e 30 0d  |X%+Y%*p_BX%)<>0.|
00000680  00 41 25 f5 3a 44 25 3d  b3 28 34 29 3a fd 20 a4  |.A%.:D%=.(4):. .|
00000690  70 61 74 68 5f 64 69 72  6f 6b 28 58 25 2c 59 25  |path_dirok(X%,Y%|
000006a0  2c 44 25 29 0d 00 42 19  70 5f 58 25 3d 58 25 2a  |,D%)..B.p_X%=X%*|
000006b0  36 34 3a 70 5f 59 25 3d  59 25 2a 36 34 0d 00 43  |64:p_Y%=Y%*64..C|
000006c0  10 70 5f 64 69 72 25 3d  44 25 3a 3d a3 0d 00 44  |.p_dir%=D%:=...D|
000006d0  04 0d 00 45 0f dd a4 70  61 74 68 5f 73 74 6f 70  |...E...path_stop|
000006e0  0d 00 46 14 f2 66 72 65  65 28 70 61 74 68 5f 74  |..F..free(path_t|
000006f0  61 62 25 29 0d 00 47 06  3d 30 0d 00 48 04 0d ff  |ab%)..G.=0..H...|
00000700