Programmable Interval Timer: Difference between revisions

[unchecked revision][unchecked revision]
Content deleted Content added
Brendan (talk | contribs)
m Little bug in PIT Channel 0 Example Code
Brendan (talk | contribs)
m Doh - another little bug in PIT Channel 0 Example Code
Line 335:
mov edx,0 ;edx:eax = 3579545 * 256
div ebx ;eax = 3579545 * 256 / frequency, edx = remainder
cmp edx,3579545 * 256 / 2 ;Is the remainder more than half?
jb .l1 ; no, round down
inc eax ; yes, round up