www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2002/03/06/00:45:07

X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f
From: Charles Sandmann <sandmann AT clio DOT rice DOT edu>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Easy question about pseudo registers
Date: Tue, 05 Mar 2002 23:16:35 CST
Organization: Rice University, Houston TX
Lines: 27
Message-ID: <3c85a633.sandmann@clio.rice.edu>
References: <502cdd0497217dbd43d790218af2b13c DOT 62691 AT mygate DOT mailgate DOT org>
NNTP-Posting-Host: clio.rice.edu
X-Trace: joe.rice.edu 1015392331 17610 128.42.105.3 (6 Mar 2002 05:25:31 GMT)
X-Complaints-To: abuse AT rice DOT edu
NNTP-Posting-Date: 6 Mar 2002 05:25:31 GMT
X-NewsEditor: ED-1.5.9
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

> Well I know that the instruction length will vary, but right now I just
> concentrating on the instruction in my crash.exe program, which is 4
> bytes long.

Okay...

> Also, I thought that all of the real mode reg values were passed on to
> _go32_dpmi_registers *r and that any changes made to r-> register would
> be passed back to the real registers.

You are probably getting tangled up with what the _go32_dpmi ...
wrapper does for you.  The DPMI spec says it's the user's responsibility
to set CS:IP in the register block - you need to read the DPMI spec
carefully then look at the source to the wrapper routine to see if 
it does what you want - or maybe you need to modify it or write your
own wrapper.  I don't have time to look at it right now, sorry.

> So if that isn't the case, do you know, or have an idea, of how I can
> access the real mode registers?

Please grab djlsr203.zip and look in src/libc/go32/gormcb.c (also 
available from cvs web access for a single file from www.delorie.com)
to see what it's doing for you.

A quick glance seems to me that it always loads CS:IP from the top of
the real mode stack, which is definitely the wrong thing in your case.
You probably need to write your own assembly wrapper.

- Raw text -


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