No difference on my machine
- From: Evenbit <nbaker2328@xxxxxxxxxxx>
- Date: Sat, 10 Nov 2007 14:44:22 -0800
Comparing 'xor eax, eax' with 'mov eax, 0' from the CLAX thread:
; nasm -f elf -o timeit.o timeit.asm
; gcc -s -o timeit timeit.o
extern exit
extern printf
global main
section .data
tvsec dd 0
tvusec dd 0
tz1 dd 1
tz2 dd 0
secs db "Sec: %i", 10, 0
store dd 0
section .text
main:
mov eax, 78 ; gettimeofday
mov ebx, tvsec
mov edx, tz1
int 0x80
mov eax, DWORD [tvsec]
mov DWORD [store], eax
mov ecx, 2
mainloop:
mov edx, -1
subloop:
xor eax, eax ; exchange with 'mov eax, 0'
dec edx
jnz subloop
dec ecx
jnz mainloop
mov eax, 78
mov ebx, tvsec
mov edx, tz1
int 0x80
mov eax, DWORD [tvsec]
sub eax, DWORD [store]
push eax
push secs
call printf
push 0
call exit
Nathan.
.
- Follow-Ups:
- Re: No difference on my machine
- From: Frank Kotler
- Re: No difference on my machine
- Prev by Date: Re: Intel specific modes - help needed
- Next by Date: oRosAsm
- Previous by thread: Intel specific modes - help needed
- Next by thread: Re: No difference on my machine
- Index(es):
Relevant Pages
|
|