Mail Archives: djgpp/2011/03/17/02:19:08

X-Authentication-Warning: mail set sender to djgpp-bounces using -f
X-Recipient: djgpp AT delorie DOT com
Date: Thu, 17 Mar 2011 02:18:40 -0400
Message-Id: <>
From: Eli Zaretskii <eliz AT gnu DOT org>
To: djgpp AT delorie DOT com
<50f38a5d-a391-45e7-a039-14932c9134d8 AT 11g2000prf DOT googlegroups DOT com>
(message from Jim Michaels on Wed, 16 Mar 2011 16:16:47 -0700 (PDT))
Subject: Re: csdpmi7 not working on virtualbox, how use dosmemget with seg ofs
from int21h?
References: <39cdc18e-eccb-4213-b896-db3be020702e AT w9g2000prg DOT googlegroups DOT com>
<iknmth$1lb$1 AT speranza DOT aioe DOT org> <3e035797-6b8e-4106-bd29-98e87a9cc121 AT a21g2000prj DOT googlegroups DOT com>
<E1Pz5o6-0001qv-4s AT fencepost DOT gnu DOT org> <428d9bd6-efc5-4f66-bab3-961a0c4598f9 AT f31g2000pri DOT googlegroups DOT com>
<E1PzO3K-0007xl-Bg AT fencepost DOT gnu DOT org> <42d13cb8-adf4-4a86-9cf2-012d0929fb4c AT q40g2000prh DOT googlegroups DOT com>
<E1PzRg3-0006F7-Fj AT fencepost DOT gnu DOT org> <50f38a5d-a391-45e7-a039-14932c9134d8 AT 11g2000prf DOT googlegroups DOT com>
Reply-To: djgpp AT delorie DOT com

> From: Jim Michaels <jmichae3 AT yahoo DOT com>
> Newsgroups: comp.os.msdos.djgpp
> Date: Wed, 16 Mar 2011 16:16:47 -0700 (PDT)
> it would be very nice if
> I didn't have to do this, if DJGPP supported this already in
> _dos_getdiskfree() so I wouldn't have to code my own stuff.

Since no one felt the need to code this in the library, it wasn't
coded.  DJGPP is developed by volunteers.  You are welcome to submit
patches for inclusion in the library.

> when I make the 7303h calls I always get back failure (carry flag set
> and ax=0x0f), bur first I call 7300h, this seemed to help some.  maybe
> I need to install a critical error handler?

I don't think you need a critical error handler.

> the entire code for the program is 3100 lines long, so I think it's
> too large to post here.

No one asked for everything, just for enough of it to see all the
crucial details related to this system call.  Omitting declarations of
some of the arguments of the system call leaves important information

> maybe __dpmi_int() is hooking the software interrupt in a way that
> causes errors

No, __dpmi_int doesn't hook any interrupts.  It uses a DPMI function
to call a real-mode interrupt from a protected-mode program.

> or the flags register is not being set correctly after a software
> interrupt?

There's no need for you to consider a possibility that basic
infrastructure of calling DOS functions does not work in DJGPP.  If
something like that could be a problem, many library functions would
fail, which of course doesn't happen.

The answer to the problem is in your program, or perhaps in some issue
with FreeDOS and protected mode or DPMI (since I understand the
assembly that works is a real-mode program, not a protected-mode
program that uses DPMI).

You have been shown two working implementations.  I suggest to try
compiling them and see if they work.  If they work, then modify your
program to use the same code as those two implementations.  If they
don't work, the problem is with FreeDOS.

- Raw text -

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