main:
high b.6
if pinB.5 = 1 then
gosub ONE
else
gosub RST
end if
low b.6
goto main
ZERO:
low D.5, D.4, C.7, C.5, C.4, D.3
return
ONE:
low C.7, D.3
return
TWO:
low C.7, D.4, D.6, C.5, C.4
return
THREE:
low D.3, D.6, D.4, C.7, C.4
return
FOUR:
low D.3, C.7, D.5, D.6
return
FIVE:
low D.3, C.4, D.5, D.6, D.4
return
SIX:
low D.3, C.4, C.5, D.4, D.5, D.6
return
SEVEN:
low D.3, C.7, D.4
return
EIGHT:
low D.3, C.4, C.5, C.7, D.4, D.5, D.6
return
NINE:
low D.3, C.7, D.4, D.5, D.6
return
DECI:
low D.2
return
RST:
high D.2, D.6, D.5, D.4, C.7, C.5, C.4, D.3
return