Initial checkin of toy OS project.
[os.git] / kernel / hal / timestamp.asm
1
2         [BITS 32]
3
4 GLOBAL HalReadTimestampCounter
5 EXTERN g_ullTimeStampCounter        
6         
7 [SECTION .text]
8 ;;;
9 ;;; ULONGLONG
10 ;;; HalReadTimestampCounter(void)
11 ;;; 
12 ;;; Function to read the processor's timestamp counter
13 ;;;
14 HalReadTimestampCounter:
15         ALIGN 4
16         rdtsc
17         mov [g_ullTimeStampCounter], edx
18         mov [g_ullTimeStampCounter+4], eax
19         ret