From: kalum AT myflat DOT com Message-Id: <199910082326.RAA21185@lakdiva.slt.lk> To: djgpp AT delorie DOT com Date: Fri, 8 Oct 1999 17:26:35 +0600 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: RE: deriving the interrupt vector In-reply-to: <001201bf1101$bd633c20$ae3d7a86@phoenix.com> References: <199910072342 DOT RAA11101 AT lakdiva DOT slt DOT lk> X-mailer: Pegasus Mail for Win32 (v3.12) Reply-To: djgpp AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On 7 Oct 99, at 13:22, Johnny Chan 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