[gameprogrammer] Re: Pushing on stack in assembly
- From: David Olofson <david@xxxxxxxxxxx>
- To: gameprogrammer@xxxxxxxxxxxxx
- Date: Sat, 29 Mar 2008 12:20:22 +0100
On Saturday 22 March 2008, Kevin Jenkins wrote:
> Sure, the very first games were in assembly because there was no
> other option.
Actually, the *very* first games were most likely handwritten in
machine code - that is, entered as raw hex or binary. :-)
AFAIK, most games were all asm on the 8 bit machines (Spectrum, C64,
MSX etc), and the more demanding games on the 16 bit machines (Amiga,
ST, X68000 etc) were all or mostly asm code as well.
The MC680xx CPUs were, although supposedly designed for high level
languages, way too inefficient at low level work, so you had
to "abuse" the weird high level instructions in various ways that a
compiler at the time would never think of. Also, when you start
making use of the quirks of the ALU and related instructions (MUL
giving a result word twice the size of the operands, for example) of
any CPU, it's actually harder - if at all possible - to use something
like C.
Even early PC/VGA games would normally have at least low level
graphics and sound routines coded in asm, as there was no hardware
acceleration whatsoever. (The "10% of the code that runs 90% of the
time" was actually *code* and not specialized silicon.)
These days, asm is mostly used in price sensitive mass produced
applications on very low end hardware (8 bit MCUs and similar), and
in some special cases where higher level languages won't do what you
want.
//David Olofson - Programmer, Composer, Open Source Advocate
.------- http://olofson.net - Games, SDL examples -------.
| http://zeespace.net - 2.5D rendering engine |
| http://audiality.org - Music/audio engine |
| http://eel.olofson.net - Real time scripting |
'-- http://www.reologica.se - Rheology instrumentation --'
---------------------
To unsubscribe go to http://gameprogrammer.com/mailinglist.html
- References:
- [gameprogrammer] Pushing on stack in assembly
- From: Kevin Jenkins
- [gameprogrammer] Re: Pushing on stack in assembly
- From: ®£$ǖ\"v@M$Ħ ¢© $.
- [gameprogrammer] Re: Pushing on stack in assembly
- From: Kevin Jenkins
Other related posts:
- » [gameprogrammer] Pushing on stack in assembly
- » [gameprogrammer] Re: Pushing on stack in assembly
- » [gameprogrammer] Re: Pushing on stack in assembly
- » [gameprogrammer] Re: Pushing on stack in assembly
- » [gameprogrammer] Re: Pushing on stack in assembly
- » [gameprogrammer] Re: Pushing on stack in assembly
- » [gameprogrammer] Re: Pushing on stack in assembly
- » [gameprogrammer] Re: Pushing on stack in assembly
- » [gameprogrammer] Re: Pushing on stack in assembly
- » [gameprogrammer] Re: Pushing on stack in assembly
- [gameprogrammer] Pushing on stack in assembly
- From: Kevin Jenkins
- [gameprogrammer] Re: Pushing on stack in assembly
- From: ®£$ǖ\"v@M$Ħ ¢© $.
- [gameprogrammer] Re: Pushing on stack in assembly
- From: Kevin Jenkins