News for hackers. Stuff that matters.
Re:Could Bill Gates write code? by bartl on Tuesday June 07, 2011 @07:39AM (#2628692)
>if that bit of code was small enough (ie one or two bytes) you could simply encode those one or two bytes inside a two or three byte instruction thus saving the three-byte instruction needed to jump over it.

The 8080 and Z80 had a relative jump, which took only 2 bytes. It had a more limited jump range, but it was definitely wide enough to jump over 3 bytes.

>All that... for three bytes.

No, two.

Re:Could Bill Gates write code? by ColinWright on Tuesday June 07, 2011 @09:20AM (#2628988)
If I recall correctly the opcode for the jump absolute was C3, and the conditional versions we C2, CA, etc. The destination was two bytes, 16 bits, little endian.

The JR - jump relative unconditional - was hex 18 followed by the number of bytes to jump, calculated from the byte after the JR instruction to account for the pipelining.

From memory - I could be wrong, but it's close enough.