delorie.com/archives/browse.cgi | search |
X-Authentication-Warning: | delorie.com: mail set sender to djgpp-bounces using -f |
Date: | Thu, 03 Mar 2011 18:32:43 +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.14) Gecko/20110221 Thunderbird/3.1.8 |
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> |
In-Reply-To: | <39cdc18e-eccb-4213-b896-db3be020702e@w9g2000prg.googlegroups.com> |
NNTP-Posting-Host: | $$5emnjdfxoj7m29.news.x-privat.org |
Message-ID: | <4d6f5239@news.x-privat.org> |
Organization: | X-Privat.Org NNTP Server - http://www.x-privat.org |
Lines: | 23 |
X-Authenticated-User: | $$np02fmijtvj-bfao$k3 |
X-Complaints-To: | abuse AT x-privat DOT org |
Bytes: | 1785 |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
Reply-To: | djgpp AT delorie DOT com |
> the addresses of the structures in real mode memory in question are in > segment offset format coming from and going into int21h function 7303h > (a DOS FAT32 function) at es:di and I need a C string at ds:dx, and I > need to get at whatever is coming back from es:di. How about FAQ 18.2? Here's some untested code. #include <go32.h> #include <dpmi.h> #include <sys/farptr.h> __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); -- Jason.
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |