Jump to content
Tuts 4 You

Assm & C++


ReiKo

Recommended Posts

First of all i woud like to say that my goal from this two programing lang. is to make future cracktros.

I have some questions and woud like some opinion on them.

Is Assambler or C++ better for makeing cracktros?

I have much more experience in C++ and it seems very interesting to me, but as i see lots of cracktros / keygens are coded in Assambler.

These are issues :

Assambler

- Fast

- Much smaller exe's

- It's good to know it for your cracking skills

C++

- It's newer lang after all and I can do more with it later if I dont do only Cracktros/Demos, ( I can make games,applications and etc. ).

- I have more experience on it then on Assambler

- Easier to learn and advance with it?

- Has more options.

Thanks, and try to be detailed as much as possible.

Link to comment

I think, you already answered yourself.

But imo when you say, that you wanna make cracktros..

who cares for a few additional KBs, which C++ might give you ?

When you're correctly compiling, the exe shouldn't be much bigger

than an asm exe. Afaik most demo ppl code in C++.

Ofc they gotta use asm, when they're after hardcode stuff

like 256 bytes or whatnot - but you aren't, right ?

On the other side most sources for demo/intro stuff will be in C++.

See this: http://nehe.gamedev.net/

Lessons 01-48... They ALL come with sources in C++,

but only the first ones with asm sources.

And I'm not sure, if prefering asm for cracktro coding

would give you a great advantage regarding reversing.

But one thing.. ofc it's always nice to see what's what while debugging.

I mean to always immidiately recognize your code in the dbg... ^^

Therefor I think, for cracktro coding it should be much more comfortable

to code in C++. More than ever, if C++ is your favorite language !

Link to comment

Then again, do you think you can create that "oldschool" kind of effect with C++ if I'm not using Assambler...

Anyway, great post Ufo it helped me to sort some things in my head.

And yeah, shoud i use SDL or OpenGL for that sort of coding?

For sound I'm used to work with FMod.

Edited by Reiko
Link to comment
"oldschool" kind of effect
What oldschool effect ?

U'll simply use 'usual' APIs like gdi32..

or OpenGL or D3D.

SDL ? I didn't even know it.. it prolly uses OpenGL ?

But all of them are used in the same way in every language.

I mean the way, their functions are used..

I only tried OpenGL.. it's easier to get in and is much more compatible.

On the other side D3D let's you directly access the hardware,

which means, that it's MUCH faster. And it comes with a

SDK (official help library). OpenGL has no real SDK..

Hardcore-gfx-card-killing-demos use D3D ofc,

but again.. u're not after that, right ?

It's your choice.. but I would suggest OpenGL.

Regarding sound, be sure to get the latest uFMOD:

http://sourceforge.net/projects/ufmod/

It's the smallest player, u can get out there.

In the past it didn't support synchronization functions,

but they added it a few month ago,

which was like christmas for me :)

Cheers

Edited by Ufo-Pu55y
Link to comment

Anyhow, I didn't want to make another topic on this so I'll post question here :

Is it better for me to go to VS 2005 IDE, because I got old VS 6 that was made like in 1998 :/ .

I mean, it can just be better, no?.

Thanks.

Link to comment

VC8/2005 is better of course, better compiler, improved user interface etc.

But I prefer using VC6 from time to time, at least with the latest SP6.

VC6 doesn't link to msvcr80.dll which is more compatible with older PCs that don't have the latest VC(++) Runtimes installed.

If you manage to get your hands on the Intel C++ compiler, you'll even get decent binary sizes ;)

Link to comment

Hmm , yeah... cool :)

Anyways , this is .NET edition, I did search on wikipedia about it but I just can't understand all that fuss about it. Why .NET, what is that, how it affect C++ and is it worth trying it?

And yeah, I woud like to learn something about MFC (looks good for makeing keygens), Is it worth it or shoud i look at other way?

Thanks.

Link to comment

MFC is good for getting started, you can easily build dialogs, there's a ****load of additional functions, ...

