1 The thermostat example given previously in Listing~
\ref{lst:exmtask
} would be
2 compiled to the following code. The left column indicates the
3 position in the program memory.
5 \begin{lstlisting
}[caption=
{Thermostat bytecode
},language=c
]
6 1-
2 : BCAnalogRead (Analog A0)
9 8-
9 : BCJmpF
17 //Jump to else
10 10-
12: BCPush (Bool
1)
11 13-
14: BCDigitalWrite (Digital D0)
12 15-
16: BCJmp
21 //Jump to end of if
13 17-
19: BCPush (Bool
0) //Else label
14 20 : BCDigitalWrite (Digital D0)