Retidy, removing align=left from headings and empty paragraphs

This commit is contained in:
James Gregory 2013-12-30 15:37:13 +11:00
commit a96a114403
362 changed files with 8472 additions and 5040 deletions

View file

@ -1,5 +1,4 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
@ -19,24 +18,28 @@
<center>
<table border="1">
<tr>
<td><a href="03-02.html">Previous</a></td>
<td>
<a href="03-02.html">Previous</a>
</td>
<td><a href="index.html">Table of Contents</a></td>
<td>
<a href="index.html">Table of Contents</a>
</td>
<td><a href="03-04.html">Next</a></td>
<td>
<a href="03-04.html">Next</a>
</td>
</tr>
</table>
</center>
<p><br /></p>
<h4 align="left" id="Heading5">The Zen Timer Is a Means, Not an End</h4>
<h4 id="Heading5">The Zen Timer Is a Means, Not an End</h4>
<p>We&rsquo;re going to spend the rest of this chapter seeing what the Zen timer can do, examining how it works, and learning how to use it. I&rsquo;ll be using the Zen timer again and again over the course of this book, so it&rsquo;s essential that you learn what the Zen timer can do and how to use it. On the other hand, it is by no means essential that you understand exactly how the Zen timer works. (Interesting, yes; essential, no.)</p>
<p>In other words, the Zen timer isn&rsquo;t really part of the knowledge we seek; rather, it&rsquo;s one tool with which we&rsquo;ll acquire that knowledge. Consequently, you shouldn&rsquo;t worry if you don&rsquo;t fully grasp the inner workings of the Zen timer. Instead, focus on learning how to <i>use</i> it, and you&rsquo;ll be on the right road.</p>
<h4 align="left" id="Heading6">Starting the Zen Timer</h4>
<h4 id="Heading6">Starting the Zen Timer</h4>
<p><b>ZTimerOn</b> is called at the start of a segment of code to be timed. <b>ZTimerOn</b> saves the context of the calling code, disables interrupts, sets timer 0 of the 8253 to mode 2 (divide-by-N mode), sets the initial timer count to 0, restores the context of the calling code, and returns. (I&rsquo;d like to note that while Intel&rsquo;s documentation for the 8253 seems to indicate that a timer won&rsquo;t reset to 0 until it finishes counting down, in actual practice, timers seem to reset to 0 as soon as they&rsquo;re loaded.)</p>
@ -67,16 +70,20 @@
<p>Why not use timer 2 instead of timer 0 for precision timing? After all, timer 2 has a programmable gate input and isn&rsquo;t used for anything but sound generation. The problem with timer 2 is that its output can&rsquo;t generate an interrupt; in fact, timer 2 can&rsquo;t do anything but drive the speaker. We need the interrupt generated by the output of timer 0 to tell us when the count has overflowed, and we will see shortly that the timer interrupt also makes it possible to time much longer periods than the Zen timer shown in Listing 3.1 supports.</p>
<p><br /></p>
<center>
<table border="1">
<tr>
<td><a href="03-02.html">Previous</a></td>
<td>
<a href="03-02.html">Previous</a>
</td>
<td><a href="index.html">Table of Contents</a></td>
<td>
<a href="index.html">Table of Contents</a>
</td>
<td><a href="03-04.html">Next</a></td>
<td>
<a href="03-04.html">Next</a>
</td>
</tr>
</table>
</center>