X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f From: Jim Michaels Newsgroups: comp.os.msdos.djgpp Subject: Re: csdpmi7 not working on virtualbox, how use dosmemget with seg ofs from int21h? Date: Mon, 14 Mar 2011 02:06:34 -0700 (PDT) Organization: http://groups.google.com Lines: 52 Message-ID: <3e035797-6b8e-4106-bd29-98e87a9cc121@a21g2000prj.googlegroups.com> References: <39cdc18e-eccb-4213-b896-db3be020702e AT w9g2000prg DOT googlegroups DOT com> NNTP-Posting-Host: 24.21.90.47 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1300093751 13803 127.0.0.1 (14 Mar 2011 09:09:11 GMT) X-Complaints-To: groups-abuse AT google DOT com NNTP-Posting-Date: Mon, 14 Mar 2011 09:09:11 +0000 (UTC) Complaints-To: groups-abuse AT google DOT com Injection-Info: a21g2000prj.googlegroups.com; posting-host=24.21.90.47; posting-account=05hOMwoAAAB6R8xtiQKzEljSMzgOhVF1 User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.15) Gecko/20110303 Firefox/3.6.15 ( .NET CLR 3.5.30729),gzip(gfe) Bytes: 3418 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com On Mar 3, 2:31=A0am, "Rod Pemberton" wrote: > "Jim Michaels" wrote in message > > news:39cdc18e-eccb-4213-b896-db3be020702e AT w9g2000prg DOT googlegroups DOT com... > > >. > > I am doing an int 21h function 7303h disk free space call, and I need > > to pass a structure to this function and when the function finishes, > > it returns a similar structure back, but with different data filled > > in. > > [...] > > > 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. > > > any detailed clues/code as to how I should deal with that? > > Yes, look at the DJGPP portion of my lfn_71A0() routine here: > > http://groups.google.com/group/openwatcom.users.c_cpp/msg/a021f62b057... > > I'd think your routine would be very similar - basically identical - for > 7303h instead of 7160h. =A0E.g., change ax =3D 7303h from 7160h, and set = r.x.cx > =3D 44 (2Ch). =A0The routine uses a DJGPP area called the "transfer buffe= r" in > low memory. =A0It's addressed as selector:offset as _dos_ds:__tb in prote= cted > mode, but you usually just need the offset for PM functions. =A0It's addr= essed > as segment:offset as __tb_segment:__tb_offset in real mode or for real-mo= de > functions. =A0ds:dx uses the first part of the tb as a path and a later > portion, starting at OFFS, for the buffer at es:di. =A0You'll need to che= ck > RBIL to see if the flags and return related lines are correct. > > post 2 of 3. > > Rod Pemberton that doesn't actually tell me how to to get a random memory location value back from int21h in ES:DI and the structure is passed back in that. the code is not working. I get garbage. the code you showed me simply passes ES:DI to the function and the same ES:DI buffer is passed back. nothing useful there. in 7303h, the function returns new information. big problem. no code examples from djgpp!