******
** SUMP_1.ASM  (68HC11)
**
** Switches S1 and S0 on I/O Box simulate high and low switches.
**
** When water is high, S1 goes to 1 and pump starts.  Pump continues
** to run even though S1 goes back to zero as water level drops.  When 
** water level is sufficiently low, S0 goes to 1 and pump turns off.
** 
**
** P. H. Anderson, MSU, 6 Feb 93
*******

PSCT 		EQU $C000
DSCT		EQU $D000
IDSCT		EQU $D300

REG_BASE	EQU $1000

PORTB   EQU $04
PORTC   EQU $03
DDRC    EQU $07

        ORG PSCT

	LDY #REG_BASE
        CLR DDRC,Y      * portc configured as input

L1
	BRSET PORTC,Y %00000010 TURN_ON	
	BRSET PORTC,Y %00000001 TURN_OFF
	BRA L1

TURN_ON
	BSET PORTB,Y %00000001
	BRA L1

TURN_OFF
	BCLR PORTB,Y %00000001
	BRA L1


