Jump to content
  • Advertisement

Archived

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

kharris

Assembly Language Question

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

I have read many of the posts about using assembly make programs faster and decided to check out tutorials about assembly. I have a question though, is HLA what everyone uses for assembly? I found a nice tutorial about HLA, but it seems very much like any other HLL (High Level Language). I was under the impression that at the core, assembly language was just a list of instructions that move data around in memory, rather than statements and objects. So, is HLA really faster than c/c++? Also, if people have links to good assembly tutorials, let me know. Thanks

Share this post


Link to post
Share on other sites
Advertisement
HLA is much closer to hardware than C/C++/etc., but it''s usually meant as an intermediate step between a HLL and pure assembly. Anyway, there are some great online books on the subject here, which, if I''m not mistaken, were written by the author of HLA.

Share this post


Link to post
Share on other sites
Thanks for the reply jonnyfish. That link is where I found the pdf that I am looking through.

Anyway, is that what people here use when they program their games in assembly or do they use pure assembly? Also, are the benefits of pure assembly worth the time/effort to learn it?

Share this post


Link to post
Share on other sites
quote:
Original post by kharris

Thanks for the reply jonnyfish. That link is where I found the pdf that I am looking through.

Anyway, is that what people here use when they program their games in assembly or do they use pure assembly? Also, are the benefits of pure assembly worth the time/effort to learn it?



Absolutely! It''s worth learning for fine-tuning code BUT and I can''t emphasize this enough... BUT it does absolutely no good for you until you know and understand the code that the C/C++ compiler generates for you... How can you improve upon what you don''t know? So, until you understand the type of code your compiler generates, you really need not bother with ASM to the extreme that you''re asking about.

I''ll put it another way... I know basic ASM, but I don''t know all of the little intricies of it like; instruction pairing, code caching etc. that maybe would give the speed boost you''re looking for. Most of the times, the C/C++ compiler is just fine for my needs.

Regards,
Jumpster



Share this post


Link to post
Share on other sites
To add to what Jumpster said... you have to not only know assembly language and what the compiler will generate, but you must also be at a level where you can outperform the compiler with your own code. It''s one of those things where you have to balance the time invested with the return you''ll likely see. I''ve chosen to learn a minimal amount of Assembly language, but I have no plans of actually using it... it''s more of an academic knowledge for me.

Share this post


Link to post
Share on other sites
I write code that I need to be very fast, in assembly. Visual C++ is an excellent compiler, and with optimizations on, I usually can see little or no difference in speed even when using assembly that''s as optimized as I can get it. So, in most cases, you only need to use assembly when you want to use an instruction(s) you know the compiler won''t use, such as "rep stosd" or "rep movsd", instructions specific to the Pentium-Pro and above, such as cmovxx, and MMX and SSE instructions.

~CGameProgrammer( );

Share this post


Link to post
Share on other sites
ya i know asm well, but just for 8086 , MMX/PRO/3DNOW are too much for me, i think it will take six months or so to get to such a degree that when i realize the executable is slow i can image how faster i can make it up thru asm. but in some sepcial cases such as 3D-engine, asm rules IMO.

virtual ~ed9er();

------------------------------
Dedicate to nobody, I''m nobody

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!