10005LOMEM :29000
10GOSUB 10005
12&  NIAD PD #BNDV6
15&  I.T. adapted for ADAM from Astounding Games for your    Apple Computer by Hal Renko
16&  Adapted by Bob Zimmerman,Kent,Washington,1985
17&   Edited by Bob Lennes
20HOME: ao=0
40GOSUB 5700
50 mv=8: nr=0:GOTO 70
60GOSUB 200
70GOSUB 500
80GOSUB 400
90IF nw<6 THEN 60
100 o$="":GOSUB 12050: o$="CONGRATULATIONS!  YOU SUCCEEDED   IN KILLING YOURSELF!":GOSUB 12050: o$="":GOSUB 12050
110 d$=CHR$(4):? d$; "run BBSCB,D2"
200&  input
210 nr=0: mv=0: c2$=""
220 o$="What now?":GOSUB 12050: ln=8:GOSUB 10240: c$=a$
221IF c$="" THEN 220
223FOR i=1 TO LEN(c$): x$=MID$(c$, i, 1):IF x$>"Z" THEN      x$=CHR$(ASC(x$)-32)
225 c2$=c2$+x$:NEXT: c$=c2$: o$="":GOSUB 12050
230FOR i=1 TO 14
240IF LEFT$(m$(i), LEN(c$))=c$ THEN  mv=i: i=14
250NEXT i
260IF mv>6 THEN RETURN
270IF mv=0 THEN  o$="I don't understand":GOSUB 12050:        o$="":GOSUB 12050:GOTO 200
280 nr=r(rm, mv):IF nr<>0 THEN RETURN
290 o$="You cannot go that way":GOSUB 12050: o$="":GOSUB     12050
300GOTO 200
400&  output
405 o$="":GOSUB 12050
410 o$="You are in the ":GOSUB 12050: o$=d$(rm):GOSUB 12050: o$="":GOSUB 12050
420IF rm<25 AND ( NOT lo OR t(1)>0 AND t(1)<>rm) THEN        o$="You cannot see much here":GOSUB 12050:GOTO 440
430FOR i=1 TO 12
432IF t(i)=rm THEN  o$="There is a "+t$(i)+" here":GOSUB     12050: o$="":GOSUB 12050
434NEXT i
435IF lo AND rl>120 THEN  o$="Your lamp has gone out":GOSUB  12050: o$="":GOSUB 12050: lo=0
436IF lo AND rl>100 THEN  o$="Your lamp batteries are        getting exhausted":GOSUB 12050: o$="":GOSUB 12050
440?
445FOR i=1 TO 6
450IF r(rm, i)<>0 THEN  o$="You can go "+m$(i):GOSUB 12050
460NEXT i
470 o$="":GOSUB 12050: o$="             ***":GOSUB 12050
480RETURN
500&  operations
510IF nr<>0 THEN  rm=nr
529 th=0
530FOR i=1 TO 12
540IF t(i)=rm THEN  th=i: i=12
550NEXT i
560 hl=0
570FOR i=1 TO 6
580IF h(i, 1)=rm THEN  hl=i: i=6
590NEXT i
600&  general operations
610IF rm<12 AND rr<>8 THEN GOSUB 4200
620 rl=rl-lo
630&  personal operations
640IF mv<7 THEN 660
650ON (mv-6) GOSUB 1000, 1200, 1300, 1400, 1600, 1700, 1800, 1900
660&  handlers
670ON hl GOSUB 2000, 2300, 2600, 2700, 2900, 3100
680RETURN
1000&  kill
1010IF hl=0 OR hl>4 THEN  o$="Time is all you will           kill!":GOSUB 12050: o$="":GOSUB 12050:RETURN
1020 tp=7:GOSUB 4100
1030IF po=0 THEN  o$="I won't let you attack with    bare    hands--it's suiside!":GOSUB 12050: o$="":GOSUB 12050:RETURN
1040 o$="You try to kill the "+h$(hl):GOSUB 12050:           o$="":GOSUB 12050
1050 o$="You attack it with your sword,":GOSUB 12050:        o$="":GOSUB 12050
1055IF (hl=1 OR hl=2) AND (h(hl, 2)=6 OR h(hl, 2)=5) THEN    1070
1060IF RND(1)<.5 THEN  o$="but it moves away quickly":GOSUB  12050: o$="":GOSUB 12050:GOTO 1090
1070 o$="and you give it a terrible blow":GOSUB 12050:       o$="":GOSUB 12050
1080 h(hl, 3)=h(hl, 3)-1
1090IF RND(1)>.2 THEN 1120
1100 o$="This is your chance! You can   hit it again before  it recovers":GOSUB 12050: o$="":GOSUB 12050
1110 o$="Do you want to?(y/n)":GOSUB 12050: ln=1:GOSUB       10240: an$=a$
1115 o$="":GOSUB 12050:IF an$="y" THEN  o$="You raise your   sword again,":GOSUB 12050: o$="":GOSUB 12050:GOTO 1055
1120IF h(hl, 3)>1 THEN RETURN
1130IF h(hl, 3)=1 THEN  o$="Your victim is badly             wounded":GOSUB 12050: o$="":GOSUB 12050:RETURN
1140? "You killed your victim!":GOSUB 12050: o$="":GOSUB     12050
1150 h(hl, 1)=0: t(hl+8)=rm: hl=0
1160RETURN
1200TEXT:&  help
1210 o$="":GOSUB 12050:HTAB 6: o$="POSSIBLE COMMANDS":GOSUB  12050: o$="":GOSUB 12050
1220FOR i=1 TO 14:HTAB 10: o$="          "+m$(i):GOSUB       12050: o$="":GOSUB 12050:NEXT
1230VTAB 22:HTAB 5: o$="PRESS <S> TO CONTINUE":GOSUB 12050:  ln=1:GOSUB 10240
1233IF y=83 OR y=115 THEN  key=INT(RND(1)*3+1):ON key GOTO   1245, 1246, 1247
1240 xx=RND(1):GOTO 1233
1245 key=5822:POKE 17115, 240:TEXT:RETURN
1246 key=7298:POKE 17115, 240:TEXT:RETURN
1247 key=6319:POKE 17115, 240:TEXT:RETURN
1300REM        take
1305IF (t(1)=0 OR t(1)=rm) AND lo OR rm>24 THEN 1310
1306 o$="You can't see your own fingers, let along something to take":GOSUB 12050: o$="":GOSUB 12050
1307RETURN
1310IF th=0 THEN  o$="There is nothing to take here":GOSUB   12050: o$="":GOSUB 12050:RETURN
1320 o$="I have the "+t$(th):GOSUB 12050: o$="":GOSUB 12050
1330 p(lp)=th: lp=lp+1: t(th)=0: th=0
1340RETURN
1400&  drop
1410IF lp=1 THEN  o$="You don't have anything!":GOSUB 12050: o$="":GOSUB 12050:RETURN
1420 o$="What do you want to drop?":GOSUB 12050: ln=10:GOSUB 10240: d$=a$
1430 tp=0:FOR i=1 TO 12
1440IF d$=LEFT$(t$(i), LEN(d$)) THEN  tp=i: i=12
1450NEXT i
1460IF tp=0 THEN  o$="I don't understand you":GOSUB 12050:   o$="":GOSUB 12050:RETURN
1470GOSUB 4100
1480IF po=0 THEN  o$="You don't have a "+t$(tp):GOSUB 12050: o$="":GOSUB 12050:GOTO 1520
1490 o$="You've dropped the "+t$(tp):GOSUB 12050:            o$="":GOSUB 12050
1500 th=p(po): t(th)=rm: lp=lp-1: p(po)=p(lp)
1520 o$="Do you want to drop more?":GOSUB 12050: ln=1:GOSUB  10240: o$="":GOSUB 12050: an$=a$: an$=LEFT$(an$, 1)
1525IF an$="Y" OR an$="y" THEN 1420
1530RETURN
1600&  inventory
1610IF lp=1 THEN  o$="You own only your clothes":GOSUB       12050: o$="":GOSUB 12050:GOTO 1640
1620 o$="You have the following:":GOSUB 12050: o$="":GOSUB   12050
1630FOR i=1 TO lp-1: o$=t$(p(i)):GOSUB 12050: o$="":GOSUB    12050:NEXT
1640 o$="You can survive more wounds":GOSUB 12050:           o$="":GOSUB 12050
1650RETURN
1700REM        bandage
1710 tp=6:GOSUB 4100
1720IF po=0 THEN  o$="You won't manage that without  a       bandage":GOSUB 12050: o$="":GOSUB 12050:RETURN
1730 o$="It doesn't look very hopeful.  I'll need all you    have.":GOSUB 12050: o$="":GOSUB 12050
1740 o$=CHR$(7)+CHR$(7):GOSUB 12050: o$="":GOSUB 12050
1750 o$="All right, it will hold for a  while":GOSUB 12050:  o$="":GOSUB 12050
1760 nw=0: lp=lp-1: p(po)=p(lp)
1770RETURN
1800&  lantern on/off
1820IF t(1)>0 AND t(1)<>rm THEN  o$="Get a lantern           first":GOSUB 12050: o$="":GOSUB 12050:RETURN
1825IF rl>120 THEN  o$="Your batteries are finished":GOSUB   12050: o$="":GOSUB 12050:RETURN
1830 lo= NOT lo
1840 o$="I turned the lantern ":IF lo THEN  o$=o$+"on":GOSUB 12050: o$="":GOSUB 12050:RETURN
1850IF  NOT lo THEN  o$=o$+"off":GOSUB 12050: o$="":GOSUB    12050:RETURN
1900&  read
1910 tp=4:GOSUB 4100
1920IF po=0 THEN  o$="Why do you want to read if you don't   have a book?":GOSUB 12050: o$="":GOSUB 12050:RETURN
1930IF  NOT lo AND rm<25 THEN  o$="It is too dark to         read":GOSUB 12050: o$="":GOSUB 12050:RETURN
1940 o$="There is a receipt for cookies in this book":GOSUB  12050: o$="":GOSUB 12050
1950 t$="HS RZXR:SZJD NMD GDKKGNTMC ZMC ZOHMBG NEVGDZS, ZMC  CQNO HS NM ZAZQADBTD":GOSUB 4000
1960 o$="That is all":GOSUB 12050: o$="":GOSUB 12050
1970RETURN
2000&  *i.t*
2010IF th=3 THEN  h(1, 2)=3: t(th)=0: th=0
2020ON h(1, 2) GOTO 2030, 2060, 2090, 2190, 2200
2030 o$="I.T. (the INTRA-TER ESTRIAL) is here":GOSUB 12050:  o$="":GOSUB 12050
2040 o$="He's talking urgently, but you can't understand     him":GOSUB 12050: o$="":GOSUB 12050
2050 h(1, 2)=2:RETURN
2060 t$="H.S. FDRSTQDR SGZS GD HR UDQX SGHQRSX.  GD KNNJR    CDRODQZSD"
2070GOSUB 4000
2080RETURN
2090 t$="H.S. CQHMJR ZR HE GD MDDCDC HS":GOSUB 4000
2100 t$="UDQX AZCKX.  ZESDQ Z VGHKD GD":GOSUB 4000
2110 t$="RSZQSR SZKJHMF; ZMC XNT":GOSUB 4000
2120 t$="QDZKHYD XNT BZM TMCDQRSZMC GHL!":GOSUB 4000
2130 t$="GD RZXR: OKDZRD FN CNVM EHMC SGD MTKKHSXANLA.  RNLD BQZYX":GOSUB 4000
2140 t$="OQNEDRRNQ VZMSR SN CDRSQNX ZKK KHED VHSGHS!":GOSUB  4000
2150 t$="H GZC Z EHFGS VHSG SGD LNMRSDQ SGZS OQNSDBSR HS,ATS MNV H ZL":GOSUB 4000
2160 t$="DWGZTRSDC, RN HS'R TOSN XNT SN RZUD SGD             DZQSG!":GOSUB 4000
2170 o$="Suddenly I.T. collapses.":GOSUB 12050: o$="":GOSUB  12050
2180 h(1, 2)=4:RETURN
2190 o$="It looks like I.T. is in a coma. Now you have to do it all    alone":GOSUB 12050: o$="":GOSUB 12050
2200 o$="Good Luck":GOSUB 12050: o$="":GOSUB 12050
2210 h(1, 2)=5:RETURN
2220 o$="I.T. is here":GOSUB 12050: o$="":GOSUB 12050
2230 o$="He's in a coma":GOSUB 12050: o$="":GOSUB 12050
2240RETURN
2300&  *dragon*
2310IF th=8 THEN  h(2, 2)=5: t(th)=0: th=0
2320ON h(2, 2) GOTO 2330, 2370, 2400, 2430, 2470, 2520
2330 o$="There is an enormous monster":GOSUB 12050:          o$="":GOSUB 12050
2340 o$="here. It's eyes are rolling":GOSUB 12050:           o$="":GOSUB 12050
2350 o$="It yells: are you a cookie":GOSUB 12050:            o$="":GOSUB 12050
2369 h(2, 2)=2:RETURN
2370 o$="The monster yells louder and":GOSUB 12050:          o$="":GOSUB 12050
2380 o$="louder: are you a cookie?":GOSUB 12050: o$="":GOSUB 12050
2390 h(2, 2)=3:RETURN
2400 o$="The monster keeps yelling, and":GOSUB 12050:        o$="":GOSUB 12050
2410 o$="becomes rather agressive":GOSUB 12050: o$="":GOSUB  12050
2420 h(2, 2)=4:RETURN
2430 o$="The monster gave you a terrible blow":GOSUB 12050:  o$="":GOSUB 12050
2440 o$="Your head is spinning":GOSUB 12050: o$="":GOSUB     12050
2450 nw=nw+1
2460 h(2, 2)=RND(3)+1:RETURN
2470 o$="The monster says surprised:    cookies?":GOSUB      12050: o$="":GOSUB 12050
2480 o$="It starts to eat at once":GOSUB 9500
2490 o$="An enormous !!BONG!!":GOSUB 9500: o$="and it falls  asleep":GOSUB 9500
2495 o$=zz$+zz$+zz$:GOSUB 9500
2500 r(16, 6)=1
2510 h(2, 2)=6:RETURN
2520 o$="The monster is asleep":GOSUB 9500
2530RETURN
2600&  snake
2610 o$="There is a sneaky snake here":GOSUB 9500
2620IF RND(1)<.4 THEN RETURN
2630IF lp=1 OR RND(1)<.5 THEN 2670
2640 rn=INT(RND(1)*(lp-1)+1): t(p(rn))=12+INT(RND(1)*12+1):  lp=lp-1: p(rn)=p(lp)
2650 o$="With a quick move it snatches":GOSUB 9500
2660 o$="something, and ":GOSUB 12050
2670 o$="it sneaks away":GOSUB 9500
2680 h(3, 1)=h(3, 1)+3:IF h(3, 1)>24 THEN  h(3, 1)=h(3, 1)-8
2690RETURN
2700&  *hellhound*
2710ON h(4, 2) GOTO 2720, 2750, 2780
2720 o$="There is a giant hellhound here":GOSUB 9500
2730 o$="It looks like it wants you for dinner":GOSUB 9500
2740 h(4, 2)=2:RETURN
2750 o$="The hellhound attacks you and  bites you            violently":GOSUB 9500
2765 nw=nw+1
2770 h(4, 2)=3:RETURN
2780 o$="The hellhound growls and seems to prepare for       another attack":GOSUB 9500
2800 h(4, 2)=1+RND(2):RETURN
2900&  *bomb*
2910 o$="The nullity bomb is here":GOSUB 9500
2920 o$="There are three wires between  the bomb and the     time-mechanism--a green one(G), a yellow one (Y), and a red  one(R)"
2921GOSUB 9500
2930 o$="You must disconnect wo of them to stop it":GOSUB    9500
2940 o$="Which will be the first one?":GOSUB 12050:          ln=1:GOSUB 10240: o$="":GOSUB 12050: x$=a$
2950 o$="And the second one?":GOSUB 12050: ln=1:GOSUB 10240: o$="":GOSUB 12050: y$=a$
2960 cb=0: c$="YRG":FOR i=1 TO 3
2970 cb=cb+(x$=MID$(c$, i, 1))+(y$=MID$(c$, i, 1))
2980NEXT i
2990IF cb<2 THEN  o$="Watch out!  Wrong input":GOSUB         9500:GOTO 2920
3000IF ASC(x$)*ASC(y$)=ke THEN 3030
3015 o$="ENORMOUS EXPLOSION! MUSHROOM   CLOUD":GOSUB 9500
3017 o$="You tried bravely, but alas!   You did not          succeed...":GOSUB 9500
3018FOR m=1 TO 20:FOR i=15 TO 1 STEP -1:POKE 28007, i:CALL   28000:NEXT:NEXT
3020FOR i=1 TO 5000:NEXT i: ao=999:TEXT:GOTO 5700
3030 o$="Congratulations! You succeeded where everyone else  failed!":GOSUB 9500
3050 d$=CHR$(4):? d$; "RUN BBSCB,D2"
3100&  *barbecue*
3130IF t(2)=rm AND t(12)=rm THEN  th=8: t(th)=rm: t(2)=0:    t(12)=0: h(6, 2)=2
3140ON h(6, 2) GOTO 3150, 3180, 3220
3150 o$="There is a giant barbecue here":GOSUB 9500
3160 o$="with a large fire under it":GOSUB 9500
3170RETURN
3180 o$="An enormous flash lightens the":GOSUB 9500
3190 o$="place, and a penetrating smell":GOSUB 9500
3200 o$="fills your nose":GOSUB 9500
3201FOR m=1 TO 10
3202FOR i=15 TO 1 STEP -1:POKE 28007, i:CALL 28000:NEXT i
3204NEXT m
3210 h(6, 2)=3:RETURN
3220 o$="Everything is quiet now; even":GOSUB 9500
3230 o$="the terrible smell has faded":GOSUB 9500
3240 h(6, 2)=1:RETURN
4000&  *decode text*
4010 tn$="":FOR i1=1 TO LEN(t$): c$=MID$(t$, i1, 1)
4020IF c$="Z" THEN  c$="A":GOTO 4030
4022IF c$>="A" AND c$<"Z" THEN  c$=CHR$(ASC(c$)+1)
4030 tn$=tn$+c$
4040NEXT i1:IF  NOT code THEN  o$=tn$:GOSUB 9500
4050RETURN
4100&  *look in ownings*
4110 po=0:FOR i=1 TO lp-1
4120IF p(i)=tp THEN  po=i: i=lp-1
4130NEXT i
4140RETURN
4200&  puzzle
4210 rt=rt+1
4220IF rm=s(rt) THEN  rr=rr+1
4230IF rt<8 THEN RETURN
4240IF rr=8 THEN 4310
4250 o$="An absolute darnesss covers you":GOSUB 9500
4260 o$="and it feels as if something":GOSUB 9500
4270 o$="is lifing you. For a moment":GOSUB 9500
4280 o$="you are unconsious":GOSUB 9500
4290 rt=1: rr=1: rm=1
4300RETURN
4310 o$="You hear a strange sound, as if":GOSUB 9500
4320 o$="something is being pushed away":GOSUB 9500
4330 o$="Now it has stopped":GOSUB 9500
4350 r(2, 1)=3
4360RETURN
4370&  *initialize*
5000HTAB 5: o$="Wait a Minute Please":GOSUB 9500
5020DIM r(36, 6), d$(36), m$(14), h(6, 3), h$(6), t(12),     t$(12), p(12), d(8)
5100&  *connections*
5110FOR i=1 TO 36
5120 r(i, 1)=i+1: r(i, 2)=i-1: r(i, 3)=i+4: r(i, 4)=i-4
5130NEXT i
5140FOR i=0 TO 24 STEP 12
5150FOR j=1 TO 9 STEP 4: r(i+j+3, 1)=0: r(i+j, 2)=0:NEXT
5160FOR j=1 TO 4: r(i+j+8, 3)=0: r(i+j, 4)=0:NEXT
5170NEXT i
5180 r(1, 5)=16: r(7, 5)=15: r(32, 6)=13: r(13, 5)=32: r(35, 6)=18: r(18, 5)=35
5190FOR i=1 TO 15:READ rm:READ mv: r(rm, mv)=0:NEXT
5200&  *init parameters*
5210 rm=36: po=1: lp=1: rl=0: lo=0: nw=0: rt=0: rr=0
5220 z$=CHR$(7)+CHR$(7): zz$=z$+z$+z$
5300&  *fill arrays*
5310 code=-1
5320FOR i=1 TO 14:READ m$(i):NEXT
5330FOR i=1 TO 12:READ t$:GOSUB 4000: t$(i)=tn$:NEXT
5340FOR i=1 TO 6:READ t$:GOSUB 4000: h$(i)=tn$:NEXT
5350FOR i=1 TO 36:READ t$:GOSUB 4000: d$(i)=tn$:NEXT
5360FOR i=1 TO 12:READ t(i):NEXT
5370FOR i=1 TO 6:READ h(i, 1), h(i, 3): h(i, 2)=1:NEXT
5380FOR i=1 TO 8:READ s(i):NEXT
5390 code=0
5395 c=0: zt=28000
5400READ a:IF a=256 THEN 5420
5410POKE zt+c, a: c=c+1:GOTO 5400
5420&  
5499RETURN
5500DATA   21,1,22,2,22,1,23,2,18,1,19,2,16,3,20,4,11,1,12,2
5505DATA   7,1,8,2,7,4,3,3,2,1
5510DATA  "EAST","WEST","NORTH","SOUTH","UP","DOWN","KILL"
5512DATA                                                     "HELP","TAKE","DROP","INVENTORY","BANDAGE","LANTERN","READ"
5520DATA                                                     "KZMSDQM","VGDZSOHKD","VZSDQRZBJ","BNNJANNJ","KDZEKDS"
5522DATA  "AZMCZFD","RVNQC","BNNJHD","ANCX NE H.S.","FHZMS   BNQORD"
5525DATA  "RKHBDC RMZJD","CDZC GNTMC"
5530DATA                                                     "H.S.","LNMRSDQ","RMZJD","GDKKGNTMC","AZQADBTD","ANLA"
5540DATA  "QDRDS BZUD","S-BZUD","RDBQDS BNQQHCNQ","BNMSQNK   QNNL"
5542DATA  "N-BZUD","H-BZUD","ROZBD-BZUD","AKZBJ              QNNL","O-BZUD"
5545DATA  "D-BZUD","M-BZUD","DLOSHMDRR"
5550DATA  "RLZKK BZUD","QNBJX BZUD","RLDKKX BZUD","CQZFNM    BZUD"
5552DATA  "RMZJD BZUD","XDKKNV BZUD","RSQDZL AZMJ","RSHMJX   OKZBD"
5555DATA  "ENNC BZUD","EHMZK BZUD"
5560DATA  "BNKNQDC BZUD","HBD BZUD","NODM OKZBD","VNNCR"
5562DATA                                                     "VNNCR","VNNCR","VNNCR","VNNCR","VNNCR","VNNCR","VNNCR","VNNCR"
5565DATA  "VNNCR","VNNCR"
5570DATA   34,30,28,21,14,15,13,0,0,0,0,0
5580DATA   34,2,16,15,17,4,29,2,8,1,25,1
5590DATA   1,5,9,10,11,7,6,2
5600DATA 245,229,213,197,253,197,14,1,6,7,205,32,253,253,225
5610DATA   193,209,225,241,201,256
5700&  *intro page*
5705POKE 17115, 19:TEXT:VTAB 8
5710 o$="     ********     ********":GOSUB 9500
5720 o$="     ********     ********":GOSUB 9500
5730 o$="       ****         ****":GOSUB 9500
5740 o$="       ****         ****":GOSUB 9500
5750 o$="       ****         ****":GOSUB 9500
5760 o$="       ****         ****":GOSUB 9500
5770 o$="       ****         ****":GOSUB 9500
5780 o$="     ********       ****":GOSUB 9500
5790 o$="     ********       ****":GOSUB 9500
5795IF ao=999 THEN POKE 17115, 240: d$=CHR$(4):? d$; "run    BBSCB,D2"
5800VTAB 22:GOTO 5000
9500GOSUB 12050: o$="":GOSUB 12050
9510RETURN

