Home » Archimedes archive » Acorn User » AU 1994-09.adf » !StarInfo_Star » Seago/!IFS/FastProb15

Seago/!IFS/FastProb15

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 » Archimedes archive » Acorn User » AU 1994-09.adf » !StarInfo_Star
Filename: Seago/!IFS/FastProb15
Read OK:
File size: 12C3 bytes
Load address: 0000
Exec address: 0000
File contents
   10REM >IFScodes
   20REM Takes a text file containing the name of the fractal pattern
   30REM And plots it on screen
   40REM By R.Seago with lots of help from H.Simons and S.Billington
   50:
   60MODE 15
   70PRINT "IFS code plotter. Please enter the file name of your codes:"
   80PRINT
   90*CAT <IFS$CodesDir>
  100PRINT
  110INPUT '"? "filename$
  120fh%=OPENIN("<IFS$CodesDir>."+filename$)
  130name$=GET$#fh%
  140trans%=VAL(GET$#fh%)-1
  150DIM a%(trans%),b%(trans%),c%(trans%),d%(trans%),e%(trans%),f%(trans%),prob%(trans%)
  160DIM dummy$(trans%)
  170FOR I%=0 TO trans%
  180 dummy$(I%)=GET$#fh%
  190NEXT
  200acc%=EVAL(GET$#fh%)
  210scale%=EVAL(GET$#fh%)
  220maxit%=EVAL(GET$#fh%)/4
  230x%=EVAL(GET$#fh%)
  240y%=EVAL(GET$#fh%)
  250CLOSE#fh%
  260:
  270PRINT''name$
  280PRINT
  290sum%=0
  300FOR I%=0 TO trans%
  310 it%=0
  320 WHILE INSTR(dummy$(I%),",")
  330  a$=LEFT$(dummy$(I%),INSTR(dummy$(I%),","))
  340  dummy$(I%)=RIGHT$(dummy$(I%),LEN(dummy$(I%))-INSTR(dummy$(I%),","))
  350  CASE it% OF
  360   WHEN 0:a%(I%)=EVAL(a$)*2^acc%
  370REM          IF a%(I%)>0 THEN a%(I%)=((2^acc%)-ABS(a%(I%)))
  380   WHEN 1:b%(I%)=EVAL(a$)*2^acc%
  390REM          IF b%(I%)>0 THEN b%(I%)=((2^acc%)-ABS(b%(I%)))
  400   WHEN 2:c%(I%)=EVAL(a$)*2^acc%
  410REM          IF c%(I%)>0 THEN c%(I%)=((2^acc%)-ABS(c%(I%)))
  420   WHEN 3:d%(I%)=EVAL(a$)*2^acc%
  430REM          IF d%(I%)>0 THEN d%(I%)=((2^acc%)-ABS(d%(I%)))
  440   WHEN 4:e%(I%)=EVAL(a$)*2^(acc%*2)
  450REM          IF e%(I%)>0 THEN e%(I%)=((2^acc%)-ABS(e%(I%)))
  460   WHEN 5:f%(I%)=EVAL(a$)*2^(acc%*2)
  470REM          IF f%(I%)>0 THEN f%(I%)=((2^acc%)-ABS(f%(I%)))
  480  ENDCASE
  490  it%+=1
  500 ENDWHILE
  510 IF I%=trans% THEN
  520   prob%(I%)=128-sum%
  530  ELSE
  540   prob%(I%)=EVAL(dummy$(I%))*128
  550   sum%+=prob%(I%)
  560 ENDIF
  570NEXT
  580:
  590PROCassem
  600CLS
  610OFF
  620A%=trans%+1
  640CALL ifs
  710CASE GET$ OF
  711 WHEN "S","s":*ScreenSave <IFS$Screen$File>
  720ENDCASE
  721RUN
  730:
  740DEF PROCassem
  750DIM code% 2000
  760link=14
  770trans=14
  780data=12
  790offset=11
  800newx=10
  810cx=10
  820newy=9
  830cy=9
  840seed=8
  850xor=7
  860oldx=5
  870oldy=4
  880a=6:c=6
  890b=6:d=6
  900e=6:f=6
  910prob=6
  920count=3
  930rand=2
  940scr=0
  950FOR pass%=0 TO 2 STEP 2
  960P%=code%
  970[
  980OPT pass%
  990.ifs
 1000STMFD R13!,{link}
 1010MOV trans,R0                   ;pass no. of transformations in A%
 1020ADR data,data%
 1030LDR xor,xor%
 1040LDR seed,seed%
 1050MOV count,#0
 1060MOV oldx,#1*2^acc%
 1070MOV oldy,#1*2^acc%
 1080LDR scr,scr%                   ;end of init routine
 1081ADD scr,scr,#(&50000 DIV 2)
 1090:
 1100.loop                          ;program loop
 1110MOVS seed,seed,LSL#1           ;rdn function
 1120EORCS seed,seed,xor
 1130MOVCC rand,#0
 1140MOVCS rand,#1
 1150MOVS seed,seed,LSL#1
 1160EORCS seed,seed,xor
 1170ORRCS rand,rand,#2
 1180:
 1190MOVS seed,seed,LSL#1
 1200EORCS seed,seed,xor
 1210ORRCS rand,rand,#4
 1220:
 1230MOVS seed,seed,LSL#1
 1240EORCS seed,seed,xor
 1250ORRCS rand,rand,#8
 1260:
 1270MOVS seed,seed,LSL#1
 1280EORCS seed,seed,xor
 1290ORRCS rand,rand,#16
 1300:
 1310MOVS seed,seed,LSL#1
 1320EORCS seed,seed,xor
 1330ORRCS rand,rand,#32
 1340:
 1350MOVS seed,seed,LSL#1
 1360EORCS seed,seed,xor
 1370ORRCS rand,rand,#64
 1380:
 1390CMP rand,#127
 1400BGT loop
 1410:
 1420ADR prob,prob%
 1430MOV R9,#0
 1440LDR R10,[prob],#4
 1450.probloop
 1460CMP rand,R10
 1470ADDGE R9,R9,#1
 1480SUBGE rand,rand,R10
 1490LDRGE R10,[prob],#4
 1500BGE probloop
 1510:
 1520MOV R1,#24
 1530MUL offset,R1,R9               ;sets up the correct offset
 1540ADD offset,offset,data
 1550:
 1560LDR a,[offset],#4              ;
 1570MUL newx,oldx,a                ;calculate newx
 1580LDR b,[offset],#4              ;
 1590MUL R1,oldy,b                  ;
 1600ADD newx,newx,R1               ;
 1610LDR e,[offset],#4              ;
 1620ADD newx,newx,e                ;
 1630:
 1640LDR c,[offset],#4              ;
 1650MUL newy,oldx,c                ;calculate newy
 1660LDR d,[offset],#4              ;
 1670MUL R1,oldy,d                  ;
 1680ADD newy,newy,R1               ;
 1690LDR f,[offset]                 ;
 1700ADD newy,newy,f                ;
 1710:
 1720MOV oldx,newx,ASR#acc%           ;set oldx and old y to new values
 1730MOV oldy,newy,ASR#acc%           ;
 1740:
 1750ADD count,count,#1             ;
 1760CMP count,#10                  ;more than 10 iterations taken place?
 1770BLE loop                       ;
 1780:
 1790MOV R1,#&FF
 1800MOV R10,#640
 1810MOV R6,oldy,ASR#scale%+2
 1820LDR R2,cy%
 1830ADD R6,R6,R2
 1840MUL R9,R6,R10
 1850MOV R2,oldx,ASR#scale%+1
 1860LDR R6,cx%
 1870ADD R2,R2,R6
 1880SUB offset,R9,R2
 1890STRB R1,[scr,-offset]
 1900:
 1910CMP count,#maxit%              ;fed up with plotting?
 1920BLE loop                       ;no  -  keep going
 1930LDMFD R13!,{PC}                ;yes -  back to BASIC
 1940:
 1950.data%
 1960FNdata
 1970.prob%
 1980FNprob
 1990.seed%
 2000EQUD TIME
 2010.xor%
 2020EQUD &1D872B41
 2030.cx%
 2040EQUD x%
 2050.cy%
 2060EQUD y%
 2070.scr%
 2080EQUD 148
 2090EQUD -1
 2100]
 2110NEXT
 2120SYS "OS_ReadVduVariables",scr%,scr%
 2130ENDPROC
 2140:
 2150DEF FNdata
 2160FOR I%=0 TO trans%
 2170[OPT pass%
 2180EQUD a%(I%)
 2190EQUD b%(I%)
 2200EQUD e%(I%)
 2210EQUD c%(I%)
 2220EQUD d%(I%)
 2230EQUD f%(I%)
 2240]
 2250NEXT
 2260[OPT pass%
 2270EQUS STRING$(24,CHR$0)
 2280]
 2290=0
 2300:
 2310DEF FNprob
 2320FOR I%=0 TO trans%
 2330[OPT pass%
 2340EQUD prob%(I%)
 2350]
 2360NEXT
 2370[OPT pass%
 2380EQUD 128
 2390]
 2400=0

� >IFScodes
B� Takes a text file containing the name of the fractal pattern
� And plots it on screen
(A� By R.Seago with lots of help from H.Simons and S.Billington
2:
<� 15
FC� "IFS code plotter. Please enter the file name of your codes:"
P�
Z*CAT <IFS$CodesDir>
d�
n� '"? "filename$
x&fh%=�("<IFS$CodesDir>."+filename$)
�name$=�#fh%
�trans%=�(�#fh%)-1
�U� a%(trans%),b%(trans%),c%(trans%),d%(trans%),e%(trans%),f%(trans%),prob%(trans%)
�� dummy$(trans%)
�� I%=0 � trans%
� dummy$(I%)=�#fh%
��
�acc%=�(�#fh%)
�scale%=�(�#fh%)
�maxit%=�(�#fh%)/4
�x%=�(�#fh%)
�y%=�(�#fh%)
�	�#fh%
:
�''name$
�
"
sum%=0
,� I%=0 � trans%
6
 it%=0
@ ȕ �dummy$(I%),",")
J&  a$=�dummy$(I%),�dummy$(I%),","))
T<  dummy$(I%)=�dummy$(I%),�(dummy$(I%))-�dummy$(I%),","))
^  Ȏ it% �
h   � 0:a%(I%)=�(a$)*2^acc%
r=�          IF a%(I%)>0 THEN a%(I%)=((2^acc%)-ABS(a%(I%)))
|   � 1:b%(I%)=�(a$)*2^acc%
�=�          IF b%(I%)>0 THEN b%(I%)=((2^acc%)-ABS(b%(I%)))
�   � 2:c%(I%)=�(a$)*2^acc%
�=�          IF c%(I%)>0 THEN c%(I%)=((2^acc%)-ABS(c%(I%)))
�   � 3:d%(I%)=�(a$)*2^acc%
�=�          IF d%(I%)>0 THEN d%(I%)=((2^acc%)-ABS(d%(I%)))
�"   � 4:e%(I%)=�(a$)*2^(acc%*2)
�=�          IF e%(I%)>0 THEN e%(I%)=((2^acc%)-ABS(e%(I%)))
�"   � 5:f%(I%)=�(a$)*2^(acc%*2)
�=�          IF f%(I%)>0 THEN f%(I%)=((2^acc%)-ABS(f%(I%)))
�  �
�  it%+=1
� �
� � I%=trans% �
   prob%(I%)=128-sum%
  �
"   prob%(I%)=�(dummy$(I%))*128
&   sum%+=prob%(I%)
0 �
:�
D:
N
�assem
X�
b�
lA%=trans%+1
�	� ifs
�
Ȏ � �
�, � "S","s":*ScreenSave <IFS$Screen$File>
��
��
�:
�� �assem
�� code% 2000
�link=14
trans=14
data=12

offset=11
 newx=10
*	cx=10
4
newy=9
>cy=9
H
seed=8
R	xor=7
\
oldx=5
f
oldy=4
pa=6:c=6
zb=6:d=6
�e=6:f=6
�
prob=6
�count=3
�
rand=2
�	scr=0
�� pass%=0 � 2 � 2
�P%=code%
�[
�
OPT pass%
�.ifs
�STMFD R13!,{link}
�EMOV trans,R0                   ;pass no. of transformations in A%
�ADR data,data%
LDR xor,xor%
LDR seed,seed%
MOV count,#0
$MOV oldx,#1*2^acc%
.MOV oldy,#1*2^acc%
87LDR scr,scr%                   ;end of init routine
9ADD scr,scr,#(&50000 � 2)
B:
L0.loop                          ;program loop
V0MOVS seed,seed,LSL#1           ;rdn function
`�CS seed,seed,xor
jMOVCC rand,#0
tMOVCS rand,#1
~MOVS seed,seed,LSL#1
��CS seed,seed,xor
��RCS rand,rand,#2
�:
�MOVS seed,seed,LSL#1
��CS seed,seed,xor
��RCS rand,rand,#4
�:
�MOVS seed,seed,LSL#1
��CS seed,seed,xor
��RCS rand,rand,#8
�:
�MOVS seed,seed,LSL#1
�CS seed,seed,xor

�RCS rand,rand,#16
:
MOVS seed,seed,LSL#1
(�CS seed,seed,xor
2�RCS rand,rand,#32
<:
FMOVS seed,seed,LSL#1
P�CS seed,seed,xor
Z�RCS rand,rand,#64
d:
nCMP rand,#127
xBGT loop
�:
�ADR prob,prob%
�
MOV R9,#0
�LDR R10,[prob],#4
�
.probloop
�CMP rand,R10
�ADDGE R9,R9,#1
�SUBGE rand,rand,R10
�LDRGE R10,[prob],#4
�BGE probloop
�:
�MOV R1,#24
�>MUL offset,R1,R9               ;sets up the correct offset
ADD offset,offset,data
:
$LDR a,[offset],#4              ;
"2MUL newx,oldx,a                ;calculate newx
,$LDR b,[offset],#4              ;
6$MUL R1,oldy,b                  ;
@$ADD newx,newx,R1               ;
J$LDR e,[offset],#4              ;
T$ADD newx,newx,e                ;
^:
h$LDR c,[offset],#4              ;
r2MUL newy,oldx,c                ;calculate newy
|$LDR d,[offset],#4              ;
�$MUL R1,oldy,d                  ;
�$ADD newy,newy,R1               ;
�$LDR f,[offset]                 ;
�$ADD newy,newy,f                ;
�:
�FMOV oldx,newx,ASR#acc%           ;set oldx and old y to new values
�&MOV oldy,newy,ASR#acc%           ;
�:
�$ADD count,count,#1             ;
�HCMP count,#10                  ;more than 10 iterations taken place?
�$BLE loop                       ;
�:
�MOV R1,#&FF
MOV R10,#640
MOV R6,oldy,ASR#scale%+2
LDR R2,cy%
&ADD R6,R6,R2
0MUL R9,R6,R10
:MOV R2,oldx,ASR#scale%+1
DLDR R6,cx%
NADD R2,R2,R6
XSUB offset,R9,R2
bSTRB R1,[scr,-offset]
l:
v9CMP count,#maxit%              ;fed up with plotting?
�5BLE loop                       ;no  -  keep going
�8LDMFD R13!,{PC}                ;yes -  back to BASIC
�:
�
.data%
�	�data
�
.prob%
�	�prob
�
.seed%
�
EQUD �
�	.xor%
�EQUD &1D872B41
�.cx%
�EQUD x%
.cy%
EQUD y%
	.scr%
 EQUD 148
*EQUD -1
4]
>�
H&ș "OS_ReadVduVariables",scr%,scr%
R�
\:
f� �data
p� I%=0 � trans%
z[OPT pass%
�EQUD a%(I%)
�EQUD b%(I%)
�EQUD e%(I%)
�EQUD c%(I%)
�EQUD d%(I%)
�EQUD f%(I%)
�]
��
�[OPT pass%
�EQUS �24,�0)
�]
�=0
�:
	� �prob
	� I%=0 � trans%
	[OPT pass%
	$EQUD prob%(I%)
	.]
	8�
	B[OPT pass%
	LEQUD 128
	V]
	`=0
�
00000000  0d 00 0a 0f f4 20 3e 49  46 53 63 6f 64 65 73 0d  |..... >IFScodes.|
00000010  00 14 42 f4 20 54 61 6b  65 73 20 61 20 74 65 78  |..B. Takes a tex|
00000020  74 20 66 69 6c 65 20 63  6f 6e 74 61 69 6e 69 6e  |t file containin|
00000030  67 20 74 68 65 20 6e 61  6d 65 20 6f 66 20 74 68  |g the name of th|
00000040  65 20 66 72 61 63 74 61  6c 20 70 61 74 74 65 72  |e fractal patter|
00000050  6e 0d 00 1e 1c f4 20 41  6e 64 20 70 6c 6f 74 73  |n..... And plots|
00000060  20 69 74 20 6f 6e 20 73  63 72 65 65 6e 0d 00 28  | it on screen..(|
00000070  41 f4 20 42 79 20 52 2e  53 65 61 67 6f 20 77 69  |A. By R.Seago wi|
00000080  74 68 20 6c 6f 74 73 20  6f 66 20 68 65 6c 70 20  |th lots of help |
00000090  66 72 6f 6d 20 48 2e 53  69 6d 6f 6e 73 20 61 6e  |from H.Simons an|
000000a0  64 20 53 2e 42 69 6c 6c  69 6e 67 74 6f 6e 0d 00  |d S.Billington..|
000000b0  32 05 3a 0d 00 3c 08 eb  20 31 35 0d 00 46 43 f1  |2.:..<.. 15..FC.|
000000c0  20 22 49 46 53 20 63 6f  64 65 20 70 6c 6f 74 74  | "IFS code plott|
000000d0  65 72 2e 20 50 6c 65 61  73 65 20 65 6e 74 65 72  |er. Please enter|
000000e0  20 74 68 65 20 66 69 6c  65 20 6e 61 6d 65 20 6f  | the file name o|
000000f0  66 20 79 6f 75 72 20 63  6f 64 65 73 3a 22 0d 00  |f your codes:"..|
00000100  50 05 f1 0d 00 5a 17 2a  43 41 54 20 3c 49 46 53  |P....Z.*CAT <IFS|
00000110  24 43 6f 64 65 73 44 69  72 3e 0d 00 64 05 f1 0d  |$CodesDir>..d...|
00000120  00 6e 14 e8 20 27 22 3f  20 22 66 69 6c 65 6e 61  |.n.. '"? "filena|
00000130  6d 65 24 0d 00 78 26 66  68 25 3d 8e 28 22 3c 49  |me$..x&fh%=.("<I|
00000140  46 53 24 43 6f 64 65 73  44 69 72 3e 2e 22 2b 66  |FS$CodesDir>."+f|
00000150  69 6c 65 6e 61 6d 65 24  29 0d 00 82 0f 6e 61 6d  |ilename$)....nam|
00000160  65 24 3d be 23 66 68 25  0d 00 8c 15 74 72 61 6e  |e$=.#fh%....tran|
00000170  73 25 3d bb 28 be 23 66  68 25 29 2d 31 0d 00 96  |s%=.(.#fh%)-1...|
00000180  55 de 20 61 25 28 74 72  61 6e 73 25 29 2c 62 25  |U. a%(trans%),b%|
00000190  28 74 72 61 6e 73 25 29  2c 63 25 28 74 72 61 6e  |(trans%),c%(tran|
000001a0  73 25 29 2c 64 25 28 74  72 61 6e 73 25 29 2c 65  |s%),d%(trans%),e|
000001b0  25 28 74 72 61 6e 73 25  29 2c 66 25 28 74 72 61  |%(trans%),f%(tra|
000001c0  6e 73 25 29 2c 70 72 6f  62 25 28 74 72 61 6e 73  |ns%),prob%(trans|
000001d0  25 29 0d 00 a0 14 de 20  64 75 6d 6d 79 24 28 74  |%)..... dummy$(t|
000001e0  72 61 6e 73 25 29 0d 00  aa 13 e3 20 49 25 3d 30  |rans%)..... I%=0|
000001f0  20 b8 20 74 72 61 6e 73  25 0d 00 b4 15 20 64 75  | . trans%.... du|
00000200  6d 6d 79 24 28 49 25 29  3d be 23 66 68 25 0d 00  |mmy$(I%)=.#fh%..|
00000210  be 05 ed 0d 00 c8 11 61  63 63 25 3d a0 28 be 23  |.......acc%=.(.#|
00000220  66 68 25 29 0d 00 d2 13  73 63 61 6c 65 25 3d a0  |fh%)....scale%=.|
00000230  28 be 23 66 68 25 29 0d  00 dc 15 6d 61 78 69 74  |(.#fh%)....maxit|
00000240  25 3d a0 28 be 23 66 68  25 29 2f 34 0d 00 e6 0f  |%=.(.#fh%)/4....|
00000250  78 25 3d a0 28 be 23 66  68 25 29 0d 00 f0 0f 79  |x%=.(.#fh%)....y|
00000260  25 3d a0 28 be 23 66 68  25 29 0d 00 fa 09 d9 23  |%=.(.#fh%).....#|
00000270  66 68 25 0d 01 04 05 3a  0d 01 0e 0c f1 27 27 6e  |fh%....:.....''n|
00000280  61 6d 65 24 0d 01 18 05  f1 0d 01 22 0a 73 75 6d  |ame$.......".sum|
00000290  25 3d 30 0d 01 2c 13 e3  20 49 25 3d 30 20 b8 20  |%=0..,.. I%=0 . |
000002a0  74 72 61 6e 73 25 0d 01  36 0a 20 69 74 25 3d 30  |trans%..6. it%=0|
000002b0  0d 01 40 18 20 c8 95 20  a7 64 75 6d 6d 79 24 28  |..@. .. .dummy$(|
000002c0  49 25 29 2c 22 2c 22 29  0d 01 4a 26 20 20 61 24  |I%),",")..J&  a$|
000002d0  3d c0 64 75 6d 6d 79 24  28 49 25 29 2c a7 64 75  |=.dummy$(I%),.du|
000002e0  6d 6d 79 24 28 49 25 29  2c 22 2c 22 29 29 0d 01  |mmy$(I%),","))..|
000002f0  54 3c 20 20 64 75 6d 6d  79 24 28 49 25 29 3d c2  |T<  dummy$(I%)=.|
00000300  64 75 6d 6d 79 24 28 49  25 29 2c a9 28 64 75 6d  |dummy$(I%),.(dum|
00000310  6d 79 24 28 49 25 29 29  2d a7 64 75 6d 6d 79 24  |my$(I%))-.dummy$|
00000320  28 49 25 29 2c 22 2c 22  29 29 0d 01 5e 0e 20 20  |(I%),","))..^.  |
00000330  c8 8e 20 69 74 25 20 ca  0d 01 68 1e 20 20 20 c9  |.. it% ...h.   .|
00000340  20 30 3a 61 25 28 49 25  29 3d a0 28 61 24 29 2a  | 0:a%(I%)=.(a$)*|
00000350  32 5e 61 63 63 25 0d 01  72 3d f4 20 20 20 20 20  |2^acc%..r=.     |
00000360  20 20 20 20 20 49 46 20  61 25 28 49 25 29 3e 30  |     IF a%(I%)>0|
00000370  20 54 48 45 4e 20 61 25  28 49 25 29 3d 28 28 32  | THEN a%(I%)=((2|
00000380  5e 61 63 63 25 29 2d 41  42 53 28 61 25 28 49 25  |^acc%)-ABS(a%(I%|
00000390  29 29 29 0d 01 7c 1e 20  20 20 c9 20 31 3a 62 25  |)))..|.   . 1:b%|
000003a0  28 49 25 29 3d a0 28 61  24 29 2a 32 5e 61 63 63  |(I%)=.(a$)*2^acc|
000003b0  25 0d 01 86 3d f4 20 20  20 20 20 20 20 20 20 20  |%...=.          |
000003c0  49 46 20 62 25 28 49 25  29 3e 30 20 54 48 45 4e  |IF b%(I%)>0 THEN|
000003d0  20 62 25 28 49 25 29 3d  28 28 32 5e 61 63 63 25  | b%(I%)=((2^acc%|
000003e0  29 2d 41 42 53 28 62 25  28 49 25 29 29 29 0d 01  |)-ABS(b%(I%)))..|
000003f0  90 1e 20 20 20 c9 20 32  3a 63 25 28 49 25 29 3d  |..   . 2:c%(I%)=|
00000400  a0 28 61 24 29 2a 32 5e  61 63 63 25 0d 01 9a 3d  |.(a$)*2^acc%...=|
00000410  f4 20 20 20 20 20 20 20  20 20 20 49 46 20 63 25  |.          IF c%|
00000420  28 49 25 29 3e 30 20 54  48 45 4e 20 63 25 28 49  |(I%)>0 THEN c%(I|
00000430  25 29 3d 28 28 32 5e 61  63 63 25 29 2d 41 42 53  |%)=((2^acc%)-ABS|
00000440  28 63 25 28 49 25 29 29  29 0d 01 a4 1e 20 20 20  |(c%(I%)))....   |
00000450  c9 20 33 3a 64 25 28 49  25 29 3d a0 28 61 24 29  |. 3:d%(I%)=.(a$)|
00000460  2a 32 5e 61 63 63 25 0d  01 ae 3d f4 20 20 20 20  |*2^acc%...=.    |
00000470  20 20 20 20 20 20 49 46  20 64 25 28 49 25 29 3e  |      IF d%(I%)>|
00000480  30 20 54 48 45 4e 20 64  25 28 49 25 29 3d 28 28  |0 THEN d%(I%)=((|
00000490  32 5e 61 63 63 25 29 2d  41 42 53 28 64 25 28 49  |2^acc%)-ABS(d%(I|
000004a0  25 29 29 29 0d 01 b8 22  20 20 20 c9 20 34 3a 65  |%)))..."   . 4:e|
000004b0  25 28 49 25 29 3d a0 28  61 24 29 2a 32 5e 28 61  |%(I%)=.(a$)*2^(a|
000004c0  63 63 25 2a 32 29 0d 01  c2 3d f4 20 20 20 20 20  |cc%*2)...=.     |
000004d0  20 20 20 20 20 49 46 20  65 25 28 49 25 29 3e 30  |     IF e%(I%)>0|
000004e0  20 54 48 45 4e 20 65 25  28 49 25 29 3d 28 28 32  | THEN e%(I%)=((2|
000004f0  5e 61 63 63 25 29 2d 41  42 53 28 65 25 28 49 25  |^acc%)-ABS(e%(I%|
00000500  29 29 29 0d 01 cc 22 20  20 20 c9 20 35 3a 66 25  |)))..."   . 5:f%|
00000510  28 49 25 29 3d a0 28 61  24 29 2a 32 5e 28 61 63  |(I%)=.(a$)*2^(ac|
00000520  63 25 2a 32 29 0d 01 d6  3d f4 20 20 20 20 20 20  |c%*2)...=.      |
00000530  20 20 20 20 49 46 20 66  25 28 49 25 29 3e 30 20  |    IF f%(I%)>0 |
00000540  54 48 45 4e 20 66 25 28  49 25 29 3d 28 28 32 5e  |THEN f%(I%)=((2^|
00000550  61 63 63 25 29 2d 41 42  53 28 66 25 28 49 25 29  |acc%)-ABS(f%(I%)|
00000560  29 29 0d 01 e0 07 20 20  cb 0d 01 ea 0c 20 20 69  |))....  .....  i|
00000570  74 25 2b 3d 31 0d 01 f4  06 20 ce 0d 01 fe 12 20  |t%+=1.... ..... |
00000580  e7 20 49 25 3d 74 72 61  6e 73 25 20 8c 0d 02 08  |. I%=trans% ....|
00000590  19 20 20 20 70 72 6f 62  25 28 49 25 29 3d 31 32  |.   prob%(I%)=12|
000005a0  38 2d 73 75 6d 25 0d 02  12 07 20 20 cc 0d 02 1c  |8-sum%....  ....|
000005b0  22 20 20 20 70 72 6f 62  25 28 49 25 29 3d a0 28  |"   prob%(I%)=.(|
000005c0  64 75 6d 6d 79 24 28 49  25 29 29 2a 31 32 38 0d  |dummy$(I%))*128.|
000005d0  02 26 16 20 20 20 73 75  6d 25 2b 3d 70 72 6f 62  |.&.   sum%+=prob|
000005e0  25 28 49 25 29 0d 02 30  06 20 cd 0d 02 3a 05 ed  |%(I%)..0. ...:..|
000005f0  0d 02 44 05 3a 0d 02 4e  0a f2 61 73 73 65 6d 0d  |..D.:..N..assem.|
00000600  02 58 05 db 0d 02 62 05  87 0d 02 6c 0f 41 25 3d  |.X....b....l.A%=|
00000610  74 72 61 6e 73 25 2b 31  0d 02 80 09 d6 20 69 66  |trans%+1..... if|
00000620  73 0d 02 c6 0a c8 8e 20  be 20 ca 0d 02 c7 2c 20  |s...... . ...., |
00000630  c9 20 22 53 22 2c 22 73  22 3a 2a 53 63 72 65 65  |. "S","s":*Scree|
00000640  6e 53 61 76 65 20 3c 49  46 53 24 53 63 72 65 65  |nSave <IFS$Scree|
00000650  6e 24 46 69 6c 65 3e 0d  02 d0 05 cb 0d 02 d1 05  |n$File>.........|
00000660  f9 0d 02 da 05 3a 0d 02  e4 0c dd 20 f2 61 73 73  |.....:..... .ass|
00000670  65 6d 0d 02 ee 10 de 20  63 6f 64 65 25 20 32 30  |em..... code% 20|
00000680  30 30 0d 02 f8 0b 6c 69  6e 6b 3d 31 34 0d 03 02  |00....link=14...|
00000690  0c 74 72 61 6e 73 3d 31  34 0d 03 0c 0b 64 61 74  |.trans=14....dat|
000006a0  61 3d 31 32 0d 03 16 0d  6f 66 66 73 65 74 3d 31  |a=12....offset=1|
000006b0  31 0d 03 20 0b 6e 65 77  78 3d 31 30 0d 03 2a 09  |1.. .newx=10..*.|
000006c0  63 78 3d 31 30 0d 03 34  0a 6e 65 77 79 3d 39 0d  |cx=10..4.newy=9.|
000006d0  03 3e 08 63 79 3d 39 0d  03 48 0a 73 65 65 64 3d  |.>.cy=9..H.seed=|
000006e0  38 0d 03 52 09 78 6f 72  3d 37 0d 03 5c 0a 6f 6c  |8..R.xor=7..\.ol|
000006f0  64 78 3d 35 0d 03 66 0a  6f 6c 64 79 3d 34 0d 03  |dx=5..f.oldy=4..|
00000700  70 0b 61 3d 36 3a 63 3d  36 0d 03 7a 0b 62 3d 36  |p.a=6:c=6..z.b=6|
00000710  3a 64 3d 36 0d 03 84 0b  65 3d 36 3a 66 3d 36 0d  |:d=6....e=6:f=6.|
00000720  03 8e 0a 70 72 6f 62 3d  36 0d 03 98 0b 63 6f 75  |...prob=6....cou|
00000730  6e 74 3d 33 0d 03 a2 0a  72 61 6e 64 3d 32 0d 03  |nt=3....rand=2..|
00000740  ac 09 73 63 72 3d 30 0d  03 b6 15 e3 20 70 61 73  |..scr=0..... pas|
00000750  73 25 3d 30 20 b8 20 32  20 88 20 32 0d 03 c0 0c  |s%=0 . 2 . 2....|
00000760  50 25 3d 63 6f 64 65 25  0d 03 ca 05 5b 0d 03 d4  |P%=code%....[...|
00000770  0d 4f 50 54 20 70 61 73  73 25 0d 03 de 08 2e 69  |.OPT pass%.....i|
00000780  66 73 0d 03 e8 15 53 54  4d 46 44 20 52 31 33 21  |fs....STMFD R13!|
00000790  2c 7b 6c 69 6e 6b 7d 0d  03 f2 45 4d 4f 56 20 74  |,{link}...EMOV t|
000007a0  72 61 6e 73 2c 52 30 20  20 20 20 20 20 20 20 20  |rans,R0         |
000007b0  20 20 20 20 20 20 20 20  20 20 3b 70 61 73 73 20  |          ;pass |
000007c0  6e 6f 2e 20 6f 66 20 74  72 61 6e 73 66 6f 72 6d  |no. of transform|
000007d0  61 74 69 6f 6e 73 20 69  6e 20 41 25 0d 03 fc 12  |ations in A%....|
000007e0  41 44 52 20 64 61 74 61  2c 64 61 74 61 25 0d 04  |ADR data,data%..|
000007f0  06 10 4c 44 52 20 78 6f  72 2c 78 6f 72 25 0d 04  |..LDR xor,xor%..|
00000800  10 12 4c 44 52 20 73 65  65 64 2c 73 65 65 64 25  |..LDR seed,seed%|
00000810  0d 04 1a 10 4d 4f 56 20  63 6f 75 6e 74 2c 23 30  |....MOV count,#0|
00000820  0d 04 24 16 4d 4f 56 20  6f 6c 64 78 2c 23 31 2a  |..$.MOV oldx,#1*|
00000830  32 5e 61 63 63 25 0d 04  2e 16 4d 4f 56 20 6f 6c  |2^acc%....MOV ol|
00000840  64 79 2c 23 31 2a 32 5e  61 63 63 25 0d 04 38 37  |dy,#1*2^acc%..87|
00000850  4c 44 52 20 73 63 72 2c  73 63 72 25 20 20 20 20  |LDR scr,scr%    |
00000860  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 3b  |               ;|
00000870  65 6e 64 20 6f 66 20 69  6e 69 74 20 72 6f 75 74  |end of init rout|
00000880  69 6e 65 0d 04 39 1d 41  44 44 20 73 63 72 2c 73  |ine..9.ADD scr,s|
00000890  63 72 2c 23 28 26 35 30  30 30 30 20 81 20 32 29  |cr,#(&50000 . 2)|
000008a0  0d 04 42 05 3a 0d 04 4c  30 2e 6c 6f 6f 70 20 20  |..B.:..L0.loop  |
000008b0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000008c0  20 20 20 20 20 20 20 20  3b 70 72 6f 67 72 61 6d  |        ;program|
000008d0  20 6c 6f 6f 70 0d 04 56  30 4d 4f 56 53 20 73 65  | loop..V0MOVS se|
000008e0  65 64 2c 73 65 65 64 2c  4c 53 4c 23 31 20 20 20  |ed,seed,LSL#1   |
000008f0  20 20 20 20 20 20 20 20  3b 72 64 6e 20 66 75 6e  |        ;rdn fun|
00000900  63 74 69 6f 6e 0d 04 60  15 82 43 53 20 73 65 65  |ction..`..CS see|
00000910  64 2c 73 65 65 64 2c 78  6f 72 0d 04 6a 11 4d 4f  |d,seed,xor..j.MO|
00000920  56 43 43 20 72 61 6e 64  2c 23 30 0d 04 74 11 4d  |VCC rand,#0..t.M|
00000930  4f 56 43 53 20 72 61 6e  64 2c 23 31 0d 04 7e 18  |OVCS rand,#1..~.|
00000940  4d 4f 56 53 20 73 65 65  64 2c 73 65 65 64 2c 4c  |MOVS seed,seed,L|
00000950  53 4c 23 31 0d 04 88 15  82 43 53 20 73 65 65 64  |SL#1.....CS seed|
00000960  2c 73 65 65 64 2c 78 6f  72 0d 04 92 15 84 52 43  |,seed,xor.....RC|
00000970  53 20 72 61 6e 64 2c 72  61 6e 64 2c 23 32 0d 04  |S rand,rand,#2..|
00000980  9c 05 3a 0d 04 a6 18 4d  4f 56 53 20 73 65 65 64  |..:....MOVS seed|
00000990  2c 73 65 65 64 2c 4c 53  4c 23 31 0d 04 b0 15 82  |,seed,LSL#1.....|
000009a0  43 53 20 73 65 65 64 2c  73 65 65 64 2c 78 6f 72  |CS seed,seed,xor|
000009b0  0d 04 ba 15 84 52 43 53  20 72 61 6e 64 2c 72 61  |.....RCS rand,ra|
000009c0  6e 64 2c 23 34 0d 04 c4  05 3a 0d 04 ce 18 4d 4f  |nd,#4....:....MO|
000009d0  56 53 20 73 65 65 64 2c  73 65 65 64 2c 4c 53 4c  |VS seed,seed,LSL|
000009e0  23 31 0d 04 d8 15 82 43  53 20 73 65 65 64 2c 73  |#1.....CS seed,s|
000009f0  65 65 64 2c 78 6f 72 0d  04 e2 15 84 52 43 53 20  |eed,xor.....RCS |
00000a00  72 61 6e 64 2c 72 61 6e  64 2c 23 38 0d 04 ec 05  |rand,rand,#8....|
00000a10  3a 0d 04 f6 18 4d 4f 56  53 20 73 65 65 64 2c 73  |:....MOVS seed,s|
00000a20  65 65 64 2c 4c 53 4c 23  31 0d 05 00 15 82 43 53  |eed,LSL#1.....CS|
00000a30  20 73 65 65 64 2c 73 65  65 64 2c 78 6f 72 0d 05  | seed,seed,xor..|
00000a40  0a 16 84 52 43 53 20 72  61 6e 64 2c 72 61 6e 64  |...RCS rand,rand|
00000a50  2c 23 31 36 0d 05 14 05  3a 0d 05 1e 18 4d 4f 56  |,#16....:....MOV|
00000a60  53 20 73 65 65 64 2c 73  65 65 64 2c 4c 53 4c 23  |S seed,seed,LSL#|
00000a70  31 0d 05 28 15 82 43 53  20 73 65 65 64 2c 73 65  |1..(..CS seed,se|
00000a80  65 64 2c 78 6f 72 0d 05  32 16 84 52 43 53 20 72  |ed,xor..2..RCS r|
00000a90  61 6e 64 2c 72 61 6e 64  2c 23 33 32 0d 05 3c 05  |and,rand,#32..<.|
00000aa0  3a 0d 05 46 18 4d 4f 56  53 20 73 65 65 64 2c 73  |:..F.MOVS seed,s|
00000ab0  65 65 64 2c 4c 53 4c 23  31 0d 05 50 15 82 43 53  |eed,LSL#1..P..CS|
00000ac0  20 73 65 65 64 2c 73 65  65 64 2c 78 6f 72 0d 05  | seed,seed,xor..|
00000ad0  5a 16 84 52 43 53 20 72  61 6e 64 2c 72 61 6e 64  |Z..RCS rand,rand|
00000ae0  2c 23 36 34 0d 05 64 05  3a 0d 05 6e 11 43 4d 50  |,#64..d.:..n.CMP|
00000af0  20 72 61 6e 64 2c 23 31  32 37 0d 05 78 0c 42 47  | rand,#127..x.BG|
00000b00  54 20 6c 6f 6f 70 0d 05  82 05 3a 0d 05 8c 12 41  |T loop....:....A|
00000b10  44 52 20 70 72 6f 62 2c  70 72 6f 62 25 0d 05 96  |DR prob,prob%...|
00000b20  0d 4d 4f 56 20 52 39 2c  23 30 0d 05 a0 15 4c 44  |.MOV R9,#0....LD|
00000b30  52 20 52 31 30 2c 5b 70  72 6f 62 5d 2c 23 34 0d  |R R10,[prob],#4.|
00000b40  05 aa 0d 2e 70 72 6f 62  6c 6f 6f 70 0d 05 b4 10  |....probloop....|
00000b50  43 4d 50 20 72 61 6e 64  2c 52 31 30 0d 05 be 12  |CMP rand,R10....|
00000b60  41 44 44 47 45 20 52 39  2c 52 39 2c 23 31 0d 05  |ADDGE R9,R9,#1..|
00000b70  c8 17 53 55 42 47 45 20  72 61 6e 64 2c 72 61 6e  |..SUBGE rand,ran|
00000b80  64 2c 52 31 30 0d 05 d2  17 4c 44 52 47 45 20 52  |d,R10....LDRGE R|
00000b90  31 30 2c 5b 70 72 6f 62  5d 2c 23 34 0d 05 dc 10  |10,[prob],#4....|
00000ba0  42 47 45 20 70 72 6f 62  6c 6f 6f 70 0d 05 e6 05  |BGE probloop....|
00000bb0  3a 0d 05 f0 0e 4d 4f 56  20 52 31 2c 23 32 34 0d  |:....MOV R1,#24.|
00000bc0  05 fa 3e 4d 55 4c 20 6f  66 66 73 65 74 2c 52 31  |..>MUL offset,R1|
00000bd0  2c 52 39 20 20 20 20 20  20 20 20 20 20 20 20 20  |,R9             |
00000be0  20 20 3b 73 65 74 73 20  75 70 20 74 68 65 20 63  |  ;sets up the c|
00000bf0  6f 72 72 65 63 74 20 6f  66 66 73 65 74 0d 06 04  |orrect offset...|
00000c00  1a 41 44 44 20 6f 66 66  73 65 74 2c 6f 66 66 73  |.ADD offset,offs|
00000c10  65 74 2c 64 61 74 61 0d  06 0e 05 3a 0d 06 18 24  |et,data....:...$|
00000c20  4c 44 52 20 61 2c 5b 6f  66 66 73 65 74 5d 2c 23  |LDR a,[offset],#|
00000c30  34 20 20 20 20 20 20 20  20 20 20 20 20 20 20 3b  |4              ;|
00000c40  0d 06 22 32 4d 55 4c 20  6e 65 77 78 2c 6f 6c 64  |.."2MUL newx,old|
00000c50  78 2c 61 20 20 20 20 20  20 20 20 20 20 20 20 20  |x,a             |
00000c60  20 20 20 3b 63 61 6c 63  75 6c 61 74 65 20 6e 65  |   ;calculate ne|
00000c70  77 78 0d 06 2c 24 4c 44  52 20 62 2c 5b 6f 66 66  |wx..,$LDR b,[off|
00000c80  73 65 74 5d 2c 23 34 20  20 20 20 20 20 20 20 20  |set],#4         |
00000c90  20 20 20 20 20 3b 0d 06  36 24 4d 55 4c 20 52 31  |     ;..6$MUL R1|
00000ca0  2c 6f 6c 64 79 2c 62 20  20 20 20 20 20 20 20 20  |,oldy,b         |
00000cb0  20 20 20 20 20 20 20 20  20 3b 0d 06 40 24 41 44  |         ;..@$AD|
00000cc0  44 20 6e 65 77 78 2c 6e  65 77 78 2c 52 31 20 20  |D newx,newx,R1  |
00000cd0  20 20 20 20 20 20 20 20  20 20 20 20 20 3b 0d 06  |             ;..|
00000ce0  4a 24 4c 44 52 20 65 2c  5b 6f 66 66 73 65 74 5d  |J$LDR e,[offset]|
00000cf0  2c 23 34 20 20 20 20 20  20 20 20 20 20 20 20 20  |,#4             |
00000d00  20 3b 0d 06 54 24 41 44  44 20 6e 65 77 78 2c 6e  | ;..T$ADD newx,n|
00000d10  65 77 78 2c 65 20 20 20  20 20 20 20 20 20 20 20  |ewx,e           |
00000d20  20 20 20 20 20 3b 0d 06  5e 05 3a 0d 06 68 24 4c  |     ;..^.:..h$L|
00000d30  44 52 20 63 2c 5b 6f 66  66 73 65 74 5d 2c 23 34  |DR c,[offset],#4|
00000d40  20 20 20 20 20 20 20 20  20 20 20 20 20 20 3b 0d  |              ;.|
00000d50  06 72 32 4d 55 4c 20 6e  65 77 79 2c 6f 6c 64 78  |.r2MUL newy,oldx|
00000d60  2c 63 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |,c              |
00000d70  20 20 3b 63 61 6c 63 75  6c 61 74 65 20 6e 65 77  |  ;calculate new|
00000d80  79 0d 06 7c 24 4c 44 52  20 64 2c 5b 6f 66 66 73  |y..|$LDR d,[offs|
00000d90  65 74 5d 2c 23 34 20 20  20 20 20 20 20 20 20 20  |et],#4          |
00000da0  20 20 20 20 3b 0d 06 86  24 4d 55 4c 20 52 31 2c  |    ;...$MUL R1,|
00000db0  6f 6c 64 79 2c 64 20 20  20 20 20 20 20 20 20 20  |oldy,d          |
00000dc0  20 20 20 20 20 20 20 20  3b 0d 06 90 24 41 44 44  |        ;...$ADD|
00000dd0  20 6e 65 77 79 2c 6e 65  77 79 2c 52 31 20 20 20  | newy,newy,R1   |
00000de0  20 20 20 20 20 20 20 20  20 20 20 20 3b 0d 06 9a  |            ;...|
00000df0  24 4c 44 52 20 66 2c 5b  6f 66 66 73 65 74 5d 20  |$LDR f,[offset] |
00000e00  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000e10  3b 0d 06 a4 24 41 44 44  20 6e 65 77 79 2c 6e 65  |;...$ADD newy,ne|
00000e20  77 79 2c 66 20 20 20 20  20 20 20 20 20 20 20 20  |wy,f            |
00000e30  20 20 20 20 3b 0d 06 ae  05 3a 0d 06 b8 46 4d 4f  |    ;....:...FMO|
00000e40  56 20 6f 6c 64 78 2c 6e  65 77 78 2c 41 53 52 23  |V oldx,newx,ASR#|
00000e50  61 63 63 25 20 20 20 20  20 20 20 20 20 20 20 3b  |acc%           ;|
00000e60  73 65 74 20 6f 6c 64 78  20 61 6e 64 20 6f 6c 64  |set oldx and old|
00000e70  20 79 20 74 6f 20 6e 65  77 20 76 61 6c 75 65 73  | y to new values|
00000e80  0d 06 c2 26 4d 4f 56 20  6f 6c 64 79 2c 6e 65 77  |...&MOV oldy,new|
00000e90  79 2c 41 53 52 23 61 63  63 25 20 20 20 20 20 20  |y,ASR#acc%      |
00000ea0  20 20 20 20 20 3b 0d 06  cc 05 3a 0d 06 d6 24 41  |     ;....:...$A|
00000eb0  44 44 20 63 6f 75 6e 74  2c 63 6f 75 6e 74 2c 23  |DD count,count,#|
00000ec0  31 20 20 20 20 20 20 20  20 20 20 20 20 20 3b 0d  |1             ;.|
00000ed0  06 e0 48 43 4d 50 20 63  6f 75 6e 74 2c 23 31 30  |..HCMP count,#10|
00000ee0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000ef0  20 20 3b 6d 6f 72 65 20  74 68 61 6e 20 31 30 20  |  ;more than 10 |
00000f00  69 74 65 72 61 74 69 6f  6e 73 20 74 61 6b 65 6e  |iterations taken|
00000f10  20 70 6c 61 63 65 3f 0d  06 ea 24 42 4c 45 20 6c  | place?...$BLE l|
00000f20  6f 6f 70 20 20 20 20 20  20 20 20 20 20 20 20 20  |oop             |
00000f30  20 20 20 20 20 20 20 20  20 20 3b 0d 06 f4 05 3a  |          ;....:|
00000f40  0d 06 fe 0f 4d 4f 56 20  52 31 2c 23 26 46 46 0d  |....MOV R1,#&FF.|
00000f50  07 08 10 4d 4f 56 20 52  31 30 2c 23 36 34 30 0d  |...MOV R10,#640.|
00000f60  07 12 1c 4d 4f 56 20 52  36 2c 6f 6c 64 79 2c 41  |...MOV R6,oldy,A|
00000f70  53 52 23 73 63 61 6c 65  25 2b 32 0d 07 1c 0e 4c  |SR#scale%+2....L|
00000f80  44 52 20 52 32 2c 63 79  25 0d 07 26 10 41 44 44  |DR R2,cy%..&.ADD|
00000f90  20 52 36 2c 52 36 2c 52  32 0d 07 30 11 4d 55 4c  | R6,R6,R2..0.MUL|
00000fa0  20 52 39 2c 52 36 2c 52  31 30 0d 07 3a 1c 4d 4f  | R9,R6,R10..:.MO|
00000fb0  56 20 52 32 2c 6f 6c 64  78 2c 41 53 52 23 73 63  |V R2,oldx,ASR#sc|
00000fc0  61 6c 65 25 2b 31 0d 07  44 0e 4c 44 52 20 52 36  |ale%+1..D.LDR R6|
00000fd0  2c 63 78 25 0d 07 4e 10  41 44 44 20 52 32 2c 52  |,cx%..N.ADD R2,R|
00000fe0  32 2c 52 36 0d 07 58 14  53 55 42 20 6f 66 66 73  |2,R6..X.SUB offs|
00000ff0  65 74 2c 52 39 2c 52 32  0d 07 62 19 53 54 52 42  |et,R9,R2..b.STRB|
00001000  20 52 31 2c 5b 73 63 72  2c 2d 6f 66 66 73 65 74  | R1,[scr,-offset|
00001010  5d 0d 07 6c 05 3a 0d 07  76 39 43 4d 50 20 63 6f  |]..l.:..v9CMP co|
00001020  75 6e 74 2c 23 6d 61 78  69 74 25 20 20 20 20 20  |unt,#maxit%     |
00001030  20 20 20 20 20 20 20 20  20 3b 66 65 64 20 75 70  |         ;fed up|
00001040  20 77 69 74 68 20 70 6c  6f 74 74 69 6e 67 3f 0d  | with plotting?.|
00001050  07 80 35 42 4c 45 20 6c  6f 6f 70 20 20 20 20 20  |..5BLE loop     |
00001060  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00001070  20 20 3b 6e 6f 20 20 2d  20 20 6b 65 65 70 20 67  |  ;no  -  keep g|
00001080  6f 69 6e 67 0d 07 8a 38  4c 44 4d 46 44 20 52 31  |oing...8LDMFD R1|
00001090  33 21 2c 7b 50 43 7d 20  20 20 20 20 20 20 20 20  |3!,{PC}         |
000010a0  20 20 20 20 20 20 20 3b  79 65 73 20 2d 20 20 62  |       ;yes -  b|
000010b0  61 63 6b 20 74 6f 20 42  41 53 49 43 0d 07 94 05  |ack to BASIC....|
000010c0  3a 0d 07 9e 0a 2e 64 61  74 61 25 0d 07 a8 09 a4  |:.....data%.....|
000010d0  64 61 74 61 0d 07 b2 0a  2e 70 72 6f 62 25 0d 07  |data.....prob%..|
000010e0  bc 09 a4 70 72 6f 62 0d  07 c6 0a 2e 73 65 65 64  |...prob.....seed|
000010f0  25 0d 07 d0 0a 45 51 55  44 20 91 0d 07 da 09 2e  |%....EQUD ......|
00001100  78 6f 72 25 0d 07 e4 12  45 51 55 44 20 26 31 44  |xor%....EQUD &1D|
00001110  38 37 32 42 34 31 0d 07  ee 08 2e 63 78 25 0d 07  |872B41.....cx%..|
00001120  f8 0b 45 51 55 44 20 78  25 0d 08 02 08 2e 63 79  |..EQUD x%.....cy|
00001130  25 0d 08 0c 0b 45 51 55  44 20 79 25 0d 08 16 09  |%....EQUD y%....|
00001140  2e 73 63 72 25 0d 08 20  0c 45 51 55 44 20 31 34  |.scr%.. .EQUD 14|
00001150  38 0d 08 2a 0b 45 51 55  44 20 2d 31 0d 08 34 05  |8..*.EQUD -1..4.|
00001160  5d 0d 08 3e 05 ed 0d 08  48 26 c8 99 20 22 4f 53  |]..>....H&.. "OS|
00001170  5f 52 65 61 64 56 64 75  56 61 72 69 61 62 6c 65  |_ReadVduVariable|
00001180  73 22 2c 73 63 72 25 2c  73 63 72 25 0d 08 52 05  |s",scr%,scr%..R.|
00001190  e1 0d 08 5c 05 3a 0d 08  66 0b dd 20 a4 64 61 74  |...\.:..f.. .dat|
000011a0  61 0d 08 70 13 e3 20 49  25 3d 30 20 b8 20 74 72  |a..p.. I%=0 . tr|
000011b0  61 6e 73 25 0d 08 7a 0e  5b 4f 50 54 20 70 61 73  |ans%..z.[OPT pas|
000011c0  73 25 0d 08 84 0f 45 51  55 44 20 61 25 28 49 25  |s%....EQUD a%(I%|
000011d0  29 0d 08 8e 0f 45 51 55  44 20 62 25 28 49 25 29  |)....EQUD b%(I%)|
000011e0  0d 08 98 0f 45 51 55 44  20 65 25 28 49 25 29 0d  |....EQUD e%(I%).|
000011f0  08 a2 0f 45 51 55 44 20  63 25 28 49 25 29 0d 08  |...EQUD c%(I%)..|
00001200  ac 0f 45 51 55 44 20 64  25 28 49 25 29 0d 08 b6  |..EQUD d%(I%)...|
00001210  0f 45 51 55 44 20 66 25  28 49 25 29 0d 08 c0 05  |.EQUD f%(I%)....|
00001220  5d 0d 08 ca 05 ed 0d 08  d4 0e 5b 4f 50 54 20 70  |].........[OPT p|
00001230  61 73 73 25 0d 08 de 10  45 51 55 53 20 c4 32 34  |ass%....EQUS .24|
00001240  2c bd 30 29 0d 08 e8 05  5d 0d 08 f2 06 3d 30 0d  |,.0)....]....=0.|
00001250  08 fc 05 3a 0d 09 06 0b  dd 20 a4 70 72 6f 62 0d  |...:..... .prob.|
00001260  09 10 13 e3 20 49 25 3d  30 20 b8 20 74 72 61 6e  |.... I%=0 . tran|
00001270  73 25 0d 09 1a 0e 5b 4f  50 54 20 70 61 73 73 25  |s%....[OPT pass%|
00001280  0d 09 24 12 45 51 55 44  20 70 72 6f 62 25 28 49  |..$.EQUD prob%(I|
00001290  25 29 0d 09 2e 05 5d 0d  09 38 05 ed 0d 09 42 0e  |%)....]..8....B.|
000012a0  5b 4f 50 54 20 70 61 73  73 25 0d 09 4c 0c 45 51  |[OPT pass%..L.EQ|
000012b0  55 44 20 31 32 38 0d 09  56 05 5d 0d 09 60 06 3d  |UD 128..V.]..`.=|
000012c0  30 0d ff                                          |0..|
000012c3