home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!elroy.jpl.nasa.gov!ames!ncar!noao!arizona!arizona.edu!ace!jjr
- From: jjr@ace.ece.arizona.edu (Jeffrey J. Rodriguez)
- Newsgroups: comp.lang.c
- Subject: HALLOC and HUGE ptrs in Microsoft C
- Message-ID: <1993Jan21.175608.4279@arizona.edu>
- Date: 22 Jan 93 00:56:06 GMT
- Distribution: world,local
- Organization: U of Arizona Electrical and Computer Engineeering
- Lines: 14
- Nntp-Posting-Host: ace.ece.arizona.edu
-
- On a 486 running DOS, I need to allocate an array that's bigger than 64K,
- fill it up with data, and write it to a binary file.
- The MSC 7.0 manual says to use halloc(), which returns a "huge ptr".
- It also says that huge ptrs cannot be passed as args to library functions.
- Therefore, I can't pass the array to fwrite()!
- So, how do I write the data? (Do I really have to loop through putchar?)
-
- This sure seems cumbersome.
- It also seems that a program written for PC-DOS using halloc and huge
- ptrs would not run on a Sun running UNIX.
- So much for portable C.
-
- Jeff Rodriguez
- rodriguez@ece.arizona.edu
-