Hey. That works. THis is my code:

start:
low porta.5
adcin porta.0, compvalue

main:
adcin porta.0, vin
if compvalue > (vin + 1) or compvalue < (vin - 1) then serout porta.5,6,[#vin] : goto start
goto main


can you explain why this works and the other way doesn't?