delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2003/07/13/14:20:57

Date: Sun, 13 Jul 2003 21:18:55 +0200
From: "Eli Zaretskii" <eliz AT elta DOT co DOT il>
Sender: halo1 AT zahav DOT net DOT il
To: djgpp AT delorie DOT com
Message-Id: <7458-Sun13Jul2003211853+0300-eliz@elta.co.il>
X-Mailer: emacs 21.3.50 (via feedmail 8 I) and Blat ver 1.8.9
In-reply-to: <rp2ggv8td86e7230fvjb6s0map4lb7274l@4ax.com> (message from Nick
on Sun, 06 Jul 2003 13:48:48 +0200)
Subject: Re: ASPI issue
References: <rp2ggv8td86e7230fvjb6s0map4lb7274l AT 4ax DOT com>
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> From: Nick <charles AT NO-SPAM DOT iie DOT cnam DOT fr>
> Newsgroups: comp.os.msdos.djgpp
> Date: Sun, 06 Jul 2003 13:48:48 +0200
> 
> My code is 
> 
> void ( *Aspi )( unsigned char * ) = ( void  * )0;

Where's the pointer to Aspi set to something non-zero?  I don't see
anything in your code that does that.  Did I miss something?

> 	callback_info.pm_offset = (long)Aspi;

This is only valid if Aspi is a real function, not a NULL pointer.
That is, you need to write a _real_ handler function called Aspi.

> And when I try to use Aspi(srb) I have a seg fault.

Please post the full text of the crash message, complete with
registers' dump and SYMIFY'ed call traceback.  That info is very
important to find the reason(s) for the crash.

> I assume it's
> because either srb should be in Dos memory, but i've copied it in __tb
> and it crashed as well, or Aspi is not well defined, or there is
> something else I didn't catch.

I think it's because Aspi is a NULL pointer.  You cannot call a NULL
pointer without crashing.

- Raw text -


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