www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2002/07/01/20:47:02

Message-ID: <3D20F4E0.90907@calixo.no-really.net>
Date: Tue, 02 Jul 2002 02:33:36 +0200
From: David Anderson <david DOT no-spam DOT anderson AT calixo DOT no-really DOT net>
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> <ui14i9lus6d05 AT news DOT supernews DOT com>
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019