'Do While demonstration input 1 'Button tied to pin 1 with pull down resistor and other side tied to vdd output 2 'led tied between vss and pin2 out2 = 0 'Make sure led is low 'The main loop main 'Check to see if the button is down if in1 = 1 then high 2 : pause 300 :low 2 'Blink the LED 'Now just waste some time until button is released 'As long as in1 = 1 we will stay in this loop do while in1 = 1 endif goto main