The instruction format for the Intel386 is shown in Figure 3.2[1]. The major change from the format for Sim286 is that a new byte, the SIB byte, is now a part of the instruction format. The SIB byte encodes an additional 32 forms of addressing available for each instruction. Figure 3.3 describes and shows the layout of the SIB byte[1].
![]() |
In addition to the 32 addressing modes added by SIB byte, the ModR/M byte can now be used to specify 32 new 32-bit addressing forms along with its original 32 16-bit addressing forms. Thus, there are a total of 96 address forms that can be used in Sim386. We incorporated the additional 64 addressing forms into the existing design. In particular, we modified the MemOp class to decode both the 16-bit and 32-bit addressing forms given by the ModR/M byte and added the decode and interpretation of the SIB byte to get the based indexed and scaled indexed forms of addressing. Figure 3.4 shows the algorithm used to compute the address specified by the SIB byte.
![]() |