;
; SwState = PORTB ^ 255 ' invert active low switches
; SwState = SwState & 15 ' mask for switches on RB3..RB0
; Changed = SwState ^ SwLatch ' changed (press or release)
; NewPress = Changed & SwState ' a 'new' switch press
; NewRelease = Changed & SwLatch ' a 'new' switch release
; SwLatch = SwState ' update switch state latch
;
; use the following instruction to pass along a new switch press to main
;
; SwFlags = SwFlags ^ NewPress ' pass along new press to main
;
; or use the following instruction to pass along a new switch release
;
; SwFlags = SwFlags ^ NewRelease ' pass along new release to main
;