instruction format

To enable efficient decoding, the displacement (16-bit and 24-bit) will be left justified.  Decoding by shifting right will also achieve sign extension.  The format is as follows:

  a3:8 a2:3 a1:8 op:8

a3,a2  forms a 16-bit displacement
a3,a2,a1 forms a 24-bit number

the decoding is:

c = CS[ip]
op = c & 255
a = c >> 8	// a is signed 24-bit
d = a >> 8	// d is signed 16-bit
a1 = a & 255
a2 = d & 255
a3 = (d >> 8) & 255

a1, a2, a3 are 0..255

5 Jan 2006
