Ask a question about prefix of operand

Started by leetow2003, November 27, 2010, 01:32:47 PM

Previous topic - Next topic

leetow2003

Hello all:
Look:
jump32 macro  selector,offsetv
         db     66h
         db     0eah      ;jmp
         dd     offsetv   ;4 bytes offset address
         dw     selector 
       endm
I find that these codes are unassembled:jmp selector:offsetv,and the
codes are embedded in 16-bit real mode,then look:
jump16 macro  selector,offsetv
        db     66h 
        db     0eah       ;jmp
        dw     offsetv    ;2 bytes offset address
        dw     selector 
      endm
but these codes aren't unassembled:jmp selector:offsetv in 32-bit p-mode,
I want to know which is operand,selector or offsetv?And which operand
is influenced by the prefix 66h,selector or offsetv?





clive

How the prefix is interpreted depends on the current mode of the processor. A disassembler looking at such code would need to know the context (16/32-bit) in effect to display the correct interpretation.

A segment/selector is always viewed as a 16-bit value, the address is what is 16 or 32-bit. The prefix inverts the normal sense the processor is working with.
It could be a random act of randomness. Those happen a lot as well.