Talk:Assembly

From GPWiki

Files:GUITutorial_warn.gif The Game Programming Wiki has moved! Files:GUITutorial_warn.gif

The wiki is now hosted by GameDev.NET at wiki.gamedev.net. All gpwiki.org content has been moved to the new server.

However, the GPWiki forums are still active! Come say hello.

asm2750--

Hello I contributed to this article, and gave a small masm example, if anyone would like me to expand on what I posted I'll be glad to share my knowlege.


Added source code section and link to paddles, a simple assembly game with source code. Offline


This is mostly x86 assembly? There are quite a few resources for programming z80 assembly, mostly good for TI-83/4 series graphing calculators or some types of really old computers. Game Boys also use a modified z80 processor. Or what about 68000 type processors? Also, I've seen a desktop GUI operating system written completely in Assembly called Menuet OS. It's small enough to fit on a floppy. Doesn't look bad either, I think. I think it's also somewhat unfair to just flat-out say that assembly is hard to port. It ports easily enough across operating systems, granted that they all use the same processor type. (ex. x86 Windows, Mac, Linux) --TheSpinningBrain

Not really -- the executable formats are different and there are different system calls to get memory and such. And the non-intel macs are PPC, which is signifigantly different from x86. There isn't even a standard format for assembly on the same processor (AT&T vs Intel syntax, iirc). gcc's assembler won't compile code for some of the other assemblers, for example. --pfeilspitze 10:29, 16 May 2006 (EDT)
I wasn't saying that, though. I was saying that it's mostly portable across operating systems on the same processor, and that it's sort of unfair not not mention that (though I could see the obvious difficulty in porting it to different architechures). Besides, even if the assemblers compile code differently, that doesn't mean that the code written for the assembler won't run. That does make it trickier to learn/teach assembly, though. There are also some Macs using Intels now.
True, gcc uses AT&T Syntax, Visual C++ (and I guess icc) for example use Intel Syntax for inline-assembly. However, there is a command for the gcc inline-assembler (asm(".intel_syntax noprefix\n");) that lets it accept Intel Syntax too, so you could propably use some ifdefs to write inline-assemby that at least compiles with all of the big compilers. Of course this doesn't solve the problem with assembly-code not running on different CPUs. I also imagine code using assembly is difficult to port from x86 to x86_64 architecture... I guess the most common use nowadays for assembly is SSE. A lot of programmers seem to prefer doing that in assembly instead of using intrinsics (which are an even bigger pain). --Tannin 04:31, 18 May 2006 (EDT)