Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!usc!jarthur!uunet!microsoft!kensy From: kensy@microsoft.UUCP (Ken SYKES) Newsgroups: comp.windows.ms Subject: Re: __ahincr Keywords: 64k+ data in in-line assembly Message-ID: <55849@microsoft.UUCP> Date: 16 Jul 90 18:47:14 GMT References: <6887@umd5.umd.edu> Reply-To: kensy@microsoft.UUCP (Ken SYKES) Distribution: usa Organization: Microsoft Corp., Redmond WA Lines: 42 In article <6887@umd5.umd.edu> brianf@umd5.umd.edu (Brian Farmer) writes: > > Has anyone tried to use the predefined variable '__ahincr'. We [stuff deleted] > >extern int __ahincr; >extern int _ahincr; > >The first definition gives an undefined external on linking. The second >compiles and links correctly but on running has a value of zero. > >The code the actually works with the segments is in-line code. > > >Thanks for any help you might be able to offer. > >Brian Farmer >brianf@umd5.umd.edu _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: extern int _ahincr; #define AHINCR &_ahincr in your code do seg += AHINCR; in assembler you would define the symbol as absolute external and everything would be fine. For the in-line assembler you may have to do the following: int ahincr = &_ahincr; and use ahincr in your in-line assembler (There may be an easier way...) Hope this helps. --Ken Sykes The opinions expressed are mine and don't represent my Employer's.