ftp.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2011/03/16/16:00:09

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: Wed, 16 Mar 2011 15:45:54 -0400
Organization: Aioe.org NNTP Server
Lines: 67
Message-ID: <ilr3pq$sg2$1@speranza.aioe.org>
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> <ilqu49$5v6$1 AT speranza DOT aioe DOT org> <ilr1cl$in9$1 AT speranza DOT aioe DOT org>
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: 3410
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

"Rod Pemberton" <do_not_have AT notreplytome DOT cmm> wrote in message
news:ilr1cl$in9$1 AT speranza DOT aioe DOT org...
> "Rod Pemberton" <do_not_have AT notreplytome DOT cmm> wrote in message
> news:ilqu49$5v6$1 AT speranza DOT aioe DOT org...
> >
> > Here's
> > my code, after my .sig, which is *tested* and *working*.
> >
>
> Let me clarify that...
>
> Windows 95/98/SE/ME provides function 7303h for FAT32 drives.  Looking at
> RBIL, I'm not sure if this is available in real mode MS-DOS, or not.
> I.e., it may only be available in a Windows console, or "dosbox".
>
> So, the code I posted works with DJGPP v2.03 and v2.04 in a Windows 98 SE
> console widow, or "dosbox".  The code *does not* work for me with MS-DOS
> v7.10.  DOSLFN upto and including v0.40e supports most of the 71xxh LFN
> functions and none of the 73xxh FAT32 functions.  So, DOSLFN doesn't help
> any.
>
> For a the working code in a console window, r.x.ax=7303h and CF=0.  The CF
> is: r.x.flags&1.  For MS-DOS v7.10, my code returns r.x.ax=57h and CF=1.
> RBIL says AL=0 on unsupported DOS versions.  So, 7303h _should_ be
> supported.  If it works in a Windows 98 console, it works for real mode
> DOS too.  Sorry, I do not know what the issue is yet, i.e., programming
> error by me, or an unsupported function in DOS.  I could try Jason's code
> for you...
>

Once r.x.ax and r.x.cx are initialized, Jason's code works in both DOS
and Windows console.  That means 7303h is supported for both, at least for
MS-DOS v7.10.  If RBIL is correct, you'd need a DOS from Windows 95 or
later.

To fix my version so it works correctly like Jason's, two changes are
needed:

1) add the following line as the first line of lfn_7303()

_farpokew(_dos_ds, __tb+2+OFFS, 0); /* initialise the version */

2) add this include with the other includes at the beginning

#include <sys/farptr.h>


So, with those two changes to my code, you have a __working__ example, as
desired.

Instead of setting the a value and then needing to copy the entire
structure, Jason farpoke's a value of zero for:

extFAT32FreeSpaceStructure.call_structure_version_ret_actual_structure_versi
on

You could set it to zero, and then copy the structure.  That would be more
understandable.

Good luck,


Rod Pemberton



- Raw text -


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