10 DEFINT A-Z
20 KEY OFF
30 DEF SEG=&H40
40 WD=PEEK(&H4A)
50 DEF SEG
55 WIDTH WD
60 CL$=CHR$(12)
90 BELL$=CHR$(7):PRINT CL$
100 PRINT TAB(30)"ELIZA - Version 3.0"
110 PRINT TAB(21)"Copyright (C) 1981 by Steve Grumette"
120 PRINT TAB(30)"All rights reserved"
140 T=1
150 DIM OW$(22),RW$(22),LO(22),LR(22),A$(20),K$(44),B$(27),M$(20)
160 OPEN"I",1,"STRINGS.FIL"
170 FOR I=1 TO 22:INPUT#1,OW$(I),RW$(I),LO(I),LR(I):NEXT
180 RW$(12)=" YO"+CHR$(0)+"U ":RW$(21)=" AR"+CHR$(0)+"E "
190 FOR I=1 TO 27:INPUT#1,B$(I):NEXT
200 B$(2)=" AR"+CHR$(0)+"E "
210 Y$="YO"+CHR$(0)+"U "
220 FOR I=1 TO 44:INPUT#1,K$(I):NEXT
230 K$(22)=" AR"+CHR$(0)+"E ":K$(43)=" YO"+CHR$(0)+"U "
240 CLOSE:DIM S$(100):PRINT:PRINT
250 FOR I=1 TO 4:READ ZZ:FZ$=FZ$+CHR$(ZZ):NEXT
260 FOR I=1 TO 4:READ ZZ:SZ$=SZ$+CHR$(ZZ):NEXT
270 PRINT"HOW DO YOU DO."
275 PRINT"PLEASE TELL ME YOUR PROBLEM.":PRINT
280 IF X=100 THEN 5020 ELSE LINE INPUT A$
290 IF A$<>"DISPLAY"AND A$<>"display"THEN 330ELSE IF X=0 THEN 4780    ELSE PRINT CL$:PRINT:FOR J=0 TO X-1:B$=S$(J):GOSUB 4610:    IF J MOD 2=0 THEN 320
300 PRINT:IF J=X-1 THEN 320
310 A$=INKEY$:IF A$=CHR$(13)THEN 320 ELSE 310
320 NEXT:GOTO 280
330 IF A$="RESTART"OR A$="restart"THEN RUN ELSE B=1
340 IF A$="CLEAR"OR A$="clear"THEN IF X=0 THEN 4780ELSE X=0:PRINT CL$:    PRINT TAB(22)"**** CONVERSATION BUFFER CLEARED ****":GOTO 4800
350 IF A$="SAVE"OR A$="save"THEN 4780
360 A=INSTR(B,A$,CHR$(13)):IF A<>0 THEN MID$(A$,A)=" ":B=A+1:GOTO 360
370 S$(X)=A$:X=X+1
380 IF T=0 OR A$=""THEN 400ELSE FOR I=1 TO LEN(A$):A=ASC(MID$(A$,I,1)):    IF A>96 THEN MID$(A$,I)=CHR$(A-32)
390 NEXT
400 A$="  "+A$+" "
410 IF INSTR(A$," SEX")<>0 THEN SX=1
420 FOR I=1 TO 22
430 B=1
440 A=INSTR(B,A$,OW$(I)):IF A<>0 THEN A$=LEFT$(A$,A-1)+RW$(I)+    MID$(A$,A+LO(I)):B=A+LR(I):GOTO 440
450 NEXT
460 IF INSTR(A$,FZ$)OR INSTR(A$,SZ$)THEN GOSUB 4410:    GOSUB 4600:GOTO 640
470 B=1
480 A=INSTR(B,A$,"*"):IF A<>0 THEN MID$(A$,A)="Y":B=A+1:GOTO 480
490 I=0
500 A=INSTR(A$,"."):IF A=0 THEN A=LEN(A$)+1
510 A0$=LEFT$(A$,A-1):IF INSTR(SPACE$(100),A0$)=1 THEN 530    ELSE I=I+1:A$(I)=A0$
520 IF ASC(RIGHT$(A$(I),2))=32 AND LEN(A$(I))>2 THEN A$(I)=    LEFT$(A$(I),LEN(A$(I))-1):GOTO 520
530 A$=MID$(A$,A+1):IF LEN(A$)>2 THEN 500
540 IF I=0 THEN X=X-1:GOTO 280
550 NE=NE+1
560 FOR P=1 TO I:A$=A$(P)
570 A0=50:FOR Z=1 TO 44:A=INSTR(A$,K$(Z)):IF A=0 THEN 590    ELSE IF Z<21 THEN 620
580 IF A<A0 THEN A0=A:Z0=Z
590 NEXT Z
600 IF A0<>50 THEN Z=Z0:A=A0:GOTO 620
610 NEXT P:GOTO 1500
620 ON Z GOSUB 650,650,650,650,660,670,680,670,710,750,    780,800,820,820,820,820,840,890,950,1220,960,990,    1020,1030,1070,1070,1080,1080,1080,1080,1090,1100,1100,1100,    1100,1110,1170,1180,1180,1190,1210,1230,1280,1490
630 IF A=0 THEN 590ELSE IF A=-1 THEN 610
640 PRINT:GOTO 280
650 GOSUB 1600:GOTO 4600
660 GOSUB 1680:GOTO 4600
670 GOSUB 1720:GOTO 4600
680 B$=LEFT$(A$,A)
690 FOR I=1 TO 4:IF INSTR(B$,B$(I))<>0 THEN 670
700 NEXT:A=0:RETURN
710 C=A:GOSUB 1520:D=A:A=C:GOSUB 1550:IF A=0 THEN RETURN     ELSE D$=MID$(A$,A,4):IF D=0 OR(D$+" "<>Y$AND D$<>"YOU ")THEN 730
720 A=D:GOSUB 1580:GOSUB 1820:GOTO 4600
730 GOSUB 1550:IF A=0 THEN RETURN ELSE IF MID$(A$,A,5)="DO I "     THEN A=D:GOSUB 1580:ELSE A=0:RETURN
740 GOSUB 1900:IF X4=4 THEN 1100ELSE 4600
750 C=A:GOSUB 1520:IF A=0 THEN RETURN ELSE D=A:A=C:GOSUB 1550:     IF A=0 THEN RETURN ELSE IF MID$(A$,A,5)=Y$THEN A=D:GOSUB 1580     ELSE A=0:RETURN
760 GOSUB 1990:IF X5=4 THEN 780ELSE IF A<>0 THEN 4600
770 RETURN
780 GOSUB 2060:IF A<>0 THEN 4600
790 RETURN
800 GOSUB 1520:IF A=0 THEN RETURN
810 GOSUB 1580:GOSUB 2130:GOTO 4600
820 D$=MID$(K$(Z),1,LEN(K$(Z))-1):GOSUB 2190:GOTO 4600
830 PRINT B$:RETURN
840 C=A:GOSUB 1550:D=A:A=C:GOSUB 1520:IF D<>0     THEN IF MID$(A$,D,5)=Y$THEN GOSUB 1580:GOSUB 2300:GOTO 4600
850 IF A=0 THEN RETURN ELSE C=A:GOSUB 1520:GOSUB 1580
860 IF MID$(A$,C,5)=Y$THEN GOSUB 2350:IF XA=6 THEN 1100ELSE 4600
870 IF MID$(A$,C,2)="I "THEN GOSUB 2430:GOTO 4600
880 A=0:RETURN
890 GOSUB 1520:GOSUB 1580:IF A=0 THEN RETURN ELSE IF S=0 THEN NE=0
900 S=S+1:M$(S)=D$:FOR I=5 TO 11:B=INSTR(A-1,A$,B$(I)):     IF B<>0 THEN F$=LEFT$(B$(I),LEN(B$(I))-1):A=B:ELSE 930
910 IF I<7 THEN M=1
920 GOSUB 1520:GOSUB 1580:GOSUB 2500:GOTO 4600
930 NEXT
940 GOSUB 2560:GOTO 4600
950 GOSUB 2620:GOTO 4600
960 GOSUB 1520:IF A=0 THEN 980ELSE IF MID$(A$,A,2)="I "THEN     GOSUB 1520ELSE 980
970 GOSUB 1580:GOSUB 2680:IF XF=5 THEN 1100ELSE GOTO 4600
980 GOSUB 1580:GOSUB 2750:GOTO 4600
990 GOSUB 1520:IF A=0 THEN 1010ELSE C=A:GOSUB 1520:GOSUB 1580
1000 IF MID$(A$,C,5)=Y$THEN GOSUB 2810:IF XH=5 THEN 1100ELSE GOTO 4600
1010 GOSUB 2880:GOTO 4600
1020 GOSUB 2900:GOTO 4600
1030 GOSUB 1520:IF A=0 THEN A=-1:RETURN ELSE C=A:GOSUB 1520:GOSUB 1580
1040 IF MID$(A$,C,2)="I "THEN GOSUB 2960:IF XK=2 THEN 1100ELSE 4600
1050 IF MID$(A$,C,5)=Y$THEN GOSUB 3020:IF XL=4 THEN 1100ELSE 4600
1060 A=-1:RETURN
1070 GOSUB 3080:GOTO 4600
1080 B$="I AM SORRY, I SPEAK ONLY ENGLISH.":GOTO 4600
1090 B$="HELLO.  PLEASE STATE YOUR PROBLEM.":GOTO 4600
1100 GOSUB 3140:GOTO 4600
1110 GOSUB 1520:GOSUB 1580:IF A=0 THEN 1160
1120 IF MID$(A$,A,14)="REMIND YOU OF "THEN 670
1130 IF MID$(A$,A,4)="ARE "THEN GOSUB 1520:GOSUB 1580ELSE 1150
1140 GOSUB 3250:GOTO 4600
1150 A1=INSTR(A,A$," YOU "):IF A1>0 THEN D$=MID$(A$,A-1,A1-A+1):     GOSUB 3310:GOTO 4600
1160 GOSUB 3400:GOTO 4600
1170 GOSUB 1520:GOSUB 1580:GOTO 1140
1180 GOSUB 3460:GOTO 4600
1190 GOSUB 1520:IF A=0 THEN A=-1:RETURN ELSE GOSUB 1580
1200 GOSUB 3530:GOTO 4600
1210 GOSUB 3590:GOTO 4600
1220 GOSUB 3660:GOTO 4600
1230 GOSUB 1520:IF A=0 THEN A=1:GOTO 1100
1240 IF MID$(A$,A,8)="DON'T I "THEN A=A+5:GOSUB 1520ELSE 1260
1250 GOSUB 1580:GOSUB 3720:IF XV=5 THEN 1100ELSE GOTO 4600
1260 IF MID$(A$,A,11)=("CAN'T "+Y$)THEN A=A+5:GOSUB 1520ELSE 1100
1270 GOSUB 1580:GOSUB 3790:IF XW=5 THEN 1100ELSE GOTO 4600
1280 GOSUB 1520:IF A=0 THEN 4590ELSE FOR I=12 TO 13:     IF MID$(A$,A-1,6)<>B$(I)THEN NEXT:GOTO 1310
1290 GOSUB 1520:IF A=0 THEN 4590ELSE GOSUB 1580
1300 GOSUB 3860:GOTO 4600
1310 IF MID$(A$,A,5)<>("AR"+CHR$(0)+"E ")THEN 1380
1320 FOR I=14 TO 17:IF INSTR(A,A$,B$(I))=0 THEN NEXT:GOTO 1340
1330 A$=B$(I):A=2:GOSUB 1580:GOSUB 3940:GOTO 4600
1340 FOR I=18 TO 21:IF INSTR(A,A$,B$(I))=0 THEN NEXT:GOTO 1360
1350 A$=B$(I):A=2:GOSUB 1580:GOSUB 4000:GOTO 4600
1360 GOSUB 1520:IF A=0 THEN 4590ELSE GOSUB 1580
1370 GOSUB 4060:GOTO 4600
1380 FOR I=22 TO 25:IF INSTR(A-1,A$,B$(I))<>A-1 THEN NEXT:GOTO 1420
1390 GOSUB 1520:IF A=0 THEN 4590ELSE IF MID$(A$,A,5)<>Y$THEN 1410
1400 GOSUB 1520:GOSUB 1580:IF A=0 THEN 4590ELSE GOSUB 4120:GOTO 4600
1410 C=INSTR(A-1,A$," I "):IF C<>0 THEN A=C:GOTO 1110ELSE 1460
1420 FOR I=26 TO 27:C=INSTR(A-1,A$,B$(I)):IF C=0 THEN NEXT:GOTO 1440
1430 A=C:GOSUB 1520:GOSUB 1580:GOSUB 4170:GOTO 4600
1440 IF MID$(A$,A,6)<>"DON'T "THEN 1470ELSE GOSUB 1520:GOSUB 1580
1450 GOSUB 4230:GOTO 4600
1460 IF I=22 THEN GOSUB 1580:GOSUB 4290:GOTO 4600
1470 C=INSTR(A,A$," I "):IF C=0 THEN 4590
1480 D$=MID$(A$,A-1,C-A+1):GOSUB 4350:GOTO 4600
1490 GOTO 1320
1500 IF NE>5 AND S<>0 THEN NE=0:GOTO 4460ELSE GOSUB 4690:     GOSUB 4600:GOTO 640
1510 DATA 83,72,73,84,70,85,67,75
1520 A=A+1:A=INSTR(A,A$," ")
1530 A=A+1:IF A>LEN(A$)THEN A=0:RETURN ELSE IF MID$(A$,A,1)=" "THEN 1530
1540 RETURN
1550 A=A-1:IF A=0 THEN RETURN ELSE IF MID$(A$,A,1)=" "THEN 1550
1560 A=A-1:IF MID$(A$,A,1)<>" "THEN 1560
1570 A=A+1:RETURN
1580 IF A=0 THEN D$=""ELSE D$=MID$(A$,A-1,LEN(A$)-A+1)
1590 RETURN
1600 X0=X0+1:IF X0=7 THEN X0=1
1610 ON X0 GOTO 1620,1630,1640,1650,1660,1670
1620 B$="DO COMPUTERS WORRY YOU?":RETURN
1630 B$="WHY DO YOU MENTION COMPUTERS?":RETURN
1640 B$="WHAT DO YOU THINK MACHINES HAVE TO DO WITH YOUR PROBLEM?":      RETURN
1650 B$="DON'T YOU THINK COMPUTERS CAN HELP PEOPLE?":RETURN
1660 B$="WHAT ABOUT MACHINES WORRIES YOU?":RETURN
1670 B$="WHAT DO YOU THINK ABOUT MACHINES?":RETURN
1680 X1=X1+1:IF X1=3 THEN X1=1
1690 ON X1 GOTO 1700,1710
1700 B$="I AM NOT INTERESTED IN NAMES.":RETURN
1710 B$="I'VE TOLD YOU BEFORE, I DON'T CARE ABOUT NAMES - PLEASE CONTINUE.":      RETURN
1720 X2=X2+1:IF X2=9 THEN X2=1
1730 ON X2 GOTO 1740,1750,1760,1770,1780,1790,1800,1810
1740 B$="IN WHAT WAY?":RETURN
1750 B$="WHAT RESEMBLANCE DO YOU SEE?":RETURN
1760 B$="WHAT DOES THAT SIMILARITY SUGGEST TO YOU?":RETURN
1770 B$="WHAT OTHER CONNECTIONS DO YOU SEE":RETURN
1780 B$="WHAT DO YOU SUPPOSE THAT RESEMBLANCE MEANS?":RETURN
1790 B$="WHAT IS THE CONNECTION, DO YOU SUPPOSE?":RETURN
1800 B$="COULD THERE REALLY BE SOME CONNECTION?":RETURN
1810 B$="HOW?":RETURN
1820 X3=X3+1:IF X3=7 THEN X3=1
1830 ON X3 GOTO 1840,1850,1860,1870,1880,1890
1840 B$="DO YOU OFTEN THINK OF"+D$+"?":RETURN
1850 B$="DOES THINKING OF"+D$+" BRING ANYTHING ELSE TO MIND?":RETURN
1860 B$="WHAT ELSE DO YOU REMEMBER?":RETURN
1870 B$="WHY DO YOU REMEMBER"+D$+" JUST NOW?":RETURN
1880 B$="WHAT IN THE PRESENT SITUATION REMINDS YOU OF"+D$+"?":RETURN
1890 B$="WHAT IS THE CONNECTION BETWEEN ME AND"+D$+"?":RETURN
1900 X4=X4+1:IF X4=6 THEN X4=1
1910 ON X4 GOTO 1920,1930,1940,1960,1970
1920 B$="DID YOU THINK I WOULD FORGET"+D$+"?":RETURN
1930 B$="WHY DO YOU THINK I SHOULD RECALL"+D$+" NOW?":RETURN
1940 IF A=0 THEN D$=" IT"
1950 B$="WHAT ABOUT"+D$+"?":RETURN
1960 RETURN
1970 IF A=0 THEN D$=" IT"
1980 B$="YOU MENTIONED"+D$+".":RETURN
1990 X5=X5+1:IF X5=6 THEN X5=1
2000 ON X5 GOTO 2010,2020,2030,2040,2050
2010 B$="REALLY,"+D$+"?":RETURN
2020 B$="HAVE YOU EVER FANTASIED"+D$+" WHILE YOU WERE AWAKE?":RETURN
2030 B$="HAVE YOU DREAMT"+D$+" BEFORE?":RETURN
2040 RETURN
2050 A=0:RETURN
2060 X6=X6+1:IF X6=6 THEN X6=1
2070 ON X6 GOTO 2080,2090,2100,2110,2120
2080 B$="WHAT DOES THAT DREAM SUGGEST TO YOU?":RETURN
2090 B$="DO YOU DREAM OFTEN?":RETURN
2100 B$="WHAT PERSONS APPEAR IN YOUR DREAMS?":RETURN
2110 B$="DON'T YOU BELIEVE THAT DREAM HAS SOMETHING TO DO WITH YOUR PROBLEM?":      RETURN
2120 A=0:RETURN
2130 X7=X7+1:IF X7=5 THEN X7=1
2140 ON X7 GOTO 2150,2160,2170,2180
2150 B$="DO YOU THINK ITS LIKELY THAT"+D$+"?":RETURN
2160 B$="DO YOU WISH THAT"+D$+"?":RETURN
2170 B$="WHAT DO YOU THINK ABOUT IF"+D$+"?":RETURN
2180 B$="REALLY, IF"+D$+"?":RETURN
2190 X8=X8+1:IF X8=10 THEN X8=1
2200 ON X8 GOTO 2210,2220,2230,2240,2250,2260,2270,2280,2290
2210 B$="REALLY,"+D$+"?":RETURN
2220 B$="SURELY NOT"+D$+"?":RETURN
2230 B$="CAN YOU THINK OF ANYONE IN PARTICULAR?":RETURN
2240 B$="WHO, FOR EXAMPLE?":RETURN
2250 B$="YOU ARE THINKING OF A VERY SPECIAL PERSON.":RETURN
2260 B$="WHO, MAY I ASK?":RETURN
2270 B$="SOMEONE SPECIAL PERHAPS?":RETURN
2280 B$="YOU HAVE A PARTICULAR PERSON IN MIND, DON'T YOU?":RETURN
2290 B$="WHO DO YOU THINK YOU'RE TALKING ABOUT?":RETURN
2300 X9=X9+1:IF X9=4 THEN X9=1
2310 ON X9 GOTO 2320,2330,2340
2320 B$="WERE YOU REALLY?":RETURN
2330 B$="WHY DO YOU TELL ME YOU WERE"+D$+" NOW?":RETURN
2340 B$="PERHAPS I ALREADY KNEW YOU WERE"+D$+".":RETURN
2350 XA=XA+1:IF XA=7 THEN XA=1
2360 ON XA GOTO 2370,2380,2390,2400,2410,2420
2370 B$="WHAT IF YOU WERE"+D$+"?":RETURN
2380 B$="DO YOU THINK YOU WERE"+D$+"?":RETURN
2390 B$="WERE YOU"+D$+"?":RETURN
2400 B$="WHAT WOULD IT MEAN IF YOU WERE"+D$+"?":RETURN
2410 IF A=0 THEN XA=6:RETURN ELSE B$="WHAT DOES "+CHR$(34)+      RIGHT$(D$,LEN(D$)-1)+CHR$(34)+" SUGGEST TO YOU?":RETURN
2420 RETURN
2430 XB=XB+1:IF XB=6 THEN XB=1
2440 ON XB GOTO 2450,2460,2470,2480,2490
2450 B$="WOULD YOU LIKE TO BELIEVE I WAS"+D$+"?":RETURN
2460 B$="WHAT SUGGESTS THAT I WAS"+D$+"?":RETURN
2470 B$="WHAT DO YOU THINK?":RETURN
2480 B$="PERHAPS I WAS"+D$+".":RETURN
2490 B$="WHAT IF I HAD BEEN"+D$+"?":RETURN
2500 XC=XC+1:IF XC=5 THEN XC=1
2510 ON XC GOTO 2520,2530,2540,2550
2520 B$="TELL ME MORE ABOUT YOUR FAMILY.":RETURN
2530 IF A=0 THEN XC=3:GOTO 2540ELSE B$="WHO ELSE IN YOUR FAMILY"+      D$+"?":RETURN
2540 B$="LET'S TALK ABOUT YOUR"+F$+".":RETURN
2550 B$="WHAT ELSE COMES TO MIND WHEN YOU THINK OF YOUR"+      F$+"?":RETURN
2560 XD=XD+1:IF XD=5 THEN XD=1
2570 ON XD GOTO 2580,2590,2600,2610
2580 IF A=0 THEN XD=2:GOTO 2590ELSE B$="YOUR"+D$+" - THAT'S INTERESTING."      :RETURN
2590 B$="WHY DO YOU SAY YOUR"+D$+"?":RETURN
2600 B$="DOES THE FACT THAT YOUR"+D$+" SUGGEST ANYTHING ELSE TO YOU?"      :RETURN
2610 B$="IS IT IMPORTANT TO YOU THAT YOUR"+D$+"?":RETURN
2620 XE=XE+1:IF XE=5 THEN XE=1
2630 ON XE GOTO 2640,2650,2660,2670
2640 B$="CAN YOU THINK OF A SPECIFIC EXAMPLE?":RETURN
2650 B$="WHEN?":RETURN
2660 B$="WHAT INCIDENT ARE YOU THINKING OF?":RETURN
2670 B$="REALLY, ALWAYS?":RETURN
2680 XF=XF+1:IF XF=6 THEN XF=1
2690 ON XF GOTO 2700,2710,2720,2730,2740
2700 B$="WHY ARE YOU INTERESTED IN WHETHER I AM"+D$+" OR NOT?":RETURN
2710 B$="WOULD YOU PREFER IT IF I WEREN'T"+D$+"?":RETURN
2720 B$="PERHAPS I AM"+D$+" IN YOUR FANTASIES.":RETURN
2730 B$="DO YOU SOMETIMES THINK I AM"+D$+"?":RETURN
2740 RETURN
2750 XG=XG+1:IF XG=5 THEN XG=1
2760 ON XG GOTO 2770,2780,2790,2800
2770 B$="DID YOU THINK THEY MIGHT NOT BE"+D$+"?":RETURN
2780 B$="WOULD YOU LIKE IT IF THEY WERE NOT"+D$+"?":RETURN
2790 B$="WHAT IF THEY WERE NOT"+D$+"?":RETURN
2800 B$="POSSIBLY THEY ARE"+D$+".":RETURN
2810 XH=XH+1:IF XH=6 THEN XH=1
2820 ON XH GOTO 2830,2840,2850,2860,2870
2830 B$="DO YOU BELIEVE YOU ARE"+D$+"?":RETURN
2840 B$="WOULD YOU WANT TO BE"+D$+"?":RETURN
2850 B$="YOU WISH I WOULD TELL YOU THAT YOU ARE"+D$+".":RETURN
2860 B$="WHAT WOULD IT MEAN TO YOU IF YOU WERE"+D$+"?":RETURN
2870 RETURN
2880 IF XI=0 THEN XI=1:B$="WHY DO YOU SAY "+CHR$(34)+"AM"+      CHR$(34)+"?"ELSE XI=0:B$="I DON'T UNDERSTAND THAT."
2890 RETURN
2900 XJ=XJ+1:IF XJ=5 THEN XJ=1
2910 ON XJ GOTO 2920,2930,2940,2950
2920 B$="IS THAT THE REAL REASON?":RETURN
2930 B$="DON'T ANY OTHER REASONS COME TO MIND?":RETURN
2940 B$="DOES THAT REASON SEEM TO EXPLAIN ANYTHING ELSE?":RETURN
2950 B$="WHAT OTHER REASONS MIGHT THERE BE?":RETURN
2960 XK=XK+1:IF XK=5 THEN XK=1
2970 ON XK GOTO 2980,2990,3000,3010
2980 B$="YOU BELIEVE I CAN"+D$+", DON'T YOU?":RETURN
2990 RETURN
3000 B$="DO YOU WANT ME TO BE ABLE TO"+D$+"?":RETURN
3010 B$="PERHAPS YOU WOULD LIKE TO BE ABLE TO"+D$+" YOURSELF.":RETURN
3020 XL=XL+1:IF XL=5 THEN XL=1
3030 ON XL GOTO 3040,3050,3060,3070
3040 B$="WHETHER OR NOT YOU CAN"+D$+" DEPENDS ON YOU MORE THAN ON ME.":      RETURN
3050 B$="DO YOU WANT TO BE ABLE TO"+D$+"?":RETURN
3060 B$="PERHAPS YOU DON'T WANT TO"+D$+"?":RETURN
3070 RETURN
3080 XM=XM+1:IF XM=5 THEN XM=1
3090 ON XM GOTO 3100,3110,3120,3130
3100 B$="YOU SEEM QUITE POSITIVE.":RETURN
3110 B$="YOU ARE SURE?":RETURN
3120 B$="I SEE.":RETURN
3130 B$="I UNDERSTAND.":RETURN
3140 XN=XN+1:IF XN=10 THEN XN=1
3150 ON XN GOTO 3160,3170,3180,3190,3200,3210,3220,3230,3240
3160 B$="WHY DO YOU ASK?":RETURN
3170 B$="DOES THAT QUESTION INTEREST YOU?":RETURN
3180 B$="WHAT IS IT YOU REALLY WANT TO KNOW?":RETURN
3190 B$="ARE SUCH QUESTIONS MUCH ON YOUR MIND?":RETURN
3200 B$="WHAT ANSWER WOULD PLEASE YOU MOST?":RETURN
3210 B$="WHAT DO YOU THINK?":RETURN
3220 B$="WHAT COMES TO YOUR MIND WHEN YOU ASK THAT?":RETURN
3230 B$="HAVE YOU ASKED SUCH QUESTIONS BEFORE?":RETURN
3240 B$="HAVE YOU ASKED ANYONE ELSE?":RETURN
3250 XO=XO+1:IF XO=5 THEN XO=1
3260 ON XO GOTO 3270,3280,3290,3300
3270 B$="WHAT MAKES YOU THINK I AM"+D$+"?":RETURN
3280 B$="DOES IT PLEASE YOU TO BELIEVE I AM"+D$+"?":RETURN
3290 B$="DO YOU SOMETIMES WISH YOU WERE"+D$+"?":RETURN
3300 B$="PERHAPS YOU WOULD LIKE TO BE"+D$+"?":RETURN
3310 XP=XP+1:IF XP=8 THEN XP=1
3320 ON XP GOTO 3330,3340,3350,3360,3370,3380,3390
3330 B$="WHY DO YOU THINK I"+D$+" YOU?":RETURN
3340 B$="YOU LIKE TO THINK I"+D$+" YOU - DON'T YOU?":RETURN
3350 B$="WHAT MAKES YOU THINK I"+D$+" YOU?":RETURN
3360 B$="REALLY, I"+D$+" YOU?":RETURN
3370 B$="DO YOU WISH TO BELIEVE I"+D$+" YOU?":RETURN
3380 B$="SUPPOSE I DID"+D$+" YOU - WHAT WOULD THAT MEAN?":RETURN
3390 B$="DOES SOMEONE ELSE BELIEVE I"+D$+" YOU?":RETURN
3400 XQ=XQ+1:IF XQ=5 THEN XQ=1
3410 ON XQ GOTO 3420,3430,3440,3450
3420 B$="WE WERE DISCUSSING YOU - NOT ME.":RETURN
3430 IF A=0 THEN XQ=3:GOTO 3440ELSE B$="OH, I"+D$+"?":RETURN
3440 B$="YOU'RE NOT REALLY TALKING ABOUT ME, ARE YOU?":RETURN
3450 B$="WHAT ARE YOUR FEELINGS NOW?":RETURN
3460 XR=XR+1:IF XR=6 THEN XR=1
3470 ON XR GOTO 3480,3490,3500,3510,3520
3480 B$="YOU DON'T SEEM QUITE CERTAIN.":RETURN
3490 B$="WHY THE UNCERTAIN TONE?":RETURN
3500 B$="CAN'T YOU BE MORE POSITIVE?":RETURN
3510 B$="YOU AREN'T SURE?":RETURN
3520 B$="DON'T YOU KNOW?":RETURN
3530 XS=XS+1:IF XS=5 THEN XS=1
3540 ON XS GOTO 3550,3560,3570,3580
3550 B$="WHY ARE YOU CONCERNED OVER MY"+D$+"?":RETURN
3560 B$="WHAT ABOUT YOUR OWN"+D$+"?":RETURN
3570 B$="ARE YOU WORRIED ABOUT SOMEONE ELSES"+D$+"?":RETURN
3580 B$="REALLY, MY"+D$+"?":RETURN
3590 XT=XT+1:IF XT=6 THEN XT=1
3600 ON XT GOTO 3610,3620,3630,3640,3650
3610 B$="WHY NOT?":RETURN
3620 B$="ARE YOU SAYING "+CHR$(34)+"NO"+CHR$(34)+      " JUST TO BE NEGATIVE?":RETURN
3630 B$="YOU ARE BEING A BIT NEGATIVE.":RETURN
3640 B$="HOW COME?":RETURN
3650 B$="WHY DO YOU SAY "+CHR$(34)+"NO"+CHR$(34)+"?":RETURN
3660 XU=XU+1:IF XU=5 THEN XU=1
3670 ON XU GOTO 3680,3690,3700,3710
3680 B$="PLEASE DON'T APOLOGIZE.":RETURN
3690 B$="APOLOGIES ARE NOT NECESSARY.":RETURN
3700 B$="WHAT FEELINGS DO YOU HAVE WHEN YOU APOLOGIZE?":RETURN
3710 B$="I'VE TOLD YOU THAT APOLOGIES ARE NOT REQUIRED.":RETURN
3720 XV=XV+1:IF XV=6 THEN XV=1
3730 ON XV GOTO 3740,3750,3760,3770,3780
3740 B$="DO YOU BELIEVE I DON'T"+D$+"?":RETURN
3750 B$="PERHAPS I WILL"+D$+" IN GOOD TIME.":RETURN
3760 B$="SHOULD YOU"+D$+" YOURSELF?":RETURN
3770 B$="YOU WANT ME TO"+D$+"?":RETURN
3780 RETURN
3790 XW=XW+1:IF XW=6 THEN XW=1
3800 ON XW GOTO 3810,3820,3830,3840,3850
3810 B$="DO YOU THINK YOU SHOULD BE ABLE TO"+D$+"?":RETURN
3820 B$="DO YOU WANT TO BE ABLE TO"+D$+"?":RETURN
3830 B$="DO YOU BELIEVE THIS WILL HELP YOU TO"+D$+"?":RETURN
3840 B$="HAVE YOU ANY IDEA WHY YOU CAN'T"+D$+"?":RETURN
3850 RETURN
3860 XX=XX+1:IF XX=7 THEN XX=1
3870 ON XX GOTO 3880,3890,3900,3910,3920,3930
3880 B$="WHAT WOULD IT MEAN TO YOU IF YOU GOT"+D$+"?":RETURN
3890 B$="WHY DO YOU WANT"+D$+"?":RETURN
3900 B$="SUPPOSE YOU GOT"+D$+" SOON?":RETURN
3910 B$="WHAT IF YOU NEVER GOT"+D$+"?":RETURN
3920 B$="WHAT WOULD GETTING"+D$+" MEAN TO YOU?":RETURN
3930 B$="WHAT DOES WANTING"+D$+" HAVE TO DO WITH THIS DISCUSSION?":      RETURN
3940 XY=XY+1:IF XY=5 THEN XY=1
3950 ON XY GOTO 3960,3970,3980,3990
3960 B$="I AM SORRY TO HEAR YOU ARE"+D$+".":RETURN
3970 B$="DO YOU THINK COMING HERE WILL HELP YOU NOT TO BE"+D$+      "?":RETURN
3980 B$="I'M SURE IT'S NOT PLEASANT TO BE"+D$+".":RETURN
3990 B$="CAN YOU EXPLAIN WHAT MADE YOU"+D$+"?":RETURN
4000 XZ=XZ+1:IF XZ=5 THEN XZ=1
4010 ON XZ GOTO 4020,4030,4040,4050
4020 B$="HOW HAVE I HELPED YOU TO BE"+D$+"?":RETURN
4030 B$="HAS YOUR TREATMENT MADE YOU"+D$+"?":RETURN
4040 B$="WHAT MAKES YOU"+D$+" JUST NOW?":RETURN
4050 B$="CAN YOU EXPLAIN WHY YOU ARE SUDDENLY"+D$+"?":RETURN
4060 Y0=Y0+1:IF Y0=5 THEN Y0=1
4070 ON Y0 GOTO 4080,4090,4100,4110
4080 B$="IS IT BECAUSE YOU ARE"+D$+" THAT YOU CAME TO ME?":RETURN
4090 B$="HOW LONG HAVE YOU BEEN"+D$+"?":RETURN
4100 B$="DO YOU BELIEVE IT NORMAL TO BE"+D$+"?":RETURN
4110 B$="DO YOU ENJOY BEING"+D$+"?":RETURN
4120 Y1=Y1+1:IF Y1=4 THEN Y1=1
4130 ON Y1 GOTO 4140,4150,4160
4140 B$="DO YOU REALLY THINK SO?":RETURN
4150 B$="BUT YOU ARE NOT SURE YOU"+D$+"?":RETURN
4160 B$="DO YOU REALLY DOUBT YOU"+D$+"?":RETURN
4170 Y2=Y2+1:IF Y2=5 THEN Y2=1
4180 ON Y2 GOTO 4190,4200,4210,4220
4190 B$="HOW DO YOU KNOW YOU CAN'T"+D$+"?":RETURN
4200 B$="HAVE YOU TRIED?":RETURN
4210 B$="PERHAPS YOU COULD"+D$+" NOW?":RETURN
4220 B$="DO YOU REALLY WANT TO BE ABLE TO"+D$+"?":RETURN
4230 Y3=Y3+1:IF Y3=5 THEN Y3=1
4240 ON Y3 GOTO 4250,4260,4270,4280
4250 B$="DON'T YOU REALLY"+D$+"?":RETURN
4260 B$="WHY DON'T YOU"+D$+"?":RETURN
4270 B$="DO YOU WISH TO BE ABLE TO"+D$+"?":RETURN
4280 B$="DOES THAT TROUBLE YOU?":RETURN
4290 Y4=Y4+1:IF Y4=5 THEN Y4=1
4300 ON Y4 GOTO 4310,4320,4330,4340
4310 B$="TELL ME MORE ABOUT SUCH FEELINGS.":RETURN
4320 B$="DO YOU OFTEN FEEL"+D$+"?":RETURN
4330 B$="DO YOU ENJOY FEELING"+D$+"?":RETURN
4340 B$="OF WHAT DOES FEELING"+D$+" REMIND YOU?":RETURN
4350 Y5=Y5+1:IF Y5=5 THEN Y5=1
4360 ON Y5 GOTO 4370,4380,4390,4400
4370 B$="PERHAPS IN YOUR FANTASY WE"+D$+" EACH OTHER.":RETURN
4380 B$="DO YOU WISH TO"+D$+" ME?":RETURN
4390 B$="YOU SEEM TO NEED TO"+D$+" ME.":RETURN
4400 B$="DO YOU"+D$+" ANYONE ELSE?":RETURN
4410 Y9=Y9+1:IF Y9=4 THEN Y9=1
4420 ON Y9 GOTO 4430,4440,4450
4430 B$="MY, MY, SUCH LANGUAGE!":RETURN
4440 B$="I'M NOT ACCUSTOMED TO HEARING THAT KIND OF LANGUAGE!":RETURN
4450 B$="I THOUGHT I ALREADY TALKED TO YOU ABOUT YOUR LANGUAGE!":RETURN
4460 D$=M$(1):FOR I=1 TO S-1:M$(I)=M$(I+1):NEXT:S=S-1:      GOSUB 4470:GOSUB 4600:GOTO 640
4470 Y8=Y8+1:IF Y8=5 THEN Y8=1
4480 ON Y8 GOTO 4490,4500,4510,4520
4490 B$="DOES THAT HAVE ANYTHING TO DO WITH THE FACT THAT YOUR"      +D$+"?":RETURN
4500 B$="EARLIER YOU SAID YOUR"+D$+".":RETURN
4510 B$="BUT YOUR"+D$+".":RETURN
4520 B$="LET'S DISCUSS FURTHER WHY YOUR"+D$+".":RETURN
4530 Y6=Y6+1:IF Y6=5 THEN Y6=1
4540 ON Y6 GOTO 4550,4560,4570,4580
4550 B$="WHY DO YOU NEED TO TELL ME"+D$+"?":RETURN
4560 B$="CAN YOU ELABORATE ON THAT?":RETURN
4570 B$="DO YOU SAY"+D$+" FOR SOME SPECIAL REASON?":RETURN
4580 B$="THAT'S QUITE INTERESTING.":RETURN
4590 GOSUB 5090:GOSUB 4530
4600 ZZ=INSTR(B$,CHR$(0))
4605 IF ZZ THEN B$=LEFT$(B$,ZZ-1)+MID$(B$,ZZ+1):GOTO 4600
4608 S$(X)=B$:X=X+1
4610 IF LEN(B$)<WD THEN PRINT B$:A=1:RETURN
4620 I=WD+1
4630 I=I-1:IF MID$(B$,I,1)<>" "THEN 4630
4640 PRINT LEFT$(B$,I-1):B$=MID$(B$,I+1):GOTO 4610
4650 IF LEN(B$)<WD THEN PRINT#1,B$:RETURN
4660 I=WD+1
4670 I=I-1:IF MID$(B$,I,1)<>" "THEN 4670
4680 PRINT#1,LEFT$(B$,I-1):B$=MID$(B$,I+1):GOTO 4650
4690 Y7=Y7+1:IF Y7=8 THEN Y7=1
4700 ON Y7 GOTO 4710,4720,4730,4740,4750,4760,4770
4710 B$="I AM NOT SURE I UNDERSTAND YOU FULLY.":RETURN
4720 B$="PLEASE GO ON.":RETURN
4730 B$="WHAT DOES THAT SUGGEST TO YOU?":RETURN
4740 IF M=0 THEN B$=      "YOU SEEM TO HAVE AVOIDED SPEAKING OF YOUR PARENTS ALTOGETHER.":      M=1:RETURN ELSE IF SX=0 THEN B$=      "I NOTICE THAT YOU HAVEN'T DISCUSSED SEX AT ALL.":      SX=1:RETURN ELSE Y7=5
4750 B$="DO YOU FEEL STRONGLY ABOUT DISCUSSING SUCH THINGS?":RETURN
4760 B$="HOW IMPORTANT IS THAT TO YOU?":RETURN
4770 B$="WHY DO YOU SAY THAT?":RETURN
4780 PRINT CL$
4790 IF X=0 THEN PRINT TAB(18)BELL$      ">> THERE'S NO CONVERSATION IN MEMORY <<"ELSE 4810
4800 PRINT:PRINT"PLEASE CONTINUE.":PRINT:GOTO 280
4810 B$="** PLEASE ENTER A NAME UNDER WHICH **":GOSUB 4610
4815 B$="      TO SAVE THE CONVERSATION":GOSUB 4610
4820 PRINT TAB(10);:LINE INPUT A$
4830 IF A$=""THEN PRINT CL$:B$=S$(X-1):GOSUB 4610:PRINT:GOTO 280
4840 FOR I=1 TO LEN(A$):      A=ASC(MID$(A$,I,1)):IF A>96 THEN MID$(A$,I)=CHR$(A-32)
4850 NEXT
4860 OPEN"O",1,A$
4870 FOR Q=0 TO X-1:B$=S$(Q):GOSUB 4650:IF Q MOD 2=1 THEN PRINT#1," "
4880 NEXT:CLOSE
4890 PRINT CL$:PRINT      "THE CURRENT CONVERSATION HAS BEEN SAVED":PRINT"        UNDER THE NAME '"A$"'":      PRINT:PRINT:PRINT
4900 PRINT TAB(8)"PLEASE MAKE A SELECTION":PRINT TAB(8)"FROM THE FOLLOWING MENU:":PRINT
4910 PRINT TAB(2)"1)  START OVER - ERASE ALL VARIABLES":PRINT
4920 PRINT TAB(2)"2)  ERASE CURRENT CONVERSATION ONLY":PRINT
4930 IF X=100 THEN PRINT:PRINT TAB(6)"Please enter 1 or 2:      ";:      GOTO 4960
4940 PRINT TAB(2)"3)  CONTINUE WHERE YOU LEFT OFF":PRINT
4950 PRINT:PRINT TAB(6)"Please enter 1, 2, or 3:      ";
4960 A$=INKEY$:IF A$=""THEN 4960
4970 IF A$<>"1"AND A$<>"2"AND A$<>"3" THEN 4960
4980 A=VAL(A$):ON A GOTO 4990,5000,5010
4990 PRINT CL$:RUN
5000 A$="CLEAR":GOTO 340
5010 IF X=100 THEN 4960 ELSE PRINT CL$:A$="":GOTO 4830
5020 PRINT BELL$:PRINT ">> THE CONVERSATION BUFFER <<":PRINT"    IS COMPLETELY FILLED"
5030 PRINT:PRINT TAB(8)"DO YOU WANT TO SAVE THIS CONVERSATION?"
5040 PRINT:PRINT      "Please enter 'Y' for 'YES'":PRINT"             'N' for 'NO'":PRINT"          or 'D' for 'DISPLAY'";
5050 A$=INKEY$:IF A$="Y" OR A$="y" THEN 4780
5060 IF A$="N" OR A$="n"THEN PRINT CL$:GOTO 4900
5070 IF A$="D" OR A$="d" THEN A$="DISPLAY":PRINT CL$:GOTO 290
5080 GOTO 5050
5090 I=0
5100 I=I+1:IF MID$(A$,I,1)=" "THEN 5100
5110 D$=MID$(A$,I-1,LEN(A$)-I+1):RETURN
5120 END
OTO 290
5080 GOTO 5050
5090 I=0
5100 I=I+1:IF MID$(A$,I,1)=" 