**********
* Program SIGN_2 (6811)
*
* Illustrates use of the sign flag.
*
* Fetches switches.
* If most sig switch is zero; outputs pattern $0F.
* Otherwise outputs $F0
*
* Uses pseudo op EQU
* Introduces use of pseudo op FCB
*
* P. H. Anderson, MSU, 12 Sept 91; Checked 12 Sept 91; 19 Jan 93
**********

PSCT	EQU  $C000
IDSCT	EQU  $D300

PORTB	EQU  $1004
PORTC	EQU  $1003
DDRC	EQU  $1007

	ORG IDSCT

	CLR DDRC
TOP
	LDAA PORTC	* get switches
	BMI L1		* if ms bit is one

	LDAA PATT_2	* otherwise it is zero
	STAA PORTB	* output pattern_2
	BRA TOP

L1	LDAA PATT_1	* if msb one output $F0
	STAA PORTB
	BRA TOP

	ORG IDSCT

PATT_1	FCB	$0F
PATT_2	FCB	$F0


