Hola a todos he estado trabajando en un programa en mplab ensamblador para comparar el numero de veces que se presiona un boton.
Si N(A0)> N(A1) encender el primer led,
Si N(A0)< N(A1) encender el segundo led,
Si N(A0)= N(A1) encender ambos led
Pero no encuentro como hacer la comparacion,gracias
Este es mi codigo
INCLUDE <P16F84A.INC>
CBLOCK 0x0C
PULSOSRA0
PULSOSRA1
ENDC
ORG 0
Inicializacion
Bsf STATUS,RP0
Clrf TRISB
Bcf STATUS,RP0
clrf PORTB
Clrf PULSOSRA0
Clrf PULSOSRA1
Bucle
Btfss PORTA,RA0
call RutinaRA0
Btfss PORTA,RA1
call RutinaRA1
Goto Bucle
RutinaRA0
Btfss PORTA,RA0
Goto RutinaRA0
Incf PULSOSRA0,F
movlw .1
Subwf PULSOSRA0,W
btfss STATUS,Z
Return
Bsf PORTB,RB0
Bcf PORTB,RB1
Clrf PULSOSRA0
return
RutinaRA1
Btfss PORTA,RA1
Goto RutinaRA1
Incf PULSOSRA1,F
movlw .1
Subwf PULSOSRA1,W
btfss STATUS,Z
Return
Bsf PORTB,RB1
Bcf PORTB,RB0
Clrf PULSOSRA1
return
END