; ECE331 Example of SET/CLR Bit and Branch Instructions
; program will read data and set lower nibble to %0011
; until odd value is read
        ORG     $4000
TOP	LDAA	#00	;initialize index offset byte
	LDX	#DT_TOP	;initialize index reference register
	BRCLR   A,X,$01,ODD	;end if odd value
	BCLR	A,X,%00000011
	BSET	A,X,%00001100
	LDAB	A,X
	INCB
	BRA	TOP
ODD	SWI		;end
; data storage
	ORG    $2000
DT_TOP	FCB    $EE, $DC, $D0, $F4, $80, $00, $55, $22, $AA
	END
