Jump to content
  • Advertisement

Archived

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

Venetician

Assembly

This topic is 6176 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

What do you recommened as far as books/tutorials for learning? Game companies are still looking for people that can code Assembly, and I am looking into it. I am a programmer sufficient in C and C++. Please help me out, Thanks.

Share this post


Link to post
Share on other sites
Advertisement
While I''m not sure how much you should really be concerned about learning assembly, I''ve been learning assembly from "Assembly language step-by-step", second edition. It''s a far cry from a full treatment of the instruction set, but it''s made asm so easy to learn, I could almost like writing in asm. ;-)

Really though, be prepared for alot of hard work. In order to optimise code with ASM, you''ll need to be damn good. Microsoft''s and Borland''s compiler engineers are pretty slick. Most compiled C/C++ code is pretty tight.

Anyways I picked up the book to get a better understanding of computer hardware. Let me tell you, it''s a new world of programming when you _really_ understand what happens when you execute something like : x = 7 + 18; Do you know how many instructions that takes? Anyways, I''ve rambled enough =)

"So much fun, so little time."
~Michael Sikora

Share this post


Link to post
Share on other sites
See my reply to another assembly question in this forum:
http://www.gamedev.net/community/forums/topic.asp?topic_id=60813

quote:


In order to optimise code with ASM, you''ll need to be damn good. Microsoft''s and Borland''s compiler engineers are pretty slick. Most compiled C/C++ code is pretty tight.




Compiled code is highly overrated. It''s true that compilers are really good nowadays but it isn''t hard at all to outperform a compiler. The important thing to remember is that by programming in assembly language, you have an entire new perspective on the problem, and you can take advantage of the processor to get things done fast (it''s more than just a matter of re-arranging and tweaking instructions generated by the compiler.)

Also, compilers can take a little bit of time to catch up with modern processors. I think Intel''s compiler is the best for Windows, but it''s quite expensive...

quote:


Anyways I picked up the book to get a better understanding of computer hardware. Let me tell you, it''s a new world of programming when you _really_ understand what happens when you execute something like : x = 7 + 18;




I agree fully. As I stated in my other post, this is one of the greatest things about being proficient in an assembly language.

quote:


Do you know how many instructions that takes?




Assuming you know that none of the registers contain the value 7 or 18, it takes 2 instructions, something like:

mov al, 18
add al, 7

Oh, but since we''re dealing with constants here, it''s going to be 1 instruction:

mov al, 25

Or something similar



---
Bart

Share this post


Link to post
Share on other sites
quote:
Original post by trzy
Compiled code is highly overrated. It''s true that compilers are really good nowadays but it isn''t hard at all to outperform a compiler.

I think it would be pretty easy for someone with a little ASM skill to outperform a compiler, but nowhere near so easy to significantly outperform the compiler. The danger here is in spending too much time optimising code that doesn''t need to be optimised, and finding out you spent double the development time to only get a 5% increase in speed. As with any optimisation strategy, use of assembly should almost certainly be used in conjunction with profiling, since 90% of companies that want assembly programmers want it for optimisation, not for whole projects. (Exception: some handheld hardware, for example.)

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!