The Code

              
                *6811*
0000   	ORG	$0000	*MIKE ELLIS, 412 ELMWOOD ST. VICKSBURG,MS 39180 *
0000    START  	  RMB	1	*START MEANS KEY WAS PRESSED*
0001    END	  RMB	1	*END MEANS ENTER WAS PRESSED*
0002    SFQ0	  RMB	1	*SFQ0 THROUGH SFQ6 ARE THE *
0003    SFQ1	  RMB	1	*FREQUENCY FOR THE SYNTHESIZER*
0004    SFQ2	  RMB	1	*AS ENTERED ON THE KEYPAD*
0005    SFQ3	  RMB	1
0006    SFQ4	  RMB	1
0007    SFQ5	  RMB	1
0008    SFQ6	  RMB	1
0009    MESSH	  RMB	1	*HIGH BYTE FOR DIGITALKER*
000A    MESSL	  RMB	1	*LOW BYTE FOR DIGITALKER*
000B    SYNH	  RMB	1	*HIGH BYTE FOR SYNTHESIZER*
000C    SYNL	  RMB	1	*LOW BYTE FOR SYNTHESIZER*
000D    DATA	  RMB	1	*LEVEL 2 DATA ENTRY*
000E    RESULT	  RMB	1	*RESULT OF ADAPTIVE CALIBRATION*
000F    OLDRES	  RMB	1	*PREVIOUS RESULT OF ADP CAL*
0010    DIGITS65    RMB 1       *DIGITS 6 AND 5 OF FREQ COUNTER*
0011    DIGITS43    RMB 1       *DIGITS 4 AND 3 OF FREQ COUNTER*
0012    DIGITS21    RMB 1       *DIGITS 2 AND 1 OF FREQ COUNTER*
0013    TEMPDIG65   RMB 1       *WORKING BUFFER FOR DIGITS 6 AND 5*
0014    TEMPDIG43   RMB 1       *WORKING BUFFER FOR DIGITS 4 AND 3*
0015    TEMPDIG21   RMB 1       *WORKING BUFFER FOR DIGITS 2 AND 1*
0016    FINALPAC    RMB 1       *FINAL PULSE ACCUMULATOR VALUE*
0017    TEMP        RMB 1       *GENERAL TEMPORARY WORKING REGISTER*
0018    HALFTOG     RMB 1       *HALF TOGGLE FOR 0.5 SECOND COUNTER*
0019    FLAG1       RMB 1       *FLAG FOR SPEAKING FREQUENCY COUNTER*	
001A    FLAG2	  RMB 1       *FLAG FOR FREQUENCY COUNTER PRESCALAR*
                        
C000      		ORG	$C000 	 *ORIGIN*
C000 86 55       		LDAA	#$55	*RESET COP*
C002 B7 10 3A          	STAA	$103A   *BY WRITING AA*
C005 86 AA             	LDAA	#$AA	*AND THEN 55*
C007 B7 10 3A          	STAA	$103A
C00A 86 03             	LDAA	#$03
C00C B7 10 24          	STAA    $1024   *DIVIDE E CLOCK BY 16*
                        
C00F 86 7E             	LDAA    #$7E    *DEFINE OUTPUT COMPARE 5 INTERRUPT*
C011 97 D3             	STAA    $D3     *SERVICE ROUTINE*
C013 86 DF             	LDAA    #$DF    *AT DF00*
C015 97 D4             	STAA    $D4
C017 86 00             	LDAA    #$00   
C019 97 D5             	STAA    $D5
                        	
C01B 86 7E             	LDAA    #$7E    *DEFINE PULSE ACCUMULATOR OVERFLOW*
C01D 97 CD             	STAA    $CD     *INTERRUPT SERVICE ROUTINE AT*
C01F 86 DE             	LDAA    #$DE    *LOCATION DE00*
C021 97 CE             	STAA    $CE
C023 86 00             	LDAA    #$00
C025 97 CF             	STAA    $CF
                        
                        
C027 86 7E       BEGIN:	LDAA	#$7E	*STORE JMP*
C029 97 EE             	STAA	$EE	*TO B620 AT*
C02B 86 B6             	LDAA	#$B6	*ADDRESS $EE*
C02D 97 EF             	STAA	$EF	*FOR KEYPAD*
C02F 86 20             	LDAA	#$20	*INTERRUPT*
C031 97 F0             	STAA	$F0
                        
C033 86 7E             	LDAA	#$7E
C035 97 FA             	STAA	$FA	*STORE JMP*
C037 86 C0             	LDAA	#$C0	*TO COOO AT*
C039 97 FB             	STAA	$FB	*ADDRESS $FA*
C03B 86 00             	LDAA	#$00	*FOR COP INTR*
C03D 97 FC             	STAA	$FC
                        	
C03F 86 00             	LDAA	#$00	*INIT START AND END*
C041 97 00             	STAA	START	*CLEAR START*
C043 97 01             	STAA 	END	*CLEAR END*
C045 97 0D             	STAA	DATA	*CLEAR DATA*
                        
C047 8E 00 40          	LDS	#$0040   *STACK*
C04A 18 CE 10 00       	LDY     #$1000	 *POINTER TO REGS*
C04E 18 1D 16 FF       	BCLR	22,Y $FF *DISABLE OC &IC INTR* 
C052 86 93             	LDAA    #$93
C054 B7 10 39          	STAA    $1039    *ENABLE A/D CONVERTOR*
                        
C057 86 5C              LDAA    #$5C	*INITIALIZE SPI*
C059 B7 10 28          	STAA    $1028   
C05C 18 1C 09 18       	BSET    9,Y $18 *DATA DIRECTION PORT D OUTPUT*
C060 18 1D 09 21       	BCLR    9,Y $21 *DATA DIRECTION PORT D INPUT*
C064 18 1D 07 0F       	BCLR    7,Y $0F	*C0,C1,C2,C3=INPUT*
C068 18 1C 07 F0       	BSET	7,Y $F0 *C4,C5,C6,C7=OUTPUT*
C06C 18 1C 04 0D       	BSET	4,Y $0D *SPI ADDRESS BUS*
C070 86 01             	LDAA	#$01   	*TIMER CONTROL REGISTER *
C072 B7 10 21          	STAA	$1021
C075 86 01             	LDAA    #$01	*TIMER FLAG REGISTER*
C077 B7 10 23          	STAA	$1023
C07A 18 1D 02 10       	BCLR	2,Y $10 *ON FALLING EDGE*
                        
                        
C07E 18 1C 04 03       	BSET	4,Y $03	*INITIALIZE SYNTH*
C082 18 1D 04 0C       	BCLR	4,Y $0C *WITH STORED FREQ*
C086 B6 B6 10          	LDAA	$B610	*HIGH BYTES*
C089 97 0B             	STAA	SYNH
C08B B6 B6 11          	LDAA	$B611	*LOW BYTE AND *
C08E 97 0C             	STAA	SYNL	*EXPONENT*
C090 BD C3 D4          	JSR	SEND1	*TO SYNTHESIZER*
                        
C093 B6 B6 12          	LDAA	$B612
C096 81 00             	CMPA	#$00	*5 OR 12 VOLTS*
C098 27 06             	BEQ	CLR5
C09A 18 1C 04 10       	BSET    4,Y $10 *SET B4 IF 12 VOLTS*
C09E 20 04            	BRA	RY
C0A0 18 1D 04 10  CLR5:	BCLR	4,Y $10	*CLEAR B4 IF 5 VOLTS*
                        
C0A4 B6 B6 13      RY:	LDAA	$B613 *GET RELAY CONFIGURAION*
C0A7 81 00             	CMPA	#$00  *FROM  EEPROM FOR *
C0A9 27 06            	BEQ	K1NOT *INITIALIZATION*
C0AB 18 1C 04 20       	BSET	4,Y $20	*SET RELAY K1*
C0AF 20 04             	BRA	K1	*B613=FF MEANS K1 CLOSED*
C0B1 18 1D 04 20 K1NOT:	BCLR	4,Y $20 *CLEAR RELAY K1*
C0B5 B6 B6 14       K1:	LDAA	$B614	                          
C0B8 81 00             	CMPA 	#$00	*CLOSED = ENERGIZED*
C0BA 27 06             	BEQ	K2NOT
C0BC 18 1C 04 40       	BSET	4,Y $40 *SET RELAY K2*
C0C0 20 04             	BRA	K2	*B614=FF, K2 CLOSED *               
C0C2 18 1D 04 4  K2NOT:	BCLR	4,Y $40 *CLEAR RELAY K2*
C0C6 B6 B6 15       K2:	LDAA	$B615
C0C9 81 00             	CMPA	#$00
C0CB 27 06             	BEQ	K3NOT
C0CD 18 1C 04 80       	BSET	4,Y $80 *SET RELAY K3*
C0D1 20 04             	BRA	K3	*B615=FF MEANS K3 CLOSED*
C0D3 18 1D 04 8  K3NOT:	BCLR 	4,Y $80	*CLEAR RELAY K3*
C0D7 B6 B6 16       K3:	LDAA	$B616
C0DA 81 00             	CMPA	#$00
C0DC 27 06             	BEQ	K4NOT
C0DE 18 1C 03 10       	BSET	3,Y $10	*SET RELAY K4*
C0E2 20 04             	BRA	K4	*B616=FF MEANS K4 CLOSED*
C0E4 18 1D 03 10 K4NOT:	BCLR	3,Y $10 *CLEAR RELAY K4*
C0E8 B6 B6 17       K4:	LDAA	$B617	
C0EB 81 00             	CMPA	#$00
C0ED 27 06             	BEQ	K5NOT
C0EF 18 1C 03 20       	BSET	3,Y $20 *SET RELAY K5*
C0F3 20 04             	BRA	K5	*B617=FF MEANS K5 CLOSED*
C0F5 18 1D 03 20 K5NOT:	BCLR	3,Y $20 *CLEAR RELAY K5*
C0F9 B6 B6 18       K5:	LDAA	$B618
C0FC 81 00             	CMPA	#$00
C0FE 27 06             	BEQ	K6NOT
C100 18 1C 03 40       	BSET	3,Y $40 *SET RELAY K6*
C104 20 04             	BRA	RY1	*B618=FF MEANS K6 CLOSED*
C106 18 1D 03 40 K6NOT:	BCLR	3,Y $40	*CLEAR RELAY K6*
                        
                        
C10A BD C6 CE   RY1:   	JSR	PAUSE	*CLEAR DIGITALKER WITH*
C10D BD C6 D7          	JSR	SPEAK1	*20MSEC SILENCE*
C110 BD C4 ED          	JSR	WAIT1	*DELAY ONE SECOND*
                        	
                        	
C113 B6 B6 06          	LDAA    $B606 	*SPEAK READY*
C116 97 09             	STAA	MESSH   *HIGH BYTE IN MESSH*
C118 B6 B6 07          	LDAA    $B607 	*LOW BYTE IN MESSL*
C11B 97 0A              STAA    MESSL
C11D BD C6 D7          	JSR     SPEAK1	*GO TO SPEACH ROUTINE*




                        			
                        
C120 0E          TART: CLI		*MAIN LOOP IN PROGRAM*
C121 86 55             LDAA    #$55
C123 B7 10 3A          STAA    $103A	*RESET COP*
C126 86 AA             LDAA    #$AA
C128 B7 10 3A          STAA    $103A	*2 STEP PROCEDURE*
C12B 96 01             LDAA    END	*IS END FLAG SET?*
C12D 81 FF             CMPA    #$FF
C12F 27 1C             BEQ     LQ	*IF SO, LOOK AT ENTERED FREQ*
C131 81 FD             CMPA    #$FD	*CALIBRATE DONE  ?*
C133 27 15             BEQ     BEG     *RESTART  *
C135 96 19             LDAA    FLAG1   *CHECK FOR FREQ COUNTER FINISHED*
C137 81 01             CMPA    #$01    *MEASURE FREQUENCY?*   
C139 27 18             BEQ     SAY
C13B 81 02             CMPA    #$02    *MEASURE CAPACITANCE?*
C13D 27 11             BEQ     MEAS
C13F 81 03             CMPA    #$03    *MEASURE INDUCTANCE?*
C141 27 0D             BEQ     MEAS
C143 18 1C 02 40       BSET    2,Y $40 *ENABLE KEY INTR*
C147 20 D7             BRA     TART	*REPEAT MAIN LOOP*
C149 CF                STOP		*PROGRAM NEVER GETS HERE*
C14A 7E C0 27     BEG: JMP     BEGIN
C14D 7E C2 81      LQ: JMP     LOOKQ
C150 7E C7 14    MEAS: JMP     MEASU
                        
C153 18 1D 04 40  SAY: BCLR    4,Y $40   *DISABLE KEY INTERRUPT*
C157 18 1C 04 04       BSET    4,Y $04   *ADDRESS FREQUENCY COUNTER BOARD*
C15B 18 1D 04 0B       BCLR    4,Y $0B   *NOT ANYTHING ELSE*
C15F B6 10 29          LDAA    $1029
C162 86 80             LDAA    #$80      *HIGH BIT SAYS TURN ON PRESCALAR*
C164 B7 10 2A          STAA    $102A     *SEND IT TO SHIFT REGISTERS*
C167 B6 10 29      XC: LDAA    $1029
C16A 84 80             ANDA    #$80      *IS IT SENT?*
C16C 27 F9             BEQ     XC
C16E 18 1C 04 0D       BSET    4,Y $0D   *ADDRESS DIGITALKER*
C172 18 1D 04 02       BCLR    4,Y $02   *NOT FREQUENCY COUNTER*
C176 86 40             LDAA    #$40      *ENABLE PULSE ACCUMULATOR SYSTEM*
C178 B7 10 26          STAA    $1026
C17B 86 FF             LDAA    #$FF      *INITIALIZE FLAG2 TO INDICATE THAT*
C17D 97 1A             STAA    FLAG2     *THE PRESCALAR IS TURNED OFF*
C17F 86 20             LDAA    #$20      *CLEAR PULSE ACCUMULATOR*
C181 B7 10 25          STAA    $1025     *INTERRUPT FLAG*
C184 86 CE             LDAA	#$CE      *LOAD PULSE ACCUMULATOR*
C186 B7 10 27          STAA    $1027     *WITH 206 DECIMAL*
C189 86 01             LDAA    #$01
C18B BD C4 EF          JSR	WSEC2     *0.05 SECOND DELAY*
C18E B6 10 25          LDAA	$1025     *CHECK PULSE ACCUMULATOR *
C191 84 20             ANDA    #$20      *LOOK AT INTERRUPT FLAG ONLY*
C193 81 20             CMPA    #$20      *INTERRUPT FLAG (FOR 100 COUNTS)*
C195 26 06             BNE     FLAG_2
C197 86 00             LDAA    #$00
C199 97 1A             STAA    FLAG2     *MEANS PRESCALAR WILL BE 100*
C19B 20 1F             BRA     SFLAG2
C19D 18 1C 04 04FLAG_2:BSET    4,Y $04   *ADDRESS FREQUENCY COUNTER BOARD*
C1A1 18 1D 04 0B       BCLR    4,Y $0B   *NOT ANYTHING ELSE*
C1A5 B6 10 29          LDAA    $1029
C1A8 86 00             LDAA    #$00      *HIGH BIT SAYS TURN OFF PRESCALAR*
C1AA B7 10 2A          STAA    $102A     *SEND IT TO SHIFT REGISTERS*
C1AD B6 10 29     XC1: LDAA    $1029
C1B0 84 80             ANDA    #$80      *IS IT SENT?*
C1B2 27 F9             BEQ     XC1
C1B4 18 1C 04 0D       BSET    4,Y $0D   *ADDRESS DIGITALKER*
C1B8 18 1D 04 02       BCLR    4,Y $02   *NOT FREQUENCY COUNTER*
C1BC 86 08     SFLAG2: LDAA    #$08      *ENABLE OUTPUT COMPARE 5 INTERRUPT*
C1BE B7 10 22          STAA    $1022
C1C1 86 23             LDAA    #$23
C1C3 B7 10 24          STAA    $1024
C1C6 BD C4 ED          JSR     WAIT1     *WAIT THREE SECONDS TO COLLECT COUNT*
C1C9 BD C4 ED          JSR     WAIT1
C1CC BD C4 ED          JSR     WAIT1 	
C1CF 86 00         XZ: LDAA    ##00
C1D1 97 08             STAA    SFQ6    *DON'T GET STUCK ON SAYING 1 MEGAHERTZ*
C1D3 96 1A             LDAA    FLAG2
C1D5 81 FF             CMPA    #$FF     *CHECK FLAG2 TO SEE IF WE MUST LOOK *
C1D7 27 06             BEQ     SKIPOF   *FOR OVERFLOW, >= 10MHZ *
C1D9 96 10             LDAA    $10      *MOVE DATA FROM BUFFERS TO SFQ*
C1DB 81 10             CMPA    #$10     *FREQUENCY COUNTER DOES NOT WORK*
C1DD 24 5E             BHS     OF       *IF FREQUENCY IS >= 10,000,000 HZ*     
C1DF 96 10     SKIPOF: LDAA    $10      *LOOK AT BITS 5 AND 6*
C1E1 44                LSRA
C1E2 44                LSRA
C1E3 44                LSRA
C1E4 44                LSRA
C1E5 97 07             STAA 	SFQ5
C1E7 96 10             LDAA 	$10
C1E9 84 0F             ANDA	#$0F
C1EB 97 06             STAA     SFQ4
C1ED 96 11             LDAA     $11
C1EF 44                LSRA
C1F0 44                LSRA
C1F1 44                LSRA
C1F2 44                LSRA
C1F3 97 05             STAA	SFQ3
C1F5 96 11             LDAA	$11
C1F7 84 0F             ANDA	#$0F
C1F9 97 04             STAA 	SFQ2
C1FB 96 12             LDAA	$12
C1FD 44                LSRA
C1FE 44                LSRA
C1FF 44                LSRA
C200 44                LSRA
C201 97 03             STAA    SFQ1
C203 96 12             LDAA    $12
C205 84 0F             ANDA    #$0F
C207 97 02             STAA    SFQ0
C209 86 00             LDAA    #$00
C20B B7 10 26          STAA    $1026	*DISABLE OUTPUT COMPARE 5 INTERRUPT*
C20E B7 10 22          STAA    $1022   *DISABLE PULSE ACCUMULATOR INTERRUPT*
C211 86 03             LDAA    #$03
C213 B7 10 24          STAA    $1024   *DISABLE PULSE ACCUMULATOR OVERFLOW*
C216 96 1A             LDAA    FLAG2   *LOOK AT PRESCALAR TO SEE IF IT IS ON*
C218 81 FF             CMPA    #$FF    *FF MEANS PRESCALAR IS OFF*
C21A 27 1E             BEQ     SFALG2
C21C 96 06             LDAA    SFQ4    *MULTIPLY COUNT BY 100*
C21E 97 08             STAA    SFQ6
C220 96 05             LDAA    SFQ3
C222 97 07             STAA    SFQ5
C224 96 04             LDAA    SFQ2
C226 97 06             STAA    SFQ4
C228 96 03             LDAA    SFQ1
C22A 97 05             STAA    SFQ3
C22C 96 02             LDAA    SFQ0
C22E 97 04             STAA    SFQ2
C230 86 00             LDAA    #$00
C232 97 03             STAA    SFQ1
C234 97 02             STAA    SFQ0
C236 86 FF             LDAA    #$FF
C238 97 1A             STAA    FLAG2
C23A 7E C2 84  SFALG2: JMP     SAY1
                        
                             
C23D 86 00         OF:	LDAA    #$00
C23F B7 10 26         	STAA    $1026	*DISABLE OUTPUT COMPARE 5 INTERRUPT*
C242 B7 10 22          	STAA    $1022   *DISABLE PULSE ACCUMULATOR INTERRUPT*
C245 86 03             	LDAA    #$03
C247 B7 10 24          	STAA    $1024   *DISABLE PULSE ACCUMULATOR OVERFLOW*
C24A BD C6 CE           JSR	PAUSE
C24D BD C6 D7          	JSR	SPEAK1
C250 B6 B7 CE          	LDAA	$B7CE   *OUT*
C253 97 09             	STAA	MESSH
C255 B6 B7 CF          	LDAA    $B7CF
C258 97 0A             	STAA	MESSL
C25A BD C6 D7          	JSR 	SPEAK1	
C25D BD C6 CE          	JSR     PAUSE
C260 BD C6 D7          	JSR     SPEAK1
C263 B6 B7 D0          	LDAA    $B7D0   *OF*
C266 97 0A             	STAA    MESSL
C268 BD C6 D7          	JSR     SPEAK1
C26B BD C6 CE          	JSR     PAUSE
C26E BD C6 D7          	JSR     SPEAK1
C271 B6 B7 D1          	LDAA    $B7D1   *RANGE*
C274 97 09             	STAA    MESSH
C276 B6 B7 D2          	LDAA    $B7D2
C279 97 0A             	STAA    MESSL
C27B BD C6 D7          	JSR     SPEAK1
C27E 7E C3 02          	JMP     NEXT9
                        
C281 BD C3 74    LOOKQ:	JSR	SYN    *PRELOAD SYNTHESIZER WITH 1MHZ*
C284 96 08        SAY1: LDAA	SFQ6   *LOOK AT Q*
C286 81 00             	CMPA	#$00	*IF SFQ6 NOT ZERO, THEN*
C288 27 03             	BEQ     NEXT1  	*SAY ONE MEGAHERTZ*
C28A 7E C6 A3         	JMP	ONEMEG  *ELSE LOOK FOR 100000 HERTZ*
C28D 96 07       NEXT1:	LDAA	SFQ5	*IF SFQ5 NOT ZERO, THEN*
C28F 81 00             	CMPA	#$00	*SAY HUNDRED THOUSAND HERTZ, *
C291 27 03             	BEQ	NEXT2	*ELSE SKIP*
C293 7E C6 84          	JMP	HUNTH                
C296 96 06       NEXT2:	LDAA	SFQ4	*IF SFQ4 NOT ZERO , THEN*
C298 81 00             	CMPA	#$00	*SAY TEN THOUSAND HERTZ*
C29A 27 03             	BEQ	NEXT3	*ELSE SKIP*
C29C 7E C6 5A          	JMP	TENTH               
C29F 96 05       NEXT3:	LDAA	SFQ3	*IF SFQ3 NOT ZERO*
C2A1 81 00             	CMPA	#$00	*THEN SAY THOUSAND *
C2A3 27 03             	BEQ	NEXT4	*HERTZ, ELSE SKIP*
C2A5 7E C6 24          	JMP	TH	             
C2A8 7E C6 3B    NEXT4:	JMP 	TH1 	*SAY THOUSAND*
C2AB 96 04       NEXT5:	LDAA	SFQ2	*IF SFQ2 NOT ZERO*
C2AD 81 00             	CMPA	#$00	*THEN SAY HUNDRED HERTZ*
C2AF 27 03             	BEQ	NEXT6	*ELSE SKIP*
C2B1 7E C5 FF          	JMP	HUN2
C2B4 96 03       NEXT6:	LDAA	SFQ1	*IF SFQ1 NOT ZERO, THEN*
C2B6 81 00             	CMPA	#$00	*SAY TENS OF HERTZ ELSE*
C2B8 27 03             	BEQ	NEXT7   *SKIP*
C2BA 7E C5 D5          	JMP	TENS
C2BD 96 02       NEXT7:	LDAA	SFQ0	*SPEAK NUMBER AND HERTZ*
C2BF 81 00             	CMPA	#$00
C2C1 27 03             	BEQ	NEXT8
C2C3 7E C5 C1          	JMP	UNITS   *SAY UNITS*
C2C6 96 08      NEXT8:  LDAA    SFQ6	*IF THE FREQUENCY REGISTERS ARE ZERO*
C2C8 26 2B             	BNE     NEXT8A  *THEN DIGITALKER MUST SAY "ZERO"*
C2CA 96 07             	LDAA	SFQ5
C2CC 26 27             	BNE     NEXT8A
C2CE 96 06             	LDAA    SFQ4
C2D0 26 23             	BNE	NEXT8A
C2D2 96 05             	LDAA	SFQ3
C2D4 26 1F             	BNE	NEXT8A
C2D6 96 04             	LDAA	SFQ2
C2D8 26 1B             	BNE	NEXT8A
C2DA 96 03             	LDAA	SFQ1
C2DC 26 17             	BNE	NEXT8A
C2DE 96 02             	LDAA	SFQ0
C2E0 26 13             	BNE     NEXT8A
C2E2 BD C6 CE          	JSR	PAUSE
C2E5 BD C6 D7          	JSR	SPEAK1
C2E8 B6 B7 AD          	LDAA	$B7AD
C2EB 97 09             	STAA	MESSH
C2ED B6 B7 AE          	LDAA    $B7AE   *SAY ZERO*
C2F0 97 0A             	STAA	MESSL
C2F2 BD C6 D7          	JSR 	SPEAK1	
C2F5 96 19      NEXT8A:	LDAA    FLAG1   *CAPACITANCE, INDUCTANCE, OR HERTZ?*
C2F7 81 02             	CMPA    #$02    *CAPACITANCE*
C2F9 27 18             	BEQ     SAYCAP
C2FB 81 03             	CMPA    #$03    *INDUCTANCE*
C2FD 27 3E             	BEQ     SAYL
C2FF 7E C5 AD           JMP	HERTZ  	*SAY HERTZ*
C302 86 00       NEXT9:	LDAA	#$00	*CLEAR START*
C304 97 00             	STAA	START
C306 97 19             	STAA    FLAG1   *RESET FLAG1*
C308 97 01             	STAA	END	*CLEAR END*
C30A B6 10 02          	LDAA	$1002   *CLEAR INTR FLAG, 2 INSTRS
C30D B6 10 05          	LDAA	$1005   *TO PREVENT DOUBLE BEEP* 
C310 7E C1 20          	JMP	TART    *IF BUTTON PUSHED TWICE*	 
                        
                        
C313 B6 B7 EB   SAYCAP: LDAA    $B7EB
C316 97 09             	STAA    MESSH
C318 B6 B7 EC          	LDAA    $B7EC  *SAY PICO*
C31B 97 0A             	STAA    MESSL
C31D BD C6 D7          	JSR     SPEAK1
C320 B6 B7 E3          	LDAA    $B7E3  *SAY FARAD*
C323 97 09             	STAA    MESSH
C325 B6 B7 E4          	LDAA    $B7E4
C328 97 0A             	STAA    MESSL
C32A BD C6 D7          	JSR     SPEAK1
C32D B6 B7 E5          	LDAA    $B7E5  *SAY SS*
C330 97 09             	STAA    MESSH
C332 B6 B7 E6          	LDAA    $B7E6
C335 97 0A             	STAA    MESSL
C337 BD C6 D7          	JSR     SPEAK1  	
C33A 7E C3 02          	JMP     NEXT9
                        
C33D B6 B7 E1   SAYL:   LDAA    $B7E1
C340 97 09             	STAA    MESSH  *SAY MICRO*
C342 B6 B7 E2          	LDAA    $B7E2 
C345 97 0A             	STAA    MESSL
C347 BD C6 D7          	JSR     SPEAK1
C34A B6 B7 E7          	LDAA    $B7E7  *SAY IN*
C34D 97 09             	STAA    MESSH
C34F B6 B7 E8          	LDAA    $B7E8
C352 97 0A             	STAA    MESSL
C354 BD C6 D7          	JSR     SPEAK1
C357 B6 B7 E9          	LDAA    $B7E9  *SAY RE*
C35A 97 09             	STAA    MESSH
C35C B6 B7 EA          	LDAA    $B7EA
C35F 97 0A             	STAA    MESSL
C361 BD C6 D7          	JSR     SPEAK1
C364 B6 B7 E5          	LDAA    $B7E5  *SAY SS*
C367 97 09             	STAA    MESSH
C369 B6 B7 E6          	LDAA    $B7E6
C36C 97 0A             	STAA    MESSL
C36E BD C6 D7          	JSR     SPEAK1
C371 7E C3 02          	JMP     NEXT9
                           
C374 18 1C 04 03  SYN: 	BSET 	4,Y $03	*ADDRESS SYN*
C378 18 1D 04 0C       	BCLR	4,Y $0C	*NOT DIGITALKER*
                        
C37C B6 10 29          	LDAA	$1029	*CLEAR SYN*
C37F 86 00             	LDAA	#$00	*WITH 0006*
C381 B7 10 2A          	STAA	$102A   *SEND 00 SERIAL*
C384 B6 10 29     LP3:	LDAA	$1029	*DONE?*
C387 84 80             	ANDA	#$80	*IF NOT THEN*
C389 27 F9             	BEQ	LP3	*LOOP TILL DONE*
C38B B6 10 29          	LDAA	$1029
C38E 86 06             	LDAA	#$06	*SEND 06 (EXPONENT)*
C390 B7 10 2A          	STAA	$102A	*SERIALY*


C393 B6 10 29      LP4:	LDAA	$1029	*DONE?*
C396 84 80             	ANDA	#$80	*IF NOT THEN*
C398 27 F9             	BEQ	LP4	*LOOP TILL DONE*
                        
C39A 96 08             	LDAA	SFQ6	*IF SFQ6 NOT ZERO*
C39C 81 00             	CMPA	#$00	*THEN SEND 1006*
C39E 26 57             	BNE	LEEP    *(1 MHZ)*
                        
C3A0 86 00             	LDAA	#$00	*DETERMINE FREQUENCY*
C3A2 97 0B             	STAA	SYNH	*CLEAR SYNH*
C3A4 97 0C             	STAA	SYNL	*AND SYNL*
C3A6 CE 00 07          	LDX	#$07	*LOOK AT SFQ7*
C3A9 09            C1:	DEX		*NEXT SFQ (DECREMENT)*
C3AA A6 02             	LDAA	2,X	*FIND FIRST SFQ THAT*
C3AC 81 00             	CMPA	#$00	*IS NOT ZERO*
C3AE 27 F9             	BEQ	C1
C3B0 48                	ASLA	   	*ACCA=1ST #*
C3B1 48                	ASLA		*SHIFT 4 TIMES LEFT*
C3B2 48                	ASLA
C3B3 48                	ASLA
C3B4 DF 0B             	STX 	SYNH  	*SYNL GETS POSITION*
C3B6 97 0B             	STAA	SYNH
C3B8 8C 00 00          	CMPX	#$00
C3BB 27 17             	BEQ	SEND1
C3BD 09                	DEX	
C3BE A6 02             	LDAA	2,X
C3C0 9A 0B             	ORAA	SYNH
C3C2 97 0B             	STAA	SYNH
C3C4 8C 00 00          	CMPX	#$00
C3C7 27 0B             	BEQ	SEND1
C3C9 09                	DEX
C3CA A6 02             	LDAA	2,X
C3CC 48                	ASLA
C3CD 48                	ASLA
C3CE 48                	ASLA
C3CF 48                	ASLA
C3D0 9A 0C             	ORAA	SYNL
C3D2 97 0C             	STAA	SYNL
                        
                        
C3D4 18 1C 04 03 SEND1:	BSET	4,Y $03	*ADDRESS SYNTHESIZER*
C3D8 18 1D 04 0C       	BCLR	4,Y $0C	*NOT DIGITALKER*
C3DC B6 10 29         	LDAA	$1029	*SEND TO FREQUENCY SYNTHESIZER*
C3DF 96 0B             	LDAA	SYNH	*SYNH*
C3E1 B7 10 2A          	STAA	$102A	*SEND NOW*
C3E4 B6 10 29      LP1:	LDAA	$1029	*LOOP TILL SERIAL*
C3E7 84 80             	ANDA	#$80	*TRANMISSION IS DONE*
C3E9 27 F9             	BEQ	LP1	*DONE?*
C3EB 96 0C             	LDAA	SYNL	*SEND SYNL TO SYNTHESIZER*
C3ED B7 10 2A          	STAA	$102A	*SERIALLY*
C3F0 B6 10 29      LP2:	LDAA	$1029	*LOOP TILL SERIAL*
C3F3 84 80             	ANDA	#$80	*TRANSMISSION IS DONE*
C3F5 27 F9            	BEQ	LP2	*DONE?*
C3F7 18 1D 04 01  LEEP:	BCLR	4,Y $01	*LATCH WORD INTO *
C3FB 18 1C 04 01       	BSET	4,Y $01	*74HC595 LATCH*
                        
C3FF 18 1C 04 0D       	BSET	4,Y $0D	*ADDRESS FILTER*
C403 18 1D 04 0E       	BCLR	4,Y $0E *NOT SYNTHESIZER*
                        
C407 D6 0C             	LDAB	SYNL	*PUT EXPONENT*      
C409 58                	ASLB		*BITS IN *
C40A 58                	ASLB		*UPPER B*
C40B 58                	ASLB
C40C 58                	ASLB
C40D 96 0B             	LDAA	SYNH	*PUT 4 MSB'S*
C40F 84 F0             	ANDA	#$F0	*BITS IN*	
C411 44                	LSRA		*LOWER A*
C412 44                	LSRA
C413 44                	LSRA
C414 44                	LSRA
C415 97 09             	STAA	MESSH
C417 DA 09             	ORAB	MESSH
C419 86 B7             	LDAA	#$B7	*FORM LOOKUP LOC*
C41B DD 09             	STD     MESSH   *STORE IN MESSH*
C41D DE 09             	LDX	MESSH	*STORE IN X*
C41F 18 DE 09          	LDY	MESSH	*STORE IN Y*
C422 BD C4 4B          	JSR	INTERP  *INTERPOLATE BETWEEN*
C425 B6 10 29          	LDAA	$1029	*VALUES IN THE LOOKUP TABLE*
C428 18 A6 00          	LDAA	0,Y	*LOAD A FORM LOC*
C42B 1B                	ABA		*ADD QUOTIENT TO A*
C42C 18 CE 10 00       	LDY	#$1000	*RESTORE Y*
C430 B7 10 2A          	STAA	$102A   *SEND CONTENTS ON ACCUMULATOR A*
C433 B6 10 29      LX1:	LDAA	$1029	*SERIALLY AND LOOP*
C436 84 80             	ANDA	#$80	*TILL DONE*
C438 27 F9             	BEQ	LX1	*DONE?*
C43A 18 1D 04 01       	BCLR	4,Y $01 *LATCH INTO *
C43E 18 1C 04 01       	BSET	4,Y $01	*74HC595 LATCH*
C442 18 1C 04 0D       	BSET	4,Y $0D	*AND ADDRESS DIGITALKER*
C446 18 1D 04 02       	BCLR	4,Y $02	
C44A 39                	RTS		*RETURN FROM SUBROUTINE*
                        	
C44B E6 01      INTERP:	LDAB	1,X	*GET FH*
C44D E0 00             	SUBB	0,X	*SUBTRACT FL*
C44F D7 09             	STAB	MESSH	*STORE FH-FL*  
C451 DC 0B             	LDD	SYNH	*GET FREQUENCY*
C453 05                	ASLD		*SHIFT LEFT FOUR TIMES*
C454 05                	ASLD
C455 05                	ASLD
C456 05                	ASLD		*RESOLUTE BITS IN A*
C457 C6 00             	LDAB	#$00	*CLEAR B*
C459 85 80             	BITA 	#$80	*CONVERT FROM BCD*
C45B 27 02             	BEQ	ADD50	*TO FULL 8 BIT*
C45D CB 50             	ADDB	#$50	*BINARY*
C45F 85 40       ADD50:	BITA	#$40	*DO MSB*
C461 27 02             	BEQ	ADD28	*DO NEXT MSB*
C463 CB 28             	ADDB	#$28
C465 85 20       ADD28:	BITA	#$20
C467 27 02             	BEQ	ADD14
C469 CB 14             	ADDB	#$14
C46B 85 10       ADD14: BITA    #$10	*DO NEXT MSB*
C46D 27 02             	BEQ	ADD0A
ŠC46F CB 0A             	ADDB	#$0A	*DO NEXT MSB (LSB)*
                      
C471 84 0F      ADD0A: 	ANDA	#$0F
C473 97 0A             	STAA	MESSL
C475 DB 0A             	ADDB	MESSL	*B CONTAINS BINARY*
C477 96 09              LDAA	MESSH	*FH-FL*
C479 3D                 MUL
C47A CE 00 64           LDX	#$64	*DECIMAL 100*
C47D 02                 IDIV		*QUOTIENT IN X*
C47E 8F                 XGDX		*QUOTIENT IN B*
C47F 39                 RTS	
                        
C480 18 1C 04 20   CAL:	BSET	4,Y $20 *SET K1 RELAY*
C484 18 1D 04 40        BCLR	4,Y $40 *CLEAR K2 RELAY*
C488 18 1D 04 80        BCLR	4,Y $80	*CLEAR K3 RELAY*
C48C 18 1D 03 10        BCLR	3,Y $10 *CLEAR K4 RELAY*
C490 18 1D 03 20        BCLR	3,Y $20 *CLEAR K5 RELAY*
C494 18 1D 03 40        BCLR	3,Y $40 *CLEAR K6 RELAY*
C498 86 22              LDAA	#$22	*A/D CONVERTOR CH2*
C49A B7 10 30           STAA	$1030	*SCAN=CONTINUOUS*
C49D BD C6 CE           JSR	PAUSE	*SPEAK 20MS PAUSE*
C4A0 BD C6 D7           JSR	SPEAK1	*TO CLEAR DIGITALKER*
C4A3 86 00              LDAA	#$00
C4A5 97 0E              STAA	RESULT	*CLEAR RESULT*
C4A7 BD C5 7A           JSR	NEWLOC	*PICK FREQ TO CALIBRATE*
C4AA BD C5 4E           JSR	FREQ	*CALCULATE FREQUENCY*
C4AD BD C3 D4           JSR	SEND1	*SEND FREQ TO SYN AND FILTER*
C4B0 BD C4 ED           JSR	WAIT1	*WAIT 5SEC TO SETTLE*
C4B3 BD C4 ED           JSR	WAIT1
C4B6 BD C4 ED           JSR	WAIT1
C4B9 BD C4 ED           JSR	WAIT1
C4BC BD C4 ED           JSR	WAIT1
C4BF BD C5 1F           JSR	GETRES	*GET A/D RESULT*
                        
C4C2 BD C5 03      QW1:	JSR	ADD1	*ADD 1 TO LOOKUP TABLE*
C4C5 BD C3 D4           JSR	SEND1	*OUTPUT NEW VOLTAGE*
C4C8 BD C4 ED           JSR	WAIT1	*WAIT 1 SEC TO SETTLE*	
C4CB BD C5 1F           JSR	GETRES	*GET A/D RESULT*
C4CE 96 0E              LDAA	RESULT  *DID GETRES UPDATE*
C4D0 91 0F              CMPA	OLDRES	*RESULT?*
C4D2 22 EE              BHI	QW1 	*IF SO, TRY ANOTHER +1*
C4D4 BD C5 11           JSR	SUB1	*UNDO LAST ADDITION*
C4D7 BD C5 11      QW2:	JSR	SUB1	*TRY OTHER DIRECTION NOW*
C4DA BD C3 D4           JSR	SEND1	*OUTPUT NEW VOLTAGE*
C4DD BD C4 ED           JSR	WAIT1	*WAIT 1 SEC TO SETTLE*
C4E0 BD C5 1F           JSR	GETRES	*GET A/D RESULT*
C4E3 96 0E              LDAA	RESULT	*DID GETRES UPDATE*
C4E5 91 0F              CMPA	OLDRES	*RESULT?*
C4E7 22 EE              BHI	QW2:	*IF SO, TRY ANOTHER*
C4E9 BD C5 03           JSR	ADD1	*UNDO LAST SUBTRACTION*
C4EC 39                 RTS		*DONE*

                         
                        
C4ED 86 14       WAIT1:	LDAA	#$14 	*THIS ROUTINE CAUSES A*
C4EF CE 14 00    WSEC2:	LDX	#$1400	*1 SECOND DELAY*
C4F2 C6 55       WSEC1:	LDAB	#$55	*RESET COP*
C4F4 F7 10 3A           STAB	$103A	*BY WRITING AA THEN*
C4F7 C6 AA              LDAB	#$AA	*55 TO REGISTER 103A*
C4F9 F7 10 3A           STAB	$103A
C4FC 09                 DEX		*CONTINUE COUNTDOWN*
C4FD 26 F3              BNE	WSEC1
C4FF 4A                 DECA		*OUTER COUNTDOWN LOOP*
C500 26 ED              BNE	WSEC2
C502 39                 RTS		*1 SECOND DELAY OVER*
                        
                        
C503 FE B7 0E     ADD1:	LDX	$B70E	*LOAD X WITH ADDRESS*
C506 E6 00              LDAB	0,X	*LOAD B WITH NUMBER*
C508 BD D5 87           JSR	ERASE	*ERASE LOCATION X*
C50B CB 01              ADDB 	#$01	*ADD 1 TO B*
C50D BD D5 A4           JSR	PROG	*PROG LOCATION X*
C510 39                 RTS
                        
                        
C511 FE B7 0E     SUB1:	LDX	$B70E	*LOAD X WITH ADDRESS*
C514 E6 00              LDAB	0,X	*LOAD B WITH NUMBER*
C516 BD D5 87           JSR	ERASE	*REASE LOCATION X*
C519 C0 01              SUBB	#$01	*SUBTRACT 1 FROM B*
C51B BD D5 A4           JSR	PROG	*PROG LOCATION X*
C51E 39                 RTS
                        
C51F B6 10 21   GETRES:	LDAA	$1021	*LOOK AT TIMER CONTROL*
C522 84 0F              ANDA	#$0F	*KEEP LOWER FOUR BITS*
C524 8A 10              ORAA	#$10	*CAPTURE ON RISING  EDGE*
C526 B7 10 21           STAA	$1021	*SET TIMER CONTROL*
C529 96 0E              LDAA	RESULT	*STORE RESULT*
C52B 97 0F              STAA	OLDRES	*IN OLD RESULT*
C52D 86 04              LDAA	#$04
C52F B7 10 23           STAA	$1023	*CLEAR IC1 FLAG*
C532 86 55      BACK1:  LDAA 	#$55	*RESET COP*
C534 B7 10 3A           STAA	$103A
C537 86 AA              LDAA	#$AA
C539 B7 10 3A           STAA	$103A
C53C B6 10 23           LDAA	$1023	*LOOP TILL FLAG SET*
C53F 84 04              ANDA	#$04
C541 27 EF              BEQ	BACK1
C543 B6 10 33           LDAA	$1033   *GET A/D RESULT*
C546 91 0E              CMPA	RESULT	*LOOK AT PREVIOUS RESULT*
C548 22 01              BHI	SETNEW	*STORE NEW IF HIGHER*
C54A 39                 RTS
C54B 97 0E      SETNEW:	STAA	RESULT
C54D 39                 RTS	
                        
                        
C54E B6 B7 0F     FREQ:	LDAA	$B70F	*LOAD POINTER TO NEXT LOOKUP VALUE*
C551 84 0F              ANDA	#$0F 	*LOOK AT MANTISSA*
C553 48                 ASLA		*SHIFT TO UPPER 4 BITS*
C554 48                 ASLA
C555 48                 ASLA
C556 48                 ASLA
C557 97 0B              STAA	SYNH	*PUT IT IN SYNL*
C559 B6 B7 0F           LDAA	$B70F
C55C 84 F0              ANDA	#$F0	*LOOK AT EXPONENT*
C55E 44                 LSRA		*SHIFT TO LOWER 4 BITS*
C55F 44                 LSRA
C560 44                 LSRA
C561 44                 LSRA
C562 97 0C              STAA	SYNL	*PUT IT IN SYNH*
C564 B6 B7 0F           LDAA	$B70F	*IF B70F = 0A*
C567 84 0F              ANDA	#$0F	*THEN FREQ IS*
C569 81 0A              CMPA	#$0A	*9.99 EXPONENT*
C56B 26 0C              BNE	RE1
C56D 86 99              LDAA	#$99
C56F 97 0B              STAA	SYNH	*LOAD SYNH WITH 99*
C571 96 0C              LDAA	SYNL	*LOAD SYNL WITH *
C573 84 0F              ANDA	#$0F	*9 EXPONENT*
C575 8A 90              ORAA	#$90
C577 97 0C              STAA	SYNL	
C579 39            RE1:	RTS		*RETURN FROM SUBROUTINE*
                        
                        
                        
C57A F6 B7 0F   NEWLOC:	LDAB    $B70F   *B70F HOLDS OLDLOC*
C57D C0 01              SUBB	#$01	*SUBTRACT 1*
C57F C1 00              CMPB	#$00	*IF 00, RESET B70D*
C581 26 02              BNE	JK1	*TO B751*
C583 C6 51              LDAB	#$51  	*CERTAIN VALUES IN THE*
C585 C1 10       JK1:   CMPB	#$10	*LOOKUP TABLE EEPROM *
C587 26 02              BNE	JK2:	*MUST BE SKIPPED IN *
C589 C6 0A              LDAB	#$0A	*COUNTING DOWN FROM B751 TO*
C58B C1 20       JK2:	CMPB	#$20	*B701*
C58D 26 02              BNE	JK3:	*SKIPPED ARE B750, B740*
C58F C6 1A              LDAB	#$1A	*B730, B720, B710, B700*
C591 C1 30       JK3:	CMPB	#$30	*B74B THROUGH B74F*
C593 26 02              BNE	JK4:	*B73B THROUGH B73F*
C595 C6 2A              LDAB	#$2A	*B72B THROUGH B72F*
C597 C1 40       JK4:	CMPB	#$40	*B71B THROUGH B71F*
C599 26 02              BNE	JK5:	*B70B THROUGH B70F*
C59B C6 3A              LDAB	#$3A
C59D C1 50       JK5:	CMPB	#$50
C59F 26 02              BNE	JK6:
C5A1 C6 4A              LDAB	#$4A
C5A3 CE B7 0F    JK6:	LDX	#$B70F	*REPROGRAM LOCATION B70F*
C5A6 BD D5 87           JSR 	ERASE	*FOR THESE SPECIAL CASES*
C5A9 BD D5 A4           JSR	PROG	*ONLY*
C5AC 39                 RTS		*B70F HOLDS NEW LOC*
                        
                        	
C5AD BD C6 CE    HERTZ:	JSR	PAUSE	*SPEAK 20 MSEC OF*
C5B0 BD C6 D7           JSR	SPEAK1	*SILENCE*
C5B3 86 01              LDAA	#$01	*THEN LOAD 013B WHICH*
C5B5 97 09              STAA	MESSH	*IS 16 BIT WORD*
C5B7 86 3B              LDAA	#$3B	*FOR "HERTZ"
C5B9 97 0A              STAA	MESSL
C5BB BD C6 D7           JSR	SPEAK1	*AND SPEAK "HERTZ"
C5BE 7E C3 02           JMP	NEXT9
                        
C5C1 BD C6 CE    UNITS:	JSR	PAUSE	*SAY PAUSE*
C5C4 BD C6 D7           JSR	SPEAK1	*20 MSEC PAUSE*
C5C7 86 00              LDAA	#$00	*16 BIT SERIAL WORD*
C5C9 97 09              STAA	MESSH	* IS FORMED FROM*
C5CB 96 02              LDAA	SFQ0	*00 AND SFQ0*
C5CD 97 0A              STAA	MESSL
C5CF BD C6 D7           JSR	SPEAK1  *SAY # FORMED BY THIS WORD*
C5D2 7E C2 C6           JMP	NEXT8
                        
                        
                        
C5D5 BD C6 CE     TENS:	JSR	PAUSE	*20 MSEC DELAY*
C5D8 BD C6 D7           JSR	SPEAK1	*SAY PAUSE*
C5DB 96 03              LDAA	SFQ1	*16 BIT SERIAL WORD*
C5DD 81 01              CMPA	#$01	*IS FORMED BY *
C5DF 26 10              BNE	NOTEN	*00 AND SFQ1*
C5E1 8B 09              ADDA	#$09	*WITH SPECIAL ATTENTION*
C5E3 9B 02              ADDA 	SFQ0	*TO SFQ0 BECAUSE*
C5E5 97 0A              STAA	MESSL	*11 THROUGH 19 NEED*
C5E7 86 00              LDAA	#$00	*ADDITIONAL PROCESSING*
C5E9 97 09              STAA	MESSH	*IN ORDER NOT TO SAY*
C5EB BD C6 D7           JSR	SPEAK1	*"TEN SEVEN" WHEN*
C5EE 7E C2 C6           JMP	NEXT8	*SEVENTEEN IS  MEANT*
C5F1 8B 12       NOTEN:	ADDA	#$12
C5F3 97 0A              STAA	MESSL
C5F5 86 00              LDAA	#$00
C5F7 97 09              STAA	MESSH
C5F9 BD C6 D7           JSR	SPEAK1	*SAY TENS*
C5FC 7E C2 BD           JMP	NEXT7
                        
                        	
                        
                        
C5FF BD C6 CE     HUN2:	JSR	PAUSE 	*SAY PAUSE*
C602 BD C6 D7           JSR	SPEAK1	*20 MSEC PAUSE*
C605 86 00              LDAA	#$00	*16 BIT SERIAL WORD*
C607 97 09              STAA	MESSH	*IS FORMED FORM 00 AND*
C609 96 04              LDAA	SFQ2	*SFQ2*
C60B 97 0A              STAA	MESSL
C60D BD C6 D7           JSR	SPEAK1	*SAY # FORMED BY 16 BIT WORD*
C610 BD C6 CE           JSR	PAUSE
C613 BD C6 D7           JSR	SPEAK1  *SAY PAUSE*
C616 86 00              LDAA	#$00	*SAY HUNDRED*
C618 97 09              STAA	MESSH	*WORD FOR HUNDRED IS*
C61A 86 1C              LDAA	#$1C	*001C*
C61C 97 0A              STAA	MESSL
C61E BD C6 D7           JSR	SPEAK1
C621 7E C2 B4           JMP	NEXT6	

                        
                        
C624 BD C6 CE      TH:	JSR	PAUSE	*SAY PAUSE*
C627 BD C6 D7           JSR	SPEAK1	*20 MSEC PAUSE*
C62A 86 00              LDAA	#$00	*FORM 16 BIT WORD*
C62C 97 09              STAA	MESSH	*FROM 00 AND SFQ3*
C62E 96 05              LDAA	SFQ3
C630 97 0A              STAA	MESSL
C632 BD C6 D7           JSR	SPEAK1	*SAY # FORMED FROM 16 BIT WORD*
C635 BD C6 CE           JSR	PAUSE
C638 BD C6 D7           JSR	SPEAK1	*SAY PAUSE*
C63B 86 00         TH1: LDAA	#$00	*IS IT NECESSARY*
C63D 9B 07              ADDA	SFQ5	*TO SAY "THOUSAND"?*
C63F 26 0B              BNE	TH2 	*IF SFQ5 AND SFQ4*
C641 9B 06              ADDA	SFQ4	*AND SFQ3 = 0 THEN*
C643 26 07              BNE	TH2	*NO*
C645 9B 05              ADDA	SFQ3
C647 26 03              BNE	TH2
C649 7E C2 AB           JMP	NEXT5
C64C 86 00         TH2:	LDAA	#$00	*ELSE SAY "THOUSAND"*
C64E 97 09              STAA	MESSH	*(001D)*
C650 86 1D              LDAA	#$1D
C652 97 0A              STAA	MESSL
C654 BD C6 D7           JSR	SPEAK1
C657 7E C2 AB           JMP	NEXT5
                        
C65A BD C6 CE    TENTH:	JSR	PAUSE	*SAY PAUSE*
C65D BD C6 D7           JSR	SPEAK1	*FORM 16 BIT WORD*
C660 96 06              LDAA	SFQ4	*FROM 00 AND SFQ4*
C662 81 01              CMPA	#$01	*WITH SPECIAL ATTENTION*
C664 26 10              BNE	NOTEEN	*TO SFQ3*
C666 8B 09              ADDA	#$09
C668 9B 05              ADDA	SFQ3
C66A 97 0A              STAA	MESSL	*STORE IN MESSH*
C66C 86 00              LDAA	#$00	*AND MESSL TO SEND*
C66E 97 09              STAA	MESSH	*TO DIGITALKER*
C670 BD C6 D7           JSR	SPEAK1	*SPEAK 16 BIT WORD*
C673 7E C2 A8           JMP	NEXT4
C676 8B 12      NOTEEN:	ADDA	#$12	                   
C678 97 0A              STAA	MESSL	
C67A 86 00              LDAA	#$00
C67C 97 09              STAA	MESSH
C67E BD C6 D7           JSR	SPEAK1 *SAY #*
C681 7E C2 9F           JMP	NEXT3
                        
C684 86 00       HUNTH:	LDAA	#$00	*FORM 16 BIT WORD*
C686 97 09              STAA	MESSH	*FROM 00 AND SFQ5*
C688 96 07              LDAA	SFQ5	
C68A 97 0A              STAA	MESSL
C68C BD C6 D7           JSR	SPEAK1	*SPEAK # FORMED FROM 16 BITS*
C68F BD C6 CE           JSR	PAUSE	*SPEAK PAUSE*
C692 BD C6 D7           JSR	SPEAK1	*20 MSEC PAUSE*
C695 86 00              LDAA	#$00
C697 97 09              STAA	MESSH
C699 86 1C              LDAA	#$1C	*001C IS WORD FOR HUNDRED*
C69B 97 0A              STAA	MESSL
C69D BD C6 D7           JSR	SPEAK1	*SPEAK "HUNDRED"*
C6A0 7E C2 96           JMP	NEXT2
                       
C6A3 86 00      ONEMEG:	LDAA	#$00	*SAY ONE*
C6A5 97 09              STAA	MESSH
C6A7 96 08              LDAA	SFQ6	*0001 IS 16 BIT*
C6A9 97 0A              STAA	MESSL	*WORD FOR ONE*
C6AB BD C6 D7           JSR	SPEAK1	
C6AE BD C6 CE           JSR	PAUSE
C6B1 BD C6 D7           JSR	SPEAK1
C6B4 86 00              LDAA	#$00	*SAY MEGA*
C6B6 97 09              STAA	MESSH	*001E IS 16 BIT WORD*
C6B8 86 1E              LDAA	#$1E	*FOR MILLION*
C6BA 97 0A              STAA	MESSL
C6BC BD C6 D7           JSR	SPEAK1
C6BF 86 00              LDAA	#$00
C6C1 97 0B              STAA	SYNH	*CLEAR SYNH*
C6C3 97 00              STAA	START	*CLEAR START*
C6C5 97 01              STAA	END	*CLEAR END*
C6C7 86 06              LDAA	#$06
C6C9 97 0C              STAA	SYNL    
C6CB 7E C2 8D           JMP	NEXT1	*AND SYNL=06*
                        
C6CE 86 00       PAUSE:	LDAA	#$00	*0044 IS 16 BIT*
C6D0 97 09              STAA	MESSH	*WORD FOR 20 MSEC*
C6D2 86 44              LDAA	#$44	*PAUSE*
C6D4 97 0A              STAA	MESSL	*STORED IN MESSH*
C6D6 39                 RTS		*AND MESSL*
                         
C6D7 B6 10 29   SPEAK1:	LDAA	$1029	*THIS ROUTINE SENDS 16*
C6DA 96 09              LDAA	MESSH	*BIT WORD TO DIGITALKER*
C6DC B7 10 2A           STAA	$102A	*SEND MESSH (8 BITS)*
C6DF B6 10 29     LOP1:	LDAA	$1029	*LOOP TILL SENT*
C6E2 84 80              ANDA	#$80
C6E4 27 F9              BEQ	LOP1
C6E6 B6 10 29           LDAA	$1029
C6E9 96 0A              LDAA	MESSL
C6EB B7 10 2A           STAA	$102A	*SEND MESSL (8 BITS)*
C6EE B6 10 29     LOP2:	LDAA	$1029	*LOOP TILL SENT*
C6F1 84 80              ANDA	#$80
C6F3 27 F9              BEQ	LOP2
C6F5 18 1D 04 01        BCLR	4,Y $01	*LATCH WORD INTO*
C6F9 18 1C 04 01        BSET	4,Y $01	*74HC595 LATCH*
C6FD 86 55        LOP3:	LDAA	#$55	*RESET COP*
C6FF B7 10 3A           STAA	$103A	*A 2 STEP*
C702 86 AA              LDAA	#$AA	*PROCEDURE*
C704 B7 10 3A           STAA	$103A
C707 B6 10 23           LDAA	$1023	*IS DIGITALKER*
C70A 84 01              ANDA	#$01	*FINISHED SPEAKING?*
C70C 27 EF              BEQ	LOP3
C70E 86 01              LDAA	#$01
C710 B7 10 23           STAA	$1023
C713 39                 RTS		*RETURN*


                        
C714 86 00      MEASU:  LDAA    #$00    *CLEAR TEMP REGISTER*
C716 97 17              STAA    TEMP
C718 97 10              STAA    $10     *CLEAR ALL REGISTERS USED*
C71A 97 11              STAA    $11     *FOR COUNTING FREQUENCY*
C71C 97 12              STAA    $12
C71E 97 13              STAA    $13
C720 97 14              STAA    $14
C722 97 15              STAA    $15
C724 B7 10 27           STAA    $1027  *CLEAR PULSE ACCUMULATOR*
C727 96 19              LDAA    FLAG1  *LOOK TO SEE IF CAP OR INDUCTANCE*
C729 81 02              CMPA    #$02
C72B 27 04              BEQ     CAPAC
C72D 86 10              LDAA    #$10   *SYMBOL FOR INDUCTANCE*
C72F 97 17              STAA    TEMP
                        
C731 18 1D 04 40 CAPAC: BCLR    4,Y $40	*DISABLE KEY INTERRUPT*
C735 18 1C 04 05        BSET	  4,Y $05 *ADDRESS FREQUENCY COUNTER BOARD*
C739 18 1D 04 0A        BCLR    4,Y $0A *NOT ANYTHING ELSE*
C73D 86 20              LDAA    #$20
C73Ę B· 1° 2µ           STAĮ    $102µ   *CLEAŅ PULSÅ ACCUMULATOR*
C742 86 40              LDAA    #$40    *INTERRUPT FLAG*
C744 B7 10 26           STAA    $1026   *ENABLE PULSE ACCUMULATOR SYSTEM*
C747 86 23              LDAA    #$23
C749 B7 10 24           STAA    $1024   *ENABLE PULSE ACCUMULATOR *
C74C B6 10 29           LDAA    $1029   *OVERFLOW INTERRUPT*
C74F 86 40              LDAA    #$40
C751 9A 17              ORAA    TEMP
C753 B7 10 2A           STAA    $102A
C756 B6 10 29       XX:	LDAA    $1029  *TELL COUNTER BOARD TO MEASURE *
C759 84 80              ANDA    #$80   *CAP OR INDUCTANCE AS DETERMINED *
C75B 27 F9              BEQ     XX     *BY TEMP*
C75D 18 1D 04 01        BCLR    4,Y $01  *LATCH CLEAR INTO FLIP-FLOPS*
C761 18 1C 04 01        BSET    4,Y $01
C765 B6 10 29           LDAA    $1029
C768 86 60              LDAA    #$60
C76A 9A 17              ORAA    TEMP
C76C B7 10 2A           STAA    $102A
C76F B6 10 29       XY:	LDAA    $1029
C772 84 80              ANDA    #$80
C774 27 F9              BEQ     XY
C776 18 1D 04 01        BCLR    4,Y $01  *LATCH GO INTO FLIP-FLOPS*
C77A 18 1C 04 01        BSET    4,Y $01
C77E BD C4 ED           JSR     WAIT1    *WAIT FOR COUNTER TO FINISH COUNTING*
C781 BD C4 ED           JSR     WAIT1
C784 BD C4 ED           JSR     WAIT1
C787 BD DF 34           JSR     BCDX     *COUVERT FROM BINARY TO BCD*
C78A 96 12              LDAA    $12      *CHECK TO SEE IF OUT OF RANGE*
C78C 26 13              BNE     NEXTCH   *IF 10, 11, AND 12 ARE ALL ZERO*  
C78E 96 11              LDAA    $11      *THEN SOMETHING IS WRONG*
C790 26 0F              BNE     NEXTCH   *PROBABLY A LARGE CAPACITOR OR*
C792 96 10              LDAA    $10      *INDUCTOR IS CAUSING THE MEASUREMENT*
C794 26 0B              BNE     NEXTCH   *TO TAKE TOO MUCH TIME*
C796 18 1C 04 0D        BSET    4,Y $0D  *ADDRESS DIGITALKER*
C79A 18 1D 04 02        BCLR    4,Y $02  *NOT ANYTHING ELSE*
C79E 7E C2 3D           JMP     OF       *THUS WE WILL BRANCH TO OUT OR RANGE*
C7A1 B6 10 27   NEXTCH: LDAA    $1027    *IS PULSE ACCUMULATOR STILL COUNTING*
C7A4 97 09              STAA    MESSH
C7A6 86 20              LDAA    #$20     *A DELAY TO GIVE PULSE ACCUMULATOR*
C7A8 4A           BGT1:	DECA             *TIME TO COUNT, IF STILL COUNTING*
C7A9 2E FD              BGT     BGT1     
C7AB B6 10 27           LDAA    $1027   *LOOK AT PULSE ACCUMULATOR AGAIN*
C7AE 91 09              CMPA    MESSH
C7B0 27 0B              BEQ     QWERT  *IF NOT EQUAL, THEN STILL COUNTING SO*
C7B2 18 1C 04 0D        BSET    4,Y $0D  *ADDRESS DIGITALKER*
C7B6 18 1D 04 02        BCLR    4,Y $02  *NOT ANYTHING ELSE*
C7BA 7E C2 3D           JMP     OF     *SAY OUT OF RANGE AND QUIT*
C7BD 86 FF       QWERT:	LDAA    #$FF   *MAKE SURE FLAG2 IS RESET TO DEFAULT*
C7BF 97 1A              STAA    FLAG2  *FF MEANS PRESCALAR IS OFF*
C7C1 BD C7 D3           JSR     CALCL  *SUBTRACT OUT RESIDUAL VALUE OF C OR L*
C7C4 86 00              LDAA    #$00
C7C6 97 0D              STAA    DATA     *RESET DATA REGISTER*
C7C8 18 1C 04 0D        BSET    4,Y $0D  *ADDRESS DIGITALKER*
C7CC 18 1D 04 02        BCLR    4,Y $02  *NOT ANYTHING ELSE*
C7D0 7E C1 CF           JMP     XZ 
                          
C7D3 B6 B7 ED   CALCL:  LDAA   $B7ED    *CALBRATED VALUE FOR CAPACITORS*
C7D6 97 17              STAA   TEMP     *STORE IN TEMP UNLESS FLAG1 SAYS*
C7D8 96 19              LDAA   FLAG1    *THAT YOU ARE MEASURING AN INDUCTOR*
C7DA 81 02              CMPA   #$02
C7DC 27 2E              BEQ    CALCL1
C7DE 96 10              LDAA   $10     *IF REGISTERS 10 AND 11 BOTH CONTAIN 0*
C7E0 26 12              BNE    DOIT    *THEN DON'T SUBTRACT A ONE FROM THEM*
C7E2 96 11              LDAA   $11     *SO THAT THEY DON'T GO NEGATIVE*
C7E4 B1 B7 EF           CMPA   $B7EF
C7E7 22 0B              BHI    DOIT
C7E9 25 50              BLO    EXITA
C7EB 96 12              LDAA   $12
C7ED B1 B7 EE           CMPA   $B7EE
C7F0 24 02              BHS    DOIT
C7F2 20 47              BRA    EXITA	
C7F4 96 11        DOIT:	LDAA   $11
C7F6 B0 B7 EF           SUBA   $B7EF  *SUBTRACT 100 MICROHENRIES FOR CAL*
C7F9 BD C8 71           JSR    DAA 
C7FC 97 11              STAA   $11
C7FE 96 10              LDAA   $10
C800 82 00              SBCA   #$00
C802 BD C8 71           JSR    DAA
C805 97 10              STAA   $10
C807 B6 B7 EE           LDAA   $B7EE  *CALIBRATED VALUE FOR INDUCTORS*
C80A 97 17              STAA   TEMP   *TEMP WILL CONTAIN IND OR CAP CAL VALUE*
C80C 96 10      CALCL1: LDAA   $10
C80E 26 0C              BNE    DOIT1
C810 96 11              LDAA   $11
C812 26 08              BNE    DOIT1
C814 96 12              LDAA   $12
C816 91 17              CMPA   TEMP
C818 24 02              BHS    DOIT1
C81A 20 1F              BRA    EXITA
C81C 96 12      DOIT1:  LDAA   $12
C81E 90 17              SUBA   TEMP
C820 BD C8 44           JSR    DAA1
C823 BD C8 71           JSR    DAA
C826 97 12              STAA   $12
C828 96 11              LDAA   $11
C82A 82 00              SBCA   #$00
C82C BD C8 71           JSR    DAA  
C82F 97 11              STAA   $11
C831 96 10              LDAA   $10
C833 82 00              SBCA   #$00
C835 BD C8 71           JSR    DAA
C838 97 10              STAA   $10
C83A 39                 RTS
                        
C83B 86 00      EXITA:  LDAA  #$00
C83D 97 10              STAA  $10
C83F 97 11              STAA  $11
C841 97 12              STAA  $12
C843 39                 RTS
                        
C844 97 09      DAA1:   STAA   MESSH  *SAVE VARIABLE IN MESSH*
C846 07                 TPA           *SAVE CONDITION CODES IN MESSL
C847 97 0A              STAA   MESSL
C849 96 12              LDAA   $12    *LOOK AT ORIGINAL NUMBER*
C84B D6 17              LDAB   TEMP   *LOOK AT NUMBER TO SUBTRACT FROM IT* 
C84D 84 0F              ANDA   #$0F   *LOOK AT LOWER NIBBLE  OF BOTH NUMBERS*
C84F C4 0F              ANDB   #$0F
C851 11                 CBA           *COMPARE THE LOWER  NIBBLE OF BOTH #N*
C852 24 06              BHS   HOP1    *IF ACCA - TEMP >=0 THEN SKIP*
C854 96 09              LDAA  MESSH   *OTHERWISE SUBTRACT 6 FROM THE RESULT*
C856 80 06              SUBA  #$06    *SO THAT THE BCD ANSWER WILL NOT HAVE*
C858 97 09              STAA  MESSH   *AN A-F, AND STORE IN MESSH*
C85A 96 12        HOP1:	LDAA  $12     *NOW CONSIDER UPPER NIBBLE OF THE SAME*
C85C D6 17              LDAB  TEMP    *TWO NUMBERS*
C85E 84 F0              ANDA  #$F0
C860 C4 F0              ANDB  #$F0
C862 11                 CBA           *IF ACCA - TEMP >=0 THEN SKIP*
C863 24 06              BHS   HOP2    *OTHERWISE ADJUST FOR AN A-F IN UPPER*
C865 96 09              LDAA  MESSH   *NIBBLE AND STORE IN MESSH*
C867 80 60              SUBA  #$60
C869 97 09              STAA  MESSH
C86B 96 0A        HOP2:	LDAA  MESSL
C86D 06                 TAP
C86E 96 09              LDAA  MESSH
C870 39                 RTS
                         
C871 97 09      DAA:    STAA   MESSH   *SAVE ACCUMULATOR A - THE SUM*
C873 07                 TPA            *SAVE THE CONDITION CODE REGISTER*
C874 97 0A              STAA  MESSL
C876 96 09              LDAA  MESSH    *GET THE SUM* 
C878 84 0F              ANDA   #$0F    *LOOK AT LOWER BYTE*
C87A 81 09              CMPA   #$09    *IS IT GREATER THAN 9?*
C87C 23 02              BLS   HOP3     *IF SO THEN SUBTRACT 6*
C87E 80 06              SUBA  #$06
C880 16           HOP3:	TAB            *MOVE CORRECTED RESULTS TO ACCUM B*
C881 96 09              LDAA  MESSH    *GET THE SUM*
C883 84 F0              ANDA   #$F0    *LOOK AT THE HIGH NIBBLE*
C885 81 90              CMPA   #$90    *IS IT GREATER THAN 9?* 
C887 23 02              BLS   HOP4
C889 80 60              SUBA  #$60    *IF SO, THEN SUBTRACT 6*
C88B 1B           HOP4:	ABA           *ADD RESULTS TO ACCUM A*
C88C 97 09              STAA   MESSH  *STORE ACCUM A IN MESSH*
C88E 96 0A              LDAA   MESSL  *LOAD THE CONDITION CODE REGISTER*
C890 06                 TAP           *RESTORE IT*
C891 96 09              LDAA  MESSH   *LOAD THE CORRECTED VALUE *
C893 39                 RTS           *RETURN FROM SUBROUTINE*
                        
                        
D000                    ORG	$D000	*BRANCHED TO FROM EEPROM*
D000 B6 10 02      KEY:	LDAA	$1002   *CLEAR INTR FLAG, 2 INSTR*
D003 B6 10 05           LDAA	$1005	*CLEAR PIOC*
D006 18 1D 02 40        BCLR	2,Y $40 *DISABLE KEY INTR*
                        
D00A 96 00        BOX1:	LDAA	START   *IS START SET?*
D00C 81 00              CMPA	#$00	*SET, CAL OR LEVEL 2*
D00E 27 61              BEQ	BOX2	*BUTTONS PUSHED?*
D010 81 FF              CMPA	#$FF                        
D012 27 0E              BEQ	BOX3	*LEVEL 2 KEYPAD ROUTINE*
D014 81 FE              CMPA	#$FE	*WHICH STARTS AT D000*
D016 27 04              BEQ	B10	*CAN BE FOLLOWED BY *
D018 81 FD              CMPA	#$FD	*THE ACCOMPANYING *
D01A 27 03              BEQ	B21	*FLOWCHART*
D01C 7E D1 95      B10:	JMP	BOX10	
D01F 7E D6 39      B21:	JMP	BOX21
                        
D022 B6 10 03     BOX3:	LDAA    $1003   *READ PORTC*
D025 84 0F              ANDA	#$0F
D027 81 00              CMPA	#$00	*LOOK FOR NUMBERS,*
D029 27 45              BEQ	RETU	*ENTER, OR CLEAR*
D02B 81 04              CMPA	#$04
D02D 27 41              BEQ	RETU
D02F 81 08              CMPA	#$08
D031 27 3D              BEQ	RETU
D033 81 0C              CMPA	#$0C
D035 27 39              BEQ	RETU
D037 81 0D              CMPA	#$0D	*LOOK FOR ENTER*
D039 27 02              BEQ	TRT 
D03B 20 03              BRA	JKL
D03D 7E D0 CC      TRT:	JMP	BOX7
D040 81 0F         JKL: CMPA	#$0F	*LOOK FOR CLEAR*
D042 27 02              BEQ	TEM  
D044 20 03              BRA	BOX5  
D046 7E D0 B4      TEM:	JMP	BOX6
                         
D049 D6 07        BOX5:	LDAB	SFQ5	*SHIFT Q*
D04B D7 08              STAB 	SFQ6
D04D D6 06              LDAB	SFQ4
D04F D7 07              STAB	SFQ5
D051 D6 05              LDAB	SFQ3
D053 D7 06              STAB	SFQ4
D055 D6 04              LDAB	SFQ2
D057 D7 05              STAB	SFQ3
D059 D6 03              LDAB	SFQ1
D05B D7 04              STAB	SFQ2
D05D D6 02              LDAB	SFQ0
D05F D7 03              STAB	SFQ1
D061 97 02              STAA	SFQ0
D063 B6 B7 90           LDAA	$B790	
D066 97 09              STAA	MESSH
D068 B6 B7 91           LDAA	$B791
D06B 97 0A              STAA	MESSL
D06D BD C6 D7           JSR     SPEAK1
D070 3B           RETU:	RTI
                        
D071 B6 10 03     BOX2:	LDAA	$1003	*READ PORTC*
D074 84 0F              ANDA	#$0F
D076 81 00              CMPA	#$00	*IS INPUT SET FREQ?*
D078 27 16              BEQ	BOX4	*IF NOT RETURN*
D07A 81 0C              CMPA	#$0C	*IS INPUT LEVEL2?*
D07C 27 09              BEQ	B9
D07E 81 08              CMPA	#$08	*IS INPUT CALIBRATE?*
D080 27 08              BEQ	B20
D082 81 04              CMPA    #$04
D084 27 07              BEQ     B58
D086 3B                 RTI
D087 7E D1 70       B9:	JMP	BOX9
D08A 7E D5 C1      B20:	JMP	BOX20
D08D 7E D6 76      B58: JMP     BOX58
                        
D090 86 FF        BOX4:	LDAA	#$FF
D092 97 00              STAA	START	*SET START*
D094 86 01              LDAA	#$01	*CLEAR QUE*
D096 97 08              STAA	SFQ6    *default = 1mhz*
D098 86 00              LDAA	#$00    *ALTHOUGH THE ONE GETS CONVERTED TO*
D09A 97 07              STAA	SFQ5    *A THREE IN THE KEYPAD TRANSLATION*
D09C 97 06              STAA	SFQ4    *ROUTINE*
D09E 97 05              STAA	SFQ3
D0A0 97 04              STAA	SFQ2
D0A2 97 03              STAA	SFQ1
D0A4 97 02              STAA	SFQ0
D0A6 B6 B7 90           LDAA	$B790
D0A9 97 09              STAA	MESSH   *BEEP*
D0AB B6 B7 91           LDAA	$B791
D0AE 97 0A              STAA	MESSL
D0B0 BD C6 D7           JSR     SPEAK1         
D0B3 3B                 RTI
                        
D0B4 86 00        BOX6:	LDAA	#$00	*CLEAR START*
D0B6 97 00              STAA	START	*SPEAK CLEAR*
D0B8 97 01              STAA	END
D0BA B6 B7 92           LDAA	$B792
D0BD 97 09              STAA	MESSH
D0BF B6 B7 93           LDAA	$B793
D0C2 97 0A              STAA	MESSL
D0C4 BD C6 D7           JSR     SPEAK1
D0C7 86 00              LDAA	#$00 
D0C9 97 0D              STAA	DATA
D0CB 3B                 RTI
                        
D0CC 86 FF        BOX7:	LDAA	#$FF	*SET END BIT*
D0CE 97 01              STAA	END
D0D0 96 02              LDAA	SFQ0
D0D2 BD D1 37           JSR  	ADJ
D0D5 97 02              STAA	SFQ0
D0D7 96 03              LDAA	SFQ1
D0D9 BD D1 37           JSR  	ADJ
D0DC 97 03              STAA	SFQ1
D0DE 96 04              LDAA	SFQ2
D0E0 BD D1 37           JSR  	ADJ
D0E3 97 04              STAA	SFQ2
D0E5 96 05              LDAA	SFQ3
D0E7 BD D1 37           JSR 	ADJ
D0EA 97 05              STAA	SFQ3
D0EC 96 06              LDAA	SFQ4
D0EE BD D1 37           JSR     ADJ
D0F1 97 06              STAA	SFQ4
D0F3 96 07              LDAA	SFQ5
D0F5 BD D1 37           JSR 	ADJ
D0F8 97 07              STAA	SFQ5
D0FA 96 08              LDAA	SFQ6
D0FC BD D1 37           JSR 	ADJ
D0FF 97 08              STAA	SFQ6
                        
D101 CE 00 07           LDX	#$07	*CLEAR ALL BUT 3 DIG*
D104 09             CL:	DEX
D105 A6 02              LDAA	2,X
D107 81 00              CMPA	#$00
D109 27 F9              BEQ	CL	
D10B 8C 00 02           CPX	#$02   *X=1ST NON ZERO*
D10E 2F 0E              BLE	CL2
D110 09                 DEX
D111 09                 DEX
D112 09            CL1:	DEX
D113 86 00              LDAA	#$00
D115 A7 02              STAA	2,X	
D117 8C 00 00           CPX	#$00
D11A 27 02              BEQ	CL2
D11C 20 F4              BRA	CL1
D11E 96 08         CL2:	LDAA    SFQ6   *IF SFQ6 <> 0 THEN WE WANT TO LIMIT*
D120 81 00              CMPA    #$00   *SYNTHESIZER TO EXACTLY 1 MHZ*
D122 27 12              BEQ     CL3    *SO PUT A 1 IN SFQ6 AND A ZERO*	
D124 86 01              LDAA    #$01
D126 97 08              STAA    SFQ6   *STORE 1 MEGAHERTZ IN SFQ6 (MAX)*
D128 86 00              LDAA    #$00   *IN ALL OTHER FREQUENCY REGISTERS*
D12A 97 07              STAA    SFQ5
D12C 97 06              STAA    SFQ4
D12E 97 05              STAA    SFQ3
D130 97 04              STAA    SFQ2
D132 97 03              STAA    SFQ1
D134 97 02              STAA    SFQ0
D136 3B         CL3:    RTI
                        
D137 81 01         ADJ:	CMPA	#$01   *CONVERT KEYPAD ENTRIES TO *
D139 27 20              BEQ	THREE  *CORRECT NUMERIC VALUES* 
D13B 81 03              CMPA	#$03
D13D 27 19              BEQ	ONE
D13F 81 05              CMPA	#$05
D141 27 1B              BEQ	SIX
D143 81 06              CMPA	#$06
D145 27 1A              BEQ	FIVE
D147 81 07              CMPA	#$07
D149 27 19              BEQ	FOUR
D14B 81 0A              CMPA	#$0A
D14D 27 18              BEQ	EIGHT
D14F 81 0B              CMPA	#$0B
D151 27 17              BEQ	SEVEN
D153 81 0E              CMPA	#$0E
D155 27 16              BEQ	ZERO
D157 39                 RTS
                        
D158 86 01         ONE:	LDAA	#$01 
D15A 39                 RTS
D15B 86 03       THREE:	LDAA	#$03
D15D 39                 RTS
D15E 86 06         SIX:	LDAA	#$06
D160 39                 RTS
D161 86 05        FIVE:	LDAA	#$05
D163 39                 RTS
D164 86 04        FOUR:	LDAA	#$04
D166 39                 RTS
D167 86 08       EIGHT:	LDAA	#$08
D169 39                 RTS
D16A 86 07       SEVEN:	LDAA	#$07
D16C 39                 RTS
D16D 86 00        ZERO:	LDAA	#$00
D16F 39                 RTS
                        
                        
D170 86 FE        BOX9:	LDAA	#$FE
D172 97 00              STAA	START
D174 B6 B7 94           LDAA	$B794
D177 97 09              STAA	MESSH
D179 B6 B7 95           LDAA	$B795
D17C 97 0A              STAA	MESSL
D17E BD C6 D7           JSR	SPEAK1	*SAY LEVEL*
D181 BD C6 CE           JSR	PAUSE
D184 BD C6 D7           JSR	SPEAK1
D187 B6 B7 96           LDAA	$B796
D18A 97 09              STAA	MESSH
D18C B6 B7 97           LDAA	$B797
D18F 97 0A              STAA	MESSL
D191 BD C6 D7           JSR	SPEAK1	*SAY 2*
D194 3B                 RTI

                        
                        	 
D195 B6 10 03   BOX10:  LDAA	$1003
D198 84 0F              ANDA	#$0F
D19A 81 0F              CMPA	#$0F
D19C 27 3D              BEQ	B6
D19E 81 01              CMPA	#$01
D1A0 27 3C              BEQ	B11	*HERTZ*
D1A2 81 0E              CMPA	#$0E	*RECORD AND ENTER*
D1A4 27 3B              BEQ	B12
D1A6 81 02              CMPA	#$02
D1A8 27 3A              BEQ	B15	*12V PULSES*
D1AA 81 03              CMPA	#$03
D1AC 27 36              BEQ	B15   *5V PULSES*
D1AE 81 0D              CMPA	#$0D
D1B0 27 35              BEQ	B14	*ENTER*
D1B2 81 04              CMPA	#$04	*ATTACH FILTER*
D1B4 27 34              BEQ	B30
D1B6 81 05              CMPA	#$05	*HIGH PASS*
D1B8 27 33              BEQ	B31
D1BA 81 06              CMPA	#$06	*BAND PASS*
D1BC 27 32              BEQ	B32
D1BE 81 07              CMPA	#$07	*LOW PASS*
D1C0 27 31              BEQ	B33
D1C2 81 09              CMPA	#$09	*GAIN=1*
D1C4 27 30              BEQ	B34
D1C6 81 0A              CMPA	#$0A	*GAIN=0.1*
D1C8 27 2F              BEQ	B35
D1CA 81 0B              CMPA	#$0B	*GAIN=0.01*
D1CC 27 2E              BEQ	B36
D1CE 81 08              CMPA    #$08    *PROGRAM EEPROM FROM KEYPAD*
D1D0 27 2D              BEQ     B59
D1D2 81 00              CMPA    #$00    *MEASURE CAPACITANCE?*
D1D4 27 2C              BEQ     B65
D1D6 81 0C              CMPA    #$0C    *MEASURE INDUCTANCE?*
D1D8 27 30              BEQ     B66
D1DA 3B                 RTI
D1DB 7E D0 B4       B6:	JMP	BOX6
D1DE 7E D3 0B      B11:	JMP	BOX11
D1E1 7E D4 2E      B12:	JMP	BOX12
D1E4 7E D2 12      B15:	JMP	BOX15
D1E7 7E D2 59      B14:	JMP	BOX14		
D1EA 7E D3 22      B30:	JMP	BOX30
D1ED 7E D3 39      B31:	JMP	BOX31
D1F0 7E D3 5E      B32:	JMP	BOX32
D1F3 7E D3 83      B33:	JMP	BOX33
D1F6 7E D3 A8      B34:	JMP	BOX34
D1F9 7E D3 C1      B35:	JMP	BOX35
D1FC 7E D3 E9      B36:	JMP	BOX36
D1FF 7E D6 E4      B59: JMP     BOX59		
D202 86 02         B65: LDAA    #$02
D204 97 19              STAA    FLAG1  *TELL MAIN LOOP TO MEASURE CAPACITANCE*
D206 BD D8 BF           JSR     BEEP
D209 3B                 RTI
D20A 86 03         B66: LDAA    #$03   *TELL MAIN LOOP TO MEASURE INDUCTANCE*
D20C 97 19              STAA    FLAG1
D20E BD D8 BF           JSR     BEEP
D211 3B                 RTI
                        
D212 D6 0D       BOX15:	LDAB	DATA
D214 C1 00              CMPB	#$00
D216 27 01              BEQ	OVR1
D218 3B                 RTI
D219 97 0D        OVR1:	STAA	DATA
D21B 81 02              CMPA	#$02
D21D 27 10              BEQ	OVR2
D21F B6 B7 98           LDAA	$B798
D222 97 09              STAA	MESSH
D224 B6 B7 99           LDAA	$B799
D227 97 0A              STAA	MESSL
D229 BD C6 D7           JSR	SPEAK1	*12*
D22C 7E D2 37           JMP	OVR3
D22F B6 B7 9A     OVR2:	LDAA	$B79A
D232 97 0A              STAA	MESSL
D234 BD C6 D7           JSR	SPEAK1	*5*
D237 BD C6 CE     OVR3:	JSR	PAUSE
D23A BD C6 D7           JSR	SPEAK1
D23D B6 B7 9B           LDAA	$B79B
D240 97 09              STAA	MESSH
D242 B6 B7 9C           LDAA	$B79C
D245 97 0A              STAA	MESSL
D247 BD C6 D7           JSR	SPEAK1  *VOLT*	
D24A BD C6 CE           JSR	PAUSE
D24D BD C6 D7           JSR	SPEAK1
D250 B6 B7 9D           LDAA	$B79D
D253 97 0A              STAA	MESSL
D255 BD C6 D7           JSR	SPEAK1	*PULSES*
D258 3B                 RTI
                        
D259 96 0D       BOX14:	LDAA	DATA
D25B 81 02              CMPA	#$02
D25D 27 21              BEQ	SETB5
D25F 81 03              CMPA	#$03
D261 27 37              BEQ	CLRB5
D263 81 04              CMPA	#$04	*ATTACH?*
D265 27 3A              BEQ	B41
D267 81 05              CMPA	#$05	*HIGH PASS?*
D269 27 39              BEQ	B42
D26B 81 06              CMPA	#$06	*BAND PASS?*
D26D 27 38              BEQ	B43
D26F 81 07              CMPA	#$07	*LOW PASS?*
D271 27 37              BEQ	B44
D273 81 09              CMPA	#$09	*GAIN = 1?*
D275 27 36              BEQ	B45
D277 81 0A              CMPA	#$0A	*GAIN = .1?*
D279 27 35              BEQ	B46	
D27B 81 0B              CMPA	#$0B	*GAIN = .01?*
D27D 27 34              BEQ	B47
D27F 3B                 RTI
D280 18 1C 04 10 SETB5:	BSET	4,Y	$10
D284 B6 B7 9E      ENT:	LDAA	$B79E   *SAY ENTER*
D287 97 09              STAA	MESSH
D289 B6 B7 9F           LDAA	$B79F
D28C 97 0A              STAA	MESSL
D28E BD C6 D7           JSR	SPEAK1
D291 86 00              LDAA	#$00
D293 97 00              STAA	START
D295 97 0D              STAA	DATA
D297 97 01              STAA	END
D299 3B                 RTI
D29A 18 1D 04 10 CLRB5:	BCLR	4,Y	$10
D29E 7E D2 84           JMP	ENT
                        
D2A1 7E D2 B6      B41:	JMP	BOX41
D2A4 7E D2 C5      B42:	JMP	BOX42
D2A7 7E D2 D4      B43:	JMP	BOX43
D2AA 7E D2 E3      B44:	JMP	BOX44
D2AD 7E D2 EE      B45:	JMP	BOX45
D2B0 7E D2 F5      B46:	JMP	BOX46
D2B3 7E D3 00      B47:	JMP	BOX47
                        
D2B6 18 1C 04 20 BOX41:	BSET	4,Y $20 *SET K1 RELAY*
D2BA 18 1D 04 C0        BCLR	4,Y $C0 *CLEAR K2 AND K3 RELAY*
D2BE 18 1D 03 10        BCLR	3,Y $10 *CLEAR K4 RELAY*
D2C2 7E D2 84           JMP	ENT
                        
D2C5 18 1C 04 40 BOX42:	BSET	4,Y $40 *SET K2 RELAY*
D2C9 18 1D 04 A0        BCLR	4,Y $A0	*CLEAR K3 AND K1 RELAY*
D2CD 18 1D 03 10        BCLR	3,Y $10 *CLEAR K4 RELAY*
D2D1 7E D2 84           JMP     ENT
                        
D2D4 18 1C 04 80 BOX43:	BSET	4,Y $80 *SET K3 RELAY*
D2D8 18 1D 04 60        BCLR	4,Y $60	*CLEAR K1 AND K2 RELAY*
D2DC 18 1D 03 10        BCLR	3,Y $10 *CLEAR K4 RELAY*
D2E0 7E D2 84           JMP	ENT
                        
D2E3 18 1D 04 E0 BOX44:	BCLR	4,Y $E0 *CLEAR K1,K2,AND K3 RELAYS*
D2E7 18 1C 03 10        BSET	3,Y $10 *SET K4 RELAY*
D2EB 7E D2 84           JMP	ENT
                        
D2EE 18 1D 03 60 BOX45:	BCLR	3,Y $60 *CLEAR K5, K6 RELAYS*
D2F2 7E D2 84           JMP	ENT
                        
D2F5 18 1D 03 40 BOX46: BCLR	3,Y $40 *CLEAR K6 RELAY*
D2F9 18 1C 03 20        BSET	3,Y $20 *SET K5 RELAY*
D2FD 7E D2 84           JMP	ENT
                        
D300 18 1D 03 20 BOX47:	BCLR	3,Y $20 *CLEAR K5 RELAY*
D304 18 1C 03 40        BSET	3,Y $40 *SET K6 RELAY*
D308 7E D2 84           JMP	ENT

                         
                        
D30B D6 0D       BOX11:	LDAB	DATA
D30D C1 00              CMPB	#$00
D30F 27 01              BEQ	OVR
D311 3B                 RTI
D312 97 0D         OVR:	STAA	DATA	*SAY HERTZ*
D314 B6 B7 A0           LDAA	$B7A0
D317 97 09              STAA	MESSH
D319 B6 B7 A1           LDAA	$B7A1
D31C 97 0A              STAA	MESSL
D31E BD C6 D7           JSR	SPEAK1
D321 3B                 RTI
                        
D322 D6 0D       BOX30:	LDAB	DATA
D324 C1 00              CMPB	#$00
D326 27 01              BEQ	B30OVR
D328 3B                 RTI
D329 97 0D      B30OVR:	STAA	DATA
D32B B6 B7 A2           LDAA	$B7A2
D32E 97 09              STAA	MESSH
D330 B6 B7 A3           LDAA	$B7A3
D333 97 0A              STAA	MESSL
D335 BD C6 D7           JSR	SPEAK1
D338 3B                 RTI		*SAY CONNECT*
                        
D339 D6 0D       BOX31:	LDAB	DATA
D33B C1 00              CMPB	#$00
D33D 27 01              BEQ	B31OVR
D33F 3B                 RTI
D340 97 0D      B31OVR:	STAA	DATA
D342 B6 B7 A4           LDAA	$B7A4
D345 97 09              STAA	MESSH
D347 B6 B7 A5           LDAA	$B7A5
D34A 97 0A              STAA	MESSL
D34C BD C6 D7           JSR	SPEAK1	*SAY H*
D34F BD C6 CE           JSR	PAUSE
D352 BD C6 D7           JSR	SPEAK1	*20MS PAUSE*
D355 B6 B7 A6           LDAA	$B7A6
D358 97 0A              STAA	MESSL
D35A BD C6 D7           JSR	SPEAK1	*SAY P*
D35D 3B                 RTI
                        
D35E D6 0D       BOX32:	LDAB	DATA
D360 C1 00              CMPB	#$00
D362 27 01              BEQ	B32OVR
D364 3B                 RTI
D365 97 0D      B32OVR:	STAA	DATA
D367 B6 B7 A7           LDAA	$B7A7
D36A 97 09              STAA	MESSH
D36C B6 B7 A8           LDAA	$B7A8   *SAY B*
D36F 97 0A              STAA	MESSL
D371 BD C6 D7           JSR	SPEAK1
D374 BD C6 CE           JSR	PAUSE
D377 BD C6 D7           JSR	SPEAK1	*20MS PAUSE*
D37A B6 B7 A9           LDAA	$B7A9
D37D 97 0A              STAA	MESSL
D37F BD C6 D7           JSR	SPEAK1
D382 3B                 RTI

                        
D383 D6 0D       BOX33:	LDAB	DATA
D385 C1 00              CMPB	#$00
D387 27 01              BEQ	B33OVR
D389 3B                 RTI
D38A 97 0D      B33OVR:	STAA	DATA
D38C B6 B7 AA           LDAA	$B7AA
D38F 97 09              STAA	MESSH
D391 B6 B7 AB           LDAA	$B7AB	*SAY L*
D394 97 0A              STAA	MESSL
D396 BD C6 D7           JSR	SPEAK1
D399 BD C6 CE           JSR	PAUSE
D39C BD C6 D7           JSR	SPEAK1
D39F B6 B7 AC           LDAA	$B7AC
D3A2 97 0A              STAA	MESSL
D3A4 BD C6 D7           JSR	SPEAK1
D3A7 3B                 RTI
                        
D3A8 D6 0D       BOX34:	LDAB	DATA
D3AA C1 00              CMPB	#$00
D3AC 27 01              BEQ	B34OVR
D3AE 3B                 RTI
D3AF 97 0D      B34OVR:	STAA	DATA
D3B1 B6 B7 AD           LDAA	$B7AD
D3B4 97 09              STAA	MESSH
D3B6 B6 B7 AE           LDAA	$B7AE	*SAY 0*
D3B9 97 0A              STAA	MESSL
D3BB BD C6 D7           JSR	SPEAK1
D3BE BD D4 11           JSR	DB
                        
D3C1 D6 0D       BOX35:	LDAB	DATA
D3C3 C1 00              CMPB	#$00
D3C5 27 01              BEQ	B35OVR
D3C7 3B                 RTI
D3C8 97 0D      B35OVR:	STAA	DATA
D3CA B6 B7 AF           LDAA	$B7AF
D3CD 97 09              STAA	MESSH
D3CF B6 B7 B0           LDAA	$B7B0	*SAY MINUS*
D3D2 97 0A              STAA	MESSL
D3D4 BD C6 D7           JSR	SPEAK1
D3D7 BD C6 CE           JSR	PAUSE
D3DA BD C6 D7           JSR	SPEAK1	*20MS PAUSE*
D3DD B6 B7 B1           LDAA	$B7B1
D3E0 97 0A              STAA	MESSL	*SAY 20*
D3E2 BD C6 D7           JSR	SPEAK1
D3E5 BD D4 11           JSR	DB
D3E8 3B                 RTI
                        
D3E9 D6 0D       BOX36:	LDAB	DATA
D3EB C1 00              CMPB	#$00
D3ED 27 01              BEQ	B36OVR 
D3EF 3B                 RTI
D3F0 97 0D      B36OVR:	STAA	DATA
D3F2 B6 B7 B2           LDAA	$B7B2
D3F5 97 09              STAA	MESSH
D3F7 B6 B7 B3           LDAA	$B7B3
D3FA 97 0A              STAA	MESSL	*SAY MINUS*
D3FC BD C6 D7           JSR	SPEAK1
D3FF BD C6 CE           JSR	PAUSE
D402 BD C6 D7           JSR	SPEAK1	*20MS PAUSE*
D405 B6 B7 B4           LDAA	$B7B4
D408 97 0A              STAA	MESSL
D40A BD C6 D7           JSR	SPEAK1
D40D BD D4 11           JSR	DB
D410 3B                 RTI
                        
D411 BD C6 CE      DB:	JSR	PAUSE	*20MS PAUSE*
D414 BD C6 D7           JSR	SPEAK1
D417 B6 B7 B5           LDAA	$B7B5
D41A 97 0A              STAA	MESSL	*SAY D*
D41C BD C6 D7           JSR	SPEAK1
D41F BD C6 CE           JSR	PAUSE	*20MS PAUSE*
D422 BD C6 D7           JSR	SPEAK1
D425 B6 B7 B6           LDAA	$B7B6
D428 97 0A              STAA	MESSL
D42A BD C6 D7           JSR	SPEAK1	*SAY B*
D42D 39                 RTS
                        	
                        
D42E 96 0D       BOX12:	LDAA	DATA
D430 81 01              CMPA	#$01
D432 27 25              BEQ	B13
D434 81 02              CMPA	#$02
D436 27 24              BEQ	BOX17
D438 81 03              CMPA	#$03
D43A 27 29              BEQ	BOX18
D43C 81 04              CMPA	#$04
D43E 27 30              BEQ	B51	*SET B613*
D440 81 05              CMPA	#$05
D442 27 2F              BEQ	B52	*SET B614*
D444 81 06              CMPA	#$06
D446 27 2E              BEQ	B53	*SET B615
D448 81 07              CMPA	#$07
D44A 27 2D              BEQ	B54	*SET B616*
D44C 81 09              CMPA	#$09
D44E 27 2C              BEQ	B55	*CLEAR B617,B618*
D450 81 0A              CMPA	#$0A
D452 27 2B              BEQ	B56	*SET B617*
D454 81 0B              CMPA	#$0B
D456 27 2A              BEQ	B57	*SET B618*
D458 3B                 RTI
D459 7E D4 AE     B13:	JMP	BOX13
                        
                        
D45C CE B6 12    BOX17:	LDX	#$B612
D45F BD D5 87           JSR	ERASE
D462 7E D4 85           JMP	RECENT


                        
                        
D465 CE B6 12    BOX18:	LDX	#$B612
D468 C6 00              LDAB	#$00
D46A BD D5 A4           JSR	PROG
D46D 7E D4 85           JMP	RECENT
                        
D470 7E D4 FE     B51:	JMP	BOX51
D473 7E D5 15     B52:	JMP	BOX52
D476 7E D5 2C     B53:	JMP	BOX53
D479 7E D5 43     B54:	JMP	BOX54
D47C 7E D5 5A     B55:	JMP	BOX55
D47F 7E D5 69     B56:	JMP	BOX56
D482 7E D5 78     B57:	JMP	BOX57			
                        
D485 B6 B7 B7   RECENT: LDAA	$B7B7
D488 97 09              STAA	MESSH
D48A B6 B7 B8           LDAA	$B7B8
D48D 97 0A              STAA	MESSL	*RECORD*
D48F BD C6 D7           JSR	SPEAK1
D492 BD C6 CE           JSR	PAUSE
D495 BD C6 D7           JSR	SPEAK1
D498 B6 B7 B9           LDAA	$B7B9
D49B 97 09              STAA	MESSH
D49D B6 B7 BA           LDAA	$B7BA
D4A0 97 0A              STAA	MESSL	*AND*
D4A2 BD C6 D7           JSR	SPEAK1
D4A5 BD C6 CE           JSR	PAUSE
D4A8 BD C6 D7           JSR	SPEAK1
D4AB 7E D2 59           JMP	BOX14
                        
                        
D4AE CE B6 10    BOX13:	LDX	#$B610
D4B1 BD D5 87           JSR	ERASE
D4B4 D6 0B              LDAB	SYNH
D4B6 BD D5 A4           JSR	PROG
D4B9 CE B6 11           LDX	#$B611
D4BC BD D5 87           JSR	ERASE
D4BF D6 0C              LDAB	SYNL
D4C1 BD D5 A4           JSR	PROG
                        
