sp; GOTO LOOP_1
BTFSS PORTB,2
GOTO LOOP_2
BTFSS PORTB,4
GOTO LOOP_3
GOTO LOOPA
LOOP_1
BTFSC PORTB,1
GOTO LOOPA
MOVLW 255
MOVWF DATA1
SET_LOOP1A
BTFSC PORTB,1 ;去抖动
GOTO LOOPA
DECFSZ DATA1,1
GOTO SET_LOOP1A
MOVLW 6
MOVWF DISPBUFF_1
MOVLW 7
MOVWF DISPBUFF_0
MOVLW 8
MOVWF DISPBUFF_3
MOVLW 9
MOVWF DISPBUFF_2
MOVLW 0AH
MOVWF DISPBUFF_5
MOVLW 0
MOVWF DISPBUFF_4
SET_LOOP1B
BTFSS PORTB,1 ;等待按键放开
GOTO SET_LOOP1B
GOTO LOOPA
;--------------------------------
LOOP_2
BTFSC PORTB,2
GOTO LOOPA
MOVLW 255
MOVWF DATA1
SET_LOOP2A
BTFSC PORTB,2 ;去抖动
GOTO LOOPA
DECFSZ DATA1,1
GOTO SET_LOOP2A
MOVLW 0BH
MOVWF DISPBUFF_1
MOVLW 0BH
MOVWF DISPBUFF_0
MOVLW 0BH
MOVWF DISPBUFF_3
MOVLW 0BH
MOVWF DISPBUFF_2
MOVLW 0BH
MOVWF DISPBUFF_5
MOVLW 0BH
MOVWF DISPBUFF_4
SET_LOOP2B
BTFSS PORTB,2 ;等待按键放开
GOTO SET_LOOP2B
GOTO LOOPA
;------------------------------------