ARM Technical Support Knowledge Articles

INLINE ASSEMBLY

Applies to: C51 C Compiler

Answer


Information in this article applies to:


QUESTION

I'm currently working on an interrupt service routine that has a challenging timing requirement. After compiling the routine and looking at the assembly listing I noticed that the complier chose a different CJNE instruction than I would have.

I was wondering if there was an easy way to modify the assembled code by changing a few of the assembly lines without having to re-write the whole routine in assmebly?

ANSWER

You can write your code in C, then use the SRC directive to have the compiler generate an assembly module for your C code. You may modify the generated assembly file and include that in your project. Note that once you modify this file, you should not regenerate it with the C file because that would overwrite your changes.

MORE INFORMATION

Article last edited on: 2005-09-22 11:35:43

Rate this article

[Bad]
|
|
[Good]
Disagree? Move your mouse over the bar and click

Did you find this article helpful? Yes No

How can we improve this article?

Link to this article
Copyright © 2011 ARM Limited. All rights reserved. External (Open), Non-Confidential