Interestingly this works

Code:
ASM
 __CONFIG _INTRC_OSC_NOCLKOUT & _WDT_ON & _PWRTE_ON & _MCLRE_OFF 
endasm

TRISIO = %11111110
ANSEL = 0   		
GPIO.0 = 0
CMCON0=7

Motor var GPIO.0
Switch1 var GPIO.1
Switch2 var GPIO.2

main:
If Switch1 = 1 then 
gosub demo
endif 
goto main

demo:
high Motor
pause 1000
low Motor
pause 1000
goto main
REturn