10006DIM n$(400)
10010FOR i=1 TO 20: y=PEEK(27920+i)
10012IF y=13 THEN 10015
10014 sy$=sy$+CHR$(y):NEXT i
10015FOR i=1 TO 5: y=PEEK(27944+i)
10016IF y=13 THEN  id=VAL(id$):GOTO 10020
10018 id$=id$+CHR$(y):NEXT i
10020FOR i=1 TO 20: y=PEEK(27899+i)
10022IF y=13 THEN 10025
10024 n$(id)=n$(id)+CHR$(y):NEXT i
10025 db=PEEK(27955): p=PEEK(27950): dm=PEEK(27951)
10050 fetch=28000: cin=28061: cntrl=28007: numbout=28013:    dump=28062: chrout=28075
10055 d$=CHR$(4)
10060 ustat=28048: cdstat=28037: carrier=28047:POKE 16149,   255:POKE 16150, 255:RETURN
10240POKE cin, 0: a$=""
10250CALL ustat:IF PEEK(cin)=0 THEN GOSUB 11980:CALL         ustat:IF PEEK(cin)=0 THEN 10250
10260 y=PEEK(cin):IF y=13 THEN ?:RETURN
10265IF y=163 THEN  y=8
10270IF y=8 AND LEN(a$)=1 THEN POKE cin, 0:GOTO 10250
10280IF y<8 OR y>128 THEN POKE cin, 0:GOTO 10250
10290IF y=8 THEN  a$=LEFT$(a$, (LEN(a$)-1)):POKE chrout,     y:CALL dump:GOTO 10320
10300 a$=a$+CHR$(y):POKE chrout, y:CALL dump
10320? CHR$(y); 
10325IF LEN(a$)=ln THEN RETURN
10330GOSUB 11980
10340POKE cin, 0:GOTO 10250
11960REM     ***RUN BBS***
11965POKE numbout, 37:CALL cntrl
11970HTAB 1:? d$; "RUN BBS,D"; p
11980REM         ***CARRIER CHECK***
12010CALL cdstat
12020IF PEEK(carrier)=255 THEN POKE carrier, 0:RETURN
12030?:?:? "CARRIER LOST!":POKE numbout, 37:CALL cntrl:GOTO  11965
12040RETURN
12050REM         ***OUT TO CALLER***
12080IF o$="" THEN POKE chrout, 13:CALL dump:? o$:RETURN
12090GOSUB 11980:REM          check for carrier
12100FOR k=1 TO LEN(o$)
12110 q=ASC(MID$(o$, k))
12120POKE chrout, q:CALL dump:? CHR$(q); 
12130NEXT k
12140RETURN




