haven't you been here before?
The first byte of the opcode is F7. In this case that single byte does not specify the entire opcode, it specifies one of a set of opcodes. The extra bits to detrermine which opcode are held in 3 bits of the ModR/M byte that follows.
The second byte, indicated by /6, means that the ModR/M byte is present, the Mod and the R/M fields of that byte are valid as usual but the reg/opcode field is 6. In the case of /digit in the manual the 3 REG bits of the ModR/M byte do not represent a register, they instead form part of the opcode.
Code:
1st byte 2nd byte/ 3rd byte? of opcode ModR/M DIV 1111 0111 mm110rrr F 7 /6 IDIV 1111 0111 mm111rrr F 7 /7 MUL 1111 0111 mm100rrr F 7 /4
Whether the third and subsequent bytes exist depends on the values of mm and rrr. You look up what they do in table 2.2 in the Intel manual (Table 2-2. 32-Bit Addressing Forms with the ModR/M Byte)
Paul.
Leave a comment: