**********
* Program IO_3 (6811)
*
* Fetches toggle switches and echoes back to LEDs
*
* Note use of branch statement instead of jump
* Note use of pseudo operator EQU to enhance understanding.
*
* P. H. Anderson, MSU, 12 Sept 91; Checked 12 Sept 91; 19 Jan 93
**********

PSCT	EQU  $C000	* Start of Program Segment

PORTB	EQU  $1004
PORTC	EQU  $1003
DDRC	EQU  $1007

	ORG PSCT

	CLR DDRC	* port c configured as 8-bit input

TOP
	LDAA PORTC	* get switches
	STAA PORTB	* output to LEDs
	BRA TOP

