[comp.unix.i386] VP/ix and Merge instruction sets

steve@nuchat.UUCP (Steve Nuchia) (11/27/89)

In article <128383@sun.Eng.Sun.COM> plocher@sun.UUCP (John Plocher) writes:
>No, DosMerge and VP/ix both run DOS in a virtual 8086 environment.

What about the 32 bit instructions?  If one is content to live with
the memory architecture of an 8086 can one generate code with 32 bit
arithmetic instrucitons and such?
-- 
Steve Nuchia	      South Coast Computing Services      (713) 964-2462
"Man is still the best computer that we can put aboard a spacecraft --
 and the only one that can be mass produced with unskilled labor."
					- Wernher von Braun

davidsen@crdos1.crd.ge.COM (Wm E Davidsen Jr) (11/28/89)

In article <16784@nuchat.UUCP> steve@nuchat.UUCP (Steve Nuchia) writes:

| What about the 32 bit instructions?  If one is content to live with
| the memory architecture of an 8086 can one generate code with 32 bit
| arithmetic instrucitons and such?

  Sure. FRACTINT does, and PKZIP seems to.
-- 
bill davidsen	(davidsen@crdos1.crd.GE.COM -or- uunet!crdgw1!crdos1!davidsen)
"The world is filled with fools. They blindly follow their so-called
'reason' in the face of the church and common sense. Any fool can see
that the world is flat!" - anon

swirsky@olivee.olivetti.com (Robert Swirsky) (11/28/89)

One thing many people don't realize is that the 32-bit arithmetic
instructions *are* available even in REAL and virtual 8086 mode. All
you have to do is put the operand size prefix 0x66 in front of
a math instruction.

Look in any good 80386 programming book for more information.

Of course many programs that expect the computer to be in REAL mode
will still have problems in virtual 8086 mode. For example, if
a program attempts of modify the CR registers, or to switch to 
protected mode, it would fail in virtual-8086 mode (and therefore VP/IX).

plocher@sally.Sun.COM (John Plocher) (11/28/89)

+-- In <16784@nuchat.UUCP> Steve Nuchia writes
| In article <128383@sun.Eng.Sun.COM> John Plocher writes:
| >No, DosMerge and VP/ix both run DOS in a virtual 8086 environment.
| 
| What about the 32 bit instructions?  If one is content to live with
+--

If the instructions exist on the 8086 you can use them in the
virtual 8086 mode.  This is a "hardware" mode of the 80386, not
a software emulation under Unix.  If the program won't run on
an IBM XT, it won't run under 80386 VP/ix or 80386 Merge.

The Microport 80286 Merge runs the DOS programs in Real Mode
on the '286, so a program "could" switch into protected mode
and do stuff, but it *WOULD* corrupt the memory and data
structures used by Unix; the program would crash when the next
interrupt came in :-)

    -John Plocher

davidsen@crdos1.crd.ge.COM (Wm E Davidsen Jr) (11/28/89)

In article <128424@sun.Eng.Sun.COM> plocher@sun.UUCP (John Plocher) writes:

| If the instructions exist on the 8086 you can use them in the
| virtual 8086 mode.  

  Correct.

|                     This is a "hardware" mode of the 80386, not
| a software emulation under Unix.  

  Also correct.

|                                   If the program won't run on
| an IBM XT, it won't run under 80386 VP/ix or 80386 Merge.

  Grain of truth. If a program runs using protected mode it won't run
under V86 mode. But there are programs which won't run on an XT which
do run on a 386, under DOS or V86 mode. Any program which uses only the
32 bit arithmetic instructions will run fine (and much faster). It may
NOT use the protected mode, nor addressing modes not available on the
8088.

  I know what you meant, but what you said was wrong. The arithmetic IS
available, the addressing modes are NOT available.
-- 
bill davidsen	(davidsen@crdos1.crd.GE.COM -or- uunet!crdgw1!crdos1!davidsen)
"The world is filled with fools. They blindly follow their so-called
'reason' in the face of the church and common sense. Any fool can see
that the world is flat!" - anon

harlow@sparky.UUCP (Jay B. Harlow) (11/29/89)

In article <1791@crdos1.crd.ge.COM> davidsen@crdos1.crd.ge.COM (Wm E Davidsen Jr) writes:
>In article <128424@sun.Eng.Sun.COM> plocher@sun.UUCP (John Plocher) writes:
>
>| If the instructions exist on the 8086 you can use them in the
>| virtual 8086 mode.  
>
>  Correct.
>
>|                     This is a "hardware" mode of the 80386, not
>| a software emulation under Unix.  
>
>  Also correct.
>
>|                                   If the program won't run on
>| an IBM XT, it won't run under 80386 VP/ix or 80386 Merge.
>
>  Grain of truth. If a program runs using protected mode it won't run
>under V86 mode. But there are programs which won't run on an XT which
>do run on a 386, under DOS or V86 mode. Any program which uses only the
>32 bit arithmetic instructions will run fine (and much faster). It may
>NOT use the protected mode, nor addressing modes not available on the
>8088.
>
>  I know what you meant, but what you said was wrong. The arithmetic IS
>available, the addressing modes are NOT available.
                                     ^^^ wrong.

All 386 addressing modes are available in 8086 real mode, & Virtual 86 mode,
(dig out your manuals, assemblers, debuggers & try it, i did it works ;-)

when reading the manual I have there are a few warnings about going over
64K displacements, cause you will cause an exception. (naturaly ;-)

	sample code:

	.data
index	dw ?			; index for table
table	dd 1,2,3,4,5,6		; ok this is a silly table ;-)

	.code
	movzx eax,index		; the index needs to be in 32 bit reg
	mov eax,table[eax*4]	; pull value out of table
;		^^^^^^^^^^^^	; 386 extended addressing mode

			Hope this corrected information helps.
			Jay B. Harlow


-- 
		Jay B. Harlow	<nuharlow@plains.nodak.edu>
	uunet!plains!nuharlow (UUCP)	nuharlow@plains (Bitnet)

Of course the above is personal opinion, And has no bearing on reality...