![]() |
Comparing functions
From IO driver #1
Delphi-Quellcode:
procedure GetPCIRDWord(dwBus, dwDev, dwFunc, offs: byte; var pdata: DWord);
procedure SetPCIRDWord(dwBus, dwDev, dwFunc, offs: byte; pdata: DWord); From IO driver #2
Delphi-Quellcode:
function GetPCRD(Bus, Dev, Func, Reg : byte): dword;
procedure SetPCRD(Bus, Dev, Func, Reg : byte; value : dword); Can driver 2 functions be used same as driver 1 in this way
Delphi-Quellcode:
var
dwResult : DWORD; begin //-------Reading a temperature of the Core0---------- dwResult:=GetPCRD(0,24,$03,$E4); SetPCRD(0,24,$03,$E4, dwResult and not (1 shl 2)); //Core0 select dwResult:=GetPCRD(0,24,$03,$E4); C0:= Format('%d °C',[(dwResult shr 16 and $FF)-49]); Label0.Caption := C0; Form1.Caption:= C0; Application.Title:= C0; if not Core2Present then Exit; //-------Reading a temperature of the Core1---------- dwResult:=GetPCRD(0,24,$03,$E4); SetPCRD(0,24,$03,$E4, dwResult or (1 shl 2)); //Core1 select dwResult:=GetPCRD(0,24,$03,$E4); Label1.Caption := Format('%d °C',[(dwResult shr 16 and $FF)-49]); I have tried it this way but i can't even compile this becouse IDE gives an error Internal L1333 error.:(
Delphi-Quellcode:
var
pdata : DWORD; begin //-------Reading a temperature of the Core0---------- GetPCIRDWord(0,24,$03,$E4,pdata); SetPCIRDWord(0,24,$03,$E4, pdata and not (1 shl 2)); //Core0 select GetPCIRDWord(0,24,$03,$E4,pdata); C0:= Format('%d °C',[(pdata shr 16 and $FF)-49]); Label0.Caption := C0; Form1.Caption:= C0; Application.Title:= C0; if not Core2Present then Exit; //-------Reading a temperature of the Core1---------- GetPCIRDWord(0,24,$03,$E4,pdata); SetPCIRDWord(0,24,$03,$E4, pdata or (1 shl 2)); //Core1 select GetPCIRDWord(0,24,$03,$E4,pdata); Label1.Caption := Format('%d °C',[(pdata shr 16 and $FF)-49]); Thanks! |
Re: Comparing functions
Did you write this code or did you copy and paste it again like all the other code fragments you've showed us so far?
|
Re: Comparing functions
Zitat:
I don't know how you could expect meeting your deadline without having any knowledge about the pure Delphi-basics at all. Sorry man, but if you don't even get the meaning of these lines you've posted... |
Re: Comparing functions
Yes i do understand them,they both read dword from pci bus,but maybe is it better to join the 2 driver to 1 single driver?What you think about that?
|
Re: Comparing functions
Both driver offer the same functionality so device which one to use and then change your code to use the selected one...
|
Re: Comparing functions
So basicly here goes for an old version of a driver and a new version of a driver wich has also x64,x86.But why does it delphi give out L1333 internal error I dont understand this... :oops:
The second driver also provides msr read functions basicly both do.... :!: |
Re: Comparing functions
Where does this highly interesting code comes from ?
|
Re: Comparing functions
Basicly this can't compile...:x
Delphi-Quellcode:
var
pdata:Cardinal; begin omcdrv.GetPCIRDWord(0,24,$03,$E4,pdata); // Here i get Internal error L1333 omcdrv.SetPCIRDWord(0,24,$03,$E4, pdata and not (1 shl 2)); C0:= Format('%d °C',[(pdata shr 16 and $FF)-49]); Label0.Caption := C0; //procedure GetPCIRDWord(dwBus, dwDev, dwFunc, offs: byte; var pdata: Cardinal); |
Re: Comparing functions
Zitat:
![]() |
Re: Comparing functions
Yes that is AMD64 Core Temperature!Posted by hathor made by deamonES...Do i need to say more?
|
Alle Zeitangaben in WEZ +1. Es ist jetzt 02:51 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 by Thomas Breitkreuz