This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Inline assembly in function definition to add two values

Inline assembly in function definition to add two values passing to the function as arguments

Would appreciate if someone can tell/show me how to create a variable in assembly.
I'm having a small assignment that I have to pass two values to a function as arguments &
in function definition I need to add the two values and the sum is to be return to the main function.
The addition in function definition need to write in inline assembly.

Is this possible that can we return the value or variable from the assembly?
How to create a variable in assembly & how to assign the value to it?

I know that how to write inline assembly in keil C and generate its SRC.

As I'm a learner of assembly & keil C  waiting for helpful messages from u eagerly.

Thank U.