Try this way it should do what you need.Code:main: Pause 200 if portb.0 = 1 then gosub pressed0 if portb.1 = 1 then gosub pressed1 if portb.2 = 1 then gosub pressed2 if portb.3 = 1 then gosub pressed3 goto main pressed0: toggle portb.4 return pressed1: toggle portb.5 return pressed2: toggle portb.6 return pressed3: toggle portb.7 return end
See TOGGLE command on manual.
Al.




Bookmarks