Anyway, MFC sucks if you want small executables that don't require any additional runtimes, dlls and so on.

The problem is that almost every tutorial on codeguru or codeproject is done with MFC which kinda annoys me cause often you're unable to properly 'port' the stuff to non-MFC code due to MFC functions being used etc.

Imho it's easier to use MFC but it's far better to start using the plain Windows API for coding apps, cause you learn it right away.

.Net might be worth a look, it's platform independent (at least that's what they say ;) ). C# is pretty useful, kinda like (C++)++ with some good additions.

However, I think C++ .NET is just redundant, I guess they invented it to make switching from C++ to .Net world easier but if I ever decided to code .NET apps I'd pick C#.

// Visual Studio .NET doesn't mean you have to code .NET apps, it's just supposed to show that it contains support for .NET.

Actually there is no version without a .NET ;)

Link to comment

So for small exe's, keygens or sort of that WinaAPI is good start?

I'm littlebit confused now with using C++ sintax , WinAPI ( has it own sintax?? ) , OpenGL,Fmod lib's ... :)

Link to comment

Reiko

C++ is a programming language and therefore has it's own syntax - WinApi is a set fo functions provided by the Windows OS, they have no own syntax. The WinApi is just a bunch of functions. :]

And yeah, WinApi is a good start to code small executables. It's the best option, imho, coz it doesn't require external libs.

Link to comment

Reiko

Of course you can, since they're simple functions. Simple sample:

#include <windows.h> // here, the function prototypes are stored. the basic winapi functions are hereint WinMain(HINSTANCE Instance, HINSTANCE Previous, char *CmdLine, int CmdShow)
{
// now, a WinApi function gets called
MessageBoxA(0, "Hello, what's up?", "Sample", MB_ICONINFORMATION);
return 0;
}

It's just a dirty sample. Hope you got it. :)

edit - Found some links, didn't checked their contents, but I think they're beginner tutors... :P

http://www.functionx.com/win32/Lesson01.htm
http://people.montana.com/~bowman/Software/winAPI.htm

Good luck!

Edited by metr0
Link to comment
Reiko

Of course you can, since they're simple functions. Simple sample:

#include <windows.h> // here, the function prototypes are stored. the basic winapi functions are hereint WinMain(HINSTANCE Instance, HINSTANCE Previous, char *CmdLine, int CmdShow)
{
// now, a WinApi function gets called
MessageBoxA(0, "Hello, what's up?", "Sample", MB_ICONINFORMATION);
return 0;
}

It's just a dirty sample. Hope you got it. :)

edit - Found some links, didn't checked their contents, but I think they're beginner tutors... :P

http://www.functionx.com/win32/Lesson01.htm
http://people.montana.com/~bowman/Software/winAPI.htm

Good luck!

Hey metr0 thx very much this was helpfull.

I think i will just go trough my C++ book to learn basic and some advanced stuff and then will go trough WinAPI,OpenGL and Fmod.

Link to comment

I don't want to post another topic because question is similar to the first one.

I did get VS 2005 Pro, but I dont see "Execute" command like in VS 6??

There is just build and compile, I woud like to execute my c++ code without building... :/

Link to comment
I did get VS 2005 Pro, but I dont see "Execute" command like in VS 6??
Never had anything but 2005.

Why would u need such a feature anyway ? oO

Link to comment

Becuase i want to see how code runs and that i can right away fix it.

Now i must compile, then build then go to folder and execute exe to see it run.

Link to comment
Now i must compile, then build then go to folder and execute exe to see it run.

Erm.. did u try this funny green arrow ? ^^

It compiles and runs.. well at least it should..

Link to comment

I'm not sure, cause I never use it (and it causes errors, dunno why, smth with cmd.exe :P ).

But I think this is what you're looking for ?

go.png

Might only work with Debug, as I said, didn't test it :)

UFO was faster damnit :x

Edited by Killboy
Link to comment
  • 3 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...