delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/09/25/05:29:03

Date: Thu, 25 Sep 1997 11:28:42 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Mitch Randall <mitch AT ncar DOT ucar DOT edu>
cc: djgpp AT delorie DOT com
Subject: Re: Lauching ASPI from DJGPP
In-Reply-To: <3426D17B.2A6B@ncar.ucar.edu>
Message-ID: <Pine.SUN.3.91.970925112805.22174D-100000@is>
MIME-Version: 1.0

On Mon, 22 Sep 1997, Mitch Randall wrote:

> Does anyone have an example code snippet of a call to ASPI that's known 
> to work? I've ported working code from Watcom to DJGPP. However, 
> there is no response from the ASPI manager with the DJGPP version.

I cannot be sure without seeing the original Watcom code, but I think
the following is the source of your trouble:

>    /* point real mode data structure to real mode entry point */
>    regs.x.cs = aspientry >> 16;
>    regs.x.ip = aspientry  & 0xFFFF;

It should say instead this, I think:

     regs.x.cs = aspientry >> 4;
     regs.x.ip = aspientry  & 0xF;

Real-mode addresses are formed by segment*16+offset.  Multiplication
by 16 is equivalent to a shift by 4 bits, not 16.

- Raw text -


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