AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein Win32/Win64 API (native code) C++ C++ 2 Delphi, Core2duo/quad Reading
Thema durchsuchen
Ansicht
Themen-Optionen

C++ 2 Delphi, Core2duo/quad Reading

Ein Thema von Razor · begonnen am 27. Aug 2007 · letzter Beitrag vom 7. Mai 2008
Antwort Antwort
Razor
(Gast)

n/a Beiträge
 
#1

Re: C++ 2 Delphi, Core2duo/quad Reading

  Alt 28. Aug 2007, 12:05
Ahh i provided core2duo/core2quad cpu usage and nobody was thankfull,i see people begging for codes to be translated and people just do it?Explain that?

Why you think i am posting in this forum at all?So other users can benefit from this also!




I only need MSR Access code i figured the cpuid and other stuff by myself

EDIT: i found this code on newsgroups

Delphi-Quellcode:
type
{ hier können eigene, bessere Namen definiert werden } 
  TMachineStateRegisterRange = (Bit0 = 0, Bit63 = 63);
  TMachineStateRegister = set of TMachineStateRegisterRange;


function getMsr(whichone: Integer): TMachineStateRegister;
var
  res: TMachineStateRegister;
begin
  asm
    mov ecx, whichone
    rdmsr
    lea esi, res
    mov [esi], ax
    mov [esi+4], dx
  end;
  getMsr := res;
end;


var
  msr: TMachineStateRegister;
  i: TMachineStateRegisterRange;


begin
  msr := getMsr(0);
  for i := Low(TMachineStateRegisterRange) to
           High(TMachineStateRegisterRange) do
    if i in msr then
      WriteLn('Bit ', Ord(i), ' ist gesetzt.');
end.

Found this also

Delphi-Quellcode:
    function ReadMSR(msr_num: DWord; var msr: tmsr): boolean;
    function WriteMSR(msr_num: DWord; const msr: tmsr): boolean;
  Mit Zitat antworten Zitat
Antwort Antwort


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 00:39 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz