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 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> <3e035797-6b8e-4106-bd29-98e87a9cc121 AT a21g2000prj DOT googlegroups DOT com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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 #include #include 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.