From: Vik Heyndrickx Newsgroups: comp.os.msdos.djgpp Subject: Re: use esp? Date: Mon, 08 Dec 1997 08:57:09 +0100 Organization: University of Ghent, Belgium Lines: 20 Message-ID: <348BA855.3489@rug.ac.be> References: <34896044 DOT 7E7C AT cs DOT tu-berlin DOT de> NNTP-Posting-Host: eduserv1.rug.ac.be Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Christian Fleischer wrote: > > Hello! > > I am writing a 3d-engine under djgpp with nasm. > Is it somehow possible to redirect the esp-register, so that it does not > point to the stack but just to calculate something? The program also has > some interrupt-routines itself (keyboard-handler etc.) but I think they > could be turned off so long with cli and sti... It is possible but it is as dangerous as going blind folded from Manhattan to the Bronx. *Any* exception (hardware interrupt) or trap can occur, and when this interrupt does not cause a task switch (and it is not up to you to control that) it will use the stack, hence esp also. It is a very bad idea to do so. -- \ Vik /-_-_-_-_-_-_/ \___/ Heyndrickx / \ /-_-_-_-_-_-_/