Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


Assembly Language


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
8 replies to this topic

#1 PsYcHoPrOg   Members   -  Reputation: 115

Like
Likes
Like

Posted 09 February 2000 - 09:28 AM

In a lot of the books I have read about game programming, assembly language is mentioned as a great help. However, the books don''t explain why or how. So I''m asking here, Why? How?

Sponsor:

#2 Staffan   Members   -  Reputation: 122

Like
Likes
Like

Posted 09 February 2000 - 09:31 AM

short answear (im sick and tired of writing for the moment):
why: speed.
how: excluded in the short answear, some other day maybe.

#3 trixter   Members   -  Reputation: 122

Like
Likes
Like

Posted 09 February 2000 - 10:09 AM

why: assembly is closer to machine language than c/c++ or any other high level language. you can write the most optimized code the closer you get to machine level. dont even mess with it until you need to optimize certain functions for speed or dont mess with it at all.

how: figure it out when you need to know


#4 PsYcHoPrOg   Members   -  Reputation: 115

Like
Likes
Like

Posted 09 February 2000 - 10:23 AM

Thank you for responding, but I am aware of the reasons that you both have submitted. However, I raise another question... how do you include the assembly language in a game written using a C++ compiler?

#5 Staffan   Members   -  Reputation: 122

Like
Likes
Like

Posted 09 February 2000 - 10:31 AM

1) using inline assembler (most C/C++ support it)
2) compile the asm files into seperate objects and link it all together.

using the inline assembler is a trival task, usually its something like (in MSVC is it _exactly_ this):

_asm (asm in borland)
{
push eax
mov eax,ebx
...
}

Edited by - Staffan on 2/9/00 4:32:56 PM

#6 Tha_HoodRat   Members   -  Reputation: 143

Like
Likes
Like

Posted 09 February 2000 - 10:49 AM

Why: Its harder , more challenging , more control as to how you program is executed ( Can anyone say Re-entrant self self altering code ? )

How:Use Masm32 or Tasm


#7 PsYcHoPrOg   Members   -  Reputation: 115

Like
Likes
Like

Posted 09 February 2000 - 10:58 AM

Ok, but where can I find an assembler?

#8 TUna   Members   -  Reputation: 122

Like
Likes
Like

Posted 09 February 2000 - 11:10 AM

Read the "Win32 Assembly" guide on this site. It tells you exactly how to do it and theres a link to download MASM32.

http://www.gamedev.net/reference/programming/features/win32asm1/

#9 dog135   Members   -  Reputation: 122

Like
Likes
Like

Posted 11 February 2000 - 04:32 AM

As Staffan showed earlier, your C++ compiler is also an assembler. You''d rarely need to compile your assembly program seperate from your C++ program.

E:cb woof!




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS