Hi, im thinking of learning assembly, but i cant figure out what program do you use to do that. I'm pretty sure that you can do it in VS.NET 2003 or 2005, but i cant figure out where, plz help.
Thx
Printable View
Hi, im thinking of learning assembly, but i cant figure out what program do you use to do that. I'm pretty sure that you can do it in VS.NET 2003 or 2005, but i cant figure out where, plz help.
Thx
Start using it in C++ like so:
And the best website to learn assembly is www.artofassembly.com . Start in the 16 bit DOS section. The instruction set is introduced in Chapter 3 and 6, with more instructions introduced in the later chapters. ;)Code:#include <stdio.h>
int Addition(int val1, int val2){
_asm{
mov eax, val1
mov ebx, val2
add eax, ebx
}
//function automatically returns whats in the eax register
}
int main(void){
printf("%d\n", Addition(10,20));
return 0;
{
Well I found that website pretty useless, way too much info and no obvious starting point.
I'd suggest you grab yourself a copy of "Assembly Language for Intel-Based Computers" (Author: Kip Irvine, Publisher: Prentice Hall, ISBN: 0-13-049146-2).
It comes with a CD and its everything you need to learn ASM. Teaches you how the hardware works first so you can start coding easily. Jumping into the code without appreciating the hardware makes it 10x harder to learn.
It covers a LOT of different techniques and has an excelltnt instruction set reference and comprehensive glossary and index.
I would have happily paid twice as much for this book. Go and buy it.
Once done with what wossname said, I would suggest MASM for GUI windows based stuff.
(I really should get paid for how much I promote MASM here).
Others may disagree, as there are easier syntaxes for Windows Based ASM, but meh.
chem
That book I suggested uses MASM al the way through :D It has the compiler on the CD too.
Very very cool indeed.
You mean the only way to program assembly in VS is in C++? I hope it doesn't use anything of C++ itself, cause i've never studied it, i only know VB.NET.Quote:
Originally Posted by Jacob Roman
And thx for all the links on books and stuff :)
I wouldn't know, never tried it in VS, but: If thats the case, all you'd need is the basics of C++ knowledge like the main procedure and you can have the rest as ASM:
..for example.Code:int main()
{
__asm {
xor eax,eax
}
return 0;
}
chem
Thx for info :thumb:Quote:
Originally Posted by chemicalNova
Even so, the basics of C++ is still a lot to learn in order to learn ASM. It would be a major obstacle.
There's little advantage to using VS as a debugger anyway. I find it much easier to use notepad and the console. It gives you a better idea of how things work. The book covers EVERYTHING you need to know. :D
Why would you bother with VS anyway. The MASM "IDE" is pretty much just notepad anyway :)
chem
I would also try fasm - its really good as well. You can do almost the same amount of things with fasm macros as with masm macros unlike most other assemblers. http://flatassembler.net/Quote:
Originally Posted by chemicalNova
But of course masm has a nice code library and some pretty good ides:
http://www.easycoder.org/English/index.htm (For MASM and looks like Visual Basic 6)
http://radasm.visualassembler.com/ (Supports a wide range of assemblers but support for FASM is minimal)
http://www.winasm.net/ (Supports MASM and FASM (with Shoorik's add-in))
Quote:
Originally Posted by chemicalNova
You didn't have to return 0. It automatically returns whats in the eax register. So you pretty much zeroed the result. But since theres no value in the eax register anyways...
Sif pick something like that up in a small example :p
I assumed that he would have stored other values in eax :)
chem
1) Nothing "automatically returns" eax. The return code is STORED in eax.Quote:
Originally Posted by Jacob Roman
2) Since this is main(), you don't want to return a value. 0 is the successful application return code.
You just controdicted yourself. The return code is stored in eax, hence it did it for ya, and the user didn't have to do it ;)Quote:
Originally Posted by penagate
It's automatic like I said :bigyello:
No, you contradicted yourself in saying that... the return code is stored in eax, but nothing did it for you, you moved it there yourself ;)Quote:
Originally Posted by Jacob Roman
I think you are being unnecessarily confusing when you say "automatically returns". Returning a value is an action. In C you use the "return" statement to both set the return value and exit the procedure in one hit. In ASM you just exit the procedure and the value in the eax register, whatever it is at the time, is taken to be the return value.
So, we are both trying to say the same thing anyway ;)
"Semantics gennelmen, semantics" :D