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 


[Tutorial] MASM32! Second Installment is in.
Goto page Previous  1, 2, 3, 4, 5
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  

Should I continie the tutorial?
Yes please
96%
 96%  [ 117 ]
No thanks, I dont care about learning Assembly
3%
 3%  [ 4 ]
Total Votes : 121

Author Message
bULWARK
How do I cheat?
Reputation: 0

Joined: 22 Jun 2007
Posts: 2

PostPosted: Fri Jun 22, 2007 11:25 pm    Post subject: Reply with quote

uzeil i'd like to learn a lil more about dUP() if it isnt a bother...
_________________
Learning
- ASM (58%, very good imo)
- C++(25%)
- To give an even amount as im taking, so i can be apart of undergrounds
Back to top
View user's profile Send private message AIM Address Yahoo Messenger
Uzeil
Moderator
Reputation: 6

Joined: 21 Oct 2006
Posts: 2411

PostPosted: Sat Jun 23, 2007 12:09 am    Post subject: Reply with quote

dUP(param) means duplicate/fill with <param>. A declaration example would be
Code:
setofbytes db 133 dUP(00)
which would allocate 133 bytes, point to the first with setofbytes, and fill these bytes with 00. Another example would be (I believe this works, I'm thinking I tested it Razz )
Code:
repeats db 250 dUP('Hello')
But I'm not positive on that one as I may have done something else to duplicate the string throughout Razz
_________________


Mini Engine v3.0
Mipla v1.0

Reposted old threads out of the MS section.
Back to top
View user's profile Send private message
sportskid300
Grandmaster Cheater
Reputation: 0

Joined: 22 Jun 2006
Posts: 944
Location: You Wish.

PostPosted: Sat Jun 23, 2007 9:15 am    Post subject: Reply with quote

Uzeil, how would you have me teach them?
I could easily include casemap and model type.
I also stated that a great source of learning can be found in the Tutorial and example directories.

_________________
Thanks to Mr.Mohammed for the Avatar!
http://forum.cheatengine.org/viewtopic.php?t=92760&sid=b5cfb5d8e759c2b023910472b2fac2e8 EXCELLENT ASM TUT!

If you need help, ask!
http://www.youtube.com/watch?v=cW44BpXpjYw INSANE Line Rider!
Back to top
View user's profile Send private message
Uzeil
Moderator
Reputation: 6

Joined: 21 Oct 2006
Posts: 2411

PostPosted: Sat Jun 23, 2007 6:45 pm    Post subject: Reply with quote

Those tutorials are based on HLA, teaching you how to abuse masm's HLA macros.

I would teach it as assembly. None of the .if , chr$, all that crap. I'd teach it as plain assembly, and the highest HLA I would reach would be 'include' and POSSIBLY 'invoke' if the script was going to be gigantic without it.

Benlue: You still could've kept what I didn't shoot down Razz

_________________


Mini Engine v3.0
Mipla v1.0

Reposted old threads out of the MS section.
Back to top
View user's profile Send private message
appalsap
Moderator
Reputation: 0

Joined: 27 Apr 2006
Posts: 6753
Location: Pakistan

PostPosted: Sat Jun 23, 2007 6:58 pm    Post subject: Reply with quote

.if is built into masm, chr$ is part of hutch's macro collection, big difference. Both aren't HLA.

You have to remember they're macros. They aren't like using a high level language like C, they just use the preprocessor for a predefined set of actions, kind of like #define in C. (of course masm's macro system is much more robust and not teaching that would be a disservice to the viewers)

As for not using them, I don't know. You aren't teaching them asm, you're teaching them MASM32. I don't agree with Uzeil's saying they aren't plain assembly, because they are. They're just macros. If you want to see what chr$ means you can open macros.asm and see what you're actually writing there. Or you could have ml spit out the source file after preprocessing.
Back to top
View user's profile Send private message
Uzeil
Moderator
Reputation: 6

Joined: 21 Oct 2006
Posts: 2411

PostPosted: Sat Jun 23, 2007 7:14 pm    Post subject: Reply with quote

"I don't agree with Uzeil's saying they aren't plain assembly, because they are. They're just macros." If you're saying that macros are plain assembly, I disagree. Macros aren't the actual assembly, and are made to make certain things easier or to look different than the assembly you would see when say opening your application with a disassembly such as Olly. Hell, making things simpler/easier than their compiled/linked counterpart is what high level languages exist for outside of portability.

"You aren't teaching them asm, you're teaching them MASM32." Precisely. If this tutorial was titled that it teaches basic masm32 macros/HLA keywords, then it wouldn't have been lacking much at all other than some skeleton explanations. But it says assembly tutorial in the title and throughout the thread.

_________________


Mini Engine v3.0
Mipla v1.0

Reposted old threads out of the MS section.
Back to top
View user's profile Send private message
appalsap
Moderator
Reputation: 0

Joined: 27 Apr 2006
Posts: 6753
Location: Pakistan

PostPosted: Sat Jun 23, 2007 7:19 pm    Post subject: Reply with quote

main.c
Code:

#include <stdio.h>
#include "macros.h"

INIT_PROGRAM
HELLO_SAY
EXIT_PROGRAM


macros.h

Code:

#define INIT_PROGRAM int main() {
#define HELLO_SAY printf("Hello, World!");
#define EXIT_PROGRAM return 0; }


you're telling me this is not real C?
Back to top
View user's profile Send private message
Uzeil
Moderator
Reputation: 6

Joined: 21 Oct 2006
Posts: 2411

PostPosted: Sat Jun 23, 2007 8:12 pm    Post subject: Reply with quote

wait wait aren't we in assembly here, not C?

And no, it isn't real C without the #define's. If you were to teach us that INIT_PROGRAM HELL_SAY EXIT_PROGRAM would make a hello world app, then it wouldn't be true unless you also gave them that extra coding, which is also going to mean it only will work if that person has that code (in this case in "macros.h" .)

_________________


Mini Engine v3.0
Mipla v1.0

Reposted old threads out of the MS section.
Back to top
View user's profile Send private message
sportskid300
Grandmaster Cheater
Reputation: 0

Joined: 22 Jun 2006
Posts: 944
Location: You Wish.

PostPosted: Mon Jun 25, 2007 9:26 pm    Post subject: Reply with quote

I think, Uzeil, that you should make an Assembly tutorial.
I realize that I fail horribly, and, as such, would rather promote you.
Appal, make a Coding tut in general. Rolling Eyes
Maybe Uzeil too.
You guys are too good and hold too much info. to not share.
I'll change the title.

_________________
Thanks to Mr.Mohammed for the Avatar!
http://forum.cheatengine.org/viewtopic.php?t=92760&sid=b5cfb5d8e759c2b023910472b2fac2e8 EXCELLENT ASM TUT!

If you need help, ask!
http://www.youtube.com/watch?v=cW44BpXpjYw INSANE Line Rider!
Back to top
View user's profile Send private message
ZenX
Grandmaster Cheater Supreme
Reputation: 1

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

PostPosted: Tue Jul 31, 2007 7:39 pm    Post subject: Reply with quote

Nice job Well done.
Hey, Uhm,Is This a Correct Script?
Code:

include \masm32\include\masm32rt.inc

.code

start:

call main
exit

main proc

LOCAL var1:DWORD
LOCAL number:DWORD
mov var1, 10
mov number, 1
begin:
push 600
call Sleep
mov eax, number
mov ebx, 23
imul eax, ebx  ; (1)
add eax, 5
Dec Eax,3
mov number, eax
print str$(number)
print chr$(10,10)
dec var1
cmp var1, 0
jne begin
print chr$("w00t w00t Multiply 23 then Add 5 then decrease by 3")
push 2000
call Sleep
ret

main endp

end start


I just added a Part to make it Decrease by 3 after Multiplying by 23, then Add 5.

Good job~

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

Joined: 30 Jan 2007
Posts: 1015
Location: http://www.behindthecorner.com/

PostPosted: Wed Aug 01, 2007 3:55 am    Post subject: Reply with quote

Uzeil and Appal u both should start making tuts ^^
_________________
Back to top
View user's profile Send private message
sportskid386
Expert Cheater
Reputation: 0

Joined: 11 Sep 2007
Posts: 156

PostPosted: Wed Mar 05, 2008 6:14 pm    Post subject: Reply with quote

bump to my own post on an inactive account.
yes
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
Goto page Previous  1, 2, 3, 4, 5
Page 5 of 5

 
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