ftp.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2011/03/03/02:45:20

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
From: Jim Michaels <jmichae3 AT yahoo DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: csdpmi7 not working on virtualbox, how use dosmemget with seg ofs
from int21h?
Date: Wed, 2 Mar 2011 23:22:29 -0800 (PST)
Organization: http://groups.google.com
Lines: 80
Message-ID: <39cdc18e-eccb-4213-b896-db3be020702e@w9g2000prg.googlegroups.com>
NNTP-Posting-Host: 71.237.186.184
Mime-Version: 1.0
X-Trace: posting.google.com 1299137046 31255 127.0.0.1 (3 Mar 2011 07:24:06 GMT)
X-Complaints-To: groups-abuse AT google DOT com
NNTP-Posting-Date: Thu, 3 Mar 2011 07:24:06 +0000 (UTC)
Complaints-To: groups-abuse AT google DOT com
Injection-Info: w9g2000prg.googlegroups.com; posting-host=71.237.186.184; 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.13)
Gecko/20101203 Firefox/3.6.13 ( .NET CLR 3.5.30729),gzip(gfe)
Bytes: 4387
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

I looked at all the FAQs and documentation.  but I have found nothing
to prepare me for this:

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.

http://www.delorie.com/djgpp/v2faq/faq18_5.html
doesn't help,
http://www.delorie.com/djgpp/v2faq/faq18_4.html
doesn't entirely help but looks kind of useful.

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?

typedef struct extFAT32FreeSpaceStructure {
/* 00h	WORD*/uint16_t	ret_size_of_returned_structure
__attribute__((packed));
/* 02h	WORD*/uint16_t
call_structure_version_ret_actual_structure_version
__attribute__((packed));// (0000h)
/* 04h	DWORD*/uint32_t
number_of_sectors_per_cluster_with_adjustment_for_compression
__attribute__((packed));
/* 08h	DWORD*/uint32_t	number_of_bytes_per_sector
__attribute__((packed));
/* 0Ch	DWORD*/uint32_t	number_of_available_clusters
__attribute__((packed));
/* 10h	DWORD*/uint32_t	total_number_of_clusters_on_the_drive
__attribute__((packed));
/* 14h	DWORD*/uint32_t
number_of_physical_sectors_available_on_the_drive_without_adjustment_for_compression
__attribute__((packed));
/* 18h	DWORD*/uint32_t
total_number_of_physical_sectors_on_the_drive_without_adjustment_for_compression
__attribute__((packed));
/* 1Ch	DWORD*/uint32_t
number_of_available_allocation_units_without_adjustment_for_compression
__attribute__((packed));
/* 20h	DWORD*/uint32_t
total_allocation_units_without_adjustment_for_compression
__attribute__((packed));
/* 24h  8 BYTEs*/uint64_t	reserved __attribute__((packed));
} extFAT32FreeSpaceStructure;

-------------------
also, just like it says in http://www.delorie.com/djgpp/v2faq/faq6_2.html
I am getting the "No DPMI" message.  the way I dealt with that was to
gcc whatever -o a.exe something.cpp
exe2coff a.exe
copy /b cwsdstub.exe+a something.exe
del a
del a.exe

this kind of executable does not work on virtualbox.  I followed the
csdpmi7b documentation explicitly.
I get "No DPMI" when I run it under FreeDOS 1.0 under virtualbox.  Do
you know why this might be?

virtualbox also has problems with my dvd drive by the way, it
recognizes it in virtualbox, but not within the VM...  so virtualbox
may be quite at fault.
I think I have tried my stuff on real machines and they run just
fine.  I wonder if there is a VM that works best for FreeDOS
installation under Windows?  I am trying to work with its FAT32
filesystem especially.

side comment: I had hoped the DPMI server would have been built into
the executables and I wouldn't have to make these extra build steps
using a batch file for all software I make.  I like monolithic
executables, I don't like managing multiple pieces of executables.
(but that's just me I guess).  consider this a vote for monolithic
executables that just work, even on virtual machines.

Jim Michaels

- Raw text -


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