| View previous topic :: View next topic |
| Should I continie the tutorial? |
| Yes please |
|
96% |
[ 117 ] |
| No thanks, I dont care about learning Assembly |
|
3% |
[ 4 ] |
|
| Total Votes : 121 |
|
| Author |
Message |
bULWARK How do I cheat?
Reputation: 0
Joined: 22 Jun 2007 Posts: 2
|
Posted: Fri Jun 22, 2007 11:25 pm Post subject: |
|
|
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 |
|
 |
Uzeil Moderator
Reputation: 6
Joined: 21 Oct 2006 Posts: 2411
|
Posted: Sat Jun 23, 2007 12:09 am Post subject: |
|
|
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 ) | 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
_________________
|
|
| Back to top |
|
 |
sportskid300 Grandmaster Cheater
Reputation: 0
Joined: 22 Jun 2006 Posts: 944 Location: You Wish.
|
Posted: Sat Jun 23, 2007 9:15 am Post subject: |
|
|
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.
_________________
|
|
| Back to top |
|
 |
Uzeil Moderator
Reputation: 6
Joined: 21 Oct 2006 Posts: 2411
|
Posted: Sat Jun 23, 2007 6:45 pm Post subject: |
|
|
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
_________________
|
|
| Back to top |
|
 |
appalsap Moderator
Reputation: 0
Joined: 27 Apr 2006 Posts: 6753 Location: Pakistan
|
Posted: Sat Jun 23, 2007 6:58 pm Post subject: |
|
|
.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 |
|
 |
Uzeil Moderator
Reputation: 6
Joined: 21 Oct 2006 Posts: 2411
|
Posted: Sat Jun 23, 2007 7:14 pm Post subject: |
|
|
"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.
_________________
|
|
| Back to top |
|
 |
appalsap Moderator
Reputation: 0
Joined: 27 Apr 2006 Posts: 6753 Location: Pakistan
|
Posted: Sat Jun 23, 2007 7:19 pm Post subject: |
|
|
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 |
|
 |
Uzeil Moderator
Reputation: 6
Joined: 21 Oct 2006 Posts: 2411
|
Posted: Sat Jun 23, 2007 8:12 pm Post subject: |
|
|
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" .)
_________________
|
|
| Back to top |
|
 |
sportskid300 Grandmaster Cheater
Reputation: 0
Joined: 22 Jun 2006 Posts: 944 Location: You Wish.
|
Posted: Mon Jun 25, 2007 9:26 pm Post subject: |
|
|
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.
Maybe Uzeil too.
You guys are too good and hold too much info. to not share.
I'll change the title.
_________________
|
|
| Back to top |
|
 |
ZenX Grandmaster Cheater Supreme
Reputation: 1
Joined: 26 May 2007 Posts: 1021 Location: ">>Pointer<<" : Address 00400560 Offset :1FE
|
Posted: Tue Jul 31, 2007 7:39 pm Post subject: |
|
|
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 |
|
 |
malfunction Grandmaster Cheater Supreme
Reputation: 0
Joined: 30 Jan 2007 Posts: 1015 Location: http://www.behindthecorner.com/
|
Posted: Wed Aug 01, 2007 3:55 am Post subject: |
|
|
Uzeil and Appal u both should start making tuts ^^
_________________
|
|
| Back to top |
|
 |
sportskid386 Expert Cheater
Reputation: 0
Joined: 11 Sep 2007 Posts: 156
|
Posted: Wed Mar 05, 2008 6:14 pm Post subject: |
|
|
bump to my own post on an inactive account.
yes
|
|
| Back to top |
|
 |
|