@ DEVICE MCLR_OFF, INTRC_OSC, WDT_OFF, LVP_OFF, BOD_OFF, PWRT_ON, PROTECT_OFF
CMCON = 7
TrisA=%11111111
TrisB=%00000000
PORTA = %00000000
PORTB = %00000000
Aumen var word
aumen=0
cartel:
portb = 0
if porta.7 = 1 then
gosub espacio
pause 1
gosub espacio
pause 1
gosub espacio
pause 1
gosub espacio
pause 1
gosub ache
pause 1
aumen=aumen+1
if aumen=20 then holin
endif
goto cartel
holin:
portb = 0
if porta.7 = 1 then
gosub espacio
pause 1
gosub espacio
pause 1
gosub espacio
pause 1
gosub ache
pause 1
gosub O
pause 1
aumen=aumen-1
if aumen=0 then hol
endif
goto holin
hol:
portb = 0
if porta.7 = 1 then
gosub espacio
pause 1
gosub espacio
pause 1
gosub ache
pause 1
gosub o
pause 1
gosub ele
pause 1
aumen=aumen+1
if aumen=20 then hola
endif
goto hol
hola:
portb = 0
if porta.7 = 1 then
gosub espacio
pause 1
gosub ache
pause 1
gosub O
pause 1
gosub ele
pause 1
gosub a
pause 1
aumen=aumen-1
if aumen=0 then espacial
endif
goto hola
espacial:
portb = 0
if porta.7 = 1 then
pause 1
gosub O
pause 1
gosub ele
pause 1
gosub a
pause 1
gosub espacio
pause 1
gosub espacio
pause 1
aumen=aumen+1
if aumen=20 then espa
endif
goto espacial
espa:
portb = 0
if porta.7 = 1 then
gosub ele
pause 1
gosub a
pause 1
gosub espacio
pause 1
gosub espacio
pause 1
gosub espacio
pause 1
aumen=aumen-1
if aumen=0 then retro
endif
goto espa
retro:
portb = 0
if porta.7 = 1 then
gosub a
pause 1
gosub espacio
pause 1
gosub espacio
pause 1
gosub espacio
pause 1
gosub espacio
pause 1
aumen=aumen+1
if aumen=20 then retroced
endif
goto retro
retroced:
portb = 0
if porta.7 = 1 then
gosub espacio
pause 1
gosub espacio
pause 1
gosub espacio
pause 1
gosub espacio
pause 1
gosub espacio
pause 1
aumen=aumen-1
if aumen=0 then cartel
endif
goto retroced
ache:
portb = %11111111:pauseus 100
portb = 0:pauseus 800
portb = %00010000:pauseus 100
portb = 0:pauseus 800
portb = %00010000:pauseus 100
portb = 0:pauseus 800
portb = %00010000:pauseus 100
portb = 0:pauseus 800
portb = %11111111:pauseus 100
portb = 0:pauseus 800
return
O:
portb = %01111110:pauseus 100
portb = 0:pauseus 800
portb = %10000001:pauseus 100
portb = 0:pauseus 800
portb = %10000001:pauseus 100
portb = 0:pauseus 800
portb = %10000001:pauseus 100
portb = 0:pauseus 800
portb = %01111110:pauseus 100
portb = 0:pauseus 800
return
ele:
portb = %11111111:pauseus 100
portb = 0:pauseus 800
portb = %10000000:pauseus 100
portb = 0:pauseus 800
portb = %10000000:pauseus 100
portb = 0:pauseus 800
portb = %10000000:pauseus 100
portb = 0:pauseus 100
portb = %00000000:pauseus 100
portb = 0:pauseus 800
return
a:
portb = %11111110:pauseus 100
portb = 0:pauseus 800
portb = %00010001:pauseus 100
portb = 0:pauseus 800
portb = %00010001:pauseus 100
portb = 0:pauseus 800
portb = %00010001:pauseus 100
portb = 0:pauseus 800
portb = %11111110:pauseus 100
portb = 0:pauseus 800
return
espacio:
portb = %00000000:pauseus 100
portb = 0:pauseus 800
portb = %00000000:pauseus 100
portb = 0:pauseus 800
portb = %00000000:pauseus 100
portb = 0:pauseus 800
portb = %00000000:pauseus 100
portb = 0:pauseus 800
portb = %00000000:pauseus 100
portb = 0:pauseus 800
return
end