delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/12/08/14:47:23

From: Vik Heyndrickx <Vik DOT Heyndrickx AT rug DOT ac DOT be>
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
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

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 /          
   \ /-_-_-_-_-_-_/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019