[LispM-Hackers] Bug in SSDN2 Macroinstruction Notes

Nyef nyef@softhome.net
Mon, 7 Jan 2002 10:55:24 -0500 (EST)


On 6 Jan 2002, James A. Crippen wrote:

> I've discovered what I'm pretty sure is a bunch of bugs in the SSDN2
> description of the macroinstruction formats (the first part of the
> chapter on macroinsns).  I hope to outline why I think these are bugs
> and would like people to comment.
>
> Consider the format of a mainop:
>
>   FEDC BA98 7654 3210
>   cccc cccc bbbo oooo
>   c -- opcode
>   b -- base register
>   o -- offset
>
> It's given that all mainops have to have at least an opcode.  The base
> register and offset can be put to other purposes, if the particular op
> needs them used differently.  For this reason I believe that the
> diagram of immedops given in the SSDN2 is incorrect, ie:

I believe that you will find that the bug is an off-by-one error in the
ASCII-art for the diagram for the case of a MAINOP with a base register
value of 3 on page 20-3. The offset field on a MAINOP is 6 bits <5:0> and
the base field is 3 <8:6>, leaving 7 bits <15:9> for the opcode.
Everything else appears to be consistant with this interpretation.

---------------------------
All programming can be viewed as an exercise.
---------------------------
Alastair Bridgewater
e-mail: nyef@softhome.net