You are on page 1of 1

trisb=%00000111 a var byte b var byte pausa var word pausa = 15 inicio: if (portb.0=1 and portb.1=0 and portb.2=1)or(portb.

0=0 and portb.1=0 and port b.2=0) then siga if portb.0=1 and portb.1=1 and portb.2=0 then izq if portb.0=0 and portb.1=1 and portb.2=1 then der if portb.0=1 and portb.1=1 and portb.2=1 then reg goto inicio siga portb.3=0 portb.4=0 pauseus pausa portb.3=1 portb.4=1 goto inicio izq a=0 b=1 portb.3=0 portb.4=0 pauseus pausa portb.3=1 portb.4=0 goto inicio der a=1 b=0 portb.3=0 portb.4=0 pauseus pausa portb.3=0 portb.4=1 goto inicio reg portb.3=0 portb.4=0 pauseus pausa if a=1 then der if b=1 then izq goto inicio end

You might also like