Binutils 2.15.97 available

Etienne Lorrain etienne_lorrain@yahoo.fr
Mon Apr 25 16:21:00 GMT 2005


--- Dave Korn <dave.korn@artimi.com> wrote:
> > >   asm volatile (" dataPS2 = %c0 ": : "i" (&MOUSE.data.PS2));
> 
>   IIUIC, all you want to do here is initialise an assembler-level variable
> with the address of MOUSE.data.PS2 at runtime, yes?  So why not make your
> life a load easier, and do it the other way round:
> void *dataPS2 = NULL;

  I do not think my method is that complex, not going through a variable
 pointer but just defining a symbol to write to. With your pointer I would
 have to read the content of the pointer and write to this address - and
 so save another register on the stack to store the address to write to
 in my interrupt treatment.
 This address is known at link time so there is no need to put it in
 a variable pointer.

  I can accept the argument of H.J. saying that the behaviour I am waiting
 is not guarantied - but I am sure it was working perfectly in my case,
 with binutils-2.15.
 The address is the same, the PS2 mouse is perfectly working in Gujin,
 and this field is only written under interrupt and only read in C.

  That is not a real problem for my application, I will initialise to
 get the MOUSE structure in BSS instead of COMMON.

  Thanks,
  Etienne.


	

	
		
__________________________________________________________________
Découvrez le nouveau Yahoo! Mail : 250 Mo d'espace de stockage pour vos mails ! 
Créez votre Yahoo! Mail sur http://fr.mail.yahoo.com/



More information about the Binutils mailing list