Article View: pl.comp.lang.asm
Article #1188Re: Liczba cykli
From: Day
Date: Wed, 27 Jun 2007 10:00
Date: Wed, 27 Jun 2007 10:00
53 lines
1693 bytes
1693 bytes
> xor eax, eax > cpuid > rdtsc > mov [czas+4], edx > mov [czas], eax > > mov ecx, 1000000 > petla: > [tutaj instrukcje niezmieniające ECX] > loop petla > > xor eax, eax > cpuid > rdtsc > > sub eax, [czas] > sbb edx, [czas+4] Napisałem coś takiego lecz gdy próbuję odjąć od wyniku jakąś liczbę to nie za bardzo wychodzi to i nie mam pojęcia czemu? LOCAL czas:dword cpuid rdtsc mov [czas], edx mov [czas+4], eax mov ecx,10 petla: loop petla cpuid rdtsc sub eax,[czas+4] sbb edx,[czas] sub eax,11 mov ecx,10 div ecx invoke wsprintf,offset ou, offset format,eax ret NA koniec pod ou mam 11 a chyba powinno być 0 skoro gdy nie dam sub eax,11 wynikiem jest 11. Długo nie pisałem tego posta bo sam próbowałem zrozumieć czemu tak jest, lecz nie doszedłem do tego.
Technical Details
Message-ID:
<f5tcdc$qqs$1@news.task.gda.pl>Path:
mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!newsfeed.pionier.net.pl!news.task.gda.pl!not-for-mailReferences:
<f509r6$m75$1@news.task.gda.pl> <f50b89$7ao$1@inews.gazeta.pl>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!newsfeed.pionier.net.pl!news.task.gda.pl!not-for-mail From: Day <tolc007@tlen.pl> Newsgroups: pl.comp.lang.asm Subject: Re: Liczba cykli Date: Wed, 27 Jun 2007 12:00:01 +0200 Organization: CI TASK http://www.task.gda.pl/ Lines: 53 Message-ID: <f5tcdc$qqs$1@news.task.gda.pl> References: <f509r6$m75$1@news.task.gda.pl> <f50b89$7ao$1@inews.gazeta.pl> NNTP-Posting-Host: host-89-228-64-182.olsztyn.mm.pl Mime-Version: 1.0 X-Trace: news.task.gda.pl 1182938348 27484 89.228.64.182 (27 Jun 2007 09:59:08 GMT) X-Complaints-To: abuse@news.task.gda.pl NNTP-Posting-Date: Wed, 27 Jun 2007 09:59:08 +0000 (UTC) User-Agent: Thunderbird 2.0.0.4 (Windows/20070604) In-Reply-To: <f50b89$7ao$1@inews.gazeta.pl> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit