View Single Post
Old 15th Jan 2017, 6:31 pm   #7
Dave Moll
Dekatron
 
Dave Moll's Avatar
 
Join Date: Feb 2005
Location: West Cumbria (CA13), UK
Posts: 6,129
Default Re: They don't come much more Vintage than this

Quote:
Originally Posted by mole42uk View Post
We used machine code exclusively when programming early Z-80 based coin-in-the-slot video games. There was no assembler that used code efficiently enough to make the games fast enough on a 1MHz processor. It was a choice to gain every last bit of speed - we even selected the op codes in a routine to use the minimum number of clock cycles.
I'm a little puzzled by this, as my experience of writing in assembler, albeit on rather different machines, was that the assembler was creating exactly the same code as coding directly in machine code - but simplifying things by using instruction names and symbolic addresses rather than their numerical equivalents. My assembler routines were therefore every bit (no pun unintended) as efficient to run as code poked in directly in hexadecimal, but without needing to know exact addresses or offsets for referencing data or jump destinations. I have always seen this as the distinction between assembler and high-level compiled languages - don't even mention interpreted code (nasty inefficient stuff for running on machines with lots of redundant capacity).
__________________
Mending is better than Ending (cf Brave New World by Aldous Huxley)
Dave Moll is online now