<aname="l1"></a><spanclass=cF0>The </span><spanclass=cF2>Programmable Interval Timer</span><spanclass=cF0> has two purposes: Generate interrupts, and control the </span><spanclass=cF2>PC speaker</span><spanclass=cF0>.
<aname="l5"></a></span><ahref="https://zeal-operating-system.github.io/ZealOS/Kernel/KernelA.HH.html#l686"><spanclass=cF4>Channel 0</span></a><spanclass=cF0> can generate an interrupt, IRQ 0, at a defined frequency. We set it up in </span><ahref="https://zeal-operating-system.github.io/ZealOS/Kernel/KMain.CC.html#l116"><spanclass=cF4>TimerInit</span></a><spanclass=cF0>(), and use it in </span><ahref="https://zeal-operating-system.github.io/ZealOS/Kernel/KMisc.CC.html#l22"><spanclass=cF4>SysTimerRead</span></a><spanclass=cF0>().
<aname="l10"></a></span><ahref="https://zeal-operating-system.github.io/ZealOS/Kernel/KernelA.HH.html#l687"><spanclass=cF4>Channel 2</span></a><spanclass=cF0>'s output is connected to the PC speaker.
<aname="l12"></a>The Command port is used to control each of these 3 channels. The relevant </span><ahref="https://zeal-operating-system.github.io/ZealOS/Kernel/KernelA.HH.html#l690"><spanclass=cF4>flags</span></a><spanclass=cF0> are defined.
<aname="l14"></a>See </span><ahref="https://zeal-operating-system.github.io/ZealOS/Kernel/KMisc.CC.html#l129"><spanclass=cF4>Sound</span></a><spanclass=cF0>() for how the PC speaker frequency is changed.</span></pre></body>