delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2011/03/03/04:45:07.2

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
From: "Rod Pemberton" <do_not_have AT notreplytome DOT cmm>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: csdpmi7 not working on virtualbox, how use dosmemget with seg ofs from int21h?
Date: Thu, 3 Mar 2011 04:31:05 -0500
Organization: Aioe.org NNTP Server
Lines: 38
Message-ID: <iknmth$1lb$1@speranza.aioe.org>
References: <39cdc18e-eccb-4213-b896-db3be020702e AT w9g2000prg DOT googlegroups DOT com>
NNTP-Posting-Host: sg0uvLzlDfZOqmCSVnJXCA.user.speranza.aioe.org
X-Complaints-To: abuse AT aioe DOT org
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.2001
X-Notice: Filtered by postfilter v. 0.8.2
X-Newsreader: Microsoft Outlook Express 6.00.2800.2001
X-Priority: 3
X-MSMail-Priority: Normal
Bytes: 2467
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

"Jim Michaels" <jmichae3 AT yahoo DOT com> 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/a021f62b0571635e

I'd think your routine would be very similar - basically identical - for
7303h instead of 7160h.  E.g., change ax = 7303h from 7160h, and set r.x.cx
= 44 (2Ch).  The routine uses a DJGPP area called the "transfer buffer" in
low memory.  It's addressed as selector:offset as _dos_ds:__tb in protected
mode, but you usually just need the offset for PM functions.  It's addressed
as segment:offset as __tb_segment:__tb_offset in real mode or for real-mode
functions.  ds:dx uses the first part of the tb as a path and a later
portion, starting at OFFS, for the buffer at es:di.  You'll need to check
RBIL to see if the flags and return related lines are correct.

post 2 of 3.


Rod Pemberton



- Raw text -


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