Detecting CPU Speed: Difference between revisions

Jump to navigation Jump to search
[unchecked revision][unchecked revision]
Content added Content deleted
("What is CPU speed")
m (→‎Working Example Code: fixed a bug where the code did not run when TSC was detected ('jnz detect_end' should have been 'jz detect_end'))
Line 111: Line 111:
cpuid
cpuid
test edx,byte 0x10 ; test bit #4. Do we have TSC ?
test edx,byte 0x10 ; test bit #4. Do we have TSC ?
jnz detect_end ; no ?, go to detect_end
jz detect_end ; no ?, go to detect_end
;wait until the timer interrupt has been called.
;wait until the timer interrupt has been called.
mov ebx, ~[irq0_count]
mov ebx, ~[irq0_count]