Article View: pl.comp.lang.asm
Article #1450Re: CPUID
From: Wojtas
Date: Sun, 19 Aug 2007 09:43
Date: Sun, 19 Aug 2007 09:43
58 lines
3276 bytes
3276 bytes
On 19 Sie, 10:27, "Bogdan (bogdro)" <bog...@poczta.gazeta.pl> wrote:
> Wojtas pisze:
>
> > Dla testu wymodzi em co takiego:
>
> > procedure IsHTT;
> > var
> > _eax : Integer;
> > begin
> > asm
> > push ebx
> > mov eax, 1
> > cpuid
> > mov _eax, eax
>
> mov _edx, edx
>
> > pop ebx
> > end;
> > if (_eax and $04000000) = $04000000 then
>
> if ( _edx and $01000000 ) = $01000000 then
>
> > MessageBox(0, 'Bit 28 zapalony - HTT obs ugiwane.', 'CPUID:', 0)
> > else MessageBox(0, 'Bit 28 zgaszony - HTT NIE obs ugiwane.',
> > 'CPUID:', 0);
> > end;
>
> > Odpala si MessageBox(0, 'Bit 28 zgaszony - HTT NIE obs ugiwane.',
> > 'CPUID:', 0);
> > Tylko czy ja to dobrze zrobi em?
>
> Sprรณbuj teraz.
>
> --
> Pozdrawiam/Regards - Bogdan (Linux & FreeDOS)
> Kurs asemblera x86 (DOS & Linux): http://rudy.mif.pg.gda.pl/~bogdro
> Grupy dyskusyjne o asm: pl.comp.lang.asm alt.pl.asm alt.pl.asm.win32
> Rozmawiaj bezpiecznie:www.JabberPL.orgSurfuj anonimowo: tor.eff.org
procedure ishtt;
var
_edx : integer;
begin
asm
push ebx
mov eax, 1
cpuid
mov _edx, edx
pop ebx
end;
if ( _edx and $01000000 ) = $01000000 then
MessageBox(0, 'Bit 28 zapalony - HTT obs ugiwane.', 'CPUID:', 0)
else MessageBox(0, 'Bit 28 zgaszony - HTT NIE obs ugiwane.',
'CPUID:', 0);
end;
Pokazuje, e HTT jest obs ugiwane...
Technical Details
Message-ID:
<1187516593.234007.166220@k79g2000hse.googlegroups.com>Path:
mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!newsfeed.gazeta.pl!news.nask.pl!news.nask.org.pl!newshub.sdsu.edu!postnews.google.com!k79g2000hse.googlegroups.com!not-for-mailReferences:
<1187283337.535618.34200@w3g2000hsg.googlegroups.com> <fa22h7$dhj$1@news.onet.pl> <1187302782.224820.88620@19g2000hsx.googlegroups.com> <fa3o0c$10s$1@news.onet.pl> <fa3oaf$1df$1@news.onet.pl> <fa3q1a$6th$1@news.onet.pl> <slrnfcar1i.30s.wojciech_mula@cat.tac> <fa3vc4$ktc$1@news.onet.pl> <1187350008.273281.101010@r34g2000hsd.googlegroups.com> <1187350422.704355.176700@o80g2000hse.googlegroups.com> <fa42mp$trk$1@news.onet.pl> <1187353080.347007.243840@19g2000hsx.googlegroups.com> <fa44g4$3b3$1@news.onet.pl> <1187355063.066173.227320@a39g2000hsc.googlegroups.com> <fa8uud$5f2$1@inews.gazeta.pl>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!newsfeed.gazeta.pl!news.nask.pl!news.nask.org.pl!newshub.sdsu.edu!postnews.google.com!k79g2000hse.googlegroups.com!not-for-mail From: Wojtas <wojtas.freesoft@gmail.com> Newsgroups: pl.comp.lang.asm Subject: Re: CPUID Date: Sun, 19 Aug 2007 02:43:13 -0700 Organization: http://groups.google.com Lines: 59 Message-ID: <1187516593.234007.166220@k79g2000hse.googlegroups.com> References: <1187283337.535618.34200@w3g2000hsg.googlegroups.com> <fa22h7$dhj$1@news.onet.pl> <1187302782.224820.88620@19g2000hsx.googlegroups.com> <fa3o0c$10s$1@news.onet.pl> <fa3oaf$1df$1@news.onet.pl> <fa3q1a$6th$1@news.onet.pl> <slrnfcar1i.30s.wojciech_mula@cat.tac> <fa3vc4$ktc$1@news.onet.pl> <1187350008.273281.101010@r34g2000hsd.googlegroups.com> <1187350422.704355.176700@o80g2000hse.googlegroups.com> <fa42mp$trk$1@news.onet.pl> <1187353080.347007.243840@19g2000hsx.googlegroups.com> <fa44g4$3b3$1@news.onet.pl> <1187355063.066173.227320@a39g2000hsc.googlegroups.com> <fa8uud$5f2$1@inews.gazeta.pl> NNTP-Posting-Host: 83.14.84.194 Mime-Version: 1.0 X-Trace: posting.google.com 1187516593 16823 127.0.0.1 (19 Aug 2007 09:43:13 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sun, 19 Aug 2007 09:43:13 +0000 (UTC) In-Reply-To: <fa8uud$5f2$1@inews.gazeta.pl> User-Agent: G2/1.0 X-HTTP-UserAgent: Opera/9.21 (Windows NT 5.1; U; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; FDM; Alexa Toolbar); pl),gzip(gfe),gzip(gfe) X-HTTP-Via: 1.1 server.kisielin.pl:800 (squid/2.6.STABLE9) Complaints-To: groups-abuse@google.com Injection-Info: k79g2000hse.googlegroups.com; posting-host=83.14.84.194; posting-account=ps2QrAMAAAA6_jCuRt2JEIpn5Otqf_w0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit