Menu

#537 mismatch in operand sizes

closed-invalid
nobody
Assembler (85)
5
2011-05-11
2011-05-10
mik
No

hi,
assembly line on real-mode 16-bit :
fnstenv dword [cs: (state - 0x1000)] ; CS:stat = 0x0100:XXXX
---------------------------------------
assembl it occur error follow: error: mismatch in operand sizes

SO, I do:
db 0x66 ; operand size override to 32-bit
fnstenv [cs: (state - 0x1000)] ; the default operand size is 16-bit
CPU run result is mine

But the Intel manual said:
(Vol. 2A 3-441) depending on the operating mode of the processor (protected or real) and the current operand-size attribute (16-bit or 32-bit).

with nasm my question: the current operand-size attribute cann't override ?

thx !
mik

Discussion

  • Frank Kotler

    Frank Kotler - 2011-05-11
    • status: open --> closed-invalid
     
  • Frank Kotler

    Frank Kotler - 2011-05-11

    The operation size for fstenv (or fnstenv) is a 14 or 28 byte buffer, so you're not going to be able to override it to dword. Not a bug.

    Best,
    Frank

     

Log in to post a comment.