68HC11 Timing System
68HC11 Timing System
68HC11 Timing System
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Clearing the TOF bit<br />
Many of the flag bits in the <strong>68HC11</strong> control registers, including the<br />
TOF, are cleared by writing a 1 into the bit position of the flag.<br />
Writing a 0 into the bit position has no effect on the flag.<br />
A routine to clear TOF is:<br />
SUB1: LDAA #$80 ; Set bit 7 to 1<br />
STAA $1025 ; Write it to TFLG2<br />
RTS<br />
; Return<br />
A flag can also be cleared using a BCLR instruction, with a 0 in<br />
the bit position to be cleared. This is because the <strong>68HC11</strong> uses<br />
the inverse mask to clear the bit. To clear TOF, for example, the<br />
following instructions would work:<br />
LDX #$1000<br />
BCLR $25 , X $7F<br />
10