Rev 5363 | Rev 5791 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 5363 | Rev 5787 | ||
---|---|---|---|
Line 3... | Line 3... | ||
3 | ;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
3 | ;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
4 | ;; Distributed under terms of the GNU General Public License ;; |
4 | ;; Distributed under terms of the GNU General Public License ;; |
5 | ;; ;; |
5 | ;; ;; |
6 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
6 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
Line 7... | Line 7... | ||
7 | 7 | ||
Line 8... | Line 8... | ||
8 | $Revision: 5363 $ |
8 | $Revision: 5787 $ |
9 | 9 | ||
10 | 10 | ||
Line 437... | Line 437... | ||
437 | .done: |
437 | .done: |
438 | .fail: |
438 | .fail: |
439 | pop ebp |
439 | pop ebp |
440 | ret><><<> |
440 | ret |
Line -... | Line 441... | ||
- | 441 | ||
- | 442 | align 4 |
|
Line -... | Line 443... | ||
- | 443 | get_clock_ns: |
|
- | 444 | ||
- | 445 | mov eax, [hpet_base] |
|
Line -... | Line 446... | ||
- | 446 | test eax, eax |
|
- | 447 | jz .old_tics |
|
- | 448 | ||
Line -... | Line 449... | ||
- | 449 | push ebx |
|
- | 450 | pushfd |
|
- | 451 | cli |
|
- | 452 | ||
- | 453 | mov ebx, eax |
|
- | 454 | @@: |
|
- | 455 | mov edx, [ebx+0xF4] |
|
- | 456 | mov eax, [ebx+0xF0] |
|
- | 457 | mov ecx, [ebx+0xF4] |
|
- | 458 | cmp ecx, edx |
|
- | 459 | jnz @B |
|
- | 460 | ||
- | 461 | mov ecx, [hpet_period] |
|
- | 462 | mov ebx, edx |
|
- | 463 | imul ebx, ecx |
|
- | 464 | mul ecx |
|
- | 465 | add edx, ebx |
|
- | 466 | ||
- | 467 | popfd |
|
- | 468 | pop ebx |
|
- | 469 | ret |
|
- | 470 | ||
- | 471 | .old_tics: |