View Single Post
Old 16th Jan 2017, 1:28 pm   #15
G8HQP Dave
Rest in Peace
 
Join Date: Sep 2008
Location: Solihull, West Midlands, UK.
Posts: 4,872
Default Re: They don't come much more Vintage than this

I too am puzzled by the claim that assembler is somehow less efficient than machine code. This could only be true if the assembler sometimes tried to do something other than what is given in the source code e.g. an attempted optimisation which turns out to be unhelpful. Most assemblers don't do this, and any competent assembler which did should be able to have this facility switched off.

The big advantage of writing in assembler is that you can write maintainable code. Very little code survives for long without needing modification, for debugging or enhancement. Assembler can contain comments and symbolic names. If you want to save data space by re-using it, you can do this by just giving several names to one location - but then be careful that the different uses do not overlap under any circumstances! If you really want to use opcodes as data then you can.

Any competent assembler programmer will be able to read and patch machine code too. Then ensure that the patch gets put into the source code and commented!!
G8HQP Dave is offline