Message-Id: <3.0.6.32.19990227223942.00908630@pop.globalserve.net> X-Sender: derbyshire AT pop DOT globalserve DOT net X-Mailer: QUALCOMM Windows Eudora Light Version 3.0.6 (32) Date: Sat, 27 Feb 1999 22:39:42 -0500 To: djgpp AT delorie DOT com From: Paul Derbyshire Subject: Re: Generating Machine Code on the fly In-Reply-To: <7b7gra$5nh$1@news4.svr.pol.co.uk> References: <7b6qpv$39t$1 AT news8 DOT svr DOT pol DOT co DOT uk> <199902261912 DOT OAA24117 AT envy DOT delorie DOT com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Reply-To: djgpp AT delorie DOT com At 01:12 AM 2/26/99 -0000, you wrote: >>This is exactly what the stub does :-) so it should work for you. And the Allegro compiled sprites. >Really? I can malloc 200mb and jump around within that code to my hearts >content? How? Surely I'd have to write my own flat memory mapping code? No, the asm runs in protected mode with the same flat memory access as your C code. The memory management is taken care of by the virtual memory management, which is CWSDPMI or Winblows in DJGPP and on Linux would be a kernel component. The virtual memory management uses hardware features of the i386 and later 32 bit chips to do address mapping and to trap access to a linear address that's not physically present and invoke a disk swap, transparently suspending your C/C++/asm code until the swap completes and the memory is present, then letting it resume none the wiser. -- .*. "Clouds are not spheres, mountains are not cones, coastlines are not -() < circles, and bark is not smooth, nor does lightning travel in a `*' straight line." ------------------------------------------------- -- B. Mandelbrot |http://surf.to/pgd.net _____________________ ____|________ Paul Derbyshire pderbysh AT usa DOT net Programmer & Humanist|ICQ: 10423848|