Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Accesing ports with Delphi

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
ZenX
Grandmaster Cheater Supreme
Reputation: 1

Joined: 26 May 2007
Posts: 1021
Location: ">>Pointer<<" : Address 00400560 Offset :1FE

PostPosted: Fri Jul 06, 2007 9:09 pm    Post subject: Accesing ports with Delphi Reply with quote

How to access ports
In the old days of DOS and 16bit Windows, writing to ports (serial, printer, game, video and other ports) in your computer was easy; all you had to do was use the "port[]" command.

Delphi no longer supports the "port[]" command, so you may have to use assembly functions as follows:
Code:

function ReadPortB
         ( wPort : Word ) : Byte;
begin
  asm
    mov dx, wPort
    in al, dx
    mov result, al
  end;
end;

procedure WritePortB
         ( wPort : Word; bValue : Byte );
begin
  asm
    mov dx, wPort
    mov al, bValue
    out dx, al
  end;
end;


Credits to Chami

_________________
CEF Moderator since 2007 ^_^
ZenX-Engine
Back to top
View user's profile Send private message Yahoo Messenger
DeltaFlyer
Grandmaster Cheater
Reputation: 0

Joined: 22 Jul 2006
Posts: 666

PostPosted: Fri Jul 06, 2007 10:12 pm    Post subject: Reply with quote

http://www.chami.com/tips/delphi/111796D.html

Would've been slightly more useful if you understood what you were C/P'ing, in which case you would have explained that a virtual device driver is needed to do the IO to ports, or at least calling the system APIs that manipulate the IO permission bitmap...

ZenXChaos wrote:

HAHAH!

Im a godly copy-and-paster

_________________

Wow.... still working at 827... what's INCA thinking?
zomg l33t hax at this place (IE only). Over 150 people have used it, what are YOU waiting for?
Back to top
View user's profile Send private message
appalsap
Moderator
Reputation: 0

Joined: 27 Apr 2006
Posts: 6753
Location: Pakistan

PostPosted: Fri Jul 06, 2007 10:13 pm    Post subject: Reply with quote

I don't think Delphi can even create device drivers Confused
Back to top
View user's profile Send private message
DeltaFlyer
Grandmaster Cheater
Reputation: 0

Joined: 22 Jul 2006
Posts: 666

PostPosted: Fri Jul 06, 2007 10:25 pm    Post subject: Reply with quote

Yep, that's C/ASM territory.
_________________

Wow.... still working at 827... what's INCA thinking?
zomg l33t hax at this place (IE only). Over 150 people have used it, what are YOU waiting for?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites