Home » Personal collection » Acorn tapes » Electron_User » Electron_User_tape03a_acorn_eu_1989_september.wav » EXPERT

EXPERT

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_tape03a_acorn_eu_1989_september.wav
Filename: EXPERT
Read OK:
File size: 0C6E bytes
Load address: 2000
Exec address: 1900
Duplicates

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

File contents
   10 REM Expert Shell
   20 REM By Francis Botto
   30 REM (c) Electron User
   40 :
   50 MODE 6
   60 DIMA$(2,299)
   70 A%=1
   80 B%=0
   90 X%=19
  100 file$="New knowledge base"
  110 MODE6
  120 REM Switch cursor off
  130 VDU23;8202;0;0;0; 
  140 REM Omit the following line if using tape
  150 SOUND &11,-4,S%,2
  160 :
  170 DEF PROCmain_program
  180 PROCscreen
  190 PROCcommand_interpreter  
  200 PROCwhich_command
  210 END
  220 :
  230 DEF PROCscreen
  240 VDU19,3,1,0;0;19,0,7;0;
  250 VDU26,12,&1F,10,0:COLOUR129:COLOUR0:PRINT"EXPERT SYSTEM SHELL"
  260 COLOUR128:COLOUR1:PRINTTAB(0,2);" - ";file$  
  270 VDU&1F,1,4:PRINT"Right + left cursor keys + Return"
  280 VDU&1F,1,14:PRINT"Knowledge base -"
  290 COLOUR129:VDU28,0,24,39,15,12,28,0,13,39,5,12,26
  300 VDU&1F,1,5:COLOUR0:PRINT"   ENTER   EDIT  Expert  LOAD   SAVE"
  310 COLOUR129:PROCsquare  
  320 ENDPROC
  330 :
  340 DEF PROCcommand_interpreter
  350 REM Enable escape key
  360 *FX14,6
  370 REPEAT:UNTIL NOT INKEY(-74)
  380 ONERRORIFERR=33GOTO420  
  390 REPEAT
  400 IFINKEY(-122) AND X%<36X%=X%+1:VDU26:PROCsquare  
  410 IFINKEY(-26) AND X%>4X%=X%-1:VDU26:PROCsquare 
  420 IFINKEY(-74)ENDPROC
  430 B%=B%+1
  440 PROCwindow_computations
  450 IFINKEY(-74)PROCwhich_command
  460 UNTILINKEY(-74):PRINT"RETURN"
  470 ENDPROC
  480 :
  490 DEF PROCwhich_command
  500 PROCsound
  510 IFX%>3 AND X%<9 PROCenter  
  520 IFX%>11 AND X%<16 PROCedit 
  530 IFX%>17 AND X%<24 PROCinference_engine
  540 IFX%>25 AND X%<30 PROCload
  550 IFX%>32 AND X%<37 PROCsave
  560 GOTO190
  570 ENDPROC
  580 :
  590 DEF PROCenter
  600 VDU28,1,13,39,7 
  610 *FX15,1
  620 *FX13,6
  630 IFA%=300:PROCsound:PRINT;"Knowledge base full":GOTO190  
  640 ONERRORGOTO190
  650 PRINTTAB(0,6)
  660 PRINT;A%;" IF  ";:INPUTA$(1,A%)
  670 REPEAT:UNTIL NOT INKEY(-74)
  680 PRINT "  THEN  ";:INPUTA$(2,A%)
  690 A%=A%+1  
  700 ENDPROC
  710 :
  720 DEF PROCedit
  730 VDU28,1,13,39,7  
  740 *FX15,1
  750 *FX13,6 
  760 ONERRORGOTO190  
  770 PRINTTAB(0,6)
  780 PRINT "Which rule number "
  790 INPUTC%
  800 PRINTTAB(0,6);C%;" IF  ";:INPUTA$(1,C%)
  810 REPEAT:UNTIL NOT INKEY(-74)   
  820 PRINT;"  THEN  ";:INPUTA$(2,C%)   
  830 IFA%=C%A%=A%+1  
  840 ENDPROC  
  850 :
  860 DEF PROCinference_engine
  870 VDU28,1,13,39,7  
  880 *FX15,1
  890 *FX13,6 
  900 PRINT TAB(0,6)
  910 PRINT "Input problem"
  920 INPUTA$:PRINT"LEADS";:FORS%=1TO299
  930 IFA$=A$(1,S%)PRINT;":";A$(2,S%);
  940 NEXT
  950 REM Backward chain starts here
  960 PRINT
  970 PRINT "Input LEAD you wish to investigate"
  980 INPUTA$
  990 FORS%=1TO299
 1000 IFA$=A$(1,S%)PRINT;"-";A$(2,S%);:A$=A$(2,S%):GOTO990  
 1010 NEXT
 1020 ENDPROC
 1030 :
 1040 REM Procedure loads knowledge base
 1050 DEF PROCload
 1060 REM flush keyboard
 1070 *FX 15,1
 1080 REM enable escape
 1090 *FX13,6
 1100 VDU26,&1F,0,14:PRINT" "
 1110 VDU28,1,24,39,7,12  
 1120 ONERRORIFERR=17GOTO110
 1130 PRINT"(Cursor  keys  +  copy  enabled)"
 1140 REM   IMPORTANT!!  Omit the following line if using tape
 1150 *CAT
 1160 PRINT"Knowledge base title ";
 1170 INPUTfile$:y%=0:PRINTfile$  
 1180 V=OPENIN file$
 1190 REM   IMPORTANT!!  Omit the following line if using tape
 1200 IFPTR#V+EXT#V=0PRINT"Not  on  this  disk":GOTO1170
 1210 REPEAT:y%=y%+1:FORg%=1TO2
 1220 INPUT#V,A$(g%,y%):NEXT
 1230 UNTIL EOF #V
 1240 CLOSE #V
 1250 PRINTy%;" rules"
 1260 A%=y%
 1270 GOTO110
 1280 :
 1290 REM Procedure saves entire knowledge base
 1300 DEF PROCsave
 1310 REM Flush keyboard buffer
 1320 *FX15,1
 1330 REM Enable escape key
 1340 *FX13,6
 1350 VDU12,&1F,0,13:PRINT;"Knowledge base title"
 1360 ONERRORGOTO110
 1370 INPUTfile$:PRINTA%-1;" rules"
 1380 V=OPENOUT file$
 1390 FORs%=1TOA%:FORg%=1TO2   
 1400 PRINT#V,A$(g%,s%)
 1410 NEXT:NEXT
 1420 CLOSE #V
 1430 ENDPROC
 1440 :
 1450 DEF PROCwindow_computations
 1460 IFB%=300B%=0:ENDPROC  
 1470 COLOUR129:COLOUR0
 1480 VDU28,1,24,38,15 
 1490 PRINTTAB(0,9);B%;TAB(4,9);" IF ";A$(1,B%);" THEN ";A$(2,B%) 
 1500 ENDPROC
 1510 :
 1520 DEF PROCsquare
 1530 VDU&1F,0,6:PRINTTAB(X%-1,6)"    ":REM 4 spaces
 1540 VDU&1F,X%-1,6:PRINTCHR$(131);"^"  
 1550 ENDPROC
 1560 :
 1570 DEF PROCsound
 1580 FORS%=100TO150STEP50
 1590 SOUND1,-4,S%,2
 1600 NEXT
 1610 FOR S%=1 TO 1000:NEXT
 1620 ENDPROC

 � Expert Shell
 � By Francis Botto
 � (c) Electron User
( :
2 � 6
< �A$(2,299)
F	 A%=1
P	 B%=0
Z
 X%=19
d file$="New knowledge base"
n �6
x � Switch cursor off
� �23;8202;0;0;0; 
�, � Omit the following line if using tape
� � &11,-4,S%,2
� :
� � �main_program
� �screen
� �command_interpreter  
� �which_command
� �
� :
� � �screen
� �19,3,1,0;0;19,0,7;0;
�3 �26,12,&1F,10,0:�129:�0:�"EXPERT SYSTEM SHELL"
! �128:�1:�0,2);" - ";file$  
2 �&1F,1,4:�"Right + left cursor keys + Return"
" �&1F,1,14:�"Knowledge base -"
". �129:�28,0,24,39,15,12,28,0,13,39,5,12,26
,8 �&1F,1,5:�0:�"   ENTER   EDIT  Expert  LOAD   SAVE"
6 �129:�square  
@ �
J :
T � �command_interpreter
^ � Enable escape key
h *FX14,6
r �:� � �(-74)
| ��=33�tdA  
� �
�* �(-122) � X%<36X%=X%+1:�26:�square  
�' �(-26) � X%>4X%=X%-1:�26:�square 
�
 �(-74)�
� B%=B%+1
� �window_computations
� �(-74)�which_command
� ��(-74):�"RETURN"
� �
� :
� � �which_command
� �sound
� �X%>3 � X%<9 �enter  
 �X%>11 � X%<16 �edit 
% �X%>17 � X%<24 �inference_engine
 �X%>25 � X%<30 �load
& �X%>32 � X%<37 �save
0
 �t~@
: �
D :
N
 � �enter
X �28,1,13,39,7 
b *FX15,1
l *FX13,6
v3 �A%=300:�sound:�;"Knowledge base full":�t~@  
� ��t~@
� �0,6)
� �;A%;" IF  ";:�A$(1,A%)
� �:� � �(-74)
� � "  THEN  ";:�A$(2,A%)
� A%=A%+1  
� �
� :
� � �edit
� �28,1,13,39,7  
� *FX15,1
�
 *FX13,6 
� ��t~@  
 �0,6)
 � "Which rule number "
 �C%
 ! �0,6);C%;" IF  ";:�A$(1,C%)
* �:� � �(-74)   
4 �;"  THEN  ";:�A$(2,C%)   
> �A%=C%A%=A%+1  
H �  
R :
\ � �inference_engine
f �28,1,13,39,7  
p *FX15,1
z
 *FX13,6 
� � �0,6)
� � "Input problem"
� �A$:�"LEADS";:�S%=1�299
�  �A$=A$(1,S%)�;":";A$(2,S%);
� �
�! � Backward chain starts here
� �
�+ � "Input LEAD you wish to investigate"
� �A$
� �S%=1�299
�4 �A$=A$(1,S%)�;"-";A$(2,S%);:A$=A$(2,S%):�d^C  
� �
� �
 :
% � Procedure loads knowledge base
 � �load
$ � flush keyboard
.
 *FX 15,1
8 � enable escape
B *FX13,6
L �26,&1F,0,14:�" "
V �28,1,24,39,7,12  
` ��=17�Dn@
j( �"(Cursor  keys  +  copy  enabled)"
t; �   IMPORTANT!!  Omit the following line if using tape
~	 *CAT
� �"Knowledge base title ";
� �file$:y%=0:�file$  
� V=� file$
�; �   IMPORTANT!!  Omit the following line if using tape
�+ �#V+�#V=0�"Not  on  this  disk":�tRD
� �:y%=y%+1:�g%=1�2
� �#V,A$(g%,y%):�
� � � #V
�	 � #V
� �y%;" rules"
�
 A%=y%
�
 �Dn@
 :

, � Procedure saves entire knowledge base
 � �save
 � Flush keyboard buffer
( *FX15,1
2 � Enable escape key
< *FX13,6
F* �12,&1F,0,13:�;"Knowledge base title"
P ��Dn@
Z �file$:�A%-1;" rules"
d V=� file$
n �s%=1�A%:�g%=1�2   
x �#V,A$(g%,s%)
� �:�
�	 � #V
� �
� :
� � �window_computations
� �B%=300B%=0:�  
� �129:�0
� �28,1,24,38,15 
�7 �0,9);B%;�4,9);" IF ";A$(1,B%);" THEN ";A$(2,B%) 
� �
� :
� � �square
�( �&1F,0,6:�X%-1,6)"    ":� 4 spaces
 �&1F,X%-1,6:�(131);"^"  
 �
 :
"
 � �sound
, �S%=100�150�50
6 �1,-4,S%,2
@ �
J � S%=1 � 1000:�
T �
�
00000000  0d 00 0a 13 20 f4 20 45  78 70 65 72 74 20 53 68  |.... . Expert Sh|
00000010  65 6c 6c 0d 00 14 17 20  f4 20 42 79 20 46 72 61  |ell.... . By Fra|
00000020  6e 63 69 73 20 42 6f 74  74 6f 0d 00 1e 18 20 f4  |ncis Botto.... .|
00000030  20 28 63 29 20 45 6c 65  63 74 72 6f 6e 20 55 73  | (c) Electron Us|
00000040  65 72 0d 00 28 06 20 3a  0d 00 32 08 20 eb 20 36  |er..(. :..2. . 6|
00000050  0d 00 3c 0f 20 de 41 24  28 32 2c 32 39 39 29 0d  |..<. .A$(2,299).|
00000060  00 46 09 20 41 25 3d 31  0d 00 50 09 20 42 25 3d  |.F. A%=1..P. B%=|
00000070  30 0d 00 5a 0a 20 58 25  3d 31 39 0d 00 64 1f 20  |0..Z. X%=19..d. |
00000080  66 69 6c 65 24 3d 22 4e  65 77 20 6b 6e 6f 77 6c  |file$="New knowl|
00000090  65 64 67 65 20 62 61 73  65 22 0d 00 6e 07 20 eb  |edge base"..n. .|
000000a0  36 0d 00 78 18 20 f4 20  53 77 69 74 63 68 20 63  |6..x. . Switch c|
000000b0  75 72 73 6f 72 20 6f 66  66 0d 00 82 15 20 ef 32  |ursor off.... .2|
000000c0  33 3b 38 32 30 32 3b 30  3b 30 3b 30 3b 20 0d 00  |3;8202;0;0;0; ..|
000000d0  8c 2c 20 f4 20 4f 6d 69  74 20 74 68 65 20 66 6f  |., . Omit the fo|
000000e0  6c 6c 6f 77 69 6e 67 20  6c 69 6e 65 20 69 66 20  |llowing line if |
000000f0  75 73 69 6e 67 20 74 61  70 65 0d 00 96 12 20 d4  |using tape.... .|
00000100  20 26 31 31 2c 2d 34 2c  53 25 2c 32 0d 00 a0 06  | &11,-4,S%,2....|
00000110  20 3a 0d 00 aa 14 20 dd  20 f2 6d 61 69 6e 5f 70  | :.... . .main_p|
00000120  72 6f 67 72 61 6d 0d 00  b4 0c 20 f2 73 63 72 65  |rogram.... .scre|
00000130  65 6e 0d 00 be 1b 20 f2  63 6f 6d 6d 61 6e 64 5f  |en.... .command_|
00000140  69 6e 74 65 72 70 72 65  74 65 72 20 20 0d 00 c8  |interpreter  ...|
00000150  13 20 f2 77 68 69 63 68  5f 63 6f 6d 6d 61 6e 64  |. .which_command|
00000160  0d 00 d2 06 20 e0 0d 00  dc 06 20 3a 0d 00 e6 0e  |.... ..... :....|
00000170  20 dd 20 f2 73 63 72 65  65 6e 0d 00 f0 1a 20 ef  | . .screen.... .|
00000180  31 39 2c 33 2c 31 2c 30  3b 30 3b 31 39 2c 30 2c  |19,3,1,0;0;19,0,|
00000190  37 3b 30 3b 0d 00 fa 33  20 ef 32 36 2c 31 32 2c  |7;0;...3 .26,12,|
000001a0  26 31 46 2c 31 30 2c 30  3a fb 31 32 39 3a fb 30  |&1F,10,0:.129:.0|
000001b0  3a f1 22 45 58 50 45 52  54 20 53 59 53 54 45 4d  |:."EXPERT SYSTEM|
000001c0  20 53 48 45 4c 4c 22 0d  01 04 21 20 fb 31 32 38  | SHELL"...! .128|
000001d0  3a fb 31 3a f1 8a 30 2c  32 29 3b 22 20 2d 20 22  |:.1:..0,2);" - "|
000001e0  3b 66 69 6c 65 24 20 20  0d 01 0e 32 20 ef 26 31  |;file$  ...2 .&1|
000001f0  46 2c 31 2c 34 3a f1 22  52 69 67 68 74 20 2b 20  |F,1,4:."Right + |
00000200  6c 65 66 74 20 63 75 72  73 6f 72 20 6b 65 79 73  |left cursor keys|
00000210  20 2b 20 52 65 74 75 72  6e 22 0d 01 18 22 20 ef  | + Return"..." .|
00000220  26 31 46 2c 31 2c 31 34  3a f1 22 4b 6e 6f 77 6c  |&1F,1,14:."Knowl|
00000230  65 64 67 65 20 62 61 73  65 20 2d 22 0d 01 22 2e  |edge base -"..".|
00000240  20 fb 31 32 39 3a ef 32  38 2c 30 2c 32 34 2c 33  | .129:.28,0,24,3|
00000250  39 2c 31 35 2c 31 32 2c  32 38 2c 30 2c 31 33 2c  |9,15,12,28,0,13,|
00000260  33 39 2c 35 2c 31 32 2c  32 36 0d 01 2c 38 20 ef  |39,5,12,26..,8 .|
00000270  26 31 46 2c 31 2c 35 3a  fb 30 3a f1 22 20 20 20  |&1F,1,5:.0:."   |
00000280  45 4e 54 45 52 20 20 20  45 44 49 54 20 20 45 78  |ENTER   EDIT  Ex|
00000290  70 65 72 74 20 20 4c 4f  41 44 20 20 20 53 41 56  |pert  LOAD   SAV|
000002a0  45 22 0d 01 36 13 20 fb  31 32 39 3a f2 73 71 75  |E"..6. .129:.squ|
000002b0  61 72 65 20 20 0d 01 40  06 20 e1 0d 01 4a 06 20  |are  ..@. ...J. |
000002c0  3a 0d 01 54 1b 20 dd 20  f2 63 6f 6d 6d 61 6e 64  |:..T. . .command|
000002d0  5f 69 6e 74 65 72 70 72  65 74 65 72 0d 01 5e 18  |_interpreter..^.|
000002e0  20 f4 20 45 6e 61 62 6c  65 20 65 73 63 61 70 65  | . Enable escape|
000002f0  20 6b 65 79 0d 01 68 0c  20 2a 46 58 31 34 2c 36  | key..h. *FX14,6|
00000300  0d 01 72 11 20 f5 3a fd  20 ac 20 a6 28 2d 37 34  |..r. .:. . .(-74|
00000310  29 0d 01 7c 13 20 ee 85  e7 9f 3d 33 33 e5 8d 74  |)..|. ....=33..t|
00000320  64 41 20 20 0d 01 86 06  20 f5 0d 01 90 2a 20 e7  |dA  .... ....* .|
00000330  a6 28 2d 31 32 32 29 20  80 20 58 25 3c 33 36 58  |.(-122) . X%<36X|
00000340  25 3d 58 25 2b 31 3a ef  32 36 3a f2 73 71 75 61  |%=X%+1:.26:.squa|
00000350  72 65 20 20 0d 01 9a 27  20 e7 a6 28 2d 32 36 29  |re  ...' ..(-26)|
00000360  20 80 20 58 25 3e 34 58  25 3d 58 25 2d 31 3a ef  | . X%>4X%=X%-1:.|
00000370  32 36 3a f2 73 71 75 61  72 65 20 0d 01 a4 0d 20  |26:.square .... |
00000380  e7 a6 28 2d 37 34 29 e1  0d 01 ae 0c 20 42 25 3d  |..(-74)..... B%=|
00000390  42 25 2b 31 0d 01 b8 19  20 f2 77 69 6e 64 6f 77  |B%+1.... .window|
000003a0  5f 63 6f 6d 70 75 74 61  74 69 6f 6e 73 0d 01 c2  |_computations...|
000003b0  1a 20 e7 a6 28 2d 37 34  29 f2 77 68 69 63 68 5f  |. ..(-74).which_|
000003c0  63 6f 6d 6d 61 6e 64 0d  01 cc 16 20 fd a6 28 2d  |command.... ..(-|
000003d0  37 34 29 3a f1 22 52 45  54 55 52 4e 22 0d 01 d6  |74):."RETURN"...|
000003e0  06 20 e1 0d 01 e0 06 20  3a 0d 01 ea 15 20 dd 20  |. ..... :.... . |
000003f0  f2 77 68 69 63 68 5f 63  6f 6d 6d 61 6e 64 0d 01  |.which_command..|
00000400  f4 0b 20 f2 73 6f 75 6e  64 0d 01 fe 1a 20 e7 58  |.. .sound.... .X|
00000410  25 3e 33 20 80 20 58 25  3c 39 20 f2 65 6e 74 65  |%>3 . X%<9 .ente|
00000420  72 20 20 0d 02 08 1a 20  e7 58 25 3e 31 31 20 80  |r  .... .X%>11 .|
00000430  20 58 25 3c 31 36 20 f2  65 64 69 74 20 0d 02 12  | X%<16 .edit ...|
00000440  25 20 e7 58 25 3e 31 37  20 80 20 58 25 3c 32 34  |% .X%>17 . X%<24|
00000450  20 f2 69 6e 66 65 72 65  6e 63 65 5f 65 6e 67 69  | .inference_engi|
00000460  6e 65 0d 02 1c 19 20 e7  58 25 3e 32 35 20 80 20  |ne.... .X%>25 . |
00000470  58 25 3c 33 30 20 f2 6c  6f 61 64 0d 02 26 19 20  |X%<30 .load..&. |
00000480  e7 58 25 3e 33 32 20 80  20 58 25 3c 33 37 20 f2  |.X%>32 . X%<37 .|
00000490  73 61 76 65 0d 02 30 0a  20 e5 8d 74 7e 40 0d 02  |save..0. ..t~@..|
000004a0  3a 06 20 e1 0d 02 44 06  20 3a 0d 02 4e 0d 20 dd  |:. ...D. :..N. .|
000004b0  20 f2 65 6e 74 65 72 0d  02 58 13 20 ef 32 38 2c  | .enter..X. .28,|
000004c0  31 2c 31 33 2c 33 39 2c  37 20 0d 02 62 0c 20 2a  |1,13,39,7 ..b. *|
000004d0  46 58 31 35 2c 31 0d 02  6c 0c 20 2a 46 58 31 33  |FX15,1..l. *FX13|
000004e0  2c 36 0d 02 76 33 20 e7  41 25 3d 33 30 30 3a f2  |,6..v3 .A%=300:.|
000004f0  73 6f 75 6e 64 3a f1 3b  22 4b 6e 6f 77 6c 65 64  |sound:.;"Knowled|
00000500  67 65 20 62 61 73 65 20  66 75 6c 6c 22 3a e5 8d  |ge base full":..|
00000510  74 7e 40 20 20 0d 02 80  0c 20 ee 85 e5 8d 74 7e  |t~@  .... ....t~|
00000520  40 0d 02 8a 0b 20 f1 8a  30 2c 36 29 0d 02 94 1c  |@.... ..0,6)....|
00000530  20 f1 3b 41 25 3b 22 20  49 46 20 20 22 3b 3a e8  | .;A%;" IF  ";:.|
00000540  41 24 28 31 2c 41 25 29  0d 02 9e 11 20 f5 3a fd  |A$(1,A%).... .:.|
00000550  20 ac 20 a6 28 2d 37 34  29 0d 02 a8 1c 20 f1 20  | . .(-74).... . |
00000560  22 20 20 54 48 45 4e 20  20 22 3b 3a e8 41 24 28  |"  THEN  ";:.A$(|
00000570  32 2c 41 25 29 0d 02 b2  0e 20 41 25 3d 41 25 2b  |2,A%).... A%=A%+|
00000580  31 20 20 0d 02 bc 06 20  e1 0d 02 c6 06 20 3a 0d  |1  .... ..... :.|
00000590  02 d0 0c 20 dd 20 f2 65  64 69 74 0d 02 da 14 20  |... . .edit.... |
000005a0  ef 32 38 2c 31 2c 31 33  2c 33 39 2c 37 20 20 0d  |.28,1,13,39,7  .|
000005b0  02 e4 0c 20 2a 46 58 31  35 2c 31 0d 02 ee 0d 20  |... *FX15,1.... |
000005c0  2a 46 58 31 33 2c 36 20  0d 02 f8 0e 20 ee 85 e5  |*FX13,6 .... ...|
000005d0  8d 74 7e 40 20 20 0d 03  02 0b 20 f1 8a 30 2c 36  |.t~@  .... ..0,6|
000005e0  29 0d 03 0c 1b 20 f1 20  22 57 68 69 63 68 20 72  |).... . "Which r|
000005f0  75 6c 65 20 6e 75 6d 62  65 72 20 22 0d 03 16 08  |ule number "....|
00000600  20 e8 43 25 0d 03 20 21  20 f1 8a 30 2c 36 29 3b  | .C%.. ! ..0,6);|
00000610  43 25 3b 22 20 49 46 20  20 22 3b 3a e8 41 24 28  |C%;" IF  ";:.A$(|
00000620  31 2c 43 25 29 0d 03 2a  14 20 f5 3a fd 20 ac 20  |1,C%)..*. .:. . |
00000630  a6 28 2d 37 34 29 20 20  20 0d 03 34 1f 20 f1 3b  |.(-74)   ..4. .;|
00000640  22 20 20 54 48 45 4e 20  20 22 3b 3a e8 41 24 28  |"  THEN  ";:.A$(|
00000650  32 2c 43 25 29 20 20 20  0d 03 3e 14 20 e7 41 25  |2,C%)   ..>. .A%|
00000660  3d 43 25 41 25 3d 41 25  2b 31 20 20 0d 03 48 08  |=C%A%=A%+1  ..H.|
00000670  20 e1 20 20 0d 03 52 06  20 3a 0d 03 5c 18 20 dd  | .  ..R. :..\. .|
00000680  20 f2 69 6e 66 65 72 65  6e 63 65 5f 65 6e 67 69  | .inference_engi|
00000690  6e 65 0d 03 66 14 20 ef  32 38 2c 31 2c 31 33 2c  |ne..f. .28,1,13,|
000006a0  33 39 2c 37 20 20 0d 03  70 0c 20 2a 46 58 31 35  |39,7  ..p. *FX15|
000006b0  2c 31 0d 03 7a 0d 20 2a  46 58 31 33 2c 36 20 0d  |,1..z. *FX13,6 .|
000006c0  03 84 0c 20 f1 20 8a 30  2c 36 29 0d 03 8e 16 20  |... . .0,6).... |
000006d0  f1 20 22 49 6e 70 75 74  20 70 72 6f 62 6c 65 6d  |. "Input problem|
000006e0  22 0d 03 98 1c 20 e8 41  24 3a f1 22 4c 45 41 44  |".... .A$:."LEAD|
000006f0  53 22 3b 3a e3 53 25 3d  31 b8 32 39 39 0d 03 a2  |S";:.S%=1.299...|
00000700  20 20 e7 41 24 3d 41 24  28 31 2c 53 25 29 f1 3b  |  .A$=A$(1,S%).;|
00000710  22 3a 22 3b 41 24 28 32  2c 53 25 29 3b 0d 03 ac  |":";A$(2,S%);...|
00000720  06 20 ed 0d 03 b6 21 20  f4 20 42 61 63 6b 77 61  |. ....! . Backwa|
00000730  72 64 20 63 68 61 69 6e  20 73 74 61 72 74 73 20  |rd chain starts |
00000740  68 65 72 65 0d 03 c0 06  20 f1 0d 03 ca 2b 20 f1  |here.... ....+ .|
00000750  20 22 49 6e 70 75 74 20  4c 45 41 44 20 79 6f 75  | "Input LEAD you|
00000760  20 77 69 73 68 20 74 6f  20 69 6e 76 65 73 74 69  | wish to investi|
00000770  67 61 74 65 22 0d 03 d4  08 20 e8 41 24 0d 03 de  |gate".... .A$...|
00000780  0e 20 e3 53 25 3d 31 b8  32 39 39 0d 03 e8 34 20  |. .S%=1.299...4 |
00000790  e7 41 24 3d 41 24 28 31  2c 53 25 29 f1 3b 22 2d  |.A$=A$(1,S%).;"-|
000007a0  22 3b 41 24 28 32 2c 53  25 29 3b 3a 41 24 3d 41  |";A$(2,S%);:A$=A|
000007b0  24 28 32 2c 53 25 29 3a  e5 8d 64 5e 43 20 20 0d  |$(2,S%):..d^C  .|
000007c0  03 f2 06 20 ed 0d 03 fc  06 20 e1 0d 04 06 06 20  |... ..... ..... |
000007d0  3a 0d 04 10 25 20 f4 20  50 72 6f 63 65 64 75 72  |:...% . Procedur|
000007e0  65 20 6c 6f 61 64 73 20  6b 6e 6f 77 6c 65 64 67  |e loads knowledg|
000007f0  65 20 62 61 73 65 0d 04  1a 0c 20 dd 20 f2 6c 6f  |e base.... . .lo|
00000800  61 64 0d 04 24 15 20 f4  20 66 6c 75 73 68 20 6b  |ad..$. . flush k|
00000810  65 79 62 6f 61 72 64 0d  04 2e 0d 20 2a 46 58 20  |eyboard.... *FX |
00000820  31 35 2c 31 0d 04 38 14  20 f4 20 65 6e 61 62 6c  |15,1..8. . enabl|
00000830  65 20 65 73 63 61 70 65  0d 04 42 0c 20 2a 46 58  |e escape..B. *FX|
00000840  31 33 2c 36 0d 04 4c 16  20 ef 32 36 2c 26 31 46  |13,6..L. .26,&1F|
00000850  2c 30 2c 31 34 3a f1 22  20 22 0d 04 56 17 20 ef  |,0,14:." "..V. .|
00000860  32 38 2c 31 2c 32 34 2c  33 39 2c 37 2c 31 32 20  |28,1,24,39,7,12 |
00000870  20 0d 04 60 11 20 ee 85  e7 9f 3d 31 37 e5 8d 44  | ..`. ....=17..D|
00000880  6e 40 0d 04 6a 28 20 f1  22 28 43 75 72 73 6f 72  |n@..j( ."(Cursor|
00000890  20 20 6b 65 79 73 20 20  2b 20 20 63 6f 70 79 20  |  keys  +  copy |
000008a0  20 65 6e 61 62 6c 65 64  29 22 0d 04 74 3b 20 f4  | enabled)"..t; .|
000008b0  20 20 20 49 4d 50 4f 52  54 41 4e 54 21 21 20 20  |   IMPORTANT!!  |
000008c0  4f 6d 69 74 20 74 68 65  20 66 6f 6c 6c 6f 77 69  |Omit the followi|
000008d0  6e 67 20 6c 69 6e 65 20  69 66 20 75 73 69 6e 67  |ng line if using|
000008e0  20 74 61 70 65 0d 04 7e  09 20 2a 43 41 54 0d 04  | tape..~. *CAT..|
000008f0  88 1e 20 f1 22 4b 6e 6f  77 6c 65 64 67 65 20 62  |.. ."Knowledge b|
00000900  61 73 65 20 74 69 74 6c  65 20 22 3b 0d 04 92 19  |ase title ";....|
00000910  20 e8 66 69 6c 65 24 3a  79 25 3d 30 3a f1 66 69  | .file$:y%=0:.fi|
00000920  6c 65 24 20 20 0d 04 9c  0e 20 56 3d 8e 20 66 69  |le$  .... V=. fi|
00000930  6c 65 24 0d 04 a6 3b 20  f4 20 20 20 49 4d 50 4f  |le$...; .   IMPO|
00000940  52 54 41 4e 54 21 21 20  20 4f 6d 69 74 20 74 68  |RTANT!!  Omit th|
00000950  65 20 66 6f 6c 6c 6f 77  69 6e 67 20 6c 69 6e 65  |e following line|
00000960  20 69 66 20 75 73 69 6e  67 20 74 61 70 65 0d 04  | if using tape..|
00000970  b0 2b 20 e7 8f 23 56 2b  a2 23 56 3d 30 f1 22 4e  |.+ ..#V+.#V=0."N|
00000980  6f 74 20 20 6f 6e 20 20  74 68 69 73 20 20 64 69  |ot  on  this  di|
00000990  73 6b 22 3a e5 8d 74 52  44 0d 04 ba 16 20 f5 3a  |sk":..tRD.... .:|
000009a0  79 25 3d 79 25 2b 31 3a  e3 67 25 3d 31 b8 32 0d  |y%=y%+1:.g%=1.2.|
000009b0  04 c4 14 20 e8 23 56 2c  41 24 28 67 25 2c 79 25  |... .#V,A$(g%,y%|
000009c0  29 3a ed 0d 04 ce 0b 20  fd 20 c5 20 23 56 0d 04  |):..... . . #V..|
000009d0  d8 09 20 d9 20 23 56 0d  04 e2 11 20 f1 79 25 3b  |.. . #V.... .y%;|
000009e0  22 20 72 75 6c 65 73 22  0d 04 ec 0a 20 41 25 3d  |" rules".... A%=|
000009f0  79 25 0d 04 f6 0a 20 e5  8d 44 6e 40 0d 05 00 06  |y%.... ..Dn@....|
00000a00  20 3a 0d 05 0a 2c 20 f4  20 50 72 6f 63 65 64 75  | :..., . Procedu|
00000a10  72 65 20 73 61 76 65 73  20 65 6e 74 69 72 65 20  |re saves entire |
00000a20  6b 6e 6f 77 6c 65 64 67  65 20 62 61 73 65 0d 05  |knowledge base..|
00000a30  14 0c 20 dd 20 f2 73 61  76 65 0d 05 1e 1c 20 f4  |.. . .save.... .|
00000a40  20 46 6c 75 73 68 20 6b  65 79 62 6f 61 72 64 20  | Flush keyboard |
00000a50  62 75 66 66 65 72 0d 05  28 0c 20 2a 46 58 31 35  |buffer..(. *FX15|
00000a60  2c 31 0d 05 32 18 20 f4  20 45 6e 61 62 6c 65 20  |,1..2. . Enable |
00000a70  65 73 63 61 70 65 20 6b  65 79 0d 05 3c 0c 20 2a  |escape key..<. *|
00000a80  46 58 31 33 2c 36 0d 05  46 2a 20 ef 31 32 2c 26  |FX13,6..F* .12,&|
00000a90  31 46 2c 30 2c 31 33 3a  f1 3b 22 4b 6e 6f 77 6c  |1F,0,13:.;"Knowl|
00000aa0  65 64 67 65 20 62 61 73  65 20 74 69 74 6c 65 22  |edge base title"|
00000ab0  0d 05 50 0c 20 ee 85 e5  8d 44 6e 40 0d 05 5a 1a  |..P. ....Dn@..Z.|
00000ac0  20 e8 66 69 6c 65 24 3a  f1 41 25 2d 31 3b 22 20  | .file$:.A%-1;" |
00000ad0  72 75 6c 65 73 22 0d 05  64 0e 20 56 3d ae 20 66  |rules"..d. V=. f|
00000ae0  69 6c 65 24 0d 05 6e 18  20 e3 73 25 3d 31 b8 41  |ile$..n. .s%=1.A|
00000af0  25 3a e3 67 25 3d 31 b8  32 20 20 20 0d 05 78 12  |%:.g%=1.2   ..x.|
00000b00  20 f1 23 56 2c 41 24 28  67 25 2c 73 25 29 0d 05  | .#V,A$(g%,s%)..|
00000b10  82 08 20 ed 3a ed 0d 05  8c 09 20 d9 20 23 56 0d  |.. .:..... . #V.|
00000b20  05 96 06 20 e1 0d 05 a0  06 20 3a 0d 05 aa 1b 20  |... ..... :.... |
00000b30  dd 20 f2 77 69 6e 64 6f  77 5f 63 6f 6d 70 75 74  |. .window_comput|
00000b40  61 74 69 6f 6e 73 0d 05  b4 14 20 e7 42 25 3d 33  |ations.... .B%=3|
00000b50  30 30 42 25 3d 30 3a e1  20 20 0d 05 be 0c 20 fb  |00B%=0:.  .... .|
00000b60  31 32 39 3a fb 30 0d 05  c8 14 20 ef 32 38 2c 31  |129:.0.... .28,1|
00000b70  2c 32 34 2c 33 38 2c 31  35 20 0d 05 d2 37 20 f1  |,24,38,15 ...7 .|
00000b80  8a 30 2c 39 29 3b 42 25  3b 8a 34 2c 39 29 3b 22  |.0,9);B%;.4,9);"|
00000b90  20 49 46 20 22 3b 41 24  28 31 2c 42 25 29 3b 22  | IF ";A$(1,B%);"|
00000ba0  20 54 48 45 4e 20 22 3b  41 24 28 32 2c 42 25 29  | THEN ";A$(2,B%)|
00000bb0  20 0d 05 dc 06 20 e1 0d  05 e6 06 20 3a 0d 05 f0  | .... ..... :...|
00000bc0  0e 20 dd 20 f2 73 71 75  61 72 65 0d 05 fa 28 20  |. . .square...( |
00000bd0  ef 26 31 46 2c 30 2c 36  3a f1 8a 58 25 2d 31 2c  |.&1F,0,6:..X%-1,|
00000be0  36 29 22 20 20 20 20 22  3a f4 20 34 20 73 70 61  |6)"    ":. 4 spa|
00000bf0  63 65 73 0d 06 04 1e 20  ef 26 31 46 2c 58 25 2d  |ces.... .&1F,X%-|
00000c00  31 2c 36 3a f1 bd 28 31  33 31 29 3b 22 5e 22 20  |1,6:..(131);"^" |
00000c10  20 0d 06 0e 06 20 e1 0d  06 18 06 20 3a 0d 06 22  | .... ..... :.."|
00000c20  0d 20 dd 20 f2 73 6f 75  6e 64 0d 06 2c 13 20 e3  |. . .sound..,. .|
00000c30  53 25 3d 31 30 30 b8 31  35 30 88 35 30 0d 06 36  |S%=100.150.50..6|
00000c40  0f 20 d4 31 2c 2d 34 2c  53 25 2c 32 0d 06 40 06  |. .1,-4,S%,2..@.|
00000c50  20 ed 0d 06 4a 14 20 e3  20 53 25 3d 31 20 b8 20  | ...J. . S%=1 . |
00000c60  31 30 30 30 3a ed 0d 06  54 06 20 e1 0d ff        |1000:...T. ...|
00000c6e
EXPERT.m0
EXPERT.m1
EXPERT.m2
EXPERT.m4
EXPERT.m5