www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/09/24/12:00:29

From: Mitch Randall <mitch AT ncar DOT ucar DOT edu>
Newsgroups: comp.os.msdos.djgpp
Subject: Lauching ASPI from DJGPP
Date: Mon, 22 Sep 1997 14:13:47 -0600
Organization: National Center for Atmospheric Research
Lines: 36
Message-ID: <3426D17B.2A6B@ncar.ucar.edu>
NNTP-Posting-Host: 128.117.78.142
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

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. 
Here's code that doesn't work:

void aspi(short	srbseg)
   {
   __dpmi_regs  regs;
   short        stack[2];

   /* clear the real mode data structure */
   memset(&regs,0,sizeof(__dpmi_regs));

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

   /* push the segment and offset off SRB onto the stack (image) */
   /* Note: I've tried this both ways here */
   stack[0] = srbseg;
   stack[2] = 0;

   /* call the real mode aspi driver */
   __dpmi_simulate_real_mode_procedure_retf_stack(&regs,4,stack); 
   }

I've also tried the non-stack version:

__dpmi_simulate_real_mode_procedure_retf(&regs); 

(which is very similar to the original Watcom code) and I get the same 
result (doesn't work).

Thanks,

Mitch Randall

- Raw text -


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