Mail Archives: djgpp/1999/10/08/13:11:39
On 7 Oct 99, at 13:22, Johnny Chan <jchan AT paclink DOT net>
wrote:
> Does the REGS support EAX?
> --jC
Dear Johnny,
If you take a 16 bit compiler like BORLAND the REGS.x.ax will be
16bits.
However in DJGPP (a 32 bit compiler) the default is that
REGS.x.ax is the same as EAX. (ie REGS.x.ax is 32bits.)
You can change this default behaviour as documented below in
the libc refrence for int86. By the way haven't you tried checking
the libc reference (just type 'info libc').
Note: The `.x.' branch is a problem generator. Most code expects
the
`.x.' branch to have e.g. "`.x.ax'" members, and that they are 16-bit.
If you know you want 32-bit values, use the `.d.eax' members. If
you
know you want 16-bit values, use the `.w.ax' members. The `.x.'
members behave according to `#defines', as follows:
`default'
If you specify no `#define', the `.x.' branch has "`ax'" members
and is 32-bit. This is compatible with previous versions of djgpp.
`_NAIVE_DOS_REGS'
This define gives you `.x.ax', but they are 16-bit. This is
probably what most programs ported from 16-bit dos compilers
will want.
`_BORLAND_DOS_REGS'
This define gives you `.x.eax' which are 32-bit. This is
compatible with Borland's 32-bit compilers.
Hope this helps and enjoy DJGPP!
Kalum <kalum AT myflat DOT com>
- Raw text -