home *** CD-ROM | disk | FTP | other *** search
- 1 rem ***** bridge *****
- 5 dv=peek(186):ifdv<8thendv=8
- 40 sys57812"f.bridge",dv,0:poke780,0:poke781,0:poke782,8:sys65493
- 60 clr:dv=peek(186):ifdv<8thendv=8
- 100 rem **** set variables *****
- 105 ad=49152:ag=4096:s=54272:poke53272,19:printchr$(14):printchr$(8)
- 110 a$="":at=0:b$="":bh$="":bd=0:bk=0:bl=0:c$="":cd%=0
- 115 ch=0:cs=0:ct=0:d=0:df$="":dl$="":dr=0:ds=0:el%=0:ev%=0:
- 120 f%=0:fc%=0:fl%=0:fu%=0:ft%=1000:gl%=0:gt=0:gw=0:k=0
- 130 ms$="":nm$="":pc%=0
- 135 q=0:q$=chr$(34):qf=0:rn%=0:se%=0:ra%=0
- 140 sd%=0:sn%=0:p%=0:sz=0:ts%=0:tv%=0:us%=0
- 145 v=0:w$="":x=0:y=0:z=0:zs=0:x$=""
- 150 dima$(24),gl$(99),l1%(48),l2%(48),md$(2,20),sd$(5),sp$(5),zl(5)
- 155 dimst%(48),ub%(48),fl$(3),vt%(3,4),fm%(3)
- 160 dl%(1)=1:dl%(2)=12:dl%(3)=24:dl$(1)="[211][197][195][212][207][210] =":dl$(2)=":[199][210][201][196] = "
- 165 dl$(3)=":%[198][213][197][204] =":hd$(1)="[204]iverpool.":hd$(2)="[211]outhampton.":
- 170 hd$(3)="on the rocks":hd$(4)="by enemy action":he$(1)="due":he$(2)="and"
- 175 sa%(1)=-1:sa%(2)=1:sa%(3)=-9:sa%(4)=9:sa%(5)=-10:sa%(6)=10:sa%(7)=-11
- 180 sa%(8)=11:fl$(1)=".ex":fl$(2)=".fc":fl$(3)=".ag"
- 185 kf$="[136][140][133][135][134]^_[138][139][137]*"
- 190 sd$(1)="[206]orth":sd$(2)="[206]ortheast":sd$(3)="[211]outheast":sd$(4)="[211]outh"
- 195 sd$(5)="[197]ast":sp$(1)="5 [203]nots":sp$(2)="10 [203]nots":sp$(3)="15 [203]nots"
- 200 sp$(4)="20 [203]nots":sd$(0)="[211]topped":sp$(0)="[200]ove to"
- 205 vt%(1,4)=120:vt%(1,3)=180:vt%(1,2)=240:vt%(1,1)=300
- 210 vt%(2,4)=180:vt%(2,3)=240:vt%(2,2)=300:vt%(2,1)=360
- 215 vt%(3,4)=240:vt%(3,3)=300:vt%(3,2)=360:vt%(3,1)=420:fm%(1)=-10:fm%(2)=-20
- 800 rem ***** startup *****
- 805 ms$="[207]rganizing [206]avigation [205]aps.[144]":v=10:gosub5210
- 810 df$="ac.game":dr=dv:gosub5115:ifpr<>3then5515
- 815 open3,dv,3,"l:"+df$:input#3,nm$,b$,a$:close3:ra%=val(a$):gosub5740
- 820 gosub7705:ifqf<>1thengoto5515
- 825 df$="navigation data":dr=dv:gosub5115:ifpr<>3then5505
- 830 open3,dv,3,"l:"+df$+",p,r"
- 835 forx=0to1:fory=0to20:input#3,md$(x,y):next:next
- 840 forx=0to99:input#3,gl$(x):next:close3
- 1000 rem ***** bridge *****
- 1005 print"[147]":bd=1:bk=1:ch=0:gosub5005
- 1010 zs=2:gosub6105:ms$=md$(0,0):gosub5208
- 1015 h=8:forv=2to16:ms$=md$(0,v-1):gosub5070:next
- 1020 h=3:v=7:ms$=md$(0,16):gosub5070:h=32:v=5:ms$=md$(0,17):gosub5070
- 1025 v=9:ms$=md$(0,18):gosub5070:h=1:forv=17to18:ms$=md$(0,v+2):gosub5070:next
- 1030 gosub5225:ss=5:ss$="s":gosub5405
- 1032 gosub6955
- 1035 gosub1405:gosub1410
- 1040 ifse%<>100thengosub1445:goto1060
- 1045 ms$="[217]ou are in [200]alifax [200]arbour.":gosub5208
- 1050 ms$="[193]ny key exits harbour.":cs=4:q=0:gosub5300:sp%=1:sd%=5:se%=2:gl%=40
- 1055 gosub1445:forx=0to5:gosub1505:next
- 1060 gosub1805:gosub5034:as$="[195]hange [195]ourse/[211]peed? (c/s)"
- 1070 gosub1415:gosub1420:gosub1425:gosub1430:gosub1375
- 1075 ms$=as$:gosub5205:zs=3
- 1100 ch$="cs":gosub6505:onqfgoto1105,1175,1100,1705,1100,3205,1170,1140
- 1105 iff%=2then1125
- 1110 gosub5034:ms$="[195][207][213][210][211][197]: 1 = [206]orth, 2 = [206]ortheast,":gosub5206
- 1115 ms$="3 = [211]outheast, 4 = [211]outh, 5 = [197]ast.":gosub5205
- 1120 ch$="12345":gosub6510:sd%=f%:gosub1420:gosub5034:goto1060
- 1125 gosub5034:ms$="[211][208][197][197][196](knots): [193] = 5, [194] = 10,":gosub5206
- 1130 ms$="[195] = 15, [196] = 20.":gosub5205
- 1135 ch$="abcd":gosub6510:sp%=f%:ifds%<>0andsp%>1thensp%=sp%-1
- 1137 gosub5034:goto1060
- 1140 gosub5034:mn%=sp%
- 1145 gosub1505:onsd%gosub3005,3105,3135,3035,3065
- 1150 a=qf/2:onagoto1205,1705,3205
- 1155 gosub1450:mn%=mn%-1:gosub1235:ifmn%<1then1060
- 1160 goto1145
- 1170 gosub5034:gosub5245:goto5515
- 1175 gosub5034:gosub5245:goto5505
- 1200 rem ***** lost convoy *****
- 1205 lv%=tv%/2:tv%=tv%-lv%:gosub5034
- 1210 ms$="[217]ou loose "+str$(lv%)+" ships due to bad":gosub5206
- 1215 ms$="weather and faulty navigation.":gosub5205
- 1220 ms$="[195]onvoy stops to regroup. [193]ny key.":cs=4:q=0:v=24:gosub5305
- 1225 gosub5034:sp%=0:sd%=0:gosub1405:gosub1415:gosub1420:goto1060
- 1230 rem ***** sailing problems *****
- 1235 e=1:ifst%(se%)=1andub%(se%)=1thene=3:b%=l1%(se%):d%=l2%(se%):goto1265
- 1240 ifst%(se%)=1thenb%=l1%(se%):goto1265
- 1245 ifub%(se%)=1thend%=l2%(se%):goto1270
- 1250 return
- 1260 rem ***** problem filter/action *****
- 1265 c%=0:a%=b%:d=1:a=0:gosub1290:ifa=1then1275
- 1270 c%=0:a%=d%:d=2:a=0:gosub1290:ifa=1then1275
- 1272 gosub5043:return
- 1275 gosub1305
- 1276 gosub6020:rn%=rnd(0)*4+1:ifrn%<>c%thenondgosub1355,1365
- 1280 ife=3andd=1then1270
- 1281 gosub5034:return
- 1290 ifgl%=a%thenc%=2:a=1:return
- 1291 forx=1to8:ifgl%=(a%+sa%(x))thenc%=1:x=8:next:a=1:return
- 1295 return
- 1300 rem ***** warnings/course change *****
- 1305 ms$="[217]ou are entering a storm.":cn=2
- 1307 ifd=2thenms$="[217]ou are in a [213]-boat area.":cn=4
- 1310 gosub2005:gosub5205:rn%=rnd(0)*5+1:ifrn%=sd%thenreturn
- 1312 a=1
- 1315 a%=rnd(0)*8+1:b%=gl%+sa%(a%)
- 1320 ifb%>9andb%<90thengl%=b%:gosub1445:goto1335
- 1325 a=a+1:ifa<5then1315
- 1326 return
- 1335 gosub6010:a$="[211]torm path":ifd=2thena$="[213]-boat sighting"
- 1340 ms$=a$+" causes course change.":gosub5206:sd%=rn%:gosub1415
- 1345 return
- 1350 rem ***** losses *****
- 1355 cn=2:gosub2005:rn%=rnd(9)*2+1:ifrn%=2then1358
- 1356 ms$="[211]torm damage to "+str$(c%)+" vessel(s).":ifsp%>1thensp%=sp%-1
- 1357 ds%=ds%+c%:goto1360
- 1358 ms$="[211]torm sinks"+str$(c%)+" vessel(s).":tv%=tv%-c%
- 1360 gosub5206:gosub1405:gosub1420:gosub1425
- 1361 gosub6020:gosub5034:ife=3then1270
- 1362 return
- 1365 forf=1toc%:cn=3:gosub2005:nextf
- 1366 ms$="[213]boats sink "+str$(c%)+" vessel(s).":tv%=tv%-c%:gosub5206
- 1367 gosub1405:gosub6020:goto5034
- 1370 rem ***** hq alert *****
- 1375 ms$="[198]8 = [200][209] obstacle reports.":v=18:goto5210
- 1380 rem ***** fuel consumption *****
- 1385 qf=1:fc%=fc%+mf%:fu%=(1000-fc%)*100/1000:iffu%<1thenfu%=0:qf=4
- 1390 q=8:ifqf<>4andmf%<10then1475
- 1395 return
- 1400 rem ***** print status data *****
- 1405 a$=str$(tv%):v=6:goto1435
- 1410 a$=str$(ev%):v=7:goto1435
- 1415 a$=sd$(sd%):v=8:goto1435
- 1420 a$=sp$(sp%):v=9:goto1435
- 1425 a$=str$(ds%):v=10:goto1435
- 1430 a$=str$(us%):v=11
- 1435 h=28:ms$=" ":gosub5070:ms$=a$:goto5070
- 1440 rem ***** print status line *****
- 1445 gosub5040:forx=1to3:h=dl%(x):ms$=dl$(x):gosub5070:next
- 1450 a%=1:q=8
- 1455 ona%goto1460,1465,1475
- 1460 h=9:e$=" ":a$=str$(se%):goto1480
- 1465 h=20:e$=" ":a$=gl$(gl%):goto1480
- 1475 h=32:e$=" ":a$=str$(fu%):goto1480
- 1480 v=0:ms$=e$:gosub5070:ms$=a$:gosub5070:ifq<>8thenreturn
- 1485 a%=a%+1:ifa%<4then1455
- 1490 return
- 1500 rem ***** set/unset problem locations *****
- 1505 pl%=4-ra%:ss=0:ms$="[210]eviewing situation - be patient.":gosub5205
- 1510 a%=ra%:ot=ot+1:ifot>3thenot=1
- 1511 rn%=rnd(0)*48+1
- 1512 onotgoto1515,1520,1525
- 1515 st%(rn%)=0:l1%(rn%)=0:a%=a%-1:ifa%=0then1530
- 1516 goto1511
- 1520 ub%(rn%)=0:l2%(rn%)=0:a%=a%-1:ifa%=0then1530
- 1521 goto1511
- 1525 ds%=ds%-ra%:ifds%=<0thends%=0
- 1526 gosub1425
- 1530 pa%=pa%+1:ifpa%=3thenpa%=1
- 1535 qf=1:sn%=rnd(0)*48+1:ifsn%<7orsn%=se%then1535
- 1540 ifpa%=1then1550
- 1545 st%(sn%)=1:goto1555
- 1550 ub%(sn%)=1
- 1555 rn%=rnd(0)*88+1:forx=1to8:ifrn%>x*10andrn%<x*10+9then1560
- 1557 next:goto1555
- 1560 x=8:next:ifpa%=1then1570
- 1565 l1%(sn%)=rn%:goto1575
- 1570 l2%(sn%)=rn%
- 1575 ss=ss+1:ifss<pl%then1530
- 1580 goto5043
- 1600 rem ***** search/attack *****
- 1605 ifev%<1thenms$="[206]o escorts. [193]ny key.":cs=4:q=0:goto5300
- 1606 ss=6:ss$="s":gosub5405:gosub1825:gosub5610:gosub1765
- 1607 gosub1445:ms$="[195]onvoy status above.":v=2:gosub5210
- 1609 gosub1780:gosub1475
- 1610 ms$="[211]elect - s,k,^, or _":gosub5205:sysad+48,"sk^_"
- 1611 gosub5043:iff%=4then1685
- 1612 iff%=3thengosub1770:goto1615
- 1613 onf%gosub1855,1905
- 1614 goto1610
- 1615 gosub1805:h=1:ms$="[211]earch [211]ector =":gosub5043:gosub5070:gosub6180
- 1620 h=18:v=23:gosub5015:ll=2:gosub5715:ifw$=""then1609
- 1622 a=1:forx=1to2:ifmid$(w$,x,1)<chr$(48)ormid$(w$,x,1)>chr$(57)thena=2
- 1623 next:ifa=2then1615
- 1624 ss%=val(w$):ifss%<0orss%>48then1615
- 1625 h=1:ms$="[211]earch [199]rid location =":gosub5043:gosub5070:gosub6180
- 1630 h=24:v=23:gosub5015:ll=2:gosub5715:ifw$=""then1609
- 1632 a=1:forx=1to2:ifmid$(w$,x,1)<chr$(48)ormid$(w$,x,1)>chr$(57)thena=2
- 1633 next:ifa=2then1625
- 1634 sg%=val(w$):ifsg%<0orsg%>99then1625
- 1635 ifss%=se%then1646
- 1640 ar%=se%/7:ifss%>ar%+7then1646
- 1645 ms$="[194]ad choice. [212]ry again. [193]ny key.":cs=4:q=0:gosub5300:goto1615
- 1646 fm%(0)=2:mf%=0:cn=1:gosub2005:ms$="[200]unting":gosub5206
- 1647 a=0:b=4-ra%:ifub%(ss%)=0thengosub6010:goto1660
- 1649 z=5*ra%:ifl2%(ss%)=sg%thena=3:b=1:goto1660
- 1650 forx=1toz:ifl2%(ss%)+x=sg%thena=2:b=x+1:x=z:l2%(ss%)=0:goto1655
- 1652 next:forx=1toz:ifl2%(ss%)-x=sg%thena=2:b=x+1:x=z:l2%(ss%)=0
- 1655 next:ifra%=3andus%=0anda<1thena=1
- 1657 a%=rnd(0)*25+1:ifa%=(gl%+1)/4thenev%=ev%-1:cn=3:gosub2005:goto1690
- 1660 mf%=b*25:gosub1385:mf%=0:gosub1475
- 1661 ifa=0thenms$="[206]o [213]boat found.":goto1676
- 1665 ifl2%(ss%)=0thenub%(ss%)=0:gosub1555
- 1670 forf=1toa:us%=us%+1:cn=5:gosub2005:nextf
- 1675 ms$="[197]scorts sink"+str$(a)+" [213]boat(s)"
- 1676 gosub5034:gosub5206:mf%=z*3*(4-ra%):gosub1385
- 1677 ifa>0thengosub6010:gosub5042:goto1609
- 1678 gosub1475:ms$="[195]ontinue search? (y/n)":cs=1:q=0:gosub5300
- 1680 gosub5034:onqfgoto1609,1625
- 1685 print"[147]":ss=6:ss$="r":gosub5405:goto1430
- 1690 ms$="[217]ou lose an escort vessel."
- 1695 ifev%<1thenms$="[217]ou just lost your last escort."
- 1696 gosub5206:ifev%<1thengosub5225:goto1685
- 1697 onra%gosub6005,6010,6015
- 1698 goto1677
- 1700 rem ***** game fail *****
- 1705 print"[147]":bd=2:bk=1:ch=0:gosub5005
- 1710 ms$="[217][207][213] [194][204][197][215] [201][212]![144]":v=1:gosub5210
- 1715 ms$="[217]ou ran out of fuel."
- 1720 iftv%=0thenms$="[217]ou went down with the last ship."
- 1725 v=10:gosub5210
- 1730 ms$="[196]o you wish to [210]edo, re[211]tart, or":v=15:gosub5210
- 1735 ms$="[209]uit? (r/s/q)"
- 1740 ch$="rsq":sp%=0:gosub6510:iff%=3thengosub5220:onqfgoto1740,5505
- 1745 iff%=2then5515
- 1750 gosub7705:onqfgoto1032,5515
- 1760 rem ***** attack display *****
- 1765 h=1:forv=4to13:ms$=md$(1,v-1):gosub5070:next:return
- 1770 a$(1)="([199]rid [204]etter: [193] = 0,":a$(2)="[202] = 9. [204]ocation = [210]ow"
- 1775 a$(3)="[206]umber-1, times 10,":a$(4)="plus [204]etter value.)"
- 1776 a$(5)="[205]in 2 digits. eg:8=08":goto1790
- 1780 a$(1)="[211] = [211]ector [205]ap":a$(2)="[203] = [200][209][160][196]ata"
- 1785 a$(3)="^ = [211]earch":a$(4)="_ = [206]av bridge":a$(5)=""
- 1790 d$=" ":h=16:forv=5to9:ms$=d$:gosub5070
- 1795 ms$=a$(v-4):gosub5070:next:return
- 1800 rem ***** collect garbage *****
- 1805 qf=1:ifpeek(52)>peek(50)+2thenreturn
- 1810 qf=2:ms$="[206]umber [207]ne re-evaluating convoy data.":v=18:gosub5210
- 1815 sys45949
- 1816 goto1375
- 1820 rem ***** attack screen *****
- 1825 print"[147]":sysad+3,0,39,1,1,160,0
- 1830 sysad+3,0,39,20,20,160,0
- 1835 return
- 1850 rem ***** attack sector map *****
- 1855 ss=7:ss$="s":gosub5405:print"[147]":ss=5:ss$="r":gosub5405
- 1860 ms$="[195]onvoy is in [211]ector"+str$(se%)+". [193]ny key.":cs=4:q=0:gosub5300
- 1865 print"[147]":ss=7:ss$="r":gosub5405:return
- 1900 rem ***** hq report *****
- 1905 ms$="[208]atience - organizing data.":v=18:gosub5210:gosub5086
- 1910 b%=3:ss=7:forx=3to6:a$="":next
- 1911 a%=0:a$(b%)="":forx=ssto48:ifst%(x)=0then1925
- 1915 a$(b%)=a$(b%)+str$(x):a%=a%+1:ifx=48then1925
- 1920 ifa%=12thenss=x:b%=b%+1:x=48:next:goto1911
- 1925 next:b%=9:ss=7:forx=9to12:a$="":next
- 1930 a%=0:a$(b%)="":forx=ssto48:ifub%(x)=0then1945
- 1935 a$(b%)=a$(b%)+str$(x):a%=a%+1:ifx=48then1945
- 1940 ifa%=12thenss=x:b%=b%+1:x=48:next:goto1930
- 1945 next:a$(0)="[200][197][193][196][209][213][193][210][212][197][210]'[211] [210][197][208][207][210][212]":a$(2)="[211][212][207][210][205] [211]ectors:-"
- 1950 a$(8)="[213][194][207][193][212] [211]ectors:-"
- 1955 v=18:gosub5045:ss=7:ss$="s":gosub5405:print"[147]"
- 1960 ms$=a$(0):gosub5208:h=1:v=2:ms$=a$(2):gosub5070
- 1965 forv=3to6:ms$=a$(v):gosub5070:next:v=8:ms$=a$(8):gosub5070
- 1970 forv=9to12:ms$=a$(v):gosub5070:next:gosub5225
- 1975 print"[147]":ss=7:ss$="r":gosub5405:return
- 2000 rem ***** sound s/r *****
- 2005 oncngosub2025,2045,2065,2085,2115
- 2010 forx=0to24:pokes+x,0:next:return
- 2020 **** attack ****
- 2025 forx=1to5:fory=70to100step5:pokes+1,y:pokes+5,15:pokes+6,10:pokes+24,15
- 2030 pokes+4,17:forz=0to5:next:next:next:pokes+4,16:return
- 2040 **** storm ****
- 2045 pokes+24,15:pokes+5,12:pokes+6,240:pokes+1,96:pokes,0:pokes+4,129
- 2050 forx=0to5000:next:pokes+4,128:return
- 2060 **** torpedo strike ****
- 2065 pokes+5,17:pokes+6,240:pokes+1,1:forx=2to12step.25:pokes+4,129
- 2070 pokes+24,x/2+9:pokes+1,x:next:fory=0to250:next:pokes+4,128:return
- 2080 **** uboat warning ****
- 2085 pokes+24,15:pokes+5,0:pokes+6,240:pokes+1,150:pokes,0:pokes+4,17
- 2090 pokes+5+7,0:pokes+6+7,240:pokes+1+7,75:pokes+7,0:pokes+4+7,33
- 2095 fora=1to6:forb=150to70step-8:pokes+1,b:pokes+1+3+4,b*1.5:pokes+0,0:next
- 2100 forb=70to150step6:pokes+1,b:pokes+1+3+4,b*1.3:pokes+0,0:next:next
- 2105 pokes+11,0:pokes+4,16:return
- 2110 **** uboat kill ****
- 2115 pokes+5,17:pokes+6,112:pokes+4,17:forx=15to1step-.2:pokes+24,x
- 2120 pokes+1,x*10:next:pokes+4,16:pokes+24,15:pokes+4,129:forx=15to1step-.4
- 2125 pokes+24,x:pokes+1,int(rnd(1)*3+x):next:pokes+4,128:return
- 3000 rem ***** north *****
- 3005 qf=1:ns%=se%:nl%=gl%-10
- 3010 ifnl%<0thennl%=(nl%+1)+90:ns%=se%-1:ifns%<0thensp%=0:sd%=0:qf=2:return
- 3015 gl%=nl%:ifns%<>se%thense%=ns%
- 3020 fm%(0)=1:goto1385
- 3030 rem ***** south *****
- 3035 qf=1:ns%=se%:nl%=gl%+10
- 3040 ifnl%>99thennl%=nl%-100:ns%=se%+1:ifns%>48thensp%=0:sd%=0:qf=2:return
- 3045 gl%=nl%:ifns%<>se%thense%=ns%
- 3050 fm%(0)=1:goto1385
- 3060 rem ***** east *****
- 3065 qf=1:ns%=se%:nl%=gl%+1:a%=gl%/10:b%=a%*10
- 3070 ifnl%>b%+9thennl%=b%:goto3080
- 3075 fm%(0)=1:gl%=nl%:goto1385
- 3080 ns%=se%+7:ifns%>48thenns%=ns%-7:qf=6:return
- 3085 fm%(0)=1:gl%=nl%:se%=ns%:goto1385
- 3100 rem ***** north east *****
- 3105 gosub3065:ifqf=6thenreturn
- 3110 goto3005
- 3130 rem ***** south east *****
- 3135 gosub3035:ifqf=2thenreturn
- 3140 goto3065
- 3200 rem ***** game end *****
- 3205 ed%=ns%-41:ifed%=1ored%=3thenf%=3:lv%=tv%/2:goto3230
- 3210 ifed%<>2anded%<>4thenf%=4:lv%=(tv%/5)*(e%-4):goto3230
- 3215 f%=ed%/2:a$(1)="[217]ou arrive safely at "+hd$(f%)
- 3220 a$(2)="":iftv%<30thena$(2)="[195]annot say as much for the convoy."
- 3225 goto3245
- 3230 iflv%<0thenlv%=0
- 3231 tv%=tv%-lv%:iftv%<0thentv%=0:goto1705
- 3232 a$(1)="":a$(2)=""
- 3233 iflv%=0then3245
- 3234 a$(1)="[217]ou lose "+str$(lv%)+" ships "+hd$(f%)
- 3235 a$(2)=he$(f%-2)+" to your faulty navigation."
- 3245 a$(3)="[217]ou make port with"+str$(tv%)+" transports"
- 3247 a$(4)="and"+str$(ev%)+" escorts after sinking"
- 3250 a$(5)="a total of"+str$(us%)+" [213]boats."
- 3255 a$(6)="[215]ell let us see how the [193]dmiralty"
- 3260 a$(7)="and [195][200][193][198] view your performance."
- 3265 a$(8)="[193]ny key takes you to the review board."
- 3270 gosub3305:print"[147]":bd=1:bk=1:ch=0:gosub5005
- 3275 h=1:forv=8to9:ms$=a$(v-7):gosub5070:next:gosub6015
- 3280 forv=11to13:ms$=a$(v-8):gosub5070:next:gosub6015
- 3285 forv=15to17:ms$=a$(v-9):gosub5070:next
- 3290 a$="":geta$:ifa$=""then3290
- 3295 gosub5033:gosub7805:goto5515
- 3300 rem ***** scoring *****
- 3305 el%=11:iftv%>5thenel%=10
- 3310 iftv%>10thenel%=9
- 3315 iftv%>15thenel%=8
- 3320 iftv%>20thenel%=7
- 3325 iftv%>25thenel%=6
- 3330 iftv%>30thenel%=5
- 3335 iftv%>35thenel%=4
- 3340 iftv%>40thenel%=3
- 3345 iftv%>45thenel%=2
- 3350 iftv%>48thenel%=1
- 3355 uc%=us%:ifuc%>40thenuc%=40
- 3360 ts%=(tv%*100)+(ev%*200)+(uc%*500)+(fu%*50):return
- 5000 rem ***** colour setup *****
- 5005 poke53280,bd:poke53281,bk:poke646,ch:return
- 5010 rem ***** cursor locate *****
- 5015 poke211,h:poke214,v:sys58732
- 5020 return
- 5025 rem ***** delete line(s) *****
- 5030 tl=0:bl=24:goto5035 :rem * screen
- 5031 tl=2:bl=6:goto5035 :rem * window1
- 5032 v=8:goto5035 :rem * window2
- 5033 tl=17:bl=19:goto5035:rem * window3
- 5034 tl=21:bl=24:goto5035:rem * window4
- 5035 forv=tltobl:gosub5045:next:return
- 5036 gosub5031:gosub5032:gosub5033:goto5034:rem * windows 1 to 4
- 5037 gosub5032:gosub5033:goto5034:rem * windows 2 to 4
- 5038 gosub5033:goto5034 :rem * windows 3 & 4
- 5039 gosub5031:goto5032 :rem * windows 1 & 2
- 5040 v=0:goto5045 :rem * line0
- 5042 v=22:goto5045 :rem * line22
- 5043 v=23:goto5045 :rem * line23
- 5044 v=24:goto5045 :rem * line24
- 5045 poke781,v:sys59903
- 5046 return
- 5050 tl=12:bl=19:goto5035
- 5055 tl=14:bl=24:goto5035
- 5060 rem ***** print data/at *****
- 5065 forv=tltobl:ms$=a$(v):gosub5070:next:return
- 5070 sysad+15,h,v,ms$
- 5075 return
- 5080 rem ***** delete data *****
- 5085 forx=tltobl:a$(x)="":next:return
- 5086 tl=1:bl=22:goto5085
- 5100 rem ***** check disk *****
- 5105 d=1:goto5120 :rem - load
- 5110 d=2:goto5120 :rem - save
- 5115 d=3 :rem - check
- 5120 gosub5258:open15,dr,15,"r:"+df$+"="+df$:input#15,er,a$,a,a:close15
- 5130 gosub5043:ifer=62thenondgoto5145,5145,5170
- 5135 ifer=63thenondgoto5175,5150,5175
- 5140 ifd=3then5180
- 5145 ms$="":gosub5300:onqfgoto5120,5180,5180
- 5150 ms$="":gosub5300:onqfgoto5160,5180,5180
- 5160 gosub5735:onqfgoto5135,5180
- 5165 pr=1:return
- 5170 pr=2:return
- 5175 pr=3:return
- 5180 pr=4:return
- 5200 rem ***** centre print *****
- 5205 v=23:goto5210
- 5206 v=22:goto5210
- 5207 v=24:goto5210
- 5208 v=0
- 5210 gosub5045
- 5211 gosub5370:return
- 5215 ms$="[205]enu? (y/n)":cs=1:q=0:goto5300ready.
- 5220 sz=zs:ms$="[193]re you sure you want to quit?(y/n)":cs=5:q=0:goto5300
- 5222 sz=zs:ms$="[196]ata unavailable. [193]ny key.":cs=4:q=0:goto5300
- 5225 sz=zs:ms$="[193]ny key when ready.":cs=4:q=0:goto5300
- 5230 return
- 5235 ms$="[195]hange disk now. [193]ny key.":cs=4:q=0:goto5300
- 5240 sz=zs:ms$="[198]unction/file not available. [193]ny key.":cs=4:zs=4:q=8:goto5300
- 5245 ms$="[211]ave game to date? (y/n)":cs=6:q=0:goto5300
- 5250 sz=zs:ms$="[195]ontinue?(y/n)":cs=2:q=0:goto5300
- 5255 sz=zs:ms$="[193]re you [210][197][193][204][204][217] sure?(y/n)":cs=2:q=0:goto5300
- 5258 ms$="[195][193][213][212][201][207][206] - drive activity":q=0:goto5205
- 5260 sz=zs:q=0:ifer=26thenms$="[215]rite protect on! [210]emoved?(y/n)":cs=2:goto5370
- 5280 ifer=62thenms$="[198]ile not found. [206]ew disk?(y/n)":cs=5:goto5370
- 5285 ifer=63thenms$="[198]ile exists. [210]eplace?(y/n)":cs=2:goto5370
- 5290 ifer=74thenms$="[196]rive unready. [195]orrected?(y/n)":cs=2:goto5370
- 5295 ms$="[205]ajor drive/disk error. [193]ny key.":cs=4:qf=3:goto5370
- 5300 gosub5043:zz=v:b$=ms$:goto5306
- 5305 zz=v:b$=ms$:gosub5045
- 5306 ifq=8thengosub5044:gosub6165
- 5307 v=zz:ms$=b$:gosub5365
- 5310 poke198,0:wait198,15:geta$
- 5315 sysad+24,a$
- 5320 gosub5044:ifa$="^"andq=8thengosub6105:goto5306
- 5321 q=0:ifa$="^"thengosub6985:goto5306
- 5325 zs=sz:ifcs=4thena$="":v=zz:goto5045
- 5330 ifcs=3thenv=zz:goto5045
- 5335 qf=1:ifa$<>"y"anda$<>"n"thengosub6985:goto5306
- 5340 ifcs=6anda$="y"thengosub7805
- 5345 ifcs=5anda$="y"thena=1:goto5245
- 5350 ifcs=2anda$="n"thenqf=2
- 5355 ifcs=1anda$="y"thenqf=2
- 5357 ifa=1thena=0:qf=2
- 5360 a$="":v=zz:goto5045
- 5365 ifms$=""then5260
- 5370 sysad+18,v,ms$
- 5375 return
- 5400 rem ***** screen stash *****
- 5405 onssgoto5410,5415,5420,5425,5430,5435,5440
- 5410 sp=160:goto5450 :rem - help/harbour
- 5415 sp=168:goto5450 :rem - hotkeys
- 5420 sp=174:goto5450 :rem - help/bridge
- 5425 sp=16:goto5450 :rem - help load
- 5430 sp=208:goto5450 :rem - sector map
- 5435 sp=216:goto5450 :rem - temp 1
- 5440 sp=224:goto5450 :rem - temp 2
- 5445 sp=232 :rem - temp 3
- 5450 m=6:ifss$="r"thenm=9
- 5455 sysad+m,sp
- 5460 return
- 5500 rem ***** module load *****
- 5503 ifdr=25thenpoke186,dv:q=64:goto5546
- 5505 open2,dr,2:close2:ifst<-120thendr=dr+1:goto5503
- 5510 qf=1:df$="hello connect":gosub5115:ifpr=3then5530
- 5512 dr=dr+1:goto5503
- 5515 x$="1":ifts%<>0thenx$="2"
- 5520 qf=1:df$="harbour":dr=dv:gosub5115:ifpr<>3thenq=64:goto5546
- 5525 dl$=df$:goto5565
- 5530 print"[147]":bd=0:bk=0:ch=1:gosub5005
- 5535 ms$="[197]ntering "+df$:gosub5205:poke646,0
- 5540 print"[144]load"q$df$q$","dv
- 5545 print"run":ifdf$<>"hello connect"then5548
- 5546 poke44,8:poke2048,0:poke53272,23:printchr$(9)
- 5547 ifq=64thenprint"[147]":poke646,1:printchr$(9):new
- 5548 print"":poke631,13:poke632,13:poke633,13:poke198,3:end
- 5565 df%=1:df$="ac.game":dr=dv:gosub5115:ifpr=1orpr=4then5595
- 5570 ifpr=3thengosub5740:ifqf=2then5595
- 5575 gosub5258:open3,dv,3,"l:"+df$+",s,w":print#3,nm$:print#3,x$
- 5580 print#3,str$(ra%):close3:df$=dl$:gosub5043:goto5530
- 5595 ms$="[198]ile (ac.game)/disk problem. [193]ny.":cs=4:gosub5300
- 5596 gosub5740:df$=dl$:goto5530
- 5600 rem ***** bload *****
- 5605 df$="h.convoy"+str$(zs):gw=0:goto5635
- 5610 df$="getword 1000":ifgw=1thenreturn
- 5635 gosub5258:sysad+51,df$,dv,4096
- 5640 ifdf$="getword 1000"thengw=1
- 5645 gosub5043:return
- 5700 rem ***** data entry *****
- 5705 ch=0
- 5706 sysag,ch,5,ll :rem - alpha
- 5710 return
- 5715 ch=0
- 5716 sysag+3,ch,7,ll :rem - numeric
- 5720 return
- 5730 rem ***** scratch file *****
- 5735 ifq=1thenq=0:goto5740
- 5736 qf=1:ms$="[193]re you sure you want to delete?(y/n)":cs=2:gosub5300
- 5737 ifqf=2thenreturn
- 5740 gosub5258:open15,dv,15,"s:"+df$:input#15,er,a$,a,a:close15:gosub5043
- 5745 ifer=62orer<20thenqf=1:pr=2:return
- 5750 qf=2:return
- 6000 rem ***** timer *****
- 6005 x=60:goto6085
- 6010 x=90:goto6085
- 6015 x=120:goto6085
- 6020 x=180:goto6085
- 6025 x=210:goto6085
- 6030 x=240:goto6085
- 6035 x=270:goto6085
- 6040 x=300:goto6085
- 6045 x=330:goto6085
- 6050 x=360:goto6085
- 6055 x=390:goto6085
- 6060 x=420:goto6085
- 6065 x=480:goto6085
- 6070 x=510:goto6085
- 6075 x=540:goto6085
- 6080 x=600
- 6085 ti$="000000"
- 6090 ifti<xthen6090
- 6095 return
- 6100 rem ***** help screen s/r *****
- 6105 ss=6:ss$="s":gosub5405:print"[147]":bd=0:bk=1:ch=0:gosub5005
- 6106 ifzs>3thenz=zs-3:goto6118
- 6110 ifzl(zs)=1thenss=zs:ss$="r":gosub5405:goto6120
- 6115 gosub5605:ss=4:ss$="r":gosub5405:zl(zs)=1:ss=zs:ss$="s":gosub5405
- 6116 gosub5610:goto6120
- 6118 onzgosub6130
- 6120 gosub5225:print"[147]":ss=6:ss$="r":gosub5405:return
- 6125 ms$="[198]unction cannot be used with available":v=10:gosub5210
- 6126 ms$="data/information --- [207][210] ---":v=11:gosub5210
- 6127 ms$="[210]equested file not available":v=12:gosub5210
- 6128 ms$="--- [207][210] --- not used with this option.":v=13:gosub5210:return
- 6160 rem ***** info line data *****
- 6165 ms$="^ = [200]elp.":goto5207
- 6170 ms$="_ = [193]bort.":goto5207
- 6175 ms$="or [200][207][212] keys.":goto5207
- 6180 ms$="[210][197][212][213][210][206] = [193]bort.":goto5207
- 6500 rem ***** brancher *****
- 6505 tl=v:bm$=ms$:k=len(ch$):bh$=ch$+kf$:qn$="a":goto6515
- 6510 tl=v:bm$=ms$:k=len(ch$):bh$=ch$:qn$=""
- 6515 v=tl:ms$=bm$:gosub5205:ifqn$="a"thengosub6175
- 6516 a=1:poke198,0:a%=0:qf=1:ti$="000000"
- 6517 a$="":geta$:ifa$<>""then6521
- 6518 ifsp%=0orti<vt%(ra%,sp%)then6517
- 6519 mf%=sp%:gosub1385:ifqf=4thenreturn
- 6520 qf=8:return
- 6521 forx=1tolen(bh$):ifa$<>mid$(bh$,x,1)thennext:goto6515
- 6522 f%=x:x=len(bh$):next:iff%<k+1thenreturn
- 6525 a%=f%-k:ifa%=1thengosub1605:gosub1475:goto6515
- 6530 ifa%=2thengosub1905:gosub1375:goto6515
- 6535 ifa%=3thengosub5220:onqfgoto6515,6595
- 6540 ifa%=4thenqf=5:gosub7705:goto6519
- 6545 ifa%=5thengosub7805:goto6515
- 6550 ifa%=6thengosub6105:goto6515
- 6555 ifa%=7thenqf=3:return
- 6560 ifa%=8thensz=zs:zs=2:gosub6105:zs=sz:goto6515
- 6562 ifa%=9thenqf=7:return
- 6565 ifa%=10thengosub6585:goto6515
- 6566 ifse%<>28andse%<>29thengosub5230:goto6515
- 6567 c%=rnd(0)*12+1:ifc%>9then6570
- 6568 c%=rnd(0)*3+1:ms$="[212]ransports on rocks = "+str$(c%):gosub5206:gosub5225
- 6569 tv%=tv%-c%:gosub1405:goto6580
- 6570 c%=rnd(0)*12+1:ifc%>9then6580
- 6571 c%=rnd(0)*3+1:cn=3:forf=1toc%:gosub2005:nextf
- 6572 ms$="[213]-boats sink "+str$(c%)+" vessels.":gosub5206:gosub5225
- 6575 tv%=tv%-c%:gosub1405
- 6580 gosub5042:se%=28:gl%=6:sp%=0:sd%=0:fc%=0:mf%=0:gosub1385:gosub1415
- 6581 gosub1420:gosub1445
- 6582 ms$="[210]efuel in [201]celand.":gosub5206:goto6515
- 6585 ms$="[206]o nearby base. [193]ny key.":cs=4:q=0:gosub5300
- 6590 print"[147]":ss=7:ss$="r":gosub5405:return
- 6595 return
- 6950 rem ***** bridge screen *****
- 6955 print"[147]":bd=0:bk=1:ch=0:gosub5005
- 6960 sysad+3,0,39,1,1,160,0
- 6965 sysad+3,0,39,20,20,160,0
- 6970 h=1:forv=2to14:ms$=md$(1,v-2):gosub5070:next
- 6975 h=16:forv=6to11:ms$=md$(1,v+7):gosub5070:next:return
- 6980 rem ***** rebuke *****
- 6985 gosub5034:ms$="[217]ou are bad "+nm$+",":v=21:gosub5210
- 6990 ms$="follow instructions.":v=22:gosub5210
- 6991 ms$="[193]ny key continues.":gosub5205
- 6992 a$="":geta$:ifa$=""then6992
- 6995 goto5034
- 6996 goto5034
- 7700 rem ***** load game *****
- 7705 qf=1:df$="cg."+nm$+fl$(ra%):dr=dv:gosub5115:ifpr<>3thenqf=4:goto7770
- 7715 gosub5258:open15,dv,15:open3,dv,3,"l:"+df$+",s,r"
- 7720 input#3,a$,b$,c$,d$,e$,f$,g$,h$,i$,j$,k$,l$,m$,n$:ev%=val(a$):gl%=val(b$)
- 7721 se%=val(c$):sd%=val(d$):sp%=val(e$):us%=val(f$)
- 7725 tv%=val(g$):gc%=val(h$):ds%=val(i$):fu%=val(j$):el%=val(k$):fc%=val(l$)
- 7730 ts%=val(m$):uc%=val(n$):forx=0to48:input#3,a$,b$,c$,d$:l1%(x)=val(a$)
- 7735 l2%(x)=val(b$):st%(x)=val(c$):ub%(x)=val(d$):next
- 7740 input#15,er,a$,a,a:close3:close15:gosub5043:qf=1:ifer<20orer=63then7755
- 7745 qf=2:return
- 7755 ifqf=1andgc%=0andts%=0thenreturn
- 7760 qf=2:return
- 7800 rem ***** save game *****
- 7805 df$="cg."+nm$+fl$(ra%):dr=dv:gosub5115
- 7806 ifpr=3thengosub5740:onqfgoto7815,7855
- 7810 ifpr<>2then7860
- 7815 qf=1:gosub5258:open15,dv,15:open3,dv,3,"l:"+df$+",s,w"
- 7820 print#3,str$(ev%):print#3,str$(gl%):print#3,str$(se%):print#3,str$(sd%)
- 7825 print#3,str$(sp%):print#3,str$(us%):print#3,str$(tv%):print#3,str$(gc%)
- 7830 print#3,str$(ds%):print#3,str$(fu%):print#3,str$(el%):print#3,str$(fc%)
- 7835 print#3,str$(ts%):print#3,str$(uc%):forx=0to48:print#3,str$(l1%(x))
- 7836 print#3,str$(l2%(x)):print#3,str$(st%(x)):print#3,str$(ub%(x)):next
- 7850 input#15,er,a$,a,a:close3:close15:gosub5043:ifer<20orer=63then7865
- 7855 ms$="[211]ave error. [210]etry?(y/n)":cs=2:gosub5300:onqfgoto7805,7865
- 7860 ms$="[196]rive error. [210]etry?(y/n)":cs=2:gosub5300:ifqf=1then7805
- 7865 return
- 10000 dv=peek(186):open15,dv,15,"s:bridge":close15:save"bridge",dv:end
- 20000 a%=rnd(0)*12+1:printa%
-