rkl@mva.cs.liv.ac.uk (09/12/88)
The program below is for people who own a machine that runs BBC BASIC (e.g.
BBC Micro, Archimedes, Z88, Macintosh, IBM PC or CP/M machines) sitting next
to an Amiga running F/A-18 Interceptor. The program acts as a codewheel for
the game...have fun !
Richard K. Lloyd, **** This is a MicroVAX II running VAX/VMS V4.7 ****
Computer Science Dept., * JANET : RKL@UK.AC.LIV.CS.MVA or *
Liverpool University, * RKL@000010500211.FTP.MAIL *
Merseyside, England, * Internet : RKL%mva.cs.liv.ac.uk@cunyvm.cuny.edu *
Great Britain. ****************************************************
"What's the world's fastest microcomputer ? A Mac II at 5000 pounds ?
A 25Mhz Compaq 386 at 5500 pounds ? No, it's an Archimedes at 800 pounds !"
----------------------------- Start of program -----------------------------
10REM >CodeWheel
20REM Amiga F/A-18 Interceptor Code Wheel Program
30REM (C) Richard K. Lloyd 1988 (Requires BBC BASIC)
40DIM wheel$(2,&F,7)
50FOR A%=0 TO 1:FOR B%=0 TO &F:FOR C%=0 TO 7
60READ wheel$(A%,B%,C%):NEXT:NEXT:NEXT
70REM Outer code wheel
80DATA 226,751,4474,0207,07701,67424,057167,062662
90DATA 603,326,3051,6564,36356,16101,145544,011337
100DATA 360,103,1626,5341,01034,44556,134321,140014
110DATA 735,460,0203,3716,27311,07034,022676,166271
120DATA 513,235,6760,2473,56166,35711,011453,015146
130DATA 070,613,5335,1050,04643,64366,014031,143623
140DATA 245,770,3512,7225,32720,12443,002206,005701
150DATA 622,345,6070,5602,61575,41320,070563,034556
160DATA 777,522,5245,2760,10452,66175,057740,055433
170DATA 354,073,3622,1341,37127,14646,146315,004034
180DATA 131,650,2377,0116,01605,43323,135072,132611
190DATA 506,225,0754,6473,30062,05601,023447,161166
200DATA 264,002,6531,2250,55737,35436,011224,014743
210DATA 641,360,5106,0625,04414,64133,013602,143320
220DATA 016,535,4263,2002,33471,11210,002757,000476
230DATA 373,112,6641,0357,61346,41065,071334,027053
240REM Middle code wheel (spaces are gaps in wheel)
250DATA 000," ",3245,6760,62513,02236,135740,161473
260DATA 455,177,1722,5435,11170," ",000416,010150
270DATA 132," ",0377,4112,37645,57370,027073,136625
280DATA 407,132,2655," ",66122,05645,055350,001103
290DATA 264,007,1532,1244,14777,34522,004225," "
300DATA 741,464,0207,3722," ",63177,132702,056435
310DATA 016,541," ",1777,05532,11254,160757,004512
320DATA " ",416,5141,0654,34407,40131,007634,133367
330DATA 551,273,4016,1531,63264,01007," ",134244
340DATA 226,750," ",0206,11741,27464,001167,022721
350DATA 703,422,1150,6667,40416," ",027644,011362
360DATA 160,677,3426,5144,66673,04412,056121," "
370DATA 035,554,1303,1021," ",34267,003776,027515
380DATA " ",231,7760,3427,43225,62774,132453,056172
390DATA 567,306,7035,4554,06303,10021," ",057247
400DATA 444,163,4712," ",34160,37676,007405,133124
410DIM inner%(&F,1)
420FOR A%=0 TO &F:FOR B%=0 TO 1:READ inner%(A%,B%):NEXT,
430REM Inner code wheel gap positions (segment,ring)
440DATA 0,0,0,4,1,2,1,7,2,5,3,1,3,3,4,6
450DATA 5,4,6,2,6,6,7,0,8,3,8,5,9,1,9,7
460PRINT"Enter (4-digit) security countercode: ";
470DIM code%(3)
480FOR A%=0 TO 3
490REPEAT
500 C$=GET$
510UNTIL C$>="0" AND C$<="9" OR C$>="A" AND C$<="F"
520PRINT C$;:code%(A%)=EVAL("&"+C$)
530NEXT
540seg%=inner%(code%(3),0):ring%=inner%(code%(3),1)
550diff%=(16+seg%-code%(0)) MOD 16
560seg%=(diff%+code%(1)) MOD 16
570answer$=wheel$(1,seg%,ring%)
580IF ASC(answer$)=32:answer$=wheel$(0,(diff%+code%(2)) MOD 16,ring%)
590PRINT'"Type in the following response code: ";answer$
------------------------------ End of program ------------------------------