Archived

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

Assembly

This topic is 6358 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''ve got a couple questions about asm. First, what books do you recomend (other than that one by Dunteman -- I''ve been told it''s pretty good so I''m probably going to get it, but I want to hear what other books are good too). Also, are there any good sites with at least basic asm stuff (to be used more as an intro than anything else)? Second: just out of curiosity, how many of you regularly use asm routines in your games/engines? If you use it at all, what kind of things do you normally use it for? Any of you ever made a game completely in asm? If you code it, they will come... Commander M http://commanderm.8m.com cmndrm@commanderm.8m.com

Share this post


Link to post
Share on other sites
That''s a great free on-line book! It focuses on MASM, but the theory applies to TASM too, and is basically the same. There are a few macros that TASM doesn''t have but what the hell! He tries to make it as simple as possible for the transition between the two.
The Art of Assembly Language

Another book that you have to buy, and in my opinion is prety good is Mastering Turbo Assembler

There''s another that I would recommend and it is Revolutionary Guide to Assembly Language.

The second book teaches you some 32-bit (Windows) programming using objects and so on, whereas the other two are DOS based, but still teach you the concepts very well. All of them are great books.

Hope this helps!

..-=ViKtOr=-..

Share this post


Link to post
Share on other sites
well damn it... I just wiped my HD and reinstalled... when I was makeing the backups I forgot to back my bookmarks... I did have 20 or so good links for assembly... gurrr....
but heres one I remember...
www.x86.org
damn good site.... its a little more on the advanced side... but good none the less... they have a ton of info on assembly... they even have stuff strait from Intel...
get the
Intel Architecture Software Developer's Manual, Vol 1,2,&3
they tell you almost everything about Intel prossesers...
its under the Prosseser Manuals...

I use alot of assembly in my code.... all over...never had done a game in pure asm, but sounds like some fun =)

Great Milenko

Words Of Wisdom:
"Never Stick A Pretzel In Your Butt It Might Break Off In There."


http://www.crosswinds.net/~milenko
http://www.crosswinds.net/~pirotech


Edited by - Great Milenko on July 12, 2000 2:39:05 PM

Share this post


Link to post
Share on other sites
If you get really into it (assembler), you might want to pick up a copy of the actual reference guide from Intel. Actually, you can grab them in PDF format right from the web site.

For example, the Pentium II Instruction Set Guide is available here:

http://developer.intel.com/design/pentiumii/manuals/

That''s part 2 of a 3 book series. Part 1 is ''Basic Architecture'' and part 3 is the ''System Programming Guide''.

Hope that helps!
// CHRIS

Share this post


Link to post
Share on other sites
Ok, thanks for the input

I''ll take a look at some of these things when I have more time this evening.

By the way... what''s the "M" in MASM stand for? I know what TASM is and NASM, but I don''t think i''ve heard of MASM.

If you code it, they will come...

Commander M
(a.k.a. Crazy Yank)
http://commanderm.8m.com
cmndrm@commanderm.8m.com

Share this post


Link to post
Share on other sites
Actually, I thought the front M in MASM was for Macro?
I could be wrong, however.

If you want a load of asm relating to game development, you might check out Mike Abrash''s Black Book of Graphics programming - probably not yet mind, because it''s damn advanced, but it''s well worth a look. It even contains a CD version of the Zen Of Assembly!

-Mezz

Share this post


Link to post
Share on other sites
I''ve sort of always being interested in assembly. Mostly its the raw speed but I guess there''s a certain mystique involved as well. It looks so foreign. As a VB coder I could still real most C\C++, but assembler looks as hard to understand as hebrew.

I''ve seen heaps of globs of assembler lying around and have used them on occasion as black boxes, just assuming that whomever wrote them knew more than me. My question is, how do you know when to optimise by rewriting something in assembler. I''ve often seem comments saying that ''this sqr() func is blah clocks faster than the MS VC one. How do you know how many clock cycles a certain function takes in code? Is it a matter of analysing MS''s assembler or is there a clock timing function I can use to time the cycles of events in my code?

Thanks

gimp

Share this post


Link to post
Share on other sites
> That''s a great free on-line book! It focuses on MASM, but the
> theory applies to TASM too, and is basically the same. There
> are a few macros that TASM doesn''t have but what the hell! He
> tries to make it as simple as possible for the transition
> between the two.

What if I want to use gas?

gimp: You can measure how many cycles a certain operation requires by using the rdtsc (read time-stamp counter) instruction. Look it up in whatever asm refernce you have.

"Paranoia is the belief in a hidden order behind the visible." - Anonymous

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
I made a 3D tank game entirely in assembly language for my final year high school project. It was a pretty simple engine, you just drove around on a flat landscape and bumped into the occasional tree, and shot at other tanks. The graphics were flat-shaded extremely low polygon count models, but the engine was Z-buffered (28-bit Z buffer, with 4-bits determining which frame a pixel was on: means I only had to clear the Z-buffer every 16 frames). If you wanted the source I could probably email it out to you.

Share this post


Link to post
Share on other sites
I've done my whole game in asm. It'll be posted here first alpha version! However in the mean time look at:
win32asm.cjb.net

This is a great site! It covers *EVERYTHING* other than graphics, but it covers multithreading, memory management, structured exception handling, winsock programming, data base programming, as well as all the basics (31 tutorials for just the normal stuff! Plus more for database and winsock..)
So you can go from creating a simple hello world to a multithreaded game engine with this and some graphics tutorials.

Don't forget to look at Chris hobbs Assembly tutorials here on GameDev. It's a 7 or 8 part series that's got 6 of them up so far. The end result is a cool tetris game using asm DirectX w/ sound and input! It's very well done, and that's where I was first inspired to use asm for my games!
Good luck!
See ya round,
Ben

Oh yah your question what or where do I use asm. Well I use it everywhere but most people do intensive loops in asm, while all the init and Shutdown code for DDraw, DSound, DInput, and DPlay are in C++. But asm is great for blit's, alpha blending (In DDraw), real-time sound stuff, and intensive computations with lighting.

Edited: Oops URL wasn't right.. :-)

Edited by - cyberben on July 16, 2000 10:51:33 PM

Share this post


Link to post
Share on other sites