![]() |
Re: Comparing functions
Learn the basics. It is increadibly how you show us your missing knowledge...
Ok, back to topic: what do you think does "outside" and "inside" mean? |
Re: Comparing functions
That'd be a new kind of OOP. Methods being hidden to the class itself and only accessable by others.
|
Re: Comparing functions
Liste der Anhänge anzeigen (Anzahl: 1)
Okay guys if you help me with this i promise i will post the final and finished product :-D ...and yea i have a looot to learn.newbie i am...
Back to the problem..i made a pic So why is it there var pdata:cardinal and in the omcdrv.pas its var pdata:dword; dont really really get it; and plus why cant i call that function.... :shock: |
Re: Comparing functions
Take a look in the help to get the facts about cardinal and dword and their sizes, properties, etc.
|
Re: Comparing functions
Muetze1 you said something bout dividing by 4 what did you mean? :?
|
Re: Comparing functions
Anyways i wanted to post this also...
Old functions
Delphi-Quellcode:
function GetPCRD(Bus, Dev, Func, Reg : byte): dword;
begin SetPortLong($0CF8, $80000000 or (dword(Bus) shl 16) or ((dword(Dev) and $1f) shl 11) or ((dword(Func) and $07) shl 8) or (Reg and $fc)); GetPCRD:=GetPortLong($0CFC); end; procedure SetPCRD(Bus, Dev, Func, Reg : byte; value : dword); begin SetPortLong($0CF8,$80000000 or (dword(Bus) shl 16) or ((dword(Dev) and $1f) shl 11) or ((dword(Func) and $07) shl 8) or (Reg and $fc)); SetPortLong($0CFC, value); end; New functions
Delphi-Quellcode:
procedure tPCIIO.GetPCIRDWord( dwBus, dwDev, dwFunc, offs : byte; var pdata:DWord );
begin FIPortIORef.WritePortL(PCRAddress,$80000000 or (longint(dwBus) shl 16) or ((longint(dwDev) and $1f) shl 11) or ((longint(dwFunc) and $07 ) shl 8) or (offs and $fc)); pdata := FIPortIORef.ReadPortL(PCRData); end; procedure tPCIIO.SetPCIRDWord(dwBus, dwDev, dwFunc, offs:byte; pdata:DWord); //var IPort: IPortIO; begin //IPort := oHWIO.IPortIORef; FIPortIORef.WritePortL(PCRAddress,$80000000 or (longint(dwBus) shl 16) or ((longint(dwDev) and $1f) shl 11) or ((longint(dwFunc) and $07) shl 8) or (offs and $fc)); FIPortIORef.WritePortL(PCRData, pdata); end; What i tried to do
Delphi-Quellcode:
Or.....
procedure tmainfrm.amd64x2start;
var C0:string; GetInstance:tomcdrv; pdata: DWord; begin GetInstance.IPCIIORef.GetPCIRDWord(0,24,$03,$E4,pdata); GetInstance.IPCIIORef.SetPCIRDWord(0,24,$03,$E4, pdata and not (1 shl 2)); GetInstance.IPCIIORef.GetPCIRDWord(0,24,$03,$E4,pdata); C0:=Format('%d °C',[(pdata shr 16 and $FF)-49]); RzLabel99.caption:=C0; //But then i get [Warning] Temperatures.inc(117): Variable 'GetInstance' might not have been initialized
Delphi-Quellcode:
procedure tmainfrm.amd64x2start;
var C0:string; pdata: DWord; begin OMCDRV.tGetPCIRDWord(0,24,$03,$E4,pdata); OMCDRV.tSetPCIRDWord(0,24,$03,$E4, pdata and not (1 shl 2)); OMCDRV.tGetPCIRDWord(0,24,$03,$E4,pdata); C0:=Format('%d °C',[(pdata shr 16 and $FF)-49]); RzLabel99.caption:=C0; //But then i get [Fatal Error]Internal error: BA1993 or [Fatal Error] Internal error: L1333 Hilfee!!!! :wall: |
Re: Comparing functions
Zitat:
|
Re: Comparing functions
What is that unit exactly for? Sounds like an interesting project!
|
Re: Comparing functions
As i said the project will be realased when finished but hilfeee!!! :(
|
Re: Comparing functions
Zitat:
|
Alle Zeitangaben in WEZ +1. Es ist jetzt 22:21 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