AJAI KUMAR MEDHAVI
2013-09-20 07:47:36 UTC
Hi
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) ; "
);
----
---
}
The program is getting compiled without error, but on linking it is giving
"undefined reference to F085010"
Then I tried following piece of asm code :
asm volatile (" move.l BaseAdd,%A1 ; "
" add.l #2,%A1 ; "
" move.w #2,(%A1) ; "
" BaseAdd: dc.l $F0850010 ";
);
then it is giving error on line " BaseAdd: dc.l $F0850010 ";
Let me know exactly how to use following code in C file :
asm volatile (" move.l BaseAdd,%A1 ; "
" add.l #2,%A1 ; "
" move.w #2,(%A1) ; "
" BaseAdd: dc.l $F0850010 ";
);
OR
asm volatile (" BaseAdd equ $FO850010;"
" movea.l #BaseAdd, %A1;"
" add.l #2,%A1 ; "
" move.w #2,(%A1) ; "
" BaseAdd: dc.l $F0850010 ";
);
Thanks in advance.
AJAI KUMAR MEDHAVI
SCIENTIFIC OFFICER
RAJA RAMMANNA CENTRE FOR ADVANCED TECHNOLGY
DEPARTMENT OF ATOMIC ENERGY, GOV. OF INDIA,
PO : CAT, INDORE-452013, INDIA
PH. 91-731-2488052
--
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) ; "
);
----
---
}
The program is getting compiled without error, but on linking it is giving
"undefined reference to F085010"
Then I tried following piece of asm code :
asm volatile (" move.l BaseAdd,%A1 ; "
" add.l #2,%A1 ; "
" move.w #2,(%A1) ; "
" BaseAdd: dc.l $F0850010 ";
);
then it is giving error on line " BaseAdd: dc.l $F0850010 ";
Let me know exactly how to use following code in C file :
asm volatile (" move.l BaseAdd,%A1 ; "
" add.l #2,%A1 ; "
" move.w #2,(%A1) ; "
" BaseAdd: dc.l $F0850010 ";
);
OR
asm volatile (" BaseAdd equ $FO850010;"
" movea.l #BaseAdd, %A1;"
" add.l #2,%A1 ; "
" move.w #2,(%A1) ; "
" BaseAdd: dc.l $F0850010 ";
);
Thanks in advance.
AJAI KUMAR MEDHAVI
SCIENTIFIC OFFICER
RAJA RAMMANNA CENTRE FOR ADVANCED TECHNOLGY
DEPARTMENT OF ATOMIC ENERGY, GOV. OF INDIA,
PO : CAT, INDORE-452013, INDIA
PH. 91-731-2488052
--