delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1994/07/30/16:57:01

Date: Sat, 30 Jul 94 14:45:51 -0400
From: dj AT ctron DOT com (DJ Delorie)
To: eliz AT is DOT elta DOT co DOT il
Cc: djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: Re: GO32 DPMI problem?

>   _go32_dpmi_registers regs;
> 
>   /* INT 21H/AX=4409H returns DX with 12th bit set, if drive is remote. */
>   regs.h.ah = 0x44;         /* IOCTL, Subfunction 09h */
>   regs.h.al = 9;
>   regs.h.bl = drv_no + 1;   /* 0 = default, 1 = 'A', etc.  */
>   _go32_dpmi_simulate_int(0x21, &regs);

You MUST completely initialize the _go32_dpmi_registers structure (see
the manual).  I recommend using memset(&regs, 0, sizeof(regs)) before
each place where you start filling in registers.

Primarily, the stack must be zero'd or initialized to point to a real
stack or your program *will* crash.

DJ



- Raw text -


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