================================================================================
Note 7.0                      Falcon(+) Memory Maps                   No replies
JAWS::KAISER                                        691 lines  25-MAR-1985 09:16
--------------------------------------------------------------------------------
      +---------------+					   +-----------------+
      | d i g i t a l |					   |  uNOTE # 007    |
      +---------------+					   +-----------------+


      +----------------------------------------------------+-----------------+
      | Title: User Defined Memory Maps for the FALCON	   | Date: 01-May-84 |
      |			  and the FALCON+		   |		     |
      +----------------------------------------------------+-----------------+
      | Originator: Jack Toto				   | Page 1 of 12    |
      +----------------------------------------------------+-----------------+


      The memory maps on the Falcon, and Falcon Plus are defined by  the  FPLA
      (Field  Programmable  Logic  Array)  that	 is located on board in socket
      XE41.  This micronote explains how to redefine the existing maps.

      The equipment needed to custom build the FPLA is as follows:

      1. Signetics NS82S100N FPLA.
      2. Signetics NS82S100N FPLA worksheet.
      3. PROM programmer that supports Signetics NS82S100N FPLA.
      4. User written routine to convert binary into hex form,
	     needed for the PROM programmer.

      The Falcon or Falcon Plus can be configured to any one of four  standard
      memory  maps.   When  you custom build the memory map FPLA, you may keep
      this ability to select any one of four memory map schemes, however it is
      not nessecary to build in the four maps, you may build an FPLA with only
      one map for the Falcon.  Further the addresses of the SLUs and  Parallel
      I/O  Port	 can  be  be changed to some other addresses on the module, or
      they can be relocated off the module to some other  device  such	as  an
      MXV11-A/B, DLV11-J, DRV11-J, etc.

      The memory map is defined by:

      1. Selecting a range of addresses, for example addresses 077777 - 037777.
	 This includes selecting the addresses of the boards SLUs and PIO.
      2. Asserting or deasserting the bits which define that range.
      3. Defining which one of four memory maps the selected range of
	   addresses will respond.
      4. Selecting an enable bit (A7 -A0), which tells the T-11 where to
	 find that range of addresses: on the Q-bus, on board the Falcon Plus
	   in one of the two sockets, or in the local RAM.

      When mapping an FPLA to be used with the KXT11-A2 or KXT11-A5 ODT	 ROMs,
      you  must	 map  addresses 177600 - 177777 to the local RAM that comes on
      board the Falcon or Falcon Plus.	This space is used for a  scratch  pad
      area  by	Macro  ODT.   If  Macro	 ODT is not going to be used than this
      address range can be left to be selected by the user.  Beyond  this  all
      addresses and functions can be mapped off board.

      Below is an example of an FPLA worksheet that was	 completed  specifying
      one  map	(map 0) which maps all of memory to the Q-bus, and changes the
      address of SLU2 from 176540 - 176547, to 176500 - 176507.	  This	format
									Page 2


      is  simalar  to  the  Signetics  FPLA worksheet.	For each address range
      shown, the combination of bits set (H), cleared (L),  or	in  the	 don't
      care  state  (-)	define	that  range.   Further	each address range has
      associated with it an output enable bit (A) that identifies the location
      of the memory containing that range.  It is possible to define larger or
      smaller ranges then the ones shown here, if needed.  More	 examples  are
      provided in the Falcon Plus User's Guide Appendix H.


      THIS IS AN FPLA MAP FOR
      COMPANY: XYZ




			  I I I I I I I I I I I I I  I I  I

			  0 0 0 0 0 1 0 1 0 1 0 1 0  1 0  1
			  7 8 6 9 5 0 4 1 3 2 2 3 1  5 0  4   F F F F F F F
      --------------------------------------------------------------------------
      ADDRESS	      X	  1 1 1 1 1 1 0 0 0 0 0 0 0  0 0  0   7 6 5 4 3 2 1 0
      RANGE	      X	  5 4 3 2 1 0 9 8 7 6 5 4 3  2 1  0

      177600-177777  RAM  - - - H H H H H H - - - -  L L  H   A		      00
      177570-177577  QB	  - - - H H H H H L H H H H  L L  H		A     01
      177560-177567  DL0  - - - H H H H H L H H H L  L L  H	   A	      02
      177540-177557  QB	  - - - H H H H H L H H L -  L L  H		A     03
      177500-177537  QB	  - - - H H H H H L H L - -  L L  H		A     04
      177400-177477  QB	  - - - H H H H H L L - - -  L L  H		A     05
      177000-177377  QB	  - - - H H H H L - - - - -  L L  H		A     06
      176600-176777  QB	  - - - H H H L H H - - - -  L L  H		A     07
      176560-176577  QB	  - - - H H H L H L H H H -  L L  H		A     08
      176550-176557  QB	  - - - H H H L H L H H L H  L L  H		A     09
      176540-176547  QB	  - - - H H H L H L H H L L  L L  H		A     10
      176510-176537  QB	  - - - H H H L H L H L - H  L L  H		A     11
      176500-176507  DL1  - - - H H H L H L H L L L  L L  H		  A   12
      176400-176477  QB	  - - - H H H L H L L - - -  L L  H		A     13
      176300-176377  QB	  - - - H H H L L H H - - -  L L  H		A     14
      176240-176277  QB	  - - - H H H L L H L H - -  L L  H		A     15
      176220-176237  QB	  - - - H H H L L H L L H -  L L  H		A     16
      176210-176217  QB	  - - - H H H L L H L L L H  L L  H		A     17
      176200-176207  PIO  - - - H H H L L H L L L L  L L  H	    A	      18
      176000-176177  QB	  - - - H H H L L L - - - -  L L  H		A     19
      174000-175777  QB	  - - - H H L - - - - - - -  L L  H		A     20
      170000-173777  QB	  - - - H L - - - - - - - -  L L  H		A     21
      160000-167777  QB	  - - - L - - - - - - - - -  L L  H		A     22
      140000-157777  QB	  H H L - - - - - - - - - -  L L  L		A     23
      100000-137777  QB	  H L - - - - - - - - - - -  L L  L		A     24
      000000-077777  QB	  L - - - - - - - - - - - -  L L  L		A     25

							      7 6 5 4 3 2 1 0
									Page 3


      Once the address ranges have been coded, they need to be converted  into
      the  formatted file shown directly below.	 This file will be used as the
      input file to a program (see end of Micronote) that will output the FPLA
      terms  in	 a  format that is usable by the PROM Programmer itself.  When
      converting the above worksheet to FPLA terms, the	 following  should  be
      considered:


      1. The area at the beginning of the file may be used as a comment area
	 as long as the word "START" is not used in the comments. "START" is
	 the key word to begin the formatting process while the word "END" is
	 the key word used to signal the formatter that the processing must be
	 terminated. Both words MUST appear in capital letters.

      2. The layout of the map must be as follows:
								    -----
	 I15 I14 I13 I12 I11 I10 I09 I08 I07 I06 I05 I04 I03 I02 I01 I00 | TERM1
	 O7  O6	 O5  O4	 O3  O2	 O1  O0					 |
								    -----
								    -----
	 I15 I14 I13 I12 I11 I10 I09 I08 I07 I06 I05 I04 I03 I02 I01 I00 | TERM2
	 O7  O6	 O5  O4	 O3  O2	 O1  O0					 |
								     ----

	 Where I15 is input 15 on the FPLA ,I14 is input 14 on the PLA etc.
	 further O7 is output 7 on the FPLA and O6 is output 6 on the PLA.

      3. "-" indicates a "DON'T CARE ON THAT INPUT" AND * indicates a "DON'T
	 CARE ON THIS OUTPUT".

      The following is the formatted FPLA map for the worksheet	 shown	above.
      Notice  that  bus address bit 00 is translated to FPLA bit I14, that bus
      address 01 is translated to FPLA bit I00, that is, the bus address  bits
      are  not	directly  translated  to  the FPLA bits, however the worksheet
      activity (output) bits F7 - F0 translate directly to FPLA bits A7 - A0.

      START
      LH--HHH---HHH--L
      A*******
      LHHHHHH---HHLHHL
      *****A**
      LHHHHHH---HHLHLL
      **A*****
      LHLHHHH---HHLH-L
      *****A**
      LH-HHHH---HHLL-L
      *****A**
      LH-LHHH---HHL--L
      *****A**
      LH--LHH---HH---L
      *****A**
      LH--HHH---HLH--L
      *****A**
      LHHHHHH---HLLH-L
      *****A**
									Page 4


      LHLHHHH---HLLHHL
      *****A**
      LHLHHHH---HLLHLL
      *****A**
      LH-HHHH---HLLLHL
      *****A**
      LHLHHHH---HLLLLL
      ******A*
      LH-LHHH---HLL--L
      *****A**
      LH-HLHH---HLH--L
      *****A**
      LH-LLHH---HLHH-L
      *****A**
      LHHLLHH---HLHL-L
      *****A**
      LHLLLHH---HLHLHL
      *****A**
      LHLLLHH---HLHLLL
      ***A****
      LH--LHH---HLL--L
      *****A**
      LH---LH---H----L
      *****A**
      LH----H---L----L
      *****A**
      LH----L--------L
      *****A**
      LL-----HHL-----L
      *****A**
      LL-----LH------L
      *****A**
      LL------L------L
      *****A**



      Translation: The following is a translation of FPLA terms and FPLA
		   activity outputs, and the actual pin name on the FPAL chip.

      I15....D15 (02 on worksheet above) used for high order bit of map decode.
      I14....LBS7 (00 on worksheet above) asserted for all I/O page addresses.
      I13....AD04
      I12....AD06
      I11....AD08
      I10....AD10
      I09....AD12
      I08....AD14
      I07....AD15
      I06....AD13
      I05....AD11
      I04....AD09
      I03....AD07
      I02....AD05
      I01....AD03
									Page 5


      I00....DO (01 on worksheet above) used for the low order bit of map decode.

      A7.....F7 on worksheet above, used for local RAM enable.
      A6.....F6 on worksheet above, used for socket A enable.
      A5.....F5 on worksheet above, used for DL0 enable.
      A4.....F4 on worksheet above, used for PIO enable.
      A3.....F3 on worksheet above, not used.
      A2.....F2 on worksheet above, used for all Q-bus enables.
      A1.....F1 on worksheet above, used for DL1 enable.
      A0.....F0 on worksheet above, used for socket B enable.

      The output file shown below is an example of one that would be  loadable
      into a PROM Programmer in order to blast the FPLA chip.  An example of a
      program that will produce the formatted output file shown below  can  be
      found at the end of this micronote.

      START
      $A0000,  ( ADDRESS )
      FF       ( FIRST 8 BITS )
      $A100,   ( ADDRESS )
      FF
      00
      FD
      FB
      F1
      EF
      7E
      C1
      80
      7F
      00
      FF
      FF
      FF
      FF
      FF
      FF
      FF
      .
      .	       ( OTHER TERMS IN HEX BYTES )
      .
      .
      $A200    ( NEXT ADDRESS BOUNDARY )
      .
      .	       ( TERMS )
      .
      $A300    ( ADDRESS )
      .
      .	       ( TERMS )
      .
      $A400    ( ADRESSS )
      .
      .	       ( TERMS )
      .
      ETC.
									Page 6


      Once the FPLA is built, it is placed into socket XE41, the  memory  will
      be  configured  to  whatever  the FPLA terms look like.  The Falcon Plus
      needs to be strapped for a start address, a memory map  (1  of  4)  that
      matches  the  one	 called	 out  in the FPLA, and other user configurable
      options.

      FPLA FORMAT PROGRAM **********
      ==============================

      1 REM THIS PROGRAM IS FOR NORMAL PLA MAP INPUTS
      2 PRINT "INPUT DEVICE AND FILE NAME";H1$
      4 INPUT H1$
      5 OPEN H1$ FOR INPUT AS FILE #1
      7 PRINT "DO YOU WISH OUTPUT COMPARE FILE ON LINE PRINTER,DEVICE,BOTH OR NONE ? "
      8 PRINT "DEFAULT IS NONE (LP,DEV,B,N) ";N1$
      10 INPUT N1$
      12 IF N1$="LP" THEN  GO TO 30
      16 IF N1$="DEV" THEN  GO TO 36
      20 IF N1$="B" THEN  GO TO 42
      22 LET N$="N"
      23 LET K1$="N"
      24 GO TO 50
      30 OPEN "LP:" FOR OUTPUT AS FILE #2
      33 LET N$="Y"
      34 LET K1$="N"
      35 GO TO 50
      36 PRINT "WHAT IS DEVICE AND FILE NAME";U1$ \ INPUT U1$
      37 OPEN U1$ FOR OUTPUT AS FILE #3
      38 LET N$="N"
      39 LET K1$="Y"
      40 GO TO 50
      42 OPEN "LP:" FOR OUTPUT AS FILE #2
      45 LET N$="Y"
      46 PRINT "WHAT IS DEVICE AND FILE NAME";U1$ \ INPUT U1$
      47 OPEN U1$ FOR OUTPUT AS FILE #3
      48 LET K1$="Y"
      50 PRINT "WHAT DEVICE AND FILE NAME FOR OUTPUT PROM PROGRAMMER FILE";W$
      52 INPUT W$
      55 OPEN W$ FOR OUTPUT AS FILE #4
      60 LET Y1=1
      62 LET H1$=CHR$(2)
      64 LET H2$=CHR$(3)
      66 LET Z$=CHR$(10)+CHR$(13)
      68 LET L1$=" "
      70 INPUT #1,A$
      71 IF N$="N" THEN	 GO TO 73
      72 PRINT #2,A$
      73 IF K1$="N" THEN  GO TO 76
      74 PRINT #3,A$
      75 PRINT #4,A$
      76 IF A$="START" THEN  GO TO 80
      78 GO TO 70
      80 LET S1$="$A0000,"
      82 PRINT #4,H1$;S1$
      84 PRINT #4,"FF "
									Page 7


      86 LET S1$="$A100,"
      88 PRINT #4,S1$
      90 GO TO 92
      91 PRINT #4,S1$
      93 INPUT #1,I1$
      92 IF I1$="END" THEN  GO TO 120
      94 INPUT #1,O1$
      95 INPUT #1,I2$
      96 IF I2$="END" THEN  GO TO 130
      97 INPUT #1,O2$
      98 INPUT #1,I3$
      99  IF I3$="END" THEN  GO TO 140
      100 INPUT #1,O3$
      101 INPUT #1,I4$
      102 IF I4$="END" THEN  GO TO 150
      103 INPUT #1,O4$
      104 INPUT #1,I5$
      105 IF I5$="END" THEN  GO TO 160
      106 INPUT #1,O5$
      107 INPUT #1,I6$
      108 IF I6$="END" THEN  GO TO 170
      109 INPUT #1,O6$
      110 INPUT #1,I7$
      111 IF I7$="END" THEN  GO TO 180
      112 INPUT #1,O7$
      113 INPUT #1,I8$
      114 IF I8$="END" THEN  GO TO 190
      115 INPUT #1,O8$
      117 GO TO 200
      120 LET I1$="0000000000000000" \ LET O1$="AAAAAAAA"
      121 LET I2$="0000000000000000" \ LET O2$="AAAAAAAA"
      122 LET I3$="0000000000000000" \ LET O3$="AAAAAAAA"
      123 LET I4$="0000000000000000" \ LET O4$="AAAAAAAA"
      124 LET I5$="0000000000000000" \ LET O5$="AAAAAAAA"
      125 LET I6$="0000000000000000" \ LET O6$="AAAAAAAA"
      126 LET I7$="0000000000000000" \ LET O7$="AAAAAAAA"
      127 LET I8$="0000000000000000" \ LET O8$="AAAAAAAA"
      128 LET E1=1
      129 GO TO 200
      130 LET I2$="0000000000000000" \ LET O2$="AAAAAAAA"
      132 LET I3$="0000000000000000" \ LET O3$="AAAAAAAA"
      133 LET I4$="0000000000000000" \ LET O4$="AAAAAAAA"
      134 LET I5$="0000000000000000" \ LET O5$="AAAAAAAA"
      135 LET I6$="0000000000000000" \ LET O6$="AAAAAAAA"
      136 LET I7$="0000000000000000" \ LET O7$="AAAAAAAA"
      137 LET I8$="0000000000000000" \ LET O8$="AAAAAAAA"
      138 LET E1=1
      139 GO TO 200
      140 LET I3$="0000000000000000" \ LET O3$="AAAAAAAA"
      143 LET I4$="0000000000000000" \ LET O4$="AAAAAAAA"
      144 LET I5$="0000000000000000" \ LET O5$="AAAAAAAA"
      145 LET I6$="0000000000000000" \ LET O6$="AAAAAAAA"
      146 LET I7$="0000000000000000" \ LET O7$="AAAAAAAA"
      147 LET I8$="0000000000000000" \ LET O8$="AAAAAAAA"
      148 LET E1=1
									Page 8


      149 GO TO 200
      150 LET I4$="0000000000000000" \ LET O4$="AAAAAAAA"
      154 LET I5$="0000000000000000" \ LET O5$="AAAAAAAA"
      155 LET I6$="0000000000000000" \ LET O6$="AAAAAAAA"
      156 LET I7$="0000000000000000" \ LET O7$="AAAAAAAA"
      157 LET I8$="0000000000000000" \ LET O8$="AAAAAAAA"
      158 LET E1=1
      159 GO TO 200
      160 LET I5$="0000000000000000" \ LET O5$="AAAAAAAA"
      165 LET I6$="0000000000000000" \ LET O6$="AAAAAAAA"
      166 LET I7$="0000000000000000" \ LET O7$="AAAAAAAA"
      167 LET I8$="0000000000000000" \ LET O8$="AAAAAAAA"
      168 LET E1=1
      169 GO TO 200
      170 LET I6$="0000000000000000" \ LET O6$="AAAAAAAA"
      176 LET I7$="0000000000000000" \ LET O7$="AAAAAAAA"
      177 LET I8$="0000000000000000" \ LET O8$="AAAAAAAA"
      178 LET E1=1
      179 GO TO 200
      180 LET I7$="0000000000000000" \ LET O7$="AAAAAAAA"
      187 LET I8$="0000000000000000" \ LET O8$="AAAAAAAA"
      188 LET E1=1
      189 GO TO 200
      190 LET I8$="0000000000000000" \ LET O8$="AAAAAAAA"
      198 LET E1=1
      200 PRINT I1$,O1$,Z$,I2$,O2$,Z$,I3$,O3$,Z$,I4$,O4$
      210 PRINT I5$,O5$,Z$,I6$,O6$,Z$,I7$,O7$,Z$,I8$,O8$
      215 IF N$="N" THEN  GO TO 218
      216 PRINT #2,I1$,O1$,Z$,I2$,O2$,Z$,I3$,O3$,Z$,I4$,O4$
      217 PRINT #2,I5$,O5$,Z$,I6$,O6$,Z$,I7$,O7$,Z$,I8$,O8$
      218 IF K1$="N" THEN  GO TO 221
      219 PRINT #3,I1$,O1$,Z$,I2$,O2$,Z$,I3$,O3$,Z$,I4$,O4$
      220 PRINT #3,I5$,O5$,Z$,I6$,O6$,Z$,I7$,O7$,Z$,I8$,O8$
      221 LET X=16
      235 LET D1$=SEG$(I1$,X,X)
      240 IF D1$="H" GO TO 260
      245 IF D1$="L" GO TO 270
      250 IF D1$="-" GO TO 280
      252 IF D1$="0" GO TO 256
      255 GO TO 1340
      256 LET A(1,0)=1 \ LET A(1,1)=1
      257 GO TO 285
      260 LET A(1,0)=1 \ LET A(1,1)=0
      265 GO TO 285
      270 LET A(1,0)=0 \ LET A(1,1)=1
      275 GO TO 285
      280 LET A(1,0)=0 \ LET A(1,1)=0
      285 LET D2$=SEG$(I2$,X,X)
      290 IF D2$="H" GO TO 315
      300 IF D2$="L" GO TO 325
      305 IF D2$="-" GO TO 335
      306 IF D2$="0" GO TO 309
      307 GO TO 1340
      309 LET A(1,2)=1 \ LET A(1,3)=1
      310 GO TO 340
									Page 9


      315 LET A(1,2)=1 \ LET A(1,3)=0
      320 GO TO 340
      325 LET A(1,2)=0 \ LET A(1,3)=1
      330 GO TO 340
      335 LET A(1,2)=0 \ LET A(1,3)=0
      340 LET D3$=SEG$(I3$,X,X)
      345 IF D3$="H" GO TO 365
      350 IF D3$="L" GO TO 375
      355 IF D3$="-" GO TO 385
      357 IF D3$="0" GO TO 359
      358 GO TO 1340
      359 LET A(1,4)=1 \ LET A(1,5)=1
      360 GO TO 390
      365 LET A(1,4)=1 \ LET A(1,5)=0
      370 GO TO 390
      375 LET A(1,4)=0 \ LET A(1,5)=1
      380 GO TO 390
      385 LET A(1,4)=0 \ LET A(1,5)=0
      390 LET D4$=SEG$(I4$,X,X)
      400 IF D4$="H" GO TO 420
      405 IF D4$="L" GO TO 430
      410 IF D4$="-" GO TO 440
      412 IF D4$="0" GO TO 414
      413 GO TO 1340
      414 LET A(1,6)=1 \ LET A(1,7)=1
      415 GO TO 445
      420 LET A(1,6)=1 \ LET A(1,7)=0
      425 GO TO 445
      430 LET A(1,6)=0 \ LET A(1,7)=1
      435 GO TO 445
      440 LET A(1,6)=0 \ LET A(1,7)=0
      445 LET A8=A(1,0)*1+A(1,2)*2+A(1,4)*4+A(1,6)*8
      450 LET A9=A(1,1)*1+A(1,3)*2+A(1,5)*4+A(1,7)*8
      455 LET A8=15-A8 \ LET A9=15-A9
      460 LET D5$=SEG$(I5$,X,X)
      465 IF D5$="H" GO TO 485
      470 IF D5$="L" GO TO 495
      475 IF D5$="-" GO TO 505
      476 IF D5$="0" GO TO 479
      477 GO TO 1340
      479 LET B(1,0)=1 \ LET B(1,1)=1
      480 GO TO 510
      485 LET B(1,0)=1 \ LET B(1,1)=0
      490 GO TO 510
      495 LET B(1,0)=0 \ LET B(1,1)=1
      500 GO TO 510
      505 LET B(1,0)=0 \ LET B(1,1)=0
      510 LET D6$=SEG$(I6$,X,X)
      515 IF D6$="H" GO TO 535
      520 IF D6$="L" GO TO 545
      525 IF D6$="-" GO TO 555
      526 IF D6$="0" GO TO 529
      527 GO TO 1340
      529 LET B(1,2)=1 \ LET B(1,3)=1
      530 GO TO 560
								       Page 10


      535 LET B(1,2)=1 \ LET B(1,3)=0
      540 GO TO 560
      545 LET B(1,2)=0 \ LET B(1,3)=1
      550 GO TO 560
      555 LET B(1,2)=0 \ LET B(1,3)=0
      560 LET D7$=SEG$(I7$,X,X)
      565 IF D7$="H" GO TO 585
      570 IF D7$="L" GO TO 595
      575 IF D7$="-" GO TO 605
      576 IF D7$="0" GO TO 579
      577 GO TO 1340
      579 LET B(1,4)=1 \ LET B(1,5)=1
      580 GO TO 610
      585 LET B(1,4)=1 \ LET B(1,5)=0
      590 GO TO 610
      595 LET B(1,4)=0 \ LET B(1,5)=1
      600 GO TO 610
      605 LET B(1,4)=0 \ LET B(1,5)=0
      610 LET D8$=SEG$(I8$,X,X)
      615 IF D8$="H" GO TO 635
      620 IF D8$="L" GO TO 645
      625 IF D8$="-" GO TO 655
      626 IF D8$="0" GO TO 629
      627 GO TO 1340
      629 LET B(1,6)=1 \ LET B(1,7)=1
      630 GO TO 660
      635 LET B(1,6)=1 \ LET B(1,7)=0
      640 GO TO 660
      645 LET B(1,6)=0 \ LET B(1,7)=1
      650 GO TO 660
      655 LET B(1,6)=0 \ LET B(1,7)=0
      660 LET B8=B(1,0)*1+B(1,2)*2+B(1,4)*4+B(1,6)*8
      665 LET B9=B(1,1)*1+B(1,3)*2+B(1,5)*4+B(1,7)*8
      670 LET B8=15-B8 \ LET B9=15-B9
      675 IF B8<10 THEN LET P1=0
      680 IF B8<10 THEN	 GO TO 720
      685 IF B8=10 THEN LET B8$="A"
      690 IF B8=11 THEN LET B8$="B"
      695 IF B8=12 THEN LET B8$="C"
      700 IF B8=13 THEN LET B8$="D"
      705 IF B8=14 THEN LET B8$="E"
      710 IF B8=15 THEN LET B8$="F"
      715 LET P1=1
      720 IF A8<10 THEN LET P0=0
      725 IF A8<10 THEN	 GO TO 765
      730 IF A8=10 THEN LET A8$="A"
      735 IF A8=11 THEN LET A8$="B"
      740 IF A8=12 THEN LET A8$="C"
      745 IF A8=13 THEN LET A8$="D"
      750 IF A8=14 THEN LET A8$="E"
      755 IF A8=15 THEN LET A8$="F"
      760 LET P0=1
      765 IF P1=0 THEN	GO TO 780
      770 IF P0=0 THEN	GO TO 805
      775 GO TO 795
								       Page 11


      780 IF P0=1 THEN	GO TO 815
      785 PRINT #4,STR$(B8);STR$(A8);L1$
      790 GO TO 820
      795 PRINT #4,B8$;A8$;L1$
      800 GO TO 820
      805 PRINT #4,B8$;STR$(A8);L1$
      810 GO TO 820
      815 PRINT #4,STR$(B8);A8$;L1$
      820 IF B9<10 THEN LET P3=0
      825 IF B9<10 THEN	 GO TO 865
      830 IF B9=10 THEN LET B9$="A"
      835 IF B9=11 THEN LET B9$="B"
      840 IF B9=12 THEN LET B9$="C"
      845 IF B9=13 THEN LET B9$="D"
      850 IF B9=14 THEN LET B9$="E"
      855 IF B9=15 THEN LET B9$="F"
      860 LET P3=1
      865 IF A9<10 THEN LET P2=0
      870 IF A9<10 THEN	 GO TO 910
      875 IF A9=10 THEN LET A9$="A"
      880 IF A9=11 THEN LET A9$="B"
      885 IF A9=12 THEN LET A9$="C"
      890 IF A9=13 THEN LET A9$="D"
      895 IF A9=14 THEN LET A9$="E"
      900 IF A9=15 THEN LET A9$="F"
      905 LET P2=1
      910 IF P3=0 THEN	GO TO 925
      915 IF P2=0 THEN	GO TO 945
      920 GO TO 937
      925 IF P2=1 THEN	GO TO 955
      930 PRINT #4,STR$(B9);STR$(A9);L1$
      935 GO TO 960
      937 PRINT #4,B9$;A9$;L1$
      940 GO TO 960
      945 PRINT #4,B9$;STR$(A9);L1$
      950 GO TO 960
      955 PRINT #4,STR$(B9);A9$;L1$
      960 LET X=X-1
      965 IF X>0 THEN  GO TO 235
      970 LET Y=8
      975 LET C1$=SEG$(O1$,Y,Y)
      980 IF C1$="A" THEN LET A1=1
      985 IF C1$="*" THEN LET A1=0
      990 LET C2$=SEG$(O2$,Y,Y)
      995 IF C2$="A" THEN LET A2=1
      1000 IF C2$="*" THEN LET A2=0
      1005 LET C3$=SEG$(O3$,Y,Y)
      1010 IF C3$="A" THEN LET A3=1
      1015 IF C3$="*" THEN LET A3=0
      1020 LET C4$=SEG$(O4$,Y,Y)
      1025 IF C4$="A" THEN LET A4=1
      1030 IF C4$="*" THEN LET A4=0
      1035 LET C5$=SEG$(O5$,Y,Y)
      1040 IF C5$="A" THEN LET A5=1
      1045 IF C5$="*" THEN LET A5=0
								       Page 12

      1050 LET C6$=SEG$(O6$,Y,Y)
      1055 IF C6$="A" THEN LET A6=1
      1060 IF C6$="*" THEN LET A6=0
      1065 LET C7$=SEG$(O7$,Y,Y)
      1070 IF C7$="A" THEN LET A7=1
      1075 IF C7$="*" THEN LET A7=0
      1080 LET C8$=SEG$(O8$,Y,Y)
      1085 IF C8$="A" THEN LET F8=1
      1090 IF C8$="*" THEN LET F8=0
      1095 LET O9=(A1*1)+(A2*2)+(A3*4)+(A4*8)
      1100 LET P9=(A5*1)+(A6*2)+(A7*4)+(F8*8)
      1105 LET O9=15-O9 \ LET P9=15-P9
      1110 IF P9<10 THEN LET T1=0
      1115 IF P9<10 THEN  GO TO 1155
      1120 IF P9=10 THEN LET P9$="A"
      1125 IF P9=11 THEN LET P9$="B"
      1130 IF P9=12 THEN LET P9$="C"
      1135 IF P9=13 THEN LET P9$="D"
      1140 IF P9=14 THEN LET P9$="E"
      1145 IF P9=15 THEN LET P9$="F"
      1150 LET T1=1
      1155 IF O9<10 THEN LET T0=0
      1160 IF O9<10 THEN  GO TO 1200
      1165 IF O9=10 THEN LET O9$="A"
      1170 IF O9=11 THEN LET O9$="B"
      1175 IF O9=12 THEN LET O9$="C"
      1180 IF O9=13 THEN LET O9$="D"
      1185 IF O9=14 THEN LET O9$="E"
      1190 IF O9=15 THEN LET O9$="F"
      1195 LET T0=1
      1200 IF T1=0 THEN	 GO TO 1215
      1205 IF T0=0 THEN	 GO TO 1240
      1210 GO TO 1230
      1215 IF T0=1 THEN	 GO TO 1255
      1220 PRINT #4,STR$(P9);STR$(O9);L1$
      1225 GO TO 1260
      1230 PRINT #4,P9$;O9$;L1$
      1235 GO TO 1260
      1240 PRINT #4,P9$;STR$(O9);L1$
      1250 GO TO 1260
      1255 PRINT #4,STR$(P9);O9$;L1$
      1260 LET Y=Y-1
      1265 IF Y>0 THEN	GO TO 975
      1270 PRINT #4,Z$
      1275 LET Y1=Y1+1
      1280 IF Y1=2 THEN LET S1$="$A200,"
      1285 IF Y1=3 THEN LET S1$="$A300,"
      1290 IF Y1=4 THEN LET S1$="$A400,"
      1295 IF Y1=5 THEN LET S1$="$A500,"
      1300 IF Y1=6 THEN LET S1$="$A600,"
      1305 PRINT #4,Z$
      1310 IF Y1=7 THEN	 GO TO 1320
      1315 IF E1=0 THEN	 GO TO 91
      1320 PRINT #4,H2$
      1330 CLOSE
      1335 GO TO 1345
      1340 PRINT "INPUT LINE IN ERROR"
      1345 END

