delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2011/03/15/02:45:06

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
Date: Tue, 15 Mar 2011 16:20:02 +1000
From: Jason Hood <jadoxa AT yahoo DOT com DOT au>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9
MIME-Version: 1.0
Newsgroups: comp.os.msdos.djgpp
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> <f1bda3ea-6f2b-4e52-9378-85dd56198198 AT i39g2000prd DOT googlegroups DOT com>
In-Reply-To: <f1bda3ea-6f2b-4e52-9378-85dd56198198@i39g2000prd.googlegroups.com>
NNTP-Posting-Host: $$5emnjdfxmg7r8.news.x-privat.org
Message-ID: <4d7f0526@news.x-privat.org>
Organization: X-Privat.Org NNTP Server - http://www.x-privat.org
Lines: 28
X-Authenticated-User: $$np02fmijtvj-bfao$k3
X-Complaints-To: abuse AT x-privat DOT org
Bytes: 2278
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

On 15/03/2011 8:52, Jim Michaels wrote:

> I don't take to hand-waving.  I need concrete examples.  code it.

I showed you how, back on the third.  Here it is again (still untested).

#include <go32.h>
#include <dpmi.h>
#include <sys/farptr.h>

extFAT32FreeSpaceStructure extFAT32FreeSpace;
__dpmi_regs r;

_farpokew(_dos_ds, __tb+2, 0); // initialise the version
dosmemput(path, strlen(path)+1, __tb+sizeof(extFAT32FreeSpaceStructure));
r.x.ds = r.x.es = __tb >> 4;
r.x.dx = (__tb & 0x0f) + sizeof(extFAT32FreeSpaceStructure);
r.x.di = __tb & 0x0f;
__dpmi_int(0x21, &r);
dosmemget(__tb, sizeof(extFAT32FreeSpaceStructure), &extFAT32FreeSpace);

That points DS:DX and ES:DI to the transfer buffer.  The path is copied
to the buffer, leaving room for the structure.  After executing the int,
the structure is copied from the transfer buffer.  Simple, don't know
what your problem is.

-- 
Jason.

- Raw text -


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