I recently worked on some code which included a variable length compare.
The length was provided in a halfword which was decremented and
then ORed into the first two bytes of a CLC instruction.
There are no checks for a length greater than 256: so it would
just overwrite the opcode.

I imagine the programmer muttering "I don't hold with these 'ere
new-fangled `long' instructions like CLCL. 256 bytes ought to be
enough for anyone."

(CLCL was introduced in 1970).

--
                        Martin

Dr Martin Ward | Email: [email protected] | http://www.gkc.org.uk
G.K.Chesterton site: http://www.gkc.org.uk/gkc | Erdos number: 4

Reply via email to