🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.os2.programmer
Article #2594

Re: Reading more than 64K

#2594
From: CADSI
Date: Thu, 02 May 1991 05:40
26 lines
1897 bytes
From article <1991May1.043104.29860@bohra.cpg.oz.au>, by ejp@bohra.cpg.oz.au (Esmond Pitt):
> In article <1991Apr30.200832.9352@ccad.uiowa.edu> cadsi@ccad.uiowa.edu (CADSI) writes:
>> From article <SO-ECS.91Apr23115117@stekt1.oulu.fi>, by so-ecs@stekt1.oulu.fi (Juha Ruotsalainen ti):
>>> How can my program read a file bigger than 64k into memory. At the
>>> moment I try to read 64k`s at a time and the rest of it (less than
>>> 64k) afterwards. But after I`ve read 0xffff bytes, the next DosRead
>>> reads only 1 byte.
>>
>> Is this a problem with the fact that read and write can only r/w
>> 64K - 1 bytes at a time, noting the fact that the error status
>> return (-1) from read and write represents 64K exactly???
> 
> You're talking about read(). Juha asked about DosRead(). Let's talk
> about DosRead(). It doesn't return -1 on error at all, and even if it
> did, -1 does not represent '64k exactly'.

OOOOOOpps, quite right, I meant 64K-1, I typed things wrong here,
don't read what I typed, read what I meant!

> 64k is (65536 == 0x10000), not (65535 == 0xffff == 64k - 1).

|----------------------------------------------------------------------------|
|Tom Hite					|  The views expressed by me |
|Manager, Product development			|  are mine, not necessarily |
|CADSI (Computer Aided Design Software Inc.	|  the views of CADSI.       |
|----------------------------------------------------------------------------|
Technical Details
Message-ID: <1991May2.054020.14576@ccad.uiowa.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!ns-mx!ccad.uiowa.edu!cadsi
References: <1991May1.043104.29860@bohra.cpg.oz.au>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!ns-mx!ccad.uiowa.edu!cadsi
From: cadsi@ccad.uiowa.edu (CADSI)
Newsgroups: comp.os.os2.programmer
Subject: Re: Reading more than 64K
Message-ID: <1991May2.054020.14576@ccad.uiowa.edu>
Date: 2 May 91 05:40:20 GMT
References: <1991May1.043104.29860@bohra.cpg.oz.au>
Distribution: comp.os.os2.programmer
Organization: CAD-Research, U. of Iowa, Iowa City, Iowa
Lines: 26