Linux MS DOS discussions
 help / color / mirror / Atom feed
From: Paul Crawford <psc@sat.dundee.ac.uk>
To: Xavier Tarifa <Xavier.Tarifa@adparts.com>
Cc: "linux-msdos@vger.kernel.org" <linux-msdos@vger.kernel.org>
Subject: Re: Weirdest thing ever
Date: Fri, 28 Jan 2011 13:13:24 +0000	[thread overview]
Message-ID: <4D42C0F4.5020504@sat.dundee.ac.uk> (raw)
In-Reply-To: <4D421282.4050403@sat.dundee.ac.uk>

Dear Xavier,
> While it is conceivable that a DOS program could read beyond 2GB, it is
> very unlikely it could seek to those positions, and very certain it
> could not do so beyond 4GB.

Just to say that in the course of other testing here, I looked to see 
what the Microsoft C6.0 library calls for filelength() did with 64-bit 
dosemu. What I found was:

With 32-bit Linux/dosemu it can't open files >2GB.

With 64-bit it can open files >2GB but sees the length incorrectly:

For <4GB it is correct if you treat the returned value as unsigned. This 
may be the case in some software, but it is unlikely to be universal.

For files >4GB it seems to only get the lower 32-bits of the size, so 
the file appears (incorrectly) to be less than 4GB in size. I would have 
prefered the system to return (4GB-1) as at least you know the file is 
very big in this case!

However, I have not tested to see if useful data access is possible >2GB 
as I don't have any DOS applications that use very large files.

Regards,
Paul
-- 
Dr. Paul S. Crawford
Satellite Station
Dundee University
Small's Wynd, Dundee,
DD1 4HN, U.K.
Tel: +44 (0)1382 38 4687
Email: psc@sat.dundee.ac.uk
The University of Dundee is a Scottish Registered Charity, No. SC015096

  reply	other threads:[~2011-01-28 13:13 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-27 14:41 Weirdest thing ever Xavier Tarifa
2011-01-28  0:49 ` Paul Crawford
2011-01-28 13:13   ` Paul Crawford [this message]
2011-01-28 14:35     ` Xavier Tarifa
2011-01-28 14:47       ` solarflow99
  -- strict thread matches above, loose matches on Subject: below --
2011-01-27  9:43 Xavier Tarifa
2011-01-27 14:17 ` solarflow99

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4D42C0F4.5020504@sat.dundee.ac.uk \
    --to=psc@sat.dundee.ac.uk \
    --cc=Xavier.Tarifa@adparts.com \
    --cc=linux-msdos@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox