 <b>
MAIN:	ACALL PRESET		; Call Preset routine

CONFIG:	JNB P4.6,REVDUAL	; Detect WOCT config bit
	CLR IEN1.5		; Disable Timer2 CM1 interrupt
	ACALL WOCT		; Call WOCT routine

REVDUAL:JNB P1.1,DUAL		; Detect DUAL config bit

FA:	JNB P1.3,FB		; Detect FWD_A enable cmd
	JB P0.4,AON		; If A firing cmd on, jump to AON
        JB P3.5,REG		; If Voltage still high, jump to REG
	CLR P0.5		; Turn B firing cmd off
	CLR P1.2		; Turn Regen signal off
	MOV CMH0,#18H		; Load CMH0 with 18H
        MOV CML0,#00H		; Load CML0 with 00H
	ACALL DELAY		; 50ms
	SETB TCON.4		; Start TM0
ADUAL:	SETB P0.4		; Turn A firing cmd on
AON:	JBC 20H.0,CTRLA		; Test CT0 done bit flag
	AJMP CHECK1		; /

CTRLA:	AJMP FWD_C		; FWD_C control routine
								
FB:	JNB P1.4,REG		; Detect REV_B enable cmd
	JB P0.5,BON		; If B firing cmd on, jump to 
        JB P3.7,REG		; If voltage still high, jump to REG
        CLR P0.4		; Turn A firing cmd off
	CLR P1.2		; Turn Regen signal off
	MOV CMH1,#18H		; Reload CMH1 with 18H
	MOV CML1,#00H		; Reload CML1 with 00H
	ACALL DELAY		; 50ms
	SETB TCON.4		; Start TM0
BDUAL:	SETB P0.5		; Turn B firing cmd on
BON:	JBC 20H.0,CTRLB		; Test CT0 done bit flag
	AJMP CHECK3		; /
	
CTRLB:	AJMP REV_C		; REV_C control routine
