Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!apple!usc!cs.utexas.edu!uunet!microsoft!michaelt From: michaelt@microsoft.UUCP (Michael THURLKILL) Newsgroups: comp.windows.ms Subject: Re: __ahincr Keywords: 64k+ data in in-line assembly Message-ID: <55880@microsoft.UUCP> Date: 17 Jul 90 16:14:41 GMT References: <6887@umd5.umd.edu> <55849@microsoft.UUCP> Reply-To: michaelt@microsoft.UUCP (Michael THURLKILL) Distribution: usa Organization: Microsoft Corp., Redmond WA Lines: 26 In article <55849@microsoft.UUCP> kensy@microsoft.UUCP (Ken SYKES) writes: >In article <6887@umd5.umd.edu> brianf@umd5.umd.edu (Brian Farmer) writes: >> >> Has anyone tried to use the predefined variable '__ahincr'. We > >_ahincr is an absolute external which means that the value you want >is actually the address of the variable, not the contents. What you >should do is the following: > Also remember, if you are writing in C, you shouldn't normally need to use __ahincr directly. If you declare your pointers as HUGE, the C compiler will generate the necessary code for you (by using __ahincr). You would have to use __ahincr directly if you are doing something other than 'normal' huge pointer manipulation, or in your case, useing inline assembler. In that case, you would need to take the address as described previously. Also for an example of using __ahincr, write some code that uses huge pointers and steps through a >64k array. Generate an assembler listing with the /Fa switch from the compiler, or look at the code in assembler mode in codeview. Mike Thurlkill Disclaimer: These are my opinions. They should not be misconstrued as being correct or as having any relation to my employer.