- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am trying to create a multi-line assembly #define.
The keil documentation says __asm { push ACC } is the format. That is a lie. If you do that, the result is:
2520 { push ACC; };
*** _____________________________________^
*** ERROR #A9 IN 2520 (Z:\drop-folder\Dropbox\4g\Cypress\Projects\Depth\DepthRTOS_PSOC3-Brd6V0\Source\tasks.src, LINE 25
20): SYNTAX ERROR
-----------
The correct format is
__asm push ACC
That produces the correct result.
In order to generate a #define that creates several lines of assembly code for 8051, you must use this format
__asm push ACC \n push IE \n CLR EA \n
The __asm caused the assembly to be generated. *Important:* to get *each* of the lines of assembly out, you must follow each assembly instruction with a \n. During my testing, I left the \n off of the CLR EA, and it did not get emitted.
Solved! Go to Solution.
- Labels:
-
PSoC Creator & Designer Software
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @WaMa_286156 ,
Thank you for sharing this useful information with the Infineon Community.
Please continue to use our products and contact us through the community regarding any queries you have on our products or information you would like to share.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @WaMa_286156 ,
Thank you for sharing this useful information with the Infineon Community.
Please continue to use our products and contact us through the community regarding any queries you have on our products or information you would like to share.