On 8/21/06, malc wrote: > > On Mon, 21 Aug 2006, Igor Kovalenko wrote: > > > On 8/21/06, malc wrote: > >> > >> On Mon, 21 Aug 2006, Igor Kovalenko wrote: > >> > >> > >> > >> > Right. Here is the real one with correct case labels. > >> > >> Sorry, forgot to mention that atop of the hex/bin problem the code also > >> suffers from lack of proper 16/64 bit modrm decoding. > > > > > > seems to me that 16 and 64 bit cases does not apply here > > Well, quick experiment in vm86 environment suggests that i'm right at > least for 16bit case. > > > xor ax, ax > int 16h > db 0xf, 0x19, 5, 0xde, 0xad > db 0xf, 0x19, 5, 0xbe, 0xef > mov ah, 9 > mov dx, erm > add dx, 0x100 > int 21h > xor ax, ax > int 16h > ret > erm db "moo$" > > > nasm -o moo.com moo.asm > dosemu moo.com > > 64bit case should be investigated by someone who possesses 64bit OS. > Here is the updated patch, should implement 16/32/64 modes according to public intel docs. Operand size is taken from DisassContext->dflag which is set beforehand; I assume it is decoded correctly wrt appropriate instruction prefixes. -- Kind Regards, Igor V. Kovalenko