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 


Loading libraries in asm

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

Joined: 16 May 2007
Posts: 1073
Location: Israel

PostPosted: Thu Oct 21, 2010 1:59 pm    Post subject: Loading libraries in asm Reply with quote

i'm using TASM assembler to write assembly
i'd like to start using win32 api's but not using the invoke method,
instead i'd like to use the old fashion way, ( push parameters and then call ).
my code is as followed
Code:

.386
.model flat, stdcall
.data

 msg db "my msg$"

.code
 start:
 xor eax,eax
 lea edx,msg
 push eax
 push eax
 push edx
 push eax
 ; here i should call MessageBoxA, but i don't how to obtain it's address, or loading the user32.dll
 leave
 retn
 
 end start

any idea on how to get it?
Thanks.

_________________
Stylo
Back to top
View user's profile Send private message
tombana
Master Cheater
Reputation: 2

Joined: 14 Jun 2007
Posts: 456
Location: The Netherlands

PostPosted: Thu Oct 21, 2010 2:17 pm    Post subject: Reply with quote

Include the proper header files and try 'call MessageBoxA' or 'call [MessageBoxA]' . It should just import the function automatically (so it should link to user32).
Back to top
View user's profile Send private message
Stylo
Grandmaster Cheater Supreme
Reputation: 3

Joined: 16 May 2007
Posts: 1073
Location: Israel

PostPosted: Thu Oct 21, 2010 2:25 pm    Post subject: Reply with quote

i tried taking user32.inc from fasm assembler and did
Code:

include 'user32.inc'

but it keeps saying couldn't find user32.inc
idk what i need to import?

_________________
Stylo
Back to top
View user's profile Send private message
justa_dude
Grandmaster Cheater
Reputation: 23

Joined: 29 Jun 2010
Posts: 891

PostPosted: Thu Oct 21, 2010 3:07 pm    Post subject: Reply with quote

MASM is free, works well, and includes examples. Check it out.
Back to top
View user's profile Send private message
tombana
Master Cheater
Reputation: 2

Joined: 14 Jun 2007
Posts: 456
Location: The Netherlands

PostPosted: Thu Oct 21, 2010 4:54 pm    Post subject: Reply with quote

I agree with justa_dude. Try MASM or FASM which have many examples. (MASM is windows-only I believe).
If you want to use TASM just google for TASM examples to find out what files to include.
Back to top
View user's profile Send private message
Stylo
Grandmaster Cheater Supreme
Reputation: 3

Joined: 16 May 2007
Posts: 1073
Location: Israel

PostPosted: Fri Oct 22, 2010 4:14 am    Post subject: Reply with quote

okay, i moved to fasm
much better
good ide and i dont have to use invoke Very Happy

_________________
Stylo
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