Home » Archimedes archive » Micro User » MU 1991-10.adf » Listings » Arc/Brain

Arc/Brain

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 » Archimedes archive » Micro User » MU 1991-10.adf » Listings
Filename: Arc/Brain
Read OK:
File size: 0335 bytes
Load address: 0000
Exec address: 0000
File contents
   10REM >IIC.BRAIN
   20DIM PBK% 3
   30?PBK%=&FF
   40SYS "IIC_Control",&70,PBK%,1
   50MODE 1
   60PRINT"BRAIN SURGEON"
   70PRINT" By Mike Cook"
   80PRINT"Using the IIC interface card"
   90PRINT TAB(0,14)"Score"
  100REPEAT:REPEAT
  110PRINT TAB(0,23)"Put in place all the pieces of Brain"
  120  REPEAT
  130  SYS "IIC_Control",&71,PBK%,1
  140  UNTIL ?PBK%=&80
  150  PRINT TAB(0,23)"Now begin to remove the Brain Tumours"
  160  PRINTTAB(0,17);SPC(39)
  170  PRINTTAB(0,19);SPC(39)
  180 TIME=0
  190 REPEAT UNTIL TIME > 200
  200 SYS "IIC_Control",&71,PBK%,1
  210UNTIL ?PBK%=&80
  220SCORE=0:T%=0
  230REPEAT
  240SYS "IIC_Control",&71,PBK%,1
  250A%=?PBK%:V%=1
  260FOR B%=0 TO 6
  270IF (A% AND V%)<>0 AND (T% AND V%)=0 THEN T%=T% OR V%:SCORE+=1
  280V%=V%*2
  290NEXT
  300PRINT TAB(0,14);"Score ",SCORE
  310UNTIL (A% AND &80)=0 OR (T%=&7F)
  320TM%=TIME
  330IF T%=&7F THEN PRINT TAB(0,17)"Congratulations! Your patient survived. " ELSE:PRINT TAB(0,17)"Sorry - your patient died"
  340PRINTTAB(0,19);"You took ";TM%/100;" Seconds"
  350UNTIL FALSE
� >IIC.BRAIN
� PBK% 3

?PBK%=&FF
(ș "IIC_Control",&70,PBK%,1
2� 1
<�"BRAIN SURGEON"
F�" By Mike Cook"
P#�"Using the IIC interface card"
Z� �0,14)"Score"
d�:�
n2� �0,23)"Put in place all the pieces of Brain"
x  �
�!  ș "IIC_Control",&71,PBK%,1
�  � ?PBK%=&80
�5  � �0,23)"Now begin to remove the Brain Tumours"
�  �0,17);�(39)
�  �0,19);�(39)
� �=0
� � � � > 200
�  ș "IIC_Control",&71,PBK%,1
�� ?PBK%=&80
�SCORE=0:T%=0
��
�ș "IIC_Control",&71,PBK%,1
�A%=?PBK%:V%=1
� B%=0 � 6
6� (A% � V%)<>0 � (T% � V%)=0 � T%=T% � V%:SCORE+=1
V%=V%*2
"�
,� �0,14);"Score ",SCORE
6� (A% � &80)=0 � (T%=&7F)
@	TM%=�
Jg� T%=&7F � � �0,17)"Congratulations! Your patient survived. " �:� �0,17)"Sorry - your patient died"
T*�0,19);"You took ";TM%/100;" Seconds"
^� �
�
00000000  0d 00 0a 10 f4 20 3e 49  49 43 2e 42 52 41 49 4e  |..... >IIC.BRAIN|
00000010  0d 00 14 0c de 20 50 42  4b 25 20 33 0d 00 1e 0d  |..... PBK% 3....|
00000020  3f 50 42 4b 25 3d 26 46  46 0d 00 28 1f c8 99 20  |?PBK%=&FF..(... |
00000030  22 49 49 43 5f 43 6f 6e  74 72 6f 6c 22 2c 26 37  |"IIC_Control",&7|
00000040  30 2c 50 42 4b 25 2c 31  0d 00 32 07 eb 20 31 0d  |0,PBK%,1..2.. 1.|
00000050  00 3c 14 f1 22 42 52 41  49 4e 20 53 55 52 47 45  |.<.."BRAIN SURGE|
00000060  4f 4e 22 0d 00 46 14 f1  22 20 42 79 20 4d 69 6b  |ON"..F.." By Mik|
00000070  65 20 43 6f 6f 6b 22 0d  00 50 23 f1 22 55 73 69  |e Cook"..P#."Usi|
00000080  6e 67 20 74 68 65 20 49  49 43 20 69 6e 74 65 72  |ng the IIC inter|
00000090  66 61 63 65 20 63 61 72  64 22 0d 00 5a 13 f1 20  |face card"..Z.. |
000000a0  8a 30 2c 31 34 29 22 53  63 6f 72 65 22 0d 00 64  |.0,14)"Score"..d|
000000b0  07 f5 3a f5 0d 00 6e 32  f1 20 8a 30 2c 32 33 29  |..:...n2. .0,23)|
000000c0  22 50 75 74 20 69 6e 20  70 6c 61 63 65 20 61 6c  |"Put in place al|
000000d0  6c 20 74 68 65 20 70 69  65 63 65 73 20 6f 66 20  |l the pieces of |
000000e0  42 72 61 69 6e 22 0d 00  78 07 20 20 f5 0d 00 82  |Brain"..x.  ....|
000000f0  21 20 20 c8 99 20 22 49  49 43 5f 43 6f 6e 74 72  |!  .. "IIC_Contr|
00000100  6f 6c 22 2c 26 37 31 2c  50 42 4b 25 2c 31 0d 00  |ol",&71,PBK%,1..|
00000110  8c 11 20 20 fd 20 3f 50  42 4b 25 3d 26 38 30 0d  |..  . ?PBK%=&80.|
00000120  00 96 35 20 20 f1 20 8a  30 2c 32 33 29 22 4e 6f  |..5  . .0,23)"No|
00000130  77 20 62 65 67 69 6e 20  74 6f 20 72 65 6d 6f 76  |w begin to remov|
00000140  65 20 74 68 65 20 42 72  61 69 6e 20 54 75 6d 6f  |e the Brain Tumo|
00000150  75 72 73 22 0d 00 a0 13  20 20 f1 8a 30 2c 31 37  |urs"....  ..0,17|
00000160  29 3b 89 28 33 39 29 0d  00 aa 13 20 20 f1 8a 30  |);.(39)....  ..0|
00000170  2c 31 39 29 3b 89 28 33  39 29 0d 00 b4 08 20 d1  |,19);.(39).... .|
00000180  3d 30 0d 00 be 10 20 f5  20 fd 20 91 20 3e 20 32  |=0.... . . . > 2|
00000190  30 30 0d 00 c8 20 20 c8  99 20 22 49 49 43 5f 43  |00...  .. "IIC_C|
000001a0  6f 6e 74 72 6f 6c 22 2c  26 37 31 2c 50 42 4b 25  |ontrol",&71,PBK%|
000001b0  2c 31 0d 00 d2 0f fd 20  3f 50 42 4b 25 3d 26 38  |,1..... ?PBK%=&8|
000001c0  30 0d 00 dc 10 53 43 4f  52 45 3d 30 3a 54 25 3d  |0....SCORE=0:T%=|
000001d0  30 0d 00 e6 05 f5 0d 00  f0 1f c8 99 20 22 49 49  |0........... "II|
000001e0  43 5f 43 6f 6e 74 72 6f  6c 22 2c 26 37 31 2c 50  |C_Control",&71,P|
000001f0  42 4b 25 2c 31 0d 00 fa  11 41 25 3d 3f 50 42 4b  |BK%,1....A%=?PBK|
00000200  25 3a 56 25 3d 31 0d 01  04 0e e3 20 42 25 3d 30  |%:V%=1..... B%=0|
00000210  20 b8 20 36 0d 01 0e 36  e7 20 28 41 25 20 80 20  | . 6...6. (A% . |
00000220  56 25 29 3c 3e 30 20 80  20 28 54 25 20 80 20 56  |V%)<>0 . (T% . V|
00000230  25 29 3d 30 20 8c 20 54  25 3d 54 25 20 84 20 56  |%)=0 . T%=T% . V|
00000240  25 3a 53 43 4f 52 45 2b  3d 31 0d 01 18 0b 56 25  |%:SCORE+=1....V%|
00000250  3d 56 25 2a 32 0d 01 22  05 ed 0d 01 2c 1b f1 20  |=V%*2.."....,.. |
00000260  8a 30 2c 31 34 29 3b 22  53 63 6f 72 65 20 22 2c  |.0,14);"Score ",|
00000270  53 43 4f 52 45 0d 01 36  1d fd 20 28 41 25 20 80  |SCORE..6.. (A% .|
00000280  20 26 38 30 29 3d 30 20  84 20 28 54 25 3d 26 37  | &80)=0 . (T%=&7|
00000290  46 29 0d 01 40 09 54 4d  25 3d 91 0d 01 4a 67 e7  |F)..@.TM%=...Jg.|
000002a0  20 54 25 3d 26 37 46 20  8c 20 f1 20 8a 30 2c 31  | T%=&7F . . .0,1|
000002b0  37 29 22 43 6f 6e 67 72  61 74 75 6c 61 74 69 6f  |7)"Congratulatio|
000002c0  6e 73 21 20 59 6f 75 72  20 70 61 74 69 65 6e 74  |ns! Your patient|
000002d0  20 73 75 72 76 69 76 65  64 2e 20 22 20 8b 3a f1  | survived. " .:.|
000002e0  20 8a 30 2c 31 37 29 22  53 6f 72 72 79 20 2d 20  | .0,17)"Sorry - |
000002f0  79 6f 75 72 20 70 61 74  69 65 6e 74 20 64 69 65  |your patient die|
00000300  64 22 0d 01 54 2a f1 8a  30 2c 31 39 29 3b 22 59  |d"..T*..0,19);"Y|
00000310  6f 75 20 74 6f 6f 6b 20  22 3b 54 4d 25 2f 31 30  |ou took ";TM%/10|
00000320  30 3b 22 20 53 65 63 6f  6e 64 73 22 0d 01 5e 07  |0;" Seconds"..^.|
00000330  fd 20 a3 0d ff                                    |. ...|
00000335