
      MOV  C, INSWT         ;or MOV C, P2.0
      MOV  A, INSWT_FILTER
      RLC  A                ;shift new sample into
      MOV  INSWT_FILTER, A  ;..the filter byte
      ANL  A, #1Fh          ;mask 5 low bits = 5 msec
      JZ   LABEL_0          ;input filter = xxx00000b
      CJNE A, #1Fh, LABEL_X ;input not stable
LABEL_1:
      SETB INSWT_BIT        ;input filter = xxx11111b
      JMP  LABEL_X          ;set the filter status bit
;
LABEL_0:
      CLR  INSWT_BIT        ;clr the filter status bit
;
LABEL_X:
      ...
      ...                   ;program continues on
