Path: utzoo!attcan!uunet!mailrus!cornell!uw-beaver!Teknowledge.COM!polya!shelby!lindy!news From: LC.YRS@forsythe.stanford.edu (Richard Stanton) Newsgroups: comp.sys.ibm.pc Subject: Re: arrays > 64k Message-ID: <5927@lindy.Stanford.EDU> Date: 21 Nov 89 01:40:42 GMT Sender: news@lindy.Stanford.EDU (News Service) Lines: 17 In article <1989Nov18.222704.16822@ccu.umanitoba.ca>, rahardj@ccu.umanitoba.ca (Budi Rahardjo) writes: >I am trying to write a program (in MSC) which loads a 100K data into memory, >and save the starting address and ending address with a pointer or index. >The problem is after reaching the end of 64 K the pointer wrap around >the beginning of the same data blocks, so it writes over the first 36K. >To make it simple, here is the problem I have : >* How do I increment the pointer so that it can point beyond the 64 barier ? > As far as I can tell, the problem is that you are not using a huge pointer to your array. Normal pointers only use a 16 bit address, thus can access at most 64k before they go back to the beginning of the segment. If you declare the pointer as e.g. (char huge *), it will now have a 32 bit address, and should be able to address the full 100k. Richard Stanton