D4C4 86 00              LDAA	#$00
D4C6 97 00              STAA	START
D4C8 97 0D              STAA	DATA
D4CA B6 B7 BB           LDAA	$B7BB
D4CD 97 09              STAA	MESSH
D4CF B6 B7 BC           LDAA	$B7BC   *RECORD*
D4D2 97 0A              STAA	MESSL
D4D4 BD C6 D7           JSR	SPEAK1
D4D7 BD C6 CE           JSR	PAUSE
D4DA BD C6 D7           JSR	SPEAK1
D4DD B6 B7 BD           LDAA	$B7BD
D4E0 97 09              STAA	MESSH
D4E2 B6 B7 BE           LDAA	$B7BE	*AND*
D4E5 97 0A              STAA	MESSL
D4E7 BD C6 D7           JSR	SPEAK1
D4EA BD C6 CE           JSR	PAUSE
D4ED BD C6 D7           JSR	SPEAK1
D4F0 B6 B7 BF           LDAA	$B7BF
D4F3 97 09              STAA	MESSH
D4F5 B6 B7 C0           LDAA	$B7C0
D4F8 97 0A              STAA	MESSL
D4FA BD C6 D7           JSR	SPEAK1
D4FD 3B                 RTI
                        
                        
D4FE CE B6 13    BOX51:	LDX	#$B613	*ERASE B613*
D501 BD D5 87           JSR	ERASE
D504 C6 00              LDAB	#$00
D506 08                 INX	
D507 BD D5 A4           JSR	PROG	*B614=00*
D50A 08                 INX
D50B BD D5 A4           JSR	PROG	*B615=00*
D50E 08                 INX	
D50F BD D5 A4           JSR	PROG	*B616=00*
D512 7E D4 85           JMP	RECENT
                        
D515 CE B6 13    BOX52:	LDX	#$B613
D518 C6 00              LDAB	#$00
D51A BD D5 A4           JSR	PROG	*B613=00*
D51D 08                 INX
D51E BD D5 87           JSR	ERASE	*B614=FF*
D521 08                 INX
D522 BD D5 A4           JSR	PROG	*B615=00*
D525 08                 INX
D526 BD D5 A4           JSR	PROG	*B616=00*
D529 7E D4 85           JMP	RECENT
                        
D52C CE B6 13    BOX53:	LDX	#$B613
D52F C6 00              LDAB	#$00
D531 BD D5 A4           JSR	PROG	*B613=00*
D534 08                 INX
D535 BD D5 A4           JSR	PROG	*B614=0*
D538 08                 INX	
D539 BD D5 87           JSR	ERASE	*B615=FF*
D53C 08                 INX
D53D BD D5 A4           JSR	PROG	*B616=00*
D540 7E D4 85           JMP	RECENT
                        
D543 CE B6 13    BOX54:	LDX	#$B613
D546 C6 00              LDAB	#$00
D548 BD D5 A4           JSR	PROG	*B613=00*
D54B 08                 INX
D54C BD D5 A4           JSR	PROG	*B614=00*
D54F 08                 INX
D550 BD D5 A4           JSR	PROG	*B615=00*
D553 08                 INX
D554 BD D5 87           JSR	ERASE	*B616=FF*
D557 7E D4 85           JMP	RECENT
                        
D55A CE B6 17    BOX55:	LDX	#$B617
D55D C6 00              LDAB	#$00
D55F BD D5 A4           JSR	PROG	*B617=0*
ŠD562 08                 INX
D563 BD D5 A4           JSR	PROG	*B618=00*
D566 7E D4 85           JMP	RECENT
                        
D569 CE B6 17    BOX56:	LDX	#$B617
D56C C6 00              LDAB	#$00
D56E BD D5 87           JSR	ERASE	*B617=FF*
D571 08                 INX
D572 BD D5 A4           JSR	PROG	*B618=00*
D575 7E D4 85           JMP	RECENT
                        
D578 CE B6 17    BOX57:	LDX	#$B617
D57B C6 00              LDAB	#$00
D57D BD D5 A4           JSR	PROG	*B617=00*
D580 08                 INX
D581 BD D5 87           JSR	ERASE	*B618=FF*
D584 7E D4 85           JMP	RECENT
                        
                        
                        
                        
                        
D587 86 16       ERASE:	LDAA	#$16	*ERASE EEPROM*
D589 B7 10 3B           STAA	$103B
D58C A7 00              STAA	0,X  	*LOC X*    
D58E 86 17              LDAA	#$17
D590 B7 10 3B           STAA	$103B
D593 BD C6 CE           JSR 	PAUSE
D596 BD C6 D7           JSR	SPEAK1
D599 86 16              LDAA	#$16
D59B B7 10 3B           STAA	$103B
D59E 86 00              LDAA	#$00
D5A0 B7 10 3B           STAA    $103B
D5A3 39                 RTS
                        
                        					    
D5A4 86 02      PROG:  	LDAA	#$02
D5A6 B7 10 3B           STAA	$103B
D5A9 E7 00              STAB	0,X  
D5AB 86 03              LDAA	#$03
D5AD B7 10 3B           STAA	$103B
D5B0 BD C6 CE           JSR	PAUSE
D5B3 BD C6 D7           JSR	SPEAK1
D5B6 86 02              LDAA	#$02
D5B8 B7 10 3B           STAA	$103B
D5BB 86 00              LDAA	#$00
D5BD B7 10 3B           STAA	$103B
D5C0 39                 RTS
                        
                        
D5C1 B6 B7 C1    BOX20:	LDAA	$B7C1
D5C4 97 09              STAA	MESSH
D5C6 B6 B7 C2           LDAA	$B7C2	*PLEASE*
D5C9 97 0A              STAA	MESSL	*WAIT*
D5CB BD C6 D7           JSR	SPEAK1	*5 MINUTES*
D5CE BD C6 CE           JSR 	PAUSE	* FOR CIRCUIT*
D5D1 BD C6 D7           JSR	SPEAK1	*CHECK*
D5D4 B6 B7 C3           LDAA	$B7C3
D5D7 97 0A              STAA	MESSL
D5D9 BD C6 D7           JSR	SPEAK1
D5DC BD C6 CE           JSR	PAUSE
D5DF BD C6 D7           JSR	SPEAK1
D5E2 B6 B7 C4           LDAA	$B7C4
D5E5 97 0A              STAA	MESSL
D5E7 BD C6 D7           JSR	SPEAK1
D5EA BD C6 CE           JSR	PAUSE
D5ED BD C6 D7           JSR	SPEAK1
D5F0 B6 B7 C5           LDAA	$B7C5
D5F3 97 0A              STAA	MESSL
D5F5 BD C6 D7           JSR	SPEAK1
D5F8 B6 B7 C6           LDAA	$B7C6
D5FB 97 0A              STAA	MESSL
D5FD BD C6 D7           JSR 	SPEAK1
D600 BD C6 CE           JSR	PAUSE
D603 BD C6 D7           JSR	SPEAK1
D606 B6 B7 C7           LDAA	$B7C7
D609 97 0A              STAA	MESSL
D60B BD C6 D7           JSR	SPEAK1
D60E BD C6 CE           JSR	PAUSE
D611 BD C6 D7           JSR	SPEAK1
D614 B6 B7 C8           LDAA	$B7C8
D617 97 09              STAA	MESSH
D619 B6 B7 C9           LDAA	$B7C9
D61C 97 0A              STAA	MESSL
D61E BD C6 D7           JSR	SPEAK1
D621 BD C6 CE           JSR	PAUSE
D624 BD C6 D7           JSR	SPEAK1
D627 B6 B7 CA           LDAA	$B7CA
D62A 97 09              STAA	MESSH
D62C B6 B7 CB           LDAA	$B7CB
D62F 97 0A              STAA	MESSL
D631 BD C6 D7           JSR	SPEAK1
D634 86 FD              LDAA	#$FD
D636 97 00              STAA	START
D638 3B                 RTI
                        
D639 B6 10 03    BOX21:	LDAA	$1003
D63C 84 0F              ANDA	#$0F
D63E 81 0F              CMPA	#$0F
D640 27 05              BEQ	B22
D642 81 0D              CMPA	#$0D
D644 27 04              BEQ	WR 
D646 3B                 RTI
D647 7E D0 B4     B22:	JMP	BOX6
                        
D64A BD C6 CE      WR:	JSR	PAUSE
D64D BD C6 D7           JSR	SPEAK1
D650 B6 B7 CC           LDAA	$B7CC
D653 97 09              STAA	MESSH
D655 B6 B7 CD           LDAA	$B7CD
D658 97 0A              STAA	MESSL	*SPEAK ENTER*
D65A BD C6 D7           JSR	SPEAK1
D65D BD C6 CE           JSR	PAUSE
D660 BD C6 D7           JSR	SPEAK1
D663 86 FD              LDAA	#$FD
D665 97 01              STAA	END	*SET END*
D667 BD C4 80      WR1:	JSR	CAL
D66A 86 00              LDAA	#$00
D66C 97 0E              STAA	RESULT	*CLEAR RESULT*
D66E B6 B7 0F           LDAA	$B70F
D671 81 01              CMPA	#$01
D673 26 F2              BNE	WR1
D675 3B                 RTI
                        
D676 86 01      BOX58:  LDAA	#$01
D678 97 19              STAA    FLAG1  	*TURN TOGGLE ON TO ACTIVATE FREQ *
D67A B6 B7 90           LDAA	$B790   *COUNTER AND BEEP*
D67D 97 09              STAA    MESSH
D67F B6 B7 91           LDAA    $B791
D682 97 0A              STAA    MESSL
D684 BD C6 D7           JSR	SPEAK1
D687 3B                 RTI
                        
                        
D688 81 01        ADJ1:	CMPA	#$01   *CONVERT KEYPAD ENTRIES TO *
D68A 27 34              BEQ	THREEA *CORRECT NUMERIC VALUES* 
D68C 81 03              CMPA	#$03
D68E 27 2D              BEQ	ONEA
D690 81 05              CMPA	#$05   *KEYPAD IS LABELED AS FOLLOWS*
D692 27 2F              BEQ	SIXA   *  1   2   3   A*
D694 81 06              CMPA	#$06   *  4   5   6   B* 
D696 27 2E              BEQ	FIVEA  *  7   8   9   C*
D698 81 07              CMPA	#$07   *  F   0   E   D*
D69A 27 2D              BEQ	FOURA
D69C 81 0A              CMPA	#$0A
D69E 27 2C              BEQ	EIGHTA *HOWEVER THE 6811 READS IT AS FOLLOWS*
D6A0 81 0B              CMPA	#$0B   *  3   2   1   0*
D6A2 27 2B              BEQ	SEVENA *  7   6   5   4*
D6A4 81 0E              CMPA	#$0E   *  B   A   9   8*
D6A6 27 2A              BEQ	ZEROA  *  F   E   D   C*
D6A8 81 00              CMPA    #$00
D6AA 27 29              BEQ     A
D6AC 81 04              CMPA    #$04
D6AE 27 28              BEQ     B
D6B0 81 08              CMPA    #$08
D6B2 27 27              BEQ     C
D6B4 81 0C              CMPA    #$0C
D6B6 27 26              BEQ     D
D6B8 81 0D              CMPA    #$0D
D6BA 27 25              BEQ     E
D6BC 39                 RTS
                        
D6BD 86 01       ONEA:	LDAA	#$01 
D6BF 39                 RTS
D6C0 86 03      THREEA:	LDAA	#$03
D6C2 39                 RTS
D6C3 86 06        SIXA:	LDAA	#$06
D6C5 39                 RTS
D6C6 86 05       FIVEA:	LDAA	#$05
D6C8 39                 RTS
D6C9 86 04       FOURA:	LDAA	#$04
D6CB 39                 RTS
D6CC 86 08      EIGHTA:	LDAA	#$08
D6CE 39                 RTS
D6CF 86 07      SEVENA:	LDAA	#$07
D6D1 39                 RTS
D6D2 86 00       ZEROA:	LDAA	#$00
D6D4 39                 RTS
D6D5 86 0A          A:	LDAA    #$0A
D6D7 39                 RTS
D6D8 86 0B          B:	LDAA    #$0B
D6DA 39                 RTS
D6DB 86 0C          C:	LDAA    #$0C
D6DD 39                 RTS
D6DE 86 0D          D:	LDAA    #$0D
D6E0 39                 RTS
D6E1 86 0E          E:	LDAA    #$0E
D6E3 39                 RTS
                        
D6E4 18 1D 03 F0   BOX59:  BCLR    3,Y $F0 *ONLY WANT TO LOOK AT LOWER 4 BITS*
D6E8 B6 B7 9E              LDAA    $B79E   *OF INPUT DATA FROM TEST1* 
D6EB 97 09                 STAA    MESSH
D6ED B6 B7 9F              LDAA	   $B79F   *SAY ENTER*
D6F0 97 0A                 STAA    MESSL
D6F2 BD C6 D7              JSR 	   SPEAK1
D6F5 B6 B7 D3              LDAA    $B7D3  
D6F8 97 09                 STAA    MESSH
D6FA B6 B7 D4              LDAA    $B7D4
D6FD 97 0A                 STAA    MESSL	*SECURE*
D6FF BD C6 D7              JSR	   SPEAK1
D702 86 55                 LDAA	   #$55
D704 B7 10 3A              STAA	   $103A	*RESET COP*
D707 86 AA                 LDAA	   #$AA
D709 B7 10 3A              STAA	   $103A	*2 STEP PROCEDURE*
D70C B6 B7 D5              LDAA    $B7D5
D70F 97 09                 STAA    MESSH
D711 B6 B7 D6              LDAA	   $B7D6
D714 97 0A                 STAA    MESSL	*SYSTEM*
D716 BD C6 D7              JSR	   SPEAK1
D719 B6 B7 D7              LDAA	   $B7D7
D71C 97 09                 STAA	   MESSH
D71E B6 B7 D8              LDAA    $B7D8   *NUMBER*
D721 97 0A                 STAA	   MESSL
D723 BD C6 D7              JSR	   SPEAK1
D726 86 FF                 LDAA	   #$FF
D728 97 17                 STAA	   TEMP
D72A BD D8 A7              JSR	   TEST1   *ACCESS CODE IS 123*
D72D BD D8 BF              JSR 	   BEEP    *TEST KEYPAD ENTRY* 
D730 B6 10 03              LDAA	   $1003   *IS IT 03?*
D733 81 03                 CMPA	   #$03    *IF NOT SET FLAG*
D735 27 04                 BEQ     ASD  
D737 86 00                 LDAA	   #$00
D739 97 17                 STAA	   TEMP
D73B BD D8 A7      ASD:	   JSR	   TEST1   *TEST KEYPAD ENTRY*
D73E BD D8 BF              JSR	   BEEP    *IS IT 02?*
D741 B6 10 03              LDAA	   $1003   *IF NOT SET FLAG*
D744 81 02                 CMPA	   #$02
D746 27 04                 BEQ	   ASE
D748 86 00                 LDAA	   #$00
D74A 97 17                 STAA	   TEMP
D74C BD D8 A7      ASE:	   JSR	   TEST1   *TEST KEYPAD ENTRY*
D74F BD D8 BF              JSR	   BEEP    *IS IT 01?*
D752 B6 10 03              LDAA	   $1003   *IF NOT SET FLAG*
D755 81 01                 CMPA	   #$01
D757 27 04                 BEQ     ASF
D759 86 00                 LDAA	   #$00
D75B 97 17                 STAA	   TEMP
D75D 96 17         ASF:	   LDAA	   TEMP
D75F 81 FF                 CMPA	   #$FF
D761 27 18                 BEQ	   BOX60    *IF FLAG NOT SET, THEN CONTINUE*
D763 20 00                 BRA	   BOX61    *ELSE QUIT*
                        
D765 B6 B7 D9      BOX61:  LDAA    $B7D9
D768 97 09                 STAA    MESSH
D76A B6 B7 DA              LDAA    $B7DA    *SAY INCORRECT*
D76D 97 0A                 STAA    MESSL
D76F BD C6 D7              JSR     SPEAK1
D772 86 00                 LDAA    #$00
D774 97 00                 STAA    START    *CLEAR START, DATA, AND END FLAGS*
D776 97 0D                 STAA    DATA
D778 97 01                 STAA    END
D77A 3B                    RTI
                        
D77B B6 B7 DB    BOX60:	   LDAA	   $B7DB
D77E 97 09                 STAA    MESSH   *SAY START AT*
D780 B6 B7 DC              LDAA    $B7DC
D783 97 0A                 STAA    MESSL
D785 BD C6 D7              JSR	   SPEAK1
D788 B6 B7 DD              LDAA    $B7DD
D78B 97 0A                 STAA    MESSL
D78D BD C6 D7              JSR     SPEAK1
D790 BD D8 A7              JSR     TEST1  *YOU KEY IN THE EEPROM STARTING*
D793 B6 10 03              LDAA    $1003  *THAT YOU WANT TO MODIFY - 4 DIGITS*
D796 BD D6 88              JSR     ADJ1
D799 97 08                 STAA    SFQ6
D79B BD D8 8C              JSR     SPEAK2
D79E BD D8 A7              JSR	   TEST1   *PROCESS SECOND DIGIT*
D7A1 B6 10 03              LDAA    $1003
D7A4 BD D6 88              JSR	   ADJ1
D7A7 97 07                 STAA    SFQ5
D7A9 BD D8 8C              JSR	   SPEAK2
D7AC BD D8 A7              JSR	   TEST1   *PROCESS THIRD DIGIT*
D7AF B6 10 03              LDAA    $1003
D7B2 BD D6 88              JSR	   ADJ1
D7B5 97 06                 STAA    SFQ4
D7B7 BD D8 8C              JSR 	   SPEAK2
D7BA BD D8 A7              JSR     TEST1   *PROCESS FORTH DIGIT*
D7BD B6 10 03              LDAA    $1003
D7C0 BD D6 88              JSR	   ADJ1
D7C3 97 05                 STAA    SFQ3
D7C5 BD D8 8C              JSR	   SPEAK2
D7C8 96 08                 LDAA	   SFQ6   *GENERATE VALUE FOR X REGISTER *
D7CA D6 06                 LDAB	   SFQ4   *FROM SFQ6, SFQ5, SFQ4, AND SFQ3*
D7CC 05                    ASLD
D7CD 05                    ASLD
D7CE 05                    ASLD
D7CF 05                    ASLD
D7D0 9A 07                 ORAA    SFQ5
D7D2 DA 05                 ORAB    SFQ3
D7D4 8F                    XGDX          *STORE POINTER IN X REGISTER*
D7D5 B6 B7 DE       ABD:   LDAA	   $B7DE  *SAY EQUALS*
D7D8 97 09                 STAA    MESSH
D7DA B6 B7 DF              LDAA    $B7DF
D7DD 97 0A                 STAA    MESSL
D7DF BD C6 D7              JSR     SPEAK1 *SAY EQUAL*
D7E2 B6 B7 E0              LDAA    $B7E0
D7E5 97 0A                 STAA    MESSL  *PUT THE S ON THE END OF EQUAL*
D7E7 BD C6 D7              JSR     SPEAK1
D7EA A6 00                 LDAA    0,X
D7EC 44                    LSRA
D7ED 44                    LSRA
D7EE 44                    LSRA
D7EF 44                    LSRA
D7F0 BD D8 8C              JSR     SPEAK2  *SAY WHAT IS IN MEMORY LOCATION X*
D7F3 A6 00                 LDAA    0,X
D7F5 84 0F                 ANDA    #$0F
D7F7 BD D8 8C              JSR     SPEAK2  *TWICE SINCE X CONTAINS TWO DIGITS*
                        
D7FA BD D8 A7      ABC:	  JSR     TEST1    *LOOK FOR NEXT, CLEAR, OR ENTER*
D7FD B6 10 03             LDAA    $1003
D800 81 0C                CMPA    #$0C
D802 27 62                BEQ     BOX64    *NEXT*
D804 81 0D                CMPA    #$0D
D806 27 14                BEQ     BOX63    *ENTER*
D808 81 0F                CMPA    #$0F
D80A 27 0D                BEQ     BOX62    *CLEAR*
D80C 86 55                LDAA    #$55
D80E B7 10 3A             STAA    $103A  *RESET COP BY WRITING AA*
D811 86 AA                LDAA    #$AA   *THEN 55*
D813 B7 10 3A             STAA    $103A 	
D816 7E D7 FA             JMP     ABC
                        
D819 7E D0 B4     BOX62:  JMP     BOX6     *SAY CLEAR AND CLEAR FLAGS AND RTI*
                        
D81C B6 B7 9E     BOX63:  LDAA    $B79E
D81F 97 09                STAA    MESSH
D821 B6 B7 9F             LDAA    $B79F
D824 97 0A                STAA    MESSL   *SAY ENTER*
D826 BD C6 D7             JSR	  SPEAK1
D829 BD D8 A7             JSR     TEST1   *GET FIRST DIGIT OF OP-CODE*
D82C B6 10 03             LDAA    $1003
D82F BD D6 88             JSR     ADJ1   *ADJUST FOR KEYPAD CONTORTION*
D832 BD D8 8C             JSR     SPEAK2 *SAY IT*
D835 F6 10 03             LDAB    $1003  *PUT FIRST DIGIT OF OP-CODE IN ACC B*
D838 D7 17                STAB    TEMP   *MOVE ACCUMULATOR B TO ACCUMULATOR A*
D83A 96 17                LDAA    TEMP 
D83C BD D6 88             JSR     ADJ1   *ADJUST FOR KEYPAD CONTORTION*
D83F 97 17                STAA    TEMP   *MOVE ACCUMULATOR A TO ACCUMULATOR B*
D841 D6 17                LDAB    TEMP
D843 58                   ASLB            *MOVE TO HIGH BYTE*
D844 58                   ASLB
D845 58                   ASLB
D846 58                   ASLB
D847 BD D8 A7             JSR	TEST1   *GET SECOND DIGIT OF OP-CODE*
D84A B6 10 03             LDAA  $1003
D84D BD D6 88             JSR	ADJ1    *ADJUST FOR KEYPAD CONTORTION*
D850 BD D8 8C             JSR   SPEAK2  *SAY IT*
D853 B6 10 03             LDAA  $1003
D856 BD D6 88             JSR   ADJ1    *ADJUST FOR KEYPAD CONTORTION*
D859 97 17                STAA  TEMP
D85B DA 17                ORB   TEMP    *ACCUMULATOR B CONTAINS 2 DIG OP-CODE*
D85D BD D5 87             JSR	ERASE   *ERASE LOCATION X IN EEPROM*
D860 BD D5 A4             JSR   PROG    *PROGRAM LOCATION X IN EEPROM*
D863 7E D7 FA             JMP   ABC     *WITH CONTENTS OF ACCUM B AND RETURN*
                        
D866 08          BOX64:	INX             *LOOK AT NEXT EEPROM ADDRESS*
D867 DF 07              STX     SFQ5    *STORE X IN SFQ6 AND SFQ5*
D869 96 07              LDAA    SFQ5        	 
D86B 44                 LSRA            *MOVE TO LOWER BYTE*
D86C 44                 LSRA
D86D 44                 LSRA
D86E 44                 LSRA
D86F BD D8 8C           JSR    SPEAK2 *SAY FIRST DIGIT OF NEXT EEPROM ADDRESS*
D872 96 07              LDAA   SFQ5  *SAY SECOND DIGIT OF NEXT EEPROM ADDRESS*
D874 84 0F              ANDA   #$0F
D876 BD D8 8C           JSR    SPEAK2 
D879 96 08              LDAA   SFQ6   *SAY THIRD DIGIT OF NEXT EEPROM ADDRESS*
D87B 44                 LSRA
D87C 44                 LSRA
D87D 44                 LSRA
D87E 44                 LSRA
D87F BD D8 8C           JSR    SPEAK2
D882 96 08              LDAA   SFQ6   *SAY FORTH DIGIT OF NEXT EEPROM ADDRESS*
D884 84 0F              ANDA   #$0F
D886 BD D8 8C           JSR    SPEAK2
D889 7E D7 D5           JMP    ABD    *SAY TWO DIGIT OP-CODE AT THAT ADDRESS*
                          
D88C 81 0A      SPEAK2:	CMPA    #$0A    *SPEAK 0-9, A-F*
D88E 25 02              BLO     AEW
D890 8B 16              ADDA    #$16
D892 81 00         AEW: CMPA    #$00
D894 26 03              BNE     AER
D896 B6 B7 AE           LDAA    $B7AE  *DIGITALKER WORD FOR ZERO IS 1F*
D899 97 0A         AER:	STAA    MESSL
D89B B6 B7 AD           LDAA    $B7AD
D89E 97 09              STAA    MESSH
D8A0 BD C6 D7           JSR     SPEAK1
D8A3 BD C6 CE           JSR     PAUSE
D8A6 39                 RTS
                        
D8A7 86 55      TEST1:  LDAA    #$55
D8A9 B7 10 3A           STAA    $103A  *RESET COP BY WRITING AA*
D8AC 86 AA              LDAA    #$AA   *THEN 55*
D8AE B7 10 3A           STAA    $103A 	
D8B1 B6 10 02           LDAA	$1002
D8B4 84 80              ANDA    #$80   *IS KEYPAD INTERRUPT FLAG SET?*
D8B6 27 EF              BEQ     TEST1  *IF NOT, WAIT FOR KEYPAD ENTRY*
D8B8 B6 10 02           LDAA	$1002  *RESET INTERRUPT FLAG*
D8BB B6 10 05           LDAA    $1005  *IS TWO INSTRUCTIONS*
D8BE 39                 RTS						
                        
D8BF B6 B7 90    BEEP:	LDAA    $B790
D8C2 97 09              STAA    MESSH
D8C4 B6 B7 91           LDAA    $B791
D8C7 97 0A              STAA    MESSL
D8C9 BD C6 D7           JSR	SPEAK1
D8CC 39                 RTS
                        
DE00                    ORG   $DE00
DE00 96 15              LDAA	$15   *LOAD THE NUMBER OF TIMES THAT THE*
DE02 8B 56              ADDA	#$56  *PULSE ACCUMULATOR OVERFLOWS INTO* 
DE04 19                 DAA           *MEMORY LOCATION $13, $14, AND $15*
DE05 97 15              STAA	$15   *MEMORY LOCATION $15 ALWAYS SUMS*
DE07 96 14              LDAA	$14   *THE PULSE ACCUMULATOR REMAINDER*	
DE09 89 02              ADCA	#$02  *WHICH IS ALWAYS 56*
DE0B 19                 DAA
DE0C 97 14              STAA	$14
DE0E 96 13              LDAA	$13
DE10 89 00              ADCA	#$00
DE12 19                 DAA
DE13 97 13              STAA	$13
DE15 86 20              LDAA	#$20  *CLEAR PULSE ACCUMULATOR OVERFLOW FLAG*
DE17 B7 10 25           STAA	$1025
DE1A 3B                 RTI
                        
DF00                    ORG	$DF00
DF00 86 08              LDAA    #$08
DF02 B7 10 23           STAA    $1023  *CLEAR OUTPUT COMPARE 5 INTERRUPT FLAG*
DF05 FC 10 1E           LDD	$101E  *GET NUMBER IN OUT COMPARE REGISTER 5*
DF08 C3 F4 24           ADDD    #$F424 *ADD 62500 - NOTE 2,000,000/16=125,000*
DF0B FD 10 1E           STD     $101E
DF0E 96 18              LDAA	$18   *IF REGISTER 18 CONTAINS A 0*
DF1) 27 07              BEQ	 DF1   *THEN THIS ROUTINE HAS BEEN DONE TWICE*
DF12 86 00              LDAA    #$00  *SO GO TO DF20 FOR PROCESSING OF *
DF14 97 18              STAA    $18   *COUNTED DATA*
DF16 7E DF 30           JMP     DF2
DF19 86 FF         DF1:	LDAA    #$FF
DF1B 97 18              STAA    $18
DF1D 3B                 RTI
                        
DF30                    ORG    $df30
DF30 BD DF 34      DF2:	JSR     BCDX
DF33 3B                 RTI
                        
DF34 86 03      BCDX:   LDAA    #$03
DF36 B7 10 24           STAA    $1024   *DISABLE PULSE ACC OVERFLOW INTERRUPT*
DF39 DC 13              LDD	$13	*MOVE WORKING REGISTER 13 AND 14 *
DF3B DD 10              STD     $10     *TO 10 AND 11*
DF3D 96 15              LDAA	$15
DF3F 97 12              STAA	$12    *MOVE WORKING REGISTER 12 TO 10*
DF41 86 00              LDAA    #$00
DF43 97 13              STAA    $13     *CLEAR REGISTERS 13, 14, AND 15*
DF45 97 14              STAA    $14
DF47 97 15              STAA    $15
DF49 F6 10 27           LDAB    $1027  *STORE FINAL PULSE ACCUMULATOR COUNT*
DF4C D7 16              STAB    $16    *IN REGISTER 16 *
DF4E C1 F0              CMPB    #$F0   *DON'T PROCESS OVERFLOW FLAG IF PA IS*
DF50 22 1F              BHI	UI     *NEAR THE TOP OF ITS RANGE*
DF52 B6 10 25           LDAA    $1025
DF55 84 20              ANDA    #$20   *IF PULSE ACCUM OVERFLOW INTERRUPT*
DF57 27 18              BEQ     UI     *FLAG GOT SET WHILE IN THIS INT SERV*
DF59 B7 10 25           STAA    $1025  * THEN IT MUST BE PROCESSED BY ADDING*	
DF5C 96  2              LDAA    $12    *AN EXTRA 256 COUNTS TO REGS 10-12*
DF5E 8B 56              ADDA    #$56   *AND THEN RESET THE FLAG, ELSE IF THE*
DF60 19                 DAA            *FREQUENCY TO BE COUNTED IS AN INTEGER*
DF61 97 12              STAA    $12    *MULTIPLE OF 256, THEN THE COUNT MIGHT*
DF63 96 11              LDAA    $11    *BE IN ERROR BY A MULTIPLE OF 256*
DF65 89 02              ADCA    #$02
DF67 19                 DAA 
DF68 97 11              STAA    $11
DF6A 96 10              LDAA    $10
DF6C 89 00              ADCA    #$00
DF6E 19                 DAA
DF6F 97 10              STAA    $10 
DF71 86 00         UI:	LDAA	#$00
DF73 B7 10 27           STAA    $1027  *CLEAR PULSE ACCUMULATOR*
DF76 86 20              LDAA    #$20
DF78 B7 10 25           STAA    $1025  *CLEAR PULSE ACCUM OVERFLOW INT FLAG*
DF7B 86 00              LDAA    #$00
DF7D D6 16              LDAB	$16
DF7F 27 1A              BEQ     DF3    *CONVERT BINARY COUNT IN ACCUMULATOR B*
DF81 8B 01        DF5:	ADDA    #01    *TO BCD AND ADD TO REGISTER 12*
DF83 19                 DAA
DF84 24 12              BCC     DF4
DF86 97 17              STAA    $17
DF88 96 11              LDAA	$11
DF8A 89 00              ADCA    #00
DF8C 19                 DAA
DF8D 97 11              STAA    $11
DF8F 96 10              LDAA    $10
DF91 89 00              ADCA    #00
DF93 19                 DAA
DF94 97 10              STAA    $10
DF96 96 17              LDAA    $17
DF98 5A            DF4:	DECB
DF99 26 E6              BNE     DF5
DF9B 9B 12         DF3: ADDA    $12   *ADD CONVERTER BCD  NUMBER TO REGISTERS*
DF9D 19                 DAA           *10-12*
DF9E 97 12              STAA   $12
DFA0 96 11              LDAA   $11
DFA2 89 00              ADCA   #00
DFA4 19                 DAA
DFA5 97 11              STAA	$11
DFA7 96 10              LDAA	$10
DFA9 89 00              ADCA    #00
DFAB 19                 DAA
DFAC 97 10              STAA    $10
DFAE 86 23              LDAA    #$23
DFB0 B7 10 24           STAA    $1024  *ENABLE PULSE ACC OVERFLOW INTERRUPT*
DFB3 39                 RTS   
Errors: 0

 

Return to 68HC11 Start Page