*************************************************
* Drs Schwartz/Arroyo                 Rev. 1.0 **
*************************************************
*********************************************************
* Processor sets PB2 to indicate ready for new data.  
* Wait for PE2 to go true, then read the 4-bits at 
* PE7-PE4. Copy the read values at PE7-PE4 to at 
* PB7-PB4. Processor sets PB2 to indicate ready 
* for new data.*
*
* USE POLLING TECHNIQUE FOR TIMING
*
*********************************************************
** SYMBOL DEFINITIONS
*********************************************************
*  68HCll REGISTERS
*********************************************************
PORTB		EQU	$1004		; Output Port B
PORTE		EQU	$100A		; Input Port B
RAM		EQU	$0000		; Start of Ram
STK		EQU	$0041		; User Stack
RAMPROG		EQU	$0100		; Program space in RAM
EEPROM		EQU	$B600		; Start of EEPROM
REGS		EQU	$1000		; Internal Register Block
*********************************************************
** PROGRAM SECTION
*********************************************************
		ORG	RAMPROG
*----------------------------------------------------
* INITIALIZATION
*---------------------------------------------------
* 
******** Clearest way to address the internal registers {Schwartz}
START		LDS	#STK
START1		LDAA	#%00000100	; Turn on PB2
		STAA	PORTB

******** Alternate way to address the internal registers {Miller}
* Especially good if move registers (only need one new equate).
* More efficient then above (indexed versus extended addressing).
*PORTB		EQU	$1004		; Output Port B
*		LDX	#REGS		; IX = $1000
*START1		LDAA	#%00000100	; Turn on PB2
*		STAA	PORTB-REGS,X
*************************************************
******** Alternate way to address the internal registers {Arroyo}
* Also more efficient then first (indexed versus extended addressing).
* Almost as clear at first techinque but as efficient as second.
*PORTB		EQU	$0004		; Output Port B
*		LDX	#REGS		; IX = $1000
*START1		LDAA	#%00000100	; Turn on PB2
*		STAA	PORTB,X
*************************************************

* THE MAIN PROGRAM IS IN Polling1.asm
