Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

opcode x'66' on 8086

53 views
Skip to first unread message

Paul Edwards

unread,
May 2, 2023, 2:47:24 AM5/2/23
to
Hi.

I am interested in running 16-bit code in PM32.
I may simply run PM16 or CM16, but I'd like to
know if PM32 is an option (twice the number
of selectors).

I'm not definitely going to do this, I would just
like to know if it is definitively ruled out.

Assume a homebrew 8086 OS and a homebrew
80386 OS and a homebrew C compiler, and only
C-generated assembler will be used.

On PM32 you can do:

66 bb 44 33 MOV bx.imm16

Now my understanding is that the 66 override reverses
the default operand size. So it makes 16 bit within PM32
and 32 bit within PM16 and RM16.

BUT - that is only the case on an 80386 and above, right?

If I am using an 8086 or 80286 with no concept of 32-bit,
then even if I am in PM16 on an 80286, the x'66' will not
have any effect, right? Certainly not the effect that it has
on an 80386, anyway - right?

On an 8086 possibilities are:

1. x'66' crashes due to invalid opcode.
2. x'66' behaves as a noop.
3. x'66' acts as an alias to some other instruction,
e.g. x'56' or x'76', in the same way that x'82' was,
until 2000, an alias for x'80'.

Which of these is it?

Someone has recently shown up with a real 80286
computer (Compaq) and successfully booted PDOS/86
from a 360k floppy.

So I am now in a position to run a test assembler program
(masm syntax) on a real 80286. I don't have access to a
real 8086 at the moment.

Any suggestion on test code to answer which of the above
3 things the x'66' instruction is?

Or any other way to determine that?

Note that PDOS/86 has the ability to process int 3 and
int 1, so I can set a breakpoint and trace a single
instruction and see the registers.

Thanks. Paul.

Paul Edwards

unread,
May 6, 2023, 5:42:17 AM5/6/23
to
On Tuesday, May 2, 2023 at 2:47:24 PM UTC+8, Paul Edwards wrote:

> On an 8086 possibilities are:
>
> 1. x'66' crashes due to invalid opcode.
> 2. x'66' behaves as a noop.
> 3. x'66' acts as an alias to some other instruction,
> e.g. x'56' or x'76', in the same way that x'82' was,
> until 2000, an alias for x'80'.
>
> Which of these is it?

Got an answer elsewhere. It is number 3 ...

All the 6x opcodes are aliases of the corresponding 7x (conditional jump) opcodes on 8086 and 8088.

BFN. Paul.

0 new messages