take a look where the goto command is... so it jumps only to the loop marker if your condition is true!
if portb.1 = 0 then the programms doesn't execute the lines between if and endif and jumps to the next command after endif. probaply there is nothing or only an end command. which finish the programm.
take this structure :
loop:
if portb.1 = 1 then ' only when condition is true
low portb.4
pause 200
high portb.4
endif
goto loop ' infinity
end
Bookmarks