Forum Discussion
Altera_Forum
Honored Contributor
20 years agoAsm code and C imme
Hi, In my project, I define a imme in *.c file: #define SPI_0_BASE 0x00800980 In one of my asm routine, I wanna use this imme, how could I do? asm("movhi r15,%hi(SPI_0_BASE...
Altera_Forum
Honored Contributor
20 years ago --- Quote Start --- originally posted by david_cai@Dec 27 2005, 06:47 AM #define spi_0_base 0x00800980
in one of my asm routine, i wanna use this imme, how could i do?
asm("movhi r15,%hi(spi_0_base)");
<div align='right'><{post_snapback}> (index.php?act=findpost&pid=11793)
--- quote end ---
--- Quote End --- It does not work because the symbol is inside " "... I do not know any escape unless you either substitute the symbol by hand or you rewrite the statement in C ... bye PJ