Using variables/functions to and from C and assembly | Cypress Semiconductor
Using variables/functions to and from C and assembly
The following considerations are necessary for using variables/functions to and from C and assembly:
a) Using a C variable/function in asm:
Put an "_" in front of every variable/function name from C when using in asm. Ex. A variable declared as char string in C can be used as _string in asm
b) Using an asm variable/function in C:
Declare the variable/function in asm with an "_" in the front of the name and use the variable/function as its name i.e. without the "_" in C.
Ex. A variable _MyByte : DB 10 can be used as MyByte in C.