SX Microcontroller Bit Math Method

Transfer one bit from a file register to one pin of PORT w/o jitter

Using shadow registers

;from Paul W. Webster
	mov	W, file
	and	W, #fmask	; fmask for bit 0 is defined as 0x01
	or	W, shadA	; add in desired outputs from shadow
	mov	RA, W

Only changes port A on the last cycle. Note that you must call this routine (subroutine/ macro) *whenever* you write to an output bit, which you always do using a SETB or CLRB on shadA, never RA.

Without shadow register

;from Paul W. Webster
	mov	W, file
	xor	W, RA	; derive "difference" value.
	and	W, #fmask	; fmask for bit 0 is defined as 0x01
	xor	RA, W	; Flip bit if not same.