IF $0.1 == ON
$13 = $21
ENDIF
IF $0.2 == ON
$13 = $22
ENDIF
IF $0.3 == ON
$13 = $23
ENDIF
IF $0.4 == ON
$13 = $24
ENDIF
IF $0.5 == ON
$13 = $25
ENDIF
IF $0.6 == ON
$13 = $26
ENDIF
IF $12 == $21
$1 = 1
ENDIF
IF $12 == $22
$1 = 2
ENDIF
IF $12 == $23
$1 = 3
ENDIF
IF $12 == $24
$1 = 4
ENDIF
IF $12 == $25
$1 = 5
ENDIF
IF $12 == $26
$1 = 6
ENDIF
IF $12 < $13
$12 = $12 + 1
$10 = 0
ELSEIF $12 > $13
$12 = $12 - 1
$10 = 0
ELSE
$0 = 0
$10 = 1
ENDIF
END