****************************************************************************** * Program from page 4-27 in the 68HC11 EVB eval manual ****************************************************************************** * denote all numbers with hex radix using $ prefix * labels included for readability ORG $C000 * set origin of program LDY #$C200 * first byte where data is stored LDX #$C400 * point to data to be fetched LDAA $102E * clear RDRF bit if set LDAA 0,X * get first data byte START STAA $102F * store data in SCI data register SEND LDAA $102E * read SCI status register ANDA #$80 * send data byte BEQ SEND * wait for empty trasmit data register READ LDAA $102E * read SCI status register ANDA #$20 * extract RDRF bit from status register BEQ READ * branch true: SCI RDR not full; false: SCI RDR full LDAA $102F * read data from SCI RDR STAA 0,Y * store data byte INX * increment fetch pointer INY * increment storage pointer CPX #$C41F * done sending data? BEQ DONE * branch if done JMP START * if not, get next data byte DONE BRA DONE * yes, stop here