"Nobody programs in machine language" (was: Modern Electronics (was

From: Deano Calver <deano_at_rattie.demon.co.uk>
Date: Tue Jun 22 11:15:22 2004

William Donzelli wrote:

>>Regardless of whether you actually USE it in the project,
>>if you do not have an understanding of machine language,
>>then you can not write a good "driver", or anything else
>>that directly addresses hardware.
>>
>>
>
>I ask then - how much code today is being written in machine language? One
>percent? A tenth of a percent? C may be a pain in the neck, but it is used
>in all sorts of places* where machine language was king.
>
>In any case, if we are talking about less than a percent, I think that
>would be a "specialty".
>
>*yes, I know about code that has to be very efficient.
>
>
As there aren't compiler technologies that can handle vector units (SIMD
maths units, the best you get is intrinsics which is just ASM with auto
register allocations), in my business (games) there are still some
serious amounts of assembler being written (the figure usually quoted is
around 10% of the dev time in console work is at the machine level, PC
is much less maybe 1%). You also have the portable market (GBA mainly)
(where your closer to 30% and maybe higher) and then you have graphics
chips where even with HLSL/GLSL (high level vector languages for
graphics) you still have to know the machine level information (HLSL is
new, at this time 90% of shipping pixel and vertex shaders are written
in ASM).

To give you an idea of scale of ASM usage, every PS2 game (something
like 1/3rd of a billion units sold) use a 4K and a 16K LIW CPU (each
capable of over 1 GFLOPS sustained) that there are no compilers for.

Even if you can get away with using high level languages, ASM is still
the heart and if you can't read an ASM manual you can't work on the low
level stuff. Sure not everybody needs to work on low level stuff but you
still need 10+ per game who do. The real specialty level in games is
knowing how CPU and GPU work at the sub-cycle level.

Want a good reason to teach ASM in uni's? Remind people that games will
become the biggest entertainment industry in the US within the next 10
years and we need ASM programmers.

Bye,
Deano
Received on Tue Jun 22 2004 - 11:15:22 BST

This archive was generated by hypermail 2.3.0 : Fri Oct 10 2014 - 23:36:59 BST