Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

kamelbak

Help learning assembly

This topic is 5738 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey all. I''ve realized that there aren''t many printed books and many .pdf''s on assembly. With all of this stuff, which do you think would be best for an intermediate C++ programmer looking to learn assembly? Any advice on assemblers? A friend of mine recommended FASM. What tutorials and assemblers do you think an ASM newbie like me should start out with? Thanks! kamelbak

Share this post


Link to post
Share on other sites
Advertisement
Hello,

Im assuming you want to learn assembly for x86''s
I suggest you use the inline assembler for Visual C++!!!!

int AddNumbers(int num1,int num2)
{
int result = 0;

_asm // <-- Tells compiler we are using assembly!!
{
mov eax,num1; // Store num1 in register ax
mov ebx,num2; // Store num2 in register bx
add eax,ebx; // Adds ax and bx, result is in ax.
mov result,eax; // Stores ax, in ''result''
}

return(result); // Returns the result!
}

Or something like that anyway - i feel this would be a nice easy way of getting used to assembly, and being able to mix it with C++ will make the transition easier for you.

here are some sites that you might find useful
http://www.azillionmonkeys.com/qed/asm.html#general
http://www.penguin.cz/~literakl/intel/intel.html

TRY THIS ONE FIRST - address was to long for the screen
http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=1258&lngWId=3

Share this post


Link to post
Share on other sites
I began learning 16-bit ASM a month ago. 16-bit ASM programming is fun because you will recognized how high-level programming experience with OOP especially C/C++ help you design and implement applications in ASM. Without high-level experience ASM can be confusing.

Now I want to learn 32-bit ASM!

Kuphryn

Share this post


Link to post
Share on other sites
Thanks you guys. I'll check out this places. Inline ASM sounds good. Say, what is the difference between 16 bit and 32 bit ASM? Any more compilers/tutorials? Thanks!

[edited by - kamelbak on October 3, 2002 9:28:32 PM]

Share this post


Link to post
Share on other sites
I recommend you use MASM.

Here's an on-line book for learning 16-bit x86 ASM.

By the way, there are bunch of books on assembly language you can get. Try this.

Hope this helps!

Edit: One of links didn't work.

[edited by - Gladiator on October 3, 2002 9:34:47 PM]

Share this post


Link to post
Share on other sites
Thanks. I think I''ll start 16 bit ASM, with either FASM or MASM. I was wondering though: I got a little bit into The Art of Assembly Language, but it seemed to be that it was mainly about some High Level Assembler. Is this to help you understand the basics of assembly or something? By the way, I think the Amazon link was the one that didn''t work.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
If you have VC6 or VC7, they make a good for a good IDE and debugger when used with MASM.

Share this post


Link to post
Share on other sites
1:difference with 16 and 32 bit assembly
32 - using api, eax, ebx, ect
try do something like winows routine you will see differece
2:
try TurboAssembler32, NASM makes smaller files (4k Tasm=3k Nasm), but its really makes no difference when using some code packers like upx
3:
books:
art of assembly, Iczelion tutorials, some CrackMe and Cracks sources and as always FAQ
4:
forget about VC and other non-only-asm compilers:
-you lose knownlege about win/linux routine
-you lose knownlege about executable files, sections etc., and without that whats for learning asembler? - if game works slowly use rather other algorithm than code it in asmebler
5:
some boot sector trick = on floppy you have 512-65(fat12 header)=447 bytes for your bootloader, so try do it in c++
6:
really asm is nowadays for virus writes (polymorphism, some code meshes engines etc.), but really there is nothing better to delete FAT on somebodys computer, or on tousands computers, or on milions computers...

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!