Assembly code in RTEMS C program on MVME162 VME CPU Board

Sebastian Huber sebastian.huber at embedded-brains.de
Fri Sep 20 07:59:37 UTC 2013


On 2013-09-20 09:47, AJAI KUMAR MEDHAVI wrote:
>
> I am using RTEMS 4.10.2 with Windows Based MinGW. I wish to use following
> Asssembly code within my RTEMS C application :
>
>
> rtems_device_driver ISOADC_write(rtems_device_major_number major,
> rtems_device_minor_number minor, void  *arg)
> {
>
>   ----
>   ----
>
>   asm volatile (" movea.l #$F0850010,%A1 ; "
> 				" add.l #2,%A1 ; "
> 				" move.w #2,(%A1) ; "
> 			   );

Why do you use inline assembler for this?  You can write this in C.  The 
volatile keyword exists for this purpose.

-- 
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.huber at embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.



More information about the users mailing list