Low-Level Languages

[ LiB ]

Low-Level Languages

Each CPU has its own unique machine language, which consists of binary numbers only. Machine languages are tedious and repetitive, two things that humans are poor at and seem to dislike universally . These machine languages are low-level languages. Low-level languages closely reflect the inner workings of a computer and are sometimes referred to as machine- oriented languages .

The most prominent example of a low-level language is assembly. Assembly language is one step higher than machine language and consists of numeric instructions for a specific computer architecture. Assembly is limited because it needs detailed instructions, and there isn't much portability from platform to platform.

In assembly, machine language commands are replaced by mnemonic commands on a one-to-one basis. An assembler program then takes care of converting the mnemonic into corresponding machine language binary. In assembly, a programmer can also use symbolic addresses for data items. The assembler program will assign these symbolic addresses to machine addresses and make sure they do not overlap or overwrite each other. Today, most assembly programming is reserved for high-end performance device drivers, where execution speed and code size are more important than rising development costs.

In the early days of games , assembly was the mainstay, and common game platforms were MS-DOS, Apple, and the Atari 800. But as game programs grew in size, programmers found that assembly was pretty poor at scaling, and as code grew programs became exponentially more difficult to maintain, and testing and debugging them became more and more difficult.

After assembly languages came compiled languages like C, COBOL, and FORTRAN. With a compiled language, the programmer writes source code, and then a compiler takes the source code and translates it into machine language for a particular computer. With a compiler hard at work, the programmer can ignore some of the machine-dependent details, and with a good compiler the program will run almost as fast as with assembly.

C in particular really made large-scale programming possible by automating much of what programmers found difficult in assembly. C also universalized the idea of functions, so for the first time programmers could share functions they wrote with each other. This led to larger development teams and a growing pool of development tools. Great games came out of C (and still do), like Doom and X-Wing .

[ LiB ]


Game Programming with Pyton, Lua and Ruby
Game Programming with Pyton, Lua and Ruby
ISBN: N/A
EAN: N/A
Year: 2005
Pages: 133

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net