Nasm 2.09.09
Hi:
REG = 0 1 2 3 4 5 6 7
------------------------------------------------------------------------------------------
ModRM values:
............................................ ................
05 0D 15 1D 25 2D 35 3D [DI]
06 0E 16 1E 26 2E 36 3E D16 (simple var)
........................................... .............
This is a fragment of the ModRM values table for processors 80286 onwards in the intel architecture, although with extensions for later generation processors.
For an instruction of the type Logical-AND immediate byte into EA byte, of which
and byte[int_flag],0xfe is an example, the x86 manuals give
80 /4 db
Consulting the above table, column 4, we get
8026xxxxxxxxFE
And MASM, under MS-DOS version 5.00 corroborates:
802602D3 R FE
Also, assembling with the A command of DEBUG under windows XP, I see the same output.
However, assembling with any assembler under linux, including NASM, the output is
8025xxxxxxxxFE, as if the instruction mnemonics were and byte[DI],0xfe. In the ms-dos and windows xp (DEBUG) cases the displacement is 16 bits whereas in the linux assemblers case the displacement is 32 bits. But I do not think it has anything to do with the difference in the OP-codes.
Could somebody explain this, if it is worth it?