piclist 1997\08\04\212624a >
Thread: Windows 32 bits (was re MPLAB on Windows CE)
face BY : John Payson email (remove spam text)

The following question isn't really PIC related, but it seems to come up
now and again; perhaps it should go into a FAQ someplace?

> At 05:47 PM 8/2/97 -0700, you wrote:
> >WinNT IS a true 32 bit OS. It just provides 16 bit dlls for running legacy
> >apps ala Win 3.1.
> Sorry - no such thing as a true 32 bit operating system - what is the
> collective definition of a 16 or 32 bit operating system ANYWAY ???

In this context, the term "32-bit [operating system] refers to the mode in
which the 80x86 chip is run.  While it's possible to use both 16- and
32-bit instructions from within any mode, there are nonetheless two
issues to be considered:

[1] If an application passes a pointer to an OS call, what is the meaning
of the pointer?  Under Win16, a pointer contained a segment and an offset;
arithmetic on pointers beyond 64K wouldn't work.  Under WIn32, a pointer
contains a 32-bit virtual address and arrays up to 4GB (theoretical upper
limit) in size may be handled with having to be subdivided into 64K

[2] What is the instruction-level default mode?  On the 80386 and higher,
the processor can run in two [broadly speaking] modes:

(a) Instructions whose operand is "word" sized should operate on the
16-bit registers AX, BX, CX, etc.; memory addresses should be of the form
(Address + [BX | BP] + [SI | DI]).

(b) Instructions whose operand is "word" sized should operate on the
32-bit registers EAX, EBX, ECX, etc.; memory addresses should be of the
form (Address + [reg32] + [{1|2|4|8}*{reg32}).

If the machine is in mode "b", executing an instruction from set "a" will
require one or more override-prefix bytes; similarly, if it's in mode "a",
an instruction from mode "b" will require override prefix(es).

> >If all you run is 32 bit applications, WinNT never even tries to load or
> >intercept any 16 bit code.
> It may not load a 16bit dll 'app' BUT I would be willing to bet it is
> riddled with 16 bit code since its more efficient to selectively use
> 16 bit instructions when its just a complete waste of resources to try
> and FORCE a 4 gigabyte address space on each and every data structure ?

Actually, code size will often be smaller if a Win32 application
consistently uses 32-bit data types than if it mixes 32-bit and 16-bit
types (because 16-bit ops require extra prefixes).  While routines that
store large amounts of data in memory may benefit from using 16-bit types
(thereby saving 2 bytes per item) non-array variables should often be 32
bits to avoid extra prefix bytes.
<199708050124.UAA20521@Kitten.mcs.com> 7BIT

In reply to: <>
See also: www.piclist.com/techref/microchip/languages.htm?key=mplab
Reply You must be a member of the piclist mailing list (not only a www.piclist.com member) to post to the piclist. This form requires JavaScript and a browser/email client that can handle form mailto: posts.
Subject (change) Windows 32 bits (was re MPLAB on Windows CE)

month overview.

new search...