I was reading a chapter related to I/O using the MC68HC11; this book showed a suggested exercise (not really a hard one) but i was not able to solve it by using assembly:
I've been thinking and i can do it by using some basic logic (i do program in C and C++ ) but i got stuck while trying to do it in assembly.
Logic goes like this:
Loop:
value = ReadSensorValue()
if (value condition 1) // do action else if (value condition 2) // do something end if
go to Loop
Can help me to solve it but using real instructions in assembly?
EDIT:



Here's one way to do it (using ASM11). I understand you're trying to learn but you don't show any effort. (This is the last one I'm doing without seeing some effort from you first.)