Message-ID: <3D20F4E0.90907@calixo.no-really.net> Date: Tue, 02 Jul 2002 02:33:36 +0200 From: David Anderson User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.2.1) Gecko/20010901 X-Accept-Language: en-us MIME-Version: 1.0 Newsgroups: comp.os.msdos.djgpp Subject: Re: Pointer arithmetics References: <3D205E79 DOT 7020104 AT calixo DOT no-really DOT net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Lines: 26 NNTP-Posting-Host: cab-192027.calixo.net X-Trace: 1025570035 read.news.fr.uu.net 196 213.166.192.27 X-Complaints-To: abuse AT fr DOT uu DOT net To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com >>So I decided I'd have a go at converting the >>linear address to seg:offset for the ISR. > > don't. use the routine provided by djgpp. *kicks himself for not RTFMing properly* Thanks for the pointer. One more question however: I have an assembly file (compile to object code with tasm), and I want to link it against C source code. From what I understand, I must declare the ASM functions as extern in the C code, declare the function global in the ASM code (not forgetting to prefix the _), and let her rip. However, I'd like this ASM routine to modify a statically defined variable, called mouse_state_changed (unsigned char). How do I make it accessible in the ASM file? Declare it as 'extern mouse_state_changed' and then refer to [mouse_state_changed], or do I need to invoke further magic? Thank you for being patient with me, as I'm sure the answer is in a manual I missed somewhere. David Anderson