home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / os / msdos / programm / 10483 < prev    next >
Encoding:
Internet Message Format  |  1992-11-10  |  1.4 KB

  1. Path: sparky!uunet!noc.near.net!hri.com!ukma!gatech!destroyer!caen!batcomputer!cornell!rochester!cantaloupe.srv.cs.cmu.edu!das-news.harvard.edu!spdcc!merk!fcshome!fredex
  2. From: fredex@fcshome.UUCP (fred smith)
  3. Newsgroups: comp.os.msdos.programmer
  4. Subject: Re: fread-inf >= 64K in Borland C++
  5. Message-ID: <921109150@fcshome.UUCP>
  6. Date: 10 Nov 92 19:33:57 GMT
  7. References: <1992Nov9.095508@sees.bangor.ac.uk>
  8. Organization: What?!? Absolutely none!
  9. Lines: 22
  10. X-Newsreader: Tin 1.1 PL5
  11.  
  12. Bill Denton (AD) (bill@sees.bangor.ac.uk) wrote:
  13. : When I try to fread 64K or more in Borland C the PC locks up. This occurs with
  14. : all memory models and with version 2.0 and 3.0. Is this serious bug fixed in
  15. : version 3.1 ? How do I fix it, without the obvious, but unsatisifactory, solution of reading the data in chunks smaller the 64K ?
  16. This is NOT A BUG (unless you're generating 32-bit 386 or 486 code, that is!).
  17.  
  18. On MS-DOS systems the processor is run in real mode in which mode all 
  19. int's are 16-bit quantities. The biggest number you can store in an int
  20. is (2**32)-1, or 65535, or 64k-1. Therefore the biggest chunk of data that
  21. can be moved in an i/o operation is 64k, since all the low-level functions
  22. use an int to tell 'em how many bytes to move.
  23.  
  24. It's a FEATURE (of sorts).
  25.  
  26. : Bill Denton
  27. : bill@sees.bangor.ac.uk
  28. : School of Electronic Engineering and Computer Science
  29. : University of Wales, Bangor
  30. : UK
  31.