Mercurial > dropbear
comparison libtommath/etc/timer.asm @ 297:79bf1023cf11 agent-client
propagate from branch 'au.asn.ucc.matt.dropbear' (head 0501e6f661b5415eb76f3b312d183c3adfbfb712)
to branch 'au.asn.ucc.matt.dropbear.cli-agent' (head 01038174ec27245b51bd43a66c01ad930880f67b)
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Tue, 21 Mar 2006 16:20:59 +0000 |
parents | eed26cff980b |
children |
comparison
equal
deleted
inserted
replaced
225:ca7e76d981d9 | 297:79bf1023cf11 |
---|---|
1 ; x86 timer in NASM | |
2 ; | |
3 ; Tom St Denis, [email protected] | |
4 [bits 32] | |
5 [section .data] | |
6 time dd 0, 0 | |
7 | |
8 [section .text] | |
9 | |
10 %ifdef USE_ELF | |
11 [global t_start] | |
12 t_start: | |
13 %else | |
14 [global _t_start] | |
15 _t_start: | |
16 %endif | |
17 push edx | |
18 push eax | |
19 rdtsc | |
20 mov [time+0],edx | |
21 mov [time+4],eax | |
22 pop eax | |
23 pop edx | |
24 ret | |
25 | |
26 %ifdef USE_ELF | |
27 [global t_read] | |
28 t_read: | |
29 %else | |
30 [global _t_read] | |
31 _t_read: | |
32 %endif | |
33 rdtsc | |
34 sub eax,[time+4] | |
35 sbb edx,[time+0] | |
36 ret | |
37 |