9 EXTERN _TscCalibrationPhase:BYTE
10 EXTERN _TscCalibrationArray:QWORD
12 PUBLIC _TscCalibrationISR
18 /* The first thing we do is read the current TSC value */
21 /* Read the current phase */
22 movzx ecx, byte ptr ds:[_TscCalibrationPhase]
24 /* Check if we're already done */
26 jnb _CalibrationISR_Exit
28 /* Store the current value */
29 mov dword ptr _TscCalibrationArray[ecx * 2], eax
30 mov dword ptr _TscCalibrationArray[ecx * 2 + 4], edx
33 inc byte ptr ds:[_TscCalibrationPhase]
43 EXTERN TscCalibrationPhase:BYTE
44 EXTERN TscCalibrationArray:DWORD
46 PUBLIC TscCalibrationISR
47 FUNC TscCalibrationISR
53 /* The first thing we do is read the current TSC value */
56 /* Read the current phase */
57 movzx rcx, byte ptr [TscCalibrationPhase]
59 /* Check if we're already done */
61 jnb CalibrationISR_Exit
63 /* Store the current value */
65 lea rax, [TscCalibrationArray]
66 mov dword ptr [rax + rcx], eax
67 mov dword ptr [rax + rcx + 4], edx
70 inc byte ptr [TscCalibrationPhase]
77 ENDFUNC TscCalibrationISR